var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.ts
var useFloorMapTransformMetrics_exports = {};
__export(useFloorMapTransformMetrics_exports, {
  useFloorMapTransformMetrics: () => useFloorMapTransformMetrics
});
module.exports = __toCommonJS(useFloorMapTransformMetrics_exports);
var import_react = require("react");
var import_floorMapCanvasStage = require("../utils/floorMapCanvasStage");
var import_layoutMeasurements = require("../utils/layoutMeasurements");
var import_floorMapViewportPersistence = require("./floorMapViewportPersistence");
var FIT_BOUNDS_PROGRAMMATIC_TWEEN_GUARD_MS = 400;
function useFloorMapTransformMetrics(params) {
  const {
    items,
    cellSize,
    itemGap,
    effectiveItemUnit,
    isFloorMapView,
    mode,
    zoom,
    transformRef,
    contentOffsetRef,
    boundingPadding: boundingPaddingProp,
    frameResetKey,
    viewportPersistKey
  } = params;
  const padSingle = boundingPaddingProp ?? import_floorMapViewportPersistence.DEFAULT_BOUNDING_PADDING;
  const containerRef = (0, import_react.useRef)(null);
  const mapAreaRef = (0, import_react.useRef)(null);
  const [viewportSize, setViewportSize] = (0, import_react.useState)({ width: 0, height: 0 });
  (0, import_react.useEffect)(() => {
    const el = containerRef.current;
    if (!el) return;
    const ro = new ResizeObserver(() => {
      setViewportSize({ width: el.clientWidth, height: el.clientHeight });
    });
    ro.observe(el);
    setViewportSize({ width: el.clientWidth, height: el.clientHeight });
    return () => ro.disconnect();
  }, []);
  const [mapAreaSize, setMapAreaSize] = (0, import_react.useState)({ width: 0, height: 0 });
  (0, import_react.useEffect)(() => {
    const el = mapAreaRef.current;
    if (!el) return;
    const ro = new ResizeObserver(() => {
      setMapAreaSize({ width: el.clientWidth, height: el.clientHeight });
    });
    ro.observe(el);
    setMapAreaSize({ width: el.clientWidth, height: el.clientHeight });
    return () => ro.disconnect();
  }, []);
  const autoFitOnMount = zoom.autoFitOnMount !== false;
  const zoomConfig = (0, import_react.useMemo)(
    () => ({
      initialScale: zoom.defaultScale ?? 1,
      minScale: zoom.min ?? 0.5,
      maxScale: zoom.max ?? 2,
      step: zoom.step ?? 0.1
    }),
    [zoom.defaultScale, zoom.min, zoom.max, zoom.step]
  );
  const [scale, setScale] = (0, import_react.useState)(zoomConfig.initialScale);
  const [isFullscreen, setIsFullscreen] = (0, import_react.useState)(false);
  const lastFitSnapshotRef = (0, import_react.useRef)(null);
  const [isAtFitBounds, setIsAtFitBounds] = (0, import_react.useState)(false);
  const fitBoundsTweenHoldRef = (0, import_react.useRef)(false);
  const fitBoundsTweenHoldClearTimerRef = (0, import_react.useRef)(null);
  const clearFitBoundsTweenHold = (0, import_react.useCallback)(() => {
    if (fitBoundsTweenHoldClearTimerRef.current != null) {
      clearTimeout(fitBoundsTweenHoldClearTimerRef.current);
      fitBoundsTweenHoldClearTimerRef.current = null;
    }
    fitBoundsTweenHoldRef.current = false;
  }, []);
  const [viewportLocked, setViewportLockedState] = (0, import_react.useState)(
    () => viewportPersistKey ? (0, import_floorMapViewportPersistence.readPersistedViewportLock)(viewportPersistKey) : false
  );
  const viewportLockedRef = (0, import_react.useRef)(viewportLocked);
  viewportLockedRef.current = viewportLocked;
  (0, import_react.useEffect)(() => {
    if (!viewportPersistKey) {
      setViewportLockedState(false);
      return;
    }
    setViewportLockedState((0, import_floorMapViewportPersistence.readPersistedViewportLock)(viewportPersistKey));
  }, [viewportPersistKey]);
  const setViewportLocked = (0, import_react.useCallback)(
    (next) => {
      setViewportLockedState(next);
      const key = viewportPersistKey;
      if (!key) return;
      (0, import_floorMapViewportPersistence.writePersistedViewportLock)(key, next);
    },
    [viewportPersistKey]
  );
  const toggleViewportLocked = (0, import_react.useCallback)(() => {
    setViewportLocked(!viewportLockedRef.current);
  }, [setViewportLocked]);
  const {
    contentWidth,
    contentHeight,
    contentOffsetX,
    contentOffsetY,
    alignPadSingle
  } = (0, import_react.useMemo)(() => {
    const stage = (0, import_floorMapCanvasStage.computeFloorMapContentStage)({
      items,
      cellSize,
      itemGap,
      itemUnit: effectiveItemUnit,
      boundingPadding: padSingle,
      preferPixelBoundingBox: isFloorMapView
    });
    let result = {
      contentWidth: stage.contentWidth,
      contentHeight: stage.contentHeight,
      contentOffsetX: stage.contentOffsetX,
      contentOffsetY: stage.contentOffsetY,
      alignPadSingle: stage.alignPadSingle
    };
    if (!isFloorMapView || effectiveItemUnit !== "pixel") return result;
    const vw = mapAreaSize.width > 0 ? mapAreaSize.width : viewportSize.width;
    const vh = mapAreaSize.height > 0 ? mapAreaSize.height : viewportSize.height;
    if (vw <= 0 || vh <= 0) return result;
    result = {
      ...result,
      contentWidth: Math.max(stage.contentWidth, vw),
      contentHeight: Math.max(stage.contentHeight, vh)
    };
    return result;
  }, [
    items,
    cellSize,
    itemGap,
    effectiveItemUnit,
    isFloorMapView,
    mapAreaSize.width,
    mapAreaSize.height,
    viewportSize.width,
    viewportSize.height,
    padSingle
  ]);
  const padForAlign = alignPadSingle ?? 0;
  const initialPositionX = import_floorMapViewportPersistence.VIEWPORT_TOP_LEFT_MARGIN - padForAlign * zoomConfig.initialScale;
  const initialPositionY = import_floorMapViewportPersistence.VIEWPORT_TOP_LEFT_MARGIN - padForAlign * zoomConfig.initialScale;
  contentOffsetRef.current = { x: contentOffsetX, y: contentOffsetY };
  const initialAlignRef = (0, import_react.useRef)({
    frame: "",
    done: false
  });
  (0, import_react.useEffect)(() => {
    if (!isFloorMapView || frameResetKey === void 0) return;
    if (initialAlignRef.current.frame !== frameResetKey) {
      initialAlignRef.current = { frame: frameResetKey, done: false };
    }
    if (autoFitOnMount) {
      initialAlignRef.current.done = true;
      return;
    }
    if (alignPadSingle == null) {
      initialAlignRef.current.done = false;
      return;
    }
    if (initialAlignRef.current.done) return;
    let cancelled = false;
    let raf = 0;
    const tick = () => {
      if (cancelled) return;
      const ctx = transformRef.current;
      if (!ctx) {
        raf = requestAnimationFrame(tick);
        return;
      }
      ctx.setTransform(
        initialPositionX,
        initialPositionY,
        zoomConfig.initialScale
      );
      initialAlignRef.current.done = true;
    };
    raf = requestAnimationFrame(tick);
    return () => {
      cancelled = true;
      cancelAnimationFrame(raf);
    };
  }, [
    isFloorMapView,
    frameResetKey,
    alignPadSingle,
    initialPositionX,
    initialPositionY,
    zoomConfig.initialScale,
    transformRef,
    autoFitOnMount
  ]);
  (0, import_react.useEffect)(() => {
    if (!isFullscreen) return;
    if (typeof document === "undefined") return;
    const bodyCls = "pisell-floor-map-layout-fullscreen-host";
    document.body.classList.add(bodyCls);
    return () => {
      document.body.classList.remove(bodyCls);
    };
  }, [isFullscreen]);
  (0, import_react.useEffect)(() => {
    return () => {
      if (typeof document === "undefined") return;
      document.body.classList.remove("pisell-floor-map-layout-fullscreen-host");
    };
  }, []);
  const toggleFullscreen = (0, import_react.useCallback)(() => {
    setIsFullscreen((prev) => !prev);
  }, []);
  const fitBoundsRef = (0, import_react.useRef)(null);
  const fitBounds = (0, import_react.useCallback)(() => {
    if (viewportLockedRef.current) return true;
    const ctx = transformRef.current;
    const container = containerRef.current;
    if (!ctx || !container) return false;
    const wrapper = container.querySelector(".react-transform-wrapper");
    if (!wrapper) return false;
    const wrapperRect = wrapper.getBoundingClientRect();
    const wEl = wrapper;
    const layoutW = wEl.clientWidth > 0 ? wEl.clientWidth : wrapperRect.width;
    const layoutH = wEl.clientHeight > 0 ? wEl.clientHeight : wrapperRect.height;
    if (layoutW <= 0 || layoutH <= 0) return false;
    const applyProgrammaticFit = (fx, fy, fScale) => {
      clearFitBoundsTweenHold();
      lastFitSnapshotRef.current = { x: fx, y: fy, scale: fScale };
      setIsAtFitBounds(true);
      fitBoundsTweenHoldRef.current = true;
      fitBoundsTweenHoldClearTimerRef.current = setTimeout(() => {
        fitBoundsTweenHoldClearTimerRef.current = null;
        fitBoundsTweenHoldRef.current = false;
        const cur = lastTransformRef.current;
        const s = lastFitSnapshotRef.current;
        if (!s) return;
        const same = Math.abs(s.x - cur.x) < import_floorMapViewportPersistence.FIT_BOUNDS_MATCH_POS_EPSILON && Math.abs(s.y - cur.y) < import_floorMapViewportPersistence.FIT_BOUNDS_MATCH_POS_EPSILON && Math.abs(s.scale - cur.scale) < import_floorMapViewportPersistence.FIT_BOUNDS_MATCH_SCALE_EPSILON;
        setIsAtFitBounds(same);
      }, FIT_BOUNDS_PROGRAMMATIC_TWEEN_GUARD_MS);
      ctx.setTransform(fx, fy, fScale);
    };
    const pixelBox = isFloorMapView && effectiveItemUnit === "pixel" && items.length > 0 ? (0, import_layoutMeasurements.getPixelBoundingBox)(items, cellSize) : null;
    const clampFitScale = (raw2) => Math.max(zoom.min ?? 0.5, Math.min(raw2, zoom.max ?? 2));
    if (pixelBox) {
      const bw = Math.max(1, pixelBox.maxRight - pixelBox.minLeft);
      const bh = Math.max(1, pixelBox.maxBottom - pixelBox.minTop);
      const edgePx = 0;
      const availW = Math.max(1, layoutW - 2 * edgePx);
      const availH = Math.max(1, layoutH - 2 * edgePx);
      const raw2 = Math.min(availW / bw, availH / bh);
      const nextScale2 = clampFitScale(raw2);
      const ap = alignPadSingle ?? padSingle;
      const bboxCx = ap + bw / 2;
      const bboxCy = ap + bh / 2;
      const x2 = layoutW / 2 - bboxCx * nextScale2;
      const y2 = layoutH / 2 - bboxCy * nextScale2;
      applyProgrammaticFit(x2, y2, nextScale2);
      return true;
    }
    if (contentWidth <= 0 || contentHeight <= 0) return false;
    const raw = Math.min(layoutW / contentWidth, layoutH / contentHeight);
    const nextScale = clampFitScale(raw);
    const padA = alignPadSingle ?? 0;
    const x = import_floorMapViewportPersistence.VIEWPORT_TOP_LEFT_MARGIN - padA * nextScale;
    const y = import_floorMapViewportPersistence.VIEWPORT_TOP_LEFT_MARGIN - padA * nextScale;
    applyProgrammaticFit(x, y, nextScale);
    return true;
  }, [
    clearFitBoundsTweenHold,
    contentWidth,
    contentHeight,
    zoom,
    transformRef,
    alignPadSingle,
    isFloorMapView,
    effectiveItemUnit,
    items,
    cellSize,
    padSingle
  ]);
  fitBoundsRef.current = fitBounds;
  const focusContentBounds = (0, import_react.useCallback)(
    (bounds) => {
      if (viewportLockedRef.current || !bounds) return false;
      const ctx = transformRef.current;
      const container = containerRef.current;
      if (!ctx || !container) return false;
      const wrapper = container.querySelector(".react-transform-wrapper");
      if (!wrapper) return false;
      const wEl = wrapper;
      const wrapperRect = wrapper.getBoundingClientRect();
      const layoutW = wEl.clientWidth > 0 ? wEl.clientWidth : wrapperRect.width;
      const layoutH = wEl.clientHeight > 0 ? wEl.clientHeight : wrapperRect.height;
      if (layoutW <= 0 || layoutH <= 0) return false;
      const ox = contentOffsetRef.current.x;
      const oy = contentOffsetRef.current.y;
      const visMinL = bounds.minLeft + ox;
      const visMinT = bounds.minTop + oy;
      const visMaxR = bounds.maxRight + ox;
      const visMaxB = bounds.maxBottom + oy;
      const bw = Math.max(1, visMaxR - visMinL);
      const bh = Math.max(1, visMaxB - visMinT);
      const edgePx = 48;
      const availW = Math.max(1, layoutW - 2 * edgePx);
      const availH = Math.max(1, layoutH - 2 * edgePx);
      const clampFitScale = (raw) => Math.max(zoom.min ?? 0.5, Math.min(raw, zoom.max ?? 2));
      const cur = lastTransformRef.current;
      const curScale = (cur == null ? void 0 : cur.scale) ?? zoomConfig.initialScale ?? 1;
      const rawFit = Math.min(availW / bw, availH / bh);
      let nextScale = curScale;
      if (bw * curScale > availW || bh * curScale > availH) {
        nextScale = clampFitScale(rawFit);
      }
      const bboxCx = visMinL + bw / 2;
      const bboxCy = visMinT + bh / 2;
      const x = layoutW / 2 - bboxCx * nextScale;
      const y = layoutH / 2 - bboxCy * nextScale;
      clearFitBoundsTweenHold();
      lastFitSnapshotRef.current = null;
      setIsAtFitBounds(false);
      ctx.setTransform(x, y, nextScale);
      return true;
    },
    [
      clearFitBoundsTweenHold,
      contentOffsetRef,
      transformRef,
      zoom,
      zoomConfig.initialScale
    ]
  );
  const autoFitOnceRef = (0, import_react.useRef)({
    frame: "",
    done: false
  });
  const prevItemsCountForAutoFitRef = (0, import_react.useRef)(null);
  const cachedRestoredFrameRef = (0, import_react.useRef)("");
  (0, import_react.useLayoutEffect)(() => {
    if (!isFloorMapView || !autoFitOnMount || frameResetKey === void 0) return;
    const frame = String(frameResetKey);
    if (autoFitOnceRef.current.frame !== frame) {
      autoFitOnceRef.current = { frame, done: false };
      prevItemsCountForAutoFitRef.current = null;
      if (viewportPersistKey && (0, import_floorMapViewportPersistence.readPersistedViewport)(viewportPersistKey)) {
        autoFitOnceRef.current.done = true;
        cachedRestoredFrameRef.current = frame;
      } else if (cachedRestoredFrameRef.current !== frame) {
        cachedRestoredFrameRef.current = "";
      }
    }
    const itemCount = items.length;
    const prevN = prevItemsCountForAutoFitRef.current;
    if (prevN !== null && prevN === 0 && itemCount > 0 && cachedRestoredFrameRef.current !== frame) {
      autoFitOnceRef.current.done = false;
    }
    prevItemsCountForAutoFitRef.current = itemCount;
    if (autoFitOnceRef.current.done) return;
    if (effectiveItemUnit === "pixel" && itemCount === 0) {
      return;
    }
    if (contentWidth <= 0 || contentHeight <= 0) return;
    let cancelled = false;
    let raf = 0;
    let attempts = 0;
    const MAX_AUTO_FIT_ATTEMPTS = 160;
    const tick = () => {
      if (cancelled) return;
      if (attempts >= MAX_AUTO_FIT_ATTEMPTS) return;
      const ctx = transformRef.current;
      const container = containerRef.current;
      const wrapper = container == null ? void 0 : container.querySelector(
        ".react-transform-wrapper"
      );
      if (!ctx || !wrapper) {
        attempts += 1;
        raf = requestAnimationFrame(tick);
        return;
      }
      const rect = wrapper.getBoundingClientRect();
      if (rect.width <= 0 || rect.height <= 0) {
        attempts += 1;
        raf = requestAnimationFrame(tick);
        return;
      }
      raf = requestAnimationFrame(() => {
        if (cancelled) return;
        raf = requestAnimationFrame(() => {
          if (cancelled) return;
          const ok = fitBounds();
          if (ok) {
            autoFitOnceRef.current.done = true;
            return;
          }
          attempts += 1;
          if (attempts < MAX_AUTO_FIT_ATTEMPTS) {
            raf = requestAnimationFrame(tick);
          }
        });
      });
    };
    raf = requestAnimationFrame(tick);
    return () => {
      cancelled = true;
      cancelAnimationFrame(raf);
    };
  }, [
    isFloorMapView,
    autoFitOnMount,
    frameResetKey,
    effectiveItemUnit,
    items.length,
    contentWidth,
    contentHeight,
    viewportSize.width,
    viewportSize.height,
    mapAreaSize.width,
    mapAreaSize.height,
    fitBounds,
    transformRef,
    viewportPersistKey
  ]);
  const lastTransformRef = (0, import_react.useRef)({ x: 0, y: 0, scale: 1 });
  const [isInteractingWithElement, setIsInteractingWithElement] = (0, import_react.useState)(false);
  const prevInteractingRef = (0, import_react.useRef)(false);
  (0, import_react.useEffect)(() => {
    if (isInteractingWithElement) {
      prevInteractingRef.current = true;
      return;
    }
    if (!prevInteractingRef.current) return;
    prevInteractingRef.current = false;
    const saved = lastTransformRef.current;
    const raf = requestAnimationFrame(() => {
      var _a;
      (_a = transformRef.current) == null ? void 0 : _a.setTransform(saved.x, saved.y, saved.scale);
    });
    return () => cancelAnimationFrame(raf);
  }, [isInteractingWithElement, transformRef]);
  const persistKeyRef = (0, import_react.useRef)(viewportPersistKey);
  persistKeyRef.current = viewportPersistKey;
  const persistTimerRef = (0, import_react.useRef)(null);
  const flushPersistRef = (0, import_react.useRef)(null);
  const schedulePersistViewport = (0, import_react.useCallback)(
    (snapshot) => {
      const key = persistKeyRef.current;
      if (!key) return;
      if (persistTimerRef.current != null) {
        clearTimeout(persistTimerRef.current);
        persistTimerRef.current = null;
      }
      const targetKey = key;
      const doWrite = () => {
        persistTimerRef.current = null;
        flushPersistRef.current = null;
        (0, import_floorMapViewportPersistence.writePersistedViewport)(targetKey, snapshot);
      };
      flushPersistRef.current = doWrite;
      persistTimerRef.current = setTimeout(doWrite, import_floorMapViewportPersistence.VIEWPORT_PERSIST_DEBOUNCE_MS);
    },
    []
  );
  const notifyTransformed = (0, import_react.useCallback)(
    (x, y, nextScale) => {
      lastTransformRef.current = { x, y, scale: nextScale };
      const snap = lastFitSnapshotRef.current;
      if (snap) {
        const same = Math.abs(snap.x - x) < import_floorMapViewportPersistence.FIT_BOUNDS_MATCH_POS_EPSILON && Math.abs(snap.y - y) < import_floorMapViewportPersistence.FIT_BOUNDS_MATCH_POS_EPSILON && Math.abs(snap.scale - nextScale) < import_floorMapViewportPersistence.FIT_BOUNDS_MATCH_SCALE_EPSILON;
        if (fitBoundsTweenHoldRef.current) {
          if (same) {
            clearFitBoundsTweenHold();
            setIsAtFitBounds(true);
          }
          return;
        }
        setIsAtFitBounds((prev) => prev === same ? prev : same);
      } else {
        setIsAtFitBounds((prev) => prev ? false : prev);
      }
    },
    [clearFitBoundsTweenHold]
  );
  const persistCurrentViewport = (0, import_react.useCallback)(() => {
    const snapshot = lastTransformRef.current;
    schedulePersistViewport({
      x: snapshot.x,
      y: snapshot.y,
      scale: snapshot.scale
    });
  }, [schedulePersistViewport]);
  const frameResetKeyRef = (0, import_react.useRef)(frameResetKey);
  frameResetKeyRef.current = frameResetKey;
  const viewportPersistKeyRef = (0, import_react.useRef)(viewportPersistKey);
  viewportPersistKeyRef.current = viewportPersistKey;
  const applyPersistedViewport = (0, import_react.useCallback)(
    (cached) => {
      clearFitBoundsTweenHold();
      const ctx = transformRef.current;
      if (!ctx) return false;
      ctx.setTransform(cached.x, cached.y, cached.scale, 0);
      lastTransformRef.current = { ...cached };
      lastFitSnapshotRef.current = null;
      setIsAtFitBounds(false);
      autoFitOnceRef.current.done = true;
      initialAlignRef.current.done = true;
      const currentFrame = frameResetKeyRef.current;
      if (currentFrame !== void 0) {
        cachedRestoredFrameRef.current = String(currentFrame);
      }
      return true;
    },
    [clearFitBoundsTweenHold, transformRef]
  );
  (0, import_react.useEffect)(() => {
    if (!viewportPersistKey) return;
    const cached = (0, import_floorMapViewportPersistence.readPersistedViewport)(viewportPersistKey);
    if (!cached) return;
    let cancelled = false;
    let raf1 = 0;
    let raf2 = 0;
    let attempts = 0;
    const MAX_ATTEMPTS = 60;
    const tick = () => {
      if (cancelled) return;
      if (!applyPersistedViewport(cached)) {
        if (attempts++ < MAX_ATTEMPTS) {
          raf1 = requestAnimationFrame(tick);
        }
      }
    };
    raf1 = requestAnimationFrame(() => {
      raf2 = requestAnimationFrame(tick);
    });
    return () => {
      cancelled = true;
      cancelAnimationFrame(raf1);
      cancelAnimationFrame(raf2);
    };
  }, [viewportPersistKey, frameResetKey, applyPersistedViewport]);
  const attachTransformContext = (0, import_react.useCallback)(
    (ctx) => {
      transformRef.current = ctx;
      const key = viewportPersistKeyRef.current;
      const currentFrame = frameResetKeyRef.current;
      if (!key || currentFrame === void 0) return;
      const frameStr = String(currentFrame);
      if (cachedRestoredFrameRef.current === frameStr) return;
      const cached = (0, import_floorMapViewportPersistence.readPersistedViewport)(key);
      if (!cached) return;
      cachedRestoredFrameRef.current = frameStr;
      requestAnimationFrame(() => {
        requestAnimationFrame(() => {
          if (frameResetKeyRef.current !== currentFrame) return;
          applyPersistedViewport(cached);
        });
      });
    },
    [transformRef, applyPersistedViewport]
  );
  (0, import_react.useEffect)(() => {
    return () => {
      var _a;
      if (persistTimerRef.current != null) {
        clearTimeout(persistTimerRef.current);
        persistTimerRef.current = null;
      }
      (_a = flushPersistRef.current) == null ? void 0 : _a.call(flushPersistRef);
      flushPersistRef.current = null;
      if (fitBoundsTweenHoldClearTimerRef.current != null) {
        clearTimeout(fitBoundsTweenHoldClearTimerRef.current);
        fitBoundsTweenHoldClearTimerRef.current = null;
      }
    };
  }, [viewportPersistKey]);
  return {
    containerRef,
    mapAreaRef,
    viewportSize,
    mapAreaSize,
    contentWidth,
    contentHeight,
    contentOffsetX,
    contentOffsetY,
    initialPositionX,
    initialPositionY,
    zoomConfig,
    scale,
    setScale,
    isFullscreen,
    toggleFullscreen,
    fitBounds,
    focusContentBounds,
    isAtFitBounds,
    notifyTransformed,
    persistCurrentViewport,
    attachTransformContext,
    lastTransformRef,
    isInteractingWithElement,
    setIsInteractingWithElement,
    viewportLocked,
    setViewportLocked,
    toggleViewportLocked
  };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  useFloorMapTransformMetrics
});
