bippy 0.2.5 → 0.2.6

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.
package/dist/inspect.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import './chunk-6TJRMCM3.js';
2
- import { getNearestHostFiber, traverseFiber, getFiberStack, getDisplayName, getFiberId, getFiberFromHostInstance, isCompositeFiber, isInstrumentationActive, hasRDTHook, getRDTHook, detectReactBuildType } from './chunk-4TD4C62I.js';
3
- import React17, { createContext, memo, Children, useContext, useCallback, useState, useLayoutEffect, useEffect, useMemo } from 'react';
2
+ import { getFiberId, HostRootTag, HostTextTag, getDisplayName, FragmentTag, isHostFiber, getNearestHostFiber, getFiberFromHostInstance, traverseFiber, getFiberStack, isCompositeFiber, isInstrumentationActive, hasRDTHook, getRDTHook, detectReactBuildType } from './chunk-DCVQB6TW.js';
3
+ import React17, { createContext, memo, Children, useContext, useCallback, useState, useLayoutEffect, useRef, useMemo, useEffect } from 'react';
4
4
 
5
5
  /**
6
6
  * @license bippy
@@ -34,8 +34,8 @@ var __copyProps = (to, from, except, desc) => {
34
34
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
35
35
  var require_is_object = __commonJS({
36
36
  "node_modules/is-object/index.js"(exports, module) {
37
- module.exports = function isObject(x) {
38
- return typeof x === "object" && x !== null;
37
+ module.exports = function isObject(x2) {
38
+ return typeof x2 === "object" && x2 !== null;
39
39
  };
40
40
  }
41
41
  });
@@ -157,40 +157,40 @@ var unselectable = {
157
157
  OUserSelect: "none",
158
158
  userSelect: "none"
159
159
  };
160
- var createTheme = (theme3) => ({
160
+ var createTheme = (theme32) => ({
161
161
  DOMNodePreview: {
162
162
  htmlOpenTag: {
163
163
  base: {
164
- color: theme3.HTML_TAG_COLOR
164
+ color: theme32.HTML_TAG_COLOR
165
165
  },
166
166
  tagName: {
167
- color: theme3.HTML_TAGNAME_COLOR,
168
- textTransform: theme3.HTML_TAGNAME_TEXT_TRANSFORM
167
+ color: theme32.HTML_TAGNAME_COLOR,
168
+ textTransform: theme32.HTML_TAGNAME_TEXT_TRANSFORM
169
169
  },
170
170
  htmlAttributeName: {
171
- color: theme3.HTML_ATTRIBUTE_NAME_COLOR
171
+ color: theme32.HTML_ATTRIBUTE_NAME_COLOR
172
172
  },
173
173
  htmlAttributeValue: {
174
- color: theme3.HTML_ATTRIBUTE_VALUE_COLOR
174
+ color: theme32.HTML_ATTRIBUTE_VALUE_COLOR
175
175
  }
176
176
  },
177
177
  htmlCloseTag: {
178
178
  base: {
179
- color: theme3.HTML_TAG_COLOR
179
+ color: theme32.HTML_TAG_COLOR
180
180
  },
181
181
  offsetLeft: {
182
- marginLeft: -theme3.TREENODE_PADDING_LEFT
182
+ marginLeft: -theme32.TREENODE_PADDING_LEFT
183
183
  },
184
184
  tagName: {
185
- color: theme3.HTML_TAGNAME_COLOR,
186
- textTransform: theme3.HTML_TAGNAME_TEXT_TRANSFORM
185
+ color: theme32.HTML_TAGNAME_COLOR,
186
+ textTransform: theme32.HTML_TAGNAME_TEXT_TRANSFORM
187
187
  }
188
188
  },
189
189
  htmlComment: {
190
- color: theme3.HTML_COMMENT_COLOR
190
+ color: theme32.HTML_COMMENT_COLOR
191
191
  },
192
192
  htmlDoctype: {
193
- color: theme3.HTML_DOCTYPE_COLOR
193
+ color: theme32.HTML_DOCTYPE_COLOR
194
194
  }
195
195
  },
196
196
  ObjectPreview: {
@@ -200,12 +200,12 @@ var createTheme = (theme3) => ({
200
200
  preview: {
201
201
  fontStyle: "italic"
202
202
  },
203
- arrayMaxProperties: theme3.OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES,
204
- objectMaxProperties: theme3.OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES
203
+ arrayMaxProperties: theme32.OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES,
204
+ objectMaxProperties: theme32.OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES
205
205
  },
206
206
  ObjectName: {
207
207
  base: {
208
- color: theme3.OBJECT_NAME_COLOR
208
+ color: theme32.OBJECT_NAME_COLOR
209
209
  },
210
210
  dimmed: {
211
211
  opacity: 0.6
@@ -213,28 +213,28 @@ var createTheme = (theme3) => ({
213
213
  },
214
214
  ObjectValue: {
215
215
  objectValueNull: {
216
- color: theme3.OBJECT_VALUE_NULL_COLOR
216
+ color: theme32.OBJECT_VALUE_NULL_COLOR
217
217
  },
218
218
  objectValueUndefined: {
219
- color: theme3.OBJECT_VALUE_UNDEFINED_COLOR
219
+ color: theme32.OBJECT_VALUE_UNDEFINED_COLOR
220
220
  },
221
221
  objectValueRegExp: {
222
- color: theme3.OBJECT_VALUE_REGEXP_COLOR
222
+ color: theme32.OBJECT_VALUE_REGEXP_COLOR
223
223
  },
224
224
  objectValueString: {
225
- color: theme3.OBJECT_VALUE_STRING_COLOR
225
+ color: theme32.OBJECT_VALUE_STRING_COLOR
226
226
  },
227
227
  objectValueSymbol: {
228
- color: theme3.OBJECT_VALUE_SYMBOL_COLOR
228
+ color: theme32.OBJECT_VALUE_SYMBOL_COLOR
229
229
  },
230
230
  objectValueNumber: {
231
- color: theme3.OBJECT_VALUE_NUMBER_COLOR
231
+ color: theme32.OBJECT_VALUE_NUMBER_COLOR
232
232
  },
233
233
  objectValueBoolean: {
234
- color: theme3.OBJECT_VALUE_BOOLEAN_COLOR
234
+ color: theme32.OBJECT_VALUE_BOOLEAN_COLOR
235
235
  },
236
236
  objectValueFunctionPrefix: {
237
- color: theme3.OBJECT_VALUE_FUNCTION_PREFIX_COLOR,
237
+ color: theme32.OBJECT_VALUE_FUNCTION_PREFIX_COLOR,
238
238
  fontStyle: "italic"
239
239
  },
240
240
  objectValueFunctionName: {
@@ -250,30 +250,30 @@ var createTheme = (theme3) => ({
250
250
  },
251
251
  TreeNode: {
252
252
  treeNodeBase: {
253
- color: theme3.BASE_COLOR,
254
- backgroundColor: theme3.BASE_BACKGROUND_COLOR,
255
- lineHeight: theme3.TREENODE_LINE_HEIGHT,
253
+ color: theme32.BASE_COLOR,
254
+ backgroundColor: theme32.BASE_BACKGROUND_COLOR,
255
+ lineHeight: theme32.TREENODE_LINE_HEIGHT,
256
256
  cursor: "default",
257
257
  boxSizing: "border-box",
258
258
  listStyle: "none",
259
- fontFamily: theme3.TREENODE_FONT_FAMILY,
260
- fontSize: theme3.TREENODE_FONT_SIZE
259
+ fontFamily: theme32.TREENODE_FONT_FAMILY,
260
+ fontSize: theme32.TREENODE_FONT_SIZE
261
261
  },
262
262
  treeNodePreviewContainer: {},
263
263
  treeNodePlaceholder: {
264
264
  whiteSpace: "pre",
265
- fontSize: theme3.ARROW_FONT_SIZE,
266
- marginRight: theme3.ARROW_MARGIN_RIGHT,
265
+ fontSize: theme32.ARROW_FONT_SIZE,
266
+ marginRight: theme32.ARROW_MARGIN_RIGHT,
267
267
  ...unselectable
268
268
  },
269
269
  treeNodeArrow: {
270
270
  base: {
271
- color: theme3.ARROW_COLOR,
271
+ color: theme32.ARROW_COLOR,
272
272
  display: "inline-block",
273
- fontSize: theme3.ARROW_FONT_SIZE,
274
- marginRight: theme3.ARROW_MARGIN_RIGHT,
275
- ...parseFloat(theme3.ARROW_ANIMATION_DURATION) > 0 ? {
276
- transition: `transform ${theme3.ARROW_ANIMATION_DURATION} ease 0s`
273
+ fontSize: theme32.ARROW_FONT_SIZE,
274
+ marginRight: theme32.ARROW_MARGIN_RIGHT,
275
+ ...parseFloat(theme32.ARROW_ANIMATION_DURATION) > 0 ? {
276
+ transition: `transform ${theme32.ARROW_ANIMATION_DURATION} ease 0s`
277
277
  } : {},
278
278
  ...unselectable
279
279
  },
@@ -290,16 +290,16 @@ var createTheme = (theme3) => ({
290
290
  },
291
291
  treeNodeChildNodesContainer: {
292
292
  margin: 0,
293
- paddingLeft: theme3.TREENODE_PADDING_LEFT
293
+ paddingLeft: theme32.TREENODE_PADDING_LEFT
294
294
  }
295
295
  },
296
296
  TableInspector: {
297
297
  base: {
298
- color: theme3.BASE_COLOR,
298
+ color: theme32.BASE_COLOR,
299
299
  position: "relative",
300
- border: `1px solid ${theme3.TABLE_BORDER_COLOR}`,
301
- fontFamily: theme3.BASE_FONT_FAMILY,
302
- fontSize: theme3.BASE_FONT_SIZE,
300
+ border: `1px solid ${theme32.TABLE_BORDER_COLOR}`,
301
+ fontFamily: theme32.BASE_FONT_FAMILY,
302
+ fontSize: theme32.BASE_FONT_SIZE,
303
303
  lineHeight: "120%",
304
304
  boxSizing: "border-box",
305
305
  cursor: "default"
@@ -356,13 +356,13 @@ var createTheme = (theme3) => ({
356
356
  bottom: 0,
357
357
  borderTop: "0 none transparent",
358
358
  margin: 0,
359
- backgroundImage: theme3.TABLE_DATA_BACKGROUND_IMAGE,
360
- backgroundSize: theme3.TABLE_DATA_BACKGROUND_SIZE,
359
+ backgroundImage: theme32.TABLE_DATA_BACKGROUND_IMAGE,
360
+ backgroundSize: theme32.TABLE_DATA_BACKGROUND_SIZE,
361
361
  tableLayout: "fixed",
362
362
  borderSpacing: 0,
363
363
  borderCollapse: "separate",
364
364
  width: "100%",
365
- fontSize: theme3.BASE_FONT_SIZE,
365
+ fontSize: theme32.BASE_FONT_SIZE,
366
366
  lineHeight: "120%"
367
367
  }
368
368
  },
@@ -371,8 +371,8 @@ var createTheme = (theme3) => ({
371
371
  position: "relative",
372
372
  height: "auto",
373
373
  textAlign: "left",
374
- backgroundColor: theme3.TABLE_TH_BACKGROUND_COLOR,
375
- borderBottom: `1px solid ${theme3.TABLE_BORDER_COLOR}`,
374
+ backgroundColor: theme32.TABLE_TH_BACKGROUND_COLOR,
375
+ borderBottom: `1px solid ${theme32.TABLE_BORDER_COLOR}`,
376
376
  fontWeight: "normal",
377
377
  verticalAlign: "middle",
378
378
  padding: "0 4px",
@@ -381,14 +381,14 @@ var createTheme = (theme3) => ({
381
381
  overflow: "hidden",
382
382
  lineHeight: "14px",
383
383
  ":hover": {
384
- backgroundColor: theme3.TABLE_TH_HOVER_COLOR
384
+ backgroundColor: theme32.TABLE_TH_HOVER_COLOR
385
385
  }
386
386
  },
387
387
  div: {
388
388
  whiteSpace: "nowrap",
389
389
  textOverflow: "ellipsis",
390
390
  overflow: "hidden",
391
- fontSize: theme3.BASE_FONT_SIZE,
391
+ fontSize: theme32.BASE_FONT_SIZE,
392
392
  lineHeight: "120%"
393
393
  }
394
394
  },
@@ -397,7 +397,7 @@ var createTheme = (theme3) => ({
397
397
  borderLeft: "none"
398
398
  },
399
399
  solid: {
400
- borderLeft: `1px solid ${theme3.TABLE_BORDER_COLOR}`
400
+ borderLeft: `1px solid ${theme32.TABLE_BORDER_COLOR}`
401
401
  }
402
402
  },
403
403
  TableInspectorSortIcon: {
@@ -406,7 +406,7 @@ var createTheme = (theme3) => ({
406
406
  width: 8,
407
407
  height: 7,
408
408
  marginTop: -7,
409
- color: theme3.TABLE_SORT_ICON_COLOR,
409
+ color: theme32.TABLE_SORT_ICON_COLOR,
410
410
  fontSize: 12,
411
411
  ...unselectable
412
412
  }
@@ -418,17 +418,17 @@ var useStyles = (baseStylesKey) => {
418
418
  return themeStyles[baseStylesKey];
419
419
  };
420
420
  var themeAcceptor = (WrappedComponent) => {
421
- const ThemeAcceptor = ({ theme: theme3 = DEFAULT_THEME_NAME, ...restProps }) => {
421
+ const ThemeAcceptor = ({ theme: theme32 = DEFAULT_THEME_NAME, ...restProps }) => {
422
422
  const themeStyles = useMemo(() => {
423
- switch (Object.prototype.toString.call(theme3)) {
423
+ switch (Object.prototype.toString.call(theme32)) {
424
424
  case "[object String]":
425
- return createTheme(themes_exports[theme3]);
425
+ return createTheme(themes_exports[theme32]);
426
426
  case "[object Object]":
427
- return createTheme(theme3);
427
+ return createTheme(theme32);
428
428
  default:
429
429
  return createTheme(themes_exports[DEFAULT_THEME_NAME]);
430
430
  }
431
- }, [theme3]);
431
+ }, [theme32]);
432
432
  return /* @__PURE__ */ React17.createElement(ThemeContext.Provider, {
433
433
  value: themeStyles
434
434
  }, /* @__PURE__ */ React17.createElement(WrappedComponent, {
@@ -453,7 +453,7 @@ var TreeNode = memo((props) => {
453
453
  shouldShowPlaceholder: true,
454
454
  ...props
455
455
  };
456
- const { expanded, onClick, children, nodeRenderer, title, shouldShowArrow, shouldShowPlaceholder } = props;
456
+ const { expanded, onClick, children: children2, nodeRenderer, title, shouldShowArrow, shouldShowPlaceholder } = props;
457
457
  const styles = useStyles("TreeNode");
458
458
  const NodeRenderer = nodeRenderer;
459
459
  return /* @__PURE__ */ React17.createElement("li", {
@@ -464,7 +464,7 @@ var TreeNode = memo((props) => {
464
464
  }, /* @__PURE__ */ React17.createElement("div", {
465
465
  style: styles.treeNodePreviewContainer,
466
466
  onClick
467
- }, shouldShowArrow || Children.count(children) > 0 ? /* @__PURE__ */ React17.createElement(Arrow, {
467
+ }, shouldShowArrow || Children.count(children2) > 0 ? /* @__PURE__ */ React17.createElement(Arrow, {
468
468
  expanded,
469
469
  styles: styles.treeNodeArrow
470
470
  }) : shouldShowPlaceholder && /* @__PURE__ */ React17.createElement("span", {
@@ -474,7 +474,7 @@ var TreeNode = memo((props) => {
474
474
  })), /* @__PURE__ */ React17.createElement("ol", {
475
475
  role: "group",
476
476
  style: styles.treeNodeChildNodesContainer
477
- }, expanded ? children : void 0));
477
+ }, expanded ? children2 : void 0));
478
478
  });
479
479
  var DEFAULT_ROOT_PATH = "$";
480
480
  var WILDCARD = "*";
@@ -485,7 +485,7 @@ var wildcardPathsFromLevel = (level) => {
485
485
  return Array.from({ length: level }, (_, i) => [DEFAULT_ROOT_PATH].concat(Array.from({ length: i }, () => "*")).join("."));
486
486
  };
487
487
  var getExpandedPaths = (data, dataIterator, expandPaths, expandLevel, prevExpandedPaths) => {
488
- const wildcardPaths = [].concat(wildcardPathsFromLevel(expandLevel)).concat(expandPaths).filter((path) => typeof path === "string");
488
+ const wildcardPaths = [].concat(wildcardPathsFromLevel(expandLevel)).concat(expandPaths).filter((path2) => typeof path2 === "string");
489
489
  const expandedPaths = [];
490
490
  wildcardPaths.forEach((wildcardPath) => {
491
491
  const keyPaths = wildcardPath.split(".");
@@ -516,20 +516,20 @@ var getExpandedPaths = (data, dataIterator, expandPaths, expandLevel, prevExpand
516
516
  };
517
517
  populatePaths(data, "", 0);
518
518
  });
519
- return expandedPaths.reduce((obj, path) => {
520
- obj[path] = true;
519
+ return expandedPaths.reduce((obj, path2) => {
520
+ obj[path2] = true;
521
521
  return obj;
522
522
  }, { ...prevExpandedPaths });
523
523
  };
524
524
  var ConnectedTreeNode = memo((props) => {
525
- const { data, dataIterator, path, depth, nodeRenderer } = props;
525
+ const { data, dataIterator, path: path2, depth, nodeRenderer } = props;
526
526
  const [expandedPaths, setExpandedPaths] = useContext(ExpandedPathsContext);
527
527
  const nodeHasChildNodes = hasChildNodes(data, dataIterator);
528
- const expanded = !!expandedPaths[path];
528
+ const expanded = !!expandedPaths[path2];
529
529
  const handleClick = useCallback(() => nodeHasChildNodes && setExpandedPaths((prevExpandedPaths) => ({
530
530
  ...prevExpandedPaths,
531
- [path]: !expanded
532
- })), [nodeHasChildNodes, setExpandedPaths, path, expanded]);
531
+ [path2]: !expanded
532
+ })), [nodeHasChildNodes, setExpandedPaths, path2, expanded]);
533
533
  return /* @__PURE__ */ React17.createElement(TreeNode, {
534
534
  expanded,
535
535
  onClick: handleClick,
@@ -542,7 +542,7 @@ var ConnectedTreeNode = memo((props) => {
542
542
  name,
543
543
  data: data2,
544
544
  depth: depth + 1,
545
- path: `${path}.${name}`,
545
+ path: `${path2}.${name}`,
546
546
  key: name,
547
547
  dataIterator,
548
548
  nodeRenderer,
@@ -659,7 +659,7 @@ function intersperse(arr, sep) {
659
659
  if (arr.length === 0) {
660
660
  return [];
661
661
  }
662
- return arr.slice(1).reduce((xs, x) => xs.concat([sep, x]), [arr[0]]);
662
+ return arr.slice(1).reduce((xs, x2) => xs.concat([sep, x2]), [arr[0]]);
663
663
  }
664
664
  var ObjectPreview = ({ data }) => {
665
665
  const styles = useStyles("ObjectPreview");
@@ -835,9 +835,9 @@ function getHeaders(data) {
835
835
  const row = data[rowHeader];
836
836
  if (typeof row === "object" && row !== null) {
837
837
  const cols = Object.keys(row);
838
- cols.reduce((xs, x) => {
839
- if (!xs.includes(x)) {
840
- xs.push(x);
838
+ cols.reduce((xs, x2) => {
839
+ if (!xs.includes(x2)) {
840
+ xs.push(x2);
841
841
  }
842
842
  return xs;
843
843
  }, colHeaders2);
@@ -902,7 +902,7 @@ var TH = ({
902
902
  sorted = false,
903
903
  onClick = void 0,
904
904
  borderStyle = {},
905
- children,
905
+ children: children2,
906
906
  ...thProps
907
907
  }) => {
908
908
  const styles = useStyles("TableInspectorTH");
@@ -921,7 +921,7 @@ var TH = ({
921
921
  onClick
922
922
  }, /* @__PURE__ */ React17.createElement("div", {
923
923
  style: styles.div
924
- }, children), sorted && /* @__PURE__ */ React17.createElement(SortIconContainer, null, /* @__PURE__ */ React17.createElement(SortIcon, {
924
+ }, children2), sorted && /* @__PURE__ */ React17.createElement(SortIconContainer, null, /* @__PURE__ */ React17.createElement(SortIcon, {
925
925
  sortAscending
926
926
  })));
927
927
  };
@@ -1007,7 +1007,7 @@ var TableInspector = ({
1007
1007
  }
1008
1008
  }
1009
1009
  if (columnDataWithRowIndexes !== void 0) {
1010
- const comparator = (mapper, ascending) => {
1010
+ const comparator = (mapper, ascending2) => {
1011
1011
  return (a, b) => {
1012
1012
  const v1 = mapper(a);
1013
1013
  const v2 = mapper(b);
@@ -1037,7 +1037,7 @@ var TableInspector = ({
1037
1037
  };
1038
1038
  result = lt(order[type1], order[type2]);
1039
1039
  }
1040
- if (!ascending)
1040
+ if (!ascending2)
1041
1041
  result = -result;
1042
1042
  return result;
1043
1043
  };
@@ -1195,6 +1195,3386 @@ var Inspector = ({ table = false, data, ...rest }) => {
1195
1195
  });
1196
1196
  };
1197
1197
 
1198
+ // node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js
1199
+ var noop = { value: () => {
1200
+ } };
1201
+ function dispatch() {
1202
+ for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
1203
+ if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
1204
+ _[t] = [];
1205
+ }
1206
+ return new Dispatch(_);
1207
+ }
1208
+ function Dispatch(_) {
1209
+ this._ = _;
1210
+ }
1211
+ function parseTypenames(typenames, types) {
1212
+ return typenames.trim().split(/^|\s+/).map(function(t) {
1213
+ var name = "", i = t.indexOf(".");
1214
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
1215
+ if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
1216
+ return { type: t, name };
1217
+ });
1218
+ }
1219
+ Dispatch.prototype = dispatch.prototype = {
1220
+ constructor: Dispatch,
1221
+ on: function(typename, callback) {
1222
+ var _ = this._, T = parseTypenames(typename + "", _), t, i = -1, n = T.length;
1223
+ if (arguments.length < 2) {
1224
+ while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
1225
+ return;
1226
+ }
1227
+ if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
1228
+ while (++i < n) {
1229
+ if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);
1230
+ else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
1231
+ }
1232
+ return this;
1233
+ },
1234
+ copy: function() {
1235
+ var copy = {}, _ = this._;
1236
+ for (var t in _) copy[t] = _[t].slice();
1237
+ return new Dispatch(copy);
1238
+ },
1239
+ call: function(type2, that) {
1240
+ if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
1241
+ if (!this._.hasOwnProperty(type2)) throw new Error("unknown type: " + type2);
1242
+ for (t = this._[type2], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
1243
+ },
1244
+ apply: function(type2, that, args) {
1245
+ if (!this._.hasOwnProperty(type2)) throw new Error("unknown type: " + type2);
1246
+ for (var t = this._[type2], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
1247
+ }
1248
+ };
1249
+ function get(type2, name) {
1250
+ for (var i = 0, n = type2.length, c; i < n; ++i) {
1251
+ if ((c = type2[i]).name === name) {
1252
+ return c.value;
1253
+ }
1254
+ }
1255
+ }
1256
+ function set(type2, name, callback) {
1257
+ for (var i = 0, n = type2.length; i < n; ++i) {
1258
+ if (type2[i].name === name) {
1259
+ type2[i] = noop, type2 = type2.slice(0, i).concat(type2.slice(i + 1));
1260
+ break;
1261
+ }
1262
+ }
1263
+ if (callback != null) type2.push({ name, value: callback });
1264
+ return type2;
1265
+ }
1266
+ var dispatch_default = dispatch;
1267
+
1268
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespaces.js
1269
+ var xhtml = "http://www.w3.org/1999/xhtml";
1270
+ var namespaces_default = {
1271
+ svg: "http://www.w3.org/2000/svg",
1272
+ xhtml,
1273
+ xlink: "http://www.w3.org/1999/xlink",
1274
+ xml: "http://www.w3.org/XML/1998/namespace",
1275
+ xmlns: "http://www.w3.org/2000/xmlns/"
1276
+ };
1277
+
1278
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js
1279
+ function namespace_default(name) {
1280
+ var prefix = name += "", i = prefix.indexOf(":");
1281
+ if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
1282
+ return namespaces_default.hasOwnProperty(prefix) ? { space: namespaces_default[prefix], local: name } : name;
1283
+ }
1284
+
1285
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/creator.js
1286
+ function creatorInherit(name) {
1287
+ return function() {
1288
+ var document2 = this.ownerDocument, uri = this.namespaceURI;
1289
+ return uri === xhtml && document2.documentElement.namespaceURI === xhtml ? document2.createElement(name) : document2.createElementNS(uri, name);
1290
+ };
1291
+ }
1292
+ function creatorFixed(fullname) {
1293
+ return function() {
1294
+ return this.ownerDocument.createElementNS(fullname.space, fullname.local);
1295
+ };
1296
+ }
1297
+ function creator_default(name) {
1298
+ var fullname = namespace_default(name);
1299
+ return (fullname.local ? creatorFixed : creatorInherit)(fullname);
1300
+ }
1301
+
1302
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js
1303
+ function none() {
1304
+ }
1305
+ function selector_default(selector) {
1306
+ return selector == null ? none : function() {
1307
+ return this.querySelector(selector);
1308
+ };
1309
+ }
1310
+
1311
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js
1312
+ function select_default(select) {
1313
+ if (typeof select !== "function") select = selector_default(select);
1314
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
1315
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
1316
+ if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
1317
+ if ("__data__" in node) subnode.__data__ = node.__data__;
1318
+ subgroup[i] = subnode;
1319
+ }
1320
+ }
1321
+ }
1322
+ return new Selection(subgroups, this._parents);
1323
+ }
1324
+
1325
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js
1326
+ function array(x2) {
1327
+ return x2 == null ? [] : Array.isArray(x2) ? x2 : Array.from(x2);
1328
+ }
1329
+
1330
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js
1331
+ function empty() {
1332
+ return [];
1333
+ }
1334
+ function selectorAll_default(selector) {
1335
+ return selector == null ? empty : function() {
1336
+ return this.querySelectorAll(selector);
1337
+ };
1338
+ }
1339
+
1340
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js
1341
+ function arrayAll(select) {
1342
+ return function() {
1343
+ return array(select.apply(this, arguments));
1344
+ };
1345
+ }
1346
+ function selectAll_default(select) {
1347
+ if (typeof select === "function") select = arrayAll(select);
1348
+ else select = selectorAll_default(select);
1349
+ for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
1350
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
1351
+ if (node = group[i]) {
1352
+ subgroups.push(select.call(node, node.__data__, i, group));
1353
+ parents.push(node);
1354
+ }
1355
+ }
1356
+ }
1357
+ return new Selection(subgroups, parents);
1358
+ }
1359
+
1360
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js
1361
+ function matcher_default(selector) {
1362
+ return function() {
1363
+ return this.matches(selector);
1364
+ };
1365
+ }
1366
+ function childMatcher(selector) {
1367
+ return function(node) {
1368
+ return node.matches(selector);
1369
+ };
1370
+ }
1371
+
1372
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js
1373
+ var find = Array.prototype.find;
1374
+ function childFind(match) {
1375
+ return function() {
1376
+ return find.call(this.children, match);
1377
+ };
1378
+ }
1379
+ function childFirst() {
1380
+ return this.firstElementChild;
1381
+ }
1382
+ function selectChild_default(match) {
1383
+ return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match)));
1384
+ }
1385
+
1386
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js
1387
+ var filter = Array.prototype.filter;
1388
+ function children() {
1389
+ return Array.from(this.children);
1390
+ }
1391
+ function childrenFilter(match) {
1392
+ return function() {
1393
+ return filter.call(this.children, match);
1394
+ };
1395
+ }
1396
+ function selectChildren_default(match) {
1397
+ return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
1398
+ }
1399
+
1400
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js
1401
+ function filter_default(match) {
1402
+ if (typeof match !== "function") match = matcher_default(match);
1403
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
1404
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
1405
+ if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
1406
+ subgroup.push(node);
1407
+ }
1408
+ }
1409
+ }
1410
+ return new Selection(subgroups, this._parents);
1411
+ }
1412
+
1413
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js
1414
+ function sparse_default(update) {
1415
+ return new Array(update.length);
1416
+ }
1417
+
1418
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js
1419
+ function enter_default() {
1420
+ return new Selection(this._enter || this._groups.map(sparse_default), this._parents);
1421
+ }
1422
+ function EnterNode(parent, datum2) {
1423
+ this.ownerDocument = parent.ownerDocument;
1424
+ this.namespaceURI = parent.namespaceURI;
1425
+ this._next = null;
1426
+ this._parent = parent;
1427
+ this.__data__ = datum2;
1428
+ }
1429
+ EnterNode.prototype = {
1430
+ constructor: EnterNode,
1431
+ appendChild: function(child) {
1432
+ return this._parent.insertBefore(child, this._next);
1433
+ },
1434
+ insertBefore: function(child, next) {
1435
+ return this._parent.insertBefore(child, next);
1436
+ },
1437
+ querySelector: function(selector) {
1438
+ return this._parent.querySelector(selector);
1439
+ },
1440
+ querySelectorAll: function(selector) {
1441
+ return this._parent.querySelectorAll(selector);
1442
+ }
1443
+ };
1444
+
1445
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js
1446
+ function constant_default(x2) {
1447
+ return function() {
1448
+ return x2;
1449
+ };
1450
+ }
1451
+
1452
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js
1453
+ function bindIndex(parent, group, enter, update, exit, data) {
1454
+ var i = 0, node, groupLength = group.length, dataLength = data.length;
1455
+ for (; i < dataLength; ++i) {
1456
+ if (node = group[i]) {
1457
+ node.__data__ = data[i];
1458
+ update[i] = node;
1459
+ } else {
1460
+ enter[i] = new EnterNode(parent, data[i]);
1461
+ }
1462
+ }
1463
+ for (; i < groupLength; ++i) {
1464
+ if (node = group[i]) {
1465
+ exit[i] = node;
1466
+ }
1467
+ }
1468
+ }
1469
+ function bindKey(parent, group, enter, update, exit, data, key) {
1470
+ var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
1471
+ for (i = 0; i < groupLength; ++i) {
1472
+ if (node = group[i]) {
1473
+ keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
1474
+ if (nodeByKeyValue.has(keyValue)) {
1475
+ exit[i] = node;
1476
+ } else {
1477
+ nodeByKeyValue.set(keyValue, node);
1478
+ }
1479
+ }
1480
+ }
1481
+ for (i = 0; i < dataLength; ++i) {
1482
+ keyValue = key.call(parent, data[i], i, data) + "";
1483
+ if (node = nodeByKeyValue.get(keyValue)) {
1484
+ update[i] = node;
1485
+ node.__data__ = data[i];
1486
+ nodeByKeyValue.delete(keyValue);
1487
+ } else {
1488
+ enter[i] = new EnterNode(parent, data[i]);
1489
+ }
1490
+ }
1491
+ for (i = 0; i < groupLength; ++i) {
1492
+ if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
1493
+ exit[i] = node;
1494
+ }
1495
+ }
1496
+ }
1497
+ function datum(node) {
1498
+ return node.__data__;
1499
+ }
1500
+ function data_default(value, key) {
1501
+ if (!arguments.length) return Array.from(this, datum);
1502
+ var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups;
1503
+ if (typeof value !== "function") value = constant_default(value);
1504
+ for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
1505
+ var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
1506
+ bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
1507
+ for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
1508
+ if (previous = enterGroup[i0]) {
1509
+ if (i0 >= i1) i1 = i0 + 1;
1510
+ while (!(next = updateGroup[i1]) && ++i1 < dataLength) ;
1511
+ previous._next = next || null;
1512
+ }
1513
+ }
1514
+ }
1515
+ update = new Selection(update, parents);
1516
+ update._enter = enter;
1517
+ update._exit = exit;
1518
+ return update;
1519
+ }
1520
+ function arraylike(data) {
1521
+ return typeof data === "object" && "length" in data ? data : Array.from(data);
1522
+ }
1523
+
1524
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js
1525
+ function exit_default() {
1526
+ return new Selection(this._exit || this._groups.map(sparse_default), this._parents);
1527
+ }
1528
+
1529
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js
1530
+ function join_default(onenter, onupdate, onexit) {
1531
+ var enter = this.enter(), update = this, exit = this.exit();
1532
+ if (typeof onenter === "function") {
1533
+ enter = onenter(enter);
1534
+ if (enter) enter = enter.selection();
1535
+ } else {
1536
+ enter = enter.append(onenter + "");
1537
+ }
1538
+ if (onupdate != null) {
1539
+ update = onupdate(update);
1540
+ if (update) update = update.selection();
1541
+ }
1542
+ if (onexit == null) exit.remove();
1543
+ else onexit(exit);
1544
+ return enter && update ? enter.merge(update).order() : update;
1545
+ }
1546
+
1547
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js
1548
+ function merge_default(context) {
1549
+ var selection2 = context.selection ? context.selection() : context;
1550
+ for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
1551
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
1552
+ if (node = group0[i] || group1[i]) {
1553
+ merge[i] = node;
1554
+ }
1555
+ }
1556
+ }
1557
+ for (; j < m0; ++j) {
1558
+ merges[j] = groups0[j];
1559
+ }
1560
+ return new Selection(merges, this._parents);
1561
+ }
1562
+
1563
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js
1564
+ function order_default() {
1565
+ for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
1566
+ for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
1567
+ if (node = group[i]) {
1568
+ if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
1569
+ next = node;
1570
+ }
1571
+ }
1572
+ }
1573
+ return this;
1574
+ }
1575
+
1576
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js
1577
+ function sort_default(compare) {
1578
+ if (!compare) compare = ascending;
1579
+ function compareNode(a, b) {
1580
+ return a && b ? compare(a.__data__, b.__data__) : !a - !b;
1581
+ }
1582
+ for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
1583
+ for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
1584
+ if (node = group[i]) {
1585
+ sortgroup[i] = node;
1586
+ }
1587
+ }
1588
+ sortgroup.sort(compareNode);
1589
+ }
1590
+ return new Selection(sortgroups, this._parents).order();
1591
+ }
1592
+ function ascending(a, b) {
1593
+ return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
1594
+ }
1595
+
1596
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js
1597
+ function call_default() {
1598
+ var callback = arguments[0];
1599
+ arguments[0] = this;
1600
+ callback.apply(null, arguments);
1601
+ return this;
1602
+ }
1603
+
1604
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js
1605
+ function nodes_default() {
1606
+ return Array.from(this);
1607
+ }
1608
+
1609
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js
1610
+ function node_default() {
1611
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
1612
+ for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
1613
+ var node = group[i];
1614
+ if (node) return node;
1615
+ }
1616
+ }
1617
+ return null;
1618
+ }
1619
+
1620
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js
1621
+ function size_default() {
1622
+ let size = 0;
1623
+ for (const node of this) ++size;
1624
+ return size;
1625
+ }
1626
+
1627
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js
1628
+ function empty_default() {
1629
+ return !this.node();
1630
+ }
1631
+
1632
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js
1633
+ function each_default(callback) {
1634
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
1635
+ for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
1636
+ if (node = group[i]) callback.call(node, node.__data__, i, group);
1637
+ }
1638
+ }
1639
+ return this;
1640
+ }
1641
+
1642
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js
1643
+ function attrRemove(name) {
1644
+ return function() {
1645
+ this.removeAttribute(name);
1646
+ };
1647
+ }
1648
+ function attrRemoveNS(fullname) {
1649
+ return function() {
1650
+ this.removeAttributeNS(fullname.space, fullname.local);
1651
+ };
1652
+ }
1653
+ function attrConstant(name, value) {
1654
+ return function() {
1655
+ this.setAttribute(name, value);
1656
+ };
1657
+ }
1658
+ function attrConstantNS(fullname, value) {
1659
+ return function() {
1660
+ this.setAttributeNS(fullname.space, fullname.local, value);
1661
+ };
1662
+ }
1663
+ function attrFunction(name, value) {
1664
+ return function() {
1665
+ var v = value.apply(this, arguments);
1666
+ if (v == null) this.removeAttribute(name);
1667
+ else this.setAttribute(name, v);
1668
+ };
1669
+ }
1670
+ function attrFunctionNS(fullname, value) {
1671
+ return function() {
1672
+ var v = value.apply(this, arguments);
1673
+ if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
1674
+ else this.setAttributeNS(fullname.space, fullname.local, v);
1675
+ };
1676
+ }
1677
+ function attr_default(name, value) {
1678
+ var fullname = namespace_default(name);
1679
+ if (arguments.length < 2) {
1680
+ var node = this.node();
1681
+ return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
1682
+ }
1683
+ return this.each((value == null ? fullname.local ? attrRemoveNS : attrRemove : typeof value === "function" ? fullname.local ? attrFunctionNS : attrFunction : fullname.local ? attrConstantNS : attrConstant)(fullname, value));
1684
+ }
1685
+
1686
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js
1687
+ function window_default(node) {
1688
+ return node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView;
1689
+ }
1690
+
1691
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js
1692
+ function styleRemove(name) {
1693
+ return function() {
1694
+ this.style.removeProperty(name);
1695
+ };
1696
+ }
1697
+ function styleConstant(name, value, priority) {
1698
+ return function() {
1699
+ this.style.setProperty(name, value, priority);
1700
+ };
1701
+ }
1702
+ function styleFunction(name, value, priority) {
1703
+ return function() {
1704
+ var v = value.apply(this, arguments);
1705
+ if (v == null) this.style.removeProperty(name);
1706
+ else this.style.setProperty(name, v, priority);
1707
+ };
1708
+ }
1709
+ function style_default(name, value, priority) {
1710
+ return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name);
1711
+ }
1712
+ function styleValue(node, name) {
1713
+ return node.style.getPropertyValue(name) || window_default(node).getComputedStyle(node, null).getPropertyValue(name);
1714
+ }
1715
+
1716
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js
1717
+ function propertyRemove(name) {
1718
+ return function() {
1719
+ delete this[name];
1720
+ };
1721
+ }
1722
+ function propertyConstant(name, value) {
1723
+ return function() {
1724
+ this[name] = value;
1725
+ };
1726
+ }
1727
+ function propertyFunction(name, value) {
1728
+ return function() {
1729
+ var v = value.apply(this, arguments);
1730
+ if (v == null) delete this[name];
1731
+ else this[name] = v;
1732
+ };
1733
+ }
1734
+ function property_default(name, value) {
1735
+ return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
1736
+ }
1737
+
1738
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js
1739
+ function classArray(string) {
1740
+ return string.trim().split(/^|\s+/);
1741
+ }
1742
+ function classList(node) {
1743
+ return node.classList || new ClassList(node);
1744
+ }
1745
+ function ClassList(node) {
1746
+ this._node = node;
1747
+ this._names = classArray(node.getAttribute("class") || "");
1748
+ }
1749
+ ClassList.prototype = {
1750
+ add: function(name) {
1751
+ var i = this._names.indexOf(name);
1752
+ if (i < 0) {
1753
+ this._names.push(name);
1754
+ this._node.setAttribute("class", this._names.join(" "));
1755
+ }
1756
+ },
1757
+ remove: function(name) {
1758
+ var i = this._names.indexOf(name);
1759
+ if (i >= 0) {
1760
+ this._names.splice(i, 1);
1761
+ this._node.setAttribute("class", this._names.join(" "));
1762
+ }
1763
+ },
1764
+ contains: function(name) {
1765
+ return this._names.indexOf(name) >= 0;
1766
+ }
1767
+ };
1768
+ function classedAdd(node, names) {
1769
+ var list = classList(node), i = -1, n = names.length;
1770
+ while (++i < n) list.add(names[i]);
1771
+ }
1772
+ function classedRemove(node, names) {
1773
+ var list = classList(node), i = -1, n = names.length;
1774
+ while (++i < n) list.remove(names[i]);
1775
+ }
1776
+ function classedTrue(names) {
1777
+ return function() {
1778
+ classedAdd(this, names);
1779
+ };
1780
+ }
1781
+ function classedFalse(names) {
1782
+ return function() {
1783
+ classedRemove(this, names);
1784
+ };
1785
+ }
1786
+ function classedFunction(names, value) {
1787
+ return function() {
1788
+ (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
1789
+ };
1790
+ }
1791
+ function classed_default(name, value) {
1792
+ var names = classArray(name + "");
1793
+ if (arguments.length < 2) {
1794
+ var list = classList(this.node()), i = -1, n = names.length;
1795
+ while (++i < n) if (!list.contains(names[i])) return false;
1796
+ return true;
1797
+ }
1798
+ return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
1799
+ }
1800
+
1801
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js
1802
+ function textRemove() {
1803
+ this.textContent = "";
1804
+ }
1805
+ function textConstant(value) {
1806
+ return function() {
1807
+ this.textContent = value;
1808
+ };
1809
+ }
1810
+ function textFunction(value) {
1811
+ return function() {
1812
+ var v = value.apply(this, arguments);
1813
+ this.textContent = v == null ? "" : v;
1814
+ };
1815
+ }
1816
+ function text_default(value) {
1817
+ return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent;
1818
+ }
1819
+
1820
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js
1821
+ function htmlRemove() {
1822
+ this.innerHTML = "";
1823
+ }
1824
+ function htmlConstant(value) {
1825
+ return function() {
1826
+ this.innerHTML = value;
1827
+ };
1828
+ }
1829
+ function htmlFunction(value) {
1830
+ return function() {
1831
+ var v = value.apply(this, arguments);
1832
+ this.innerHTML = v == null ? "" : v;
1833
+ };
1834
+ }
1835
+ function html_default(value) {
1836
+ return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
1837
+ }
1838
+
1839
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/raise.js
1840
+ function raise() {
1841
+ if (this.nextSibling) this.parentNode.appendChild(this);
1842
+ }
1843
+ function raise_default() {
1844
+ return this.each(raise);
1845
+ }
1846
+
1847
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/lower.js
1848
+ function lower() {
1849
+ if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
1850
+ }
1851
+ function lower_default() {
1852
+ return this.each(lower);
1853
+ }
1854
+
1855
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/append.js
1856
+ function append_default(name) {
1857
+ var create2 = typeof name === "function" ? name : creator_default(name);
1858
+ return this.select(function() {
1859
+ return this.appendChild(create2.apply(this, arguments));
1860
+ });
1861
+ }
1862
+
1863
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/insert.js
1864
+ function constantNull() {
1865
+ return null;
1866
+ }
1867
+ function insert_default(name, before) {
1868
+ var create2 = typeof name === "function" ? name : creator_default(name), select = before == null ? constantNull : typeof before === "function" ? before : selector_default(before);
1869
+ return this.select(function() {
1870
+ return this.insertBefore(create2.apply(this, arguments), select.apply(this, arguments) || null);
1871
+ });
1872
+ }
1873
+
1874
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/remove.js
1875
+ function remove() {
1876
+ var parent = this.parentNode;
1877
+ if (parent) parent.removeChild(this);
1878
+ }
1879
+ function remove_default() {
1880
+ return this.each(remove);
1881
+ }
1882
+
1883
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/clone.js
1884
+ function selection_cloneShallow() {
1885
+ var clone = this.cloneNode(false), parent = this.parentNode;
1886
+ return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
1887
+ }
1888
+ function selection_cloneDeep() {
1889
+ var clone = this.cloneNode(true), parent = this.parentNode;
1890
+ return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
1891
+ }
1892
+ function clone_default(deep) {
1893
+ return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
1894
+ }
1895
+
1896
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/datum.js
1897
+ function datum_default(value) {
1898
+ return arguments.length ? this.property("__data__", value) : this.node().__data__;
1899
+ }
1900
+
1901
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/on.js
1902
+ function contextListener(listener) {
1903
+ return function(event) {
1904
+ listener.call(this, event, this.__data__);
1905
+ };
1906
+ }
1907
+ function parseTypenames2(typenames) {
1908
+ return typenames.trim().split(/^|\s+/).map(function(t) {
1909
+ var name = "", i = t.indexOf(".");
1910
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
1911
+ return { type: t, name };
1912
+ });
1913
+ }
1914
+ function onRemove(typename) {
1915
+ return function() {
1916
+ var on = this.__on;
1917
+ if (!on) return;
1918
+ for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
1919
+ if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
1920
+ this.removeEventListener(o.type, o.listener, o.options);
1921
+ } else {
1922
+ on[++i] = o;
1923
+ }
1924
+ }
1925
+ if (++i) on.length = i;
1926
+ else delete this.__on;
1927
+ };
1928
+ }
1929
+ function onAdd(typename, value, options) {
1930
+ return function() {
1931
+ var on = this.__on, o, listener = contextListener(value);
1932
+ if (on) for (var j = 0, m = on.length; j < m; ++j) {
1933
+ if ((o = on[j]).type === typename.type && o.name === typename.name) {
1934
+ this.removeEventListener(o.type, o.listener, o.options);
1935
+ this.addEventListener(o.type, o.listener = listener, o.options = options);
1936
+ o.value = value;
1937
+ return;
1938
+ }
1939
+ }
1940
+ this.addEventListener(typename.type, listener, options);
1941
+ o = { type: typename.type, name: typename.name, value, listener, options };
1942
+ if (!on) this.__on = [o];
1943
+ else on.push(o);
1944
+ };
1945
+ }
1946
+ function on_default(typename, value, options) {
1947
+ var typenames = parseTypenames2(typename + ""), i, n = typenames.length, t;
1948
+ if (arguments.length < 2) {
1949
+ var on = this.node().__on;
1950
+ if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
1951
+ for (i = 0, o = on[j]; i < n; ++i) {
1952
+ if ((t = typenames[i]).type === o.type && t.name === o.name) {
1953
+ return o.value;
1954
+ }
1955
+ }
1956
+ }
1957
+ return;
1958
+ }
1959
+ on = value ? onAdd : onRemove;
1960
+ for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
1961
+ return this;
1962
+ }
1963
+
1964
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/dispatch.js
1965
+ function dispatchEvent(node, type2, params) {
1966
+ var window2 = window_default(node), event = window2.CustomEvent;
1967
+ if (typeof event === "function") {
1968
+ event = new event(type2, params);
1969
+ } else {
1970
+ event = window2.document.createEvent("Event");
1971
+ if (params) event.initEvent(type2, params.bubbles, params.cancelable), event.detail = params.detail;
1972
+ else event.initEvent(type2, false, false);
1973
+ }
1974
+ node.dispatchEvent(event);
1975
+ }
1976
+ function dispatchConstant(type2, params) {
1977
+ return function() {
1978
+ return dispatchEvent(this, type2, params);
1979
+ };
1980
+ }
1981
+ function dispatchFunction(type2, params) {
1982
+ return function() {
1983
+ return dispatchEvent(this, type2, params.apply(this, arguments));
1984
+ };
1985
+ }
1986
+ function dispatch_default2(type2, params) {
1987
+ return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type2, params));
1988
+ }
1989
+
1990
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/iterator.js
1991
+ function* iterator_default() {
1992
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
1993
+ for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
1994
+ if (node = group[i]) yield node;
1995
+ }
1996
+ }
1997
+ }
1998
+
1999
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js
2000
+ var root = [null];
2001
+ function Selection(groups, parents) {
2002
+ this._groups = groups;
2003
+ this._parents = parents;
2004
+ }
2005
+ function selection() {
2006
+ return new Selection([[document.documentElement]], root);
2007
+ }
2008
+ function selection_selection() {
2009
+ return this;
2010
+ }
2011
+ Selection.prototype = selection.prototype = {
2012
+ constructor: Selection,
2013
+ select: select_default,
2014
+ selectAll: selectAll_default,
2015
+ selectChild: selectChild_default,
2016
+ selectChildren: selectChildren_default,
2017
+ filter: filter_default,
2018
+ data: data_default,
2019
+ enter: enter_default,
2020
+ exit: exit_default,
2021
+ join: join_default,
2022
+ merge: merge_default,
2023
+ selection: selection_selection,
2024
+ order: order_default,
2025
+ sort: sort_default,
2026
+ call: call_default,
2027
+ nodes: nodes_default,
2028
+ node: node_default,
2029
+ size: size_default,
2030
+ empty: empty_default,
2031
+ each: each_default,
2032
+ attr: attr_default,
2033
+ style: style_default,
2034
+ property: property_default,
2035
+ classed: classed_default,
2036
+ text: text_default,
2037
+ html: html_default,
2038
+ raise: raise_default,
2039
+ lower: lower_default,
2040
+ append: append_default,
2041
+ insert: insert_default,
2042
+ remove: remove_default,
2043
+ clone: clone_default,
2044
+ datum: datum_default,
2045
+ on: on_default,
2046
+ dispatch: dispatch_default2,
2047
+ [Symbol.iterator]: iterator_default
2048
+ };
2049
+ var selection_default = selection;
2050
+
2051
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js
2052
+ function select_default2(selector) {
2053
+ return typeof selector === "string" ? new Selection([[document.querySelector(selector)]], [document.documentElement]) : new Selection([[selector]], root);
2054
+ }
2055
+
2056
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/sourceEvent.js
2057
+ function sourceEvent_default(event) {
2058
+ let sourceEvent;
2059
+ while (sourceEvent = event.sourceEvent) event = sourceEvent;
2060
+ return event;
2061
+ }
2062
+
2063
+ // node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/pointer.js
2064
+ function pointer_default(event, node) {
2065
+ event = sourceEvent_default(event);
2066
+ if (node === void 0) node = event.currentTarget;
2067
+ if (node) {
2068
+ var svg = node.ownerSVGElement || node;
2069
+ if (svg.createSVGPoint) {
2070
+ var point = svg.createSVGPoint();
2071
+ point.x = event.clientX, point.y = event.clientY;
2072
+ point = point.matrixTransform(node.getScreenCTM().inverse());
2073
+ return [point.x, point.y];
2074
+ }
2075
+ if (node.getBoundingClientRect) {
2076
+ var rect = node.getBoundingClientRect();
2077
+ return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
2078
+ }
2079
+ }
2080
+ return [event.pageX, event.pageY];
2081
+ }
2082
+
2083
+ // node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/noevent.js
2084
+ var nonpassivecapture = { capture: true, passive: false };
2085
+ function noevent_default(event) {
2086
+ event.preventDefault();
2087
+ event.stopImmediatePropagation();
2088
+ }
2089
+
2090
+ // node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/nodrag.js
2091
+ function nodrag_default(view) {
2092
+ var root2 = view.document.documentElement, selection2 = select_default2(view).on("dragstart.drag", noevent_default, nonpassivecapture);
2093
+ if ("onselectstart" in root2) {
2094
+ selection2.on("selectstart.drag", noevent_default, nonpassivecapture);
2095
+ } else {
2096
+ root2.__noselect = root2.style.MozUserSelect;
2097
+ root2.style.MozUserSelect = "none";
2098
+ }
2099
+ }
2100
+ function yesdrag(view, noclick) {
2101
+ var root2 = view.document.documentElement, selection2 = select_default2(view).on("dragstart.drag", null);
2102
+ if (noclick) {
2103
+ selection2.on("click.drag", noevent_default, nonpassivecapture);
2104
+ setTimeout(function() {
2105
+ selection2.on("click.drag", null);
2106
+ }, 0);
2107
+ }
2108
+ if ("onselectstart" in root2) {
2109
+ selection2.on("selectstart.drag", null);
2110
+ } else {
2111
+ root2.style.MozUserSelect = root2.__noselect;
2112
+ delete root2.__noselect;
2113
+ }
2114
+ }
2115
+
2116
+ // node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js
2117
+ function define_default(constructor, factory, prototype) {
2118
+ constructor.prototype = factory.prototype = prototype;
2119
+ prototype.constructor = constructor;
2120
+ }
2121
+ function extend(parent, definition) {
2122
+ var prototype = Object.create(parent.prototype);
2123
+ for (var key in definition) prototype[key] = definition[key];
2124
+ return prototype;
2125
+ }
2126
+
2127
+ // node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js
2128
+ function Color() {
2129
+ }
2130
+ var darker = 0.7;
2131
+ var brighter = 1 / darker;
2132
+ var reI = "\\s*([+-]?\\d+)\\s*";
2133
+ var reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*";
2134
+ var reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*";
2135
+ var reHex = /^#([0-9a-f]{3,8})$/;
2136
+ var reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`);
2137
+ var reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`);
2138
+ var reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`);
2139
+ var reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`);
2140
+ var reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`);
2141
+ var reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
2142
+ var named = {
2143
+ aliceblue: 15792383,
2144
+ antiquewhite: 16444375,
2145
+ aqua: 65535,
2146
+ aquamarine: 8388564,
2147
+ azure: 15794175,
2148
+ beige: 16119260,
2149
+ bisque: 16770244,
2150
+ black: 0,
2151
+ blanchedalmond: 16772045,
2152
+ blue: 255,
2153
+ blueviolet: 9055202,
2154
+ brown: 10824234,
2155
+ burlywood: 14596231,
2156
+ cadetblue: 6266528,
2157
+ chartreuse: 8388352,
2158
+ chocolate: 13789470,
2159
+ coral: 16744272,
2160
+ cornflowerblue: 6591981,
2161
+ cornsilk: 16775388,
2162
+ crimson: 14423100,
2163
+ cyan: 65535,
2164
+ darkblue: 139,
2165
+ darkcyan: 35723,
2166
+ darkgoldenrod: 12092939,
2167
+ darkgray: 11119017,
2168
+ darkgreen: 25600,
2169
+ darkgrey: 11119017,
2170
+ darkkhaki: 12433259,
2171
+ darkmagenta: 9109643,
2172
+ darkolivegreen: 5597999,
2173
+ darkorange: 16747520,
2174
+ darkorchid: 10040012,
2175
+ darkred: 9109504,
2176
+ darksalmon: 15308410,
2177
+ darkseagreen: 9419919,
2178
+ darkslateblue: 4734347,
2179
+ darkslategray: 3100495,
2180
+ darkslategrey: 3100495,
2181
+ darkturquoise: 52945,
2182
+ darkviolet: 9699539,
2183
+ deeppink: 16716947,
2184
+ deepskyblue: 49151,
2185
+ dimgray: 6908265,
2186
+ dimgrey: 6908265,
2187
+ dodgerblue: 2003199,
2188
+ firebrick: 11674146,
2189
+ floralwhite: 16775920,
2190
+ forestgreen: 2263842,
2191
+ fuchsia: 16711935,
2192
+ gainsboro: 14474460,
2193
+ ghostwhite: 16316671,
2194
+ gold: 16766720,
2195
+ goldenrod: 14329120,
2196
+ gray: 8421504,
2197
+ green: 32768,
2198
+ greenyellow: 11403055,
2199
+ grey: 8421504,
2200
+ honeydew: 15794160,
2201
+ hotpink: 16738740,
2202
+ indianred: 13458524,
2203
+ indigo: 4915330,
2204
+ ivory: 16777200,
2205
+ khaki: 15787660,
2206
+ lavender: 15132410,
2207
+ lavenderblush: 16773365,
2208
+ lawngreen: 8190976,
2209
+ lemonchiffon: 16775885,
2210
+ lightblue: 11393254,
2211
+ lightcoral: 15761536,
2212
+ lightcyan: 14745599,
2213
+ lightgoldenrodyellow: 16448210,
2214
+ lightgray: 13882323,
2215
+ lightgreen: 9498256,
2216
+ lightgrey: 13882323,
2217
+ lightpink: 16758465,
2218
+ lightsalmon: 16752762,
2219
+ lightseagreen: 2142890,
2220
+ lightskyblue: 8900346,
2221
+ lightslategray: 7833753,
2222
+ lightslategrey: 7833753,
2223
+ lightsteelblue: 11584734,
2224
+ lightyellow: 16777184,
2225
+ lime: 65280,
2226
+ limegreen: 3329330,
2227
+ linen: 16445670,
2228
+ magenta: 16711935,
2229
+ maroon: 8388608,
2230
+ mediumaquamarine: 6737322,
2231
+ mediumblue: 205,
2232
+ mediumorchid: 12211667,
2233
+ mediumpurple: 9662683,
2234
+ mediumseagreen: 3978097,
2235
+ mediumslateblue: 8087790,
2236
+ mediumspringgreen: 64154,
2237
+ mediumturquoise: 4772300,
2238
+ mediumvioletred: 13047173,
2239
+ midnightblue: 1644912,
2240
+ mintcream: 16121850,
2241
+ mistyrose: 16770273,
2242
+ moccasin: 16770229,
2243
+ navajowhite: 16768685,
2244
+ navy: 128,
2245
+ oldlace: 16643558,
2246
+ olive: 8421376,
2247
+ olivedrab: 7048739,
2248
+ orange: 16753920,
2249
+ orangered: 16729344,
2250
+ orchid: 14315734,
2251
+ palegoldenrod: 15657130,
2252
+ palegreen: 10025880,
2253
+ paleturquoise: 11529966,
2254
+ palevioletred: 14381203,
2255
+ papayawhip: 16773077,
2256
+ peachpuff: 16767673,
2257
+ peru: 13468991,
2258
+ pink: 16761035,
2259
+ plum: 14524637,
2260
+ powderblue: 11591910,
2261
+ purple: 8388736,
2262
+ rebeccapurple: 6697881,
2263
+ red: 16711680,
2264
+ rosybrown: 12357519,
2265
+ royalblue: 4286945,
2266
+ saddlebrown: 9127187,
2267
+ salmon: 16416882,
2268
+ sandybrown: 16032864,
2269
+ seagreen: 3050327,
2270
+ seashell: 16774638,
2271
+ sienna: 10506797,
2272
+ silver: 12632256,
2273
+ skyblue: 8900331,
2274
+ slateblue: 6970061,
2275
+ slategray: 7372944,
2276
+ slategrey: 7372944,
2277
+ snow: 16775930,
2278
+ springgreen: 65407,
2279
+ steelblue: 4620980,
2280
+ tan: 13808780,
2281
+ teal: 32896,
2282
+ thistle: 14204888,
2283
+ tomato: 16737095,
2284
+ turquoise: 4251856,
2285
+ violet: 15631086,
2286
+ wheat: 16113331,
2287
+ white: 16777215,
2288
+ whitesmoke: 16119285,
2289
+ yellow: 16776960,
2290
+ yellowgreen: 10145074
2291
+ };
2292
+ define_default(Color, color, {
2293
+ copy(channels) {
2294
+ return Object.assign(new this.constructor(), this, channels);
2295
+ },
2296
+ displayable() {
2297
+ return this.rgb().displayable();
2298
+ },
2299
+ hex: color_formatHex,
2300
+ // Deprecated! Use color.formatHex.
2301
+ formatHex: color_formatHex,
2302
+ formatHex8: color_formatHex8,
2303
+ formatHsl: color_formatHsl,
2304
+ formatRgb: color_formatRgb,
2305
+ toString: color_formatRgb
2306
+ });
2307
+ function color_formatHex() {
2308
+ return this.rgb().formatHex();
2309
+ }
2310
+ function color_formatHex8() {
2311
+ return this.rgb().formatHex8();
2312
+ }
2313
+ function color_formatHsl() {
2314
+ return hslConvert(this).formatHsl();
2315
+ }
2316
+ function color_formatRgb() {
2317
+ return this.rgb().formatRgb();
2318
+ }
2319
+ function color(format) {
2320
+ var m, l;
2321
+ format = (format + "").trim().toLowerCase();
2322
+ return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format) ? rgbn(named[format]) : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
2323
+ }
2324
+ function rgbn(n) {
2325
+ return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
2326
+ }
2327
+ function rgba(r, g, b, a) {
2328
+ if (a <= 0) r = g = b = NaN;
2329
+ return new Rgb(r, g, b, a);
2330
+ }
2331
+ function rgbConvert(o) {
2332
+ if (!(o instanceof Color)) o = color(o);
2333
+ if (!o) return new Rgb();
2334
+ o = o.rgb();
2335
+ return new Rgb(o.r, o.g, o.b, o.opacity);
2336
+ }
2337
+ function rgb(r, g, b, opacity) {
2338
+ return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
2339
+ }
2340
+ function Rgb(r, g, b, opacity) {
2341
+ this.r = +r;
2342
+ this.g = +g;
2343
+ this.b = +b;
2344
+ this.opacity = +opacity;
2345
+ }
2346
+ define_default(Rgb, rgb, extend(Color, {
2347
+ brighter(k) {
2348
+ k = k == null ? brighter : Math.pow(brighter, k);
2349
+ return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2350
+ },
2351
+ darker(k) {
2352
+ k = k == null ? darker : Math.pow(darker, k);
2353
+ return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2354
+ },
2355
+ rgb() {
2356
+ return this;
2357
+ },
2358
+ clamp() {
2359
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
2360
+ },
2361
+ displayable() {
2362
+ return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1);
2363
+ },
2364
+ hex: rgb_formatHex,
2365
+ // Deprecated! Use color.formatHex.
2366
+ formatHex: rgb_formatHex,
2367
+ formatHex8: rgb_formatHex8,
2368
+ formatRgb: rgb_formatRgb,
2369
+ toString: rgb_formatRgb
2370
+ }));
2371
+ function rgb_formatHex() {
2372
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
2373
+ }
2374
+ function rgb_formatHex8() {
2375
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
2376
+ }
2377
+ function rgb_formatRgb() {
2378
+ const a = clampa(this.opacity);
2379
+ return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
2380
+ }
2381
+ function clampa(opacity) {
2382
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
2383
+ }
2384
+ function clampi(value) {
2385
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
2386
+ }
2387
+ function hex(value) {
2388
+ value = clampi(value);
2389
+ return (value < 16 ? "0" : "") + value.toString(16);
2390
+ }
2391
+ function hsla(h, s, l, a) {
2392
+ if (a <= 0) h = s = l = NaN;
2393
+ else if (l <= 0 || l >= 1) h = s = NaN;
2394
+ else if (s <= 0) h = NaN;
2395
+ return new Hsl(h, s, l, a);
2396
+ }
2397
+ function hslConvert(o) {
2398
+ if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
2399
+ if (!(o instanceof Color)) o = color(o);
2400
+ if (!o) return new Hsl();
2401
+ if (o instanceof Hsl) return o;
2402
+ o = o.rgb();
2403
+ var r = o.r / 255, g = o.g / 255, b = o.b / 255, min2 = Math.min(r, g, b), max2 = Math.max(r, g, b), h = NaN, s = max2 - min2, l = (max2 + min2) / 2;
2404
+ if (s) {
2405
+ if (r === max2) h = (g - b) / s + (g < b) * 6;
2406
+ else if (g === max2) h = (b - r) / s + 2;
2407
+ else h = (r - g) / s + 4;
2408
+ s /= l < 0.5 ? max2 + min2 : 2 - max2 - min2;
2409
+ h *= 60;
2410
+ } else {
2411
+ s = l > 0 && l < 1 ? 0 : h;
2412
+ }
2413
+ return new Hsl(h, s, l, o.opacity);
2414
+ }
2415
+ function hsl(h, s, l, opacity) {
2416
+ return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
2417
+ }
2418
+ function Hsl(h, s, l, opacity) {
2419
+ this.h = +h;
2420
+ this.s = +s;
2421
+ this.l = +l;
2422
+ this.opacity = +opacity;
2423
+ }
2424
+ define_default(Hsl, hsl, extend(Color, {
2425
+ brighter(k) {
2426
+ k = k == null ? brighter : Math.pow(brighter, k);
2427
+ return new Hsl(this.h, this.s, this.l * k, this.opacity);
2428
+ },
2429
+ darker(k) {
2430
+ k = k == null ? darker : Math.pow(darker, k);
2431
+ return new Hsl(this.h, this.s, this.l * k, this.opacity);
2432
+ },
2433
+ rgb() {
2434
+ var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2;
2435
+ return new Rgb(
2436
+ hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
2437
+ hsl2rgb(h, m1, m2),
2438
+ hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
2439
+ this.opacity
2440
+ );
2441
+ },
2442
+ clamp() {
2443
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
2444
+ },
2445
+ displayable() {
2446
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1);
2447
+ },
2448
+ formatHsl() {
2449
+ const a = clampa(this.opacity);
2450
+ return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
2451
+ }
2452
+ }));
2453
+ function clamph(value) {
2454
+ value = (value || 0) % 360;
2455
+ return value < 0 ? value + 360 : value;
2456
+ }
2457
+ function clampt(value) {
2458
+ return Math.max(0, Math.min(1, value || 0));
2459
+ }
2460
+ function hsl2rgb(h, m1, m2) {
2461
+ return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
2462
+ }
2463
+
2464
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js
2465
+ var constant_default2 = (x2) => () => x2;
2466
+
2467
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js
2468
+ function linear(a, d) {
2469
+ return function(t) {
2470
+ return a + t * d;
2471
+ };
2472
+ }
2473
+ function exponential(a, b, y2) {
2474
+ return a = Math.pow(a, y2), b = Math.pow(b, y2) - a, y2 = 1 / y2, function(t) {
2475
+ return Math.pow(a + t * b, y2);
2476
+ };
2477
+ }
2478
+ function gamma(y2) {
2479
+ return (y2 = +y2) === 1 ? nogamma : function(a, b) {
2480
+ return b - a ? exponential(a, b, y2) : constant_default2(isNaN(a) ? b : a);
2481
+ };
2482
+ }
2483
+ function nogamma(a, b) {
2484
+ var d = b - a;
2485
+ return d ? linear(a, d) : constant_default2(isNaN(a) ? b : a);
2486
+ }
2487
+
2488
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js
2489
+ var rgb_default = function rgbGamma(y2) {
2490
+ var color2 = gamma(y2);
2491
+ function rgb2(start2, end) {
2492
+ var r = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b = color2(start2.b, end.b), opacity = nogamma(start2.opacity, end.opacity);
2493
+ return function(t) {
2494
+ start2.r = r(t);
2495
+ start2.g = g(t);
2496
+ start2.b = b(t);
2497
+ start2.opacity = opacity(t);
2498
+ return start2 + "";
2499
+ };
2500
+ }
2501
+ rgb2.gamma = rgbGamma;
2502
+ return rgb2;
2503
+ }(1);
2504
+
2505
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js
2506
+ function number_default(a, b) {
2507
+ return a = +a, b = +b, function(t) {
2508
+ return a * (1 - t) + b * t;
2509
+ };
2510
+ }
2511
+
2512
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js
2513
+ var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
2514
+ var reB = new RegExp(reA.source, "g");
2515
+ function zero(b) {
2516
+ return function() {
2517
+ return b;
2518
+ };
2519
+ }
2520
+ function one(b) {
2521
+ return function(t) {
2522
+ return b(t) + "";
2523
+ };
2524
+ }
2525
+ function string_default(a, b) {
2526
+ var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];
2527
+ a = a + "", b = b + "";
2528
+ while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
2529
+ if ((bs = bm.index) > bi) {
2530
+ bs = b.slice(bi, bs);
2531
+ if (s[i]) s[i] += bs;
2532
+ else s[++i] = bs;
2533
+ }
2534
+ if ((am = am[0]) === (bm = bm[0])) {
2535
+ if (s[i]) s[i] += bm;
2536
+ else s[++i] = bm;
2537
+ } else {
2538
+ s[++i] = null;
2539
+ q.push({ i, x: number_default(am, bm) });
2540
+ }
2541
+ bi = reB.lastIndex;
2542
+ }
2543
+ if (bi < b.length) {
2544
+ bs = b.slice(bi);
2545
+ if (s[i]) s[i] += bs;
2546
+ else s[++i] = bs;
2547
+ }
2548
+ return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) {
2549
+ for (var i2 = 0, o; i2 < b; ++i2) s[(o = q[i2]).i] = o.x(t);
2550
+ return s.join("");
2551
+ });
2552
+ }
2553
+
2554
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js
2555
+ var degrees = 180 / Math.PI;
2556
+ var identity = {
2557
+ translateX: 0,
2558
+ translateY: 0,
2559
+ rotate: 0,
2560
+ skewX: 0,
2561
+ scaleX: 1,
2562
+ scaleY: 1
2563
+ };
2564
+ function decompose_default(a, b, c, d, e, f) {
2565
+ var scaleX, scaleY, skewX;
2566
+ if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
2567
+ if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
2568
+ if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
2569
+ if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
2570
+ return {
2571
+ translateX: e,
2572
+ translateY: f,
2573
+ rotate: Math.atan2(b, a) * degrees,
2574
+ skewX: Math.atan(skewX) * degrees,
2575
+ scaleX,
2576
+ scaleY
2577
+ };
2578
+ }
2579
+
2580
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js
2581
+ var svgNode;
2582
+ function parseCss(value) {
2583
+ const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
2584
+ return m.isIdentity ? identity : decompose_default(m.a, m.b, m.c, m.d, m.e, m.f);
2585
+ }
2586
+ function parseSvg(value) {
2587
+ if (value == null) return identity;
2588
+ if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
2589
+ svgNode.setAttribute("transform", value);
2590
+ if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
2591
+ value = value.matrix;
2592
+ return decompose_default(value.a, value.b, value.c, value.d, value.e, value.f);
2593
+ }
2594
+
2595
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js
2596
+ function interpolateTransform(parse, pxComma, pxParen, degParen) {
2597
+ function pop(s) {
2598
+ return s.length ? s.pop() + " " : "";
2599
+ }
2600
+ function translate(xa, ya, xb, yb, s, q) {
2601
+ if (xa !== xb || ya !== yb) {
2602
+ var i = s.push("translate(", null, pxComma, null, pxParen);
2603
+ q.push({ i: i - 4, x: number_default(xa, xb) }, { i: i - 2, x: number_default(ya, yb) });
2604
+ } else if (xb || yb) {
2605
+ s.push("translate(" + xb + pxComma + yb + pxParen);
2606
+ }
2607
+ }
2608
+ function rotate(a, b, s, q) {
2609
+ if (a !== b) {
2610
+ if (a - b > 180) b += 360;
2611
+ else if (b - a > 180) a += 360;
2612
+ q.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number_default(a, b) });
2613
+ } else if (b) {
2614
+ s.push(pop(s) + "rotate(" + b + degParen);
2615
+ }
2616
+ }
2617
+ function skewX(a, b, s, q) {
2618
+ if (a !== b) {
2619
+ q.push({ i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number_default(a, b) });
2620
+ } else if (b) {
2621
+ s.push(pop(s) + "skewX(" + b + degParen);
2622
+ }
2623
+ }
2624
+ function scale(xa, ya, xb, yb, s, q) {
2625
+ if (xa !== xb || ya !== yb) {
2626
+ var i = s.push(pop(s) + "scale(", null, ",", null, ")");
2627
+ q.push({ i: i - 4, x: number_default(xa, xb) }, { i: i - 2, x: number_default(ya, yb) });
2628
+ } else if (xb !== 1 || yb !== 1) {
2629
+ s.push(pop(s) + "scale(" + xb + "," + yb + ")");
2630
+ }
2631
+ }
2632
+ return function(a, b) {
2633
+ var s = [], q = [];
2634
+ a = parse(a), b = parse(b);
2635
+ translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
2636
+ rotate(a.rotate, b.rotate, s, q);
2637
+ skewX(a.skewX, b.skewX, s, q);
2638
+ scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
2639
+ a = b = null;
2640
+ return function(t) {
2641
+ var i = -1, n = q.length, o;
2642
+ while (++i < n) s[(o = q[i]).i] = o.x(t);
2643
+ return s.join("");
2644
+ };
2645
+ };
2646
+ }
2647
+ var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
2648
+ var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
2649
+
2650
+ // node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/zoom.js
2651
+ var epsilon2 = 1e-12;
2652
+ function cosh(x2) {
2653
+ return ((x2 = Math.exp(x2)) + 1 / x2) / 2;
2654
+ }
2655
+ function sinh(x2) {
2656
+ return ((x2 = Math.exp(x2)) - 1 / x2) / 2;
2657
+ }
2658
+ function tanh(x2) {
2659
+ return ((x2 = Math.exp(2 * x2)) - 1) / (x2 + 1);
2660
+ }
2661
+ var zoom_default = function zoomRho(rho, rho2, rho4) {
2662
+ function zoom(p0, p1) {
2663
+ var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;
2664
+ if (d2 < epsilon2) {
2665
+ S = Math.log(w1 / w0) / rho;
2666
+ i = function(t) {
2667
+ return [
2668
+ ux0 + t * dx,
2669
+ uy0 + t * dy,
2670
+ w0 * Math.exp(rho * t * S)
2671
+ ];
2672
+ };
2673
+ } else {
2674
+ var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
2675
+ S = (r1 - r0) / rho;
2676
+ i = function(t) {
2677
+ var s = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
2678
+ return [
2679
+ ux0 + u * dx,
2680
+ uy0 + u * dy,
2681
+ w0 * coshr0 / cosh(rho * s + r0)
2682
+ ];
2683
+ };
2684
+ }
2685
+ i.duration = S * 1e3 * rho / Math.SQRT2;
2686
+ return i;
2687
+ }
2688
+ zoom.rho = function(_) {
2689
+ var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
2690
+ return zoomRho(_1, _2, _4);
2691
+ };
2692
+ return zoom;
2693
+ }(Math.SQRT2, 2, 4);
2694
+
2695
+ // node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js
2696
+ var frame = 0;
2697
+ var timeout = 0;
2698
+ var interval = 0;
2699
+ var pokeDelay = 1e3;
2700
+ var taskHead;
2701
+ var taskTail;
2702
+ var clockLast = 0;
2703
+ var clockNow = 0;
2704
+ var clockSkew = 0;
2705
+ var clock = typeof performance === "object" && performance.now ? performance : Date;
2706
+ var setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) {
2707
+ setTimeout(f, 17);
2708
+ };
2709
+ function now() {
2710
+ return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
2711
+ }
2712
+ function clearNow() {
2713
+ clockNow = 0;
2714
+ }
2715
+ function Timer() {
2716
+ this._call = this._time = this._next = null;
2717
+ }
2718
+ Timer.prototype = timer.prototype = {
2719
+ constructor: Timer,
2720
+ restart: function(callback, delay, time) {
2721
+ if (typeof callback !== "function") throw new TypeError("callback is not a function");
2722
+ time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
2723
+ if (!this._next && taskTail !== this) {
2724
+ if (taskTail) taskTail._next = this;
2725
+ else taskHead = this;
2726
+ taskTail = this;
2727
+ }
2728
+ this._call = callback;
2729
+ this._time = time;
2730
+ sleep();
2731
+ },
2732
+ stop: function() {
2733
+ if (this._call) {
2734
+ this._call = null;
2735
+ this._time = Infinity;
2736
+ sleep();
2737
+ }
2738
+ }
2739
+ };
2740
+ function timer(callback, delay, time) {
2741
+ var t = new Timer();
2742
+ t.restart(callback, delay, time);
2743
+ return t;
2744
+ }
2745
+ function timerFlush() {
2746
+ now();
2747
+ ++frame;
2748
+ var t = taskHead, e;
2749
+ while (t) {
2750
+ if ((e = clockNow - t._time) >= 0) t._call.call(void 0, e);
2751
+ t = t._next;
2752
+ }
2753
+ --frame;
2754
+ }
2755
+ function wake() {
2756
+ clockNow = (clockLast = clock.now()) + clockSkew;
2757
+ frame = timeout = 0;
2758
+ try {
2759
+ timerFlush();
2760
+ } finally {
2761
+ frame = 0;
2762
+ nap();
2763
+ clockNow = 0;
2764
+ }
2765
+ }
2766
+ function poke() {
2767
+ var now2 = clock.now(), delay = now2 - clockLast;
2768
+ if (delay > pokeDelay) clockSkew -= delay, clockLast = now2;
2769
+ }
2770
+ function nap() {
2771
+ var t0, t1 = taskHead, t2, time = Infinity;
2772
+ while (t1) {
2773
+ if (t1._call) {
2774
+ if (time > t1._time) time = t1._time;
2775
+ t0 = t1, t1 = t1._next;
2776
+ } else {
2777
+ t2 = t1._next, t1._next = null;
2778
+ t1 = t0 ? t0._next = t2 : taskHead = t2;
2779
+ }
2780
+ }
2781
+ taskTail = t0;
2782
+ sleep(time);
2783
+ }
2784
+ function sleep(time) {
2785
+ if (frame) return;
2786
+ if (timeout) timeout = clearTimeout(timeout);
2787
+ var delay = time - clockNow;
2788
+ if (delay > 24) {
2789
+ if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
2790
+ if (interval) interval = clearInterval(interval);
2791
+ } else {
2792
+ if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
2793
+ frame = 1, setFrame(wake);
2794
+ }
2795
+ }
2796
+
2797
+ // node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js
2798
+ function timeout_default(callback, delay, time) {
2799
+ var t = new Timer();
2800
+ delay = delay == null ? 0 : +delay;
2801
+ t.restart((elapsed) => {
2802
+ t.stop();
2803
+ callback(elapsed + delay);
2804
+ }, delay, time);
2805
+ return t;
2806
+ }
2807
+
2808
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js
2809
+ var emptyOn = dispatch_default("start", "end", "cancel", "interrupt");
2810
+ var emptyTween = [];
2811
+ var CREATED = 0;
2812
+ var SCHEDULED = 1;
2813
+ var STARTING = 2;
2814
+ var STARTED = 3;
2815
+ var RUNNING = 4;
2816
+ var ENDING = 5;
2817
+ var ENDED = 6;
2818
+ function schedule_default(node, name, id2, index, group, timing) {
2819
+ var schedules = node.__transition;
2820
+ if (!schedules) node.__transition = {};
2821
+ else if (id2 in schedules) return;
2822
+ create(node, id2, {
2823
+ name,
2824
+ index,
2825
+ // For context during callback.
2826
+ group,
2827
+ // For context during callback.
2828
+ on: emptyOn,
2829
+ tween: emptyTween,
2830
+ time: timing.time,
2831
+ delay: timing.delay,
2832
+ duration: timing.duration,
2833
+ ease: timing.ease,
2834
+ timer: null,
2835
+ state: CREATED
2836
+ });
2837
+ }
2838
+ function init(node, id2) {
2839
+ var schedule = get2(node, id2);
2840
+ if (schedule.state > CREATED) throw new Error("too late; already scheduled");
2841
+ return schedule;
2842
+ }
2843
+ function set2(node, id2) {
2844
+ var schedule = get2(node, id2);
2845
+ if (schedule.state > STARTED) throw new Error("too late; already running");
2846
+ return schedule;
2847
+ }
2848
+ function get2(node, id2) {
2849
+ var schedule = node.__transition;
2850
+ if (!schedule || !(schedule = schedule[id2])) throw new Error("transition not found");
2851
+ return schedule;
2852
+ }
2853
+ function create(node, id2, self) {
2854
+ var schedules = node.__transition, tween;
2855
+ schedules[id2] = self;
2856
+ self.timer = timer(schedule, 0, self.time);
2857
+ function schedule(elapsed) {
2858
+ self.state = SCHEDULED;
2859
+ self.timer.restart(start2, self.delay, self.time);
2860
+ if (self.delay <= elapsed) start2(elapsed - self.delay);
2861
+ }
2862
+ function start2(elapsed) {
2863
+ var i, j, n, o;
2864
+ if (self.state !== SCHEDULED) return stop();
2865
+ for (i in schedules) {
2866
+ o = schedules[i];
2867
+ if (o.name !== self.name) continue;
2868
+ if (o.state === STARTED) return timeout_default(start2);
2869
+ if (o.state === RUNNING) {
2870
+ o.state = ENDED;
2871
+ o.timer.stop();
2872
+ o.on.call("interrupt", node, node.__data__, o.index, o.group);
2873
+ delete schedules[i];
2874
+ } else if (+i < id2) {
2875
+ o.state = ENDED;
2876
+ o.timer.stop();
2877
+ o.on.call("cancel", node, node.__data__, o.index, o.group);
2878
+ delete schedules[i];
2879
+ }
2880
+ }
2881
+ timeout_default(function() {
2882
+ if (self.state === STARTED) {
2883
+ self.state = RUNNING;
2884
+ self.timer.restart(tick, self.delay, self.time);
2885
+ tick(elapsed);
2886
+ }
2887
+ });
2888
+ self.state = STARTING;
2889
+ self.on.call("start", node, node.__data__, self.index, self.group);
2890
+ if (self.state !== STARTING) return;
2891
+ self.state = STARTED;
2892
+ tween = new Array(n = self.tween.length);
2893
+ for (i = 0, j = -1; i < n; ++i) {
2894
+ if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
2895
+ tween[++j] = o;
2896
+ }
2897
+ }
2898
+ tween.length = j + 1;
2899
+ }
2900
+ function tick(elapsed) {
2901
+ var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1, n = tween.length;
2902
+ while (++i < n) {
2903
+ tween[i].call(node, t);
2904
+ }
2905
+ if (self.state === ENDING) {
2906
+ self.on.call("end", node, node.__data__, self.index, self.group);
2907
+ stop();
2908
+ }
2909
+ }
2910
+ function stop() {
2911
+ self.state = ENDED;
2912
+ self.timer.stop();
2913
+ delete schedules[id2];
2914
+ for (var i in schedules) return;
2915
+ delete node.__transition;
2916
+ }
2917
+ }
2918
+
2919
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js
2920
+ function interrupt_default(node, name) {
2921
+ var schedules = node.__transition, schedule, active, empty2 = true, i;
2922
+ if (!schedules) return;
2923
+ name = name == null ? null : name + "";
2924
+ for (i in schedules) {
2925
+ if ((schedule = schedules[i]).name !== name) {
2926
+ empty2 = false;
2927
+ continue;
2928
+ }
2929
+ active = schedule.state > STARTING && schedule.state < ENDING;
2930
+ schedule.state = ENDED;
2931
+ schedule.timer.stop();
2932
+ schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
2933
+ delete schedules[i];
2934
+ }
2935
+ if (empty2) delete node.__transition;
2936
+ }
2937
+
2938
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js
2939
+ function interrupt_default2(name) {
2940
+ return this.each(function() {
2941
+ interrupt_default(this, name);
2942
+ });
2943
+ }
2944
+
2945
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js
2946
+ function tweenRemove(id2, name) {
2947
+ var tween0, tween1;
2948
+ return function() {
2949
+ var schedule = set2(this, id2), tween = schedule.tween;
2950
+ if (tween !== tween0) {
2951
+ tween1 = tween0 = tween;
2952
+ for (var i = 0, n = tween1.length; i < n; ++i) {
2953
+ if (tween1[i].name === name) {
2954
+ tween1 = tween1.slice();
2955
+ tween1.splice(i, 1);
2956
+ break;
2957
+ }
2958
+ }
2959
+ }
2960
+ schedule.tween = tween1;
2961
+ };
2962
+ }
2963
+ function tweenFunction(id2, name, value) {
2964
+ var tween0, tween1;
2965
+ if (typeof value !== "function") throw new Error();
2966
+ return function() {
2967
+ var schedule = set2(this, id2), tween = schedule.tween;
2968
+ if (tween !== tween0) {
2969
+ tween1 = (tween0 = tween).slice();
2970
+ for (var t = { name, value }, i = 0, n = tween1.length; i < n; ++i) {
2971
+ if (tween1[i].name === name) {
2972
+ tween1[i] = t;
2973
+ break;
2974
+ }
2975
+ }
2976
+ if (i === n) tween1.push(t);
2977
+ }
2978
+ schedule.tween = tween1;
2979
+ };
2980
+ }
2981
+ function tween_default(name, value) {
2982
+ var id2 = this._id;
2983
+ name += "";
2984
+ if (arguments.length < 2) {
2985
+ var tween = get2(this.node(), id2).tween;
2986
+ for (var i = 0, n = tween.length, t; i < n; ++i) {
2987
+ if ((t = tween[i]).name === name) {
2988
+ return t.value;
2989
+ }
2990
+ }
2991
+ return null;
2992
+ }
2993
+ return this.each((value == null ? tweenRemove : tweenFunction)(id2, name, value));
2994
+ }
2995
+ function tweenValue(transition2, name, value) {
2996
+ var id2 = transition2._id;
2997
+ transition2.each(function() {
2998
+ var schedule = set2(this, id2);
2999
+ (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
3000
+ });
3001
+ return function(node) {
3002
+ return get2(node, id2).value[name];
3003
+ };
3004
+ }
3005
+
3006
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js
3007
+ function interpolate_default(a, b) {
3008
+ var c;
3009
+ return (typeof b === "number" ? number_default : b instanceof color ? rgb_default : (c = color(b)) ? (b = c, rgb_default) : string_default)(a, b);
3010
+ }
3011
+
3012
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js
3013
+ function attrRemove2(name) {
3014
+ return function() {
3015
+ this.removeAttribute(name);
3016
+ };
3017
+ }
3018
+ function attrRemoveNS2(fullname) {
3019
+ return function() {
3020
+ this.removeAttributeNS(fullname.space, fullname.local);
3021
+ };
3022
+ }
3023
+ function attrConstant2(name, interpolate, value1) {
3024
+ var string00, string1 = value1 + "", interpolate0;
3025
+ return function() {
3026
+ var string0 = this.getAttribute(name);
3027
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
3028
+ };
3029
+ }
3030
+ function attrConstantNS2(fullname, interpolate, value1) {
3031
+ var string00, string1 = value1 + "", interpolate0;
3032
+ return function() {
3033
+ var string0 = this.getAttributeNS(fullname.space, fullname.local);
3034
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
3035
+ };
3036
+ }
3037
+ function attrFunction2(name, interpolate, value) {
3038
+ var string00, string10, interpolate0;
3039
+ return function() {
3040
+ var string0, value1 = value(this), string1;
3041
+ if (value1 == null) return void this.removeAttribute(name);
3042
+ string0 = this.getAttribute(name);
3043
+ string1 = value1 + "";
3044
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
3045
+ };
3046
+ }
3047
+ function attrFunctionNS2(fullname, interpolate, value) {
3048
+ var string00, string10, interpolate0;
3049
+ return function() {
3050
+ var string0, value1 = value(this), string1;
3051
+ if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
3052
+ string0 = this.getAttributeNS(fullname.space, fullname.local);
3053
+ string1 = value1 + "";
3054
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
3055
+ };
3056
+ }
3057
+ function attr_default2(name, value) {
3058
+ var fullname = namespace_default(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate_default;
3059
+ return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS2 : attrFunction2)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS2 : attrRemove2)(fullname) : (fullname.local ? attrConstantNS2 : attrConstant2)(fullname, i, value));
3060
+ }
3061
+
3062
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js
3063
+ function attrInterpolate(name, i) {
3064
+ return function(t) {
3065
+ this.setAttribute(name, i.call(this, t));
3066
+ };
3067
+ }
3068
+ function attrInterpolateNS(fullname, i) {
3069
+ return function(t) {
3070
+ this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
3071
+ };
3072
+ }
3073
+ function attrTweenNS(fullname, value) {
3074
+ var t0, i0;
3075
+ function tween() {
3076
+ var i = value.apply(this, arguments);
3077
+ if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
3078
+ return t0;
3079
+ }
3080
+ tween._value = value;
3081
+ return tween;
3082
+ }
3083
+ function attrTween(name, value) {
3084
+ var t0, i0;
3085
+ function tween() {
3086
+ var i = value.apply(this, arguments);
3087
+ if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
3088
+ return t0;
3089
+ }
3090
+ tween._value = value;
3091
+ return tween;
3092
+ }
3093
+ function attrTween_default(name, value) {
3094
+ var key = "attr." + name;
3095
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
3096
+ if (value == null) return this.tween(key, null);
3097
+ if (typeof value !== "function") throw new Error();
3098
+ var fullname = namespace_default(name);
3099
+ return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
3100
+ }
3101
+
3102
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js
3103
+ function delayFunction(id2, value) {
3104
+ return function() {
3105
+ init(this, id2).delay = +value.apply(this, arguments);
3106
+ };
3107
+ }
3108
+ function delayConstant(id2, value) {
3109
+ return value = +value, function() {
3110
+ init(this, id2).delay = value;
3111
+ };
3112
+ }
3113
+ function delay_default(value) {
3114
+ var id2 = this._id;
3115
+ return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id2, value)) : get2(this.node(), id2).delay;
3116
+ }
3117
+
3118
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js
3119
+ function durationFunction(id2, value) {
3120
+ return function() {
3121
+ set2(this, id2).duration = +value.apply(this, arguments);
3122
+ };
3123
+ }
3124
+ function durationConstant(id2, value) {
3125
+ return value = +value, function() {
3126
+ set2(this, id2).duration = value;
3127
+ };
3128
+ }
3129
+ function duration_default(value) {
3130
+ var id2 = this._id;
3131
+ return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id2, value)) : get2(this.node(), id2).duration;
3132
+ }
3133
+
3134
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js
3135
+ function easeConstant(id2, value) {
3136
+ if (typeof value !== "function") throw new Error();
3137
+ return function() {
3138
+ set2(this, id2).ease = value;
3139
+ };
3140
+ }
3141
+ function ease_default(value) {
3142
+ var id2 = this._id;
3143
+ return arguments.length ? this.each(easeConstant(id2, value)) : get2(this.node(), id2).ease;
3144
+ }
3145
+
3146
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js
3147
+ function easeVarying(id2, value) {
3148
+ return function() {
3149
+ var v = value.apply(this, arguments);
3150
+ if (typeof v !== "function") throw new Error();
3151
+ set2(this, id2).ease = v;
3152
+ };
3153
+ }
3154
+ function easeVarying_default(value) {
3155
+ if (typeof value !== "function") throw new Error();
3156
+ return this.each(easeVarying(this._id, value));
3157
+ }
3158
+
3159
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js
3160
+ function filter_default2(match) {
3161
+ if (typeof match !== "function") match = matcher_default(match);
3162
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
3163
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
3164
+ if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
3165
+ subgroup.push(node);
3166
+ }
3167
+ }
3168
+ }
3169
+ return new Transition(subgroups, this._parents, this._name, this._id);
3170
+ }
3171
+
3172
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js
3173
+ function merge_default2(transition2) {
3174
+ if (transition2._id !== this._id) throw new Error();
3175
+ for (var groups0 = this._groups, groups1 = transition2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
3176
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
3177
+ if (node = group0[i] || group1[i]) {
3178
+ merge[i] = node;
3179
+ }
3180
+ }
3181
+ }
3182
+ for (; j < m0; ++j) {
3183
+ merges[j] = groups0[j];
3184
+ }
3185
+ return new Transition(merges, this._parents, this._name, this._id);
3186
+ }
3187
+
3188
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js
3189
+ function start(name) {
3190
+ return (name + "").trim().split(/^|\s+/).every(function(t) {
3191
+ var i = t.indexOf(".");
3192
+ if (i >= 0) t = t.slice(0, i);
3193
+ return !t || t === "start";
3194
+ });
3195
+ }
3196
+ function onFunction(id2, name, listener) {
3197
+ var on0, on1, sit = start(name) ? init : set2;
3198
+ return function() {
3199
+ var schedule = sit(this, id2), on = schedule.on;
3200
+ if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
3201
+ schedule.on = on1;
3202
+ };
3203
+ }
3204
+ function on_default2(name, listener) {
3205
+ var id2 = this._id;
3206
+ return arguments.length < 2 ? get2(this.node(), id2).on.on(name) : this.each(onFunction(id2, name, listener));
3207
+ }
3208
+
3209
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js
3210
+ function removeFunction(id2) {
3211
+ return function() {
3212
+ var parent = this.parentNode;
3213
+ for (var i in this.__transition) if (+i !== id2) return;
3214
+ if (parent) parent.removeChild(this);
3215
+ };
3216
+ }
3217
+ function remove_default2() {
3218
+ return this.on("end.remove", removeFunction(this._id));
3219
+ }
3220
+
3221
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js
3222
+ function select_default3(select) {
3223
+ var name = this._name, id2 = this._id;
3224
+ if (typeof select !== "function") select = selector_default(select);
3225
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
3226
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
3227
+ if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
3228
+ if ("__data__" in node) subnode.__data__ = node.__data__;
3229
+ subgroup[i] = subnode;
3230
+ schedule_default(subgroup[i], name, id2, i, subgroup, get2(node, id2));
3231
+ }
3232
+ }
3233
+ }
3234
+ return new Transition(subgroups, this._parents, name, id2);
3235
+ }
3236
+
3237
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js
3238
+ function selectAll_default2(select) {
3239
+ var name = this._name, id2 = this._id;
3240
+ if (typeof select !== "function") select = selectorAll_default(select);
3241
+ for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
3242
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3243
+ if (node = group[i]) {
3244
+ for (var children2 = select.call(node, node.__data__, i, group), child, inherit2 = get2(node, id2), k = 0, l = children2.length; k < l; ++k) {
3245
+ if (child = children2[k]) {
3246
+ schedule_default(child, name, id2, k, children2, inherit2);
3247
+ }
3248
+ }
3249
+ subgroups.push(children2);
3250
+ parents.push(node);
3251
+ }
3252
+ }
3253
+ }
3254
+ return new Transition(subgroups, parents, name, id2);
3255
+ }
3256
+
3257
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js
3258
+ var Selection2 = selection_default.prototype.constructor;
3259
+ function selection_default2() {
3260
+ return new Selection2(this._groups, this._parents);
3261
+ }
3262
+
3263
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js
3264
+ function styleNull(name, interpolate) {
3265
+ var string00, string10, interpolate0;
3266
+ return function() {
3267
+ var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name));
3268
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
3269
+ };
3270
+ }
3271
+ function styleRemove2(name) {
3272
+ return function() {
3273
+ this.style.removeProperty(name);
3274
+ };
3275
+ }
3276
+ function styleConstant2(name, interpolate, value1) {
3277
+ var string00, string1 = value1 + "", interpolate0;
3278
+ return function() {
3279
+ var string0 = styleValue(this, name);
3280
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
3281
+ };
3282
+ }
3283
+ function styleFunction2(name, interpolate, value) {
3284
+ var string00, string10, interpolate0;
3285
+ return function() {
3286
+ var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + "";
3287
+ if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
3288
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
3289
+ };
3290
+ }
3291
+ function styleMaybeRemove(id2, name) {
3292
+ var on0, on1, listener0, key = "style." + name, event = "end." + key, remove2;
3293
+ return function() {
3294
+ var schedule = set2(this, id2), on = schedule.on, listener = schedule.value[key] == null ? remove2 || (remove2 = styleRemove2(name)) : void 0;
3295
+ if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
3296
+ schedule.on = on1;
3297
+ };
3298
+ }
3299
+ function style_default2(name, value, priority) {
3300
+ var i = (name += "") === "transform" ? interpolateTransformCss : interpolate_default;
3301
+ return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove2(name)) : typeof value === "function" ? this.styleTween(name, styleFunction2(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant2(name, i, value), priority).on("end.style." + name, null);
3302
+ }
3303
+
3304
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js
3305
+ function styleInterpolate(name, i, priority) {
3306
+ return function(t) {
3307
+ this.style.setProperty(name, i.call(this, t), priority);
3308
+ };
3309
+ }
3310
+ function styleTween(name, value, priority) {
3311
+ var t, i0;
3312
+ function tween() {
3313
+ var i = value.apply(this, arguments);
3314
+ if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
3315
+ return t;
3316
+ }
3317
+ tween._value = value;
3318
+ return tween;
3319
+ }
3320
+ function styleTween_default(name, value, priority) {
3321
+ var key = "style." + (name += "");
3322
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
3323
+ if (value == null) return this.tween(key, null);
3324
+ if (typeof value !== "function") throw new Error();
3325
+ return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
3326
+ }
3327
+
3328
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js
3329
+ function textConstant2(value) {
3330
+ return function() {
3331
+ this.textContent = value;
3332
+ };
3333
+ }
3334
+ function textFunction2(value) {
3335
+ return function() {
3336
+ var value1 = value(this);
3337
+ this.textContent = value1 == null ? "" : value1;
3338
+ };
3339
+ }
3340
+ function text_default2(value) {
3341
+ return this.tween("text", typeof value === "function" ? textFunction2(tweenValue(this, "text", value)) : textConstant2(value == null ? "" : value + ""));
3342
+ }
3343
+
3344
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js
3345
+ function textInterpolate(i) {
3346
+ return function(t) {
3347
+ this.textContent = i.call(this, t);
3348
+ };
3349
+ }
3350
+ function textTween(value) {
3351
+ var t0, i0;
3352
+ function tween() {
3353
+ var i = value.apply(this, arguments);
3354
+ if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
3355
+ return t0;
3356
+ }
3357
+ tween._value = value;
3358
+ return tween;
3359
+ }
3360
+ function textTween_default(value) {
3361
+ var key = "text";
3362
+ if (arguments.length < 1) return (key = this.tween(key)) && key._value;
3363
+ if (value == null) return this.tween(key, null);
3364
+ if (typeof value !== "function") throw new Error();
3365
+ return this.tween(key, textTween(value));
3366
+ }
3367
+
3368
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js
3369
+ function transition_default() {
3370
+ var name = this._name, id0 = this._id, id1 = newId();
3371
+ for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
3372
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3373
+ if (node = group[i]) {
3374
+ var inherit2 = get2(node, id0);
3375
+ schedule_default(node, name, id1, i, group, {
3376
+ time: inherit2.time + inherit2.delay + inherit2.duration,
3377
+ delay: 0,
3378
+ duration: inherit2.duration,
3379
+ ease: inherit2.ease
3380
+ });
3381
+ }
3382
+ }
3383
+ }
3384
+ return new Transition(groups, this._parents, name, id1);
3385
+ }
3386
+
3387
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js
3388
+ function end_default() {
3389
+ var on0, on1, that = this, id2 = that._id, size = that.size();
3390
+ return new Promise(function(resolve, reject) {
3391
+ var cancel = { value: reject }, end = { value: function() {
3392
+ if (--size === 0) resolve();
3393
+ } };
3394
+ that.each(function() {
3395
+ var schedule = set2(this, id2), on = schedule.on;
3396
+ if (on !== on0) {
3397
+ on1 = (on0 = on).copy();
3398
+ on1._.cancel.push(cancel);
3399
+ on1._.interrupt.push(cancel);
3400
+ on1._.end.push(end);
3401
+ }
3402
+ schedule.on = on1;
3403
+ });
3404
+ if (size === 0) resolve();
3405
+ });
3406
+ }
3407
+
3408
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js
3409
+ var id = 0;
3410
+ function Transition(groups, parents, name, id2) {
3411
+ this._groups = groups;
3412
+ this._parents = parents;
3413
+ this._name = name;
3414
+ this._id = id2;
3415
+ }
3416
+ function newId() {
3417
+ return ++id;
3418
+ }
3419
+ var selection_prototype = selection_default.prototype;
3420
+ Transition.prototype = {
3421
+ constructor: Transition,
3422
+ select: select_default3,
3423
+ selectAll: selectAll_default2,
3424
+ selectChild: selection_prototype.selectChild,
3425
+ selectChildren: selection_prototype.selectChildren,
3426
+ filter: filter_default2,
3427
+ merge: merge_default2,
3428
+ selection: selection_default2,
3429
+ transition: transition_default,
3430
+ call: selection_prototype.call,
3431
+ nodes: selection_prototype.nodes,
3432
+ node: selection_prototype.node,
3433
+ size: selection_prototype.size,
3434
+ empty: selection_prototype.empty,
3435
+ each: selection_prototype.each,
3436
+ on: on_default2,
3437
+ attr: attr_default2,
3438
+ attrTween: attrTween_default,
3439
+ style: style_default2,
3440
+ styleTween: styleTween_default,
3441
+ text: text_default2,
3442
+ textTween: textTween_default,
3443
+ remove: remove_default2,
3444
+ tween: tween_default,
3445
+ delay: delay_default,
3446
+ duration: duration_default,
3447
+ ease: ease_default,
3448
+ easeVarying: easeVarying_default,
3449
+ end: end_default,
3450
+ [Symbol.iterator]: selection_prototype[Symbol.iterator]
3451
+ };
3452
+
3453
+ // node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js
3454
+ function cubicInOut(t) {
3455
+ return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
3456
+ }
3457
+
3458
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js
3459
+ var defaultTiming = {
3460
+ time: null,
3461
+ // Set on use.
3462
+ delay: 0,
3463
+ duration: 250,
3464
+ ease: cubicInOut
3465
+ };
3466
+ function inherit(node, id2) {
3467
+ var timing;
3468
+ while (!(timing = node.__transition) || !(timing = timing[id2])) {
3469
+ if (!(node = node.parentNode)) {
3470
+ throw new Error(`transition ${id2} not found`);
3471
+ }
3472
+ }
3473
+ return timing;
3474
+ }
3475
+ function transition_default2(name) {
3476
+ var id2, timing;
3477
+ if (name instanceof Transition) {
3478
+ id2 = name._id, name = name._name;
3479
+ } else {
3480
+ id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
3481
+ }
3482
+ for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
3483
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3484
+ if (node = group[i]) {
3485
+ schedule_default(node, name, id2, i, group, timing || inherit(node, id2));
3486
+ }
3487
+ }
3488
+ }
3489
+ return new Transition(groups, this._parents, name, id2);
3490
+ }
3491
+
3492
+ // node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js
3493
+ selection_default.prototype.interrupt = interrupt_default2;
3494
+ selection_default.prototype.transition = transition_default2;
3495
+
3496
+ // node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js
3497
+ var pi = Math.PI;
3498
+ var tau = 2 * pi;
3499
+ var epsilon = 1e-6;
3500
+ var tauEpsilon = tau - epsilon;
3501
+ function append(strings) {
3502
+ this._ += strings[0];
3503
+ for (let i = 1, n = strings.length; i < n; ++i) {
3504
+ this._ += arguments[i] + strings[i];
3505
+ }
3506
+ }
3507
+ function appendRound(digits) {
3508
+ let d = Math.floor(digits);
3509
+ if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
3510
+ if (d > 15) return append;
3511
+ const k = 10 ** d;
3512
+ return function(strings) {
3513
+ this._ += strings[0];
3514
+ for (let i = 1, n = strings.length; i < n; ++i) {
3515
+ this._ += Math.round(arguments[i] * k) / k + strings[i];
3516
+ }
3517
+ };
3518
+ }
3519
+ var Path = class {
3520
+ constructor(digits) {
3521
+ this._x0 = this._y0 = // start of current subpath
3522
+ this._x1 = this._y1 = null;
3523
+ this._ = "";
3524
+ this._append = digits == null ? append : appendRound(digits);
3525
+ }
3526
+ moveTo(x2, y2) {
3527
+ this._append`M${this._x0 = this._x1 = +x2},${this._y0 = this._y1 = +y2}`;
3528
+ }
3529
+ closePath() {
3530
+ if (this._x1 !== null) {
3531
+ this._x1 = this._x0, this._y1 = this._y0;
3532
+ this._append`Z`;
3533
+ }
3534
+ }
3535
+ lineTo(x2, y2) {
3536
+ this._append`L${this._x1 = +x2},${this._y1 = +y2}`;
3537
+ }
3538
+ quadraticCurveTo(x1, y1, x2, y2) {
3539
+ this._append`Q${+x1},${+y1},${this._x1 = +x2},${this._y1 = +y2}`;
3540
+ }
3541
+ bezierCurveTo(x1, y1, x2, y2, x3, y3) {
3542
+ this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x3},${this._y1 = +y3}`;
3543
+ }
3544
+ arcTo(x1, y1, x2, y2, r) {
3545
+ x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
3546
+ if (r < 0) throw new Error(`negative radius: ${r}`);
3547
+ let x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
3548
+ if (this._x1 === null) {
3549
+ this._append`M${this._x1 = x1},${this._y1 = y1}`;
3550
+ } else if (!(l01_2 > epsilon)) ;
3551
+ else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
3552
+ this._append`L${this._x1 = x1},${this._y1 = y1}`;
3553
+ } else {
3554
+ let x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;
3555
+ if (Math.abs(t01 - 1) > epsilon) {
3556
+ this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
3557
+ }
3558
+ this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
3559
+ }
3560
+ }
3561
+ arc(x2, y2, r, a0, a1, ccw) {
3562
+ x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw;
3563
+ if (r < 0) throw new Error(`negative radius: ${r}`);
3564
+ let dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
3565
+ if (this._x1 === null) {
3566
+ this._append`M${x0},${y0}`;
3567
+ } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
3568
+ this._append`L${x0},${y0}`;
3569
+ }
3570
+ if (!r) return;
3571
+ if (da < 0) da = da % tau + tau;
3572
+ if (da > tauEpsilon) {
3573
+ this._append`A${r},${r},0,1,${cw},${x2 - dx},${y2 - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
3574
+ } else if (da > epsilon) {
3575
+ this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x2 + r * Math.cos(a1)},${this._y1 = y2 + r * Math.sin(a1)}`;
3576
+ }
3577
+ }
3578
+ rect(x2, y2, w, h) {
3579
+ this._append`M${this._x0 = this._x1 = +x2},${this._y0 = this._y1 = +y2}h${w = +w}v${+h}h${-w}Z`;
3580
+ }
3581
+ toString() {
3582
+ return this._;
3583
+ }
3584
+ };
3585
+
3586
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/count.js
3587
+ function count(node) {
3588
+ var sum = 0, children2 = node.children, i = children2 && children2.length;
3589
+ if (!i) sum = 1;
3590
+ else while (--i >= 0) sum += children2[i].value;
3591
+ node.value = sum;
3592
+ }
3593
+ function count_default() {
3594
+ return this.eachAfter(count);
3595
+ }
3596
+
3597
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/each.js
3598
+ function each_default2(callback, that) {
3599
+ let index = -1;
3600
+ for (const node of this) {
3601
+ callback.call(that, node, ++index, this);
3602
+ }
3603
+ return this;
3604
+ }
3605
+
3606
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js
3607
+ function eachBefore_default(callback, that) {
3608
+ var node = this, nodes = [node], children2, i, index = -1;
3609
+ while (node = nodes.pop()) {
3610
+ callback.call(that, node, ++index, this);
3611
+ if (children2 = node.children) {
3612
+ for (i = children2.length - 1; i >= 0; --i) {
3613
+ nodes.push(children2[i]);
3614
+ }
3615
+ }
3616
+ }
3617
+ return this;
3618
+ }
3619
+
3620
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js
3621
+ function eachAfter_default(callback, that) {
3622
+ var node = this, nodes = [node], next = [], children2, i, n, index = -1;
3623
+ while (node = nodes.pop()) {
3624
+ next.push(node);
3625
+ if (children2 = node.children) {
3626
+ for (i = 0, n = children2.length; i < n; ++i) {
3627
+ nodes.push(children2[i]);
3628
+ }
3629
+ }
3630
+ }
3631
+ while (node = next.pop()) {
3632
+ callback.call(that, node, ++index, this);
3633
+ }
3634
+ return this;
3635
+ }
3636
+
3637
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/find.js
3638
+ function find_default(callback, that) {
3639
+ let index = -1;
3640
+ for (const node of this) {
3641
+ if (callback.call(that, node, ++index, this)) {
3642
+ return node;
3643
+ }
3644
+ }
3645
+ }
3646
+
3647
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/sum.js
3648
+ function sum_default(value) {
3649
+ return this.eachAfter(function(node) {
3650
+ var sum = +value(node.data) || 0, children2 = node.children, i = children2 && children2.length;
3651
+ while (--i >= 0) sum += children2[i].value;
3652
+ node.value = sum;
3653
+ });
3654
+ }
3655
+
3656
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/sort.js
3657
+ function sort_default2(compare) {
3658
+ return this.eachBefore(function(node) {
3659
+ if (node.children) {
3660
+ node.children.sort(compare);
3661
+ }
3662
+ });
3663
+ }
3664
+
3665
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/path.js
3666
+ function path_default(end) {
3667
+ var start2 = this, ancestor = leastCommonAncestor(start2, end), nodes = [start2];
3668
+ while (start2 !== ancestor) {
3669
+ start2 = start2.parent;
3670
+ nodes.push(start2);
3671
+ }
3672
+ var k = nodes.length;
3673
+ while (end !== ancestor) {
3674
+ nodes.splice(k, 0, end);
3675
+ end = end.parent;
3676
+ }
3677
+ return nodes;
3678
+ }
3679
+ function leastCommonAncestor(a, b) {
3680
+ if (a === b) return a;
3681
+ var aNodes = a.ancestors(), bNodes = b.ancestors(), c = null;
3682
+ a = aNodes.pop();
3683
+ b = bNodes.pop();
3684
+ while (a === b) {
3685
+ c = a;
3686
+ a = aNodes.pop();
3687
+ b = bNodes.pop();
3688
+ }
3689
+ return c;
3690
+ }
3691
+
3692
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/ancestors.js
3693
+ function ancestors_default() {
3694
+ var node = this, nodes = [node];
3695
+ while (node = node.parent) {
3696
+ nodes.push(node);
3697
+ }
3698
+ return nodes;
3699
+ }
3700
+
3701
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/descendants.js
3702
+ function descendants_default() {
3703
+ return Array.from(this);
3704
+ }
3705
+
3706
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/leaves.js
3707
+ function leaves_default() {
3708
+ var leaves = [];
3709
+ this.eachBefore(function(node) {
3710
+ if (!node.children) {
3711
+ leaves.push(node);
3712
+ }
3713
+ });
3714
+ return leaves;
3715
+ }
3716
+
3717
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/links.js
3718
+ function links_default() {
3719
+ var root2 = this, links = [];
3720
+ root2.each(function(node) {
3721
+ if (node !== root2) {
3722
+ links.push({ source: node.parent, target: node });
3723
+ }
3724
+ });
3725
+ return links;
3726
+ }
3727
+
3728
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/iterator.js
3729
+ function* iterator_default2() {
3730
+ var node = this, current, next = [node], children2, i, n;
3731
+ do {
3732
+ current = next.reverse(), next = [];
3733
+ while (node = current.pop()) {
3734
+ yield node;
3735
+ if (children2 = node.children) {
3736
+ for (i = 0, n = children2.length; i < n; ++i) {
3737
+ next.push(children2[i]);
3738
+ }
3739
+ }
3740
+ }
3741
+ } while (next.length);
3742
+ }
3743
+
3744
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/index.js
3745
+ function hierarchy(data, children2) {
3746
+ if (data instanceof Map) {
3747
+ data = [void 0, data];
3748
+ if (children2 === void 0) children2 = mapChildren;
3749
+ } else if (children2 === void 0) {
3750
+ children2 = objectChildren;
3751
+ }
3752
+ var root2 = new Node2(data), node, nodes = [root2], child, childs, i, n;
3753
+ while (node = nodes.pop()) {
3754
+ if ((childs = children2(node.data)) && (n = (childs = Array.from(childs)).length)) {
3755
+ node.children = childs;
3756
+ for (i = n - 1; i >= 0; --i) {
3757
+ nodes.push(child = childs[i] = new Node2(childs[i]));
3758
+ child.parent = node;
3759
+ child.depth = node.depth + 1;
3760
+ }
3761
+ }
3762
+ }
3763
+ return root2.eachBefore(computeHeight);
3764
+ }
3765
+ function node_copy() {
3766
+ return hierarchy(this).eachBefore(copyData);
3767
+ }
3768
+ function objectChildren(d) {
3769
+ return d.children;
3770
+ }
3771
+ function mapChildren(d) {
3772
+ return Array.isArray(d) ? d[1] : null;
3773
+ }
3774
+ function copyData(node) {
3775
+ if (node.data.value !== void 0) node.value = node.data.value;
3776
+ node.data = node.data.data;
3777
+ }
3778
+ function computeHeight(node) {
3779
+ var height = 0;
3780
+ do
3781
+ node.height = height;
3782
+ while ((node = node.parent) && node.height < ++height);
3783
+ }
3784
+ function Node2(data) {
3785
+ this.data = data;
3786
+ this.depth = this.height = 0;
3787
+ this.parent = null;
3788
+ }
3789
+ Node2.prototype = hierarchy.prototype = {
3790
+ constructor: Node2,
3791
+ count: count_default,
3792
+ each: each_default2,
3793
+ eachAfter: eachAfter_default,
3794
+ eachBefore: eachBefore_default,
3795
+ find: find_default,
3796
+ sum: sum_default,
3797
+ sort: sort_default2,
3798
+ path: path_default,
3799
+ ancestors: ancestors_default,
3800
+ descendants: descendants_default,
3801
+ leaves: leaves_default,
3802
+ links: links_default,
3803
+ copy: node_copy,
3804
+ [Symbol.iterator]: iterator_default2
3805
+ };
3806
+
3807
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/accessors.js
3808
+ function optional(f) {
3809
+ return f == null ? null : required(f);
3810
+ }
3811
+ function required(f) {
3812
+ if (typeof f !== "function") throw new Error();
3813
+ return f;
3814
+ }
3815
+
3816
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/stratify.js
3817
+ var preroot = { depth: -1 };
3818
+ var ambiguous = {};
3819
+ var imputed = {};
3820
+ function defaultId(d) {
3821
+ return d.id;
3822
+ }
3823
+ function defaultParentId(d) {
3824
+ return d.parentId;
3825
+ }
3826
+ function stratify_default() {
3827
+ var id2 = defaultId, parentId = defaultParentId, path2;
3828
+ function stratify(data) {
3829
+ var nodes = Array.from(data), currentId = id2, currentParentId = parentId, n, d, i, root2, parent, node, nodeId, nodeKey, nodeByKey = /* @__PURE__ */ new Map();
3830
+ if (path2 != null) {
3831
+ const I = nodes.map((d2, i2) => normalize(path2(d2, i2, data)));
3832
+ const P = I.map(parentof);
3833
+ const S = new Set(I).add("");
3834
+ for (const i2 of P) {
3835
+ if (!S.has(i2)) {
3836
+ S.add(i2);
3837
+ I.push(i2);
3838
+ P.push(parentof(i2));
3839
+ nodes.push(imputed);
3840
+ }
3841
+ }
3842
+ currentId = (_, i2) => I[i2];
3843
+ currentParentId = (_, i2) => P[i2];
3844
+ }
3845
+ for (i = 0, n = nodes.length; i < n; ++i) {
3846
+ d = nodes[i], node = nodes[i] = new Node2(d);
3847
+ if ((nodeId = currentId(d, i, data)) != null && (nodeId += "")) {
3848
+ nodeKey = node.id = nodeId;
3849
+ nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);
3850
+ }
3851
+ if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += "")) {
3852
+ node.parent = nodeId;
3853
+ }
3854
+ }
3855
+ for (i = 0; i < n; ++i) {
3856
+ node = nodes[i];
3857
+ if (nodeId = node.parent) {
3858
+ parent = nodeByKey.get(nodeId);
3859
+ if (!parent) throw new Error("missing: " + nodeId);
3860
+ if (parent === ambiguous) throw new Error("ambiguous: " + nodeId);
3861
+ if (parent.children) parent.children.push(node);
3862
+ else parent.children = [node];
3863
+ node.parent = parent;
3864
+ } else {
3865
+ if (root2) throw new Error("multiple roots");
3866
+ root2 = node;
3867
+ }
3868
+ }
3869
+ if (!root2) throw new Error("no root");
3870
+ if (path2 != null) {
3871
+ while (root2.data === imputed && root2.children.length === 1) {
3872
+ root2 = root2.children[0], --n;
3873
+ }
3874
+ for (let i2 = nodes.length - 1; i2 >= 0; --i2) {
3875
+ node = nodes[i2];
3876
+ if (node.data !== imputed) break;
3877
+ node.data = null;
3878
+ }
3879
+ }
3880
+ root2.parent = preroot;
3881
+ root2.eachBefore(function(node2) {
3882
+ node2.depth = node2.parent.depth + 1;
3883
+ --n;
3884
+ }).eachBefore(computeHeight);
3885
+ root2.parent = null;
3886
+ if (n > 0) throw new Error("cycle");
3887
+ return root2;
3888
+ }
3889
+ stratify.id = function(x2) {
3890
+ return arguments.length ? (id2 = optional(x2), stratify) : id2;
3891
+ };
3892
+ stratify.parentId = function(x2) {
3893
+ return arguments.length ? (parentId = optional(x2), stratify) : parentId;
3894
+ };
3895
+ stratify.path = function(x2) {
3896
+ return arguments.length ? (path2 = optional(x2), stratify) : path2;
3897
+ };
3898
+ return stratify;
3899
+ }
3900
+ function normalize(path2) {
3901
+ path2 = `${path2}`;
3902
+ let i = path2.length;
3903
+ if (slash(path2, i - 1) && !slash(path2, i - 2)) path2 = path2.slice(0, -1);
3904
+ return path2[0] === "/" ? path2 : `/${path2}`;
3905
+ }
3906
+ function parentof(path2) {
3907
+ let i = path2.length;
3908
+ if (i < 2) return "";
3909
+ while (--i > 1) if (slash(path2, i)) break;
3910
+ return path2.slice(0, i);
3911
+ }
3912
+ function slash(path2, i) {
3913
+ if (path2[i] === "/") {
3914
+ let k = 0;
3915
+ while (i > 0 && path2[--i] === "\\") ++k;
3916
+ if ((k & 1) === 0) return true;
3917
+ }
3918
+ return false;
3919
+ }
3920
+
3921
+ // node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/tree.js
3922
+ function defaultSeparation(a, b) {
3923
+ return a.parent === b.parent ? 1 : 2;
3924
+ }
3925
+ function nextLeft(v) {
3926
+ var children2 = v.children;
3927
+ return children2 ? children2[0] : v.t;
3928
+ }
3929
+ function nextRight(v) {
3930
+ var children2 = v.children;
3931
+ return children2 ? children2[children2.length - 1] : v.t;
3932
+ }
3933
+ function moveSubtree(wm, wp, shift) {
3934
+ var change = shift / (wp.i - wm.i);
3935
+ wp.c -= change;
3936
+ wp.s += shift;
3937
+ wm.c += change;
3938
+ wp.z += shift;
3939
+ wp.m += shift;
3940
+ }
3941
+ function executeShifts(v) {
3942
+ var shift = 0, change = 0, children2 = v.children, i = children2.length, w;
3943
+ while (--i >= 0) {
3944
+ w = children2[i];
3945
+ w.z += shift;
3946
+ w.m += shift;
3947
+ shift += w.s + (change += w.c);
3948
+ }
3949
+ }
3950
+ function nextAncestor(vim, v, ancestor) {
3951
+ return vim.a.parent === v.parent ? vim.a : ancestor;
3952
+ }
3953
+ function TreeNode2(node, i) {
3954
+ this._ = node;
3955
+ this.parent = null;
3956
+ this.children = null;
3957
+ this.A = null;
3958
+ this.a = this;
3959
+ this.z = 0;
3960
+ this.m = 0;
3961
+ this.c = 0;
3962
+ this.s = 0;
3963
+ this.t = null;
3964
+ this.i = i;
3965
+ }
3966
+ TreeNode2.prototype = Object.create(Node2.prototype);
3967
+ function treeRoot(root2) {
3968
+ var tree = new TreeNode2(root2, 0), node, nodes = [tree], child, children2, i, n;
3969
+ while (node = nodes.pop()) {
3970
+ if (children2 = node._.children) {
3971
+ node.children = new Array(n = children2.length);
3972
+ for (i = n - 1; i >= 0; --i) {
3973
+ nodes.push(child = node.children[i] = new TreeNode2(children2[i], i));
3974
+ child.parent = node;
3975
+ }
3976
+ }
3977
+ }
3978
+ (tree.parent = new TreeNode2(null, 0)).children = [tree];
3979
+ return tree;
3980
+ }
3981
+ function tree_default() {
3982
+ var separation = defaultSeparation, dx = 1, dy = 1, nodeSize = null;
3983
+ function tree(root2) {
3984
+ var t = treeRoot(root2);
3985
+ t.eachAfter(firstWalk), t.parent.m = -t.z;
3986
+ t.eachBefore(secondWalk);
3987
+ if (nodeSize) root2.eachBefore(sizeNode);
3988
+ else {
3989
+ var left = root2, right = root2, bottom = root2;
3990
+ root2.eachBefore(function(node) {
3991
+ if (node.x < left.x) left = node;
3992
+ if (node.x > right.x) right = node;
3993
+ if (node.depth > bottom.depth) bottom = node;
3994
+ });
3995
+ var s = left === right ? 1 : separation(left, right) / 2, tx = s - left.x, kx = dx / (right.x + s + tx), ky = dy / (bottom.depth || 1);
3996
+ root2.eachBefore(function(node) {
3997
+ node.x = (node.x + tx) * kx;
3998
+ node.y = node.depth * ky;
3999
+ });
4000
+ }
4001
+ return root2;
4002
+ }
4003
+ function firstWalk(v) {
4004
+ var children2 = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null;
4005
+ if (children2) {
4006
+ executeShifts(v);
4007
+ var midpoint = (children2[0].z + children2[children2.length - 1].z) / 2;
4008
+ if (w) {
4009
+ v.z = w.z + separation(v._, w._);
4010
+ v.m = v.z - midpoint;
4011
+ } else {
4012
+ v.z = midpoint;
4013
+ }
4014
+ } else if (w) {
4015
+ v.z = w.z + separation(v._, w._);
4016
+ }
4017
+ v.parent.A = apportion(v, w, v.parent.A || siblings[0]);
4018
+ }
4019
+ function secondWalk(v) {
4020
+ v._.x = v.z + v.parent.m;
4021
+ v.m += v.parent.m;
4022
+ }
4023
+ function apportion(v, w, ancestor) {
4024
+ if (w) {
4025
+ var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift;
4026
+ while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {
4027
+ vom = nextLeft(vom);
4028
+ vop = nextRight(vop);
4029
+ vop.a = v;
4030
+ shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);
4031
+ if (shift > 0) {
4032
+ moveSubtree(nextAncestor(vim, v, ancestor), v, shift);
4033
+ sip += shift;
4034
+ sop += shift;
4035
+ }
4036
+ sim += vim.m;
4037
+ sip += vip.m;
4038
+ som += vom.m;
4039
+ sop += vop.m;
4040
+ }
4041
+ if (vim && !nextRight(vop)) {
4042
+ vop.t = vim;
4043
+ vop.m += sim - sop;
4044
+ }
4045
+ if (vip && !nextLeft(vom)) {
4046
+ vom.t = vip;
4047
+ vom.m += sip - som;
4048
+ ancestor = v;
4049
+ }
4050
+ }
4051
+ return ancestor;
4052
+ }
4053
+ function sizeNode(node) {
4054
+ node.x *= dx;
4055
+ node.y = node.depth * dy;
4056
+ }
4057
+ tree.separation = function(x2) {
4058
+ return arguments.length ? (separation = x2, tree) : separation;
4059
+ };
4060
+ tree.size = function(x2) {
4061
+ return arguments.length ? (nodeSize = false, dx = +x2[0], dy = +x2[1], tree) : nodeSize ? null : [dx, dy];
4062
+ };
4063
+ tree.nodeSize = function(x2) {
4064
+ return arguments.length ? (nodeSize = true, dx = +x2[0], dy = +x2[1], tree) : nodeSize ? [dx, dy] : null;
4065
+ };
4066
+ return tree;
4067
+ }
4068
+
4069
+ // node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js
4070
+ function constant_default4(x2) {
4071
+ return function constant() {
4072
+ return x2;
4073
+ };
4074
+ }
4075
+
4076
+ // node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js
4077
+ function withPath(shape) {
4078
+ let digits = 3;
4079
+ shape.digits = function(_) {
4080
+ if (!arguments.length) return digits;
4081
+ if (_ == null) {
4082
+ digits = null;
4083
+ } else {
4084
+ const d = Math.floor(_);
4085
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
4086
+ digits = d;
4087
+ }
4088
+ return shape;
4089
+ };
4090
+ return () => new Path(digits);
4091
+ }
4092
+
4093
+ // node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/array.js
4094
+ var slice = Array.prototype.slice;
4095
+
4096
+ // node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js
4097
+ function x(p) {
4098
+ return p[0];
4099
+ }
4100
+ function y(p) {
4101
+ return p[1];
4102
+ }
4103
+
4104
+ // node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/bump.js
4105
+ var Bump = class {
4106
+ constructor(context, x2) {
4107
+ this._context = context;
4108
+ this._x = x2;
4109
+ }
4110
+ areaStart() {
4111
+ this._line = 0;
4112
+ }
4113
+ areaEnd() {
4114
+ this._line = NaN;
4115
+ }
4116
+ lineStart() {
4117
+ this._point = 0;
4118
+ }
4119
+ lineEnd() {
4120
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
4121
+ this._line = 1 - this._line;
4122
+ }
4123
+ point(x2, y2) {
4124
+ x2 = +x2, y2 = +y2;
4125
+ switch (this._point) {
4126
+ case 0: {
4127
+ this._point = 1;
4128
+ if (this._line) this._context.lineTo(x2, y2);
4129
+ else this._context.moveTo(x2, y2);
4130
+ break;
4131
+ }
4132
+ case 1:
4133
+ this._point = 2;
4134
+ // falls through
4135
+ default: {
4136
+ if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x2) / 2, this._y0, this._x0, y2, x2, y2);
4137
+ else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y2) / 2, x2, this._y0, x2, y2);
4138
+ break;
4139
+ }
4140
+ }
4141
+ this._x0 = x2, this._y0 = y2;
4142
+ }
4143
+ };
4144
+ function bumpY(context) {
4145
+ return new Bump(context, false);
4146
+ }
4147
+
4148
+ // node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/link.js
4149
+ function linkSource(d) {
4150
+ return d.source;
4151
+ }
4152
+ function linkTarget(d) {
4153
+ return d.target;
4154
+ }
4155
+ function link(curve) {
4156
+ let source = linkSource, target = linkTarget, x2 = x, y2 = y, context = null, output = null, path2 = withPath(link2);
4157
+ function link2() {
4158
+ let buffer;
4159
+ const argv = slice.call(arguments);
4160
+ const s = source.apply(this, argv);
4161
+ const t = target.apply(this, argv);
4162
+ if (context == null) output = curve(buffer = path2());
4163
+ output.lineStart();
4164
+ argv[0] = s, output.point(+x2.apply(this, argv), +y2.apply(this, argv));
4165
+ argv[0] = t, output.point(+x2.apply(this, argv), +y2.apply(this, argv));
4166
+ output.lineEnd();
4167
+ if (buffer) return output = null, buffer + "" || null;
4168
+ }
4169
+ link2.source = function(_) {
4170
+ return arguments.length ? (source = _, link2) : source;
4171
+ };
4172
+ link2.target = function(_) {
4173
+ return arguments.length ? (target = _, link2) : target;
4174
+ };
4175
+ link2.x = function(_) {
4176
+ return arguments.length ? (x2 = typeof _ === "function" ? _ : constant_default4(+_), link2) : x2;
4177
+ };
4178
+ link2.y = function(_) {
4179
+ return arguments.length ? (y2 = typeof _ === "function" ? _ : constant_default4(+_), link2) : y2;
4180
+ };
4181
+ link2.context = function(_) {
4182
+ return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), link2) : context;
4183
+ };
4184
+ return link2;
4185
+ }
4186
+ function linkVertical() {
4187
+ return link(bumpY);
4188
+ }
4189
+
4190
+ // node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/constant.js
4191
+ var constant_default5 = (x2) => () => x2;
4192
+
4193
+ // node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/event.js
4194
+ function ZoomEvent(type2, {
4195
+ sourceEvent,
4196
+ target,
4197
+ transform: transform2,
4198
+ dispatch: dispatch2
4199
+ }) {
4200
+ Object.defineProperties(this, {
4201
+ type: { value: type2, enumerable: true, configurable: true },
4202
+ sourceEvent: { value: sourceEvent, enumerable: true, configurable: true },
4203
+ target: { value: target, enumerable: true, configurable: true },
4204
+ transform: { value: transform2, enumerable: true, configurable: true },
4205
+ _: { value: dispatch2 }
4206
+ });
4207
+ }
4208
+
4209
+ // node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js
4210
+ function Transform(k, x2, y2) {
4211
+ this.k = k;
4212
+ this.x = x2;
4213
+ this.y = y2;
4214
+ }
4215
+ Transform.prototype = {
4216
+ constructor: Transform,
4217
+ scale: function(k) {
4218
+ return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
4219
+ },
4220
+ translate: function(x2, y2) {
4221
+ return x2 === 0 & y2 === 0 ? this : new Transform(this.k, this.x + this.k * x2, this.y + this.k * y2);
4222
+ },
4223
+ apply: function(point) {
4224
+ return [point[0] * this.k + this.x, point[1] * this.k + this.y];
4225
+ },
4226
+ applyX: function(x2) {
4227
+ return x2 * this.k + this.x;
4228
+ },
4229
+ applyY: function(y2) {
4230
+ return y2 * this.k + this.y;
4231
+ },
4232
+ invert: function(location) {
4233
+ return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
4234
+ },
4235
+ invertX: function(x2) {
4236
+ return (x2 - this.x) / this.k;
4237
+ },
4238
+ invertY: function(y2) {
4239
+ return (y2 - this.y) / this.k;
4240
+ },
4241
+ rescaleX: function(x2) {
4242
+ return x2.copy().domain(x2.range().map(this.invertX, this).map(x2.invert, x2));
4243
+ },
4244
+ rescaleY: function(y2) {
4245
+ return y2.copy().domain(y2.range().map(this.invertY, this).map(y2.invert, y2));
4246
+ },
4247
+ toString: function() {
4248
+ return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
4249
+ }
4250
+ };
4251
+ var identity2 = new Transform(1, 0, 0);
4252
+ Transform.prototype;
4253
+
4254
+ // node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/noevent.js
4255
+ function nopropagation2(event) {
4256
+ event.stopImmediatePropagation();
4257
+ }
4258
+ function noevent_default3(event) {
4259
+ event.preventDefault();
4260
+ event.stopImmediatePropagation();
4261
+ }
4262
+
4263
+ // node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/zoom.js
4264
+ function defaultFilter(event) {
4265
+ return (!event.ctrlKey || event.type === "wheel") && !event.button;
4266
+ }
4267
+ function defaultExtent() {
4268
+ var e = this;
4269
+ if (e instanceof SVGElement) {
4270
+ e = e.ownerSVGElement || e;
4271
+ if (e.hasAttribute("viewBox")) {
4272
+ e = e.viewBox.baseVal;
4273
+ return [[e.x, e.y], [e.x + e.width, e.y + e.height]];
4274
+ }
4275
+ return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];
4276
+ }
4277
+ return [[0, 0], [e.clientWidth, e.clientHeight]];
4278
+ }
4279
+ function defaultTransform() {
4280
+ return this.__zoom || identity2;
4281
+ }
4282
+ function defaultWheelDelta(event) {
4283
+ return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 2e-3) * (event.ctrlKey ? 10 : 1);
4284
+ }
4285
+ function defaultTouchable() {
4286
+ return navigator.maxTouchPoints || "ontouchstart" in this;
4287
+ }
4288
+ function defaultConstrain(transform2, extent, translateExtent) {
4289
+ var dx0 = transform2.invertX(extent[0][0]) - translateExtent[0][0], dx1 = transform2.invertX(extent[1][0]) - translateExtent[1][0], dy0 = transform2.invertY(extent[0][1]) - translateExtent[0][1], dy1 = transform2.invertY(extent[1][1]) - translateExtent[1][1];
4290
+ return transform2.translate(
4291
+ dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
4292
+ dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
4293
+ );
4294
+ }
4295
+ function zoom_default2() {
4296
+ var filter2 = defaultFilter, extent = defaultExtent, constrain = defaultConstrain, wheelDelta = defaultWheelDelta, touchable = defaultTouchable, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250, interpolate = zoom_default, listeners = dispatch_default("start", "zoom", "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10;
4297
+ function zoom(selection2) {
4298
+ selection2.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, { passive: false }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
4299
+ }
4300
+ zoom.transform = function(collection, transform2, point, event) {
4301
+ var selection2 = collection.selection ? collection.selection() : collection;
4302
+ selection2.property("__zoom", defaultTransform);
4303
+ if (collection !== selection2) {
4304
+ schedule(collection, transform2, point, event);
4305
+ } else {
4306
+ selection2.interrupt().each(function() {
4307
+ gesture(this, arguments).event(event).start().zoom(null, typeof transform2 === "function" ? transform2.apply(this, arguments) : transform2).end();
4308
+ });
4309
+ }
4310
+ };
4311
+ zoom.scaleBy = function(selection2, k, p, event) {
4312
+ zoom.scaleTo(selection2, function() {
4313
+ var k0 = this.__zoom.k, k1 = typeof k === "function" ? k.apply(this, arguments) : k;
4314
+ return k0 * k1;
4315
+ }, p, event);
4316
+ };
4317
+ zoom.scaleTo = function(selection2, k, p, event) {
4318
+ zoom.transform(selection2, function() {
4319
+ var e = extent.apply(this, arguments), t0 = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, p1 = t0.invert(p0), k1 = typeof k === "function" ? k.apply(this, arguments) : k;
4320
+ return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
4321
+ }, p, event);
4322
+ };
4323
+ zoom.translateBy = function(selection2, x2, y2, event) {
4324
+ zoom.transform(selection2, function() {
4325
+ return constrain(this.__zoom.translate(
4326
+ typeof x2 === "function" ? x2.apply(this, arguments) : x2,
4327
+ typeof y2 === "function" ? y2.apply(this, arguments) : y2
4328
+ ), extent.apply(this, arguments), translateExtent);
4329
+ }, null, event);
4330
+ };
4331
+ zoom.translateTo = function(selection2, x2, y2, p, event) {
4332
+ zoom.transform(selection2, function() {
4333
+ var e = extent.apply(this, arguments), t = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
4334
+ return constrain(identity2.translate(p0[0], p0[1]).scale(t.k).translate(
4335
+ typeof x2 === "function" ? -x2.apply(this, arguments) : -x2,
4336
+ typeof y2 === "function" ? -y2.apply(this, arguments) : -y2
4337
+ ), e, translateExtent);
4338
+ }, p, event);
4339
+ };
4340
+ function scale(transform2, k) {
4341
+ k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
4342
+ return k === transform2.k ? transform2 : new Transform(k, transform2.x, transform2.y);
4343
+ }
4344
+ function translate(transform2, p0, p1) {
4345
+ var x2 = p0[0] - p1[0] * transform2.k, y2 = p0[1] - p1[1] * transform2.k;
4346
+ return x2 === transform2.x && y2 === transform2.y ? transform2 : new Transform(transform2.k, x2, y2);
4347
+ }
4348
+ function centroid(extent2) {
4349
+ return [(+extent2[0][0] + +extent2[1][0]) / 2, (+extent2[0][1] + +extent2[1][1]) / 2];
4350
+ }
4351
+ function schedule(transition2, transform2, point, event) {
4352
+ transition2.on("start.zoom", function() {
4353
+ gesture(this, arguments).event(event).start();
4354
+ }).on("interrupt.zoom end.zoom", function() {
4355
+ gesture(this, arguments).event(event).end();
4356
+ }).tween("zoom", function() {
4357
+ var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform2 === "function" ? transform2.apply(that, args) : transform2, i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
4358
+ return function(t) {
4359
+ if (t === 1) t = b;
4360
+ else {
4361
+ var l = i(t), k = w / l[2];
4362
+ t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);
4363
+ }
4364
+ g.zoom(null, t);
4365
+ };
4366
+ });
4367
+ }
4368
+ function gesture(that, args, clean) {
4369
+ return !clean && that.__zooming || new Gesture(that, args);
4370
+ }
4371
+ function Gesture(that, args) {
4372
+ this.that = that;
4373
+ this.args = args;
4374
+ this.active = 0;
4375
+ this.sourceEvent = null;
4376
+ this.extent = extent.apply(that, args);
4377
+ this.taps = 0;
4378
+ }
4379
+ Gesture.prototype = {
4380
+ event: function(event) {
4381
+ if (event) this.sourceEvent = event;
4382
+ return this;
4383
+ },
4384
+ start: function() {
4385
+ if (++this.active === 1) {
4386
+ this.that.__zooming = this;
4387
+ this.emit("start");
4388
+ }
4389
+ return this;
4390
+ },
4391
+ zoom: function(key, transform2) {
4392
+ if (this.mouse && key !== "mouse") this.mouse[1] = transform2.invert(this.mouse[0]);
4393
+ if (this.touch0 && key !== "touch") this.touch0[1] = transform2.invert(this.touch0[0]);
4394
+ if (this.touch1 && key !== "touch") this.touch1[1] = transform2.invert(this.touch1[0]);
4395
+ this.that.__zoom = transform2;
4396
+ this.emit("zoom");
4397
+ return this;
4398
+ },
4399
+ end: function() {
4400
+ if (--this.active === 0) {
4401
+ delete this.that.__zooming;
4402
+ this.emit("end");
4403
+ }
4404
+ return this;
4405
+ },
4406
+ emit: function(type2) {
4407
+ var d = select_default2(this.that).datum();
4408
+ listeners.call(
4409
+ type2,
4410
+ this.that,
4411
+ new ZoomEvent(type2, {
4412
+ sourceEvent: this.sourceEvent,
4413
+ target: zoom,
4414
+ type: type2,
4415
+ transform: this.that.__zoom,
4416
+ dispatch: listeners
4417
+ }),
4418
+ d
4419
+ );
4420
+ }
4421
+ };
4422
+ function wheeled(event, ...args) {
4423
+ if (!filter2.apply(this, arguments)) return;
4424
+ var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), p = pointer_default(event);
4425
+ if (g.wheel) {
4426
+ if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
4427
+ g.mouse[1] = t.invert(g.mouse[0] = p);
4428
+ }
4429
+ clearTimeout(g.wheel);
4430
+ } else if (t.k === k) return;
4431
+ else {
4432
+ g.mouse = [p, t.invert(p)];
4433
+ interrupt_default(this);
4434
+ g.start();
4435
+ }
4436
+ noevent_default3(event);
4437
+ g.wheel = setTimeout(wheelidled, wheelDelay);
4438
+ g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
4439
+ function wheelidled() {
4440
+ g.wheel = null;
4441
+ g.end();
4442
+ }
4443
+ }
4444
+ function mousedowned(event, ...args) {
4445
+ if (touchending || !filter2.apply(this, arguments)) return;
4446
+ var currentTarget = event.currentTarget, g = gesture(this, args, true).event(event), v = select_default2(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), p = pointer_default(event, currentTarget), x0 = event.clientX, y0 = event.clientY;
4447
+ nodrag_default(event.view);
4448
+ nopropagation2(event);
4449
+ g.mouse = [p, this.__zoom.invert(p)];
4450
+ interrupt_default(this);
4451
+ g.start();
4452
+ function mousemoved(event2) {
4453
+ noevent_default3(event2);
4454
+ if (!g.moved) {
4455
+ var dx = event2.clientX - x0, dy = event2.clientY - y0;
4456
+ g.moved = dx * dx + dy * dy > clickDistance2;
4457
+ }
4458
+ g.event(event2).zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer_default(event2, currentTarget), g.mouse[1]), g.extent, translateExtent));
4459
+ }
4460
+ function mouseupped(event2) {
4461
+ v.on("mousemove.zoom mouseup.zoom", null);
4462
+ yesdrag(event2.view, g.moved);
4463
+ noevent_default3(event2);
4464
+ g.event(event2).end();
4465
+ }
4466
+ }
4467
+ function dblclicked(event, ...args) {
4468
+ if (!filter2.apply(this, arguments)) return;
4469
+ var t0 = this.__zoom, p0 = pointer_default(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
4470
+ noevent_default3(event);
4471
+ if (duration > 0) select_default2(this).transition().duration(duration).call(schedule, t1, p0, event);
4472
+ else select_default2(this).call(zoom.transform, t1, p0, event);
4473
+ }
4474
+ function touchstarted(event, ...args) {
4475
+ if (!filter2.apply(this, arguments)) return;
4476
+ var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p;
4477
+ nopropagation2(event);
4478
+ for (i = 0; i < n; ++i) {
4479
+ t = touches[i], p = pointer_default(t, this);
4480
+ p = [p, this.__zoom.invert(p), t.identifier];
4481
+ if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
4482
+ else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
4483
+ }
4484
+ if (touchstarting) touchstarting = clearTimeout(touchstarting);
4485
+ if (started) {
4486
+ if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() {
4487
+ touchstarting = null;
4488
+ }, touchDelay);
4489
+ interrupt_default(this);
4490
+ g.start();
4491
+ }
4492
+ }
4493
+ function touchmoved(event, ...args) {
4494
+ if (!this.__zooming) return;
4495
+ var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l;
4496
+ noevent_default3(event);
4497
+ for (i = 0; i < n; ++i) {
4498
+ t = touches[i], p = pointer_default(t, this);
4499
+ if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
4500
+ else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
4501
+ }
4502
+ t = g.that.__zoom;
4503
+ if (g.touch1) {
4504
+ var p0 = g.touch0[0], l0 = g.touch0[1], p1 = g.touch1[0], l1 = g.touch1[1], dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
4505
+ t = scale(t, Math.sqrt(dp / dl));
4506
+ p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
4507
+ l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
4508
+ } else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
4509
+ else return;
4510
+ g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
4511
+ }
4512
+ function touchended(event, ...args) {
4513
+ if (!this.__zooming) return;
4514
+ var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t;
4515
+ nopropagation2(event);
4516
+ if (touchending) clearTimeout(touchending);
4517
+ touchending = setTimeout(function() {
4518
+ touchending = null;
4519
+ }, touchDelay);
4520
+ for (i = 0; i < n; ++i) {
4521
+ t = touches[i];
4522
+ if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
4523
+ else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
4524
+ }
4525
+ if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
4526
+ if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
4527
+ else {
4528
+ g.end();
4529
+ if (g.taps === 2) {
4530
+ t = pointer_default(t, this);
4531
+ if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
4532
+ var p = select_default2(this).on("dblclick.zoom");
4533
+ if (p) p.apply(this, arguments);
4534
+ }
4535
+ }
4536
+ }
4537
+ }
4538
+ zoom.wheelDelta = function(_) {
4539
+ return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant_default5(+_), zoom) : wheelDelta;
4540
+ };
4541
+ zoom.filter = function(_) {
4542
+ return arguments.length ? (filter2 = typeof _ === "function" ? _ : constant_default5(!!_), zoom) : filter2;
4543
+ };
4544
+ zoom.touchable = function(_) {
4545
+ return arguments.length ? (touchable = typeof _ === "function" ? _ : constant_default5(!!_), zoom) : touchable;
4546
+ };
4547
+ zoom.extent = function(_) {
4548
+ return arguments.length ? (extent = typeof _ === "function" ? _ : constant_default5([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
4549
+ };
4550
+ zoom.scaleExtent = function(_) {
4551
+ return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
4552
+ };
4553
+ zoom.translateExtent = function(_) {
4554
+ return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
4555
+ };
4556
+ zoom.constrain = function(_) {
4557
+ return arguments.length ? (constrain = _, zoom) : constrain;
4558
+ };
4559
+ zoom.duration = function(_) {
4560
+ return arguments.length ? (duration = +_, zoom) : duration;
4561
+ };
4562
+ zoom.interpolate = function(_) {
4563
+ return arguments.length ? (interpolate = _, zoom) : interpolate;
4564
+ };
4565
+ zoom.on = function() {
4566
+ var value = listeners.on.apply(listeners, arguments);
4567
+ return value === listeners ? zoom : value;
4568
+ };
4569
+ zoom.clickDistance = function(_) {
4570
+ return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
4571
+ };
4572
+ zoom.tapDistance = function(_) {
4573
+ return arguments.length ? (tapDistance = +_, zoom) : tapDistance;
4574
+ };
4575
+ return zoom;
4576
+ }
4577
+
1198
4578
  // src/inspect.tsx
1199
4579
  var FIBER_PROP_EXPLANATIONS = {
1200
4580
  tag: "Numeric type identifier for this fiber (e.g. 1=FunctionComponent, 5=HostComponent)",
@@ -1215,17 +4595,496 @@ var FIBER_PROP_EXPLANATIONS = {
1215
4595
  childLanes: "Priority lanes for child updates"
1216
4596
  };
1217
4597
  var throttle = (fn, wait) => {
1218
- let timeout = null;
4598
+ let timeout2 = null;
1219
4599
  return function() {
1220
- if (!timeout) {
1221
- timeout = setTimeout(() => {
4600
+ if (!timeout2) {
4601
+ timeout2 = setTimeout(() => {
1222
4602
  fn.apply(this, arguments);
1223
- timeout = null;
4603
+ timeout2 = null;
1224
4604
  }, wait);
1225
4605
  }
1226
4606
  };
1227
4607
  };
1228
4608
  var isMac = typeof navigator !== "undefined" && navigator.platform.toLowerCase().includes("mac");
4609
+ var theme3 = {
4610
+ BASE_FONT_FAMILY: "Menlo, monospace",
4611
+ BASE_FONT_SIZE: "12px",
4612
+ BASE_LINE_HEIGHT: 1.2,
4613
+ BASE_BACKGROUND_COLOR: "none",
4614
+ BASE_COLOR: "#FFF",
4615
+ OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
4616
+ OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
4617
+ OBJECT_NAME_COLOR: "#FFC799",
4618
+ OBJECT_VALUE_NULL_COLOR: "#A0A0A0",
4619
+ OBJECT_VALUE_UNDEFINED_COLOR: "#A0A0A0",
4620
+ OBJECT_VALUE_REGEXP_COLOR: "#FF8080",
4621
+ OBJECT_VALUE_STRING_COLOR: "#99FFE4",
4622
+ OBJECT_VALUE_SYMBOL_COLOR: "#FFC799",
4623
+ OBJECT_VALUE_NUMBER_COLOR: "#FFC799",
4624
+ OBJECT_VALUE_BOOLEAN_COLOR: "#FFC799",
4625
+ OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "#FFC799",
4626
+ HTML_TAG_COLOR: "#FFC799",
4627
+ HTML_TAGNAME_COLOR: "#FFC799",
4628
+ HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
4629
+ HTML_ATTRIBUTE_NAME_COLOR: "#A0A0A0",
4630
+ HTML_ATTRIBUTE_VALUE_COLOR: "#99FFE4",
4631
+ HTML_COMMENT_COLOR: "#8b8b8b94",
4632
+ HTML_DOCTYPE_COLOR: "#A0A0A0",
4633
+ ARROW_COLOR: "#A0A0A0",
4634
+ ARROW_MARGIN_RIGHT: 3,
4635
+ ARROW_FONT_SIZE: 12,
4636
+ ARROW_ANIMATION_DURATION: "0",
4637
+ TREENODE_FONT_FAMILY: "Menlo, monospace",
4638
+ TREENODE_FONT_SIZE: "11px",
4639
+ TREENODE_LINE_HEIGHT: 1.2,
4640
+ TREENODE_PADDING_LEFT: 12,
4641
+ TABLE_BORDER_COLOR: "#282828",
4642
+ TABLE_TH_BACKGROUND_COLOR: "#161616",
4643
+ TABLE_TH_HOVER_COLOR: "#232323",
4644
+ TABLE_SORT_ICON_COLOR: "#A0A0A0",
4645
+ TABLE_DATA_BACKGROUND_IMAGE: "none",
4646
+ TABLE_DATA_BACKGROUND_SIZE: "0"
4647
+ };
4648
+ var ControlButton = React17.memo(
4649
+ ({ onClick, children: children2 }) => /* @__PURE__ */ React17.createElement(
4650
+ "button",
4651
+ {
4652
+ type: "button",
4653
+ onClick,
4654
+ onMouseEnter: (e) => {
4655
+ e.currentTarget.style.opacity = "1";
4656
+ },
4657
+ onMouseLeave: (e) => {
4658
+ e.currentTarget.style.opacity = "0.8";
4659
+ },
4660
+ style: {
4661
+ padding: "0.5ch 0.75ch",
4662
+ background: "transparent",
4663
+ border: "1px solid #282828",
4664
+ color: "#FFF",
4665
+ borderRadius: "0.25rem",
4666
+ cursor: "pointer",
4667
+ fontSize: "0.75rem",
4668
+ lineHeight: 1,
4669
+ opacity: 0.8,
4670
+ transition: "opacity 150ms"
4671
+ }
4672
+ },
4673
+ children2
4674
+ )
4675
+ );
4676
+ var Controls = React17.memo(
4677
+ ({
4678
+ onZoomIn,
4679
+ onZoomOut,
4680
+ onReset,
4681
+ onFit
4682
+ }) => /* @__PURE__ */ React17.createElement(
4683
+ "div",
4684
+ {
4685
+ style: {
4686
+ position: "absolute",
4687
+ right: "1ch",
4688
+ bottom: "1ch",
4689
+ display: "flex",
4690
+ gap: "0.5ch",
4691
+ zIndex: 1,
4692
+ background: "#161616",
4693
+ padding: "0.5ch",
4694
+ borderRadius: "0.25rem",
4695
+ border: "1px solid #282828"
4696
+ }
4697
+ },
4698
+ /* @__PURE__ */ React17.createElement(ControlButton, { onClick: onZoomIn }, "+"),
4699
+ /* @__PURE__ */ React17.createElement(ControlButton, { onClick: onZoomOut }, "-"),
4700
+ /* @__PURE__ */ React17.createElement(ControlButton, { onClick: onReset }, "Reset"),
4701
+ /* @__PURE__ */ React17.createElement(ControlButton, { onClick: onFit }, "Fit")
4702
+ )
4703
+ );
4704
+ var BackButton = React17.memo(({ onClick }) => /* @__PURE__ */ React17.createElement(
4705
+ "button",
4706
+ {
4707
+ type: "button",
4708
+ onClick,
4709
+ style: {
4710
+ padding: "0.5ch 1ch",
4711
+ background: "#161616",
4712
+ border: "1px solid #282828",
4713
+ color: "#FFF",
4714
+ borderRadius: "0.25rem",
4715
+ cursor: "pointer",
4716
+ fontSize: "0.875rem",
4717
+ opacity: 0.8,
4718
+ transition: "opacity 150ms"
4719
+ },
4720
+ onMouseEnter: (e) => {
4721
+ e.currentTarget.style.opacity = "1";
4722
+ },
4723
+ onMouseLeave: (e) => {
4724
+ e.currentTarget.style.opacity = "0.8";
4725
+ }
4726
+ },
4727
+ "\u2190 Back"
4728
+ ));
4729
+ var BreadcrumbButton = React17.memo(
4730
+ ({
4731
+ name,
4732
+ onClick,
4733
+ onKeyDown
4734
+ }) => /* @__PURE__ */ React17.createElement(
4735
+ "button",
4736
+ {
4737
+ type: "button",
4738
+ onClick,
4739
+ onKeyDown,
4740
+ style: {
4741
+ cursor: "pointer",
4742
+ textDecoration: "underline",
4743
+ color: "#A0A0A0",
4744
+ background: "none",
4745
+ border: "none",
4746
+ padding: 0,
4747
+ font: "inherit"
4748
+ },
4749
+ onMouseEnter: (e) => {
4750
+ e.currentTarget.style.backgroundColor = "#232323";
4751
+ e.currentTarget.style.color = "#FFF";
4752
+ },
4753
+ onMouseLeave: (e) => {
4754
+ e.currentTarget.style.backgroundColor = "";
4755
+ e.currentTarget.style.color = "#A0A0A0";
4756
+ }
4757
+ },
4758
+ name
4759
+ )
4760
+ );
4761
+ var CloseButton = React17.memo(({ onClick }) => /* @__PURE__ */ React17.createElement(
4762
+ "button",
4763
+ {
4764
+ type: "button",
4765
+ onClick,
4766
+ style: {
4767
+ border: "none",
4768
+ background: "none",
4769
+ cursor: "pointer",
4770
+ padding: "0.5ch",
4771
+ fontSize: "2ch",
4772
+ opacity: 0.5,
4773
+ color: "#FFF"
4774
+ }
4775
+ },
4776
+ "\xD7"
4777
+ ));
4778
+ var FiberGraph = React17.memo(
4779
+ ({
4780
+ fiber,
4781
+ onFiberSelect,
4782
+ isDialogMode = true
4783
+ }) => {
4784
+ const svgRef = useRef(null);
4785
+ const [svgWidth, setSvgWidth] = useState(0);
4786
+ const [svgHeight, setSvgHeight] = useState(0);
4787
+ const svgGroupRef = useRef(null);
4788
+ const zoomRef = useRef();
4789
+ const linksGroupRef = useRef(null);
4790
+ const nodesGroupRef = useRef(null);
4791
+ const { nodes, links } = useMemo(() => {
4792
+ const nodes2 = [];
4793
+ const links2 = [];
4794
+ const nodeMap = /* @__PURE__ */ new Map();
4795
+ let nodeCounter = 0;
4796
+ const baseId = getFiberId(fiber).toString();
4797
+ const rootId = `${baseId}-${nodeCounter++}`;
4798
+ const rootName = typeof fiber.type === "string" ? fiber.type : fiber.type === null && fiber.tag === HostRootTag ? "#root" : fiber.type === null && fiber.tag === HostTextTag ? "#text" : getDisplayName(fiber.type) || fiber.type?.name || fiber.type?.displayName || "Component";
4799
+ const rootNode = {
4800
+ id: rootId,
4801
+ name: rootName,
4802
+ fiber,
4803
+ depth: 0
4804
+ };
4805
+ nodes2.push(rootNode);
4806
+ nodeMap.set(rootId, rootNode);
4807
+ if (fiber.child) {
4808
+ const stack2 = [
4809
+ {
4810
+ fiber: fiber.child,
4811
+ parentId: rootId,
4812
+ depth: 1
4813
+ }
4814
+ ];
4815
+ while (stack2.length > 0) {
4816
+ const current = stack2.pop();
4817
+ if (!current) continue;
4818
+ const { fiber: currentFiber, parentId, depth } = current;
4819
+ if (currentFiber.tag === FragmentTag) {
4820
+ if (currentFiber.child) {
4821
+ stack2.push({
4822
+ fiber: currentFiber.child,
4823
+ parentId,
4824
+ depth
4825
+ });
4826
+ }
4827
+ if (currentFiber.sibling && currentFiber.return === currentFiber.sibling.return) {
4828
+ stack2.push({
4829
+ fiber: currentFiber.sibling,
4830
+ parentId: currentFiber.return ? nodeMap.get(getFiberId(currentFiber.return).toString())?.id || parentId : parentId,
4831
+ depth
4832
+ });
4833
+ }
4834
+ continue;
4835
+ }
4836
+ if (currentFiber.type === null && isHostFiber(currentFiber)) {
4837
+ if (currentFiber.child) {
4838
+ stack2.push({
4839
+ fiber: currentFiber.child,
4840
+ parentId,
4841
+ depth
4842
+ });
4843
+ }
4844
+ if (currentFiber.sibling && currentFiber.return === currentFiber.sibling.return) {
4845
+ stack2.push({
4846
+ fiber: currentFiber.sibling,
4847
+ parentId: currentFiber.return ? nodeMap.get(getFiberId(currentFiber.return).toString())?.id || parentId : parentId,
4848
+ depth
4849
+ });
4850
+ }
4851
+ continue;
4852
+ }
4853
+ const childId = `${getFiberId(currentFiber)}-${nodeCounter++}`;
4854
+ let name = "unknown";
4855
+ if (typeof currentFiber.type === "string") {
4856
+ name = currentFiber.type;
4857
+ } else if (currentFiber.type === null && currentFiber.tag === HostTextTag) {
4858
+ const text = currentFiber.stateNode?.nodeValue?.trim() || "";
4859
+ if (text) {
4860
+ name = text.length > 20 ? `"${text.slice(0, 20)}..."` : `"${text}"`;
4861
+ } else {
4862
+ name = "#text";
4863
+ }
4864
+ } else if (currentFiber.type === null && currentFiber.tag === HostRootTag) {
4865
+ name = "#root";
4866
+ } else {
4867
+ name = getDisplayName(currentFiber.type) || currentFiber.type?.name || currentFiber.type?.displayName || "Component";
4868
+ }
4869
+ const node = {
4870
+ id: childId,
4871
+ name,
4872
+ fiber: currentFiber,
4873
+ depth
4874
+ };
4875
+ nodes2.push(node);
4876
+ nodeMap.set(childId, node);
4877
+ links2.push({
4878
+ source: parentId,
4879
+ target: childId
4880
+ });
4881
+ if (currentFiber.child) {
4882
+ stack2.push({
4883
+ fiber: currentFiber.child,
4884
+ parentId: childId,
4885
+ depth: depth + 1
4886
+ });
4887
+ }
4888
+ if (currentFiber.sibling && currentFiber.return === currentFiber.sibling.return) {
4889
+ stack2.push({
4890
+ fiber: currentFiber.sibling,
4891
+ parentId: currentFiber.return ? nodeMap.get(getFiberId(currentFiber.return).toString())?.id || parentId : parentId,
4892
+ depth
4893
+ });
4894
+ }
4895
+ }
4896
+ }
4897
+ return { nodes: nodes2, links: links2 };
4898
+ }, [fiber]);
4899
+ const { descendants, treeLinks } = useMemo(() => {
4900
+ if (!svgWidth || !svgHeight || nodes.length === 0) {
4901
+ return { descendants: [], treeLinks: [] };
4902
+ }
4903
+ const stratify = stratify_default().id((d) => d.id).parentId((d) => {
4904
+ if (d.id === nodes[0].id) return null;
4905
+ const parentLink = links.find((link2) => link2.target === d.id);
4906
+ if (parentLink?.source && nodes.some((n) => n.id === parentLink.source)) {
4907
+ return parentLink.source.toString();
4908
+ }
4909
+ return null;
4910
+ });
4911
+ try {
4912
+ const root2 = stratify(nodes);
4913
+ if (!root2) return { descendants: [], treeLinks: [] };
4914
+ const treeLayout = tree_default().size([svgWidth - 200, svgHeight - 100]).nodeSize([180, 200]);
4915
+ const treeData = treeLayout(root2);
4916
+ return {
4917
+ descendants: treeData.descendants(),
4918
+ treeLinks: treeData.links()
4919
+ };
4920
+ } catch (e) {
4921
+ console.error("Error creating tree layout:", e);
4922
+ return { descendants: [], treeLinks: [] };
4923
+ }
4924
+ }, [nodes, links, svgWidth, svgHeight]);
4925
+ useEffect(() => {
4926
+ if (!svgRef.current || !svgGroupRef.current) return;
4927
+ const zoom = zoom_default2().extent([
4928
+ [0, 0],
4929
+ [svgWidth, svgHeight]
4930
+ ]).scaleExtent([0.2, 8]).on("zoom", ({ transform: transform2 }) => {
4931
+ if (!svgGroupRef.current) return;
4932
+ svgGroupRef.current.style.transform = `translate(${transform2.x}px, ${transform2.y}px) scale(${transform2.k})`;
4933
+ });
4934
+ zoomRef.current = zoom;
4935
+ select_default2(svgRef.current).call(zoom);
4936
+ if (!isDialogMode) {
4937
+ const scale = 0.4;
4938
+ const x2 = svgWidth / 2;
4939
+ const y2 = svgHeight / 3;
4940
+ select_default2(svgRef.current).call(
4941
+ zoom.transform,
4942
+ identity2.translate(x2, y2).scale(scale)
4943
+ );
4944
+ }
4945
+ return () => {
4946
+ if (svgRef.current) {
4947
+ select_default2(svgRef.current).on(".zoom", null);
4948
+ }
4949
+ };
4950
+ }, [svgWidth, svgHeight, isDialogMode]);
4951
+ useEffect(() => {
4952
+ if (!linksGroupRef.current || treeLinks.length === 0) return;
4953
+ select_default2(linksGroupRef.current).selectAll("path").data(treeLinks).join("path").attr(
4954
+ "d",
4955
+ linkVertical().x((d) => d.x).y((d) => d.y)
4956
+ ).attr("fill", "none").attr("stroke", "#404040").attr("stroke-width", "2");
4957
+ }, [treeLinks]);
4958
+ useEffect(() => {
4959
+ if (!nodesGroupRef.current || descendants.length === 0) return;
4960
+ const nodeElements = select_default2(nodesGroupRef.current).selectAll("g").data(descendants, (d) => d.data.id);
4961
+ nodeElements.exit().remove();
4962
+ const nodeEnter = nodeElements.enter().append("g").attr("transform", (d) => `translate(${d.x},${d.y})`).style("cursor", "pointer").on("click", (event, d) => {
4963
+ event.stopPropagation();
4964
+ const element = getNearestHostFiber(d.data.fiber)?.stateNode;
4965
+ if (element instanceof HTMLElement) {
4966
+ element.scrollIntoView({ behavior: "smooth", block: "center" });
4967
+ const originalOutline = element.style.outline;
4968
+ const originalTransition = element.style.transition;
4969
+ element.style.outline = "2px solid #FFC799";
4970
+ element.style.transition = "outline 0.1s ease-in-out";
4971
+ setTimeout(() => {
4972
+ element.style.outline = originalOutline;
4973
+ element.style.transition = originalTransition;
4974
+ }, 1e3);
4975
+ }
4976
+ onFiberSelect?.(d.data.fiber);
4977
+ });
4978
+ const nodeUpdate = nodeElements.merge(nodeEnter);
4979
+ nodeUpdate.attr("transform", (d) => `translate(${d.x},${d.y})`);
4980
+ const updateRect = (selection2) => {
4981
+ selection2.each(function(d) {
4982
+ const g = select_default2(this);
4983
+ const isRoot = d.data.id === nodes[0].id;
4984
+ const isPreview = !isDialogMode;
4985
+ const scale = isRoot ? isPreview ? 2 : 1.75 : 1;
4986
+ const rect = g.selectAll("rect").data([d]).join("rect").attr("x", -75 * scale).attr("y", -30 * scale).attr("width", 150 * scale).attr("height", 60 * scale).attr("rx", 6 * scale).attr("fill", isCompositeFiber(d.data.fiber) ? "#FFF" : "#232323").attr("stroke", "#505050").attr("stroke-width", isRoot ? "3" : "2");
4987
+ rect.on("mouseover", function() {
4988
+ select_default2(this).attr("stroke", "#808080").attr("stroke-width", isRoot ? "4" : "3");
4989
+ }).on("mouseout", function() {
4990
+ select_default2(this).attr("stroke", "#505050").attr("stroke-width", isRoot ? "3" : "2");
4991
+ });
4992
+ g.selectAll("text.name").data([d]).join("text").attr("class", "name").attr("text-anchor", "middle").attr("dy", `${-0.6 * scale}em`).attr("fill", isCompositeFiber(d.data.fiber) ? "#000" : "#FFF").attr("font-weight", "500").attr(
4993
+ "font-size",
4994
+ isRoot ? isPreview ? "1.75em" : "1.5em" : "1em"
4995
+ ).text(d.data.name);
4996
+ g.selectAll("text.props").data([d]).join("text").attr("class", "props").attr("text-anchor", "middle").attr("dy", `${0.9 * scale}em`).attr("fill", isCompositeFiber(d.data.fiber) ? "#666" : "#999").attr(
4997
+ "font-size",
4998
+ isRoot ? isPreview ? "1.25em" : "1.1em" : "0.75em"
4999
+ ).text(() => {
5000
+ const props = d.data.fiber.memoizedProps;
5001
+ if (!props || typeof props !== "object") return "";
5002
+ const propNames = Object.keys(props);
5003
+ if (propNames.length === 0) return "";
5004
+ const displayProps = propNames.slice(0, 3);
5005
+ if (propNames.length > 3) {
5006
+ return `${displayProps.join(", ")}...`;
5007
+ }
5008
+ return displayProps.join(", ");
5009
+ });
5010
+ });
5011
+ };
5012
+ updateRect(nodeUpdate);
5013
+ }, [descendants, nodes, isDialogMode, onFiberSelect]);
5014
+ const handleZoomIn = useCallback(() => {
5015
+ if (!svgRef.current || !zoomRef.current) return;
5016
+ select_default2(svgRef.current).transition().duration(200).call(zoomRef.current.scaleBy, 1.5);
5017
+ }, []);
5018
+ const handleZoomOut = useCallback(() => {
5019
+ if (!svgRef.current || !zoomRef.current) return;
5020
+ select_default2(svgRef.current).transition().duration(200).call(zoomRef.current.scaleBy, 0.75);
5021
+ }, []);
5022
+ const handleReset = useCallback(() => {
5023
+ if (!svgRef.current || !zoomRef.current) return;
5024
+ select_default2(svgRef.current).transition().duration(200).call(zoomRef.current.transform, identity2);
5025
+ }, []);
5026
+ const handleFit = useCallback(() => {
5027
+ if (!svgRef.current || !svgGroupRef.current || !zoomRef.current) return;
5028
+ const bounds = svgGroupRef.current.getBBox();
5029
+ const fullWidth = svgWidth;
5030
+ const fullHeight = svgHeight;
5031
+ const width = bounds.width;
5032
+ const height = bounds.height;
5033
+ const midX = bounds.x + width / 2;
5034
+ const midY = bounds.y + height / 2;
5035
+ const scale = 0.9 / Math.max(width / fullWidth, height / fullHeight);
5036
+ const translate = [
5037
+ fullWidth / 2 - scale * midX,
5038
+ fullHeight / 2 - scale * midY
5039
+ ];
5040
+ select_default2(svgRef.current).transition().duration(200).call(
5041
+ zoomRef.current.transform,
5042
+ identity2.translate(translate[0], translate[1]).scale(scale)
5043
+ );
5044
+ }, [svgWidth, svgHeight]);
5045
+ useEffect(() => {
5046
+ if (!svgRef.current) return;
5047
+ const resizeObserver = new ResizeObserver(() => {
5048
+ if (!svgRef.current) return;
5049
+ setSvgWidth(svgRef.current.clientWidth);
5050
+ setSvgHeight(svgRef.current.clientHeight);
5051
+ });
5052
+ resizeObserver.observe(svgRef.current);
5053
+ return () => resizeObserver.disconnect();
5054
+ }, []);
5055
+ useEffect(() => {
5056
+ if (nodes.length > 0) {
5057
+ setTimeout(handleFit, 0);
5058
+ }
5059
+ }, [nodes.length, handleFit]);
5060
+ return /* @__PURE__ */ React17.createElement("div", { style: { height: "50ch", marginTop: "2ch" } }, /* @__PURE__ */ React17.createElement(
5061
+ Controls,
5062
+ {
5063
+ onZoomIn: handleZoomIn,
5064
+ onZoomOut: handleZoomOut,
5065
+ onReset: handleReset,
5066
+ onFit: handleFit
5067
+ }
5068
+ ), /* @__PURE__ */ React17.createElement(
5069
+ "svg",
5070
+ {
5071
+ ref: svgRef,
5072
+ viewBox: `0 0 ${svgWidth} ${svgHeight}`,
5073
+ xmlns: "http://www.w3.org/2000/svg",
5074
+ style: {
5075
+ width: "100%",
5076
+ height: "100%",
5077
+ background: "#101010",
5078
+ borderRadius: "0.25rem",
5079
+ cursor: "grab"
5080
+ },
5081
+ "aria-label": "Fiber Tree Visualization"
5082
+ },
5083
+ /* @__PURE__ */ React17.createElement("title", null, "Fiber Tree Visualization"),
5084
+ /* @__PURE__ */ React17.createElement("g", { ref: svgGroupRef }, /* @__PURE__ */ React17.createElement("g", { ref: linksGroupRef, className: "links" }), /* @__PURE__ */ React17.createElement("g", { ref: nodesGroupRef, className: "nodes" }))
5085
+ ));
5086
+ }
5087
+ );
1229
5088
  var Inspector2 = React17.memo(
1230
5089
  ({ enabled = true, dangerouslyRunInProduction = false }) => {
1231
5090
  const [element, setElement] = useState(null);
@@ -1238,12 +5097,12 @@ var Inspector2 = React17.memo(
1238
5097
  top: 0,
1239
5098
  left: 0
1240
5099
  });
1241
- const getFiberForDisplay = () => {
5100
+ const [fiberHistory, setFiberHistory] = useState([]);
5101
+ const getFiberForDisplay = useCallback(() => {
1242
5102
  if (selectedFiber) return selectedFiber;
1243
5103
  const fiber2 = getFiberFromHostInstance(element);
1244
- if (!fiber2) return null;
1245
- return fiber2.return && isCompositeFiber(fiber2.return) ? fiber2.return : fiber2;
1246
- };
5104
+ return fiber2;
5105
+ }, [selectedFiber, element]);
1247
5106
  const handlePropertyHover = (_e, propName) => {
1248
5107
  if (!isDialogMode) return;
1249
5108
  const explanation = FIBER_PROP_EXPLANATIONS[propName];
@@ -1252,22 +5111,51 @@ var Inspector2 = React17.memo(
1252
5111
  const handlePropertyLeave = () => {
1253
5112
  setTooltip(null);
1254
5113
  };
5114
+ const handleFiberSelect = (fiber2) => {
5115
+ if (fiber2 !== selectedFiber) {
5116
+ if (!isDialogMode) {
5117
+ const currentFiber = getFiberForDisplay();
5118
+ if (currentFiber) {
5119
+ setFiberHistory([currentFiber]);
5120
+ }
5121
+ setIsDialogMode(true);
5122
+ } else if (selectedFiber) {
5123
+ setFiberHistory((prev) => [...prev, selectedFiber]);
5124
+ }
5125
+ setSelectedFiber(fiber2);
5126
+ }
5127
+ };
5128
+ const handleClose = useCallback(() => {
5129
+ setIsDialogMode(false);
5130
+ setFiberHistory([]);
5131
+ setTooltip(null);
5132
+ setSelectedFiber(null);
5133
+ setElement(null);
5134
+ setRect(null);
5135
+ }, []);
1255
5136
  useEffect(() => {
1256
5137
  const handleKeyDown = (e) => {
1257
5138
  if (e.key === "o" && (e.metaKey || e.ctrlKey) && rect) {
1258
5139
  e.preventDefault();
5140
+ const currentFiber = getFiberForDisplay();
5141
+ if (currentFiber) {
5142
+ setFiberHistory([currentFiber]);
5143
+ }
1259
5144
  setIsDialogMode(true);
1260
- } else if (e.key === "Escape" && isDialogMode) {
1261
- setIsDialogMode(false);
1262
- setTooltip(null);
5145
+ } else if (e.key === "Escape") {
5146
+ handleClose();
1263
5147
  }
1264
5148
  };
1265
5149
  window.addEventListener("keydown", handleKeyDown);
1266
5150
  return () => window.removeEventListener("keydown", handleKeyDown);
1267
- }, [rect, isDialogMode]);
5151
+ }, [rect, getFiberForDisplay, handleClose]);
1268
5152
  useEffect(() => {
1269
5153
  if (!isDialogMode) {
1270
5154
  setTooltip(null);
5155
+ setFiberHistory([]);
5156
+ setSelectedFiber(null);
5157
+ setElement(null);
5158
+ setRect(null);
1271
5159
  }
1272
5160
  }, [isDialogMode]);
1273
5161
  useEffect(() => {
@@ -1294,11 +5182,16 @@ var Inspector2 = React17.memo(
1294
5182
  setSelectedFiber(null);
1295
5183
  return;
1296
5184
  }
1297
- const element2 = document.elementFromPoint(event.clientX, event.clientY);
1298
- if (!element2) return;
1299
- setElement(element2);
1300
- setRect(element2.getBoundingClientRect());
1301
- setSelectedFiber(null);
5185
+ if (!isDialogMode) {
5186
+ const element2 = document.elementFromPoint(
5187
+ event.clientX,
5188
+ event.clientY
5189
+ );
5190
+ if (!element2) return;
5191
+ setElement(element2);
5192
+ setRect(element2.getBoundingClientRect());
5193
+ setSelectedFiber(null);
5194
+ }
1302
5195
  };
1303
5196
  const throttledMouseMove = throttle(handleMouseMove, 16);
1304
5197
  document.addEventListener("mousemove", throttledMouseMove);
@@ -1344,7 +5237,14 @@ var Inspector2 = React17.memo(
1344
5237
  }
1345
5238
  }
1346
5239
  }, [selectedFiber]);
1347
- if (window.innerWidth < 800 || !rect || !isActive) return null;
5240
+ const handleBack = () => {
5241
+ const previousFiber = fiberHistory[fiberHistory.length - 1];
5242
+ if (previousFiber) {
5243
+ setFiberHistory((prev) => prev.slice(0, -1));
5244
+ setSelectedFiber(previousFiber);
5245
+ }
5246
+ };
5247
+ if (!rect || !isActive) return null;
1348
5248
  const fiber = getFiberForDisplay();
1349
5249
  if (!fiber) return null;
1350
5250
  let foundInspect = false;
@@ -1369,7 +5269,9 @@ var Inspector2 = React17.memo(
1369
5269
  maxWidth: "none",
1370
5270
  maxHeight: "none",
1371
5271
  padding: "2ch",
1372
- boxShadow: "0 0 0 5px rgba(0, 0, 0, 0.1)",
5272
+ boxShadow: "0 0 0 5px rgba(0, 0, 0, 0.3)",
5273
+ backgroundColor: "#1a1a1a",
5274
+ border: "1px solid #333",
1373
5275
  zIndex: 1e3
1374
5276
  } : {};
1375
5277
  const overlayStyle = isDialogMode ? {
@@ -1378,7 +5280,7 @@ var Inspector2 = React17.memo(
1378
5280
  left: 0,
1379
5281
  right: 0,
1380
5282
  bottom: 0,
1381
- backgroundColor: "rgba(0, 0, 0, 0.5)",
5283
+ backgroundColor: "rgba(0, 0, 0, 0.7)",
1382
5284
  zIndex: 999
1383
5285
  } : {};
1384
5286
  const fiberStack = fiber ? getFiberStack(fiber) : [];
@@ -1386,8 +5288,12 @@ var Inspector2 = React17.memo(
1386
5288
  "div",
1387
5289
  {
1388
5290
  style: overlayStyle,
1389
- onClick: () => setIsDialogMode(false),
1390
- onKeyDown: (e) => e.key === "Escape" && setIsDialogMode(false),
5291
+ onClick: handleClose,
5292
+ onKeyDown: (e) => {
5293
+ if (e.key === "Escape") {
5294
+ handleClose();
5295
+ }
5296
+ },
1391
5297
  role: "button",
1392
5298
  tabIndex: 0
1393
5299
  }
@@ -1396,15 +5302,16 @@ var Inspector2 = React17.memo(
1396
5302
  {
1397
5303
  style: {
1398
5304
  position: "fixed",
1399
- backgroundColor: "white",
5305
+ backgroundColor: "#101010",
5306
+ color: "#FFF",
1400
5307
  zIndex: 50,
1401
5308
  padding: "1ch",
1402
5309
  width: "50ch",
1403
- height: "40ch",
5310
+ height: isDialogMode ? "80ch" : "40ch",
1404
5311
  transition: "all 150ms, z-index 0ms",
1405
5312
  overflow: "visible",
1406
- boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1)",
1407
- border: "1px solid black",
5313
+ boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.3)",
5314
+ border: "1px solid #282828",
1408
5315
  top: position.top,
1409
5316
  left: position.left,
1410
5317
  opacity: rect ? 1 : 0,
@@ -1421,16 +5328,16 @@ var Inspector2 = React17.memo(
1421
5328
  style: {
1422
5329
  display: "flex",
1423
5330
  justifyContent: "space-between",
1424
- alignItems: "center",
1425
- marginBottom: "1ch"
5331
+ alignItems: "center"
1426
5332
  }
1427
5333
  },
1428
- /* @__PURE__ */ React17.createElement(
5334
+ /* @__PURE__ */ React17.createElement("div", { style: { display: "flex", alignItems: "center", gap: "1ch" } }, fiberHistory.length > 0 && /* @__PURE__ */ React17.createElement(BackButton, { onClick: handleBack }), /* @__PURE__ */ React17.createElement(
1429
5335
  "h3",
1430
5336
  {
1431
5337
  style: {
1432
5338
  fontSize: "0.875rem",
1433
- backgroundColor: "#f5f5f5",
5339
+ backgroundColor: "#161616",
5340
+ color: "#FFF",
1434
5341
  padding: "0 0.5ch",
1435
5342
  borderRadius: "0.125rem",
1436
5343
  width: "fit-content",
@@ -1449,124 +5356,33 @@ var Inspector2 = React17.memo(
1449
5356
  },
1450
5357
  `Press ${isMac ? "\u2318" : "ctrl"}O to expand`
1451
5358
  )
1452
- ),
1453
- isDialogMode && fiber.child && /* @__PURE__ */ React17.createElement(
1454
- "div",
1455
- {
1456
- style: {
1457
- marginTop: "1ch",
1458
- marginBottom: "1ch",
1459
- marginRight: "auto",
1460
- marginLeft: "1ch",
1461
- fontSize: "0.75rem",
1462
- display: "flex",
1463
- flexWrap: "wrap",
1464
- gap: "0.5ch"
1465
- }
1466
- },
1467
- /* @__PURE__ */ React17.createElement("span", { style: { opacity: 0.5 } }, "Children:"),
1468
- /* @__PURE__ */ React17.createElement(
1469
- "div",
1470
- {
1471
- style: { display: "flex", flexWrap: "wrap", gap: "0.5ch" }
1472
- },
1473
- (() => {
1474
- const children = [];
1475
- let currentChild = fiber.child;
1476
- while (currentChild !== null) {
1477
- children.push(currentChild);
1478
- currentChild = currentChild.sibling;
1479
- }
1480
- return children.map((child) => {
1481
- const name = typeof child.type === "string" ? child.type : getDisplayName(child.type) || "unknown";
1482
- return /* @__PURE__ */ React17.createElement(
1483
- "button",
1484
- {
1485
- key: getFiberId(child),
1486
- type: "button",
1487
- onClick: () => {
1488
- setSelectedFiber(child);
1489
- const element2 = getNearestHostFiber(child)?.stateNode;
1490
- if (element2) {
1491
- setElement(element2);
1492
- setRect(element2.getBoundingClientRect());
1493
- }
1494
- },
1495
- onKeyDown: (e) => {
1496
- if (e.key === "Enter" || e.key === " ") {
1497
- setSelectedFiber(child);
1498
- const element2 = getNearestHostFiber(child)?.stateNode;
1499
- if (element2) {
1500
- setElement(element2);
1501
- setRect(element2.getBoundingClientRect());
1502
- }
1503
- }
1504
- },
1505
- style: {
1506
- cursor: "pointer",
1507
- padding: "0 0.5ch",
1508
- background: "#f5f5f5",
1509
- border: "1px solid #eee",
1510
- borderRadius: "0.125rem",
1511
- fontSize: "inherit",
1512
- color: "#666"
1513
- },
1514
- onMouseEnter: (e) => {
1515
- e.currentTarget.style.backgroundColor = "#000";
1516
- e.currentTarget.style.color = "#fff";
1517
- e.currentTarget.style.borderColor = "#000";
1518
- },
1519
- onMouseLeave: (e) => {
1520
- e.currentTarget.style.backgroundColor = "#f5f5f5";
1521
- e.currentTarget.style.color = "#666";
1522
- e.currentTarget.style.borderColor = "#eee";
1523
- }
1524
- },
1525
- name
1526
- );
1527
- });
1528
- })()
1529
- )
1530
- ),
1531
- isDialogMode && /* @__PURE__ */ React17.createElement(
1532
- "button",
1533
- {
1534
- type: "button",
1535
- onClick: () => setIsDialogMode(false),
1536
- style: {
1537
- border: "none",
1538
- background: "none",
1539
- cursor: "pointer",
1540
- padding: "0.5ch",
1541
- fontSize: "2ch",
1542
- opacity: 0.5
1543
- }
1544
- },
1545
- "\xD7"
1546
- )
5359
+ )),
5360
+ isDialogMode && /* @__PURE__ */ React17.createElement(CloseButton, { onClick: handleClose })
1547
5361
  ),
1548
5362
  isDialogMode && /* @__PURE__ */ React17.createElement(
1549
5363
  "div",
1550
5364
  {
1551
5365
  style: {
1552
- borderTop: "1px solid #eee",
5366
+ borderTop: "1px solid #282828",
1553
5367
  padding: "0.5ch 0",
1554
5368
  fontSize: "0.75rem",
1555
- color: "#666",
5369
+ color: "#A0A0A0",
1556
5370
  whiteSpace: "nowrap",
1557
5371
  overflow: "hidden",
1558
- textOverflow: "ellipsis",
1559
- marginBottom: "2ch"
5372
+ textOverflow: "ellipsis"
1560
5373
  }
1561
5374
  },
1562
5375
  fiberStack.reverse().map((f, i, arr) => {
1563
5376
  const name = typeof f.type === "string" ? f.type : getDisplayName(f.type) || "unknown";
1564
5377
  if (!name) return null;
1565
5378
  return /* @__PURE__ */ React17.createElement(React17.Fragment, { key: getFiberId(f) }, /* @__PURE__ */ React17.createElement(
1566
- "button",
5379
+ BreadcrumbButton,
1567
5380
  {
1568
- type: "button",
5381
+ name,
1569
5382
  onClick: () => {
5383
+ if (selectedFiber) {
5384
+ setFiberHistory((prev) => [...prev, selectedFiber]);
5385
+ }
1570
5386
  setSelectedFiber(f);
1571
5387
  const element2 = getNearestHostFiber(f)?.stateNode;
1572
5388
  if (element2) {
@@ -1576,6 +5392,9 @@ var Inspector2 = React17.memo(
1576
5392
  },
1577
5393
  onKeyDown: (e) => {
1578
5394
  if (e.key === "Enter" || e.key === " ") {
5395
+ if (selectedFiber) {
5396
+ setFiberHistory((prev) => [...prev, selectedFiber]);
5397
+ }
1579
5398
  setSelectedFiber(f);
1580
5399
  const element2 = getNearestHostFiber(f)?.stateNode;
1581
5400
  if (element2) {
@@ -1583,43 +5402,38 @@ var Inspector2 = React17.memo(
1583
5402
  setRect(element2.getBoundingClientRect());
1584
5403
  }
1585
5404
  }
1586
- },
1587
- style: {
1588
- cursor: "pointer",
1589
- textDecoration: "underline",
1590
- color: "#666",
1591
- background: "none",
1592
- border: "none",
1593
- padding: 0,
1594
- font: "inherit"
1595
- },
1596
- onMouseEnter: (e) => {
1597
- e.currentTarget.style.backgroundColor = "#000";
1598
- e.currentTarget.style.color = "#fff";
1599
- },
1600
- onMouseLeave: (e) => {
1601
- e.currentTarget.style.backgroundColor = "";
1602
- e.currentTarget.style.color = "#666";
1603
5405
  }
1604
- },
1605
- name
5406
+ }
1606
5407
  ), i < arr.length - 1 && " > ");
1607
5408
  })
1608
5409
  ),
5410
+ fiber && /* @__PURE__ */ React17.createElement(
5411
+ FiberGraph,
5412
+ {
5413
+ key: getFiberId(fiber),
5414
+ fiber,
5415
+ onFiberSelect: handleFiberSelect,
5416
+ isDialogMode
5417
+ }
5418
+ ),
1609
5419
  /* @__PURE__ */ React17.createElement(
1610
5420
  "div",
1611
5421
  {
1612
5422
  onMouseLeave: handlePropertyLeave,
1613
5423
  style: {
1614
- flex: 1,
1615
- overflow: "auto"
5424
+ flex: isDialogMode ? 1 : "none",
5425
+ overflow: "auto",
5426
+ marginTop: "1ch",
5427
+ borderTop: "1px solid #282828",
5428
+ paddingTop: "1ch"
1616
5429
  }
1617
5430
  },
1618
5431
  /* @__PURE__ */ React17.createElement(
1619
5432
  Inspector,
1620
5433
  {
5434
+ theme: theme3,
1621
5435
  data: fiber,
1622
- expandLevel: 1,
5436
+ expandLevel: isDialogMode ? 1 : 0,
1623
5437
  table: false,
1624
5438
  nodeRenderer: (props) => {
1625
5439
  const Component = props.depth === 0 ? ObjectRootLabel : ObjectLabel;
@@ -1654,14 +5468,16 @@ var Inspector2 = React17.memo(
1654
5468
  style: {
1655
5469
  position: "absolute",
1656
5470
  zIndex: 1001,
1657
- backgroundColor: "#000",
1658
- color: "white",
5471
+ backgroundColor: "#161616",
5472
+ color: "#FFF",
1659
5473
  bottom: "2ch",
1660
5474
  right: "2ch",
1661
5475
  pointerEvents: "none",
1662
5476
  overflowY: "auto",
1663
5477
  padding: "1ch",
1664
- fontSize: "1ch"
5478
+ fontSize: "1ch",
5479
+ border: "1px solid #282828",
5480
+ borderRadius: "0.25ch"
1665
5481
  }
1666
5482
  },
1667
5483
  tooltip
@@ -1674,7 +5490,7 @@ var Inspector2 = React17.memo(
1674
5490
  zIndex: 40,
1675
5491
  pointerEvents: "none",
1676
5492
  transition: "all 150ms",
1677
- border: "1px dashed #a3a3a3",
5493
+ border: "1px dashed #505050",
1678
5494
  left: rect.left,
1679
5495
  top: rect.top,
1680
5496
  width: rect.width,