@xiping/react-components 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/cjs/components/confetti-button/index.d.ts +24 -0
  2. package/dist/cjs/components/confetti-button/index.js +1 -0
  3. package/dist/cjs/components/txt-editor/TxtEditor.js +1 -1
  4. package/dist/cjs/hooks/useStayTimeReport.d.ts +6 -0
  5. package/dist/cjs/hooks/useStayTimeReport.js +1 -0
  6. package/dist/cjs/index.d.ts +2 -0
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/cjs/node_modules/.pnpm/3d-force-graph@1.78.2/node_modules/3d-force-graph/dist/3d-force-graph.js +28 -0
  9. package/dist/cjs/node_modules/.pnpm/@tweenjs_tween.js@25.0.0/node_modules/@tweenjs/tween.js/dist/tween.esm.js +1 -0
  10. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/bowser.js +6 -0
  11. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/constants.js +1 -0
  12. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-browsers.js +1 -0
  13. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-engines.js +1 -0
  14. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-os.js +1 -0
  15. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-platforms.js +1 -0
  16. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser.js +1 -0
  17. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/utils.js +1 -0
  18. package/dist/cjs/node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js +2 -0
  19. package/dist/cjs/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js +1 -0
  20. package/dist/cjs/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js +1 -0
  21. package/dist/cjs/node_modules/.pnpm/react-force-graph-3d@1.28.0_react@19.1.0/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js +1 -0
  22. package/dist/cjs/node_modules/.pnpm/three-forcegraph@1.43.0_three@0.178.0/node_modules/three-forcegraph/dist/three-forcegraph.js +3 -0
  23. package/dist/cjs/node_modules/.pnpm/three-render-objects@1.40.3_three@0.178.0/node_modules/three-render-objects/dist/three-render-objects.js +18 -0
  24. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.core.js +44 -0
  25. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.module.js +3784 -0
  26. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.webgpu.js +392 -0
  27. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/DragControls.js +1 -0
  28. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/FlyControls.js +1 -0
  29. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/OrbitControls.js +1 -0
  30. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/TrackballControls.js +1 -0
  31. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +1 -0
  32. package/dist/cjs/react-components.css +1 -1
  33. package/dist/es/components/confetti-button/index.d.ts +24 -0
  34. package/dist/es/components/confetti-button/index.js +77 -0
  35. package/dist/es/components/txt-editor/TxtEditor.js +1 -1
  36. package/dist/es/hooks/useStayTimeReport.d.ts +6 -0
  37. package/dist/es/hooks/useStayTimeReport.js +31 -0
  38. package/dist/es/index.d.ts +2 -0
  39. package/dist/es/index.js +31 -26
  40. package/dist/es/node_modules/.pnpm/{3d-force-graph@1.77.0 → 3d-force-graph@1.78.2}/node_modules/3d-force-graph/dist/3d-force-graph.js +10 -10
  41. package/dist/es/node_modules/.pnpm/@tweenjs_tween.js@25.0.0/node_modules/@tweenjs/tween.js/dist/tween.esm.js +396 -0
  42. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/bowser.js +55 -0
  43. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/constants.js +113 -0
  44. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-browsers.js +404 -0
  45. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-engines.js +78 -0
  46. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-os.js +159 -0
  47. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-platforms.js +238 -0
  48. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser.js +303 -0
  49. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/utils.js +280 -0
  50. package/dist/es/node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js +409 -0
  51. package/dist/es/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js +15 -0
  52. package/dist/es/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js +15 -0
  53. package/dist/es/node_modules/.pnpm/{react-force-graph-3d@1.27.0_react@18.3.1 → react-force-graph-3d@1.28.0_react@19.1.0}/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js +5 -2
  54. package/dist/es/node_modules/.pnpm/three-forcegraph@1.43.0_three@0.178.0/node_modules/three-forcegraph/dist/three-forcegraph.js +1037 -0
  55. package/dist/es/node_modules/.pnpm/{three-render-objects@1.40.2_three@0.171.0 → three-render-objects@1.40.3_three@0.178.0}/node_modules/three-render-objects/dist/three-render-objects.js +10 -10
  56. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.core.js +13236 -0
  57. package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/build/three.module.js +3379 -3325
  58. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.webgpu.js +24475 -0
  59. package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/controls/DragControls.js +15 -8
  60. package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/controls/FlyControls.js +26 -20
  61. package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/controls/OrbitControls.js +47 -10
  62. package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/controls/TrackballControls.js +16 -4
  63. package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/EffectComposer.js +62 -0
  64. package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/MaskPass.js +31 -0
  65. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/Pass.js +89 -0
  66. package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/RenderPass.js +21 -0
  67. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +46 -0
  68. package/dist/es/react-components.css +1 -1
  69. package/package.json +29 -27
  70. package/dist/cjs/node_modules/.pnpm/3d-force-graph@1.77.0/node_modules/3d-force-graph/dist/3d-force-graph.js +0 -28
  71. package/dist/cjs/node_modules/.pnpm/@tweenjs_tween.js@23.1.3/node_modules/@tweenjs/tween.js/dist/tween.esm.js +0 -1
  72. package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/ascending.js +0 -1
  73. package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/bisect.js +0 -1
  74. package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/bisector.js +0 -1
  75. package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/max.js +0 -1
  76. package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/min.js +0 -1
  77. package/dist/cjs/node_modules/.pnpm/react-force-graph-3d@1.27.0_react@18.3.1/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js +0 -1
  78. package/dist/cjs/node_modules/.pnpm/three-forcegraph@1.42.13_three@0.171.0/node_modules/three-forcegraph/dist/three-forcegraph.js +0 -3
  79. package/dist/cjs/node_modules/.pnpm/three-render-objects@1.40.2_three@0.171.0/node_modules/three-render-objects/dist/three-render-objects.js +0 -18
  80. package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.core.js +0 -44
  81. package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.module.js +0 -3789
  82. package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.webgpu.js +0 -373
  83. package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/controls/DragControls.js +0 -1
  84. package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/controls/FlyControls.js +0 -1
  85. package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/controls/OrbitControls.js +0 -1
  86. package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/controls/TrackballControls.js +0 -1
  87. package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +0 -1
  88. package/dist/es/node_modules/.pnpm/@tweenjs_tween.js@23.1.3/node_modules/@tweenjs/tween.js/dist/tween.esm.js +0 -379
  89. package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/ascending.js +0 -6
  90. package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/bisect.js +0 -3
  91. package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/bisector.js +0 -27
  92. package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/max.js +0 -17
  93. package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/min.js +0 -17
  94. package/dist/es/node_modules/.pnpm/three-forcegraph@1.42.13_three@0.171.0/node_modules/three-forcegraph/dist/three-forcegraph.js +0 -1020
  95. package/dist/es/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.core.js +0 -6662
  96. package/dist/es/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.webgpu.js +0 -13421
  97. package/dist/es/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/postprocessing/Pass.js +0 -42
  98. package/dist/es/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +0 -23
  99. /package/dist/cjs/node_modules/.pnpm/{@monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@19.1.0_react@19.1.0__react@19.1.0}/node_modules/@monaco-editor/react/dist/index.js +0 -0
  100. /package/dist/cjs/node_modules/.pnpm/{react-kapsule@2.5.7_react@18.3.1 → react-kapsule@2.5.7_react@19.1.0}/node_modules/react-kapsule/dist/react-kapsule.js +0 -0
  101. /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/EffectComposer.js +0 -0
  102. /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/MaskPass.js +0 -0
  103. /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/Pass.js +0 -0
  104. /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/RenderPass.js +0 -0
  105. /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/shaders/CopyShader.js +0 -0
  106. /package/dist/es/node_modules/.pnpm/{@monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@19.1.0_react@19.1.0__react@19.1.0}/node_modules/@monaco-editor/react/dist/index.js +0 -0
  107. /package/dist/es/node_modules/.pnpm/{react-kapsule@2.5.7_react@18.3.1 → react-kapsule@2.5.7_react@19.1.0}/node_modules/react-kapsule/dist/react-kapsule.js +0 -0
  108. /package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/shaders/CopyShader.js +0 -0
@@ -0,0 +1,1037 @@
1
+ import "../../../../three@0.178.0/node_modules/three/build/three.module.js";
2
+ import Ue from "../../../../../../_virtual/index4.js";
3
+ import Ie from "../../../../../../_virtual/index5.js";
4
+ import Ge from "../../../../kapsule@1.16.3/node_modules/kapsule/dist/kapsule.js";
5
+ import v from "../../../../accessor-fn@1.5.3/node_modules/accessor-fn/dist/accessor-fn.js";
6
+ import Ve from "../../../../data-bind-mapper@1.0.3/node_modules/data-bind-mapper/dist/data-bind-mapper.js";
7
+ import ke from "../../../../tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js";
8
+ import { Group as De, Mesh as He, SphereGeometry as Ne, Color as We, MeshLambertMaterial as $e, BufferGeometry as qe, BufferAttribute as Ke, Line as Je, CylinderGeometry as Qe, Matrix4 as Xe, Box3 as Ye, CubicBezierCurve3 as Ze, QuadraticBezierCurve3 as er, LineBasicMaterial as rr, ConeGeometry as nr, TubeGeometry as tr, Vector3 as or } from "../../../../three@0.178.0/node_modules/three/build/three.core.js";
9
+ import ar from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/radial.js";
10
+ import ir from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/simulation.js";
11
+ import lr from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/link.js";
12
+ import ur from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/manyBody.js";
13
+ import cr from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/center.js";
14
+ import fr from "../../../../d3-array@3.2.4/node_modules/d3-array/src/min.js";
15
+ import dr from "../../../../d3-array@3.2.4/node_modules/d3-array/src/max.js";
16
+ import pr from "../../../../d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js";
17
+ import sr from "../../../../d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/categorical/Paired.js";
18
+ function fe(r, e) {
19
+ (e == null || e > r.length) && (e = r.length);
20
+ for (var n = 0, t = Array(e); n < e; n++) t[n] = r[n];
21
+ return t;
22
+ }
23
+ function hr(r) {
24
+ if (Array.isArray(r)) return r;
25
+ }
26
+ function gr(r) {
27
+ if (Array.isArray(r)) return fe(r);
28
+ }
29
+ function Pe(r, e, n) {
30
+ if (typeof r == "function" ? r === e : r.has(e)) return arguments.length < 3 ? e : n;
31
+ throw new TypeError("Private element is not present on this object");
32
+ }
33
+ function yr(r) {
34
+ if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
35
+ return r;
36
+ }
37
+ function Me(r, e, n) {
38
+ return e = K(e), Dr(r, ge() ? Reflect.construct(e, n || [], K(r).constructor) : e.apply(r, n));
39
+ }
40
+ function vr(r, e) {
41
+ if (e.has(r)) throw new TypeError("Cannot initialize the same private elements twice on an object");
42
+ }
43
+ function xe(r, e) {
44
+ if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function");
45
+ }
46
+ function ae(r, e) {
47
+ return r.get(Pe(r, e));
48
+ }
49
+ function me(r, e, n) {
50
+ vr(r, e), e.set(r, n);
51
+ }
52
+ function be(r, e, n) {
53
+ return r.set(Pe(r, e), n), n;
54
+ }
55
+ function Ce(r, e, n) {
56
+ if (ge()) return Reflect.construct.apply(null, arguments);
57
+ var t = [null];
58
+ t.push.apply(t, e);
59
+ var a = new (r.bind.apply(r, t))();
60
+ return a;
61
+ }
62
+ function mr(r, e) {
63
+ for (var n = 0; n < e.length; n++) {
64
+ var t = e[n];
65
+ t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, je(t.key), t);
66
+ }
67
+ }
68
+ function Te(r, e, n) {
69
+ return e && mr(r.prototype, e), Object.defineProperty(r, "prototype", {
70
+ writable: !1
71
+ }), r;
72
+ }
73
+ function oe(r, e, n) {
74
+ return (e = je(e)) in r ? Object.defineProperty(r, e, {
75
+ value: n,
76
+ enumerable: !0,
77
+ configurable: !0,
78
+ writable: !0
79
+ }) : r[e] = n, r;
80
+ }
81
+ function de() {
82
+ return de = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, n) {
83
+ var t = Pr(r, e);
84
+ if (t) {
85
+ var a = Object.getOwnPropertyDescriptor(t, e);
86
+ return a.get ? a.get.call(arguments.length < 3 ? r : n) : a.value;
87
+ }
88
+ }, de.apply(null, arguments);
89
+ }
90
+ function K(r) {
91
+ return K = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
92
+ return e.__proto__ || Object.getPrototypeOf(e);
93
+ }, K(r);
94
+ }
95
+ function Ae(r, e) {
96
+ if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
97
+ r.prototype = Object.create(e && e.prototype, {
98
+ constructor: {
99
+ value: r,
100
+ writable: !0,
101
+ configurable: !0
102
+ }
103
+ }), Object.defineProperty(r, "prototype", {
104
+ writable: !1
105
+ }), e && pe(r, e);
106
+ }
107
+ function ge() {
108
+ try {
109
+ var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
110
+ }));
111
+ } catch {
112
+ }
113
+ return (ge = function() {
114
+ return !!r;
115
+ })();
116
+ }
117
+ function br(r) {
118
+ if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
119
+ }
120
+ function _r(r, e) {
121
+ var n = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
122
+ if (n != null) {
123
+ var t, a, c, s, m = [], y = !0, k = !1;
124
+ try {
125
+ if (c = (n = n.call(r)).next, e !== 0) for (; !(y = (t = c.call(n)).done) && (m.push(t.value), m.length !== e); y = !0) ;
126
+ } catch (R) {
127
+ k = !0, a = R;
128
+ } finally {
129
+ try {
130
+ if (!y && n.return != null && (s = n.return(), Object(s) !== s)) return;
131
+ } finally {
132
+ if (k) throw a;
133
+ }
134
+ }
135
+ return m;
136
+ }
137
+ }
138
+ function wr() {
139
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
140
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
141
+ }
142
+ function Or() {
143
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
144
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
145
+ }
146
+ function _e(r, e) {
147
+ var n = Object.keys(r);
148
+ if (Object.getOwnPropertySymbols) {
149
+ var t = Object.getOwnPropertySymbols(r);
150
+ e && (t = t.filter(function(a) {
151
+ return Object.getOwnPropertyDescriptor(r, a).enumerable;
152
+ })), n.push.apply(n, t);
153
+ }
154
+ return n;
155
+ }
156
+ function kr(r) {
157
+ for (var e = 1; e < arguments.length; e++) {
158
+ var n = arguments[e] != null ? arguments[e] : {};
159
+ e % 2 ? _e(Object(n), !0).forEach(function(t) {
160
+ oe(r, t, n[t]);
161
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(n)) : _e(Object(n)).forEach(function(t) {
162
+ Object.defineProperty(r, t, Object.getOwnPropertyDescriptor(n, t));
163
+ });
164
+ }
165
+ return r;
166
+ }
167
+ function Dr(r, e) {
168
+ if (e && (typeof e == "object" || typeof e == "function")) return e;
169
+ if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
170
+ return yr(r);
171
+ }
172
+ function pe(r, e) {
173
+ return pe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, t) {
174
+ return n.__proto__ = t, n;
175
+ }, pe(r, e);
176
+ }
177
+ function ee(r, e) {
178
+ return hr(r) || _r(r, e) || Re(r, e) || wr();
179
+ }
180
+ function Pr(r, e) {
181
+ for (; !{}.hasOwnProperty.call(r, e) && (r = K(r)) !== null; ) ;
182
+ return r;
183
+ }
184
+ function ie(r, e, n, t) {
185
+ var a = de(K(r.prototype), e, n);
186
+ return typeof a == "function" ? function(c) {
187
+ return a.apply(n, c);
188
+ } : a;
189
+ }
190
+ function F(r) {
191
+ return gr(r) || br(r) || Re(r) || Or();
192
+ }
193
+ function Mr(r, e) {
194
+ if (typeof r != "object" || !r) return r;
195
+ var n = r[Symbol.toPrimitive];
196
+ if (n !== void 0) {
197
+ var t = n.call(r, e);
198
+ if (typeof t != "object") return t;
199
+ throw new TypeError("@@toPrimitive must return a primitive value.");
200
+ }
201
+ return (e === "string" ? String : Number)(r);
202
+ }
203
+ function je(r) {
204
+ var e = Mr(r, "string");
205
+ return typeof e == "symbol" ? e : e + "";
206
+ }
207
+ function se(r) {
208
+ "@babel/helpers - typeof";
209
+ return se = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
210
+ return typeof e;
211
+ } : function(e) {
212
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
213
+ }, se(r);
214
+ }
215
+ function Re(r, e) {
216
+ if (r) {
217
+ if (typeof r == "string") return fe(r, e);
218
+ var n = {}.toString.call(r).slice(8, -1);
219
+ return n === "Object" && r.constructor && (n = r.constructor.name), n === "Map" || n === "Set" ? Array.from(r) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? fe(r, e) : void 0;
220
+ }
221
+ }
222
+ var Ee = function(e) {
223
+ e instanceof Array ? e.forEach(Ee) : (e.map && e.map.dispose(), e.dispose());
224
+ }, Le = function(e) {
225
+ e.geometry && e.geometry.dispose(), e.material && Ee(e.material), e.texture && e.texture.dispose(), e.children && e.children.forEach(Le);
226
+ }, he = function(e) {
227
+ for (; e.children.length; ) {
228
+ var n = e.children[0];
229
+ e.remove(n), Le(n);
230
+ }
231
+ }, le = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ function(r) {
232
+ function e(n) {
233
+ var t, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = a.dataBindAttr, s = c === void 0 ? "__data" : c, m = a.objBindAttr, y = m === void 0 ? "__threeObj" : m;
234
+ return xe(this, e), t = Me(this, e), oe(t, "scene", void 0), me(t, le, void 0), me(t, ne, void 0), t.scene = n, be(le, t, s), be(ne, t, y), t.onRemoveObj(function() {
235
+ }), t;
236
+ }
237
+ return Ae(e, r), Te(e, [{
238
+ key: "onCreateObj",
239
+ value: function(t) {
240
+ var a = this;
241
+ return ie(e, "onCreateObj", this)([function(c) {
242
+ var s = t(c);
243
+ return c[ae(ne, a)] = s, s[ae(le, a)] = c, a.scene.add(s), s;
244
+ }]), this;
245
+ }
246
+ }, {
247
+ key: "onRemoveObj",
248
+ value: function(t) {
249
+ var a = this;
250
+ return ie(e, "onRemoveObj", this)([function(c, s) {
251
+ var m = ie(e, "getData", a)([c]);
252
+ t(c, s), a.scene.remove(c), he(c), delete m[ae(ne, a)];
253
+ }]), this;
254
+ }
255
+ }]);
256
+ }(Ve), Z = function(e) {
257
+ return isNaN(e) ? parseInt(ke(e).toHex(), 16) : e;
258
+ }, ue = function(e) {
259
+ return isNaN(e) ? ke(e).getAlpha() : 1;
260
+ }, xr = pr(sr);
261
+ function we(r, e, n) {
262
+ !e || typeof n != "string" || r.filter(function(t) {
263
+ return !t[n];
264
+ }).forEach(function(t) {
265
+ t[n] = xr(e(t));
266
+ });
267
+ }
268
+ function Cr(r, e) {
269
+ var n = r.nodes, t = r.links, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, c = a.nodeFilter, s = c === void 0 ? function() {
270
+ return !0;
271
+ } : c, m = a.onLoopError, y = m === void 0 ? function(g) {
272
+ throw "Invalid DAG structure! Found cycle in node path: ".concat(g.join(" -> "), ".");
273
+ } : m, k = {};
274
+ n.forEach(function(g) {
275
+ return k[e(g)] = {
276
+ data: g,
277
+ out: [],
278
+ depth: -1,
279
+ skip: !s(g)
280
+ };
281
+ }), t.forEach(function(g) {
282
+ var i = g.source, f = g.target, w = _(i), h = _(f);
283
+ if (!k.hasOwnProperty(w)) throw "Missing source node with id: ".concat(w);
284
+ if (!k.hasOwnProperty(h)) throw "Missing target node with id: ".concat(h);
285
+ var O = k[w], b = k[h];
286
+ O.out.push(b);
287
+ function _(P) {
288
+ return se(P) === "object" ? e(P) : P;
289
+ }
290
+ });
291
+ var R = [];
292
+ x(Object.values(k));
293
+ var j = Object.assign.apply(Object, [{}].concat(F(Object.entries(k).filter(function(g) {
294
+ var i = ee(g, 2), f = i[1];
295
+ return !f.skip;
296
+ }).map(function(g) {
297
+ var i = ee(g, 2), f = i[0], w = i[1];
298
+ return oe({}, f, w.depth);
299
+ }))));
300
+ return j;
301
+ function x(g) {
302
+ for (var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, w = function() {
303
+ var _ = g[h];
304
+ if (i.indexOf(_) !== -1) {
305
+ var P = [].concat(F(i.slice(i.indexOf(_))), [_]).map(function(p) {
306
+ return e(p.data);
307
+ });
308
+ return R.some(function(p) {
309
+ return p.length === P.length && p.every(function(D, L) {
310
+ return D === P[L];
311
+ });
312
+ }) || (R.push(P), y(P)), 1;
313
+ }
314
+ f > _.depth && (_.depth = f, x(_.out, [].concat(F(i), [_]), f + (_.skip ? 0 : 1)));
315
+ }, h = 0, O = g.length; h < O; h++)
316
+ w();
317
+ }
318
+ }
319
+ var l = window.THREE ? window.THREE : {
320
+ Group: De,
321
+ Mesh: He,
322
+ MeshLambertMaterial: $e,
323
+ Color: We,
324
+ BufferGeometry: qe,
325
+ BufferAttribute: Ke,
326
+ Matrix4: Xe,
327
+ Vector3: or,
328
+ SphereGeometry: Ne,
329
+ CylinderGeometry: Qe,
330
+ TubeGeometry: tr,
331
+ ConeGeometry: nr,
332
+ Line: Je,
333
+ LineBasicMaterial: rr,
334
+ QuadraticBezierCurve3: er,
335
+ CubicBezierCurve3: Ze,
336
+ Box3: Ye
337
+ }, Oe = {
338
+ graph: Ue,
339
+ forcelayout: Ie
340
+ }, Tr = 2, ce = new l.BufferGeometry().setAttribute ? "setAttribute" : "addAttribute", te = new l.BufferGeometry().applyMatrix4 ? "applyMatrix4" : "applyMatrix", Ar = Ge({
341
+ props: {
342
+ jsonUrl: {
343
+ onChange: function(e, n) {
344
+ var t = this;
345
+ e && !n.fetchingJson && (n.fetchingJson = !0, n.onLoading(), fetch(e).then(function(a) {
346
+ return a.json();
347
+ }).then(function(a) {
348
+ n.fetchingJson = !1, n.onFinishLoading(a), t.graphData(a);
349
+ }));
350
+ },
351
+ triggerUpdate: !1
352
+ },
353
+ graphData: {
354
+ default: {
355
+ nodes: [],
356
+ links: []
357
+ },
358
+ onChange: function(e, n) {
359
+ n.engineRunning = !1;
360
+ }
361
+ },
362
+ numDimensions: {
363
+ default: 3,
364
+ onChange: function(e, n) {
365
+ var t = n.d3ForceLayout.force("charge");
366
+ t && t.strength(e > 2 ? -60 : -30), e < 3 && a(n.graphData.nodes, "z"), e < 2 && a(n.graphData.nodes, "y");
367
+ function a(c, s) {
368
+ c.forEach(function(m) {
369
+ delete m[s], delete m["v".concat(s)];
370
+ });
371
+ }
372
+ }
373
+ },
374
+ dagMode: {
375
+ onChange: function(e, n) {
376
+ !e && n.forceEngine === "d3" && (n.graphData.nodes || []).forEach(function(t) {
377
+ return t.fx = t.fy = t.fz = void 0;
378
+ });
379
+ }
380
+ },
381
+ dagLevelDistance: {},
382
+ dagNodeFilter: {
383
+ default: function(e) {
384
+ return !0;
385
+ }
386
+ },
387
+ onDagError: {
388
+ triggerUpdate: !1
389
+ },
390
+ nodeRelSize: {
391
+ default: 4
392
+ },
393
+ // volume per val unit
394
+ nodeId: {
395
+ default: "id"
396
+ },
397
+ nodeVal: {
398
+ default: "val"
399
+ },
400
+ nodeResolution: {
401
+ default: 8
402
+ },
403
+ // how many slice segments in the sphere's circumference
404
+ nodeColor: {
405
+ default: "color"
406
+ },
407
+ nodeAutoColorBy: {},
408
+ nodeOpacity: {
409
+ default: 0.75
410
+ },
411
+ nodeVisibility: {
412
+ default: !0
413
+ },
414
+ nodeThreeObject: {},
415
+ nodeThreeObjectExtend: {
416
+ default: !1
417
+ },
418
+ nodePositionUpdate: {
419
+ triggerUpdate: !1
420
+ },
421
+ // custom function to call for updating the node's position. Signature: (threeObj, { x, y, z}, node). If the function returns a truthy value, the regular node position update will not run.
422
+ linkSource: {
423
+ default: "source"
424
+ },
425
+ linkTarget: {
426
+ default: "target"
427
+ },
428
+ linkVisibility: {
429
+ default: !0
430
+ },
431
+ linkColor: {
432
+ default: "color"
433
+ },
434
+ linkAutoColorBy: {},
435
+ linkOpacity: {
436
+ default: 0.2
437
+ },
438
+ linkWidth: {},
439
+ // Rounded to nearest decimal. For falsy values use dimensionless line with 1px regardless of distance.
440
+ linkResolution: {
441
+ default: 6
442
+ },
443
+ // how many radial segments in each line tube's geometry
444
+ linkCurvature: {
445
+ default: 0,
446
+ triggerUpdate: !1
447
+ },
448
+ // line curvature radius (0: straight, 1: semi-circle)
449
+ linkCurveRotation: {
450
+ default: 0,
451
+ triggerUpdate: !1
452
+ },
453
+ // line curve rotation along the line axis (0: interection with XY plane, PI: upside down)
454
+ linkMaterial: {},
455
+ linkThreeObject: {},
456
+ linkThreeObjectExtend: {
457
+ default: !1
458
+ },
459
+ linkPositionUpdate: {
460
+ triggerUpdate: !1
461
+ },
462
+ // custom function to call for updating the link's position. Signature: (threeObj, { start: { x, y, z}, end: { x, y, z }}, link). If the function returns a truthy value, the regular link position update will not run.
463
+ linkDirectionalArrowLength: {
464
+ default: 0
465
+ },
466
+ linkDirectionalArrowColor: {},
467
+ linkDirectionalArrowRelPos: {
468
+ default: 0.5,
469
+ triggerUpdate: !1
470
+ },
471
+ // value between 0<>1 indicating the relative pos along the (exposed) line
472
+ linkDirectionalArrowResolution: {
473
+ default: 8
474
+ },
475
+ // how many slice segments in the arrow's conic circumference
476
+ linkDirectionalParticles: {
477
+ default: 0
478
+ },
479
+ // animate photons travelling in the link direction
480
+ linkDirectionalParticleSpeed: {
481
+ default: 0.01,
482
+ triggerUpdate: !1
483
+ },
484
+ // in link length ratio per frame
485
+ linkDirectionalParticleOffset: {
486
+ default: 0,
487
+ triggerUpdate: !1
488
+ },
489
+ // starting position offset along the link's length, like a pre-delay. Values between [0, 1]
490
+ linkDirectionalParticleWidth: {
491
+ default: 0.5
492
+ },
493
+ linkDirectionalParticleColor: {},
494
+ linkDirectionalParticleResolution: {
495
+ default: 4
496
+ },
497
+ // how many slice segments in the particle sphere's circumference
498
+ linkDirectionalParticleThreeObject: {},
499
+ forceEngine: {
500
+ default: "d3"
501
+ },
502
+ // d3 or ngraph
503
+ d3AlphaMin: {
504
+ default: 0
505
+ },
506
+ d3AlphaDecay: {
507
+ default: 0.0228,
508
+ triggerUpdate: !1,
509
+ onChange: function(e, n) {
510
+ n.d3ForceLayout.alphaDecay(e);
511
+ }
512
+ },
513
+ d3AlphaTarget: {
514
+ default: 0,
515
+ triggerUpdate: !1,
516
+ onChange: function(e, n) {
517
+ n.d3ForceLayout.alphaTarget(e);
518
+ }
519
+ },
520
+ d3VelocityDecay: {
521
+ default: 0.4,
522
+ triggerUpdate: !1,
523
+ onChange: function(e, n) {
524
+ n.d3ForceLayout.velocityDecay(e);
525
+ }
526
+ },
527
+ ngraphPhysics: {
528
+ default: {
529
+ // defaults from https://github.com/anvaka/ngraph.physics.simulator/blob/master/index.js
530
+ timeStep: 20,
531
+ gravity: -1.2,
532
+ theta: 0.8,
533
+ springLength: 30,
534
+ springCoefficient: 8e-4,
535
+ dragCoefficient: 0.02
536
+ }
537
+ },
538
+ warmupTicks: {
539
+ default: 0,
540
+ triggerUpdate: !1
541
+ },
542
+ // how many times to tick the force engine at init before starting to render
543
+ cooldownTicks: {
544
+ default: 1 / 0,
545
+ triggerUpdate: !1
546
+ },
547
+ cooldownTime: {
548
+ default: 15e3,
549
+ triggerUpdate: !1
550
+ },
551
+ // ms
552
+ onLoading: {
553
+ default: function() {
554
+ },
555
+ triggerUpdate: !1
556
+ },
557
+ onFinishLoading: {
558
+ default: function() {
559
+ },
560
+ triggerUpdate: !1
561
+ },
562
+ onUpdate: {
563
+ default: function() {
564
+ },
565
+ triggerUpdate: !1
566
+ },
567
+ onFinishUpdate: {
568
+ default: function() {
569
+ },
570
+ triggerUpdate: !1
571
+ },
572
+ onEngineTick: {
573
+ default: function() {
574
+ },
575
+ triggerUpdate: !1
576
+ },
577
+ onEngineStop: {
578
+ default: function() {
579
+ },
580
+ triggerUpdate: !1
581
+ }
582
+ },
583
+ methods: {
584
+ refresh: function(e) {
585
+ return e._flushObjects = !0, e._rerender(), this;
586
+ },
587
+ // Expose d3 forces for external manipulation
588
+ d3Force: function(e, n, t) {
589
+ return t === void 0 ? e.d3ForceLayout.force(n) : (e.d3ForceLayout.force(n, t), this);
590
+ },
591
+ d3ReheatSimulation: function(e) {
592
+ return e.d3ForceLayout.alpha(1), this.resetCountdown(), this;
593
+ },
594
+ // reset cooldown state
595
+ resetCountdown: function(e) {
596
+ return e.cntTicks = 0, e.startTickTime = /* @__PURE__ */ new Date(), e.engineRunning = !0, this;
597
+ },
598
+ tickFrame: function(e) {
599
+ var n = e.forceEngine !== "ngraph";
600
+ return e.engineRunning && t(), a(), c(), this;
601
+ function t() {
602
+ ++e.cntTicks > e.cooldownTicks || /* @__PURE__ */ new Date() - e.startTickTime > e.cooldownTime || n && e.d3AlphaMin > 0 && e.d3ForceLayout.alpha() < e.d3AlphaMin ? (e.engineRunning = !1, e.onEngineStop()) : (e.layout[n ? "tick" : "step"](), e.onEngineTick());
603
+ var s = v(e.nodeThreeObjectExtend);
604
+ e.nodeDataMapper.entries().forEach(function(x) {
605
+ var g = ee(x, 2), i = g[0], f = g[1];
606
+ if (f) {
607
+ var w = n ? i : e.layout.getNodePosition(i[e.nodeId]), h = s(i);
608
+ (!e.nodePositionUpdate || !e.nodePositionUpdate(h ? f.children[0] : f, {
609
+ x: w.x,
610
+ y: w.y,
611
+ z: w.z
612
+ }, i) || h) && (f.position.x = w.x, f.position.y = w.y || 0, f.position.z = w.z || 0);
613
+ }
614
+ });
615
+ var m = v(e.linkWidth), y = v(e.linkCurvature), k = v(e.linkCurveRotation), R = v(e.linkThreeObjectExtend);
616
+ e.linkDataMapper.entries().forEach(function(x) {
617
+ var g = ee(x, 2), i = g[0], f = g[1];
618
+ if (f) {
619
+ var w = n ? i : e.layout.getLinkPosition(e.layout.graph.getLink(i.source, i.target).id), h = w[n ? "source" : "from"], O = w[n ? "target" : "to"];
620
+ if (!(!h || !O || !h.hasOwnProperty("x") || !O.hasOwnProperty("x"))) {
621
+ j(i);
622
+ var b = R(i);
623
+ if (!(e.linkPositionUpdate && e.linkPositionUpdate(
624
+ b ? f.children[1] : f,
625
+ // pass child custom object if extending the default
626
+ {
627
+ start: {
628
+ x: h.x,
629
+ y: h.y,
630
+ z: h.z
631
+ },
632
+ end: {
633
+ x: O.x,
634
+ y: O.y,
635
+ z: O.z
636
+ }
637
+ },
638
+ i
639
+ ) && !b)) {
640
+ var _ = 30, P = i.__curve, p = f.children.length ? f.children[0] : f;
641
+ if (p.type === "Line") {
642
+ if (P) {
643
+ var L = P.getPoints(_);
644
+ p.geometry.getAttribute("position").array.length !== L.length * 3 && p.geometry[ce]("position", new l.BufferAttribute(new Float32Array(L.length * 3), 3)), p.geometry.setFromPoints(L);
645
+ } else {
646
+ var D = p.geometry.getAttribute("position");
647
+ (!D || !D.array || D.array.length !== 6) && p.geometry[ce]("position", D = new l.BufferAttribute(new Float32Array(2 * 3), 3)), D.array[0] = h.x, D.array[1] = h.y || 0, D.array[2] = h.z || 0, D.array[3] = O.x, D.array[4] = O.y || 0, D.array[5] = O.z || 0, D.needsUpdate = !0;
648
+ }
649
+ p.geometry.computeBoundingSphere();
650
+ } else if (p.type === "Mesh")
651
+ if (P) {
652
+ p.geometry.type.match(/^Tube(Buffer)?Geometry$/) || (p.position.set(0, 0, 0), p.rotation.set(0, 0, 0), p.scale.set(1, 1, 1));
653
+ var $ = Math.ceil(m(i) * 10) / 10, N = $ / 2, J = new l.TubeGeometry(P, _, N, e.linkResolution, !1);
654
+ p.geometry.dispose(), p.geometry = J;
655
+ } else {
656
+ if (!p.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)) {
657
+ var U = Math.ceil(m(i) * 10) / 10, C = U / 2, B = new l.CylinderGeometry(C, C, 1, e.linkResolution, 1, !1);
658
+ B[te](new l.Matrix4().makeTranslation(0, 1 / 2, 0)), B[te](new l.Matrix4().makeRotationX(Math.PI / 2)), p.geometry.dispose(), p.geometry = B;
659
+ }
660
+ var z = new l.Vector3(h.x, h.y || 0, h.z || 0), S = new l.Vector3(O.x, O.y || 0, O.z || 0), I = z.distanceTo(S);
661
+ p.position.x = z.x, p.position.y = z.y, p.position.z = z.z, p.scale.z = I, p.parent.localToWorld(S), p.lookAt(S);
662
+ }
663
+ }
664
+ }
665
+ }
666
+ });
667
+ function j(x) {
668
+ var g = n ? x : e.layout.getLinkPosition(e.layout.graph.getLink(x.source, x.target).id), i = g[n ? "source" : "from"], f = g[n ? "target" : "to"];
669
+ if (!(!i || !f || !i.hasOwnProperty("x") || !f.hasOwnProperty("x"))) {
670
+ var w = y(x);
671
+ if (!w)
672
+ x.__curve = null;
673
+ else {
674
+ var h = new l.Vector3(i.x, i.y || 0, i.z || 0), O = new l.Vector3(f.x, f.y || 0, f.z || 0), b = h.distanceTo(O), _, P = k(x);
675
+ if (b > 0) {
676
+ var p = f.x - i.x, D = f.y - i.y || 0, L = new l.Vector3().subVectors(O, h), U = L.clone().multiplyScalar(w).cross(p !== 0 || D !== 0 ? new l.Vector3(0, 0, 1) : new l.Vector3(0, 1, 0)).applyAxisAngle(L.normalize(), P).add(new l.Vector3().addVectors(h, O).divideScalar(2));
677
+ _ = new l.QuadraticBezierCurve3(h, U, O);
678
+ } else {
679
+ var C = w * 70, B = -P, z = B + Math.PI / 2;
680
+ _ = new l.CubicBezierCurve3(h, new l.Vector3(C * Math.cos(z), C * Math.sin(z), 0).add(h), new l.Vector3(C * Math.cos(B), C * Math.sin(B), 0).add(h), O);
681
+ }
682
+ x.__curve = _;
683
+ }
684
+ }
685
+ }
686
+ }
687
+ function a() {
688
+ var s = v(e.linkDirectionalArrowRelPos), m = v(e.linkDirectionalArrowLength), y = v(e.nodeVal);
689
+ e.arrowDataMapper.entries().forEach(function(k) {
690
+ var R = ee(k, 2), j = R[0], x = R[1];
691
+ if (x) {
692
+ var g = n ? j : e.layout.getLinkPosition(e.layout.graph.getLink(j.source, j.target).id), i = g[n ? "source" : "from"], f = g[n ? "target" : "to"];
693
+ if (!(!i || !f || !i.hasOwnProperty("x") || !f.hasOwnProperty("x"))) {
694
+ var w = Math.cbrt(Math.max(0, y(i) || 1)) * e.nodeRelSize, h = Math.cbrt(Math.max(0, y(f) || 1)) * e.nodeRelSize, O = m(j), b = s(j), _ = j.__curve ? function(C) {
695
+ return j.__curve.getPoint(C);
696
+ } : function(C) {
697
+ var B = function(S, I, $, N) {
698
+ return I[S] + ($[S] - I[S]) * N || 0;
699
+ };
700
+ return {
701
+ x: B("x", i, f, C),
702
+ y: B("y", i, f, C),
703
+ z: B("z", i, f, C)
704
+ };
705
+ }, P = j.__curve ? j.__curve.getLength() : Math.sqrt(["x", "y", "z"].map(function(C) {
706
+ return Math.pow((f[C] || 0) - (i[C] || 0), 2);
707
+ }).reduce(function(C, B) {
708
+ return C + B;
709
+ }, 0)), p = w + O + (P - w - h - O) * b, D = _(p / P), L = _((p - O) / P);
710
+ ["x", "y", "z"].forEach(function(C) {
711
+ return x.position[C] = L[C];
712
+ });
713
+ var U = Ce(l.Vector3, F(["x", "y", "z"].map(function(C) {
714
+ return D[C];
715
+ })));
716
+ x.parent.localToWorld(U), x.lookAt(U);
717
+ }
718
+ }
719
+ });
720
+ }
721
+ function c() {
722
+ var s = v(e.linkDirectionalParticleSpeed), m = v(e.linkDirectionalParticleOffset);
723
+ e.graphData.links.forEach(function(y) {
724
+ var k = e.particlesDataMapper.getObj(y), R = k && k.children, j = y.__singleHopPhotonsObj && y.__singleHopPhotonsObj.children;
725
+ if (!((!j || !j.length) && (!R || !R.length))) {
726
+ var x = n ? y : e.layout.getLinkPosition(e.layout.graph.getLink(y.source, y.target).id), g = x[n ? "source" : "from"], i = x[n ? "target" : "to"];
727
+ if (!(!g || !i || !g.hasOwnProperty("x") || !i.hasOwnProperty("x"))) {
728
+ var f = s(y), w = Math.abs(m(y)), h = y.__curve ? function(b) {
729
+ return y.__curve.getPoint(b);
730
+ } : function(b) {
731
+ var _ = function(p, D, L, U) {
732
+ return D[p] + (L[p] - D[p]) * U || 0;
733
+ };
734
+ return {
735
+ x: _("x", g, i, b),
736
+ y: _("y", g, i, b),
737
+ z: _("z", g, i, b)
738
+ };
739
+ }, O = [].concat(F(R || []), F(j || []));
740
+ O.forEach(function(b, _) {
741
+ var P = b.parent.__linkThreeObjType === "singleHopPhotons";
742
+ if (b.hasOwnProperty("__progressRatio") || (b.__progressRatio = P ? 0 : (_ + w) / R.length), b.__progressRatio += f, b.__progressRatio >= 1)
743
+ if (!P)
744
+ b.__progressRatio = b.__progressRatio % 1;
745
+ else {
746
+ b.parent.remove(b), he(b);
747
+ return;
748
+ }
749
+ var p = b.__progressRatio, D = h(p);
750
+ b.geometry.type !== "SphereGeometry" && b.lookAt(D.x, D.y, D.z), ["x", "y", "z"].forEach(function(L) {
751
+ return b.position[L] = D[L];
752
+ });
753
+ });
754
+ }
755
+ }
756
+ });
757
+ }
758
+ },
759
+ emitParticle: function(e, n) {
760
+ if (n && e.graphData.links.includes(n)) {
761
+ if (!n.__singleHopPhotonsObj) {
762
+ var t = new l.Group();
763
+ t.__linkThreeObjType = "singleHopPhotons", n.__singleHopPhotonsObj = t, e.graphScene.add(t);
764
+ }
765
+ var a = v(e.linkDirectionalParticleThreeObject)(n);
766
+ if (a && e.linkDirectionalParticleThreeObject === a && (a = a.clone()), !a) {
767
+ var c = v(e.linkDirectionalParticleWidth), s = Math.ceil(c(n) * 10) / 10 / 2, m = e.linkDirectionalParticleResolution, y = new l.SphereGeometry(s, m, m), k = v(e.linkColor), R = v(e.linkDirectionalParticleColor), j = R(n) || k(n) || "#f0f0f0", x = new l.Color(Z(j)), g = e.linkOpacity * 3, i = new l.MeshLambertMaterial({
768
+ color: x,
769
+ transparent: !0,
770
+ opacity: g
771
+ });
772
+ a = new l.Mesh(y, i);
773
+ }
774
+ n.__singleHopPhotonsObj.add(a);
775
+ }
776
+ return this;
777
+ },
778
+ getGraphBbox: function(e) {
779
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {
780
+ return !0;
781
+ };
782
+ if (!e.initialised) return null;
783
+ var t = function a(c) {
784
+ var s = [];
785
+ if (c.geometry) {
786
+ c.geometry.computeBoundingBox();
787
+ var m = new l.Box3();
788
+ m.copy(c.geometry.boundingBox).applyMatrix4(c.matrixWorld), s.push(m);
789
+ }
790
+ return s.concat.apply(s, F((c.children || []).filter(
791
+ function(y) {
792
+ return !y.hasOwnProperty("__graphObjType") || y.__graphObjType === "node" && n(y.__data);
793
+ }
794
+ // exclude filtered out nodes
795
+ ).map(a)));
796
+ }(e.graphScene);
797
+ return t.length ? Object.assign.apply(Object, F(["x", "y", "z"].map(function(a) {
798
+ return oe({}, a, [fr(t, function(c) {
799
+ return c.min[a];
800
+ }), dr(t, function(c) {
801
+ return c.max[a];
802
+ })]);
803
+ }))) : null;
804
+ }
805
+ },
806
+ stateInit: function() {
807
+ return {
808
+ d3ForceLayout: ir().force("link", lr()).force("charge", ur()).force("center", cr()).force("dagRadial", null).stop(),
809
+ engineRunning: !1
810
+ };
811
+ },
812
+ init: function(e, n) {
813
+ n.graphScene = e, n.nodeDataMapper = new Y(e, {
814
+ objBindAttr: "__threeObj"
815
+ }), n.linkDataMapper = new Y(e, {
816
+ objBindAttr: "__lineObj"
817
+ }), n.arrowDataMapper = new Y(e, {
818
+ objBindAttr: "__arrowObj"
819
+ }), n.particlesDataMapper = new Y(e, {
820
+ objBindAttr: "__photonsObj"
821
+ });
822
+ },
823
+ update: function(e, n) {
824
+ var t = function(u) {
825
+ return u.some(function(d) {
826
+ return n.hasOwnProperty(d);
827
+ });
828
+ };
829
+ if (e.engineRunning = !1, typeof e.onUpdate == "function" && e.onUpdate(), e.nodeAutoColorBy !== null && t(["nodeAutoColorBy", "graphData", "nodeColor"]) && we(e.graphData.nodes, v(e.nodeAutoColorBy), e.nodeColor), e.linkAutoColorBy !== null && t(["linkAutoColorBy", "graphData", "linkColor"]) && we(e.graphData.links, v(e.linkAutoColorBy), e.linkColor), e._flushObjects || t(["graphData", "nodeThreeObject", "nodeThreeObjectExtend", "nodeVal", "nodeColor", "nodeVisibility", "nodeRelSize", "nodeResolution", "nodeOpacity"])) {
830
+ var a = v(e.nodeThreeObject), c = v(e.nodeThreeObjectExtend), s = v(e.nodeVal), m = v(e.nodeColor), y = v(e.nodeVisibility), k = {}, R = {};
831
+ (e._flushObjects || t([
832
+ // recreate objects if any of these props have changed
833
+ "nodeThreeObject",
834
+ "nodeThreeObjectExtend"
835
+ ])) && e.nodeDataMapper.clear(), e.nodeDataMapper.onCreateObj(function(o) {
836
+ var u = a(o), d = c(o);
837
+ u && e.nodeThreeObject === u && (u = u.clone());
838
+ var M;
839
+ return u && !d ? M = u : (M = new l.Mesh(), M.__graphDefaultObj = !0, u && d && M.add(u)), M.__graphObjType = "node", M;
840
+ }).onUpdateObj(function(o, u) {
841
+ if (o.__graphDefaultObj) {
842
+ var d = s(u) || 1, M = Math.cbrt(d) * e.nodeRelSize, E = e.nodeResolution;
843
+ (!o.geometry.type.match(/^Sphere(Buffer)?Geometry$/) || o.geometry.parameters.radius !== M || o.geometry.parameters.widthSegments !== E) && (k.hasOwnProperty(d) || (k[d] = new l.SphereGeometry(M, E, E)), o.geometry.dispose(), o.geometry = k[d]);
844
+ var T = m(u), A = new l.Color(Z(T || "#ffffaa")), G = e.nodeOpacity * ue(T);
845
+ (o.material.type !== "MeshLambertMaterial" || !o.material.color.equals(A) || o.material.opacity !== G) && (R.hasOwnProperty(T) || (R[T] = new l.MeshLambertMaterial({
846
+ color: A,
847
+ transparent: !0,
848
+ opacity: G
849
+ })), o.material.dispose(), o.material = R[T]);
850
+ }
851
+ }).digest(e.graphData.nodes.filter(y));
852
+ }
853
+ if (e._flushObjects || t(["graphData", "linkThreeObject", "linkThreeObjectExtend", "linkMaterial", "linkColor", "linkWidth", "linkVisibility", "linkResolution", "linkOpacity", "linkDirectionalArrowLength", "linkDirectionalArrowColor", "linkDirectionalArrowResolution", "linkDirectionalParticles", "linkDirectionalParticleWidth", "linkDirectionalParticleColor", "linkDirectionalParticleResolution", "linkDirectionalParticleThreeObject"])) {
854
+ var j = v(e.linkThreeObject), x = v(e.linkThreeObjectExtend), g = v(e.linkMaterial), i = v(e.linkVisibility), f = v(e.linkColor), w = v(e.linkWidth), h = {}, O = {}, b = {}, _ = e.graphData.links.filter(i);
855
+ if ((e._flushObjects || t([
856
+ // recreate objects if any of these props have changed
857
+ "linkThreeObject",
858
+ "linkThreeObjectExtend",
859
+ "linkWidth"
860
+ ])) && e.linkDataMapper.clear(), e.linkDataMapper.onRemoveObj(function(o) {
861
+ var u = o.__data && o.__data.__singleHopPhotonsObj;
862
+ u && (u.parent.remove(u), he(u), delete o.__data.__singleHopPhotonsObj);
863
+ }).onCreateObj(function(o) {
864
+ var u = j(o), d = x(o);
865
+ u && e.linkThreeObject === u && (u = u.clone());
866
+ var M;
867
+ if (!u || d) {
868
+ var E = !!w(o);
869
+ if (E)
870
+ M = new l.Mesh();
871
+ else {
872
+ var T = new l.BufferGeometry();
873
+ T[ce]("position", new l.BufferAttribute(new Float32Array(2 * 3), 3)), M = new l.Line(T);
874
+ }
875
+ }
876
+ var A;
877
+ return u ? d ? (A = new l.Group(), A.__graphDefaultObj = !0, A.add(M), A.add(u)) : A = u : (A = M, A.__graphDefaultObj = !0), A.renderOrder = 10, A.__graphObjType = "link", A;
878
+ }).onUpdateObj(function(o, u) {
879
+ if (o.__graphDefaultObj) {
880
+ var d = o.children.length ? o.children[0] : o, M = Math.ceil(w(u) * 10) / 10, E = !!M;
881
+ if (E) {
882
+ var T = M / 2, A = e.linkResolution;
883
+ if (!d.geometry.type.match(/^Cylinder(Buffer)?Geometry$/) || d.geometry.parameters.radiusTop !== T || d.geometry.parameters.radialSegments !== A) {
884
+ if (!h.hasOwnProperty(M)) {
885
+ var G = new l.CylinderGeometry(T, T, 1, A, 1, !1);
886
+ G[te](new l.Matrix4().makeTranslation(0, 1 / 2, 0)), G[te](new l.Matrix4().makeRotationX(Math.PI / 2)), h[M] = G;
887
+ }
888
+ d.geometry.dispose(), d.geometry = h[M];
889
+ }
890
+ }
891
+ var W = g(u);
892
+ if (W)
893
+ d.material = W;
894
+ else {
895
+ var V = f(u), Q = new l.Color(Z(V || "#f0f0f0")), q = e.linkOpacity * ue(V), H = E ? "MeshLambertMaterial" : "LineBasicMaterial";
896
+ if (d.material.type !== H || !d.material.color.equals(Q) || d.material.opacity !== q) {
897
+ var X = E ? O : b;
898
+ X.hasOwnProperty(V) || (X[V] = new l[H]({
899
+ color: Q,
900
+ transparent: q < 1,
901
+ opacity: q,
902
+ depthWrite: q >= 1
903
+ // Prevent transparency issues
904
+ })), d.material.dispose(), d.material = X[V];
905
+ }
906
+ }
907
+ }
908
+ }).digest(_), e.linkDirectionalArrowLength || n.hasOwnProperty("linkDirectionalArrowLength")) {
909
+ var P = v(e.linkDirectionalArrowLength), p = v(e.linkDirectionalArrowColor);
910
+ e.arrowDataMapper.onCreateObj(function() {
911
+ var o = new l.Mesh(void 0, new l.MeshLambertMaterial({
912
+ transparent: !0
913
+ }));
914
+ return o.__linkThreeObjType = "arrow", o;
915
+ }).onUpdateObj(function(o, u) {
916
+ var d = P(u), M = e.linkDirectionalArrowResolution;
917
+ if (!o.geometry.type.match(/^Cone(Buffer)?Geometry$/) || o.geometry.parameters.height !== d || o.geometry.parameters.radialSegments !== M) {
918
+ var E = new l.ConeGeometry(d * 0.25, d, M);
919
+ E.translate(0, d / 2, 0), E.rotateX(Math.PI / 2), o.geometry.dispose(), o.geometry = E;
920
+ }
921
+ var T = p(u) || f(u) || "#f0f0f0";
922
+ o.material.color = new l.Color(Z(T)), o.material.opacity = e.linkOpacity * 3 * ue(T);
923
+ }).digest(_.filter(P));
924
+ }
925
+ if (e.linkDirectionalParticles || n.hasOwnProperty("linkDirectionalParticles")) {
926
+ var D = v(e.linkDirectionalParticles), L = v(e.linkDirectionalParticleWidth), U = v(e.linkDirectionalParticleColor), C = v(e.linkDirectionalParticleThreeObject), B = {}, z = {};
927
+ e.particlesDataMapper.onCreateObj(function() {
928
+ var o = new l.Group();
929
+ return o.__linkThreeObjType = "photons", o.__photonDataMapper = new Y(o), o;
930
+ }).onUpdateObj(function(o, u) {
931
+ var d = !!o.children.length && o.children[0], M = C(u), E, T;
932
+ if (M)
933
+ E = M.geometry, T = M.material;
934
+ else {
935
+ var A = Math.ceil(L(u) * 10) / 10 / 2, G = e.linkDirectionalParticleResolution;
936
+ d && d.geometry.parameters.radius === A && d.geometry.parameters.widthSegments === G ? E = d.geometry : (z.hasOwnProperty(A) || (z[A] = new l.SphereGeometry(A, G, G)), E = z[A]);
937
+ var W = U(u) || f(u) || "#f0f0f0", V = new l.Color(Z(W)), Q = e.linkOpacity * 3;
938
+ d && d.material.color.equals(V) && d.material.opacity === Q ? T = d.material : (B.hasOwnProperty(W) || (B[W] = new l.MeshLambertMaterial({
939
+ color: V,
940
+ transparent: !0,
941
+ opacity: Q
942
+ })), T = B[W]);
943
+ }
944
+ d && (d.geometry !== E && d.geometry.dispose(), d.material !== T && d.material.dispose());
945
+ var q = Math.round(Math.abs(D(u)));
946
+ o.__photonDataMapper.id(function(H) {
947
+ return H.idx;
948
+ }).onCreateObj(function() {
949
+ return new l.Mesh(E, T);
950
+ }).onUpdateObj(function(H) {
951
+ H.geometry = E, H.material = T;
952
+ }).digest(F(new Array(q)).map(function(H, X) {
953
+ return {
954
+ idx: X
955
+ };
956
+ }));
957
+ }).digest(_.filter(D));
958
+ }
959
+ }
960
+ if (e._flushObjects = !1, t(["graphData", "nodeId", "linkSource", "linkTarget", "numDimensions", "forceEngine", "dagMode", "dagNodeFilter", "dagLevelDistance"])) {
961
+ e.engineRunning = !1, e.graphData.links.forEach(function(o) {
962
+ o.source = o[e.linkSource], o.target = o[e.linkTarget];
963
+ });
964
+ var S = e.forceEngine !== "ngraph", I;
965
+ if (S) {
966
+ (I = e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);
967
+ var $ = e.d3ForceLayout.force("link");
968
+ $ && $.id(function(o) {
969
+ return o[e.nodeId];
970
+ }).links(e.graphData.links);
971
+ var N = e.dagMode && Cr(e.graphData, function(o) {
972
+ return o[e.nodeId];
973
+ }, {
974
+ nodeFilter: e.dagNodeFilter,
975
+ onLoopError: e.onDagError || void 0
976
+ }), J = Math.max.apply(Math, F(Object.values(N || []))), ye = e.dagLevelDistance || e.graphData.nodes.length / (J || 1) * Tr * (["radialin", "radialout"].indexOf(e.dagMode) !== -1 ? 0.7 : 1);
977
+ if (["lr", "rl", "td", "bu", "zin", "zout"].includes(n.dagMode)) {
978
+ var Be = ["lr", "rl"].includes(n.dagMode) ? "fx" : ["td", "bu"].includes(n.dagMode) ? "fy" : "fz";
979
+ e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(o) {
980
+ return delete o[Be];
981
+ });
982
+ }
983
+ if (["lr", "rl", "td", "bu", "zin", "zout"].includes(e.dagMode)) {
984
+ var ze = ["rl", "td", "zout"].includes(e.dagMode), Se = function(u) {
985
+ return (N[u[e.nodeId]] - J / 2) * ye * (ze ? -1 : 1);
986
+ }, Fe = ["lr", "rl"].includes(e.dagMode) ? "fx" : ["td", "bu"].includes(e.dagMode) ? "fy" : "fz";
987
+ e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(o) {
988
+ return o[Fe] = Se(o);
989
+ });
990
+ }
991
+ e.d3ForceLayout.force("dagRadial", ["radialin", "radialout"].indexOf(e.dagMode) !== -1 ? ar(function(o) {
992
+ var u = N[o[e.nodeId]] || -1;
993
+ return (e.dagMode === "radialin" ? J - u : u) * ye;
994
+ }).strength(function(o) {
995
+ return e.dagNodeFilter(o) ? 1 : 0;
996
+ }) : null);
997
+ } else {
998
+ var re = Oe.graph();
999
+ e.graphData.nodes.forEach(function(o) {
1000
+ re.addNode(o[e.nodeId]);
1001
+ }), e.graphData.links.forEach(function(o) {
1002
+ re.addLink(o.source, o.target);
1003
+ }), I = Oe.forcelayout(re, kr({
1004
+ dimensions: e.numDimensions
1005
+ }, e.ngraphPhysics)), I.graph = re;
1006
+ }
1007
+ for (var ve = 0; ve < e.warmupTicks && !(S && e.d3AlphaMin > 0 && e.d3ForceLayout.alpha() < e.d3AlphaMin); ve++)
1008
+ I[S ? "tick" : "step"]();
1009
+ e.layout = I, this.resetCountdown();
1010
+ }
1011
+ e.engineRunning = !0, e.onFinishUpdate();
1012
+ }
1013
+ });
1014
+ function jr(r) {
1015
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Object, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, t = /* @__PURE__ */ function(a) {
1016
+ function c() {
1017
+ var s;
1018
+ xe(this, c);
1019
+ for (var m = arguments.length, y = new Array(m), k = 0; k < m; k++)
1020
+ y[k] = arguments[k];
1021
+ return s = Me(this, c, [].concat(y)), s.__kapsuleInstance = Ce(r, [].concat(F(n ? [s] : []), y)), s;
1022
+ }
1023
+ return Ae(c, a), Te(c);
1024
+ }(e);
1025
+ return Object.keys(r()).forEach(function(a) {
1026
+ return t.prototype[a] = function() {
1027
+ var c, s = (c = this.__kapsuleInstance)[a].apply(c, arguments);
1028
+ return s === this.__kapsuleInstance ? this : s;
1029
+ };
1030
+ }), t;
1031
+ }
1032
+ var Rr = window.THREE ? window.THREE : {
1033
+ Group: De
1034
+ }, Qr = jr(Ar, Rr.Group, !0);
1035
+ export {
1036
+ Qr as default
1037
+ };