@almadar/ui 5.84.0 → 5.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/avl/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React106 from 'react';
3
- import React106__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
2
+ import * as React104 from 'react';
3
+ import React104__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
4
4
  import { getAllPages, OrbitalProvider, EventBusContext, useTraitScope, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath } from '@almadar/ui/providers';
5
5
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
@@ -3174,7 +3174,7 @@ var init_Typography = __esm({
3174
3174
  }) => {
3175
3175
  const variant = variantProp ?? (level ? `h${level}` : "body1");
3176
3176
  const Component = as || defaultElements[variant];
3177
- return React106__default.createElement(
3177
+ return React104__default.createElement(
3178
3178
  Component,
3179
3179
  {
3180
3180
  id,
@@ -3511,7 +3511,7 @@ var init_Box = __esm({
3511
3511
  fixed: "fixed",
3512
3512
  sticky: "sticky"
3513
3513
  };
3514
- Box = React106__default.forwardRef(
3514
+ Box = React104__default.forwardRef(
3515
3515
  ({
3516
3516
  padding,
3517
3517
  paddingX,
@@ -3576,7 +3576,7 @@ var init_Box = __esm({
3576
3576
  onPointerDown?.(e);
3577
3577
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
3578
3578
  const isClickable = action || onClick;
3579
- return React106__default.createElement(
3579
+ return React104__default.createElement(
3580
3580
  Component,
3581
3581
  {
3582
3582
  ref,
@@ -3672,7 +3672,7 @@ var init_Stack = __esm({
3672
3672
  };
3673
3673
  const isHorizontal = direction === "horizontal";
3674
3674
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
3675
- return React106__default.createElement(
3675
+ return React104__default.createElement(
3676
3676
  Component,
3677
3677
  {
3678
3678
  className: cn(
@@ -4164,7 +4164,7 @@ var init_MiniStateMachine = __esm({
4164
4164
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
4165
4165
  const tc = transitionCounts[s.name] ?? 0;
4166
4166
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
4167
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
4167
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
4168
4168
  /* @__PURE__ */ jsx(
4169
4169
  AvlState,
4170
4170
  {
@@ -4494,7 +4494,7 @@ function loadLib(key, importer) {
4494
4494
  return p2;
4495
4495
  }
4496
4496
  function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
4497
- const Lazy = React106__default.lazy(async () => {
4497
+ const Lazy = React104__default.lazy(async () => {
4498
4498
  const lib = await loadLib(libKey, importer);
4499
4499
  const Comp = pick(lib);
4500
4500
  if (!Comp) {
@@ -4504,7 +4504,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
4504
4504
  return { default: Comp };
4505
4505
  });
4506
4506
  const Wrapped = (props) => /* @__PURE__ */ jsx(
4507
- React106__default.Suspense,
4507
+ React104__default.Suspense,
4508
4508
  {
4509
4509
  fallback: /* @__PURE__ */ jsx(
4510
4510
  "span",
@@ -5235,7 +5235,7 @@ var init_Icon = __esm({
5235
5235
  const directIcon = typeof icon === "string" ? void 0 : icon;
5236
5236
  const effectiveName = typeof icon === "string" ? icon : name;
5237
5237
  const family = useIconFamily();
5238
- const RenderedComponent = React106__default.useMemo(() => {
5238
+ const RenderedComponent = React104__default.useMemo(() => {
5239
5239
  if (directIcon) return null;
5240
5240
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
5241
5241
  }, [directIcon, effectiveName, family]);
@@ -5297,7 +5297,7 @@ function resolveIconProp(value, sizeClass) {
5297
5297
  const IconComp = value;
5298
5298
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
5299
5299
  }
5300
- if (React106__default.isValidElement(value)) {
5300
+ if (React104__default.isValidElement(value)) {
5301
5301
  return value;
5302
5302
  }
5303
5303
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -5373,7 +5373,7 @@ var init_Button = __esm({
5373
5373
  md: "h-icon-default w-icon-default",
5374
5374
  lg: "h-icon-default w-icon-default"
5375
5375
  };
5376
- Button = React106__default.forwardRef(
5376
+ Button = React104__default.forwardRef(
5377
5377
  ({
5378
5378
  className,
5379
5379
  variant = "primary",
@@ -5441,7 +5441,7 @@ var Dialog;
5441
5441
  var init_Dialog = __esm({
5442
5442
  "components/core/atoms/Dialog.tsx"() {
5443
5443
  init_cn();
5444
- Dialog = React106__default.forwardRef(
5444
+ Dialog = React104__default.forwardRef(
5445
5445
  ({
5446
5446
  role = "dialog",
5447
5447
  "aria-modal": ariaModal = true,
@@ -5936,7 +5936,7 @@ var init_Badge = __esm({
5936
5936
  md: "px-2.5 py-1 text-sm",
5937
5937
  lg: "px-3 py-1.5 text-base"
5938
5938
  };
5939
- Badge = React106__default.forwardRef(
5939
+ Badge = React104__default.forwardRef(
5940
5940
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
5941
5941
  const iconSizes3 = {
5942
5942
  sm: "h-icon-default w-icon-default",
@@ -6273,7 +6273,7 @@ var init_SvgFlow = __esm({
6273
6273
  width = 100,
6274
6274
  height = 100
6275
6275
  }) => {
6276
- const markerId = React106__default.useMemo(() => {
6276
+ const markerId = React104__default.useMemo(() => {
6277
6277
  flowIdCounter += 1;
6278
6278
  return `almadar-flow-arrow-${flowIdCounter}`;
6279
6279
  }, []);
@@ -6866,7 +6866,7 @@ var init_SvgRing = __esm({
6866
6866
  width = 100,
6867
6867
  height = 100
6868
6868
  }) => {
6869
- const gradientId = React106__default.useMemo(() => {
6869
+ const gradientId = React104__default.useMemo(() => {
6870
6870
  ringIdCounter += 1;
6871
6871
  return `almadar-ring-glow-${ringIdCounter}`;
6872
6872
  }, []);
@@ -7047,7 +7047,7 @@ var init_Input = __esm({
7047
7047
  init_cn();
7048
7048
  init_Icon();
7049
7049
  init_useEventBus();
7050
- Input = React106__default.forwardRef(
7050
+ Input = React104__default.forwardRef(
7051
7051
  ({
7052
7052
  className,
7053
7053
  inputType,
@@ -7207,7 +7207,7 @@ var Label;
7207
7207
  var init_Label = __esm({
7208
7208
  "components/core/atoms/Label.tsx"() {
7209
7209
  init_cn();
7210
- Label = React106__default.forwardRef(
7210
+ Label = React104__default.forwardRef(
7211
7211
  ({ className, required, children, ...props }, ref) => {
7212
7212
  return /* @__PURE__ */ jsxs(
7213
7213
  "label",
@@ -7234,7 +7234,7 @@ var init_Textarea = __esm({
7234
7234
  "components/core/atoms/Textarea.tsx"() {
7235
7235
  init_cn();
7236
7236
  init_useEventBus();
7237
- Textarea = React106__default.forwardRef(
7237
+ Textarea = React104__default.forwardRef(
7238
7238
  ({ className, error, onChange, ...props }, ref) => {
7239
7239
  const eventBus = useEventBus();
7240
7240
  const handleChange = (e) => {
@@ -7473,7 +7473,7 @@ var init_Select = __esm({
7473
7473
  init_cn();
7474
7474
  init_Icon();
7475
7475
  init_useEventBus();
7476
- Select = React106__default.forwardRef(
7476
+ Select = React104__default.forwardRef(
7477
7477
  (props, _ref) => {
7478
7478
  const { multiple, searchable, clearable } = props;
7479
7479
  if (multiple || searchable || clearable) {
@@ -7490,7 +7490,7 @@ var init_Checkbox = __esm({
7490
7490
  "components/core/atoms/Checkbox.tsx"() {
7491
7491
  init_cn();
7492
7492
  init_useEventBus();
7493
- Checkbox = React106__default.forwardRef(
7493
+ Checkbox = React104__default.forwardRef(
7494
7494
  ({ className, label, id, onChange, ...props }, ref) => {
7495
7495
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
7496
7496
  const eventBus = useEventBus();
@@ -7544,7 +7544,7 @@ var init_Spinner = __esm({
7544
7544
  md: "h-6 w-6",
7545
7545
  lg: "h-8 w-8"
7546
7546
  };
7547
- Spinner = React106__default.forwardRef(
7547
+ Spinner = React104__default.forwardRef(
7548
7548
  ({ className, size = "md", overlay, ...props }, ref) => {
7549
7549
  if (overlay) {
7550
7550
  return /* @__PURE__ */ jsx(
@@ -7634,7 +7634,7 @@ var init_Card = __esm({
7634
7634
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
7635
7635
  "tile-image-first": "p-0 overflow-hidden"
7636
7636
  };
7637
- Card = React106__default.forwardRef(
7637
+ Card = React104__default.forwardRef(
7638
7638
  ({
7639
7639
  className,
7640
7640
  variant = "bordered",
@@ -7682,9 +7682,9 @@ var init_Card = __esm({
7682
7682
  }
7683
7683
  );
7684
7684
  Card.displayName = "Card";
7685
- CardHeader = React106__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7685
+ CardHeader = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7686
7686
  CardHeader.displayName = "CardHeader";
7687
- CardTitle = React106__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7687
+ CardTitle = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7688
7688
  "h3",
7689
7689
  {
7690
7690
  ref,
@@ -7697,11 +7697,11 @@ var init_Card = __esm({
7697
7697
  }
7698
7698
  ));
7699
7699
  CardTitle.displayName = "CardTitle";
7700
- CardContent = React106__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7700
+ CardContent = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7701
7701
  CardContent.displayName = "CardContent";
7702
7702
  CardBody = CardContent;
7703
7703
  CardBody.displayName = "CardBody";
7704
- CardFooter = React106__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7704
+ CardFooter = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7705
7705
  "div",
7706
7706
  {
7707
7707
  ref,
@@ -7756,7 +7756,7 @@ var init_FilterPill = __esm({
7756
7756
  md: "w-3.5 h-3.5",
7757
7757
  lg: "w-4 h-4"
7758
7758
  };
7759
- FilterPill = React106__default.forwardRef(
7759
+ FilterPill = React104__default.forwardRef(
7760
7760
  ({
7761
7761
  className,
7762
7762
  variant = "default",
@@ -7885,8 +7885,8 @@ var init_Avatar = __esm({
7885
7885
  actionPayload
7886
7886
  }) => {
7887
7887
  const eventBus = useEventBus();
7888
- const [imgFailed, setImgFailed] = React106__default.useState(false);
7889
- React106__default.useEffect(() => {
7888
+ const [imgFailed, setImgFailed] = React104__default.useState(false);
7889
+ React104__default.useEffect(() => {
7890
7890
  setImgFailed(false);
7891
7891
  }, [src]);
7892
7892
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -7999,7 +7999,7 @@ var init_Center = __esm({
7999
7999
  as: Component = "div"
8000
8000
  }) => {
8001
8001
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
8002
- return React106__default.createElement(Component, {
8002
+ return React104__default.createElement(Component, {
8003
8003
  className: cn(
8004
8004
  inline ? "inline-flex" : "flex",
8005
8005
  horizontal && "justify-center",
@@ -8267,7 +8267,7 @@ var init_Radio = __esm({
8267
8267
  md: "w-2.5 h-2.5",
8268
8268
  lg: "w-3 h-3"
8269
8269
  };
8270
- Radio = React106__default.forwardRef(
8270
+ Radio = React104__default.forwardRef(
8271
8271
  ({
8272
8272
  label,
8273
8273
  helperText,
@@ -8284,12 +8284,12 @@ var init_Radio = __esm({
8284
8284
  onChange,
8285
8285
  ...props
8286
8286
  }, ref) => {
8287
- const reactId = React106__default.useId();
8287
+ const reactId = React104__default.useId();
8288
8288
  const baseId = id || `radio-${reactId}`;
8289
8289
  const hasError = !!error;
8290
8290
  const eventBus = useEventBus();
8291
- const [selected, setSelected] = React106__default.useState(value);
8292
- React106__default.useEffect(() => {
8291
+ const [selected, setSelected] = React104__default.useState(value);
8292
+ React104__default.useEffect(() => {
8293
8293
  if (value !== void 0) setSelected(value);
8294
8294
  }, [value]);
8295
8295
  const pick = (next, e) => {
@@ -8471,7 +8471,7 @@ var init_Switch = __esm({
8471
8471
  "components/core/atoms/Switch.tsx"() {
8472
8472
  "use client";
8473
8473
  init_cn();
8474
- Switch = React106.forwardRef(
8474
+ Switch = React104.forwardRef(
8475
8475
  ({
8476
8476
  checked,
8477
8477
  defaultChecked = false,
@@ -8482,10 +8482,10 @@ var init_Switch = __esm({
8482
8482
  name,
8483
8483
  className
8484
8484
  }, ref) => {
8485
- const [isChecked, setIsChecked] = React106.useState(
8485
+ const [isChecked, setIsChecked] = React104.useState(
8486
8486
  checked !== void 0 ? checked : defaultChecked
8487
8487
  );
8488
- React106.useEffect(() => {
8488
+ React104.useEffect(() => {
8489
8489
  if (checked !== void 0) {
8490
8490
  setIsChecked(checked);
8491
8491
  }
@@ -8763,7 +8763,7 @@ var Aside;
8763
8763
  var init_Aside = __esm({
8764
8764
  "components/core/atoms/Aside.tsx"() {
8765
8765
  init_cn();
8766
- Aside = React106__default.forwardRef(
8766
+ Aside = React104__default.forwardRef(
8767
8767
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
8768
8768
  );
8769
8769
  Aside.displayName = "Aside";
@@ -8842,9 +8842,9 @@ var init_LawReferenceTooltip = __esm({
8842
8842
  className
8843
8843
  }) => {
8844
8844
  const { t } = useTranslate();
8845
- const [isVisible, setIsVisible] = React106__default.useState(false);
8846
- const timeoutRef = React106__default.useRef(null);
8847
- const triggerRef = React106__default.useRef(null);
8845
+ const [isVisible, setIsVisible] = React104__default.useState(false);
8846
+ const timeoutRef = React104__default.useRef(null);
8847
+ const triggerRef = React104__default.useRef(null);
8848
8848
  const handleMouseEnter = () => {
8849
8849
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8850
8850
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -8855,7 +8855,7 @@ var init_LawReferenceTooltip = __esm({
8855
8855
  };
8856
8856
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
8857
8857
  const open = isVisible || revealed;
8858
- React106__default.useEffect(() => {
8858
+ React104__default.useEffect(() => {
8859
8859
  return () => {
8860
8860
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8861
8861
  };
@@ -9065,7 +9065,7 @@ var init_StatusDot = __esm({
9065
9065
  md: "w-2.5 h-2.5",
9066
9066
  lg: "w-3 h-3"
9067
9067
  };
9068
- StatusDot = React106__default.forwardRef(
9068
+ StatusDot = React104__default.forwardRef(
9069
9069
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
9070
9070
  return /* @__PURE__ */ jsx(
9071
9071
  "span",
@@ -9119,7 +9119,7 @@ var init_TrendIndicator = __esm({
9119
9119
  down: "trending-down",
9120
9120
  flat: "arrow-right"
9121
9121
  };
9122
- TrendIndicator = React106__default.forwardRef(
9122
+ TrendIndicator = React104__default.forwardRef(
9123
9123
  ({
9124
9124
  className,
9125
9125
  value,
@@ -9186,7 +9186,7 @@ var init_RangeSlider = __esm({
9186
9186
  md: "w-4 h-4",
9187
9187
  lg: "w-5 h-5"
9188
9188
  };
9189
- RangeSlider = React106__default.forwardRef(
9189
+ RangeSlider = React104__default.forwardRef(
9190
9190
  ({
9191
9191
  className,
9192
9192
  min = 0,
@@ -9780,7 +9780,7 @@ var init_ContentSection = __esm({
9780
9780
  md: "py-16",
9781
9781
  lg: "py-24"
9782
9782
  };
9783
- ContentSection = React106__default.forwardRef(
9783
+ ContentSection = React104__default.forwardRef(
9784
9784
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
9785
9785
  return /* @__PURE__ */ jsx(
9786
9786
  Box,
@@ -10314,7 +10314,7 @@ var init_AnimatedReveal = __esm({
10314
10314
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
10315
10315
  "none": {}
10316
10316
  };
10317
- AnimatedReveal = React106__default.forwardRef(
10317
+ AnimatedReveal = React104__default.forwardRef(
10318
10318
  ({
10319
10319
  trigger = "scroll",
10320
10320
  animation = "fade-up",
@@ -10474,7 +10474,7 @@ var init_AnimatedGraphic = __esm({
10474
10474
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
10475
10475
  "use client";
10476
10476
  init_cn();
10477
- AnimatedGraphic = React106__default.forwardRef(
10477
+ AnimatedGraphic = React104__default.forwardRef(
10478
10478
  ({
10479
10479
  src,
10480
10480
  svgContent,
@@ -10497,7 +10497,7 @@ var init_AnimatedGraphic = __esm({
10497
10497
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
10498
10498
  const resolvedSvg = svgContent ?? fetchedSvg;
10499
10499
  const prevAnimateRef = useRef(animate);
10500
- const setRef = React106__default.useCallback(
10500
+ const setRef = React104__default.useCallback(
10501
10501
  (node) => {
10502
10502
  containerRef.current = node;
10503
10503
  if (typeof ref === "function") ref(node);
@@ -12119,7 +12119,7 @@ function GameCard({
12119
12119
  className
12120
12120
  }) {
12121
12121
  const eventBus = useEventBus();
12122
- const handleClick = React106.useCallback(() => {
12122
+ const handleClick = React104.useCallback(() => {
12123
12123
  if (disabled) return;
12124
12124
  onClick?.(id);
12125
12125
  if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
@@ -12401,9 +12401,9 @@ function ControlButton({
12401
12401
  className
12402
12402
  }) {
12403
12403
  const eventBus = useEventBus();
12404
- const [isPressed, setIsPressed] = React106.useState(false);
12404
+ const [isPressed, setIsPressed] = React104.useState(false);
12405
12405
  const actualPressed = pressed ?? isPressed;
12406
- const handlePointerDown = React106.useCallback(
12406
+ const handlePointerDown = React104.useCallback(
12407
12407
  (e) => {
12408
12408
  e.preventDefault();
12409
12409
  if (disabled) return;
@@ -12413,7 +12413,7 @@ function ControlButton({
12413
12413
  },
12414
12414
  [disabled, pressEvent, eventBus, onPress]
12415
12415
  );
12416
- const handlePointerUp = React106.useCallback(
12416
+ const handlePointerUp = React104.useCallback(
12417
12417
  (e) => {
12418
12418
  e.preventDefault();
12419
12419
  if (disabled) return;
@@ -12423,7 +12423,7 @@ function ControlButton({
12423
12423
  },
12424
12424
  [disabled, releaseEvent, eventBus, onRelease]
12425
12425
  );
12426
- const handlePointerLeave = React106.useCallback(
12426
+ const handlePointerLeave = React104.useCallback(
12427
12427
  (e) => {
12428
12428
  if (isPressed) {
12429
12429
  setIsPressed(false);
@@ -13442,8 +13442,8 @@ function MiniMap({
13442
13442
  tileAssets,
13443
13443
  unitAssets
13444
13444
  }) {
13445
- const canvasRef = React106.useRef(null);
13446
- const imgCacheRef = React106.useRef(/* @__PURE__ */ new Map());
13445
+ const canvasRef = React104.useRef(null);
13446
+ const imgCacheRef = React104.useRef(/* @__PURE__ */ new Map());
13447
13447
  function loadImg(url) {
13448
13448
  const cached = imgCacheRef.current.get(url);
13449
13449
  if (cached) return cached.complete ? cached : null;
@@ -13458,7 +13458,7 @@ function MiniMap({
13458
13458
  imgCacheRef.current.set(url, img);
13459
13459
  return null;
13460
13460
  }
13461
- React106.useEffect(() => {
13461
+ React104.useEffect(() => {
13462
13462
  const canvas = canvasRef.current;
13463
13463
  if (!canvas) return;
13464
13464
  const ctx = canvas.getContext("2d");
@@ -13593,8 +13593,8 @@ function ControlGrid({
13593
13593
  className
13594
13594
  }) {
13595
13595
  const eventBus = useEventBus();
13596
- const [active, setActive] = React106.useState(/* @__PURE__ */ new Set());
13597
- const handlePress = React106.useCallback(
13596
+ const [active, setActive] = React104.useState(/* @__PURE__ */ new Set());
13597
+ const handlePress = React104.useCallback(
13598
13598
  (id) => {
13599
13599
  setActive((prev) => new Set(prev).add(id));
13600
13600
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -13608,7 +13608,7 @@ function ControlGrid({
13608
13608
  },
13609
13609
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
13610
13610
  );
13611
- const handleRelease = React106.useCallback(
13611
+ const handleRelease = React104.useCallback(
13612
13612
  (id) => {
13613
13613
  setActive((prev) => {
13614
13614
  const next = new Set(prev);
@@ -13866,7 +13866,7 @@ function InventoryGrid({
13866
13866
  const eventBus = useEventBus();
13867
13867
  const slotCount = totalSlots ?? items.length;
13868
13868
  const emptySlotCount = Math.max(0, slotCount - items.length);
13869
- const handleSelect = React106.useCallback(
13869
+ const handleSelect = React104.useCallback(
13870
13870
  (id) => {
13871
13871
  onSelect?.(id);
13872
13872
  if (selectEvent) {
@@ -14083,7 +14083,7 @@ function GameMenu({
14083
14083
  }) {
14084
14084
  const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
14085
14085
  const eventBus = useEventBus();
14086
- const handleOptionClick = React106.useCallback(
14086
+ const handleOptionClick = React104.useCallback(
14087
14087
  (option) => {
14088
14088
  if (option.event) {
14089
14089
  eventBus.emit(`UI:${option.event}`, { option });
@@ -16004,410 +16004,6 @@ var init_GameAudioToggle = __esm({
16004
16004
  GameAudioToggle.displayName = "GameAudioToggle";
16005
16005
  }
16006
16006
  });
16007
- function VisualNovelBoard({
16008
- entity,
16009
- nodes: propNodes,
16010
- currentNodeId: propCurrentNodeId,
16011
- assetManifest: propAssetManifest,
16012
- typewriterSpeed = 30,
16013
- portraitScale = 1,
16014
- chooseEvent,
16015
- advanceEvent,
16016
- restartEvent,
16017
- className
16018
- }) {
16019
- const board = boardEntity(entity) ?? {};
16020
- const eventBus = useEventBus();
16021
- const assetManifest = propAssetManifest ?? board.assetManifest;
16022
- const entityNodes = useMemo(
16023
- () => rows(board.nodes).map((r2) => ({
16024
- id: str(r2.id),
16025
- speaker: str(r2.speaker),
16026
- text: str(r2.text),
16027
- backgroundKey: r2.backgroundKey == null ? void 0 : str(r2.backgroundKey),
16028
- portraitKey: r2.portraitKey == null ? void 0 : str(r2.portraitKey),
16029
- choices: rows(r2.choices).map((c) => ({
16030
- label: str(c.label),
16031
- nextId: str(c.nextId)
16032
- }))
16033
- })),
16034
- [board.nodes]
16035
- );
16036
- const rawNodes = propNodes ?? entityNodes;
16037
- const nodes = rawNodes.length > 0 ? rawNodes : DEFAULT_NODES;
16038
- const currentNodeId = propCurrentNodeId ?? (str(board.currentNodeId) || nodes[0]?.id);
16039
- const currentNode = nodes.find((n) => n.id === currentNodeId) ?? nodes[0];
16040
- const backgroundImage = useMemo(
16041
- () => assetManifest?.backgrounds?.[currentNode?.backgroundKey ?? ""],
16042
- [assetManifest, currentNode?.backgroundKey]
16043
- );
16044
- const portraitAsset = useMemo(
16045
- () => assetManifest?.portraits?.[currentNode?.portraitKey ?? ""],
16046
- [assetManifest, currentNode?.portraitKey]
16047
- );
16048
- const [displayedText, setDisplayedText] = useState("");
16049
- const [isTyping, setIsTyping] = useState(false);
16050
- const textRef = useRef(currentNode?.text ?? "");
16051
- const charIndexRef = useRef(0);
16052
- useEffect(() => {
16053
- const fullText = currentNode?.text ?? "";
16054
- textRef.current = fullText;
16055
- charIndexRef.current = 0;
16056
- if (typewriterSpeed === 0) {
16057
- setDisplayedText(fullText);
16058
- setIsTyping(false);
16059
- } else {
16060
- setDisplayedText("");
16061
- setIsTyping(true);
16062
- }
16063
- }, [currentNode?.id, typewriterSpeed]);
16064
- useEffect(() => {
16065
- if (!isTyping || typewriterSpeed === 0) return;
16066
- const interval = setInterval(() => {
16067
- if (charIndexRef.current < textRef.current.length) {
16068
- charIndexRef.current++;
16069
- setDisplayedText(textRef.current.slice(0, charIndexRef.current));
16070
- } else {
16071
- setIsTyping(false);
16072
- clearInterval(interval);
16073
- }
16074
- }, typewriterSpeed);
16075
- return () => clearInterval(interval);
16076
- }, [isTyping, typewriterSpeed]);
16077
- const skipTypewriter = useCallback(() => {
16078
- if (isTyping) {
16079
- charIndexRef.current = textRef.current.length;
16080
- setDisplayedText(textRef.current);
16081
- setIsTyping(false);
16082
- }
16083
- }, [isTyping]);
16084
- const handleChoice = useCallback(
16085
- (index) => {
16086
- if (chooseEvent) {
16087
- eventBus.emit(`UI:${chooseEvent}`, { choiceIndex: index });
16088
- }
16089
- },
16090
- [chooseEvent, eventBus]
16091
- );
16092
- const handleAdvance = useCallback(() => {
16093
- if (advanceEvent) {
16094
- eventBus.emit(`UI:${advanceEvent}`, {});
16095
- }
16096
- }, [advanceEvent, eventBus]);
16097
- const handleRestart = useCallback(() => {
16098
- if (restartEvent) {
16099
- eventBus.emit(`UI:${restartEvent}`, {});
16100
- }
16101
- }, [restartEvent, eventBus]);
16102
- const handleContainerClick = useCallback(() => {
16103
- if (isTyping) {
16104
- skipTypewriter();
16105
- } else if (!currentNode?.choices?.length) {
16106
- handleAdvance();
16107
- }
16108
- }, [isTyping, skipTypewriter, currentNode?.choices, handleAdvance]);
16109
- if (!currentNode) {
16110
- return /* @__PURE__ */ jsxs(VStack, { className: cn("visual-novel-board relative min-h-[600px] bg-background items-center justify-center", className), gap: "lg", children: [
16111
- /* @__PURE__ */ jsx(Typography, { variant: "h3", color: "muted", children: "No dialogue nodes" }),
16112
- /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleRestart, children: "Restart" })
16113
- ] });
16114
- }
16115
- return /* @__PURE__ */ jsxs(
16116
- Box,
16117
- {
16118
- className: cn("visual-novel-board relative min-h-[600px] bg-background overflow-hidden", className),
16119
- onClick: handleContainerClick,
16120
- children: [
16121
- backgroundImage && /* @__PURE__ */ jsx(
16122
- "div",
16123
- {
16124
- className: "absolute inset-0 z-0 bg-center bg-cover bg-no-repeat",
16125
- style: { backgroundImage: `url(${backgroundImage.url})` },
16126
- "aria-hidden": "true"
16127
- }
16128
- ),
16129
- portraitAsset && /* @__PURE__ */ jsx(
16130
- "div",
16131
- {
16132
- className: "absolute left-1/2 -translate-x-1/2 bottom-0 z-10 pointer-events-none flex items-end",
16133
- style: { height: `${60 * portraitScale}vh` },
16134
- children: /* @__PURE__ */ jsx(
16135
- "img",
16136
- {
16137
- src: portraitAsset.url,
16138
- alt: currentNode.speaker,
16139
- className: "h-full w-auto object-contain drop-shadow-2xl"
16140
- }
16141
- )
16142
- }
16143
- ),
16144
- /* @__PURE__ */ jsx("div", { className: "absolute left-0 right-0 bottom-0 z-20 mx-4 mb-4", children: /* @__PURE__ */ jsxs("div", { className: cn(
16145
- "rounded-container border-2 overflow-hidden",
16146
- backgroundImage ? "bg-black/80 backdrop-blur-sm border-white/20" : "bg-card/95 border-border"
16147
- ), children: [
16148
- /* @__PURE__ */ jsx(
16149
- DialogueBubble,
16150
- {
16151
- speaker: currentNode.speaker,
16152
- text: displayedText + (isTyping ? "\u258C" : ""),
16153
- portrait: portraitAsset,
16154
- position: "bottom",
16155
- className: "border-0 rounded-none bg-transparent backdrop-blur-none"
16156
- }
16157
- ),
16158
- !isTyping && (currentNode.choices?.length ?? 0) > 0 && /* @__PURE__ */ jsx("div", { className: "px-4 pb-4 space-y-2", onClick: (e) => e.stopPropagation(), children: currentNode.choices.map((choice, index) => /* @__PURE__ */ jsx(
16159
- ChoiceButton,
16160
- {
16161
- text: choice.label,
16162
- index: index + 1,
16163
- onClick: () => handleChoice(index)
16164
- },
16165
- choice.nextId
16166
- )) }),
16167
- !isTyping && !currentNode.choices?.length && /* @__PURE__ */ jsx("div", { className: "px-4 pb-3 text-muted-foreground text-sm animate-pulse", children: "Press click to continue..." })
16168
- ] }) })
16169
- ]
16170
- }
16171
- );
16172
- }
16173
- var DEFAULT_NODES;
16174
- var init_VisualNovelBoard = __esm({
16175
- "components/game/2d/organisms/VisualNovelBoard.tsx"() {
16176
- "use client";
16177
- init_cn();
16178
- init_useEventBus();
16179
- init_Box();
16180
- init_Typography();
16181
- init_Stack();
16182
- init_Button();
16183
- init_DialogueBubble();
16184
- init_ChoiceButton();
16185
- init_boardEntity();
16186
- DEFAULT_NODES = [
16187
- {
16188
- id: "start",
16189
- speaker: "Narrator",
16190
- text: "The corridor stretches into shadow. A lone sentinel blocks your path.",
16191
- backgroundKey: "corridor",
16192
- portraitKey: "guide",
16193
- choices: [
16194
- { label: "Approach the sentinel.", nextId: "meet" },
16195
- { label: "Turn back.", nextId: "retreat" }
16196
- ]
16197
- },
16198
- {
16199
- id: "meet",
16200
- speaker: "Sentinel",
16201
- text: "You carry the old marks. Speak your purpose, traveler.",
16202
- backgroundKey: "forge",
16203
- portraitKey: "rival",
16204
- choices: [
16205
- { label: "I seek the core.", nextId: "end" },
16206
- { label: "I am only passing through.", nextId: "retreat" }
16207
- ]
16208
- },
16209
- {
16210
- id: "retreat",
16211
- speaker: "Narrator",
16212
- text: "You withdraw into the dark. The path will wait for braver feet.",
16213
- backgroundKey: "corridor",
16214
- choices: [{ label: "Begin again.", nextId: "start" }]
16215
- },
16216
- {
16217
- id: "end",
16218
- speaker: "Sentinel",
16219
- text: "Then the way is open. Walk it well.",
16220
- backgroundKey: "core",
16221
- portraitKey: "rival",
16222
- choices: [{ label: "Begin again.", nextId: "start" }]
16223
- }
16224
- ];
16225
- VisualNovelBoard.displayName = "VisualNovelBoard";
16226
- }
16227
- });
16228
- function rowToCard(r2) {
16229
- return {
16230
- id: str(r2.id),
16231
- iconKey: r2.iconKey == null ? void 0 : str(r2.iconKey),
16232
- title: r2.title == null ? void 0 : str(r2.title),
16233
- cost: r2.cost == null ? void 0 : num(r2.cost),
16234
- attack: r2.attack == null ? void 0 : num(r2.attack),
16235
- defense: r2.defense == null ? void 0 : num(r2.defense)
16236
- };
16237
- }
16238
- function resolveCardArt(card, manifest) {
16239
- const key = card.iconKey ?? card.id;
16240
- return manifest?.cards?.[key];
16241
- }
16242
- function CardBattlerBoard({
16243
- entity,
16244
- deck: propDeck,
16245
- hand: propHand,
16246
- board: propBoard,
16247
- mana: propMana,
16248
- maxMana: propMaxMana,
16249
- turn: propTurn,
16250
- result: propResult,
16251
- assetManifest: propAssetManifest,
16252
- playCardEvent,
16253
- endTurnEvent,
16254
- playAgainEvent,
16255
- gameEndEvent,
16256
- className
16257
- }) {
16258
- const board = boardEntity(entity) ?? {};
16259
- const eventBus = useEventBus();
16260
- const { t } = useTranslate();
16261
- const assetManifest = propAssetManifest ?? board.assetManifest;
16262
- const entityHand = useMemo(() => rows(board.hand).map(rowToCard), [board.hand]);
16263
- const rawHand = propHand ?? entityHand;
16264
- const hand = rawHand.length > 0 ? rawHand : DEFAULT_HAND;
16265
- const entityBoard = useMemo(() => rows(board.board).map(rowToCard), [board.board]);
16266
- const playedCards = propBoard ?? entityBoard;
16267
- const entityDeck = useMemo(() => rows(board.deck).map(rowToCard), [board.deck]);
16268
- const deck = propDeck ?? entityDeck;
16269
- const mana = propMana ?? num(board.mana, 3);
16270
- const maxMana = propMaxMana ?? num(board.maxMana, 3);
16271
- const turn = propTurn ?? num(board.turn, 1);
16272
- const result = propResult ?? (str(board.result) || "none");
16273
- const handCards = hand;
16274
- const boardCards = playedCards;
16275
- const emittedGameEnd = useRef(false);
16276
- if (result !== "none" && !emittedGameEnd.current) {
16277
- emittedGameEnd.current = true;
16278
- if (gameEndEvent) {
16279
- eventBus.emit(`UI:${gameEndEvent}`, { result });
16280
- }
16281
- }
16282
- if (result === "none") {
16283
- emittedGameEnd.current = false;
16284
- }
16285
- const handlePlayCard = useCallback((cardId) => {
16286
- if (result !== "none") return;
16287
- if (playCardEvent) {
16288
- eventBus.emit(`UI:${playCardEvent}`, { cardId });
16289
- }
16290
- }, [result, playCardEvent, eventBus]);
16291
- const handleEndTurn = useCallback(() => {
16292
- if (result !== "none") return;
16293
- if (endTurnEvent) {
16294
- eventBus.emit(`UI:${endTurnEvent}`, {});
16295
- }
16296
- }, [result, endTurnEvent, eventBus]);
16297
- const handlePlayAgain = useCallback(() => {
16298
- if (playAgainEvent) {
16299
- eventBus.emit(`UI:${playAgainEvent}`, {});
16300
- }
16301
- }, [playAgainEvent, eventBus]);
16302
- return /* @__PURE__ */ jsxs(VStack, { className: cn("card-battler-board relative min-h-[600px] bg-background", className), gap: "none", children: [
16303
- /* @__PURE__ */ jsxs(
16304
- HStack,
16305
- {
16306
- className: "px-4 py-2 border-b border-border bg-surface",
16307
- gap: "lg",
16308
- align: "center",
16309
- children: [
16310
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
16311
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("cb.mana") ?? "Mana" }),
16312
- /* @__PURE__ */ jsxs(Typography, { variant: "body2", weight: "bold", className: "text-info", children: [
16313
- mana,
16314
- " / ",
16315
- maxMana
16316
- ] })
16317
- ] }),
16318
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
16319
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("cb.turn") ?? "Turn" }),
16320
- /* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "bold", children: turn })
16321
- ] }),
16322
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
16323
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("cb.deck") ?? "Deck" }),
16324
- /* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "bold", children: deck.length })
16325
- ] }),
16326
- /* @__PURE__ */ jsx(Box, { className: "ml-auto", children: result === "none" && /* @__PURE__ */ jsx(Button, { variant: "primary", size: "sm", onClick: handleEndTurn, children: t("cb.endTurn") ?? "End Turn" }) })
16327
- ]
16328
- }
16329
- ),
16330
- /* @__PURE__ */ jsxs(Box, { className: "flex-1 relative p-4 overflow-auto", children: [
16331
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mb-2 uppercase tracking-wide", children: t("cb.battlefield") ?? "Battlefield" }),
16332
- boardCards.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 items-end justify-start", children: boardCards.map((card) => /* @__PURE__ */ jsx(
16333
- GameCard,
16334
- {
16335
- id: card.id,
16336
- cost: card.cost,
16337
- art: resolveCardArt(card, assetManifest),
16338
- attack: card.attack,
16339
- defense: card.defense,
16340
- name: card.title,
16341
- disabled: card.cost != null && card.cost > mana,
16342
- size: "md"
16343
- },
16344
- card.id
16345
- )) }) : /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-32 rounded-interactive border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("cb.emptyBoard") ?? "Play a card to begin" }) })
16346
- ] }),
16347
- /* @__PURE__ */ jsxs(Box, { className: "border-t border-border bg-surface px-4 py-3", children: [
16348
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mb-2 uppercase tracking-wide", children: t("cb.hand") ?? "Your Hand" }),
16349
- handCards.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-4", children: /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("cb.emptyHand") ?? "No cards in hand" }) }) : /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 items-end justify-center", children: handCards.map((card) => /* @__PURE__ */ jsx(
16350
- GameCard,
16351
- {
16352
- id: card.id,
16353
- cost: card.cost,
16354
- art: resolveCardArt(card, assetManifest),
16355
- attack: card.attack,
16356
- defense: card.defense,
16357
- name: card.title,
16358
- disabled: card.cost != null && card.cost > mana,
16359
- size: "lg",
16360
- onClick: handlePlayCard
16361
- },
16362
- card.id
16363
- )) })
16364
- ] }),
16365
- result !== "none" && /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/70 backdrop-blur-sm", children: /* @__PURE__ */ jsxs(VStack, { className: "text-center p-8", gap: "lg", children: [
16366
- /* @__PURE__ */ jsx(
16367
- Typography,
16368
- {
16369
- variant: "h2",
16370
- className: cn(
16371
- "text-4xl font-black tracking-widest uppercase",
16372
- result === "won" ? "text-warning" : "text-error"
16373
- ),
16374
- children: result === "won" ? t("cb.victory") ?? "Victory!" : t("cb.defeat") ?? "Defeat!"
16375
- }
16376
- ),
16377
- /* @__PURE__ */ jsx(
16378
- Button,
16379
- {
16380
- variant: "primary",
16381
- className: "px-8 py-3 font-semibold",
16382
- onClick: handlePlayAgain,
16383
- children: t("cb.playAgain") ?? "Play Again"
16384
- }
16385
- )
16386
- ] }) })
16387
- ] });
16388
- }
16389
- var DEFAULT_HAND;
16390
- var init_CardBattlerBoard = __esm({
16391
- "components/game/2d/organisms/CardBattlerBoard.tsx"() {
16392
- "use client";
16393
- init_cn();
16394
- init_useEventBus();
16395
- init_Box();
16396
- init_Button();
16397
- init_Typography();
16398
- init_Stack();
16399
- init_GameCard();
16400
- init_boardEntity();
16401
- DEFAULT_HAND = [
16402
- { id: "c1", iconKey: "bear", title: "Bear", cost: 3, attack: 5, defense: 4 },
16403
- { id: "c2", iconKey: "owl", title: "Owl", cost: 1, attack: 2, defense: 1 },
16404
- { id: "c3", iconKey: "gorilla", title: "Gorilla", cost: 4, attack: 6, defense: 5 },
16405
- { id: "c4", iconKey: "frog", title: "Frog", cost: 1, attack: 1, defense: 2 },
16406
- { id: "c5", iconKey: "snake", title: "Snake", cost: 2, attack: 4, defense: 1 }
16407
- ];
16408
- CardBattlerBoard.displayName = "CardBattlerBoard";
16409
- }
16410
- });
16411
16007
  function LinearView({
16412
16008
  trait,
16413
16009
  size = "md",
@@ -16419,7 +16015,7 @@ function LinearView({
16419
16015
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
16420
16016
  const isDone = i < currentIdx;
16421
16017
  const isCurrent = i === currentIdx;
16422
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
16018
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
16423
16019
  i > 0 && /* @__PURE__ */ jsx(
16424
16020
  Typography,
16425
16021
  {
@@ -16947,7 +16543,7 @@ function SequenceBar({
16947
16543
  onSlotRemove(index);
16948
16544
  }, [onSlotRemove, playing]);
16949
16545
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
16950
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
16546
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
16951
16547
  i > 0 && /* @__PURE__ */ jsx(
16952
16548
  Typography,
16953
16549
  {
@@ -19948,7 +19544,7 @@ var init_ErrorBoundary = __esm({
19948
19544
  }
19949
19545
  );
19950
19546
  };
19951
- ErrorBoundary = class extends React106__default.Component {
19547
+ ErrorBoundary = class extends React104__default.Component {
19952
19548
  constructor(props) {
19953
19549
  super(props);
19954
19550
  __publicField(this, "reset", () => {
@@ -20230,7 +19826,7 @@ var init_Container = __esm({
20230
19826
  as: Component = "div"
20231
19827
  }) => {
20232
19828
  const resolvedSize = maxWidth ?? size ?? "lg";
20233
- return React106__default.createElement(
19829
+ return React104__default.createElement(
20234
19830
  Component,
20235
19831
  {
20236
19832
  className: cn(
@@ -22071,7 +21667,7 @@ var init_CodeBlock = __esm({
22071
21667
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
22072
21668
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
22073
21669
  HIDDEN_LINE_NUMBERS = { display: "none" };
22074
- CodeBlock = React106__default.memo(
21670
+ CodeBlock = React104__default.memo(
22075
21671
  ({
22076
21672
  code: rawCode,
22077
21673
  language = "text",
@@ -22658,7 +22254,7 @@ var init_MarkdownContent = __esm({
22658
22254
  init_Box();
22659
22255
  init_CodeBlock();
22660
22256
  init_cn();
22661
- MarkdownContent = React106__default.memo(
22257
+ MarkdownContent = React104__default.memo(
22662
22258
  ({ content, direction = "ltr", className }) => {
22663
22259
  const { t: _t } = useTranslate();
22664
22260
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -23985,7 +23581,7 @@ var init_StateMachineView = __esm({
23985
23581
  style: { top: title ? 30 : 0 },
23986
23582
  children: [
23987
23583
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
23988
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React106__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
23584
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React104__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
23989
23585
  StateNode2,
23990
23586
  {
23991
23587
  state,
@@ -29623,8 +29219,8 @@ var init_Menu = __esm({
29623
29219
  "bottom-end": "bottom-start"
29624
29220
  };
29625
29221
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
29626
- const triggerChild = React106__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
29627
- const triggerElement = React106__default.cloneElement(
29222
+ const triggerChild = React104__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
29223
+ const triggerElement = React104__default.cloneElement(
29628
29224
  triggerChild,
29629
29225
  {
29630
29226
  ref: triggerRef,
@@ -29719,14 +29315,14 @@ function useDataDnd(args) {
29719
29315
  const isZone = Boolean(dragGroup || accepts || sortable);
29720
29316
  const enabled = isZone || Boolean(dndRoot);
29721
29317
  const eventBus = useEventBus();
29722
- const parentRoot = React106__default.useContext(RootCtx);
29318
+ const parentRoot = React104__default.useContext(RootCtx);
29723
29319
  const isRoot = enabled && parentRoot === null;
29724
- const zoneId = React106__default.useId();
29320
+ const zoneId = React104__default.useId();
29725
29321
  const ownGroup = dragGroup ?? accepts ?? zoneId;
29726
- const [optimisticOrders, setOptimisticOrders] = React106__default.useState(() => /* @__PURE__ */ new Map());
29727
- const optimisticOrdersRef = React106__default.useRef(optimisticOrders);
29322
+ const [optimisticOrders, setOptimisticOrders] = React104__default.useState(() => /* @__PURE__ */ new Map());
29323
+ const optimisticOrdersRef = React104__default.useRef(optimisticOrders);
29728
29324
  optimisticOrdersRef.current = optimisticOrders;
29729
- const clearOptimisticOrder = React106__default.useCallback((group) => {
29325
+ const clearOptimisticOrder = React104__default.useCallback((group) => {
29730
29326
  setOptimisticOrders((prev) => {
29731
29327
  if (!prev.has(group)) return prev;
29732
29328
  const next = new Map(prev);
@@ -29751,7 +29347,7 @@ function useDataDnd(args) {
29751
29347
  const raw = it[dndItemIdField];
29752
29348
  return raw != null ? String(raw) : `__idx_${idx}`;
29753
29349
  }).join("|");
29754
- const itemIds = React106__default.useMemo(
29350
+ const itemIds = React104__default.useMemo(
29755
29351
  () => orderedItems.map((it, idx) => {
29756
29352
  const raw = it[dndItemIdField];
29757
29353
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -29762,7 +29358,7 @@ function useDataDnd(args) {
29762
29358
  const raw = it[dndItemIdField];
29763
29359
  return raw != null ? String(raw) : `__${idx}`;
29764
29360
  }).join("|");
29765
- React106__default.useEffect(() => {
29361
+ React104__default.useEffect(() => {
29766
29362
  const root = isRoot ? null : parentRoot;
29767
29363
  if (root) {
29768
29364
  root.clearOptimisticOrder(ownGroup);
@@ -29770,20 +29366,20 @@ function useDataDnd(args) {
29770
29366
  clearOptimisticOrder(ownGroup);
29771
29367
  }
29772
29368
  }, [itemsContentSig, ownGroup]);
29773
- const zonesRef = React106__default.useRef(/* @__PURE__ */ new Map());
29774
- const registerZone = React106__default.useCallback((zoneId2, meta2) => {
29369
+ const zonesRef = React104__default.useRef(/* @__PURE__ */ new Map());
29370
+ const registerZone = React104__default.useCallback((zoneId2, meta2) => {
29775
29371
  zonesRef.current.set(zoneId2, meta2);
29776
29372
  }, []);
29777
- const unregisterZone = React106__default.useCallback((zoneId2) => {
29373
+ const unregisterZone = React104__default.useCallback((zoneId2) => {
29778
29374
  zonesRef.current.delete(zoneId2);
29779
29375
  }, []);
29780
- const [activeDrag, setActiveDrag] = React106__default.useState(null);
29781
- const [overZoneGroup, setOverZoneGroup] = React106__default.useState(null);
29782
- const meta = React106__default.useMemo(
29376
+ const [activeDrag, setActiveDrag] = React104__default.useState(null);
29377
+ const [overZoneGroup, setOverZoneGroup] = React104__default.useState(null);
29378
+ const meta = React104__default.useMemo(
29783
29379
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
29784
29380
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
29785
29381
  );
29786
- React106__default.useEffect(() => {
29382
+ React104__default.useEffect(() => {
29787
29383
  const target = isRoot ? null : parentRoot;
29788
29384
  if (!target) {
29789
29385
  zonesRef.current.set(zoneId, meta);
@@ -29802,7 +29398,7 @@ function useDataDnd(args) {
29802
29398
  }, [parentRoot, isRoot, zoneId, meta]);
29803
29399
  const sensors = useAlmadarDndSensors(true);
29804
29400
  const collisionDetection = almadarDndCollisionDetection;
29805
- const findZoneByItem = React106__default.useCallback(
29401
+ const findZoneByItem = React104__default.useCallback(
29806
29402
  (id) => {
29807
29403
  for (const z of zonesRef.current.values()) {
29808
29404
  if (z.itemIds.includes(id)) return z;
@@ -29811,7 +29407,7 @@ function useDataDnd(args) {
29811
29407
  },
29812
29408
  []
29813
29409
  );
29814
- React106__default.useCallback(
29410
+ React104__default.useCallback(
29815
29411
  (group) => {
29816
29412
  for (const z of zonesRef.current.values()) {
29817
29413
  if (z.group === group) return z;
@@ -29820,7 +29416,7 @@ function useDataDnd(args) {
29820
29416
  },
29821
29417
  []
29822
29418
  );
29823
- const handleDragEnd = React106__default.useCallback(
29419
+ const handleDragEnd = React104__default.useCallback(
29824
29420
  (event) => {
29825
29421
  const { active, over } = event;
29826
29422
  const activeIdStr = String(active.id);
@@ -29911,8 +29507,8 @@ function useDataDnd(args) {
29911
29507
  },
29912
29508
  [eventBus]
29913
29509
  );
29914
- const sortableData = React106__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
29915
- const SortableItem = React106__default.useCallback(
29510
+ const sortableData = React104__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
29511
+ const SortableItem = React104__default.useCallback(
29916
29512
  ({ id, children }) => {
29917
29513
  const {
29918
29514
  attributes,
@@ -29952,7 +29548,7 @@ function useDataDnd(args) {
29952
29548
  id: droppableId,
29953
29549
  data: sortableData
29954
29550
  });
29955
- const ctx = React106__default.useContext(RootCtx);
29551
+ const ctx = React104__default.useContext(RootCtx);
29956
29552
  const activeDrag2 = ctx?.activeDrag ?? null;
29957
29553
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
29958
29554
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -29967,7 +29563,7 @@ function useDataDnd(args) {
29967
29563
  showForeignPlaceholder,
29968
29564
  ctxAvailable: ctx != null
29969
29565
  });
29970
- React106__default.useEffect(() => {
29566
+ React104__default.useEffect(() => {
29971
29567
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
29972
29568
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
29973
29569
  return /* @__PURE__ */ jsx(
@@ -29981,11 +29577,11 @@ function useDataDnd(args) {
29981
29577
  }
29982
29578
  );
29983
29579
  };
29984
- const rootContextValue = React106__default.useMemo(
29580
+ const rootContextValue = React104__default.useMemo(
29985
29581
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
29986
29582
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
29987
29583
  );
29988
- const handleDragStart = React106__default.useCallback((event) => {
29584
+ const handleDragStart = React104__default.useCallback((event) => {
29989
29585
  const sourceZone = findZoneByItem(event.active.id);
29990
29586
  const rect = event.active.rect.current.initial;
29991
29587
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -30004,7 +29600,7 @@ function useDataDnd(args) {
30004
29600
  isRoot
30005
29601
  });
30006
29602
  }, [findZoneByItem, isRoot, zoneId]);
30007
- const handleDragOver = React106__default.useCallback((event) => {
29603
+ const handleDragOver = React104__default.useCallback((event) => {
30008
29604
  const { active, over } = event;
30009
29605
  const overData = over?.data?.current;
30010
29606
  const overGroup = overData?.dndGroup ?? null;
@@ -30074,7 +29670,7 @@ function useDataDnd(args) {
30074
29670
  return next;
30075
29671
  });
30076
29672
  }, []);
30077
- const handleDragCancel = React106__default.useCallback((event) => {
29673
+ const handleDragCancel = React104__default.useCallback((event) => {
30078
29674
  setActiveDrag(null);
30079
29675
  setOverZoneGroup(null);
30080
29676
  dndLog.warn("dragCancel", {
@@ -30082,12 +29678,12 @@ function useDataDnd(args) {
30082
29678
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
30083
29679
  });
30084
29680
  }, []);
30085
- const handleDragEndWithCleanup = React106__default.useCallback((event) => {
29681
+ const handleDragEndWithCleanup = React104__default.useCallback((event) => {
30086
29682
  handleDragEnd(event);
30087
29683
  setActiveDrag(null);
30088
29684
  setOverZoneGroup(null);
30089
29685
  }, [handleDragEnd]);
30090
- const wrapContainer = React106__default.useCallback(
29686
+ const wrapContainer = React104__default.useCallback(
30091
29687
  (children) => {
30092
29688
  if (!enabled) return children;
30093
29689
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -30141,7 +29737,7 @@ var init_useDataDnd = __esm({
30141
29737
  init_useAlmadarDndCollision();
30142
29738
  init_Box();
30143
29739
  dndLog = createLogger("almadar:ui:dnd");
30144
- RootCtx = React106__default.createContext(null);
29740
+ RootCtx = React104__default.createContext(null);
30145
29741
  }
30146
29742
  });
30147
29743
  function renderIconInput(icon, props) {
@@ -30667,7 +30263,7 @@ function DataList({
30667
30263
  }) {
30668
30264
  const eventBus = useEventBus();
30669
30265
  const { t } = useTranslate();
30670
- const [visibleCount, setVisibleCount] = React106__default.useState(pageSize || Infinity);
30266
+ const [visibleCount, setVisibleCount] = React104__default.useState(pageSize || Infinity);
30671
30267
  const fieldDefs = fields ?? columns ?? [];
30672
30268
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
30673
30269
  const dnd = useDataDnd({
@@ -30686,7 +30282,7 @@ function DataList({
30686
30282
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
30687
30283
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
30688
30284
  const hasRenderProp = typeof children === "function";
30689
- React106__default.useEffect(() => {
30285
+ React104__default.useEffect(() => {
30690
30286
  const renderItemTypeOf = typeof schemaRenderItem;
30691
30287
  const childrenTypeOf = typeof children;
30692
30288
  if (data.length > 0 && !hasRenderProp) {
@@ -30790,7 +30386,7 @@ function DataList({
30790
30386
  const items2 = [...data];
30791
30387
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
30792
30388
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
30793
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
30389
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
30794
30390
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
30795
30391
  group.items.map((itemData, index) => {
30796
30392
  const id = itemData.id || `${gi}-${index}`;
@@ -30931,7 +30527,7 @@ function DataList({
30931
30527
  className
30932
30528
  ),
30933
30529
  children: [
30934
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
30530
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
30935
30531
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
30936
30532
  group.items.map(
30937
30533
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -31016,7 +30612,7 @@ var init_FormSection = __esm({
31016
30612
  columns = 1,
31017
30613
  className
31018
30614
  }) => {
31019
- const [collapsed, setCollapsed] = React106__default.useState(defaultCollapsed);
30615
+ const [collapsed, setCollapsed] = React104__default.useState(defaultCollapsed);
31020
30616
  const { t } = useTranslate();
31021
30617
  const eventBus = useEventBus();
31022
30618
  const gridClass = {
@@ -31024,7 +30620,7 @@ var init_FormSection = __esm({
31024
30620
  2: "grid-cols-1 md:grid-cols-2",
31025
30621
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
31026
30622
  }[columns];
31027
- React106__default.useCallback(() => {
30623
+ React104__default.useCallback(() => {
31028
30624
  if (collapsible) {
31029
30625
  setCollapsed((prev) => !prev);
31030
30626
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -31974,7 +31570,7 @@ var init_Flex = __esm({
31974
31570
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
31975
31571
  }
31976
31572
  }
31977
- return React106__default.createElement(Component, {
31573
+ return React104__default.createElement(Component, {
31978
31574
  className: cn(
31979
31575
  inline ? "inline-flex" : "flex",
31980
31576
  directionStyles[direction],
@@ -32093,7 +31689,7 @@ var init_Grid = __esm({
32093
31689
  as: Component = "div"
32094
31690
  }) => {
32095
31691
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
32096
- return React106__default.createElement(
31692
+ return React104__default.createElement(
32097
31693
  Component,
32098
31694
  {
32099
31695
  className: cn(
@@ -32289,9 +31885,9 @@ var init_Popover = __esm({
32289
31885
  onMouseLeave: handleClose,
32290
31886
  onPointerDown: tapTriggerProps.onPointerDown
32291
31887
  };
32292
- const childElement = React106__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
31888
+ const childElement = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
32293
31889
  const childPointerDown = childElement.props.onPointerDown;
32294
- const triggerElement = React106__default.cloneElement(
31890
+ const triggerElement = React104__default.cloneElement(
32295
31891
  childElement,
32296
31892
  {
32297
31893
  ref: triggerRef,
@@ -32893,9 +32489,9 @@ var init_Tooltip = __esm({
32893
32489
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
32894
32490
  };
32895
32491
  }, []);
32896
- const triggerElement = React106__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
32492
+ const triggerElement = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
32897
32493
  const childPointerDown = triggerElement.props.onPointerDown;
32898
- const trigger = React106__default.cloneElement(triggerElement, {
32494
+ const trigger = React104__default.cloneElement(triggerElement, {
32899
32495
  ref: triggerRef,
32900
32496
  onMouseEnter: handleMouseEnter,
32901
32497
  onMouseLeave: handleMouseLeave,
@@ -32985,7 +32581,7 @@ var init_WizardProgress = __esm({
32985
32581
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
32986
32582
  const isActive = index === currentStep;
32987
32583
  const isCompleted = index < currentStep;
32988
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
32584
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
32989
32585
  /* @__PURE__ */ jsx(
32990
32586
  "button",
32991
32587
  {
@@ -34545,13 +34141,13 @@ var init_MapView = __esm({
34545
34141
  shadowSize: [41, 41]
34546
34142
  });
34547
34143
  L.Marker.prototype.options.icon = defaultIcon;
34548
- const { useEffect: useEffect73, useRef: useRef71, useCallback: useCallback109, useState: useState108 } = React106__default;
34144
+ const { useEffect: useEffect72, useRef: useRef69, useCallback: useCallback107, useState: useState107 } = React104__default;
34549
34145
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
34550
34146
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
34551
34147
  function MapUpdater({ centerLat, centerLng, zoom }) {
34552
34148
  const map = useMap();
34553
- const prevRef = useRef71({ centerLat, centerLng, zoom });
34554
- useEffect73(() => {
34149
+ const prevRef = useRef69({ centerLat, centerLng, zoom });
34150
+ useEffect72(() => {
34555
34151
  const prev = prevRef.current;
34556
34152
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
34557
34153
  map.setView([centerLat, centerLng], zoom);
@@ -34562,7 +34158,7 @@ var init_MapView = __esm({
34562
34158
  }
34563
34159
  function MapClickHandler({ onMapClick }) {
34564
34160
  const map = useMap();
34565
- useEffect73(() => {
34161
+ useEffect72(() => {
34566
34162
  if (!onMapClick) return;
34567
34163
  const handler = (e) => {
34568
34164
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -34590,8 +34186,8 @@ var init_MapView = __esm({
34590
34186
  showAttribution = true
34591
34187
  }) {
34592
34188
  const eventBus = useEventBus2();
34593
- const [clickedPosition, setClickedPosition] = useState108(null);
34594
- const handleMapClick = useCallback109((lat, lng) => {
34189
+ const [clickedPosition, setClickedPosition] = useState107(null);
34190
+ const handleMapClick = useCallback107((lat, lng) => {
34595
34191
  if (showClickedPin) {
34596
34192
  setClickedPosition({ lat, lng });
34597
34193
  }
@@ -34600,7 +34196,7 @@ var init_MapView = __esm({
34600
34196
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
34601
34197
  }
34602
34198
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
34603
- const handleMarkerClick = useCallback109((marker) => {
34199
+ const handleMarkerClick = useCallback107((marker) => {
34604
34200
  onMarkerClick?.(marker);
34605
34201
  if (markerClickEvent) {
34606
34202
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -35460,8 +35056,8 @@ function TableView({
35460
35056
  }) {
35461
35057
  const eventBus = useEventBus();
35462
35058
  const { t } = useTranslate();
35463
- const [visibleCount, setVisibleCount] = React106__default.useState(pageSize > 0 ? pageSize : Infinity);
35464
- const [localSelected, setLocalSelected] = React106__default.useState(/* @__PURE__ */ new Set());
35059
+ const [visibleCount, setVisibleCount] = React104__default.useState(pageSize > 0 ? pageSize : Infinity);
35060
+ const [localSelected, setLocalSelected] = React104__default.useState(/* @__PURE__ */ new Set());
35465
35061
  const colDefs = columns ?? fields ?? [];
35466
35062
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
35467
35063
  const dnd = useDataDnd({
@@ -35656,12 +35252,12 @@ function TableView({
35656
35252
  ]
35657
35253
  }
35658
35254
  );
35659
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React106__default.Fragment, { children: rowInner }, id);
35255
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React104__default.Fragment, { children: rowInner }, id);
35660
35256
  };
35661
35257
  const items = Array.from(data);
35662
35258
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
35663
35259
  let runningIndex = 0;
35664
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
35260
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
35665
35261
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
35666
35262
  group.items.map((row) => renderRow(row, runningIndex++))
35667
35263
  ] }, gi)) });
@@ -37018,7 +36614,7 @@ var init_StepFlow = __esm({
37018
36614
  className
37019
36615
  }) => {
37020
36616
  if (orientation === "vertical") {
37021
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React106__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
36617
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React104__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
37022
36618
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
37023
36619
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
37024
36620
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -37029,7 +36625,7 @@ var init_StepFlow = __esm({
37029
36625
  ] })
37030
36626
  ] }) }, index)) });
37031
36627
  }
37032
- return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
36628
+ return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
37033
36629
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
37034
36630
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
37035
36631
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -38014,7 +37610,7 @@ var init_LikertScale = __esm({
38014
37610
  md: "text-base",
38015
37611
  lg: "text-lg"
38016
37612
  };
38017
- LikertScale = React106__default.forwardRef(
37613
+ LikertScale = React104__default.forwardRef(
38018
37614
  ({
38019
37615
  question,
38020
37616
  options = DEFAULT_LIKERT_OPTIONS,
@@ -38026,7 +37622,7 @@ var init_LikertScale = __esm({
38026
37622
  variant = "radios",
38027
37623
  className
38028
37624
  }, ref) => {
38029
- const groupId = React106__default.useId();
37625
+ const groupId = React104__default.useId();
38030
37626
  const eventBus = useEventBus();
38031
37627
  const handleSelect = useCallback(
38032
37628
  (next) => {
@@ -40308,7 +39904,7 @@ var init_DocBreadcrumb = __esm({
40308
39904
  "aria-label": t("aria.breadcrumb"),
40309
39905
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
40310
39906
  const isLast = idx === items.length - 1;
40311
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
39907
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
40312
39908
  idx > 0 && /* @__PURE__ */ jsx(
40313
39909
  Icon,
40314
39910
  {
@@ -40972,7 +40568,7 @@ var init_PageHeader = __esm({
40972
40568
  info: "bg-info/10 text-info"
40973
40569
  };
40974
40570
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
40975
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
40571
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
40976
40572
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
40977
40573
  crumb.href ? /* @__PURE__ */ jsx(
40978
40574
  "a",
@@ -41330,7 +40926,7 @@ var init_Section = __esm({
41330
40926
  as: Component = "section"
41331
40927
  }) => {
41332
40928
  const hasHeader = title || description || action;
41333
- return React106__default.createElement(
40929
+ return React104__default.createElement(
41334
40930
  Component,
41335
40931
  {
41336
40932
  className: cn(
@@ -41704,7 +41300,7 @@ var init_WizardContainer = __esm({
41704
41300
  const isCompleted = index < currentStep;
41705
41301
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
41706
41302
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
41707
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
41303
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
41708
41304
  /* @__PURE__ */ jsx(
41709
41305
  Button,
41710
41306
  {
@@ -44137,7 +43733,7 @@ var init_DetailPanel = __esm({
44137
43733
  }
44138
43734
  });
44139
43735
  function extractTitle(children) {
44140
- if (!React106__default.isValidElement(children)) return void 0;
43736
+ if (!React104__default.isValidElement(children)) return void 0;
44141
43737
  const props = children.props;
44142
43738
  if (typeof props.title === "string") {
44143
43739
  return props.title;
@@ -44487,12 +44083,12 @@ var init_Form = __esm({
44487
44083
  const isSchemaEntity = isOrbitalEntitySchema(entity);
44488
44084
  const resolvedEntity = isSchemaEntity ? entity : void 0;
44489
44085
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
44490
- const normalizedInitialData = React106__default.useMemo(() => {
44086
+ const normalizedInitialData = React104__default.useMemo(() => {
44491
44087
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
44492
44088
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
44493
44089
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
44494
44090
  }, [entity, initialData]);
44495
- const entityDerivedFields = React106__default.useMemo(() => {
44091
+ const entityDerivedFields = React104__default.useMemo(() => {
44496
44092
  if (fields && fields.length > 0) return void 0;
44497
44093
  if (!resolvedEntity) return void 0;
44498
44094
  return resolvedEntity.fields.map(
@@ -44513,16 +44109,16 @@ var init_Form = __esm({
44513
44109
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
44514
44110
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
44515
44111
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
44516
- const [formData, setFormData] = React106__default.useState(
44112
+ const [formData, setFormData] = React104__default.useState(
44517
44113
  normalizedInitialData
44518
44114
  );
44519
- const [collapsedSections, setCollapsedSections] = React106__default.useState(
44115
+ const [collapsedSections, setCollapsedSections] = React104__default.useState(
44520
44116
  /* @__PURE__ */ new Set()
44521
44117
  );
44522
- const [submitError, setSubmitError] = React106__default.useState(null);
44523
- const formRef = React106__default.useRef(null);
44118
+ const [submitError, setSubmitError] = React104__default.useState(null);
44119
+ const formRef = React104__default.useRef(null);
44524
44120
  const formMode = props.mode;
44525
- const mountedRef = React106__default.useRef(false);
44121
+ const mountedRef = React104__default.useRef(false);
44526
44122
  if (!mountedRef.current) {
44527
44123
  mountedRef.current = true;
44528
44124
  debug("forms", "mount", {
@@ -44535,7 +44131,7 @@ var init_Form = __esm({
44535
44131
  });
44536
44132
  }
44537
44133
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
44538
- const evalContext = React106__default.useMemo(
44134
+ const evalContext = React104__default.useMemo(
44539
44135
  () => ({
44540
44136
  formValues: formData,
44541
44137
  globalVariables: externalContext?.globalVariables ?? {},
@@ -44544,7 +44140,7 @@ var init_Form = __esm({
44544
44140
  }),
44545
44141
  [formData, externalContext]
44546
44142
  );
44547
- React106__default.useEffect(() => {
44143
+ React104__default.useEffect(() => {
44548
44144
  debug("forms", "initialData-sync", {
44549
44145
  mode: formMode,
44550
44146
  normalizedInitialData,
@@ -44555,7 +44151,7 @@ var init_Form = __esm({
44555
44151
  setFormData(normalizedInitialData);
44556
44152
  }
44557
44153
  }, [normalizedInitialData]);
44558
- const processCalculations = React106__default.useCallback(
44154
+ const processCalculations = React104__default.useCallback(
44559
44155
  (changedFieldId, newFormData) => {
44560
44156
  if (!hiddenCalculations.length) return;
44561
44157
  const context = {
@@ -44580,7 +44176,7 @@ var init_Form = __esm({
44580
44176
  },
44581
44177
  [hiddenCalculations, externalContext, eventBus]
44582
44178
  );
44583
- const checkViolations = React106__default.useCallback(
44179
+ const checkViolations = React104__default.useCallback(
44584
44180
  (changedFieldId, newFormData) => {
44585
44181
  if (!violationTriggers.length) return;
44586
44182
  const context = {
@@ -44618,7 +44214,7 @@ var init_Form = __esm({
44618
44214
  processCalculations(name, newFormData);
44619
44215
  checkViolations(name, newFormData);
44620
44216
  };
44621
- const isFieldVisible = React106__default.useCallback(
44217
+ const isFieldVisible = React104__default.useCallback(
44622
44218
  (fieldName) => {
44623
44219
  const condition = conditionalFields[fieldName];
44624
44220
  if (!condition) return true;
@@ -44626,7 +44222,7 @@ var init_Form = __esm({
44626
44222
  },
44627
44223
  [conditionalFields, evalContext]
44628
44224
  );
44629
- const isSectionVisible = React106__default.useCallback(
44225
+ const isSectionVisible = React104__default.useCallback(
44630
44226
  (section) => {
44631
44227
  if (!section.condition) return true;
44632
44228
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -44702,7 +44298,7 @@ var init_Form = __esm({
44702
44298
  eventBus.emit(`UI:${onCancel}`);
44703
44299
  }
44704
44300
  };
44705
- const renderField = React106__default.useCallback(
44301
+ const renderField = React104__default.useCallback(
44706
44302
  (field) => {
44707
44303
  const fieldName = field.name || field.field;
44708
44304
  if (!fieldName) return null;
@@ -44723,7 +44319,7 @@ var init_Form = __esm({
44723
44319
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
44724
44320
  );
44725
44321
  const effectiveFields = entityDerivedFields ?? fields;
44726
- const normalizedFields = React106__default.useMemo(() => {
44322
+ const normalizedFields = React104__default.useMemo(() => {
44727
44323
  if (!effectiveFields || effectiveFields.length === 0) return [];
44728
44324
  return effectiveFields.map((field) => {
44729
44325
  if (typeof field === "string") {
@@ -44747,7 +44343,7 @@ var init_Form = __esm({
44747
44343
  return field;
44748
44344
  });
44749
44345
  }, [effectiveFields, resolvedEntity]);
44750
- const schemaFields = React106__default.useMemo(() => {
44346
+ const schemaFields = React104__default.useMemo(() => {
44751
44347
  if (normalizedFields.length === 0) return null;
44752
44348
  if (isDebugEnabled()) {
44753
44349
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -44757,7 +44353,7 @@ var init_Form = __esm({
44757
44353
  }
44758
44354
  return normalizedFields.map(renderField).filter(Boolean);
44759
44355
  }, [normalizedFields, renderField, entityName, conditionalFields]);
44760
- const sectionElements = React106__default.useMemo(() => {
44356
+ const sectionElements = React104__default.useMemo(() => {
44761
44357
  if (!sections || sections.length === 0) return null;
44762
44358
  return sections.map((section) => {
44763
44359
  if (!isSectionVisible(section)) {
@@ -45482,7 +45078,7 @@ var init_List = __esm({
45482
45078
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
45483
45079
  return [];
45484
45080
  }, [entity]);
45485
- const getItemActions = React106__default.useCallback(
45081
+ const getItemActions = React104__default.useCallback(
45486
45082
  (item) => {
45487
45083
  if (!itemActions) return [];
45488
45084
  if (typeof itemActions === "function") {
@@ -45957,7 +45553,7 @@ var init_MediaGallery = __esm({
45957
45553
  [selectable, selectedItems, selectionEvent, eventBus]
45958
45554
  );
45959
45555
  const entityData = Array.isArray(entity) ? entity : [];
45960
- const items = React106__default.useMemo(() => {
45556
+ const items = React104__default.useMemo(() => {
45961
45557
  if (propItems) return propItems;
45962
45558
  if (entityData.length === 0) return [];
45963
45559
  return entityData.map((record, idx) => {
@@ -46120,7 +45716,7 @@ var init_MediaGallery = __esm({
46120
45716
  }
46121
45717
  });
46122
45718
  function extractTitle2(children) {
46123
- if (!React106__default.isValidElement(children)) return void 0;
45719
+ if (!React104__default.isValidElement(children)) return void 0;
46124
45720
  const props = children.props;
46125
45721
  if (typeof props.title === "string") {
46126
45722
  return props.title;
@@ -46394,7 +45990,7 @@ var init_debugRegistry = __esm({
46394
45990
  }
46395
45991
  });
46396
45992
  function useDebugData() {
46397
- const [data, setData] = React106.useState(() => ({
45993
+ const [data, setData] = React104.useState(() => ({
46398
45994
  traits: [],
46399
45995
  ticks: [],
46400
45996
  guards: [],
@@ -46408,7 +46004,7 @@ function useDebugData() {
46408
46004
  },
46409
46005
  lastUpdate: Date.now()
46410
46006
  }));
46411
- React106.useEffect(() => {
46007
+ React104.useEffect(() => {
46412
46008
  const updateData = () => {
46413
46009
  setData({
46414
46010
  traits: getAllTraits(),
@@ -46517,12 +46113,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
46517
46113
  return positions;
46518
46114
  }
46519
46115
  function WalkMinimap() {
46520
- const [walkStep, setWalkStep] = React106.useState(null);
46521
- const [traits2, setTraits] = React106.useState([]);
46522
- const [coveredEdges, setCoveredEdges] = React106.useState([]);
46523
- const [completedTraits, setCompletedTraits] = React106.useState(/* @__PURE__ */ new Set());
46524
- const prevTraitRef = React106.useRef(null);
46525
- React106.useEffect(() => {
46116
+ const [walkStep, setWalkStep] = React104.useState(null);
46117
+ const [traits2, setTraits] = React104.useState([]);
46118
+ const [coveredEdges, setCoveredEdges] = React104.useState([]);
46119
+ const [completedTraits, setCompletedTraits] = React104.useState(/* @__PURE__ */ new Set());
46120
+ const prevTraitRef = React104.useRef(null);
46121
+ React104.useEffect(() => {
46526
46122
  const interval = setInterval(() => {
46527
46123
  const w = window;
46528
46124
  const step = w.__orbitalWalkStep;
@@ -46958,15 +46554,15 @@ var init_EntitiesTab = __esm({
46958
46554
  });
46959
46555
  function EventFlowTab({ events: events2 }) {
46960
46556
  const { t } = useTranslate();
46961
- const [filter, setFilter] = React106.useState("all");
46962
- const containerRef = React106.useRef(null);
46963
- const [autoScroll, setAutoScroll] = React106.useState(true);
46964
- React106.useEffect(() => {
46557
+ const [filter, setFilter] = React104.useState("all");
46558
+ const containerRef = React104.useRef(null);
46559
+ const [autoScroll, setAutoScroll] = React104.useState(true);
46560
+ React104.useEffect(() => {
46965
46561
  if (autoScroll && containerRef.current) {
46966
46562
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
46967
46563
  }
46968
46564
  }, [events2.length, autoScroll]);
46969
- const filteredEvents = React106.useMemo(() => {
46565
+ const filteredEvents = React104.useMemo(() => {
46970
46566
  if (filter === "all") return events2;
46971
46567
  return events2.filter((e) => e.type === filter);
46972
46568
  }, [events2, filter]);
@@ -47082,7 +46678,7 @@ var init_EventFlowTab = __esm({
47082
46678
  });
47083
46679
  function GuardsPanel({ guards }) {
47084
46680
  const { t } = useTranslate();
47085
- const [filter, setFilter] = React106.useState("all");
46681
+ const [filter, setFilter] = React104.useState("all");
47086
46682
  if (guards.length === 0) {
47087
46683
  return /* @__PURE__ */ jsx(
47088
46684
  EmptyState,
@@ -47095,7 +46691,7 @@ function GuardsPanel({ guards }) {
47095
46691
  }
47096
46692
  const passedCount = guards.filter((g) => g.result).length;
47097
46693
  const failedCount = guards.length - passedCount;
47098
- const filteredGuards = React106.useMemo(() => {
46694
+ const filteredGuards = React104.useMemo(() => {
47099
46695
  if (filter === "all") return guards;
47100
46696
  if (filter === "passed") return guards.filter((g) => g.result);
47101
46697
  return guards.filter((g) => !g.result);
@@ -47258,10 +46854,10 @@ function EffectBadge({ effect }) {
47258
46854
  }
47259
46855
  function TransitionTimeline({ transitions }) {
47260
46856
  const { t } = useTranslate();
47261
- const containerRef = React106.useRef(null);
47262
- const [autoScroll, setAutoScroll] = React106.useState(true);
47263
- const [expandedId, setExpandedId] = React106.useState(null);
47264
- React106.useEffect(() => {
46857
+ const containerRef = React104.useRef(null);
46858
+ const [autoScroll, setAutoScroll] = React104.useState(true);
46859
+ const [expandedId, setExpandedId] = React104.useState(null);
46860
+ React104.useEffect(() => {
47265
46861
  if (autoScroll && containerRef.current) {
47266
46862
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
47267
46863
  }
@@ -47541,9 +47137,9 @@ function getAllEvents(traits2) {
47541
47137
  function EventDispatcherTab({ traits: traits2, schema }) {
47542
47138
  const eventBus = useEventBus();
47543
47139
  const { t } = useTranslate();
47544
- const [log11, setLog] = React106.useState([]);
47545
- const prevStatesRef = React106.useRef(/* @__PURE__ */ new Map());
47546
- React106.useEffect(() => {
47140
+ const [log11, setLog] = React104.useState([]);
47141
+ const prevStatesRef = React104.useRef(/* @__PURE__ */ new Map());
47142
+ React104.useEffect(() => {
47547
47143
  for (const trait of traits2) {
47548
47144
  const prev = prevStatesRef.current.get(trait.id);
47549
47145
  if (prev && prev !== trait.currentState) {
@@ -47712,10 +47308,10 @@ function VerifyModePanel({
47712
47308
  localCount
47713
47309
  }) {
47714
47310
  const { t } = useTranslate();
47715
- const [expanded, setExpanded] = React106.useState(true);
47716
- const scrollRef = React106.useRef(null);
47717
- const prevCountRef = React106.useRef(0);
47718
- React106.useEffect(() => {
47311
+ const [expanded, setExpanded] = React104.useState(true);
47312
+ const scrollRef = React104.useRef(null);
47313
+ const prevCountRef = React104.useRef(0);
47314
+ React104.useEffect(() => {
47719
47315
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
47720
47316
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
47721
47317
  }
@@ -47772,10 +47368,10 @@ function RuntimeDebugger({
47772
47368
  schema
47773
47369
  }) {
47774
47370
  const { t } = useTranslate();
47775
- const [isCollapsed, setIsCollapsed] = React106.useState(mode === "verify" ? true : defaultCollapsed);
47776
- const [isVisible, setIsVisible] = React106.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
47371
+ const [isCollapsed, setIsCollapsed] = React104.useState(mode === "verify" ? true : defaultCollapsed);
47372
+ const [isVisible, setIsVisible] = React104.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
47777
47373
  const debugData = useDebugData();
47778
- React106.useEffect(() => {
47374
+ React104.useEffect(() => {
47779
47375
  if (mode === "inline") return;
47780
47376
  return onDebugToggle((enabled) => {
47781
47377
  setIsVisible(enabled);
@@ -47784,7 +47380,7 @@ function RuntimeDebugger({
47784
47380
  }
47785
47381
  });
47786
47382
  }, [mode]);
47787
- React106.useEffect(() => {
47383
+ React104.useEffect(() => {
47788
47384
  if (mode === "inline") return;
47789
47385
  const handleKeyDown = (e) => {
47790
47386
  if (e.key === "`" && isVisible) {
@@ -48304,7 +47900,7 @@ var init_StatCard = __esm({
48304
47900
  const labelToUse = propLabel ?? propTitle;
48305
47901
  const eventBus = useEventBus();
48306
47902
  const { t } = useTranslate();
48307
- const handleActionClick = React106__default.useCallback(() => {
47903
+ const handleActionClick = React104__default.useCallback(() => {
48308
47904
  if (action?.event) {
48309
47905
  eventBus.emit(`UI:${action.event}`, {});
48310
47906
  }
@@ -48315,7 +47911,7 @@ var init_StatCard = __esm({
48315
47911
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
48316
47912
  const isLoading = externalLoading ?? false;
48317
47913
  const error = externalError;
48318
- const computeMetricValue = React106__default.useCallback(
47914
+ const computeMetricValue = React104__default.useCallback(
48319
47915
  (metric, items) => {
48320
47916
  if (metric.value !== void 0) {
48321
47917
  return metric.value;
@@ -48354,7 +47950,7 @@ var init_StatCard = __esm({
48354
47950
  },
48355
47951
  []
48356
47952
  );
48357
- const schemaStats = React106__default.useMemo(() => {
47953
+ const schemaStats = React104__default.useMemo(() => {
48358
47954
  if (!metrics || metrics.length === 0) return null;
48359
47955
  return metrics.map((metric) => ({
48360
47956
  label: metric.label,
@@ -48362,7 +47958,7 @@ var init_StatCard = __esm({
48362
47958
  format: metric.format
48363
47959
  }));
48364
47960
  }, [metrics, data, computeMetricValue]);
48365
- const calculatedTrend = React106__default.useMemo(() => {
47961
+ const calculatedTrend = React104__default.useMemo(() => {
48366
47962
  if (manualTrend !== void 0) return manualTrend;
48367
47963
  if (previousValue === void 0 || currentValue === void 0)
48368
47964
  return void 0;
@@ -49002,8 +48598,8 @@ var init_SubagentTracePanel = __esm({
49002
48598
  ] });
49003
48599
  };
49004
48600
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
49005
- const endRef = React106__default.useRef(null);
49006
- React106__default.useEffect(() => {
48601
+ const endRef = React104__default.useRef(null);
48602
+ React104__default.useEffect(() => {
49007
48603
  if (!autoScroll) return;
49008
48604
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
49009
48605
  }, [activities.length, autoScroll]);
@@ -49097,7 +48693,7 @@ var init_SubagentTracePanel = __esm({
49097
48693
  };
49098
48694
  SubagentRichCard = ({ subagent }) => {
49099
48695
  const { t } = useTranslate();
49100
- const activities = React106__default.useMemo(
48696
+ const activities = React104__default.useMemo(
49101
48697
  () => subagentMessagesToActivities(subagent.messages),
49102
48698
  [subagent.messages]
49103
48699
  );
@@ -49174,8 +48770,8 @@ var init_SubagentTracePanel = __esm({
49174
48770
  ] });
49175
48771
  };
49176
48772
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
49177
- const endRef = React106__default.useRef(null);
49178
- React106__default.useEffect(() => {
48773
+ const endRef = React104__default.useRef(null);
48774
+ React104__default.useEffect(() => {
49179
48775
  if (!autoScroll) return;
49180
48776
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
49181
48777
  }, [messages.length, autoScroll]);
@@ -49605,7 +49201,7 @@ var init_Timeline = __esm({
49605
49201
  }) => {
49606
49202
  const { t } = useTranslate();
49607
49203
  const entityData = entity ?? [];
49608
- const items = React106__default.useMemo(() => {
49204
+ const items = React104__default.useMemo(() => {
49609
49205
  if (propItems) return propItems;
49610
49206
  if (entityData.length === 0) return [];
49611
49207
  return entityData.map((record, idx) => {
@@ -49707,7 +49303,7 @@ var init_Timeline = __esm({
49707
49303
  }
49708
49304
  });
49709
49305
  function extractToastProps(children) {
49710
- if (!React106__default.isValidElement(children)) {
49306
+ if (!React104__default.isValidElement(children)) {
49711
49307
  if (typeof children === "string") {
49712
49308
  return { message: children };
49713
49309
  }
@@ -49749,7 +49345,7 @@ var init_ToastSlot = __esm({
49749
49345
  eventBus.emit(`${prefix}CLOSE`);
49750
49346
  };
49751
49347
  if (!isVisible) return null;
49752
- const isCustomContent = React106__default.isValidElement(children) && !message;
49348
+ const isCustomContent = React104__default.isValidElement(children) && !message;
49753
49349
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
49754
49350
  Toast,
49755
49351
  {
@@ -49766,7 +49362,7 @@ var init_ToastSlot = __esm({
49766
49362
  }
49767
49363
  });
49768
49364
  function lazyThree(name, loader) {
49769
- const Lazy = React106__default.lazy(
49365
+ const Lazy = React104__default.lazy(
49770
49366
  () => loader().then((m) => {
49771
49367
  const Resolved = m[name];
49772
49368
  if (!Resolved) {
@@ -49778,13 +49374,13 @@ function lazyThree(name, loader) {
49778
49374
  })
49779
49375
  );
49780
49376
  function ThreeWrapper(props) {
49781
- return React106__default.createElement(
49377
+ return React104__default.createElement(
49782
49378
  ThreeBoundary,
49783
49379
  { name },
49784
- React106__default.createElement(
49785
- React106__default.Suspense,
49380
+ React104__default.createElement(
49381
+ React104__default.Suspense,
49786
49382
  { fallback: null },
49787
- React106__default.createElement(Lazy, props)
49383
+ React104__default.createElement(Lazy, props)
49788
49384
  )
49789
49385
  );
49790
49386
  }
@@ -49826,7 +49422,6 @@ var init_component_registry_generated = __esm({
49826
49422
  init_Canvas2D();
49827
49423
  init_CanvasEffect();
49828
49424
  init_Card();
49829
- init_CardBattlerBoard();
49830
49425
  init_CardGrid();
49831
49426
  init_Carousel();
49832
49427
  init_CaseStudyCard();
@@ -50057,13 +49652,12 @@ var init_component_registry_generated = __esm({
50057
49652
  init_UploadDropZone();
50058
49653
  init_VersionDiff();
50059
49654
  init_ViolationAlert();
50060
- init_VisualNovelBoard();
50061
49655
  init_VoteStack();
50062
49656
  init_WaypointMarker();
50063
49657
  init_WizardContainer();
50064
49658
  init_WizardNavigation();
50065
49659
  init_WizardProgress();
50066
- ThreeBoundary = class extends React106__default.Component {
49660
+ ThreeBoundary = class extends React104__default.Component {
50067
49661
  constructor() {
50068
49662
  super(...arguments);
50069
49663
  __publicField(this, "state", { failed: false });
@@ -50073,7 +49667,7 @@ var init_component_registry_generated = __esm({
50073
49667
  }
50074
49668
  render() {
50075
49669
  if (this.state.failed) {
50076
- return React106__default.createElement(
49670
+ return React104__default.createElement(
50077
49671
  "div",
50078
49672
  {
50079
49673
  "data-testid": "three-unavailable",
@@ -50127,7 +49721,6 @@ var init_component_registry_generated = __esm({
50127
49721
  "Canvas2D": Canvas2D,
50128
49722
  "CanvasEffect": CanvasEffect,
50129
49723
  "Card": Card,
50130
- "CardBattlerBoard": CardBattlerBoard,
50131
49724
  "CardGrid": CardGrid,
50132
49725
  "Carousel": Carousel,
50133
49726
  "CaseStudyCard": CaseStudyCard,
@@ -50372,7 +49965,6 @@ var init_component_registry_generated = __esm({
50372
49965
  "VStack": VStack,
50373
49966
  "VersionDiff": VersionDiff,
50374
49967
  "ViolationAlert": ViolationAlert,
50375
- "VisualNovelBoard": VisualNovelBoard,
50376
49968
  "VoteStack": VoteStack,
50377
49969
  "WaypointMarker": WaypointMarker,
50378
49970
  "WizardContainer": WizardContainer,
@@ -50396,7 +49988,7 @@ function SuspenseConfigProvider({
50396
49988
  config,
50397
49989
  children
50398
49990
  }) {
50399
- return React106__default.createElement(
49991
+ return React104__default.createElement(
50400
49992
  SuspenseConfigContext.Provider,
50401
49993
  { value: config },
50402
49994
  children
@@ -50438,7 +50030,7 @@ function enrichFormFields(fields, entityDef) {
50438
50030
  }
50439
50031
  return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
50440
50032
  }
50441
- if (field && typeof field === "object" && !Array.isArray(field) && !React106__default.isValidElement(field) && !(field instanceof Date)) {
50033
+ if (field && typeof field === "object" && !Array.isArray(field) && !React104__default.isValidElement(field) && !(field instanceof Date)) {
50442
50034
  const obj = field;
50443
50035
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
50444
50036
  if (!fieldName) return field;
@@ -50891,7 +50483,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
50891
50483
  const key = `${parentId}-${index}-trait:${traitName}`;
50892
50484
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
50893
50485
  }
50894
- return /* @__PURE__ */ jsx(React106__default.Fragment, { children: child }, `${parentId}-${index}`);
50486
+ return /* @__PURE__ */ jsx(React104__default.Fragment, { children: child }, `${parentId}-${index}`);
50895
50487
  }
50896
50488
  if (!child || typeof child !== "object") return null;
50897
50489
  const childId = `${parentId}-${index}`;
@@ -50931,14 +50523,14 @@ function isPatternConfig(value) {
50931
50523
  if (value === null || value === void 0) return false;
50932
50524
  if (typeof value !== "object") return false;
50933
50525
  if (Array.isArray(value)) return false;
50934
- if (React106__default.isValidElement(value)) return false;
50526
+ if (React104__default.isValidElement(value)) return false;
50935
50527
  if (value instanceof Date) return false;
50936
50528
  if (typeof value === "function") return false;
50937
50529
  const record = value;
50938
50530
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
50939
50531
  }
50940
50532
  function isPlainConfigObject(value) {
50941
- if (React106__default.isValidElement(value)) return false;
50533
+ if (React104__default.isValidElement(value)) return false;
50942
50534
  if (value instanceof Date) return false;
50943
50535
  const proto = Object.getPrototypeOf(value);
50944
50536
  return proto === Object.prototype || proto === null;
@@ -51064,7 +50656,7 @@ function SlotContentRenderer({
51064
50656
  for (const slotKey of CONTENT_NODE_SLOTS) {
51065
50657
  const slotVal = restProps[slotKey];
51066
50658
  if (slotVal === void 0 || slotVal === null) continue;
51067
- if (React106__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
50659
+ if (React104__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
51068
50660
  if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
51069
50661
  nodeSlotOverrides[slotKey] = renderPatternChildren(
51070
50662
  slotVal,
@@ -51113,7 +50705,7 @@ function SlotContentRenderer({
51113
50705
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
51114
50706
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
51115
50707
  const sample = resolvedItems[0];
51116
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React106__default.isValidElement(sample) && !(sample instanceof Date)) {
50708
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React104__default.isValidElement(sample) && !(sample instanceof Date)) {
51117
50709
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
51118
50710
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
51119
50711
  }
@@ -51476,7 +51068,7 @@ var AvlTransition = ({
51476
51068
  opacity = 1,
51477
51069
  className
51478
51070
  }) => {
51479
- const ids = React106__default.useMemo(() => {
51071
+ const ids = React104__default.useMemo(() => {
51480
51072
  avlTransitionId += 1;
51481
51073
  return { arrow: `avl-tr-${avlTransitionId}-arrow` };
51482
51074
  }, []);
@@ -52037,7 +51629,7 @@ var AvlStateMachine = ({
52037
51629
  color = "var(--color-primary)",
52038
51630
  animated = false
52039
51631
  }) => {
52040
- const ids = React106__default.useMemo(() => {
51632
+ const ids = React104__default.useMemo(() => {
52041
51633
  avlSmId += 1;
52042
51634
  const base = `avl-sm-${avlSmId}`;
52043
51635
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -52236,7 +51828,7 @@ var AvlOrbitalUnit = ({
52236
51828
  color = "var(--color-primary)",
52237
51829
  animated = false
52238
51830
  }) => {
52239
- const ids = React106__default.useMemo(() => {
51831
+ const ids = React104__default.useMemo(() => {
52240
51832
  avlOuId += 1;
52241
51833
  const base = `avl-ou-${avlOuId}`;
52242
51834
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -52332,7 +51924,7 @@ var AvlClosedCircuit = ({
52332
51924
  color = "var(--color-primary)",
52333
51925
  animated = false
52334
51926
  }) => {
52335
- const ids = React106__default.useMemo(() => {
51927
+ const ids = React104__default.useMemo(() => {
52336
51928
  avlCcId += 1;
52337
51929
  const base = `avl-cc-${avlCcId}`;
52338
51930
  return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
@@ -52487,7 +52079,7 @@ var AvlEmitListen = ({
52487
52079
  color = "var(--color-primary)",
52488
52080
  animated = false
52489
52081
  }) => {
52490
- const ids = React106__default.useMemo(() => {
52082
+ const ids = React104__default.useMemo(() => {
52491
52083
  avlElId += 1;
52492
52084
  const base = `avl-el-${avlElId}`;
52493
52085
  return { arrow: `${base}-arrow`, grad: `${base}-grad` };
@@ -52761,7 +52353,7 @@ function renderNode(node, color, glowId) {
52761
52353
  const baseR = node.type === "operator" ? 20 : 16;
52762
52354
  const r2 = Math.max(baseR, labelLen * 3.5 + 6);
52763
52355
  const nc = nodeColor(node.type, color);
52764
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
52356
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
52765
52357
  node.children.map((child, i) => {
52766
52358
  const childR = Math.max(
52767
52359
  child.type === "operator" ? 20 : 16,
@@ -52818,7 +52410,7 @@ var AvlExprTree = ({
52818
52410
  className,
52819
52411
  color = "var(--color-primary)"
52820
52412
  }) => {
52821
- const ids = React106__default.useMemo(() => {
52413
+ const ids = React104__default.useMemo(() => {
52822
52414
  avlEtId += 1;
52823
52415
  return { glow: `avl-et-${avlEtId}-glow` };
52824
52416
  }, []);
@@ -53653,7 +53245,7 @@ var SystemNode = ({ data }) => {
53653
53245
  stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
53654
53246
  const tc = transitionCounts[s.name] ?? 0;
53655
53247
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
53656
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
53248
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
53657
53249
  /* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial ?? void 0, isTerminal: s.isTerminal ?? void 0 }),
53658
53250
  i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
53659
53251
  ] }, s.name);
@@ -54798,7 +54390,7 @@ function resolveLambdaBindings(body, params, item, index) {
54798
54390
  if (Array.isArray(body)) {
54799
54391
  return body.map((b) => recur(b));
54800
54392
  }
54801
- if (body !== null && typeof body === "object" && !React106__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
54393
+ if (body !== null && typeof body === "object" && !React104__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
54802
54394
  const out = {};
54803
54395
  for (const [k, v] of Object.entries(body)) {
54804
54396
  out[k] = recur(v);
@@ -54817,7 +54409,7 @@ function getSlotContentRenderer2() {
54817
54409
  function makeLambdaFn(params, lambdaBody, callerKey) {
54818
54410
  return (item, index) => {
54819
54411
  const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
54820
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React106__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
54412
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React104__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
54821
54413
  return null;
54822
54414
  }
54823
54415
  const record = resolvedBody;
@@ -54836,7 +54428,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
54836
54428
  props: childProps,
54837
54429
  priority: 0
54838
54430
  };
54839
- return React106__default.createElement(SlotContentRenderer2, { content: childContent });
54431
+ return React104__default.createElement(SlotContentRenderer2, { content: childContent });
54840
54432
  };
54841
54433
  }
54842
54434
  function convertNode(node, callerKey) {
@@ -54855,7 +54447,7 @@ function convertNode(node, callerKey) {
54855
54447
  });
54856
54448
  return anyChanged ? mapped : node;
54857
54449
  }
54858
- if (typeof node === "object" && !React106__default.isValidElement(node) && !(node instanceof Date)) {
54450
+ if (typeof node === "object" && !React104__default.isValidElement(node) && !(node instanceof Date)) {
54859
54451
  return convertObjectProps(node);
54860
54452
  }
54861
54453
  return node;
@@ -56518,8 +56110,8 @@ function CanvasDndProvider({
56518
56110
  }) {
56519
56111
  const eventBus = useEventBus();
56520
56112
  const sensors = useAlmadarDndSensors(false);
56521
- const [activePayload, setActivePayload] = React106__default.useState(null);
56522
- const handleDragStart = React106__default.useCallback((e) => {
56113
+ const [activePayload, setActivePayload] = React104__default.useState(null);
56114
+ const handleDragStart = React104__default.useCallback((e) => {
56523
56115
  const data = e.active.data.current;
56524
56116
  const payload = data?.payload;
56525
56117
  if (payload) {
@@ -56530,7 +56122,7 @@ function CanvasDndProvider({
56530
56122
  log9.warn("dragStart:missing-payload", { id: e.active.id });
56531
56123
  }
56532
56124
  }, [eventBus]);
56533
- const handleDragEnd = React106__default.useCallback((e) => {
56125
+ const handleDragEnd = React104__default.useCallback((e) => {
56534
56126
  setActivePayload(null);
56535
56127
  const activeData = e.active.data.current;
56536
56128
  const payload = activeData?.payload;
@@ -56559,7 +56151,7 @@ function CanvasDndProvider({
56559
56151
  const suppressed = onDrop ? onDrop(drop) === true : false;
56560
56152
  if (!suppressed) defaultEmit(eventBus, drop);
56561
56153
  }, [eventBus, onDrop]);
56562
- const handleDragCancel = React106__default.useCallback(() => {
56154
+ const handleDragCancel = React104__default.useCallback(() => {
56563
56155
  setActivePayload(null);
56564
56156
  log9.info("dragCancel");
56565
56157
  }, []);
@@ -57317,7 +56909,7 @@ var OrbPreviewNodeInner = (props) => {
57317
56909
  }
57318
56910
  );
57319
56911
  };
57320
- var OrbPreviewNode = React106__default.memo(OrbPreviewNodeInner);
56912
+ var OrbPreviewNode = React104__default.memo(OrbPreviewNodeInner);
57321
56913
  OrbPreviewNode.displayName = "OrbPreviewNode";
57322
56914
  orbPreviewLog.debug("export-resolved", () => ({
57323
56915
  type: typeof OrbPreviewNode,
@@ -57422,7 +57014,7 @@ var EventFlowEdgeInner = (props) => {
57422
57014
  ) })
57423
57015
  ] });
57424
57016
  };
57425
- var EventFlowEdge = React106__default.memo(EventFlowEdgeInner);
57017
+ var EventFlowEdge = React104__default.memo(EventFlowEdgeInner);
57426
57018
  EventFlowEdge.displayName = "EventFlowEdge";
57427
57019
 
57428
57020
  // components/avl/molecules/BehaviorComposeNode.tsx
@@ -57569,7 +57161,7 @@ var BehaviorComposeNodeInner = (props) => {
57569
57161
  }
57570
57162
  );
57571
57163
  };
57572
- var BehaviorComposeNode = React106__default.memo(BehaviorComposeNodeInner);
57164
+ var BehaviorComposeNode = React104__default.memo(BehaviorComposeNodeInner);
57573
57165
  BehaviorComposeNode.displayName = "BehaviorComposeNode";
57574
57166
 
57575
57167
  // components/avl/lib/avl-behavior-compose-converter.ts
@@ -58595,7 +58187,7 @@ var TraitCardNodeInner = (props) => {
58595
58187
  }
58596
58188
  );
58597
58189
  };
58598
- var TraitCardNode = React106__default.memo(TraitCardNodeInner);
58190
+ var TraitCardNode = React104__default.memo(TraitCardNodeInner);
58599
58191
  TraitCardNode.displayName = "TraitCardNode";
58600
58192
 
58601
58193
  // components/avl/organisms/FlowCanvas.tsx
@@ -58668,7 +58260,7 @@ function FlowCanvasInner({
58668
58260
  initialOrbital
58669
58261
  );
58670
58262
  const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
58671
- const screenSizeUserOverrideRef = React106__default.useRef(false);
58263
+ const screenSizeUserOverrideRef = React104__default.useRef(false);
58672
58264
  const [screenSize, setScreenSize] = useState(
58673
58265
  () => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
58674
58266
  );
@@ -59052,7 +58644,7 @@ var ZoomBreadcrumb = ({
59052
58644
  if (eventName && band === "detail") {
59053
58645
  segments.push({ icon: "\u26A1", label: eventName });
59054
58646
  }
59055
- return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
58647
+ return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
59056
58648
  i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
59057
58649
  /* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
59058
58650
  /* @__PURE__ */ jsx("span", { children: seg.label })
@@ -59393,7 +58985,7 @@ var EventWireOverlay = ({
59393
58985
  containerW,
59394
58986
  containerH
59395
58987
  }) => {
59396
- const ids = React106__default.useMemo(() => {
58988
+ const ids = React104__default.useMemo(() => {
59397
58989
  avlOczWireId += 1;
59398
58990
  return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
59399
58991
  }, []);
@@ -59760,7 +59352,7 @@ var AvlOrbitalsCosmicZoom = ({
59760
59352
  borderRadius: 6,
59761
59353
  border: `1px solid ${color}`
59762
59354
  },
59763
- children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
59355
+ children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
59764
59356
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
59765
59357
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
59766
59358
  Box,