@bytechain.cn/colamd 1.5.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 (157) hide show
  1. package/.github/workflows/release.yml +66 -0
  2. package/.trae/documents/fix-mermaid-colors-and-sankey.md +50 -0
  3. package/CLAUDE.md +87 -0
  4. package/LICENSE +21 -0
  5. package/README.md +540 -0
  6. package/README_CN.md +543 -0
  7. package/demo.md +486 -0
  8. package/dist/main/index.js +735 -0
  9. package/dist/preload/index.js +71 -0
  10. package/dist/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  11. package/dist/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  12. package/dist/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  13. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  14. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  15. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  16. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  17. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  18. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  19. package/dist/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  20. package/dist/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  21. package/dist/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  22. package/dist/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  23. package/dist/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  24. package/dist/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  25. package/dist/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  26. package/dist/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  27. package/dist/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  28. package/dist/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  29. package/dist/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  30. package/dist/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  31. package/dist/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  32. package/dist/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  33. package/dist/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  34. package/dist/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  35. package/dist/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  36. package/dist/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  37. package/dist/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  38. package/dist/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  39. package/dist/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  40. package/dist/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  41. package/dist/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  42. package/dist/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  43. package/dist/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  44. package/dist/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  45. package/dist/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  46. package/dist/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  47. package/dist/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  48. package/dist/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  49. package/dist/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  50. package/dist/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  51. package/dist/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  52. package/dist/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  53. package/dist/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  54. package/dist/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  55. package/dist/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  56. package/dist/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  57. package/dist/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  58. package/dist/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  59. package/dist/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  60. package/dist/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  61. package/dist/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  62. package/dist/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  63. package/dist/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  64. package/dist/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  65. package/dist/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  66. package/dist/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  67. package/dist/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  68. package/dist/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  69. package/dist/renderer/assets/arc-tTbbM8LO.js +131 -0
  70. package/dist/renderer/assets/architectureDiagram-3BPJPVTR-CEgYow6c.js +8720 -0
  71. package/dist/renderer/assets/blockDiagram-GPEHLZMM-LHyVtPwW.js +3825 -0
  72. package/dist/renderer/assets/c4Diagram-AAUBKEIU-C1P1eJrf.js +2482 -0
  73. package/dist/renderer/assets/channel-upve91Tq.js +7 -0
  74. package/dist/renderer/assets/chunk-2J33WTMH-lag2vhq9.js +24 -0
  75. package/dist/renderer/assets/chunk-4BX2VUAB-BXJ8Ggh-.js +16 -0
  76. package/dist/renderer/assets/chunk-55IACEB6-CiBpxRa1.js +13 -0
  77. package/dist/renderer/assets/chunk-727SXJPM-ODeKQFXC.js +2016 -0
  78. package/dist/renderer/assets/chunk-AQP2D5EJ-BK7xJolB.js +1953 -0
  79. package/dist/renderer/assets/chunk-FMBD7UC4-BxpCZPtz.js +19 -0
  80. package/dist/renderer/assets/chunk-ND2GUHAM-CqqaU9Ue.js +116 -0
  81. package/dist/renderer/assets/chunk-QZHKN3VN-Biq_K124.js +19 -0
  82. package/dist/renderer/assets/classDiagram-4FO5ZUOK-Cq95X99o.js +23 -0
  83. package/dist/renderer/assets/classDiagram-v2-Q7XG4LA2-Cq95X99o.js +23 -0
  84. package/dist/renderer/assets/cose-bilkent-S5V4N54A-XasiD0bu.js +4942 -0
  85. package/dist/renderer/assets/cytoscape.esm-CpHeHM5e.js +30269 -0
  86. package/dist/renderer/assets/dagre-BM42HDAG-Nq84Gfx4.js +705 -0
  87. package/dist/renderer/assets/defaultLocale-B2RvLBDe.js +206 -0
  88. package/dist/renderer/assets/diagram-2AECGRRQ-DwuB1GWt.js +301 -0
  89. package/dist/renderer/assets/diagram-5GNKFQAL-C2tgeI1h.js +169 -0
  90. package/dist/renderer/assets/diagram-KO2AKTUF-D5KzjNBc.js +632 -0
  91. package/dist/renderer/assets/diagram-LMA3HP47-C12xHS1c.js +212 -0
  92. package/dist/renderer/assets/diagram-OG6HWLK6-CnxI9oEa.js +851 -0
  93. package/dist/renderer/assets/erDiagram-TEJ5UH35-D_uPaKwn.js +1227 -0
  94. package/dist/renderer/assets/flowDiagram-I6XJVG4X-B6q_1-tE.js +2332 -0
  95. package/dist/renderer/assets/ganttDiagram-6RSMTGT7-CFo7ifF9.js +3720 -0
  96. package/dist/renderer/assets/gitGraphDiagram-PVQCEYII-WSexHTnq.js +1373 -0
  97. package/dist/renderer/assets/graph-DyX_9f6d.js +1988 -0
  98. package/dist/renderer/assets/index-DW7LS8C1.js +72292 -0
  99. package/dist/renderer/assets/index-dyHEFYvY.css +2184 -0
  100. package/dist/renderer/assets/infoDiagram-5YYISTIA-DaeJdLRq.js +31 -0
  101. package/dist/renderer/assets/init-ZxktEp_H.js +16 -0
  102. package/dist/renderer/assets/ishikawaDiagram-YF4QCWOH-DDCZc35f.js +967 -0
  103. package/dist/renderer/assets/journeyDiagram-JHISSGLW-BEdmpAgl.js +1255 -0
  104. package/dist/renderer/assets/kanban-definition-UN3LZRKU-BEFtQcFb.js +1052 -0
  105. package/dist/renderer/assets/layout-CAJgQHdw.js +2610 -0
  106. package/dist/renderer/assets/linear-B2ggJ8Am.js +340 -0
  107. package/dist/renderer/assets/mindmap-definition-RKZ34NQL-DSxVgHB5.js +1180 -0
  108. package/dist/renderer/assets/ordinal-DSZU4PqD.js +76 -0
  109. package/dist/renderer/assets/pieDiagram-4H26LBE5-CwYoJBuL.js +246 -0
  110. package/dist/renderer/assets/quadrantDiagram-W4KKPZXB-CST9Fvg9.js +1344 -0
  111. package/dist/renderer/assets/requirementDiagram-4Y6WPE33-DtrH52jS.js +1204 -0
  112. package/dist/renderer/assets/sankeyDiagram-5OEKKPKP-ca1tPzJ_.js +1274 -0
  113. package/dist/renderer/assets/sequenceDiagram-3UESZ5HK-Dfp1EJZ7.js +4514 -0
  114. package/dist/renderer/assets/stateDiagram-AJRCARHV-Bha2QoNB.js +450 -0
  115. package/dist/renderer/assets/stateDiagram-v2-BHNVJYJU-DWgFUYu1.js +21 -0
  116. package/dist/renderer/assets/timeline-definition-PNZ67QCA-C3h_-OTj.js +1596 -0
  117. package/dist/renderer/assets/vennDiagram-CIIHVFJN-DFzjSrZi.js +2486 -0
  118. package/dist/renderer/assets/wardley-L42UT6IY-Cx-VbqoS.js +30699 -0
  119. package/dist/renderer/assets/wardleyDiagram-YWT4CUSO-S2D9XqX6.js +975 -0
  120. package/dist/renderer/assets/xychartDiagram-2RQKCTM6-Cfxigbts.js +1932 -0
  121. package/dist/renderer/index.html +19 -0
  122. package/docs/agent-diff-view.md +48 -0
  123. package/electron-builder.yml +57 -0
  124. package/electron.vite.config.ts +30 -0
  125. package/package.json +40 -0
  126. package/resources/entitlements.mac.plist +12 -0
  127. package/resources/icon.icns +0 -0
  128. package/resources/icon.png +0 -0
  129. package/resources/icon.svg +23 -0
  130. package/resources/templates/slides/icon.png +0 -0
  131. package/resources/templates/slides/slides-template.md +74 -0
  132. package/resources/templates/slides/template.html +535 -0
  133. package/scripts/afterPack.js +13 -0
  134. package/src/main/index.ts +881 -0
  135. package/src/preload/index.ts +110 -0
  136. package/src/renderer/editor/editor.ts +204 -0
  137. package/src/renderer/editor/html-view.ts +15 -0
  138. package/src/renderer/editor/plugins/index.ts +76 -0
  139. package/src/renderer/editor/plugins/math-plugin.ts +297 -0
  140. package/src/renderer/editor/plugins/mermaid-plugin-custom.css +431 -0
  141. package/src/renderer/editor/plugins/mermaid-plugin-dark.css +428 -0
  142. package/src/renderer/editor/plugins/mermaid-plugin-elegant.css +443 -0
  143. package/src/renderer/editor/plugins/mermaid-plugin-newsprint.css +208 -0
  144. package/src/renderer/editor/plugins/mermaid-plugin.css +111 -0
  145. package/src/renderer/editor/plugins/mermaid-plugin.ts +679 -0
  146. package/src/renderer/env.d.ts +7 -0
  147. package/src/renderer/index.html +18 -0
  148. package/src/renderer/main.ts +303 -0
  149. package/src/renderer/themes/base.css +509 -0
  150. package/src/renderer/themes/theme-manager.ts +40 -0
  151. package/themes/README.md +280 -0
  152. package/themes/elegant.css +664 -0
  153. package/themes/guizang.css +732 -0
  154. package/tsconfig.json +14 -0
  155. package/tsconfig.main.json +11 -0
  156. package/tsconfig.preload.json +11 -0
  157. package/tsconfig.renderer.json +12 -0
@@ -0,0 +1,1988 @@
1
+ import { bt as isSymbol, bs as Symbol$1, bo as isObject, bq as baseGetTag, br as root, bp as isObjectLike, bu as freeGlobal } from "./index-DW7LS8C1.js";
2
+ function arrayMap(array, iteratee) {
3
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
4
+ while (++index < length) {
5
+ result[index] = iteratee(array[index], index, array);
6
+ }
7
+ return result;
8
+ }
9
+ var isArray = Array.isArray;
10
+ var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
11
+ function baseToString(value) {
12
+ if (typeof value == "string") {
13
+ return value;
14
+ }
15
+ if (isArray(value)) {
16
+ return arrayMap(value, baseToString) + "";
17
+ }
18
+ if (isSymbol(value)) {
19
+ return symbolToString ? symbolToString.call(value) : "";
20
+ }
21
+ var result = value + "";
22
+ return result == "0" && 1 / value == -Infinity ? "-0" : result;
23
+ }
24
+ function identity(value) {
25
+ return value;
26
+ }
27
+ var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
28
+ function isFunction(value) {
29
+ if (!isObject(value)) {
30
+ return false;
31
+ }
32
+ var tag = baseGetTag(value);
33
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
34
+ }
35
+ var coreJsData = root["__core-js_shared__"];
36
+ var maskSrcKey = (function() {
37
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
38
+ return uid ? "Symbol(src)_1." + uid : "";
39
+ })();
40
+ function isMasked(func) {
41
+ return !!maskSrcKey && maskSrcKey in func;
42
+ }
43
+ var funcProto$1 = Function.prototype;
44
+ var funcToString$1 = funcProto$1.toString;
45
+ function toSource(func) {
46
+ if (func != null) {
47
+ try {
48
+ return funcToString$1.call(func);
49
+ } catch (e) {
50
+ }
51
+ try {
52
+ return func + "";
53
+ } catch (e) {
54
+ }
55
+ }
56
+ return "";
57
+ }
58
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
59
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
60
+ var funcProto = Function.prototype, objectProto$a = Object.prototype;
61
+ var funcToString = funcProto.toString;
62
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
63
+ var reIsNative = RegExp(
64
+ "^" + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
65
+ );
66
+ function baseIsNative(value) {
67
+ if (!isObject(value) || isMasked(value)) {
68
+ return false;
69
+ }
70
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
71
+ return pattern.test(toSource(value));
72
+ }
73
+ function getValue(object, key) {
74
+ return object == null ? void 0 : object[key];
75
+ }
76
+ function getNative(object, key) {
77
+ var value = getValue(object, key);
78
+ return baseIsNative(value) ? value : void 0;
79
+ }
80
+ var WeakMap = getNative(root, "WeakMap");
81
+ function apply(func, thisArg, args) {
82
+ switch (args.length) {
83
+ case 0:
84
+ return func.call(thisArg);
85
+ case 1:
86
+ return func.call(thisArg, args[0]);
87
+ case 2:
88
+ return func.call(thisArg, args[0], args[1]);
89
+ case 3:
90
+ return func.call(thisArg, args[0], args[1], args[2]);
91
+ }
92
+ return func.apply(thisArg, args);
93
+ }
94
+ function noop() {
95
+ }
96
+ var HOT_COUNT = 800, HOT_SPAN = 16;
97
+ var nativeNow = Date.now;
98
+ function shortOut(func) {
99
+ var count = 0, lastCalled = 0;
100
+ return function() {
101
+ var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
102
+ lastCalled = stamp;
103
+ if (remaining > 0) {
104
+ if (++count >= HOT_COUNT) {
105
+ return arguments[0];
106
+ }
107
+ } else {
108
+ count = 0;
109
+ }
110
+ return func.apply(void 0, arguments);
111
+ };
112
+ }
113
+ function constant(value) {
114
+ return function() {
115
+ return value;
116
+ };
117
+ }
118
+ var defineProperty = (function() {
119
+ try {
120
+ var func = getNative(Object, "defineProperty");
121
+ func({}, "", {});
122
+ return func;
123
+ } catch (e) {
124
+ }
125
+ })();
126
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
127
+ return defineProperty(func, "toString", {
128
+ "configurable": true,
129
+ "enumerable": false,
130
+ "value": constant(string),
131
+ "writable": true
132
+ });
133
+ };
134
+ var setToString = shortOut(baseSetToString);
135
+ function arrayEach(array, iteratee) {
136
+ var index = -1, length = array == null ? 0 : array.length;
137
+ while (++index < length) {
138
+ if (iteratee(array[index], index, array) === false) {
139
+ break;
140
+ }
141
+ }
142
+ return array;
143
+ }
144
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
145
+ var length = array.length, index = fromIndex + -1;
146
+ while (++index < length) {
147
+ if (predicate(array[index], index, array)) {
148
+ return index;
149
+ }
150
+ }
151
+ return -1;
152
+ }
153
+ function baseIsNaN(value) {
154
+ return value !== value;
155
+ }
156
+ function strictIndexOf(array, value, fromIndex) {
157
+ var index = fromIndex - 1, length = array.length;
158
+ while (++index < length) {
159
+ if (array[index] === value) {
160
+ return index;
161
+ }
162
+ }
163
+ return -1;
164
+ }
165
+ function baseIndexOf(array, value, fromIndex) {
166
+ return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
167
+ }
168
+ function arrayIncludes(array, value) {
169
+ var length = array == null ? 0 : array.length;
170
+ return !!length && baseIndexOf(array, value, 0) > -1;
171
+ }
172
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
173
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
174
+ function isIndex(value, length) {
175
+ var type = typeof value;
176
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
177
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
178
+ }
179
+ function eq(value, other) {
180
+ return value === other || value !== value && other !== other;
181
+ }
182
+ var nativeMax = Math.max;
183
+ function overRest(func, start, transform) {
184
+ start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
185
+ return function() {
186
+ var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
187
+ while (++index < length) {
188
+ array[index] = args[start + index];
189
+ }
190
+ index = -1;
191
+ var otherArgs = Array(start + 1);
192
+ while (++index < start) {
193
+ otherArgs[index] = args[index];
194
+ }
195
+ otherArgs[start] = transform(array);
196
+ return apply(func, this, otherArgs);
197
+ };
198
+ }
199
+ function baseRest(func, start) {
200
+ return setToString(overRest(func, start, identity), func + "");
201
+ }
202
+ var MAX_SAFE_INTEGER = 9007199254740991;
203
+ function isLength(value) {
204
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
205
+ }
206
+ function isArrayLike(value) {
207
+ return value != null && isLength(value.length) && !isFunction(value);
208
+ }
209
+ var objectProto$9 = Object.prototype;
210
+ function isPrototype(value) {
211
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$9;
212
+ return value === proto;
213
+ }
214
+ function baseTimes(n, iteratee) {
215
+ var index = -1, result = Array(n);
216
+ while (++index < n) {
217
+ result[index] = iteratee(index);
218
+ }
219
+ return result;
220
+ }
221
+ var argsTag$2 = "[object Arguments]";
222
+ function baseIsArguments(value) {
223
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
224
+ }
225
+ var objectProto$8 = Object.prototype;
226
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
227
+ var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
228
+ var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
229
+ return arguments;
230
+ })()) ? baseIsArguments : function(value) {
231
+ return isObjectLike(value) && hasOwnProperty$7.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
232
+ };
233
+ function stubFalse() {
234
+ return false;
235
+ }
236
+ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
237
+ var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
238
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
239
+ var Buffer = moduleExports$1 ? root.Buffer : void 0;
240
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
241
+ var isBuffer = nativeIsBuffer || stubFalse;
242
+ var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$3 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$1 = "[object String]", weakMapTag$1 = "[object WeakMap]";
243
+ var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
244
+ var typedArrayTags = {};
245
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
246
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$3] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$3] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
247
+ function baseIsTypedArray(value) {
248
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
249
+ }
250
+ function baseUnary(func) {
251
+ return function(value) {
252
+ return func(value);
253
+ };
254
+ }
255
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
256
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
257
+ var moduleExports = freeModule && freeModule.exports === freeExports;
258
+ var freeProcess = moduleExports && freeGlobal.process;
259
+ var nodeUtil = (function() {
260
+ try {
261
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
262
+ if (types) {
263
+ return types;
264
+ }
265
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
266
+ } catch (e) {
267
+ }
268
+ })();
269
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
270
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
271
+ var objectProto$7 = Object.prototype;
272
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
273
+ function arrayLikeKeys(value, inherited) {
274
+ var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
275
+ for (var key in value) {
276
+ if ((inherited || hasOwnProperty$6.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
277
+ (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
278
+ isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
279
+ isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
280
+ isIndex(key, length)))) {
281
+ result.push(key);
282
+ }
283
+ }
284
+ return result;
285
+ }
286
+ function overArg(func, transform) {
287
+ return function(arg) {
288
+ return func(transform(arg));
289
+ };
290
+ }
291
+ var nativeKeys = overArg(Object.keys, Object);
292
+ var objectProto$6 = Object.prototype;
293
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
294
+ function baseKeys(object) {
295
+ if (!isPrototype(object)) {
296
+ return nativeKeys(object);
297
+ }
298
+ var result = [];
299
+ for (var key in Object(object)) {
300
+ if (hasOwnProperty$5.call(object, key) && key != "constructor") {
301
+ result.push(key);
302
+ }
303
+ }
304
+ return result;
305
+ }
306
+ function keys(object) {
307
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
308
+ }
309
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
310
+ function isKey(value, object) {
311
+ if (isArray(value)) {
312
+ return false;
313
+ }
314
+ var type = typeof value;
315
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
316
+ return true;
317
+ }
318
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
319
+ }
320
+ var nativeCreate = getNative(Object, "create");
321
+ function hashClear() {
322
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
323
+ this.size = 0;
324
+ }
325
+ function hashDelete(key) {
326
+ var result = this.has(key) && delete this.__data__[key];
327
+ this.size -= result ? 1 : 0;
328
+ return result;
329
+ }
330
+ var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
331
+ var objectProto$5 = Object.prototype;
332
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
333
+ function hashGet(key) {
334
+ var data = this.__data__;
335
+ if (nativeCreate) {
336
+ var result = data[key];
337
+ return result === HASH_UNDEFINED$2 ? void 0 : result;
338
+ }
339
+ return hasOwnProperty$4.call(data, key) ? data[key] : void 0;
340
+ }
341
+ var objectProto$4 = Object.prototype;
342
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
343
+ function hashHas(key) {
344
+ var data = this.__data__;
345
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty$3.call(data, key);
346
+ }
347
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
348
+ function hashSet(key, value) {
349
+ var data = this.__data__;
350
+ this.size += this.has(key) ? 0 : 1;
351
+ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
352
+ return this;
353
+ }
354
+ function Hash(entries) {
355
+ var index = -1, length = entries == null ? 0 : entries.length;
356
+ this.clear();
357
+ while (++index < length) {
358
+ var entry = entries[index];
359
+ this.set(entry[0], entry[1]);
360
+ }
361
+ }
362
+ Hash.prototype.clear = hashClear;
363
+ Hash.prototype["delete"] = hashDelete;
364
+ Hash.prototype.get = hashGet;
365
+ Hash.prototype.has = hashHas;
366
+ Hash.prototype.set = hashSet;
367
+ function listCacheClear() {
368
+ this.__data__ = [];
369
+ this.size = 0;
370
+ }
371
+ function assocIndexOf(array, key) {
372
+ var length = array.length;
373
+ while (length--) {
374
+ if (eq(array[length][0], key)) {
375
+ return length;
376
+ }
377
+ }
378
+ return -1;
379
+ }
380
+ var arrayProto = Array.prototype;
381
+ var splice = arrayProto.splice;
382
+ function listCacheDelete(key) {
383
+ var data = this.__data__, index = assocIndexOf(data, key);
384
+ if (index < 0) {
385
+ return false;
386
+ }
387
+ var lastIndex = data.length - 1;
388
+ if (index == lastIndex) {
389
+ data.pop();
390
+ } else {
391
+ splice.call(data, index, 1);
392
+ }
393
+ --this.size;
394
+ return true;
395
+ }
396
+ function listCacheGet(key) {
397
+ var data = this.__data__, index = assocIndexOf(data, key);
398
+ return index < 0 ? void 0 : data[index][1];
399
+ }
400
+ function listCacheHas(key) {
401
+ return assocIndexOf(this.__data__, key) > -1;
402
+ }
403
+ function listCacheSet(key, value) {
404
+ var data = this.__data__, index = assocIndexOf(data, key);
405
+ if (index < 0) {
406
+ ++this.size;
407
+ data.push([key, value]);
408
+ } else {
409
+ data[index][1] = value;
410
+ }
411
+ return this;
412
+ }
413
+ function ListCache(entries) {
414
+ var index = -1, length = entries == null ? 0 : entries.length;
415
+ this.clear();
416
+ while (++index < length) {
417
+ var entry = entries[index];
418
+ this.set(entry[0], entry[1]);
419
+ }
420
+ }
421
+ ListCache.prototype.clear = listCacheClear;
422
+ ListCache.prototype["delete"] = listCacheDelete;
423
+ ListCache.prototype.get = listCacheGet;
424
+ ListCache.prototype.has = listCacheHas;
425
+ ListCache.prototype.set = listCacheSet;
426
+ var Map = getNative(root, "Map");
427
+ function mapCacheClear() {
428
+ this.size = 0;
429
+ this.__data__ = {
430
+ "hash": new Hash(),
431
+ "map": new (Map || ListCache)(),
432
+ "string": new Hash()
433
+ };
434
+ }
435
+ function isKeyable(value) {
436
+ var type = typeof value;
437
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
438
+ }
439
+ function getMapData(map, key) {
440
+ var data = map.__data__;
441
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
442
+ }
443
+ function mapCacheDelete(key) {
444
+ var result = getMapData(this, key)["delete"](key);
445
+ this.size -= result ? 1 : 0;
446
+ return result;
447
+ }
448
+ function mapCacheGet(key) {
449
+ return getMapData(this, key).get(key);
450
+ }
451
+ function mapCacheHas(key) {
452
+ return getMapData(this, key).has(key);
453
+ }
454
+ function mapCacheSet(key, value) {
455
+ var data = getMapData(this, key), size = data.size;
456
+ data.set(key, value);
457
+ this.size += data.size == size ? 0 : 1;
458
+ return this;
459
+ }
460
+ function MapCache(entries) {
461
+ var index = -1, length = entries == null ? 0 : entries.length;
462
+ this.clear();
463
+ while (++index < length) {
464
+ var entry = entries[index];
465
+ this.set(entry[0], entry[1]);
466
+ }
467
+ }
468
+ MapCache.prototype.clear = mapCacheClear;
469
+ MapCache.prototype["delete"] = mapCacheDelete;
470
+ MapCache.prototype.get = mapCacheGet;
471
+ MapCache.prototype.has = mapCacheHas;
472
+ MapCache.prototype.set = mapCacheSet;
473
+ var FUNC_ERROR_TEXT = "Expected a function";
474
+ function memoize(func, resolver) {
475
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") {
476
+ throw new TypeError(FUNC_ERROR_TEXT);
477
+ }
478
+ var memoized = function() {
479
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
480
+ if (cache.has(key)) {
481
+ return cache.get(key);
482
+ }
483
+ var result = func.apply(this, args);
484
+ memoized.cache = cache.set(key, result) || cache;
485
+ return result;
486
+ };
487
+ memoized.cache = new (memoize.Cache || MapCache)();
488
+ return memoized;
489
+ }
490
+ memoize.Cache = MapCache;
491
+ var MAX_MEMOIZE_SIZE = 500;
492
+ function memoizeCapped(func) {
493
+ var result = memoize(func, function(key) {
494
+ if (cache.size === MAX_MEMOIZE_SIZE) {
495
+ cache.clear();
496
+ }
497
+ return key;
498
+ });
499
+ var cache = result.cache;
500
+ return result;
501
+ }
502
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
503
+ var reEscapeChar = /\\(\\)?/g;
504
+ var stringToPath = memoizeCapped(function(string) {
505
+ var result = [];
506
+ if (string.charCodeAt(0) === 46) {
507
+ result.push("");
508
+ }
509
+ string.replace(rePropName, function(match, number, quote, subString) {
510
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
511
+ });
512
+ return result;
513
+ });
514
+ function toString(value) {
515
+ return value == null ? "" : baseToString(value);
516
+ }
517
+ function castPath(value, object) {
518
+ if (isArray(value)) {
519
+ return value;
520
+ }
521
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
522
+ }
523
+ function toKey(value) {
524
+ if (typeof value == "string" || isSymbol(value)) {
525
+ return value;
526
+ }
527
+ var result = value + "";
528
+ return result == "0" && 1 / value == -Infinity ? "-0" : result;
529
+ }
530
+ function baseGet(object, path) {
531
+ path = castPath(path, object);
532
+ var index = 0, length = path.length;
533
+ while (object != null && index < length) {
534
+ object = object[toKey(path[index++])];
535
+ }
536
+ return index && index == length ? object : void 0;
537
+ }
538
+ function get(object, path, defaultValue) {
539
+ var result = object == null ? void 0 : baseGet(object, path);
540
+ return result === void 0 ? defaultValue : result;
541
+ }
542
+ function arrayPush(array, values2) {
543
+ var index = -1, length = values2.length, offset = array.length;
544
+ while (++index < length) {
545
+ array[offset + index] = values2[index];
546
+ }
547
+ return array;
548
+ }
549
+ var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
550
+ function isFlattenable(value) {
551
+ return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
552
+ }
553
+ function baseFlatten(array, depth, predicate, isStrict, result) {
554
+ var index = -1, length = array.length;
555
+ predicate || (predicate = isFlattenable);
556
+ result || (result = []);
557
+ while (++index < length) {
558
+ var value = array[index];
559
+ if (predicate(value)) {
560
+ {
561
+ arrayPush(result, value);
562
+ }
563
+ } else if (!isStrict) {
564
+ result[result.length] = value;
565
+ }
566
+ }
567
+ return result;
568
+ }
569
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
570
+ var index = -1, length = array == null ? 0 : array.length;
571
+ if (initAccum && length) {
572
+ accumulator = array[++index];
573
+ }
574
+ while (++index < length) {
575
+ accumulator = iteratee(accumulator, array[index], index, array);
576
+ }
577
+ return accumulator;
578
+ }
579
+ function stackClear() {
580
+ this.__data__ = new ListCache();
581
+ this.size = 0;
582
+ }
583
+ function stackDelete(key) {
584
+ var data = this.__data__, result = data["delete"](key);
585
+ this.size = data.size;
586
+ return result;
587
+ }
588
+ function stackGet(key) {
589
+ return this.__data__.get(key);
590
+ }
591
+ function stackHas(key) {
592
+ return this.__data__.has(key);
593
+ }
594
+ var LARGE_ARRAY_SIZE$1 = 200;
595
+ function stackSet(key, value) {
596
+ var data = this.__data__;
597
+ if (data instanceof ListCache) {
598
+ var pairs = data.__data__;
599
+ if (!Map || pairs.length < LARGE_ARRAY_SIZE$1 - 1) {
600
+ pairs.push([key, value]);
601
+ this.size = ++data.size;
602
+ return this;
603
+ }
604
+ data = this.__data__ = new MapCache(pairs);
605
+ }
606
+ data.set(key, value);
607
+ this.size = data.size;
608
+ return this;
609
+ }
610
+ function Stack(entries) {
611
+ var data = this.__data__ = new ListCache(entries);
612
+ this.size = data.size;
613
+ }
614
+ Stack.prototype.clear = stackClear;
615
+ Stack.prototype["delete"] = stackDelete;
616
+ Stack.prototype.get = stackGet;
617
+ Stack.prototype.has = stackHas;
618
+ Stack.prototype.set = stackSet;
619
+ function arrayFilter(array, predicate) {
620
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
621
+ while (++index < length) {
622
+ var value = array[index];
623
+ if (predicate(value, index, array)) {
624
+ result[resIndex++] = value;
625
+ }
626
+ }
627
+ return result;
628
+ }
629
+ function stubArray() {
630
+ return [];
631
+ }
632
+ var objectProto$3 = Object.prototype;
633
+ var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
634
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
635
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
636
+ if (object == null) {
637
+ return [];
638
+ }
639
+ object = Object(object);
640
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
641
+ return propertyIsEnumerable.call(object, symbol);
642
+ });
643
+ };
644
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
645
+ var result = keysFunc(object);
646
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
647
+ }
648
+ function getAllKeys(object) {
649
+ return baseGetAllKeys(object, keys, getSymbols);
650
+ }
651
+ var DataView = getNative(root, "DataView");
652
+ var Promise$1 = getNative(root, "Promise");
653
+ var Set = getNative(root, "Set");
654
+ var mapTag$2 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$2 = "[object Set]", weakMapTag = "[object WeakMap]";
655
+ var dataViewTag$1 = "[object DataView]";
656
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
657
+ var getTag = baseGetTag;
658
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$1 || Map && getTag(new Map()) != mapTag$2 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag$2 || WeakMap && getTag(new WeakMap()) != weakMapTag) {
659
+ getTag = function(value) {
660
+ var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
661
+ if (ctorString) {
662
+ switch (ctorString) {
663
+ case dataViewCtorString:
664
+ return dataViewTag$1;
665
+ case mapCtorString:
666
+ return mapTag$2;
667
+ case promiseCtorString:
668
+ return promiseTag;
669
+ case setCtorString:
670
+ return setTag$2;
671
+ case weakMapCtorString:
672
+ return weakMapTag;
673
+ }
674
+ }
675
+ return result;
676
+ };
677
+ }
678
+ var Uint8Array = root.Uint8Array;
679
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
680
+ function setCacheAdd(value) {
681
+ this.__data__.set(value, HASH_UNDEFINED);
682
+ return this;
683
+ }
684
+ function setCacheHas(value) {
685
+ return this.__data__.has(value);
686
+ }
687
+ function SetCache(values2) {
688
+ var index = -1, length = values2 == null ? 0 : values2.length;
689
+ this.__data__ = new MapCache();
690
+ while (++index < length) {
691
+ this.add(values2[index]);
692
+ }
693
+ }
694
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
695
+ SetCache.prototype.has = setCacheHas;
696
+ function arraySome(array, predicate) {
697
+ var index = -1, length = array == null ? 0 : array.length;
698
+ while (++index < length) {
699
+ if (predicate(array[index], index, array)) {
700
+ return true;
701
+ }
702
+ }
703
+ return false;
704
+ }
705
+ function cacheHas(cache, key) {
706
+ return cache.has(key);
707
+ }
708
+ var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
709
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
710
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
711
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
712
+ return false;
713
+ }
714
+ var arrStacked = stack.get(array);
715
+ var othStacked = stack.get(other);
716
+ if (arrStacked && othStacked) {
717
+ return arrStacked == other && othStacked == array;
718
+ }
719
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
720
+ stack.set(array, other);
721
+ stack.set(other, array);
722
+ while (++index < arrLength) {
723
+ var arrValue = array[index], othValue = other[index];
724
+ if (customizer) {
725
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
726
+ }
727
+ if (compared !== void 0) {
728
+ if (compared) {
729
+ continue;
730
+ }
731
+ result = false;
732
+ break;
733
+ }
734
+ if (seen) {
735
+ if (!arraySome(other, function(othValue2, othIndex) {
736
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
737
+ return seen.push(othIndex);
738
+ }
739
+ })) {
740
+ result = false;
741
+ break;
742
+ }
743
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
744
+ result = false;
745
+ break;
746
+ }
747
+ }
748
+ stack["delete"](array);
749
+ stack["delete"](other);
750
+ return result;
751
+ }
752
+ function mapToArray(map) {
753
+ var index = -1, result = Array(map.size);
754
+ map.forEach(function(value, key) {
755
+ result[++index] = [key, value];
756
+ });
757
+ return result;
758
+ }
759
+ function setToArray(set) {
760
+ var index = -1, result = Array(set.size);
761
+ set.forEach(function(value) {
762
+ result[++index] = value;
763
+ });
764
+ return result;
765
+ }
766
+ var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
767
+ var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag$1 = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
768
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
769
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
770
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
771
+ switch (tag) {
772
+ case dataViewTag:
773
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
774
+ return false;
775
+ }
776
+ object = object.buffer;
777
+ other = other.buffer;
778
+ case arrayBufferTag:
779
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
780
+ return false;
781
+ }
782
+ return true;
783
+ case boolTag:
784
+ case dateTag:
785
+ case numberTag:
786
+ return eq(+object, +other);
787
+ case errorTag:
788
+ return object.name == other.name && object.message == other.message;
789
+ case regexpTag:
790
+ case stringTag:
791
+ return object == other + "";
792
+ case mapTag$1:
793
+ var convert = mapToArray;
794
+ case setTag$1:
795
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
796
+ convert || (convert = setToArray);
797
+ if (object.size != other.size && !isPartial) {
798
+ return false;
799
+ }
800
+ var stacked = stack.get(object);
801
+ if (stacked) {
802
+ return stacked == other;
803
+ }
804
+ bitmask |= COMPARE_UNORDERED_FLAG$2;
805
+ stack.set(object, other);
806
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
807
+ stack["delete"](object);
808
+ return result;
809
+ case symbolTag:
810
+ if (symbolValueOf) {
811
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
812
+ }
813
+ }
814
+ return false;
815
+ }
816
+ var COMPARE_PARTIAL_FLAG$3 = 1;
817
+ var objectProto$2 = Object.prototype;
818
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
819
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
820
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
821
+ if (objLength != othLength && !isPartial) {
822
+ return false;
823
+ }
824
+ var index = objLength;
825
+ while (index--) {
826
+ var key = objProps[index];
827
+ if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
828
+ return false;
829
+ }
830
+ }
831
+ var objStacked = stack.get(object);
832
+ var othStacked = stack.get(other);
833
+ if (objStacked && othStacked) {
834
+ return objStacked == other && othStacked == object;
835
+ }
836
+ var result = true;
837
+ stack.set(object, other);
838
+ stack.set(other, object);
839
+ var skipCtor = isPartial;
840
+ while (++index < objLength) {
841
+ key = objProps[index];
842
+ var objValue = object[key], othValue = other[key];
843
+ if (customizer) {
844
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
845
+ }
846
+ if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
847
+ result = false;
848
+ break;
849
+ }
850
+ skipCtor || (skipCtor = key == "constructor");
851
+ }
852
+ if (result && !skipCtor) {
853
+ var objCtor = object.constructor, othCtor = other.constructor;
854
+ if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
855
+ result = false;
856
+ }
857
+ }
858
+ stack["delete"](object);
859
+ stack["delete"](other);
860
+ return result;
861
+ }
862
+ var COMPARE_PARTIAL_FLAG$2 = 1;
863
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
864
+ var objectProto$1 = Object.prototype;
865
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
866
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
867
+ var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
868
+ objTag = objTag == argsTag ? objectTag : objTag;
869
+ othTag = othTag == argsTag ? objectTag : othTag;
870
+ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
871
+ if (isSameTag && isBuffer(object)) {
872
+ if (!isBuffer(other)) {
873
+ return false;
874
+ }
875
+ objIsArr = true;
876
+ objIsObj = false;
877
+ }
878
+ if (isSameTag && !objIsObj) {
879
+ stack || (stack = new Stack());
880
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
881
+ }
882
+ if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
883
+ var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
884
+ if (objIsWrapped || othIsWrapped) {
885
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
886
+ stack || (stack = new Stack());
887
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
888
+ }
889
+ }
890
+ if (!isSameTag) {
891
+ return false;
892
+ }
893
+ stack || (stack = new Stack());
894
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
895
+ }
896
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
897
+ if (value === other) {
898
+ return true;
899
+ }
900
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
901
+ return value !== value && other !== other;
902
+ }
903
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
904
+ }
905
+ var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
906
+ function baseIsMatch(object, source, matchData, customizer) {
907
+ var index = matchData.length, length = index;
908
+ if (object == null) {
909
+ return !length;
910
+ }
911
+ object = Object(object);
912
+ while (index--) {
913
+ var data = matchData[index];
914
+ if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
915
+ return false;
916
+ }
917
+ }
918
+ while (++index < length) {
919
+ data = matchData[index];
920
+ var key = data[0], objValue = object[key], srcValue = data[1];
921
+ if (data[2]) {
922
+ if (objValue === void 0 && !(key in object)) {
923
+ return false;
924
+ }
925
+ } else {
926
+ var stack = new Stack();
927
+ var result;
928
+ if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
929
+ return false;
930
+ }
931
+ }
932
+ }
933
+ return true;
934
+ }
935
+ function isStrictComparable(value) {
936
+ return value === value && !isObject(value);
937
+ }
938
+ function getMatchData(object) {
939
+ var result = keys(object), length = result.length;
940
+ while (length--) {
941
+ var key = result[length], value = object[key];
942
+ result[length] = [key, value, isStrictComparable(value)];
943
+ }
944
+ return result;
945
+ }
946
+ function matchesStrictComparable(key, srcValue) {
947
+ return function(object) {
948
+ if (object == null) {
949
+ return false;
950
+ }
951
+ return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
952
+ };
953
+ }
954
+ function baseMatches(source) {
955
+ var matchData = getMatchData(source);
956
+ if (matchData.length == 1 && matchData[0][2]) {
957
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
958
+ }
959
+ return function(object) {
960
+ return object === source || baseIsMatch(object, source, matchData);
961
+ };
962
+ }
963
+ function baseHasIn(object, key) {
964
+ return object != null && key in Object(object);
965
+ }
966
+ function hasPath(object, path, hasFunc) {
967
+ path = castPath(path, object);
968
+ var index = -1, length = path.length, result = false;
969
+ while (++index < length) {
970
+ var key = toKey(path[index]);
971
+ if (!(result = object != null && hasFunc(object, key))) {
972
+ break;
973
+ }
974
+ object = object[key];
975
+ }
976
+ if (result || ++index != length) {
977
+ return result;
978
+ }
979
+ length = object == null ? 0 : object.length;
980
+ return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
981
+ }
982
+ function hasIn(object, path) {
983
+ return object != null && hasPath(object, path, baseHasIn);
984
+ }
985
+ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
986
+ function baseMatchesProperty(path, srcValue) {
987
+ if (isKey(path) && isStrictComparable(srcValue)) {
988
+ return matchesStrictComparable(toKey(path), srcValue);
989
+ }
990
+ return function(object) {
991
+ var objValue = get(object, path);
992
+ return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
993
+ };
994
+ }
995
+ function baseProperty(key) {
996
+ return function(object) {
997
+ return object == null ? void 0 : object[key];
998
+ };
999
+ }
1000
+ function basePropertyDeep(path) {
1001
+ return function(object) {
1002
+ return baseGet(object, path);
1003
+ };
1004
+ }
1005
+ function property(path) {
1006
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
1007
+ }
1008
+ function baseIteratee(value) {
1009
+ if (typeof value == "function") {
1010
+ return value;
1011
+ }
1012
+ if (value == null) {
1013
+ return identity;
1014
+ }
1015
+ if (typeof value == "object") {
1016
+ return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
1017
+ }
1018
+ return property(value);
1019
+ }
1020
+ function createBaseFor(fromRight) {
1021
+ return function(object, iteratee, keysFunc) {
1022
+ var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1023
+ while (length--) {
1024
+ var key = props[++index];
1025
+ if (iteratee(iterable[key], key, iterable) === false) {
1026
+ break;
1027
+ }
1028
+ }
1029
+ return object;
1030
+ };
1031
+ }
1032
+ var baseFor = createBaseFor();
1033
+ function baseForOwn(object, iteratee) {
1034
+ return object && baseFor(object, iteratee, keys);
1035
+ }
1036
+ function createBaseEach(eachFunc, fromRight) {
1037
+ return function(collection, iteratee) {
1038
+ if (collection == null) {
1039
+ return collection;
1040
+ }
1041
+ if (!isArrayLike(collection)) {
1042
+ return eachFunc(collection, iteratee);
1043
+ }
1044
+ var length = collection.length, index = -1, iterable = Object(collection);
1045
+ while (++index < length) {
1046
+ if (iteratee(iterable[index], index, iterable) === false) {
1047
+ break;
1048
+ }
1049
+ }
1050
+ return collection;
1051
+ };
1052
+ }
1053
+ var baseEach = createBaseEach(baseForOwn);
1054
+ function isArrayLikeObject(value) {
1055
+ return isObjectLike(value) && isArrayLike(value);
1056
+ }
1057
+ function castFunction(value) {
1058
+ return typeof value == "function" ? value : identity;
1059
+ }
1060
+ function forEach(collection, iteratee) {
1061
+ var func = isArray(collection) ? arrayEach : baseEach;
1062
+ return func(collection, castFunction(iteratee));
1063
+ }
1064
+ function baseFilter(collection, predicate) {
1065
+ var result = [];
1066
+ baseEach(collection, function(value, index, collection2) {
1067
+ if (predicate(value, index, collection2)) {
1068
+ result.push(value);
1069
+ }
1070
+ });
1071
+ return result;
1072
+ }
1073
+ function filter(collection, predicate) {
1074
+ var func = isArray(collection) ? arrayFilter : baseFilter;
1075
+ return func(collection, baseIteratee(predicate));
1076
+ }
1077
+ function baseValues(object, props) {
1078
+ return arrayMap(props, function(key) {
1079
+ return object[key];
1080
+ });
1081
+ }
1082
+ function values(object) {
1083
+ return object == null ? [] : baseValues(object, keys(object));
1084
+ }
1085
+ var mapTag = "[object Map]", setTag = "[object Set]";
1086
+ var objectProto = Object.prototype;
1087
+ var hasOwnProperty = objectProto.hasOwnProperty;
1088
+ function isEmpty(value) {
1089
+ if (value == null) {
1090
+ return true;
1091
+ }
1092
+ if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
1093
+ return !value.length;
1094
+ }
1095
+ var tag = getTag(value);
1096
+ if (tag == mapTag || tag == setTag) {
1097
+ return !value.size;
1098
+ }
1099
+ if (isPrototype(value)) {
1100
+ return !baseKeys(value).length;
1101
+ }
1102
+ for (var key in value) {
1103
+ if (hasOwnProperty.call(value, key)) {
1104
+ return false;
1105
+ }
1106
+ }
1107
+ return true;
1108
+ }
1109
+ function isUndefined(value) {
1110
+ return value === void 0;
1111
+ }
1112
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
1113
+ eachFunc(collection, function(value, index, collection2) {
1114
+ accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2);
1115
+ });
1116
+ return accumulator;
1117
+ }
1118
+ function reduce(collection, iteratee, accumulator) {
1119
+ var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
1120
+ return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach);
1121
+ }
1122
+ var INFINITY = 1 / 0;
1123
+ var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
1124
+ return new Set(values2);
1125
+ };
1126
+ var LARGE_ARRAY_SIZE = 200;
1127
+ function baseUniq(array, iteratee, comparator) {
1128
+ var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
1129
+ if (length >= LARGE_ARRAY_SIZE) {
1130
+ var set = createSet(array);
1131
+ if (set) {
1132
+ return setToArray(set);
1133
+ }
1134
+ isCommon = false;
1135
+ includes = cacheHas;
1136
+ seen = new SetCache();
1137
+ } else {
1138
+ seen = result;
1139
+ }
1140
+ outer:
1141
+ while (++index < length) {
1142
+ var value = array[index], computed = value;
1143
+ value = value !== 0 ? value : 0;
1144
+ if (isCommon && computed === computed) {
1145
+ var seenIndex = seen.length;
1146
+ while (seenIndex--) {
1147
+ if (seen[seenIndex] === computed) {
1148
+ continue outer;
1149
+ }
1150
+ }
1151
+ result.push(value);
1152
+ } else if (!includes(seen, computed, comparator)) {
1153
+ if (seen !== result) {
1154
+ seen.push(computed);
1155
+ }
1156
+ result.push(value);
1157
+ }
1158
+ }
1159
+ return result;
1160
+ }
1161
+ var union = baseRest(function(arrays) {
1162
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
1163
+ });
1164
+ var DEFAULT_EDGE_NAME = "\0";
1165
+ var GRAPH_NODE = "\0";
1166
+ var EDGE_KEY_DELIM = "";
1167
+ class Graph {
1168
+ /**
1169
+ * @param {GraphOptions} [opts] - Graph options.
1170
+ */
1171
+ constructor(opts = {}) {
1172
+ this._isDirected = Object.prototype.hasOwnProperty.call(opts, "directed") ? opts.directed : true;
1173
+ this._isMultigraph = Object.prototype.hasOwnProperty.call(opts, "multigraph") ? opts.multigraph : false;
1174
+ this._isCompound = Object.prototype.hasOwnProperty.call(opts, "compound") ? opts.compound : false;
1175
+ this._label = void 0;
1176
+ this._defaultNodeLabelFn = constant(void 0);
1177
+ this._defaultEdgeLabelFn = constant(void 0);
1178
+ this._nodes = {};
1179
+ if (this._isCompound) {
1180
+ this._parent = {};
1181
+ this._children = {};
1182
+ this._children[GRAPH_NODE] = {};
1183
+ }
1184
+ this._in = {};
1185
+ this._preds = {};
1186
+ this._out = {};
1187
+ this._sucs = {};
1188
+ this._edgeObjs = {};
1189
+ this._edgeLabels = {};
1190
+ }
1191
+ /* === Graph functions ========= */
1192
+ /**
1193
+ *
1194
+ * @returns {boolean} `true` if the graph is [directed](https://en.wikipedia.org/wiki/Directed_graph).
1195
+ * A directed graph treats the order of nodes in an edge as significant whereas an
1196
+ * [undirected](https://en.wikipedia.org/wiki/Graph_(mathematics)#Undirected_graph)
1197
+ * graph does not.
1198
+ * This example demonstrates the difference:
1199
+ *
1200
+ * @example
1201
+ *
1202
+ * ```js
1203
+ * var directed = new Graph({ directed: true });
1204
+ * directed.setEdge("a", "b", "my-label");
1205
+ * directed.edge("a", "b"); // returns "my-label"
1206
+ * directed.edge("b", "a"); // returns undefined
1207
+ *
1208
+ * var undirected = new Graph({ directed: false });
1209
+ * undirected.setEdge("a", "b", "my-label");
1210
+ * undirected.edge("a", "b"); // returns "my-label"
1211
+ * undirected.edge("b", "a"); // returns "my-label"
1212
+ * ```
1213
+ */
1214
+ isDirected() {
1215
+ return this._isDirected;
1216
+ }
1217
+ /**
1218
+ * @returns {boolean} `true` if the graph is a multigraph.
1219
+ */
1220
+ isMultigraph() {
1221
+ return this._isMultigraph;
1222
+ }
1223
+ /**
1224
+ * @returns {boolean} `true` if the graph is compound.
1225
+ */
1226
+ isCompound() {
1227
+ return this._isCompound;
1228
+ }
1229
+ /**
1230
+ * Sets the label for the graph to `label`.
1231
+ *
1232
+ * @param {GraphLabel} label - Label for the graph.
1233
+ * @returns {this}
1234
+ */
1235
+ setGraph(label) {
1236
+ this._label = label;
1237
+ return this;
1238
+ }
1239
+ /**
1240
+ * @returns {GraphLabel | undefined} the currently assigned label for the graph.
1241
+ * If no label has been assigned, returns `undefined`.
1242
+ *
1243
+ * @example
1244
+ *
1245
+ * ```js
1246
+ * var g = new Graph();
1247
+ * g.graph(); // returns undefined
1248
+ * g.setGraph("graph-label");
1249
+ * g.graph(); // returns "graph-label"
1250
+ * ```
1251
+ */
1252
+ graph() {
1253
+ return this._label;
1254
+ }
1255
+ /* === Node functions ========== */
1256
+ /**
1257
+ * Sets a new default value that is assigned to nodes that are created without
1258
+ * a label.
1259
+ *
1260
+ * @param {typeof this._defaultNodeLabelFn | NodeLabel} newDefault - If a function,
1261
+ * it is called with the id of the node being created.
1262
+ * Otherwise, it is assigned as the label directly.
1263
+ * @returns {this}
1264
+ */
1265
+ setDefaultNodeLabel(newDefault) {
1266
+ if (!isFunction(newDefault)) {
1267
+ newDefault = constant(newDefault);
1268
+ }
1269
+ this._defaultNodeLabelFn = newDefault;
1270
+ return this;
1271
+ }
1272
+ /**
1273
+ * @returns {number} the number of nodes in the graph.
1274
+ */
1275
+ nodeCount() {
1276
+ return this._nodeCount;
1277
+ }
1278
+ /**
1279
+ * @returns {NodeID[]} the ids of the nodes in the graph.
1280
+ *
1281
+ * @remarks
1282
+ * Use {@link node()} to get the label for each node.
1283
+ * Takes `O(|V|)` time.
1284
+ */
1285
+ nodes() {
1286
+ return keys(this._nodes);
1287
+ }
1288
+ /**
1289
+ * @returns {NodeID[]} those nodes in the graph that have no in-edges.
1290
+ * @remarks Takes `O(|V|)` time.
1291
+ */
1292
+ sources() {
1293
+ var self = this;
1294
+ return filter(this.nodes(), function(v) {
1295
+ return isEmpty(self._in[v]);
1296
+ });
1297
+ }
1298
+ /**
1299
+ * @returns {NodeID[]} those nodes in the graph that have no out-edges.
1300
+ * @remarks Takes `O(|V|)` time.
1301
+ */
1302
+ sinks() {
1303
+ var self = this;
1304
+ return filter(this.nodes(), function(v) {
1305
+ return isEmpty(self._out[v]);
1306
+ });
1307
+ }
1308
+ /**
1309
+ * Invokes setNode method for each node in `vs` list.
1310
+ *
1311
+ * @param {Collection<NodeID | number>} vs - List of node IDs to create/set.
1312
+ * @param {NodeLabel} [value] - If set, update all nodes with this value.
1313
+ * @returns {this}
1314
+ * @remarks Complexity: O(|names|).
1315
+ */
1316
+ setNodes(vs, value) {
1317
+ var args = arguments;
1318
+ var self = this;
1319
+ forEach(vs, function(v) {
1320
+ if (args.length > 1) {
1321
+ self.setNode(v, value);
1322
+ } else {
1323
+ self.setNode(v);
1324
+ }
1325
+ });
1326
+ return this;
1327
+ }
1328
+ /**
1329
+ * Creates or updates the value for the node `v` in the graph.
1330
+ *
1331
+ * @param {NodeID | number} v - ID of the node to create/set.
1332
+ * @param {NodeLabel} [value] - If supplied, it is set as the value for the node.
1333
+ * If not supplied and the node was created by this call then
1334
+ * {@link setDefaultNodeLabel} will be used to set the node's value.
1335
+ * @returns {this} the graph, allowing this to be chained with other functions.
1336
+ * @remarks Takes `O(1)` time.
1337
+ */
1338
+ setNode(v, value) {
1339
+ if (Object.prototype.hasOwnProperty.call(this._nodes, v)) {
1340
+ if (arguments.length > 1) {
1341
+ this._nodes[v] = value;
1342
+ }
1343
+ return this;
1344
+ }
1345
+ this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);
1346
+ if (this._isCompound) {
1347
+ this._parent[v] = GRAPH_NODE;
1348
+ this._children[v] = {};
1349
+ this._children[GRAPH_NODE][v] = true;
1350
+ }
1351
+ this._in[v] = {};
1352
+ this._preds[v] = {};
1353
+ this._out[v] = {};
1354
+ this._sucs[v] = {};
1355
+ ++this._nodeCount;
1356
+ return this;
1357
+ }
1358
+ /**
1359
+ * Gets the label of node with specified name.
1360
+ *
1361
+ * @param {NodeID | number} v - Node ID.
1362
+ * @returns {NodeLabel | undefined} the label assigned to the node with the id `v`
1363
+ * if it is in the graph.
1364
+ * Otherwise returns `undefined`.
1365
+ * @remarks Takes `O(1)` time.
1366
+ */
1367
+ node(v) {
1368
+ return this._nodes[v];
1369
+ }
1370
+ /**
1371
+ * Detects whether graph has a node with specified name or not.
1372
+ *
1373
+ * @param {NodeID | number} v - Node ID.
1374
+ * @returns {boolean} Returns `true` the graph has a node with the id.
1375
+ * @remarks Takes `O(1)` time.
1376
+ */
1377
+ hasNode(v) {
1378
+ return Object.prototype.hasOwnProperty.call(this._nodes, v);
1379
+ }
1380
+ /**
1381
+ * Remove the node with the id `v` in the graph or do nothing if the node is
1382
+ * not in the graph.
1383
+ *
1384
+ * If the node was removed this function also removes any incident edges.
1385
+ *
1386
+ * @param {NodeID | number} v - Node ID to remove.
1387
+ * @returns {this} the graph, allowing this to be chained with other functions.
1388
+ * @remarks Takes `O(|E|)` time.
1389
+ */
1390
+ removeNode(v) {
1391
+ if (Object.prototype.hasOwnProperty.call(this._nodes, v)) {
1392
+ var removeEdge = (e) => this.removeEdge(this._edgeObjs[e]);
1393
+ delete this._nodes[v];
1394
+ if (this._isCompound) {
1395
+ this._removeFromParentsChildList(v);
1396
+ delete this._parent[v];
1397
+ forEach(this.children(v), (child) => {
1398
+ this.setParent(child);
1399
+ });
1400
+ delete this._children[v];
1401
+ }
1402
+ forEach(keys(this._in[v]), removeEdge);
1403
+ delete this._in[v];
1404
+ delete this._preds[v];
1405
+ forEach(keys(this._out[v]), removeEdge);
1406
+ delete this._out[v];
1407
+ delete this._sucs[v];
1408
+ --this._nodeCount;
1409
+ }
1410
+ return this;
1411
+ }
1412
+ /**
1413
+ * Sets the parent for `v` to `parent` if it is defined or removes the parent
1414
+ * for `v` if `parent` is undefined.
1415
+ *
1416
+ * @param {NodeID | number} v - Node ID to set the parent for.
1417
+ * @param {NodeID | number} [parent] - Parent node ID. If not defined, removes the parent.
1418
+ * @returns {this} the graph, allowing this to be chained with other functions.
1419
+ * @throws if the graph is not compound.
1420
+ * @throws if setting the parent would create a cycle.
1421
+ * @remarks Takes `O(1)` time.
1422
+ */
1423
+ setParent(v, parent) {
1424
+ if (!this._isCompound) {
1425
+ throw new Error("Cannot set parent in a non-compound graph");
1426
+ }
1427
+ if (isUndefined(parent)) {
1428
+ parent = GRAPH_NODE;
1429
+ } else {
1430
+ parent += "";
1431
+ for (var ancestor = parent; !isUndefined(ancestor); ancestor = this.parent(ancestor)) {
1432
+ if (ancestor === v) {
1433
+ throw new Error("Setting " + parent + " as parent of " + v + " would create a cycle");
1434
+ }
1435
+ }
1436
+ this.setNode(parent);
1437
+ }
1438
+ this.setNode(v);
1439
+ this._removeFromParentsChildList(v);
1440
+ this._parent[v] = parent;
1441
+ this._children[parent][v] = true;
1442
+ return this;
1443
+ }
1444
+ /**
1445
+ * @private
1446
+ * @param {NodeID | number} v - Node ID.
1447
+ */
1448
+ _removeFromParentsChildList(v) {
1449
+ delete this._children[this._parent[v]][v];
1450
+ }
1451
+ /**
1452
+ * Get parent node for node `v`.
1453
+ *
1454
+ * @param {NodeID | number} v - Node ID.
1455
+ * @returns {NodeID | undefined} the node that is a parent of node `v`
1456
+ * or `undefined` if node `v` does not have a parent or is not a member of
1457
+ * the graph.
1458
+ * Always returns `undefined` for graphs that are not compound.
1459
+ * @remarks Takes `O(1)` time.
1460
+ */
1461
+ parent(v) {
1462
+ if (this._isCompound) {
1463
+ var parent = this._parent[v];
1464
+ if (parent !== GRAPH_NODE) {
1465
+ return parent;
1466
+ }
1467
+ }
1468
+ }
1469
+ /**
1470
+ * Gets list of direct children of node v.
1471
+ *
1472
+ * @param {NodeID | number} [v] - Node ID. If not specified, gets nodes
1473
+ * with no parent (top-level nodes).
1474
+ * @returns {NodeID[] | undefined} all nodes that are children of node `v` or
1475
+ * `undefined` if node `v` is not in the graph.
1476
+ * Always returns `[]` for graphs that are not compound.
1477
+ * @remarks Takes `O(|V|)` time.
1478
+ */
1479
+ children(v) {
1480
+ if (isUndefined(v)) {
1481
+ v = GRAPH_NODE;
1482
+ }
1483
+ if (this._isCompound) {
1484
+ var children = this._children[v];
1485
+ if (children) {
1486
+ return keys(children);
1487
+ }
1488
+ } else if (v === GRAPH_NODE) {
1489
+ return this.nodes();
1490
+ } else if (this.hasNode(v)) {
1491
+ return [];
1492
+ }
1493
+ }
1494
+ /**
1495
+ * @param {NodeID | number} v - Node ID.
1496
+ * @returns {NodeID[] | undefined} all nodes that are predecessors of the
1497
+ * specified node or `undefined` if node `v` is not in the graph.
1498
+ * @remarks
1499
+ * Behavior is undefined for undirected graphs - use {@link neighbors} instead.
1500
+ * Takes `O(|V|)` time.
1501
+ */
1502
+ predecessors(v) {
1503
+ var predsV = this._preds[v];
1504
+ if (predsV) {
1505
+ return keys(predsV);
1506
+ }
1507
+ }
1508
+ /**
1509
+ * @param {NodeID | number} v - Node ID.
1510
+ * @returns {NodeID[] | undefined} all nodes that are successors of the
1511
+ * specified node or `undefined` if node `v` is not in the graph.
1512
+ * @remarks
1513
+ * Behavior is undefined for undirected graphs - use {@link neighbors} instead.
1514
+ * Takes `O(|V|)` time.
1515
+ */
1516
+ successors(v) {
1517
+ var sucsV = this._sucs[v];
1518
+ if (sucsV) {
1519
+ return keys(sucsV);
1520
+ }
1521
+ }
1522
+ /**
1523
+ * @param {NodeID | number} v - Node ID.
1524
+ * @returns {NodeID[] | undefined} all nodes that are predecessors or
1525
+ * successors of the specified node
1526
+ * or `undefined` if node `v` is not in the graph.
1527
+ * @remarks Takes `O(|V|)` time.
1528
+ */
1529
+ neighbors(v) {
1530
+ var preds = this.predecessors(v);
1531
+ if (preds) {
1532
+ return union(preds, this.successors(v));
1533
+ }
1534
+ }
1535
+ /**
1536
+ * @param {NodeID | number} v - Node ID.
1537
+ * @returns {boolean} True if the node is a leaf (has no successors), false otherwise.
1538
+ */
1539
+ isLeaf(v) {
1540
+ var neighbors;
1541
+ if (this.isDirected()) {
1542
+ neighbors = this.successors(v);
1543
+ } else {
1544
+ neighbors = this.neighbors(v);
1545
+ }
1546
+ return neighbors.length === 0;
1547
+ }
1548
+ /**
1549
+ * Creates new graph with nodes filtered via `filter`.
1550
+ * Edges incident to rejected node
1551
+ * are also removed.
1552
+ *
1553
+ * In case of compound graph, if parent is rejected by `filter`,
1554
+ * than all its children are rejected too.
1555
+
1556
+ * @param {(v: NodeID) => boolean} filter - Function that returns `true` for nodes to keep.
1557
+ * @returns {Graph<GraphLabel, NodeLabel, EdgeLabel>} A new graph containing only the nodes for which `filter` returns `true`.
1558
+ * @remarks Average-case complexity: O(|E|+|V|).
1559
+ */
1560
+ filterNodes(filter2) {
1561
+ var copy = new this.constructor({
1562
+ directed: this._isDirected,
1563
+ multigraph: this._isMultigraph,
1564
+ compound: this._isCompound
1565
+ });
1566
+ copy.setGraph(this.graph());
1567
+ var self = this;
1568
+ forEach(this._nodes, function(value, v) {
1569
+ if (filter2(v)) {
1570
+ copy.setNode(v, value);
1571
+ }
1572
+ });
1573
+ forEach(this._edgeObjs, function(e) {
1574
+ if (copy.hasNode(e.v) && copy.hasNode(e.w)) {
1575
+ copy.setEdge(e, self.edge(e));
1576
+ }
1577
+ });
1578
+ var parents = {};
1579
+ function findParent(v) {
1580
+ var parent = self.parent(v);
1581
+ if (parent === void 0 || copy.hasNode(parent)) {
1582
+ parents[v] = parent;
1583
+ return parent;
1584
+ } else if (parent in parents) {
1585
+ return parents[parent];
1586
+ } else {
1587
+ return findParent(parent);
1588
+ }
1589
+ }
1590
+ if (this._isCompound) {
1591
+ forEach(copy.nodes(), function(v) {
1592
+ copy.setParent(v, findParent(v));
1593
+ });
1594
+ }
1595
+ return copy;
1596
+ }
1597
+ /* === Edge functions ========== */
1598
+ /**
1599
+ * Sets a new default value that is assigned to edges that are created without
1600
+ * a label.
1601
+ *
1602
+ * @param {typeof this._defaultEdgeLabelFn | EdgeLabel} newDefault - If a function,
1603
+ * it is called with the parameters `(v, w, name)`.
1604
+ * Otherwise, it is assigned as the label directly.
1605
+ * @returns {this}
1606
+ */
1607
+ setDefaultEdgeLabel(newDefault) {
1608
+ if (!isFunction(newDefault)) {
1609
+ newDefault = constant(newDefault);
1610
+ }
1611
+ this._defaultEdgeLabelFn = newDefault;
1612
+ return this;
1613
+ }
1614
+ /**
1615
+ * @returns {number} the number of edges in the graph.
1616
+ * @remarks Complexity: O(1).
1617
+ */
1618
+ edgeCount() {
1619
+ return this._edgeCount;
1620
+ }
1621
+ /**
1622
+ * Gets edges of the graph.
1623
+ *
1624
+ * @returns {EdgeObj[]} the {@link EdgeObj} for each edge in the graph.
1625
+ *
1626
+ * @remarks
1627
+ * In case of compound graph subgraphs are not considered.
1628
+ * Use {@link edge()} to get the label for each edge.
1629
+ * Takes `O(|E|)` time.
1630
+ */
1631
+ edges() {
1632
+ return values(this._edgeObjs);
1633
+ }
1634
+ /**
1635
+ * Establish an edges path over the nodes in nodes list.
1636
+ *
1637
+ * If some edge is already exists, it will update its label, otherwise it will
1638
+ * create an edge between pair of nodes with label provided or default label
1639
+ * if no label provided.
1640
+ *
1641
+ * @param {Collection<NodeID>} vs - List of node IDs to create edges between.
1642
+ * @param {EdgeLabel} [value] - If set, update all edges with this value.
1643
+ * @returns {this}
1644
+ * @remarks Complexity: O(|nodes|).
1645
+ */
1646
+ setPath(vs, value) {
1647
+ var self = this;
1648
+ var args = arguments;
1649
+ reduce(vs, function(v, w) {
1650
+ if (args.length > 1) {
1651
+ self.setEdge(v, w, value);
1652
+ } else {
1653
+ self.setEdge(v, w);
1654
+ }
1655
+ return w;
1656
+ });
1657
+ return this;
1658
+ }
1659
+ /**
1660
+ * Creates or updates the label for the edge (`v`, `w`) with the optionally
1661
+ * supplied `name`.
1662
+ *
1663
+ * @overload
1664
+ * @param {EdgeObj} arg0 - Edge object.
1665
+ * @param {EdgeLabel} [value] - If supplied, it is set as the label for the edge.
1666
+ * If not supplied and the edge was created by this call then
1667
+ * {@link setDefaultEdgeLabel} will be used to assign the edge's label.
1668
+ * @returns {this} the graph, allowing this to be chained with other functions.
1669
+ * @remarks Takes `O(1)` time.
1670
+ */
1671
+ /**
1672
+ * Creates or updates the label for the edge (`v`, `w`) with the optionally
1673
+ * supplied `name`.
1674
+ *
1675
+ * @overload
1676
+ * @param {NodeID | number} v - Source node ID. Number values will be coerced to strings.
1677
+ * @param {NodeID | number} w - Target node ID. Number values will be coerced to strings.
1678
+ * @param {EdgeLabel} [value] - If supplied, it is set as the label for the edge.
1679
+ * If not supplied and the edge was created by this call then
1680
+ * {@link setDefaultEdgeLabel} will be used to assign the edge's label.
1681
+ * @param {string | number} [name] - Edge name. Only useful with multigraphs.
1682
+ * @returns {this} the graph, allowing this to be chained with other functions.
1683
+ * @remarks Takes `O(1)` time.
1684
+ */
1685
+ setEdge() {
1686
+ var v, w, name, value;
1687
+ var valueSpecified = false;
1688
+ var arg0 = arguments[0];
1689
+ if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) {
1690
+ v = arg0.v;
1691
+ w = arg0.w;
1692
+ name = arg0.name;
1693
+ if (arguments.length === 2) {
1694
+ value = arguments[1];
1695
+ valueSpecified = true;
1696
+ }
1697
+ } else {
1698
+ v = arg0;
1699
+ w = arguments[1];
1700
+ name = arguments[3];
1701
+ if (arguments.length > 2) {
1702
+ value = arguments[2];
1703
+ valueSpecified = true;
1704
+ }
1705
+ }
1706
+ v = "" + v;
1707
+ w = "" + w;
1708
+ if (!isUndefined(name)) {
1709
+ name = "" + name;
1710
+ }
1711
+ var e = edgeArgsToId(this._isDirected, v, w, name);
1712
+ if (Object.prototype.hasOwnProperty.call(this._edgeLabels, e)) {
1713
+ if (valueSpecified) {
1714
+ this._edgeLabels[e] = value;
1715
+ }
1716
+ return this;
1717
+ }
1718
+ if (!isUndefined(name) && !this._isMultigraph) {
1719
+ throw new Error("Cannot set a named edge when isMultigraph = false");
1720
+ }
1721
+ this.setNode(v);
1722
+ this.setNode(w);
1723
+ this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);
1724
+ var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);
1725
+ v = edgeObj.v;
1726
+ w = edgeObj.w;
1727
+ Object.freeze(edgeObj);
1728
+ this._edgeObjs[e] = edgeObj;
1729
+ incrementOrInitEntry(this._preds[w], v);
1730
+ incrementOrInitEntry(this._sucs[v], w);
1731
+ this._in[w][e] = edgeObj;
1732
+ this._out[v][e] = edgeObj;
1733
+ this._edgeCount++;
1734
+ return this;
1735
+ }
1736
+ /**
1737
+ * Gets the label for the specified edge.
1738
+ *
1739
+ * @overload
1740
+ * @param {EdgeObj} v - Edge object.
1741
+ * @returns {EdgeLabel | undefined} the label for the edge (`v`, `w`) if the
1742
+ * graph has an edge between `v` and `w` with the optional `name`.
1743
+ * Returned `undefined` if there is no such edge in the graph.
1744
+ * @remarks
1745
+ * `v` and `w` can be interchanged for undirected graphs.
1746
+ * Takes `O(1)` time.
1747
+ */
1748
+ /**
1749
+ * Gets the label for the specified edge.
1750
+ *
1751
+ * @overload
1752
+ * @param {NodeID | number} v - Source node ID.
1753
+ * @param {NodeID | number} w - Target node ID.
1754
+ * @param {string | number} [name] - Edge name. Only useful with multigraphs.
1755
+ * @returns {EdgeLabel | undefined} the label for the edge (`v`, `w`) if the
1756
+ * graph has an edge between `v` and `w` with the optional `name`.
1757
+ * Returned `undefined` if there is no such edge in the graph.
1758
+ * @remarks
1759
+ * `v` and `w` can be interchanged for undirected graphs.
1760
+ * Takes `O(1)` time.
1761
+ */
1762
+ edge(v, w, name) {
1763
+ var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name);
1764
+ return this._edgeLabels[e];
1765
+ }
1766
+ /**
1767
+ * Detects whether the graph contains specified edge or not.
1768
+ *
1769
+ * @overload
1770
+ * @param {EdgeObj} v - Edge object.
1771
+ * @returns {boolean} `true` if the graph has an edge between `v` and `w`
1772
+ * with the optional `name`.
1773
+ * @remarks
1774
+ * `v` and `w` can be interchanged for undirected graphs.
1775
+ * No subgraphs are considered.
1776
+ * Takes `O(1)` time.
1777
+ */
1778
+ /**
1779
+ * Detects whether the graph contains specified edge or not.
1780
+ *
1781
+ * @overload
1782
+ * @param {NodeID | number} v - Source node ID.
1783
+ * @param {NodeID | number} w - Target node ID.
1784
+ * @param {string | number} [name] - Edge name. Only useful with multigraphs.
1785
+ * @returns {boolean} `true` if the graph has an edge between `v` and `w`
1786
+ * with the optional `name`.
1787
+ * @remarks
1788
+ * `v` and `w` can be interchanged for undirected graphs.
1789
+ * No subgraphs are considered.
1790
+ * Takes `O(1)` time.
1791
+ */
1792
+ hasEdge(v, w, name) {
1793
+ var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name);
1794
+ return Object.prototype.hasOwnProperty.call(this._edgeLabels, e);
1795
+ }
1796
+ /**
1797
+ * Removes the edge (`v`, `w`) if the graph has an edge between `v` and `w`
1798
+ * with the optional `name`. If not this function does nothing.
1799
+ *
1800
+ * @overload
1801
+ * @param {EdgeObj} v - Edge object.
1802
+ * @returns {this}
1803
+ * @remarks
1804
+ * `v` and `w` can be interchanged for undirected graphs.
1805
+ * No subgraphs are considered.
1806
+ * Takes `O(1)` time.
1807
+ */
1808
+ /**
1809
+ * Removes the edge (`v`, `w`) if the graph has an edge between `v` and `w`
1810
+ * with the optional `name`. If not this function does nothing.
1811
+ *
1812
+ * @overload
1813
+ * @param {NodeID | number} v - Source node ID.
1814
+ * @param {NodeID | number} w - Target node ID.
1815
+ * @param {string | number} [name] - Edge name. Only useful with multigraphs.
1816
+ * @returns {this}
1817
+ * @remarks
1818
+ * `v` and `w` can be interchanged for undirected graphs.
1819
+ * Takes `O(1)` time.
1820
+ */
1821
+ removeEdge(v, w, name) {
1822
+ var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name);
1823
+ var edge = this._edgeObjs[e];
1824
+ if (edge) {
1825
+ v = edge.v;
1826
+ w = edge.w;
1827
+ delete this._edgeLabels[e];
1828
+ delete this._edgeObjs[e];
1829
+ decrementOrRemoveEntry(this._preds[w], v);
1830
+ decrementOrRemoveEntry(this._sucs[v], w);
1831
+ delete this._in[w][e];
1832
+ delete this._out[v][e];
1833
+ this._edgeCount--;
1834
+ }
1835
+ return this;
1836
+ }
1837
+ /**
1838
+ * @param {NodeID | number} v - Target node ID.
1839
+ * @param {NodeID | number} [u] - Optionally filters edges down to just those
1840
+ * coming from node `u`.
1841
+ * @returns {EdgeObj[] | undefined} all edges that point to the node `v`.
1842
+ * Returns `undefined` if node `v` is not in the graph.
1843
+ * @remarks
1844
+ * Behavior is undefined for undirected graphs - use {@link nodeEdges} instead.
1845
+ * Takes `O(|E|)` time.
1846
+ */
1847
+ inEdges(v, u) {
1848
+ var inV = this._in[v];
1849
+ if (inV) {
1850
+ var edges = values(inV);
1851
+ if (!u) {
1852
+ return edges;
1853
+ }
1854
+ return filter(edges, function(edge) {
1855
+ return edge.v === u;
1856
+ });
1857
+ }
1858
+ }
1859
+ /**
1860
+ * @param {NodeID | number} v - Target node ID.
1861
+ * @param {NodeID | number} [w] - Optionally filters edges down to just those
1862
+ * that point to `w`.
1863
+ * @returns {EdgeObj[] | undefined} all edges that point to the node `v`.
1864
+ * Returns `undefined` if node `v` is not in the graph.
1865
+ * @remarks
1866
+ * Behavior is undefined for undirected graphs - use {@link nodeEdges} instead.
1867
+ * Takes `O(|E|)` time.
1868
+ */
1869
+ outEdges(v, w) {
1870
+ var outV = this._out[v];
1871
+ if (outV) {
1872
+ var edges = values(outV);
1873
+ if (!w) {
1874
+ return edges;
1875
+ }
1876
+ return filter(edges, function(edge) {
1877
+ return edge.w === w;
1878
+ });
1879
+ }
1880
+ }
1881
+ /**
1882
+ * @param {NodeID | number} v - Target Node ID.
1883
+ * @param {NodeID | number} [w] - If set, filters those edges down to just
1884
+ * those between nodes `v` and `w` regardless of direction
1885
+ * @returns {EdgeObj[] | undefined} all edges to or from node `v` regardless
1886
+ * of direction. Returns `undefined` if node `v` is not in the graph.
1887
+ * @remarks Takes `O(|E|)` time.
1888
+ */
1889
+ nodeEdges(v, w) {
1890
+ var inEdges = this.inEdges(v, w);
1891
+ if (inEdges) {
1892
+ return inEdges.concat(this.outEdges(v, w));
1893
+ }
1894
+ }
1895
+ }
1896
+ Graph.prototype._nodeCount = 0;
1897
+ Graph.prototype._edgeCount = 0;
1898
+ function incrementOrInitEntry(map, k) {
1899
+ if (map[k]) {
1900
+ map[k]++;
1901
+ } else {
1902
+ map[k] = 1;
1903
+ }
1904
+ }
1905
+ function decrementOrRemoveEntry(map, k) {
1906
+ if (!--map[k]) {
1907
+ delete map[k];
1908
+ }
1909
+ }
1910
+ function edgeArgsToId(isDirected, v_, w_, name) {
1911
+ var v = "" + v_;
1912
+ var w = "" + w_;
1913
+ if (!isDirected && v > w) {
1914
+ var tmp = v;
1915
+ v = w;
1916
+ w = tmp;
1917
+ }
1918
+ return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined(name) ? DEFAULT_EDGE_NAME : name);
1919
+ }
1920
+ function edgeArgsToObj(isDirected, v_, w_, name) {
1921
+ var v = "" + v_;
1922
+ var w = "" + w_;
1923
+ if (!isDirected && v > w) {
1924
+ var tmp = v;
1925
+ v = w;
1926
+ w = tmp;
1927
+ }
1928
+ var edgeObj = { v, w };
1929
+ if (name) {
1930
+ edgeObj.name = name;
1931
+ }
1932
+ return edgeObj;
1933
+ }
1934
+ function edgeObjToId(isDirected, edgeObj) {
1935
+ return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);
1936
+ }
1937
+ export {
1938
+ isArguments as A,
1939
+ isFunction as B,
1940
+ baseFor as C,
1941
+ baseIteratee as D,
1942
+ baseFindIndex as E,
1943
+ baseEach as F,
1944
+ Graph as G,
1945
+ arrayMap as H,
1946
+ castFunction as I,
1947
+ baseForOwn as J,
1948
+ hasPath as K,
1949
+ identity as L,
1950
+ castPath as M,
1951
+ toKey as N,
1952
+ baseGet as O,
1953
+ hasIn as P,
1954
+ toString as Q,
1955
+ forEach as R,
1956
+ Stack as S,
1957
+ constant as T,
1958
+ Uint8Array as U,
1959
+ filter as V,
1960
+ values as W,
1961
+ reduce as X,
1962
+ isArrayLike as a,
1963
+ isIndex as b,
1964
+ baseRest as c,
1965
+ defineProperty as d,
1966
+ eq as e,
1967
+ isPrototype as f,
1968
+ arrayLikeKeys as g,
1969
+ baseFlatten as h,
1970
+ isUndefined as i,
1971
+ overArg as j,
1972
+ keys as k,
1973
+ getSymbols as l,
1974
+ stubArray as m,
1975
+ arrayPush as n,
1976
+ overRest as o,
1977
+ baseGetAllKeys as p,
1978
+ getTag as q,
1979
+ baseUnary as r,
1980
+ setToString as s,
1981
+ nodeUtil as t,
1982
+ isBuffer as u,
1983
+ arrayEach as v,
1984
+ isArray as w,
1985
+ getAllKeys as x,
1986
+ isTypedArray as y,
1987
+ isArrayLikeObject as z
1988
+ };