ryugi-artifacts 1.76.0 → 1.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/cli.cjs +411 -35
  2. package/dist/output-bootstrap.cjs +9 -2
  3. package/dist/server.cjs +302 -298
  4. package/dist/viewer/ArtboardLayout-BTys-6Vg.js +13 -0
  5. package/dist/viewer/Canvas-CWPtxXag.js +1 -0
  6. package/dist/viewer/{DocumentLayout-BFuBCe1z.js → DocumentLayout-Bv6Ni6pv.js} +2 -2
  7. package/dist/viewer/{DocumentPage-BqBUftrx.js → DocumentPage-21BkHTw9.js} +1 -1
  8. package/dist/viewer/PreviewLayout-Dl9CuJaY.js +2 -0
  9. package/dist/viewer/{SnapshotDocument-DXjajUyC.js → SnapshotDocument-Cv3OmLv4.js} +1 -1
  10. package/dist/viewer/channel-BtxKScqa.js +4 -0
  11. package/dist/viewer/index.js +2 -2
  12. package/dist/viewer/index4.css +64 -0
  13. package/dist/viewer/preview.html +2 -2
  14. package/dist/viewer/preview.js +1 -1
  15. package/dist/viewer/{printDocument-CHLL0WV9.js → printDocument-C4mixOCB.js} +1 -1
  16. package/dist/viewer/view-BJqsLsys.js +2 -0
  17. package/dist/viewer-lib/{Canvas-BwBZAQOH.js → Canvas-CCq4Ko7_.js} +445 -342
  18. package/dist/viewer-lib/{PhoneArtboardBar-CnuXdNK_.js → PhoneArtboardBar-Cll7l0fz.js} +1 -1
  19. package/dist/viewer-lib/PreviewView-D7cDFhyg.js +801 -0
  20. package/dist/viewer-lib/{ReadOnlyWhiteboard-BIrh4itZ.js → ReadOnlyWhiteboard-CmKjtHFJ.js} +59 -59
  21. package/dist/viewer-lib/{SnapshotDocument-DxFquEK9.js → SnapshotDocument-BSkLVGik.js} +15589 -15547
  22. package/dist/viewer-lib/{VirtualizedEditor-uWe43zaI-CkFFq0vg.js → VirtualizedEditor-uWe43zaI-BPwh1XeB.js} +2 -2
  23. package/dist/viewer-lib/{VirtualizedRenderer-C_d95FXi-Dsji27_T.js → VirtualizedRenderer-C_d95FXi-D_uVjc6A.js} +3 -3
  24. package/dist/viewer-lib/{ar-SA-G6X2FPQ2-BRnkqOuC.js → ar-SA-G6X2FPQ2-HZky6mYE.js} +1 -1
  25. package/dist/viewer-lib/{az-AZ-76LH7QW2-ehow0VIq.js → az-AZ-76LH7QW2-Bz6gZGXm.js} +1 -1
  26. package/dist/viewer-lib/{bg-BG-XCXSNQG7-BI6qziGi.js → bg-BG-XCXSNQG7-Bj6azCuS.js} +1 -1
  27. package/dist/viewer-lib/{bn-BD-2XOGV67Q-tpMGd2_B.js → bn-BD-2XOGV67Q-pkZSsKMV.js} +1 -1
  28. package/dist/viewer-lib/{ca-ES-6MX7JW3Y-BbUlsBJ3.js → ca-ES-6MX7JW3Y-DInd8tqd.js} +1 -1
  29. package/dist/viewer-lib/{chunk-EIO257PC-Bv-n7kZ3.js → chunk-EIO257PC-A9RZ-nRE.js} +1 -1
  30. package/dist/viewer-lib/core.js +3 -3
  31. package/dist/viewer-lib/{cs-CZ-2BRQDIVT-DSqbdlen.js → cs-CZ-2BRQDIVT-CQ0UDIDw.js} +1 -1
  32. package/dist/viewer-lib/{da-DK-5WZEPLOC-BjZ1R6o-.js → da-DK-5WZEPLOC-rSt6qKPe.js} +1 -1
  33. package/dist/viewer-lib/{de-DE-XR44H4JA-BfGPalkL.js → de-DE-XR44H4JA-DrIjWm0C.js} +1 -1
  34. package/dist/viewer-lib/{dist-mZ0nbNzy.js → dist--CpqpZeP.js} +2 -2
  35. package/dist/viewer-lib/{dist-DnQNTkTe.js → dist-B-VcBVha.js} +4 -4
  36. package/dist/viewer-lib/{dist-qYdH7M_t.js → dist-BIRD6yJM.js} +4 -4
  37. package/dist/viewer-lib/{dist-B8Fcs3nk.js → dist-By5I7Okg.js} +1 -1
  38. package/dist/viewer-lib/{dist-wfYzTIrG.js → dist-C_4-r-SK.js} +3 -3
  39. package/dist/viewer-lib/{dist-DullpK1S.js → dist-C_TzQuVj.js} +2 -2
  40. package/dist/viewer-lib/{dist-_LP1pOLG.js → dist-CiDxjK87.js} +3 -3
  41. package/dist/viewer-lib/{dist-rgz6xpXM.js → dist-D-o6TefA.js} +3 -3
  42. package/dist/viewer-lib/{dist-yTJLUGcc.js → dist-D4p8lcBm.js} +3 -3
  43. package/dist/viewer-lib/{dist-B1gf6Fa6.js → dist-D7GVdiZ_.js} +3 -3
  44. package/dist/viewer-lib/{dist-DhIKmABp.js → dist-DUp1l9aw.js} +1 -1
  45. package/dist/viewer-lib/{dist-9o61dnhF.js → dist-DiIs4Wtf.js} +2 -2
  46. package/dist/viewer-lib/{dist-NA5mGdqC.js → dist-DkB9uL4b.js} +3 -3
  47. package/dist/viewer-lib/{dist-B20oz2cZ.js → dist-DkRPb1L4.js} +3 -3
  48. package/dist/viewer-lib/{dist-BkAQ5CG2.js → dist-Do5FbfPB.js} +2 -2
  49. package/dist/viewer-lib/{dist-Mo4r-8tk.js → dist-DwPZHID8.js} +2 -2
  50. package/dist/viewer-lib/{dist-DIGLcVme.js → dist-MF77ZiP3.js} +3 -3
  51. package/dist/viewer-lib/{dist-BfpTX5QK.js → dist-OysWJvrd.js} +2 -2
  52. package/dist/viewer-lib/{dist-BdKPWdwp.js → dist-SWpcpLKQ.js} +2 -2
  53. package/dist/viewer-lib/{dist-06BdfUMU.js → dist-T-NoxEoS.js} +4 -4
  54. package/dist/viewer-lib/{dist-5oASkt9-.js → dist-TTrYwc3n.js} +2 -2
  55. package/dist/viewer-lib/{dist-Cnmv9jOf.js → dist-nttHr497.js} +3 -3
  56. package/dist/viewer-lib/{dist-6StWP8sP.js → dist-z5xmIJm7.js} +3 -3
  57. package/dist/viewer-lib/document.js +3 -3
  58. package/dist/viewer-lib/{el-GR-BZB4AONW-BvUZSnTi.js → el-GR-BZB4AONW-3kVOQ15p.js} +1 -1
  59. package/dist/viewer-lib/{en-B4ZKOASM-Dyp8KE8C.js → en-B4ZKOASM-sas4DJvS.js} +1 -1
  60. package/dist/viewer-lib/{es-ES-U4NZUMDT-B1PZEwLb.js → es-ES-U4NZUMDT-DF1DXGeP.js} +1 -1
  61. package/dist/viewer-lib/{eu-ES-A7QVB2H4-BNk6M67A.js → eu-ES-A7QVB2H4-CIu5bgjr.js} +1 -1
  62. package/dist/viewer-lib/{fa-IR-HGAKTJCU-CEtlDVKb.js → fa-IR-HGAKTJCU-Dg12PelN.js} +1 -1
  63. package/dist/viewer-lib/{fi-FI-Z5N7JZ37-CqXNLgJp.js → fi-FI-Z5N7JZ37-DGfGckr2.js} +1 -1
  64. package/dist/viewer-lib/{fr-FR-RHASNOE6-D7dtIipP.js → fr-FR-RHASNOE6-CB3RBQBb.js} +1 -1
  65. package/dist/viewer-lib/{gl-ES-HMX3MZ6V-Cgo7fAtE.js → gl-ES-HMX3MZ6V-srdgH8Yb.js} +1 -1
  66. package/dist/viewer-lib/{he-IL-6SHJWFNN-Bm1-H99W.js → he-IL-6SHJWFNN-C-u3aIrD.js} +1 -1
  67. package/dist/viewer-lib/{hi-IN-IWLTKZ5I-yK8E_0J9.js → hi-IN-IWLTKZ5I-DnRD5RwM.js} +1 -1
  68. package/dist/viewer-lib/{hu-HU-A5ZG7DT2-C98VrJxm.js → hu-HU-A5ZG7DT2-cHUeODPe.js} +1 -1
  69. package/dist/viewer-lib/{id-ID-SAP4L64H-TIdVGjhY.js → id-ID-SAP4L64H-BYp8Yosj.js} +1 -1
  70. package/dist/viewer-lib/{image-GAAHSSAO-Bi1NqWd6.js → image-GAAHSSAO-MaHRDtG2.js} +1 -1
  71. package/dist/viewer-lib/index.js +3117 -3076
  72. package/dist/viewer-lib/{it-IT-JPQ66NNP-627ORc6z.js → it-IT-JPQ66NNP-K76B2vDZ.js} +1 -1
  73. package/dist/viewer-lib/{ja-JP-DBVTYXUO-BMKJR86l.js → ja-JP-DBVTYXUO-DGtajQ1n.js} +1 -1
  74. package/dist/viewer-lib/{kaa-6HZHGXH3-BpSB5geq.js → kaa-6HZHGXH3-Byq6aZnP.js} +1 -1
  75. package/dist/viewer-lib/{kab-KAB-ZGHBKWFO-BfYd3nUy.js → kab-KAB-ZGHBKWFO-xFQx0VKj.js} +1 -1
  76. package/dist/viewer-lib/{kk-KZ-P5N5QNE5-B2w9l6j_.js → kk-KZ-P5N5QNE5-DqTYtjE9.js} +1 -1
  77. package/dist/viewer-lib/{km-KH-HSX4SM5Z-DpRvnOD3.js → km-KH-HSX4SM5Z-CmHVZ3Pg.js} +1 -1
  78. package/dist/viewer-lib/{ko-KR-MTYHY66A-CGrV1Spl.js → ko-KR-MTYHY66A-pItxT0ea.js} +1 -1
  79. package/dist/viewer-lib/{ku-TR-6OUDTVRD-DGfmXOnJ.js → ku-TR-6OUDTVRD-DJoNwVzF.js} +1 -1
  80. package/dist/viewer-lib/{lt-LT-XHIRWOB4-DW9cVrrY.js → lt-LT-XHIRWOB4-DG1eQnL9.js} +1 -1
  81. package/dist/viewer-lib/{lv-LV-5QDEKY6T-CDlwVi5d.js → lv-LV-5QDEKY6T-BAFyGSRK.js} +1 -1
  82. package/dist/viewer-lib/{mr-IN-CRQNXWMA-DZTsb8X7.js → mr-IN-CRQNXWMA-Dpt8RtYD.js} +1 -1
  83. package/dist/viewer-lib/{my-MM-5M5IBNSE-eimCGnfV.js → my-MM-5M5IBNSE-PB-QhewM.js} +1 -1
  84. package/dist/viewer-lib/{nb-NO-T6EIAALU-CA0qj8A_.js → nb-NO-T6EIAALU-DUOVY3a0.js} +1 -1
  85. package/dist/viewer-lib/{nl-NL-IS3SIHDZ-xjXdrqei.js → nl-NL-IS3SIHDZ-EvHXncDP.js} +1 -1
  86. package/dist/viewer-lib/{nn-NO-6E72VCQL-BFaVKUPb.js → nn-NO-6E72VCQL-DiLJJ6in.js} +1 -1
  87. package/dist/viewer-lib/{oc-FR-POXYY2M6-x-knw1UV.js → oc-FR-POXYY2M6-BcMNlMjU.js} +1 -1
  88. package/dist/viewer-lib/{pa-IN-N4M65BXN-BzuUR6mV.js → pa-IN-N4M65BXN-y8F6i_xQ.js} +1 -1
  89. package/dist/viewer-lib/{percentages-BXMCSKIN-DUBJl_II.js → percentages-BXMCSKIN-BcGLGIbY.js} +1 -1
  90. package/dist/viewer-lib/{pl-PL-T2D74RX3-GB1o6A0p.js → pl-PL-T2D74RX3-BcJAM87-.js} +1 -1
  91. package/dist/viewer-lib/{printDocument-DjfXK0VD.js → printDocument-Bw-KNCCN.js} +2 -2
  92. package/dist/viewer-lib/{pt-BR-5N22H2LF-CjKPG-dA.js → pt-BR-5N22H2LF-B6LXfMUc.js} +1 -1
  93. package/dist/viewer-lib/{pt-PT-UZXXM6DQ-DXKwitID.js → pt-PT-UZXXM6DQ-Bp-xUqQ8.js} +1 -1
  94. package/dist/viewer-lib/{ro-RO-JPDTUUEW-GXm0K0W-.js → ro-RO-JPDTUUEW-BSUxwWXI.js} +1 -1
  95. package/dist/viewer-lib/{ru-RU-B4JR7IUQ-C3aifH4r.js → ru-RU-B4JR7IUQ-CQdjNcBG.js} +1 -1
  96. package/dist/viewer-lib/{si-LK-N5RQ5JYF-CbCU4-qM.js → si-LK-N5RQ5JYF-7CAmmMro.js} +1 -1
  97. package/dist/viewer-lib/{sk-SK-C5VTKIMK-oq8tYd7x.js → sk-SK-C5VTKIMK-CpC5WEtb.js} +1 -1
  98. package/dist/viewer-lib/{sl-SI-NN7IZMDC-CqbGY6Ud.js → sl-SI-NN7IZMDC-s5Digk56.js} +1 -1
  99. package/dist/viewer-lib/{static-rqLqPT6F.js → static-BL_ltq0p.js} +2 -2
  100. package/dist/viewer-lib/{stylex-DKFn6mfl.css → stylex-B6-Q1VRZ.css} +70 -0
  101. package/dist/viewer-lib/subset-shared.chunk-DVeVdUoS.js +2 -0
  102. package/dist/viewer-lib/{subset-worker.chunk-DPMoD5NG.js → subset-worker.chunk-V92b2YKH.js} +2 -2
  103. package/dist/viewer-lib/{sv-SE-XGPEYMSR-Bsf1cby9.js → sv-SE-XGPEYMSR-D7xx9CF4.js} +1 -1
  104. package/dist/viewer-lib/{ta-IN-2NMHFXQM-eRp4M6qC.js → ta-IN-2NMHFXQM-DbRLNuGy.js} +1 -1
  105. package/dist/viewer-lib/{th-TH-HPSO5L25-DW9SpgaC.js → th-TH-HPSO5L25-FmDN7f8Q.js} +1 -1
  106. package/dist/viewer-lib/thumbnail.js +281 -1
  107. package/dist/viewer-lib/{tr-TR-DEFEU3FU-pOCJfq5E.js → tr-TR-DEFEU3FU-C6SMoY6h.js} +1 -1
  108. package/dist/viewer-lib/types/src/shared/flow.d.ts +24 -0
  109. package/dist/viewer-lib/types/src/shared/geometry.d.ts +7 -0
  110. package/dist/viewer-lib/types/src/shared/types.d.ts +7 -1
  111. package/dist/viewer-lib/types/src/shared/validate.d.ts +1 -0
  112. package/dist/viewer-lib/types/src/viewer/components/BoardPlaceholder.d.ts +1 -1
  113. package/dist/viewer-lib/types/src/viewer/components/BoardsOverview.d.ts +12 -0
  114. package/dist/viewer-lib/types/src/viewer/components/Canvas.d.ts +5 -2
  115. package/dist/viewer-lib/types/src/viewer/components/CanvasNotes.d.ts +6 -0
  116. package/dist/viewer-lib/types/src/viewer/components/DebugHud.d.ts +2 -1
  117. package/dist/viewer-lib/types/src/viewer/components/FlowLayer.d.ts +9 -0
  118. package/dist/viewer-lib/types/src/viewer/components/Labels.d.ts +2 -1
  119. package/dist/viewer-lib/types/src/viewer/document/tocStyles.d.ts +24 -1
  120. package/dist/viewer-lib/types/src/viewer/hooks/useBoardLifecycle.d.ts +3 -2
  121. package/dist/viewer-lib/types/src/viewer/hooks/useCulledBoards.d.ts +1 -0
  122. package/dist/viewer-lib/types/src/viewer/lib/board-lifecycle.d.ts +13 -1
  123. package/dist/viewer-lib/types/src/viewer/lib/cull.d.ts +1 -0
  124. package/dist/viewer-lib/types/src/viewer/lib/overview.d.ts +15 -0
  125. package/dist/viewer-lib/{uk-UA-QMV73CPH-DkgFEjc5.js → uk-UA-QMV73CPH-UOEzCOen.js} +1 -1
  126. package/dist/viewer-lib/{vi-VN-M7AON7JQ-DW2UXo4M.js → vi-VN-M7AON7JQ-Dxi27jBl.js} +1 -1
  127. package/dist/viewer-lib/{viewport-CFJHn_Y6-d5wzsaWt.js → viewport-CFJHn_Y6-CcY0_b0z.js} +1 -1
  128. package/dist/viewer-lib/{zh-CN-LNUGB5OW-APfqTduX.js → zh-CN-LNUGB5OW-BkbG5N7o.js} +1 -1
  129. package/dist/viewer-lib/{zh-HK-E62DVLB3-SgR07W8h.js → zh-HK-E62DVLB3-Btkkw8Q_.js} +1 -1
  130. package/dist/viewer-lib/{zh-TW-RAJ6MFWO-BByKMSmL.js → zh-TW-RAJ6MFWO-BeX560km.js} +1 -1
  131. package/package.json +1 -1
  132. package/dist/viewer/ArtboardLayout-LjqEYnU4.js +0 -13
  133. package/dist/viewer/Canvas-DhxIof5j.js +0 -1
  134. package/dist/viewer/PreviewLayout-Bx_Yf3rn.js +0 -2
  135. package/dist/viewer/channel-ieJNPeHy.js +0 -4
  136. package/dist/viewer/view-DK0Yp3Y_.js +0 -2
  137. package/dist/viewer-lib/PreviewView-DXGaELRD.js +0 -431
  138. package/dist/viewer-lib/subset-shared.chunk-CCczPz6Y.js +0 -2
@@ -1,81 +1,102 @@
1
1
  import { n as e } from "./rolldown-runtime-CwxnZyOB.js";
2
- import { f as t } from "./PreviewView-DXGaELRD.js";
3
- import { d as n, k as r, n as i, t as a, u as o } from "./RyugiLoader-CspgSQMe.js";
4
- import { t as s } from "./cssVar.stylex-BAwVsjeH.js";
5
- import { a as c, n as l, t as u } from "./agentLook-DgVWDJBC.js";
6
- import { memo as d, useEffect as f, useImperativeHandle as p, useLayoutEffect as m, useRef as h, useState as g } from "react";
7
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
8
- import { Maximize2 as b, Repeat as x } from "lucide-react";
9
- import * as S from "motion/react-m";
10
- // src/viewer/lib/cursorPark.ts
11
- var C = 2e4, w = 16, T = 24;
12
- function E(e, t) {
13
- return t - e >= C;
2
+ import { m as t, v as n, x as r } from "./PreviewView-D7cDFhyg.js";
3
+ import { d as i, k as a, n as o, t as s, u as c } from "./RyugiLoader-CspgSQMe.js";
4
+ import { t as l } from "./cssVar.stylex-BAwVsjeH.js";
5
+ import { a as u, n as d, t as f } from "./agentLook-DgVWDJBC.js";
6
+ import { memo as p, useEffect as m, useId as h, useImperativeHandle as g, useLayoutEffect as _, useRef as v, useState as y } from "react";
7
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
8
+ import { Maximize2 as C, Repeat as w } from "lucide-react";
9
+ import * as T from "motion/react-m";
10
+ // src/shared/inspector.ts
11
+ var E = [
12
+ "width",
13
+ "height",
14
+ "position",
15
+ "flex-grow",
16
+ "display",
17
+ "flex-direction",
18
+ "align-items",
19
+ "gap",
20
+ "padding",
21
+ "background-color",
22
+ "opacity",
23
+ "border-radius",
24
+ "border-style",
25
+ "font-size",
26
+ "color",
27
+ "box-shadow"
28
+ ], D = "#0D99FF", O = "M6.2 3.6C5 2.7 3.4 3.6 3.6 5.1L6 22.7C6.2 24.3 8.2 24.8 9.1 23.5L13 18.3C13.4 17.8 14 17.5 14.6 17.5L21.1 17.3C22.7 17.2 23.4 15.2 22.2 14.3Z", k = "M13 3a9 9 0 0 1 0 18H4.5A1.5 1.5 0 0 1 3 19.5V13A10 10 0 0 1 13 3z", A = (e, t, n) => `url("data:image/svg+xml,${encodeURIComponent(e)}") ${t}, ${n}`, j = A(`<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 28 28'><path d='${O}' fill='none' stroke='white' stroke-width='4' stroke-linejoin='round'/><path d='${O}' fill='${D}'/></svg>`, "3 3", "default"), M = A(`<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='${k}' fill='none' stroke='white' stroke-width='3' stroke-linejoin='round'/><path d='${k}' fill='${D}'/><path d='M13 8.2v7.6M9.2 12h7.6' stroke='white' stroke-width='2.2' stroke-linecap='round'/></svg>`, "3 21", "crosshair"), N = 2e4, P = 16, F = 24;
29
+ function I(e, t) {
30
+ return t - e >= N;
14
31
  }
15
- function D(e, t, n = w) {
32
+ function ee(e, t, n = P) {
16
33
  return t ? {
17
34
  x: e.x + Math.max(0, e.w - n),
18
- y: e.y + e.h + T
35
+ y: e.y + e.h + F
19
36
  } : {
20
37
  x: e.x + Math.min(64, e.w * .15),
21
38
  y: e.y + Math.min(80, e.h * .2)
22
39
  };
23
40
  }
24
41
  // src/viewer/hooks/useCursorParked.ts
25
- function O(e) {
26
- let [t, n] = g(() => Date.now());
27
- return f(() => {
42
+ function te(e) {
43
+ let [t, n] = y(() => Date.now());
44
+ return m(() => {
28
45
  if (e === void 0) return;
29
- let t = e + C - Date.now();
46
+ let t = e + N - Date.now();
30
47
  if (t <= 0) return;
31
48
  let r = setTimeout(() => n(Date.now()), t);
32
49
  return () => clearTimeout(r);
33
- }, [e]), e !== void 0 && E(e, t);
50
+ }, [e]), e !== void 0 && I(e, t);
34
51
  }
35
52
  // src/viewer/lib/play.ts
36
- function k(e, t) {
53
+ function ne(e, t) {
37
54
  let n = new Set(e);
38
55
  return n.delete(t) || n.add(t), n;
39
56
  }
40
- var A = (e, t) => (e[t] ?? 0) > 0, j = (e, t) => e.interactive === !0 && A(t, e.file), M = (e, t, n, r) => `${e}${t}?v=${n}${r > 0 ? `&r=${r}` : ""}`, N = 24, P = 34.3, F = "76 130 360 252";
41
- function I({ agent: e, state: t, title: n }) {
57
+ var L = (e, t) => (e[t] ?? 0) > 0, R = (e, t) => e.interactive === !0 && L(t, e.file), z = (e, t, n, r) => `${e}${t}?v=${n}${r > 0 ? `&r=${r}` : ""}`, B = 24, re = 34.3, ie = "76 130 360 252";
58
+ function V({ agent: e, state: t, title: n }) {
42
59
  let r = t === "drawing";
43
- return /* @__PURE__ */ y("div", {
60
+ return /* @__PURE__ */ S("div", {
44
61
  "data-board-state": t,
45
62
  ...{
46
63
  0: { className: "x10l6tqk x10a8y8t x47corl xqfszdh" },
47
- 2: { className: "x10l6tqk x10a8y8t x47corl xqfszdh x2fo67v xbk3nqn x107h2d7 x3kcoq9" },
64
+ 4: { className: "x10l6tqk x10a8y8t x47corl xqfszdh x2fo67v xbk3nqn x107h2d7 x3kcoq9" },
65
+ 2: { className: "x10l6tqk x10a8y8t x47corl xqfszdh x1l2ivya xbk3nqn xaatb59 x1tjb3dp" },
66
+ 6: { className: "x10l6tqk x10a8y8t x47corl xqfszdh x1l2ivya xbk3nqn xaatb59 x1tjb3dp" },
48
67
  1: { className: "x10l6tqk x10a8y8t x47corl xqfszdh xknvxwu xox4ge1 xopnk0n x11xz5rz" },
49
- 3: { className: "x10l6tqk x10a8y8t x47corl xqfszdh xbk3nqn x107h2d7 x3kcoq9 xknvxwu xox4ge1 xopnk0n x11xz5rz" }
50
- }[(t === "waiting") << 1 | !!r],
51
- children: [t === "waiting" && /* @__PURE__ */ y(_, { children: [
52
- /* @__PURE__ */ v("i", { className: "x10l6tqk x1bjaxh0 x13q6o5s x1y0btm7 xhgr6co xc342km xmwf3kg x1oo2giq x1nhu8zx x14up9od" }),
53
- /* @__PURE__ */ v("i", { className: "x10l6tqk x1bjaxh0 x13q6o5s x1y0btm7 xhgr6co xc342km xmwf3kg x1oo2giq xetn906 x15guuwl" }),
54
- /* @__PURE__ */ v("i", { className: "x10l6tqk x1bjaxh0 x13q6o5s x1y0btm7 xhgr6co xc342km x1e3sxgq xppht8 x1nhu8zx x14up9od" }),
55
- /* @__PURE__ */ v("i", { className: "x10l6tqk x1bjaxh0 x13q6o5s x1y0btm7 xhgr6co xc342km x1e3sxgq xppht8 xetn906 x15guuwl" })
56
- ] }), /* @__PURE__ */ y("div", {
68
+ 5: { className: "x10l6tqk x10a8y8t x47corl xqfszdh xbk3nqn x107h2d7 x3kcoq9 xknvxwu xox4ge1 xopnk0n x11xz5rz" },
69
+ 3: { className: "x10l6tqk x10a8y8t x47corl xqfszdh xbk3nqn xaatb59 x1tjb3dp xknvxwu xox4ge1 xopnk0n x11xz5rz" },
70
+ 7: { className: "x10l6tqk x10a8y8t x47corl xqfszdh xbk3nqn xaatb59 x1tjb3dp xknvxwu xox4ge1 xopnk0n x11xz5rz" }
71
+ }[(t === "waiting") << 2 | (t === "resting") << 1 | !!r],
72
+ children: [t === "waiting" && /* @__PURE__ */ S(b, { children: [
73
+ /* @__PURE__ */ x("i", { className: "x10l6tqk x1bjaxh0 x13q6o5s x1y0btm7 xhgr6co xc342km xmwf3kg x1oo2giq x1nhu8zx x14up9od" }),
74
+ /* @__PURE__ */ x("i", { className: "x10l6tqk x1bjaxh0 x13q6o5s x1y0btm7 xhgr6co xc342km xmwf3kg x1oo2giq xetn906 x15guuwl" }),
75
+ /* @__PURE__ */ x("i", { className: "x10l6tqk x1bjaxh0 x13q6o5s x1y0btm7 xhgr6co xc342km x1e3sxgq xppht8 x1nhu8zx x14up9od" }),
76
+ /* @__PURE__ */ x("i", { className: "x10l6tqk x1bjaxh0 x13q6o5s x1y0btm7 xhgr6co xc342km x1e3sxgq xppht8 xetn906 x15guuwl" })
77
+ ] }), /* @__PURE__ */ S("div", {
57
78
  className: "x10l6tqk x1nrll8i xwa60dl x1pu78oe x1p8wexg x1b2v2uc x9f619 xe8ttls x78zum5 xdt5ytf x6s0dn4 xl56j7k x1v2ro7d xb3r6kr x2b8uid xo2rkog",
58
- children: [t === "waiting" ? /* @__PURE__ */ v("svg", {
79
+ children: [t === "resting" ? null : t === "waiting" ? /* @__PURE__ */ x("svg", {
59
80
  "aria-hidden": "true",
60
- dangerouslySetInnerHTML: { __html: i },
81
+ dangerouslySetInnerHTML: { __html: o },
61
82
  fill: "currentColor",
62
- height: N,
63
- viewBox: F,
64
- width: P,
83
+ height: B,
84
+ viewBox: ie,
85
+ width: re,
65
86
  className: "x1lliihq x1vx7kgm"
66
- }) : /* @__PURE__ */ v(a, {
87
+ }) : /* @__PURE__ */ x(s, {
67
88
  decorative: !0,
68
- size: N,
89
+ size: B,
69
90
  variant: r ? "write" : "shiny"
70
- }), /* @__PURE__ */ y("span", {
91
+ }), /* @__PURE__ */ S("span", {
71
92
  className: "x78zum5 xdt5ytf x1jnr06f x193iq5w",
72
- children: [/* @__PURE__ */ v("span", {
93
+ children: [/* @__PURE__ */ x("span", {
73
94
  ...{
74
95
  0: { className: "xb3r6kr xlyipyv xuxw1ft x4z9k3i xk50ysn xd4r4e8 x1bo0w0s" },
75
96
  1: { className: "xb3r6kr xlyipyv xuxw1ft x4z9k3i xk50ysn xd4r4e8 xo2rkog" }
76
97
  }[!!r | 0],
77
98
  children: n
78
- }), /* @__PURE__ */ v("span", {
99
+ }), t !== "resting" && /* @__PURE__ */ x("span", {
79
100
  ...{
80
101
  0: { className: "xb3r6kr xlyipyv xuxw1ft xfifm61 x1d3mw78 xddlp02" },
81
102
  1: { className: "xb3r6kr xlyipyv xuxw1ft xfifm61 x1d3mw78 x1cfw786" }
@@ -86,23 +107,155 @@ function I({ agent: e, state: t, title: n }) {
86
107
  })]
87
108
  });
88
109
  }
110
+ // src/viewer/components/FlowLayer.tsx
111
+ var ae = 1.5, H = 11, oe = 16, U = (e, t) => `max(${e}px, calc(${t}px / var(--zoom, 1)))`, se = { strokeWidth: U(4, ae) }, ce = {
112
+ paddingInline: 16,
113
+ fontSize: U(32, H)
114
+ }, le = {
115
+ paddingInline: 16,
116
+ fontSize: U(28, H),
117
+ boxShadow: `0 0 0 ${U(2, 1)} ${l.colorBorder}`
118
+ }, ue = {
119
+ gap: 16,
120
+ height: 96,
121
+ fontSize: 40,
122
+ boxShadow: `inset 0 0 0 ${U(6, 2)} ${l.colorText}`
123
+ }, de = p(function({ routes: e }) {
124
+ let t = h();
125
+ return /* @__PURE__ */ S("div", {
126
+ "data-flow": !0,
127
+ className: "x10l6tqk xu96u03 x13vifvy xnalus7 xqtp20y",
128
+ style: { pointerEvents: "none" },
129
+ children: [/* @__PURE__ */ S("svg", {
130
+ "aria-hidden": !0,
131
+ height: 1,
132
+ width: 1,
133
+ className: "x10l6tqk xu96u03 x13vifvy x1rea2x4",
134
+ children: [/* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("marker", {
135
+ id: t,
136
+ markerHeight: 5,
137
+ markerWidth: 5,
138
+ orient: "auto",
139
+ refX: 8.6,
140
+ refY: 5,
141
+ viewBox: "0 0 10 10",
142
+ children: /* @__PURE__ */ x("path", {
143
+ d: "M2,1.5 L8.6,5 L2,8.5",
144
+ className: "xbh8q5q xtfjdih x1k315e8 x1owpc8m x1f6yumg"
145
+ })
146
+ }) }), e.map((e) => /* @__PURE__ */ x("path", {
147
+ d: n(e.points, 32),
148
+ "data-edge": e.id,
149
+ markerEnd: `url(#${t})`,
150
+ className: "xbh8q5q xtfjdih",
151
+ style: se
152
+ }, e.id))]
153
+ }), e.map(({ id: e, label: t }) => t && /* @__PURE__ */ x("div", {
154
+ "data-branch": t.branch || void 0,
155
+ "data-edge-label": e,
156
+ title: t.text,
157
+ ...{
158
+ 0: { className: "x10l6tqk x11lhmoz x9f619 xuxw1ft xb3r6kr xlyipyv x37zpob xk50ysn xo2rkog x184qs1t" },
159
+ 1: { className: "x10l6tqk x11lhmoz x9f619 xuxw1ft xb3r6kr xlyipyv x37zpob xk50ysn x1bo0w0s x1rozbrz x1e6avla" }
160
+ }[!!t.branch | 0],
161
+ style: {
162
+ ...t.branch ? le : ce,
163
+ left: t.x,
164
+ top: t.y,
165
+ maxWidth: `calc(${t.room}px - ${oe}px / var(--zoom, 1))`
166
+ },
167
+ children: t.text
168
+ }, e))]
169
+ });
170
+ });
171
+ function fe({ id: e, note: t }) {
172
+ return /* @__PURE__ */ S("div", {
173
+ "data-condition": !0,
174
+ "data-note": e,
175
+ className: "x10l6tqk x9f619 x78zum5 x6s0dn4 xl56j7k x1e6avla xuxw1ft x1s688f xo5v014 xo2rkog x1rozbrz",
176
+ style: {
177
+ ...ue,
178
+ left: t.x,
179
+ top: t.y,
180
+ width: r(t.text)
181
+ },
182
+ children: [/* @__PURE__ */ x("svg", {
183
+ "aria-hidden": !0,
184
+ height: 28,
185
+ viewBox: "0 0 10 10",
186
+ width: 28,
187
+ className: "x2lah0s xbh8q5q xfa2q5v xhxwl1 x1f6yumg",
188
+ children: /* @__PURE__ */ x("path", { d: "M5,0.9 L9.1,5 L5,9.1 L0.9,5 Z" })
189
+ }), t.text]
190
+ });
191
+ }
192
+ // src/viewer/components/CanvasNotes.tsx
193
+ function pe(e) {
194
+ if (!e) return {
195
+ backgroundColor: u.paperWarm,
196
+ color: u.inkWarm
197
+ };
198
+ let t = e.length === 4 ? e.slice(1).split("").map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
199
+ 0,
200
+ 2,
201
+ 4
202
+ ].map((e) => {
203
+ let n = parseInt(t.slice(e, e + 2), 16) / 255;
204
+ return n <= .04045 ? n / 12.92 : ((n + .055) / 1.055) ** 2.4;
205
+ });
206
+ return {
207
+ backgroundColor: e,
208
+ color: .2126 * n + .7152 * r + .0722 * i > .179 ? u.black : u.white
209
+ };
210
+ }
211
+ function me({ notes: e, titleRooms: n, zoom: r }) {
212
+ return e.map(([e, i]) => i.kind === "title" ? /* @__PURE__ */ x("h2", {
213
+ "data-note": e,
214
+ className: "x10l6tqk x1ghz6dp x1xlr1w8 x1uo3zyz xjat59b xo2rkog x1bd091l",
215
+ style: {
216
+ left: i.x,
217
+ top: i.y,
218
+ width: i.w,
219
+ whiteSpace: i.w === void 0 ? "nowrap" : "normal",
220
+ fontSize: i.size ?? 96,
221
+ transform: `scale(${t(i.size ?? 96, r, n?.[e] ?? Infinity)})`
222
+ },
223
+ children: i.text
224
+ }, e) : i.kind === "condition" ? /* @__PURE__ */ x(fe, {
225
+ id: e,
226
+ note: i
227
+ }, e) : /* @__PURE__ */ x("div", {
228
+ "data-note": e,
229
+ className: "x10l6tqk x12oqio5 x126k92a xj0a0fe x1pmbvsm",
230
+ style: {
231
+ left: i.x,
232
+ top: i.y,
233
+ width: i.w ?? 240,
234
+ padding: 16,
235
+ fontSize: 18,
236
+ lineHeight: "27px",
237
+ ...pe(i.color)
238
+ },
239
+ children: i.text
240
+ }, e));
241
+ }
89
242
  // src/viewer/components/CompareSplit.tsx
90
- var L = 5;
91
- function ee({ split: e, onSplit: t }) {
92
- let { t: n } = o(), r = (e) => Math.min(100, Math.max(0, Math.round(e))), i = (e) => {
243
+ var he = 5;
244
+ function ge({ split: e, onSplit: t }) {
245
+ let { t: n } = c(), r = (e) => Math.min(100, Math.max(0, Math.round(e))), i = (e) => {
93
246
  let n = e.currentTarget.parentElement?.getBoundingClientRect();
94
247
  !n || n.width <= 0 || t(r((e.clientX - n.left) / n.width * 100));
95
248
  };
96
- return /* @__PURE__ */ y(_, { children: [
97
- /* @__PURE__ */ v("span", {
249
+ return /* @__PURE__ */ S(b, { children: [
250
+ /* @__PURE__ */ x("span", {
98
251
  className: "x10l6tqk x13vifvy xu96u03 xoegz02 x1gm0aph x1hj3fc7 xm9j1uf x12oqio5 x71mcx3 x8r4el6 x1j6dyjg x1s688f xd4r4e8 x47corl",
99
252
  children: n("verdict.previous")
100
253
  }),
101
- /* @__PURE__ */ v("span", {
254
+ /* @__PURE__ */ x("span", {
102
255
  className: "x10l6tqk x13vifvy x1ey2m1c x1at6vp9 x1c7rsn6 x1l2ivya xavjpbr xzkaem6 x47corl",
103
256
  style: { left: `${e}%` }
104
257
  }),
105
- /* @__PURE__ */ v("button", {
258
+ /* @__PURE__ */ x("button", {
106
259
  className: "x10l6tqk xwa60dl xoegz02 xvy4d1p xxk0z11 x18xomjl x7wgvq7 xrvj5dj x1ku5rj1 x1717udv xc342km x16rqkct x1l2ivya x1twquvy xw0krtf xfifm61 xo5v014 x7eptgl x67bb7w x5ve5x3 x1hax9zg",
107
260
  "aria-label": n("verdict.compare"),
108
261
  "aria-valuemax": 100,
@@ -113,7 +266,7 @@ function ee({ split: e, onSplit: t }) {
113
266
  style: { left: `${e}%` },
114
267
  type: "button",
115
268
  onKeyDown: (n) => {
116
- (n.key === "ArrowLeft" || n.key === "ArrowRight") && (n.preventDefault(), n.stopPropagation(), t(r(e + (n.key === "ArrowLeft" ? -5 : L))));
269
+ (n.key === "ArrowLeft" || n.key === "ArrowRight") && (n.preventDefault(), n.stopPropagation(), t(r(e + (n.key === "ArrowLeft" ? -5 : he))));
117
270
  },
118
271
  onPointerDown: (e) => {
119
272
  e.stopPropagation(), e.currentTarget.setPointerCapture(e.pointerId);
@@ -126,23 +279,23 @@ function ee({ split: e, onSplit: t }) {
126
279
  ] });
127
280
  }
128
281
  // src/viewer/components/VideoPlayer.tsx
129
- var te = 160, R = [
282
+ var _e = 160, W = [
130
283
  1,
131
284
  1.5,
132
285
  2,
133
286
  .5
134
- ], z = (e) => {
287
+ ], G = (e) => {
135
288
  let t = Math.max(0, Math.floor(Number.isFinite(e) ? e : 0));
136
289
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
137
290
  };
138
- function ne({ playing: e }) {
139
- return /* @__PURE__ */ v("svg", {
291
+ function ve({ playing: e }) {
292
+ return /* @__PURE__ */ x("svg", {
140
293
  "aria-hidden": "true",
141
294
  fill: "currentColor",
142
295
  height: "16",
143
296
  viewBox: "0 0 24 24",
144
297
  width: "16",
145
- children: [!1, !0].map((t) => /* @__PURE__ */ v(S.g, {
298
+ children: [!1, !0].map((t) => /* @__PURE__ */ x(T.g, {
146
299
  initial: !1,
147
300
  style: { transformOrigin: "12px 12px" },
148
301
  transition: {
@@ -155,29 +308,29 @@ function ne({ playing: e }) {
155
308
  scale: e === t ? 1 : .25,
156
309
  filter: e === t ? "blur(0px)" : "blur(4px)"
157
310
  },
158
- children: t ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("rect", {
311
+ children: t ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("rect", {
159
312
  height: "16",
160
313
  rx: "1",
161
314
  width: "4",
162
315
  x: "6",
163
316
  y: "4"
164
- }), /* @__PURE__ */ v("rect", {
317
+ }), /* @__PURE__ */ x("rect", {
165
318
  height: "16",
166
319
  rx: "1",
167
320
  width: "4",
168
321
  x: "14",
169
322
  y: "4"
170
- })] }) : /* @__PURE__ */ v("path", { d: "M8 4.6c-.9-.5-2 .1-2 1.1v12.6c0 1 1.1 1.6 2 1.1l11-6.3c.9-.5.9-1.7 0-2.2Z" })
323
+ })] }) : /* @__PURE__ */ x("path", { d: "M8 4.6c-.9-.5-2 .1-2 1.1v12.6c0 1 1.1 1.6 2 1.1l11-6.3c.9-.5.9-1.7 0-2.2Z" })
171
324
  }, String(t)))
172
325
  });
173
326
  }
174
- function B({ src: e, title: t, barScale: n, barWidth: r, onExpand: i, onLoadedData: a }) {
175
- let { t: s } = o(), c = h(null), l = h(null), [u, d] = g(!1), [p, m] = g(0), [S, C] = g(0), [w, T] = g(1), [E, D] = g(!1), [O, k] = g(!1);
176
- f(() => {
177
- let e = c.current;
327
+ function K({ src: e, title: t, barScale: n, barWidth: r, onExpand: i, onLoadedData: a }) {
328
+ let { t: o } = c(), s = v(null), l = v(null), [u, d] = y(!1), [f, p] = y(0), [h, g] = y(0), [_, T] = y(1), [E, D] = y(!1), [O, k] = y(!1);
329
+ m(() => {
330
+ let e = s.current;
178
331
  if (!e) return;
179
332
  let t = () => {
180
- k(!1), m(e.currentTime), C(e.duration), d(!e.paused);
333
+ k(!1), p(e.currentTime), g(e.duration), d(!e.paused);
181
334
  }, n = [
182
335
  "loadedmetadata",
183
336
  "timeupdate",
@@ -193,33 +346,33 @@ function B({ src: e, title: t, barScale: n, barWidth: r, onExpand: i, onLoadedDa
193
346
  };
194
347
  }, []);
195
348
  let A = () => {
196
- let e = c.current;
349
+ let e = s.current;
197
350
  e && (e.paused ? e.play().catch(() => d(!e.paused)) : e.pause());
198
351
  }, j = () => {
199
- let e = R[(R.indexOf(w) + 1) % R.length];
200
- c.current && (c.current.playbackRate = e), T(e);
352
+ let e = W[(W.indexOf(_) + 1) % W.length];
353
+ s.current && (s.current.playbackRate = e), T(e);
201
354
  }, M = () => {
202
- c.current && (c.current.loop = !E), D(!E);
355
+ s.current && (s.current.loop = !E), D(!E);
203
356
  }, N = (e) => {
204
- let t = c.current;
357
+ let t = s.current;
205
358
  if (!t || !Number.isFinite(t.duration) || t.duration <= 0) return;
206
359
  let n = e.currentTarget.getBoundingClientRect();
207
- t.currentTime = Math.min(1, Math.max(0, (e.clientX - n.left) / n.width)) * t.duration, m(t.currentTime);
360
+ t.currentTime = Math.min(1, Math.max(0, (e.clientX - n.left) / n.width)) * t.duration, p(t.currentTime);
208
361
  };
209
- return /* @__PURE__ */ y(_, { children: [
210
- /* @__PURE__ */ v("video", {
362
+ return /* @__PURE__ */ S(b, { children: [
363
+ /* @__PURE__ */ x("video", {
211
364
  muted: !0,
212
365
  playsInline: !0,
213
366
  preload: "metadata",
214
- ref: c,
367
+ ref: s,
215
368
  src: e,
216
369
  title: t,
217
370
  onLoadedData: a,
218
371
  className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d x1lliihq x19kjcj4 x1hpxl24 x47corl"
219
372
  }),
220
- /* @__PURE__ */ v("button", {
373
+ /* @__PURE__ */ x("button", {
221
374
  "data-video-surface": !0,
222
- "aria-label": s(u ? "video.pauseTitle" : "video.playTitle", { title: t }),
375
+ "aria-label": o(u ? "video.pauseTitle" : "video.playTitle", { title: t }),
223
376
  type: "button",
224
377
  onClick: (e) => {
225
378
  (!e.detail || !l.current || Math.hypot(e.clientX - l.current.x, e.clientY - l.current.y) < 4) && A(), l.current = null;
@@ -235,11 +388,11 @@ function B({ src: e, title: t, barScale: n, barWidth: r, onExpand: i, onLoadedDa
235
388
  },
236
389
  className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d x1717udv xc342km xjbqb8w x1ypdohk x1t137rt x9v5kkp x1de99jn x1af67cj x1v57pqu"
237
390
  }),
238
- O && /* @__PURE__ */ v("div", {
391
+ O && /* @__PURE__ */ x("div", {
239
392
  className: "x10l6tqk x10a8y8t xrvj5dj x1ku5rj1 x1tamke2 x193dt0t xyxeb8y xqfszdh x4z9k3i x2b8uid x47corl",
240
- children: s("video.failed")
393
+ children: o("video.failed")
241
394
  }),
242
- r >= te && /* @__PURE__ */ y("div", {
395
+ r >= _e && /* @__PURE__ */ S("div", {
243
396
  "data-chrome": "video-controls",
244
397
  onPointerDown: (e) => e.stopPropagation(),
245
398
  className: "x10l6tqk xu96u03 xdsb8wn xc9qbxq x9f619 x78zum5 x6s0dn4 x1v2ro7d xaope02 x1hj3fc7 x193dt0t x178xt8z x13fuv20 xyky8oz x1fh8tye x1fao0z8 x1j6dyjg x67bb7w xt0e3qv x87ps6o",
@@ -248,26 +401,26 @@ function B({ src: e, title: t, barScale: n, barWidth: r, onExpand: i, onLoadedDa
248
401
  transform: `scale(${n})`
249
402
  },
250
403
  children: [
251
- /* @__PURE__ */ v("button", {
252
- "aria-label": s(u ? "video.pause" : "video.play"),
404
+ /* @__PURE__ */ x("button", {
405
+ "aria-label": o(u ? "video.pause" : "video.play"),
253
406
  type: "button",
254
407
  onClick: A,
255
408
  className: "x2lah0s xrvj5dj x1ku5rj1 x1717udv xc342km xjbqb8w xagcll2 xazlcq2 xjb2p0i x1j6dyjg x1ypdohk",
256
- children: /* @__PURE__ */ v(ne, { playing: u })
409
+ children: /* @__PURE__ */ x(ve, { playing: u })
257
410
  }),
258
- /* @__PURE__ */ y("span", {
411
+ /* @__PURE__ */ S("span", {
259
412
  className: "x2lah0s xss6m8b",
260
413
  children: [
261
- z(p),
414
+ G(f),
262
415
  " / ",
263
- z(S)
416
+ G(h)
264
417
  ]
265
418
  }),
266
- /* @__PURE__ */ y("div", {
267
- "aria-label": s("video.progress"),
268
- "aria-valuemax": Math.round(S || 0),
419
+ /* @__PURE__ */ S("div", {
420
+ "aria-label": o("video.progress"),
421
+ "aria-valuemax": Math.round(h || 0),
269
422
  "aria-valuemin": 0,
270
- "aria-valuenow": Math.round(p),
423
+ "aria-valuenow": Math.round(f),
271
424
  role: "slider",
272
425
  tabIndex: 0,
273
426
  onPointerDown: (e) => {
@@ -277,20 +430,20 @@ function B({ src: e, title: t, barScale: n, barWidth: r, onExpand: i, onLoadedDa
277
430
  e.buttons === 1 && N(e);
278
431
  },
279
432
  className: "x1n2onr6 x98rzlu x1v9usgg x78zum5 x6s0dn4 x1ypdohk",
280
- children: [/* @__PURE__ */ v("span", { className: "x10l6tqk xu96u03 x3m8u43 xuoj239 x1q6ipvf" }), /* @__PURE__ */ v("span", {
433
+ children: [/* @__PURE__ */ x("span", { className: "x10l6tqk xu96u03 x3m8u43 xuoj239 x1q6ipvf" }), /* @__PURE__ */ x("span", {
281
434
  className: "x10l6tqk xu96u03 xuoj239 x1l2ivya",
282
- style: { width: `${S > 0 ? p / S * 100 : 0}%` }
435
+ style: { width: `${h > 0 ? f / h * 100 : 0}%` }
283
436
  })]
284
437
  }),
285
- /* @__PURE__ */ y("button", {
286
- "aria-label": s("video.speed"),
438
+ /* @__PURE__ */ S("button", {
439
+ "aria-label": o("video.speed"),
287
440
  type: "button",
288
441
  onClick: j,
289
442
  className: "x2lah0s xrvj5dj x1ku5rj1 x1717udv xc342km xjbqb8w xagcll2 xazlcq2 xjb2p0i x1j6dyjg x1ypdohk x17s4nb9 x1s688f",
290
- children: [w, "×"]
443
+ children: [_, "×"]
291
444
  }),
292
- /* @__PURE__ */ v("button", {
293
- "aria-label": s("video.loop"),
445
+ /* @__PURE__ */ x("button", {
446
+ "aria-label": o("video.loop"),
294
447
  "aria-pressed": E,
295
448
  type: "button",
296
449
  onClick: M,
@@ -298,22 +451,22 @@ function B({ src: e, title: t, barScale: n, barWidth: r, onExpand: i, onLoadedDa
298
451
  0: { className: "x2lah0s xrvj5dj x1ku5rj1 x1717udv xc342km xjbqb8w xagcll2 xazlcq2 xjb2p0i x1j6dyjg x1ypdohk" },
299
452
  1: { className: "x2lah0s xrvj5dj x1ku5rj1 x1717udv xc342km xjbqb8w xjb2p0i x1j6dyjg x1ypdohk xymxiyj x1p2l8fb" }
300
453
  }[!E | 0],
301
- children: /* @__PURE__ */ v(x, { size: 14 })
454
+ children: /* @__PURE__ */ x(w, { size: 14 })
302
455
  }),
303
- i && /* @__PURE__ */ v("button", {
304
- "aria-label": s("video.expand"),
456
+ i && /* @__PURE__ */ x("button", {
457
+ "aria-label": o("video.expand"),
305
458
  type: "button",
306
459
  onClick: i,
307
460
  className: "x2lah0s xrvj5dj x1ku5rj1 x1717udv xc342km xjbqb8w xagcll2 xazlcq2 xjb2p0i x1j6dyjg x1ypdohk",
308
- children: /* @__PURE__ */ v(b, { size: 13 })
461
+ children: /* @__PURE__ */ x(C, { size: 13 })
309
462
  })
310
463
  ]
311
464
  })
312
465
  ] });
313
466
  }
314
467
  // src/viewer/components/MediaBoard.tsx
315
- var re = (e) => `inset(0 ${100 - e}% 0 0)`;
316
- function ie(e, t, n) {
468
+ var ye = (e) => `inset(0 ${100 - e}% 0 0)`;
469
+ function be(e, t, n) {
317
470
  return t === e.src ? !n && e.previous ? {
318
471
  ...e,
319
472
  previous: null
@@ -323,48 +476,48 @@ function ie(e, t, n) {
323
476
  previous: n && e.loaded === e.src ? e.src : null
324
477
  };
325
478
  }
326
- function V({ id: e, board: t, src: n, zoom: r, compare: i = !1, onExpand: a }) {
327
- let [o, s] = g({
479
+ function q({ id: e, board: t, src: n, zoom: r, compare: i = !1, onExpand: a }) {
480
+ let [o, s] = y({
328
481
  src: n,
329
482
  loaded: null,
330
483
  previous: null
331
- }), [c, l] = g(50), u = ie(o, n, i);
484
+ }), [c, l] = y(50), u = be(o, n, i);
332
485
  u !== o && s(u);
333
486
  let d = (e) => () => s((t) => t.src === e ? {
334
487
  ...t,
335
488
  loaded: e
336
- } : t), f = t.title ?? e, p = (e, n) => t.type === "video" ? /* @__PURE__ */ v(B, {
489
+ } : t), f = t.title ?? e, p = (e, n) => t.type === "video" ? /* @__PURE__ */ x(K, {
337
490
  barScale: 1 / r,
338
491
  barWidth: t.w * r,
339
492
  src: e,
340
493
  title: f,
341
494
  onExpand: n ? a : void 0,
342
495
  onLoadedData: n ? d(e) : void 0
343
- }) : /* @__PURE__ */ v("img", {
496
+ }) : /* @__PURE__ */ x("img", {
344
497
  alt: f,
345
498
  draggable: !1,
346
499
  src: e,
347
500
  onLoad: n ? d(e) : void 0,
348
501
  className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d x1lliihq x19kjcj4 x1l2ivya x47corl"
349
502
  }), m = u.previous;
350
- return /* @__PURE__ */ y("div", {
503
+ return /* @__PURE__ */ S("div", {
351
504
  "data-compare": m ? "" : void 0,
352
505
  className: "x10l6tqk x10a8y8t",
353
- children: [[u.src, m].map((e) => e === null ? null : /* @__PURE__ */ v("div", {
506
+ children: [[u.src, m].map((e) => e === null ? null : /* @__PURE__ */ x("div", {
354
507
  ...{
355
508
  0: { className: "x10l6tqk x10a8y8t" },
356
509
  1: { className: "x10l6tqk x10a8y8t x47corl xhtitgo" }
357
510
  }[e === m | 0],
358
- style: e === m ? { clipPath: re(c) } : void 0,
511
+ style: e === m ? { clipPath: ye(c) } : void 0,
359
512
  children: p(e, e === u.src)
360
- }, e)), m && /* @__PURE__ */ v(ee, {
513
+ }, e)), m && /* @__PURE__ */ x(ge, {
361
514
  split: c,
362
515
  onSplit: l
363
516
  })]
364
517
  });
365
518
  }
366
519
  // src/viewer/components/updated-styles.ts
367
- var H = {
520
+ var J = {
368
521
  slot: {
369
522
  k3XXqK: "xaatb59",
370
523
  kjBf7l: "xu54md5",
@@ -409,50 +562,31 @@ var H = {
409
562
  kWkggS: "x1c2n0v",
410
563
  $$css: !0
411
564
  }
412
- }, U = (e, t) => new Date(e).toLocaleTimeString(t, {
565
+ }, xe = (e, t) => new Date(e).toLocaleTimeString(t, {
413
566
  hour: "2-digit",
414
567
  minute: "2-digit",
415
568
  hour12: !1
416
569
  });
417
570
  // src/viewer/components/UpdatedMarks.tsx
418
- function W() {
419
- let { t: e } = o();
420
- return /* @__PURE__ */ v("span", {
571
+ function Se() {
572
+ let { t: e } = c();
573
+ return /* @__PURE__ */ x("span", {
421
574
  "data-updated-badge": "",
422
- ...n(H.badge),
575
+ ...i(J.badge),
423
576
  children: e("verdict.newBadge")
424
577
  });
425
578
  }
426
- function ae({ update: e }) {
427
- let { t, i18n: r } = o();
428
- return /* @__PURE__ */ y("span", {
579
+ function Ce({ update: e }) {
580
+ let { t, i18n: n } = c();
581
+ return /* @__PURE__ */ S("span", {
429
582
  "data-updated-pill": "",
430
- ...n(H.pill),
431
- children: [/* @__PURE__ */ v("span", { ...n(H.dot) }), t("verdict.updated", {
432
- time: U(e.at, r.language),
583
+ ...i(J.pill),
584
+ children: [/* @__PURE__ */ x("span", { ...i(J.dot) }), t("verdict.updated", {
585
+ time: xe(e.at, n.language),
433
586
  count: e.boards.length
434
587
  })]
435
588
  });
436
589
  }
437
- // src/shared/inspector.ts
438
- var oe = [
439
- "width",
440
- "height",
441
- "position",
442
- "flex-grow",
443
- "display",
444
- "flex-direction",
445
- "align-items",
446
- "gap",
447
- "padding",
448
- "background-color",
449
- "opacity",
450
- "border-radius",
451
- "border-style",
452
- "font-size",
453
- "color",
454
- "box-shadow"
455
- ], G = "#0D99FF", K = "M6.2 3.6C5 2.7 3.4 3.6 3.6 5.1L6 22.7C6.2 24.3 8.2 24.8 9.1 23.5L13 18.3C13.4 17.8 14 17.5 14.6 17.5L21.1 17.3C22.7 17.2 23.4 15.2 22.2 14.3Z", q = "M13 3a9 9 0 0 1 0 18H4.5A1.5 1.5 0 0 1 3 19.5V13A10 10 0 0 1 13 3z", J = (e, t, n) => `url("data:image/svg+xml,${encodeURIComponent(e)}") ${t}, ${n}`, se = J(`<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 28 28'><path d='${K}' fill='none' stroke='white' stroke-width='4' stroke-linejoin='round'/><path d='${K}' fill='${G}'/></svg>`, "3 3", "default"), ce = J(`<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='${q}' fill='none' stroke='white' stroke-width='3' stroke-linejoin='round'/><path d='${q}' fill='${G}'/><path d='M13 8.2v7.6M9.2 12h7.6' stroke='white' stroke-width='2.2' stroke-linecap='round'/></svg>`, "3 21", "crosshair");
456
590
  // src/viewer/lib/cursorMotion.ts
457
591
  function Y(e, t) {
458
592
  let n = e;
@@ -462,7 +596,7 @@ function Y(e, t) {
462
596
  }));
463
597
  return n[0];
464
598
  }
465
- function le(e, t, n) {
599
+ function we(e, t, n) {
466
600
  let r = t.x - e.x, i = t.y - e.y, a = -i, o = r;
467
601
  a < 0 && (a = -a, o = -o);
468
602
  let s = (t, n) => ({
@@ -510,7 +644,7 @@ function le(e, t, n) {
510
644
  }
511
645
  // src/viewer/lib/dragMotion.ts
512
646
  var X = (e) => Math.max(0, Math.min(1, e)), Z = (e) => e * e * (3 - 2 * e);
513
- function ue(e, t, n, r, i) {
647
+ function Te(e, t, n, r, i) {
514
648
  let a = X(n), o = t.x - e.x, s = t.y - e.y, c = Z(a), l = Z(X((a - .11) / .89)), u = o * r * (c - l), d = s * r * (c - l), f = Math.min(1, 12 / (Math.hypot(u, d) || 1)), p = 1 - Z(X(a * 4)), m = u * f + (i?.pullX ?? 0) * p, h = d * f + (i?.pullY ?? 0) * p, g = Math.min(1, 12 / (Math.hypot(m, h) || 1)), _ = a * Math.max(2, Math.ceil(Math.hypot(o, s) * r / 36)) % 1;
515
649
  return {
516
650
  x: e.x + o * c - u * f / r,
@@ -525,59 +659,59 @@ function ue(e, t, n, r, i) {
525
659
  };
526
660
  }
527
661
  // src/viewer/components/Clawd.tsx
528
- var de = "M2 0h12v2h-12zM2 2h2v2h-2zM5 2h6v2h-6zM12 2h2v2h-2zM0 4h16v2h-16zM2 6h12v2h-12z", fe = "M4 2h1v2h-1zM11 2h1v2h-1z", Q = "M3 8h1v2h-1zM5 8h1v2h-1zM10 8h1v2h-1zM12 8h1v2h-1z";
529
- function pe({ fill: e, legs: t }) {
530
- return /* @__PURE__ */ y("svg", {
662
+ var Ee = "M2 0h12v2h-12zM2 2h2v2h-2zM5 2h6v2h-6zM12 2h2v2h-2zM0 4h16v2h-16zM2 6h12v2h-12z", De = "M4 2h1v2h-1zM11 2h1v2h-1z", Oe = "M3 8h1v2h-1zM5 8h1v2h-1zM10 8h1v2h-1zM12 8h1v2h-1z";
663
+ function ke({ fill: e, legs: t }) {
664
+ return /* @__PURE__ */ S("svg", {
531
665
  "aria-hidden": "true",
532
666
  height: "20",
533
667
  viewBox: "0 0 16 10",
534
668
  width: "32",
535
669
  className: "x1lliihq x1rea2x4 xqlk7fu x1so62im x1gh0xk6 x1pao9z2 x1vtvzbl x4hg4is xa4qsjk x1aquc0h",
536
670
  children: [
537
- /* @__PURE__ */ v("path", {
538
- d: de,
671
+ /* @__PURE__ */ x("path", {
672
+ d: Ee,
539
673
  fill: e
540
674
  }),
541
- /* @__PURE__ */ v("path", {
542
- d: Q,
675
+ /* @__PURE__ */ x("path", {
676
+ d: Oe,
543
677
  fill: e,
544
678
  ref: t
545
679
  }),
546
- /* @__PURE__ */ v("path", {
547
- d: fe,
548
- fill: c.black,
680
+ /* @__PURE__ */ x("path", {
681
+ d: De,
682
+ fill: u.black,
549
683
  className: "x1764fhq x1g0ag68 x7w6qa3 x176w33q xa4qsjk x1aquc0h"
550
684
  })
551
685
  ]
552
686
  });
553
687
  }
554
688
  // src/viewer/components/DraggingPet.tsx
555
- var me = "M2 8h1v2h-1zM5 8h1v1h-1zM10 8h1v2h-1zM13 8h1v1h-1z", he = "M3 8h1v1h-1zM6 8h1v2h-1zM9 8h1v1h-1zM12 8h1v2h-1z";
556
- function ge({ fill: e, ref: t }) {
557
- let n = h(null), r = h(null), i = h(null), a = h(null), o = h(null);
558
- return p(t, () => ({ paint({ pullX: e, pullY: t, lift: s, lean: c, step: l, moving: u }) {
689
+ var Ae = "M2 8h1v2h-1zM5 8h1v1h-1zM10 8h1v2h-1zM13 8h1v1h-1z", je = "M3 8h1v1h-1zM6 8h1v2h-1zM9 8h1v1h-1zM12 8h1v2h-1z";
690
+ function Me({ fill: e, ref: t }) {
691
+ let n = v(null), r = v(null), i = v(null), a = v(null), o = v(null);
692
+ return g(t, () => ({ paint({ pullX: e, pullY: t, lift: s, lean: c, step: l, moving: u }) {
559
693
  n.current && (n.current.style.transform = `translate(${e}px, ${t - s}px) skewX(${c}deg)`);
560
694
  let d = 31 + e, f = 8 + t - s, p = `M12.5 14.5 Q${d - 7} ${f + 8} ${d} ${f}`;
561
- i.current?.setAttribute("d", p), a.current?.setAttribute("d", p), r.current?.setAttribute("d", u ? l < .5 ? me : he : Q), o.current && (o.current.style.transform = `translate(${e}px, ${t}px)`);
562
- } }), []), /* @__PURE__ */ y("div", {
695
+ i.current?.setAttribute("d", p), a.current?.setAttribute("d", p), r.current?.setAttribute("d", u ? l < .5 ? Ae : je : Oe), o.current && (o.current.style.transform = `translate(${e}px, ${t}px)`);
696
+ } }), []), /* @__PURE__ */ S("div", {
563
697
  "aria-hidden": "true",
564
698
  style: { color: e },
565
699
  children: [
566
- /* @__PURE__ */ y("svg", {
700
+ /* @__PURE__ */ S("svg", {
567
701
  viewBox: "-40 -40 140 120",
568
702
  className: "x10l6tqk xar8odu x1toy1gi xifkd7f x1wkxgih x1rea2x4",
569
703
  children: [
570
- /* @__PURE__ */ v("path", {
704
+ /* @__PURE__ */ x("path", {
571
705
  d: "M12.5 14.5 Q24 16 31 8",
572
706
  ref: a,
573
707
  className: "xbh8q5q x1nvyj2c x1q82h7f x1owpc8m x1f6yumg"
574
708
  }),
575
- /* @__PURE__ */ v("path", {
709
+ /* @__PURE__ */ x("path", {
576
710
  d: "M12.5 14.5 Q24 16 31 8",
577
711
  ref: i,
578
712
  className: "xbh8q5q x73je2i x1ebhgje x1owpc8m x1f6yumg"
579
713
  }),
580
- /* @__PURE__ */ v("rect", {
714
+ /* @__PURE__ */ x("rect", {
581
715
  height: "4",
582
716
  rx: ".6",
583
717
  width: "4",
@@ -587,15 +721,15 @@ function ge({ fill: e, ref: t }) {
587
721
  })
588
722
  ]
589
723
  }),
590
- /* @__PURE__ */ v("div", {
724
+ /* @__PURE__ */ x("div", {
591
725
  ref: o,
592
726
  className: "x10l6tqk x1l0fap9 xmhk92p xvy4d1p xuoj239 x16rqkct xf6rkd6"
593
727
  }),
594
- /* @__PURE__ */ v("div", {
728
+ /* @__PURE__ */ x("div", {
595
729
  "data-mascot": "clawd",
596
730
  ref: n,
597
731
  className: "x10l6tqk xbnrxzc x1pdr0v7 xqlk7fu x1so62im",
598
- children: /* @__PURE__ */ v(pe, {
732
+ children: /* @__PURE__ */ x(ke, {
599
733
  fill: e,
600
734
  legs: r
601
735
  })
@@ -604,20 +738,20 @@ function ge({ fill: e, ref: t }) {
604
738
  });
605
739
  }
606
740
  // src/viewer/components/WritingCursor.tsx
607
- function _e({ x: e, y: t, zoom: n, agent: r, title: i }) {
608
- let a = u(r), o = a.mascot === "clawd", s = a.icon ? l[a.icon] : null, d = h(null), f = h(null), p = h(null), g = h(null), _ = h(null), b = h(!1), x = h(n), S = (e) => `translate(${e.x}px, ${e.y}px) scale(${1 / x.current})`, C = (e) => `translate(-3.43px, -3.43px) rotate(${e}deg)`, w = (e) => {
609
- _.current = e, d.current && (d.current.style.transform = S(e)), f.current && (f.current.style.transform = C(e.angle));
741
+ function Ne({ x: e, y: t, zoom: n, agent: r, title: i }) {
742
+ let a = f(r), o = a.mascot === "clawd", s = a.icon ? d[a.icon] : null, c = v(null), l = v(null), p = v(null), m = v(null), h = v(null), g = v(!1), y = v(n), b = (e) => `translate(${e.x}px, ${e.y}px) scale(${1 / y.current})`, C = (e) => `translate(-3.43px, -3.43px) rotate(${e}deg)`, w = (e) => {
743
+ h.current = e, c.current && (c.current.style.transform = b(e)), l.current && (l.current.style.transform = C(e.angle));
610
744
  }, T = (e) => {
611
- g.current = e, p.current?.paint(e);
745
+ m.current = e, p.current?.paint(e);
612
746
  };
613
- return m(() => {
614
- x.current = n, _.current && w(_.current);
615
- }), m(() => {
616
- let n = matchMedia("(prefers-reduced-motion: reduce)"), r = _.current, i = 0, a = () => {
617
- cancelAnimationFrame(i), i = 0, b.current = !1, w({
747
+ return _(() => {
748
+ y.current = n, h.current && w(h.current);
749
+ }), _(() => {
750
+ let n = matchMedia("(prefers-reduced-motion: reduce)"), r = h.current, i = 0, a = () => {
751
+ cancelAnimationFrame(i), i = 0, g.current = !1, w({
618
752
  x: e,
619
753
  y: t,
620
- angle: o ? 0 : _.current?.angle ?? 0
754
+ angle: o ? 0 : h.current?.angle ?? 0
621
755
  }), T({
622
756
  pullX: 0,
623
757
  pullY: 0,
@@ -627,13 +761,13 @@ function _e({ x: e, y: t, zoom: n, agent: r, title: i }) {
627
761
  moving: !1
628
762
  });
629
763
  };
630
- !r || n.matches || Math.hypot(e - r.x, t - r.y) * x.current < 2 ? a() : (b.current = !0, i = requestAnimationFrame(o ? ((n) => {
631
- let r = Math.hypot(e - n.x, t - n.y) * x.current, a = Math.max(500, Math.min(1200, r * 3.3)), o = g.current ?? void 0, s = performance.now(), c = (r) => {
632
- let l = Math.min(1, Math.max(0, (r - s) / a)), u = ue(n, {
764
+ !r || n.matches || Math.hypot(e - r.x, t - r.y) * y.current < 2 ? a() : (g.current = !0, i = requestAnimationFrame(o ? ((n) => {
765
+ let r = Math.hypot(e - n.x, t - n.y) * y.current, a = Math.max(500, Math.min(1200, r * 3.3)), o = m.current ?? void 0, s = performance.now(), c = (r) => {
766
+ let l = Math.min(1, Math.max(0, (r - s) / a)), u = Te(n, {
633
767
  x: e,
634
768
  y: t
635
- }, l, x.current, o);
636
- b.current = l < 1, w({
769
+ }, l, y.current, o);
770
+ g.current = l < 1, w({
637
771
  x: u.x,
638
772
  y: u.y,
639
773
  angle: 0
@@ -641,12 +775,12 @@ function _e({ x: e, y: t, zoom: n, agent: r, title: i }) {
641
775
  };
642
776
  return c;
643
777
  })(r) : ((n) => {
644
- let r = le(n, {
778
+ let r = we(n, {
645
779
  x: e,
646
780
  y: t
647
- }, b.current ? n.angle : void 0), a = Math.min(1800, 900 + r.length * x.current * 1.2), o = performance.now(), s = o, c = (e) => {
648
- let t = Math.min(1, Math.max(0, (e - o) / a)), n = r.at(t ** 3 * (t * (t * 6 - 15) + 10)), l = _.current.angle;
649
- n.angle = l + (((n.angle - l) % 360 + 540) % 360 - 180) * (1 - Math.exp(-(e - s) / 80)), s = e, b.current = t < 1, w(n), i = t < 1 ? requestAnimationFrame(c) : 0;
781
+ }, g.current ? n.angle : void 0), a = Math.min(1800, 900 + r.length * y.current * 1.2), o = performance.now(), s = o, c = (e) => {
782
+ let t = Math.min(1, Math.max(0, (e - o) / a)), n = r.at(t ** 3 * (t * (t * 6 - 15) + 10)), l = h.current.angle;
783
+ n.angle = l + (((n.angle - l) % 360 + 540) % 360 - 180) * (1 - Math.exp(-(e - s) / 80)), s = e, g.current = t < 1, w(n), i = t < 1 ? requestAnimationFrame(c) : 0;
650
784
  };
651
785
  return c;
652
786
  })(r)));
@@ -660,56 +794,56 @@ function _e({ x: e, y: t, zoom: n, agent: r, title: i }) {
660
794
  e,
661
795
  t,
662
796
  o
663
- ]), /* @__PURE__ */ y("div", {
797
+ ]), /* @__PURE__ */ S("div", {
664
798
  "aria-label": `${r} last worked on ${i}`,
665
- ref: d,
799
+ ref: c,
666
800
  role: "status",
667
801
  className: "x10l6tqk xu96u03 x13vifvy x1u8a7rm x47corl x1hj3fc7",
668
802
  style: { transform: `translate(${e}px, ${t}px) scale(${1 / n})` },
669
803
  children: [
670
- /* @__PURE__ */ y("svg", {
804
+ /* @__PURE__ */ S("svg", {
671
805
  "aria-hidden": "true",
672
806
  "data-agent-arrow": "",
673
807
  height: "24",
674
- ref: f,
808
+ ref: l,
675
809
  viewBox: "0 0 28 28",
676
810
  width: "24",
677
811
  className: "x1lliihq xqqlr9g x1gtfylx",
678
812
  style: { transform: C(0) },
679
- children: [/* @__PURE__ */ v("path", {
680
- d: K,
813
+ children: [/* @__PURE__ */ x("path", {
814
+ d: O,
681
815
  fill: "none",
682
- stroke: a.pale ? c.ink : c.white,
816
+ stroke: a.pale ? u.ink : u.white,
683
817
  strokeLinejoin: "round",
684
818
  strokeWidth: "4"
685
- }), /* @__PURE__ */ v("path", {
686
- d: K,
819
+ }), /* @__PURE__ */ x("path", {
820
+ d: O,
687
821
  fill: a.color
688
822
  })]
689
823
  }),
690
- o && /* @__PURE__ */ v(ge, {
824
+ o && /* @__PURE__ */ x(Me, {
691
825
  fill: a.color,
692
826
  ref: p
693
827
  }),
694
- !o && /* @__PURE__ */ y("div", {
828
+ !o && /* @__PURE__ */ S("div", {
695
829
  ...{
696
830
  0: { className: "x10l6tqk x1trqr8e xv4lvxq x78zum5 x6s0dn4 x1jnr06f x1w2h69v xaso8d8 x1bjonze xdocmp1 xgs1500 x828b17 x1bqy6mi x1j6dyjg x1s688f x152skdk xuxw1ft xmj57et" },
697
831
  1: { className: "x10l6tqk x1trqr8e xv4lvxq x78zum5 x6s0dn4 x1jnr06f x1w2h69v xaso8d8 x1bjonze xdocmp1 xgs1500 x828b17 x1bqy6mi x1j6dyjg x1s688f x152skdk xuxw1ft xpm4iv0" }
698
832
  }[!!a.pale | 0],
699
833
  style: {
700
834
  backgroundColor: a.color,
701
- color: a.darkInk ? c.ink : c.white
835
+ color: a.darkInk ? u.ink : u.white
702
836
  },
703
- children: [s && /* @__PURE__ */ v(s, {
837
+ children: [s && /* @__PURE__ */ x(s, {
704
838
  "aria-hidden": "true",
705
839
  size: 12
706
- }), /* @__PURE__ */ v("span", { children: r })]
840
+ }), /* @__PURE__ */ x("span", { children: r })]
707
841
  })
708
842
  ]
709
843
  });
710
844
  }
711
845
  // src/viewer/components/Canvas.tsx
712
- var ve = /* @__PURE__ */ e({ Canvas: () => Oe }), $ = {
846
+ var Pe = /* @__PURE__ */ e({ Canvas: () => Ve }), Q = {
713
847
  slot: {
714
848
  kVAEAm: "x10l6tqk",
715
849
  $$css: !0
@@ -723,27 +857,8 @@ var ve = /* @__PURE__ */ e({ Canvas: () => Oe }), $ = {
723
857
  kjBf7l: "x7vaw5c",
724
858
  $$css: !0
725
859
  }
726
- };
727
- function ye(e) {
728
- if (!e) return {
729
- backgroundColor: c.paperWarm,
730
- color: c.inkWarm
731
- };
732
- let t = e.length === 4 ? e.slice(1).split("").map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
733
- 0,
734
- 2,
735
- 4
736
- ].map((e) => {
737
- let n = parseInt(t.slice(e, e + 2), 16) / 255;
738
- return n <= .04045 ? n / 12.92 : ((n + .055) / 1.055) ** 2.4;
739
- });
740
- return {
741
- backgroundColor: e,
742
- color: .2126 * n + .7152 * r + .0722 * i > .179 ? c.black : c.white
743
- };
744
- }
745
- var be = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Set(), Ce = /* @__PURE__ */ new Map();
746
- function we(e, t, n, r = !1) {
860
+ }, Fe = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Set(), Ie = /* @__PURE__ */ new Map();
861
+ function Le(e, t, n, r = !1) {
747
862
  return {
748
863
  left: e.x,
749
864
  top: e.y,
@@ -753,89 +868,96 @@ function we(e, t, n, r = !1) {
753
868
  ...n ? r ? { visibility: "hidden" } : { display: "none" } : {}
754
869
  };
755
870
  }
756
- function Te({ frameLoaded: e, frameRef: t, gesturing: n, id: r, inspecting: i, agent: a, playing: o, sandbox: c, snapshot: l, src: u, title: d }) {
757
- let [f, p] = g(null), m = f !== u, h = !m && !n && (i || o);
758
- return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("iframe", {
871
+ function Re({ frameLoaded: e, frameRef: t, gesturing: n, id: r, inspecting: i, agent: a, playing: o, sandbox: s, snapshot: c, src: u, title: d }) {
872
+ let [f, p] = y(null), m = f !== u, h = !m && !n && (i || o);
873
+ return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("iframe", {
759
874
  ...{
760
875
  0: { className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d x1lliihq xc342km x1l2ivya x1qgsegg xaatb59 x1tjb3dp" },
761
876
  1: { className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d x1lliihq xc342km x1l2ivya xaatb59 x1de99jn x7vaw5c" }
762
877
  }[!!o | 0],
763
878
  ref: t(r),
764
- sandbox: c,
879
+ sandbox: s,
765
880
  src: u,
766
881
  title: d,
767
882
  style: {
768
883
  pointerEvents: h ? "auto" : "none",
769
- backgroundColor: m ? s.colorFillTertiary : void 0
884
+ backgroundColor: m ? l.colorFillTertiary : void 0
770
885
  },
771
886
  onLoad: () => {
772
887
  p(u), e(r);
773
888
  }
774
- }), f === null && !l && /* @__PURE__ */ v(I, {
889
+ }), f === null && !c && /* @__PURE__ */ x(V, {
775
890
  agent: a,
776
891
  state: "opening",
777
892
  title: d
778
893
  })] });
779
894
  }
780
- var Ee = d(function({ active: e, agent: t, boardBase: i, boards: a, boardSandbox: o = "allow-scripts", contentBase: s, culled: c = Se, frameLoaded: l, frameRef: u, gesturing: d = !1, images: f = xe, inspecting: p, pending: m, phases: h = be, playing: g, replays: _, updated: b = Ce, versions: x, writing: S }) {
781
- return a.map(([a, C]) => {
782
- if (r(C)) return null;
783
- let w = b.has(a), T = A(x, C.file) && !m.has(a), E = h.get(a) ?? "mounted", D = f.get(a) ?? null, O = !!D && (E === "unloaded" || E === "restoring"), k = T && (E !== "unloaded" || !D), N = a === S || !T && a === e;
784
- return /* @__PURE__ */ y("div", {
785
- "aria-busy": N || void 0,
786
- "data-board": a,
787
- "data-updated": w || void 0,
788
- ...n($.slot, !T && $.unready, N && $.drawing, w && H.slot),
789
- style: we(C, N, c.has(a), E === "capturing"),
895
+ var ze = p(function({ active: e, agent: t, boardBase: n, boards: r, boardSandbox: o = "allow-scripts", contentBase: s, culled: c = $, distant: l = $, frameLoaded: u, frameRef: d, gesturing: f = !1, images: p = Fe, inspecting: m, pending: h, phases: g, playing: _, replays: v, updated: y = Ie, versions: b, writing: C }) {
896
+ return r.map(([r, w]) => {
897
+ if (a(w)) return null;
898
+ let T = y.has(r), E = L(b, w.file) && !h.has(r), D = g ? g.get(r) ?? "unloaded" : "mounted", O = p.get(r) ?? null, k = !!O && (D === "unloaded" || D === "restoring"), A = E && D !== "unloaded";
899
+ if (!A && (c.has(r) || l.has(r))) return null;
900
+ let j = r === C || !E && r === e;
901
+ return /* @__PURE__ */ S("div", {
902
+ "aria-busy": j || void 0,
903
+ "data-board": r,
904
+ "data-updated": T || void 0,
905
+ ...i(Q.slot, !E && Q.unready, j && Q.drawing, T && J.slot),
906
+ style: Le(w, j, c.has(r), D === "capturing"),
790
907
  children: [
791
- w && /* @__PURE__ */ v(W, {}),
792
- k && /* @__PURE__ */ v(Te, {
908
+ T && /* @__PURE__ */ x(Se, {}),
909
+ A && /* @__PURE__ */ x(Re, {
793
910
  agent: t,
794
- frameLoaded: l,
795
- frameRef: u,
796
- gesturing: d,
797
- id: a,
798
- inspecting: p,
799
- playing: j(C, x) && g.has(a),
911
+ frameLoaded: u,
912
+ frameRef: d,
913
+ gesturing: f,
914
+ id: r,
915
+ inspecting: m,
916
+ playing: R(w, b) && _.has(r),
800
917
  sandbox: o,
801
- snapshot: O,
802
- title: C.title ?? a,
803
- src: M(i ?? s, C.file, x[C.file] ?? 0, _[a] ?? 0)
918
+ snapshot: k,
919
+ title: w.title ?? r,
920
+ src: z(n ?? s, w.file, b[w.file] ?? 0, v[r] ?? 0)
804
921
  }),
805
- O && /* @__PURE__ */ v("img", {
922
+ k && /* @__PURE__ */ x("img", {
806
923
  alt: "",
807
924
  decoding: "async",
808
925
  draggable: !1,
809
- src: D,
810
- className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d x1lliihq x47corl"
926
+ src: O,
927
+ className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d x1lliihq x47corl x1l2ivya x1qgsegg xaatb59 x1tjb3dp"
928
+ }),
929
+ E && !A && !O && /* @__PURE__ */ x(V, {
930
+ agent: t,
931
+ state: "resting",
932
+ title: w.title ?? r
811
933
  }),
812
- !T && /* @__PURE__ */ v(I, {
934
+ !E && /* @__PURE__ */ x(V, {
813
935
  agent: t,
814
- state: N ? "drawing" : "waiting",
815
- title: C.title ?? a
936
+ state: j ? "drawing" : "waiting",
937
+ title: w.title ?? r
816
938
  })
817
939
  ]
818
- }, a);
940
+ }, r);
819
941
  });
820
942
  });
821
- function De({ agent: e, boards: t, contentBase: i, culled: a = Se, pending: o, updated: s = Ce, versions: c, writing: l, zoom: u, onExpand: d }) {
943
+ function Be({ agent: e, boards: t, contentBase: n, culled: r = $, pending: o, updated: s = Ie, versions: c, writing: l, zoom: u, onExpand: d }) {
822
944
  return t.map(([t, f]) => {
823
- if (!r(f)) return null;
824
- let p = s.has(t), m = A(c, f.file) && !o.has(t), h = t === l;
825
- return /* @__PURE__ */ y("div", {
945
+ if (!a(f)) return null;
946
+ let p = s.has(t), m = L(c, f.file) && !o.has(t), h = t === l;
947
+ return /* @__PURE__ */ S("div", {
826
948
  "aria-busy": h || void 0,
827
949
  "data-board": t,
828
950
  "data-updated": p || void 0,
829
- ...n($.slot, !m && $.unready, h && $.drawing, p && H.slot),
830
- style: we(f, h, a.has(t)),
831
- children: [p && /* @__PURE__ */ v(W, {}), m ? /* @__PURE__ */ v(V, {
951
+ ...i(Q.slot, !m && Q.unready, h && Q.drawing, p && J.slot),
952
+ style: Le(f, h, r.has(t)),
953
+ children: [p && /* @__PURE__ */ x(Se, {}), m ? /* @__PURE__ */ x(q, {
832
954
  board: f,
833
955
  compare: s.get(t)?.compare === !0,
834
956
  id: t,
835
- src: M(i, f.file, c[f.file] ?? 0, 0),
957
+ src: z(n, f.file, c[f.file] ?? 0, 0),
836
958
  zoom: u,
837
959
  onExpand: d && (() => d(t))
838
- }) : /* @__PURE__ */ v(I, {
960
+ }) : /* @__PURE__ */ x(V, {
839
961
  agent: e,
840
962
  state: h ? "drawing" : "waiting",
841
963
  title: f.title ?? t
@@ -843,97 +965,78 @@ function De({ agent: e, boards: t, contentBase: i, culled: a = Se, pending: o, u
843
965
  }, t);
844
966
  });
845
967
  }
846
- function Oe({ boardBase: e, boardSandbox: n, view: i, worldRef: a, phases: o, images: s, culled: c, gesturing: l, boards: d, notes: f, titleRooms: p, contentBase: m, versions: h, pending: g, playing: _, replays: b, inspecting: x, frameRef: S, frameLoaded: C, live: w, writing: T, agent: E, agentSessions: k, artifact: A, updated: j, onExpand: M }) {
847
- let N = T;
848
- if (w) {
849
- N = void 0;
968
+ function Ve({ boardBase: e, boardSandbox: t, view: n, worldRef: r, phases: i, images: o, culled: s, distant: c, gesturing: l, boards: u, notes: d, routes: p, titleRooms: m, contentBase: h, versions: g, pending: _, playing: v, replays: y, inspecting: b, frameRef: C, frameLoaded: w, live: T, writing: E, agent: D, agentSessions: O, artifact: k, updated: A, onExpand: j }) {
969
+ let M = E;
970
+ if (T) {
971
+ M = void 0;
850
972
  let e = 0;
851
- for (let [t, n] of d) {
852
- let i = h[n.file] ?? 0;
853
- r(n) || g.has(t) || i <= e || (N = t, e = i);
973
+ for (let [t, n] of u) {
974
+ let r = g[n.file] ?? 0;
975
+ a(n) || _.has(t) || r <= e || (M = t, e = r);
854
976
  }
855
977
  }
856
- let P = (k ?? []).filter((e) => e.state === "thinking" || e.state === "running");
857
- if (w && A && P.some((e) => e.turnArtifacts.includes(A))) {
858
- let e = d.find(([e, t]) => g.has(e) && !r(t));
859
- e && (N = e[0]);
978
+ let N = (O ?? []).filter((e) => e.state === "thinking" || e.state === "running");
979
+ if (T && k && N.some((e) => e.turnArtifacts.includes(k))) {
980
+ let e = u.find(([e, t]) => _.has(e) && !a(t));
981
+ e && (M = e[0]);
860
982
  }
861
- let F = d.find(([e]) => e === N)?.[1], I = O(w && F ? h[F.file] : void 0), L = k?.length ? P.length === 0 : I;
862
- return /* @__PURE__ */ y("div", {
863
- ref: a,
983
+ let P = u.find(([e]) => e === M)?.[1], F = te(T && P ? g[P.file] : void 0), I = O?.length ? N.length === 0 : F;
984
+ return /* @__PURE__ */ S("div", {
985
+ ref: r,
864
986
  className: "x10l6tqk xu96u03 x13vifvy x1hj3fc7",
865
- style: a ? void 0 : {
866
- transform: `translate(${i.x}px, ${i.y}px) scale(${i.k})`,
867
- "--zoom": i.k
987
+ style: r ? void 0 : {
988
+ transform: `translate(${n.x}px, ${n.y}px) scale(${n.k})`,
989
+ "--zoom": n.k
868
990
  },
869
991
  children: [
870
- /* @__PURE__ */ v(Ee, {
871
- active: N,
872
- agent: E ?? "Agent",
992
+ p && p.length > 0 && /* @__PURE__ */ x(de, { routes: p }),
993
+ /* @__PURE__ */ x(ze, {
994
+ active: M,
995
+ agent: D ?? "Agent",
873
996
  boardBase: e,
874
- boardSandbox: n,
875
- boards: d,
876
- contentBase: m,
877
- culled: c,
878
- frameLoaded: C,
879
- frameRef: S,
997
+ boardSandbox: t,
998
+ boards: u,
999
+ contentBase: h,
1000
+ culled: s,
1001
+ distant: c,
1002
+ frameLoaded: w,
1003
+ frameRef: C,
880
1004
  gesturing: l,
881
- images: s,
882
- inspecting: x,
883
- pending: g,
884
- phases: o,
885
- playing: _,
886
- replays: b,
887
- updated: j,
888
- versions: h,
889
- writing: T,
890
- onExpand: M
1005
+ images: o,
1006
+ inspecting: b,
1007
+ pending: _,
1008
+ phases: i,
1009
+ playing: v,
1010
+ replays: y,
1011
+ updated: A,
1012
+ versions: g,
1013
+ writing: E,
1014
+ onExpand: j
891
1015
  }),
892
- /* @__PURE__ */ v(De, {
893
- agent: E ?? "Agent",
894
- boards: d,
895
- contentBase: m,
896
- culled: c,
897
- pending: g,
898
- updated: j,
899
- versions: h,
900
- writing: T,
901
- zoom: i.k,
902
- onExpand: M
1016
+ /* @__PURE__ */ x(Be, {
1017
+ agent: D ?? "Agent",
1018
+ boards: u,
1019
+ contentBase: h,
1020
+ culled: s,
1021
+ pending: _,
1022
+ updated: A,
1023
+ versions: g,
1024
+ writing: E,
1025
+ zoom: n.k,
1026
+ onExpand: j
903
1027
  }),
904
- f.map(([e, n]) => n.kind === "title" ? /* @__PURE__ */ v("h2", {
905
- "data-note": e,
906
- className: "x10l6tqk x1ghz6dp x1xlr1w8 x1uo3zyz xjat59b xo2rkog x1bd091l",
907
- style: {
908
- left: n.x,
909
- top: n.y,
910
- width: n.w,
911
- whiteSpace: n.w === void 0 ? "nowrap" : "normal",
912
- fontSize: n.size ?? 96,
913
- transform: `scale(${t(n.size ?? 96, i.k, p?.[e] ?? Infinity)})`
914
- },
915
- children: n.text
916
- }, e) : /* @__PURE__ */ v("div", {
917
- "data-note": e,
918
- className: "x10l6tqk x12oqio5 x126k92a xj0a0fe x1pmbvsm",
919
- style: {
920
- left: n.x,
921
- top: n.y,
922
- width: n.w ?? 240,
923
- padding: 16,
924
- fontSize: 18,
925
- lineHeight: "27px",
926
- ...ye(n.color)
927
- },
928
- children: n.text
929
- }, e)),
930
- F && /* @__PURE__ */ v(_e, {
931
- agent: E ?? "Agent",
932
- title: F.title ?? N,
933
- ...D(F, L, u(E ?? "Agent").mascot ? 72 / i.k : void 0),
934
- zoom: i.k
1028
+ /* @__PURE__ */ x(me, {
1029
+ notes: d,
1030
+ titleRooms: m,
1031
+ zoom: n.k
1032
+ }),
1033
+ P && /* @__PURE__ */ x(Ne, {
1034
+ agent: D ?? "Agent",
1035
+ title: P.title ?? M,
1036
+ ...ee(P, I, f(D ?? "Agent").mascot ? 72 / n.k : void 0),
1037
+ zoom: n.k
935
1038
  })
936
1039
  ]
937
1040
  });
938
1041
  }
939
- export { se as a, V as c, j as d, k as f, oe as i, B as l, ve as n, ae as o, ce as r, U as s, Oe as t, A as u };
1042
+ export { q as a, R as c, E as d, j as f, xe as i, ne as l, Pe as n, K as o, Ce as r, L as s, Ve as t, M as u };