@workflow/web 4.1.11 → 4.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/build/client/assets/{encryption-Bd25Keng.js → encryption-BRhjWsZh.js} +1 -1
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-BmmQMQWQ.js → highlighted-body-B3W2YXNL-BAYKR78e.js} +1 -1
  3. package/build/client/assets/{home-D5gYz0XH.js → home-Dfsfdnb8.js} +3 -3
  4. package/build/client/assets/{index-7hulCzI_.js → index-DZSXezpI.js} +0 -2
  5. package/build/client/assets/{manifest-a1c479ba.js → manifest-512e97b8.js} +1 -1
  6. package/build/client/assets/{mermaid-3ZIDBTTL-CWOyQBTZ.js → mermaid-3ZIDBTTL-B6kYjVMX.js} +1146 -370
  7. package/build/client/assets/mermaid-3ZIDBTTL-yyHEMZs4.css +1 -0
  8. package/build/client/assets/root-BOS11TzD.css +1 -0
  9. package/build/client/assets/{root-axkUVsvL.js → root-wB6lxnL8.js} +1 -1
  10. package/build/client/assets/{run-detail-ldKIjs8Z.js → run-detail-hWiDiLfl.js} +90 -148
  11. package/build/client/assets/server-build-CNEy-GiI.css +1 -0
  12. package/build/client/assets/{workflow-graph-viewer-CLv3yYv8.js → workflow-graph-viewer-D_Ulka_4.js} +4919 -4918
  13. package/build/server/assets/{app-BR0o9iNl.js → app-nwg8-luA.js} +1 -1
  14. package/build/server/assets/{highlighted-body-B3W2YXNL-BeWNj3yf.js → highlighted-body-B3W2YXNL-DVC2INnQ.js} +2 -2
  15. package/build/server/assets/{index-rguLY73T.js → index-B6jlFuhu.js} +36 -26
  16. package/build/server/assets/{mermaid-3ZIDBTTL-Akc2Gx2g.js → mermaid-3ZIDBTTL-CQrdOUbt.js} +2 -2
  17. package/build/server/assets/{server-build-dI1gM6-m.js → server-build-X-sv9tml.js} +11344 -9746
  18. package/build/server/assets/{token-D7Mmh4mK.js → token-ivPwH5nT.js} +2 -2
  19. package/build/server/assets/{token-util-DvAHyiW3.js → token-util-DQ4uPgvu.js} +2 -2
  20. package/build/server/index.js +1 -1
  21. package/package.json +6 -6
  22. package/build/client/assets/mermaid-3ZIDBTTL-DKxHcEOp.css +0 -1
  23. package/build/client/assets/root-aMfmV5uh.css +0 -1
  24. package/build/client/assets/server-build-CiTtikBY.css +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-Bd25Keng.js","assets/index-7hulCzI_.js","assets/index-BsV8i_Jn.js","assets/highlighted-body-B3W2YXNL-BmmQMQWQ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-BRhjWsZh.js","assets/index-DZSXezpI.js","assets/index-BsV8i_Jn.js","assets/highlighted-body-B3W2YXNL-BAYKR78e.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -2376,7 +2376,7 @@ var Arrow$2 = reactExports.forwardRef((props, forwardedRef) => {
2376
2376
  );
2377
2377
  });
2378
2378
  Arrow$2.displayName = NAME$1;
2379
- var Root$1 = Arrow$2;
2379
+ var Root$2 = Arrow$2;
2380
2380
  function useSize(element2) {
2381
2381
  const [size2, setSize] = reactExports.useState(void 0);
2382
2382
  useLayoutEffect2(() => {
@@ -2623,7 +2623,7 @@ var PopperArrow = reactExports.forwardRef(function PopperArrow2(props, forwarded
2623
2623
  visibility: contentContext.shouldHideArrow ? "hidden" : void 0
2624
2624
  },
2625
2625
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
2626
- Root$1,
2626
+ Root$2,
2627
2627
  {
2628
2628
  ...arrowProps,
2629
2629
  ref: forwardedRef,
@@ -2898,7 +2898,7 @@ var VisuallyHidden = reactExports.forwardRef(
2898
2898
  }
2899
2899
  );
2900
2900
  VisuallyHidden.displayName = NAME;
2901
- var Root = VisuallyHidden;
2901
+ var Root$1 = VisuallyHidden;
2902
2902
  var [createTooltipContext] = createContextScope("Tooltip", [
2903
2903
  createPopperScope
2904
2904
  ]);
@@ -3224,7 +3224,7 @@ var TooltipContentImpl = reactExports.forwardRef(
3224
3224
  },
3225
3225
  children: [
3226
3226
  /* @__PURE__ */ jsxRuntimeExports.jsx(Slottable$1, { children: children2 }),
3227
- /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children2 }) })
3227
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$1, { id: context.contentId, role: "tooltip", children: ariaLabel || children2 }) })
3228
3228
  ]
3229
3229
  }
3230
3230
  )
@@ -6548,6 +6548,54 @@ const getDefaultConfig = () => {
6548
6548
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
6549
6549
  };
6550
6550
  };
6551
+ const mergeConfigs = (baseConfig, {
6552
+ cacheSize,
6553
+ prefix,
6554
+ experimentalParseClassName,
6555
+ extend: extend2 = {},
6556
+ override = {}
6557
+ }) => {
6558
+ overrideProperty(baseConfig, "cacheSize", cacheSize);
6559
+ overrideProperty(baseConfig, "prefix", prefix);
6560
+ overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
6561
+ overrideConfigProperties(baseConfig.theme, override.theme);
6562
+ overrideConfigProperties(baseConfig.classGroups, override.classGroups);
6563
+ overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);
6564
+ overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);
6565
+ overrideProperty(baseConfig, "orderSensitiveModifiers", override.orderSensitiveModifiers);
6566
+ mergeConfigProperties(baseConfig.theme, extend2.theme);
6567
+ mergeConfigProperties(baseConfig.classGroups, extend2.classGroups);
6568
+ mergeConfigProperties(baseConfig.conflictingClassGroups, extend2.conflictingClassGroups);
6569
+ mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend2.conflictingClassGroupModifiers);
6570
+ mergeArrayProperties(baseConfig, extend2, "orderSensitiveModifiers");
6571
+ return baseConfig;
6572
+ };
6573
+ const overrideProperty = (baseObject, overrideKey, overrideValue) => {
6574
+ if (overrideValue !== void 0) {
6575
+ baseObject[overrideKey] = overrideValue;
6576
+ }
6577
+ };
6578
+ const overrideConfigProperties = (baseObject, overrideObject) => {
6579
+ if (overrideObject) {
6580
+ for (const key in overrideObject) {
6581
+ overrideProperty(baseObject, key, overrideObject[key]);
6582
+ }
6583
+ }
6584
+ };
6585
+ const mergeConfigProperties = (baseObject, mergeObject) => {
6586
+ if (mergeObject) {
6587
+ for (const key in mergeObject) {
6588
+ mergeArrayProperties(baseObject, mergeObject, key);
6589
+ }
6590
+ }
6591
+ };
6592
+ const mergeArrayProperties = (baseObject, mergeObject, key) => {
6593
+ const mergeValue = mergeObject[key];
6594
+ if (mergeValue !== void 0) {
6595
+ baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;
6596
+ }
6597
+ };
6598
+ const extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
6551
6599
  const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
6552
6600
  /**
6553
6601
  * @license lucide-react v0.575.0 - ISC
@@ -6692,70 +6740,78 @@ const __iconNode = [
6692
6740
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
6693
6741
  ];
6694
6742
  const Lock = createLucideIcon("lock", __iconNode);
6695
- function cn$4(...inputs) {
6696
- return twMerge(clsx(inputs));
6697
- }
6698
- const durationFormatter = new Intl.NumberFormat(void 0, {
6699
- maximumFractionDigits: 2
6700
- });
6701
- const MS_IN_SECOND = 1e3;
6702
- const MS_IN_MINUTE = 60 * MS_IN_SECOND;
6703
- const MS_IN_HOUR = 60 * MS_IN_MINUTE;
6704
- const MS_IN_DAY = 24 * MS_IN_HOUR;
6705
- function formatDuration(ms, compact = false) {
6706
- if (ms === 0) {
6707
- return "0";
6708
- }
6709
- if (ms < MS_IN_SECOND) {
6710
- return `${durationFormatter.format(ms)}ms`;
6711
- }
6712
- if (ms < MS_IN_MINUTE) {
6713
- return `${durationFormatter.format(ms / MS_IN_SECOND)}s`;
6714
- }
6715
- if (compact) {
6716
- if (ms < MS_IN_HOUR) {
6717
- const m3 = Math.floor(ms / MS_IN_MINUTE);
6718
- const s2 = Math.floor(ms % MS_IN_MINUTE / MS_IN_SECOND);
6719
- return s2 > 0 ? `${m3}m ${s2}s` : `${m3}m`;
6743
+ const twMergeConfig = {
6744
+ extend: {
6745
+ classGroups: {
6746
+ "text-heading": [
6747
+ {
6748
+ "text-heading": [
6749
+ "72",
6750
+ "64",
6751
+ "56",
6752
+ "48",
6753
+ "40",
6754
+ "32",
6755
+ "24",
6756
+ "20",
6757
+ "16",
6758
+ "14"
6759
+ ]
6760
+ }
6761
+ ],
6762
+ "text-button": [
6763
+ {
6764
+ "text-button": ["16", "14", "12"]
6765
+ }
6766
+ ],
6767
+ "text-label": [
6768
+ {
6769
+ "text-label": [
6770
+ "20",
6771
+ "18",
6772
+ "16",
6773
+ "14",
6774
+ "14-mono",
6775
+ "13",
6776
+ "13-mono",
6777
+ "12",
6778
+ "12-mono"
6779
+ ]
6780
+ }
6781
+ ],
6782
+ "text-copy": [
6783
+ {
6784
+ "text-copy": ["24", "20", "18", "16", "14", "13", "13-mono"]
6785
+ }
6786
+ ],
6787
+ material: [
6788
+ {
6789
+ material: [
6790
+ "base",
6791
+ "small",
6792
+ "medium",
6793
+ "large",
6794
+ "tooltip",
6795
+ "menu",
6796
+ "modal",
6797
+ "fullscreen"
6798
+ ]
6799
+ }
6800
+ ]
6801
+ },
6802
+ // Make each category conflict with itself, so e.g. text-heading-32 overrides text-heading-24
6803
+ conflictingClassGroups: {
6804
+ "text-heading": ["text-heading"],
6805
+ "text-button": ["text-button"],
6806
+ "text-label": ["text-label"],
6807
+ "text-copy": ["text-copy"],
6808
+ material: ["material"]
6720
6809
  }
6721
- const h2 = Math.floor(ms / MS_IN_HOUR);
6722
- const m2 = Math.floor(ms % MS_IN_HOUR / MS_IN_MINUTE);
6723
- return m2 > 0 ? `${h2}h ${m2}m` : `${h2}h`;
6724
- }
6725
- const days = Math.floor(ms / MS_IN_DAY);
6726
- const hours = Math.floor(ms % MS_IN_DAY / MS_IN_HOUR);
6727
- const minutes = Math.floor(ms % MS_IN_HOUR / MS_IN_MINUTE);
6728
- const seconds = Math.floor(ms % MS_IN_MINUTE / MS_IN_SECOND);
6729
- const parts = [];
6730
- if (days > 0) {
6731
- parts.push(`${days}d`);
6732
- }
6733
- if (hours > 0) {
6734
- parts.push(`${hours}h`);
6735
- }
6736
- if (minutes > 0) {
6737
- parts.push(`${minutes}m`);
6738
6810
  }
6739
- if (hours <= 1 && (seconds > 0 || parts.length === 0)) {
6740
- parts.push(`${seconds}s`);
6741
- }
6742
- return parts.join(" ");
6743
- }
6744
- function isDoStreamStep(stepName) {
6745
- return stepName.endsWith("//doStreamStep");
6746
- }
6747
- function extractConversation(stepInput) {
6748
- if (!Array.isArray(stepInput) || stepInput.length === 0) {
6749
- return null;
6750
- }
6751
- const firstArg = stepInput[0];
6752
- if (!Array.isArray(firstArg)) {
6753
- return null;
6754
- }
6755
- if (!firstArg.every((msg) => msg && typeof msg === "object" && "role" in msg)) {
6756
- return null;
6757
- }
6758
- return firstArg;
6811
+ };
6812
+ const customTwMerge = extendTailwindMerge(twMergeConfig);
6813
+ function cn$4(...classes) {
6814
+ return customTwMerge(clsx(...classes));
6759
6815
  }
6760
6816
  const ve$2 = 0, At$1 = 1, Jt$1 = 2, zn = 4;
6761
6817
  function un$1(t) {
@@ -10352,7 +10408,7 @@ function hydrateData(value, revivers) {
10352
10408
  async function hydrateDataWithKey(value, revivers, key) {
10353
10409
  if (value instanceof Uint8Array && isEncryptedData(value) && key) {
10354
10410
  const { decrypt } = await __vitePreload(async () => {
10355
- const { decrypt: decrypt2 } = await import("./encryption-Bd25Keng.js");
10411
+ const { decrypt: decrypt2 } = await import("./encryption-BRhjWsZh.js");
10356
10412
  return { decrypt: decrypt2 };
10357
10413
  }, true ? __vite__mapDeps([0,1,2]) : void 0);
10358
10414
  const { payload } = decodeFormatPrefix(value);
@@ -15205,6 +15261,12 @@ const EventTypeSchema = _enum([
15205
15261
  "wait_created",
15206
15262
  "wait_completed"
15207
15263
  ]);
15264
+ const TerminalRunEventTypeSchema = EventTypeSchema.extract([
15265
+ "run_completed",
15266
+ "run_failed",
15267
+ "run_cancelled"
15268
+ ]);
15269
+ TerminalRunEventTypeSchema.options;
15208
15270
  const BaseEventSchema = object({
15209
15271
  eventType: EventTypeSchema,
15210
15272
  correlationId: string$2().optional(),
@@ -15215,6 +15277,10 @@ const StepCompletedEventSchema = BaseEventSchema.extend({
15215
15277
  correlationId: string$2(),
15216
15278
  eventData: object({
15217
15279
  stepName: string$2().optional(),
15280
+ // Carried so a backend that keys payload refs by workflow name can build
15281
+ // the key without an extra run lookup on this hot per-step write.
15282
+ // Optional: older runtimes omit it and the backend falls back to a read.
15283
+ workflowName: string$2().optional(),
15218
15284
  result: SerializedDataSchema
15219
15285
  })
15220
15286
  });
@@ -15242,7 +15308,11 @@ const StepStartedEventSchema = BaseEventSchema.extend({
15242
15308
  correlationId: string$2(),
15243
15309
  eventData: object({
15244
15310
  stepName: string$2().optional(),
15245
- attempt: number$2().optional()
15311
+ attempt: number$2().optional(),
15312
+ // Carried so a backend that keys payload refs by workflow name can
15313
+ // build the key without re-reading the run on this hot per-step write.
15314
+ // Optional: older runtimes omit it and the backend falls back to a read.
15315
+ workflowName: string$2().optional()
15246
15316
  }).optional()
15247
15317
  });
15248
15318
  const StepCreatedEventSchema = BaseEventSchema.extend({
@@ -15250,6 +15320,7 @@ const StepCreatedEventSchema = BaseEventSchema.extend({
15250
15320
  correlationId: string$2(),
15251
15321
  eventData: object({
15252
15322
  stepName: string$2(),
15323
+ workflowName: string$2().optional(),
15253
15324
  input: SerializedDataSchema
15254
15325
  })
15255
15326
  });
@@ -15258,7 +15329,14 @@ const HookCreatedEventSchema = BaseEventSchema.extend({
15258
15329
  correlationId: string$2(),
15259
15330
  eventData: object({
15260
15331
  token: string$2(),
15261
- metadata: SerializedDataSchema.optional()
15332
+ metadata: SerializedDataSchema.optional(),
15333
+ // Marks a hook created for a webhook (not resumable via the public
15334
+ // webhook endpoint). The runtime emits this on hook_created and the
15335
+ // backend consumes it; declaring it here keeps it on the wire.
15336
+ // Also preserved on read so crash-recovery paths can rebuild the hook
15337
+ // entity from the persisted `hook_created` event's payload (see
15338
+ // `repairHookEntityFromPersistedEvent` in `@workflow/world-local`).
15339
+ isWebhook: boolean$2().optional()
15262
15340
  })
15263
15341
  });
15264
15342
  const HookReceivedEventSchema = BaseEventSchema.extend({
@@ -15382,6 +15460,7 @@ AllEventsSchema.and(object({
15382
15460
  runId: string$2(),
15383
15461
  eventId: string$2(),
15384
15462
  createdAt: date(),
15463
+ occurredAt: date().optional(),
15385
15464
  specVersion: number$2().optional()
15386
15465
  }));
15387
15466
  object({
@@ -15463,6 +15542,12 @@ const WorkflowRunStatusSchema = _enum([
15463
15542
  "failed",
15464
15543
  "cancelled"
15465
15544
  ]);
15545
+ const TerminalWorkflowRunStatusSchema = WorkflowRunStatusSchema.extract([
15546
+ "completed",
15547
+ "failed",
15548
+ "cancelled"
15549
+ ]);
15550
+ TerminalWorkflowRunStatusSchema.options;
15466
15551
  const WorkflowRunBaseSchema = object({
15467
15552
  runId: string$2(),
15468
15553
  status: WorkflowRunStatusSchema,
@@ -15583,6 +15668,12 @@ object({
15583
15668
  // Optional in database for backwards compatibility, defaults to 1 (legacy) when reading
15584
15669
  specVersion: number$2().optional()
15585
15670
  });
15671
+ const TerminalStepStatusSchema = StepStatusSchema.extract([
15672
+ "completed",
15673
+ "failed",
15674
+ "cancelled"
15675
+ ]);
15676
+ TerminalStepStatusSchema.options;
15586
15677
  string$2().ulid();
15587
15678
  const WaitStatusSchema = _enum(["waiting", "completed"]);
15588
15679
  object({
@@ -15757,7 +15848,7 @@ async function hydrateResourceIOWithKey(resource, key) {
15757
15848
  return { hydrateDataWithKey: hydrateDataWithKey3 };
15758
15849
  }, true ? void 0 : void 0);
15759
15850
  const { importKey } = await __vitePreload(async () => {
15760
- const { importKey: importKey2 } = await import("./encryption-Bd25Keng.js");
15851
+ const { importKey: importKey2 } = await import("./encryption-BRhjWsZh.js");
15761
15852
  return { importKey: importKey2 };
15762
15853
  }, true ? __vite__mapDeps([0,1,2]) : void 0);
15763
15854
  const cryptoKey = await importKey(key);
@@ -16900,6 +16991,797 @@ const ToastContext = reactExports.createContext(defaultAdapter);
16900
16991
  function useToast() {
16901
16992
  return reactExports.useContext(ToastContext);
16902
16993
  }
16994
+ const durationFormatter = new Intl.NumberFormat(void 0, {
16995
+ maximumFractionDigits: 2
16996
+ });
16997
+ const MS_IN_SECOND = 1e3;
16998
+ const MS_IN_MINUTE = 60 * MS_IN_SECOND;
16999
+ const MS_IN_HOUR = 60 * MS_IN_MINUTE;
17000
+ const MS_IN_DAY = 24 * MS_IN_HOUR;
17001
+ function formatDuration(ms, compact = false) {
17002
+ if (ms === 0) {
17003
+ return "0";
17004
+ }
17005
+ if (ms < MS_IN_SECOND) {
17006
+ return `${durationFormatter.format(ms)}ms`;
17007
+ }
17008
+ if (ms < MS_IN_MINUTE) {
17009
+ return `${durationFormatter.format(ms / MS_IN_SECOND)}s`;
17010
+ }
17011
+ if (compact) {
17012
+ if (ms < MS_IN_HOUR) {
17013
+ const m3 = Math.floor(ms / MS_IN_MINUTE);
17014
+ const s2 = Math.floor(ms % MS_IN_MINUTE / MS_IN_SECOND);
17015
+ return s2 > 0 ? `${m3}m ${s2}s` : `${m3}m`;
17016
+ }
17017
+ const h2 = Math.floor(ms / MS_IN_HOUR);
17018
+ const m2 = Math.floor(ms % MS_IN_HOUR / MS_IN_MINUTE);
17019
+ return m2 > 0 ? `${h2}h ${m2}m` : `${h2}h`;
17020
+ }
17021
+ const days = Math.floor(ms / MS_IN_DAY);
17022
+ const hours = Math.floor(ms % MS_IN_DAY / MS_IN_HOUR);
17023
+ const minutes = Math.floor(ms % MS_IN_HOUR / MS_IN_MINUTE);
17024
+ const seconds = Math.floor(ms % MS_IN_MINUTE / MS_IN_SECOND);
17025
+ const parts = [];
17026
+ if (days > 0) {
17027
+ parts.push(`${days}d`);
17028
+ }
17029
+ if (hours > 0) {
17030
+ parts.push(`${hours}h`);
17031
+ }
17032
+ if (minutes > 0) {
17033
+ parts.push(`${minutes}m`);
17034
+ }
17035
+ if (hours <= 1 && (seconds > 0 || parts.length === 0)) {
17036
+ parts.push(`${seconds}s`);
17037
+ }
17038
+ return parts.join(" ");
17039
+ }
17040
+ function isDoStreamStep(stepName) {
17041
+ return stepName.endsWith("//doStreamStep");
17042
+ }
17043
+ function extractConversation(stepInput) {
17044
+ if (!Array.isArray(stepInput) || stepInput.length === 0) {
17045
+ return null;
17046
+ }
17047
+ const firstArg = stepInput[0];
17048
+ if (!Array.isArray(firstArg)) {
17049
+ return null;
17050
+ }
17051
+ if (!firstArg.every((msg) => msg && typeof msg === "object" && "role" in msg)) {
17052
+ return null;
17053
+ }
17054
+ return firstArg;
17055
+ }
17056
+ function setRef(ref, value) {
17057
+ if (typeof ref === "function") {
17058
+ return ref(value);
17059
+ } else if (ref !== null && ref !== void 0) {
17060
+ ref.current = value;
17061
+ }
17062
+ }
17063
+ function composeRefs(...refs) {
17064
+ return (node2) => {
17065
+ let hasCleanup = false;
17066
+ const cleanups = refs.map((ref) => {
17067
+ const cleanup = setRef(ref, node2);
17068
+ if (!hasCleanup && typeof cleanup == "function") {
17069
+ hasCleanup = true;
17070
+ }
17071
+ return cleanup;
17072
+ });
17073
+ if (hasCleanup) {
17074
+ return () => {
17075
+ for (let i = 0; i < cleanups.length; i++) {
17076
+ const cleanup = cleanups[i];
17077
+ if (typeof cleanup == "function") {
17078
+ cleanup();
17079
+ } else {
17080
+ setRef(refs[i], null);
17081
+ }
17082
+ }
17083
+ };
17084
+ }
17085
+ };
17086
+ }
17087
+ function useComposedRefs(...refs) {
17088
+ return reactExports.useCallback(composeRefs(...refs), refs);
17089
+ }
17090
+ var Slot = reactExports.forwardRef((props, forwardedRef) => {
17091
+ const { children: children2, ...slotProps } = props;
17092
+ const childrenArray = reactExports.Children.toArray(children2);
17093
+ const slottable = childrenArray.find(isSlottable);
17094
+ if (slottable) {
17095
+ const newElement = slottable.props.children;
17096
+ const newChildren = childrenArray.map((child) => {
17097
+ if (child === slottable) {
17098
+ if (reactExports.Children.count(newElement) > 1) return reactExports.Children.only(null);
17099
+ return reactExports.isValidElement(newElement) ? newElement.props.children : null;
17100
+ } else {
17101
+ return child;
17102
+ }
17103
+ });
17104
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: reactExports.isValidElement(newElement) ? reactExports.cloneElement(newElement, void 0, newChildren) : null });
17105
+ }
17106
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: children2 });
17107
+ });
17108
+ Slot.displayName = "Slot";
17109
+ var SlotClone = reactExports.forwardRef((props, forwardedRef) => {
17110
+ const { children: children2, ...slotProps } = props;
17111
+ if (reactExports.isValidElement(children2)) {
17112
+ const childrenRef = getElementRef(children2);
17113
+ return reactExports.cloneElement(children2, {
17114
+ ...mergeProps(slotProps, children2.props),
17115
+ // @ts-ignore
17116
+ ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
17117
+ });
17118
+ }
17119
+ return reactExports.Children.count(children2) > 1 ? reactExports.Children.only(null) : null;
17120
+ });
17121
+ SlotClone.displayName = "SlotClone";
17122
+ var Slottable = ({ children: children2 }) => {
17123
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children2 });
17124
+ };
17125
+ function isSlottable(child) {
17126
+ return reactExports.isValidElement(child) && child.type === Slottable;
17127
+ }
17128
+ function mergeProps(slotProps, childProps) {
17129
+ const overrideProps = { ...childProps };
17130
+ for (const propName in childProps) {
17131
+ const slotPropValue = slotProps[propName];
17132
+ const childPropValue = childProps[propName];
17133
+ const isHandler = /^on[A-Z]/.test(propName);
17134
+ if (isHandler) {
17135
+ if (slotPropValue && childPropValue) {
17136
+ overrideProps[propName] = (...args) => {
17137
+ childPropValue(...args);
17138
+ slotPropValue(...args);
17139
+ };
17140
+ } else if (slotPropValue) {
17141
+ overrideProps[propName] = slotPropValue;
17142
+ }
17143
+ } else if (propName === "style") {
17144
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
17145
+ } else if (propName === "className") {
17146
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
17147
+ }
17148
+ }
17149
+ return { ...slotProps, ...overrideProps };
17150
+ }
17151
+ function getElementRef(element2) {
17152
+ var _a3, _b2;
17153
+ let getter = (_a3 = Object.getOwnPropertyDescriptor(element2.props, "ref")) == null ? void 0 : _a3.get;
17154
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
17155
+ if (mayWarn) {
17156
+ return element2.ref;
17157
+ }
17158
+ getter = (_b2 = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b2.get;
17159
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
17160
+ if (mayWarn) {
17161
+ return element2.props.ref;
17162
+ }
17163
+ return element2.props.ref || element2.ref;
17164
+ }
17165
+ var Root = Slot;
17166
+ var debounce_1;
17167
+ var hasRequiredDebounce;
17168
+ function requireDebounce() {
17169
+ if (hasRequiredDebounce) return debounce_1;
17170
+ hasRequiredDebounce = 1;
17171
+ function debounce(func, wait, immediate) {
17172
+ var timeout, args, context, timestamp, result;
17173
+ if (null == wait) wait = 100;
17174
+ function later() {
17175
+ var last = Date.now() - timestamp;
17176
+ if (last < wait && last >= 0) {
17177
+ timeout = setTimeout(later, wait - last);
17178
+ } else {
17179
+ timeout = null;
17180
+ if (!immediate) {
17181
+ result = func.apply(context, args);
17182
+ context = args = null;
17183
+ }
17184
+ }
17185
+ }
17186
+ var debounced = function() {
17187
+ context = this;
17188
+ args = arguments;
17189
+ timestamp = Date.now();
17190
+ var callNow = immediate && !timeout;
17191
+ if (!timeout) timeout = setTimeout(later, wait);
17192
+ if (callNow) {
17193
+ result = func.apply(context, args);
17194
+ context = args = null;
17195
+ }
17196
+ return result;
17197
+ };
17198
+ debounced.clear = function() {
17199
+ if (timeout) {
17200
+ clearTimeout(timeout);
17201
+ timeout = null;
17202
+ }
17203
+ };
17204
+ debounced.flush = function() {
17205
+ if (timeout) {
17206
+ result = func.apply(context, args);
17207
+ context = args = null;
17208
+ clearTimeout(timeout);
17209
+ timeout = null;
17210
+ }
17211
+ };
17212
+ return debounced;
17213
+ }
17214
+ debounce.debounce = debounce;
17215
+ debounce_1 = debounce;
17216
+ return debounce_1;
17217
+ }
17218
+ var debounceExports = requireDebounce();
17219
+ const createDebounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
17220
+ function useMeasure(_temp) {
17221
+ let {
17222
+ debounce,
17223
+ scroll,
17224
+ polyfill,
17225
+ offsetSize
17226
+ } = {
17227
+ debounce: 0,
17228
+ scroll: false,
17229
+ offsetSize: false
17230
+ };
17231
+ const ResizeObserver2 = polyfill || (typeof window === "undefined" ? class ResizeObserver {
17232
+ } : window.ResizeObserver);
17233
+ if (!ResizeObserver2) {
17234
+ throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");
17235
+ }
17236
+ const [bounds, set] = reactExports.useState({
17237
+ left: 0,
17238
+ top: 0,
17239
+ width: 0,
17240
+ height: 0,
17241
+ bottom: 0,
17242
+ right: 0,
17243
+ x: 0,
17244
+ y: 0
17245
+ });
17246
+ const state = reactExports.useRef({
17247
+ element: null,
17248
+ scrollContainers: null,
17249
+ resizeObserver: null,
17250
+ lastBounds: bounds
17251
+ });
17252
+ const scrollDebounce = debounce ? typeof debounce === "number" ? debounce : debounce.scroll : null;
17253
+ const resizeDebounce = debounce ? typeof debounce === "number" ? debounce : debounce.resize : null;
17254
+ const mounted = reactExports.useRef(false);
17255
+ reactExports.useEffect(() => {
17256
+ mounted.current = true;
17257
+ return () => void (mounted.current = false);
17258
+ });
17259
+ const [forceRefresh, resizeChange, scrollChange] = reactExports.useMemo(() => {
17260
+ const callback = () => {
17261
+ if (!state.current.element) return;
17262
+ const {
17263
+ left,
17264
+ top,
17265
+ width,
17266
+ height,
17267
+ bottom,
17268
+ right,
17269
+ x: x2,
17270
+ y: y2
17271
+ } = state.current.element.getBoundingClientRect();
17272
+ const size2 = {
17273
+ left,
17274
+ top,
17275
+ width,
17276
+ height,
17277
+ bottom,
17278
+ right,
17279
+ x: x2,
17280
+ y: y2
17281
+ };
17282
+ if (state.current.element instanceof HTMLElement && offsetSize) {
17283
+ size2.height = state.current.element.offsetHeight;
17284
+ size2.width = state.current.element.offsetWidth;
17285
+ }
17286
+ Object.freeze(size2);
17287
+ if (mounted.current && !areBoundsEqual(state.current.lastBounds, size2)) set(state.current.lastBounds = size2);
17288
+ };
17289
+ return [callback, resizeDebounce ? createDebounce(callback, resizeDebounce) : callback, scrollDebounce ? createDebounce(callback, scrollDebounce) : callback];
17290
+ }, [set, offsetSize, scrollDebounce, resizeDebounce]);
17291
+ function removeListeners() {
17292
+ if (state.current.scrollContainers) {
17293
+ state.current.scrollContainers.forEach((element2) => element2.removeEventListener("scroll", scrollChange, true));
17294
+ state.current.scrollContainers = null;
17295
+ }
17296
+ if (state.current.resizeObserver) {
17297
+ state.current.resizeObserver.disconnect();
17298
+ state.current.resizeObserver = null;
17299
+ }
17300
+ }
17301
+ function addListeners() {
17302
+ if (!state.current.element) return;
17303
+ state.current.resizeObserver = new ResizeObserver2(scrollChange);
17304
+ state.current.resizeObserver.observe(state.current.element);
17305
+ if (scroll && state.current.scrollContainers) {
17306
+ state.current.scrollContainers.forEach((scrollContainer) => scrollContainer.addEventListener("scroll", scrollChange, {
17307
+ capture: true,
17308
+ passive: true
17309
+ }));
17310
+ }
17311
+ }
17312
+ const ref = (node2) => {
17313
+ if (!node2 || node2 === state.current.element) return;
17314
+ removeListeners();
17315
+ state.current.element = node2;
17316
+ state.current.scrollContainers = findScrollContainers(node2);
17317
+ addListeners();
17318
+ };
17319
+ useOnWindowScroll(scrollChange, Boolean(scroll));
17320
+ useOnWindowResize(resizeChange);
17321
+ reactExports.useEffect(() => {
17322
+ removeListeners();
17323
+ addListeners();
17324
+ }, [scroll, scrollChange, resizeChange]);
17325
+ reactExports.useEffect(() => removeListeners, []);
17326
+ return [ref, bounds, forceRefresh];
17327
+ }
17328
+ function useOnWindowResize(onWindowResize) {
17329
+ reactExports.useEffect(() => {
17330
+ const cb = onWindowResize;
17331
+ window.addEventListener("resize", cb);
17332
+ return () => void window.removeEventListener("resize", cb);
17333
+ }, [onWindowResize]);
17334
+ }
17335
+ function useOnWindowScroll(onScroll, enabled) {
17336
+ reactExports.useEffect(() => {
17337
+ if (enabled) {
17338
+ const cb = onScroll;
17339
+ window.addEventListener("scroll", cb, {
17340
+ capture: true,
17341
+ passive: true
17342
+ });
17343
+ return () => void window.removeEventListener("scroll", cb, true);
17344
+ }
17345
+ }, [onScroll, enabled]);
17346
+ }
17347
+ function findScrollContainers(element2) {
17348
+ const result = [];
17349
+ if (!element2 || element2 === document.body) return result;
17350
+ const {
17351
+ overflow,
17352
+ overflowX,
17353
+ overflowY
17354
+ } = window.getComputedStyle(element2);
17355
+ if ([overflow, overflowX, overflowY].some((prop) => prop === "auto" || prop === "scroll")) result.push(element2);
17356
+ return [...result, ...findScrollContainers(element2.parentElement)];
17357
+ }
17358
+ const keys$1 = ["x", "y", "top", "bottom", "left", "right", "width", "height"];
17359
+ const areBoundsEqual = (a2, b2) => keys$1.every((key) => a2[key] === b2[key]);
17360
+ const QUERY = "(prefers-reduced-motion: reduce)";
17361
+ const useReducedMotion = () => {
17362
+ const [reduced, setReduced] = reactExports.useState(() => {
17363
+ if (typeof window === "undefined" || !window.matchMedia)
17364
+ return false;
17365
+ return window.matchMedia(QUERY).matches;
17366
+ });
17367
+ reactExports.useEffect(() => {
17368
+ if (typeof window === "undefined" || !window.matchMedia)
17369
+ return;
17370
+ const media = window.matchMedia(QUERY);
17371
+ const onChange = () => setReduced(media.matches);
17372
+ media.addEventListener("change", onChange);
17373
+ onChange();
17374
+ return () => media.removeEventListener("change", onChange);
17375
+ }, []);
17376
+ return reduced;
17377
+ };
17378
+ const INACTIVE_TIMEOUT_MS = 250;
17379
+ const ENTER_DELAY_MS = 0;
17380
+ const OPEN_DELAY_MS = 150;
17381
+ const MAX_TRANSITION_DISTANCE_PX = 150;
17382
+ const MAX_OVERLAP_FOR_TRANSITION_PERCENT = 100;
17383
+ const PERSIST_TIMEOUT_MS = 1e3;
17384
+ const ContextCardContext = reactExports.createContext({
17385
+ rootOrigin: { x: 0, y: 0 },
17386
+ rootBounds: { width: 0, height: 0 },
17387
+ portalRef: null,
17388
+ activeId: null,
17389
+ setActiveId: () => void 0,
17390
+ hoveredId: null,
17391
+ setHoveredId: () => void 0,
17392
+ updateActiveContextCard: () => void 0,
17393
+ skipTransition: false,
17394
+ rootVisible: false,
17395
+ distanceFromLast: 0,
17396
+ lastOrigin: null,
17397
+ isProvided: false
17398
+ });
17399
+ ContextCardContext.displayName = "ContextCardContext";
17400
+ function useHasContextCardProvider() {
17401
+ return reactExports.useContext(ContextCardContext).isProvided;
17402
+ }
17403
+ function usePrevious(value) {
17404
+ const ref = reactExports.useRef(null);
17405
+ reactExports.useEffect(() => {
17406
+ ref.current = value;
17407
+ });
17408
+ return ref.current;
17409
+ }
17410
+ function isRefObject(value) {
17411
+ return value !== null && value !== void 0 && "current" in value;
17412
+ }
17413
+ function ContextCardProvider({ children: children2, portalTarget }) {
17414
+ const [isMounted, setIsMounted] = reactExports.useState(false);
17415
+ reactExports.useEffect(() => setIsMounted(true), []);
17416
+ const resolvedPortalTarget = isRefObject(portalTarget) ? portalTarget.current : portalTarget;
17417
+ const [ref, bounds] = useMeasure();
17418
+ const portalRef = reactExports.useRef(null);
17419
+ const [activeContextCard, setActiveContextCard] = reactExports.useState(null);
17420
+ const [visible, setVisible] = reactExports.useState(false);
17421
+ const [hoveredId, setHoveredId] = reactExports.useState(null);
17422
+ const activeId = reactExports.useRef(null);
17423
+ function setActiveId(id) {
17424
+ activeId.current = id;
17425
+ setVisible(id !== null);
17426
+ }
17427
+ const updateActiveContextCard = (update) => {
17428
+ if ((update == null ? void 0 : update.id) !== activeId.current && update !== null)
17429
+ return;
17430
+ setActiveContextCard(update);
17431
+ };
17432
+ const BORDER_WIDTH = 1;
17433
+ const activeBounds = reactExports.useMemo(() => {
17434
+ if (!activeContextCard)
17435
+ return {
17436
+ width: 0,
17437
+ height: 0,
17438
+ x: 0,
17439
+ y: 0,
17440
+ side: "top",
17441
+ arrowOffset: { x: 0, y: 0 }
17442
+ };
17443
+ return {
17444
+ width: activeContextCard.contentSize.width + BORDER_WIDTH * 2,
17445
+ height: activeContextCard.contentSize.height + BORDER_WIDTH * 2,
17446
+ x: activeContextCard.origin.x,
17447
+ y: activeContextCard.origin.y,
17448
+ side: activeContextCard.side,
17449
+ arrowOffset: activeContextCard.arrowOffset
17450
+ };
17451
+ }, [activeContextCard]);
17452
+ const lastBounds = usePrevious(activeBounds);
17453
+ const lastId = usePrevious(activeId.current);
17454
+ const percentOverlapFromLast = reactExports.useMemo(() => {
17455
+ if (!lastBounds)
17456
+ return 0;
17457
+ const overlapLeft = Math.max(activeBounds.x, lastBounds.x);
17458
+ const overlapRight = Math.min(activeBounds.x + activeBounds.width, lastBounds.x + lastBounds.width);
17459
+ const overlapTop = Math.max(activeBounds.y, lastBounds.y);
17460
+ const overlapBottom = Math.min(activeBounds.y + activeBounds.height, lastBounds.y + lastBounds.height);
17461
+ if (overlapLeft < overlapRight && overlapTop < overlapBottom) {
17462
+ const overlapArea = (overlapRight - overlapLeft) * (overlapBottom - overlapTop);
17463
+ const activeBoundsArea = activeBounds.width * activeBounds.height;
17464
+ if (activeBoundsArea === 0)
17465
+ return 0;
17466
+ return overlapArea / activeBoundsArea * 100;
17467
+ }
17468
+ return 0;
17469
+ }, [activeBounds, lastBounds]);
17470
+ const distanceFromLast = reactExports.useMemo(() => Math.sqrt((((lastBounds == null ? void 0 : lastBounds.x) ?? 0) - activeBounds.x) ** 2 + (((lastBounds == null ? void 0 : lastBounds.y) ?? 0) - activeBounds.y) ** 2), [activeBounds.x, activeBounds.y, lastBounds == null ? void 0 : lastBounds.x, lastBounds == null ? void 0 : lastBounds.y]);
17471
+ const lastOrigin = reactExports.useMemo(() => {
17472
+ if (!lastBounds)
17473
+ return null;
17474
+ return {
17475
+ x: lastBounds.x - activeBounds.x,
17476
+ y: lastBounds.y - activeBounds.y
17477
+ };
17478
+ }, [activeBounds, lastBounds]);
17479
+ const [isScrolling, setIsScrolling] = reactExports.useState(false);
17480
+ const skipTransition = reactExports.useMemo(() => distanceFromLast > MAX_TRANSITION_DISTANCE_PX || percentOverlapFromLast > MAX_OVERLAP_FOR_TRANSITION_PERCENT || lastId === null || isScrolling, [distanceFromLast, isScrolling, lastId, percentOverlapFromLast]);
17481
+ reactExports.useEffect(() => {
17482
+ let isScrollingTimeout = null;
17483
+ const onScroll = () => {
17484
+ if (isScrollingTimeout)
17485
+ window.clearTimeout(isScrollingTimeout);
17486
+ isScrollingTimeout = setTimeout(() => {
17487
+ setIsScrolling(false);
17488
+ }, 66);
17489
+ if (!isScrolling) {
17490
+ setIsScrolling(true);
17491
+ }
17492
+ };
17493
+ document.addEventListener("scroll", onScroll, true);
17494
+ return () => {
17495
+ document.removeEventListener("scroll", onScroll, true);
17496
+ };
17497
+ }, [isScrolling]);
17498
+ const contextValue = reactExports.useMemo(() => ({
17499
+ updateActiveContextCard,
17500
+ rootOrigin: { ...activeBounds },
17501
+ rootBounds: bounds,
17502
+ portalRef,
17503
+ setActiveId,
17504
+ activeId,
17505
+ setHoveredId,
17506
+ hoveredId,
17507
+ skipTransition,
17508
+ rootVisible: visible,
17509
+ distanceFromLast,
17510
+ lastOrigin,
17511
+ isProvided: true
17512
+ }), [
17513
+ activeBounds,
17514
+ bounds,
17515
+ hoveredId,
17516
+ skipTransition,
17517
+ visible,
17518
+ distanceFromLast,
17519
+ lastOrigin
17520
+ ]);
17521
+ return jsxRuntimeExports.jsxs(ContextCardContext.Provider, { value: contextValue, children: [children2, isMounted ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: "w-full h-full inset-0 fixed pointer-events-none z-[100000]", ref, children: jsxRuntimeExports.jsx("div", { className: "min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", style: {
17522
+ opacity: visible ? 1 : 0
17523
+ }, children: jsxRuntimeExports.jsxs("div", { className: cn$4("absolute bg-background-100 bg-clip-padding rounded-[6px] overflow-visible pointer-events-none z-[1000000] shadow-[var(--ds-shadow-tooltip),0_0_0_1px_var(--ds-background-100)] w-fit [--context-card-tip-stroke:var(--ds-gray-alpha-400)]", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), "data-skip-transition": skipTransition, style: {
17524
+ transform: `translate(${activeBounds.x}px,${activeBounds.y}px)`,
17525
+ width: activeBounds.width,
17526
+ height: activeBounds.height
17527
+ }, children: [jsxRuntimeExports.jsx("div", { className: cn$4("w-[14px] h-[7px] absolute grid place-content-center z-[999999999] origin-center", {
17528
+ "top-full -translate-x-1/2 rotate-0": activeBounds.side === "top",
17529
+ "right-full -translate-y-1/2 rotate-90 -mr-[3.5px]": activeBounds.side === "right",
17530
+ "bottom-full -translate-x-1/2 rotate-180": activeBounds.side === "bottom",
17531
+ "left-full -translate-y-1/2 rotate-[270deg] -ml-[3.5px]": activeBounds.side === "left"
17532
+ }, skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), style: {
17533
+ ...activeBounds.side === "top" || activeBounds.side === "bottom" ? {
17534
+ left: `calc(50% + ${activeBounds.arrowOffset.x}px)`
17535
+ } : {
17536
+ top: `calc(50% + ${activeBounds.arrowOffset.y}px)`
17537
+ }
17538
+ }, "data-skip-transition": skipTransition, "data-side": activeBounds.side, children: jsxRuntimeExports.jsxs("svg", { width: "14", height: "7", viewBox: "0 0 14 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [jsxRuntimeExports.jsx("g", { clipPath: "url(#context-card-tip-clip)", children: jsxRuntimeExports.jsx("path", { d: "M15 -0.5V0.5H12.9834L12.8184 0.508789C12.4377 0.550822 12.0853 0.738056 11.8359 1.03418L8.53027 4.95996C7.73114 5.90893 6.26886 5.90892 5.46973 4.95996L2.16406 1.03418C1.87905 0.695733 1.45907 0.5 1.0166 0.5H-1V-0.5H15Z", fill: "var(--ds-background-100)", style: {
17539
+ fill: "var(--ds-background-100)",
17540
+ fillOpacity: 1,
17541
+ stroke: "var(--context-card-tip-stroke)",
17542
+ strokeOpacity: 1
17543
+ } }) }), jsxRuntimeExports.jsx("defs", { children: jsxRuntimeExports.jsx("clipPath", { id: "context-card-tip-clip", children: jsxRuntimeExports.jsx("rect", { width: "14", height: "7", fill: "white", style: { fill: "white", fillOpacity: 1 } }) }) })] }) }), jsxRuntimeExports.jsx("div", { ref: portalRef })] }) }) }), resolvedPortalTarget ?? document.body) : null] });
17544
+ }
17545
+ function ContextCardTrigger({ content: content2, children: children2, side = "right", align = "center", sideOffset = 16, alignOffset = 0, ignoreCardPointerEvents = false, noPadding, asChild, className, hide: hide2, inactiveTimeoutMs = INACTIVE_TIMEOUT_MS }) {
17546
+ const triggerRef = reactExports.useRef(null);
17547
+ const contentRef = reactExports.useRef(null);
17548
+ const [contentMeasureRef, contentMeasureBounds] = useMeasure();
17549
+ const { portalRef, updateActiveContextCard, activeId, setActiveId, hoveredId, setHoveredId, skipTransition, rootVisible } = reactExports.useContext(ContextCardContext);
17550
+ const id = reactExports.useId();
17551
+ reactExports.useEffect(() => {
17552
+ return () => {
17553
+ if (activeId.current === id) {
17554
+ setActiveId(null);
17555
+ }
17556
+ };
17557
+ }, []);
17558
+ const reduceMotion = useReducedMotion();
17559
+ const [localHover, setLocalHover] = reactExports.useState(false);
17560
+ const [persisting, setPersisting] = reactExports.useState(false);
17561
+ const [visible, setVisible] = reactExports.useState(false);
17562
+ const activeTimeout = reactExports.useRef(null);
17563
+ const persistingTimeout = reactExports.useRef(null);
17564
+ const openTimeout = reactExports.useRef(null);
17565
+ reactExports.useEffect(() => {
17566
+ if (localHover && contentMeasureBounds.width > 0 && contentMeasureBounds.height > 0) {
17567
+ if (openTimeout.current)
17568
+ clearTimeout(openTimeout.current);
17569
+ openTimeout.current = setTimeout(() => {
17570
+ setActiveId(id);
17571
+ updateBounds();
17572
+ }, rootVisible ? 0 : OPEN_DELAY_MS);
17573
+ }
17574
+ return () => {
17575
+ if (openTimeout.current)
17576
+ clearTimeout(openTimeout.current);
17577
+ };
17578
+ }, [localHover, contentMeasureBounds]);
17579
+ const enterTimeout = reactExports.useRef(null);
17580
+ reactExports.useEffect(() => {
17581
+ if (enterTimeout.current)
17582
+ clearTimeout(enterTimeout.current);
17583
+ if (hoveredId !== id) {
17584
+ setVisible(false);
17585
+ } else {
17586
+ enterTimeout.current = setTimeout(() => {
17587
+ setVisible(true);
17588
+ }, reduceMotion || skipTransition ? 0 : ENTER_DELAY_MS);
17589
+ }
17590
+ }, [hoveredId, id, reduceMotion, skipTransition]);
17591
+ function updateBounds() {
17592
+ if (!contentRef.current)
17593
+ return;
17594
+ const bounds = computeBounds();
17595
+ updateActiveContextCard({ id, ...bounds });
17596
+ }
17597
+ function computeBounds(sideOverride) {
17598
+ if (!triggerRef.current)
17599
+ throw new Error("Trigger not found");
17600
+ if (!contentRef.current)
17601
+ throw new Error("Content not found");
17602
+ const appliedSide = sideOverride ?? side;
17603
+ const triggerRect = triggerRef.current.getBoundingClientRect();
17604
+ const contentRect = contentRef.current.getBoundingClientRect();
17605
+ contentRef.current.style.width = "max-content";
17606
+ contentRef.current.style.position = "absolute";
17607
+ const contentSize = {
17608
+ width: Math.max(contentRect.width, contentRef.current.offsetWidth),
17609
+ height: contentRect.height
17610
+ };
17611
+ let origin;
17612
+ const arrowWidth = 14;
17613
+ const halfArrowWidth = arrowWidth / 2;
17614
+ const halfTriggerWidth = triggerRect.width / 2;
17615
+ const halfTriggerHeight = triggerRect.height / 2;
17616
+ const halfContentWidth = contentSize.width / 2;
17617
+ const halfContentHeight = contentSize.height / 2;
17618
+ const top = triggerRect.top;
17619
+ const left = triggerRect.left;
17620
+ let alignX = left + halfTriggerWidth - halfContentWidth + alignOffset;
17621
+ if (align === "start")
17622
+ alignX = left + alignOffset;
17623
+ if (align === "end")
17624
+ alignX = left + triggerRect.width - contentRect.width + alignOffset;
17625
+ let alignY = top + halfTriggerHeight - halfContentHeight + alignOffset;
17626
+ if (align === "start")
17627
+ alignY = top + alignOffset;
17628
+ if (align === "end")
17629
+ alignY = top + triggerRect.height - contentRect.height + alignOffset;
17630
+ switch (appliedSide) {
17631
+ case "top":
17632
+ origin = {
17633
+ x: alignX,
17634
+ y: top - contentRect.height - sideOffset
17635
+ };
17636
+ break;
17637
+ case "right":
17638
+ origin = {
17639
+ x: left + triggerRect.width + sideOffset,
17640
+ y: alignY
17641
+ };
17642
+ break;
17643
+ case "bottom":
17644
+ origin = {
17645
+ x: alignX,
17646
+ y: top + triggerRect.height + sideOffset
17647
+ };
17648
+ break;
17649
+ case "left":
17650
+ origin = {
17651
+ x: left - contentRect.width - sideOffset,
17652
+ y: alignY
17653
+ };
17654
+ break;
17655
+ default: {
17656
+ const _exhaustive = appliedSide;
17657
+ throw new Error(`Unknown side: ${String(_exhaustive)}`);
17658
+ }
17659
+ }
17660
+ const viewportWidth = document.documentElement.clientWidth;
17661
+ const viewportHeight = document.documentElement.clientHeight;
17662
+ const isOffscreenLeft = origin.x < 0;
17663
+ const isOffscreenRight = origin.x + contentRect.width > viewportWidth;
17664
+ const isOffscreenTop = origin.y < 0;
17665
+ const isOffscreenBottom = origin.y + contentRect.height > viewportHeight;
17666
+ if (!sideOverride) {
17667
+ const spaceAbove = top;
17668
+ const spaceBelow = viewportHeight - (top + triggerRect.height);
17669
+ const spaceLeft = left;
17670
+ const spaceRight = viewportWidth - (left + triggerRect.width);
17671
+ if (side === "top" && isOffscreenTop && spaceBelow > spaceAbove) {
17672
+ return computeBounds("bottom");
17673
+ }
17674
+ if (side === "bottom" && isOffscreenBottom && spaceAbove > spaceBelow) {
17675
+ return computeBounds("top");
17676
+ }
17677
+ if (side === "right" && isOffscreenRight && spaceLeft > spaceRight) {
17678
+ return computeBounds("left");
17679
+ }
17680
+ if (side === "left" && isOffscreenLeft && spaceRight > spaceLeft) {
17681
+ return computeBounds("right");
17682
+ }
17683
+ if ((side === "top" || side === "bottom") && isOffscreenLeft && spaceRight > contentRect.width) {
17684
+ return computeBounds("right");
17685
+ }
17686
+ if ((side === "top" || side === "bottom") && isOffscreenRight && spaceLeft > contentRect.width) {
17687
+ return computeBounds("left");
17688
+ }
17689
+ if ((side === "left" || side === "right") && isOffscreenTop && spaceBelow > contentRect.height) {
17690
+ return computeBounds("bottom");
17691
+ }
17692
+ if ((side === "left" || side === "right") && isOffscreenBottom && spaceAbove > contentRect.height) {
17693
+ return computeBounds("top");
17694
+ }
17695
+ }
17696
+ const viewportPadding = 8;
17697
+ if (appliedSide === "left" || appliedSide === "right") {
17698
+ origin.y = Math.max(viewportPadding, Math.min(origin.y, viewportHeight - contentSize.height - viewportPadding));
17699
+ } else {
17700
+ origin.x = Math.max(viewportPadding, Math.min(origin.x, viewportWidth - contentSize.width - viewportPadding));
17701
+ }
17702
+ origin.y = Math.max(viewportPadding, Math.min(origin.y, viewportHeight - contentSize.height - viewportPadding));
17703
+ const triggerCenterX = left + halfTriggerWidth;
17704
+ const triggerCenterY = top + halfTriggerHeight;
17705
+ const cardCenterX = origin.x + contentSize.width / 2;
17706
+ const cardCenterY = origin.y + contentSize.height / 2;
17707
+ let arrowOffsetX = triggerCenterX - cardCenterX;
17708
+ let arrowOffsetY = triggerCenterY - cardCenterY;
17709
+ const maxArrowOffsetX = halfContentWidth - halfArrowWidth;
17710
+ const maxArrowOffsetY = halfContentHeight - halfArrowWidth;
17711
+ if (appliedSide === "top" || appliedSide === "bottom") {
17712
+ arrowOffsetX = Math.max(-maxArrowOffsetX, Math.min(arrowOffsetX, maxArrowOffsetX));
17713
+ }
17714
+ if (appliedSide === "left" || appliedSide === "right") {
17715
+ arrowOffsetY = Math.max(-maxArrowOffsetY, Math.min(arrowOffsetY, maxArrowOffsetY));
17716
+ }
17717
+ const arrowOffset = {
17718
+ x: arrowOffsetX,
17719
+ y: arrowOffsetY
17720
+ };
17721
+ return { origin, contentSize, side: appliedSide, arrowOffset };
17722
+ }
17723
+ reactExports.useEffect(() => {
17724
+ document.addEventListener("scroll", updateBounds, true);
17725
+ window.addEventListener("resize", updateBounds);
17726
+ return () => {
17727
+ document.removeEventListener("scroll", updateBounds, true);
17728
+ window.removeEventListener("resize", updateBounds);
17729
+ };
17730
+ }, []);
17731
+ function resetDestructiveTimeouts() {
17732
+ if (activeTimeout.current)
17733
+ clearTimeout(activeTimeout.current);
17734
+ if (persistingTimeout.current)
17735
+ clearTimeout(persistingTimeout.current);
17736
+ if (openTimeout.current)
17737
+ clearTimeout(openTimeout.current);
17738
+ }
17739
+ function attemptDeactivate() {
17740
+ if (activeTimeout.current)
17741
+ clearTimeout(activeTimeout.current);
17742
+ activeTimeout.current = setTimeout(() => {
17743
+ if (activeId.current !== id)
17744
+ return;
17745
+ setActiveId(null);
17746
+ }, inactiveTimeoutMs);
17747
+ }
17748
+ function attemptPersist() {
17749
+ setPersisting(true);
17750
+ if (persistingTimeout.current)
17751
+ clearTimeout(persistingTimeout.current);
17752
+ persistingTimeout.current = setTimeout(() => {
17753
+ setPersisting(false);
17754
+ }, PERSIST_TIMEOUT_MS);
17755
+ }
17756
+ function onMouseEnter() {
17757
+ resetDestructiveTimeouts();
17758
+ setHoveredId(id);
17759
+ setLocalHover(true);
17760
+ }
17761
+ function onMouseLeave() {
17762
+ setLocalHover(false);
17763
+ attemptDeactivate();
17764
+ attemptPersist();
17765
+ }
17766
+ reactExports.useEffect(() => {
17767
+ if (hide2) {
17768
+ setLocalHover(false);
17769
+ setActiveId(null);
17770
+ }
17771
+ }, [hide2, setActiveId]);
17772
+ function handleClick(e) {
17773
+ if (e.target instanceof HTMLElement && e.target.closest("a[href]")) {
17774
+ onMouseLeave();
17775
+ }
17776
+ }
17777
+ const Comp = asChild ? Root : "div";
17778
+ return jsxRuntimeExports.jsxs(Comp, { className: cn$4("inline-flex cursor-pointer flex-[0_1_auto] overflow-hidden", className), onMouseEnter, onMouseLeave, onClick: handleClick, ref: triggerRef, children: [jsxRuntimeExports.jsx(Slottable, { children: children2 }), (portalRef == null ? void 0 : portalRef.current) && (localHover || persisting) ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: cn$4("absolute top-0 p-3 left-0 max-w-max transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition && "!transition-none"), ref: contentRef, style: {
17779
+ ...noPadding ? { padding: 0 } : {},
17780
+ pointerEvents: rootVisible && visible && !ignoreCardPointerEvents ? "all" : "none"
17781
+ }, children: jsxRuntimeExports.jsx("div", { className: cn$4("min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), ref: contentMeasureRef, style: {
17782
+ opacity: Number(visible)
17783
+ }, children: content2 }) }, id), portalRef.current) : null] });
17784
+ }
16903
17785
  const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
16904
17786
  function Spinner({ size: size2 = 14, color: color5 }) {
16905
17787
  const config2 = size2 <= 12 ? {
@@ -42771,7 +43653,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
42771
43653
  var et = ({ className: e, language: t, style: o, isIncomplete: n, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": n || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s2 });
42772
43654
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
42773
43655
  var ot = ({ language: e }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e }) });
42774
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-BmmQMQWQ.js"), true ? __vite__mapDeps([3,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
43656
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-BAYKR78e.js"), true ? __vite__mapDeps([3,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
42775
43657
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
42776
43658
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
42777
43659
  return jsxRuntimeExports.jsx(Se.Provider, { value: { code: e }, children: jsxRuntimeExports.jsxs(et, { isIncomplete: s2, language: t, children: [jsxRuntimeExports.jsx(ot, { language: t }), n ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe, { className: o, language: t, result: c, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o, code: i, language: t, raw: c, ...r2 }) })] }) });
@@ -43880,127 +44762,127 @@ function TraceViewerContextProvider({ getQuickLinks, withPanel = false, children
43880
44762
  const useTraceViewer = () => reactExports.useContext(TraceViewerContext);
43881
44763
  const CustomPanelContext = reactExports.createContext(null);
43882
44764
  const useCustomPanelComponent = () => reactExports.useContext(CustomPanelContext);
43883
- const traceNode = "_traceNode_1fmf2_1";
43884
- const childRow = "_childRow_1fmf2_5";
43885
- const spanNode = "_spanNode_1fmf2_11";
43886
- const huge = "_huge_1fmf2_31";
43887
- const spanName = "_spanName_1fmf2_34";
43888
- const spanSpacer = "_spanSpacer_1fmf2_40";
43889
- const spanDuration = "_spanDuration_1fmf2_44";
43890
- const small = "_small_1fmf2_62";
43891
- const xHover = "_xHover_1fmf2_62";
43892
- const spanNodeEvent = "_spanNodeEvent_1fmf2_118";
43893
- const eventDiamond = "_eventDiamond_1fmf2_124";
43894
- const customEventColor = "_customEventColor_1fmf2_140";
43895
- const hoverInfo = "_hoverInfo_1fmf2_145";
43896
- const eventName = "_eventName_1fmf2_149";
43897
- const eventTimestamp = "_eventTimestamp_1fmf2_153";
43898
- const alignStart = "_alignStart_1fmf2_174";
43899
- const alignEnd = "_alignEnd_1fmf2_178";
43900
- const colorVercel = "_colorVercel_1fmf2_205";
43901
- const color0 = "_color0_1fmf2_213";
43902
- const color1 = "_color1_1fmf2_220";
43903
- const color2 = "_color2_1fmf2_227";
43904
- const color3 = "_color3_1fmf2_234";
43905
- const color4 = "_color4_1fmf2_241";
43906
- const colorHighlight = "_colorHighlight_1fmf2_248";
43907
- const unlit = "_unlit_1fmf2_256";
43908
- const mapContainer = "_mapContainer_1fmf2_262";
43909
- const spanDetailPanel = "_spanDetailPanel_1fmf2_329";
43910
- const spanDetailPanelResizer = "_spanDetailPanelResizer_1fmf2_338";
43911
- const spanDetailPanelTop = "_spanDetailPanelTop_1fmf2_353";
43912
- const spanDetailPanelBody = "_spanDetailPanelBody_1fmf2_362";
43913
- const spanDetailPanelTopInfo = "_spanDetailPanelTopInfo_1fmf2_375";
43914
- const spanNameDetailPanel = "_spanNameDetailPanel_1fmf2_389";
43915
- const spanDetailPanelTruncatedHeading = "_spanDetailPanelTruncatedHeading_1fmf2_395";
43916
- const spanDetailPanelName = "_spanDetailPanelName_1fmf2_405";
43917
- const spanDetailPanelDuration = "_spanDetailPanelDuration_1fmf2_416";
43918
- const spanDetailPanelCorner = "_spanDetailPanelCorner_1fmf2_427";
43919
- const spanDetailPanelCornerInner = "_spanDetailPanelCornerInner_1fmf2_437";
43920
- const spanDetailPanelCloseVerticalRule = "_spanDetailPanelCloseVerticalRule_1fmf2_445";
43921
- const spanDetailPanelClose = "_spanDetailPanelClose_1fmf2_445";
43922
- const spanDetailPanelAttribute = "_spanDetailPanelAttribute_1fmf2_467";
43923
- const spanDetailPanelAttributeKey = "_spanDetailPanelAttributeKey_1fmf2_484";
43924
- const spanDetailPanelAttributeValue = "_spanDetailPanelAttributeValue_1fmf2_492";
43925
- const spanDetailPanelQuickLink = "_spanDetailPanelQuickLink_1fmf2_503";
43926
- const spanDetailPanelQuickLinkLabel = "_spanDetailPanelQuickLinkLabel_1fmf2_506";
43927
- const detailGroup = "_detailGroup_1fmf2_519";
43928
- const expanded = "_expanded_1fmf2_533";
43929
- const collapsed = "_collapsed_1fmf2_534";
43930
- const ancestorGroup = "_ancestorGroup_1fmf2_535";
43931
- const detailHeading = "_detailHeading_1fmf2_539";
43932
- const buttonLink = "_buttonLink_1fmf2_562";
43933
- const note = "_note_1fmf2_581";
43934
- const skeleton = "_skeleton_1fmf2_589";
43935
- const skeletonRounded = "_skeletonRounded_1fmf2_595";
43936
- const detailHeadingIcon = "_detailHeadingIcon_1fmf2_599";
43937
- const infraSpanDescription = "_infraSpanDescription_1fmf2_603";
43938
- const ancestorNode = "_ancestorNode_1fmf2_613";
43939
- const ancestorText = "_ancestorText_1fmf2_629";
43940
- const ancestorName = "_ancestorName_1fmf2_639";
43941
- const ancestorDuration = "_ancestorDuration_1fmf2_644";
43942
- const ancestorLineContainer = "_ancestorLineContainer_1fmf2_649";
43943
- const ancestorLine = "_ancestorLine_1fmf2_649";
43944
- const zoomButtonGroup = "_zoomButtonGroup_1fmf2_701";
43945
- const zoomButton = "_zoomButton_1fmf2_701";
43946
- const divider = "_divider_1fmf2_751";
43947
- const markersContainer = "_markersContainer_1fmf2_758";
43948
- const markers = "_markers_1fmf2_758";
43949
- const marker = "_marker_1fmf2_758";
43950
- const notch = "_notch_1fmf2_792";
43951
- const markerLabel = "_markerLabel_1fmf2_798";
43952
- const markerClockTime = "_markerClockTime_1fmf2_807";
43953
- const eventMarkersContainer = "_eventMarkersContainer_1fmf2_816";
43954
- const eventMarkers = "_eventMarkers_1fmf2_816";
43955
- const eventMarker = "_eventMarker_1fmf2_816";
43956
- const cursorMarkerStickyParent = "_cursorMarkerStickyParent_1fmf2_839";
43957
- const cursorMarkerLabelContainer = "_cursorMarkerLabelContainer_1fmf2_848";
43958
- const cursorMarkerLabel = "_cursorMarkerLabel_1fmf2_848";
43959
- const cursorMarkerContainer = "_cursorMarkerContainer_1fmf2_898";
43960
- const cursorMarker = "_cursorMarker_1fmf2_839";
43961
- const cursorSelection = "_cursorSelection_1fmf2_916";
43962
- const traceViewer = "_traceViewer_1fmf2_966";
43963
- const mapCanvas = "_mapCanvas_1fmf2_972";
43964
- const zoomButtonTraceViewer = "_zoomButtonTraceViewer_1fmf2_988";
43965
- const timeline = "_timeline_1fmf2_1011";
43966
- const searchBar = "_searchBar_1fmf2_1019";
43967
- const searchInput = "_searchInput_1fmf2_1031";
43968
- const searchInputLabel = "_searchInputLabel_1fmf2_1038";
43969
- const searchInputPrefix = "_searchInputPrefix_1fmf2_1063";
43970
- const mapThumb = "_mapThumb_1fmf2_1101";
43971
- const spanDetailPanelTraceViewer = "_spanDetailPanelTraceViewer_1fmf2_1115";
43972
- const traceViewerContent = "_traceViewerContent_1fmf2_1134";
43973
- const inert = "_inert_1fmf2_1144";
43974
- const hidden = "_hidden_1fmf2_1180";
43975
- const mobile = "_mobile_1fmf2_1184";
43976
- const spanRunning = "_spanRunning_1fmf2_1194";
43977
- const spanPending = "_spanPending_1fmf2_1195";
43978
- const spanCompleted = "_spanCompleted_1fmf2_1203";
43979
- const spanCancelled = "_spanCancelled_1fmf2_1211";
43980
- const spanFailed = "_spanFailed_1fmf2_1219";
43981
- const spanPendingStriped = "_spanPendingStriped_1fmf2_1228";
43982
- const hasQueuedTime = "_hasQueuedTime_1fmf2_1242";
43983
- const spanSleep = "_spanSleep_1fmf2_1254";
43984
- const spanHook = "_spanHook_1fmf2_1263";
43985
- const segmentLayer = "_segmentLayer_1fmf2_1275";
43986
- const segment = "_segment_1fmf2_1275";
43987
- const segmentLabel = "_segmentLabel_1fmf2_1291";
43988
- const segmentTag = "_segmentTag_1fmf2_1306";
43989
- const segQueued = "_segQueued_1fmf2_1314";
43990
- const segRunning = "_segRunning_1fmf2_1325";
43991
- const segFailed = "_segFailed_1fmf2_1330";
43992
- const segRetrying = "_segRetrying_1fmf2_1335";
43993
- const segSucceeded = "_segSucceeded_1fmf2_1346";
43994
- const segWaiting = "_segWaiting_1fmf2_1351";
43995
- const segSleeping = "_segSleeping_1fmf2_1362";
43996
- const segReceived = "_segReceived_1fmf2_1367";
43997
- const boundaryMarker = "_boundaryMarker_1fmf2_1372";
43998
- const boundaryLine = "_boundaryLine_1fmf2_1373";
43999
- const hasSegments = "_hasSegments_1fmf2_1395";
44000
- const eventFailed = "_eventFailed_1fmf2_1432";
44001
- const eventRetrying = "_eventRetrying_1fmf2_1441";
44002
- const eventHook = "_eventHook_1fmf2_1450";
44003
- const eventDefault = "_eventDefault_1fmf2_1459";
44765
+ const traceNode = "_traceNode_1ytrx_1";
44766
+ const childRow = "_childRow_1ytrx_5";
44767
+ const spanNode = "_spanNode_1ytrx_11";
44768
+ const huge = "_huge_1ytrx_31";
44769
+ const spanName = "_spanName_1ytrx_34";
44770
+ const spanSpacer = "_spanSpacer_1ytrx_40";
44771
+ const spanDuration = "_spanDuration_1ytrx_44";
44772
+ const small = "_small_1ytrx_62";
44773
+ const xHover = "_xHover_1ytrx_62";
44774
+ const spanNodeEvent = "_spanNodeEvent_1ytrx_118";
44775
+ const eventDiamond = "_eventDiamond_1ytrx_124";
44776
+ const customEventColor = "_customEventColor_1ytrx_140";
44777
+ const hoverInfo = "_hoverInfo_1ytrx_145";
44778
+ const eventName = "_eventName_1ytrx_149";
44779
+ const eventTimestamp = "_eventTimestamp_1ytrx_153";
44780
+ const alignStart = "_alignStart_1ytrx_174";
44781
+ const alignEnd = "_alignEnd_1ytrx_178";
44782
+ const colorVercel = "_colorVercel_1ytrx_205";
44783
+ const color0 = "_color0_1ytrx_213";
44784
+ const color1 = "_color1_1ytrx_220";
44785
+ const color2 = "_color2_1ytrx_227";
44786
+ const color3 = "_color3_1ytrx_234";
44787
+ const color4 = "_color4_1ytrx_241";
44788
+ const colorHighlight = "_colorHighlight_1ytrx_248";
44789
+ const unlit = "_unlit_1ytrx_256";
44790
+ const mapContainer = "_mapContainer_1ytrx_262";
44791
+ const spanDetailPanel = "_spanDetailPanel_1ytrx_329";
44792
+ const spanDetailPanelResizer = "_spanDetailPanelResizer_1ytrx_338";
44793
+ const spanDetailPanelTop = "_spanDetailPanelTop_1ytrx_353";
44794
+ const spanDetailPanelBody = "_spanDetailPanelBody_1ytrx_362";
44795
+ const spanDetailPanelTopInfo = "_spanDetailPanelTopInfo_1ytrx_375";
44796
+ const spanNameDetailPanel = "_spanNameDetailPanel_1ytrx_389";
44797
+ const spanDetailPanelTruncatedHeading = "_spanDetailPanelTruncatedHeading_1ytrx_395";
44798
+ const spanDetailPanelName = "_spanDetailPanelName_1ytrx_405";
44799
+ const spanDetailPanelDuration = "_spanDetailPanelDuration_1ytrx_416";
44800
+ const spanDetailPanelCorner = "_spanDetailPanelCorner_1ytrx_427";
44801
+ const spanDetailPanelCornerInner = "_spanDetailPanelCornerInner_1ytrx_437";
44802
+ const spanDetailPanelCloseVerticalRule = "_spanDetailPanelCloseVerticalRule_1ytrx_445";
44803
+ const spanDetailPanelClose = "_spanDetailPanelClose_1ytrx_445";
44804
+ const spanDetailPanelAttribute = "_spanDetailPanelAttribute_1ytrx_467";
44805
+ const spanDetailPanelAttributeKey = "_spanDetailPanelAttributeKey_1ytrx_484";
44806
+ const spanDetailPanelAttributeValue = "_spanDetailPanelAttributeValue_1ytrx_492";
44807
+ const spanDetailPanelQuickLink = "_spanDetailPanelQuickLink_1ytrx_503";
44808
+ const spanDetailPanelQuickLinkLabel = "_spanDetailPanelQuickLinkLabel_1ytrx_506";
44809
+ const detailGroup = "_detailGroup_1ytrx_519";
44810
+ const expanded = "_expanded_1ytrx_533";
44811
+ const collapsed = "_collapsed_1ytrx_534";
44812
+ const ancestorGroup = "_ancestorGroup_1ytrx_535";
44813
+ const detailHeading = "_detailHeading_1ytrx_539";
44814
+ const buttonLink = "_buttonLink_1ytrx_562";
44815
+ const note = "_note_1ytrx_581";
44816
+ const skeleton = "_skeleton_1ytrx_589";
44817
+ const skeletonRounded = "_skeletonRounded_1ytrx_595";
44818
+ const detailHeadingIcon = "_detailHeadingIcon_1ytrx_599";
44819
+ const infraSpanDescription = "_infraSpanDescription_1ytrx_603";
44820
+ const ancestorNode = "_ancestorNode_1ytrx_613";
44821
+ const ancestorText = "_ancestorText_1ytrx_629";
44822
+ const ancestorName = "_ancestorName_1ytrx_639";
44823
+ const ancestorDuration = "_ancestorDuration_1ytrx_644";
44824
+ const ancestorLineContainer = "_ancestorLineContainer_1ytrx_649";
44825
+ const ancestorLine = "_ancestorLine_1ytrx_649";
44826
+ const zoomButtonGroup = "_zoomButtonGroup_1ytrx_701";
44827
+ const zoomButton = "_zoomButton_1ytrx_701";
44828
+ const divider = "_divider_1ytrx_751";
44829
+ const markersContainer = "_markersContainer_1ytrx_758";
44830
+ const markers = "_markers_1ytrx_758";
44831
+ const marker = "_marker_1ytrx_758";
44832
+ const notch = "_notch_1ytrx_792";
44833
+ const markerLabel = "_markerLabel_1ytrx_798";
44834
+ const markerClockTime = "_markerClockTime_1ytrx_807";
44835
+ const eventMarkersContainer = "_eventMarkersContainer_1ytrx_816";
44836
+ const eventMarkers = "_eventMarkers_1ytrx_816";
44837
+ const eventMarker = "_eventMarker_1ytrx_816";
44838
+ const cursorMarkerStickyParent = "_cursorMarkerStickyParent_1ytrx_839";
44839
+ const cursorMarkerLabelContainer = "_cursorMarkerLabelContainer_1ytrx_848";
44840
+ const cursorMarkerLabel = "_cursorMarkerLabel_1ytrx_848";
44841
+ const cursorMarkerContainer = "_cursorMarkerContainer_1ytrx_898";
44842
+ const cursorMarker = "_cursorMarker_1ytrx_839";
44843
+ const cursorSelection = "_cursorSelection_1ytrx_916";
44844
+ const traceViewer = "_traceViewer_1ytrx_966";
44845
+ const mapCanvas = "_mapCanvas_1ytrx_972";
44846
+ const zoomButtonTraceViewer = "_zoomButtonTraceViewer_1ytrx_988";
44847
+ const timeline = "_timeline_1ytrx_1011";
44848
+ const searchBar = "_searchBar_1ytrx_1019";
44849
+ const searchInput = "_searchInput_1ytrx_1031";
44850
+ const searchInputLabel = "_searchInputLabel_1ytrx_1038";
44851
+ const searchInputPrefix = "_searchInputPrefix_1ytrx_1063";
44852
+ const mapThumb = "_mapThumb_1ytrx_1101";
44853
+ const spanDetailPanelTraceViewer = "_spanDetailPanelTraceViewer_1ytrx_1115";
44854
+ const traceViewerContent = "_traceViewerContent_1ytrx_1134";
44855
+ const inert = "_inert_1ytrx_1144";
44856
+ const hidden = "_hidden_1ytrx_1180";
44857
+ const mobile = "_mobile_1ytrx_1184";
44858
+ const spanRunning = "_spanRunning_1ytrx_1194";
44859
+ const spanPending = "_spanPending_1ytrx_1195";
44860
+ const spanCompleted = "_spanCompleted_1ytrx_1203";
44861
+ const spanCancelled = "_spanCancelled_1ytrx_1211";
44862
+ const spanFailed = "_spanFailed_1ytrx_1219";
44863
+ const spanPendingStriped = "_spanPendingStriped_1ytrx_1228";
44864
+ const hasQueuedTime = "_hasQueuedTime_1ytrx_1242";
44865
+ const spanSleep = "_spanSleep_1ytrx_1254";
44866
+ const spanHook = "_spanHook_1ytrx_1263";
44867
+ const segmentLayer = "_segmentLayer_1ytrx_1275";
44868
+ const segment = "_segment_1ytrx_1275";
44869
+ const segmentLabel = "_segmentLabel_1ytrx_1291";
44870
+ const segmentTag = "_segmentTag_1ytrx_1306";
44871
+ const segQueued = "_segQueued_1ytrx_1314";
44872
+ const segRunning = "_segRunning_1ytrx_1325";
44873
+ const segFailed = "_segFailed_1ytrx_1330";
44874
+ const segRetrying = "_segRetrying_1ytrx_1335";
44875
+ const segSucceeded = "_segSucceeded_1ytrx_1346";
44876
+ const segWaiting = "_segWaiting_1ytrx_1351";
44877
+ const segSleeping = "_segSleeping_1ytrx_1362";
44878
+ const segReceived = "_segReceived_1ytrx_1367";
44879
+ const boundaryMarker = "_boundaryMarker_1ytrx_1372";
44880
+ const boundaryLine = "_boundaryLine_1ytrx_1373";
44881
+ const hasSegments = "_hasSegments_1ytrx_1395";
44882
+ const eventFailed = "_eventFailed_1ytrx_1432";
44883
+ const eventRetrying = "_eventRetrying_1ytrx_1441";
44884
+ const eventHook = "_eventHook_1ytrx_1450";
44885
+ const eventDefault = "_eventDefault_1ytrx_1459";
44004
44886
  const styles = {
44005
44887
  traceNode,
44006
44888
  childRow,
@@ -44064,7 +44946,7 @@ const styles = {
44064
44946
  ancestorLineContainer,
44065
44947
  ancestorLine,
44066
44948
  zoomButtonGroup,
44067
- "zoom-buttons-fade-in": "_zoom-buttons-fade-in_1fmf2_1",
44949
+ "zoom-buttons-fade-in": "_zoom-buttons-fade-in_1ytrx_1",
44068
44950
  zoomButton,
44069
44951
  divider,
44070
44952
  markersContainer,
@@ -44083,7 +44965,7 @@ const styles = {
44083
44965
  cursorMarker,
44084
44966
  cursorSelection,
44085
44967
  traceViewer,
44086
- "span-skeleton": "_span-skeleton_1fmf2_1",
44968
+ "span-skeleton": "_span-skeleton_1ytrx_1",
44087
44969
  mapCanvas,
44088
44970
  zoomButtonTraceViewer,
44089
44971
  timeline,
@@ -45420,115 +46302,6 @@ function useServerConfig() {
45420
46302
  }
45421
46303
  return context;
45422
46304
  }
45423
- function setRef(ref, value) {
45424
- if (typeof ref === "function") {
45425
- return ref(value);
45426
- } else if (ref !== null && ref !== void 0) {
45427
- ref.current = value;
45428
- }
45429
- }
45430
- function composeRefs(...refs) {
45431
- return (node2) => {
45432
- let hasCleanup = false;
45433
- const cleanups = refs.map((ref) => {
45434
- const cleanup = setRef(ref, node2);
45435
- if (!hasCleanup && typeof cleanup == "function") {
45436
- hasCleanup = true;
45437
- }
45438
- return cleanup;
45439
- });
45440
- if (hasCleanup) {
45441
- return () => {
45442
- for (let i = 0; i < cleanups.length; i++) {
45443
- const cleanup = cleanups[i];
45444
- if (typeof cleanup == "function") {
45445
- cleanup();
45446
- } else {
45447
- setRef(refs[i], null);
45448
- }
45449
- }
45450
- };
45451
- }
45452
- };
45453
- }
45454
- function useComposedRefs(...refs) {
45455
- return reactExports.useCallback(composeRefs(...refs), refs);
45456
- }
45457
- var Slot = reactExports.forwardRef((props, forwardedRef) => {
45458
- const { children: children2, ...slotProps } = props;
45459
- const childrenArray = reactExports.Children.toArray(children2);
45460
- const slottable = childrenArray.find(isSlottable);
45461
- if (slottable) {
45462
- const newElement = slottable.props.children;
45463
- const newChildren = childrenArray.map((child) => {
45464
- if (child === slottable) {
45465
- if (reactExports.Children.count(newElement) > 1) return reactExports.Children.only(null);
45466
- return reactExports.isValidElement(newElement) ? newElement.props.children : null;
45467
- } else {
45468
- return child;
45469
- }
45470
- });
45471
- return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: reactExports.isValidElement(newElement) ? reactExports.cloneElement(newElement, void 0, newChildren) : null });
45472
- }
45473
- return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: children2 });
45474
- });
45475
- Slot.displayName = "Slot";
45476
- var SlotClone = reactExports.forwardRef((props, forwardedRef) => {
45477
- const { children: children2, ...slotProps } = props;
45478
- if (reactExports.isValidElement(children2)) {
45479
- const childrenRef = getElementRef(children2);
45480
- return reactExports.cloneElement(children2, {
45481
- ...mergeProps(slotProps, children2.props),
45482
- // @ts-ignore
45483
- ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
45484
- });
45485
- }
45486
- return reactExports.Children.count(children2) > 1 ? reactExports.Children.only(null) : null;
45487
- });
45488
- SlotClone.displayName = "SlotClone";
45489
- var Slottable = ({ children: children2 }) => {
45490
- return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children2 });
45491
- };
45492
- function isSlottable(child) {
45493
- return reactExports.isValidElement(child) && child.type === Slottable;
45494
- }
45495
- function mergeProps(slotProps, childProps) {
45496
- const overrideProps = { ...childProps };
45497
- for (const propName in childProps) {
45498
- const slotPropValue = slotProps[propName];
45499
- const childPropValue = childProps[propName];
45500
- const isHandler = /^on[A-Z]/.test(propName);
45501
- if (isHandler) {
45502
- if (slotPropValue && childPropValue) {
45503
- overrideProps[propName] = (...args) => {
45504
- childPropValue(...args);
45505
- slotPropValue(...args);
45506
- };
45507
- } else if (slotPropValue) {
45508
- overrideProps[propName] = slotPropValue;
45509
- }
45510
- } else if (propName === "style") {
45511
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
45512
- } else if (propName === "className") {
45513
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
45514
- }
45515
- }
45516
- return { ...slotProps, ...overrideProps };
45517
- }
45518
- function getElementRef(element2) {
45519
- var _a3, _b2;
45520
- let getter = (_a3 = Object.getOwnPropertyDescriptor(element2.props, "ref")) == null ? void 0 : _a3.get;
45521
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
45522
- if (mayWarn) {
45523
- return element2.ref;
45524
- }
45525
- getter = (_b2 = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b2.get;
45526
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
45527
- if (mayWarn) {
45528
- return element2.props.ref;
45529
- }
45530
- return element2.props.ref || element2.ref;
45531
- }
45532
46305
  const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
45533
46306
  const cx = clsx;
45534
46307
  const cva = (base, config2) => (props) => {
@@ -47921,7 +48694,7 @@ const mermaid3ZIDBTTL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
47921
48694
  Mermaid: Nt
47922
48695
  }, Symbol.toStringTag, { value: "Module" }));
47923
48696
  export {
47924
- isExpiredMarker as $,
48697
+ DataInspector as $,
47925
48698
  Anchor as A,
47926
48699
  Button as B,
47927
48700
  Content as C,
@@ -47935,79 +48708,82 @@ export {
47935
48708
  Ks as K,
47936
48709
  LoaderCircle as L,
47937
48710
  Spinner as M,
47938
- Skeleton$1 as N,
47939
- DecryptClickContext as O,
48711
+ useHasContextCardProvider as N,
48712
+ ContextCardProvider as O,
47940
48713
  Primitive as P,
47941
48714
  Qe as Q,
47942
48715
  R,
47943
48716
  ServerConfigProvider as S,
47944
48717
  Tooltip as T,
47945
- isEncryptedMarker as U,
48718
+ ContextCardTrigger as U,
47946
48719
  VISUALLY_HIDDEN_STYLES as V,
47947
- formatDuration as W,
47948
- DataInspector as X,
48720
+ Skeleton$1 as W,
48721
+ DecryptClickContext as X,
47949
48722
  Yr as Y,
47950
- StreamClickContext as Z,
47951
- _r as _,
48723
+ isEncryptedMarker as Z,
48724
+ formatDuration as _,
47952
48725
  TooltipTrigger as a,
47953
- isDoStreamStep as a0,
47954
- extractConversation as a1,
47955
- Lock as a2,
47956
- EVENT_DATA_REF_FIELDS as a3,
47957
- clsx as a4,
47958
- useTraceViewer as a5,
47959
- styles as a6,
47960
- formatDurationForTimeline as a7,
47961
- formatWallClockTime as a8,
47962
- useImmediateStyle as a9,
47963
- getWebRevivers as aA,
47964
- fetchEvent as aB,
47965
- fetchEventsByCorrelationId as aC,
47966
- LIVE_UPDATE_INTERVAL_MS as aD,
47967
- getEncryptionKeyForRun as aE,
47968
- StreamViewer as aF,
47969
- cn$4 as aG,
47970
- composeRefs as aH,
47971
- useFloating as aI,
47972
- offset as aJ,
47973
- shift as aK,
47974
- limitShift as aL,
47975
- flip as aM,
47976
- size as aN,
47977
- arrow as aO,
47978
- hide as aP,
47979
- autoUpdate as aQ,
47980
- cancelRun as aR,
47981
- reenqueueRun as aS,
47982
- wakeUpRun as aT,
47983
- resumeHook as aU,
47984
- recreateRun as aV,
47985
- TIMELINE_PADDING as aa,
47986
- formatTimeSelection as ab,
47987
- MARKER_HEIGHT as ac,
47988
- ROW_HEIGHT as ad,
47989
- ROW_PADDING as ae,
47990
- SEARCH_HEIGHT as af,
47991
- getHighResInMs as ag,
47992
- getMsInHighRes as ah,
47993
- MARKER_NOTCH_HEIGHT as ai,
47994
- MAP_HEIGHT as aj,
47995
- SEARCH_GAP as ak,
47996
- MiniMap as al,
47997
- SpanNodes as am,
47998
- SpanDetailPanel as an,
47999
- TraceViewerContextProvider as ao,
48000
- hydrateResourceIOWithKey as ap,
48001
- hydrateResourceIO as aq,
48002
- fetchHook as ar,
48003
- fetchStep as as,
48004
- hasEncryptedFields as at,
48005
- fetchStreams as au,
48006
- Slot as av,
48007
- Slottable as aw,
48008
- buttonVariants as ax,
48009
- isEncryptedData as ay,
48010
- hydrateData as az,
48726
+ _r as a0,
48727
+ StreamClickContext as a1,
48728
+ isExpiredMarker as a2,
48729
+ isDoStreamStep as a3,
48730
+ extractConversation as a4,
48731
+ Lock as a5,
48732
+ EVENT_DATA_REF_FIELDS as a6,
48733
+ clsx as a7,
48734
+ useTraceViewer as a8,
48735
+ styles as a9,
48736
+ buttonVariants as aA,
48737
+ isEncryptedData as aB,
48738
+ hydrateData as aC,
48739
+ getWebRevivers as aD,
48740
+ fetchEvent as aE,
48741
+ fetchEventsByCorrelationId as aF,
48742
+ LIVE_UPDATE_INTERVAL_MS as aG,
48743
+ getEncryptionKeyForRun as aH,
48744
+ StreamViewer as aI,
48745
+ cn$4 as aJ,
48746
+ composeRefs as aK,
48747
+ useFloating as aL,
48748
+ offset as aM,
48749
+ shift as aN,
48750
+ limitShift as aO,
48751
+ flip as aP,
48752
+ size as aQ,
48753
+ arrow as aR,
48754
+ hide as aS,
48755
+ autoUpdate as aT,
48756
+ cancelRun as aU,
48757
+ reenqueueRun as aV,
48758
+ wakeUpRun as aW,
48759
+ resumeHook as aX,
48760
+ recreateRun as aY,
48761
+ formatDurationForTimeline as aa,
48762
+ formatWallClockTime as ab,
48763
+ useImmediateStyle as ac,
48764
+ TIMELINE_PADDING as ad,
48765
+ formatTimeSelection as ae,
48766
+ MARKER_HEIGHT as af,
48767
+ ROW_HEIGHT as ag,
48768
+ ROW_PADDING as ah,
48769
+ SEARCH_HEIGHT as ai,
48770
+ getHighResInMs as aj,
48771
+ getMsInHighRes as ak,
48772
+ MARKER_NOTCH_HEIGHT as al,
48773
+ MAP_HEIGHT as am,
48774
+ SEARCH_GAP as an,
48775
+ MiniMap as ao,
48776
+ SpanNodes as ap,
48777
+ SpanDetailPanel as aq,
48778
+ TraceViewerContextProvider as ar,
48779
+ hydrateResourceIOWithKey as as,
48780
+ hydrateResourceIO as at,
48781
+ fetchHook as au,
48782
+ fetchStep as av,
48783
+ hasEncryptedFields as aw,
48784
+ fetchStreams as ax,
48785
+ Slot as ay,
48786
+ Slottable as az,
48011
48787
  TooltipContent as b,
48012
48788
  createLucideIcon as c,
48013
48789
  cn as d,