@workflow/web 5.0.0-beta.3 → 5.0.0-beta.4

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 (20) hide show
  1. package/build/client/assets/{highlighted-body-B3W2YXNL-Be0uLJd8.js → highlighted-body-B3W2YXNL-B7T9pqeb.js} +1 -1
  2. package/build/client/assets/{home-Ce97yLJ7.js → home-BIQJMe_Q.js} +2 -2
  3. package/build/client/assets/{manifest-923d96a0.js → manifest-77894282.js} +1 -1
  4. package/build/client/assets/{mermaid-3ZIDBTTL-BSJR0c5A.js → mermaid-3ZIDBTTL-w46Kr90n.js} +148 -164
  5. package/build/client/assets/root-C0Tu5TVN.css +1 -0
  6. package/build/client/assets/{root-DdOfCnSG.js → root-sXuXrryl.js} +1 -1
  7. package/build/client/assets/{run-detail-JQ32aJru.js → run-detail-7Pj2mQLs.js} +411 -67
  8. package/build/client/assets/server-build-DqaxIrF0.css +1 -0
  9. package/build/client/assets/{workflow-graph-viewer-DYhMo9jl.js → workflow-graph-viewer-De9JQkZc.js} +1 -1
  10. package/build/server/assets/{app-Bh_7yjpl.js → app-CtOg8_v5.js} +1 -1
  11. package/build/server/assets/{highlighted-body-B3W2YXNL-Cdb-ypB4.js → highlighted-body-B3W2YXNL-uaucauLI.js} +2 -2
  12. package/build/server/assets/{index-CNvEtg5c.js → index-D02biwxV.js} +3 -3
  13. package/build/server/assets/{mermaid-3ZIDBTTL-CE8Volk5.js → mermaid-3ZIDBTTL-DrZ5V6uv.js} +2 -2
  14. package/build/server/assets/{server-build-DztRAoMd.js → server-build-DT0Hg0Yf.js} +666 -340
  15. package/build/server/assets/{token-DMEdoEUo.js → token-D7_Lld85.js} +2 -2
  16. package/build/server/assets/{token-util-DsMisyo3.js → token-util-CfY4anoc.js} +2 -2
  17. package/build/server/index.js +1 -1
  18. package/package.json +5 -5
  19. package/build/client/assets/root-DXDFWibD.css +0 -1
  20. package/build/client/assets/server-build-pZ5ucXET.css +0 -1
@@ -14,7 +14,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
14
14
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
15
15
  var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
16
16
  var _a2, _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn, _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn, _reader, _worldPromise, _Run_instances, lazyWorldPromise_get, _encryptionKeyPromise, _resilientStart, getEncryptionKey_fn, pollReturnValue_fn;
17
- import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-Bh_7yjpl.js";
17
+ import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-CtOg8_v5.js";
18
18
  import require$$0$4, { PassThrough } from "node:stream";
19
19
  import require$$0 from "util";
20
20
  import require$$1 from "crypto";
@@ -30198,7 +30198,7 @@ const createLucideIcon = (iconName, iconNode) => {
30198
30198
  * This source code is licensed under the ISC license.
30199
30199
  * See the LICENSE file in the root directory of this source tree.
30200
30200
  */
30201
- const __iconNode$y = [
30201
+ const __iconNode$D = [
30202
30202
  [
30203
30203
  "path",
30204
30204
  {
@@ -30207,14 +30207,14 @@ const __iconNode$y = [
30207
30207
  }
30208
30208
  ]
30209
30209
  ];
30210
- const Activity = createLucideIcon("activity", __iconNode$y);
30210
+ const Activity = createLucideIcon("activity", __iconNode$D);
30211
30211
  /**
30212
30212
  * @license lucide-react v0.575.0 - ISC
30213
30213
  *
30214
30214
  * This source code is licensed under the ISC license.
30215
30215
  * See the LICENSE file in the root directory of this source tree.
30216
30216
  */
30217
- const __iconNode$x = [
30217
+ const __iconNode$C = [
30218
30218
  ["path", { d: "M6.87 6.87a8 8 0 1 0 11.26 11.26", key: "3on8tj" }],
30219
30219
  ["path", { d: "M19.9 14.25a8 8 0 0 0-9.15-9.15", key: "15ghsc" }],
30220
30220
  ["path", { d: "m22 6-3-3", key: "1opdir" }],
@@ -30222,105 +30222,127 @@ const __iconNode$x = [
30222
30222
  ["path", { d: "m2 2 20 20", key: "1ooewy" }],
30223
30223
  ["path", { d: "M4 4 2 6", key: "1ycko6" }]
30224
30224
  ];
30225
- const AlarmClockOff = createLucideIcon("alarm-clock-off", __iconNode$x);
30225
+ const AlarmClockOff = createLucideIcon("alarm-clock-off", __iconNode$C);
30226
30226
  /**
30227
30227
  * @license lucide-react v0.575.0 - ISC
30228
30228
  *
30229
30229
  * This source code is licensed under the ISC license.
30230
30230
  * See the LICENSE file in the root directory of this source tree.
30231
30231
  */
30232
- const __iconNode$w = [
30232
+ const __iconNode$B = [
30233
30233
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
30234
30234
  ["path", { d: "M7 20V4", key: "1yoxec" }],
30235
30235
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
30236
30236
  ["path", { d: "M15 10V6.5a2.5 2.5 0 0 1 5 0V10", key: "ag13bf" }],
30237
30237
  ["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
30238
30238
  ];
30239
- const ArrowDownAZ = createLucideIcon("arrow-down-a-z", __iconNode$w);
30239
+ const ArrowDownAZ = createLucideIcon("arrow-down-a-z", __iconNode$B);
30240
+ /**
30241
+ * @license lucide-react v0.575.0 - ISC
30242
+ *
30243
+ * This source code is licensed under the ISC license.
30244
+ * See the LICENSE file in the root directory of this source tree.
30245
+ */
30246
+ const __iconNode$A = [
30247
+ ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
30248
+ ["path", { d: "M19 12H5", key: "x3x0zl" }]
30249
+ ];
30250
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$A);
30251
+ /**
30252
+ * @license lucide-react v0.575.0 - ISC
30253
+ *
30254
+ * This source code is licensed under the ISC license.
30255
+ * See the LICENSE file in the root directory of this source tree.
30256
+ */
30257
+ const __iconNode$z = [
30258
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
30259
+ ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
30260
+ ];
30261
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$z);
30240
30262
  /**
30241
30263
  * @license lucide-react v0.575.0 - ISC
30242
30264
  *
30243
30265
  * This source code is licensed under the ISC license.
30244
30266
  * See the LICENSE file in the root directory of this source tree.
30245
30267
  */
30246
- const __iconNode$v = [
30268
+ const __iconNode$y = [
30247
30269
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
30248
30270
  ["path", { d: "M7 4v16", key: "1glfcx" }],
30249
30271
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
30250
30272
  ["path", { d: "M15 10V6.5a2.5 2.5 0 0 1 5 0V10", key: "ag13bf" }],
30251
30273
  ["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
30252
30274
  ];
30253
- const ArrowUpAZ = createLucideIcon("arrow-up-a-z", __iconNode$v);
30275
+ const ArrowUpAZ = createLucideIcon("arrow-up-a-z", __iconNode$y);
30254
30276
  /**
30255
30277
  * @license lucide-react v0.575.0 - ISC
30256
30278
  *
30257
30279
  * This source code is licensed under the ISC license.
30258
30280
  * See the LICENSE file in the root directory of this source tree.
30259
30281
  */
30260
- const __iconNode$u = [
30282
+ const __iconNode$x = [
30261
30283
  ["path", { d: "M7 7h10v10", key: "1tivn9" }],
30262
30284
  ["path", { d: "M7 17 17 7", key: "1vkiza" }]
30263
30285
  ];
30264
- const ArrowUpRight = createLucideIcon("arrow-up-right", __iconNode$u);
30286
+ const ArrowUpRight = createLucideIcon("arrow-up-right", __iconNode$x);
30265
30287
  /**
30266
30288
  * @license lucide-react v0.575.0 - ISC
30267
30289
  *
30268
30290
  * This source code is licensed under the ISC license.
30269
30291
  * See the LICENSE file in the root directory of this source tree.
30270
30292
  */
30271
- const __iconNode$t = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
30272
- const Check = createLucideIcon("check", __iconNode$t);
30293
+ const __iconNode$w = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
30294
+ const Check = createLucideIcon("check", __iconNode$w);
30273
30295
  /**
30274
30296
  * @license lucide-react v0.575.0 - ISC
30275
30297
  *
30276
30298
  * This source code is licensed under the ISC license.
30277
30299
  * See the LICENSE file in the root directory of this source tree.
30278
30300
  */
30279
- const __iconNode$s = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
30280
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$s);
30301
+ const __iconNode$v = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
30302
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$v);
30281
30303
  /**
30282
30304
  * @license lucide-react v0.575.0 - ISC
30283
30305
  *
30284
30306
  * This source code is licensed under the ISC license.
30285
30307
  * See the LICENSE file in the root directory of this source tree.
30286
30308
  */
30287
- const __iconNode$r = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
30288
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$r);
30309
+ const __iconNode$u = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
30310
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$u);
30289
30311
  /**
30290
30312
  * @license lucide-react v0.575.0 - ISC
30291
30313
  *
30292
30314
  * This source code is licensed under the ISC license.
30293
30315
  * See the LICENSE file in the root directory of this source tree.
30294
30316
  */
30295
- const __iconNode$q = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
30296
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$q);
30317
+ const __iconNode$t = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
30318
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$t);
30297
30319
  /**
30298
30320
  * @license lucide-react v0.575.0 - ISC
30299
30321
  *
30300
30322
  * This source code is licensed under the ISC license.
30301
30323
  * See the LICENSE file in the root directory of this source tree.
30302
30324
  */
30303
- const __iconNode$p = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
30304
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$p);
30325
+ const __iconNode$s = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
30326
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$s);
30305
30327
  /**
30306
30328
  * @license lucide-react v0.575.0 - ISC
30307
30329
  *
30308
30330
  * This source code is licensed under the ISC license.
30309
30331
  * See the LICENSE file in the root directory of this source tree.
30310
30332
  */
30311
- const __iconNode$o = [
30333
+ const __iconNode$r = [
30312
30334
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30313
30335
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
30314
30336
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
30315
30337
  ];
30316
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$o);
30338
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$r);
30317
30339
  /**
30318
30340
  * @license lucide-react v0.575.0 - ISC
30319
30341
  *
30320
30342
  * This source code is licensed under the ISC license.
30321
30343
  * See the LICENSE file in the root directory of this source tree.
30322
30344
  */
30323
- const __iconNode$n = [
30345
+ const __iconNode$q = [
30324
30346
  [
30325
30347
  "path",
30326
30348
  {
@@ -30330,115 +30352,115 @@ const __iconNode$n = [
30330
30352
  ],
30331
30353
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
30332
30354
  ];
30333
- const CirclePlay = createLucideIcon("circle-play", __iconNode$n);
30355
+ const CirclePlay = createLucideIcon("circle-play", __iconNode$q);
30334
30356
  /**
30335
30357
  * @license lucide-react v0.575.0 - ISC
30336
30358
  *
30337
30359
  * This source code is licensed under the ISC license.
30338
30360
  * See the LICENSE file in the root directory of this source tree.
30339
30361
  */
30340
- const __iconNode$m = [
30362
+ const __iconNode$p = [
30341
30363
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30342
30364
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
30343
30365
  ["path", { d: "M12 17h.01", key: "p32p05" }]
30344
30366
  ];
30345
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$m);
30367
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$p);
30346
30368
  /**
30347
30369
  * @license lucide-react v0.575.0 - ISC
30348
30370
  *
30349
30371
  * This source code is licensed under the ISC license.
30350
30372
  * See the LICENSE file in the root directory of this source tree.
30351
30373
  */
30352
- const __iconNode$l = [
30374
+ const __iconNode$o = [
30353
30375
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30354
30376
  ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1", key: "1ssd4o" }]
30355
30377
  ];
30356
- const CircleStop = createLucideIcon("circle-stop", __iconNode$l);
30378
+ const CircleStop = createLucideIcon("circle-stop", __iconNode$o);
30357
30379
  /**
30358
30380
  * @license lucide-react v0.575.0 - ISC
30359
30381
  *
30360
30382
  * This source code is licensed under the ISC license.
30361
30383
  * See the LICENSE file in the root directory of this source tree.
30362
30384
  */
30363
- const __iconNode$k = [
30385
+ const __iconNode$n = [
30364
30386
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30365
30387
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
30366
30388
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
30367
30389
  ];
30368
- const CircleX = createLucideIcon("circle-x", __iconNode$k);
30390
+ const CircleX = createLucideIcon("circle-x", __iconNode$n);
30369
30391
  /**
30370
30392
  * @license lucide-react v0.575.0 - ISC
30371
30393
  *
30372
30394
  * This source code is licensed under the ISC license.
30373
30395
  * See the LICENSE file in the root directory of this source tree.
30374
30396
  */
30375
- const __iconNode$j = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
30376
- const Circle = createLucideIcon("circle", __iconNode$j);
30397
+ const __iconNode$m = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
30398
+ const Circle = createLucideIcon("circle", __iconNode$m);
30377
30399
  /**
30378
30400
  * @license lucide-react v0.575.0 - ISC
30379
30401
  *
30380
30402
  * This source code is licensed under the ISC license.
30381
30403
  * See the LICENSE file in the root directory of this source tree.
30382
30404
  */
30383
- const __iconNode$i = [
30405
+ const __iconNode$l = [
30384
30406
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30385
30407
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
30386
30408
  ];
30387
- const Clock = createLucideIcon("clock", __iconNode$i);
30409
+ const Clock = createLucideIcon("clock", __iconNode$l);
30388
30410
  /**
30389
30411
  * @license lucide-react v0.575.0 - ISC
30390
30412
  *
30391
30413
  * This source code is licensed under the ISC license.
30392
30414
  * See the LICENSE file in the root directory of this source tree.
30393
30415
  */
30394
- const __iconNode$h = [
30416
+ const __iconNode$k = [
30395
30417
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
30396
30418
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
30397
30419
  ];
30398
- const Copy = createLucideIcon("copy", __iconNode$h);
30420
+ const Copy = createLucideIcon("copy", __iconNode$k);
30399
30421
  /**
30400
30422
  * @license lucide-react v0.575.0 - ISC
30401
30423
  *
30402
30424
  * This source code is licensed under the ISC license.
30403
30425
  * See the LICENSE file in the root directory of this source tree.
30404
30426
  */
30405
- const __iconNode$g = [
30427
+ const __iconNode$j = [
30406
30428
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
30407
30429
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
30408
30430
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
30409
30431
  ];
30410
- const Ellipsis = createLucideIcon("ellipsis", __iconNode$g);
30432
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$j);
30411
30433
  /**
30412
30434
  * @license lucide-react v0.575.0 - ISC
30413
30435
  *
30414
30436
  * This source code is licensed under the ISC license.
30415
30437
  * See the LICENSE file in the root directory of this source tree.
30416
30438
  */
30417
- const __iconNode$f = [
30439
+ const __iconNode$i = [
30418
30440
  ["path", { d: "M15 6a9 9 0 0 0-9 9V3", key: "1cii5b" }],
30419
30441
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
30420
30442
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }]
30421
30443
  ];
30422
- const GitBranch = createLucideIcon("git-branch", __iconNode$f);
30444
+ const GitBranch = createLucideIcon("git-branch", __iconNode$i);
30423
30445
  /**
30424
30446
  * @license lucide-react v0.575.0 - ISC
30425
30447
  *
30426
30448
  * This source code is licensed under the ISC license.
30427
30449
  * See the LICENSE file in the root directory of this source tree.
30428
30450
  */
30429
- const __iconNode$e = [
30451
+ const __iconNode$h = [
30430
30452
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
30431
30453
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
30432
30454
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
30433
30455
  ];
30434
- const Link2 = createLucideIcon("link-2", __iconNode$e);
30456
+ const Link2 = createLucideIcon("link-2", __iconNode$h);
30435
30457
  /**
30436
30458
  * @license lucide-react v0.575.0 - ISC
30437
30459
  *
30438
30460
  * This source code is licensed under the ISC license.
30439
30461
  * See the LICENSE file in the root directory of this source tree.
30440
30462
  */
30441
- const __iconNode$d = [
30463
+ const __iconNode$g = [
30442
30464
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
30443
30465
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
30444
30466
  ["path", { d: "M3 19h.01", key: "noohij" }],
@@ -30446,53 +30468,53 @@ const __iconNode$d = [
30446
30468
  ["path", { d: "M8 12h13", key: "1za7za" }],
30447
30469
  ["path", { d: "M8 19h13", key: "m83p4d" }]
30448
30470
  ];
30449
- const List$1 = createLucideIcon("list", __iconNode$d);
30471
+ const List$1 = createLucideIcon("list", __iconNode$g);
30450
30472
  /**
30451
30473
  * @license lucide-react v0.575.0 - ISC
30452
30474
  *
30453
30475
  * This source code is licensed under the ISC license.
30454
30476
  * See the LICENSE file in the root directory of this source tree.
30455
30477
  */
30456
- const __iconNode$c = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
30457
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$c);
30478
+ const __iconNode$f = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
30479
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$f);
30458
30480
  /**
30459
30481
  * @license lucide-react v0.575.0 - ISC
30460
30482
  *
30461
30483
  * This source code is licensed under the ISC license.
30462
30484
  * See the LICENSE file in the root directory of this source tree.
30463
30485
  */
30464
- const __iconNode$b = [
30486
+ const __iconNode$e = [
30465
30487
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
30466
30488
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
30467
30489
  ];
30468
- const Lock = createLucideIcon("lock", __iconNode$b);
30490
+ const Lock = createLucideIcon("lock", __iconNode$e);
30469
30491
  /**
30470
30492
  * @license lucide-react v0.575.0 - ISC
30471
30493
  *
30472
30494
  * This source code is licensed under the ISC license.
30473
30495
  * See the LICENSE file in the root directory of this source tree.
30474
30496
  */
30475
- const __iconNode$a = [["path", { d: "M5 12h14", key: "1ays0h" }]];
30476
- const Minus = createLucideIcon("minus", __iconNode$a);
30497
+ const __iconNode$d = [["path", { d: "M5 12h14", key: "1ays0h" }]];
30498
+ const Minus = createLucideIcon("minus", __iconNode$d);
30477
30499
  /**
30478
30500
  * @license lucide-react v0.575.0 - ISC
30479
30501
  *
30480
30502
  * This source code is licensed under the ISC license.
30481
30503
  * See the LICENSE file in the root directory of this source tree.
30482
30504
  */
30483
- const __iconNode$9 = [
30505
+ const __iconNode$c = [
30484
30506
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
30485
30507
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
30486
30508
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
30487
30509
  ];
30488
- const Monitor = createLucideIcon("monitor", __iconNode$9);
30510
+ const Monitor = createLucideIcon("monitor", __iconNode$c);
30489
30511
  /**
30490
30512
  * @license lucide-react v0.575.0 - ISC
30491
30513
  *
30492
30514
  * This source code is licensed under the ISC license.
30493
30515
  * See the LICENSE file in the root directory of this source tree.
30494
30516
  */
30495
- const __iconNode$8 = [
30517
+ const __iconNode$b = [
30496
30518
  [
30497
30519
  "path",
30498
30520
  {
@@ -30501,49 +30523,60 @@ const __iconNode$8 = [
30501
30523
  }
30502
30524
  ]
30503
30525
  ];
30504
- const Moon = createLucideIcon("moon", __iconNode$8);
30526
+ const Moon = createLucideIcon("moon", __iconNode$b);
30505
30527
  /**
30506
30528
  * @license lucide-react v0.575.0 - ISC
30507
30529
  *
30508
30530
  * This source code is licensed under the ISC license.
30509
30531
  * See the LICENSE file in the root directory of this source tree.
30510
30532
  */
30511
- const __iconNode$7 = [
30533
+ const __iconNode$a = [
30512
30534
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
30513
30535
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
30514
30536
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
30515
30537
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
30516
30538
  ];
30517
- const RefreshCw = createLucideIcon("refresh-cw", __iconNode$7);
30539
+ const RefreshCw = createLucideIcon("refresh-cw", __iconNode$a);
30518
30540
  /**
30519
30541
  * @license lucide-react v0.575.0 - ISC
30520
30542
  *
30521
30543
  * This source code is licensed under the ISC license.
30522
30544
  * See the LICENSE file in the root directory of this source tree.
30523
30545
  */
30524
- const __iconNode$6 = [
30546
+ const __iconNode$9 = [
30547
+ ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
30548
+ ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
30549
+ ];
30550
+ const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$9);
30551
+ /**
30552
+ * @license lucide-react v0.575.0 - ISC
30553
+ *
30554
+ * This source code is licensed under the ISC license.
30555
+ * See the LICENSE file in the root directory of this source tree.
30556
+ */
30557
+ const __iconNode$8 = [
30525
30558
  ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
30526
30559
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
30527
30560
  ];
30528
- const RotateCw = createLucideIcon("rotate-cw", __iconNode$6);
30561
+ const RotateCw = createLucideIcon("rotate-cw", __iconNode$8);
30529
30562
  /**
30530
30563
  * @license lucide-react v0.575.0 - ISC
30531
30564
  *
30532
30565
  * This source code is licensed under the ISC license.
30533
30566
  * See the LICENSE file in the root directory of this source tree.
30534
30567
  */
30535
- const __iconNode$5 = [
30568
+ const __iconNode$7 = [
30536
30569
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
30537
30570
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
30538
30571
  ];
30539
- const Search = createLucideIcon("search", __iconNode$5);
30572
+ const Search = createLucideIcon("search", __iconNode$7);
30540
30573
  /**
30541
30574
  * @license lucide-react v0.575.0 - ISC
30542
30575
  *
30543
30576
  * This source code is licensed under the ISC license.
30544
30577
  * See the LICENSE file in the root directory of this source tree.
30545
30578
  */
30546
- const __iconNode$4 = [
30579
+ const __iconNode$6 = [
30547
30580
  [
30548
30581
  "path",
30549
30582
  {
@@ -30553,14 +30586,14 @@ const __iconNode$4 = [
30553
30586
  ],
30554
30587
  ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
30555
30588
  ];
30556
- const Send = createLucideIcon("send", __iconNode$4);
30589
+ const Send = createLucideIcon("send", __iconNode$6);
30557
30590
  /**
30558
30591
  * @license lucide-react v0.575.0 - ISC
30559
30592
  *
30560
30593
  * This source code is licensed under the ISC license.
30561
30594
  * See the LICENSE file in the root directory of this source tree.
30562
30595
  */
30563
- const __iconNode$3 = [
30596
+ const __iconNode$5 = [
30564
30597
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
30565
30598
  ["path", { d: "M12 2v2", key: "tus03m" }],
30566
30599
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -30571,37 +30604,37 @@ const __iconNode$3 = [
30571
30604
  ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
30572
30605
  ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
30573
30606
  ];
30574
- const Sun = createLucideIcon("sun", __iconNode$3);
30607
+ const Sun = createLucideIcon("sun", __iconNode$5);
30575
30608
  /**
30576
30609
  * @license lucide-react v0.575.0 - ISC
30577
30610
  *
30578
30611
  * This source code is licensed under the ISC license.
30579
30612
  * See the LICENSE file in the root directory of this source tree.
30580
30613
  */
30581
- const __iconNode$2 = [
30614
+ const __iconNode$4 = [
30582
30615
  ["rect", { width: "8", height: "8", x: "3", y: "3", rx: "2", key: "by2w9f" }],
30583
30616
  ["path", { d: "M7 11v4a2 2 0 0 0 2 2h4", key: "xkn7yn" }],
30584
30617
  ["rect", { width: "8", height: "8", x: "13", y: "13", rx: "2", key: "1cgmvn" }]
30585
30618
  ];
30586
- const Workflow = createLucideIcon("workflow", __iconNode$2);
30619
+ const Workflow = createLucideIcon("workflow", __iconNode$4);
30587
30620
  /**
30588
30621
  * @license lucide-react v0.575.0 - ISC
30589
30622
  *
30590
30623
  * This source code is licensed under the ISC license.
30591
30624
  * See the LICENSE file in the root directory of this source tree.
30592
30625
  */
30593
- const __iconNode$1 = [
30626
+ const __iconNode$3 = [
30594
30627
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
30595
30628
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
30596
30629
  ];
30597
- const X$3 = createLucideIcon("x", __iconNode$1);
30630
+ const X$3 = createLucideIcon("x", __iconNode$3);
30598
30631
  /**
30599
30632
  * @license lucide-react v0.575.0 - ISC
30600
30633
  *
30601
30634
  * This source code is licensed under the ISC license.
30602
30635
  * See the LICENSE file in the root directory of this source tree.
30603
30636
  */
30604
- const __iconNode = [
30637
+ const __iconNode$2 = [
30605
30638
  [
30606
30639
  "path",
30607
30640
  {
@@ -30610,14 +30643,35 @@ const __iconNode = [
30610
30643
  }
30611
30644
  ]
30612
30645
  ];
30613
- const Zap = createLucideIcon("zap", __iconNode);
30646
+ const Zap = createLucideIcon("zap", __iconNode$2);
30647
+ /**
30648
+ * @license lucide-react v0.575.0 - ISC
30649
+ *
30650
+ * This source code is licensed under the ISC license.
30651
+ * See the LICENSE file in the root directory of this source tree.
30652
+ */
30653
+ const __iconNode$1 = [
30654
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
30655
+ ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
30656
+ ["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
30657
+ ["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
30658
+ ];
30659
+ const ZoomIn = createLucideIcon("zoom-in", __iconNode$1);
30660
+ /**
30661
+ * @license lucide-react v0.575.0 - ISC
30662
+ *
30663
+ * This source code is licensed under the ISC license.
30664
+ * See the LICENSE file in the root directory of this source tree.
30665
+ */
30666
+ const __iconNode = [
30667
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
30668
+ ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
30669
+ ["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
30670
+ ];
30671
+ const ZoomOut = createLucideIcon("zoom-out", __iconNode);
30614
30672
  function cn$4(...inputs) {
30615
30673
  return twMerge(clsx(inputs));
30616
30674
  }
30617
- const secondsFormatter = new Intl.NumberFormat(void 0, {
30618
- minimumFractionDigits: 2,
30619
- maximumFractionDigits: 2
30620
- });
30621
30675
  const MS_IN_SECOND = 1e3;
30622
30676
  const MS_IN_MINUTE = 60 * MS_IN_SECOND;
30623
30677
  const MS_IN_HOUR = 60 * MS_IN_MINUTE;
@@ -30626,23 +30680,28 @@ function formatDuration(ms2, compact = false) {
30626
30680
  if (ms2 === 0) {
30627
30681
  return "0s";
30628
30682
  }
30629
- if (ms2 < MS_IN_MINUTE) {
30630
- return `${secondsFormatter.format(ms2 / MS_IN_SECOND)}s`;
30683
+ if (ms2 < MS_IN_SECOND) {
30684
+ const roundedMs2 = Math.round(ms2);
30685
+ return roundedMs2 < MS_IN_SECOND ? `${roundedMs2}ms` : "1s";
30686
+ }
30687
+ const roundedMs = Math.round(ms2 / MS_IN_SECOND) * MS_IN_SECOND;
30688
+ if (roundedMs < MS_IN_MINUTE) {
30689
+ return `${Math.floor(roundedMs / MS_IN_SECOND)}s`;
30631
30690
  }
30632
30691
  if (compact) {
30633
- if (ms2 < MS_IN_HOUR) {
30634
- const m3 = Math.floor(ms2 / MS_IN_MINUTE);
30635
- const s2 = Math.floor(ms2 % MS_IN_MINUTE / MS_IN_SECOND);
30692
+ if (roundedMs < MS_IN_HOUR) {
30693
+ const m3 = Math.floor(roundedMs / MS_IN_MINUTE);
30694
+ const s2 = Math.floor(roundedMs % MS_IN_MINUTE / MS_IN_SECOND);
30636
30695
  return s2 > 0 ? `${m3}m ${s2}s` : `${m3}m`;
30637
30696
  }
30638
- const h2 = Math.floor(ms2 / MS_IN_HOUR);
30639
- const m2 = Math.floor(ms2 % MS_IN_HOUR / MS_IN_MINUTE);
30697
+ const h2 = Math.floor(roundedMs / MS_IN_HOUR);
30698
+ const m2 = Math.floor(roundedMs % MS_IN_HOUR / MS_IN_MINUTE);
30640
30699
  return m2 > 0 ? `${h2}h ${m2}m` : `${h2}h`;
30641
30700
  }
30642
- const days = Math.floor(ms2 / MS_IN_DAY);
30643
- const hours = Math.floor(ms2 % MS_IN_DAY / MS_IN_HOUR);
30644
- const minutes = Math.floor(ms2 % MS_IN_HOUR / MS_IN_MINUTE);
30645
- const seconds = ms2 % MS_IN_MINUTE / MS_IN_SECOND;
30701
+ const days = Math.floor(roundedMs / MS_IN_DAY);
30702
+ const hours = Math.floor(roundedMs % MS_IN_DAY / MS_IN_HOUR);
30703
+ const minutes = Math.floor(roundedMs % MS_IN_HOUR / MS_IN_MINUTE);
30704
+ const seconds = Math.floor(roundedMs % MS_IN_MINUTE / MS_IN_SECOND);
30646
30705
  const parts = [];
30647
30706
  if (days > 0) {
30648
30707
  parts.push(`${days}d`);
@@ -30653,7 +30712,7 @@ function formatDuration(ms2, compact = false) {
30653
30712
  if (minutes > 0) {
30654
30713
  parts.push(`${minutes}m`);
30655
30714
  }
30656
- parts.push(`${secondsFormatter.format(seconds)}s`);
30715
+ parts.push(`${seconds}s`);
30657
30716
  return parts.join(" ");
30658
30717
  }
30659
30718
  function isDoStreamStep(stepName) {
@@ -52860,17 +52919,22 @@ const waitEventsToWaitEntity = (events2) => {
52860
52919
  waitId: startEvent.correlationId,
52861
52920
  runId: startEvent.runId,
52862
52921
  createdAt: startEvent.createdAt,
52863
- resumeAt: (_a3 = startEvent.eventData) == null ? void 0 : _a3.resumeAt,
52922
+ resumeAt: ((_a3 = startEvent.eventData) == null ? void 0 : _a3.resumeAt) ? new Date(startEvent.eventData.resumeAt) : void 0,
52864
52923
  completedAt: completedEvent == null ? void 0 : completedEvent.createdAt
52865
52924
  };
52866
52925
  };
52867
- function waitToSpan(events2, maxEndTime) {
52926
+ function waitToSpan(events2, maxEndTime, fallbackEndTime = maxEndTime) {
52868
52927
  const wait = waitEventsToWaitEntity(events2);
52869
52928
  if (!wait) {
52870
52929
  return null;
52871
52930
  }
52872
52931
  const startTime = wait.createdAt;
52873
- const endTime = wait.completedAt ?? maxEndTime;
52932
+ const startMs = startTime.getTime();
52933
+ let endTime = wait.completedAt;
52934
+ if (!endTime) {
52935
+ const fallbackCap = wait.resumeAt && wait.resumeAt.getTime() < fallbackEndTime.getTime() ? wait.resumeAt : fallbackEndTime;
52936
+ endTime = maxEndTime.getTime() > startMs && maxEndTime.getTime() < fallbackCap.getTime() ? maxEndTime : fallbackCap;
52937
+ }
52874
52938
  const start2 = dateToOtelTime(startTime);
52875
52939
  const end = dateToOtelTime(endTime);
52876
52940
  const duration2 = calculateDuration(startTime, endTime);
@@ -53110,9 +53174,10 @@ function computeLatestKnownTime(events2, run) {
53110
53174
  }
53111
53175
  function buildSpans(run, groupedEvents, now2, latestKnownTime) {
53112
53176
  const childMaxEnd = latestKnownTime;
53177
+ const runMaxEnd = run.completedAt ?? now2;
53113
53178
  const stepSpans = Array.from(groupedEvents.eventsByStepId.values()).map((events2) => stepToSpan(events2, childMaxEnd)).filter((span) => span !== null);
53114
53179
  const hookSpans = Array.from(groupedEvents.hookEvents.values()).map((events2) => hookToSpan(events2, childMaxEnd)).filter((span) => span !== null);
53115
- const waitSpans = Array.from(groupedEvents.timerEvents.values()).map((events2) => waitToSpan(events2, childMaxEnd)).filter((span) => span !== null);
53180
+ const waitSpans = Array.from(groupedEvents.timerEvents.values()).map((events2) => waitToSpan(events2, childMaxEnd, runMaxEnd)).filter((span) => span !== null);
53116
53181
  return {
53117
53182
  runSpan: runToSpan(run, groupedEvents.runLevelEvents, now2),
53118
53183
  spans: [...stepSpans, ...hookSpans, ...waitSpans]
@@ -79780,7 +79845,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
79780
79845
  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 });
79781
79846
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
79782
79847
  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 }) });
79783
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-Cdb-ypB4.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
79848
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-uaucauLI.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
79784
79849
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
79785
79850
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
79786
79851
  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 }) })] }) });
@@ -80102,7 +80167,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
80102
80167
  }, []), jsxRuntimeExports.jsxs("div", { className: "relative", ref: i, children: [jsxRuntimeExports.jsx("button", { className: f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t), disabled: c, onClick: () => r2(!s2), title: "Download table", type: "button", children: e != null ? e : jsxRuntimeExports.jsx(Z, { size: 14 }) }), s2 ? jsxRuntimeExports.jsxs("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
80103
80168
  };
80104
80169
  var Vt = ({ children: e, className: t, showControls: o, ...n }) => jsxRuntimeExports.jsxs("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [o ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-1", children: [jsxRuntimeExports.jsx(Ht, {}), jsxRuntimeExports.jsx(Dt, {})] }) : null, jsxRuntimeExports.jsx("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: jsxRuntimeExports.jsx("table", { className: f("w-full divide-y divide-border", t), "data-streamdown": "table", ...n, children: e }) })] });
80105
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-CE8Volk5.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
80170
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-DrZ5V6uv.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
80106
80171
  function ke(e, t) {
80107
80172
  if (!(e != null && e.position || t != null && t.position)) return true;
80108
80173
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -81417,7 +81482,7 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, spanDetailData, spa
81417
81482
  }, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [jsxRuntimeExports.jsx("section", { children: jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, expiredAt: run.expiredAt, isLoading: loading, error: error2 ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }) }), resource !== "run" && rawEvents && jsxRuntimeExports.jsx("section", { children: jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, encryptionKey }) })] })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
81418
81483
  }
81419
81484
  const MAP_HEIGHT = 56;
81420
- const TIMELINE_PADDING$1 = 8;
81485
+ const TIMELINE_PADDING = 8;
81421
81486
  const ROW_PADDING = 2;
81422
81487
  const ROW_HEIGHT$1 = 24;
81423
81488
  const MARKER_HEIGHT = 24;
@@ -82511,10 +82576,10 @@ const useDpi = () => {
82511
82576
  }, [dpi]);
82512
82577
  return dpi;
82513
82578
  };
82514
- const padding = TIMELINE_PADDING$1;
82579
+ const padding = TIMELINE_PADDING;
82515
82580
  reactExports.memo(function MiniMap({ timelineRef, rows, scale }) {
82516
82581
  const { state: { root: root2, baseScale, timelineWidth, width: fullWidth, scrollbarWidth } } = useTraceViewer();
82517
- const mapWidth = fullWidth + TIMELINE_PADDING$1 * 2;
82582
+ const mapWidth = fullWidth + TIMELINE_PADDING * 2;
82518
82583
  const dpi = useDpi();
82519
82584
  const containerRef = reactExports.useRef(null);
82520
82585
  const canvasRef = reactExports.useRef(null);
@@ -82640,7 +82705,7 @@ reactExports.memo(function MiniMap({ timelineRef, rows, scale }) {
82640
82705
  height: MAP_HEIGHT
82641
82706
  }, children: [jsxRuntimeExports.jsx("canvas", { className: styles.mapCanvas, height: MAP_HEIGHT * dpi, ref: canvasRef, style: { width: mapWidth, height: MAP_HEIGHT }, width: mapWidth * dpi }), jsxRuntimeExports.jsx("div", { className: styles.mapThumb, ref: thumbRef, style: {
82642
82707
  transform: thumbStyle.transform,
82643
- width: thumbWidth > 0 ? thumbWidth : `calc(100% - ${TIMELINE_PADDING$1 * 2}px)`,
82708
+ width: thumbWidth > 0 ? thumbWidth : `calc(100% - ${TIMELINE_PADDING * 2}px)`,
82644
82709
  top: 2,
82645
82710
  height: MAP_HEIGHT - 4
82646
82711
  } })] });
@@ -82709,97 +82774,6 @@ function CopyButton({ copyText, ariaLabel, className }) {
82709
82774
  });
82710
82775
  }, children: jsxRuntimeExports.jsxs("div", { className: "relative w-3 h-3", children: [jsxRuntimeExports.jsx("div", { className: cn$4("absolute inset-0 flex items-center justify-center transition-all duration-150 ease-out", copied ? "scale-100 opacity-100" : "scale-0 opacity-0"), children: jsxRuntimeExports.jsx(Check, { className: "w-3 h-3" }) }), jsxRuntimeExports.jsx("div", { className: cn$4("absolute inset-0 flex items-center justify-center transition-all duration-150 ease-out", copied ? "scale-0 opacity-0" : "scale-100 opacity-100"), children: jsxRuntimeExports.jsx(Copy, { className: "w-3 h-3" }) })] }) });
82711
82776
  }
82712
- const GUTTER_PX = 9;
82713
- const MIN_PX = 50;
82714
- const DEFAULT_START_PX = 340;
82715
- function SplitPane({ children: children2, className, defaultStartWidth = DEFAULT_START_PX, startHeader, endHeader }) {
82716
- const parts = reactExports.Children.toArray(children2);
82717
- if (parts.length !== 2) {
82718
- throw new Error("SplitPane expects exactly two children");
82719
- }
82720
- const [start2, end] = parts;
82721
- const [startPx, setStartPx] = reactExports.useState(defaultStartWidth);
82722
- const [isDragging, setIsDragging] = reactExports.useState(false);
82723
- const containerRef = reactExports.useRef(null);
82724
- const gutterRef = reactExports.useRef(null);
82725
- const rafRef = reactExports.useRef(null);
82726
- const pendingPx = reactExports.useRef(defaultStartWidth);
82727
- const pointerIdRef = reactExports.useRef(null);
82728
- reactExports.useEffect(() => {
82729
- return () => {
82730
- if (rafRef.current)
82731
- cancelAnimationFrame(rafRef.current);
82732
- };
82733
- }, []);
82734
- const clampPx = reactExports.useCallback((px) => {
82735
- const el = containerRef.current;
82736
- if (!el)
82737
- return px;
82738
- const maxPx = el.getBoundingClientRect().width - MIN_PX - GUTTER_PX;
82739
- return Math.min(maxPx, Math.max(MIN_PX, px));
82740
- }, []);
82741
- reactExports.useEffect(() => {
82742
- if (!isDragging)
82743
- return;
82744
- const onPointerMove = (e) => {
82745
- if (e.pointerId !== pointerIdRef.current)
82746
- return;
82747
- const container = containerRef.current;
82748
- if (!container)
82749
- return;
82750
- const rect = container.getBoundingClientRect();
82751
- pendingPx.current = clampPx(e.clientX - rect.left);
82752
- if (!rafRef.current) {
82753
- rafRef.current = requestAnimationFrame(() => {
82754
- rafRef.current = null;
82755
- setStartPx(pendingPx.current);
82756
- });
82757
- }
82758
- };
82759
- const onPointerUp = (e) => {
82760
- if (e.pointerId !== pointerIdRef.current)
82761
- return;
82762
- const gutter2 = gutterRef.current;
82763
- if (gutter2 == null ? void 0 : gutter2.hasPointerCapture(e.pointerId)) {
82764
- gutter2.releasePointerCapture(e.pointerId);
82765
- }
82766
- if (rafRef.current) {
82767
- cancelAnimationFrame(rafRef.current);
82768
- rafRef.current = null;
82769
- }
82770
- pointerIdRef.current = null;
82771
- setIsDragging(false);
82772
- };
82773
- document.addEventListener("pointermove", onPointerMove);
82774
- document.addEventListener("pointerup", onPointerUp);
82775
- document.addEventListener("pointercancel", onPointerUp);
82776
- return () => {
82777
- document.removeEventListener("pointermove", onPointerMove);
82778
- document.removeEventListener("pointerup", onPointerUp);
82779
- document.removeEventListener("pointercancel", onPointerUp);
82780
- };
82781
- }, [isDragging, clampPx]);
82782
- const handlePointerDown = (e) => {
82783
- e.currentTarget.setPointerCapture(e.pointerId);
82784
- pointerIdRef.current = e.pointerId;
82785
- setIsDragging(true);
82786
- };
82787
- const handleLostPointerCapture = () => {
82788
- pointerIdRef.current = null;
82789
- setIsDragging(false);
82790
- if (rafRef.current) {
82791
- cancelAnimationFrame(rafRef.current);
82792
- rafRef.current = null;
82793
- }
82794
- };
82795
- const colTemplate = `${startPx}px ${GUTTER_PX}px minmax(${MIN_PX}px, 1fr)`;
82796
- const hasHeaders = startHeader != null || endHeader != null;
82797
- const gutter = jsxRuntimeExports.jsx("div", { ref: gutterRef, className: "relative z-20 isolate flex shrink-0 cursor-col-resize justify-center", onPointerDown: handlePointerDown, onLostPointerCapture: handleLostPointerCapture, children: jsxRuntimeExports.jsx("span", { className: "pointer-events-none relative z-10 h-full w-px shrink-0 bg-gray-alpha-400", "aria-hidden": true }) });
82798
- if (hasHeaders) {
82799
- return jsxRuntimeExports.jsxs("div", { className: cn$4("flex flex-col h-full min-h-0", className), children: [jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid", style: { gridTemplateColumns: colTemplate }, children: [jsxRuntimeExports.jsx("div", { children: startHeader }), jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: jsxRuntimeExports.jsx("span", { className: "h-full w-px bg-gray-alpha-400", "aria-hidden": true }) }), jsxRuntimeExports.jsx("div", { children: endHeader })] }), jsxRuntimeExports.jsxs("div", { ref: containerRef, className: cn$4("grid flex-1 min-h-0 content-start overflow-x-hidden overflow-y-auto", isDragging && "select-none"), style: { gridTemplateColumns: colTemplate }, children: [start2, gutter, end] })] });
82800
- }
82801
- return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: cn$4("grid h-full min-h-0 content-start overflow-x-hidden overflow-y-auto", isDragging && "select-none", className), style: { gridTemplateColumns: colTemplate, height: "100%" }, children: [start2, gutter, end] });
82802
- }
82803
82777
  const WorkflowIcon = () => {
82804
82778
  return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", "stroke-linejoin": "round", style: { color: "currentColor" }, viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { d: "M5.75 7L6.4209 7.33594L4.85254 10.4717C5.38789 10.771 5.75 11.3431 5.75 12V14C5.75 14.9665 4.96648 15.75 4 15.75H2C1.03352 15.75 0.25 14.9665 0.25 14V12C0.25 11.0335 1.03352 10.25 2 10.25H3.28711L5.0791 6.66504L5.75 7ZM14 10.25C14.9665 10.25 15.75 11.0335 15.75 12V14C15.75 14.9665 14.9665 15.75 14 15.75H12C11.1185 15.75 10.3909 15.098 10.2695 14.25H7V12.75H10.25V12C10.25 11.0335 11.0335 10.25 12 10.25H14ZM2 11.75C1.86192 11.75 1.75 11.8619 1.75 12V14C1.75 14.1381 1.86192 14.25 2 14.25H4C4.13808 14.25 4.25 14.1381 4.25 14V12C4.25 11.8619 4.13808 11.75 4 11.75H2ZM12 11.75C11.8619 11.75 11.75 11.8619 11.75 12V14C11.75 14.1381 11.8619 14.25 12 14.25H14C14.1381 14.25 14.25 14.1381 14.25 14V12C14.25 11.8619 14.1381 11.75 14 11.75H12ZM9 0.25C9.96649 0.25 10.75 1.03351 10.75 2V4C10.75 4.44642 10.5808 4.85197 10.3057 5.16113L12.2041 8.6416L10.8877 9.36035L8.91895 5.75H7C6.03351 5.75 5.25 4.96649 5.25 4V2C5.25 1.03351 6.03351 0.25 7 0.25H9ZM7 1.75C6.86193 1.75 6.75 1.86193 6.75 2V4C6.75 4.13807 6.86193 4.25 7 4.25H9C9.13807 4.25 9.25 4.13807 9.25 4V2C9.25 1.86193 9.13807 1.75 9 1.75H7Z", fill: "currentColor" }) });
82805
82779
  };
@@ -82812,34 +82786,6 @@ const SleepIcon = () => {
82812
82786
  const StepForwardIcon = () => {
82813
82787
  return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", style: { color: "currentColor" }, children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.21969 12.5303L4.75002 13.0607L5.81068 12L5.28035 11.4697L1.81068 7.99999L5.28035 4.53032L5.81068 3.99999L4.75002 2.93933L4.21969 3.46966L0.39647 7.29289C0.00594562 7.68341 0.00594562 8.31658 0.39647 8.7071L4.21969 12.5303ZM11.7804 12.5303L11.25 13.0607L10.1894 12L10.7197 11.4697L14.1894 7.99999L10.7197 4.53032L10.1894 3.99999L11.25 2.93933L11.7804 3.46966L15.6036 7.29289C15.9941 7.68341 15.9941 8.31658 15.6036 8.7071L11.7804 12.5303Z", fill: "currentColor" }) });
82814
82788
  };
82815
- const eventStyles = {
82816
- run: { icon: WorkflowIcon, className: "text-blue-900" },
82817
- step: { icon: StepForwardIcon, className: "text-green-900" },
82818
- hook: { icon: WebhookIcon, className: "text-yellow-900" },
82819
- sleep: { icon: SleepIcon, className: "text-gray-900" }
82820
- };
82821
- const defaultStyle = {
82822
- icon: Circle,
82823
- className: "text-gray-900"
82824
- };
82825
- function getEventStyle(resource, isErrored) {
82826
- const style2 = eventStyles[resource] ?? defaultStyle;
82827
- return {
82828
- icon: style2.icon,
82829
- className: cn$4(isErrored ? "text-red-900" : style2.className)
82830
- };
82831
- }
82832
- const EventRow = ({ span, isSelected, onSelectSpan }) => {
82833
- const durationMs = getHighResInMs(span.duration);
82834
- const isErrored = span.attributes.data.status === "failed";
82835
- const { icon: Icon2, className: tagClassName } = getEventStyle(span.resource, isErrored);
82836
- return jsxRuntimeExports.jsx("li", { className: "overflow-clip group", role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, onClick: () => onSelectSpan(span.spanId), children: jsxRuntimeExports.jsxs("div", { className: "hover:bg-gray-100 group-aria-selected:bg-gray-100 group-aria-selected:hover:bg-gray-200 hover:aria-selected:bg-gray-100 rounded-sm px-2 h-[34px] py-1.5 flex", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx("span", { className: tagClassName, children: jsxRuntimeExports.jsx(Icon2, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx("span", { className: "text-label-14", children: span.name })] }), jsxRuntimeExports.jsx("div", { className: "ml-auto", children: jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-900 tabular-nums", children: formatDuration(durationMs) }) })] }) });
82837
- };
82838
- const EventList = ({ spans, activeSpanId, onSelectSpan }) => {
82839
- return jsxRuntimeExports.jsx("ul", { id: "event-list", role: "tree", className: "block min-h-0 overflow-visible px-2 py-2", children: spans.map((span) => {
82840
- return jsxRuntimeExports.jsx(EventRow, { span, isSelected: span.spanId === activeSpanId, onSelectSpan }, span.spanId);
82841
- }) });
82842
- };
82843
82789
  function computeRootBounds(spans) {
82844
82790
  let minStart = Number.POSITIVE_INFINITY;
82845
82791
  let maxEnd = Number.NEGATIVE_INFINITY;
@@ -82857,19 +82803,8 @@ function computeRootBounds(spans) {
82857
82803
  const duration2 = Math.max(maxEnd - minStart, 1);
82858
82804
  return { startTime: minStart, endTime: maxEnd, duration: duration2 };
82859
82805
  }
82860
- function buildTimeCompression(_spans, viewStart, viewEnd) {
82861
- const range2 = viewEnd - viewStart;
82862
- return {
82863
- isCompressed: false,
82864
- toVisual(time2) {
82865
- if (range2 <= 0)
82866
- return 0;
82867
- return Math.min(Math.max((time2 - viewStart) / range2, 0), 1);
82868
- },
82869
- fromVisual(fraction) {
82870
- return viewStart + fraction * range2;
82871
- }
82872
- };
82806
+ function getSpanDurationMs(span) {
82807
+ return Math.max(0, getHighResInMs(span.endTime) - getHighResInMs(span.startTime));
82873
82808
  }
82874
82809
  const NICE_INTERVALS = [
82875
82810
  1,
@@ -82924,37 +82859,18 @@ function computeTimeMarkers(viewDuration, offset2) {
82924
82859
  continue;
82925
82860
  markers2.push({
82926
82861
  position: Math.min(Math.max(position2, 0), 1),
82927
- label: formatDuration(Math.abs(t), true)
82862
+ label: formatDuration(Math.abs(t), true),
82863
+ value: t
82928
82864
  });
82929
82865
  if (markers2.length >= MAX_MARKERS)
82930
82866
  break;
82931
82867
  }
82932
82868
  return markers2;
82933
82869
  }
82934
- function computeCompressedTimeMarkers(compression, viewStart, viewEnd, rootStart) {
82935
- const viewDuration = viewEnd - viewStart;
82936
- if (viewDuration <= 0)
82870
+ function computeSpanGaps(spans, viewStart, viewEnd) {
82871
+ const range2 = viewEnd - viewStart;
82872
+ if (range2 <= 0)
82937
82873
  return [];
82938
- const maxTicks = 6;
82939
- const interval2 = pickInterval(viewDuration, maxTicks);
82940
- const offset2 = viewStart - rootStart;
82941
- const firstTick = Math.ceil(offset2 / interval2) * interval2;
82942
- const markers2 = [];
82943
- for (let t = firstTick; t <= offset2 + viewDuration; t += interval2) {
82944
- const absTime = rootStart + t;
82945
- const position2 = compression.toVisual(absTime);
82946
- if (position2 < -0.01 || position2 > 1.01)
82947
- continue;
82948
- markers2.push({
82949
- position: Math.min(Math.max(position2, 0), 1),
82950
- label: formatDuration(Math.abs(t), true)
82951
- });
82952
- if (markers2.length >= MAX_MARKERS)
82953
- break;
82954
- }
82955
- return markers2;
82956
- }
82957
- function computeSpanGaps(spans, compression) {
82958
82874
  const gaps = [];
82959
82875
  for (let i = 0; i < spans.length - 1; i++) {
82960
82876
  const endTime = getHighResInMs(spans[i].endTime);
@@ -82962,8 +82878,8 @@ function computeSpanGaps(spans, compression) {
82962
82878
  const gapMs = startTime - endTime;
82963
82879
  if (gapMs <= 0)
82964
82880
  continue;
82965
- const leftFrac = compression.toVisual(endTime);
82966
- const rightFrac = compression.toVisual(startTime);
82881
+ const leftFrac = Math.min(Math.max((endTime - viewStart) / range2, 0), 1);
82882
+ const rightFrac = Math.min(Math.max((startTime - viewStart) / range2, 0), 1);
82967
82883
  if (rightFrac - leftFrac < 1e-3)
82968
82884
  continue;
82969
82885
  gaps.push({ gapMs, leftFrac, rightFrac, rowIndex: i });
@@ -83094,29 +83010,10 @@ function computeHookSegmentsFromSpan(startMs, duration2, events2) {
83094
83010
  }
83095
83011
  return segments;
83096
83012
  }
83097
- function computeSleepSegmentsFromSpan(startMs, duration2, events2) {
83098
- const segments = [];
83013
+ function computeSleepSegmentsFromSpan(_startMs, duration2, _events) {
83099
83014
  if (duration2 <= 0)
83100
- return segments;
83101
- const completedTime = events2.filter((e) => e.name === "wait_completed").map((e) => getHighResInMs(e.timestamp)).sort((a2, b2) => a2 - b2)[0];
83102
- if (completedTime === void 0) {
83103
- segments.push({ startFraction: 0, endFraction: 1, status: "sleeping" });
83104
- return segments;
83105
- }
83106
- const completedFrac = timeToFraction(completedTime, startMs, duration2);
83107
- if (completedFrac > 1e-3) {
83108
- segments.push({
83109
- startFraction: 0,
83110
- endFraction: completedFrac,
83111
- status: "sleeping"
83112
- });
83113
- }
83114
- segments.push({
83115
- startFraction: completedFrac,
83116
- endFraction: 1,
83117
- status: "succeeded"
83118
- });
83119
- return segments;
83015
+ return [];
83016
+ return [{ startFraction: 0, endFraction: 1, status: "sleeping" }];
83120
83017
  }
83121
83018
  function computeRunSegmentsFromSpan(startMs, duration2, activeStartMs, events2, attributes) {
83122
83019
  const segments = [];
@@ -83172,8 +83069,7 @@ function computeV1RunSegments(startMs, duration2, activeStartMs, runStatus) {
83172
83069
  }
83173
83070
  function computeSpanSegments(span) {
83174
83071
  const startMs = getHighResInMs(span.startTime);
83175
- const endMs = getHighResInMs(span.endTime);
83176
- const duration2 = endMs - startMs;
83072
+ const duration2 = getSpanDurationMs(span);
83177
83073
  const activeStartMs = span.activeStartTime ? getHighResInMs(span.activeStartTime) : void 0;
83178
83074
  switch (span.resource) {
83179
83075
  case "step":
@@ -83188,25 +83084,427 @@ function computeSpanSegments(span) {
83188
83084
  return [];
83189
83085
  }
83190
83086
  }
83191
- const QUEUED_BACKGROUND = "radial-gradient(circle, var(--ds-gray-400) 2px, transparent 2px) center / 20px 20px space no-repeat, var(--ds-gray-500)";
83192
- const HATCHED_BACKGROUND = "repeating-linear-gradient(-45deg, var(--ds-gray-400) 0px, var(--ds-gray-400) 3px, var(--ds-gray-500) 3px, var(--ds-gray-500) 6px)";
83087
+ const ELLIPSIS = "...";
83088
+ const MIN_START = 3;
83089
+ const MIN_END = 3;
83090
+ const MIN_KEPT = MIN_START + MIN_END;
83091
+ const graphemeSegmenter = typeof Intl !== "undefined" && "Segmenter" in Intl ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null;
83092
+ function toGraphemes(text2) {
83093
+ if (graphemeSegmenter) {
83094
+ return [...graphemeSegmenter.segment(text2)].map((s2) => s2.segment);
83095
+ }
83096
+ return Array.from(text2);
83097
+ }
83098
+ function buildCandidate(graphemes, kept) {
83099
+ if (kept <= 0) {
83100
+ return {
83101
+ prefixText: "",
83102
+ prefixGraphemeCount: 0,
83103
+ suffixText: "",
83104
+ suffixGraphemeCount: 0,
83105
+ text: ELLIPSIS,
83106
+ truncated: true
83107
+ };
83108
+ }
83109
+ const suffixGraphemeCount = kept >= MIN_KEPT ? Math.max(MIN_END, Math.floor(kept / 2)) : Math.floor(kept / 2);
83110
+ const prefixGraphemeCount = kept - suffixGraphemeCount;
83111
+ const prefixText = graphemes.slice(0, prefixGraphemeCount).join("");
83112
+ const suffixText = suffixGraphemeCount > 0 ? graphemes.slice(-suffixGraphemeCount).join("") : "";
83113
+ return {
83114
+ prefixText,
83115
+ prefixGraphemeCount,
83116
+ suffixText,
83117
+ suffixGraphemeCount,
83118
+ text: prefixText + ELLIPSIS + suffixText,
83119
+ truncated: true
83120
+ };
83121
+ }
83122
+ function middleTruncate(graphemes, availableWidth, measure, fullWidth) {
83123
+ const fullText = graphemes.join("");
83124
+ const resolvedFullWidth = fullWidth ?? measure(fullText);
83125
+ if (availableWidth <= 0 || graphemes.length === 0) {
83126
+ return {
83127
+ prefixText: fullText,
83128
+ prefixGraphemeCount: graphemes.length,
83129
+ suffixText: "",
83130
+ suffixGraphemeCount: 0,
83131
+ text: fullText,
83132
+ truncated: false
83133
+ };
83134
+ }
83135
+ if (resolvedFullWidth <= availableWidth) {
83136
+ return {
83137
+ prefixText: fullText,
83138
+ prefixGraphemeCount: graphemes.length,
83139
+ suffixText: "",
83140
+ suffixGraphemeCount: 0,
83141
+ text: fullText,
83142
+ truncated: false
83143
+ };
83144
+ }
83145
+ let lo2 = 0;
83146
+ let hi = graphemes.length - 1;
83147
+ let best = -1;
83148
+ while (lo2 <= hi) {
83149
+ const mid = lo2 + hi >>> 1;
83150
+ const candidate = buildCandidate(graphemes, mid);
83151
+ if (measure(candidate.text) <= availableWidth) {
83152
+ best = mid;
83153
+ lo2 = mid + 1;
83154
+ } else {
83155
+ hi = mid - 1;
83156
+ }
83157
+ }
83158
+ if (best === -1) {
83159
+ return {
83160
+ prefixText: "",
83161
+ prefixGraphemeCount: 0,
83162
+ suffixText: "",
83163
+ suffixGraphemeCount: 0,
83164
+ text: "",
83165
+ truncated: true
83166
+ };
83167
+ }
83168
+ return buildCandidate(graphemes, best);
83169
+ }
83170
+ function getMiddleTruncateCopyText({ prefixText, selectionEnd, selectionStart, suffixText, value }) {
83171
+ const visibleText = prefixText + ELLIPSIS + suffixText;
83172
+ if (selectionStart < 0 || selectionEnd > visibleText.length || selectionStart >= selectionEnd) {
83173
+ return null;
83174
+ }
83175
+ if (selectionStart === 0 && selectionEnd === visibleText.length) {
83176
+ return value;
83177
+ }
83178
+ const ellipsisStart = prefixText.length;
83179
+ const ellipsisEnd = ellipsisStart + ELLIPSIS.length;
83180
+ if (selectionStart > ellipsisStart || selectionEnd < ellipsisEnd) {
83181
+ return null;
83182
+ }
83183
+ const originalGraphemes = toGraphemes(value);
83184
+ const selectedPrefixGraphemeCount = toGraphemes(visibleText.slice(0, selectionStart)).length;
83185
+ const selectedSuffixGraphemeCount = toGraphemes(visibleText.slice(ellipsisEnd, selectionEnd)).length;
83186
+ const suffixStart = originalGraphemes.length - toGraphemes(suffixText).length;
83187
+ return originalGraphemes.slice(selectedPrefixGraphemeCount, suffixStart + selectedSuffixGraphemeCount).join("");
83188
+ }
83189
+ function getMiddleTruncateCopyTextFromSelectionText({ prefixText, selectionText, suffixText, value }) {
83190
+ const visibleText = prefixText + ELLIPSIS + suffixText;
83191
+ const trimmedSelectionText = selectionText.trim();
83192
+ if (!trimmedSelectionText) {
83193
+ return null;
83194
+ }
83195
+ const leading = selectionText.slice(0, selectionText.length - selectionText.trimStart().length);
83196
+ const trailing = selectionText.slice(selectionText.trimEnd().length);
83197
+ if (trimmedSelectionText === visibleText) {
83198
+ return leading + value + trailing;
83199
+ }
83200
+ if (!trimmedSelectionText.includes(ELLIPSIS)) {
83201
+ return null;
83202
+ }
83203
+ const selectionStart = visibleText.indexOf(trimmedSelectionText);
83204
+ if (selectionStart === -1) {
83205
+ return null;
83206
+ }
83207
+ const selectionEnd = selectionStart + trimmedSelectionText.length;
83208
+ const mappedText = getMiddleTruncateCopyText({
83209
+ prefixText,
83210
+ selectionEnd,
83211
+ selectionStart,
83212
+ suffixText,
83213
+ value
83214
+ });
83215
+ return mappedText === null ? null : leading + mappedText + trailing;
83216
+ }
83217
+ const useIsomorphicLayoutEffect$2 = typeof window === "undefined" ? reactExports.useEffect : reactExports.useLayoutEffect;
83218
+ function createFullState(value, graphemes) {
83219
+ return {
83220
+ displayText: value,
83221
+ isTruncated: false,
83222
+ prefixGraphemeCount: graphemes.length,
83223
+ prefixText: value,
83224
+ suffixGraphemeCount: 0,
83225
+ suffixText: ""
83226
+ };
83227
+ }
83228
+ function useMiddleTruncate(value) {
83229
+ const graphemes = reactExports.useMemo(() => toGraphemes(value), [value]);
83230
+ const fullState = reactExports.useMemo(() => createFullState(value, graphemes), [graphemes, value]);
83231
+ const ref = reactExports.useRef(null);
83232
+ const measureRef = reactExports.useRef(null);
83233
+ const [state, setState] = reactExports.useState(() => fullState);
83234
+ const rafRef = reactExports.useRef(0);
83235
+ const updateState = reactExports.useCallback((nextState) => {
83236
+ setState((currentState) => {
83237
+ if (currentState.displayText === nextState.displayText && currentState.isTruncated === nextState.isTruncated && currentState.prefixText === nextState.prefixText && currentState.prefixGraphemeCount === nextState.prefixGraphemeCount && currentState.suffixText === nextState.suffixText && currentState.suffixGraphemeCount === nextState.suffixGraphemeCount) {
83238
+ return currentState;
83239
+ }
83240
+ return nextState;
83241
+ });
83242
+ }, []);
83243
+ const recalculate = reactExports.useCallback(() => {
83244
+ const el = ref.current;
83245
+ const measureEl = measureRef.current;
83246
+ if (!el || !measureEl)
83247
+ return;
83248
+ const available = el.clientWidth;
83249
+ if (available <= 0) {
83250
+ updateState(fullState);
83251
+ return;
83252
+ }
83253
+ const measure = (text2) => {
83254
+ measureEl.textContent = text2;
83255
+ return measureEl.scrollWidth;
83256
+ };
83257
+ const fullWidth = measure(value);
83258
+ if (fullWidth <= available) {
83259
+ updateState(fullState);
83260
+ return;
83261
+ }
83262
+ const result = middleTruncate(graphemes, available, measure, fullWidth);
83263
+ updateState({
83264
+ displayText: result.text,
83265
+ isTruncated: result.truncated,
83266
+ prefixGraphemeCount: result.prefixGraphemeCount,
83267
+ prefixText: result.prefixText,
83268
+ suffixGraphemeCount: result.suffixGraphemeCount,
83269
+ suffixText: result.suffixText
83270
+ });
83271
+ }, [fullState, graphemes, updateState, value]);
83272
+ useIsomorphicLayoutEffect$2(() => {
83273
+ recalculate();
83274
+ }, [recalculate]);
83275
+ reactExports.useEffect(() => {
83276
+ var _a3;
83277
+ const el = ref.current;
83278
+ if (!el)
83279
+ return;
83280
+ const debouncedRecalc = () => {
83281
+ cancelAnimationFrame(rafRef.current);
83282
+ rafRef.current = requestAnimationFrame(recalculate);
83283
+ };
83284
+ const ro2 = typeof ResizeObserver !== "undefined" ? new ResizeObserver(debouncedRecalc) : null;
83285
+ ro2 == null ? void 0 : ro2.observe(el);
83286
+ window.addEventListener("resize", debouncedRecalc);
83287
+ const onFontsLoaded = () => {
83288
+ debouncedRecalc();
83289
+ };
83290
+ const fontSet = "fonts" in document ? document.fonts : null;
83291
+ (_a3 = fontSet == null ? void 0 : fontSet.addEventListener) == null ? void 0 : _a3.call(fontSet, "loadingdone", onFontsLoaded);
83292
+ return () => {
83293
+ var _a4;
83294
+ ro2 == null ? void 0 : ro2.disconnect();
83295
+ window.removeEventListener("resize", debouncedRecalc);
83296
+ cancelAnimationFrame(rafRef.current);
83297
+ (_a4 = fontSet == null ? void 0 : fontSet.removeEventListener) == null ? void 0 : _a4.call(fontSet, "loadingdone", onFontsLoaded);
83298
+ };
83299
+ }, [recalculate]);
83300
+ return {
83301
+ ref,
83302
+ measureRef,
83303
+ displayText: state.displayText,
83304
+ isTruncated: state.isTruncated,
83305
+ prefixGraphemeCount: state.prefixGraphemeCount,
83306
+ prefixText: state.prefixText,
83307
+ suffixGraphemeCount: state.suffixGraphemeCount,
83308
+ suffixText: state.suffixText
83309
+ };
83310
+ }
83311
+ function getRangeOffsets(container, range2) {
83312
+ if (!container.contains(range2.startContainer) || !container.contains(range2.endContainer)) {
83313
+ return null;
83314
+ }
83315
+ const startRange = document.createRange();
83316
+ startRange.selectNodeContents(container);
83317
+ startRange.setEnd(range2.startContainer, range2.startOffset);
83318
+ const endRange = document.createRange();
83319
+ endRange.selectNodeContents(container);
83320
+ endRange.setEnd(range2.endContainer, range2.endOffset);
83321
+ return {
83322
+ end: endRange.toString().length,
83323
+ start: startRange.toString().length
83324
+ };
83325
+ }
83326
+ function MiddleTruncate({ value, className, onCopy: onCopyProp, ...props }) {
83327
+ const { ref, measureRef, displayText, isTruncated, prefixText, suffixText } = useMiddleTruncate(value);
83328
+ const visibleRef = reactExports.useRef(null);
83329
+ const handleCopy = reactExports.useCallback((e) => {
83330
+ onCopyProp == null ? void 0 : onCopyProp(e);
83331
+ if (e.defaultPrevented || !isTruncated)
83332
+ return;
83333
+ const selection2 = window.getSelection();
83334
+ if (!selection2 || selection2.rangeCount === 0)
83335
+ return;
83336
+ const selectionText = selection2.toString();
83337
+ if (!selectionText)
83338
+ return;
83339
+ const range2 = selection2.getRangeAt(0);
83340
+ const visibleEl = visibleRef.current;
83341
+ let copyText = null;
83342
+ if (e.currentTarget.contains(range2.startContainer) && e.currentTarget.contains(range2.endContainer) && visibleEl) {
83343
+ const offsets = getRangeOffsets(visibleEl, range2);
83344
+ if (offsets) {
83345
+ copyText = getMiddleTruncateCopyText({
83346
+ prefixText,
83347
+ selectionEnd: offsets.end,
83348
+ selectionStart: offsets.start,
83349
+ suffixText,
83350
+ value
83351
+ });
83352
+ }
83353
+ }
83354
+ copyText ?? (copyText = getMiddleTruncateCopyTextFromSelectionText({
83355
+ prefixText,
83356
+ selectionText,
83357
+ suffixText,
83358
+ value
83359
+ }));
83360
+ if (copyText === null)
83361
+ return;
83362
+ e.preventDefault();
83363
+ e.clipboardData.setData("text/plain", copyText);
83364
+ }, [onCopyProp, isTruncated, prefixText, suffixText, value]);
83365
+ return jsxRuntimeExports.jsxs("span", { title: isTruncated ? value : void 0, ...props, ref, className: cn$4("relative inline-grid min-w-0 max-w-full overflow-hidden whitespace-nowrap", className), onCopy: handleCopy, children: [isTruncated && jsxRuntimeExports.jsx("span", { className: "sr-only select-none", children: value }), jsxRuntimeExports.jsx("span", { "aria-hidden": "true", className: "pointer-events-none col-start-1 row-start-1 invisible select-none whitespace-nowrap", children: value }), jsxRuntimeExports.jsx("span", { "aria-hidden": isTruncated || void 0, className: "col-start-1 row-start-1 min-w-0 overflow-hidden", ref: visibleRef, children: isTruncated ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { children: prefixText }), jsxRuntimeExports.jsx("span", { children: ELLIPSIS }), jsxRuntimeExports.jsx("span", { children: suffixText })] }) : displayText }), jsxRuntimeExports.jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute left-0 top-0 inline-block invisible select-none whitespace-nowrap", ref: measureRef })] });
83366
+ }
83367
+ const eventStyles = {
83368
+ run: { icon: WorkflowIcon, className: "text-blue-900" },
83369
+ step: { icon: StepForwardIcon, className: "text-green-900" },
83370
+ hook: { icon: WebhookIcon, className: "text-yellow-900" },
83371
+ sleep: { icon: SleepIcon, className: "text-gray-900" }
83372
+ };
83373
+ const defaultStyle = {
83374
+ icon: Circle,
83375
+ className: "text-gray-900"
83376
+ };
83377
+ const ROW_HEIGHT_CLASS = "h-10";
83378
+ function getEventStyle(resource, isErrored) {
83379
+ const style2 = eventStyles[resource] ?? defaultStyle;
83380
+ return {
83381
+ icon: style2.icon,
83382
+ className: cn$4(isErrored ? "text-red-900" : style2.className)
83383
+ };
83384
+ }
83385
+ const EventRow = ({ span, isSelected, onSelectSpan }) => {
83386
+ const durationMs = getSpanDurationMs(span);
83387
+ const isErrored = span.attributes.data.status === "failed";
83388
+ const { icon: Icon2, className: tagClassName } = getEventStyle(span.resource, isErrored);
83389
+ return jsxRuntimeExports.jsx("li", { className: cn$4("relative overflow-clip group after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-gray-alpha-400", ROW_HEIGHT_CLASS), role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, onClick: () => onSelectSpan(span.spanId), children: jsxRuntimeExports.jsx("div", { className: "h-full hover:bg-gray-100 group-aria-selected:bg-gray-100 group-aria-selected:hover:bg-gray-200", children: jsxRuntimeExports.jsxs("div", { className: "flex h-full min-w-0 items-center px-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [jsxRuntimeExports.jsx("span", { className: cn$4("shrink-0", tagClassName), children: jsxRuntimeExports.jsx(Icon2, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx("span", { className: "min-w-0 text-label-14", children: jsxRuntimeExports.jsx(MiddleTruncate, { value: span.name }) })] }), jsxRuntimeExports.jsx("div", { className: "ml-2 shrink-0", children: jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-900 tabular-nums", children: formatDuration(durationMs) }) })] }) }) });
83390
+ };
83391
+ const EventList = ({ spans, activeSpanId, onSelectSpan }) => {
83392
+ return jsxRuntimeExports.jsx("ul", { id: "event-list", role: "tree", className: "block min-h-0 overflow-visible", children: spans.map((span) => {
83393
+ return jsxRuntimeExports.jsx(EventRow, { span, isSelected: span.spanId === activeSpanId, onSelectSpan }, span.spanId);
83394
+ }) });
83395
+ };
83396
+ const GUTTER_PX = 1;
83397
+ const MIN_PX = 50;
83398
+ const DEFAULT_START_PX = 340;
83399
+ function SplitPane({ children: children2, className, defaultStartWidth = DEFAULT_START_PX, startHeader, endHeader }) {
83400
+ const parts = reactExports.Children.toArray(children2);
83401
+ if (parts.length !== 2) {
83402
+ throw new Error("SplitPane expects exactly two children");
83403
+ }
83404
+ const [start2, end] = parts;
83405
+ const [startPx, setStartPx] = reactExports.useState(defaultStartWidth);
83406
+ const [isDragging, setIsDragging] = reactExports.useState(false);
83407
+ const containerRef = reactExports.useRef(null);
83408
+ const gutterRef = reactExports.useRef(null);
83409
+ const rafRef = reactExports.useRef(null);
83410
+ const pendingPx = reactExports.useRef(defaultStartWidth);
83411
+ const pointerIdRef = reactExports.useRef(null);
83412
+ reactExports.useEffect(() => {
83413
+ return () => {
83414
+ if (rafRef.current)
83415
+ cancelAnimationFrame(rafRef.current);
83416
+ };
83417
+ }, []);
83418
+ const clampPx = reactExports.useCallback((px) => {
83419
+ const el = containerRef.current;
83420
+ if (!el)
83421
+ return px;
83422
+ const maxPx = el.getBoundingClientRect().width - MIN_PX - GUTTER_PX;
83423
+ return Math.min(maxPx, Math.max(MIN_PX, px));
83424
+ }, []);
83425
+ reactExports.useEffect(() => {
83426
+ if (!isDragging)
83427
+ return;
83428
+ const onPointerMove = (e) => {
83429
+ if (e.pointerId !== pointerIdRef.current)
83430
+ return;
83431
+ const container = containerRef.current;
83432
+ if (!container)
83433
+ return;
83434
+ const rect = container.getBoundingClientRect();
83435
+ pendingPx.current = clampPx(e.clientX - rect.left);
83436
+ if (!rafRef.current) {
83437
+ rafRef.current = requestAnimationFrame(() => {
83438
+ rafRef.current = null;
83439
+ setStartPx(pendingPx.current);
83440
+ });
83441
+ }
83442
+ };
83443
+ const onPointerUp = (e) => {
83444
+ if (e.pointerId !== pointerIdRef.current)
83445
+ return;
83446
+ const gutter2 = gutterRef.current;
83447
+ if (gutter2 == null ? void 0 : gutter2.hasPointerCapture(e.pointerId)) {
83448
+ gutter2.releasePointerCapture(e.pointerId);
83449
+ }
83450
+ if (rafRef.current) {
83451
+ cancelAnimationFrame(rafRef.current);
83452
+ rafRef.current = null;
83453
+ }
83454
+ pointerIdRef.current = null;
83455
+ setIsDragging(false);
83456
+ };
83457
+ document.addEventListener("pointermove", onPointerMove);
83458
+ document.addEventListener("pointerup", onPointerUp);
83459
+ document.addEventListener("pointercancel", onPointerUp);
83460
+ return () => {
83461
+ document.removeEventListener("pointermove", onPointerMove);
83462
+ document.removeEventListener("pointerup", onPointerUp);
83463
+ document.removeEventListener("pointercancel", onPointerUp);
83464
+ };
83465
+ }, [isDragging, clampPx]);
83466
+ const handlePointerDown = (e) => {
83467
+ e.currentTarget.setPointerCapture(e.pointerId);
83468
+ pointerIdRef.current = e.pointerId;
83469
+ setIsDragging(true);
83470
+ };
83471
+ const handleLostPointerCapture = () => {
83472
+ pointerIdRef.current = null;
83473
+ setIsDragging(false);
83474
+ if (rafRef.current) {
83475
+ cancelAnimationFrame(rafRef.current);
83476
+ rafRef.current = null;
83477
+ }
83478
+ };
83479
+ const colTemplate = `${startPx}px ${GUTTER_PX}px minmax(${MIN_PX}px, 1fr)`;
83480
+ const hasHeaders = startHeader != null || endHeader != null;
83481
+ const gutter = jsxRuntimeExports.jsx("div", { ref: gutterRef, className: "relative z-20 isolate flex shrink-0 cursor-col-resize justify-center", onPointerDown: handlePointerDown, onLostPointerCapture: handleLostPointerCapture, children: jsxRuntimeExports.jsx("span", { className: "pointer-events-none relative z-10 h-full w-px shrink-0 bg-gray-alpha-400", "aria-hidden": true }) });
83482
+ if (hasHeaders) {
83483
+ return jsxRuntimeExports.jsxs("div", { className: cn$4("flex flex-col h-full min-h-0", className), children: [jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid", style: { gridTemplateColumns: colTemplate }, children: [jsxRuntimeExports.jsx("div", { children: startHeader }), jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: jsxRuntimeExports.jsx("span", { className: "h-full w-px bg-gray-alpha-400", "aria-hidden": true }) }), jsxRuntimeExports.jsx("div", { children: endHeader })] }), jsxRuntimeExports.jsxs("div", { ref: containerRef, className: cn$4("grid flex-1 min-h-0 overflow-x-hidden overflow-y-auto", isDragging && "select-none"), style: { gridTemplateColumns: colTemplate }, children: [start2, gutter, end] })] });
83484
+ }
83485
+ return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: cn$4("grid h-full min-h-0 content-start overflow-x-hidden overflow-y-auto", isDragging && "select-none", className), style: { gridTemplateColumns: colTemplate, height: "100%" }, children: [start2, gutter, end] });
83486
+ }
83193
83487
  const SEGMENT_CONFIG = {
83194
- queued: { style: { background: QUEUED_BACKGROUND } },
83488
+ queued: { className: "bg-gray-500" },
83195
83489
  retrying: {
83196
83490
  className: "box-border bg-gray-500"
83197
83491
  },
83198
- waiting: { style: { background: HATCHED_BACKGROUND } },
83492
+ waiting: { className: "bg-gray-500" },
83199
83493
  running: { className: "bg-blue-700" },
83200
83494
  failed: { className: "bg-red-700" },
83201
83495
  succeeded: { className: "bg-green-700" },
83202
- sleeping: { className: "bg-amber-700" },
83496
+ sleeping: { className: "bg-gray-500" },
83203
83497
  received: { className: "bg-blue-700" }
83204
83498
  };
83205
- const FIXED_BAR_WIDTH_PX = 4;
83499
+ const BAR_HEIGHT_PX = 24;
83500
+ const TINY_BAR_BOX_SIZE_PX = 24;
83501
+ const TINY_BAR_WIDTH_PX = 4;
83206
83502
  const SEGMENT_GAP_PX = 1;
83207
- const ROW_HEIGHT = 34;
83503
+ const ROW_HEIGHT = 40;
83208
83504
  const CONTAINER_PAD_Y = 8;
83209
83505
  const END_CAP_HEIGHT = 8;
83506
+ const TIMELINE_PADDING_PX = 16;
83507
+ const ORIGIN_MARKER_EPSILON = 1e-6;
83210
83508
  const DeltaIndicator = reactExports.memo(function DeltaIndicator2({ leftFrac, rightFrac, label, rowIndex }) {
83211
83509
  const centerY = CONTAINER_PAD_Y + (rowIndex + 1) * ROW_HEIGHT;
83212
83510
  return jsxRuntimeExports.jsxs("div", { className: "absolute pointer-events-none", style: {
@@ -83216,38 +83514,34 @@ const DeltaIndicator = reactExports.memo(function DeltaIndicator2({ leftFrac, ri
83216
83514
  height: END_CAP_HEIGHT
83217
83515
  }, children: [jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 w-px h-full bg-amber-800" }), jsxRuntimeExports.jsx("div", { className: "absolute left-0 right-0 top-1/2 h-px bg-amber-800" }), jsxRuntimeExports.jsx("div", { className: "absolute right-0 top-0 w-px h-full bg-amber-800" }), jsxRuntimeExports.jsx("span", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-label-12 leading-none whitespace-nowrap rounded-xs px-1 py-0.5 text-gray-100 bg-amber-800", children: label })] });
83218
83516
  });
83219
- const TimelineBar = reactExports.memo(function TimelineBar2({ span, compression, containerWidth, isSelected, onClick }) {
83517
+ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, viewDuration, containerWidth, isSelected, onClick }) {
83220
83518
  var _a3;
83221
83519
  const startTime = getHighResInMs(span.startTime);
83222
83520
  const endTime = getHighResInMs(span.endTime);
83223
- const totalDurationMs = endTime - startTime;
83224
- const leftFrac = compression.toVisual(startTime);
83225
- const rightFrac = compression.toVisual(endTime);
83226
- const widthFrac = rightFrac - leftFrac;
83227
- const leftPct = leftFrac * 100;
83521
+ const totalDurationMs = getSpanDurationMs(span);
83522
+ const leftFracRaw = viewDuration > 0 ? (startTime - viewStart) / viewDuration : 0;
83523
+ const rightFracRaw = viewDuration > 0 ? (endTime - viewStart) / viewDuration : 0;
83524
+ const widthFrac = rightFracRaw - leftFracRaw;
83525
+ const leftPct = leftFracRaw * 100;
83228
83526
  const widthPct = widthFrac * 100;
83229
83527
  const pixelWidth = widthFrac * containerWidth;
83230
- const isCompressed = containerWidth > 0 && pixelWidth < FIXED_BAR_WIDTH_PX;
83528
+ const visibleLeftFrac = Math.max(0, Math.min(1, leftFracRaw));
83529
+ const visibleRightFrac = Math.max(0, Math.min(1, rightFracRaw));
83530
+ const visiblePixelWidth = Math.max(0, visibleRightFrac - visibleLeftFrac) * containerWidth;
83531
+ const isTinyBar = containerWidth > 0 && visiblePixelWidth < TINY_BAR_BOX_SIZE_PX;
83231
83532
  const [isRowHovered, setIsRowHovered] = reactExports.useState(false);
83232
83533
  const segments = reactExports.useMemo(() => computeSpanSegments(span), [span]);
83233
- const finalSegment = segments[segments.length - 1];
83234
83534
  const workflowStatus = (_a3 = span.attributes.data) == null ? void 0 : _a3.status;
83235
83535
  const isErrored = span.status.code === 2 || workflowStatus === "failed";
83236
83536
  const colors = getResourceColor(span.resource);
83237
83537
  const fallbackColor = isErrored ? colors.errorBar ?? "var(--ds-red-700)" : colors.bar;
83238
- const compressedSegmentStatus = isErrored ? "failed" : span.resource === "hook" ? "received" : finalSegment == null ? void 0 : finalSegment.status;
83239
- const compressedSegmentStyle = compressedSegmentStatus === "queued" ? { background: "var(--ds-gray-500)" } : compressedSegmentStatus ? SEGMENT_CONFIG[compressedSegmentStatus].style : void 0;
83240
- const compressedSegmentClassName = compressedSegmentStatus ? SEGMENT_CONFIG[compressedSegmentStatus].className : void 0;
83241
- const hasCompressedStatus = Boolean(compressedSegmentClassName || compressedSegmentStyle);
83242
83538
  const renderDurationLabel = (label) => jsxRuntimeExports.jsx("span", { className: "pointer-events-none absolute inset-0 flex items-center justify-start overflow-hidden px-1 text-[10px] font-mono font-medium leading-none whitespace-nowrap text-left text-white tabular-nums", style: { textShadow: "0 1px 1px rgba(0, 0, 0, 0.45)" }, children: label });
83243
83539
  const getMinDurationLabelWidthPx = (label) => Math.max(40, label.length * 6 + 12);
83244
83540
  const totalDurationLabel = formatDuration(totalDurationMs);
83245
83541
  const showBarDurationLabel = isRowHovered && pixelWidth >= getMinDurationLabelWidthPx(totalDurationLabel);
83246
- const barContent = isCompressed ? jsxRuntimeExports.jsx("div", { className: cn$4("relative h-4 rounded-[0.25rem] top-[3px]", compressedSegmentClassName), style: {
83247
- width: "100%",
83248
- background: hasCompressedStatus ? void 0 : fallbackColor,
83249
- ...compressedSegmentStyle
83250
- }, children: showBarDurationLabel ? renderDurationLabel(totalDurationLabel) : null }) : segments.length > 0 ? jsxRuntimeExports.jsx("div", { className: "relative w-full h-4 top-[3px]", children: segments.map((seg, i) => {
83542
+ const showBoundaryArrow = isTinyBar && (leftFracRaw < 0 || rightFracRaw > 1);
83543
+ const BoundaryArrow = leftFracRaw < 0.5 ? ArrowLeft : ArrowRight;
83544
+ const barContent = showBoundaryArrow ? jsxRuntimeExports.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-[0.25rem]", children: jsxRuntimeExports.jsx(BoundaryArrow, { className: "size-3 text-gray-900" }) }) : isTinyBar ? jsxRuntimeExports.jsx("div", { className: "h-6 rounded-[0.25rem]", style: { background: fallbackColor } }) : segments.length > 0 ? jsxRuntimeExports.jsx("div", { className: "relative h-6 w-full", children: segments.map((seg, i) => {
83251
83545
  const segPixelWidth = (seg.endFraction - seg.startFraction) * pixelWidth;
83252
83546
  const segDurationLabel = formatDuration((seg.endFraction - seg.startFraction) * totalDurationMs);
83253
83547
  const showSegmentDurationLabel = isRowHovered && segPixelWidth >= getMinDurationLabelWidthPx(segDurationLabel);
@@ -83258,24 +83552,28 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, compression,
83258
83552
  minWidth: 1,
83259
83553
  ...segStyle
83260
83554
  }, children: showSegmentDurationLabel ? renderDurationLabel(segDurationLabel) : null }, `${seg.status}-${i}`);
83261
- }) }) : jsxRuntimeExports.jsx("div", { className: "relative h-4 rounded-[0.25rem] top-[3px]", style: {
83555
+ }) }) : jsxRuntimeExports.jsx("div", { className: "relative h-6 rounded-[0.25rem]", style: {
83262
83556
  width: "100%",
83263
83557
  minWidth: 4,
83264
83558
  background: fallbackColor
83265
83559
  }, children: showBarDurationLabel ? renderDurationLabel(totalDurationLabel) : null });
83266
- return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("h-[34px] relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 rounded-sm aria-selected:hover:bg-gray-200"), onMouseEnter: () => setIsRowHovered(true), onMouseLeave: () => setIsRowHovered(false), onClick, children: jsxRuntimeExports.jsx("div", { className: "absolute top-1.5 h-[22px] rounded-sm", style: {
83267
- left: isCompressed ? `min(${leftPct}%, calc(100% - ${FIXED_BAR_WIDTH_PX}px))` : `${leftPct}%`,
83268
- width: isCompressed ? `${FIXED_BAR_WIDTH_PX}px` : `max(${widthPct}%, 4px)`
83269
- }, children: barContent }) });
83560
+ return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200"), onMouseEnter: () => setIsRowHovered(true), onMouseLeave: () => setIsRowHovered(false), onClick, children: jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0", style: {
83561
+ left: TIMELINE_PADDING_PX,
83562
+ right: TIMELINE_PADDING_PX
83563
+ }, children: jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 -translate-y-1/2", style: {
83564
+ left: showBoundaryArrow ? `min(max(${leftPct}%, 0px), calc(100% - ${TINY_BAR_BOX_SIZE_PX}px))` : isTinyBar ? `min(${leftPct}%, calc(100% - ${TINY_BAR_WIDTH_PX}px))` : `${leftPct}%`,
83565
+ width: showBoundaryArrow ? `${TINY_BAR_BOX_SIZE_PX}px` : isTinyBar ? `${TINY_BAR_WIDTH_PX}px` : `max(${widthPct}%, 4px)`,
83566
+ height: BAR_HEIGHT_PX
83567
+ }, children: barContent }) }) });
83270
83568
  });
83271
- function TimelineHeader({ viewStart, viewDuration, rootStart, compression, isZoomed, onResetZoom, hoverInfo: hoverInfo2 }) {
83272
- const viewEnd = viewStart + viewDuration;
83273
- const markers2 = reactExports.useMemo(() => compression.isCompressed ? computeCompressedTimeMarkers(compression, viewStart, viewEnd, rootStart) : computeTimeMarkers(viewDuration, viewStart - rootStart), [compression, viewStart, viewEnd, viewDuration, rootStart]);
83274
- return jsxRuntimeExports.jsxs("div", { className: "relative bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-end px-2 pb-1", children: [jsxRuntimeExports.jsxs("div", { className: "relative h-full flex-1", children: [markers2.map((m2, i) => jsxRuntimeExports.jsx("span", { className: "absolute bottom-1 font-mono text-xs font-normal leading-4 text-gray-900 whitespace-nowrap", style: { left: `${m2.position * 100}%` }, children: m2.label }, i)), hoverInfo2 && jsxRuntimeExports.jsx("span", { className: "absolute top-1 pointer-events-none z-10 font-mono text-[11px] leading-4 text-gray-1000 whitespace-nowrap bg-background-100 border border-gray-alpha-400 rounded px-1 -translate-x-1/2", style: { left: `${hoverInfo2.fraction * 100}%` }, children: hoverInfo2.label })] }), isZoomed && jsxRuntimeExports.jsx("button", { type: "button", className: "absolute right-2 top-1/2 -translate-y-1/2 z-[5] flex items-center py-0.5 px-2 border border-gray-alpha-400 rounded-md bg-background-100 font-sans text-[11px] font-medium text-gray-900 cursor-pointer whitespace-nowrap transition-[color,border-color] duration-[120ms] ease-in-out hover:text-gray-1000 hover:border-gray-600", onClick: onResetZoom, children: "Reset zoom" })] });
83569
+ function TimelineHeader({ markers: markers2, hoverInfo: hoverInfo2 }) {
83570
+ return jsxRuntimeExports.jsx("div", { className: "relative bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-end px-4 pb-1", children: jsxRuntimeExports.jsxs("div", { className: "relative h-full flex-1", children: [markers2.map((m2) => jsxRuntimeExports.jsx("span", { className: "absolute bottom-1 font-mono text-xs font-normal leading-4 text-gray-900 whitespace-nowrap", style: { left: `${m2.position * 100}%` }, children: m2.label }, `${m2.position}-${m2.label}`)), hoverInfo2 && jsxRuntimeExports.jsx("span", { className: "absolute top-1 pointer-events-none z-10 font-mono text-[11px] leading-4 text-gray-1000 whitespace-nowrap bg-background-100 border border-gray-alpha-400 rounded px-1 -translate-x-1/2", style: { left: `${hoverInfo2.fraction * 100}%` }, children: hoverInfo2.label })] }) });
83275
83571
  }
83276
- function Timeline({ spans, compression, selectedId, onSelect, hoverFraction, altHeld = false }) {
83572
+ function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, onSelect, hoverFraction, altHeld = false }) {
83277
83573
  const containerRef = reactExports.useRef(null);
83278
83574
  const [containerWidth, setContainerWidth] = reactExports.useState(0);
83575
+ const viewDuration = viewEnd - viewStart;
83576
+ const timelineWidth = Math.max(0, containerWidth - TIMELINE_PADDING_PX * 2);
83279
83577
  reactExports.useEffect(() => {
83280
83578
  const el = containerRef.current;
83281
83579
  if (!el)
@@ -83286,8 +83584,17 @@ function Timeline({ spans, compression, selectedId, onSelect, hoverFraction, alt
83286
83584
  ro2.observe(el);
83287
83585
  return () => ro2.disconnect();
83288
83586
  }, []);
83289
- const gaps = reactExports.useMemo(() => computeSpanGaps(spans, compression), [spans, compression]);
83290
- return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative py-2", children: [hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-400 pointer-events-none z-10", style: { left: `${hoverFraction * 100}%` } }), spans.map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, compression, containerWidth, isSelected: selectedId === span.spanId, onClick: () => onSelect(span.spanId) }, span.spanId)), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-0 pointer-events-none", children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
83587
+ const gaps = reactExports.useMemo(() => computeSpanGaps(spans, viewStart, viewEnd), [spans, viewStart, viewEnd]);
83588
+ return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: {
83589
+ left: TIMELINE_PADDING_PX,
83590
+ right: TIMELINE_PADDING_PX
83591
+ }, children: markers2.map((marker2) => Math.abs(marker2.value) > ORIGIN_MARKER_EPSILON ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker2.position * 100}%` } }, `${marker2.position}-${marker2.label}`) : null) }), hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: {
83592
+ left: TIMELINE_PADDING_PX,
83593
+ right: TIMELINE_PADDING_PX
83594
+ }, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-400", style: { left: `${hoverFraction * 100}%` } }) }), spans.map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, onClick: () => onSelect(span.spanId) }, span.spanId)), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: {
83595
+ left: TIMELINE_PADDING_PX,
83596
+ right: TIMELINE_PADDING_PX
83597
+ }, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
83291
83598
  }
83292
83599
  const ActiveSpanContext = reactExports.createContext(null);
83293
83600
  ActiveSpanContext.displayName = "ActiveSpanContext";
@@ -83296,16 +83603,14 @@ function ActiveSpanProvider({ spans, children: children2 }) {
83296
83603
  const [activeSpanId, setActiveSpanId] = reactExports.useState(((_a3 = spans[0]) == null ? void 0 : _a3.spanId) ?? null);
83297
83604
  reactExports.useEffect(() => {
83298
83605
  setActiveSpanId((currentSpanId) => {
83299
- if (spans.length === 0) {
83606
+ if (!currentSpanId) {
83300
83607
  return null;
83301
83608
  }
83302
- if (currentSpanId) {
83303
- const hasCurrentSpan = spans.some((span) => span.spanId === currentSpanId);
83304
- if (hasCurrentSpan) {
83305
- return currentSpanId;
83306
- }
83609
+ const hasCurrentSpan = spans.some((span) => span.spanId === currentSpanId);
83610
+ if (hasCurrentSpan) {
83611
+ return currentSpanId;
83307
83612
  }
83308
- return spans[0].spanId;
83613
+ return null;
83309
83614
  });
83310
83615
  }, [spans]);
83311
83616
  const activeSpan = reactExports.useMemo(() => {
@@ -83337,12 +83642,11 @@ const useActiveSpan = () => {
83337
83642
  };
83338
83643
  function DetailPanel({ span, rootStart, onClose }) {
83339
83644
  const startMs = getHighResInMs(span.startTime);
83340
- const durationMs = getHighResInMs(span.duration);
83645
+ const durationMs = getSpanDurationMs(span);
83341
83646
  const offsetMs = startMs - rootStart;
83342
83647
  return jsxRuntimeExports.jsxs("aside", { className: "grid h-full max-h-full grid-rows-[2.5rem_1fr] bg-background-200", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-3 border-b border-gray-alpha-400", children: [jsxRuntimeExports.jsx("span", { className: "text-sm font-medium text-gray-1000 truncate", children: span.name }), jsxRuntimeExports.jsx("button", { type: "button", className: "p-1 rounded-md text-gray-900 hover:text-gray-1000 hover:bg-gray-alpha-200 transition-colors", onClick: onClose, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] }), jsxRuntimeExports.jsx("div", { className: "overflow-y-auto p-3 space-y-3", children: jsxRuntimeExports.jsxs("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-sm", children: [jsxRuntimeExports.jsx("dt", { className: "text-gray-900", children: "Resource" }), jsxRuntimeExports.jsx("dd", { className: "text-gray-1000 font-mono", children: span.resource }), jsxRuntimeExports.jsx("dt", { className: "text-gray-900", children: "Duration" }), jsxRuntimeExports.jsx("dd", { className: "text-gray-1000 tabular-nums font-mono", children: formatDuration(durationMs) }), jsxRuntimeExports.jsx("dt", { className: "text-gray-900", children: "Offset" }), jsxRuntimeExports.jsxs("dd", { className: "text-gray-1000 tabular-nums font-mono", children: ["+", formatDuration(offsetMs)] }), jsxRuntimeExports.jsx("dt", { className: "text-gray-900", children: "Status" }), jsxRuntimeExports.jsx("dd", { className: "text-gray-1000 font-mono", children: span.status.code === 2 ? "Error" : "OK" })] }) })] });
83343
83648
  }
83344
83649
  const MIN_VIEWPORT_MS = 1e-3;
83345
- const TIMELINE_PADDING = 16;
83346
83650
  function useAnimatedViewport(initial) {
83347
83651
  const [viewport, setViewportState] = reactExports.useState(initial);
83348
83652
  const animRef = reactExports.useRef(null);
@@ -83443,11 +83747,34 @@ function NewTraceViewerContent({ trace: trace2 }) {
83443
83747
  prevRootRef.current = { start: newStart, end: newEnd };
83444
83748
  }, [root2.startTime, root2.duration]);
83445
83749
  const viewDuration = viewport.end - viewport.start;
83446
- const compression = reactExports.useMemo(() => buildTimeCompression(trace2.spans, viewport.start, viewport.end), [trace2.spans, viewport.start, viewport.end]);
83447
- const isZoomed = viewport.start > root2.startTime + 0.01 || viewport.end < root2.startTime + root2.duration - 0.01;
83750
+ const timeMarkers = reactExports.useMemo(() => computeTimeMarkers(viewDuration, viewport.start - root2.startTime), [viewDuration, viewport.start, root2.startTime]);
83448
83751
  const resetZoom = reactExports.useCallback(() => {
83449
83752
  animateTo({ start: root2.startTime, end: root2.startTime + root2.duration });
83450
83753
  }, [animateTo, root2.startTime, root2.duration]);
83754
+ const ZOOM_FACTOR = 0.5;
83755
+ const zoomBy = reactExports.useCallback((factor) => {
83756
+ const rootS = root2.startTime;
83757
+ const rootE = root2.startTime + root2.duration;
83758
+ const rootD = root2.duration;
83759
+ setViewport((prev) => {
83760
+ const prevDuration = prev.end - prev.start;
83761
+ const center = (prev.start + prev.end) / 2;
83762
+ const newDuration = Math.max(MIN_VIEWPORT_MS, Math.min(rootD, prevDuration * factor));
83763
+ let newStart = center - newDuration / 2;
83764
+ let newEnd = center + newDuration / 2;
83765
+ if (newStart < rootS) {
83766
+ newStart = rootS;
83767
+ newEnd = rootS + newDuration;
83768
+ }
83769
+ if (newEnd > rootE) {
83770
+ newEnd = rootE;
83771
+ newStart = Math.max(rootS, rootE - newDuration);
83772
+ }
83773
+ return { start: newStart, end: newEnd };
83774
+ });
83775
+ }, [setViewport, root2.startTime, root2.duration]);
83776
+ const zoomIn = reactExports.useCallback(() => zoomBy(ZOOM_FACTOR), [zoomBy]);
83777
+ const zoomOut = reactExports.useCallback(() => zoomBy(1 / ZOOM_FACTOR), [zoomBy]);
83451
83778
  const handleSelectSpan = reactExports.useCallback((spanId) => {
83452
83779
  if (spanId === activeSpanId) {
83453
83780
  clearActiveSpan();
@@ -83525,20 +83852,19 @@ function NewTraceViewerContent({ trace: trace2 }) {
83525
83852
  const hoverInfo2 = reactExports.useMemo(() => {
83526
83853
  if (hoverFraction == null)
83527
83854
  return null;
83528
- const absTime = compression.fromVisual(hoverFraction);
83855
+ const absTime = viewport.start + hoverFraction * viewDuration;
83529
83856
  const offset2 = absTime - root2.startTime;
83530
83857
  return { fraction: hoverFraction, label: formatDuration(offset2, true) };
83531
- }, [hoverFraction, compression, root2.startTime]);
83858
+ }, [hoverFraction, viewport.start, viewDuration, root2.startTime]);
83532
83859
  const handleTimelineMouseMove = reactExports.useCallback((e) => {
83533
83860
  const el = timelineRef.current;
83534
83861
  if (!el)
83535
83862
  return;
83536
83863
  const rect = el.getBoundingClientRect();
83537
- const padding2 = 8;
83538
- const contentWidth = rect.width - padding2 * 2;
83864
+ const contentWidth = rect.width - TIMELINE_PADDING_PX * 2;
83539
83865
  if (contentWidth <= 0)
83540
83866
  return;
83541
- const fraction = Math.max(0, Math.min(1, (e.clientX - rect.left - padding2) / contentWidth));
83867
+ const fraction = Math.max(0, Math.min(1, (e.clientX - rect.left - TIMELINE_PADDING_PX) / contentWidth));
83542
83868
  setHoverFraction(fraction);
83543
83869
  }, []);
83544
83870
  const handleTimelineMouseLeave = reactExports.useCallback(() => {
@@ -83560,14 +83886,14 @@ function NewTraceViewerContent({ trace: trace2 }) {
83560
83886
  return;
83561
83887
  e.preventDefault();
83562
83888
  const rect = el.getBoundingClientRect();
83563
- const contentWidth = rect.width - TIMELINE_PADDING * 2;
83889
+ const contentWidth = rect.width - TIMELINE_PADDING_PX * 2;
83564
83890
  if (contentWidth <= 0)
83565
83891
  return;
83566
83892
  if (isZoomGesture) {
83567
83893
  let dy = e.deltaY;
83568
83894
  if (e.deltaMode === 1)
83569
83895
  dy *= 16;
83570
- const cursorFraction = Math.max(0, Math.min(1, (e.clientX - rect.left - TIMELINE_PADDING) / contentWidth));
83896
+ const cursorFraction = Math.max(0, Math.min(1, (e.clientX - rect.left - TIMELINE_PADDING_PX) / contentWidth));
83571
83897
  const scaleFactor = Math.pow(2, dy / 200);
83572
83898
  setViewport((prev) => {
83573
83899
  const prevDuration = prev.end - prev.start;
@@ -83625,7 +83951,7 @@ function NewTraceViewerContent({ trace: trace2 }) {
83625
83951
  const data = selectedSpan.data;
83626
83952
  return data.stepId ?? data.runId ?? data.hookId ?? selectedSpan.spanId;
83627
83953
  }, [selectedSpan == null ? void 0 : selectedSpan.data, selectedSpan == null ? void 0 : selectedSpan.spanId]);
83628
- return jsxRuntimeExports.jsxs("div", { "data-pane": "pane-root", "data-has-detail": activeSpan ? "" : void 0, className: "grid w-full h-full max-h-full grid-cols-[minmax(100px,1fr)] data-[has-detail]:grid-cols-[minmax(100px,1fr)_clamp(280px,420px,100%)]", children: [jsxRuntimeExports.jsx("div", { id: "trace-parent", className: "grid grid-rows-[1fr] h-full min-h-0 overflow-hidden relative bg-background-100", children: jsxRuntimeExports.jsxs(SplitPane, { startHeader: jsxRuntimeExports.jsxs("div", { className: "bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-center px-2 gap-1.5", children: [jsxRuntimeExports.jsx(Search, { className: "w-3.5 h-3.5 shrink-0 text-gray-800" }), jsxRuntimeExports.jsx("input", { id: "trace-viewer-search", name: "trace-viewer-search", type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search spans...", "aria-label": "Search spans", className: "flex-1 min-w-0 bg-transparent text-sm text-gray-1000 placeholder:text-gray-800 outline-none" }), searchQuery && jsxRuntimeExports.jsx("button", { type: "button", onClick: () => setSearchQuery(""), className: "shrink-0 p-0.5 rounded-sm text-gray-800 hover:text-gray-1000 hover:bg-gray-200 transition-colors", children: jsxRuntimeExports.jsx(X$3, { className: "w-3 h-3" }) })] }), endHeader: jsxRuntimeExports.jsx(TimelineHeader, { viewStart: viewport.start, viewDuration, rootStart: root2.startTime, compression, isZoomed, onResetZoom: resetZoom, hoverInfo: hoverInfo2 }), children: [jsxRuntimeExports.jsx("div", { className: "block overflow-visible", children: jsxRuntimeExports.jsx(EventList, { spans: filteredSpans, activeSpanId, onSelectSpan: handleSelectSpan }) }), jsxRuntimeExports.jsx("div", { ref: timelineRef, className: "block min-h-0 overflow-visible relative px-2", onDoubleClick: resetZoom, onMouseMove: handleTimelineMouseMove, onMouseLeave: handleTimelineMouseLeave, children: jsxRuntimeExports.jsx(Timeline, { spans: filteredSpans, compression, selectedId: activeSpanId, onSelect: handleSelectSpan, hoverFraction, altHeld }) })] }) }), activeSpan && sidebar ? jsxRuntimeExports.jsxs("aside", { className: "flex flex-col h-full max-h-full bg-background-100 border-l border-gray-alpha-400 overflow-auto", children: [jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 px-4 pt-4 pb-3", children: jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-2", children: [jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [jsxRuntimeExports.jsx("span", { className: "text-[15px] font-semibold text-gray-1000 truncate block", children: selectedSpanName }), selectedResourceId && jsxRuntimeExports.jsxs("div", { className: "mt-1 flex items-center gap-2", children: [selectedResource && jsxRuntimeExports.jsx("span", { className: `inline-flex items-center rounded-md px-1.5 py-0.5 text-[11px] font-medium leading-none shrink-0 ${selectedResource === "step" ? "bg-green-200 text-green-900" : selectedResource === "run" ? "bg-blue-200 text-blue-900" : selectedResource === "hook" ? "bg-yellow-200 text-yellow-900" : "bg-gray-200 text-gray-900"}`, children: selectedResource.charAt(0).toUpperCase() + selectedResource.slice(1) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1 text-[13px] font-mono text-gray-700 min-w-0", title: selectedResourceId, children: [jsxRuntimeExports.jsx("span", { className: "truncate", children: selectedResourceId }), jsxRuntimeExports.jsx(CopyButton, { copyText: selectedResourceId, ariaLabel: "Copy ID", className: "shrink-0" })] })] })] }), jsxRuntimeExports.jsx("button", { type: "button", className: "p-1 rounded-md text-gray-900 hover:text-gray-1000 hover:bg-gray-alpha-200 transition-colors shrink-0", onClick: clearActiveSpan, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] }) }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary$1, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, spanDetailData: sidebar.spanDetailData, spanDetailError: sidebar.spanDetailError, spanDetailLoading: sidebar.spanDetailLoading, onSpanSelect: sidebar.onSpanSelect, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan }) }) })] }) : activeSpan ? jsxRuntimeExports.jsx(DetailPanel, { span: activeSpan, rootStart: root2.startTime, onClose: clearActiveSpan }) : null] });
83954
+ return jsxRuntimeExports.jsxs("div", { "data-pane": "pane-root", "data-has-detail": activeSpan ? "" : void 0, className: "grid w-full h-full max-h-full grid-cols-[minmax(100px,1fr)] data-[has-detail]:grid-cols-[minmax(100px,1fr)_clamp(280px,420px,100%)]", children: [jsxRuntimeExports.jsxs("div", { id: "trace-parent", className: "grid grid-rows-[1fr] h-full min-h-0 overflow-hidden relative bg-background-100", children: [jsxRuntimeExports.jsxs(SplitPane, { startHeader: jsxRuntimeExports.jsxs("div", { className: "bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-center px-2 gap-1.5", children: [jsxRuntimeExports.jsx(Search, { className: "w-3.5 h-3.5 shrink-0 text-gray-800" }), jsxRuntimeExports.jsx("input", { id: "trace-viewer-search", name: "trace-viewer-search", type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search spans...", "aria-label": "Search spans", className: "flex-1 min-w-0 bg-transparent text-sm text-gray-1000 placeholder:text-gray-800 outline-none" }), searchQuery && jsxRuntimeExports.jsx("button", { type: "button", onClick: () => setSearchQuery(""), className: "shrink-0 p-0.5 rounded-sm text-gray-800 hover:text-gray-1000 hover:bg-gray-200 transition-colors", children: jsxRuntimeExports.jsx(X$3, { className: "w-3 h-3" }) })] }), endHeader: jsxRuntimeExports.jsx(TimelineHeader, { markers: timeMarkers, hoverInfo: hoverInfo2 }), children: [jsxRuntimeExports.jsx("div", { className: "block overflow-visible", children: jsxRuntimeExports.jsx(EventList, { spans: filteredSpans, activeSpanId, onSelectSpan: handleSelectSpan }) }), jsxRuntimeExports.jsx("div", { ref: timelineRef, className: "block min-h-0 overflow-visible relative", onDoubleClick: resetZoom, onMouseMove: handleTimelineMouseMove, onMouseLeave: handleTimelineMouseLeave, children: jsxRuntimeExports.jsx(Timeline, { spans: filteredSpans, viewStart: viewport.start, viewEnd: viewport.end, markers: timeMarkers, selectedId: activeSpanId, onSelect: handleSelectSpan, hoverFraction, altHeld }) })] }), jsxRuntimeExports.jsxs("div", { className: "absolute right-3 bottom-3 z-[5] flex items-center border border-gray-alpha-400 rounded-lg bg-background-100 shadow-sm overflow-hidden divide-x divide-gray-alpha-400", children: [jsxRuntimeExports.jsx("button", { type: "button", className: "flex items-center justify-center w-8 h-8 text-gray-900 cursor-pointer transition-colors duration-[120ms] ease-in-out hover:text-gray-1000 hover:bg-gray-alpha-100", onClick: zoomOut, "aria-label": "Zoom out", children: jsxRuntimeExports.jsx(ZoomOut, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx("button", { type: "button", className: "flex items-center justify-center w-8 h-8 text-gray-900 cursor-pointer transition-colors duration-[120ms] ease-in-out hover:text-gray-1000 hover:bg-gray-alpha-100", onClick: resetZoom, "aria-label": "Reset zoom", children: jsxRuntimeExports.jsx(RotateCcw, { className: "w-3.5 h-3.5" }) }), jsxRuntimeExports.jsx("button", { type: "button", className: "flex items-center justify-center w-8 h-8 text-gray-900 cursor-pointer transition-colors duration-[120ms] ease-in-out hover:text-gray-1000 hover:bg-gray-alpha-100", onClick: zoomIn, "aria-label": "Zoom in", children: jsxRuntimeExports.jsx(ZoomIn, { className: "w-4 h-4" }) })] })] }), activeSpan && sidebar ? jsxRuntimeExports.jsxs("aside", { className: "flex flex-col h-full max-h-full bg-background-100 border-l border-gray-alpha-400 overflow-auto", children: [jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 px-4 pt-4 pb-3", children: jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-2", children: [jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [jsxRuntimeExports.jsx("span", { className: "text-[15px] font-semibold text-gray-1000 truncate block", children: selectedSpanName }), selectedResourceId && jsxRuntimeExports.jsxs("div", { className: "mt-1 flex items-center gap-2", children: [selectedResource && jsxRuntimeExports.jsx("span", { className: `inline-flex items-center rounded-md px-1.5 py-0.5 text-[11px] font-medium leading-none shrink-0 ${selectedResource === "step" ? "bg-green-200 text-green-900" : selectedResource === "run" ? "bg-blue-200 text-blue-900" : selectedResource === "hook" ? "bg-yellow-200 text-yellow-900" : "bg-gray-200 text-gray-900"}`, children: selectedResource.charAt(0).toUpperCase() + selectedResource.slice(1) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1 text-[13px] font-mono text-gray-700 min-w-0", title: selectedResourceId, children: [jsxRuntimeExports.jsx("span", { className: "truncate", children: selectedResourceId }), jsxRuntimeExports.jsx(CopyButton, { copyText: selectedResourceId, ariaLabel: "Copy ID", className: "shrink-0" })] })] })] }), jsxRuntimeExports.jsx("button", { type: "button", className: "p-1 rounded-md text-gray-900 hover:text-gray-1000 hover:bg-gray-alpha-200 transition-colors shrink-0", onClick: clearActiveSpan, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] }) }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary$1, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, spanDetailData: sidebar.spanDetailData, spanDetailError: sidebar.spanDetailError, spanDetailLoading: sidebar.spanDetailLoading, onSpanSelect: sidebar.onSpanSelect, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan }) }) })] }) : activeSpan ? jsxRuntimeExports.jsx(DetailPanel, { span: activeSpan, rootStart: root2.startTime, onClose: clearActiveSpan }) : null] });
83629
83955
  }
83630
83956
  const NewTraceViewer = ({ run, events: events2, sidebarData }) => {
83631
83957
  const traceWithMeta = reactExports.useMemo(() => {
@@ -87869,7 +88195,7 @@ const runtimeLogger = createLogger("runtime");
87869
88195
  createLogger("webhook");
87870
88196
  createLogger("events");
87871
88197
  createLogger("adapter");
87872
- const version$1 = "5.0.0-beta.3";
88198
+ const version$1 = "5.0.0-beta.4";
87873
88199
  const execFileAsync = promisify(execFile);
87874
88200
  function parsePort$1(value, radix = 10) {
87875
88201
  const port = parseInt(value, radix);
@@ -114306,7 +114632,7 @@ function createLocalWorld(args) {
114306
114632
  const basedir = mergedConfig.dataDir;
114307
114633
  const hooksDir = path$3.join(basedir, "hooks");
114308
114634
  const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
114309
- const { HookSchema: HookSchema2 } = await import("./index-CNvEtg5c.js");
114635
+ const { HookSchema: HookSchema2 } = await import("./index-D02biwxV.js");
114310
114636
  await Promise.all(taggedHookFiles.map(async (hookFile) => {
114311
114637
  const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
114312
114638
  if (hook == null ? void 0 : hook.token) {
@@ -114458,8 +114784,8 @@ function requireGetVercelOidcToken() {
114458
114784
  }
114459
114785
  try {
114460
114786
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
114461
- await import("./token-util-DsMisyo3.js").then((n) => n.t),
114462
- await import("./token-DMEdoEUo.js").then((n) => n.t)
114787
+ await import("./token-util-CfY4anoc.js").then((n) => n.t),
114788
+ await import("./token-D7_Lld85.js").then((n) => n.t)
114463
114789
  ]);
114464
114790
  if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
114465
114791
  await refreshToken(options);
@@ -149610,7 +149936,7 @@ function RunDetailView({
149610
149936
  "Streams"
149611
149937
  ] })
149612
149938
  ] }),
149613
- /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "trace", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary$1, { title: "Failed to load trace viewer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full -mx-6 pl-6 bg-background-100 border-t border-gray-alpha-400 overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
149939
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "trace", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary$1, { title: "Failed to load trace viewer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full -mx-6 bg-background-100 border-t border-gray-alpha-400 overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
149614
149940
  NewTraceViewer,
149615
149941
  {
149616
149942
  run,
@@ -149927,7 +150253,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
149927
150253
  __proto__: null,
149928
150254
  loader
149929
150255
  }, Symbol.toStringTag, { value: "Module" }));
149930
- const serverManifest = { "entry": { "module": "/assets/entry.client-BWsSsWQm.js", "imports": ["/assets/index-DQa-BExo.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-DdOfCnSG.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/mermaid-3ZIDBTTL-BSJR0c5A.js"], "css": ["/assets/root-DXDFWibD.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-Ce97yLJ7.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/workflow-graph-viewer-DYhMo9jl.js", "/assets/mermaid-3ZIDBTTL-BSJR0c5A.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-JQ32aJru.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/workflow-graph-viewer-DYhMo9jl.js", "/assets/mermaid-3ZIDBTTL-BSJR0c5A.js", "/assets/encryption-80GMP4r0.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-923d96a0.js", "version": "923d96a0", "sri": void 0 };
150256
+ const serverManifest = { "entry": { "module": "/assets/entry.client-BWsSsWQm.js", "imports": ["/assets/index-DQa-BExo.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-sXuXrryl.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/mermaid-3ZIDBTTL-w46Kr90n.js"], "css": ["/assets/root-C0Tu5TVN.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-BIQJMe_Q.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/workflow-graph-viewer-De9JQkZc.js", "/assets/mermaid-3ZIDBTTL-w46Kr90n.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-7Pj2mQLs.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/workflow-graph-viewer-De9JQkZc.js", "/assets/mermaid-3ZIDBTTL-w46Kr90n.js", "/assets/encryption-80GMP4r0.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-77894282.js", "version": "77894282", "sri": void 0 };
149931
150257
  const assetsBuildDirectory = "build/client";
149932
150258
  const basename = "/";
149933
150259
  const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };