@ohif/app 3.12.0-beta.99 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/{1403.bundle.94a178e2572f1f0b2a2c.js → 1403.bundle.761239eb886a88301851.js} +37 -37
  2. package/dist/{1459.bundle.3785cdd0abf449adebf1.js → 1459.bundle.fcdd0dec6286845179bf.js} +5 -6
  3. package/dist/{147.bundle.205350dc3d21478277b1.js → 147.bundle.47af018b91121924a12c.js} +10 -18
  4. package/dist/{1608.bundle.f855c4bdb7f00eb66fca.js → 1608.bundle.b9abbf4ed6cc2e491dc3.js} +10 -10
  5. package/dist/{1730.bundle.37c569ae3ed057b69840.js → 1730.bundle.51e69967a025226592cd.js} +41 -40
  6. package/dist/{1927.bundle.019331c266d306772371.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
  7. package/dist/{1933.bundle.ab5e8036f6e1c854c965.js → 1933.bundle.e3ba7d4dcbbd75701d8e.js} +19 -17
  8. package/dist/{2018.bundle.469f9ad42597b6b29ff1.js → 2018.bundle.45c44470b4b098aa343f.js} +65 -66
  9. package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.aea8d3b39486dd5ab39e.js} +569 -558
  10. package/dist/{213.bundle.398730bb3ceb1af54413.js → 213.bundle.863ab5d320fc06043a4e.js} +5 -7
  11. package/dist/{3584.bundle.839a16d349815b3f7c97.js → 2199.bundle.974037f21bfd12c4e8af.js} +256 -2236
  12. package/dist/{2424.bundle.be90e7bcf0fd8db68b2f.js → 2424.bundle.b070e83baf101dad2121.js} +5 -7
  13. package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
  14. package/dist/{2701.bundle.aca0d4f24a6f2094c3c3.js → 2701.bundle.58a6a580073edbb4cc04.js} +9 -9
  15. package/dist/{2842.bundle.7852a204d3510fca8b27.js → 2816.bundle.838fa4d72921c026083c.js} +1136 -2342
  16. package/dist/{9195.bundle.e2fd5c6b5830c0ee25a8.js → 2851.bundle.70227d013c1937e846be.js} +318 -150
  17. package/dist/{1903.bundle.dc5248f7cb6ba1dc1072.js → 3081.bundle.930757b1a5aa8549e112.js} +752 -466
  18. package/dist/{3343.bundle.f8fe9316b0ff68d087f7.js → 3343.bundle.a4424b8418b8c0c1a9e4.js} +27 -25
  19. package/dist/{3461.bundle.50c752c623f39cf6c457.js → 3461.bundle.ab31c31a5ddc4baa72f7.js} +40 -40
  20. package/dist/{4202.bundle.790706560c6edb303476.js → 4202.bundle.4f76d3a50d6cf819fba0.js} +6 -6
  21. package/dist/{4019.bundle.01f63d5dd5b96ded0c00.js → 4287.bundle.87e14e648f2bce5e4176.js} +372 -567
  22. package/dist/{4775.bundle.d7f0645419f1df8e00b8.js → 4775.bundle.768f00df706f506f3789.js} +57 -51
  23. package/dist/{4819.bundle.ef1151f023b3784bc1be.js → 4819.bundle.6377aba4cf194120e7d4.js} +35 -34
  24. package/dist/{5028.bundle.b3611b7c7422a5c2e723.js → 5028.bundle.3a086ff61ec8dc1da4b1.js} +13 -15
  25. package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
  26. package/dist/{5457.bundle.9f2eb65ad85fcbb75e27.js → 5457.bundle.0063531ed24c06fba48b.js} +16 -23
  27. package/dist/{5462.bundle.a81a691eeef782ab95b9.js → 5462.bundle.d5bb9b3ddc510fea141f.js} +1108 -1030
  28. package/dist/{5485.bundle.71041ca4bc9e6ab57d92.js → 5485.bundle.b523d7015979fc641f7e.js} +17 -32
  29. package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
  30. package/dist/5724.bundle.62ea5c07c7809ab4cd74.js +297 -0
  31. package/dist/5724.css +2 -0
  32. package/dist/{5802.bundle.28ab859d9b48a5b2c31c.js → 5802.bundle.ae4d88742c353de462c2.js} +13 -18
  33. package/dist/{5830.bundle.b073c265c4fcea1afff3.js → 5830.bundle.791019deddd536980a11.js} +3 -3
  34. package/dist/{5858.bundle.d5f4bf849aaeebf5025c.js → 5858.bundle.466e58128de344ab53f3.js} +90 -86
  35. package/dist/{6027.bundle.160bd47ea03784276275.js → 6027.bundle.3cf6c827b4ce9066b426.js} +3 -5
  36. package/dist/{6163.bundle.1f096bdbe3a341c1710d.js → 6163.bundle.ac77880c970e788c9a07.js} +33 -33
  37. package/dist/{5549.bundle.d5def6a3124a3a481b7c.js → 6280.bundle.f22f9955eb906e1d7da8.js} +2475 -1200
  38. package/dist/{3353.bundle.a0f1654c642395bbbbbc.js → 6347.bundle.f8393c20d5159ed41b64.js} +358 -214
  39. package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.d8a592b03e9a5b7a66c2.js} +102 -96
  40. package/dist/{6376.bundle.272e755bdcbb5615a44e.js → 6376.bundle.527820a5cb1eece2a8d2.js} +6 -6
  41. package/dist/{5400.bundle.de97508611da1c00d58a.js → 6409.bundle.24edbaa283b7c521b8f7.js} +517 -146
  42. package/dist/6939.bundle.41fbdef87597b5172ec6.js +3 -3
  43. package/dist/7159.bundle.a5991a5d4f0dd8f1c95f.js +3 -3
  44. package/dist/{7190.bundle.d731ae6cf6e933a2c408.js → 7190.bundle.479332d662ffe08d1f92.js} +1462 -955
  45. package/dist/{732.bundle.6978ac30a1e36abf06db.js → 732.bundle.ea6f9d8504e37e01a208.js} +5 -13
  46. package/dist/{7431.bundle.999b2b65d4973bc56218.js → 7431.bundle.b31ebb4a2625e89d864e.js} +38 -32
  47. package/dist/{7639.bundle.e004d734044049fe8fe9.js → 7639.bundle.0147cdd1c23858221b62.js} +27 -25
  48. package/dist/7758.bundle.c8d106364298e7d288f0.js +3 -3
  49. package/dist/{8094.bundle.5c44190a325ac23e3e5c.js → 8094.bundle.148a66619607e37cbf19.js} +3 -4
  50. package/dist/{8305.bundle.ba43ed23edea2bf394b3.js → 8305.bundle.565339762503b9ae4f59.js} +57 -41
  51. package/dist/{85.bundle.a16e254910c60223df19.js → 85.bundle.b2365b2e4c3c6935f453.js} +3 -5
  52. package/dist/{8558.bundle.463ddb34a619cf47493e.js → 8558.bundle.9af6d13a22ddb44ea766.js} +60 -32
  53. package/dist/{8583.bundle.59c239cf891c2e10bf10.js → 8583.bundle.f51188077125da303398.js} +42 -39
  54. package/dist/{5448.bundle.9a36e001169ea3bfeb6c.js → 8665.bundle.dc56c125411422f9f686.js} +3753 -1424
  55. package/dist/{7412.bundle.aec4834a71fc27c4ce06.js → 9205.bundle.2a2f38a4ee23647f5fa4.js} +3413 -1271
  56. package/dist/{9845.bundle.31aec3fe7a5cdc247f4e.js → 9845.bundle.31f3e7e2d28fa6033ee5.js} +22 -14
  57. package/dist/{9862.bundle.3ca0ad5f54db87ccf91e.js → 9862.bundle.73ea2a7703bf1bb96275.js} +8 -6
  58. package/dist/{9927.bundle.f421cd167be94a7109f6.js → 9927.bundle.af31e6ce5cac195607fd.js} +19 -21
  59. package/dist/app-config.js +12 -0
  60. package/dist/{app.bundle.7df5bc1cd812bd602686.js → app.bundle.b2817894afde20b59bdb.js} +67903 -63389
  61. package/dist/app.bundle.css +1 -1
  62. package/dist/{compute.bundle.fdee4a0f193ee2e1b6da.js → compute.bundle.73440405025831e0e072.js} +10 -22
  63. package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js +3254 -1792
  64. package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js.map +1 -1
  65. package/dist/{histogram-worker.bundle.d4e40a8018d2698b072e.js → histogram-worker.bundle.5b679ce4142c803c80a4.js} +11 -23
  66. package/dist/index.html +1 -1
  67. package/dist/{interpolation.bundle.1938b79f9d6db363528a.js → interpolation.bundle.7554483d97f6119414f9.js} +14 -26
  68. package/dist/{polySeg.bundle.11f9746cd60c9811a412.js → polySeg.bundle.6373e24bd578ae0d41eb.js} +8 -20
  69. package/dist/sw.js +1 -1
  70. package/package.json +24 -24
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[3584],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[2199],{
3
3
 
4
- /***/ 74690:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4
+ /***/ 74690
5
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
6
 
7
7
 
8
8
  // EXPORTS
@@ -17,8 +17,8 @@ var enums = __webpack_require__(29857);
17
17
  var eventListeners = __webpack_require__(21418);
18
18
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/mouse/mouseDownListener.js
19
19
  var mouseDownListener = __webpack_require__(68014);
20
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 6 modules
21
- var ToolGroupManager = __webpack_require__(77609);
20
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 7 modules
21
+ var ToolGroupManager = __webpack_require__(7754);
22
22
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/shared/getActiveToolForKeyboardEvent.js
23
23
 
24
24
 
@@ -135,10 +135,10 @@ function keyUp(evt) {
135
135
 
136
136
 
137
137
 
138
- /***/ }),
138
+ /***/ },
139
139
 
140
- /***/ 40100:
141
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
140
+ /***/ 40100
141
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
142
142
 
143
143
 
144
144
  // EXPORTS
@@ -183,8 +183,8 @@ var filterToolsWithAnnotationsForElement = __webpack_require__(57725);
183
183
  var filterMoveableAnnotationTools = __webpack_require__(25972);
184
184
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 18 modules
185
185
  var eventListeners = __webpack_require__(21418);
186
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 6 modules
187
- var ToolGroupManager = __webpack_require__(77609);
186
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 7 modules
187
+ var ToolGroupManager = __webpack_require__(7754);
188
188
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/shared/getMouseModifier.js
189
189
  var getMouseModifier = __webpack_require__(76910);
190
190
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js
@@ -315,14 +315,11 @@ function mouseDown(evt) {
315
315
  return;
316
316
  }
317
317
  }
318
- const isPrimaryClick = evt.detail.event.buttons === 1;
319
- const activeToolsWithEventBinding = (0,getToolsWithModesForMouseEvent/* default */.A)(evt, [mouseDown_Active], evt.detail.event.buttons);
320
- const passiveToolsIfEventWasPrimaryMouseButton = isPrimaryClick
321
- ? (0,getToolsWithModesForMouseEvent/* default */.A)(evt, [mouseDown_Passive])
322
- : undefined;
318
+ const allActiveTools = (0,getToolsWithModesForMouseEvent/* default */.A)(evt, [mouseDown_Active]);
319
+ const allPassiveTools = (0,getToolsWithModesForMouseEvent/* default */.A)(evt, [mouseDown_Passive]);
323
320
  const applicableTools = [
324
- ...(activeToolsWithEventBinding || []),
325
- ...(passiveToolsIfEventWasPrimaryMouseButton || []),
321
+ ...(allActiveTools || []),
322
+ ...(allPassiveTools || []),
326
323
  ];
327
324
  const actionExecuted = mouseDownAnnotationAction(evt);
328
325
  if (actionExecuted) {
@@ -399,8 +396,13 @@ function mouseDownActivate(evt) {
399
396
  return;
400
397
  }
401
398
  if (activeTool.addNewAnnotation) {
402
- const annotation = activeTool.addNewAnnotation(evt, 'mouse');
403
- (0,annotationSelection.setAnnotationSelected)(annotation.annotationUID);
399
+ try {
400
+ const annotation = activeTool.addNewAnnotation(evt, 'mouse');
401
+ (0,annotationSelection.setAnnotationSelected)(annotation.annotationUID);
402
+ }
403
+ catch (error) {
404
+ console.warn('Error adding new annotation, viewport not ready:', error);
405
+ }
404
406
  }
405
407
  }
406
408
 
@@ -497,17 +499,17 @@ function mouseWheel(evt) {
497
499
 
498
500
 
499
501
 
500
- /***/ }),
502
+ /***/ },
501
503
 
502
- /***/ 96198:
503
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
504
+ /***/ 96198
505
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
504
506
 
505
507
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
506
508
  /* harmony export */ A: () => (/* binding */ customCallbackHandler)
507
509
  /* harmony export */ });
508
510
  /* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85204);
509
511
  /* harmony import */ var _enums_ToolModes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49892);
510
- /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77609);
512
+ /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7754);
511
513
 
512
514
 
513
515
 
@@ -540,15 +542,15 @@ function customCallbackHandler(handlerType, customFunction, evt) {
540
542
  }
541
543
 
542
544
 
543
- /***/ }),
545
+ /***/ },
544
546
 
545
- /***/ 70333:
546
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
547
+ /***/ 70333
548
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
547
549
 
548
550
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
549
551
  /* harmony export */ A: () => (/* binding */ getToolsWithModesForMouseEvent)
550
552
  /* harmony export */ });
551
- /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77609);
553
+ /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7754);
552
554
 
553
555
  function getToolsWithModesForMouseEvent(evt, modesFilter, evtButton) {
554
556
  const { renderingEngineId, viewportId } = evt.detail;
@@ -574,10 +576,10 @@ function getToolsWithModesForMouseEvent(evt, modesFilter, evtButton) {
574
576
  }
575
577
 
576
578
 
577
- /***/ }),
579
+ /***/ },
578
580
 
579
- /***/ 84971:
580
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
581
+ /***/ 84971
582
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
581
583
 
582
584
 
583
585
  // EXPORTS
@@ -610,8 +612,8 @@ var filterMoveableAnnotationTools = __webpack_require__(25972);
610
612
  var getMouseModifier = __webpack_require__(76910);
611
613
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 18 modules
612
614
  var eventListeners = __webpack_require__(21418);
613
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 6 modules
614
- var ToolGroupManager = __webpack_require__(77609);
615
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 7 modules
616
+ var ToolGroupManager = __webpack_require__(7754);
615
617
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.js
616
618
 
617
619
 
@@ -691,15 +693,11 @@ function touchStart(evt) {
691
693
  return;
692
694
  }
693
695
  }
694
- const isPrimaryClick = Object.keys(evt.detail.event.touches).length === 1;
695
- const activeToolsWithEventBinding = getToolsWithModesForTouchEvent(evt, [touchStart_Active], Object.keys(evt.detail.event.touches).length);
696
- const passiveToolsIfEventWasPrimaryTouchButton = isPrimaryClick
697
- ? getToolsWithModesForTouchEvent(evt, [Passive])
698
- : undefined;
696
+ const allActiveTools = getToolsWithModesForTouchEvent(evt, [touchStart_Active]);
697
+ const allPassiveTools = getToolsWithModesForTouchEvent(evt, [Passive]);
699
698
  const applicableTools = [
700
- ...(activeToolsWithEventBinding || []),
701
- ...(passiveToolsIfEventWasPrimaryTouchButton || []),
702
- activeTool,
699
+ ...(allActiveTools || []),
700
+ ...(allPassiveTools || []),
703
701
  ];
704
702
  const eventDetail = evt.detail;
705
703
  const { element } = eventDetail;
@@ -812,10 +810,10 @@ const touchPress = customCallbackHandler/* default */.A.bind(null, 'Touch', 'tou
812
810
 
813
811
 
814
812
 
815
- /***/ }),
813
+ /***/ },
816
814
 
817
- /***/ 39595:
818
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
815
+ /***/ 39595
816
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
819
817
 
820
818
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
821
819
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -836,10 +834,10 @@ function disable(element) {
836
834
  });
837
835
 
838
836
 
839
- /***/ }),
837
+ /***/ },
840
838
 
841
- /***/ 40776:
842
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
839
+ /***/ 40776
840
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
843
841
 
844
842
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
845
843
  /* harmony export */ Ay: () => (__WEBPACK_DEFAULT_EXPORT__),
@@ -914,10 +912,10 @@ function resetModifierKey() {
914
912
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keyListener);
915
913
 
916
914
 
917
- /***/ }),
915
+ /***/ },
918
916
 
919
- /***/ 99019:
920
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
917
+ /***/ 99019
918
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
921
919
 
922
920
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
923
921
  /* harmony export */ A: () => (/* binding */ getMouseEventPoints)
@@ -956,10 +954,10 @@ function _clientToPoint(evt) {
956
954
  }
957
955
 
958
956
 
959
- /***/ }),
957
+ /***/ },
960
958
 
961
- /***/ 91099:
962
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
959
+ /***/ 91099
960
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
963
961
 
964
962
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
965
963
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -1001,10 +999,10 @@ function mouseDoubleClickListener(evt) {
1001
999
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mouseDoubleClickListener);
1002
1000
 
1003
1001
 
1004
- /***/ }),
1002
+ /***/ },
1005
1003
 
1006
- /***/ 68014:
1007
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1004
+ /***/ 68014
1005
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1008
1006
 
1009
1007
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1010
1008
  /* harmony export */ Ay: () => (__WEBPACK_DEFAULT_EXPORT__),
@@ -1282,10 +1280,10 @@ function mouseDoubleClickIgnoreListener(evt) {
1282
1280
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mouseDownListener);
1283
1281
 
1284
1282
 
1285
- /***/ }),
1283
+ /***/ },
1286
1284
 
1287
- /***/ 41343:
1288
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1285
+ /***/ 41343
1286
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1289
1287
 
1290
1288
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1291
1289
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -1323,10 +1321,10 @@ function mouseMoveListener(evt) {
1323
1321
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mouseMoveListener);
1324
1322
 
1325
1323
 
1326
- /***/ }),
1324
+ /***/ },
1327
1325
 
1328
- /***/ 41666:
1329
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1326
+ /***/ 41666
1327
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1330
1328
 
1331
1329
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1332
1330
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -1380,10 +1378,10 @@ function enable(element) {
1380
1378
  });
1381
1379
 
1382
1380
 
1383
- /***/ }),
1381
+ /***/ },
1384
1382
 
1385
- /***/ 82603:
1386
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1383
+ /***/ 82603
1384
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1387
1385
 
1388
1386
 
1389
1387
  // EXPORTS
@@ -1724,10 +1722,10 @@ function _updateTouchEventsLastPoints(element, lastPoints) {
1724
1722
  /* harmony default export */ const touch_touchStartListener = (touchStartListener);
1725
1723
 
1726
1724
 
1727
- /***/ }),
1725
+ /***/ },
1728
1726
 
1729
- /***/ 17806:
1730
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1727
+ /***/ 17806
1728
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1731
1729
 
1732
1730
 
1733
1731
  // EXPORTS
@@ -1828,10 +1826,10 @@ function wheelListener(evt) {
1828
1826
  /* harmony default export */ const wheel_wheelListener = (wheelListener);
1829
1827
 
1830
1828
 
1831
- /***/ }),
1829
+ /***/ },
1832
1830
 
1833
- /***/ 6802:
1834
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1831
+ /***/ 6802
1832
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1835
1833
 
1836
1834
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1837
1835
  /* harmony export */ O8: () => (/* reexport safe */ _annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.removeAnnotation),
@@ -1852,10 +1850,10 @@ function wheelListener(evt) {
1852
1850
 
1853
1851
 
1854
1852
 
1855
- /***/ }),
1853
+ /***/ },
1856
1854
 
1857
- /***/ 6273:
1858
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1855
+ /***/ 6273
1856
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1859
1857
 
1860
1858
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1861
1859
  /* harmony export */ p: () => (/* binding */ convertStackToVolumeLabelmap)
@@ -1871,10 +1869,10 @@ async function convertStackToVolumeLabelmap(args) {
1871
1869
  }
1872
1870
 
1873
1871
 
1874
- /***/ }),
1872
+ /***/ },
1875
1873
 
1876
- /***/ 98149:
1877
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1874
+ /***/ 98149
1875
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1878
1876
 
1879
1877
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1880
1878
  /* harmony export */ X: () => (/* binding */ updateStackSegmentationState)
@@ -1917,10 +1915,10 @@ async function updateStackSegmentationState({ segmentationId, viewportId, imageI
1917
1915
  }
1918
1916
 
1919
1917
 
1920
- /***/ }),
1918
+ /***/ },
1921
1919
 
1922
- /***/ 25972:
1923
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1920
+ /***/ 25972
1921
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1924
1922
 
1925
1923
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1926
1924
  /* harmony export */ A: () => (/* binding */ filterMoveableAnnotationTools)
@@ -1947,10 +1945,10 @@ function filterMoveableAnnotationTools(element, ToolAndAnnotations, canvasCoords
1947
1945
  }
1948
1946
 
1949
1947
 
1950
- /***/ }),
1948
+ /***/ },
1951
1949
 
1952
- /***/ 57725:
1953
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1950
+ /***/ 57725
1951
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1954
1952
 
1955
1953
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1956
1954
  /* harmony export */ A: () => (/* binding */ filterToolsWithAnnotationsForElement)
@@ -1980,10 +1978,10 @@ function filterToolsWithAnnotationsForElement(element, tools) {
1980
1978
  }
1981
1979
 
1982
1980
 
1983
- /***/ }),
1981
+ /***/ },
1984
1982
 
1985
- /***/ 35486:
1986
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1983
+ /***/ 35486
1984
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1987
1985
 
1988
1986
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1989
1987
  /* harmony export */ A: () => (/* binding */ filterToolsWithMoveableHandles)
@@ -2011,10 +2009,10 @@ function filterToolsWithMoveableHandles(element, ToolAndAnnotations, canvasCoord
2011
2009
  }
2012
2010
 
2013
2011
 
2014
- /***/ }),
2012
+ /***/ },
2015
2013
 
2016
- /***/ 16175:
2017
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2014
+ /***/ 16175
2015
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2018
2016
 
2019
2017
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2020
2018
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -2023,7 +2021,7 @@ function filterToolsWithMoveableHandles(element, ToolAndAnnotations, canvasCoord
2023
2021
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15327);
2024
2022
  /* harmony import */ var _distancePointToContour__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13271);
2025
2023
  /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74347);
2026
- /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95527);
2024
+ /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85895);
2027
2025
 
2028
2026
 
2029
2027
 
@@ -2103,10 +2101,10 @@ class CircleSculptCursor {
2103
2101
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CircleSculptCursor);
2104
2102
 
2105
2103
 
2106
- /***/ }),
2104
+ /***/ },
2107
2105
 
2108
- /***/ 10639:
2109
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2106
+ /***/ 10639
2107
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2110
2108
 
2111
2109
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2112
2110
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -2403,15 +2401,15 @@ GrowCutBaseTool.toolName = 'GrowCutBaseTool';
2403
2401
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GrowCutBaseTool);
2404
2402
 
2405
2403
 
2406
- /***/ }),
2404
+ /***/ },
2407
2405
 
2408
- /***/ 13271:
2409
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2406
+ /***/ 13271
2407
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2410
2408
 
2411
2409
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2412
2410
  /* harmony export */ X: () => (/* binding */ distancePointToContour)
2413
2411
  /* harmony export */ });
2414
- /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95527);
2412
+ /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85895);
2415
2413
 
2416
2414
  const distancePointToContour = (viewport, annotation, coords) => {
2417
2415
  if (!annotation?.data?.contour?.polyline?.length) {
@@ -2432,10 +2430,10 @@ const distancePointToContour = (viewport, annotation, coords) => {
2432
2430
  };
2433
2431
 
2434
2432
 
2435
- /***/ }),
2433
+ /***/ },
2436
2434
 
2437
- /***/ 47347:
2438
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2435
+ /***/ 47347
2436
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2439
2437
 
2440
2438
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2441
2439
  /* harmony export */ M: () => (/* binding */ eraseInsideRectangle)
@@ -2457,132 +2455,16 @@ function eraseOutsideRectangle(enabledElement, operationData) {
2457
2455
  }
2458
2456
 
2459
2457
 
2460
- /***/ }),
2461
-
2462
- /***/ 5565:
2463
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2464
-
2465
- __webpack_require__.r(__webpack_exports__);
2466
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2467
- /* harmony export */ checkStandardBasis: () => (/* binding */ checkStandardBasis),
2468
- /* harmony export */ inverse3x3Matrix: () => (/* binding */ inverse3x3Matrix),
2469
- /* harmony export */ rotatePoints: () => (/* binding */ rotatePoints)
2470
- /* harmony export */ });
2471
- function validate3x3Matrix(matrix) {
2472
- if (!Array.isArray(matrix) || matrix.length !== 9) {
2473
- throw new Error('Matrix must be an array of 9 numbers');
2474
- }
2475
- if (!matrix.every((n) => typeof n === 'number' && !isNaN(n))) {
2476
- throw new Error('Matrix must contain only valid numbers');
2477
- }
2478
- }
2479
- function inverse3x3Matrix(matrix) {
2480
- validate3x3Matrix(matrix);
2481
- const mat = [
2482
- [matrix[0], matrix[1], matrix[2]],
2483
- [matrix[3], matrix[4], matrix[5]],
2484
- [matrix[6], matrix[7], matrix[8]],
2485
- ];
2486
- const determinant = mat[0][0] * (mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1]) -
2487
- mat[0][1] * (mat[1][0] * mat[2][2] - mat[1][2] * mat[2][0]) +
2488
- mat[0][2] * (mat[1][0] * mat[2][1] - mat[1][1] * mat[2][0]);
2489
- if (Math.abs(determinant) < 1e-10) {
2490
- throw new Error('Matrix is not invertible (determinant is zero)');
2491
- }
2492
- const adjugate = [
2493
- [
2494
- mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1],
2495
- -(mat[0][1] * mat[2][2] - mat[0][2] * mat[2][1]),
2496
- mat[0][1] * mat[1][2] - mat[0][2] * mat[1][1],
2497
- ],
2498
- [
2499
- -(mat[1][0] * mat[2][2] - mat[1][2] * mat[2][0]),
2500
- mat[0][0] * mat[2][2] - mat[0][2] * mat[2][0],
2501
- -(mat[0][0] * mat[1][2] - mat[0][2] * mat[1][0]),
2502
- ],
2503
- [
2504
- mat[1][0] * mat[2][1] - mat[1][1] * mat[2][0],
2505
- -(mat[0][0] * mat[2][1] - mat[0][1] * mat[2][0]),
2506
- mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0],
2507
- ],
2508
- ];
2509
- const inverse = [];
2510
- for (let i = 0; i < 3; i++) {
2511
- for (let j = 0; j < 3; j++) {
2512
- inverse.push(adjugate[i][j] / determinant);
2513
- }
2514
- }
2515
- return inverse;
2516
- }
2517
- function normalizeVector(v) {
2518
- const magnitude = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
2519
- return v.map((component) => component / magnitude);
2520
- }
2521
- function checkStandardBasis(directions) {
2522
- validate3x3Matrix(directions);
2523
- const xVector = directions.slice(0, 3);
2524
- const yVector = directions.slice(3, 6);
2525
- const zVector = directions.slice(6, 9);
2526
- const normalizedX = normalizeVector(xVector);
2527
- const normalizedY = normalizeVector(yVector);
2528
- const normalizedZ = normalizeVector(zVector);
2529
- const standardBasis = {
2530
- x: [1, 0, 0],
2531
- y: [0, 1, 0],
2532
- z: [0, 0, 1],
2533
- };
2534
- const epsilon = 1e-10;
2535
- const isStandard = normalizedX.every((val, i) => Math.abs(val - standardBasis.x[i]) < epsilon) &&
2536
- normalizedY.every((val, i) => Math.abs(val - standardBasis.y[i]) < epsilon) &&
2537
- normalizedZ.every((val, i) => Math.abs(val - standardBasis.z[i]) < epsilon);
2538
- const rotationMatrix = isStandard
2539
- ? [...standardBasis.x, ...standardBasis.y, ...standardBasis.z]
2540
- : inverse3x3Matrix([...normalizedX, ...normalizedY, ...normalizedZ]);
2541
- return {
2542
- isStandard,
2543
- rotationMatrix,
2544
- };
2545
- }
2546
- function rotatePoint(point, origin, rotationMatrix) {
2547
- const x = point[0] - origin[0];
2548
- const y = point[1] - origin[1];
2549
- const z = point[2] - origin[2];
2550
- return [
2551
- rotationMatrix[0] * x +
2552
- rotationMatrix[1] * y +
2553
- rotationMatrix[2] * z +
2554
- origin[0],
2555
- rotationMatrix[3] * x +
2556
- rotationMatrix[4] * y +
2557
- rotationMatrix[5] * z +
2558
- origin[1],
2559
- rotationMatrix[6] * x +
2560
- rotationMatrix[7] * y +
2561
- rotationMatrix[8] * z +
2562
- origin[2],
2563
- ];
2564
- }
2565
- function rotatePoints(rotationMatrix, origin, points) {
2566
- const rotatedPoints = [];
2567
- for (let i = 0; i < points.length; i += 3) {
2568
- const point = points.slice(i, i + 3);
2569
- const rotated = rotatePoint(point, origin, rotationMatrix);
2570
- rotatedPoints.push(...rotated);
2571
- }
2572
- return rotatedPoints;
2573
- }
2574
-
2575
-
2576
- /***/ }),
2458
+ /***/ },
2577
2459
 
2578
- /***/ 39848:
2579
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2460
+ /***/ 39848
2461
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2580
2462
 
2581
2463
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2582
2464
  /* harmony export */ A: () => (/* binding */ getToolsWithModesForElement)
2583
2465
  /* harmony export */ });
2584
2466
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
2585
- /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77609);
2467
+ /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7754);
2586
2468
 
2587
2469
 
2588
2470
  function getToolsWithModesForElement(element, modesFilter) {
@@ -2609,10 +2491,10 @@ function getToolsWithModesForElement(element, modesFilter) {
2609
2491
  }
2610
2492
 
2611
2493
 
2612
- /***/ }),
2494
+ /***/ },
2613
2495
 
2614
- /***/ 22658:
2615
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2496
+ /***/ 22658
2497
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2616
2498
 
2617
2499
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2618
2500
  /* harmony export */ j: () => (/* binding */ getVOIMultipliers)
@@ -2640,10 +2522,10 @@ function getVOIMultipliers(viewport, volumeId, options) {
2640
2522
 
2641
2523
 
2642
2524
 
2643
- /***/ }),
2525
+ /***/ },
2644
2526
 
2645
- /***/ 38776:
2646
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2527
+ /***/ 38776
2528
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2647
2529
 
2648
2530
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2649
2531
  /* harmony export */ j: () => (/* binding */ LivewirePath)
@@ -2721,10 +2603,10 @@ class LivewirePath {
2721
2603
  }
2722
2604
 
2723
2605
 
2724
- /***/ }),
2606
+ /***/ },
2725
2607
 
2726
- /***/ 78044:
2727
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2608
+ /***/ 78044
2609
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2728
2610
 
2729
2611
 
2730
2612
  // EXPORTS
@@ -3122,251 +3004,49 @@ class LivewireScissors {
3122
3004
  }
3123
3005
 
3124
3006
 
3125
- /***/ }),
3126
-
3127
- /***/ 88638:
3128
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3129
-
3130
- // ESM COMPAT FLAG
3131
- __webpack_require__.r(__webpack_exports__);
3132
-
3133
- // EXPORTS
3134
- __webpack_require__.d(__webpack_exports__, {
3135
- distanceToPoint: () => (/* reexport */ distanceToPoint),
3136
- distanceToPointSquared: () => (/* reexport */ distanceToPointSquared),
3137
- intersectAABB: () => (/* reexport */ intersectAABB)
3138
- });
3139
-
3140
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/aabb/intersectAABB.js
3141
- function intersectAABB(aabb1, aabb2) {
3142
- return (aabb1.minX <= aabb2.maxX &&
3143
- aabb1.maxX >= aabb2.minX &&
3144
- aabb1.minY <= aabb2.maxY &&
3145
- aabb1.maxY >= aabb2.minY);
3146
- }
3147
-
3148
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/aabb/distanceToPointSquared.js
3149
- function distanceToPointSquared(aabb, point) {
3150
- const aabbWidth = aabb.maxX - aabb.minX;
3151
- const aabbHeight = aabb.maxY - aabb.minY;
3152
- const aabbSize = [aabbWidth, aabbHeight];
3153
- const aabbCenter = [
3154
- aabb.minX + aabbWidth / 2,
3155
- aabb.minY + aabbHeight / 2,
3156
- ];
3157
- const translatedPoint = [
3158
- Math.abs(point[0] - aabbCenter[0]),
3159
- Math.abs(point[1] - aabbCenter[1]),
3160
- ];
3161
- const dx = translatedPoint[0] - aabbSize[0] * 0.5;
3162
- const dy = translatedPoint[1] - aabbSize[1] * 0.5;
3163
- if (dx > 0 && dy > 0) {
3164
- return dx * dx + dy * dy;
3165
- }
3166
- const dist = Math.max(dx, 0) + Math.max(dy, 0);
3167
- return dist * dist;
3168
- }
3169
-
3170
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/aabb/distanceToPoint.js
3171
-
3172
- function distanceToPoint(aabb, point) {
3173
- return Math.sqrt(distanceToPointSquared(aabb, point));
3174
- }
3175
-
3176
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/aabb/index.js
3177
-
3178
-
3179
-
3180
-
3181
-
3182
- /***/ }),
3183
-
3184
- /***/ 25963:
3185
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3186
-
3187
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3188
- /* harmony export */ A: () => (/* binding */ angleBetweenLines)
3189
- /* harmony export */ });
3190
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
3191
-
3192
- function angleBetween3DLines(line1, line2) {
3193
- const [p1, p2] = line1;
3194
- const [p3, p4] = line2;
3195
- const v1 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.sub */ .eR.sub(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create(), p2, p1);
3196
- const v2 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.sub */ .eR.sub(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create(), p3, p4);
3197
- const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.dot */ .eR.dot(v1, v2);
3198
- const v1Length = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.length */ .eR.length(v1);
3199
- const v2Length = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.length */ .eR.length(v2);
3200
- const cos = dot / (v1Length * v2Length);
3201
- const radian = Math.acos(cos);
3202
- return (radian * 180) / Math.PI;
3203
- }
3204
- function angleBetween2DLines(line1, line2) {
3205
- const [p1, p2] = line1;
3206
- const [p3, p4] = line2;
3207
- const v1 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.sub */ .Zc.sub(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), p2, p1);
3208
- const v2 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.sub */ .Zc.sub(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), p3, p4);
3209
- const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.dot */ .Zc.dot(v1, v2);
3210
- const v1Length = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.length */ .Zc.length(v1);
3211
- const v2Length = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.length */ .Zc.length(v2);
3212
- const cos = dot / (v1Length * v2Length);
3213
- return Math.acos(cos) * (180 / Math.PI);
3214
- }
3215
- function angleBetweenLines(line1, line2) {
3216
- const is3D = line1[0].length === 3;
3217
- return is3D
3218
- ? angleBetween3DLines(line1, line2)
3219
- : angleBetween2DLines(line1, line2);
3220
- }
3221
-
3222
-
3223
- /***/ }),
3224
-
3225
- /***/ 83923:
3226
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3227
-
3228
- __webpack_require__.r(__webpack_exports__);
3229
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3230
- /* harmony export */ angleBetweenLines: () => (/* reexport safe */ _angleBetweenLines__WEBPACK_IMPORTED_MODULE_0__.A)
3231
- /* harmony export */ });
3232
- /* harmony import */ var _angleBetweenLines__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25963);
3233
-
3234
-
3235
-
3236
-
3237
- /***/ }),
3238
-
3239
- /***/ 28364:
3240
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3241
-
3242
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3243
- /* harmony export */ I: () => (/* binding */ InstanceCalculator),
3244
- /* harmony export */ t: () => (/* binding */ Calculator)
3245
- /* harmony export */ });
3246
- class Calculator {
3247
- }
3248
- class InstanceCalculator {
3249
- constructor(options) {
3250
- this.storePointData = options.storePointData;
3251
- }
3252
- getStatistics() {
3253
- console.debug('InstanceCalculator getStatistics called');
3254
- }
3255
- }
3256
-
3257
-
3258
- /***/ }),
3007
+ /***/ },
3259
3008
 
3260
- /***/ 73262:
3261
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3009
+ /***/ 11256
3010
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3262
3011
 
3263
- __webpack_require__.r(__webpack_exports__);
3264
3012
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3265
- /* harmony export */ BasicStatsCalculator: () => (/* reexport safe */ _BasicStatsCalculator__WEBPACK_IMPORTED_MODULE_0__.O),
3266
- /* harmony export */ Calculator: () => (/* reexport safe */ _Calculator__WEBPACK_IMPORTED_MODULE_1__.t),
3267
- /* harmony export */ InstanceBasicStatsCalculator: () => (/* reexport safe */ _BasicStatsCalculator__WEBPACK_IMPORTED_MODULE_0__.B),
3268
- /* harmony export */ InstanceCalculator: () => (/* reexport safe */ _Calculator__WEBPACK_IMPORTED_MODULE_1__.I)
3013
+ /* harmony export */ A: () => (/* binding */ getCanvasCircleCorners)
3269
3014
  /* harmony export */ });
3270
- /* harmony import */ var _BasicStatsCalculator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69013);
3271
- /* harmony import */ var _Calculator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28364);
3272
-
3273
-
3274
-
3275
-
3276
-
3277
- /***/ }),
3278
-
3279
- /***/ 77081:
3280
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3281
-
3282
- // ESM COMPAT FLAG
3283
- __webpack_require__.r(__webpack_exports__);
3284
-
3285
- // EXPORTS
3286
- __webpack_require__.d(__webpack_exports__, {
3287
- getCanvasCircleCorners: () => (/* reexport */ getCanvasCircleCorners),
3288
- getCanvasCircleRadius: () => (/* reexport */ getCanvasCircleRadius)
3289
- });
3290
-
3291
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/index.js + 3 modules
3292
- var point = __webpack_require__(82216);
3293
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/circle/getCanvasCircleRadius.js
3294
-
3295
- function getCanvasCircleRadius(circleCanvasPoints) {
3296
- const [center, end] = circleCanvasPoints;
3297
- return (0,point.distanceToPoint)(center, end);
3298
- }
3299
-
3300
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/circle/getCanvasCircleCorners.js
3015
+ /* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5767);
3301
3016
 
3302
3017
  function getCanvasCircleCorners(circleCanvasPoints) {
3303
3018
  const [center, end] = circleCanvasPoints;
3304
- const radius = (0,point.distanceToPoint)(center, end);
3019
+ const radius = (0,_point__WEBPACK_IMPORTED_MODULE_0__.distanceToPoint)(center, end);
3305
3020
  const topLeft = [center[0] - radius, center[1] - radius];
3306
3021
  const bottomRight = [center[0] + radius, center[1] + radius];
3307
3022
  return [topLeft, bottomRight];
3308
3023
  }
3309
3024
 
3310
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/circle/index.js
3311
3025
 
3026
+ /***/ },
3312
3027
 
3028
+ /***/ 76090
3029
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3313
3030
 
3031
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3032
+ /* harmony export */ A: () => (/* binding */ getCanvasCircleRadius)
3033
+ /* harmony export */ });
3034
+ /* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5767);
3314
3035
 
3036
+ function getCanvasCircleRadius(circleCanvasPoints) {
3037
+ const [center, end] = circleCanvasPoints;
3038
+ return (0,_point__WEBPACK_IMPORTED_MODULE_0__.distanceToPoint)(center, end);
3039
+ }
3315
3040
 
3316
- /***/ }),
3317
-
3318
- /***/ 87009:
3319
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3320
-
3321
- // ESM COMPAT FLAG
3322
- __webpack_require__.r(__webpack_exports__);
3323
-
3324
- // EXPORTS
3325
- __webpack_require__.d(__webpack_exports__, {
3326
- getCanvasEllipseCorners: () => (/* reexport */ getCanvasEllipseCorners),
3327
- pointInEllipse: () => (/* reexport */ pointInEllipse),
3328
- precalculatePointInEllipse: () => (/* reexport */ precalculatePointInEllipse)
3329
- });
3330
3041
 
3331
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/ellipse/pointInEllipse.js
3332
- function pointInEllipse(ellipse, pointLPS, inverts = {}) {
3333
- if (!inverts.precalculated) {
3334
- precalculatePointInEllipse(ellipse, inverts);
3335
- }
3336
- return inverts.precalculated(pointLPS);
3337
- }
3338
- const precalculatePointInEllipse = (ellipse, inverts = {}) => {
3339
- const { xRadius, yRadius, zRadius } = ellipse;
3340
- if (inverts.invXRadiusSq === undefined ||
3341
- inverts.invYRadiusSq === undefined ||
3342
- inverts.invZRadiusSq === undefined) {
3343
- inverts.invXRadiusSq = xRadius !== 0 ? 1 / xRadius ** 2 : 0;
3344
- inverts.invYRadiusSq = yRadius !== 0 ? 1 / yRadius ** 2 : 0;
3345
- inverts.invZRadiusSq = zRadius !== 0 ? 1 / zRadius ** 2 : 0;
3346
- }
3347
- const { invXRadiusSq, invYRadiusSq, invZRadiusSq } = inverts;
3348
- const { center } = ellipse;
3349
- const [centerL, centerP, centerS] = center;
3350
- inverts.precalculated = (pointLPS) => {
3351
- const dx = pointLPS[0] - centerL;
3352
- let inside = dx * dx * invXRadiusSq;
3353
- if (inside > 1) {
3354
- return false;
3355
- }
3356
- const dy = pointLPS[1] - centerP;
3357
- inside += dy * dy * invYRadiusSq;
3358
- if (inside > 1) {
3359
- return false;
3360
- }
3361
- const dz = pointLPS[2] - centerS;
3362
- inside += dz * dz * invZRadiusSq;
3363
- return inside <= 1;
3364
- };
3365
- return inverts;
3366
- };
3042
+ /***/ },
3367
3043
 
3044
+ /***/ 2222
3045
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3368
3046
 
3369
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/ellipse/getCanvasEllipseCorners.js
3047
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3048
+ /* harmony export */ A: () => (/* binding */ getCanvasEllipseCorners)
3049
+ /* harmony export */ });
3370
3050
  function getCanvasEllipseCorners(ellipseCanvasPoints) {
3371
3051
  const [bottom, top, left, right] = ellipseCanvasPoints;
3372
3052
  const topLeft = [left[0], top[1]];
@@ -3374,16 +3054,11 @@ function getCanvasEllipseCorners(ellipseCanvasPoints) {
3374
3054
  return [topLeft, bottomRight];
3375
3055
  }
3376
3056
 
3377
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/ellipse/index.js
3378
-
3379
-
3380
-
3381
3057
 
3058
+ /***/ },
3382
3059
 
3383
- /***/ }),
3384
-
3385
- /***/ 17787:
3386
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3060
+ /***/ 17787
3061
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3387
3062
 
3388
3063
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3389
3064
  /* harmony export */ IM: () => (/* binding */ clipInterval),
@@ -3494,93 +3169,10 @@ function calculateInnerFanPercentage(center, outerFanPairs, innerFanPairs) {
3494
3169
  }
3495
3170
 
3496
3171
 
3497
- /***/ }),
3498
-
3499
- /***/ 18989:
3500
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3501
-
3502
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3503
- /* harmony export */ A: () => (/* binding */ distanceToPointSquared)
3504
- /* harmony export */ });
3505
- /* harmony import */ var _distanceToPointSquaredInfo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73149);
3506
-
3507
- function distanceToPointSquared(lineStart, lineEnd, point) {
3508
- return (0,_distanceToPointSquaredInfo__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(lineStart, lineEnd, point).distanceSquared;
3509
- }
3510
-
3511
-
3512
- /***/ }),
3513
-
3514
- /***/ 73149:
3515
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3516
-
3517
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3518
- /* harmony export */ A: () => (/* binding */ distanceToPointSquaredInfo)
3519
- /* harmony export */ });
3520
- /* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82216);
3521
-
3522
- function distanceToPointSquaredInfo(lineStart, lineEnd, point) {
3523
- let closestPoint;
3524
- const distanceSquared = (0,_point__WEBPACK_IMPORTED_MODULE_0__.distanceToPointSquared)(lineStart, lineEnd);
3525
- if (lineStart[0] === lineEnd[0] && lineStart[1] === lineEnd[1]) {
3526
- closestPoint = lineStart;
3527
- }
3528
- if (!closestPoint) {
3529
- const dotProduct = ((point[0] - lineStart[0]) * (lineEnd[0] - lineStart[0]) +
3530
- (point[1] - lineStart[1]) * (lineEnd[1] - lineStart[1])) /
3531
- distanceSquared;
3532
- if (dotProduct < 0) {
3533
- closestPoint = lineStart;
3534
- }
3535
- else if (dotProduct > 1) {
3536
- closestPoint = lineEnd;
3537
- }
3538
- else {
3539
- closestPoint = [
3540
- lineStart[0] + dotProduct * (lineEnd[0] - lineStart[0]),
3541
- lineStart[1] + dotProduct * (lineEnd[1] - lineStart[1]),
3542
- ];
3543
- }
3544
- }
3545
- return {
3546
- point: [...closestPoint],
3547
- distanceSquared: (0,_point__WEBPACK_IMPORTED_MODULE_0__.distanceToPointSquared)(point, closestPoint),
3548
- };
3549
- }
3550
-
3551
-
3552
- /***/ }),
3553
-
3554
- /***/ 91818:
3555
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3556
-
3557
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3558
- /* harmony export */ A: () => (/* binding */ isPointOnLineSegment)
3559
- /* harmony export */ });
3560
- const ORIENTATION_TOLERANCE = 1e-2;
3561
- function isPointOnLineSegment(lineStart, lineEnd, point) {
3562
- const minX = lineStart[0] <= lineEnd[0] ? lineStart[0] : lineEnd[0];
3563
- const maxX = lineStart[0] >= lineEnd[0] ? lineStart[0] : lineEnd[0];
3564
- const minY = lineStart[1] <= lineEnd[1] ? lineStart[1] : lineEnd[1];
3565
- const maxY = lineStart[1] >= lineEnd[1] ? lineStart[1] : lineEnd[1];
3566
- const aabbContainsPoint = point[0] >= minX - ORIENTATION_TOLERANCE &&
3567
- point[0] <= maxX + ORIENTATION_TOLERANCE &&
3568
- point[1] >= minY - ORIENTATION_TOLERANCE &&
3569
- point[1] <= maxY + ORIENTATION_TOLERANCE;
3570
- if (!aabbContainsPoint) {
3571
- return false;
3572
- }
3573
- const orientation = (lineEnd[1] - lineStart[1]) * (point[0] - lineEnd[0]) -
3574
- (lineEnd[0] - lineStart[0]) * (point[1] - lineEnd[1]);
3575
- const absOrientation = orientation >= 0 ? orientation : -orientation;
3576
- return absOrientation <= ORIENTATION_TOLERANCE;
3577
- }
3578
-
3579
-
3580
- /***/ }),
3172
+ /***/ },
3581
3173
 
3582
- /***/ 82983:
3583
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3174
+ /***/ 82983
3175
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3584
3176
 
3585
3177
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3586
3178
  /* harmony export */ f: () => (/* binding */ midPoint2)
@@ -3602,10 +3194,10 @@ const midPoint2 = midPoint;
3602
3194
 
3603
3195
 
3604
3196
 
3605
- /***/ }),
3197
+ /***/ },
3606
3198
 
3607
- /***/ 82216:
3608
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3199
+ /***/ 5767
3200
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3609
3201
 
3610
3202
  // ESM COMPAT FLAG
3611
3203
  __webpack_require__.r(__webpack_exports__);
@@ -3613,1191 +3205,108 @@ __webpack_require__.r(__webpack_exports__);
3613
3205
  // EXPORTS
3614
3206
  __webpack_require__.d(__webpack_exports__, {
3615
3207
  distanceToPoint: () => (/* reexport */ distanceToPoint),
3616
- distanceToPointSquared: () => (/* reexport */ distanceToPointSquared),
3617
- mirror: () => (/* reexport */ mirror)
3208
+ distanceToPointSquared: () => (/* reexport */ distanceToPointSquared/* default */.A),
3209
+ mirror: () => (/* reexport */ mirror/* default */.A)
3618
3210
  });
3619
3211
 
3620
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/distanceToPointSquared.js
3621
- function distanceToPointSquared(p1, p2) {
3622
- if (p1.length !== p2.length) {
3623
- throw Error('Both points should have the same dimensionality');
3624
- }
3625
- const [x1, y1, z1 = 0] = p1;
3626
- const [x2, y2, z2 = 0] = p2;
3627
- const dx = x2 - x1;
3628
- const dy = y2 - y1;
3629
- const dz = z2 - z1;
3630
- return dx * dx + dy * dy + dz * dz;
3631
- }
3632
-
3212
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/distanceToPointSquared.js
3213
+ var distanceToPointSquared = __webpack_require__(31489);
3633
3214
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/distanceToPoint.js
3634
3215
 
3635
3216
  function distanceToPoint(p1, p2) {
3636
- return Math.sqrt(distanceToPointSquared(p1, p2));
3637
- }
3638
-
3639
- ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/mirror.js
3640
- function mirror(mirrorPoint, staticPoint) {
3641
- const [x1, y1] = mirrorPoint;
3642
- const [x2, y2] = staticPoint;
3643
- const newX = 2 * x2 - x1;
3644
- const newY = 2 * y2 - y1;
3645
- return [newX, newY];
3217
+ return Math.sqrt((0,distanceToPointSquared/* default */.A)(p1, p2));
3646
3218
  }
3647
3219
 
3220
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/mirror.js
3221
+ var mirror = __webpack_require__(83483);
3648
3222
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/index.js
3649
3223
 
3650
3224
 
3651
3225
 
3652
3226
 
3653
3227
 
3654
- /***/ }),
3228
+ /***/ },
3655
3229
 
3656
- /***/ 97792:
3657
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3230
+ /***/ 98122
3231
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3658
3232
 
3659
3233
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3660
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
3234
+ /* harmony export */ A: () => (/* binding */ getAABB)
3661
3235
  /* harmony export */ });
3662
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
3663
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3823);
3664
-
3665
-
3666
- const addCanvasPointsToArray = (element, canvasPoints, newCanvasPoint, commonData) => {
3667
- const { xDir, yDir, spacing } = commonData;
3668
- const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
3669
- const { viewport } = enabledElement;
3670
- if (!canvasPoints.length) {
3671
- canvasPoints.push(newCanvasPoint);
3672
- console.log('>>>>> !canvasPoints. :: RETURN');
3673
- return 1;
3674
- }
3675
- const lastWorldPos = viewport.canvasToWorld(canvasPoints[canvasPoints.length - 1]);
3676
- const newWorldPos = viewport.canvasToWorld(newCanvasPoint);
3677
- const worldPosDiff = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .eR.create();
3678
- gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.subtract */ .eR.subtract(worldPosDiff, newWorldPos, lastWorldPos);
3679
- const xDist = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(worldPosDiff, xDir));
3680
- const yDist = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(worldPosDiff, yDir));
3681
- const numPointsToAdd = Math.max(Math.floor(xDist / spacing[0]), Math.floor(yDist / spacing[0]));
3682
- if (numPointsToAdd > 1) {
3683
- const lastCanvasPoint = canvasPoints[canvasPoints.length - 1];
3684
- const canvasDist = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dist */ .Zc.dist(lastCanvasPoint, newCanvasPoint);
3685
- const canvasDir = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create();
3686
- gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(canvasDir, newCanvasPoint, lastCanvasPoint);
3687
- gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.set */ .Zc.set(canvasDir, canvasDir[0] / canvasDist, canvasDir[1] / canvasDist);
3688
- const distPerPoint = canvasDist / numPointsToAdd;
3689
- for (let i = 1; i <= numPointsToAdd; i++) {
3690
- canvasPoints.push([
3691
- lastCanvasPoint[0] + distPerPoint * canvasDir[0] * i,
3692
- lastCanvasPoint[1] + distPerPoint * canvasDir[1] * i,
3693
- ]);
3236
+ function getAABB(polyline, options) {
3237
+ let polylineToUse = polyline;
3238
+ const numDimensions = options?.numDimensions || 2;
3239
+ const is3D = numDimensions === 3;
3240
+ if (!Array.isArray(polyline[0])) {
3241
+ const currentPolyline = polyline;
3242
+ const totalPoints = currentPolyline.length / numDimensions;
3243
+ polylineToUse = new Array(currentPolyline.length / numDimensions);
3244
+ for (let i = 0, len = totalPoints; i < len; i++) {
3245
+ polylineToUse[i] = [
3246
+ currentPolyline[i * numDimensions],
3247
+ currentPolyline[i * numDimensions + 1],
3248
+ ];
3249
+ if (is3D) {
3250
+ polylineToUse[i].push(currentPolyline[i * numDimensions + 2]);
3251
+ }
3694
3252
  }
3695
3253
  }
3696
- else {
3697
- canvasPoints.push(newCanvasPoint);
3254
+ let minX = Infinity;
3255
+ let minY = Infinity;
3256
+ let maxX = -Infinity;
3257
+ let maxY = -Infinity;
3258
+ let minZ = Infinity;
3259
+ let maxZ = -Infinity;
3260
+ polylineToUse = polylineToUse;
3261
+ for (let i = 0, len = polylineToUse.length; i < len; i++) {
3262
+ const [x, y, z] = polylineToUse[i];
3263
+ minX = minX < x ? minX : x;
3264
+ minY = minY < y ? minY : y;
3265
+ maxX = maxX > x ? maxX : x;
3266
+ maxY = maxY > y ? maxY : y;
3267
+ if (is3D) {
3268
+ minZ = minZ < z ? minZ : z;
3269
+ maxZ = maxZ > z ? maxZ : z;
3270
+ }
3698
3271
  }
3699
- return numPointsToAdd;
3700
- };
3701
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (addCanvasPointsToArray);
3272
+ return is3D
3273
+ ? { minX, maxX, minY, maxY, minZ, maxZ }
3274
+ : { minX, maxX, minY, maxY };
3275
+ }
3702
3276
 
3703
3277
 
3704
- /***/ }),
3278
+ /***/ },
3705
3279
 
3706
- /***/ 56777:
3707
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3280
+ /***/ 50932
3281
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3708
3282
 
3709
3283
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3710
- /* harmony export */ A: () => (/* binding */ areLineSegmentsIntersecting)
3284
+ /* harmony export */ A: () => (/* binding */ getLineSegmentIntersectionsCoordinates)
3711
3285
  /* harmony export */ });
3712
- function areLineSegmentsIntersecting(p1, q1, p2, q2) {
3713
- let result = false;
3714
- const line1MinX = p1[0] < q1[0] ? p1[0] : q1[0];
3715
- const line1MinY = p1[1] < q1[1] ? p1[1] : q1[1];
3716
- const line1MaxX = p1[0] > q1[0] ? p1[0] : q1[0];
3717
- const line1MaxY = p1[1] > q1[1] ? p1[1] : q1[1];
3718
- const line2MinX = p2[0] < q2[0] ? p2[0] : q2[0];
3719
- const line2MinY = p2[1] < q2[1] ? p2[1] : q2[1];
3720
- const line2MaxX = p2[0] > q2[0] ? p2[0] : q2[0];
3721
- const line2MaxY = p2[1] > q2[1] ? p2[1] : q2[1];
3722
- if (line1MinX > line2MaxX ||
3723
- line1MaxX < line2MinX ||
3724
- line1MinY > line2MaxY ||
3725
- line1MaxY < line2MinY) {
3726
- return false;
3727
- }
3728
- const orient = [
3729
- orientation(p1, q1, p2),
3730
- orientation(p1, q1, q2),
3731
- orientation(p2, q2, p1),
3732
- orientation(p2, q2, q1),
3733
- ];
3734
- if (orient[0] !== orient[1] && orient[2] !== orient[3]) {
3735
- return true;
3736
- }
3737
- if (orient[0] === 0 && onSegment(p1, p2, q1)) {
3738
- result = true;
3739
- }
3740
- else if (orient[1] === 0 && onSegment(p1, q2, q1)) {
3741
- result = true;
3742
- }
3743
- else if (orient[2] === 0 && onSegment(p2, p1, q2)) {
3744
- result = true;
3745
- }
3746
- else if (orient[3] === 0 && onSegment(p2, q1, q2)) {
3747
- result = true;
3286
+ /* harmony import */ var _getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37135);
3287
+ /* harmony import */ var _getLinesIntersection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10812);
3288
+
3289
+
3290
+ function getLineSegmentIntersectionsCoordinates(points, p1, q1, closed = true) {
3291
+ const result = [];
3292
+ const polylineIndexes = (0,_getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(points, p1, q1, closed);
3293
+ for (let i = 0; i < polylineIndexes.length; i++) {
3294
+ const p2 = points[polylineIndexes[i][0]];
3295
+ const q2 = points[polylineIndexes[i][1]];
3296
+ const intersection = (0,_getLinesIntersection__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(p1, q1, p2, q2);
3297
+ result.push(intersection);
3748
3298
  }
3749
3299
  return result;
3750
3300
  }
3751
- function orientation(p, q, r) {
3752
- const orientationValue = (q[1] - p[1]) * (r[0] - q[0]) - (q[0] - p[0]) * (r[1] - q[1]);
3753
- if (orientationValue === 0) {
3754
- return 0;
3755
- }
3756
- return orientationValue > 0 ? 1 : 2;
3757
- }
3758
- function onSegment(p, q, r) {
3759
- if (q[0] <= Math.max(p[0], r[0]) &&
3760
- q[0] >= Math.min(p[0], r[0]) &&
3761
- q[1] <= Math.max(p[1], r[1]) &&
3762
- q[1] >= Math.min(p[1], r[1])) {
3763
- return true;
3764
- }
3765
- return false;
3766
- }
3767
3301
 
3768
3302
 
3769
- /***/ }),
3303
+ /***/ },
3770
3304
 
3771
- /***/ 68385:
3772
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3305
+ /***/ 8361
3306
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3773
3307
 
3774
3308
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3775
- /* harmony export */ S: () => (/* binding */ mergePolylines)
3776
- /* harmony export */ });
3777
- /* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82216);
3778
- /* harmony import */ var _getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37135);
3779
- /* harmony import */ var _containsPoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46513);
3780
- /* harmony import */ var _containsPoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42436);
3781
- /* harmony import */ var _intersectPolyline__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(405);
3782
- /* harmony import */ var _getNormal2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(11377);
3783
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3823);
3784
- /* harmony import */ var _getLinesIntersection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(10812);
3785
-
3786
-
3787
-
3788
-
3789
-
3790
-
3791
-
3792
-
3793
- var PolylinePointType;
3794
- (function (PolylinePointType) {
3795
- PolylinePointType[PolylinePointType["Vertex"] = 0] = "Vertex";
3796
- PolylinePointType[PolylinePointType["Intersection"] = 1] = "Intersection";
3797
- })(PolylinePointType || (PolylinePointType = {}));
3798
- var PolylinePointPosition;
3799
- (function (PolylinePointPosition) {
3800
- PolylinePointPosition[PolylinePointPosition["Outside"] = -1] = "Outside";
3801
- PolylinePointPosition[PolylinePointPosition["Edge"] = 0] = "Edge";
3802
- PolylinePointPosition[PolylinePointPosition["Inside"] = 1] = "Inside";
3803
- })(PolylinePointPosition || (PolylinePointPosition = {}));
3804
- var PolylinePointDirection;
3805
- (function (PolylinePointDirection) {
3806
- PolylinePointDirection[PolylinePointDirection["Exiting"] = -1] = "Exiting";
3807
- PolylinePointDirection[PolylinePointDirection["Unknown"] = 0] = "Unknown";
3808
- PolylinePointDirection[PolylinePointDirection["Entering"] = 1] = "Entering";
3809
- })(PolylinePointDirection || (PolylinePointDirection = {}));
3810
- function ensuresNextPointers(polylinePoints) {
3811
- for (let i = 0, len = polylinePoints.length; i < len; i++) {
3812
- const currentPoint = polylinePoints[i];
3813
- if (!currentPoint.next) {
3814
- currentPoint.next = polylinePoints[i === len - 1 ? 0 : i + 1];
3815
- }
3816
- }
3817
- }
3818
- function getSourceAndTargetPointsList(targetPolyline, sourcePolyline) {
3819
- const targetPolylinePoints = [];
3820
- const sourcePolylinePoints = [];
3821
- const sourceIntersectionsCache = new Map();
3822
- const isFirstPointInside = (0,_containsPoint__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(sourcePolyline, targetPolyline[0]);
3823
- let intersectionPointDirection = isFirstPointInside
3824
- ? PolylinePointDirection.Exiting
3825
- : PolylinePointDirection.Entering;
3826
- for (let i = 0, len = targetPolyline.length; i < len; i++) {
3827
- const p1 = targetPolyline[i];
3828
- const pointInside = (0,_containsPoint__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(sourcePolyline, p1);
3829
- const vertexPoint = {
3830
- type: PolylinePointType.Vertex,
3831
- coordinates: p1,
3832
- position: pointInside
3833
- ? PolylinePointPosition.Inside
3834
- : PolylinePointPosition.Outside,
3835
- visited: false,
3836
- next: null,
3837
- };
3838
- targetPolylinePoints.push(vertexPoint);
3839
- const q1 = targetPolyline[i === len - 1 ? 0 : i + 1];
3840
- const intersectionsInfo = (0,_getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sourcePolyline, p1, q1).map((intersectedLineSegment) => {
3841
- const sourceLineSegmentId = intersectedLineSegment[0];
3842
- const p2 = sourcePolyline[intersectedLineSegment[0]];
3843
- const q2 = sourcePolyline[intersectedLineSegment[1]];
3844
- const intersectionCoordinate = (0,_getLinesIntersection__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)(p1, q1, p2, q2);
3845
- const targetStartPointDistSquared = _point__WEBPACK_IMPORTED_MODULE_0__.distanceToPointSquared(p1, intersectionCoordinate);
3846
- return {
3847
- sourceLineSegmentId,
3848
- coordinate: intersectionCoordinate,
3849
- targetStartPointDistSquared,
3850
- };
3851
- });
3852
- intersectionsInfo.sort((left, right) => left.targetStartPointDistSquared - right.targetStartPointDistSquared);
3853
- intersectionsInfo.forEach((intersectionInfo) => {
3854
- const { sourceLineSegmentId, coordinate: intersectionCoordinate } = intersectionInfo;
3855
- const targetEdgePoint = {
3856
- type: PolylinePointType.Intersection,
3857
- coordinates: intersectionCoordinate,
3858
- position: PolylinePointPosition.Edge,
3859
- direction: intersectionPointDirection,
3860
- visited: false,
3861
- next: null,
3862
- };
3863
- const sourceEdgePoint = {
3864
- ...targetEdgePoint,
3865
- direction: PolylinePointDirection.Unknown,
3866
- cloned: true,
3867
- };
3868
- if (intersectionPointDirection === PolylinePointDirection.Entering) {
3869
- targetEdgePoint.next = sourceEdgePoint;
3870
- }
3871
- else {
3872
- sourceEdgePoint.next = targetEdgePoint;
3873
- }
3874
- let sourceIntersectionPoints = sourceIntersectionsCache.get(sourceLineSegmentId);
3875
- if (!sourceIntersectionPoints) {
3876
- sourceIntersectionPoints = [];
3877
- sourceIntersectionsCache.set(sourceLineSegmentId, sourceIntersectionPoints);
3878
- }
3879
- targetPolylinePoints.push(targetEdgePoint);
3880
- sourceIntersectionPoints.push(sourceEdgePoint);
3881
- intersectionPointDirection *= -1;
3882
- });
3883
- }
3884
- for (let i = 0, len = sourcePolyline.length; i < len; i++) {
3885
- const lineSegmentId = i;
3886
- const p1 = sourcePolyline[i];
3887
- const vertexPoint = {
3888
- type: PolylinePointType.Vertex,
3889
- coordinates: p1,
3890
- visited: false,
3891
- next: null,
3892
- };
3893
- sourcePolylinePoints.push(vertexPoint);
3894
- const sourceIntersectionPoints = sourceIntersectionsCache.get(lineSegmentId);
3895
- if (!sourceIntersectionPoints?.length) {
3896
- continue;
3897
- }
3898
- sourceIntersectionPoints
3899
- .map((intersectionPoint) => ({
3900
- intersectionPoint,
3901
- lineSegStartDistSquared: _point__WEBPACK_IMPORTED_MODULE_0__.distanceToPointSquared(p1, intersectionPoint.coordinates),
3902
- }))
3903
- .sort((left, right) => left.lineSegStartDistSquared - right.lineSegStartDistSquared)
3904
- .map(({ intersectionPoint }) => intersectionPoint)
3905
- .forEach((intersectionPoint) => sourcePolylinePoints.push(intersectionPoint));
3906
- }
3907
- ensuresNextPointers(targetPolylinePoints);
3908
- ensuresNextPointers(sourcePolylinePoints);
3909
- return { targetPolylinePoints, sourcePolylinePoints };
3910
- }
3911
- function getUnvisitedOutsidePoint(polylinePoints) {
3912
- for (let i = 0, len = polylinePoints.length; i < len; i++) {
3913
- const point = polylinePoints[i];
3914
- if (!point.visited &&
3915
- point.position === PolylinePointPosition.Outside &&
3916
- point.type === PolylinePointType.Vertex) {
3917
- return point;
3918
- }
3919
- }
3920
- for (let i = 0, len = polylinePoints.length; i < len; i++) {
3921
- const point = polylinePoints[i];
3922
- if (!point.visited && point.position === PolylinePointPosition.Outside) {
3923
- return point;
3924
- }
3925
- }
3926
- return undefined;
3927
- }
3928
- function mergePolylines(targetPolyline, sourcePolyline) {
3929
- const targetNormal = (0,_getNormal2__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(targetPolyline);
3930
- const sourceNormal = (0,_getNormal2__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(sourcePolyline);
3931
- const dotNormals = gl_matrix__WEBPACK_IMPORTED_MODULE_6__/* .vec3.dot */ .eR.dot(sourceNormal, targetNormal);
3932
- if (!gl_matrix__WEBPACK_IMPORTED_MODULE_6__/* .glMatrix.equals */ .Fd.equals(1, dotNormals)) {
3933
- sourcePolyline = sourcePolyline.slice().reverse();
3934
- }
3935
- const lineSegmentsIntersect = (0,_intersectPolyline__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(sourcePolyline, targetPolyline);
3936
- const targetContainedInSource = !lineSegmentsIntersect && (0,_containsPoints__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(sourcePolyline, targetPolyline);
3937
- if (targetContainedInSource) {
3938
- return sourcePolyline.slice();
3939
- }
3940
- const { targetPolylinePoints } = getSourceAndTargetPointsList(targetPolyline, sourcePolyline);
3941
- const startPoint = getUnvisitedOutsidePoint(targetPolylinePoints);
3942
- if (!startPoint) {
3943
- return targetPolyline.slice();
3944
- }
3945
- const mergedPolyline = [startPoint.coordinates];
3946
- let currentPoint = startPoint.next;
3947
- let iterationCount = 0;
3948
- const maxIterations = targetPolyline.length + sourcePolyline.length + 1000;
3949
- while (currentPoint !== startPoint && iterationCount < maxIterations) {
3950
- iterationCount++;
3951
- if (currentPoint.type === PolylinePointType.Intersection &&
3952
- currentPoint.cloned) {
3953
- currentPoint = currentPoint.next;
3954
- continue;
3955
- }
3956
- mergedPolyline.push(currentPoint.coordinates);
3957
- currentPoint = currentPoint.next;
3958
- if (!currentPoint) {
3959
- console.warn('Broken linked list detected in mergePolylines, breaking loop');
3960
- break;
3961
- }
3962
- }
3963
- if (iterationCount >= maxIterations) {
3964
- console.warn('Maximum iterations reached in mergePolylines, possible infinite loop detected');
3965
- }
3966
- return mergedPolyline;
3967
- }
3968
-
3969
-
3970
-
3971
- /***/ }),
3972
-
3973
- /***/ 46513:
3974
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3975
-
3976
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3977
- /* harmony export */ A: () => (/* binding */ containsPoint)
3978
- /* harmony export */ });
3979
- /* harmony import */ var _isClosed__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19246);
3980
-
3981
- function containsPoint(polyline, point, options = {
3982
- closed: undefined,
3983
- }) {
3984
- if (polyline.length < 3) {
3985
- return false;
3986
- }
3987
- const numPolylinePoints = polyline.length;
3988
- let numIntersections = 0;
3989
- const { closed, holes } = options;
3990
- if (holes?.length) {
3991
- for (const hole of holes) {
3992
- if (containsPoint(hole, point)) {
3993
- return false;
3994
- }
3995
- }
3996
- }
3997
- const shouldClose = !(closed === undefined ? (0,_isClosed__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(polyline) : closed);
3998
- const maxSegmentIndex = polyline.length - (shouldClose ? 1 : 2);
3999
- for (let i = 0; i <= maxSegmentIndex; i++) {
4000
- const p1 = polyline[i];
4001
- const p2Index = i === numPolylinePoints - 1 ? 0 : i + 1;
4002
- const p2 = polyline[p2Index];
4003
- const maxX = p1[0] >= p2[0] ? p1[0] : p2[0];
4004
- const maxY = p1[1] >= p2[1] ? p1[1] : p2[1];
4005
- const minY = p1[1] <= p2[1] ? p1[1] : p2[1];
4006
- const mayIntersectLineSegment = point[0] <= maxX && point[1] >= minY && point[1] < maxY;
4007
- if (mayIntersectLineSegment) {
4008
- const isVerticalLine = p1[0] === p2[0];
4009
- let intersects = isVerticalLine;
4010
- if (!intersects) {
4011
- const xIntersection = ((point[1] - p1[1]) * (p2[0] - p1[0])) / (p2[1] - p1[1]) + p1[0];
4012
- intersects = point[0] <= xIntersection;
4013
- }
4014
- numIntersections += intersects ? 1 : 0;
4015
- }
4016
- }
4017
- return !!(numIntersections % 2);
4018
- }
4019
-
4020
-
4021
- /***/ }),
4022
-
4023
- /***/ 58754:
4024
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4025
-
4026
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4027
- /* harmony export */ A: () => (/* binding */ convexHull)
4028
- /* harmony export */ });
4029
- function convexHull(pts) {
4030
- if (pts.length < 3) {
4031
- return pts.slice();
4032
- }
4033
- const points = pts
4034
- .map((p) => [p[0], p[1]])
4035
- .sort((a, b) => a[0] === b[0] ? a[1] - b[1] : a[0] - b[0]);
4036
- function cross(o, a, b) {
4037
- return (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
4038
- }
4039
- const lower = [];
4040
- for (const p of points) {
4041
- while (lower.length >= 2 &&
4042
- cross(lower[lower.length - 2], lower[lower.length - 1], p) <= 0) {
4043
- lower.pop();
4044
- }
4045
- lower.push(p);
4046
- }
4047
- const upper = [];
4048
- for (let i = points.length - 1; i >= 0; i--) {
4049
- const p = points[i];
4050
- while (upper.length >= 2 &&
4051
- cross(upper[upper.length - 2], upper[upper.length - 1], p) <= 0) {
4052
- upper.pop();
4053
- }
4054
- upper.push(p);
4055
- }
4056
- lower.pop();
4057
- upper.pop();
4058
- return lower.concat(upper);
4059
- }
4060
-
4061
-
4062
- /***/ }),
4063
-
4064
- /***/ 98122:
4065
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4066
-
4067
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4068
- /* harmony export */ A: () => (/* binding */ getAABB)
4069
- /* harmony export */ });
4070
- function getAABB(polyline, options) {
4071
- let polylineToUse = polyline;
4072
- const numDimensions = options?.numDimensions || 2;
4073
- const is3D = numDimensions === 3;
4074
- if (!Array.isArray(polyline[0])) {
4075
- const currentPolyline = polyline;
4076
- const totalPoints = currentPolyline.length / numDimensions;
4077
- polylineToUse = new Array(currentPolyline.length / numDimensions);
4078
- for (let i = 0, len = totalPoints; i < len; i++) {
4079
- polylineToUse[i] = [
4080
- currentPolyline[i * numDimensions],
4081
- currentPolyline[i * numDimensions + 1],
4082
- ];
4083
- if (is3D) {
4084
- polylineToUse[i].push(currentPolyline[i * numDimensions + 2]);
4085
- }
4086
- }
4087
- }
4088
- let minX = Infinity;
4089
- let minY = Infinity;
4090
- let maxX = -Infinity;
4091
- let maxY = -Infinity;
4092
- let minZ = Infinity;
4093
- let maxZ = -Infinity;
4094
- polylineToUse = polylineToUse;
4095
- for (let i = 0, len = polylineToUse.length; i < len; i++) {
4096
- const [x, y, z] = polylineToUse[i];
4097
- minX = minX < x ? minX : x;
4098
- minY = minY < y ? minY : y;
4099
- maxX = maxX > x ? maxX : x;
4100
- maxY = maxY > y ? maxY : y;
4101
- if (is3D) {
4102
- minZ = minZ < z ? minZ : z;
4103
- maxZ = maxZ > z ? maxZ : z;
4104
- }
4105
- }
4106
- return is3D
4107
- ? { minX, maxX, minY, maxY, minZ, maxZ }
4108
- : { minX, maxX, minY, maxY };
4109
- }
4110
-
4111
-
4112
- /***/ }),
4113
-
4114
- /***/ 86909:
4115
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4116
-
4117
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4118
- /* harmony export */ A: () => (/* binding */ getArea)
4119
- /* harmony export */ });
4120
- function getArea(points) {
4121
- const n = points.length;
4122
- let area = 0.0;
4123
- let j = n - 1;
4124
- for (let i = 0; i < n; i++) {
4125
- area += (points[j][0] + points[i][0]) * (points[j][1] - points[i][1]);
4126
- j = i;
4127
- }
4128
- return Math.abs(area / 2.0);
4129
- }
4130
-
4131
-
4132
- /***/ }),
4133
-
4134
- /***/ 32979:
4135
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4136
-
4137
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4138
- /* harmony export */ A: () => (/* binding */ getClosestLineSegmentIntersection)
4139
- /* harmony export */ });
4140
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
4141
- /* harmony import */ var _areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56777);
4142
-
4143
-
4144
- function getClosestLineSegmentIntersection(points, p1, q1, closed = true) {
4145
- let initialQ2Index;
4146
- let p2Index;
4147
- if (closed) {
4148
- p2Index = points.length - 1;
4149
- initialQ2Index = 0;
4150
- }
4151
- else {
4152
- p2Index = 0;
4153
- initialQ2Index = 1;
4154
- }
4155
- const intersections = [];
4156
- for (let q2Index = initialQ2Index; q2Index < points.length; q2Index++) {
4157
- const p2 = points[p2Index];
4158
- const q2 = points[q2Index];
4159
- if ((0,_areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(p1, q1, p2, q2)) {
4160
- intersections.push([p2Index, q2Index]);
4161
- }
4162
- p2Index = q2Index;
4163
- }
4164
- if (intersections.length === 0) {
4165
- return;
4166
- }
4167
- const distances = [];
4168
- intersections.forEach((intersection) => {
4169
- const intersectionPoints = [
4170
- points[intersection[0]],
4171
- points[intersection[1]],
4172
- ];
4173
- const midpoint = [
4174
- (intersectionPoints[0][0] + intersectionPoints[1][0]) / 2,
4175
- (intersectionPoints[0][1] + intersectionPoints[1][1]) / 2,
4176
- ];
4177
- distances.push(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.distance */ .Zc.distance(midpoint, p1));
4178
- });
4179
- const minDistance = Math.min(...distances);
4180
- const indexOfMinDistance = distances.indexOf(minDistance);
4181
- return {
4182
- segment: intersections[indexOfMinDistance],
4183
- distance: minDistance,
4184
- };
4185
- }
4186
-
4187
-
4188
- /***/ }),
4189
-
4190
- /***/ 4338:
4191
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4192
-
4193
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4194
- /* harmony export */ A: () => (/* binding */ getFirstLineSegmentIntersectionIndexes)
4195
- /* harmony export */ });
4196
- /* harmony import */ var _areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56777);
4197
-
4198
- function getFirstLineSegmentIntersectionIndexes(points, p1, q1, closed = true) {
4199
- let initialI;
4200
- let j;
4201
- if (closed) {
4202
- j = points.length - 1;
4203
- initialI = 0;
4204
- }
4205
- else {
4206
- j = 0;
4207
- initialI = 1;
4208
- }
4209
- for (let i = initialI; i < points.length; i++) {
4210
- const p2 = points[j];
4211
- const q2 = points[i];
4212
- if ((0,_areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(p1, q1, p2, q2)) {
4213
- return [j, i];
4214
- }
4215
- j = i;
4216
- }
4217
- }
4218
-
4219
-
4220
- /***/ }),
4221
-
4222
- /***/ 50932:
4223
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4224
-
4225
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4226
- /* harmony export */ A: () => (/* binding */ getLineSegmentIntersectionsCoordinates)
4227
- /* harmony export */ });
4228
- /* harmony import */ var _getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37135);
4229
- /* harmony import */ var _getLinesIntersection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10812);
4230
-
4231
-
4232
- function getLineSegmentIntersectionsCoordinates(points, p1, q1, closed = true) {
4233
- const result = [];
4234
- const polylineIndexes = (0,_getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(points, p1, q1, closed);
4235
- for (let i = 0; i < polylineIndexes.length; i++) {
4236
- const p2 = points[polylineIndexes[i][0]];
4237
- const q2 = points[polylineIndexes[i][1]];
4238
- const intersection = (0,_getLinesIntersection__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(p1, q1, p2, q2);
4239
- result.push(intersection);
4240
- }
4241
- return result;
4242
- }
4243
-
4244
-
4245
- /***/ }),
4246
-
4247
- /***/ 37135:
4248
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4249
-
4250
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4251
- /* harmony export */ A: () => (/* binding */ getLineSegmentIntersectionsIndexes)
4252
- /* harmony export */ });
4253
- /* harmony import */ var _areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56777);
4254
-
4255
- function getLineSegmentIntersectionsIndexes(polyline, p1, q1, closed = true) {
4256
- const intersections = [];
4257
- const numPoints = polyline.length;
4258
- const maxI = numPoints - (closed ? 1 : 2);
4259
- for (let i = 0; i <= maxI; i++) {
4260
- const p2 = polyline[i];
4261
- const j = i === numPoints - 1 ? 0 : i + 1;
4262
- const q2 = polyline[j];
4263
- if ((0,_areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(p1, q1, p2, q2)) {
4264
- intersections.push([i, j]);
4265
- }
4266
- }
4267
- return intersections;
4268
- }
4269
-
4270
-
4271
- /***/ }),
4272
-
4273
- /***/ 10812:
4274
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4275
-
4276
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4277
- /* harmony export */ A: () => (/* binding */ getLinesIntersection)
4278
- /* harmony export */ });
4279
- /* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93258);
4280
-
4281
- const PARALLEL_LINES_TOLERANCE = 1e-2;
4282
- function getLinesIntersection(p1, q1, p2, q2) {
4283
- const diffQ1P1 = [q1[0] - p1[0], q1[1] - p1[1]];
4284
- const diffQ2P2 = [q2[0] - p2[0], q2[1] - p2[1]];
4285
- const denominator = diffQ2P2[1] * diffQ1P1[0] - diffQ2P2[0] * diffQ1P1[1];
4286
- const absDenominator = denominator >= 0 ? denominator : -denominator;
4287
- if (absDenominator < PARALLEL_LINES_TOLERANCE) {
4288
- const line1AABB = [
4289
- p1[0] < q1[0] ? p1[0] : q1[0],
4290
- p1[0] > q1[0] ? p1[0] : q1[0],
4291
- p1[1] < q1[1] ? p1[1] : q1[1],
4292
- p1[1] > q1[1] ? p1[1] : q1[1],
4293
- ];
4294
- const line2AABB = [
4295
- p2[0] < q2[0] ? p2[0] : q2[0],
4296
- p2[0] > q2[0] ? p2[0] : q2[0],
4297
- p2[1] < q2[1] ? p2[1] : q2[1],
4298
- p2[1] > q2[1] ? p2[1] : q2[1],
4299
- ];
4300
- const aabbIntersects = line1AABB[0] <= line2AABB[1] &&
4301
- line1AABB[1] >= line2AABB[0] &&
4302
- line1AABB[2] <= line2AABB[3] &&
4303
- line1AABB[3] >= line2AABB[2];
4304
- if (!aabbIntersects) {
4305
- return;
4306
- }
4307
- const overlap = _line__WEBPACK_IMPORTED_MODULE_0__.isPointOnLineSegment(p1, q1, p2) ||
4308
- _line__WEBPACK_IMPORTED_MODULE_0__.isPointOnLineSegment(p1, q1, q2) ||
4309
- _line__WEBPACK_IMPORTED_MODULE_0__.isPointOnLineSegment(p2, q2, p1);
4310
- if (!overlap) {
4311
- return;
4312
- }
4313
- const minX = line1AABB[0] > line2AABB[0] ? line1AABB[0] : line2AABB[0];
4314
- const maxX = line1AABB[1] < line2AABB[1] ? line1AABB[1] : line2AABB[1];
4315
- const minY = line1AABB[2] > line2AABB[2] ? line1AABB[2] : line2AABB[2];
4316
- const maxY = line1AABB[3] < line2AABB[3] ? line1AABB[3] : line2AABB[3];
4317
- const midX = (minX + maxX) * 0.5;
4318
- const midY = (minY + maxY) * 0.5;
4319
- return [midX, midY];
4320
- }
4321
- let a = p1[1] - p2[1];
4322
- let b = p1[0] - p2[0];
4323
- const numerator1 = diffQ2P2[0] * a - diffQ2P2[1] * b;
4324
- const numerator2 = diffQ1P1[0] * a - diffQ1P1[1] * b;
4325
- a = numerator1 / denominator;
4326
- b = numerator2 / denominator;
4327
- const resultX = p1[0] + a * diffQ1P1[0];
4328
- const resultY = p1[1] + a * diffQ1P1[1];
4329
- return [resultX, resultY];
4330
- }
4331
-
4332
-
4333
- /***/ }),
4334
-
4335
- /***/ 11377:
4336
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4337
-
4338
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4339
- /* harmony export */ A: () => (/* binding */ getNormal2)
4340
- /* harmony export */ });
4341
- /* harmony import */ var _getSignedArea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63113);
4342
-
4343
- function getNormal2(polyline) {
4344
- const area = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(polyline);
4345
- return [0, 0, area / Math.abs(area)];
4346
- }
4347
-
4348
-
4349
- /***/ }),
4350
-
4351
- /***/ 43490:
4352
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4353
-
4354
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4355
- /* harmony export */ A: () => (/* binding */ getNormal3)
4356
- /* harmony export */ });
4357
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
4358
-
4359
- function _getAreaVector(polyline) {
4360
- const vecArea = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
4361
- const refPoint = polyline[0];
4362
- for (let i = 0, len = polyline.length; i < len; i++) {
4363
- const p1 = polyline[i];
4364
- const p2Index = i === len - 1 ? 0 : i + 1;
4365
- const p2 = polyline[p2Index];
4366
- const aX = p1[0] - refPoint[0];
4367
- const aY = p1[1] - refPoint[1];
4368
- const aZ = p1[2] - refPoint[2];
4369
- const bX = p2[0] - refPoint[0];
4370
- const bY = p2[1] - refPoint[1];
4371
- const bZ = p2[2] - refPoint[2];
4372
- vecArea[0] += aY * bZ - aZ * bY;
4373
- vecArea[1] += aZ * bX - aX * bZ;
4374
- vecArea[2] += aX * bY - aY * bX;
4375
- }
4376
- gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.scale */ .eR.scale(vecArea, vecArea, 0.5);
4377
- return vecArea;
4378
- }
4379
- function getNormal3(polyline) {
4380
- const vecArea = _getAreaVector(polyline);
4381
- return gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.normalize */ .eR.normalize(vecArea, vecArea);
4382
- }
4383
-
4384
-
4385
- /***/ }),
4386
-
4387
- /***/ 61785:
4388
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4389
-
4390
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4391
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
4392
- /* harmony export */ });
4393
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
4394
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3823);
4395
-
4396
-
4397
- const EPSILON = 1e-3;
4398
- const getSubPixelSpacingAndXYDirections = (viewport, subPixelResolution) => {
4399
- let spacing;
4400
- let xDir;
4401
- let yDir;
4402
- if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.StackViewport) {
4403
- const imageData = viewport.getImageData();
4404
- if (!imageData) {
4405
- return;
4406
- }
4407
- xDir = imageData.direction.slice(0, 3);
4408
- yDir = imageData.direction.slice(3, 6);
4409
- spacing = imageData.spacing;
4410
- }
4411
- else {
4412
- const imageData = viewport.getImageData();
4413
- const { direction, spacing: volumeSpacing } = imageData;
4414
- const { viewPlaneNormal, viewUp } = viewport.getCamera();
4415
- const iVector = direction.slice(0, 3);
4416
- const jVector = direction.slice(3, 6);
4417
- const kVector = direction.slice(6, 9);
4418
- const viewRight = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .eR.create();
4419
- gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.cross */ .eR.cross(viewRight, viewUp, viewPlaneNormal);
4420
- const absViewRightDotI = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewRight, iVector));
4421
- const absViewRightDotJ = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewRight, jVector));
4422
- const absViewRightDotK = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewRight, kVector));
4423
- let xSpacing;
4424
- if (Math.abs(1 - absViewRightDotI) < EPSILON) {
4425
- xSpacing = volumeSpacing[0];
4426
- xDir = iVector;
4427
- }
4428
- else if (Math.abs(1 - absViewRightDotJ) < EPSILON) {
4429
- xSpacing = volumeSpacing[1];
4430
- xDir = jVector;
4431
- }
4432
- else if (Math.abs(1 - absViewRightDotK) < EPSILON) {
4433
- xSpacing = volumeSpacing[2];
4434
- xDir = kVector;
4435
- }
4436
- else {
4437
- throw new Error('No support yet for oblique plane planar contours');
4438
- }
4439
- const absViewUpDotI = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewUp, iVector));
4440
- const absViewUpDotJ = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewUp, jVector));
4441
- const absViewUpDotK = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewUp, kVector));
4442
- let ySpacing;
4443
- if (Math.abs(1 - absViewUpDotI) < EPSILON) {
4444
- ySpacing = volumeSpacing[0];
4445
- yDir = iVector;
4446
- }
4447
- else if (Math.abs(1 - absViewUpDotJ) < EPSILON) {
4448
- ySpacing = volumeSpacing[1];
4449
- yDir = jVector;
4450
- }
4451
- else if (Math.abs(1 - absViewUpDotK) < EPSILON) {
4452
- ySpacing = volumeSpacing[2];
4453
- yDir = kVector;
4454
- }
4455
- else {
4456
- throw new Error('No support yet for oblique plane planar contours');
4457
- }
4458
- spacing = [xSpacing, ySpacing];
4459
- }
4460
- const subPixelSpacing = [
4461
- spacing[0] / subPixelResolution,
4462
- spacing[1] / subPixelResolution,
4463
- ];
4464
- return { spacing: subPixelSpacing, xDir, yDir };
4465
- };
4466
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSubPixelSpacingAndXYDirections);
4467
-
4468
-
4469
- /***/ }),
4470
-
4471
- /***/ 4239:
4472
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4473
-
4474
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4475
- /* harmony export */ A: () => (/* binding */ getWindingDirection)
4476
- /* harmony export */ });
4477
- /* harmony import */ var _getSignedArea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63113);
4478
-
4479
- function getWindingDirection(polyline) {
4480
- const signedArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(polyline);
4481
- return signedArea >= 0 ? 1 : -1;
4482
- }
4483
-
4484
-
4485
- /***/ }),
4486
-
4487
- /***/ 405:
4488
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4489
-
4490
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4491
- /* harmony export */ A: () => (/* binding */ intersectPolyline)
4492
- /* harmony export */ });
4493
- /* harmony import */ var _getFirstLineSegmentIntersectionIndexes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4338);
4494
-
4495
- function intersectPolyline(sourcePolyline, targetPolyline) {
4496
- for (let i = 0, sourceLen = sourcePolyline.length; i < sourceLen; i++) {
4497
- const sourceP1 = sourcePolyline[i];
4498
- const sourceP2Index = i === sourceLen - 1 ? 0 : i + 1;
4499
- const sourceP2 = sourcePolyline[sourceP2Index];
4500
- const intersectionPointIndexes = (0,_getFirstLineSegmentIntersectionIndexes__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(targetPolyline, sourceP1, sourceP2);
4501
- if (intersectionPointIndexes?.length === 2) {
4502
- return true;
4503
- }
4504
- }
4505
- return false;
4506
- }
4507
-
4508
-
4509
- /***/ }),
4510
-
4511
- /***/ 70112:
4512
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4513
-
4514
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4515
- /* harmony export */ A: () => (/* binding */ intersectPolylines)
4516
- /* harmony export */ });
4517
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
4518
- /* harmony import */ var _containsPoint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(46513);
4519
- /* harmony import */ var _getSignedArea__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63113);
4520
- /* harmony import */ var _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36039);
4521
-
4522
-
4523
-
4524
-
4525
- function intersectPolylines(mainPolyCoords, clipPolyCoordsInput) {
4526
- if (mainPolyCoords.length < 3 || clipPolyCoordsInput.length < 3) {
4527
- return [];
4528
- }
4529
- let clipPolyCoords = clipPolyCoordsInput.slice();
4530
- const mainArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(mainPolyCoords);
4531
- const clipArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(clipPolyCoords);
4532
- if (Math.abs(mainArea) < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8 || Math.abs(clipArea) < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8) {
4533
- return [];
4534
- }
4535
- if (mainArea < 0) {
4536
- mainPolyCoords = mainPolyCoords.slice().reverse();
4537
- }
4538
- if (clipArea < 0) {
4539
- clipPolyCoords = clipPolyCoords.slice().reverse();
4540
- }
4541
- const currentClipPolyForPIP = clipPolyCoords;
4542
- const intersections = [];
4543
- for (let i = 0; i < mainPolyCoords.length; i++) {
4544
- const p1 = mainPolyCoords[i];
4545
- const p2 = mainPolyCoords[(i + 1) % mainPolyCoords.length];
4546
- for (let j = 0; j < clipPolyCoords.length; j++) {
4547
- const q1 = clipPolyCoords[j];
4548
- const q2 = clipPolyCoords[(j + 1) % clipPolyCoords.length];
4549
- const intersectPt = (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .robustSegmentIntersection */ .O4)(p1, p2, q1, q2);
4550
- if (intersectPt) {
4551
- const lenP = Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(p1, p2));
4552
- const lenQ = Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(q1, q2));
4553
- intersections.push({
4554
- coord: [...intersectPt],
4555
- seg1Idx: i,
4556
- seg2Idx: j,
4557
- alpha1: lenP < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8
4558
- ? 0
4559
- : Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(p1, intersectPt)) / lenP,
4560
- alpha2: lenQ < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8
4561
- ? 0
4562
- : Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(q1, intersectPt)) / lenQ,
4563
- });
4564
- }
4565
- }
4566
- }
4567
- if (intersections.length === 0) {
4568
- if ((0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(currentClipPolyForPIP, mainPolyCoords[0]) &&
4569
- mainPolyCoords.every((pt) => (0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(currentClipPolyForPIP, pt))) {
4570
- return [[...mainPolyCoords.map((p) => [...p])]];
4571
- }
4572
- if ((0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(mainPolyCoords, clipPolyCoords[0]) &&
4573
- clipPolyCoords.every((pt) => (0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(mainPolyCoords, pt))) {
4574
- return [[...clipPolyCoords.map((p) => [...p])]];
4575
- }
4576
- return [];
4577
- }
4578
- const buildAugmentedList = (polyCoords, polyIndex, allIntersections) => {
4579
- const augmentedList = [];
4580
- let nodeIdCounter = 0;
4581
- for (let i = 0; i < polyCoords.length; i++) {
4582
- const p1 = polyCoords[i];
4583
- augmentedList.push({
4584
- id: `${polyIndex}_v${nodeIdCounter++}`,
4585
- coordinates: [...p1],
4586
- type: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Vertex,
4587
- originalPolyIndex: polyIndex,
4588
- originalVertexIndex: i,
4589
- next: null,
4590
- prev: null,
4591
- isIntersection: false,
4592
- visited: false,
4593
- processedInPath: false,
4594
- intersectionDir: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Unknown,
4595
- });
4596
- const segmentIntersections = allIntersections
4597
- .filter((isect) => (polyIndex === 0 ? isect.seg1Idx : isect.seg2Idx) === i)
4598
- .sort((a, b) => (polyIndex === 0 ? a.alpha1 : a.alpha2) -
4599
- (polyIndex === 0 ? b.alpha1 : b.alpha2));
4600
- for (const isect of segmentIntersections) {
4601
- if (augmentedList.length > 0 &&
4602
- (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(augmentedList[augmentedList.length - 1].coordinates, isect.coord)) {
4603
- const lastNode = augmentedList[augmentedList.length - 1];
4604
- if (!lastNode.isIntersection) {
4605
- lastNode.isIntersection = true;
4606
- lastNode.intersectionInfo = isect;
4607
- lastNode.alpha = polyIndex === 0 ? isect.alpha1 : isect.alpha2;
4608
- lastNode.type = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Intersection;
4609
- }
4610
- continue;
4611
- }
4612
- augmentedList.push({
4613
- id: `${polyIndex}_i${nodeIdCounter++}`,
4614
- coordinates: [...isect.coord],
4615
- type: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Intersection,
4616
- originalPolyIndex: polyIndex,
4617
- next: null,
4618
- prev: null,
4619
- isIntersection: true,
4620
- visited: false,
4621
- processedInPath: false,
4622
- alpha: polyIndex === 0 ? isect.alpha1 : isect.alpha2,
4623
- intersectionInfo: isect,
4624
- intersectionDir: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Unknown,
4625
- });
4626
- }
4627
- }
4628
- const finalList = [];
4629
- if (augmentedList.length > 0) {
4630
- finalList.push(augmentedList[0]);
4631
- for (let i = 1; i < augmentedList.length; i++) {
4632
- if (!(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(augmentedList[i].coordinates, finalList[finalList.length - 1].coordinates)) {
4633
- finalList.push(augmentedList[i]);
4634
- }
4635
- else {
4636
- const lastNodeInFinal = finalList[finalList.length - 1];
4637
- if (augmentedList[i].isIntersection &&
4638
- augmentedList[i].intersectionInfo) {
4639
- lastNodeInFinal.isIntersection = true;
4640
- lastNodeInFinal.intersectionInfo =
4641
- augmentedList[i].intersectionInfo;
4642
- lastNodeInFinal.alpha = augmentedList[i].alpha;
4643
- lastNodeInFinal.type = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Intersection;
4644
- }
4645
- }
4646
- }
4647
- }
4648
- if (finalList.length > 1 &&
4649
- (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(finalList[0].coordinates, finalList[finalList.length - 1].coordinates)) {
4650
- const firstNode = finalList[0];
4651
- const lastNodePopped = finalList.pop();
4652
- if (lastNodePopped.isIntersection &&
4653
- !firstNode.isIntersection &&
4654
- lastNodePopped.intersectionInfo) {
4655
- firstNode.isIntersection = true;
4656
- firstNode.intersectionInfo = lastNodePopped.intersectionInfo;
4657
- firstNode.alpha = lastNodePopped.alpha;
4658
- firstNode.type = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Intersection;
4659
- }
4660
- }
4661
- if (finalList.length > 0) {
4662
- for (let i = 0; i < finalList.length; i++) {
4663
- finalList[i].next = finalList[(i + 1) % finalList.length];
4664
- finalList[i].prev =
4665
- finalList[(i - 1 + finalList.length) % finalList.length];
4666
- }
4667
- }
4668
- return finalList;
4669
- };
4670
- const mainAugmented = buildAugmentedList(mainPolyCoords, 0, intersections);
4671
- const clipAugmented = buildAugmentedList(clipPolyCoords, 1, intersections);
4672
- if (mainAugmented.length === 0 || clipAugmented.length === 0) {
4673
- return [];
4674
- }
4675
- mainAugmented.forEach((mainNode) => {
4676
- if (mainNode.isIntersection && mainNode.intersectionInfo) {
4677
- const mainIntersectData = mainNode.intersectionInfo;
4678
- const partnerNode = clipAugmented.find((clipNode) => clipNode.isIntersection &&
4679
- clipNode.intersectionInfo &&
4680
- (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(clipNode.coordinates, mainNode.coordinates) &&
4681
- clipNode.intersectionInfo.seg1Idx === mainIntersectData.seg1Idx &&
4682
- clipNode.intersectionInfo.seg2Idx === mainIntersectData.seg2Idx);
4683
- if (partnerNode) {
4684
- mainNode.partnerNode = partnerNode;
4685
- partnerNode.partnerNode = mainNode;
4686
- const v_arrival_main = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), mainNode.coordinates, mainNode.prev.coordinates);
4687
- const v_departure_clip = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), partnerNode.next.coordinates, partnerNode.coordinates);
4688
- const crossZ = v_arrival_main[0] * v_departure_clip[1] -
4689
- v_arrival_main[1] * v_departure_clip[0];
4690
- if (crossZ > _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8) {
4691
- mainNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering;
4692
- partnerNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Exiting;
4693
- }
4694
- else if (crossZ < -_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8) {
4695
- mainNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Exiting;
4696
- partnerNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering;
4697
- }
4698
- else {
4699
- const midPrevMainSeg = [
4700
- (mainNode.prev.coordinates[0] + mainNode.coordinates[0]) / 2,
4701
- (mainNode.prev.coordinates[1] + mainNode.coordinates[1]) / 2,
4702
- ];
4703
- if ((0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(currentClipPolyForPIP, midPrevMainSeg)) {
4704
- mainNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Exiting;
4705
- partnerNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering;
4706
- }
4707
- else {
4708
- mainNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering;
4709
- partnerNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Exiting;
4710
- }
4711
- }
4712
- }
4713
- else {
4714
- mainNode.isIntersection = false;
4715
- mainNode.intersectionInfo = undefined;
4716
- }
4717
- }
4718
- });
4719
- const resultPolygons = [];
4720
- for (const startCand of mainAugmented) {
4721
- if (!startCand.isIntersection ||
4722
- startCand.visited ||
4723
- startCand.intersectionDir !== _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering) {
4724
- continue;
4725
- }
4726
- let currentPathCoords = [];
4727
- let currentNode = startCand;
4728
- let onMainList = true;
4729
- const pathStartNode = startCand;
4730
- let safetyBreak = 0;
4731
- const maxIter = (mainAugmented.length + clipAugmented.length) * 2;
4732
- mainAugmented.forEach((n) => (n.processedInPath = false));
4733
- clipAugmented.forEach((n) => (n.processedInPath = false));
4734
- do {
4735
- if (safetyBreak++ > maxIter) {
4736
- console.warn('Intersection: Max iterations in path tracing.', pathStartNode.id, currentNode.id);
4737
- currentPathCoords = [];
4738
- break;
4739
- }
4740
- if (currentNode.processedInPath && currentNode !== pathStartNode) {
4741
- console.warn('Intersection: Path processing loop detected, discarding path segment.', pathStartNode.id, currentNode.id);
4742
- currentPathCoords = [];
4743
- break;
4744
- }
4745
- currentNode.processedInPath = true;
4746
- currentNode.visited = true;
4747
- if (currentPathCoords.length === 0 ||
4748
- !(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(currentPathCoords[currentPathCoords.length - 1], currentNode.coordinates)) {
4749
- currentPathCoords.push([...currentNode.coordinates]);
4750
- }
4751
- let switchedList = false;
4752
- if (currentNode.isIntersection && currentNode.partnerNode) {
4753
- if (onMainList) {
4754
- currentNode = currentNode.partnerNode;
4755
- onMainList = false;
4756
- switchedList = true;
4757
- }
4758
- else {
4759
- currentNode = currentNode.partnerNode;
4760
- onMainList = true;
4761
- switchedList = true;
4762
- }
4763
- }
4764
- if (!switchedList) {
4765
- currentNode = currentNode.next;
4766
- }
4767
- else {
4768
- currentNode = currentNode.next;
4769
- }
4770
- } while (currentNode !== pathStartNode ||
4771
- (onMainList && currentNode.originalPolyIndex !== 0) ||
4772
- (!onMainList && currentNode.originalPolyIndex !== 1));
4773
- if (safetyBreak > maxIter || currentPathCoords.length === 0) {
4774
- }
4775
- else if (currentPathCoords.length > 0 &&
4776
- (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(currentPathCoords[0], currentPathCoords[currentPathCoords.length - 1])) {
4777
- currentPathCoords.pop();
4778
- }
4779
- if (currentPathCoords.length >= 3) {
4780
- const resultArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(currentPathCoords);
4781
- if (mainArea > 0 && resultArea < 0) {
4782
- currentPathCoords.reverse();
4783
- }
4784
- else if (mainArea < 0 && resultArea > 0) {
4785
- currentPathCoords.reverse();
4786
- }
4787
- resultPolygons.push(currentPathCoords.map((p) => [...p]));
4788
- }
4789
- }
4790
- return resultPolygons;
4791
- }
4792
-
4793
-
4794
- /***/ }),
4795
-
4796
- /***/ 8361:
4797
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4798
-
4799
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4800
- /* harmony export */ i: () => (/* binding */ isPointInsidePolyline3D)
3309
+ /* harmony export */ i: () => (/* binding */ isPointInsidePolyline3D)
4801
3310
  /* harmony export */ });
4802
3311
  /* harmony import */ var _containsPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46513);
4803
3312
  /* harmony import */ var _projectTo2D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28502);
@@ -4828,10 +3337,10 @@ function isPointInsidePolyline3D(point, polyline, options = {}) {
4828
3337
  }
4829
3338
 
4830
3339
 
4831
- /***/ }),
3340
+ /***/ },
4832
3341
 
4833
- /***/ 80514:
4834
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3342
+ /***/ 80514
3343
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4835
3344
 
4836
3345
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4837
3346
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -4871,26 +3380,10 @@ const pointCanProjectOnLine = (p, p1, p2, proximity) => {
4871
3380
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pointCanProjectOnLine);
4872
3381
 
4873
3382
 
4874
- /***/ }),
4875
-
4876
- /***/ 82265:
4877
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4878
-
4879
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4880
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
4881
- /* harmony export */ });
4882
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
4883
-
4884
- const pointsAreWithinCloseContourProximity = (p1, p2, closeContourProximity) => {
4885
- return gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.dist */ .Zc.dist(p1, p2) < closeContourProximity;
4886
- };
4887
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pointsAreWithinCloseContourProximity);
4888
-
4889
-
4890
- /***/ }),
3383
+ /***/ },
4891
3384
 
4892
- /***/ 28502:
4893
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3385
+ /***/ 28502
3386
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4894
3387
 
4895
3388
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4896
3389
  /* harmony export */ p: () => (/* binding */ projectTo2D)
@@ -4923,483 +3416,10 @@ function projectTo2D(polyline) {
4923
3416
  }
4924
3417
 
4925
3418
 
4926
- /***/ }),
4927
-
4928
- /***/ 36039:
4929
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4930
-
4931
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4932
- /* harmony export */ O4: () => (/* binding */ robustSegmentIntersection),
4933
- /* harmony export */ Sk: () => (/* binding */ pointsAreEqual),
4934
- /* harmony export */ lG: () => (/* binding */ IntersectionDirection),
4935
- /* harmony export */ n7: () => (/* binding */ PolylineNodeType),
4936
- /* harmony export */ p8: () => (/* binding */ EPSILON)
4937
- /* harmony export */ });
4938
- /* unused harmony export vec2CrossZ */
4939
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
4940
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3823);
4941
-
4942
-
4943
- const EPSILON = 1e-7;
4944
- function vec2CrossZ(a, b) {
4945
- return a[0] * b[1] - a[1] * b[0];
4946
- }
4947
- function pointsAreEqual(p1, p2) {
4948
- return _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.isEqual(p1, p2, EPSILON);
4949
- }
4950
- function robustSegmentIntersection(p1, p2, q1, q2) {
4951
- const r = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p2, p1);
4952
- const s = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q2, q1);
4953
- const rxs = vec2CrossZ(r, s);
4954
- const qmp = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q1, p1);
4955
- const qmpxr = vec2CrossZ(qmp, r);
4956
- if (Math.abs(rxs) < EPSILON) {
4957
- if (Math.abs(qmpxr) < EPSILON) {
4958
- const rDotR = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(r, r);
4959
- const sDotS = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(s, s);
4960
- if (rDotR < EPSILON || sDotS < EPSILON) {
4961
- if (pointsAreEqual(p1, q1) || pointsAreEqual(p1, q2)) {
4962
- return p1;
4963
- }
4964
- if (pointsAreEqual(p2, q1) || pointsAreEqual(p2, q2)) {
4965
- return p2;
4966
- }
4967
- return null;
4968
- }
4969
- const t0 = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q1, p1), r) / rDotR;
4970
- const t1 = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q2, p1), r) / rDotR;
4971
- const u0 = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p1, q1), s) / sDotS;
4972
- const u1 = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p2, q1), s) / sDotS;
4973
- const isInRange = (t) => t >= -EPSILON && t <= 1 + EPSILON;
4974
- if (isInRange(t0)) {
4975
- const projectedPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.scaleAndAdd */ .Zc.scaleAndAdd(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p1, r, t0);
4976
- if (pointsAreEqual(q1, projectedPoint)) {
4977
- return q1;
4978
- }
4979
- }
4980
- if (isInRange(t1)) {
4981
- const projectedPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.scaleAndAdd */ .Zc.scaleAndAdd(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p1, r, t1);
4982
- if (pointsAreEqual(q2, projectedPoint)) {
4983
- return q2;
4984
- }
4985
- }
4986
- if (isInRange(u0)) {
4987
- const projectedPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.scaleAndAdd */ .Zc.scaleAndAdd(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q1, s, u0);
4988
- if (pointsAreEqual(p1, projectedPoint)) {
4989
- return p1;
4990
- }
4991
- }
4992
- if (isInRange(u1)) {
4993
- const projectedPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.scaleAndAdd */ .Zc.scaleAndAdd(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q1, s, u1);
4994
- if (pointsAreEqual(p2, projectedPoint)) {
4995
- return p2;
4996
- }
4997
- }
4998
- }
4999
- return null;
5000
- }
5001
- const t = vec2CrossZ(qmp, s) / rxs;
5002
- const u = qmpxr / rxs;
5003
- if (t >= -EPSILON && t <= 1 + EPSILON && u >= -EPSILON && u <= 1 + EPSILON) {
5004
- return [p1[0] + t * r[0], p1[1] + t * r[1]];
5005
- }
5006
- return null;
5007
- }
5008
- var PolylineNodeType;
5009
- (function (PolylineNodeType) {
5010
- PolylineNodeType[PolylineNodeType["Vertex"] = 0] = "Vertex";
5011
- PolylineNodeType[PolylineNodeType["Intersection"] = 1] = "Intersection";
5012
- })(PolylineNodeType || (PolylineNodeType = {}));
5013
- var IntersectionDirection;
5014
- (function (IntersectionDirection) {
5015
- IntersectionDirection[IntersectionDirection["Entering"] = 0] = "Entering";
5016
- IntersectionDirection[IntersectionDirection["Exiting"] = 1] = "Exiting";
5017
- IntersectionDirection[IntersectionDirection["Unknown"] = 2] = "Unknown";
5018
- })(IntersectionDirection || (IntersectionDirection = {}));
5019
-
5020
-
5021
- /***/ }),
5022
-
5023
- /***/ 6521:
5024
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5025
-
5026
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5027
- /* harmony export */ A: () => (/* binding */ subtractPolylines)
5028
- /* harmony export */ });
5029
- /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
5030
- /* harmony import */ var _getSignedArea__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63113);
5031
- /* harmony import */ var _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36039);
5032
- /* harmony import */ var _containsPoint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46513);
5033
- /* harmony import */ var _arePolylinesIdentical__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15346);
5034
-
5035
-
5036
-
5037
-
5038
-
5039
- function subtractPolylines(targetPolylineCoords, sourcePolylineCoordsInput) {
5040
- if (targetPolylineCoords.length < 3) {
5041
- return [];
5042
- }
5043
- if (sourcePolylineCoordsInput.length < 3) {
5044
- return [targetPolylineCoords.slice()];
5045
- }
5046
- const sourcePolylineCoords = sourcePolylineCoordsInput.slice();
5047
- if ((0,_arePolylinesIdentical__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(targetPolylineCoords, sourcePolylineCoordsInput)) {
5048
- return [];
5049
- }
5050
- const targetArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(targetPolylineCoords);
5051
- const sourceArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sourcePolylineCoords);
5052
- if (Math.sign(targetArea) === Math.sign(sourceArea) &&
5053
- Math.abs(sourceArea) > _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .EPSILON */ .p8) {
5054
- sourcePolylineCoords.reverse();
5055
- }
5056
- const intersections = [];
5057
- for (let i = 0; i < targetPolylineCoords.length; i++) {
5058
- const p1 = targetPolylineCoords[i];
5059
- const p2 = targetPolylineCoords[(i + 1) % targetPolylineCoords.length];
5060
- for (let j = 0; j < sourcePolylineCoords.length; j++) {
5061
- const q1 = sourcePolylineCoords[j];
5062
- const q2 = sourcePolylineCoords[(j + 1) % sourcePolylineCoords.length];
5063
- const intersectPt = (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .robustSegmentIntersection */ .O4)(p1, p2, q1, q2);
5064
- if (intersectPt) {
5065
- const lenP = Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(p1, p2));
5066
- const lenQ = Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(q1, q2));
5067
- intersections.push({
5068
- coord: intersectPt,
5069
- seg1Idx: i,
5070
- seg2Idx: j,
5071
- alpha1: lenP < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .EPSILON */ .p8
5072
- ? 0
5073
- : Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(p1, intersectPt)) / lenP,
5074
- alpha2: lenQ < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .EPSILON */ .p8
5075
- ? 0
5076
- : Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(q1, intersectPt)) / lenQ,
5077
- });
5078
- }
5079
- }
5080
- }
5081
- const buildAugmentedList = (polyCoords, polyIndex, allIntersections) => {
5082
- const augmentedList = [];
5083
- let nodeIdCounter = 0;
5084
- for (let i = 0; i < polyCoords.length; i++) {
5085
- const p1 = polyCoords[i];
5086
- augmentedList.push({
5087
- id: `${polyIndex}_v${nodeIdCounter++}`,
5088
- coordinates: p1,
5089
- type: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .PolylineNodeType */ .n7.Vertex,
5090
- originalPolyIndex: polyIndex,
5091
- originalVertexIndex: i,
5092
- next: null,
5093
- prev: null,
5094
- isIntersection: false,
5095
- visited: false,
5096
- });
5097
- const segmentIntersections = allIntersections
5098
- .filter((isect) => (polyIndex === 0 ? isect.seg1Idx : isect.seg2Idx) === i)
5099
- .sort((a, b) => (polyIndex === 0 ? a.alpha1 : a.alpha2) -
5100
- (polyIndex === 0 ? b.alpha1 : b.alpha2));
5101
- for (const isect of segmentIntersections) {
5102
- if (augmentedList.length > 0 &&
5103
- (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(augmentedList[augmentedList.length - 1].coordinates, isect.coord)) {
5104
- if (!augmentedList[augmentedList.length - 1].isIntersection) {
5105
- augmentedList[augmentedList.length - 1].isIntersection = true;
5106
- augmentedList[augmentedList.length - 1].intersectionInfo = isect;
5107
- augmentedList[augmentedList.length - 1].alpha =
5108
- polyIndex === 0 ? isect.alpha1 : isect.alpha2;
5109
- }
5110
- continue;
5111
- }
5112
- augmentedList.push({
5113
- id: `${polyIndex}_i${nodeIdCounter++}`,
5114
- coordinates: isect.coord,
5115
- type: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .PolylineNodeType */ .n7.Intersection,
5116
- originalPolyIndex: polyIndex,
5117
- next: null,
5118
- prev: null,
5119
- isIntersection: true,
5120
- visited: false,
5121
- alpha: polyIndex === 0 ? isect.alpha1 : isect.alpha2,
5122
- intersectionInfo: isect,
5123
- });
5124
- }
5125
- }
5126
- const finalList = [];
5127
- if (augmentedList.length > 0) {
5128
- finalList.push(augmentedList[0]);
5129
- for (let i = 1; i < augmentedList.length; i++) {
5130
- if (!(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(augmentedList[i].coordinates, finalList[finalList.length - 1].coordinates)) {
5131
- finalList.push(augmentedList[i]);
5132
- }
5133
- else {
5134
- if (augmentedList[i].isIntersection) {
5135
- finalList[finalList.length - 1].isIntersection = true;
5136
- finalList[finalList.length - 1].intersectionInfo =
5137
- augmentedList[i].intersectionInfo;
5138
- finalList[finalList.length - 1].alpha = augmentedList[i].alpha;
5139
- }
5140
- }
5141
- }
5142
- }
5143
- if (finalList.length > 0) {
5144
- for (let i = 0; i < finalList.length; i++) {
5145
- finalList[i].next = finalList[(i + 1) % finalList.length];
5146
- finalList[i].prev =
5147
- finalList[(i - 1 + finalList.length) % finalList.length];
5148
- }
5149
- }
5150
- return finalList;
5151
- };
5152
- const targetAugmented = buildAugmentedList(targetPolylineCoords, 0, intersections);
5153
- const sourceAugmented = buildAugmentedList(sourcePolylineCoords, 1, intersections);
5154
- targetAugmented.forEach((tnode) => {
5155
- if (tnode.isIntersection) {
5156
- const tData = tnode.intersectionInfo;
5157
- const partner = sourceAugmented.find((snode) => snode.isIntersection &&
5158
- (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(snode.coordinates, tnode.coordinates) &&
5159
- snode.intersectionInfo.seg1Idx ===
5160
- tData.seg1Idx &&
5161
- snode.intersectionInfo.seg2Idx === tData.seg2Idx);
5162
- if (partner) {
5163
- tnode.partnerNode = partner;
5164
- partner.partnerNode = tnode;
5165
- const p_prev = tnode.prev.coordinates;
5166
- const p_curr = tnode.coordinates;
5167
- const p_next_source = partner.next.coordinates;
5168
- const v_target_arrival = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), p_curr, p_prev);
5169
- const v_source_departure = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), p_next_source, p_curr);
5170
- const midPrevTargetSeg = [
5171
- (tnode.prev.coordinates[0] + tnode.coordinates[0]) / 2,
5172
- (tnode.prev.coordinates[1] + tnode.coordinates[1]) / 2,
5173
- ];
5174
- const prevSegMidpointInsideSource = (0,_containsPoint__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(sourcePolylineCoordsInput, midPrevTargetSeg);
5175
- if (prevSegMidpointInsideSource) {
5176
- tnode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .IntersectionDirection */ .lG.Exiting;
5177
- }
5178
- else {
5179
- tnode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .IntersectionDirection */ .lG.Entering;
5180
- }
5181
- }
5182
- else {
5183
- tnode.isIntersection = false;
5184
- }
5185
- }
5186
- });
5187
- targetAugmented.forEach((n) => delete n.intersectionInfo);
5188
- sourceAugmented.forEach((n) => delete n.intersectionInfo);
5189
- const resultPolylines = [];
5190
- for (let i = 0; i < targetAugmented.length; i++) {
5191
- const startNode = targetAugmented[i];
5192
- if (startNode.visited || startNode.isIntersection) {
5193
- continue;
5194
- }
5195
- if ((0,_containsPoint__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(sourcePolylineCoordsInput, startNode.coordinates)) {
5196
- continue;
5197
- }
5198
- const currentPathCoords = [];
5199
- let currentNode = startNode;
5200
- let onTargetList = true;
5201
- let safetyBreak = 0;
5202
- const maxIter = (targetAugmented.length + sourceAugmented.length) * 2;
5203
- do {
5204
- if (safetyBreak++ > maxIter) {
5205
- console.warn('Subtraction: Max iterations reached, possible infinite loop.');
5206
- break;
5207
- }
5208
- currentNode.visited = true;
5209
- if (currentPathCoords.length === 0 ||
5210
- !(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(currentPathCoords[currentPathCoords.length - 1], currentNode.coordinates)) {
5211
- currentPathCoords.push(currentNode.coordinates);
5212
- }
5213
- if (currentNode.isIntersection) {
5214
- if (onTargetList) {
5215
- if (currentNode.intersectionDir === _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .IntersectionDirection */ .lG.Entering &&
5216
- currentNode.partnerNode) {
5217
- currentNode = currentNode.partnerNode;
5218
- onTargetList = false;
5219
- }
5220
- }
5221
- else {
5222
- if (currentNode.partnerNode) {
5223
- currentNode = currentNode.partnerNode;
5224
- onTargetList = true;
5225
- }
5226
- else {
5227
- console.warn('Subtraction: Intersection on source without partner.');
5228
- }
5229
- }
5230
- }
5231
- currentNode = currentNode.next;
5232
- } while (currentNode !== startNode || !onTargetList);
5233
- if (currentPathCoords.length >= 3) {
5234
- if ((0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(currentPathCoords[0], currentPathCoords[currentPathCoords.length - 1])) {
5235
- currentPathCoords.pop();
5236
- }
5237
- if (currentPathCoords.length >= 3) {
5238
- resultPolylines.push(currentPathCoords);
5239
- }
5240
- }
5241
- }
5242
- return resultPolylines;
5243
- }
5244
-
5245
-
5246
- /***/ }),
5247
-
5248
- /***/ 33657:
5249
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5250
-
5251
- __webpack_require__.r(__webpack_exports__);
5252
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5253
- /* harmony export */ distanceToPoint: () => (/* reexport safe */ _distanceToPoint__WEBPACK_IMPORTED_MODULE_0__.A)
5254
- /* harmony export */ });
5255
- /* harmony import */ var _distanceToPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87105);
5256
-
5257
-
5258
-
5259
-
5260
- /***/ }),
5261
-
5262
- /***/ 23324:
5263
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5264
-
5265
- __webpack_require__.r(__webpack_exports__);
5266
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5267
- /* harmony export */ findClosestPoint: () => (/* reexport safe */ _findClosestPoint__WEBPACK_IMPORTED_MODULE_0__.A),
5268
- /* harmony export */ liangBarksyClip: () => (/* reexport safe */ _liangBarksyClip__WEBPACK_IMPORTED_MODULE_1__.A)
5269
- /* harmony export */ });
5270
- /* harmony import */ var _findClosestPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90554);
5271
- /* harmony import */ var _liangBarksyClip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35381);
5272
-
5273
-
5274
-
5275
-
5276
-
5277
- /***/ }),
5278
-
5279
- /***/ 35381:
5280
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5281
-
5282
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5283
- /* harmony export */ A: () => (/* binding */ clip)
5284
- /* harmony export */ });
5285
- const EPSILON = 1e-6;
5286
- const INSIDE = 1;
5287
- const OUTSIDE = 0;
5288
- function clipT(num, denom, c) {
5289
- const [tE, tL] = c;
5290
- if (Math.abs(denom) < EPSILON) {
5291
- return num < 0;
5292
- }
5293
- const t = num / denom;
5294
- if (denom > 0) {
5295
- if (t > tL) {
5296
- return 0;
5297
- }
5298
- if (t > tE) {
5299
- c[0] = t;
5300
- }
5301
- }
5302
- else {
5303
- if (t < tE) {
5304
- return 0;
5305
- }
5306
- if (t < tL) {
5307
- c[1] = t;
5308
- }
5309
- }
5310
- return 1;
5311
- }
5312
- function clip(a, b, box, da, db) {
5313
- const [x1, y1] = a;
5314
- const [x2, y2] = b;
5315
- const dx = x2 - x1;
5316
- const dy = y2 - y1;
5317
- if (da === undefined || db === undefined) {
5318
- da = a;
5319
- db = b;
5320
- }
5321
- else {
5322
- da[0] = a[0];
5323
- da[1] = a[1];
5324
- db[0] = b[0];
5325
- db[1] = b[1];
5326
- }
5327
- if (Math.abs(dx) < EPSILON &&
5328
- Math.abs(dy) < EPSILON &&
5329
- x1 >= box[0] &&
5330
- x1 <= box[2] &&
5331
- y1 >= box[1] &&
5332
- y1 <= box[3]) {
5333
- return INSIDE;
5334
- }
5335
- const c = [0, 1];
5336
- if (clipT(box[0] - x1, dx, c) &&
5337
- clipT(x1 - box[2], -dx, c) &&
5338
- clipT(box[1] - y1, dy, c) &&
5339
- clipT(y1 - box[3], -dy, c)) {
5340
- const [tE, tL] = c;
5341
- if (tL < 1) {
5342
- db[0] = x1 + tL * dx;
5343
- db[1] = y1 + tL * dy;
5344
- }
5345
- if (tE > 0) {
5346
- da[0] += tE * dx;
5347
- da[1] += tE * dy;
5348
- }
5349
- return INSIDE;
5350
- }
5351
- return OUTSIDE;
5352
- }
5353
-
5354
-
5355
- /***/ }),
5356
-
5357
- /***/ 13165:
5358
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5359
-
5360
- __webpack_require__.r(__webpack_exports__);
5361
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5362
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
5363
- /* harmony export */ filterAnnotationsForDisplay: () => (/* reexport safe */ _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__.A),
5364
- /* harmony export */ filterAnnotationsWithinSamePlane: () => (/* reexport safe */ _filterAnnotationsWithinPlane__WEBPACK_IMPORTED_MODULE_6__.W),
5365
- /* harmony export */ filterAnnotationsWithinSlice: () => (/* reexport safe */ _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__.A),
5366
- /* harmony export */ getPointInLineOfSightWithCriteria: () => (/* reexport safe */ _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__.R),
5367
- /* harmony export */ getPointsInLineOfSight: () => (/* reexport safe */ _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__.p),
5368
- /* harmony export */ getWorldWidthAndHeightFromCorners: () => (/* reexport safe */ _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__.A),
5369
- /* harmony export */ getWorldWidthAndHeightFromTwoPoints: () => (/* reexport safe */ _getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_3__.A),
5370
- /* harmony export */ isPlaneIntersectingAABB: () => (/* reexport safe */ _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_5__.Y)
5371
- /* harmony export */ });
5372
- /* harmony import */ var _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36374);
5373
- /* harmony import */ var _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35489);
5374
- /* harmony import */ var _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94418);
5375
- /* harmony import */ var _getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62514);
5376
- /* harmony import */ var _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57063);
5377
- /* harmony import */ var _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30698);
5378
- /* harmony import */ var _filterAnnotationsWithinPlane__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40770);
5379
-
5380
-
5381
-
5382
-
5383
-
5384
-
5385
-
5386
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
5387
- filterAnnotationsWithinSlice: _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A,
5388
- getWorldWidthAndHeightFromCorners: _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A,
5389
- getWorldWidthAndHeightFromTwoPoints: _getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A,
5390
- filterAnnotationsForDisplay: _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A,
5391
- getPointInLineOfSightWithCriteria: _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__/* .getPointInLineOfSightWithCriteria */ .R,
5392
- isPlaneIntersectingAABB: _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_5__/* .isPlaneIntersectingAABB */ .Y,
5393
- filterAnnotationsWithinSamePlane: _filterAnnotationsWithinPlane__WEBPACK_IMPORTED_MODULE_6__/* .filterAnnotationsWithinSamePlane */ .W,
5394
- getPointsInLineOfSight: _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__/* .getPointsInLineOfSight */ .p,
5395
- });
5396
-
5397
-
5398
-
5399
- /***/ }),
3419
+ /***/ },
5400
3420
 
5401
- /***/ 61587:
5402
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3421
+ /***/ 61587
3422
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5403
3423
 
5404
3424
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5405
3425
  /* harmony export */ A: () => (/* binding */ smoothAnnotation)
@@ -5464,10 +3484,10 @@ function smoothAnnotation(annotation, options) {
5464
3484
  }
5465
3485
 
5466
3486
 
5467
- /***/ }),
3487
+ /***/ },
5468
3488
 
5469
- /***/ 10564:
5470
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3489
+ /***/ 10564
3490
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5471
3491
 
5472
3492
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5473
3493
  /* harmony export */ BX: () => (/* binding */ DEFAULT_NEGATIVE_SEED_MARGIN),
@@ -5489,10 +3509,10 @@ const DEFAULT_NEGATIVE_SEEDS_COUNT = 70;
5489
3509
  const MAX_NEGATIVE_SEED_ATTEMPTS_MULTIPLIER = 50;
5490
3510
 
5491
3511
 
5492
- /***/ }),
3512
+ /***/ },
5493
3513
 
5494
- /***/ 94762:
5495
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3514
+ /***/ 94762
3515
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5496
3516
 
5497
3517
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5498
3518
  /* harmony export */ Lr: () => (/* binding */ priority),
@@ -5583,10 +3603,10 @@ const clearFromImageIds = (stack) => {
5583
3603
  };
5584
3604
 
5585
3605
 
5586
- /***/ }),
3606
+ /***/ },
5587
3607
 
5588
- /***/ 30045:
5589
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3608
+ /***/ 30045
3609
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5590
3610
 
5591
3611
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5592
3612
  /* harmony export */ P: () => (/* binding */ addToolState),
@@ -5608,10 +3628,10 @@ function getToolState(element) {
5608
3628
 
5609
3629
 
5610
3630
 
5611
- /***/ }),
3631
+ /***/ },
5612
3632
 
5613
- /***/ 33517:
5614
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3633
+ /***/ 33517
3634
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5615
3635
 
5616
3636
 
5617
3637
  // EXPORTS
@@ -5820,10 +3840,10 @@ class ColorbarCanvas {
5820
3840
 
5821
3841
 
5822
3842
 
5823
- /***/ }),
3843
+ /***/ },
5824
3844
 
5825
- /***/ 62184:
5826
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3845
+ /***/ 62184
3846
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5827
3847
 
5828
3848
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5829
3849
  /* harmony export */ f: () => (/* binding */ ColorbarTicks)
@@ -6126,10 +4146,10 @@ class ColorbarTicks {
6126
4146
 
6127
4147
 
6128
4148
 
6129
- /***/ }),
4149
+ /***/ },
6130
4150
 
6131
- /***/ 57227:
6132
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4151
+ /***/ 57227
4152
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6133
4153
 
6134
4154
 
6135
4155
  // EXPORTS
@@ -6171,10 +4191,10 @@ const areColorbarSizesEqual = (a, b) => {
6171
4191
 
6172
4192
 
6173
4193
 
6174
- /***/ }),
4194
+ /***/ },
6175
4195
 
6176
- /***/ 79457:
6177
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4196
+ /***/ 79457
4197
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6178
4198
 
6179
4199
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6180
4200
  /* harmony export */ A: () => (/* binding */ isRangeTextPositionValid)
@@ -6192,10 +4212,10 @@ function isRangeTextPositionValid(colorbarWidth, colorbarHeight, rangeTextPositi
6192
4212
 
6193
4213
 
6194
4214
 
6195
- /***/ }),
4215
+ /***/ },
6196
4216
 
6197
- /***/ 44845:
6198
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4217
+ /***/ 44845
4218
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6199
4219
 
6200
4220
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6201
4221
  /* harmony export */ A: () => (/* binding */ Widget)
@@ -6269,10 +4289,10 @@ class Widget {
6269
4289
 
6270
4290
 
6271
4291
 
6272
- /***/ }),
4292
+ /***/ },
6273
4293
 
6274
- /***/ 73435:
6275
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4294
+ /***/ 73435
4295
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
6276
4296
 
6277
4297
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6278
4298
  /* harmony export */ Ay: () => (/* binding */ vtkSphereSource$1)
@@ -6494,10 +4514,10 @@ var vtkSphereSource$1 = {
6494
4514
 
6495
4515
 
6496
4516
 
6497
- /***/ }),
4517
+ /***/ },
6498
4518
 
6499
- /***/ 53489:
6500
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4519
+ /***/ 53489
4520
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
6501
4521
 
6502
4522
 
6503
4523
  // EXPORTS
@@ -6802,10 +4822,10 @@ var vtkOrientationMarkerWidget$1 = {
6802
4822
 
6803
4823
 
6804
4824
 
6805
- /***/ }),
4825
+ /***/ },
6806
4826
 
6807
- /***/ 83338:
6808
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4827
+ /***/ 83338
4828
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
6809
4829
 
6810
4830
 
6811
4831
  // EXPORTS
@@ -7172,10 +5192,10 @@ var vtkAnnotatedCubeActor$1 = {
7172
5192
 
7173
5193
 
7174
5194
 
7175
- /***/ }),
5195
+ /***/ },
7176
5196
 
7177
- /***/ 10341:
7178
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
5197
+ /***/ 10341
5198
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
7179
5199
 
7180
5200
 
7181
5201
  // EXPORTS
@@ -8028,6 +6048,6 @@ var vtkAxesActor$1 = {
8028
6048
 
8029
6049
 
8030
6050
 
8031
- /***/ })
6051
+ /***/ }
8032
6052
 
8033
6053
  }]);