@almadar/ui 5.83.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);
@@ -13273,6 +13273,7 @@ function ChoiceButton({
13273
13273
  selected = false,
13274
13274
  onClick,
13275
13275
  action,
13276
+ payload,
13276
13277
  className
13277
13278
  }) {
13278
13279
  const eventBus = useEventBus();
@@ -13282,7 +13283,7 @@ function ChoiceButton({
13282
13283
  variant: "ghost",
13283
13284
  disabled,
13284
13285
  onClick: () => {
13285
- if (action) eventBus.emit(`UI:${action}`, {});
13286
+ if (action) eventBus.emit(`UI:${action}`, payload ?? {});
13286
13287
  onClick?.();
13287
13288
  },
13288
13289
  className: cn(
@@ -13441,8 +13442,8 @@ function MiniMap({
13441
13442
  tileAssets,
13442
13443
  unitAssets
13443
13444
  }) {
13444
- const canvasRef = React106.useRef(null);
13445
- const imgCacheRef = React106.useRef(/* @__PURE__ */ new Map());
13445
+ const canvasRef = React104.useRef(null);
13446
+ const imgCacheRef = React104.useRef(/* @__PURE__ */ new Map());
13446
13447
  function loadImg(url) {
13447
13448
  const cached = imgCacheRef.current.get(url);
13448
13449
  if (cached) return cached.complete ? cached : null;
@@ -13457,7 +13458,7 @@ function MiniMap({
13457
13458
  imgCacheRef.current.set(url, img);
13458
13459
  return null;
13459
13460
  }
13460
- React106.useEffect(() => {
13461
+ React104.useEffect(() => {
13461
13462
  const canvas = canvasRef.current;
13462
13463
  if (!canvas) return;
13463
13464
  const ctx = canvas.getContext("2d");
@@ -13592,8 +13593,8 @@ function ControlGrid({
13592
13593
  className
13593
13594
  }) {
13594
13595
  const eventBus = useEventBus();
13595
- const [active, setActive] = React106.useState(/* @__PURE__ */ new Set());
13596
- const handlePress = React106.useCallback(
13596
+ const [active, setActive] = React104.useState(/* @__PURE__ */ new Set());
13597
+ const handlePress = React104.useCallback(
13597
13598
  (id) => {
13598
13599
  setActive((prev) => new Set(prev).add(id));
13599
13600
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -13607,7 +13608,7 @@ function ControlGrid({
13607
13608
  },
13608
13609
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
13609
13610
  );
13610
- const handleRelease = React106.useCallback(
13611
+ const handleRelease = React104.useCallback(
13611
13612
  (id) => {
13612
13613
  setActive((prev) => {
13613
13614
  const next = new Set(prev);
@@ -13865,7 +13866,7 @@ function InventoryGrid({
13865
13866
  const eventBus = useEventBus();
13866
13867
  const slotCount = totalSlots ?? items.length;
13867
13868
  const emptySlotCount = Math.max(0, slotCount - items.length);
13868
- const handleSelect = React106.useCallback(
13869
+ const handleSelect = React104.useCallback(
13869
13870
  (id) => {
13870
13871
  onSelect?.(id);
13871
13872
  if (selectEvent) {
@@ -14082,7 +14083,7 @@ function GameMenu({
14082
14083
  }) {
14083
14084
  const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
14084
14085
  const eventBus = useEventBus();
14085
- const handleOptionClick = React106.useCallback(
14086
+ const handleOptionClick = React104.useCallback(
14086
14087
  (option) => {
14087
14088
  if (option.event) {
14088
14089
  eventBus.emit(`UI:${option.event}`, { option });
@@ -16003,410 +16004,6 @@ var init_GameAudioToggle = __esm({
16003
16004
  GameAudioToggle.displayName = "GameAudioToggle";
16004
16005
  }
16005
16006
  });
16006
- function VisualNovelBoard({
16007
- entity,
16008
- nodes: propNodes,
16009
- currentNodeId: propCurrentNodeId,
16010
- assetManifest: propAssetManifest,
16011
- typewriterSpeed = 30,
16012
- portraitScale = 1,
16013
- chooseEvent,
16014
- advanceEvent,
16015
- restartEvent,
16016
- className
16017
- }) {
16018
- const board = boardEntity(entity) ?? {};
16019
- const eventBus = useEventBus();
16020
- const assetManifest = propAssetManifest ?? board.assetManifest;
16021
- const entityNodes = useMemo(
16022
- () => rows(board.nodes).map((r2) => ({
16023
- id: str(r2.id),
16024
- speaker: str(r2.speaker),
16025
- text: str(r2.text),
16026
- backgroundKey: r2.backgroundKey == null ? void 0 : str(r2.backgroundKey),
16027
- portraitKey: r2.portraitKey == null ? void 0 : str(r2.portraitKey),
16028
- choices: rows(r2.choices).map((c) => ({
16029
- label: str(c.label),
16030
- nextId: str(c.nextId)
16031
- }))
16032
- })),
16033
- [board.nodes]
16034
- );
16035
- const rawNodes = propNodes ?? entityNodes;
16036
- const nodes = rawNodes.length > 0 ? rawNodes : DEFAULT_NODES;
16037
- const currentNodeId = propCurrentNodeId ?? (str(board.currentNodeId) || nodes[0]?.id);
16038
- const currentNode = nodes.find((n) => n.id === currentNodeId) ?? nodes[0];
16039
- const backgroundImage = useMemo(
16040
- () => assetManifest?.backgrounds?.[currentNode?.backgroundKey ?? ""],
16041
- [assetManifest, currentNode?.backgroundKey]
16042
- );
16043
- const portraitAsset = useMemo(
16044
- () => assetManifest?.portraits?.[currentNode?.portraitKey ?? ""],
16045
- [assetManifest, currentNode?.portraitKey]
16046
- );
16047
- const [displayedText, setDisplayedText] = useState("");
16048
- const [isTyping, setIsTyping] = useState(false);
16049
- const textRef = useRef(currentNode?.text ?? "");
16050
- const charIndexRef = useRef(0);
16051
- useEffect(() => {
16052
- const fullText = currentNode?.text ?? "";
16053
- textRef.current = fullText;
16054
- charIndexRef.current = 0;
16055
- if (typewriterSpeed === 0) {
16056
- setDisplayedText(fullText);
16057
- setIsTyping(false);
16058
- } else {
16059
- setDisplayedText("");
16060
- setIsTyping(true);
16061
- }
16062
- }, [currentNode?.id, typewriterSpeed]);
16063
- useEffect(() => {
16064
- if (!isTyping || typewriterSpeed === 0) return;
16065
- const interval = setInterval(() => {
16066
- if (charIndexRef.current < textRef.current.length) {
16067
- charIndexRef.current++;
16068
- setDisplayedText(textRef.current.slice(0, charIndexRef.current));
16069
- } else {
16070
- setIsTyping(false);
16071
- clearInterval(interval);
16072
- }
16073
- }, typewriterSpeed);
16074
- return () => clearInterval(interval);
16075
- }, [isTyping, typewriterSpeed]);
16076
- const skipTypewriter = useCallback(() => {
16077
- if (isTyping) {
16078
- charIndexRef.current = textRef.current.length;
16079
- setDisplayedText(textRef.current);
16080
- setIsTyping(false);
16081
- }
16082
- }, [isTyping]);
16083
- const handleChoice = useCallback(
16084
- (index) => {
16085
- if (chooseEvent) {
16086
- eventBus.emit(`UI:${chooseEvent}`, { choiceIndex: index });
16087
- }
16088
- },
16089
- [chooseEvent, eventBus]
16090
- );
16091
- const handleAdvance = useCallback(() => {
16092
- if (advanceEvent) {
16093
- eventBus.emit(`UI:${advanceEvent}`, {});
16094
- }
16095
- }, [advanceEvent, eventBus]);
16096
- const handleRestart = useCallback(() => {
16097
- if (restartEvent) {
16098
- eventBus.emit(`UI:${restartEvent}`, {});
16099
- }
16100
- }, [restartEvent, eventBus]);
16101
- const handleContainerClick = useCallback(() => {
16102
- if (isTyping) {
16103
- skipTypewriter();
16104
- } else if (!currentNode?.choices?.length) {
16105
- handleAdvance();
16106
- }
16107
- }, [isTyping, skipTypewriter, currentNode?.choices, handleAdvance]);
16108
- if (!currentNode) {
16109
- return /* @__PURE__ */ jsxs(VStack, { className: cn("visual-novel-board relative min-h-[600px] bg-background items-center justify-center", className), gap: "lg", children: [
16110
- /* @__PURE__ */ jsx(Typography, { variant: "h3", color: "muted", children: "No dialogue nodes" }),
16111
- /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleRestart, children: "Restart" })
16112
- ] });
16113
- }
16114
- return /* @__PURE__ */ jsxs(
16115
- Box,
16116
- {
16117
- className: cn("visual-novel-board relative min-h-[600px] bg-background overflow-hidden", className),
16118
- onClick: handleContainerClick,
16119
- children: [
16120
- backgroundImage && /* @__PURE__ */ jsx(
16121
- "div",
16122
- {
16123
- className: "absolute inset-0 z-0 bg-center bg-cover bg-no-repeat",
16124
- style: { backgroundImage: `url(${backgroundImage.url})` },
16125
- "aria-hidden": "true"
16126
- }
16127
- ),
16128
- portraitAsset && /* @__PURE__ */ jsx(
16129
- "div",
16130
- {
16131
- className: "absolute left-1/2 -translate-x-1/2 bottom-0 z-10 pointer-events-none flex items-end",
16132
- style: { height: `${60 * portraitScale}vh` },
16133
- children: /* @__PURE__ */ jsx(
16134
- "img",
16135
- {
16136
- src: portraitAsset.url,
16137
- alt: currentNode.speaker,
16138
- className: "h-full w-auto object-contain drop-shadow-2xl"
16139
- }
16140
- )
16141
- }
16142
- ),
16143
- /* @__PURE__ */ jsx("div", { className: "absolute left-0 right-0 bottom-0 z-20 mx-4 mb-4", children: /* @__PURE__ */ jsxs("div", { className: cn(
16144
- "rounded-container border-2 overflow-hidden",
16145
- backgroundImage ? "bg-black/80 backdrop-blur-sm border-white/20" : "bg-card/95 border-border"
16146
- ), children: [
16147
- /* @__PURE__ */ jsx(
16148
- DialogueBubble,
16149
- {
16150
- speaker: currentNode.speaker,
16151
- text: displayedText + (isTyping ? "\u258C" : ""),
16152
- portrait: portraitAsset,
16153
- position: "bottom",
16154
- className: "border-0 rounded-none bg-transparent backdrop-blur-none"
16155
- }
16156
- ),
16157
- !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(
16158
- ChoiceButton,
16159
- {
16160
- text: choice.label,
16161
- index: index + 1,
16162
- onClick: () => handleChoice(index)
16163
- },
16164
- choice.nextId
16165
- )) }),
16166
- !isTyping && !currentNode.choices?.length && /* @__PURE__ */ jsx("div", { className: "px-4 pb-3 text-muted-foreground text-sm animate-pulse", children: "Press click to continue..." })
16167
- ] }) })
16168
- ]
16169
- }
16170
- );
16171
- }
16172
- var DEFAULT_NODES;
16173
- var init_VisualNovelBoard = __esm({
16174
- "components/game/2d/organisms/VisualNovelBoard.tsx"() {
16175
- "use client";
16176
- init_cn();
16177
- init_useEventBus();
16178
- init_Box();
16179
- init_Typography();
16180
- init_Stack();
16181
- init_Button();
16182
- init_DialogueBubble();
16183
- init_ChoiceButton();
16184
- init_boardEntity();
16185
- DEFAULT_NODES = [
16186
- {
16187
- id: "start",
16188
- speaker: "Narrator",
16189
- text: "The corridor stretches into shadow. A lone sentinel blocks your path.",
16190
- backgroundKey: "corridor",
16191
- portraitKey: "guide",
16192
- choices: [
16193
- { label: "Approach the sentinel.", nextId: "meet" },
16194
- { label: "Turn back.", nextId: "retreat" }
16195
- ]
16196
- },
16197
- {
16198
- id: "meet",
16199
- speaker: "Sentinel",
16200
- text: "You carry the old marks. Speak your purpose, traveler.",
16201
- backgroundKey: "forge",
16202
- portraitKey: "rival",
16203
- choices: [
16204
- { label: "I seek the core.", nextId: "end" },
16205
- { label: "I am only passing through.", nextId: "retreat" }
16206
- ]
16207
- },
16208
- {
16209
- id: "retreat",
16210
- speaker: "Narrator",
16211
- text: "You withdraw into the dark. The path will wait for braver feet.",
16212
- backgroundKey: "corridor",
16213
- choices: [{ label: "Begin again.", nextId: "start" }]
16214
- },
16215
- {
16216
- id: "end",
16217
- speaker: "Sentinel",
16218
- text: "Then the way is open. Walk it well.",
16219
- backgroundKey: "core",
16220
- portraitKey: "rival",
16221
- choices: [{ label: "Begin again.", nextId: "start" }]
16222
- }
16223
- ];
16224
- VisualNovelBoard.displayName = "VisualNovelBoard";
16225
- }
16226
- });
16227
- function rowToCard(r2) {
16228
- return {
16229
- id: str(r2.id),
16230
- iconKey: r2.iconKey == null ? void 0 : str(r2.iconKey),
16231
- title: r2.title == null ? void 0 : str(r2.title),
16232
- cost: r2.cost == null ? void 0 : num(r2.cost),
16233
- attack: r2.attack == null ? void 0 : num(r2.attack),
16234
- defense: r2.defense == null ? void 0 : num(r2.defense)
16235
- };
16236
- }
16237
- function resolveCardArt(card, manifest) {
16238
- const key = card.iconKey ?? card.id;
16239
- return manifest?.cards?.[key];
16240
- }
16241
- function CardBattlerBoard({
16242
- entity,
16243
- deck: propDeck,
16244
- hand: propHand,
16245
- board: propBoard,
16246
- mana: propMana,
16247
- maxMana: propMaxMana,
16248
- turn: propTurn,
16249
- result: propResult,
16250
- assetManifest: propAssetManifest,
16251
- playCardEvent,
16252
- endTurnEvent,
16253
- playAgainEvent,
16254
- gameEndEvent,
16255
- className
16256
- }) {
16257
- const board = boardEntity(entity) ?? {};
16258
- const eventBus = useEventBus();
16259
- const { t } = useTranslate();
16260
- const assetManifest = propAssetManifest ?? board.assetManifest;
16261
- const entityHand = useMemo(() => rows(board.hand).map(rowToCard), [board.hand]);
16262
- const rawHand = propHand ?? entityHand;
16263
- const hand = rawHand.length > 0 ? rawHand : DEFAULT_HAND;
16264
- const entityBoard = useMemo(() => rows(board.board).map(rowToCard), [board.board]);
16265
- const playedCards = propBoard ?? entityBoard;
16266
- const entityDeck = useMemo(() => rows(board.deck).map(rowToCard), [board.deck]);
16267
- const deck = propDeck ?? entityDeck;
16268
- const mana = propMana ?? num(board.mana, 3);
16269
- const maxMana = propMaxMana ?? num(board.maxMana, 3);
16270
- const turn = propTurn ?? num(board.turn, 1);
16271
- const result = propResult ?? (str(board.result) || "none");
16272
- const handCards = hand;
16273
- const boardCards = playedCards;
16274
- const emittedGameEnd = useRef(false);
16275
- if (result !== "none" && !emittedGameEnd.current) {
16276
- emittedGameEnd.current = true;
16277
- if (gameEndEvent) {
16278
- eventBus.emit(`UI:${gameEndEvent}`, { result });
16279
- }
16280
- }
16281
- if (result === "none") {
16282
- emittedGameEnd.current = false;
16283
- }
16284
- const handlePlayCard = useCallback((cardId) => {
16285
- if (result !== "none") return;
16286
- if (playCardEvent) {
16287
- eventBus.emit(`UI:${playCardEvent}`, { cardId });
16288
- }
16289
- }, [result, playCardEvent, eventBus]);
16290
- const handleEndTurn = useCallback(() => {
16291
- if (result !== "none") return;
16292
- if (endTurnEvent) {
16293
- eventBus.emit(`UI:${endTurnEvent}`, {});
16294
- }
16295
- }, [result, endTurnEvent, eventBus]);
16296
- const handlePlayAgain = useCallback(() => {
16297
- if (playAgainEvent) {
16298
- eventBus.emit(`UI:${playAgainEvent}`, {});
16299
- }
16300
- }, [playAgainEvent, eventBus]);
16301
- return /* @__PURE__ */ jsxs(VStack, { className: cn("card-battler-board relative min-h-[600px] bg-background", className), gap: "none", children: [
16302
- /* @__PURE__ */ jsxs(
16303
- HStack,
16304
- {
16305
- className: "px-4 py-2 border-b border-border bg-surface",
16306
- gap: "lg",
16307
- align: "center",
16308
- children: [
16309
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
16310
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("cb.mana") ?? "Mana" }),
16311
- /* @__PURE__ */ jsxs(Typography, { variant: "body2", weight: "bold", className: "text-info", children: [
16312
- mana,
16313
- " / ",
16314
- maxMana
16315
- ] })
16316
- ] }),
16317
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
16318
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("cb.turn") ?? "Turn" }),
16319
- /* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "bold", children: turn })
16320
- ] }),
16321
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
16322
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("cb.deck") ?? "Deck" }),
16323
- /* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "bold", children: deck.length })
16324
- ] }),
16325
- /* @__PURE__ */ jsx(Box, { className: "ml-auto", children: result === "none" && /* @__PURE__ */ jsx(Button, { variant: "primary", size: "sm", onClick: handleEndTurn, children: t("cb.endTurn") ?? "End Turn" }) })
16326
- ]
16327
- }
16328
- ),
16329
- /* @__PURE__ */ jsxs(Box, { className: "flex-1 relative p-4 overflow-auto", children: [
16330
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mb-2 uppercase tracking-wide", children: t("cb.battlefield") ?? "Battlefield" }),
16331
- boardCards.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 items-end justify-start", children: boardCards.map((card) => /* @__PURE__ */ jsx(
16332
- GameCard,
16333
- {
16334
- id: card.id,
16335
- cost: card.cost,
16336
- art: resolveCardArt(card, assetManifest),
16337
- attack: card.attack,
16338
- defense: card.defense,
16339
- name: card.title,
16340
- disabled: card.cost != null && card.cost > mana,
16341
- size: "md"
16342
- },
16343
- card.id
16344
- )) }) : /* @__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" }) })
16345
- ] }),
16346
- /* @__PURE__ */ jsxs(Box, { className: "border-t border-border bg-surface px-4 py-3", children: [
16347
- /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mb-2 uppercase tracking-wide", children: t("cb.hand") ?? "Your Hand" }),
16348
- 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(
16349
- GameCard,
16350
- {
16351
- id: card.id,
16352
- cost: card.cost,
16353
- art: resolveCardArt(card, assetManifest),
16354
- attack: card.attack,
16355
- defense: card.defense,
16356
- name: card.title,
16357
- disabled: card.cost != null && card.cost > mana,
16358
- size: "lg",
16359
- onClick: handlePlayCard
16360
- },
16361
- card.id
16362
- )) })
16363
- ] }),
16364
- 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: [
16365
- /* @__PURE__ */ jsx(
16366
- Typography,
16367
- {
16368
- variant: "h2",
16369
- className: cn(
16370
- "text-4xl font-black tracking-widest uppercase",
16371
- result === "won" ? "text-warning" : "text-error"
16372
- ),
16373
- children: result === "won" ? t("cb.victory") ?? "Victory!" : t("cb.defeat") ?? "Defeat!"
16374
- }
16375
- ),
16376
- /* @__PURE__ */ jsx(
16377
- Button,
16378
- {
16379
- variant: "primary",
16380
- className: "px-8 py-3 font-semibold",
16381
- onClick: handlePlayAgain,
16382
- children: t("cb.playAgain") ?? "Play Again"
16383
- }
16384
- )
16385
- ] }) })
16386
- ] });
16387
- }
16388
- var DEFAULT_HAND;
16389
- var init_CardBattlerBoard = __esm({
16390
- "components/game/2d/organisms/CardBattlerBoard.tsx"() {
16391
- "use client";
16392
- init_cn();
16393
- init_useEventBus();
16394
- init_Box();
16395
- init_Button();
16396
- init_Typography();
16397
- init_Stack();
16398
- init_GameCard();
16399
- init_boardEntity();
16400
- DEFAULT_HAND = [
16401
- { id: "c1", iconKey: "bear", title: "Bear", cost: 3, attack: 5, defense: 4 },
16402
- { id: "c2", iconKey: "owl", title: "Owl", cost: 1, attack: 2, defense: 1 },
16403
- { id: "c3", iconKey: "gorilla", title: "Gorilla", cost: 4, attack: 6, defense: 5 },
16404
- { id: "c4", iconKey: "frog", title: "Frog", cost: 1, attack: 1, defense: 2 },
16405
- { id: "c5", iconKey: "snake", title: "Snake", cost: 2, attack: 4, defense: 1 }
16406
- ];
16407
- CardBattlerBoard.displayName = "CardBattlerBoard";
16408
- }
16409
- });
16410
16007
  function LinearView({
16411
16008
  trait,
16412
16009
  size = "md",
@@ -16418,7 +16015,7 @@ function LinearView({
16418
16015
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
16419
16016
  const isDone = i < currentIdx;
16420
16017
  const isCurrent = i === currentIdx;
16421
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
16018
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
16422
16019
  i > 0 && /* @__PURE__ */ jsx(
16423
16020
  Typography,
16424
16021
  {
@@ -16946,7 +16543,7 @@ function SequenceBar({
16946
16543
  onSlotRemove(index);
16947
16544
  }, [onSlotRemove, playing]);
16948
16545
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
16949
- 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: [
16950
16547
  i > 0 && /* @__PURE__ */ jsx(
16951
16548
  Typography,
16952
16549
  {
@@ -19947,7 +19544,7 @@ var init_ErrorBoundary = __esm({
19947
19544
  }
19948
19545
  );
19949
19546
  };
19950
- ErrorBoundary = class extends React106__default.Component {
19547
+ ErrorBoundary = class extends React104__default.Component {
19951
19548
  constructor(props) {
19952
19549
  super(props);
19953
19550
  __publicField(this, "reset", () => {
@@ -20229,7 +19826,7 @@ var init_Container = __esm({
20229
19826
  as: Component = "div"
20230
19827
  }) => {
20231
19828
  const resolvedSize = maxWidth ?? size ?? "lg";
20232
- return React106__default.createElement(
19829
+ return React104__default.createElement(
20233
19830
  Component,
20234
19831
  {
20235
19832
  className: cn(
@@ -22070,7 +21667,7 @@ var init_CodeBlock = __esm({
22070
21667
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
22071
21668
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
22072
21669
  HIDDEN_LINE_NUMBERS = { display: "none" };
22073
- CodeBlock = React106__default.memo(
21670
+ CodeBlock = React104__default.memo(
22074
21671
  ({
22075
21672
  code: rawCode,
22076
21673
  language = "text",
@@ -22657,7 +22254,7 @@ var init_MarkdownContent = __esm({
22657
22254
  init_Box();
22658
22255
  init_CodeBlock();
22659
22256
  init_cn();
22660
- MarkdownContent = React106__default.memo(
22257
+ MarkdownContent = React104__default.memo(
22661
22258
  ({ content, direction = "ltr", className }) => {
22662
22259
  const { t: _t } = useTranslate();
22663
22260
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -23984,7 +23581,7 @@ var init_StateMachineView = __esm({
23984
23581
  style: { top: title ? 30 : 0 },
23985
23582
  children: [
23986
23583
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
23987
- 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(
23988
23585
  StateNode2,
23989
23586
  {
23990
23587
  state,
@@ -29622,8 +29219,8 @@ var init_Menu = __esm({
29622
29219
  "bottom-end": "bottom-start"
29623
29220
  };
29624
29221
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
29625
- const triggerChild = React106__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
29626
- 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(
29627
29224
  triggerChild,
29628
29225
  {
29629
29226
  ref: triggerRef,
@@ -29718,14 +29315,14 @@ function useDataDnd(args) {
29718
29315
  const isZone = Boolean(dragGroup || accepts || sortable);
29719
29316
  const enabled = isZone || Boolean(dndRoot);
29720
29317
  const eventBus = useEventBus();
29721
- const parentRoot = React106__default.useContext(RootCtx);
29318
+ const parentRoot = React104__default.useContext(RootCtx);
29722
29319
  const isRoot = enabled && parentRoot === null;
29723
- const zoneId = React106__default.useId();
29320
+ const zoneId = React104__default.useId();
29724
29321
  const ownGroup = dragGroup ?? accepts ?? zoneId;
29725
- const [optimisticOrders, setOptimisticOrders] = React106__default.useState(() => /* @__PURE__ */ new Map());
29726
- const optimisticOrdersRef = React106__default.useRef(optimisticOrders);
29322
+ const [optimisticOrders, setOptimisticOrders] = React104__default.useState(() => /* @__PURE__ */ new Map());
29323
+ const optimisticOrdersRef = React104__default.useRef(optimisticOrders);
29727
29324
  optimisticOrdersRef.current = optimisticOrders;
29728
- const clearOptimisticOrder = React106__default.useCallback((group) => {
29325
+ const clearOptimisticOrder = React104__default.useCallback((group) => {
29729
29326
  setOptimisticOrders((prev) => {
29730
29327
  if (!prev.has(group)) return prev;
29731
29328
  const next = new Map(prev);
@@ -29750,7 +29347,7 @@ function useDataDnd(args) {
29750
29347
  const raw = it[dndItemIdField];
29751
29348
  return raw != null ? String(raw) : `__idx_${idx}`;
29752
29349
  }).join("|");
29753
- const itemIds = React106__default.useMemo(
29350
+ const itemIds = React104__default.useMemo(
29754
29351
  () => orderedItems.map((it, idx) => {
29755
29352
  const raw = it[dndItemIdField];
29756
29353
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -29761,7 +29358,7 @@ function useDataDnd(args) {
29761
29358
  const raw = it[dndItemIdField];
29762
29359
  return raw != null ? String(raw) : `__${idx}`;
29763
29360
  }).join("|");
29764
- React106__default.useEffect(() => {
29361
+ React104__default.useEffect(() => {
29765
29362
  const root = isRoot ? null : parentRoot;
29766
29363
  if (root) {
29767
29364
  root.clearOptimisticOrder(ownGroup);
@@ -29769,20 +29366,20 @@ function useDataDnd(args) {
29769
29366
  clearOptimisticOrder(ownGroup);
29770
29367
  }
29771
29368
  }, [itemsContentSig, ownGroup]);
29772
- const zonesRef = React106__default.useRef(/* @__PURE__ */ new Map());
29773
- const registerZone = React106__default.useCallback((zoneId2, meta2) => {
29369
+ const zonesRef = React104__default.useRef(/* @__PURE__ */ new Map());
29370
+ const registerZone = React104__default.useCallback((zoneId2, meta2) => {
29774
29371
  zonesRef.current.set(zoneId2, meta2);
29775
29372
  }, []);
29776
- const unregisterZone = React106__default.useCallback((zoneId2) => {
29373
+ const unregisterZone = React104__default.useCallback((zoneId2) => {
29777
29374
  zonesRef.current.delete(zoneId2);
29778
29375
  }, []);
29779
- const [activeDrag, setActiveDrag] = React106__default.useState(null);
29780
- const [overZoneGroup, setOverZoneGroup] = React106__default.useState(null);
29781
- 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(
29782
29379
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
29783
29380
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
29784
29381
  );
29785
- React106__default.useEffect(() => {
29382
+ React104__default.useEffect(() => {
29786
29383
  const target = isRoot ? null : parentRoot;
29787
29384
  if (!target) {
29788
29385
  zonesRef.current.set(zoneId, meta);
@@ -29801,7 +29398,7 @@ function useDataDnd(args) {
29801
29398
  }, [parentRoot, isRoot, zoneId, meta]);
29802
29399
  const sensors = useAlmadarDndSensors(true);
29803
29400
  const collisionDetection = almadarDndCollisionDetection;
29804
- const findZoneByItem = React106__default.useCallback(
29401
+ const findZoneByItem = React104__default.useCallback(
29805
29402
  (id) => {
29806
29403
  for (const z of zonesRef.current.values()) {
29807
29404
  if (z.itemIds.includes(id)) return z;
@@ -29810,7 +29407,7 @@ function useDataDnd(args) {
29810
29407
  },
29811
29408
  []
29812
29409
  );
29813
- React106__default.useCallback(
29410
+ React104__default.useCallback(
29814
29411
  (group) => {
29815
29412
  for (const z of zonesRef.current.values()) {
29816
29413
  if (z.group === group) return z;
@@ -29819,7 +29416,7 @@ function useDataDnd(args) {
29819
29416
  },
29820
29417
  []
29821
29418
  );
29822
- const handleDragEnd = React106__default.useCallback(
29419
+ const handleDragEnd = React104__default.useCallback(
29823
29420
  (event) => {
29824
29421
  const { active, over } = event;
29825
29422
  const activeIdStr = String(active.id);
@@ -29910,8 +29507,8 @@ function useDataDnd(args) {
29910
29507
  },
29911
29508
  [eventBus]
29912
29509
  );
29913
- const sortableData = React106__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
29914
- const SortableItem = React106__default.useCallback(
29510
+ const sortableData = React104__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
29511
+ const SortableItem = React104__default.useCallback(
29915
29512
  ({ id, children }) => {
29916
29513
  const {
29917
29514
  attributes,
@@ -29951,7 +29548,7 @@ function useDataDnd(args) {
29951
29548
  id: droppableId,
29952
29549
  data: sortableData
29953
29550
  });
29954
- const ctx = React106__default.useContext(RootCtx);
29551
+ const ctx = React104__default.useContext(RootCtx);
29955
29552
  const activeDrag2 = ctx?.activeDrag ?? null;
29956
29553
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
29957
29554
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -29966,7 +29563,7 @@ function useDataDnd(args) {
29966
29563
  showForeignPlaceholder,
29967
29564
  ctxAvailable: ctx != null
29968
29565
  });
29969
- React106__default.useEffect(() => {
29566
+ React104__default.useEffect(() => {
29970
29567
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
29971
29568
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
29972
29569
  return /* @__PURE__ */ jsx(
@@ -29980,11 +29577,11 @@ function useDataDnd(args) {
29980
29577
  }
29981
29578
  );
29982
29579
  };
29983
- const rootContextValue = React106__default.useMemo(
29580
+ const rootContextValue = React104__default.useMemo(
29984
29581
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
29985
29582
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
29986
29583
  );
29987
- const handleDragStart = React106__default.useCallback((event) => {
29584
+ const handleDragStart = React104__default.useCallback((event) => {
29988
29585
  const sourceZone = findZoneByItem(event.active.id);
29989
29586
  const rect = event.active.rect.current.initial;
29990
29587
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -30003,7 +29600,7 @@ function useDataDnd(args) {
30003
29600
  isRoot
30004
29601
  });
30005
29602
  }, [findZoneByItem, isRoot, zoneId]);
30006
- const handleDragOver = React106__default.useCallback((event) => {
29603
+ const handleDragOver = React104__default.useCallback((event) => {
30007
29604
  const { active, over } = event;
30008
29605
  const overData = over?.data?.current;
30009
29606
  const overGroup = overData?.dndGroup ?? null;
@@ -30073,7 +29670,7 @@ function useDataDnd(args) {
30073
29670
  return next;
30074
29671
  });
30075
29672
  }, []);
30076
- const handleDragCancel = React106__default.useCallback((event) => {
29673
+ const handleDragCancel = React104__default.useCallback((event) => {
30077
29674
  setActiveDrag(null);
30078
29675
  setOverZoneGroup(null);
30079
29676
  dndLog.warn("dragCancel", {
@@ -30081,12 +29678,12 @@ function useDataDnd(args) {
30081
29678
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
30082
29679
  });
30083
29680
  }, []);
30084
- const handleDragEndWithCleanup = React106__default.useCallback((event) => {
29681
+ const handleDragEndWithCleanup = React104__default.useCallback((event) => {
30085
29682
  handleDragEnd(event);
30086
29683
  setActiveDrag(null);
30087
29684
  setOverZoneGroup(null);
30088
29685
  }, [handleDragEnd]);
30089
- const wrapContainer = React106__default.useCallback(
29686
+ const wrapContainer = React104__default.useCallback(
30090
29687
  (children) => {
30091
29688
  if (!enabled) return children;
30092
29689
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -30140,7 +29737,7 @@ var init_useDataDnd = __esm({
30140
29737
  init_useAlmadarDndCollision();
30141
29738
  init_Box();
30142
29739
  dndLog = createLogger("almadar:ui:dnd");
30143
- RootCtx = React106__default.createContext(null);
29740
+ RootCtx = React104__default.createContext(null);
30144
29741
  }
30145
29742
  });
30146
29743
  function renderIconInput(icon, props) {
@@ -30666,7 +30263,7 @@ function DataList({
30666
30263
  }) {
30667
30264
  const eventBus = useEventBus();
30668
30265
  const { t } = useTranslate();
30669
- const [visibleCount, setVisibleCount] = React106__default.useState(pageSize || Infinity);
30266
+ const [visibleCount, setVisibleCount] = React104__default.useState(pageSize || Infinity);
30670
30267
  const fieldDefs = fields ?? columns ?? [];
30671
30268
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
30672
30269
  const dnd = useDataDnd({
@@ -30685,7 +30282,7 @@ function DataList({
30685
30282
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
30686
30283
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
30687
30284
  const hasRenderProp = typeof children === "function";
30688
- React106__default.useEffect(() => {
30285
+ React104__default.useEffect(() => {
30689
30286
  const renderItemTypeOf = typeof schemaRenderItem;
30690
30287
  const childrenTypeOf = typeof children;
30691
30288
  if (data.length > 0 && !hasRenderProp) {
@@ -30789,7 +30386,7 @@ function DataList({
30789
30386
  const items2 = [...data];
30790
30387
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
30791
30388
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
30792
- 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: [
30793
30390
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
30794
30391
  group.items.map((itemData, index) => {
30795
30392
  const id = itemData.id || `${gi}-${index}`;
@@ -30930,7 +30527,7 @@ function DataList({
30930
30527
  className
30931
30528
  ),
30932
30529
  children: [
30933
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
30530
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
30934
30531
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
30935
30532
  group.items.map(
30936
30533
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -31015,7 +30612,7 @@ var init_FormSection = __esm({
31015
30612
  columns = 1,
31016
30613
  className
31017
30614
  }) => {
31018
- const [collapsed, setCollapsed] = React106__default.useState(defaultCollapsed);
30615
+ const [collapsed, setCollapsed] = React104__default.useState(defaultCollapsed);
31019
30616
  const { t } = useTranslate();
31020
30617
  const eventBus = useEventBus();
31021
30618
  const gridClass = {
@@ -31023,7 +30620,7 @@ var init_FormSection = __esm({
31023
30620
  2: "grid-cols-1 md:grid-cols-2",
31024
30621
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
31025
30622
  }[columns];
31026
- React106__default.useCallback(() => {
30623
+ React104__default.useCallback(() => {
31027
30624
  if (collapsible) {
31028
30625
  setCollapsed((prev) => !prev);
31029
30626
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -31973,7 +31570,7 @@ var init_Flex = __esm({
31973
31570
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
31974
31571
  }
31975
31572
  }
31976
- return React106__default.createElement(Component, {
31573
+ return React104__default.createElement(Component, {
31977
31574
  className: cn(
31978
31575
  inline ? "inline-flex" : "flex",
31979
31576
  directionStyles[direction],
@@ -32092,7 +31689,7 @@ var init_Grid = __esm({
32092
31689
  as: Component = "div"
32093
31690
  }) => {
32094
31691
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
32095
- return React106__default.createElement(
31692
+ return React104__default.createElement(
32096
31693
  Component,
32097
31694
  {
32098
31695
  className: cn(
@@ -32288,9 +31885,9 @@ var init_Popover = __esm({
32288
31885
  onMouseLeave: handleClose,
32289
31886
  onPointerDown: tapTriggerProps.onPointerDown
32290
31887
  };
32291
- const childElement = React106__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
31888
+ const childElement = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
32292
31889
  const childPointerDown = childElement.props.onPointerDown;
32293
- const triggerElement = React106__default.cloneElement(
31890
+ const triggerElement = React104__default.cloneElement(
32294
31891
  childElement,
32295
31892
  {
32296
31893
  ref: triggerRef,
@@ -32892,9 +32489,9 @@ var init_Tooltip = __esm({
32892
32489
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
32893
32490
  };
32894
32491
  }, []);
32895
- const triggerElement = React106__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
32492
+ const triggerElement = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
32896
32493
  const childPointerDown = triggerElement.props.onPointerDown;
32897
- const trigger = React106__default.cloneElement(triggerElement, {
32494
+ const trigger = React104__default.cloneElement(triggerElement, {
32898
32495
  ref: triggerRef,
32899
32496
  onMouseEnter: handleMouseEnter,
32900
32497
  onMouseLeave: handleMouseLeave,
@@ -32984,7 +32581,7 @@ var init_WizardProgress = __esm({
32984
32581
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
32985
32582
  const isActive = index === currentStep;
32986
32583
  const isCompleted = index < currentStep;
32987
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
32584
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
32988
32585
  /* @__PURE__ */ jsx(
32989
32586
  "button",
32990
32587
  {
@@ -34544,13 +34141,13 @@ var init_MapView = __esm({
34544
34141
  shadowSize: [41, 41]
34545
34142
  });
34546
34143
  L.Marker.prototype.options.icon = defaultIcon;
34547
- const { useEffect: useEffect73, useRef: useRef71, useCallback: useCallback109, useState: useState108 } = React106__default;
34144
+ const { useEffect: useEffect72, useRef: useRef69, useCallback: useCallback107, useState: useState107 } = React104__default;
34548
34145
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
34549
34146
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
34550
34147
  function MapUpdater({ centerLat, centerLng, zoom }) {
34551
34148
  const map = useMap();
34552
- const prevRef = useRef71({ centerLat, centerLng, zoom });
34553
- useEffect73(() => {
34149
+ const prevRef = useRef69({ centerLat, centerLng, zoom });
34150
+ useEffect72(() => {
34554
34151
  const prev = prevRef.current;
34555
34152
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
34556
34153
  map.setView([centerLat, centerLng], zoom);
@@ -34561,7 +34158,7 @@ var init_MapView = __esm({
34561
34158
  }
34562
34159
  function MapClickHandler({ onMapClick }) {
34563
34160
  const map = useMap();
34564
- useEffect73(() => {
34161
+ useEffect72(() => {
34565
34162
  if (!onMapClick) return;
34566
34163
  const handler = (e) => {
34567
34164
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -34589,8 +34186,8 @@ var init_MapView = __esm({
34589
34186
  showAttribution = true
34590
34187
  }) {
34591
34188
  const eventBus = useEventBus2();
34592
- const [clickedPosition, setClickedPosition] = useState108(null);
34593
- const handleMapClick = useCallback109((lat, lng) => {
34189
+ const [clickedPosition, setClickedPosition] = useState107(null);
34190
+ const handleMapClick = useCallback107((lat, lng) => {
34594
34191
  if (showClickedPin) {
34595
34192
  setClickedPosition({ lat, lng });
34596
34193
  }
@@ -34599,7 +34196,7 @@ var init_MapView = __esm({
34599
34196
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
34600
34197
  }
34601
34198
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
34602
- const handleMarkerClick = useCallback109((marker) => {
34199
+ const handleMarkerClick = useCallback107((marker) => {
34603
34200
  onMarkerClick?.(marker);
34604
34201
  if (markerClickEvent) {
34605
34202
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -35459,8 +35056,8 @@ function TableView({
35459
35056
  }) {
35460
35057
  const eventBus = useEventBus();
35461
35058
  const { t } = useTranslate();
35462
- const [visibleCount, setVisibleCount] = React106__default.useState(pageSize > 0 ? pageSize : Infinity);
35463
- 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());
35464
35061
  const colDefs = columns ?? fields ?? [];
35465
35062
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
35466
35063
  const dnd = useDataDnd({
@@ -35655,12 +35252,12 @@ function TableView({
35655
35252
  ]
35656
35253
  }
35657
35254
  );
35658
- 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);
35659
35256
  };
35660
35257
  const items = Array.from(data);
35661
35258
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
35662
35259
  let runningIndex = 0;
35663
- 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: [
35664
35261
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
35665
35262
  group.items.map((row) => renderRow(row, runningIndex++))
35666
35263
  ] }, gi)) });
@@ -37017,7 +36614,7 @@ var init_StepFlow = __esm({
37017
36614
  className
37018
36615
  }) => {
37019
36616
  if (orientation === "vertical") {
37020
- 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: [
37021
36618
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
37022
36619
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
37023
36620
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -37028,7 +36625,7 @@ var init_StepFlow = __esm({
37028
36625
  ] })
37029
36626
  ] }) }, index)) });
37030
36627
  }
37031
- 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: [
37032
36629
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
37033
36630
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
37034
36631
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -38013,7 +37610,7 @@ var init_LikertScale = __esm({
38013
37610
  md: "text-base",
38014
37611
  lg: "text-lg"
38015
37612
  };
38016
- LikertScale = React106__default.forwardRef(
37613
+ LikertScale = React104__default.forwardRef(
38017
37614
  ({
38018
37615
  question,
38019
37616
  options = DEFAULT_LIKERT_OPTIONS,
@@ -38025,7 +37622,7 @@ var init_LikertScale = __esm({
38025
37622
  variant = "radios",
38026
37623
  className
38027
37624
  }, ref) => {
38028
- const groupId = React106__default.useId();
37625
+ const groupId = React104__default.useId();
38029
37626
  const eventBus = useEventBus();
38030
37627
  const handleSelect = useCallback(
38031
37628
  (next) => {
@@ -40307,7 +39904,7 @@ var init_DocBreadcrumb = __esm({
40307
39904
  "aria-label": t("aria.breadcrumb"),
40308
39905
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
40309
39906
  const isLast = idx === items.length - 1;
40310
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
39907
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
40311
39908
  idx > 0 && /* @__PURE__ */ jsx(
40312
39909
  Icon,
40313
39910
  {
@@ -40971,7 +40568,7 @@ var init_PageHeader = __esm({
40971
40568
  info: "bg-info/10 text-info"
40972
40569
  };
40973
40570
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
40974
- 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: [
40975
40572
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
40976
40573
  crumb.href ? /* @__PURE__ */ jsx(
40977
40574
  "a",
@@ -41329,7 +40926,7 @@ var init_Section = __esm({
41329
40926
  as: Component = "section"
41330
40927
  }) => {
41331
40928
  const hasHeader = title || description || action;
41332
- return React106__default.createElement(
40929
+ return React104__default.createElement(
41333
40930
  Component,
41334
40931
  {
41335
40932
  className: cn(
@@ -41703,7 +41300,7 @@ var init_WizardContainer = __esm({
41703
41300
  const isCompleted = index < currentStep;
41704
41301
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
41705
41302
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
41706
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
41303
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
41707
41304
  /* @__PURE__ */ jsx(
41708
41305
  Button,
41709
41306
  {
@@ -44136,7 +43733,7 @@ var init_DetailPanel = __esm({
44136
43733
  }
44137
43734
  });
44138
43735
  function extractTitle(children) {
44139
- if (!React106__default.isValidElement(children)) return void 0;
43736
+ if (!React104__default.isValidElement(children)) return void 0;
44140
43737
  const props = children.props;
44141
43738
  if (typeof props.title === "string") {
44142
43739
  return props.title;
@@ -44486,12 +44083,12 @@ var init_Form = __esm({
44486
44083
  const isSchemaEntity = isOrbitalEntitySchema(entity);
44487
44084
  const resolvedEntity = isSchemaEntity ? entity : void 0;
44488
44085
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
44489
- const normalizedInitialData = React106__default.useMemo(() => {
44086
+ const normalizedInitialData = React104__default.useMemo(() => {
44490
44087
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
44491
44088
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
44492
44089
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
44493
44090
  }, [entity, initialData]);
44494
- const entityDerivedFields = React106__default.useMemo(() => {
44091
+ const entityDerivedFields = React104__default.useMemo(() => {
44495
44092
  if (fields && fields.length > 0) return void 0;
44496
44093
  if (!resolvedEntity) return void 0;
44497
44094
  return resolvedEntity.fields.map(
@@ -44512,16 +44109,16 @@ var init_Form = __esm({
44512
44109
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
44513
44110
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
44514
44111
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
44515
- const [formData, setFormData] = React106__default.useState(
44112
+ const [formData, setFormData] = React104__default.useState(
44516
44113
  normalizedInitialData
44517
44114
  );
44518
- const [collapsedSections, setCollapsedSections] = React106__default.useState(
44115
+ const [collapsedSections, setCollapsedSections] = React104__default.useState(
44519
44116
  /* @__PURE__ */ new Set()
44520
44117
  );
44521
- const [submitError, setSubmitError] = React106__default.useState(null);
44522
- const formRef = React106__default.useRef(null);
44118
+ const [submitError, setSubmitError] = React104__default.useState(null);
44119
+ const formRef = React104__default.useRef(null);
44523
44120
  const formMode = props.mode;
44524
- const mountedRef = React106__default.useRef(false);
44121
+ const mountedRef = React104__default.useRef(false);
44525
44122
  if (!mountedRef.current) {
44526
44123
  mountedRef.current = true;
44527
44124
  debug("forms", "mount", {
@@ -44534,7 +44131,7 @@ var init_Form = __esm({
44534
44131
  });
44535
44132
  }
44536
44133
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
44537
- const evalContext = React106__default.useMemo(
44134
+ const evalContext = React104__default.useMemo(
44538
44135
  () => ({
44539
44136
  formValues: formData,
44540
44137
  globalVariables: externalContext?.globalVariables ?? {},
@@ -44543,7 +44140,7 @@ var init_Form = __esm({
44543
44140
  }),
44544
44141
  [formData, externalContext]
44545
44142
  );
44546
- React106__default.useEffect(() => {
44143
+ React104__default.useEffect(() => {
44547
44144
  debug("forms", "initialData-sync", {
44548
44145
  mode: formMode,
44549
44146
  normalizedInitialData,
@@ -44554,7 +44151,7 @@ var init_Form = __esm({
44554
44151
  setFormData(normalizedInitialData);
44555
44152
  }
44556
44153
  }, [normalizedInitialData]);
44557
- const processCalculations = React106__default.useCallback(
44154
+ const processCalculations = React104__default.useCallback(
44558
44155
  (changedFieldId, newFormData) => {
44559
44156
  if (!hiddenCalculations.length) return;
44560
44157
  const context = {
@@ -44579,7 +44176,7 @@ var init_Form = __esm({
44579
44176
  },
44580
44177
  [hiddenCalculations, externalContext, eventBus]
44581
44178
  );
44582
- const checkViolations = React106__default.useCallback(
44179
+ const checkViolations = React104__default.useCallback(
44583
44180
  (changedFieldId, newFormData) => {
44584
44181
  if (!violationTriggers.length) return;
44585
44182
  const context = {
@@ -44617,7 +44214,7 @@ var init_Form = __esm({
44617
44214
  processCalculations(name, newFormData);
44618
44215
  checkViolations(name, newFormData);
44619
44216
  };
44620
- const isFieldVisible = React106__default.useCallback(
44217
+ const isFieldVisible = React104__default.useCallback(
44621
44218
  (fieldName) => {
44622
44219
  const condition = conditionalFields[fieldName];
44623
44220
  if (!condition) return true;
@@ -44625,7 +44222,7 @@ var init_Form = __esm({
44625
44222
  },
44626
44223
  [conditionalFields, evalContext]
44627
44224
  );
44628
- const isSectionVisible = React106__default.useCallback(
44225
+ const isSectionVisible = React104__default.useCallback(
44629
44226
  (section) => {
44630
44227
  if (!section.condition) return true;
44631
44228
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -44701,7 +44298,7 @@ var init_Form = __esm({
44701
44298
  eventBus.emit(`UI:${onCancel}`);
44702
44299
  }
44703
44300
  };
44704
- const renderField = React106__default.useCallback(
44301
+ const renderField = React104__default.useCallback(
44705
44302
  (field) => {
44706
44303
  const fieldName = field.name || field.field;
44707
44304
  if (!fieldName) return null;
@@ -44722,7 +44319,7 @@ var init_Form = __esm({
44722
44319
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
44723
44320
  );
44724
44321
  const effectiveFields = entityDerivedFields ?? fields;
44725
- const normalizedFields = React106__default.useMemo(() => {
44322
+ const normalizedFields = React104__default.useMemo(() => {
44726
44323
  if (!effectiveFields || effectiveFields.length === 0) return [];
44727
44324
  return effectiveFields.map((field) => {
44728
44325
  if (typeof field === "string") {
@@ -44746,7 +44343,7 @@ var init_Form = __esm({
44746
44343
  return field;
44747
44344
  });
44748
44345
  }, [effectiveFields, resolvedEntity]);
44749
- const schemaFields = React106__default.useMemo(() => {
44346
+ const schemaFields = React104__default.useMemo(() => {
44750
44347
  if (normalizedFields.length === 0) return null;
44751
44348
  if (isDebugEnabled()) {
44752
44349
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -44756,7 +44353,7 @@ var init_Form = __esm({
44756
44353
  }
44757
44354
  return normalizedFields.map(renderField).filter(Boolean);
44758
44355
  }, [normalizedFields, renderField, entityName, conditionalFields]);
44759
- const sectionElements = React106__default.useMemo(() => {
44356
+ const sectionElements = React104__default.useMemo(() => {
44760
44357
  if (!sections || sections.length === 0) return null;
44761
44358
  return sections.map((section) => {
44762
44359
  if (!isSectionVisible(section)) {
@@ -45481,7 +45078,7 @@ var init_List = __esm({
45481
45078
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
45482
45079
  return [];
45483
45080
  }, [entity]);
45484
- const getItemActions = React106__default.useCallback(
45081
+ const getItemActions = React104__default.useCallback(
45485
45082
  (item) => {
45486
45083
  if (!itemActions) return [];
45487
45084
  if (typeof itemActions === "function") {
@@ -45956,7 +45553,7 @@ var init_MediaGallery = __esm({
45956
45553
  [selectable, selectedItems, selectionEvent, eventBus]
45957
45554
  );
45958
45555
  const entityData = Array.isArray(entity) ? entity : [];
45959
- const items = React106__default.useMemo(() => {
45556
+ const items = React104__default.useMemo(() => {
45960
45557
  if (propItems) return propItems;
45961
45558
  if (entityData.length === 0) return [];
45962
45559
  return entityData.map((record, idx) => {
@@ -46119,7 +45716,7 @@ var init_MediaGallery = __esm({
46119
45716
  }
46120
45717
  });
46121
45718
  function extractTitle2(children) {
46122
- if (!React106__default.isValidElement(children)) return void 0;
45719
+ if (!React104__default.isValidElement(children)) return void 0;
46123
45720
  const props = children.props;
46124
45721
  if (typeof props.title === "string") {
46125
45722
  return props.title;
@@ -46393,7 +45990,7 @@ var init_debugRegistry = __esm({
46393
45990
  }
46394
45991
  });
46395
45992
  function useDebugData() {
46396
- const [data, setData] = React106.useState(() => ({
45993
+ const [data, setData] = React104.useState(() => ({
46397
45994
  traits: [],
46398
45995
  ticks: [],
46399
45996
  guards: [],
@@ -46407,7 +46004,7 @@ function useDebugData() {
46407
46004
  },
46408
46005
  lastUpdate: Date.now()
46409
46006
  }));
46410
- React106.useEffect(() => {
46007
+ React104.useEffect(() => {
46411
46008
  const updateData = () => {
46412
46009
  setData({
46413
46010
  traits: getAllTraits(),
@@ -46516,12 +46113,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
46516
46113
  return positions;
46517
46114
  }
46518
46115
  function WalkMinimap() {
46519
- const [walkStep, setWalkStep] = React106.useState(null);
46520
- const [traits2, setTraits] = React106.useState([]);
46521
- const [coveredEdges, setCoveredEdges] = React106.useState([]);
46522
- const [completedTraits, setCompletedTraits] = React106.useState(/* @__PURE__ */ new Set());
46523
- const prevTraitRef = React106.useRef(null);
46524
- 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(() => {
46525
46122
  const interval = setInterval(() => {
46526
46123
  const w = window;
46527
46124
  const step = w.__orbitalWalkStep;
@@ -46957,15 +46554,15 @@ var init_EntitiesTab = __esm({
46957
46554
  });
46958
46555
  function EventFlowTab({ events: events2 }) {
46959
46556
  const { t } = useTranslate();
46960
- const [filter, setFilter] = React106.useState("all");
46961
- const containerRef = React106.useRef(null);
46962
- const [autoScroll, setAutoScroll] = React106.useState(true);
46963
- 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(() => {
46964
46561
  if (autoScroll && containerRef.current) {
46965
46562
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
46966
46563
  }
46967
46564
  }, [events2.length, autoScroll]);
46968
- const filteredEvents = React106.useMemo(() => {
46565
+ const filteredEvents = React104.useMemo(() => {
46969
46566
  if (filter === "all") return events2;
46970
46567
  return events2.filter((e) => e.type === filter);
46971
46568
  }, [events2, filter]);
@@ -47081,7 +46678,7 @@ var init_EventFlowTab = __esm({
47081
46678
  });
47082
46679
  function GuardsPanel({ guards }) {
47083
46680
  const { t } = useTranslate();
47084
- const [filter, setFilter] = React106.useState("all");
46681
+ const [filter, setFilter] = React104.useState("all");
47085
46682
  if (guards.length === 0) {
47086
46683
  return /* @__PURE__ */ jsx(
47087
46684
  EmptyState,
@@ -47094,7 +46691,7 @@ function GuardsPanel({ guards }) {
47094
46691
  }
47095
46692
  const passedCount = guards.filter((g) => g.result).length;
47096
46693
  const failedCount = guards.length - passedCount;
47097
- const filteredGuards = React106.useMemo(() => {
46694
+ const filteredGuards = React104.useMemo(() => {
47098
46695
  if (filter === "all") return guards;
47099
46696
  if (filter === "passed") return guards.filter((g) => g.result);
47100
46697
  return guards.filter((g) => !g.result);
@@ -47257,10 +46854,10 @@ function EffectBadge({ effect }) {
47257
46854
  }
47258
46855
  function TransitionTimeline({ transitions }) {
47259
46856
  const { t } = useTranslate();
47260
- const containerRef = React106.useRef(null);
47261
- const [autoScroll, setAutoScroll] = React106.useState(true);
47262
- const [expandedId, setExpandedId] = React106.useState(null);
47263
- 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(() => {
47264
46861
  if (autoScroll && containerRef.current) {
47265
46862
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
47266
46863
  }
@@ -47540,9 +47137,9 @@ function getAllEvents(traits2) {
47540
47137
  function EventDispatcherTab({ traits: traits2, schema }) {
47541
47138
  const eventBus = useEventBus();
47542
47139
  const { t } = useTranslate();
47543
- const [log11, setLog] = React106.useState([]);
47544
- const prevStatesRef = React106.useRef(/* @__PURE__ */ new Map());
47545
- React106.useEffect(() => {
47140
+ const [log11, setLog] = React104.useState([]);
47141
+ const prevStatesRef = React104.useRef(/* @__PURE__ */ new Map());
47142
+ React104.useEffect(() => {
47546
47143
  for (const trait of traits2) {
47547
47144
  const prev = prevStatesRef.current.get(trait.id);
47548
47145
  if (prev && prev !== trait.currentState) {
@@ -47711,10 +47308,10 @@ function VerifyModePanel({
47711
47308
  localCount
47712
47309
  }) {
47713
47310
  const { t } = useTranslate();
47714
- const [expanded, setExpanded] = React106.useState(true);
47715
- const scrollRef = React106.useRef(null);
47716
- const prevCountRef = React106.useRef(0);
47717
- React106.useEffect(() => {
47311
+ const [expanded, setExpanded] = React104.useState(true);
47312
+ const scrollRef = React104.useRef(null);
47313
+ const prevCountRef = React104.useRef(0);
47314
+ React104.useEffect(() => {
47718
47315
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
47719
47316
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
47720
47317
  }
@@ -47771,10 +47368,10 @@ function RuntimeDebugger({
47771
47368
  schema
47772
47369
  }) {
47773
47370
  const { t } = useTranslate();
47774
- const [isCollapsed, setIsCollapsed] = React106.useState(mode === "verify" ? true : defaultCollapsed);
47775
- 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());
47776
47373
  const debugData = useDebugData();
47777
- React106.useEffect(() => {
47374
+ React104.useEffect(() => {
47778
47375
  if (mode === "inline") return;
47779
47376
  return onDebugToggle((enabled) => {
47780
47377
  setIsVisible(enabled);
@@ -47783,7 +47380,7 @@ function RuntimeDebugger({
47783
47380
  }
47784
47381
  });
47785
47382
  }, [mode]);
47786
- React106.useEffect(() => {
47383
+ React104.useEffect(() => {
47787
47384
  if (mode === "inline") return;
47788
47385
  const handleKeyDown = (e) => {
47789
47386
  if (e.key === "`" && isVisible) {
@@ -48303,7 +47900,7 @@ var init_StatCard = __esm({
48303
47900
  const labelToUse = propLabel ?? propTitle;
48304
47901
  const eventBus = useEventBus();
48305
47902
  const { t } = useTranslate();
48306
- const handleActionClick = React106__default.useCallback(() => {
47903
+ const handleActionClick = React104__default.useCallback(() => {
48307
47904
  if (action?.event) {
48308
47905
  eventBus.emit(`UI:${action.event}`, {});
48309
47906
  }
@@ -48314,7 +47911,7 @@ var init_StatCard = __esm({
48314
47911
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
48315
47912
  const isLoading = externalLoading ?? false;
48316
47913
  const error = externalError;
48317
- const computeMetricValue = React106__default.useCallback(
47914
+ const computeMetricValue = React104__default.useCallback(
48318
47915
  (metric, items) => {
48319
47916
  if (metric.value !== void 0) {
48320
47917
  return metric.value;
@@ -48353,7 +47950,7 @@ var init_StatCard = __esm({
48353
47950
  },
48354
47951
  []
48355
47952
  );
48356
- const schemaStats = React106__default.useMemo(() => {
47953
+ const schemaStats = React104__default.useMemo(() => {
48357
47954
  if (!metrics || metrics.length === 0) return null;
48358
47955
  return metrics.map((metric) => ({
48359
47956
  label: metric.label,
@@ -48361,7 +47958,7 @@ var init_StatCard = __esm({
48361
47958
  format: metric.format
48362
47959
  }));
48363
47960
  }, [metrics, data, computeMetricValue]);
48364
- const calculatedTrend = React106__default.useMemo(() => {
47961
+ const calculatedTrend = React104__default.useMemo(() => {
48365
47962
  if (manualTrend !== void 0) return manualTrend;
48366
47963
  if (previousValue === void 0 || currentValue === void 0)
48367
47964
  return void 0;
@@ -49001,8 +48598,8 @@ var init_SubagentTracePanel = __esm({
49001
48598
  ] });
49002
48599
  };
49003
48600
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
49004
- const endRef = React106__default.useRef(null);
49005
- React106__default.useEffect(() => {
48601
+ const endRef = React104__default.useRef(null);
48602
+ React104__default.useEffect(() => {
49006
48603
  if (!autoScroll) return;
49007
48604
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
49008
48605
  }, [activities.length, autoScroll]);
@@ -49096,7 +48693,7 @@ var init_SubagentTracePanel = __esm({
49096
48693
  };
49097
48694
  SubagentRichCard = ({ subagent }) => {
49098
48695
  const { t } = useTranslate();
49099
- const activities = React106__default.useMemo(
48696
+ const activities = React104__default.useMemo(
49100
48697
  () => subagentMessagesToActivities(subagent.messages),
49101
48698
  [subagent.messages]
49102
48699
  );
@@ -49173,8 +48770,8 @@ var init_SubagentTracePanel = __esm({
49173
48770
  ] });
49174
48771
  };
49175
48772
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
49176
- const endRef = React106__default.useRef(null);
49177
- React106__default.useEffect(() => {
48773
+ const endRef = React104__default.useRef(null);
48774
+ React104__default.useEffect(() => {
49178
48775
  if (!autoScroll) return;
49179
48776
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
49180
48777
  }, [messages.length, autoScroll]);
@@ -49604,7 +49201,7 @@ var init_Timeline = __esm({
49604
49201
  }) => {
49605
49202
  const { t } = useTranslate();
49606
49203
  const entityData = entity ?? [];
49607
- const items = React106__default.useMemo(() => {
49204
+ const items = React104__default.useMemo(() => {
49608
49205
  if (propItems) return propItems;
49609
49206
  if (entityData.length === 0) return [];
49610
49207
  return entityData.map((record, idx) => {
@@ -49706,7 +49303,7 @@ var init_Timeline = __esm({
49706
49303
  }
49707
49304
  });
49708
49305
  function extractToastProps(children) {
49709
- if (!React106__default.isValidElement(children)) {
49306
+ if (!React104__default.isValidElement(children)) {
49710
49307
  if (typeof children === "string") {
49711
49308
  return { message: children };
49712
49309
  }
@@ -49748,7 +49345,7 @@ var init_ToastSlot = __esm({
49748
49345
  eventBus.emit(`${prefix}CLOSE`);
49749
49346
  };
49750
49347
  if (!isVisible) return null;
49751
- const isCustomContent = React106__default.isValidElement(children) && !message;
49348
+ const isCustomContent = React104__default.isValidElement(children) && !message;
49752
49349
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
49753
49350
  Toast,
49754
49351
  {
@@ -49765,7 +49362,7 @@ var init_ToastSlot = __esm({
49765
49362
  }
49766
49363
  });
49767
49364
  function lazyThree(name, loader) {
49768
- const Lazy = React106__default.lazy(
49365
+ const Lazy = React104__default.lazy(
49769
49366
  () => loader().then((m) => {
49770
49367
  const Resolved = m[name];
49771
49368
  if (!Resolved) {
@@ -49777,13 +49374,13 @@ function lazyThree(name, loader) {
49777
49374
  })
49778
49375
  );
49779
49376
  function ThreeWrapper(props) {
49780
- return React106__default.createElement(
49377
+ return React104__default.createElement(
49781
49378
  ThreeBoundary,
49782
49379
  { name },
49783
- React106__default.createElement(
49784
- React106__default.Suspense,
49380
+ React104__default.createElement(
49381
+ React104__default.Suspense,
49785
49382
  { fallback: null },
49786
- React106__default.createElement(Lazy, props)
49383
+ React104__default.createElement(Lazy, props)
49787
49384
  )
49788
49385
  );
49789
49386
  }
@@ -49825,7 +49422,6 @@ var init_component_registry_generated = __esm({
49825
49422
  init_Canvas2D();
49826
49423
  init_CanvasEffect();
49827
49424
  init_Card();
49828
- init_CardBattlerBoard();
49829
49425
  init_CardGrid();
49830
49426
  init_Carousel();
49831
49427
  init_CaseStudyCard();
@@ -50056,13 +49652,12 @@ var init_component_registry_generated = __esm({
50056
49652
  init_UploadDropZone();
50057
49653
  init_VersionDiff();
50058
49654
  init_ViolationAlert();
50059
- init_VisualNovelBoard();
50060
49655
  init_VoteStack();
50061
49656
  init_WaypointMarker();
50062
49657
  init_WizardContainer();
50063
49658
  init_WizardNavigation();
50064
49659
  init_WizardProgress();
50065
- ThreeBoundary = class extends React106__default.Component {
49660
+ ThreeBoundary = class extends React104__default.Component {
50066
49661
  constructor() {
50067
49662
  super(...arguments);
50068
49663
  __publicField(this, "state", { failed: false });
@@ -50072,7 +49667,7 @@ var init_component_registry_generated = __esm({
50072
49667
  }
50073
49668
  render() {
50074
49669
  if (this.state.failed) {
50075
- return React106__default.createElement(
49670
+ return React104__default.createElement(
50076
49671
  "div",
50077
49672
  {
50078
49673
  "data-testid": "three-unavailable",
@@ -50126,7 +49721,6 @@ var init_component_registry_generated = __esm({
50126
49721
  "Canvas2D": Canvas2D,
50127
49722
  "CanvasEffect": CanvasEffect,
50128
49723
  "Card": Card,
50129
- "CardBattlerBoard": CardBattlerBoard,
50130
49724
  "CardGrid": CardGrid,
50131
49725
  "Carousel": Carousel,
50132
49726
  "CaseStudyCard": CaseStudyCard,
@@ -50371,7 +49965,6 @@ var init_component_registry_generated = __esm({
50371
49965
  "VStack": VStack,
50372
49966
  "VersionDiff": VersionDiff,
50373
49967
  "ViolationAlert": ViolationAlert,
50374
- "VisualNovelBoard": VisualNovelBoard,
50375
49968
  "VoteStack": VoteStack,
50376
49969
  "WaypointMarker": WaypointMarker,
50377
49970
  "WizardContainer": WizardContainer,
@@ -50395,7 +49988,7 @@ function SuspenseConfigProvider({
50395
49988
  config,
50396
49989
  children
50397
49990
  }) {
50398
- return React106__default.createElement(
49991
+ return React104__default.createElement(
50399
49992
  SuspenseConfigContext.Provider,
50400
49993
  { value: config },
50401
49994
  children
@@ -50437,7 +50030,7 @@ function enrichFormFields(fields, entityDef) {
50437
50030
  }
50438
50031
  return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
50439
50032
  }
50440
- 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)) {
50441
50034
  const obj = field;
50442
50035
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
50443
50036
  if (!fieldName) return field;
@@ -50890,7 +50483,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
50890
50483
  const key = `${parentId}-${index}-trait:${traitName}`;
50891
50484
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
50892
50485
  }
50893
- return /* @__PURE__ */ jsx(React106__default.Fragment, { children: child }, `${parentId}-${index}`);
50486
+ return /* @__PURE__ */ jsx(React104__default.Fragment, { children: child }, `${parentId}-${index}`);
50894
50487
  }
50895
50488
  if (!child || typeof child !== "object") return null;
50896
50489
  const childId = `${parentId}-${index}`;
@@ -50930,14 +50523,14 @@ function isPatternConfig(value) {
50930
50523
  if (value === null || value === void 0) return false;
50931
50524
  if (typeof value !== "object") return false;
50932
50525
  if (Array.isArray(value)) return false;
50933
- if (React106__default.isValidElement(value)) return false;
50526
+ if (React104__default.isValidElement(value)) return false;
50934
50527
  if (value instanceof Date) return false;
50935
50528
  if (typeof value === "function") return false;
50936
50529
  const record = value;
50937
50530
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
50938
50531
  }
50939
50532
  function isPlainConfigObject(value) {
50940
- if (React106__default.isValidElement(value)) return false;
50533
+ if (React104__default.isValidElement(value)) return false;
50941
50534
  if (value instanceof Date) return false;
50942
50535
  const proto = Object.getPrototypeOf(value);
50943
50536
  return proto === Object.prototype || proto === null;
@@ -51063,7 +50656,7 @@ function SlotContentRenderer({
51063
50656
  for (const slotKey of CONTENT_NODE_SLOTS) {
51064
50657
  const slotVal = restProps[slotKey];
51065
50658
  if (slotVal === void 0 || slotVal === null) continue;
51066
- 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;
51067
50660
  if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
51068
50661
  nodeSlotOverrides[slotKey] = renderPatternChildren(
51069
50662
  slotVal,
@@ -51112,7 +50705,7 @@ function SlotContentRenderer({
51112
50705
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
51113
50706
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
51114
50707
  const sample = resolvedItems[0];
51115
- 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)) {
51116
50709
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
51117
50710
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
51118
50711
  }
@@ -51475,7 +51068,7 @@ var AvlTransition = ({
51475
51068
  opacity = 1,
51476
51069
  className
51477
51070
  }) => {
51478
- const ids = React106__default.useMemo(() => {
51071
+ const ids = React104__default.useMemo(() => {
51479
51072
  avlTransitionId += 1;
51480
51073
  return { arrow: `avl-tr-${avlTransitionId}-arrow` };
51481
51074
  }, []);
@@ -52036,7 +51629,7 @@ var AvlStateMachine = ({
52036
51629
  color = "var(--color-primary)",
52037
51630
  animated = false
52038
51631
  }) => {
52039
- const ids = React106__default.useMemo(() => {
51632
+ const ids = React104__default.useMemo(() => {
52040
51633
  avlSmId += 1;
52041
51634
  const base = `avl-sm-${avlSmId}`;
52042
51635
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -52235,7 +51828,7 @@ var AvlOrbitalUnit = ({
52235
51828
  color = "var(--color-primary)",
52236
51829
  animated = false
52237
51830
  }) => {
52238
- const ids = React106__default.useMemo(() => {
51831
+ const ids = React104__default.useMemo(() => {
52239
51832
  avlOuId += 1;
52240
51833
  const base = `avl-ou-${avlOuId}`;
52241
51834
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -52331,7 +51924,7 @@ var AvlClosedCircuit = ({
52331
51924
  color = "var(--color-primary)",
52332
51925
  animated = false
52333
51926
  }) => {
52334
- const ids = React106__default.useMemo(() => {
51927
+ const ids = React104__default.useMemo(() => {
52335
51928
  avlCcId += 1;
52336
51929
  const base = `avl-cc-${avlCcId}`;
52337
51930
  return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
@@ -52486,7 +52079,7 @@ var AvlEmitListen = ({
52486
52079
  color = "var(--color-primary)",
52487
52080
  animated = false
52488
52081
  }) => {
52489
- const ids = React106__default.useMemo(() => {
52082
+ const ids = React104__default.useMemo(() => {
52490
52083
  avlElId += 1;
52491
52084
  const base = `avl-el-${avlElId}`;
52492
52085
  return { arrow: `${base}-arrow`, grad: `${base}-grad` };
@@ -52760,7 +52353,7 @@ function renderNode(node, color, glowId) {
52760
52353
  const baseR = node.type === "operator" ? 20 : 16;
52761
52354
  const r2 = Math.max(baseR, labelLen * 3.5 + 6);
52762
52355
  const nc = nodeColor(node.type, color);
52763
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
52356
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
52764
52357
  node.children.map((child, i) => {
52765
52358
  const childR = Math.max(
52766
52359
  child.type === "operator" ? 20 : 16,
@@ -52817,7 +52410,7 @@ var AvlExprTree = ({
52817
52410
  className,
52818
52411
  color = "var(--color-primary)"
52819
52412
  }) => {
52820
- const ids = React106__default.useMemo(() => {
52413
+ const ids = React104__default.useMemo(() => {
52821
52414
  avlEtId += 1;
52822
52415
  return { glow: `avl-et-${avlEtId}-glow` };
52823
52416
  }, []);
@@ -53652,7 +53245,7 @@ var SystemNode = ({ data }) => {
53652
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) => {
53653
53246
  const tc = transitionCounts[s.name] ?? 0;
53654
53247
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
53655
- return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
53248
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
53656
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 }),
53657
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 })
53658
53251
  ] }, s.name);
@@ -54797,7 +54390,7 @@ function resolveLambdaBindings(body, params, item, index) {
54797
54390
  if (Array.isArray(body)) {
54798
54391
  return body.map((b) => recur(b));
54799
54392
  }
54800
- 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") {
54801
54394
  const out = {};
54802
54395
  for (const [k, v] of Object.entries(body)) {
54803
54396
  out[k] = recur(v);
@@ -54816,7 +54409,7 @@ function getSlotContentRenderer2() {
54816
54409
  function makeLambdaFn(params, lambdaBody, callerKey) {
54817
54410
  return (item, index) => {
54818
54411
  const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
54819
- 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) {
54820
54413
  return null;
54821
54414
  }
54822
54415
  const record = resolvedBody;
@@ -54835,7 +54428,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
54835
54428
  props: childProps,
54836
54429
  priority: 0
54837
54430
  };
54838
- return React106__default.createElement(SlotContentRenderer2, { content: childContent });
54431
+ return React104__default.createElement(SlotContentRenderer2, { content: childContent });
54839
54432
  };
54840
54433
  }
54841
54434
  function convertNode(node, callerKey) {
@@ -54854,7 +54447,7 @@ function convertNode(node, callerKey) {
54854
54447
  });
54855
54448
  return anyChanged ? mapped : node;
54856
54449
  }
54857
- if (typeof node === "object" && !React106__default.isValidElement(node) && !(node instanceof Date)) {
54450
+ if (typeof node === "object" && !React104__default.isValidElement(node) && !(node instanceof Date)) {
54858
54451
  return convertObjectProps(node);
54859
54452
  }
54860
54453
  return node;
@@ -56517,8 +56110,8 @@ function CanvasDndProvider({
56517
56110
  }) {
56518
56111
  const eventBus = useEventBus();
56519
56112
  const sensors = useAlmadarDndSensors(false);
56520
- const [activePayload, setActivePayload] = React106__default.useState(null);
56521
- const handleDragStart = React106__default.useCallback((e) => {
56113
+ const [activePayload, setActivePayload] = React104__default.useState(null);
56114
+ const handleDragStart = React104__default.useCallback((e) => {
56522
56115
  const data = e.active.data.current;
56523
56116
  const payload = data?.payload;
56524
56117
  if (payload) {
@@ -56529,7 +56122,7 @@ function CanvasDndProvider({
56529
56122
  log9.warn("dragStart:missing-payload", { id: e.active.id });
56530
56123
  }
56531
56124
  }, [eventBus]);
56532
- const handleDragEnd = React106__default.useCallback((e) => {
56125
+ const handleDragEnd = React104__default.useCallback((e) => {
56533
56126
  setActivePayload(null);
56534
56127
  const activeData = e.active.data.current;
56535
56128
  const payload = activeData?.payload;
@@ -56558,7 +56151,7 @@ function CanvasDndProvider({
56558
56151
  const suppressed = onDrop ? onDrop(drop) === true : false;
56559
56152
  if (!suppressed) defaultEmit(eventBus, drop);
56560
56153
  }, [eventBus, onDrop]);
56561
- const handleDragCancel = React106__default.useCallback(() => {
56154
+ const handleDragCancel = React104__default.useCallback(() => {
56562
56155
  setActivePayload(null);
56563
56156
  log9.info("dragCancel");
56564
56157
  }, []);
@@ -57316,7 +56909,7 @@ var OrbPreviewNodeInner = (props) => {
57316
56909
  }
57317
56910
  );
57318
56911
  };
57319
- var OrbPreviewNode = React106__default.memo(OrbPreviewNodeInner);
56912
+ var OrbPreviewNode = React104__default.memo(OrbPreviewNodeInner);
57320
56913
  OrbPreviewNode.displayName = "OrbPreviewNode";
57321
56914
  orbPreviewLog.debug("export-resolved", () => ({
57322
56915
  type: typeof OrbPreviewNode,
@@ -57421,7 +57014,7 @@ var EventFlowEdgeInner = (props) => {
57421
57014
  ) })
57422
57015
  ] });
57423
57016
  };
57424
- var EventFlowEdge = React106__default.memo(EventFlowEdgeInner);
57017
+ var EventFlowEdge = React104__default.memo(EventFlowEdgeInner);
57425
57018
  EventFlowEdge.displayName = "EventFlowEdge";
57426
57019
 
57427
57020
  // components/avl/molecules/BehaviorComposeNode.tsx
@@ -57568,7 +57161,7 @@ var BehaviorComposeNodeInner = (props) => {
57568
57161
  }
57569
57162
  );
57570
57163
  };
57571
- var BehaviorComposeNode = React106__default.memo(BehaviorComposeNodeInner);
57164
+ var BehaviorComposeNode = React104__default.memo(BehaviorComposeNodeInner);
57572
57165
  BehaviorComposeNode.displayName = "BehaviorComposeNode";
57573
57166
 
57574
57167
  // components/avl/lib/avl-behavior-compose-converter.ts
@@ -58594,7 +58187,7 @@ var TraitCardNodeInner = (props) => {
58594
58187
  }
58595
58188
  );
58596
58189
  };
58597
- var TraitCardNode = React106__default.memo(TraitCardNodeInner);
58190
+ var TraitCardNode = React104__default.memo(TraitCardNodeInner);
58598
58191
  TraitCardNode.displayName = "TraitCardNode";
58599
58192
 
58600
58193
  // components/avl/organisms/FlowCanvas.tsx
@@ -58667,7 +58260,7 @@ function FlowCanvasInner({
58667
58260
  initialOrbital
58668
58261
  );
58669
58262
  const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
58670
- const screenSizeUserOverrideRef = React106__default.useRef(false);
58263
+ const screenSizeUserOverrideRef = React104__default.useRef(false);
58671
58264
  const [screenSize, setScreenSize] = useState(
58672
58265
  () => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
58673
58266
  );
@@ -59051,7 +58644,7 @@ var ZoomBreadcrumb = ({
59051
58644
  if (eventName && band === "detail") {
59052
58645
  segments.push({ icon: "\u26A1", label: eventName });
59053
58646
  }
59054
- 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: [
59055
58648
  i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
59056
58649
  /* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
59057
58650
  /* @__PURE__ */ jsx("span", { children: seg.label })
@@ -59392,7 +58985,7 @@ var EventWireOverlay = ({
59392
58985
  containerW,
59393
58986
  containerH
59394
58987
  }) => {
59395
- const ids = React106__default.useMemo(() => {
58988
+ const ids = React104__default.useMemo(() => {
59396
58989
  avlOczWireId += 1;
59397
58990
  return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
59398
58991
  }, []);
@@ -59759,7 +59352,7 @@ var AvlOrbitalsCosmicZoom = ({
59759
59352
  borderRadius: 6,
59760
59353
  border: `1px solid ${color}`
59761
59354
  },
59762
- 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: [
59763
59356
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
59764
59357
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
59765
59358
  Box,