ryugi-artifacts 1.46.1 → 1.46.2

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.
@@ -1,7 +1,7 @@
1
1
  import './stylex-BSses9Gv.css';
2
2
  import './index-BXY_GxfK.css';
3
3
  import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, i as m, j as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "./PreviewView-GBTMLPwK.js";
4
- import { $ as A, At as ee, Ct as te, Dt as j, Et as ne, Ft as M, H as re, It as ie, Mt as ae, Nt as oe, Ot as N, P, Pt as F, Q as se, R as I, S as L, St as R, Tt as ce, U as z, W as B, X as le, Y as V, _t as ue, a as de, at as H, bt as fe, dt as pe, f as U, ft as W, gt as me, ht as he, i as ge, it as G, jt as _e, kt as ve, l as ye, lt as be, m as xe, mt as Se, n as Ce, ot as we, q as Te, r as Ee, rt as De, s as Oe, st as ke, t as Ae, tt as je, vt as Me, wt as Ne, x as Pe, xt as Fe, y as Ie, yt as Le } from "./motion-Afdcelno.js";
4
+ import { $ as A, At as ee, Ct as te, Dt as j, Et as ne, Ft as M, H as re, It as ie, Mt as ae, Nt as oe, Ot as N, P, Pt as F, Q as se, R as I, S as L, St as R, Tt as ce, U as z, W as B, X as V, Y as H, _t as le, a as ue, at as U, bt as de, dt as fe, f as W, ft as pe, gt as G, ht as me, i as he, it as ge, jt as _e, kt as ve, l as ye, lt as be, m as xe, mt as Se, n as Ce, ot as we, q as Te, r as Ee, rt as De, s as Oe, st as ke, t as Ae, tt as je, vt as Me, wt as Ne, x as Pe, xt as Fe, y as Ie, yt as Le } from "./motion-Afdcelno.js";
5
5
  import { a as Re, c as ze, d as Be, f as Ve, i as K, l as He, m as Ue, n as We, o as Ge, p as Ke, r as qe, s as Je, t as Ye, u as Xe } from "./i18n-BlVs6bq9.js";
6
6
  import { a as Ze, c as Qe, d as $e, f as et, g as tt, h as nt, l as rt, m as it, n as at, o as ot, p as st, t as ct, u as lt } from "./WarningsBadge-D0vha3oc.js";
7
7
  import { a as ut, i as dt, o as ft, r as pt, s as mt, t as ht } from "./Canvas-doIivnWr.js";
@@ -801,7 +801,7 @@ function Nr({ view: e, page: t, boards: n, width: r, height: i, threads: a, stal
801
801
  className: "x78zum5 x6s0dn4 x17d4w8g x889kno xqin4a2 x1j6dyjg xddlp02 xb3r6kr xuxw1ft xlyipyv",
802
802
  children: g("comments.anchoredTo", { label: br(l) })
803
803
  }),
804
- /* @__PURE__ */ Q(pe, {
804
+ /* @__PURE__ */ Q(fe, {
805
805
  autoFocus: !0,
806
806
  placeholder: g("comments.addPlaceholder"),
807
807
  onCancel: h,
@@ -4664,8 +4664,8 @@ function El(e, t, n, r, i, a) {
4664
4664
  function Dl(e, t, n, r, i, a = !1) {
4665
4665
  let { widths: o, segmentFlags: s, breakableFitAdvances: c, discretionaryHyphenWidth: l, letterSpacing: u, lineStartExtras: d, lineEndTrims: f, overflowLineEndTrims: p, tabStopAdvance: m, minimumTabAdvance: h } = e, g = o.length, _ = e.items, v = _ === void 0 ? null : _.hyphenWidths, y = _ === void 0 ? null : _.hyphenRooms, b = _ === void 0 ? null : _.itemEndHalts, x = _ === void 0 ? null : _.insideExtras, S = _ === void 0 ? null : _.fillExtras, C = _ === void 0 ? null : _.openingEdges, w = _ === void 0 ? null : _.emptyObjectSpaces, T = _ === void 0 ? null : _.emptyObjectReturns, E = Zs(), D = 16 | (E.hangTabs ? 32 : 0), O = _ !== void 0 && E.hangsSpacesPerTextFrame, k = E.testsHyphenBeforeAtomic, A = E.zeroWidthGlueTakesLine, ee = E.tabsInAppUnits, te = E.paddedOpeningFit, j = E.hardBreakItemRetreat, ne = Math.max(0, n), M = ne + E.lineFitEpsilon, re = e.discretionaryHyphenContexts !== null, ie = E.unfitHyphenRetreat === "reduced-width", ae = ie ? l : 0, oe = re && E.unfitHyphenRetreat === "full-width-or-first", N = E.unfitHyphenRetreat === "full-width", P = null;
4666
4666
  for (;;) {
4667
- let n = t.segmentIndex, E = t.graphemeIndex, F = 0, se = !1, I = n, L = E, R = -1, ce = 0, z = -1, B = 0, le = -1, V = 0, ue = !1, de = 0, H = 0, fe = !0, pe = !1, U = -1, W = 0, me = 0, he = !1, ge = null;
4668
- if ((s[n] & 15) == 8) t.segmentIndex = n + 1, t.graphemeIndex = 0, ge = d === null ? 0 : d[n];
4667
+ let n = t.segmentIndex, E = t.graphemeIndex, F = 0, se = !1, I = n, L = E, R = -1, ce = 0, z = -1, B = 0, V = -1, H = 0, le = !1, ue = 0, U = 0, de = !0, fe = !1, W = -1, pe = 0, G = 0, me = !1, he = null;
4668
+ if ((s[n] & 15) == 8) t.segmentIndex = n + 1, t.graphemeIndex = 0, he = d === null ? 0 : d[n];
4669
4669
  else {
4670
4670
  decided: {
4671
4671
  let t;
@@ -4679,59 +4679,59 @@ function Dl(e, t, n, r, i, a = !1) {
4679
4679
  t = r + 1;
4680
4680
  break;
4681
4681
  }
4682
- let ge = !!(N & 16), G = !!(1 << P & hl), _e = r === n ? E : 0, ve = u !== 0 && se && !fe && !pe ? u : 0, ye = 0;
4683
- u !== 0 && (ge || P === 7 || P === 5 || P === 9 || C !== null && C[r] !== 0) && (ye = ve, pe = !ge), P !== 2 && P !== 6 && (fe = !1);
4682
+ let he = !!(N & 16), ge = !!(1 << P & hl), _e = r === n ? E : 0, ve = u !== 0 && se && !de && !fe ? u : 0, ye = 0;
4683
+ u !== 0 && (he || P === 7 || P === 5 || P === 9 || C !== null && C[r] !== 0) && (ye = ve, fe = !he), P !== 2 && P !== 6 && (de = !1);
4684
4684
  let be = P === 5 ? _ === void 0 ? yl(F + ye, m, h, ee) : bl(e, _, r, se ? F + ye : d === null ? 0 : d[r], ee) : o[r], xe = ye + be, Se = f === null ? 0 : f[r];
4685
4685
  if (P === 3 && _e === 0) {
4686
4686
  if (se) {
4687
4687
  let e = l, t = !0;
4688
- _ !== void 0 && (re && r > n && (s[r - 1] & 15) == 9 && (z = r, B = F), O && le === r && (le = r + 1, V = Math.max(V, Math.min(F, ne))), v !== null && (e = v[r]), t = k || r + 1 === g || (s[r + 1] & 15) != 9 || C !== null && C[r + 1] !== 0), I = r + 1, L = 0, r + 1 < g && (s[r + 1] & 15) != 8 && (R = r + 1, ce = F + e, re && ((t ? ce : F) <= M || oe && z < 0) && (z = R, B = ce));
4688
+ _ !== void 0 && (re && r > n && (s[r - 1] & 15) == 9 && (z = r, B = F), O && V === r && (V = r + 1, H = Math.max(H, Math.min(F, ne))), v !== null && (e = v[r]), t = k || r + 1 === g || (s[r + 1] & 15) != 9 || C !== null && C[r + 1] !== 0), I = r + 1, L = 0, r + 1 < g && (s[r + 1] & 15) != 8 && (R = r + 1, ce = F + e, re && ((t ? ce : F) <= M || oe && z < 0) && (z = R, B = ce));
4689
4689
  }
4690
4690
  continue;
4691
4691
  }
4692
4692
  let Ce = 0;
4693
- if (u !== 0 && !ge && !G && P !== 7) Ce = ve + be;
4694
- else if (G ? P === 5 : be !== 0 || P === 7) {
4695
- let e = be + (ge ? u : 0);
4693
+ if (u !== 0 && !he && !ge && P !== 7) Ce = ve + be;
4694
+ else if (ge ? P === 5 : be !== 0 || P === 7) {
4695
+ let e = be + (he ? u : 0);
4696
4696
  e !== 0 && (Ce = ye + e);
4697
4697
  }
4698
4698
  let we = !!(1 << P & D);
4699
- if (O && P === 2 && le === r && (we = !0), we && (le !== r && (V = F - H + ye, ue = !1, _ !== void 0 && r > n && (s[r - 1] & 15) == 9 && (ue = Tl(s, g, r, D), ue || (R = r, ce = F - H)), de = 0), le = r + 1, C !== null && (V += C[r], de += C[r])), !se && P === 6 && !A) {
4699
+ if (O && P === 2 && V === r && (we = !0), we && (V !== r && (H = F - U + ye, le = !1, _ !== void 0 && r > n && (s[r - 1] & 15) == 9 && (le = Tl(s, g, r, D), le || (R = r, ce = F - U)), ue = 0), V = r + 1, C !== null && (H += C[r], ue += C[r])), !se && P === 6 && !A) {
4700
4700
  I = r + 1, L = 0;
4701
4701
  continue;
4702
4702
  }
4703
4703
  if (se) {
4704
- let e = we ? V - de : F + Ce, t = e - Se > M;
4704
+ let e = we ? H - ue : F + Ce, t = e - Se > M;
4705
4705
  if (_ !== void 0) {
4706
4706
  let n = !1;
4707
4707
  if (w !== null && P === 9 && be === 0 && e > M) {
4708
- let e = le === r ? V : F, t = w[r];
4708
+ let e = V === r ? H : F, t = w[r];
4709
4709
  n = e <= M || !(t >= 0 && e - t > M || T[r] === 1);
4710
4710
  }
4711
- let i = Ce < 0 && F - H > M;
4712
- t = (t || i) && !(we && ue) && !n, O && !t && le === r && P === 9 && be === 0 && (le = r + 1, V = Math.max(V, Math.min(F + xe, ne)));
4711
+ let i = Ce < 0 && F - U > M;
4712
+ t = (t || i) && !(we && le) && !n, O && !t && V === r && P === 9 && be === 0 && (V = r + 1, H = Math.max(H, Math.min(F + xe, ne)));
4713
4713
  }
4714
4714
  if (t) {
4715
- let t = F - H;
4716
- if (G && (we || P !== 5) && (t <= M || R < 0 && (P === 1 || P === 2) || P === 2 && (s[r - 1] & 15) == 9)) {
4717
- me = we ? V : t, F += xe, U = r + 1, W = 0;
4715
+ let t = F - U;
4716
+ if (ge && (we || P !== 5) && (t <= M || R < 0 && (P === 1 || P === 2) || P === 2 && (s[r - 1] & 15) == 9)) {
4717
+ G = we ? H : t, F += xe, W = r + 1, pe = 0;
4718
4718
  break decided;
4719
4719
  }
4720
4720
  if (P === 5 && !we && R < 0) {
4721
- U = r, W = 0, me = le === r && r > n ? V : t;
4721
+ W = r, pe = 0, G = V === r && r > n ? H : t;
4722
4722
  break decided;
4723
4723
  }
4724
4724
  let l = !!(N & 32);
4725
- if (P === 9 && l && le === r && (te === "start" ? V - de / 2 <= M && F - de / 2 > M : te === "placed" && V - de + be - Se <= M)) {
4726
- le = r + 1, V += be, de += be, F += xe, I = r + 1, L = 0;
4725
+ if (P === 9 && l && V === r && (te === "start" ? H - ue / 2 <= M && F - ue / 2 > M : te === "placed" && H - ue + be - Se <= M)) {
4726
+ V = r + 1, H += be, ue += be, F += xe, I = r + 1, L = 0;
4727
4727
  continue;
4728
4728
  }
4729
4729
  if (l && R >= 0 && (I = R, L = 0), !l || R >= 0) {
4730
- he = !0;
4730
+ me = !0;
4731
4731
  break decided;
4732
4732
  }
4733
4733
  if (p !== null && e - p[r] <= M) {
4734
- F += xe, I = r + 1, L = 0, H = p[r], b !== null && b[r] !== 0 && (F -= H, H = 0);
4734
+ F += xe, I = r + 1, L = 0, U = p[r], b !== null && b[r] !== 0 && (F -= U, U = 0);
4735
4735
  continue;
4736
4736
  }
4737
4737
  if (P === 9 && j !== "item" && r + 1 < g && (s[r + 1] & 15) == 8) {
@@ -4739,31 +4739,31 @@ function Dl(e, t, n, r, i, a = !1) {
4739
4739
  if (i !== null) {
4740
4740
  let e = i.length, t = i[0], a = j !== "fit" || F <= M ? 1 : t > 0 ? Math.min(e, Math.ceil((F - M) / t)) : e, o = C !== null && C[n] !== 0 ? n + 1 : n;
4741
4741
  if (r - 1 > o || e - a > E) {
4742
- U = r - 1, W = e - a, me = V;
4742
+ W = r - 1, pe = e - a, G = H;
4743
4743
  break decided;
4744
4744
  }
4745
4745
  }
4746
4746
  let a = t === 0 || t === 7 ? c[r - 1] : null, l = e & 16 ? u : 0;
4747
4747
  if (a !== null && (r - 1 > n || a.length - 1 > E)) {
4748
- U = r - 1, W = a.length - 1, me = F - a[W] - l;
4748
+ W = r - 1, pe = a.length - 1, G = F - a[pe] - l;
4749
4749
  break decided;
4750
4750
  }
4751
4751
  if (a === null && (t === 0 || t === 7) && r - 1 > n) {
4752
- U = r - 1, W = 0, me = F - o[r - 1] - l;
4752
+ W = r - 1, pe = 0, G = F - o[r - 1] - l;
4753
4753
  break decided;
4754
4754
  }
4755
4755
  if (i !== null || t !== 4 && t !== 5) {
4756
- F += xe, I = r + 1, L = 0, H = 0;
4756
+ F += xe, I = r + 1, L = 0, U = 0;
4757
4757
  continue;
4758
4758
  }
4759
4759
  }
4760
4760
  if (c[r] === null) {
4761
- he = !0;
4761
+ me = !0;
4762
4762
  break decided;
4763
4763
  }
4764
4764
  i = 0, a = ye;
4765
4765
  } else {
4766
- N & 64 && !G && R !== r && (R = r, ce = F), re && !G && !(N & 32) && r > n && !gl(s[r - 1] & 15) && (!ie || F + (y === null ? l : y[r]) <= M) && (z = r, B = F), I = r + 1, L = 0, b !== null && e > M && b[r] !== 0 ? (F += xe - Se, H = 0) : (F += xe, Ce !== 0 && !we && (H = e > M && P !== 9 ? Se : 0)), G && (r + 1 === g || !(s[r + 1] & 32)) && (R = r + 1, ce = we ? V : P === 5 ? F : F - xe - H), re && G && ce + (y === null || R < 0 ? ae : y[R]) <= M && (z = R, B = ce);
4766
+ N & 64 && !ge && R !== r && (R = r, ce = F), re && !ge && !(N & 32) && r > n && !gl(s[r - 1] & 15) && (!ie || F + (y === null ? l : y[r]) <= M) && (z = r, B = F), I = r + 1, L = 0, b !== null && e > M && b[r] !== 0 ? (F += xe - Se, U = 0) : (F += xe, Ce !== 0 && !we && (U = e > M && P !== 9 ? Se : 0)), ge && (r + 1 === g || !(s[r + 1] & 32)) && (R = r + 1, ce = we ? H : P === 5 ? F : F - xe - U), re && ge && ce + (y === null || R < 0 ? ae : y[R]) <= M && (z = R, B = ce);
4767
4767
  continue;
4768
4768
  }
4769
4769
  } else if (_e > 0) i = _e;
@@ -4771,7 +4771,7 @@ function Dl(e, t, n, r, i, a = !1) {
4771
4771
  let e = d === null ? 0 : d[r], t = p !== null && Ce + e - p[r] <= M ? p[r] : Se;
4772
4772
  if (Ce + e - t > M && c[r] !== null && !we) i = 0;
4773
4773
  else {
4774
- se = !0, I = r + 1, L = 0, F = be + e, we && (V += e), H = Ce + e > M && P !== 9 ? t : 0, b !== null && H !== 0 && b[r] !== 0 && (F -= H, H = 0), G && (r + 1 === g || !(s[r + 1] & 32)) && (R = r + 1, ce = we ? V : P === 5 ? F : F - xe), re && G && ce + (y === null || R < 0 ? ae : y[R]) <= M && (z = R, B = ce);
4774
+ se = !0, I = r + 1, L = 0, F = be + e, we && (H += e), U = Ce + e > M && P !== 9 ? t : 0, b !== null && U !== 0 && b[r] !== 0 && (F -= U, U = 0), ge && (r + 1 === g || !(s[r + 1] & 32)) && (R = r + 1, ce = we ? H : P === 5 ? F : F - xe), re && ge && ce + (y === null || R < 0 ? ae : y[R]) <= M && (z = R, B = ce);
4775
4775
  continue;
4776
4776
  }
4777
4777
  }
@@ -4790,15 +4790,15 @@ function Dl(e, t, n, r, i, a = !1) {
4790
4790
  }
4791
4791
  se && I === r && L === Ee && (I = r + 1, L = 0);
4792
4792
  }
4793
- U = t, W = 0, R === t && L === 0 ? (me = ce, he = !0) : me = F - H;
4793
+ W = t, pe = 0, R === t && L === 0 ? (G = ce, me = !0) : G = F - U;
4794
4794
  }
4795
4795
  if (se) {
4796
- he && z >= 0 && R === I && L === 0 && El(e, n, I, ce, M, N) ? (U = z, W = 0, me = B) : U < 0 && (U = I, W = L, me = R === I && L === 0 ? ce : _ !== void 0 && le === I && L === 0 ? V : F - H), t.segmentIndex = U, t.graphemeIndex = W;
4797
- let r = W === 0 && le >= 0 && (U === le || U === le + 1) && (le === g || (s[le] & 15) == 8), i = (r ? F - H : me) + xl(e, C, D, n, E, U, W);
4798
- ge = r ? Math.max(V, Math.min(i, ne)) : i;
4796
+ me && z >= 0 && R === I && L === 0 && El(e, n, I, ce, M, N) ? (W = z, pe = 0, G = B) : W < 0 && (W = I, pe = L, G = R === I && L === 0 ? ce : _ !== void 0 && V === I && L === 0 ? H : F - U), t.segmentIndex = W, t.graphemeIndex = pe;
4797
+ let r = pe === 0 && V >= 0 && (W === V || W === V + 1) && (V === g || (s[V] & 15) == 8), i = (r ? F - U : G) + xl(e, C, D, n, E, W, pe);
4798
+ he = r ? Math.max(H, Math.min(i, ne)) : i;
4799
4799
  }
4800
4800
  }
4801
- if (ge === null || (P = ge, i !== null && (i.lineCount++, ge > i.maxLineWidth && (i.maxLineWidth = ge)), r?.(ge, n, E, t.segmentIndex, t.graphemeIndex), a || !Cl(e, t))) break;
4801
+ if (he === null || (P = he, i !== null && (i.lineCount++, he > i.maxLineWidth && (i.maxLineWidth = he)), r?.(he, n, E, t.segmentIndex, t.graphemeIndex), a || !Cl(e, t))) break;
4802
4802
  }
4803
4803
  return P;
4804
4804
  }
@@ -5351,48 +5351,32 @@ function Jl({ actions: e, live: t, warnings: n, zoom: r, onZoomIn: i, onZoomOut:
5351
5351
  }
5352
5352
  //#endregion
5353
5353
  //#region src/viewer/hooks/useArtboardPage.ts
5354
- function Yl({ canvas: e, layout: t, fitPage: n, fitFocus: r, startAtFocus: i = !1 }) {
5355
- let [a, o] = Z(null), s = X(void 0), c = X(void 0), l = X(null), u = X(!1), [d, f] = lr(), p = X(d), m = J((e, t = !0) => {
5356
- o(e), l.current = e, p.current = e, f(e, t);
5357
- }, [f]);
5354
+ function Yl({ canvas: e, layout: t, fitPage: n, startAtFocus: r = !1 }) {
5355
+ let [i, a] = Z(null), o = X(null), s = X(!1), [c, l] = lr(), u = X(c), d = J((e, t = !0) => {
5356
+ a(e), o.current = e, u.current = e, l(e, t);
5357
+ }, [l]);
5358
5358
  return Y(() => {
5359
5359
  if (!e || !t) return;
5360
- let n = e.pages[0]?.id ?? null, h = (t) => t && e.pages.some((e) => e.id === t) ? t : null;
5361
- if (!u.current) {
5362
- u.current = !0, s.current = e.activePage, c.current = e.focus?.at;
5363
- let r = i && e.focus ? v(e, t, e.focus.target)?.page : void 0, a = h(d) ?? (d === null ? h(r) ?? h(e.activePage) ?? n : n);
5364
- m(a);
5365
- return;
5366
- }
5367
- if (d !== p.current) {
5368
- c.current = e.focus?.at, s.current = e.activePage, m(h(d) ?? n);
5369
- return;
5370
- }
5371
- let g = e.focus;
5372
- if (g && g.at !== c.current) {
5373
- c.current = g.at, s.current = e.activePage;
5374
- let n = v(e, t, g.target);
5375
- if (n) {
5376
- o(n.page), l.current = null, p.current = n.page, f(n.page, !0), r(g.target, n);
5377
- return;
5378
- }
5360
+ let n = e.pages[0]?.id ?? null, a = (t) => t && e.pages.some((e) => e.id === t) ? t : null;
5361
+ if (s.current) c === u.current ? (!i || !e.pages.some((e) => e.id === i)) && d(n) : d(a(c) ?? n);
5362
+ else {
5363
+ s.current = !0;
5364
+ let i = r && e.focus ? v(e, t, e.focus.target)?.page : void 0, o = a(c) ?? (c === null ? a(i) ?? a(e.activePage) ?? n : n);
5365
+ d(o);
5379
5366
  }
5380
- e.activePage !== s.current && (s.current = e.activePage, e.activePage) ? m(h(e.activePage) ?? n) : (!a || !e.pages.some((e) => e.id === a)) && m(n);
5381
5367
  }, [
5382
5368
  e,
5383
5369
  t,
5384
- r,
5385
- a,
5386
5370
  i,
5387
- d,
5388
- m,
5389
- f
5371
+ r,
5372
+ c,
5373
+ d
5390
5374
  ]), Y(() => {
5391
- l.current !== null && l.current === a && n(a) && (l.current = null);
5375
+ o.current !== null && o.current === i && n(i) && (o.current = null);
5392
5376
  }), {
5393
- page: a,
5377
+ page: i,
5394
5378
  changePage: (t) => {
5395
- e?.pages.some((e) => e.id === t) && m(t, !1);
5379
+ e?.pages.some((e) => e.id === t) && d(t, !1);
5396
5380
  }
5397
5381
  };
5398
5382
  }
@@ -5799,22 +5783,22 @@ function bu({ artifact: t, boards: n, versions: r, pending: i, view: a, scaling:
5799
5783
  let { [e]: r, ...i } = n;
5800
5784
  return i;
5801
5785
  }));
5802
- }, []), le = yt(() => new Map(n.map(([e, t]) => [e, `data:image/svg+xml;charset=utf-8,${encodeURIComponent(nu({
5786
+ }, []), V = yt(() => new Map(n.map(([e, t]) => [e, `data:image/svg+xml;charset=utf-8,${encodeURIComponent(nu({
5803
5787
  id: e,
5804
5788
  title: t.title,
5805
5789
  w: t.w,
5806
5790
  h: t.h
5807
- }))}`])), [n]), V = X([]), ue = X(/* @__PURE__ */ new Map()), de = X(0), H = J(() => {
5808
- if (!j.current) for (; ue.current.size < gu && V.current.length;) {
5809
- let e = V.current.shift();
5810
- if (ue.current.has(e)) continue;
5791
+ }))}`])), [n]), H = X([]), le = X(/* @__PURE__ */ new Map()), ue = X(0), U = J(() => {
5792
+ if (!j.current) for (; le.current.size < gu && H.current.length;) {
5793
+ let e = H.current.shift();
5794
+ if (le.current.has(e)) continue;
5811
5795
  let t = T.current.get(e)?.contentWindow, n = ee.current.get(e);
5812
5796
  if (!t || !n || h.isUnsupported(n)) continue;
5813
- let r = ++de.current, i = window.setTimeout(() => {
5814
- let t = ue.current.get(e);
5815
- t && t.request === r && (ue.current.delete(e), _.current.add(n), D.current.add(e), g(), H());
5797
+ let r = ++ue.current, i = window.setTimeout(() => {
5798
+ let t = le.current.get(e);
5799
+ t && t.request === r && (le.current.delete(e), _.current.add(n), D.current.add(e), g(), U());
5816
5800
  }, hu);
5817
- ue.current.set(e, {
5801
+ le.current.set(e, {
5818
5802
  key: n,
5819
5803
  request: r,
5820
5804
  timer: i
@@ -5824,15 +5808,15 @@ function bu({ artifact: t, boards: n, versions: r, pending: i, view: a, scaling:
5824
5808
  scale: C
5825
5809
  }, "*");
5826
5810
  }
5827
- }, [h, C]), fe = X(H);
5828
- fe.current = H, Y(() => {
5829
- o || H();
5830
- }, [o, H]), Y(() => () => {
5831
- for (let { timer: e } of ue.current.values()) window.clearTimeout(e);
5832
- ue.current.clear();
5811
+ }, [h, C]), de = X(U);
5812
+ de.current = U, Y(() => {
5813
+ o || U();
5814
+ }, [o, U]), Y(() => () => {
5815
+ for (let { timer: e } of le.current.values()) window.clearTimeout(e);
5816
+ le.current.clear();
5833
5817
  }, []), Y(() => {
5834
5818
  let e = (e) => {
5835
- D.current.has(e) || (V.current.includes(e) || V.current.push(e), H());
5819
+ D.current.has(e) || (H.current.includes(e) || H.current.push(e), U());
5836
5820
  }, t = (t) => {
5837
5821
  let n = t.data?.type;
5838
5822
  if (typeof n != "string" || !n.startsWith("ryugi:board:")) return;
@@ -5841,38 +5825,38 @@ function bu({ artifact: t, boards: n, versions: r, pending: i, view: a, scaling:
5841
5825
  if (n === "ryugi:board:ready") E.current.add(r), v.ready(r), e(r);
5842
5826
  else if (n === "ryugi:board:changed") E.current.has(r) && e(r);
5843
5827
  else if (n === "ryugi:board:snapshot") {
5844
- let e = ue.current.get(r);
5828
+ let e = le.current.get(r);
5845
5829
  if (!e || t.data.request !== e.request) return;
5846
- window.clearTimeout(e.timer), ue.current.delete(r);
5830
+ window.clearTimeout(e.timer), le.current.delete(r);
5847
5831
  let { blob: n, width: i, height: a } = t.data;
5848
5832
  n instanceof Blob && typeof i == "number" && typeof a == "number" ? h.put(e.key, {
5849
5833
  blob: n,
5850
5834
  width: i,
5851
5835
  height: a,
5852
5836
  scale: C
5853
- }, { persist: te.current(r) }) : (h.markUnsupported(e.key), g()), H();
5837
+ }, { persist: te.current(r) }) : (h.markUnsupported(e.key), g()), U();
5854
5838
  }
5855
5839
  }
5856
5840
  };
5857
5841
  return window.addEventListener("message", t), () => window.removeEventListener("message", t);
5858
5842
  }, [
5859
5843
  v,
5860
- H,
5844
+ U,
5861
5845
  h,
5862
5846
  x
5863
5847
  ]);
5864
- let pe = J((e) => (O.current.has(e) || O.current.set(e, (t) => {
5848
+ let fe = J((e) => (O.current.has(e) || O.current.set(e, (t) => {
5865
5849
  if (t) {
5866
5850
  T.current.set(e, t);
5867
5851
  return;
5868
5852
  }
5869
- T.current.delete(e), E.current.delete(e), D.current.delete(e), V.current = V.current.filter((t) => t !== e);
5870
- let n = ue.current.get(e);
5871
- n && (window.clearTimeout(n.timer), ue.current.delete(e), fe.current());
5872
- }), O.current.get(e)), []), U = J((e) => {
5853
+ T.current.delete(e), E.current.delete(e), D.current.delete(e), H.current = H.current.filter((t) => t !== e);
5854
+ let n = le.current.get(e);
5855
+ n && (window.clearTimeout(n.timer), le.current.delete(e), de.current());
5856
+ }), O.current.get(e)), []), W = J((e) => {
5873
5857
  E.current.delete(e), D.current.delete(e), v.loaded(e);
5874
- }, [v]), W = n.filter(([, t]) => e(t)), me = S({
5875
- boards: W.map(([e, t]) => ({
5858
+ }, [v]), pe = n.filter(([, t]) => e(t)), G = S({
5859
+ boards: pe.map(([e, t]) => ({
5876
5860
  id: e,
5877
5861
  x: t.x,
5878
5862
  y: t.y,
@@ -5883,9 +5867,9 @@ function bu({ artifact: t, boards: n, versions: r, pending: i, view: a, scaling:
5883
5867
  view: a,
5884
5868
  viewport: s,
5885
5869
  pinned: /* @__PURE__ */ new Set(),
5886
- snapshots: new Set(W.map(([e]) => e))
5887
- }), he = /* @__PURE__ */ new Map();
5888
- for (let [e, t] of me) he.set(e, {
5870
+ snapshots: new Set(pe.map(([e]) => e))
5871
+ }), me = /* @__PURE__ */ new Map();
5872
+ for (let [e, t] of G) me.set(e, {
5889
5873
  tier: t,
5890
5874
  mounted: !1,
5891
5875
  image: null,
@@ -5893,8 +5877,8 @@ function bu({ artifact: t, boards: n, versions: r, pending: i, view: a, scaling:
5893
5877
  hidden: !1
5894
5878
  });
5895
5879
  for (let [e, t] of P) {
5896
- let n = A.get(e), r = I[e], i = M.has(e) && r?.name.startsWith(`${n}#`) ? r.url : null, a = t.tier === "empty" ? null : i ?? le.get(e) ?? null;
5897
- he.set(e, {
5880
+ let n = A.get(e), r = I[e], i = M.has(e) && r?.name.startsWith(`${n}#`) ? r.url : null, a = t.tier === "empty" ? null : i ?? V.get(e) ?? null;
5881
+ me.set(e, {
5898
5882
  tier: t.tier,
5899
5883
  mounted: t.mounted,
5900
5884
  image: a,
@@ -5903,9 +5887,9 @@ function bu({ artifact: t, boards: n, versions: r, pending: i, view: a, scaling:
5903
5887
  });
5904
5888
  }
5905
5889
  return {
5906
- renders: he,
5907
- frameRef: pe,
5908
- loaded: U,
5890
+ renders: me,
5891
+ frameRef: fe,
5892
+ loaded: W,
5909
5893
  imageFailed: B
5910
5894
  };
5911
5895
  }
@@ -7711,7 +7695,7 @@ function Td(e = !1) {
7711
7695
  //#endregion
7712
7696
  //#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/internals/labelable-provider/LabelableProvider.mjs
7713
7697
  var Ed = function(e) {
7714
- let t = B(), [n, r] = q.useState(t), [i, a] = q.useState(), [o, s] = q.useState([]), c = n === void 0 ? t : n, l = H(() => /* @__PURE__ */ new Map()), { messageIds: u } = z(), d = G((e, t) => {
7698
+ let t = B(), [n, r] = q.useState(t), [i, a] = q.useState(), [o, s] = q.useState([]), c = n === void 0 ? t : n, l = U(() => /* @__PURE__ */ new Map()), { messageIds: u } = z(), d = ge((e, t) => {
7715
7699
  let n = l.current;
7716
7700
  t === void 0 ? n.delete(e) : n.set(e, t), r((e) => {
7717
7701
  if (n.size === 0) return e;
@@ -7722,7 +7706,7 @@ var Ed = function(e) {
7722
7706
  }
7723
7707
  return t;
7724
7708
  });
7725
- }), f = G(() => {
7709
+ }), f = ge(() => {
7726
7710
  l.current.size === 0 && r(t);
7727
7711
  }), p = q.useCallback((e) => {
7728
7712
  let t = e["aria-describedby"] ? e["aria-describedby"].split(" ") : [];
@@ -7766,7 +7750,7 @@ function Dd(e, t) {
7766
7750
  //#endregion
7767
7751
  //#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
7768
7752
  function Od(e = {}) {
7769
- let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = z(), c = Dd(t, G((e) => {
7753
+ let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = z(), c = Dd(t, ge((e) => {
7770
7754
  s(e), i?.(e);
7771
7755
  })), l = o ?? n;
7772
7756
  function u(e) {
@@ -7842,12 +7826,12 @@ function Id(e) {
7842
7826
  return e && e.validationMessage ? [e.validationMessage] : [];
7843
7827
  }
7844
7828
  function Ld(e) {
7845
- let { elementRef: t, formRef: n } = Te(), { setValidityData: r, validate: i, validityData: a, validationDebounceTime: o, invalid: s, markedDirtyRef: c, state: l, shouldValidateOnChange: u, validationMode: d, registeredFieldIdRef: f } = e, { controlId: p, getDescriptionProps: m } = z(), h = ye(), g = q.useRef(null), _ = H(() => /* @__PURE__ */ new Map()).current, v = q.useRef(0), y = q.useRef(null), b = q.useCallback((e, t) => (_.set(e, t), () => {
7829
+ let { elementRef: t, formRef: n } = Te(), { setValidityData: r, validate: i, validityData: a, validationDebounceTime: o, invalid: s, markedDirtyRef: c, state: l, shouldValidateOnChange: u, validationMode: d, registeredFieldIdRef: f } = e, { controlId: p, getDescriptionProps: m } = z(), h = ye(), g = q.useRef(null), _ = U(() => /* @__PURE__ */ new Map()).current, v = q.useRef(0), y = q.useRef(null), b = q.useCallback((e, t) => (_.set(e, t), () => {
7846
7830
  _.delete(e);
7847
- }), [_]), x = G(() => {
7831
+ }), [_]), x = ge(() => {
7848
7832
  let e = Pd(_, t.current);
7849
7833
  return e && _.get(e)?.controlRef.current || null;
7850
- }), S = G(async (e, o = !1) => {
7834
+ }), S = ge(async (e, o = !1) => {
7851
7835
  v.current += 1;
7852
7836
  let m = v.current;
7853
7837
  function b(e, t = s) {
@@ -7923,7 +7907,7 @@ function Ld(e) {
7923
7907
  A = o ? [].concat(o).filter(Boolean) : [], A.length > 0 ? (k.valid = !1, k.customError = !0, D?.willValidate && S(D, A.join("\n"))) : A = Id(D);
7924
7908
  }
7925
7909
  w(k, A);
7926
- }), C = G((e, t = !1) => {
7910
+ }), C = ge((e, t = !1) => {
7927
7911
  if (h.clear(), v.current += 1, t) return;
7928
7912
  let n = u();
7929
7913
  n && e !== "" && o ? h.start(o, () => {
@@ -7954,14 +7938,14 @@ function Ld(e) {
7954
7938
  //#endregion
7955
7939
  //#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/internals/field-register-control/useFieldControlRegistration.mjs
7956
7940
  function Rd(e) {
7957
- let { change: t, commit: n, invalid: r, markedDirtyRef: i, name: a, setRegisteredFieldName: o, registeredFieldIdRef: s, setValidityData: c, validityData: l } = e, { formRef: u } = Te(), d = q.useRef(null), f = q.useRef(null), p = q.useRef(!1), m = G(() => {
7941
+ let { change: t, commit: n, invalid: r, markedDirtyRef: i, name: a, setRegisteredFieldName: o, registeredFieldIdRef: s, setValidityData: c, validityData: l } = e, { formRef: u } = Te(), d = q.useRef(null), f = q.useRef(null), p = q.useRef(!1), m = ge(() => {
7958
7942
  let e = f.current;
7959
7943
  if (e) return e.getValue ? e.getValue() : e.value;
7960
7944
  });
7961
7945
  function h(e) {
7962
7946
  return e.value === void 0 ? m() : e.value;
7963
7947
  }
7964
- let g = G(() => {
7948
+ let g = ge(() => {
7965
7949
  let e = f.current;
7966
7950
  i.current = !0, n(e ? h(e) : l.value);
7967
7951
  });
@@ -8010,7 +7994,7 @@ function Rd(e) {
8010
7994
  let t = f.current?.id;
8011
7995
  t && e.delete(t);
8012
7996
  };
8013
- }, [u]), [g, G((e, n) => {
7997
+ }, [u]), [g, ge((e, n) => {
8014
7998
  if (!n) {
8015
7999
  d.current === e && (d.current = null, t(void 0, !0), v(), f.current = null, o(void 0), s.current = void 0);
8016
8000
  return;
@@ -8022,15 +8006,15 @@ function Rd(e) {
8022
8006
  //#endregion
8023
8007
  //#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/root/FieldRoot.mjs
8024
8008
  var zd = /*#__PURE__*/ q.forwardRef(function(e, t) {
8025
- let { errors: n, validationMode: r, submitCountRef: i } = Te(), { render: a, className: o, validate: s, validationDebounceTime: c = 0, validationMode: l = r, name: u, disabled: d = !1, invalid: f, dirty: p, touched: m, actionsRef: h, style: g, ..._ } = e, v = Td(!0)?.disabled, y = G(s || (() => null)), b = v || d, [x, S] = q.useState(!1), [C, w] = q.useState(!1), [T, E] = q.useState(!1), [D, O] = q.useState(!1), k = q.useRef(void 0), ee = p ?? C, te = m ?? x, j = q.useRef(ee), ne = q.useRef(void 0), [M, re] = q.useState(), ie = u ?? M;
8009
+ let { errors: n, validationMode: r, submitCountRef: i } = Te(), { render: a, className: o, validate: s, validationDebounceTime: c = 0, validationMode: l = r, name: u, disabled: d = !1, invalid: f, dirty: p, touched: m, actionsRef: h, style: g, ..._ } = e, v = Td(!0)?.disabled, y = ge(s || (() => null)), b = v || d, [x, S] = q.useState(!1), [C, w] = q.useState(!1), [T, E] = q.useState(!1), [D, O] = q.useState(!1), k = q.useRef(void 0), ee = p ?? C, te = m ?? x, j = q.useRef(ee), ne = q.useRef(void 0), [M, re] = q.useState(), ie = u ?? M;
8026
8010
  ke(() => {
8027
8011
  p !== void 0 && (j.current = p);
8028
8012
  }, [p]);
8029
- let ae = G((e) => {
8013
+ let ae = ge((e) => {
8030
8014
  p === void 0 && (e && (j.current = !0), w(e));
8031
- }), oe = G((e) => {
8015
+ }), oe = ge((e) => {
8032
8016
  m === void 0 && S(e);
8033
- }), N = G(() => l === "onChange" || l === "onSubmit" && i.current > 0), P = ie && Object.hasOwn(n, ie) ? n[ie] : null, F = !!(Array.isArray(P) ? P.length : P), I = f === !0 || F, [L, R] = q.useState({
8017
+ }), N = ge(() => l === "onChange" || l === "onSubmit" && i.current > 0), P = ie && Object.hasOwn(n, ie) ? n[ie] : null, F = !!(Array.isArray(P) ? P.length : P), I = f === !0 || F, [L, R] = q.useState({
8034
8018
  state: se,
8035
8019
  error: "",
8036
8020
  errors: [],
@@ -8061,7 +8045,7 @@ var zd = /*#__PURE__*/ q.forwardRef(function(e, t) {
8061
8045
  shouldValidateOnChange: N,
8062
8046
  validationMode: l,
8063
8047
  registeredFieldIdRef: ne
8064
- }), [le, ue] = Rd({
8048
+ }), [V, le] = Rd({
8065
8049
  change: B.change,
8066
8050
  commit: B.commit,
8067
8051
  invalid: I,
@@ -8072,8 +8056,8 @@ var zd = /*#__PURE__*/ q.forwardRef(function(e, t) {
8072
8056
  setValidityData: R,
8073
8057
  validityData: L
8074
8058
  });
8075
- q.useImperativeHandle(h, () => ({ validate: le }), [le]);
8076
- let de = q.useMemo(() => ({
8059
+ q.useImperativeHandle(h, () => ({ validate: V }), [V]);
8060
+ let ue = q.useMemo(() => ({
8077
8061
  invalid: I,
8078
8062
  name: ie,
8079
8063
  validityData: L,
@@ -8087,7 +8071,7 @@ var zd = /*#__PURE__*/ q.forwardRef(function(e, t) {
8087
8071
  validationMode: l,
8088
8072
  shouldValidateOnChange: N,
8089
8073
  state: z,
8090
- registerFieldControl: ue,
8074
+ registerFieldControl: le,
8091
8075
  validation: B
8092
8076
  }), [
8093
8077
  I,
@@ -8101,17 +8085,17 @@ var zd = /*#__PURE__*/ q.forwardRef(function(e, t) {
8101
8085
  l,
8102
8086
  N,
8103
8087
  z,
8104
- ue,
8088
+ le,
8105
8089
  B
8106
- ]), H = U("div", e, {
8090
+ ]), U = W("div", e, {
8107
8091
  ref: t,
8108
8092
  state: z,
8109
8093
  props: _,
8110
8094
  stateAttributesMapping: A
8111
8095
  });
8112
- return /*#__PURE__*/ Q(V.Provider, {
8113
- value: de,
8114
- children: H
8096
+ return /*#__PURE__*/ Q(H.Provider, {
8097
+ value: ue,
8098
+ children: U
8115
8099
  });
8116
8100
  });
8117
8101
  process.env.NODE_ENV !== "production" && (zd.displayName = "FieldRootInner");
@@ -8132,7 +8116,7 @@ function Hd() {
8132
8116
  //#endregion
8133
8117
  //#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/label/FieldLabel.mjs
8134
8118
  var Ud = /*#__PURE__*/ q.forwardRef(function(e, t) {
8135
- let { render: n, className: r, style: i, id: a, nativeLabel: o = !0, ...s } = e, c = le(!1), l = Hd(), { labelId: u } = z(), d = {
8119
+ let { render: n, className: r, style: i, id: a, nativeLabel: o = !0, ...s } = e, c = V(!1), l = Hd(), { labelId: u } = z(), d = {
8136
8120
  ...c.state,
8137
8121
  disabled: c.disabled || l.disabled
8138
8122
  }, f = q.useRef(null), p = Od({
@@ -8151,7 +8135,7 @@ var Ud = /*#__PURE__*/ q.forwardRef(function(e, t) {
8151
8135
  let e = we.captureOwnerStack?.() || "";
8152
8136
  Oe(`<Field.Label> expected a non-<label> element because the \`nativeLabel\` prop is false. Rendering a <label> assumes native label behavior while Base UI treats it as non-native, which can cause unexpected pointer behavior. Use a non-<label> in the \`render\` prop, or set \`nativeLabel\` to \`true\`.${e}`);
8153
8137
  }
8154
- }, [o]), U("label", e, {
8138
+ }, [o]), W("label", e, {
8155
8139
  ref: [t, f],
8156
8140
  state: d,
8157
8141
  props: [p, s],
@@ -8323,7 +8307,7 @@ function Jd({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
8323
8307
  maxHeight: r ? `min(604px, calc(100% - ${Math.max(0, r.top)}px - 12px))` : "min(604px, calc(100vh - 112px))"
8324
8308
  },
8325
8309
  onKeyDown: (e) => {
8326
- e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !W(e.nativeEvent) && o();
8310
+ e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !pe(e.nativeEvent) && o();
8327
8311
  },
8328
8312
  children: [
8329
8313
  /* @__PURE__ */ $("header", {
@@ -8421,7 +8405,7 @@ function Jd({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
8421
8405
  className: "rt-dialog",
8422
8406
  "data-chrome": "parameter-declaration",
8423
8407
  onKeyDown: (e) => {
8424
- e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !W(e.nativeEvent) && u(!1);
8408
+ e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !pe(e.nativeEvent) && u(!1);
8425
8409
  },
8426
8410
  children: [
8427
8411
  /* @__PURE__ */ $("header", { children: [
@@ -8523,7 +8507,7 @@ function Yd({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
8523
8507
  })
8524
8508
  ]
8525
8509
  }),
8526
- /* @__PURE__ */ Q(pe, {
8510
+ /* @__PURE__ */ Q(fe, {
8527
8511
  autoFocus: !0,
8528
8512
  placeholder: a("verdict.reasonPlaceholder"),
8529
8513
  onCancel: i,
@@ -8606,7 +8590,7 @@ var Qd = { ghost: {
8606
8590
  $$css: !0
8607
8591
  } }, $d = 120, ef = .5, tf = 110, nf = .4, rf = .25;
8608
8592
  function af(e, t, n) {
8609
- if (!e || de()) return {
8593
+ if (!e || ue()) return {
8610
8594
  done: Promise.resolve(),
8611
8595
  cancel: () => {}
8612
8596
  };
@@ -8640,13 +8624,13 @@ function of({ id: t, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
8640
8624
  if (u(i), y.current = i, !b.current) {
8641
8625
  b.current = !0;
8642
8626
  let e = D(a);
8643
- e && ge(f.current, [{ transform: e }, { transform: "none" }], {
8627
+ e && he(f.current, [{ transform: e }, { transform: "none" }], {
8644
8628
  duration: Ee.duration,
8645
8629
  easing: Ee.easing
8646
- }), ge(p.current, [{ opacity: 0 }, { opacity: 1 }], {
8630
+ }), he(p.current, [{ opacity: 0 }, { opacity: 1 }], {
8647
8631
  duration: 200,
8648
8632
  easing: Ae
8649
- }), O().forEach((e, t) => void ge(e, [{
8633
+ }), O().forEach((e, t) => void he(e, [{
8650
8634
  opacity: 0,
8651
8635
  transform: `translateY(${t ? 12 : -8}px)`
8652
8636
  }, {
@@ -8659,7 +8643,7 @@ function of({ id: t, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
8659
8643
  }));
8660
8644
  } else if (x.current) {
8661
8645
  let { dir: t, leaving: n } = x.current;
8662
- x.current = null, n(), ge(f.current, [{
8646
+ x.current = null, n(), he(f.current, [{
8663
8647
  transform: `translateX(${t * e * .35}px)`,
8664
8648
  opacity: 0
8665
8649
  }, {
@@ -8680,10 +8664,10 @@ function of({ id: t, board: n, src: r, siblings: i, origin: a, onOpen: o, onClos
8680
8664
  ]);
8681
8665
  let k = () => {
8682
8666
  let e = f.current?.style.transform || "none";
8683
- _(null), ge(f.current, [{ transform: e }, { transform: "none" }], {
8667
+ _(null), he(f.current, [{ transform: e }, { transform: "none" }], {
8684
8668
  duration: Ee.duration,
8685
8669
  easing: Ee.easing
8686
- }), [p.current, ...O()].forEach((e) => void ge(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 1 }], {
8670
+ }), [p.current, ...O()].forEach((e) => void he(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 1 }], {
8687
8671
  duration: 200,
8688
8672
  easing: Ae
8689
8673
  }));
@@ -9081,14 +9065,6 @@ function yf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9081
9065
  b,
9082
9066
  k
9083
9067
  ]),
9084
- fitFocus: J((e, t) => {
9085
- n && r && k(uf(cf(n, r, t.page), e)) || b(t.bounds, hf);
9086
- }, [
9087
- n,
9088
- r,
9089
- b,
9090
- k
9091
- ]),
9092
9068
  startAtFocus: !0
9093
9069
  }), te = yt(() => n && r && A ? cf(n, r, A) : [], [
9094
9070
  n,
@@ -9136,12 +9112,12 @@ function yf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9136
9112
  if (O.current = null, t?.pointer !== e.pointerId) return;
9137
9113
  let n = I(e);
9138
9114
  n && D(n);
9139
- }, z = E ? re[E] : void 0, B = g.current?.getBoundingClientRect(), le = z && B ? {
9115
+ }, z = E ? re[E] : void 0, B = g.current?.getBoundingClientRect(), V = z && B ? {
9140
9116
  x: B.left + _.x + z.x * _.k,
9141
9117
  y: B.top + _.y + z.y * _.k,
9142
9118
  w: z.w * _.k,
9143
9119
  h: z.h * _.k
9144
- } : void 0, V = (e) => !n?.groups?.[e.id], ue = E ? te.find((e) => e.questions.some((e) => e.boards.includes(E))) : void 0, de = ue?.questions.find((e) => e.boards.includes(E)), H = E ? de ? V(de) ? ue.questions.filter(V).map((e) => e.id) : de.boards : [E] : [];
9120
+ } : void 0, H = (e) => !n?.groups?.[e.id], le = E ? te.find((e) => e.questions.some((e) => e.boards.includes(E))) : void 0, ue = le?.questions.find((e) => e.boards.includes(E)), U = E ? ue ? H(ue) ? le.questions.filter(H).map((e) => e.id) : ue.boards : [E] : [];
9145
9121
  return /* @__PURE__ */ $("div", {
9146
9122
  className: "xixxii4 x10a8y8t x78zum5 xdt5ytf x184qs1t",
9147
9123
  children: [
@@ -9226,8 +9202,8 @@ function yf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9226
9202
  E && z ? /* @__PURE__ */ Q(of, {
9227
9203
  board: z,
9228
9204
  id: E,
9229
- origin: le,
9230
- siblings: H,
9205
+ origin: V,
9206
+ siblings: U,
9231
9207
  src: `${s}${z.file}?v=${l[z.file] ?? 0}`,
9232
9208
  onClose: () => D(null),
9233
9209
  onOpen: D
@@ -9247,14 +9223,13 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9247
9223
  fitPage: J((e) => {
9248
9224
  let t = r?.pages[e]?.bounds;
9249
9225
  return t ? (w(t), !0) : !1;
9250
- }, [r, w]),
9251
- fitFocus: J((e, t) => w(t.bounds), [w])
9252
- }), [F, se] = Z(null), [I, L] = Z(() => /* @__PURE__ */ new Set()), [R, ce] = Z({}), z = xu(e), [B, le] = Z(null), V = X(null);
9253
- Y(() => le(null), [N, e]);
9254
- let ue = () => {
9255
- le(null), V.current?.focus();
9256
- }, de = (e, t) => {
9257
- V.current = t;
9226
+ }, [r, w])
9227
+ }), [F, se] = Z(null), [I, L] = Z(() => /* @__PURE__ */ new Set()), [R, ce] = Z({}), z = xu(e), [B, V] = Z(null), H = X(null);
9228
+ Y(() => V(null), [N, e]);
9229
+ let le = () => {
9230
+ V(null), H.current?.focus();
9231
+ }, ue = (e, t) => {
9232
+ H.current = t;
9258
9233
  let r = n?.boards[e], i = b.current;
9259
9234
  if (B !== e && !F && r && i) {
9260
9235
  let e = Gd(r, x, {
@@ -9263,10 +9238,10 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9263
9238
  });
9264
9239
  (e.x || e.y) && A(e.x, e.y);
9265
9240
  }
9266
- le((t) => t === e ? null : e);
9267
- }, H = v === "select" && !F && !te, fe = v === "comment", pe = !F && (v === "select" || fe || ne), U = Bu({
9268
- enabled: pe,
9269
- mode: fe ? "comment" : "select",
9241
+ V((t) => t === e ? null : e);
9242
+ }, U = v === "select" && !F && !te, de = v === "comment", fe = !F && (v === "select" || de || ne), W = Bu({
9243
+ enabled: fe,
9244
+ mode: de ? "comment" : "select",
9270
9245
  playing: I,
9271
9246
  onInput: (e, t) => {
9272
9247
  let r = n?.boards[e];
@@ -9274,30 +9249,30 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9274
9249
  ...t,
9275
9250
  x: x.x + (r.x + t.x) * x.k,
9276
9251
  y: x.y + (r.y + t.y) * x.k
9277
- }) : t.type === "ryugi:inspect:pan" ? A(t.deltaX, t.deltaY) : t.type === "ryugi:inspect:drag" ? fe ? W.onFrameDrag(e, t) : H && Me.drag(t.phase, r.x + t.x, r.y + t.y, t.append, t.id ? {
9252
+ }) : t.type === "ryugi:inspect:pan" ? A(t.deltaX, t.deltaY) : t.type === "ryugi:inspect:drag" ? de ? G.onFrameDrag(e, t) : U && Ne.drag(t.phase, r.x + t.x, r.y + t.y, t.append, t.id ? {
9278
9253
  boardId: e,
9279
9254
  id: t.id
9280
- } : void 0) : t.code === "Space" ? j(t.down) : t.down && xe(t));
9255
+ } : void 0) : t.code === "Space" ? j(t.down) : t.down && Se(t));
9281
9256
  }
9282
9257
  });
9283
9258
  ad({
9284
9259
  artifact: t,
9285
9260
  boards: n?.boards,
9286
9261
  live: u,
9287
- inspector: U,
9262
+ inspector: W,
9288
9263
  send: f
9289
9264
  });
9290
- let W = Xl({
9265
+ let G = Xl({
9291
9266
  comments: m,
9292
9267
  comment: h,
9293
9268
  page: N,
9294
9269
  boards: n?.boards ?? {},
9295
- inspector: U
9270
+ inspector: W
9296
9271
  }), me = ud({
9297
9272
  canvas: n,
9298
9273
  page: N,
9299
- threads: W.threads,
9300
- stale: W.stale,
9274
+ threads: G.threads,
9275
+ stale: G.stale,
9301
9276
  versions: l,
9302
9277
  comment: h
9303
9278
  }), he = me.rejecting ? me.origin(me.rejecting) : null, ge = () => {
@@ -9308,114 +9283,114 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9308
9283
  maxX: e.x + e.w,
9309
9284
  maxY: e.y + e.h
9310
9285
  });
9311
- }, G = (e) => {
9312
- (e !== "comment" || h) && (e === "comment" && v === "select" && W.commentSelection(), e !== "comment" && W.close(), y(e));
9313
9286
  }, _e = (e) => {
9314
- let t = W.threads.find((t) => t.id === e), r = t && vr(t.anchor, n?.boards ?? {}), i = b.current;
9315
- r && i && A(i.clientWidth / 2 - (x.x + r.x * x.k), i.clientHeight / 2 - (x.y + r.y * x.k)), W.setOpenId(e);
9316
- }, ve = J(() => M(!1), []);
9287
+ (e !== "comment" || h) && (e === "comment" && v === "select" && G.commentSelection(), e !== "comment" && G.close(), y(e));
9288
+ }, ve = (e) => {
9289
+ let t = G.threads.find((t) => t.id === e), r = t && vr(t.anchor, n?.boards ?? {}), i = b.current;
9290
+ r && i && A(i.clientWidth / 2 - (x.x + r.x * x.k), i.clientHeight / 2 - (x.y + r.y * x.k)), G.setOpenId(e);
9291
+ }, ye = J(() => M(!1), []);
9317
9292
  Y(() => {
9318
9293
  F && j(!1);
9319
9294
  }, [F, j]);
9320
- let ye = yt(() => new Set(o), [o]), be = n?.pages ?? [];
9295
+ let be = yt(() => new Set(o), [o]), xe = n?.pages ?? [];
9321
9296
  Y(() => {
9322
9297
  document.title = n?.title || e;
9323
9298
  }, [n?.title, e]), $e("artboard");
9324
- function xe(e) {
9325
- if ("target" in e && e.target?.closest?.("input, textarea, select, [contenteditable], [role=\"tree\"], [role=\"treeitem\"], [data-chrome=\"parameters\"]")) return;
9299
+ function Se(e) {
9300
+ if ("target" in e && (e.defaultPrevented || pe(e) || e.target?.closest?.("input, textarea, select, [contenteditable], [data-chrome=\"parameters\"]"))) return;
9326
9301
  let t = () => {
9327
9302
  "preventDefault" in e && e.preventDefault();
9328
9303
  }, n = e.metaKey || e.ctrlKey;
9329
- e.key === "Escape" && fe ? W.close() || G("select") : e.key === "Escape" ? B ? ue() : (se(null), U.clearSelection(), Me.reset()) : n && (e.key === "=" || e.key === "+") ? (t(), T(1.25)) : n && e.key === "-" ? (t(), T(.8)) : e.shiftKey && e.code === "Digit1" ? w(oe(N)) : e.shiftKey && e.code === "Digit0" ? E(1) : !n && !e.shiftKey && e.key.toLowerCase() === "v" ? G("select") : !n && !e.shiftKey && e.key.toLowerCase() === "h" ? G("hand") : !n && !e.shiftKey && e.key.toLowerCase() === "c" && (t(), G("comment"));
9304
+ e.key === "Escape" && de ? G.close() || _e("select") : e.key === "Escape" ? B ? le() : (se(null), W.clearSelection(), Ne.reset()) : n && (e.key === "=" || e.key === "+") ? (t(), T(1.25)) : n && e.key === "-" ? (t(), T(.8)) : e.shiftKey && e.code === "Digit1" ? w(oe(N)) : e.shiftKey && e.code === "Digit0" ? E(1) : !n && !e.shiftKey && e.key.toLowerCase() === "v" ? (t(), _e("select")) : !n && !e.shiftKey && e.key.toLowerCase() === "h" ? (t(), _e("hand")) : !n && !e.shiftKey && e.key.toLowerCase() === "c" && (t(), _e("comment"));
9330
9305
  }
9331
- Y(() => (window.addEventListener("keydown", xe), () => window.removeEventListener("keydown", xe)));
9332
- let Se = n?.boards ?? {}, Ce = yt(() => Object.entries(n?.boards ?? {}).filter(([, e]) => e.page === N), [n, N]), we = Object.entries(n?.groups ?? {}).filter(([, e]) => e.boards.some((e) => Se[e]?.page === N)), Te = Object.entries(n?.notes ?? {}).filter(([, e]) => e.page === N), Ee = F ? Se[F] : void 0, De = Object.fromEntries(Object.entries(z.states).flatMap(([e, t]) => {
9306
+ Y(() => (window.addEventListener("keydown", Se), () => window.removeEventListener("keydown", Se)));
9307
+ let Ce = n?.boards ?? {}, we = yt(() => Object.entries(n?.boards ?? {}).filter(([, e]) => e.page === N), [n, N]), Te = Object.entries(n?.groups ?? {}).filter(([, e]) => e.boards.some((e) => Ce[e]?.page === N)), Ee = Object.entries(n?.notes ?? {}).filter(([, e]) => e.page === N), De = F ? Ce[F] : void 0, Oe = Object.fromEntries(Object.entries(z.states).flatMap(([e, t]) => {
9333
9308
  let n = Object.keys(t.schema?.controls ?? {}).length, r = Object.entries(t.schema?.controls ?? {}).some(([e, n]) => t.values[e] !== n.default);
9334
9309
  return n || t.error ? [[e, r]] : [];
9335
- })), Oe = B ? z.states[B] : void 0, ke = B ? Se[B] : void 0, Ae = (e) => B && Oe && ke && (Oe.schema || Oe.error) ? /* @__PURE__ */ Q(Jd, {
9336
- anchor: e ? Wd(ke, x) : void 0,
9310
+ })), ke = B ? z.states[B] : void 0, Ae = B ? Ce[B] : void 0, je = (e) => B && ke && Ae && (ke.schema || ke.error) ? /* @__PURE__ */ Q(Jd, {
9311
+ anchor: e ? Wd(Ae, x) : void 0,
9337
9312
  boardId: B,
9338
- state: Oe,
9339
- title: ke.title ?? B,
9313
+ state: ke,
9314
+ title: Ae.title ?? B,
9340
9315
  onChange: (e, t) => z.change(B, e, t),
9341
- onClose: ue,
9316
+ onClose: le,
9342
9317
  onReset: () => z.reset(B)
9343
- }) : null, je = Ee ? (l[Ee.file] ?? 0) > 0 && !ye.has(F) : !1, Me = Wu(Ce, U, x.k, [
9318
+ }) : null, Me = De ? (l[De.file] ?? 0) > 0 && !be.has(F) : !1, Ne = Wu(we, W, x.k, [
9344
9319
  v,
9345
9320
  F,
9346
9321
  N,
9347
9322
  te
9348
- ]), Ne = (e) => {
9323
+ ]), Pe = (e) => {
9349
9324
  let t = b.current.getBoundingClientRect();
9350
9325
  return {
9351
9326
  x: (e.clientX - t.left - x.x) / x.k,
9352
9327
  y: (e.clientY - t.top - x.y) / x.k
9353
9328
  };
9354
- }, Pe = (e) => Ce.find(([, t]) => e.x >= t.x && e.x <= t.x + t.w && e.y >= t.y && e.y <= t.y + t.h)?.[0] ?? null, Fe = Eu({
9329
+ }, Fe = (e) => we.find(([, t]) => e.x >= t.x && e.x <= t.x + t.w && e.y >= t.y && e.y <= t.y + t.h)?.[0] ?? null, Ie = Eu({
9355
9330
  scaling: S,
9356
9331
  view: x,
9357
- inside: U.hover?.boardId ?? null,
9332
+ inside: W.hover?.boardId ?? null,
9358
9333
  locate: (e) => {
9359
- let t = Ne(e);
9334
+ let t = Pe(e);
9360
9335
  return {
9361
- board: Pe(t),
9336
+ board: Fe(t),
9362
9337
  x: t.x * x.k,
9363
9338
  y: t.y * x.k
9364
9339
  };
9365
9340
  }
9366
- }), Ie = Me.marquee, Le = Uu(Ce, l, (e) => !pe || I.has(e)), Re = yt(() => /* @__PURE__ */ new Set([
9367
- ...Le,
9341
+ }), Le = Ne.marquee, Re = Uu(we, l, (e) => !fe || I.has(e)), ze = yt(() => /* @__PURE__ */ new Set([
9342
+ ...Re,
9368
9343
  ...I,
9369
9344
  ...[F, B].filter((e) => !!e),
9370
- ...U.selectedTargets.map((e) => e.boardId),
9371
- ...Object.entries(U.frames).filter(([, e]) => e.tweaks.length > 0).map(([e]) => e),
9372
- ...Ie ? Ce.filter(([, e]) => e.x < Ie.x + Ie.width && e.x + e.w > Ie.x && e.y < Ie.y + Ie.height && e.y + e.h > Ie.y).map(([e]) => e) : []
9345
+ ...W.selectedTargets.map((e) => e.boardId),
9346
+ ...Object.entries(W.frames).filter(([, e]) => e.tweaks.length > 0).map(([e]) => e),
9347
+ ...Le ? we.filter(([, e]) => e.x < Le.x + Le.width && e.x + e.w > Le.x && e.y < Le.y + Le.height && e.y + e.h > Le.y).map(([e]) => e) : []
9373
9348
  ]), [
9374
- Le,
9349
+ Re,
9375
9350
  I,
9376
9351
  F,
9377
9352
  B,
9378
- U.selectedTargets,
9379
- U.frames,
9380
- Ie,
9381
- Ce
9382
- ]), ze = bu({
9353
+ W.selectedTargets,
9354
+ W.frames,
9355
+ Le,
9356
+ we
9357
+ ]), Be = bu({
9383
9358
  artifact: t ?? e,
9384
- boards: _ ? Ce : [],
9359
+ boards: _ ? we : [],
9385
9360
  versions: l,
9386
- pending: ye,
9361
+ pending: be,
9387
9362
  view: x,
9388
9363
  scaling: S,
9389
9364
  viewport: C,
9390
- pinned: Re,
9391
- hovered: Fe.hovered,
9392
- hoverPromotes: v === "select" || fe,
9365
+ pinned: ze,
9366
+ hovered: Ie.hovered,
9367
+ hoverPromotes: v === "select" || de,
9393
9368
  persistable: (e) => {
9394
9369
  let t = z.states[e];
9395
- return !(t?.schema && JSON.stringify(t.values) !== JSON.stringify(pr(t.schema))) && !U.frames[e]?.tweaks.length;
9370
+ return !(t?.schema && JSON.stringify(t.values) !== JSON.stringify(pr(t.schema))) && !W.frames[e]?.tweaks.length;
9396
9371
  }
9397
- }), Be = _ ? ze.renders : c({
9398
- boards: Ce.map(([e, t]) => ({
9372
+ }), Ve = _ ? Be.renders : c({
9373
+ boards: we.map(([e, t]) => ({
9399
9374
  id: e,
9400
9375
  ...t
9401
9376
  })),
9402
9377
  view: x,
9403
9378
  viewport: C
9404
- }), Ve = yt(() => {
9379
+ }), He = yt(() => {
9405
9380
  let e = /* @__PURE__ */ new Map();
9406
9381
  return (t) => (e.has(t) || e.set(t, (e) => {
9407
- z.refFor(t)(e), U.refFor(t)(e), ze.frameRef(t)(e);
9382
+ z.refFor(t)(e), W.refFor(t)(e), Be.frameRef(t)(e);
9408
9383
  }), e.get(t));
9409
9384
  }, [
9410
9385
  z.refFor,
9411
- U.refFor,
9412
- ze.frameRef
9413
- ]), He = J((e) => {
9414
- z.loaded(e), U.loaded(e), ze.loaded(e);
9386
+ W.refFor,
9387
+ Be.frameRef
9388
+ ]), Ue = J((e) => {
9389
+ z.loaded(e), W.loaded(e), Be.loaded(e);
9415
9390
  }, [
9416
9391
  z.loaded,
9417
- U.loaded,
9418
- ze.loaded
9392
+ W.loaded,
9393
+ Be.loaded
9419
9394
  ]);
9420
9395
  return /* @__PURE__ */ $("div", {
9421
9396
  className: "x78zum5 xh8yej3 x5yr21d xb3r6kr",
@@ -9424,29 +9399,29 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9424
9399
  ref: b,
9425
9400
  className: "x98rzlu xeuugli x1n2onr6 xh8yej3 x5yr21d xb3r6kr x5ve5x3 x87ps6o x184qs1t xqfszdh xo2rkog",
9426
9401
  style: { cursor: D },
9427
- onPointerLeave: Fe.leave,
9402
+ onPointerLeave: Ie.leave,
9428
9403
  onClickCapture: (e) => {
9429
- !F && (fe || te) && e.target.closest("[data-video-surface]") && e.stopPropagation();
9404
+ !F && (de || te) && e.target.closest("[data-video-surface]") && e.stopPropagation();
9430
9405
  },
9431
9406
  onPointerCancel: (e) => {
9432
- k.onPointerCancel(e), Me.reset();
9407
+ k.onPointerCancel(e), Ne.reset();
9433
9408
  },
9434
9409
  onPointerDown: (e) => {
9435
- if (k.onPointerDown(e), fe && !te && !F && e.button === 0 && e.pointerType !== "touch" && e.currentTarget.contains(e.target) && !e.target.closest("[data-chrome]") && (e.preventDefault(), W.onCanvasClick(Ne(e))), !H || e.pointerType === "touch" || e.button !== 0 || !e.currentTarget.contains(e.target) || e.target.closest("[data-chrome], [data-video-surface]")) return;
9436
- let t = Ne(e);
9437
- e.currentTarget.setPointerCapture(e.pointerId), Me.drag("start", t.x, t.y, e.shiftKey || e.metaKey || e.ctrlKey);
9410
+ if (k.onPointerDown(e), de && !te && !F && e.button === 0 && e.pointerType !== "touch" && e.currentTarget.contains(e.target) && !e.target.closest("[data-chrome]") && (e.preventDefault(), G.onCanvasClick(Pe(e))), !U || e.pointerType === "touch" || e.button !== 0 || !e.currentTarget.contains(e.target) || e.target.closest("[data-chrome], [data-video-surface]")) return;
9411
+ let t = Pe(e);
9412
+ e.currentTarget.setPointerCapture(e.pointerId), Ne.drag("start", t.x, t.y, e.shiftKey || e.metaKey || e.ctrlKey);
9438
9413
  },
9439
9414
  onPointerMove: (e) => {
9440
- if (k.onPointerMove(e), Fe.track(e), Me.dragging()) {
9415
+ if (k.onPointerMove(e), Ie.track(e), Ne.dragging()) {
9441
9416
  e.buttons === 1 && e.currentTarget.setPointerCapture(e.pointerId);
9442
- let t = Ne(e);
9443
- Me.drag("move", t.x, t.y);
9417
+ let t = Pe(e);
9418
+ Ne.drag("move", t.x, t.y);
9444
9419
  }
9445
9420
  },
9446
9421
  onPointerUp: (e) => {
9447
- if (k.onPointerUp(e), Me.dragging()) {
9448
- let t = Ne(e);
9449
- Me.drag("end", t.x, t.y);
9422
+ if (k.onPointerUp(e), Ne.dragging()) {
9423
+ let t = Pe(e);
9424
+ Ne.drag("end", t.x, t.y);
9450
9425
  }
9451
9426
  },
9452
9427
  children: [
@@ -9455,7 +9430,7 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9455
9430
  viewport: b
9456
9431
  }),
9457
9432
  re && /* @__PURE__ */ Q(Rr, {
9458
- renders: Be,
9433
+ renders: Ve,
9459
9434
  scaling: S
9460
9435
  }),
9461
9436
  n && r && /* @__PURE__ */ $(a, {
@@ -9463,31 +9438,31 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9463
9438
  children: [
9464
9439
  /* @__PURE__ */ Q(ht, {
9465
9440
  agent: p,
9466
- boards: Ce,
9441
+ boards: we,
9467
9442
  contentBase: s,
9468
- frameLoaded: He,
9469
- frameRef: Ve,
9470
- inspecting: H || fe && !F && !te,
9443
+ frameLoaded: Ue,
9444
+ frameRef: He,
9445
+ inspecting: U || de && !F && !te,
9471
9446
  live: u,
9472
- notes: Te,
9473
- pending: ye,
9447
+ notes: Ee,
9448
+ pending: be,
9474
9449
  playing: I,
9475
- renders: Be,
9450
+ renders: Ve,
9476
9451
  replays: R,
9477
9452
  versions: l,
9478
9453
  view: x,
9479
9454
  writing: u ? n.writing : void 0,
9480
9455
  onExpand: se,
9481
- onImageError: ze.imageFailed
9456
+ onImageError: Be.imageFailed
9482
9457
  }),
9483
9458
  /* @__PURE__ */ Q(Kl, {
9484
9459
  activeParameters: B,
9485
- allBoards: Se,
9486
- boards: Ce,
9460
+ allBoards: Ce,
9461
+ boards: we,
9487
9462
  contentBase: s,
9488
- groups: we,
9489
- parameters: De,
9490
- pending: ye,
9463
+ groups: Te,
9464
+ parameters: Oe,
9465
+ pending: be,
9491
9466
  playing: I,
9492
9467
  verdicts: me,
9493
9468
  versions: l,
@@ -9497,7 +9472,7 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9497
9472
  ...t,
9498
9473
  [e]: (t[e] ?? 0) + 1
9499
9474
  })),
9500
- onToggleParameters: de,
9475
+ onToggleParameters: ue,
9501
9476
  onTogglePlay: (e) => L((t) => mt(t, e))
9502
9477
  }),
9503
9478
  me.rejecting && he && /* @__PURE__ */ Q(Yd, {
@@ -9507,51 +9482,51 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9507
9482
  onCancel: me.cancelReject,
9508
9483
  onSubmit: me.submitReject
9509
9484
  }),
9510
- fe && /* @__PURE__ */ Q(Nr, {
9511
- actions: W.actions,
9485
+ de && /* @__PURE__ */ Q(Nr, {
9486
+ actions: G.actions,
9512
9487
  agent: p,
9513
- boards: Se,
9514
- draft: W.draft,
9488
+ boards: Ce,
9489
+ draft: G.draft,
9515
9490
  height: C.height,
9516
- numbers: W.numbers,
9517
- openId: W.openId,
9491
+ numbers: G.numbers,
9492
+ openId: G.openId,
9518
9493
  page: N,
9519
9494
  showResolved: ie === "all",
9520
- stale: W.stale,
9521
- threads: W.threads,
9495
+ stale: G.stale,
9496
+ threads: G.threads,
9522
9497
  view: x,
9523
9498
  width: b.current?.clientWidth ?? 0,
9524
- onCancelDraft: W.cancelDraft,
9525
- onOpen: W.setOpenId,
9526
- onSubmit: W.submit
9499
+ onCancelDraft: G.cancelDraft,
9500
+ onOpen: G.setOpenId,
9501
+ onSubmit: G.submit
9527
9502
  })
9528
9503
  ]
9529
9504
  }),
9530
- (H || fe) && !Me.marquee && U.hover && Se[U.hover.boardId] && /* @__PURE__ */ Q(dd, {
9531
- board: Se[U.hover.boardId],
9532
- rect: U.hover.rect,
9505
+ (U || de) && !Ne.marquee && W.hover && Ce[W.hover.boardId] && /* @__PURE__ */ Q(dd, {
9506
+ board: Ce[W.hover.boardId],
9507
+ rect: W.hover.rect,
9533
9508
  view: x,
9534
- nodeId: U.hover.id ? `${U.hover.boardId}#${U.hover.id}` : void 0
9509
+ nodeId: W.hover.id ? `${W.hover.boardId}#${W.hover.id}` : void 0
9535
9510
  }),
9536
- !F && U.targets.map((e) => Se[e.boardId] && /* @__PURE__ */ Q(dd, {
9511
+ !F && W.targets.map((e) => Ce[e.boardId] && /* @__PURE__ */ Q(dd, {
9537
9512
  selected: !0,
9538
- board: Se[e.boardId],
9513
+ board: Ce[e.boardId],
9539
9514
  name: e.name,
9540
9515
  rect: e.rect,
9541
9516
  view: x
9542
9517
  }, `${e.boardId}:${e.id}`)),
9543
- Me.selecting && /* @__PURE__ */ Q("div", {
9518
+ Ne.selecting && /* @__PURE__ */ Q("div", {
9544
9519
  "aria-hidden": "true",
9545
9520
  className: "ri-selection-capture"
9546
9521
  }),
9547
- Me.marquee && /* @__PURE__ */ Q("div", {
9522
+ Ne.marquee && /* @__PURE__ */ Q("div", {
9548
9523
  "aria-hidden": "true",
9549
9524
  className: "ri-marquee",
9550
9525
  style: {
9551
- left: x.x + Me.marquee.x * x.k,
9552
- top: x.y + Me.marquee.y * x.k,
9553
- width: Me.marquee.width * x.k,
9554
- height: Me.marquee.height * x.k
9526
+ left: x.x + Ne.marquee.x * x.k,
9527
+ top: x.y + Ne.marquee.y * x.k,
9528
+ width: Ne.marquee.width * x.k,
9529
+ height: Ne.marquee.height * x.k
9555
9530
  }
9556
9531
  }),
9557
9532
  (!n || !r) && /* @__PURE__ */ Q("div", {
@@ -9561,10 +9536,10 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9561
9536
  /* @__PURE__ */ Q(ql, {
9562
9537
  commenting: !!h,
9563
9538
  page: N,
9564
- pages: be,
9539
+ pages: xe,
9565
9540
  tool: v,
9566
9541
  onPageChange: P,
9567
- onToolChange: G
9542
+ onToolChange: _e
9568
9543
  }),
9569
9544
  /* @__PURE__ */ Q(Jl, {
9570
9545
  actions: g,
@@ -9580,22 +9555,22 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9580
9555
  onZoomIn: () => T(1.25),
9581
9556
  onZoomOut: () => T(.8)
9582
9557
  }),
9583
- !F && Ae(!0),
9584
- F && Ee && je && /* @__PURE__ */ Q(zr, {
9585
- board: Ee,
9558
+ !F && je(!0),
9559
+ F && De && Me && /* @__PURE__ */ Q(zr, {
9560
+ board: De,
9586
9561
  frameRef: z.refFor(F, "expanded"),
9587
9562
  id: F,
9588
- interactive: Ee.interactive === !0,
9589
- parameters: B === F ? Ae(!1) : void 0,
9590
- src: `${s}${Ee.file}?v=${l[Ee.file] ?? 0}`,
9591
- parameterAction: De[F] === void 0 ? void 0 : /* @__PURE__ */ Q(At, {
9563
+ interactive: De.interactive === !0,
9564
+ parameters: B === F ? je(!1) : void 0,
9565
+ src: `${s}${De.file}?v=${l[De.file] ?? 0}`,
9566
+ parameterAction: Oe[F] === void 0 ? void 0 : /* @__PURE__ */ Q(At, {
9592
9567
  config: { "aria-hidden": !0 },
9593
9568
  children: /* @__PURE__ */ Q(Tt, {
9594
9569
  "aria-expanded": B === F,
9595
9570
  icon: On,
9596
9571
  size: "small",
9597
9572
  type: "text",
9598
- onClick: (e) => de(F, e.currentTarget),
9573
+ onClick: (e) => ue(F, e.currentTarget),
9599
9574
  children: K("chrome.parameters")
9600
9575
  })
9601
9576
  }),
@@ -9604,29 +9579,29 @@ function xf({ id: e, artifact: t, canvas: n, layout: r, warnings: i, pending: o,
9604
9579
  })
9605
9580
  ]
9606
9581
  }),
9607
- fe && /* @__PURE__ */ Q(Tr, {
9608
- numbers: W.numbers,
9609
- openId: W.openId,
9582
+ de && /* @__PURE__ */ Q(Tr, {
9583
+ numbers: G.numbers,
9584
+ openId: G.openId,
9610
9585
  page: N,
9611
- stale: W.stale,
9586
+ stale: G.stale,
9612
9587
  tab: ie,
9613
- threads: W.threads,
9614
- onClose: () => G("select"),
9615
- onOpen: _e,
9588
+ threads: G.threads,
9589
+ onClose: () => _e("select"),
9590
+ onOpen: ve,
9616
9591
  onTab: ae
9617
9592
  }),
9618
- ne && !fe && /* @__PURE__ */ Q(Cd, {
9619
- boards: Ce,
9620
- change: U.change,
9593
+ ne && !de && /* @__PURE__ */ Q(Cd, {
9594
+ boards: we,
9595
+ change: W.change,
9621
9596
  enabled: !F,
9622
- frames: U.frames,
9623
- hoverNode: U.hoverNode,
9597
+ frames: W.frames,
9598
+ hoverNode: W.hoverNode,
9624
9599
  playing: I,
9625
- reset: U.reset,
9626
- select: U.select,
9627
- selection: U.selection,
9628
- targets: U.targets,
9629
- onClose: ve
9600
+ reset: W.reset,
9601
+ select: W.select,
9602
+ selection: W.selection,
9603
+ targets: W.targets,
9604
+ onClose: ye
9630
9605
  })
9631
9606
  ]
9632
9607
  });
@@ -9667,7 +9642,7 @@ function Cf({ id: e, feed: t, actions: n }) {
9667
9642
  Y(() => {
9668
9643
  document.title = r?.title || e;
9669
9644
  }, [r?.title, e]), $e("html");
9670
- let a = r?.found && !r.warnings.includes("index.html not found"), o = a ? `${r.contentBase}index.html?v=${r.version}` : null, { frameRef: s, src: c, onLoad: l } = me(o, {
9645
+ let a = r?.found && !r.warnings.includes("index.html not found"), o = a ? `${r.contentBase}index.html?v=${r.version}` : null, { frameRef: s, src: c, onLoad: l } = G(o, {
9671
9646
  onError: (t) => i({
9672
9647
  type: "runtime-error",
9673
9648
  artifact: `html/${e}`,
@@ -9688,7 +9663,7 @@ function Cf({ id: e, feed: t, actions: n }) {
9688
9663
  a && c ? /* @__PURE__ */ Q("iframe", {
9689
9664
  allow: "clipboard-write",
9690
9665
  ref: s,
9691
- sandbox: he,
9666
+ sandbox: me,
9692
9667
  src: c,
9693
9668
  title: r.title,
9694
9669
  onLoad: l,
@@ -9727,6 +9702,6 @@ function Of(e, t) {
9727
9702
  }
9728
9703
  //#endregion
9729
9704
  //#region src/viewer/lib/version.ts
9730
- var kf = "1.46.1";
9705
+ var kf = "1.46.2";
9731
9706
  //#endregion
9732
- export { t as ARTIFACT_LOCATOR_SOURCE, i as ARTIFACT_TYPES, bf as ArtboardView, Yn as ArtifactThumbnail, g as BOARD_TYPES, a as CanvasErrorBoundary, Ge as HTML_LANG, he as HTML_SANDBOX, Cf as HtmlView, ue as PHONE_QUERY, w as PreviewView, Zn as PublicationStatus, R as RailSwitch, er as RyugiMark, it as TYPE_GLYPHS, nt as TYPE_ICON_VIEWBOX, Ye as Trans, Jn as TypeIcon, kf as VIEWER_VERSION, l as ViewerProvider, te as anchorBlockIds, Ne as applyAgentOp, ce as applyAgentThreadOp, qn as applyBoardAgentOp, Kn as applyBoardHumanOp, ne as applyHumanOp, j as applyThreadOp, Hn as boardAnchors, ir as boardCommentsFromMessage, rr as boardCommentsFromPayload, h as cloudErrorDetails, et as createRelayConnection, We as createViewerI18n, N as documentAnchors, Un as emptyBoardComments, ve as emptyComments, Tf as errorText, qe as i18n, D as isArtifactAddress, o as isArtifactId, r as isArtifactLocator, n as isArtifactType, e as isMediaBoard, ee as isObject, Ef as isPlanLimit, He as isVisibility, Gn as mergeBoardComments, _e as mergeComments, ae as openThread, Xe as ownLink, cr as pageLink, Je as parseAcceptLanguage, oe as parseComments, Df as planLimitMessage, Be as publishState, Ve as publishing, Vn as readBoardAnchor, Le as readCloudHeader, Ke as readPublication, wf as relativeUpdatedAt, fe as reportCloudHeader, ze as resolveLocale, Of as responseErrorText, Wn as savedBoardComments, F as savedComments, Ue as syncNote, K as t, tt as typeFaviconHref, M as unreadThreads, sr as useCanvasData, Fe as useCloudHeader, Me as useMedia, lr as usePageQuery, me as useSandboxFrame, k as useSystemTheme, Re as useTranslation, $e as useTypeFavicon, ie as waitingOn };
9707
+ export { t as ARTIFACT_LOCATOR_SOURCE, i as ARTIFACT_TYPES, bf as ArtboardView, Yn as ArtifactThumbnail, g as BOARD_TYPES, a as CanvasErrorBoundary, Ge as HTML_LANG, me as HTML_SANDBOX, Cf as HtmlView, le as PHONE_QUERY, w as PreviewView, Zn as PublicationStatus, R as RailSwitch, er as RyugiMark, it as TYPE_GLYPHS, nt as TYPE_ICON_VIEWBOX, Ye as Trans, Jn as TypeIcon, kf as VIEWER_VERSION, l as ViewerProvider, te as anchorBlockIds, Ne as applyAgentOp, ce as applyAgentThreadOp, qn as applyBoardAgentOp, Kn as applyBoardHumanOp, ne as applyHumanOp, j as applyThreadOp, Hn as boardAnchors, ir as boardCommentsFromMessage, rr as boardCommentsFromPayload, h as cloudErrorDetails, et as createRelayConnection, We as createViewerI18n, N as documentAnchors, Un as emptyBoardComments, ve as emptyComments, Tf as errorText, qe as i18n, D as isArtifactAddress, o as isArtifactId, r as isArtifactLocator, n as isArtifactType, e as isMediaBoard, ee as isObject, Ef as isPlanLimit, He as isVisibility, Gn as mergeBoardComments, _e as mergeComments, ae as openThread, Xe as ownLink, cr as pageLink, Je as parseAcceptLanguage, oe as parseComments, Df as planLimitMessage, Be as publishState, Ve as publishing, Vn as readBoardAnchor, Le as readCloudHeader, Ke as readPublication, wf as relativeUpdatedAt, de as reportCloudHeader, ze as resolveLocale, Of as responseErrorText, Wn as savedBoardComments, F as savedComments, Ue as syncNote, K as t, tt as typeFaviconHref, M as unreadThreads, sr as useCanvasData, Fe as useCloudHeader, Me as useMedia, lr as usePageQuery, G as useSandboxFrame, k as useSystemTheme, Re as useTranslation, $e as useTypeFavicon, ie as waitingOn };