@vitessce/all 3.6.18 → 3.7.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.
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs, R as Raycaster, O as OrthographicCamera, P as PerspectiveCamera, S as Scene, a as PCFSoftShadowMap, V as VSMShadowMap, b as PCFShadowMap, B as BasicShadowMap, N as NoToneMapping, A as ACESFilmicToneMapping, c as Vector3, d as Vector2, C as Clock, W as WebGLRenderer, e as Camera, f as BufferGeometry, M as Material, L as Layers, T as Texture, h as RGBAFormat, U as UnsignedByteType, i as Color, _ as _extends, j as THREE, G as Group, k as Matrix4, l as TrianglesDrawMode, m as TriangleFanDrawMode, n as TriangleStripDrawMode, o as REVISION, E as EventDispatcher, p as MOUSE, q as TOUCH, r as Spherical, Q as Quaternion, s as Ray$1, t as Plane, u as Loader, v as LoaderUtils, F as FileLoader, w as MeshPhysicalMaterial, x as SpotLight, y as PointLight, D as DirectionalLight, I as InstancedMesh, z as Object3D, H as TextureLoader, J as ImageBitmapLoader, K as BufferAttribute, X as InterleavedBuffer, Y as LinearMipmapLinearFilter, Z as NearestMipmapLinearFilter, $ as LinearMipmapNearestFilter, a0 as NearestMipmapNearestFilter, a1 as LinearFilter, a2 as NearestFilter, a3 as RepeatWrapping, a4 as MirroredRepeatWrapping, a5 as ClampToEdgeWrapping, a6 as PointsMaterial, a7 as LineBasicMaterial, a8 as MeshStandardMaterial, a9 as DoubleSide, aa as MeshBasicMaterial, ab as PropertyBinding, ac as SkinnedMesh, ad as Mesh, ae as LineSegments, af as Line$1, ag as LineLoop, ah as Points, ai as MathUtils, aj as Skeleton, ak as InterpolateDiscrete, al as InterpolateLinear, am as AnimationClip, an as Bone, ao as InterleavedBufferAttribute, ap as VectorKeyframeTrack, aq as QuaternionKeyframeTrack, ar as NumberKeyframeTrack, as as FrontSide, at as Interpolant, au as Box3, av as Sphere, aw as InstancedBufferGeometry, ax as Float32BufferAttribute, ay as InstancedInterleavedBuffer, az as WireframeGeometry, aA as ShaderMaterial, aB as UniformsUtils, aC as UniformsLib, aD as Vector4, aE as Line3, aF as SphereGeometry, aG as Triangle, aH as BackSide, aI as jsxRuntimeExports, aJ as Matrix3, aK as CoordinationType, aL as Data3DTexture, aM as RedFormat, aN as FloatType, aO as getImageSize } from "./index-B2chDEFY.js";
1
+ import { g as getDefaultExportFromCjs, R as Raycaster, O as OrthographicCamera, P as PerspectiveCamera, S as Scene, a as PCFSoftShadowMap, V as VSMShadowMap, b as PCFShadowMap, B as BasicShadowMap, N as NoToneMapping, A as ACESFilmicToneMapping, c as Vector3, d as Vector2, C as Clock, W as WebGLRenderer, e as Camera, f as BufferGeometry, M as Material, L as Layers, T as Texture, h as RGBAFormat, U as UnsignedByteType, i as Color, _ as _extends, j as THREE, G as Group, k as Matrix4, l as TrianglesDrawMode, m as TriangleFanDrawMode, n as TriangleStripDrawMode, o as REVISION, E as EventDispatcher, p as MOUSE, q as TOUCH, r as Spherical, Q as Quaternion, s as Ray$1, t as Plane, u as Loader, v as LoaderUtils, F as FileLoader, w as MeshPhysicalMaterial, x as SpotLight, y as PointLight, D as DirectionalLight, I as InstancedMesh, z as Object3D, H as TextureLoader, J as ImageBitmapLoader, K as BufferAttribute, X as InterleavedBuffer, Y as LinearMipmapLinearFilter, Z as NearestMipmapLinearFilter, $ as LinearMipmapNearestFilter, a0 as NearestMipmapNearestFilter, a1 as LinearFilter, a2 as NearestFilter, a3 as RepeatWrapping, a4 as MirroredRepeatWrapping, a5 as ClampToEdgeWrapping, a6 as PointsMaterial, a7 as LineBasicMaterial, a8 as MeshStandardMaterial, a9 as DoubleSide, aa as MeshBasicMaterial, ab as PropertyBinding, ac as SkinnedMesh, ad as Mesh, ae as LineSegments, af as Line$1, ag as LineLoop, ah as Points, ai as MathUtils, aj as Skeleton, ak as InterpolateDiscrete, al as InterpolateLinear, am as AnimationClip, an as Bone, ao as InterleavedBufferAttribute, ap as VectorKeyframeTrack, aq as QuaternionKeyframeTrack, ar as NumberKeyframeTrack, as as FrontSide, at as Interpolant, au as Box3, av as Sphere, aw as InstancedBufferGeometry, ax as Float32BufferAttribute, ay as InstancedInterleavedBuffer, az as WireframeGeometry, aA as ShaderMaterial, aB as UniformsUtils, aC as UniformsLib, aD as Vector4, aE as Line3, aF as SphereGeometry, aG as Triangle, aH as BackSide, aI as jsxRuntimeExports, aJ as Matrix3, aK as CoordinationType, aL as Data3DTexture, aM as RedFormat, aN as FloatType, aO as getImageSize } from "./index-Ci947y1K.js";
2
2
  import * as React from "react";
3
3
  import React__default, { useReducer, useRef, useEffect, useLayoutEffect, useDebugValue, useState, useMemo, forwardRef } from "react";
4
4
  var constants = { exports: {} };
@@ -2214,7 +2214,7 @@ function requireReactReconciler_development() {
2214
2214
  return getHighestPriorityLanes(root.pendingLanes);
2215
2215
  }
2216
2216
  function getLanesToRetrySynchronouslyOnError(root) {
2217
- var everythingButOffscreen = root.pendingLanes & -1073741825;
2217
+ var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
2218
2218
  if (everythingButOffscreen !== NoLanes) {
2219
2219
  return everythingButOffscreen;
2220
2220
  }
@@ -3633,7 +3633,7 @@ function requireReactReconciler_development() {
3633
3633
  return payload;
3634
3634
  }
3635
3635
  case CaptureUpdate: {
3636
- workInProgress2.flags = workInProgress2.flags & -65537 | DidCapture;
3636
+ workInProgress2.flags = workInProgress2.flags & ~ShouldCapture | DidCapture;
3637
3637
  }
3638
3638
  // Intentional fallthrough
3639
3639
  case UpdateState: {
@@ -4361,7 +4361,7 @@ function requireReactReconciler_development() {
4361
4361
  var newState = instance.state = oldState;
4362
4362
  processUpdateQueue(workInProgress2, newProps, instance, renderLanes2);
4363
4363
  newState = workInProgress2.memoizedState;
4364
- if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && true) {
4364
+ if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !enableLazyContextPropagation) {
4365
4365
  if (typeof instance.componentDidUpdate === "function") {
4366
4366
  if (unresolvedOldProps !== current2.memoizedProps || oldState !== current2.memoizedState) {
4367
4367
  workInProgress2.flags |= Update;
@@ -4679,7 +4679,7 @@ function requireReactReconciler_development() {
4679
4679
  }
4680
4680
  }
4681
4681
  function insertNonHydratedInstance(returnFiber, fiber) {
4682
- fiber.flags = fiber.flags & -4097 | Placement;
4682
+ fiber.flags = fiber.flags & ~Hydrating | Placement;
4683
4683
  warnNonhydratedInstance(returnFiber, fiber);
4684
4684
  }
4685
4685
  function tryHydrate(fiber, nextInstance) {
@@ -8012,7 +8012,7 @@ function requireReactReconciler_development() {
8012
8012
  resetSuspendedComponent(sourceFiber);
8013
8013
  var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);
8014
8014
  if (suspenseBoundary !== null) {
8015
- suspenseBoundary.flags &= -257;
8015
+ suspenseBoundary.flags &= ~ForceClientRender;
8016
8016
  markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes);
8017
8017
  if (suspenseBoundary.mode & ConcurrentMode) {
8018
8018
  attachPingListener(root, wakeable, rootRenderLanes);
@@ -8755,7 +8755,7 @@ function requireReactReconciler_development() {
8755
8755
  var _prevState2 = current2.memoizedState;
8756
8756
  var prevIsHidden = _prevState2 !== null;
8757
8757
  if (prevIsHidden !== nextIsHidden && // LegacyHidden doesn't do any hiding — it only pre-renders.
8758
- true) {
8758
+ !enableLegacyHidden) {
8759
8759
  workInProgress2.flags |= Visibility;
8760
8760
  }
8761
8761
  }
@@ -9279,7 +9279,7 @@ function requireReactReconciler_development() {
9279
9279
  workInProgress2.child = child;
9280
9280
  var node = child;
9281
9281
  while (node) {
9282
- node.flags = node.flags & -3 | Hydrating;
9282
+ node.flags = node.flags & ~Placement | Hydrating;
9283
9283
  node = node.sibling;
9284
9284
  }
9285
9285
  }
@@ -9594,7 +9594,7 @@ function requireReactReconciler_development() {
9594
9594
  var didSuspend2 = (workInProgress2.flags & DidCapture) !== NoFlags;
9595
9595
  if (didSuspend2 || shouldRemainOnFallback(suspenseContext, current2)) {
9596
9596
  showFallback = true;
9597
- workInProgress2.flags &= -129;
9597
+ workInProgress2.flags &= ~DidCapture;
9598
9598
  } else {
9599
9599
  if (current2 === null || current2.memoizedState !== null) {
9600
9600
  {
@@ -9635,7 +9635,7 @@ function requireReactReconciler_development() {
9635
9635
  if (!didSuspend2) {
9636
9636
  return updateDehydratedSuspenseComponent(current2, workInProgress2, _dehydrated, prevState, renderLanes2);
9637
9637
  } else if (workInProgress2.flags & ForceClientRender) {
9638
- workInProgress2.flags &= -257;
9638
+ workInProgress2.flags &= ~ForceClientRender;
9639
9639
  return retrySuspenseComponentWithoutHydrating(current2, workInProgress2, renderLanes2, new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));
9640
9640
  } else if (workInProgress2.memoizedState !== null) {
9641
9641
  workInProgress2.child = current2.child;
@@ -10525,7 +10525,7 @@ function requireReactReconciler_development() {
10525
10525
  }
10526
10526
  var flags = workInProgress2.flags;
10527
10527
  if (flags & ShouldCapture) {
10528
- workInProgress2.flags = flags & -65537 | DidCapture;
10528
+ workInProgress2.flags = flags & ~ShouldCapture | DidCapture;
10529
10529
  if ((workInProgress2.mode & ProfileMode) !== NoMode) {
10530
10530
  transferActualDuration(workInProgress2);
10531
10531
  }
@@ -10539,7 +10539,7 @@ function requireReactReconciler_development() {
10539
10539
  resetWorkInProgressVersions();
10540
10540
  var _flags = workInProgress2.flags;
10541
10541
  if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {
10542
- workInProgress2.flags = _flags & -65537 | DidCapture;
10542
+ workInProgress2.flags = _flags & ~ShouldCapture | DidCapture;
10543
10543
  return workInProgress2;
10544
10544
  }
10545
10545
  return null;
@@ -10561,7 +10561,7 @@ function requireReactReconciler_development() {
10561
10561
  }
10562
10562
  var _flags2 = workInProgress2.flags;
10563
10563
  if (_flags2 & ShouldCapture) {
10564
- workInProgress2.flags = _flags2 & -65537 | DidCapture;
10564
+ workInProgress2.flags = _flags2 & ~ShouldCapture | DidCapture;
10565
10565
  if ((workInProgress2.mode & ProfileMode) !== NoMode) {
10566
10566
  transferActualDuration(workInProgress2);
10567
10567
  }
@@ -11580,7 +11580,7 @@ function requireReactReconciler_development() {
11580
11580
  var parent = parentFiber.stateNode;
11581
11581
  if (parentFiber.flags & ContentReset) {
11582
11582
  resetTextContent(parent);
11583
- parentFiber.flags &= -33;
11583
+ parentFiber.flags &= ~ContentReset;
11584
11584
  }
11585
11585
  var before = getHostSibling(finishedWork);
11586
11586
  insertOrAppendPlacementNode(finishedWork, before, parent);
@@ -12019,22 +12019,22 @@ function requireReactReconciler_development() {
12019
12019
  switch (primaryFlags) {
12020
12020
  case Placement: {
12021
12021
  commitPlacement(finishedWork);
12022
- finishedWork.flags &= -3;
12022
+ finishedWork.flags &= ~Placement;
12023
12023
  break;
12024
12024
  }
12025
12025
  case PlacementAndUpdate: {
12026
12026
  commitPlacement(finishedWork);
12027
- finishedWork.flags &= -3;
12027
+ finishedWork.flags &= ~Placement;
12028
12028
  var _current3 = finishedWork.alternate;
12029
12029
  commitWork(_current3, finishedWork);
12030
12030
  break;
12031
12031
  }
12032
12032
  case Hydrating: {
12033
- finishedWork.flags &= -4097;
12033
+ finishedWork.flags &= ~Hydrating;
12034
12034
  break;
12035
12035
  }
12036
12036
  case HydratingAndUpdate: {
12037
- finishedWork.flags &= -4097;
12037
+ finishedWork.flags &= ~Hydrating;
12038
12038
  var _current4 = finishedWork.alternate;
12039
12039
  commitWork(_current4, finishedWork);
12040
12040
  break;
@@ -23637,7 +23637,7 @@ const Text = /* @__PURE__ */ React.forwardRef(({
23637
23637
  const {
23638
23638
  Text: TextMeshImpl,
23639
23639
  preloadFont
23640
- } = suspend(async () => import("./troika-three-text.esm-C4kMzHny.js"), []);
23640
+ } = suspend(async () => import("./troika-three-text.esm-orFZa6y_.js"), []);
23641
23641
  const invalidate2 = useThree(({
23642
23642
  invalidate: invalidate3
23643
23643
  }) => invalidate3);
@@ -27131,7 +27131,7 @@ function GeometryAndMesh(props) {
27131
27131
  const rayGrabGroup = useRef();
27132
27132
  const { isPresenting } = useXR();
27133
27133
  useEffect(() => {
27134
- if (isPresenting && (model == null ? void 0 : model.current)) {
27134
+ if (isPresenting && model?.current) {
27135
27135
  if (materialRef !== null) {
27136
27136
  materialRef.current.material.uniforms.u_physical_Pixel.value = 0.2;
27137
27137
  }
@@ -27219,7 +27219,7 @@ function GeometryAndMesh(props) {
27219
27219
  setMeasureState(false);
27220
27220
  setDebounce(8);
27221
27221
  }
27222
- } else if (debounce <= 0 && (model == null ? void 0 : model.current) && isPresenting) {
27222
+ } else if (debounce <= 0 && model?.current && isPresenting) {
27223
27223
  model.current.children[0].children.forEach((childVal, childID) => {
27224
27224
  const child = model.current.children[0].children[childID];
27225
27225
  const currentObjectBB = new Box3().setFromObject(child);
@@ -27248,7 +27248,7 @@ function GeometryAndMesh(props) {
27248
27248
  }
27249
27249
  }
27250
27250
  }, [measureState, highlighted, currentLine, lines, showLine, debounce, isPresenting]);
27251
- return jsxRuntimeExports.jsx("group", { children: useXR().isPresenting ? jsxRuntimeExports.jsxs(RayGrab, { children: [jsxRuntimeExports.jsxs("group", { ref: rayGrabGroup, children: [(segmentationGroup == null ? void 0 : segmentationGroup.visible) ? jsxRuntimeExports.jsxs("group", { children: [jsxRuntimeExports.jsx("hemisphereLight", { skyColor: 8421504, groundColor: 6316128 }), jsxRuntimeExports.jsx("directionalLight", { color: 16777215, position: [0, -800, 0] }), jsxRuntimeExports.jsx("primitive", { ref: model, object: segmentationGroup, position: [-0.18, 1.13, -1], scale: [
27251
+ return jsxRuntimeExports.jsx("group", { children: useXR().isPresenting ? jsxRuntimeExports.jsxs(RayGrab, { children: [jsxRuntimeExports.jsxs("group", { ref: rayGrabGroup, children: [segmentationGroup?.visible ? jsxRuntimeExports.jsxs("group", { children: [jsxRuntimeExports.jsx("hemisphereLight", { skyColor: 8421504, groundColor: 6316128 }), jsxRuntimeExports.jsx("directionalLight", { color: 16777215, position: [0, -800, 0] }), jsxRuntimeExports.jsx("primitive", { ref: model, object: segmentationGroup, position: [-0.18, 1.13, -1], scale: [
27252
27252
  2e-3 * segmentationSceneScale[0],
27253
27253
  2e-3 * segmentationSceneScale[1],
27254
27254
  2e-3 * segmentationSceneScale[2]
@@ -27256,7 +27256,7 @@ function GeometryAndMesh(props) {
27256
27256
  2e-3 * renderingSettings.meshScale[0],
27257
27257
  2e-3 * renderingSettings.meshScale[1],
27258
27258
  2e-3 * renderingSettings.meshScale[2]
27259
- ], ref: materialRef, children: [jsxRuntimeExports.jsx("boxGeometry", { args: renderingSettings.geometrySize }), jsxRuntimeExports.jsx("shaderMaterial", { customProgramCacheKey: () => "1", side: FrontSide, uniforms: renderingSettings.uniforms, needsUpdate: true, transparent: true, vertexShader: renderingSettings.shader.vertexShader, fragmentShader: renderingSettings.shader.fragmentShader })] }) }) : null] }), jsxRuntimeExports.jsx("group", { name: "currentLine", ref: distanceRef, children: showLine ? jsxRuntimeExports.jsx(MeasureLine, { currentLine, scale: 1 / 2e-3 * 0.4 }) : null }), jsxRuntimeExports.jsx("group", { name: "lines", children: lines.map((object) => jsxRuntimeExports.jsx(MeasureLine, { currentLine: object, scale: 1 / 2e-3 * 0.4 })) })] }) : jsxRuntimeExports.jsxs("group", { children: [jsxRuntimeExports.jsxs("group", { children: [(segmentationGroup == null ? void 0 : segmentationGroup.visible) ? jsxRuntimeExports.jsxs("group", { children: [jsxRuntimeExports.jsx("hemisphereLight", { skyColor: 8421504, groundColor: 6316128 }), jsxRuntimeExports.jsx("directionalLight", { color: 16777215, position: [0, -800, 0] }), jsxRuntimeExports.jsx("directionalLight", { color: 16777215, position: [0, 800, 0] }), jsxRuntimeExports.jsx(Bvh, { firstHitOnly: true, children: jsxRuntimeExports.jsx("primitive", { ref: model, object: segmentationGroup, position: [0, 0, 0], onClick: (e) => {
27259
+ ], ref: materialRef, children: [jsxRuntimeExports.jsx("boxGeometry", { args: renderingSettings.geometrySize }), jsxRuntimeExports.jsx("shaderMaterial", { customProgramCacheKey: () => "1", side: FrontSide, uniforms: renderingSettings.uniforms, needsUpdate: true, transparent: true, vertexShader: renderingSettings.shader.vertexShader, fragmentShader: renderingSettings.shader.fragmentShader })] }) }) : null] }), jsxRuntimeExports.jsx("group", { name: "currentLine", ref: distanceRef, children: showLine ? jsxRuntimeExports.jsx(MeasureLine, { currentLine, scale: 1 / 2e-3 * 0.4 }) : null }), jsxRuntimeExports.jsx("group", { name: "lines", children: lines.map((object) => jsxRuntimeExports.jsx(MeasureLine, { currentLine: object, scale: 1 / 2e-3 * 0.4 })) })] }) : jsxRuntimeExports.jsxs("group", { children: [jsxRuntimeExports.jsxs("group", { children: [segmentationGroup?.visible ? jsxRuntimeExports.jsxs("group", { children: [jsxRuntimeExports.jsx("hemisphereLight", { skyColor: 8421504, groundColor: 6316128 }), jsxRuntimeExports.jsx("directionalLight", { color: 16777215, position: [0, -800, 0] }), jsxRuntimeExports.jsx("directionalLight", { color: 16777215, position: [0, 800, 0] }), jsxRuntimeExports.jsx(Bvh, { firstHitOnly: true, children: jsxRuntimeExports.jsx("primitive", { ref: model, object: segmentationGroup, position: [0, 0, 0], onClick: (e) => {
27260
27260
  if (e.object.parent.userData.name === "finalPass") {
27261
27261
  highlightEntity(e.object.name, e.object.userData.layerScope, e.object.userData.channelScope);
27262
27262
  }
@@ -27267,13 +27267,12 @@ function GeometryAndMesh(props) {
27267
27267
  function HandDecorate() {
27268
27268
  const { controllers } = useXR();
27269
27269
  useFrame(() => {
27270
- var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
27271
- if ((controllers == null ? void 0 : controllers[0]) && (controllers == null ? void 0 : controllers[1])) {
27272
- if ((_g = (_f = (_e = (_d = (_c = (_b2 = (_a2 = controllers[0]) == null ? void 0 : _a2.hand) == null ? void 0 : _b2.children) == null ? void 0 : _c[25]) == null ? void 0 : _d.children) == null ? void 0 : _e[0]) == null ? void 0 : _f.children) == null ? void 0 : _g[0]) {
27270
+ if (controllers?.[0] && controllers?.[1]) {
27271
+ if (controllers[0]?.hand?.children?.[25]?.children?.[0]?.children?.[0]) {
27273
27272
  controllers[0].hand.children[25].children[0].children[0].material.transparent = true;
27274
27273
  controllers[0].hand.children[25].children[0].children[0].material.opacity = 0.5;
27275
27274
  }
27276
- if ((_n = (_m = (_l = (_k = (_j = (_i = (_h = controllers[1]) == null ? void 0 : _h.hand) == null ? void 0 : _i.children) == null ? void 0 : _j[25]) == null ? void 0 : _k.children) == null ? void 0 : _l[0]) == null ? void 0 : _m.children) == null ? void 0 : _n[0]) {
27275
+ if (controllers[1]?.hand?.children?.[25]?.children?.[0]?.children?.[0]) {
27277
27276
  controllers[1].hand.children[25].children[0].children[0].material.transparent = true;
27278
27277
  controllers[1].hand.children[25].children[0].children[0].material.opacity = 0.5;
27279
27278
  }
@@ -27842,9 +27841,8 @@ const renderingModeMap = {
27842
27841
  additive: 2
27843
27842
  };
27844
27843
  function extractInformationFromProps(layerScope, layerCoordination, channelScopes, channelCoordination, image, props) {
27845
- var _a2, _b2;
27846
27844
  const { spatialRenderingMode } = props;
27847
- const data = (_b2 = (_a2 = image == null ? void 0 : image.image) == null ? void 0 : _a2.instance) == null ? void 0 : _b2.getData();
27845
+ const data = image?.image?.instance?.getData();
27848
27846
  if (!data) {
27849
27847
  return {
27850
27848
  channelsVisible: null,
@@ -28010,7 +28008,6 @@ function setUniformsTextures(uniforms, textures, volume, volConfig, renderstyle,
28010
28008
  uniforms.u_color6.value.set(colors.length > 5 ? colors[5][0] : null, colors.length > 5 ? colors[5][1] : null, colors.length > 5 ? colors[5][2] : null);
28011
28009
  }
28012
28010
  function create3DRendering(volumes, channelTargetC, channelsVisible, colors, textures, contrastLimits, volumeMinMax, scaleOrUndefined, renderstyle, layerTransparency, xSlice, ySlice, zSlice, originalScale) {
28013
- var _a2, _b2, _c;
28014
28011
  const texturesList = [];
28015
28012
  const colorsSave = [];
28016
28013
  const contrastLimitsList = [];
@@ -28018,9 +28015,9 @@ function create3DRendering(volumes, channelTargetC, channelsVisible, colors, tex
28018
28015
  let scale = scaleOrUndefined;
28019
28016
  if (scale === void 0 || scale === null || !Array.isArray(scale) || scale.length < 3) {
28020
28017
  scale = [
28021
- { size: ((_a2 = scale == null ? void 0 : scale[0]) == null ? void 0 : _a2.size) ?? 1 },
28022
- { size: ((_b2 = scale == null ? void 0 : scale[1]) == null ? void 0 : _b2.size) ?? 1 },
28023
- { size: ((_c = scale == null ? void 0 : scale[2]) == null ? void 0 : _c.size) ?? 1 }
28018
+ { size: scale?.[0]?.size ?? 1 },
28019
+ { size: scale?.[1]?.size ?? 1 },
28020
+ { size: scale?.[2]?.size ?? 1 }
28024
28021
  ];
28025
28022
  } else {
28026
28023
  for (let i2 = 0; i2 < scale.length; i2++) {
@@ -28134,8 +28131,7 @@ function getData3DTexture(volume) {
28134
28131
  return texture;
28135
28132
  }
28136
28133
  function getPhysicalSizeScalingMatrix(loader) {
28137
- var _a2;
28138
- const { x, y, z } = ((_a2 = loader == null ? void 0 : loader.meta) == null ? void 0 : _a2.physicalSizes) ?? {};
28134
+ const { x, y, z } = loader?.meta?.physicalSizes ?? {};
28139
28135
  return [x, y, z];
28140
28136
  }
28141
28137
  function minMaxVolume(volume) {
@@ -28171,7 +28167,6 @@ async function initialDataLoading(channelTargetC, resolution, data, volumes, tex
28171
28167
  ];
28172
28168
  }
28173
28169
  function SpatialThree(props) {
28174
- var _a2, _b2, _c, _d;
28175
28170
  const materialRef = useRef(null);
28176
28171
  const orbitRef = useRef(null);
28177
28172
  const [initialStartup, setInitialStartup] = useState(false);
@@ -28249,9 +28244,9 @@ function SpatialThree(props) {
28249
28244
  setsSave.push({ name: "", id: segmentationObsSetLayerProps.obsHighlight, color: [255, 34, 0] });
28250
28245
  }
28251
28246
  }
28252
- if (((_a2 = obsSegmentations == null ? void 0 : obsSegmentations[layerScope]) == null ? void 0 : _a2.obsSegmentations) && segmentationGroup == null) {
28247
+ if (obsSegmentations?.[layerScope]?.obsSegmentations && segmentationGroup == null) {
28253
28248
  const { scene, sceneOptions } = obsSegmentations[layerScope].obsSegmentations;
28254
- if (scene == null ? void 0 : scene.children) {
28249
+ if (scene?.children) {
28255
28250
  const newScene = new Scene();
28256
28251
  const finalPass = new Group();
28257
28252
  finalPass.userData.name = "finalPass";
@@ -28275,30 +28270,30 @@ function SpatialThree(props) {
28275
28270
  childElement.material.depthTest = true;
28276
28271
  childElement.material.depthWrite = true;
28277
28272
  childElement.material.needsUpdate = true;
28278
- childElement.material.side = (sceneOptions == null ? void 0 : sceneOptions.materialSide) === "back" ? BackSide : FrontSide;
28273
+ childElement.material.side = sceneOptions?.materialSide === "back" ? BackSide : FrontSide;
28279
28274
  const simplified = childElement.clone();
28280
28275
  simplified.geometry = childElement.geometry.clone();
28281
- simplified.geometry.translate((sceneOptions == null ? void 0 : sceneOptions.targetX) ?? 0, (sceneOptions == null ? void 0 : sceneOptions.targetY) ?? 0, (sceneOptions == null ? void 0 : sceneOptions.targetZ) ?? 0);
28282
- simplified.geometry.scale((sceneOptions == null ? void 0 : sceneOptions.scaleX) ?? 1, (sceneOptions == null ? void 0 : sceneOptions.scaleY) ?? 1, (sceneOptions == null ? void 0 : sceneOptions.scaleZ) ?? 1);
28283
- simplified.geometry.rotateX((sceneOptions == null ? void 0 : sceneOptions.rotationX) ?? 0);
28284
- simplified.geometry.rotateY((sceneOptions == null ? void 0 : sceneOptions.rotationY) ?? 0);
28285
- simplified.geometry.rotateZ((sceneOptions == null ? void 0 : sceneOptions.rotationZ) ?? 0);
28276
+ simplified.geometry.translate(sceneOptions?.targetX ?? 0, sceneOptions?.targetY ?? 0, sceneOptions?.targetZ ?? 0);
28277
+ simplified.geometry.scale(sceneOptions?.scaleX ?? 1, sceneOptions?.scaleY ?? 1, sceneOptions?.scaleZ ?? 1);
28278
+ simplified.geometry.rotateX(sceneOptions?.rotationX ?? 0);
28279
+ simplified.geometry.rotateY(sceneOptions?.rotationY ?? 0);
28280
+ simplified.geometry.rotateZ(sceneOptions?.rotationZ ?? 0);
28286
28281
  const finalPassChild = childElement.clone();
28287
28282
  finalPassChild.material = childElement.material.clone();
28288
28283
  finalPassChild.geometry = simplified.geometry.clone();
28289
28284
  finalPass.add(finalPassChild);
28290
28285
  });
28291
28286
  newScene.add(finalPass);
28292
- newScene.scale.set((sceneOptions == null ? void 0 : sceneOptions.sceneScaleX) ?? 1, (sceneOptions == null ? void 0 : sceneOptions.sceneScaleY) ?? 1, (sceneOptions == null ? void 0 : sceneOptions.sceneScaleZ) ?? 1);
28287
+ newScene.scale.set(sceneOptions?.sceneScaleX ?? 1, sceneOptions?.sceneScaleY ?? 1, sceneOptions?.sceneScaleZ ?? 1);
28293
28288
  const sceneScale = [
28294
- (sceneOptions == null ? void 0 : sceneOptions.sceneScaleX) ?? 1,
28295
- (sceneOptions == null ? void 0 : sceneOptions.sceneScaleY) ?? 1,
28296
- (sceneOptions == null ? void 0 : sceneOptions.sceneScaleZ) ?? 1
28289
+ sceneOptions?.sceneScaleX ?? 1,
28290
+ sceneOptions?.sceneScaleY ?? 1,
28291
+ sceneOptions?.sceneScaleZ ?? 1
28297
28292
  ];
28298
28293
  setSegmentationSceneScale(sceneScale);
28299
- newScene.rotateX((sceneOptions == null ? void 0 : sceneOptions.sceneRotationX) ?? 0);
28300
- newScene.rotateY((sceneOptions == null ? void 0 : sceneOptions.sceneRotationY) ?? 0);
28301
- newScene.rotateZ((sceneOptions == null ? void 0 : sceneOptions.sceneRotationZ) ?? 0);
28294
+ newScene.rotateX(sceneOptions?.sceneRotationX ?? 0);
28295
+ newScene.rotateY(sceneOptions?.sceneRotationY ?? 0);
28296
+ newScene.rotateZ(sceneOptions?.sceneRotationZ ?? 0);
28302
28297
  setSegmentationGroup(newScene);
28303
28298
  }
28304
28299
  }
@@ -28363,7 +28358,6 @@ function SpatialThree(props) {
28363
28358
  }
28364
28359
  }
28365
28360
  segmentationGroup.children[finalGroupIndex].children.forEach((child, childIndex) => {
28366
- var _a3;
28367
28361
  let { color } = segmentationSettings;
28368
28362
  const id = child.userData.name;
28369
28363
  segmentationSettings.obsSets.forEach((obsSet) => {
@@ -28394,13 +28388,13 @@ function SpatialThree(props) {
28394
28388
  child.material.visible = segmentationSettings.visible;
28395
28389
  child.material.needsUpdate = true;
28396
28390
  child.userData.layerScope = layerScope;
28397
- const firstChannelScope = (_a3 = Object.keys(segmentationChannelCoordination[0][layerScope])) == null ? void 0 : _a3[0];
28391
+ const firstChannelScope = Object.keys(segmentationChannelCoordination[0][layerScope])?.[0];
28398
28392
  child.userData.channelScope = firstChannelScope;
28399
28393
  }
28400
28394
  });
28401
28395
  }
28402
28396
  }, [segmentationSettings, segmentationGroup]);
28403
- const dataToCheck = (_d = (_c = (_b2 = images[layerScope]) == null ? void 0 : _b2.image) == null ? void 0 : _c.instance) == null ? void 0 : _d.getData();
28397
+ const dataToCheck = images[layerScope]?.image?.instance?.getData();
28404
28398
  if (dataToCheck !== void 0 && !dataReady && !initialStartup && contrastLimits !== null && contrastLimits[0][1] !== 255 && is3dMode) {
28405
28399
  setDataReady(true);
28406
28400
  setInitialStartup(true);
@@ -28457,7 +28451,6 @@ function SpatialThree(props) {
28457
28451
  }
28458
28452
  }, [dataReady]);
28459
28453
  useEffect(() => {
28460
- var _a3, _b3, _c2, _d2;
28461
28454
  if (renderingSettings.uniforms && renderingSettings.shader) {
28462
28455
  const rendering = create3DRendering(volumeData.volumes, volumeSettings.channelTargetC, volumeSettings.channelsVisible, volumeSettings.colors, volumeData.textures, volumeSettings.contrastLimits, volumeData.volumeMinMax, volumeData.scale, volumeSettings.renderingMode, volumeSettings.layerTransparency, volumeSettings.xSlice, volumeSettings.ySlice, volumeSettings.zSlice, volumeData.originalScale);
28463
28456
  if (rendering !== null) {
@@ -28467,7 +28460,7 @@ function SpatialThree(props) {
28467
28460
  volumeCount++;
28468
28461
  });
28469
28462
  setDataReady(false);
28470
- if ((_b3 = (_a3 = materialRef == null ? void 0 : materialRef.current) == null ? void 0 : _a3.material) == null ? void 0 : _b3.uniforms) {
28463
+ if (materialRef?.current?.material?.uniforms) {
28471
28464
  materialRef.current.material.uniforms.u_clim.value = rendering[0].u_clim.value;
28472
28465
  materialRef.current.material.uniforms.u_clim2.value = rendering[0].u_clim2.value;
28473
28466
  materialRef.current.material.uniforms.u_clim3.value = rendering[0].u_clim3.value;
@@ -28493,7 +28486,7 @@ function SpatialThree(props) {
28493
28486
  materialRef.current.material.uniforms.u_renderstyle.value = volumeSettings.renderingMode;
28494
28487
  materialRef.current.material.uniforms.dtScale.value = volumeSettings.layerTransparency;
28495
28488
  }
28496
- } else if ((_d2 = (_c2 = materialRef == null ? void 0 : materialRef.current) == null ? void 0 : _c2.material) == null ? void 0 : _d2.uniforms) {
28489
+ } else if (materialRef?.current?.material?.uniforms) {
28497
28490
  materialRef.current.material.uniforms.volumeCount.value = 0;
28498
28491
  materialRef.current.material.uniforms.volumeTex.value = null;
28499
28492
  }
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { bL, bJ, bH, bK, bI, bG, bM } from "./index-B2chDEFY.js";
1
+ import { bK, bI, bG, bJ, bH, bF, bL } from "./index-Ci947y1K.js";
2
2
  import { useComplexCoordination, useComplexCoordinationSecondary, useCoordination, useCoordinationScopes, useCoordinationScopesBy, useGridItemSize, useMultiCoordinationScopesNonNull, useMultiCoordinationScopesSecondaryNonNull, usePageModeView } from "@vitessce/vit-s";
3
3
  export {
4
- bL as PluginAsyncFunction,
5
- bJ as PluginCoordinationType,
6
- bH as PluginFileType,
7
- bK as PluginJointFileType,
8
- bI as PluginViewType,
9
- bG as Vitessce,
4
+ bK as PluginAsyncFunction,
5
+ bI as PluginCoordinationType,
6
+ bG as PluginFileType,
7
+ bJ as PluginJointFileType,
8
+ bH as PluginViewType,
9
+ bF as Vitessce,
10
10
  useComplexCoordination,
11
11
  useComplexCoordinationSecondary,
12
12
  useCoordination,
@@ -16,5 +16,5 @@ export {
16
16
  useMultiCoordinationScopesNonNull,
17
17
  useMultiCoordinationScopesSecondaryNonNull,
18
18
  usePageModeView,
19
- bM as z
19
+ bL as z
20
20
  };
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-B2chDEFY.js";
1
+ import { aP as BaseDecoder } from "./index-Ci947y1K.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, aP as BaseDecoder, aQ as LercParameters, aR as LercAddCompression } from "./index-B2chDEFY.js";
2
+ import { g as getDefaultExportFromCjs, aP as BaseDecoder, aQ as LercParameters, aR as LercAddCompression } from "./index-Ci947y1K.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,7 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- var _a;
5
1
  import { _ as __toBinary } from "./chunk-INHXZS53-DHVJiuU3.js";
6
2
  var lz4_codec = (() => {
7
3
  typeof document !== "undefined" && document.currentScript ? document.currentScript.src : void 0;
@@ -36,8 +32,7 @@ var lz4_codec = (() => {
36
32
  }
37
33
  var I = 0, L = null;
38
34
  function x(a) {
39
- var _a2;
40
- (_a2 = f.onAbort) == null ? void 0 : _a2.call(f, a);
35
+ f.onAbort?.(a);
41
36
  a = "Aborted(" + a + ")";
42
37
  u(a);
43
38
  da = true;
@@ -290,7 +285,7 @@ var lz4_codec = (() => {
290
285
  }
291
286
  return c;
292
287
  }, $a = (a, b, c) => {
293
- c ?? (c = 2147483647);
288
+ c ??= 2147483647;
294
289
  if (2 > c)
295
290
  return 0;
296
291
  c -= 2;
@@ -310,7 +305,7 @@ var lz4_codec = (() => {
310
305
  }
311
306
  return d;
312
307
  }, cb = (a, b, c) => {
313
- c ?? (c = 2147483647);
308
+ c ??= 2147483647;
314
309
  if (4 > c)
315
310
  return 0;
316
311
  var d = b;
@@ -681,22 +676,20 @@ var lz4_codec = (() => {
681
676
  }
682
677
  return false;
683
678
  } }, Y = function() {
684
- var _a2;
685
679
  function a(c) {
686
- var _a3;
687
680
  Y = c.exports;
688
681
  z = Y.r;
689
682
  ha();
690
683
  Na = Y.w;
691
684
  ja.unshift(Y.s);
692
685
  I--;
693
- (_a3 = f.monitorRunDependencies) == null ? void 0 : _a3.call(f, I);
686
+ f.monitorRunDependencies?.(I);
694
687
  0 == I && (L && (c = L, L = null, c()));
695
688
  return Y;
696
689
  }
697
690
  var b = { a: gb };
698
691
  I++;
699
- (_a2 = f.monitorRunDependencies) == null ? void 0 : _a2.call(f, I);
692
+ f.monitorRunDependencies?.(I);
700
693
  if (f.instantiateWasm)
701
694
  try {
702
695
  return f.instantiateWasm(
@@ -756,17 +749,20 @@ var DEFAULT_ACCELERATION = 1;
756
749
  var MAX_BUFFER_SIZE = 2113929216;
757
750
  var emscriptenModule;
758
751
  var init = () => lz4_codec_default({ noInitialRun: true, wasmBinary: lz4_codec_default2 });
759
- var LZ4 = (_a = class {
752
+ var LZ4 = class LZ42 {
753
+ static codecId = "lz4";
754
+ static DEFAULT_ACCELERATION = DEFAULT_ACCELERATION;
755
+ static max_buffer_size = MAX_BUFFER_SIZE;
756
+ max_buffer_size = MAX_BUFFER_SIZE;
757
+ acceleration;
760
758
  constructor(acceleration = DEFAULT_ACCELERATION) {
761
- __publicField(this, "max_buffer_size", MAX_BUFFER_SIZE);
762
- __publicField(this, "acceleration");
763
759
  if (!Number.isInteger(acceleration)) {
764
760
  throw Error(`Invalid acceleration "${acceleration}". Must be a positive integer.`);
765
761
  }
766
762
  this.acceleration = acceleration <= 0 ? DEFAULT_ACCELERATION : acceleration;
767
763
  }
768
764
  static fromConfig({ acceleration }) {
769
- return new _a(acceleration);
765
+ return new LZ42(acceleration);
770
766
  }
771
767
  async encode(data) {
772
768
  if (!emscriptenModule) {
@@ -798,7 +794,7 @@ var LZ4 = (_a = class {
798
794
  }
799
795
  return result;
800
796
  }
801
- }, __publicField(_a, "codecId", "lz4"), __publicField(_a, "DEFAULT_ACCELERATION", DEFAULT_ACCELERATION), __publicField(_a, "max_buffer_size", MAX_BUFFER_SIZE), _a);
797
+ };
802
798
  var lz4_default = LZ4;
803
799
  export {
804
800
  lz4_default as default
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-B2chDEFY.js";
1
+ import { aP as BaseDecoder } from "./index-Ci947y1K.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-B2chDEFY.js";
1
+ import { aP as BaseDecoder } from "./index-Ci947y1K.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-B2chDEFY.js";
1
+ import { aP as BaseDecoder } from "./index-Ci947y1K.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { bA as MeshDistanceMaterial, bB as MeshDepthMaterial, bC as RGBADepthPacking, aB as UniformsUtils, bD as ShaderChunk, aw as InstancedBufferGeometry, av as Sphere, au as Box3, aH as BackSide, a9 as DoubleSide, ad as Mesh, as as FrontSide, aa as MeshBasicMaterial, i as Color, c as Vector3, k as Matrix4, d as Vector2, aJ as Matrix3, aD as Vector4, T as Texture, a1 as LinearFilter, bE as PlaneGeometry, f as BufferGeometry, ax as Float32BufferAttribute, bF as InstancedBufferAttribute } from "./index-B2chDEFY.js";
1
+ import { bz as MeshDistanceMaterial, bA as MeshDepthMaterial, bB as RGBADepthPacking, aB as UniformsUtils, bC as ShaderChunk, aw as InstancedBufferGeometry, av as Sphere, au as Box3, aH as BackSide, a9 as DoubleSide, ad as Mesh, as as FrontSide, aa as MeshBasicMaterial, i as Color, c as Vector3, k as Matrix4, d as Vector2, aJ as Matrix3, aD as Vector4, T as Texture, a1 as LinearFilter, bD as PlaneGeometry, f as BufferGeometry, ax as Float32BufferAttribute, bE as InstancedBufferAttribute } from "./index-Ci947y1K.js";
2
2
  function workerBootstrap() {
3
3
  var modules = /* @__PURE__ */ Object.create(null);
4
4
  function registerModule(ref, callback) {
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-B2chDEFY.js";
1
+ import { aP as BaseDecoder } from "./index-Ci947y1K.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();