@pixelmatters/markup 1.25.2 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/widget.js CHANGED
@@ -4290,7 +4290,7 @@ async function Zo() {
4290
4290
  }
4291
4291
  //#endregion
4292
4292
  //#region src/runtime/screenshot.ts
4293
- var Qo = 2097152, $o = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", es = [
4293
+ var Qo = 2097152, $o = 1.5, es = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", ts = [
4294
4294
  {
4295
4295
  quality: .85,
4296
4296
  scale: 1
@@ -4307,8 +4307,8 @@ var Qo = 2097152, $o = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAA
4307
4307
  quality: .6,
4308
4308
  scale: .5
4309
4309
  }
4310
- ], ts = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", ns = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
4311
- function rs(e) {
4310
+ ], ns = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", rs = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
4311
+ function is(e) {
4312
4312
  let t = e.parentElement;
4313
4313
  for (; t;) {
4314
4314
  if (t.hasAttribute("data-markup-safe")) return !0;
@@ -4316,35 +4316,35 @@ function rs(e) {
4316
4316
  }
4317
4317
  return !1;
4318
4318
  }
4319
- function is(e) {
4319
+ function as(e) {
4320
4320
  let t = /* @__PURE__ */ new Set(), n = [];
4321
4321
  function r(e) {
4322
4322
  t.has(e) || (t.add(e), n.push(e));
4323
4323
  }
4324
4324
  for (let e of document.querySelectorAll("[data-markup-private],[data-markup-redact]")) r(e);
4325
- for (let e of document.querySelectorAll(ns)) rs(e) || r(e);
4325
+ for (let e of document.querySelectorAll(rs)) is(e) || r(e);
4326
4326
  if (e.redactSelector) try {
4327
- for (let t of document.querySelectorAll(e.redactSelector)) rs(t) || r(t);
4327
+ for (let t of document.querySelectorAll(e.redactSelector)) is(t) || r(t);
4328
4328
  } catch (e) {
4329
4329
  L(e, { context: "screenshot-redact-selector" });
4330
4330
  }
4331
- if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) rs(e) || r(e);
4331
+ if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) is(e) || r(e);
4332
4332
  return n;
4333
4333
  }
4334
- function as(e) {
4334
+ function os(e) {
4335
4335
  let t = e.getAttribute("style");
4336
- return e.setAttribute("style", t ? `${t};${ts}` : ts), () => {
4336
+ return e.setAttribute("style", t ? `${t};${ns}` : ns), () => {
4337
4337
  t === null ? e.removeAttribute("style") : e.setAttribute("style", t);
4338
4338
  };
4339
4339
  }
4340
- function os(e) {
4340
+ function ss(e) {
4341
4341
  if (e.id) return `#${CSS.escape(e.id)}`;
4342
4342
  let t = e.tagName.toLowerCase(), n = e.getAttribute("type"), r = e.getAttribute("name");
4343
4343
  return n && r ? `${t}[type="${n}"][name="${r}"]` : n ? `${t}[type="${n}"]` : r ? `${t}[name="${r}"]` : t;
4344
4344
  }
4345
- async function ss(e, t, n) {
4345
+ async function cs(e, t, n) {
4346
4346
  try {
4347
- let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = await Zo(), s = n ? is(n) : [], c = s.map(os), l = s.map(as), u;
4347
+ let r = window.innerWidth, i = window.innerHeight, a = ls(window.devicePixelRatio), o = await Zo(), s = n ? as(n) : [], c = s.map(ss), l = s.map(os), u;
4348
4348
  try {
4349
4349
  u = await Ho(document.documentElement, {
4350
4350
  width: r,
@@ -4355,7 +4355,7 @@ async function ss(e, t, n) {
4355
4355
  filter(t) {
4356
4356
  return !(e && (t === e || e.contains(t)) || t instanceof Element && t.hasAttribute("data-markup-skip"));
4357
4357
  },
4358
- imagePlaceholder: $o,
4358
+ imagePlaceholder: es,
4359
4359
  onImageErrorHandler: () => {},
4360
4360
  style: {
4361
4361
  transform: `translateY(-${window.scrollY}px)`,
@@ -4368,9 +4368,9 @@ async function ss(e, t, n) {
4368
4368
  }
4369
4369
  if (t) {
4370
4370
  let e = u.getContext("2d");
4371
- e && ds(e, t.x, t.y, a);
4371
+ e && bs(e, t.x, t.y, a);
4372
4372
  }
4373
- let d = await us(u);
4373
+ let d = await ys(u);
4374
4374
  return d ? {
4375
4375
  blob: d,
4376
4376
  redactedCount: c.length,
@@ -4380,29 +4380,76 @@ async function ss(e, t, n) {
4380
4380
  return L(e, { context: "screenshot-capture" }), null;
4381
4381
  }
4382
4382
  }
4383
- function cs(e, t) {
4384
- return new Promise((n) => e.toBlob(n, "image/jpeg", t));
4383
+ function ls(e) {
4384
+ return !Number.isFinite(e) || e <= 0 ? 1 : Math.min(e, $o);
4385
+ }
4386
+ function us() {
4387
+ let e = document.createElement("canvas");
4388
+ return e.width = 1, e.height = 1, e.toDataURL("image/webp");
4389
+ }
4390
+ var ds = "image/jpeg", fs = null;
4391
+ function ps(e = us) {
4392
+ if (fs) return fs;
4393
+ let t = "";
4394
+ try {
4395
+ t = e();
4396
+ } catch {
4397
+ t = "";
4398
+ }
4399
+ return fs = t.startsWith("data:image/webp") ? "image/webp" : ds, fs;
4400
+ }
4401
+ function ms() {
4402
+ fs = ds;
4403
+ }
4404
+ async function hs(e, t) {
4405
+ let n = await t(e);
4406
+ return !n || e === ds || !n.type || n.type === e ? {
4407
+ blob: n,
4408
+ type: e
4409
+ } : {
4410
+ blob: await t(ds),
4411
+ type: ds
4412
+ };
4413
+ }
4414
+ async function gs(e, t = ts) {
4415
+ let n = null, r = null;
4416
+ for (let i of t) {
4417
+ let t = await e(i);
4418
+ if (t) {
4419
+ if (t.size <= 409600) return {
4420
+ kind: "soft",
4421
+ blob: t
4422
+ };
4423
+ t.size <= 2097152 && !r && (r = t), n = n == null ? t.size : Math.min(n, t.size);
4424
+ }
4425
+ }
4426
+ return r ? {
4427
+ kind: "fallback",
4428
+ blob: r
4429
+ } : {
4430
+ kind: "failed",
4431
+ smallest: n
4432
+ };
4433
+ }
4434
+ function _s(e, t, n) {
4435
+ return new Promise((r) => e.toBlob(r, n, t));
4385
4436
  }
4386
- function ls(e, t) {
4437
+ function vs(e, t) {
4387
4438
  let n = document.createElement("canvas");
4388
4439
  n.width = Math.max(1, Math.round(e.width * t)), n.height = Math.max(1, Math.round(e.height * t));
4389
4440
  let r = n.getContext("2d");
4390
4441
  return r ? (r.imageSmoothingQuality = "high", r.drawImage(e, 0, 0, n.width, n.height), n) : null;
4391
4442
  }
4392
- async function us(e) {
4393
- let t = null;
4394
- for (let { quality: n, scale: r } of es) {
4395
- let i = r === 1 ? e : ls(e, r);
4396
- if (!i) continue;
4397
- let a = await cs(i, n);
4398
- if (a) {
4399
- if (a.size <= Qo) return a;
4400
- t = t == null ? a.size : Math.min(t, a.size);
4401
- }
4402
- }
4403
- return L(/* @__PURE__ */ Error(t == null ? "Screenshot encode produced no blob at any quality/scale" : `Screenshot still ${t} bytes at the end of the encode ladder (cap ${Qo})`), { context: "screenshot-encode" }), null;
4443
+ async function ys(e) {
4444
+ let t = ps(), n = await gs(async ({ quality: n, scale: r }) => {
4445
+ let i = r === 1 ? e : vs(e, r);
4446
+ if (!i) return null;
4447
+ let a = await hs(t, (e) => _s(i, n, e));
4448
+ return a.type !== t && (t = a.type, ms()), a.blob;
4449
+ });
4450
+ return n.kind === "failed" ? (L(/* @__PURE__ */ Error(n.smallest == null ? `Screenshot encode produced no blob at any quality/scale (${t})` : `Screenshot still ${n.smallest} bytes at the end of the encode ladder (cap ${Qo}, ${t})`), { context: "screenshot-encode" }), null) : n.blob;
4404
4451
  }
4405
- function ds(e, t, n, r) {
4452
+ function bs(e, t, n, r) {
4406
4453
  let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
4407
4454
  e.save();
4408
4455
  let l = 2 * i;
@@ -4420,8 +4467,8 @@ function ds(e, t, n, r) {
4420
4467
  }
4421
4468
  //#endregion
4422
4469
  //#region src/runtime/subscription-token-refresh.ts
4423
- var fs = 18e5, ps = 6e4, ms = 6e4;
4424
- function hs(e) {
4470
+ var xs = 18e5, Ss = 6e4, Cs = 6e4;
4471
+ function ws(e) {
4425
4472
  let t = !1, n = null;
4426
4473
  async function r() {
4427
4474
  let i;
@@ -4429,11 +4476,11 @@ function hs(e) {
4429
4476
  i = await e.mint();
4430
4477
  } catch (e) {
4431
4478
  if (t) return;
4432
- e?.name !== "TypeError" && L(e, { context: "subscription-token-refresh" }), n = setTimeout(r, ms);
4479
+ e?.name !== "TypeError" && L(e, { context: "subscription-token-refresh" }), n = setTimeout(r, Cs);
4433
4480
  return;
4434
4481
  }
4435
4482
  if (t) return;
4436
- let a = Math.max(ps, i.expiresAt - Date.now() - fs);
4483
+ let a = Math.max(Ss, i.expiresAt - Date.now() - xs);
4437
4484
  n = setTimeout(r, a);
4438
4485
  try {
4439
4486
  e.onIssued(i);
@@ -4447,7 +4494,7 @@ function hs(e) {
4447
4494
  }
4448
4495
  //#endregion
4449
4496
  //#region src/runtime/use-subscription-token.ts
4450
- var gs = Vr({
4497
+ var Ts = Vr({
4451
4498
  idle: { issued: (e, t) => ({
4452
4499
  kind: "active",
4453
4500
  token: t.token,
@@ -4460,19 +4507,19 @@ var gs = Vr({
4460
4507
  expiresAt: t.expiresAt,
4461
4508
  mintedAs: t.mintedAs
4462
4509
  }) }
4463
- }), _s = "anon";
4464
- function vs(e) {
4465
- return e.kind === "verified" ? e.identity.clientId : _s;
4510
+ }), Es = "anon";
4511
+ function Ds(e) {
4512
+ return e.kind === "verified" ? e.identity.clientId : Es;
4466
4513
  }
4467
- function ys(e) {
4468
- return e.kind === "verified" && e.identity.tokenExpiresAt > Date.now() ? e.identity.clientId : _s;
4514
+ function Os(e) {
4515
+ return e.kind === "verified" && e.identity.tokenExpiresAt > Date.now() ? e.identity.clientId : Es;
4469
4516
  }
4470
- function bs(e, t) {
4517
+ function ks(e, t) {
4471
4518
  return e.kind === "active" && e.mintedAs === t;
4472
4519
  }
4473
- function xs(e, t) {
4474
- let [n, r] = Hr(gs, { kind: "idle" }), i = ys(t);
4475
- return H(() => hs({
4520
+ function As(e, t) {
4521
+ let [n, r] = Hr(Ts, { kind: "idle" }), i = Os(t);
4522
+ return H(() => ws({
4476
4523
  mint: () => e.getSubscriptionToken(),
4477
4524
  onIssued: (e) => r({
4478
4525
  type: "issued",
@@ -4486,12 +4533,12 @@ function xs(e, t) {
4486
4533
  r
4487
4534
  ]), {
4488
4535
  token: n.kind === "active" ? n.token : null,
4489
- isCurrent: bs(n, vs(t))
4536
+ isCurrent: ks(n, Ds(t))
4490
4537
  };
4491
4538
  }
4492
4539
  //#endregion
4493
4540
  //#region src/runtime/refresh-token.ts
4494
- async function Ss(e) {
4541
+ async function js(e) {
4495
4542
  try {
4496
4543
  let t = {
4497
4544
  method: "POST",
@@ -4527,8 +4574,8 @@ async function Ss(e) {
4527
4574
  }
4528
4575
  //#endregion
4529
4576
  //#region src/runtime/use-token-refresh.ts
4530
- var Cs = 6e4, ws = 500;
4531
- function Ts(e, t, n, r, i) {
4577
+ var Ms = 6e4, Ns = 500;
4578
+ function Ps(e, t, n, r, i) {
4532
4579
  let a = e.kind === "verified", o = a ? e.identity.storage : void 0, s = a ? e.identity.refreshToken : void 0, c = a ? e.identity.refreshTokenExpiresAt : void 0, l = a ? e.identity.tokenExpiresAt : void 0;
4533
4580
  H(() => {
4534
4581
  if (!a || c == null || l == null || o === "localStorage" && s == null || o !== "cookies" && o !== "localStorage") return;
@@ -4537,8 +4584,8 @@ function Ts(e, t, n, r, i) {
4537
4584
  i();
4538
4585
  return;
4539
4586
  }
4540
- let d = Math.max(ws, l - Cs - u), f = new AbortController(), p = window.setTimeout(async () => {
4541
- let a = await Ss({
4587
+ let d = Math.max(Ns, l - Ms - u), f = new AbortController(), p = window.setTimeout(async () => {
4588
+ let a = await js({
4542
4589
  apiUrl: t,
4543
4590
  apiKey: n,
4544
4591
  mode: o,
@@ -4581,7 +4628,7 @@ function Ts(e, t, n, r, i) {
4581
4628
  function Z(...e) {
4582
4629
  return e.filter(Boolean).join(" ");
4583
4630
  }
4584
- function Es() {
4631
+ function Fs() {
4585
4632
  return typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? {
4586
4633
  mod: "⌘",
4587
4634
  enter: "↵"
@@ -4592,7 +4639,7 @@ function Es() {
4592
4639
  }
4593
4640
  //#endregion
4594
4641
  //#region ../../node_modules/.pnpm/preact@10.29.8/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
4595
- var Ds = 0;
4642
+ var Is = 0;
4596
4643
  Array.isArray;
4597
4644
  function Q(e, n, r, i, a, o) {
4598
4645
  n ||= {};
@@ -4609,7 +4656,7 @@ function Q(e, n, r, i, a, o) {
4609
4656
  __e: null,
4610
4657
  __c: null,
4611
4658
  constructor: void 0,
4612
- __v: --Ds,
4659
+ __v: --Is,
4613
4660
  __i: -1,
4614
4661
  __u: 0,
4615
4662
  __source: a,
@@ -4620,7 +4667,7 @@ function Q(e, n, r, i, a, o) {
4620
4667
  }
4621
4668
  //#endregion
4622
4669
  //#region src/runtime/ui/icons.tsx
4623
- function Os({ size: e = 16 }) {
4670
+ function Ls({ size: e = 16 }) {
4624
4671
  return /* @__PURE__ */ Q("svg", {
4625
4672
  width: e,
4626
4673
  height: e,
@@ -4630,7 +4677,7 @@ function Os({ size: e = 16 }) {
4630
4677
  children: /* @__PURE__ */ Q("path", { d: "M63.4561 0.00557731C70.6277 -0.0175584 76.9025 1.04088 83.5898 3.71066C97.7952 9.43043 109.186 20.5001 115.311 34.5359C119.708 44.8002 120.746 54.7869 119.156 65.8171C116.857 82.7956 105.129 98.8382 90.0566 106.846C83.4394 110.362 74.7336 113.029 67.2051 113.271C62.4204 113.425 61.1274 113.32 56.6807 115.204C50.2035 117.858 43.6874 120.417 37.1348 122.879C34.8442 123.763 32.3203 124.902 29.9404 125.51C29.4023 125.648 28.1978 125.009 27.7598 124.646C26.9046 123.951 27.0582 122.505 27.0264 121.484C26.8123 114.646 27.3302 107.458 26.8604 100.656C25.1578 98.6714 22.4026 96.603 20.3086 94.1989C12.1853 84.8731 7.05334 73.9949 6.18164 61.6101C4.95583 46.292 9.97176 31.1285 20.0908 19.5632C29.989 8.13202 44.0369 1.11921 59.1221 0.0788195C60.2694 -0.0356049 62.2637 0.00944821 63.4561 0.00557731ZM92.2676 55.7497C91.5754 39.5314 77.8207 26.9725 61.6064 27.7536C45.5175 28.5287 33.0758 42.1537 33.7627 58.2468C34.4496 74.3398 48.007 86.8553 64.1035 86.2566C80.3254 85.6533 92.9599 71.968 92.2676 55.7497Z" })
4631
4678
  });
4632
4679
  }
4633
- function ks({ size: e = 16 }) {
4680
+ function Rs({ size: e = 16 }) {
4634
4681
  return /* @__PURE__ */ Q("svg", {
4635
4682
  width: e,
4636
4683
  height: e,
@@ -4639,7 +4686,7 @@ function ks({ size: e = 16 }) {
4639
4686
  children: /* @__PURE__ */ Q("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
4640
4687
  });
4641
4688
  }
4642
- function As({ size: e = 16 }) {
4689
+ function zs({ size: e = 16 }) {
4643
4690
  return /* @__PURE__ */ Q("svg", {
4644
4691
  width: e,
4645
4692
  height: e,
@@ -4649,7 +4696,7 @@ function As({ size: e = 16 }) {
4649
4696
  children: /* @__PURE__ */ Q("path", { d: "M12.78 5.22a.75.75 0 0 1 0 1.06L9.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z" })
4650
4697
  });
4651
4698
  }
4652
- function js({ size: e = 16 }) {
4699
+ function Bs({ size: e = 16 }) {
4653
4700
  return /* @__PURE__ */ Q("svg", {
4654
4701
  width: e,
4655
4702
  height: e,
@@ -4659,7 +4706,7 @@ function js({ size: e = 16 }) {
4659
4706
  children: /* @__PURE__ */ Q("path", { d: "M7.22 14.78a.75.75 0 0 1 0-1.06L10.94 10 7.22 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0Z" })
4660
4707
  });
4661
4708
  }
4662
- function Ms({ size: e = 16 }) {
4709
+ function Vs({ size: e = 16 }) {
4663
4710
  return /* @__PURE__ */ Q("svg", {
4664
4711
  width: e,
4665
4712
  height: e,
@@ -4668,7 +4715,7 @@ function Ms({ size: e = 16 }) {
4668
4715
  children: /* @__PURE__ */ Q("path", { d: "M3 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM8.5 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM15.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })
4669
4716
  });
4670
4717
  }
4671
- function Ns({ size: e = 16 }) {
4718
+ function Hs({ size: e = 16 }) {
4672
4719
  return /* @__PURE__ */ Q("svg", {
4673
4720
  xmlns: "http://www.w3.org/2000/svg",
4674
4721
  width: e,
@@ -4678,7 +4725,7 @@ function Ns({ size: e = 16 }) {
4678
4725
  children: /* @__PURE__ */ Q("path", { d: "M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" })
4679
4726
  });
4680
4727
  }
4681
- function Ps({ size: e = 16 }) {
4728
+ function Us({ size: e = 16 }) {
4682
4729
  return /* @__PURE__ */ Q("svg", {
4683
4730
  width: e,
4684
4731
  height: e,
@@ -4692,7 +4739,7 @@ function Ps({ size: e = 16 }) {
4692
4739
  })
4693
4740
  });
4694
4741
  }
4695
- function Fs({ size: e = 16 }) {
4742
+ function Ws({ size: e = 16 }) {
4696
4743
  return /* @__PURE__ */ Q("svg", {
4697
4744
  width: e,
4698
4745
  height: e,
@@ -4701,7 +4748,7 @@ function Fs({ size: e = 16 }) {
4701
4748
  children: /* @__PURE__ */ Q("path", { d: "M2.87 2.298a.75.75 0 0 0-.812 1.021L3.39 6.624a1 1 0 0 0 .928.626H8.25a.75.75 0 0 1 0 1.5H4.318a1 1 0 0 0-.927.626l-1.333 3.305a.75.75 0 0 0 .811 1.022 24.89 24.89 0 0 0 11.668-5.115.75.75 0 0 0 0-1.175A24.89 24.89 0 0 0 2.869 2.298Z" })
4702
4749
  });
4703
4750
  }
4704
- function Is({ size: e = 16 }) {
4751
+ function Gs({ size: e = 16 }) {
4705
4752
  return /* @__PURE__ */ Q("svg", {
4706
4753
  width: e,
4707
4754
  height: e,
@@ -4725,19 +4772,19 @@ function $({ size: e = 16, children: t }) {
4725
4772
  children: t
4726
4773
  });
4727
4774
  }
4728
- function Ls({ size: e = 16 }) {
4775
+ function Ks({ size: e = 16 }) {
4729
4776
  return /* @__PURE__ */ Q($, {
4730
4777
  size: e,
4731
4778
  children: /* @__PURE__ */ Q("path", { d: "M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.5 8.5 0 0 1 8 8v.5z" })
4732
4779
  });
4733
4780
  }
4734
- function Rs({ size: e = 16 }) {
4781
+ function qs({ size: e = 16 }) {
4735
4782
  return /* @__PURE__ */ Q($, {
4736
4783
  size: e,
4737
4784
  children: [/* @__PURE__ */ Q("path", { d: "M22 12h-6l-2 3h-4l-2-3H2" }), /* @__PURE__ */ Q("path", { d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" })]
4738
4785
  });
4739
4786
  }
4740
- function zs({ size: e = 16 }) {
4787
+ function Js({ size: e = 16 }) {
4741
4788
  return /* @__PURE__ */ Q($, {
4742
4789
  size: e,
4743
4790
  children: [/* @__PURE__ */ Q("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z" }), /* @__PURE__ */ Q("circle", {
@@ -4747,7 +4794,7 @@ function zs({ size: e = 16 }) {
4747
4794
  })]
4748
4795
  });
4749
4796
  }
4750
- function Bs({ size: e = 16 }) {
4797
+ function Ys({ size: e = 16 }) {
4751
4798
  return /* @__PURE__ */ Q($, {
4752
4799
  size: e,
4753
4800
  children: [
@@ -4758,13 +4805,13 @@ function Bs({ size: e = 16 }) {
4758
4805
  ]
4759
4806
  });
4760
4807
  }
4761
- function Vs({ size: e = 16 }) {
4808
+ function Xs({ size: e = 16 }) {
4762
4809
  return /* @__PURE__ */ Q($, {
4763
4810
  size: e,
4764
4811
  children: /* @__PURE__ */ Q("path", { d: "M3 6h18M3 12h18M3 18h18" })
4765
4812
  });
4766
4813
  }
4767
- function Hs({ size: e = 16 }) {
4814
+ function Zs({ size: e = 16 }) {
4768
4815
  return /* @__PURE__ */ Q($, {
4769
4816
  size: e,
4770
4817
  children: [/* @__PURE__ */ Q("circle", {
@@ -4774,13 +4821,13 @@ function Hs({ size: e = 16 }) {
4774
4821
  }), /* @__PURE__ */ Q("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })]
4775
4822
  });
4776
4823
  }
4777
- function Us({ size: e = 16 }) {
4824
+ function Qs({ size: e = 16 }) {
4778
4825
  return /* @__PURE__ */ Q($, {
4779
4826
  size: e,
4780
4827
  children: /* @__PURE__ */ Q("path", { d: "M21 12.79A9 9 0 1 1 11.21 3a7 7 0 0 0 9.79 9.79z" })
4781
4828
  });
4782
4829
  }
4783
- function Ws({ size: e = 16 }) {
4830
+ function $s({ size: e = 16 }) {
4784
4831
  return /* @__PURE__ */ Q($, {
4785
4832
  size: e,
4786
4833
  children: [/* @__PURE__ */ Q("rect", {
@@ -4792,13 +4839,13 @@ function Ws({ size: e = 16 }) {
4792
4839
  }), /* @__PURE__ */ Q("path", { d: "M8 21h8M12 17v4" })]
4793
4840
  });
4794
4841
  }
4795
- function Gs({ size: e = 16 }) {
4842
+ function ec({ size: e = 16 }) {
4796
4843
  return /* @__PURE__ */ Q($, {
4797
4844
  size: e,
4798
4845
  children: /* @__PURE__ */ Q("path", { d: "M12 22s8-3.5 8-10V5l-8-3-8 3v7c0 6.5 8 10 8 10z" })
4799
4846
  });
4800
4847
  }
4801
- function Ks({ size: e = 16 }) {
4848
+ function tc({ size: e = 16 }) {
4802
4849
  return /* @__PURE__ */ Q($, {
4803
4850
  size: e,
4804
4851
  children: [/* @__PURE__ */ Q("rect", {
@@ -4810,19 +4857,19 @@ function Ks({ size: e = 16 }) {
4810
4857
  }), /* @__PURE__ */ Q("path", { d: "M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M10 14h4" })]
4811
4858
  });
4812
4859
  }
4813
- function qs({ size: e = 16 }) {
4860
+ function nc({ size: e = 16 }) {
4814
4861
  return /* @__PURE__ */ Q($, {
4815
4862
  size: e,
4816
4863
  children: [/* @__PURE__ */ Q("path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }), /* @__PURE__ */ Q("path", { d: "M10 17l5-5-5-5M15 12H3" })]
4817
4864
  });
4818
4865
  }
4819
- function Js({ size: e = 16 }) {
4866
+ function rc({ size: e = 16 }) {
4820
4867
  return /* @__PURE__ */ Q($, {
4821
4868
  size: e,
4822
4869
  children: [/* @__PURE__ */ Q("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ Q("path", { d: "M16 17l5-5-5-5M21 12H9" })]
4823
4870
  });
4824
4871
  }
4825
- function Ys({ size: e = 16 }) {
4872
+ function ic({ size: e = 16 }) {
4826
4873
  return /* @__PURE__ */ Q($, {
4827
4874
  size: e,
4828
4875
  children: [/* @__PURE__ */ Q("circle", {
@@ -4832,7 +4879,7 @@ function Ys({ size: e = 16 }) {
4832
4879
  }), /* @__PURE__ */ Q("path", { d: "M4 21a8 8 0 0 1 16 0" })]
4833
4880
  });
4834
4881
  }
4835
- function Xs({ size: e = 16 }) {
4882
+ function ac({ size: e = 16 }) {
4836
4883
  return /* @__PURE__ */ Q($, {
4837
4884
  size: e,
4838
4885
  children: [
@@ -4851,7 +4898,7 @@ function Xs({ size: e = 16 }) {
4851
4898
  ]
4852
4899
  });
4853
4900
  }
4854
- function Zs({ size: e = 16 }) {
4901
+ function oc({ size: e = 16 }) {
4855
4902
  return /* @__PURE__ */ Q($, {
4856
4903
  size: e,
4857
4904
  children: [
@@ -4861,7 +4908,7 @@ function Zs({ size: e = 16 }) {
4861
4908
  ]
4862
4909
  });
4863
4910
  }
4864
- var Qs = {
4911
+ var sc = {
4865
4912
  "--markup-pin-leave": "140ms",
4866
4913
  "--markup-toolbar-leave": "160ms",
4867
4914
  "--markup-toast-leave": "220ms",
@@ -4872,7 +4919,7 @@ var Qs = {
4872
4919
  };
4873
4920
  //#endregion
4874
4921
  //#region src/runtime/ui/identity-menu.tsx
4875
- function $s({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboardUrl: i, commentAccess: a = "anyone", onSignIn: o, onSignOut: s, onForgetMe: c }) {
4922
+ function cc({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboardUrl: i, commentAccess: a = "anyone", onSignIn: o, onSignOut: s, onForgetMe: c }) {
4876
4923
  let [l, u] = V(!1), d = ei(l || null, 140), f = d?.isLeaving ?? !1, [p, m] = V(!1), [h, g] = V(!1), _ = W(null);
4877
4924
  H(() => {
4878
4925
  if (!l) return;
@@ -4891,7 +4938,7 @@ function $s({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4891
4938
  H(() => {
4892
4939
  v || (m(!1), g(!1));
4893
4940
  }, [v]);
4894
- let y = aa(e), b = ec(y), x = e.kind === "verified", C = e.kind === "verified" ? e.identity.image : void 0, [w, T] = V(null), E = x && C != null && w !== C, D = x ? e.identity.email : null, O = t === "bottom-left" ? "is-anchor-left" : t === "bottom-center" ? "is-anchor-center" : "is-anchor-right";
4941
+ let y = aa(e), b = lc(y), x = e.kind === "verified", C = e.kind === "verified" ? e.identity.image : void 0, [w, T] = V(null), E = x && C != null && w !== C, D = x ? e.identity.email : null, O = t === "bottom-left" ? "is-anchor-left" : t === "bottom-center" ? "is-anchor-center" : "is-anchor-right";
4895
4942
  return /* @__PURE__ */ Q("div", {
4896
4943
  ref: _,
4897
4944
  style: {
@@ -4924,7 +4971,7 @@ function $s({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4924
4971
  }) : x && b ? /* @__PURE__ */ Q("span", {
4925
4972
  class: "markup-avatar-initials",
4926
4973
  children: b
4927
- }) : /* @__PURE__ */ Q(Ys, { size: 14 })
4974
+ }) : /* @__PURE__ */ Q(ic, { size: 14 })
4928
4975
  }), x && y ? /* @__PURE__ */ Q("span", {
4929
4976
  class: "markup-sr-only",
4930
4977
  children: y
@@ -4954,7 +5001,7 @@ function $s({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4954
5001
  onClick: () => u(!1),
4955
5002
  children: [/* @__PURE__ */ Q("span", {
4956
5003
  class: "ic",
4957
- children: /* @__PURE__ */ Q(Zs, { size: 16 })
5004
+ children: /* @__PURE__ */ Q(oc, { size: 16 })
4958
5005
  }), /* @__PURE__ */ Q("span", {
4959
5006
  class: "lbl",
4960
5007
  children: "Account"
@@ -4970,7 +5017,7 @@ function $s({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4970
5017
  },
4971
5018
  children: [/* @__PURE__ */ Q("span", {
4972
5019
  class: "ic",
4973
- children: /* @__PURE__ */ Q(Js, { size: 16 })
5020
+ children: /* @__PURE__ */ Q(rc, { size: 16 })
4974
5021
  }), /* @__PURE__ */ Q("span", {
4975
5022
  class: "lbl",
4976
5023
  children: r ? "Signing out…" : h ? "Confirm: sign out of this site" : "Sign out"
@@ -4993,7 +5040,7 @@ function $s({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4993
5040
  onClick: () => {
4994
5041
  u(!1), o();
4995
5042
  },
4996
- children: [/* @__PURE__ */ Q(qs, { size: 14 }), /* @__PURE__ */ Q("span", { children: n ? "Signing in…" : "Sign in" })]
5043
+ children: [/* @__PURE__ */ Q(nc, { size: 14 }), /* @__PURE__ */ Q("span", { children: n ? "Signing in…" : "Sign in" })]
4997
5044
  }),
4998
5045
  /* @__PURE__ */ Q("button", {
4999
5046
  type: "button",
@@ -5012,12 +5059,12 @@ function $s({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
5012
5059
  }) : null]
5013
5060
  });
5014
5061
  }
5015
- function ec(e) {
5062
+ function lc(e) {
5016
5063
  return e && e.trim().split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || null;
5017
5064
  }
5018
5065
  //#endregion
5019
5066
  //#region src/runtime/use-drag.ts
5020
- function tc(e) {
5067
+ function uc(e) {
5021
5068
  let t = W(e);
5022
5069
  U(() => {
5023
5070
  t.current = e;
@@ -5047,8 +5094,8 @@ function tc(e) {
5047
5094
  h = !0, r(!0), t.current.onStart?.();
5048
5095
  }
5049
5096
  let a = Math.max(p, window.innerWidth - u - p), _ = Math.max(p, window.innerHeight - d - p), v = {
5050
- left: nc(c + n, p, a),
5051
- top: nc(l + i, p, _)
5097
+ left: dc(c + n, p, a),
5098
+ top: dc(l + i, p, _)
5052
5099
  };
5053
5100
  g = v, t.current.onMove(v);
5054
5101
  }
@@ -5063,12 +5110,12 @@ function tc(e) {
5063
5110
  isDragging: n
5064
5111
  };
5065
5112
  }
5066
- function nc(e, t, n) {
5113
+ function dc(e, t, n) {
5067
5114
  return Math.max(t, Math.min(n, e));
5068
5115
  }
5069
5116
  //#endregion
5070
5117
  //#region src/runtime/use-focus-trap.ts
5071
- var rc = [
5118
+ var fc = [
5072
5119
  "a[href]",
5073
5120
  "button:not([disabled])",
5074
5121
  "input:not([disabled])",
@@ -5076,14 +5123,14 @@ var rc = [
5076
5123
  "textarea:not([disabled])",
5077
5124
  "[tabindex]:not([tabindex=\"-1\"])"
5078
5125
  ].join(",");
5079
- function ic(e, t) {
5126
+ function pc(e, t) {
5080
5127
  H(() => {
5081
5128
  if (!t) return;
5082
5129
  let n = e.current;
5083
5130
  if (!n) return;
5084
5131
  function r(e) {
5085
5132
  if (e.key !== "Tab") return;
5086
- let t = Array.from(n.querySelectorAll(rc)), r = t[0], i = t[t.length - 1];
5133
+ let t = Array.from(n.querySelectorAll(fc)), r = t[0], i = t[t.length - 1];
5087
5134
  if (!r || !i) return;
5088
5135
  let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
5089
5136
  (e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
@@ -5093,7 +5140,7 @@ function ic(e, t) {
5093
5140
  }
5094
5141
  //#endregion
5095
5142
  //#region src/runtime/use-object-url.ts
5096
- function ac(e) {
5143
+ function mc(e) {
5097
5144
  let [t, n] = V(null);
5098
5145
  return H(() => {
5099
5146
  if (!e) {
@@ -5106,7 +5153,7 @@ function ac(e) {
5106
5153
  }
5107
5154
  //#endregion
5108
5155
  //#region src/runtime/ui/author-prompt.tsx
5109
- function oc({ mode: e = "guest-or-sign-in", isPending: t, isConnecting: n = !1, isSigningIn: r = !1, onSubmit: i, onCancel: a, onSignIn: o, onSignOut: s }) {
5156
+ function hc({ mode: e = "guest-or-sign-in", isPending: t, isConnecting: n = !1, isSigningIn: r = !1, onSubmit: i, onCancel: a, onSignIn: o, onSignOut: s }) {
5110
5157
  let [c, l] = V(""), [u, d] = V(""), f = W(null);
5111
5158
  H(() => {
5112
5159
  f.current?.focus();
@@ -5240,27 +5287,27 @@ function oc({ mode: e = "guest-or-sign-in", isPending: t, isConnecting: n = !1,
5240
5287
  }
5241
5288
  //#endregion
5242
5289
  //#region src/runtime/mention-input.ts
5243
- var sc = "data-markup-mention", cc = "data-markup-mention-name", lc = /* @__PURE__ */ new Set([
5290
+ var gc = "data-markup-mention", _c = "data-markup-mention-name", vc = /* @__PURE__ */ new Set([
5244
5291
  "DIV",
5245
5292
  "P",
5246
5293
  "LI",
5247
5294
  "BLOCKQUOTE",
5248
5295
  "PRE"
5249
- ]), uc = 3, dc = 1;
5250
- function fc(e) {
5296
+ ]), yc = 3, bc = 1;
5297
+ function xc(e) {
5251
5298
  let t = "", n = (r) => {
5252
5299
  let i = r.childNodes;
5253
5300
  for (let a = 0; a < i.length; a++) {
5254
5301
  let o = i[a];
5255
5302
  if (!o) continue;
5256
- if (o.nodeType === uc) {
5303
+ if (o.nodeType === yc) {
5257
5304
  t += o.data;
5258
5305
  continue;
5259
5306
  }
5260
- if (o.nodeType !== dc) continue;
5261
- let s = o, c = s.getAttribute(sc);
5307
+ if (o.nodeType !== bc) continue;
5308
+ let s = o, c = s.getAttribute(gc);
5262
5309
  if (c) {
5263
- let e = pc(s);
5310
+ let e = Sc(s);
5264
5311
  t += qr({
5265
5312
  userId: c,
5266
5313
  name: e
@@ -5271,77 +5318,77 @@ function fc(e) {
5271
5318
  (r !== e || a !== i.length - 1) && (t += "\n");
5272
5319
  continue;
5273
5320
  }
5274
- lc.has(s.tagName) && t !== "" && !t.endsWith("\n") && (t += "\n"), n(s);
5321
+ vc.has(s.tagName) && t !== "" && !t.endsWith("\n") && (t += "\n"), n(s);
5275
5322
  }
5276
5323
  };
5277
5324
  return n(e), t;
5278
5325
  }
5279
- function pc(e) {
5280
- return e.getAttribute(cc) || (e.textContent ?? "").replace(/^@/, "");
5326
+ function Sc(e) {
5327
+ return e.getAttribute(_c) || (e.textContent ?? "").replace(/^@/, "");
5281
5328
  }
5282
- function mc(e, t, n) {
5329
+ function Cc(e, t, n) {
5283
5330
  let r = e.createElement("span");
5284
- return r.className = n, r.setAttribute("contenteditable", "false"), r.setAttribute(sc, t.userId), r.setAttribute(cc, t.name), r.textContent = `@${t.name}`, r;
5331
+ return r.className = n, r.setAttribute("contenteditable", "false"), r.setAttribute(gc, t.userId), r.setAttribute(_c, t.name), r.textContent = `@${t.name}`, r;
5285
5332
  }
5286
- function hc(e, t, n) {
5333
+ function wc(e, t, n) {
5287
5334
  let r = e.createDocumentFragment();
5288
5335
  for (let i of Wr(t)) {
5289
5336
  if (i.type === "text") {
5290
5337
  i.value && r.appendChild(e.createTextNode(i.value));
5291
5338
  continue;
5292
5339
  }
5293
- r.appendChild(mc(e, {
5340
+ r.appendChild(Cc(e, {
5294
5341
  userId: i.userId,
5295
5342
  name: i.name
5296
5343
  }, n));
5297
5344
  }
5298
5345
  return r;
5299
5346
  }
5300
- function gc(e) {
5347
+ function Tc(e) {
5301
5348
  let t = e.getRootNode();
5302
5349
  return typeof t.getSelection == "function" ? t.getSelection() : e.ownerDocument.getSelection();
5303
5350
  }
5304
- function _c(e) {
5305
- let t = gc(e);
5351
+ function Ec(e) {
5352
+ let t = Tc(e);
5306
5353
  if (!t || t.rangeCount === 0 || !t.isCollapsed) return null;
5307
5354
  let n = t.focusNode;
5308
- return !n || n.nodeType !== uc || !e.contains(n) || vc(n, e) ? null : {
5355
+ return !n || n.nodeType !== yc || !e.contains(n) || Dc(n, e) ? null : {
5309
5356
  node: n,
5310
5357
  offset: t.focusOffset
5311
5358
  };
5312
5359
  }
5313
- function vc(e, t) {
5360
+ function Dc(e, t) {
5314
5361
  let n = e;
5315
5362
  for (; n && n !== t;) {
5316
- if (n.nodeType === dc && n.hasAttribute("data-markup-mention")) return n;
5363
+ if (n.nodeType === bc && n.hasAttribute("data-markup-mention")) return n;
5317
5364
  n = n.parentNode;
5318
5365
  }
5319
5366
  return null;
5320
5367
  }
5321
- function yc(e) {
5322
- let t = gc(e);
5368
+ function Oc(e) {
5369
+ let t = Tc(e);
5323
5370
  if (!t || t.rangeCount === 0 || !t.isCollapsed) return;
5324
5371
  let n = t.focusNode;
5325
5372
  if (!n || !e.contains(n)) return;
5326
- let r = vc(n, e);
5373
+ let r = Dc(n, e);
5327
5374
  if (!r) return;
5328
5375
  let i = r.nextSibling;
5329
- (!i || i.nodeType !== uc) && (i = e.ownerDocument.createTextNode(""), r.parentNode?.insertBefore(i, r.nextSibling)), bc(e, i, 0);
5376
+ (!i || i.nodeType !== yc) && (i = e.ownerDocument.createTextNode(""), r.parentNode?.insertBefore(i, r.nextSibling)), kc(e, i, 0);
5330
5377
  }
5331
- function bc(e, t, n) {
5332
- let r = gc(e);
5378
+ function kc(e, t, n) {
5379
+ let r = Tc(e);
5333
5380
  if (!r) return;
5334
5381
  let i = e.ownerDocument.createRange();
5335
5382
  i.setStart(t, n), i.collapse(!0), r.removeAllRanges(), r.addRange(i);
5336
5383
  }
5337
- function xc(e) {
5384
+ function Ac(e) {
5338
5385
  let t = Kr(e.node.data, e.offset);
5339
5386
  return t ? {
5340
5387
  ...t,
5341
5388
  textNode: e.node
5342
5389
  } : null;
5343
5390
  }
5344
- function Sc(e, t, n, r) {
5391
+ function jc(e, t, n, r) {
5345
5392
  if (qr(n) == null) return !1;
5346
5393
  let i = t.textNode;
5347
5394
  if (!e.contains(i)) return !1;
@@ -5349,31 +5396,31 @@ function Sc(e, t, n, r) {
5349
5396
  if (!a || t.caret > i.data.length) return !1;
5350
5397
  i.deleteData(t.at, t.caret - t.at);
5351
5398
  let o = i.splitText(t.at);
5352
- return a.insertBefore(mc(e.ownerDocument, n, r), o), o.data.startsWith(" ") || o.insertData(0, " "), bc(e, o, 1), !0;
5399
+ return a.insertBefore(Cc(e.ownerDocument, n, r), o), o.data.startsWith(" ") || o.insertData(0, " "), kc(e, o, 1), !0;
5353
5400
  }
5354
- function Cc(e, t) {
5355
- let n = gc(e);
5401
+ function Mc(e, t) {
5402
+ let n = Tc(e);
5356
5403
  if (!n || n.rangeCount === 0) return;
5357
5404
  let r = n.getRangeAt(0);
5358
5405
  if (!e.contains(r.commonAncestorContainer)) return;
5359
5406
  r.deleteContents();
5360
5407
  let { startContainer: i, startOffset: a } = r;
5361
- if (i.nodeType === uc) {
5408
+ if (i.nodeType === yc) {
5362
5409
  let n = i;
5363
- n.insertData(a, t), bc(e, n, a + t.length);
5410
+ n.insertData(a, t), kc(e, n, a + t.length);
5364
5411
  return;
5365
5412
  }
5366
5413
  let o = e.ownerDocument.createTextNode(t);
5367
- r.insertNode(o), bc(e, o, o.data.length);
5414
+ r.insertNode(o), kc(e, o, o.data.length);
5368
5415
  }
5369
- function wc(e, t) {
5416
+ function Nc(e, t) {
5370
5417
  let n = e.ownerDocument, r = null, i = null, a = !0;
5371
5418
  function o(t) {
5372
5419
  let n = t.length === 0;
5373
5420
  (n !== a || e.hasAttribute("data-empty") !== n) && (a = n, e.toggleAttribute("data-empty", n));
5374
5421
  }
5375
5422
  function s() {
5376
- let n = fc(e);
5423
+ let n = xc(e);
5377
5424
  o(n), t.onChange(n);
5378
5425
  }
5379
5426
  function c(e) {
@@ -5389,7 +5436,7 @@ function wc(e, t) {
5389
5436
  c(null);
5390
5437
  return;
5391
5438
  }
5392
- let n = _c(e), r = n ? xc(n) : null;
5439
+ let n = Ec(e), r = n ? Ac(n) : null;
5393
5440
  if (r && i && r.textNode === i.node && r.at === i.at) {
5394
5441
  c(null);
5395
5442
  return;
@@ -5397,29 +5444,29 @@ function wc(e, t) {
5397
5444
  i = null, c(r);
5398
5445
  }
5399
5446
  function u(r) {
5400
- e.replaceChildren(hc(n, r, t.chipClass)), o(fc(e)), i = null, c(null);
5447
+ e.replaceChildren(wc(n, r, t.chipClass)), o(xc(e)), i = null, c(null);
5401
5448
  }
5402
5449
  let d = () => {
5403
5450
  s(), l();
5404
5451
  }, f = () => l(), p = () => {
5405
- yc(e), l();
5452
+ Oc(e), l();
5406
5453
  }, m = (t) => {
5407
5454
  let n = t.clipboardData?.getData("text/plain");
5408
- t.preventDefault(), n && (Cc(e, n.replace(/\r\n?/g, "\n")), s(), l());
5455
+ t.preventDefault(), n && (Mc(e, n.replace(/\r\n?/g, "\n")), s(), l());
5409
5456
  }, h = (e) => {
5410
5457
  e.preventDefault();
5411
5458
  };
5412
5459
  return e.addEventListener("input", d), e.addEventListener("keyup", f), e.addEventListener("mouseup", p), e.addEventListener("focus", p), e.addEventListener("paste", m), e.addEventListener("drop", h), u(t.initialValue ?? ""), {
5413
- getValue: () => fc(e),
5460
+ getValue: () => xc(e),
5414
5461
  setValue: u,
5415
5462
  focus() {
5416
5463
  e.focus();
5417
5464
  let t = e.lastChild;
5418
- t && (t.nodeType === uc ? bc(e, t, t.data.length) : bc(e, e, e.childNodes.length));
5465
+ t && (t.nodeType === yc ? kc(e, t, t.data.length) : kc(e, e, e.childNodes.length));
5419
5466
  },
5420
5467
  insertMention(n) {
5421
- let a = _c(e), o = (a ? xc(a) : null) ?? r;
5422
- o && Sc(e, o, n, t.chipClass) && (s(), i = null, c(null));
5468
+ let a = Ec(e), o = (a ? Ac(a) : null) ?? r;
5469
+ o && jc(e, o, n, t.chipClass) && (s(), i = null, c(null));
5423
5470
  },
5424
5471
  syncTrigger: l,
5425
5472
  clearTrigger: () => c(null),
@@ -5434,42 +5481,42 @@ function wc(e, t) {
5434
5481
  }
5435
5482
  };
5436
5483
  }
5437
- var Tc = null;
5438
- function Ec() {
5439
- if (Tc) return Tc;
5484
+ var Pc = null;
5485
+ function Fc() {
5486
+ if (Pc) return Pc;
5440
5487
  if (typeof document > "u") return "true";
5441
5488
  let e = document.createElement("div");
5442
5489
  try {
5443
- e.contentEditable = "plaintext-only", Tc = e.contentEditable === "plaintext-only" ? "plaintext-only" : "true";
5490
+ e.contentEditable = "plaintext-only", Pc = e.contentEditable === "plaintext-only" ? "plaintext-only" : "true";
5444
5491
  } catch {
5445
- Tc = "true";
5492
+ Pc = "true";
5446
5493
  }
5447
- return Tc;
5494
+ return Pc;
5448
5495
  }
5449
5496
  //#endregion
5450
5497
  //#region src/lib/linkify.ts
5451
- var Dc = /(^|[\s([{<'"])((?:https?:\/\/|www\.)[^\s<>'"]+)/gi, Oc = ".,;:!?", kc = {
5498
+ var Ic = /(^|[\s([{<'"])((?:https?:\/\/|www\.)[^\s<>'"]+)/gi, Lc = ".,;:!?", Rc = {
5452
5499
  ")": "(",
5453
5500
  "]": "[",
5454
5501
  "}": "{"
5455
5502
  };
5456
- function Ac(e, t) {
5503
+ function zc(e, t) {
5457
5504
  let n = 0;
5458
5505
  for (let r of e) r === t && (n += 1);
5459
5506
  return n;
5460
5507
  }
5461
- function jc(e) {
5508
+ function Bc(e) {
5462
5509
  let t = e.length;
5463
5510
  for (; t > 0;) {
5464
5511
  let n = e[t - 1] ?? "";
5465
- if (Oc.includes(n)) {
5512
+ if (Lc.includes(n)) {
5466
5513
  --t;
5467
5514
  continue;
5468
5515
  }
5469
- let r = kc[n];
5516
+ let r = Rc[n];
5470
5517
  if (r !== void 0) {
5471
5518
  let i = e.slice(0, t);
5472
- if (Ac(i, n) > Ac(i, r)) {
5519
+ if (zc(i, n) > zc(i, r)) {
5473
5520
  --t;
5474
5521
  continue;
5475
5522
  }
@@ -5478,15 +5525,15 @@ function jc(e) {
5478
5525
  }
5479
5526
  return e.slice(0, t);
5480
5527
  }
5481
- function Mc(e) {
5528
+ function Vc(e) {
5482
5529
  let t = /^https?:\/\//i.test(e) ? e : `https://${e}`, n = t.replace(/^https?:\/\//i, "").split(/[/?#]/, 1)[0] ?? "";
5483
5530
  return !n.includes(".") || n.startsWith(".") || n.endsWith(".") ? null : t;
5484
5531
  }
5485
- function Nc(e) {
5532
+ function Hc(e) {
5486
5533
  if (!e) return [];
5487
- let t = [], n = 0, r = new RegExp(Dc.source, "gi");
5534
+ let t = [], n = 0, r = new RegExp(Ic.source, "gi");
5488
5535
  for (let i = r.exec(e); i !== null; i = r.exec(e)) {
5489
- let a = i[1] ?? "", o = jc(i[2] ?? ""), s = o ? Mc(o) : null;
5536
+ let a = i[1] ?? "", o = Bc(i[2] ?? ""), s = o ? Vc(o) : null;
5490
5537
  if (!s) continue;
5491
5538
  let c = i.index + a.length;
5492
5539
  c > n && t.push({
@@ -5505,14 +5552,14 @@ function Nc(e) {
5505
5552
  }
5506
5553
  //#endregion
5507
5554
  //#region src/runtime/ui/mentions.tsx
5508
- function Pc({ body: e, mentions: t, trailing: n }) {
5555
+ function Uc({ body: e, mentions: t, trailing: n }) {
5509
5556
  let r = nt(() => new Set(t), [t]);
5510
5557
  return /* @__PURE__ */ Q("p", {
5511
5558
  class: "markup-comment-body",
5512
5559
  children: [nt(() => Wr(e), [e]).map((e, t) => e.type === "mention" ? r.has(e.userId) ? /* @__PURE__ */ Q("span", {
5513
5560
  class: "markup-mention-chip",
5514
5561
  children: ["@", e.name]
5515
- }, t) : /* @__PURE__ */ Q("span", { children: ["@", e.name] }, t) : Nc(e.value).map((e, n) => e.type === "link" ? /* @__PURE__ */ Q("a", {
5562
+ }, t) : /* @__PURE__ */ Q("span", { children: ["@", e.name] }, t) : Hc(e.value).map((e, n) => e.type === "link" ? /* @__PURE__ */ Q("a", {
5516
5563
  class: "markup-comment-link",
5517
5564
  href: e.href,
5518
5565
  target: "_blank",
@@ -5521,7 +5568,7 @@ function Pc({ body: e, mentions: t, trailing: n }) {
5521
5568
  }, `${t}-${n}`) : /* @__PURE__ */ Q("span", { children: e.value }, `${t}-${n}`))), n]
5522
5569
  });
5523
5570
  }
5524
- function Fc(e) {
5571
+ function Wc(e) {
5525
5572
  let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] = V(0), s = nt(() => {
5526
5573
  if (!n) return [];
5527
5574
  let e = n.query.toLowerCase();
@@ -5549,12 +5596,12 @@ function Fc(e) {
5549
5596
  handleKeyDown: c
5550
5597
  };
5551
5598
  }
5552
- function Ic({ items: e, highlight: t, setHighlight: n, onSelect: r, anchor: i }) {
5599
+ function Gc({ items: e, highlight: t, setHighlight: n, onSelect: r, anchor: i }) {
5553
5600
  let a = W(null);
5554
5601
  return U(() => {
5555
5602
  let e = null;
5556
5603
  function t() {
5557
- i.current && a.current && zc(i.current, a.current);
5604
+ i.current && a.current && Jc(i.current, a.current);
5558
5605
  }
5559
5606
  function n() {
5560
5607
  e ??= requestAnimationFrame(() => {
@@ -5596,16 +5643,16 @@ function Ic({ items: e, highlight: t, setHighlight: n, onSelect: r, anchor: i })
5596
5643
  }, e.userId))
5597
5644
  });
5598
5645
  }
5599
- var Lc = 4, Rc = 8;
5600
- function zc(e, t) {
5646
+ var Kc = 4, qc = 8;
5647
+ function Jc(e, t) {
5601
5648
  let n = e.getBoundingClientRect(), r = n.bottom > 0 && n.top < window.innerHeight && n.right > 0 && n.left < window.innerWidth;
5602
5649
  if (t.style.visibility = r ? "" : "hidden", !r) return;
5603
- let i = t.offsetHeight, a = n.top - Rc, o = window.innerHeight - n.bottom - Rc, s = a >= i + Lc || a >= o ? n.top - Lc - i : n.bottom + Lc, c = window.innerHeight - i - Rc;
5604
- t.style.top = `${Math.max(Rc, Math.min(s, c))}px`, t.style.left = `${n.left}px`, t.style.width = `${n.width}px`;
5650
+ let i = t.offsetHeight, a = n.top - qc, o = window.innerHeight - n.bottom - qc, s = a >= i + Kc || a >= o ? n.top - Kc - i : n.bottom + Kc, c = window.innerHeight - i - qc;
5651
+ t.style.top = `${Math.max(qc, Math.min(s, c))}px`, t.style.left = `${n.left}px`, t.style.width = `${n.width}px`;
5605
5652
  }
5606
5653
  //#endregion
5607
5654
  //#region src/runtime/ui/mention-input.tsx
5608
- function Bc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeholder: a, disabled: o = !1, autoFocus: s = !1, class: c, handle: l }) {
5655
+ function Yc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeholder: a, disabled: o = !1, autoFocus: s = !1, class: c, handle: l }) {
5609
5656
  let u = W(null), d = W(null), [f, p] = V(null), m = W(t), h = W(r);
5610
5657
  U(() => {
5611
5658
  m.current = t, h.current = r;
@@ -5614,7 +5661,7 @@ function Bc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5614
5661
  U(() => {
5615
5662
  let e = u.current;
5616
5663
  if (!e) return;
5617
- let t = wc(e, {
5664
+ let t = Nc(e, {
5618
5665
  chipClass: "markup-mention-chip",
5619
5666
  initialValue: g.current,
5620
5667
  onChange: (e) => m.current(e),
@@ -5634,7 +5681,7 @@ function Bc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5634
5681
  let t = d.current;
5635
5682
  t && t.getValue() !== e && t.setValue(e);
5636
5683
  }, [e]);
5637
- let _ = Fc({
5684
+ let _ = Wc({
5638
5685
  members: r ?? [],
5639
5686
  trigger: f,
5640
5687
  onSelect: (e) => d.current?.insertMention(e),
@@ -5647,7 +5694,7 @@ function Bc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5647
5694
  "aria-label": i,
5648
5695
  "aria-disabled": o || void 0,
5649
5696
  class: Z("markup-mention-input", c),
5650
- contentEditable: o ? "false" : Ec(),
5697
+ contentEditable: o ? "false" : Fc(),
5651
5698
  "data-placeholder": a,
5652
5699
  tabIndex: o ? -1 : 0,
5653
5700
  onKeyDown: (e) => {
@@ -5656,7 +5703,7 @@ function Bc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5656
5703
  onBlur: () => {
5657
5704
  setTimeout(() => d.current?.clearTrigger(), 120);
5658
5705
  }
5659
- }), _.isOpen ? /* @__PURE__ */ Q(Ic, {
5706
+ }), _.isOpen ? /* @__PURE__ */ Q(Gc, {
5660
5707
  items: _.items,
5661
5708
  highlight: _.highlight,
5662
5709
  setHighlight: _.setHighlight,
@@ -5666,8 +5713,8 @@ function Bc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5666
5713
  }
5667
5714
  //#endregion
5668
5715
  //#region src/runtime/ui/composer.tsx
5669
- var Vc = 4e3;
5670
- function Hc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o, onDirtyChange: s, members: c }) {
5716
+ var Xc = 4e3;
5717
+ function Zc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o, onDirtyChange: s, members: c }) {
5671
5718
  let [l, u] = V(""), d = W(null), f = W(!1);
5672
5719
  H(() => {
5673
5720
  f.current && !i && !a && (u(""), s?.(!1), d.current?.focus()), f.current = i;
@@ -5676,7 +5723,7 @@ function Hc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
5676
5723
  a,
5677
5724
  s
5678
5725
  ]);
5679
- let p = Vc - l.length, m = p < 0;
5726
+ let p = Xc - l.length, m = p < 0;
5680
5727
  function h(e) {
5681
5728
  e?.preventDefault();
5682
5729
  let t = l.trim();
@@ -5685,7 +5732,7 @@ function Hc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
5685
5732
  function g(e) {
5686
5733
  (e.metaKey || e.ctrlKey) && e.key === "Enter" && h(e);
5687
5734
  }
5688
- let _ = l.length > 0, v = Es();
5735
+ let _ = l.length > 0, v = Fs();
5689
5736
  function y(e) {
5690
5737
  return /* @__PURE__ */ Q("button", {
5691
5738
  type: "submit",
@@ -5694,14 +5741,14 @@ function Hc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
5694
5741
  "aria-label": i ? "Sending…" : n,
5695
5742
  title: i ? "Sending…" : n,
5696
5743
  tabIndex: e,
5697
- children: /* @__PURE__ */ Q(Fs, { size: 14 })
5744
+ children: /* @__PURE__ */ Q(Ws, { size: 14 })
5698
5745
  });
5699
5746
  }
5700
5747
  return /* @__PURE__ */ Q("form", {
5701
5748
  class: Z("markup-composer", _ && "is-filled"),
5702
5749
  onSubmit: h,
5703
5750
  children: [
5704
- /* @__PURE__ */ Q(Bc, {
5751
+ /* @__PURE__ */ Q(Yc, {
5705
5752
  class: "markup-composer-input",
5706
5753
  label: e,
5707
5754
  placeholder: t,
@@ -5757,17 +5804,17 @@ function Hc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
5757
5804
  }
5758
5805
  //#endregion
5759
5806
  //#region src/runtime/ui/new-thread-popover.tsx
5760
- var Uc = [], Wc = "https://markup.pixelmatters.dev/docs/install#9-screenshots-privacy";
5761
- function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified: i, isIdentityResolving: a, isSigningIn: o, isPending: s, error: c, screenshot: l, isScreenshotCapturing: u, screenshotFailed: d, screenshotRedactedCount: f, screenshotRedactedSelectors: p, members: m = Uc, isLeaving: h = !1, onAuthor: g, onSignIn: _, onSignOut: v, onSubmit: y, onClose: b }) {
5807
+ var Qc = [], $c = "https://markup.pixelmatters.dev/docs/install#9-screenshots-privacy";
5808
+ function el({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified: i, isIdentityResolving: a, isSigningIn: o, isPending: s, error: c, screenshot: l, isScreenshotCapturing: u, screenshotFailed: d, screenshotRedactedCount: f, screenshotRedactedSelectors: p, members: m = Qc, isLeaving: h = !1, onAuthor: g, onSignIn: _, onSignOut: v, onSubmit: y, onClose: b }) {
5762
5809
  let x = W(null);
5763
- ic(x, !h);
5810
+ pc(x, !h);
5764
5811
  let C = W(!1), w = W(!1), [T, E] = V(!1), D = ei(T || null, 120), O = G((e) => {
5765
5812
  w.current = e, E(e);
5766
5813
  }, []), k = G(() => {
5767
5814
  w.current || (C.current ? O(!0) : b());
5768
5815
  }, [b, O]), A = G(() => {
5769
5816
  O(!1), x.current?.querySelector(".markup-mention-input")?.focus();
5770
- }, [O]), [j, ee] = V(!1), [M, te] = V(!1), N = ac(l), ne = W(null), [P, F] = V(null), { onPointerDown: re, isDragging: ie } = tc({
5817
+ }, [O]), [j, ee] = V(!1), [M, te] = V(!1), N = mc(l), ne = W(null), [P, F] = V(null), { onPointerDown: re, isDragging: ie } = uc({
5771
5818
  targetRef: x,
5772
5819
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
5773
5820
  onMove: F
@@ -5802,7 +5849,7 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
5802
5849
  ]), H(() => {
5803
5850
  T && x.current?.querySelector(".markup-discard-confirm-keep")?.focus();
5804
5851
  }, [T]);
5805
- let ae = Kc(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), oe = Kc(t - window.scrollY - 16, 12, window.innerHeight - 220), se = typeof window < "u" ? window.location.href : "", ce = l != null, le = u || ce || d, ue = j && ce;
5852
+ let ae = tl(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), oe = tl(t - window.scrollY - 16, 12, window.innerHeight - 220), se = typeof window < "u" ? window.location.href : "", ce = l != null, le = u || ce || d, ue = j && ce;
5806
5853
  return /* @__PURE__ */ Q("div", {
5807
5854
  ref: x,
5808
5855
  class: Z("markup-popover", P && "is-floating", ie && "is-dragging", h && "is-leaving"),
@@ -5827,7 +5874,7 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
5827
5874
  class: "markup-icon-btn",
5828
5875
  "aria-label": "Discard pin",
5829
5876
  onClick: k,
5830
- children: /* @__PURE__ */ Q(ks, { size: 16 })
5877
+ children: /* @__PURE__ */ Q(Rs, { size: 16 })
5831
5878
  })]
5832
5879
  }),
5833
5880
  r == null ? /* @__PURE__ */ Q("div", {
@@ -5847,7 +5894,7 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
5847
5894
  }) : null
5848
5895
  ]
5849
5896
  }),
5850
- /* @__PURE__ */ Q(Hc, {
5897
+ /* @__PURE__ */ Q(Zc, {
5851
5898
  label: "Feedback",
5852
5899
  placeholder: "What's wrong, missing, or worth noting?",
5853
5900
  submitLabel: "Post markup",
@@ -5872,13 +5919,13 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
5872
5919
  class: "markup-screenshot-checkbox",
5873
5920
  disabled: !0
5874
5921
  }),
5875
- /* @__PURE__ */ Q(Ps, { size: 12 }),
5922
+ /* @__PURE__ */ Q(Us, { size: 12 }),
5876
5923
  /* @__PURE__ */ Q("span", { children: "Capturing…" })
5877
5924
  ]
5878
5925
  }) : d ? /* @__PURE__ */ Q("span", {
5879
5926
  class: "markup-screenshot-status",
5880
5927
  title: "This page has something the capture can't read, often a third-party image. Your comment will post without a screenshot.",
5881
- children: [/* @__PURE__ */ Q(Ps, { size: 12 }), /* @__PURE__ */ Q("span", { children: "Screenshot unavailable" })]
5928
+ children: [/* @__PURE__ */ Q(Us, { size: 12 }), /* @__PURE__ */ Q("span", { children: "Screenshot unavailable" })]
5882
5929
  }) : /* @__PURE__ */ Q("label", {
5883
5930
  class: "markup-screenshot-toggle",
5884
5931
  children: [
@@ -5888,7 +5935,7 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
5888
5935
  checked: j,
5889
5936
  onChange: (e) => ee(e.currentTarget.checked)
5890
5937
  }),
5891
- /* @__PURE__ */ Q(Ps, { size: 12 }),
5938
+ /* @__PURE__ */ Q(Us, { size: 12 }),
5892
5939
  /* @__PURE__ */ Q("span", { children: "Attach screenshot" })
5893
5940
  ]
5894
5941
  }),
@@ -5939,7 +5986,7 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
5939
5986
  " ",
5940
5987
  /* @__PURE__ */ Q("a", {
5941
5988
  class: "markup-screenshot-help-link",
5942
- href: Wc,
5989
+ href: $c,
5943
5990
  target: "_blank",
5944
5991
  rel: "noopener noreferrer",
5945
5992
  children: "More info here."
@@ -5948,7 +5995,7 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
5948
5995
  })] }) : null]
5949
5996
  }) : null
5950
5997
  ]
5951
- }) : /* @__PURE__ */ Q(oc, {
5998
+ }) : /* @__PURE__ */ Q(hc, {
5952
5999
  mode: r,
5953
6000
  isPending: s,
5954
6001
  isConnecting: a,
@@ -5969,7 +6016,7 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
5969
6016
  onClick: (e) => {
5970
6017
  e.stopPropagation(), ne.current?.close();
5971
6018
  },
5972
- children: /* @__PURE__ */ Q(ks, { size: 16 })
6019
+ children: /* @__PURE__ */ Q(Rs, { size: 16 })
5973
6020
  }), /* @__PURE__ */ Q("img", {
5974
6021
  class: "markup-lightbox-img",
5975
6022
  src: N,
@@ -6013,12 +6060,12 @@ function Gc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
6013
6060
  ]
6014
6061
  });
6015
6062
  }
6016
- function Kc(e, t, n) {
6063
+ function tl(e, t, n) {
6017
6064
  return Math.max(t, Math.min(n, e));
6018
6065
  }
6019
6066
  //#endregion
6020
6067
  //#region src/runtime/ui/notifications-panel.tsx
6021
- function qc({ state: e, onBack: t, onItemClick: n, onMarkAllRead: r, isMarkingAll: i }) {
6068
+ function nl({ state: e, onBack: t, onItemClick: n, onMarkAllRead: r, isMarkingAll: i }) {
6022
6069
  let a = e.kind === "ready" && e.items.some((e) => e.readAt == null);
6023
6070
  return /* @__PURE__ */ Q("div", {
6024
6071
  class: "markup-notifications-panel",
@@ -6033,7 +6080,7 @@ function qc({ state: e, onBack: t, onItemClick: n, onMarkAllRead: r, isMarkingAl
6033
6080
  title: "Back to menu",
6034
6081
  "aria-label": "Back to menu",
6035
6082
  onClick: t,
6036
- children: /* @__PURE__ */ Q(As, { size: 16 })
6083
+ children: /* @__PURE__ */ Q(zs, { size: 16 })
6037
6084
  }),
6038
6085
  /* @__PURE__ */ Q("span", {
6039
6086
  class: "markup-eyebrow",
@@ -6091,7 +6138,7 @@ function qc({ state: e, onBack: t, onItemClick: n, onMarkAllRead: r, isMarkingAl
6091
6138
  role: "img",
6092
6139
  "aria-label": "Written by an AI agent",
6093
6140
  title: "Written by an AI agent on this person's behalf",
6094
- children: /* @__PURE__ */ Q(Xs, { size: 11 })
6141
+ children: /* @__PURE__ */ Q(ac, { size: 11 })
6095
6142
  }) : null,
6096
6143
  /* @__PURE__ */ Q("span", {
6097
6144
  class: "markup-notifications-panel-sep",
@@ -6099,7 +6146,7 @@ function qc({ state: e, onBack: t, onItemClick: n, onMarkAllRead: r, isMarkingAl
6099
6146
  }),
6100
6147
  /* @__PURE__ */ Q("span", {
6101
6148
  class: "markup-notifications-panel-time",
6102
- children: Jc(e.createdAt)
6149
+ children: rl(e.createdAt)
6103
6150
  })
6104
6151
  ]
6105
6152
  }),
@@ -6131,7 +6178,7 @@ function qc({ state: e, onBack: t, onItemClick: n, onMarkAllRead: r, isMarkingAl
6131
6178
  })]
6132
6179
  });
6133
6180
  }
6134
- function Jc(e) {
6181
+ function rl(e) {
6135
6182
  let t = Date.now() - e, n = Math.floor(t / 1e3);
6136
6183
  if (n < 60) return "just now";
6137
6184
  let r = Math.floor(n / 60);
@@ -6143,7 +6190,7 @@ function Jc(e) {
6143
6190
  }
6144
6191
  //#endregion
6145
6192
  //#region src/runtime/use-theme.ts
6146
- function Yc() {
6193
+ function il() {
6147
6194
  let [, e] = V(0);
6148
6195
  return H(() => Ve(() => e((e) => e + 1)), []), {
6149
6196
  mode: Re(),
@@ -6153,7 +6200,7 @@ function Yc() {
6153
6200
  }
6154
6201
  //#endregion
6155
6202
  //#region src/runtime/ui/privacy-panel.tsx
6156
- function Xc({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture: r, autoCaptureLocked: i, isForgettingMe: a, forgetMeError: o, onForgetMe: s, onBack: c }) {
6203
+ function al({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture: r, autoCaptureLocked: i, isForgettingMe: a, forgetMeError: o, onForgetMe: s, onBack: c }) {
6157
6204
  let [l, u] = V(!1), d = aa(e), f = e.kind === "verified", p = f ? e.identity.email : void 0, m = e.kind === "anon";
6158
6205
  return /* @__PURE__ */ Q("div", {
6159
6206
  class: "markup-panel",
@@ -6164,7 +6211,7 @@ function Xc({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture:
6164
6211
  class: "markup-panel-back",
6165
6212
  "aria-label": "Back to menu",
6166
6213
  onClick: c,
6167
- children: [/* @__PURE__ */ Q(As, { size: 14 }), /* @__PURE__ */ Q("span", { children: "Back" })]
6214
+ children: [/* @__PURE__ */ Q(zs, { size: 14 }), /* @__PURE__ */ Q("span", { children: "Back" })]
6168
6215
  }), /* @__PURE__ */ Q("span", {
6169
6216
  class: "markup-eyebrow",
6170
6217
  children: "privacy & data"
@@ -6255,7 +6302,7 @@ function Xc({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture:
6255
6302
  "Only ",
6256
6303
  /* @__PURE__ */ Q("span", {
6257
6304
  class: "markup-panel-mono",
6258
- children: Zc(t)
6305
+ children: ol(t)
6259
6306
  }),
6260
6307
  ". No analytics, no ad tech, no third-party requests from the widget. If the widget itself crashes it posts the error, this page's URL and your user-agent to that same host, never your identity or what you were writing."
6261
6308
  ]
@@ -6291,7 +6338,7 @@ function Xc({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture:
6291
6338
  })]
6292
6339
  });
6293
6340
  }
6294
- function Zc(e) {
6341
+ function ol(e) {
6295
6342
  try {
6296
6343
  return new URL(e).host;
6297
6344
  } catch {
@@ -6300,8 +6347,8 @@ function Zc(e) {
6300
6347
  }
6301
6348
  //#endregion
6302
6349
  //#region src/runtime/ui/shortcuts-panel.tsx
6303
- function Qc({ onBack: e }) {
6304
- let { mod: t, enter: n } = Es();
6350
+ function sl({ onBack: e }) {
6351
+ let { mod: t, enter: n } = Fs();
6305
6352
  return /* @__PURE__ */ Q("div", {
6306
6353
  class: "markup-panel",
6307
6354
  children: [/* @__PURE__ */ Q("header", {
@@ -6311,7 +6358,7 @@ function Qc({ onBack: e }) {
6311
6358
  class: "markup-panel-back",
6312
6359
  "aria-label": "Back to menu",
6313
6360
  onClick: e,
6314
- children: [/* @__PURE__ */ Q(As, { size: 14 }), /* @__PURE__ */ Q("span", { children: "Back" })]
6361
+ children: [/* @__PURE__ */ Q(zs, { size: 14 }), /* @__PURE__ */ Q("span", { children: "Back" })]
6315
6362
  }), /* @__PURE__ */ Q("span", {
6316
6363
  class: "markup-eyebrow",
6317
6364
  children: "keyboard shortcuts"
@@ -6397,15 +6444,15 @@ function Qc({ onBack: e }) {
6397
6444
  }
6398
6445
  //#endregion
6399
6446
  //#region src/runtime/ui/overflow-menu.tsx
6400
- var $c = {
6447
+ var cl = {
6401
6448
  menu: "More options",
6402
6449
  privacy: "Privacy and data",
6403
6450
  shortcuts: "Keyboard shortcuts"
6404
6451
  };
6405
- function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, showResolved: a, onToggleShowResolved: o, onHideForSession: s, identity: c, apiUrl: l, commentAccess: u, isForgettingMe: d, forgetMeError: f, onForgetMe: p, version: m, dashboardUrl: h }) {
6452
+ function ll({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, showResolved: a, onToggleShowResolved: o, onHideForSession: s, identity: c, apiUrl: l, commentAccess: u, isForgettingMe: d, forgetMeError: f, onForgetMe: p, version: m, dashboardUrl: h }) {
6406
6453
  let [g, _] = V(!1), [v, y] = V("menu"), b = ei(g || null, 140), x = b?.isLeaving ?? !1, S = W(null), C = W(null), w = W(null), T = W(null), E = W("menu"), D = W(null), O = W(v);
6407
6454
  O.current = v;
6408
- let k = Yc();
6455
+ let k = il();
6409
6456
  H(() => {
6410
6457
  g && (y("menu"), E.current = "menu");
6411
6458
  }, [g]), U(() => {
@@ -6450,7 +6497,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6450
6497
  function A(e) {
6451
6498
  D.current = C.current?.getBoundingClientRect().height ?? null, e !== "menu" && (E.current = e), y(e);
6452
6499
  }
6453
- let j = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: ee } = Es();
6500
+ let j = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: ee } = Fs();
6454
6501
  return /* @__PURE__ */ Q("div", {
6455
6502
  ref: S,
6456
6503
  style: {
@@ -6469,17 +6516,17 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6469
6516
  onClick: (e) => {
6470
6517
  e.preventDefault(), e.stopPropagation(), _((e) => !e);
6471
6518
  },
6472
- children: /* @__PURE__ */ Q(Vs, { size: 16 })
6519
+ children: /* @__PURE__ */ Q(Xs, { size: 16 })
6473
6520
  }), b ? /* @__PURE__ */ Q("div", {
6474
6521
  ref: C,
6475
6522
  class: Z("markup-pop", j, x && "is-leaving"),
6476
6523
  "data-pop": "overflow",
6477
6524
  "data-view": v,
6478
6525
  role: "dialog",
6479
- "aria-label": $c[v],
6526
+ "aria-label": cl[v],
6480
6527
  tabIndex: -1,
6481
6528
  inert: x || void 0,
6482
- children: v === "privacy" ? /* @__PURE__ */ Q(Xc, {
6529
+ children: v === "privacy" ? /* @__PURE__ */ Q(al, {
6483
6530
  identity: c,
6484
6531
  apiUrl: l,
6485
6532
  commentAccess: u,
@@ -6493,7 +6540,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6493
6540
  });
6494
6541
  },
6495
6542
  onBack: () => A("menu")
6496
- }) : v === "shortcuts" ? /* @__PURE__ */ Q(Qc, { onBack: () => A("menu") }) : /* @__PURE__ */ Q("div", {
6543
+ }) : v === "shortcuts" ? /* @__PURE__ */ Q(sl, { onBack: () => A("menu") }) : /* @__PURE__ */ Q("div", {
6497
6544
  role: "menu",
6498
6545
  class: "markup-menu-view",
6499
6546
  children: [
@@ -6515,7 +6562,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6515
6562
  title: "Light",
6516
6563
  class: Z(k.mode === "light" && "is-on"),
6517
6564
  onClick: () => k.set("light"),
6518
- children: /* @__PURE__ */ Q(Hs, { size: 14 })
6565
+ children: /* @__PURE__ */ Q(Zs, { size: 14 })
6519
6566
  }),
6520
6567
  /* @__PURE__ */ Q("button", {
6521
6568
  type: "button",
@@ -6525,7 +6572,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6525
6572
  title: "Dark",
6526
6573
  class: Z(k.mode === "dark" && "is-on"),
6527
6574
  onClick: () => k.set("dark"),
6528
- children: /* @__PURE__ */ Q(Us, { size: 14 })
6575
+ children: /* @__PURE__ */ Q(Qs, { size: 14 })
6529
6576
  }),
6530
6577
  /* @__PURE__ */ Q("button", {
6531
6578
  type: "button",
@@ -6535,7 +6582,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6535
6582
  title: `Auto, currently ${k.resolved}`,
6536
6583
  class: Z(k.mode === "auto" && "is-on"),
6537
6584
  onClick: () => k.set("auto"),
6538
- children: /* @__PURE__ */ Q(Ws, { size: 14 })
6585
+ children: /* @__PURE__ */ Q($s, { size: 14 })
6539
6586
  })
6540
6587
  ]
6541
6588
  })]
@@ -6558,7 +6605,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6558
6605
  title: "Bottom left",
6559
6606
  class: Z(e === "bottom-left" && "is-on"),
6560
6607
  onClick: () => t("bottom-left"),
6561
- children: /* @__PURE__ */ Q(tl, { side: "left" })
6608
+ children: /* @__PURE__ */ Q(ul, { side: "left" })
6562
6609
  }),
6563
6610
  /* @__PURE__ */ Q("button", {
6564
6611
  type: "button",
@@ -6568,7 +6615,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6568
6615
  title: "Bottom center",
6569
6616
  class: Z(e === "bottom-center" && "is-on"),
6570
6617
  onClick: () => t("bottom-center"),
6571
- children: /* @__PURE__ */ Q(tl, { side: "center" })
6618
+ children: /* @__PURE__ */ Q(ul, { side: "center" })
6572
6619
  }),
6573
6620
  /* @__PURE__ */ Q("button", {
6574
6621
  type: "button",
@@ -6578,7 +6625,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6578
6625
  title: "Bottom right",
6579
6626
  class: Z(e === "bottom-right" && "is-on"),
6580
6627
  onClick: () => t("bottom-right"),
6581
- children: /* @__PURE__ */ Q(tl, { side: "right" })
6628
+ children: /* @__PURE__ */ Q(ul, { side: "right" })
6582
6629
  })
6583
6630
  ]
6584
6631
  })]
@@ -6600,7 +6647,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6600
6647
  children: [
6601
6648
  /* @__PURE__ */ Q("span", {
6602
6649
  class: "ic",
6603
- children: /* @__PURE__ */ Q(nl, {})
6650
+ children: /* @__PURE__ */ Q(dl, {})
6604
6651
  }),
6605
6652
  /* @__PURE__ */ Q("span", {
6606
6653
  class: "lbl",
@@ -6627,7 +6674,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6627
6674
  children: [
6628
6675
  /* @__PURE__ */ Q("span", {
6629
6676
  class: "ic",
6630
- children: /* @__PURE__ */ Q(Ns, { size: 16 })
6677
+ children: /* @__PURE__ */ Q(Hs, { size: 16 })
6631
6678
  }),
6632
6679
  /* @__PURE__ */ Q("span", {
6633
6680
  class: "lbl",
@@ -6651,7 +6698,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6651
6698
  children: [
6652
6699
  /* @__PURE__ */ Q("span", {
6653
6700
  class: "ic",
6654
- children: /* @__PURE__ */ Q(Gs, { size: 16 })
6701
+ children: /* @__PURE__ */ Q(ec, { size: 16 })
6655
6702
  }),
6656
6703
  /* @__PURE__ */ Q("span", {
6657
6704
  class: "lbl",
@@ -6660,7 +6707,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6660
6707
  /* @__PURE__ */ Q("span", {
6661
6708
  class: "right",
6662
6709
  "aria-hidden": "true",
6663
- children: /* @__PURE__ */ Q(js, { size: 14 })
6710
+ children: /* @__PURE__ */ Q(Bs, { size: 14 })
6664
6711
  })
6665
6712
  ]
6666
6713
  }),
@@ -6673,7 +6720,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6673
6720
  children: [
6674
6721
  /* @__PURE__ */ Q("span", {
6675
6722
  class: "ic",
6676
- children: /* @__PURE__ */ Q(Ks, { size: 16 })
6723
+ children: /* @__PURE__ */ Q(tc, { size: 16 })
6677
6724
  }),
6678
6725
  /* @__PURE__ */ Q("span", {
6679
6726
  class: "lbl",
@@ -6682,7 +6729,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6682
6729
  /* @__PURE__ */ Q("span", {
6683
6730
  class: "right",
6684
6731
  "aria-hidden": "true",
6685
- children: /* @__PURE__ */ Q(js, { size: 14 })
6732
+ children: /* @__PURE__ */ Q(Bs, { size: 14 })
6686
6733
  })
6687
6734
  ]
6688
6735
  }),
@@ -6697,7 +6744,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6697
6744
  children: [
6698
6745
  /* @__PURE__ */ Q("span", {
6699
6746
  class: "ic",
6700
- children: /* @__PURE__ */ Q(rl, {})
6747
+ children: /* @__PURE__ */ Q(fl, {})
6701
6748
  }),
6702
6749
  /* @__PURE__ */ Q("span", {
6703
6750
  class: "lbl",
@@ -6715,7 +6762,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6715
6762
  target: "_blank",
6716
6763
  rel: "noopener noreferrer",
6717
6764
  children: [
6718
- /* @__PURE__ */ Q(Os, { size: 14 }),
6765
+ /* @__PURE__ */ Q(Ls, { size: 14 }),
6719
6766
  /* @__PURE__ */ Q("span", { children: "Powered by Markup" }),
6720
6767
  /* @__PURE__ */ Q("span", {
6721
6768
  class: "ver",
@@ -6728,7 +6775,7 @@ function el({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
6728
6775
  }) : null]
6729
6776
  });
6730
6777
  }
6731
- function tl({ side: e }) {
6778
+ function ul({ side: e }) {
6732
6779
  return /* @__PURE__ */ Q("svg", {
6733
6780
  width: 14,
6734
6781
  height: 14,
@@ -6754,7 +6801,7 @@ function tl({ side: e }) {
6754
6801
  })]
6755
6802
  });
6756
6803
  }
6757
- function nl() {
6804
+ function dl() {
6758
6805
  return /* @__PURE__ */ Q("svg", {
6759
6806
  width: 16,
6760
6807
  height: 16,
@@ -6772,7 +6819,7 @@ function nl() {
6772
6819
  })]
6773
6820
  });
6774
6821
  }
6775
- function rl() {
6822
+ function fl() {
6776
6823
  return /* @__PURE__ */ Q("svg", {
6777
6824
  width: 16,
6778
6825
  height: 16,
@@ -6793,7 +6840,7 @@ function rl() {
6793
6840
  }
6794
6841
  //#endregion
6795
6842
  //#region src/runtime/ui/panel-popover.tsx
6796
- function il({ kind: e, label: t, position: n, ignoreToolbarKind: r, isLeaving: i = !1, onClose: a, children: o }) {
6843
+ function pl({ kind: e, label: t, position: n, ignoreToolbarKind: r, isLeaving: i = !1, onClose: a, children: o }) {
6797
6844
  let s = W(null);
6798
6845
  return H(() => {
6799
6846
  if (i) return;
@@ -6829,7 +6876,7 @@ function il({ kind: e, label: t, position: n, ignoreToolbarKind: r, isLeaving: i
6829
6876
  }
6830
6877
  //#endregion
6831
6878
  //#region src/runtime/ui/pin.tsx
6832
- function al({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, isClosed: a = !1, isLeaving: o = !1, enterDelayMs: s = 0, onClick: c }) {
6879
+ function ml({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, isClosed: a = !1, isLeaving: o = !1, enterDelayMs: s = 0, onClick: c }) {
6833
6880
  let l = W(!r), u = t - window.scrollY, d = e - window.scrollX;
6834
6881
  return /* @__PURE__ */ Q("button", {
6835
6882
  type: "button",
@@ -6848,11 +6895,11 @@ function al({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, isClos
6848
6895
  title: `Open ${a ? "resolved " : ""}feedback thread (${n} comment${n === 1 ? "" : "s"})`,
6849
6896
  children: /* @__PURE__ */ Q("span", {
6850
6897
  class: "markup-pin-num",
6851
- children: a ? /* @__PURE__ */ Q(Ns, { size: 14 }) : n
6898
+ children: a ? /* @__PURE__ */ Q(Hs, { size: 14 }) : n
6852
6899
  })
6853
6900
  });
6854
6901
  }
6855
- function ol({ pageX: e, pageY: t, isLeaving: n = !1 }) {
6902
+ function hl({ pageX: e, pageY: t, isLeaving: n = !1 }) {
6856
6903
  let r = t - window.scrollY, i = e - window.scrollX;
6857
6904
  return /* @__PURE__ */ Q("div", {
6858
6905
  class: Z("markup-pin", "markup-pin-ghost", "is-anchor", n && "is-leaving"),
@@ -6869,7 +6916,7 @@ function ol({ pageX: e, pageY: t, isLeaving: n = !1 }) {
6869
6916
  }
6870
6917
  //#endregion
6871
6918
  //#region src/runtime/ui/placement-overlay.tsx
6872
- function sl({ onPlace: e, onCancel: t }) {
6919
+ function gl({ onPlace: e, onCancel: t }) {
6873
6920
  let n = W(null);
6874
6921
  return U(() => {
6875
6922
  let r = n.current?.getRootNode() ?? null, i = (e) => r !== null && e.composedPath().includes(r);
@@ -6894,7 +6941,7 @@ function sl({ onPlace: e, onCancel: t }) {
6894
6941
  window.addEventListener("keydown", a);
6895
6942
  for (let e of l) window.addEventListener(e, o, c);
6896
6943
  window.addEventListener("click", s, c);
6897
- let u = cl();
6944
+ let u = _l();
6898
6945
  return () => {
6899
6946
  window.removeEventListener("keydown", a);
6900
6947
  for (let e of l) window.removeEventListener(e, o, c);
@@ -6910,7 +6957,7 @@ function sl({ onPlace: e, onCancel: t }) {
6910
6957
  })
6911
6958
  });
6912
6959
  }
6913
- function cl() {
6960
+ function _l() {
6914
6961
  let e = "html, html * { cursor: crosshair !important; }";
6915
6962
  if ("adoptedStyleSheets" in document && "replaceSync" in CSSStyleSheet.prototype) {
6916
6963
  let t = new CSSStyleSheet();
@@ -6923,14 +6970,14 @@ function cl() {
6923
6970
  }
6924
6971
  //#endregion
6925
6972
  //#region src/runtime/ui/thread-popover.tsx
6926
- var ll = [], ul = [
6973
+ var vl = [], yl = [
6927
6974
  "👍",
6928
6975
  "❤️",
6929
6976
  "🎉",
6930
6977
  "😮",
6931
6978
  "😄",
6932
6979
  "❓"
6933
- ], dl = Vr({
6980
+ ], bl = Vr({
6934
6981
  none: {
6935
6982
  "toggle-thread-menu": () => ({
6936
6983
  kind: "thread-menu",
@@ -6986,13 +7033,13 @@ var ll = [], ul = [
6986
7033
  dismiss: () => ({ kind: "none" })
6987
7034
  }
6988
7035
  });
6989
- function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r, isVerified: i, isIdentityResolving: a, isSigningIn: o, canDelete: s, isPending: c, error: l, isHidden: u = !1, isLeaving: d = !1, members: f = ll, onAuthor: p, onSignIn: m, onSignOut: h, onClose: g, onReply: _, onEditComment: v, onDeleteComment: y, onToggleReaction: b, onResolve: x, onDelete: S }) {
6990
- let C = W(null), w = W(null), T = W(null), E = W(null), [D, O] = Hr(dl, { kind: "none" }), k = ei(D.kind === "none" || D.kind === "editing" ? null : D, 120), A = k?.value ?? null, j = k?.isLeaving ?? !1, ee = A?.kind === "thread-menu" ? A : null, [M, te] = V(null), { onPointerDown: N, isDragging: ne } = tc({
7036
+ function xl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r, isVerified: i, isIdentityResolving: a, isSigningIn: o, canDelete: s, isPending: c, error: l, isHidden: u = !1, isLeaving: d = !1, members: f = vl, onAuthor: p, onSignIn: m, onSignOut: h, onClose: g, onReply: _, onEditComment: v, onDeleteComment: y, onToggleReaction: b, onResolve: x, onDelete: S }) {
7037
+ let C = W(null), w = W(null), T = W(null), E = W(null), [D, O] = Hr(bl, { kind: "none" }), k = ei(D.kind === "none" || D.kind === "editing" ? null : D, 120), A = k?.value ?? null, j = k?.isLeaving ?? !1, ee = A?.kind === "thread-menu" ? A : null, [M, te] = V(null), { onPointerDown: N, isDragging: ne } = uc({
6991
7038
  targetRef: C,
6992
7039
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
6993
7040
  onMove: te
6994
7041
  });
6995
- ic(C, !d);
7042
+ pc(C, !d);
6996
7043
  let P = e.resolvedAt != null, F = nt(() => e.comments.filter((e) => !e.deleted), [e.comments]);
6997
7044
  H(() => {
6998
7045
  if (D.kind === "none" || D.kind === "editing") return;
@@ -7057,8 +7104,8 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7057
7104
  anchorText: e.anchorText
7058
7105
  });
7059
7106
  return {
7060
- left: gl(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
7061
- top: gl(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
7107
+ left: Tl(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
7108
+ top: Tl(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
7062
7109
  };
7063
7110
  }, [
7064
7111
  e.anchorX,
@@ -7100,7 +7147,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7100
7147
  class: Z("markup-icon-btn", ee != null && "is-open"),
7101
7148
  title: "More options",
7102
7149
  onClick: () => O({ type: "toggle-thread-menu" }),
7103
- children: /* @__PURE__ */ Q(Ms, { size: 16 })
7150
+ children: /* @__PURE__ */ Q(Vs, { size: 16 })
7104
7151
  }), ee ? /* @__PURE__ */ Q("div", {
7105
7152
  class: Z("markup-thread-menu-list", j && "is-leaving"),
7106
7153
  inert: j || void 0,
@@ -7129,14 +7176,14 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7129
7176
  title: "Mark as resolved",
7130
7177
  disabled: c,
7131
7178
  onClick: x,
7132
- children: /* @__PURE__ */ Q(Ns, { size: 16 })
7179
+ children: /* @__PURE__ */ Q(Hs, { size: 16 })
7133
7180
  }) : null,
7134
7181
  /* @__PURE__ */ Q("button", {
7135
7182
  type: "button",
7136
7183
  class: "markup-icon-btn",
7137
7184
  title: "Close thread",
7138
7185
  onClick: g,
7139
- children: /* @__PURE__ */ Q(ks, { size: 16 })
7186
+ children: /* @__PURE__ */ Q(Rs, { size: 16 })
7140
7187
  })
7141
7188
  ]
7142
7189
  })]
@@ -7149,10 +7196,10 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7149
7196
  return /* @__PURE__ */ Q("li", {
7150
7197
  class: Z("markup-comment", re.current != null && t.createdAt > re.current && "is-new"),
7151
7198
  children: [
7152
- /* @__PURE__ */ Q(_l, {
7199
+ /* @__PURE__ */ Q(El, {
7153
7200
  name: t.authorName,
7154
7201
  image: t.authorImage,
7155
- tone: yl(t.authorClientId ?? t.authorName)
7202
+ tone: Ol(t.authorClientId ?? t.authorName)
7156
7203
  }),
7157
7204
  /* @__PURE__ */ Q("div", {
7158
7205
  class: "markup-comment-meta",
@@ -7166,23 +7213,23 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7166
7213
  role: "img",
7167
7214
  "aria-label": "Written by an AI agent",
7168
7215
  title: "Written by an AI agent",
7169
- children: /* @__PURE__ */ Q(Xs, { size: 11 })
7216
+ children: /* @__PURE__ */ Q(ac, { size: 11 })
7170
7217
  }) : null,
7171
7218
  /* @__PURE__ */ Q("time", {
7172
7219
  class: "markup-comment-time",
7173
7220
  datetime: new Date(t.createdAt).toISOString(),
7174
- title: xl(t.createdAt),
7175
- children: bl(t.createdAt)
7221
+ title: Al(t.createdAt),
7222
+ children: kl(t.createdAt)
7176
7223
  }),
7177
7224
  t.editedAt == null ? null : /* @__PURE__ */ Q("time", {
7178
7225
  class: "markup-comment-edited",
7179
7226
  datetime: new Date(t.editedAt).toISOString(),
7180
- title: xl(t.editedAt),
7227
+ title: Al(t.editedAt),
7181
7228
  children: "edited"
7182
7229
  }),
7183
7230
  /* @__PURE__ */ Q("div", {
7184
7231
  class: "markup-thread-actions",
7185
- children: [!P && !l ? /* @__PURE__ */ Q(pl, {
7232
+ children: [!P && !l ? /* @__PURE__ */ Q(Sl, {
7186
7233
  comment: t,
7187
7234
  pickerOpen: g,
7188
7235
  pickerLeaving: g && j,
@@ -7251,7 +7298,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7251
7298
  direction: a < i ? "up" : "down"
7252
7299
  });
7253
7300
  },
7254
- children: /* @__PURE__ */ Q(Ms, { size: 16 })
7301
+ children: /* @__PURE__ */ Q(Vs, { size: 16 })
7255
7302
  }), m ? /* @__PURE__ */ Q("div", {
7256
7303
  class: Z("markup-thread-menu-list", j && "is-leaving"),
7257
7304
  inert: j || void 0,
@@ -7292,7 +7339,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7292
7339
  await v(t._id, n), O({ type: "dismiss" });
7293
7340
  } catch {}
7294
7341
  },
7295
- children: [/* @__PURE__ */ Q(Bc, {
7342
+ children: [/* @__PURE__ */ Q(Yc, {
7296
7343
  class: "markup-comment-edit-input",
7297
7344
  label: "Edit comment",
7298
7345
  value: D.draft,
@@ -7318,7 +7365,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7318
7365
  children: "Save"
7319
7366
  })]
7320
7367
  })]
7321
- }) : /* @__PURE__ */ Q(Pc, {
7368
+ }) : /* @__PURE__ */ Q(Uc, {
7322
7369
  body: t.body,
7323
7370
  mentions: t.mentions
7324
7371
  }),
@@ -7331,7 +7378,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7331
7378
  alt: "Screenshot"
7332
7379
  })
7333
7380
  }) : null,
7334
- !l && t.reactions.length > 0 ? /* @__PURE__ */ Q(ml, {
7381
+ !l && t.reactions.length > 0 ? /* @__PURE__ */ Q(Cl, {
7335
7382
  comment: t,
7336
7383
  isResolved: P,
7337
7384
  onToggle: (e) => b(t._id, e)
@@ -7351,7 +7398,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7351
7398
  onClick: (e) => {
7352
7399
  e.stopPropagation(), T.current?.close();
7353
7400
  },
7354
- children: /* @__PURE__ */ Q(ks, { size: 16 })
7401
+ children: /* @__PURE__ */ Q(Rs, { size: 16 })
7355
7402
  }), /* @__PURE__ */ Q("img", {
7356
7403
  class: "markup-lightbox-img",
7357
7404
  src: e.screenshotUrl,
@@ -7374,7 +7421,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7374
7421
  children: "team"
7375
7422
  }) : null
7376
7423
  ]
7377
- }), /* @__PURE__ */ Q(Hc, {
7424
+ }), /* @__PURE__ */ Q(Zc, {
7378
7425
  label: "Reply",
7379
7426
  placeholder: "Write a reply…",
7380
7427
  submitLabel: "Reply",
@@ -7384,7 +7431,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7384
7431
  onSubmit: _,
7385
7432
  members: f
7386
7433
  })]
7387
- }) : /* @__PURE__ */ Q(oc, {
7434
+ }) : /* @__PURE__ */ Q(hc, {
7388
7435
  mode: n,
7389
7436
  isPending: c,
7390
7437
  isConnecting: a,
@@ -7397,7 +7444,7 @@ function fl({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
7397
7444
  ]
7398
7445
  });
7399
7446
  }
7400
- function pl({ comment: e, pickerOpen: t, pickerLeaving: n, pickerDirection: r, pickerSide: i, pickerRef: a, onPickerClick: o, onPickerSelect: s }) {
7447
+ function Sl({ comment: e, pickerOpen: t, pickerLeaving: n, pickerDirection: r, pickerSide: i, pickerRef: a, onPickerClick: o, onPickerSelect: s }) {
7401
7448
  return /* @__PURE__ */ Q("div", {
7402
7449
  class: Z("markup-reaction-picker-wrap", t && "is-open", t && r === "up" && "is-up", i && "is-side"),
7403
7450
  ref: a,
@@ -7407,12 +7454,12 @@ function pl({ comment: e, pickerOpen: t, pickerLeaving: n, pickerDirection: r, p
7407
7454
  title: "Add reaction",
7408
7455
  "aria-label": "Add reaction",
7409
7456
  onClick: o,
7410
- children: /* @__PURE__ */ Q(Is, { size: 16 })
7457
+ children: /* @__PURE__ */ Q(Gs, { size: 16 })
7411
7458
  }), t ? /* @__PURE__ */ Q("div", {
7412
7459
  class: Z("markup-reaction-picker", n && "is-leaving"),
7413
7460
  role: "menu",
7414
7461
  inert: n || void 0,
7415
- children: ul.map((t) => /* @__PURE__ */ Q("button", {
7462
+ children: yl.map((t) => /* @__PURE__ */ Q("button", {
7416
7463
  type: "button",
7417
7464
  role: "menuitem",
7418
7465
  class: Z("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
@@ -7422,11 +7469,11 @@ function pl({ comment: e, pickerOpen: t, pickerLeaving: n, pickerDirection: r, p
7422
7469
  }) : null]
7423
7470
  });
7424
7471
  }
7425
- function ml({ comment: e, isResolved: t, onToggle: n }) {
7472
+ function Cl({ comment: e, isResolved: t, onToggle: n }) {
7426
7473
  return /* @__PURE__ */ Q("div", {
7427
7474
  class: "markup-reactions",
7428
7475
  children: e.reactions.map((e) => {
7429
- let r = hl(e.reactors, e.mine, e.count, e.emoji);
7476
+ let r = wl(e.reactors, e.mine, e.count, e.emoji);
7430
7477
  return /* @__PURE__ */ Q("button", {
7431
7478
  type: "button",
7432
7479
  class: Z("markup-reaction-chip", e.mine && "is-mine"),
@@ -7447,14 +7494,14 @@ function ml({ comment: e, isResolved: t, onToggle: n }) {
7447
7494
  })
7448
7495
  });
7449
7496
  }
7450
- function hl(e, t, n, r) {
7497
+ function wl(e, t, n, r) {
7451
7498
  let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
7452
7499
  return o > 0 && i.push(`${o} other${o === 1 ? "" : "s"}`), t && i.push("you"), i.length === 0 ? `${n} reacted with ${r}` : `${i.length === 1 ? i[0] : `${i.slice(0, -1).join(", ")} and ${i[i.length - 1]}`} reacted with ${r}`;
7453
7500
  }
7454
- function gl(e, t, n) {
7501
+ function Tl(e, t, n) {
7455
7502
  return Math.max(t, Math.min(n, e));
7456
7503
  }
7457
- function _l({ name: e, image: t, tone: n }) {
7504
+ function El({ name: e, image: t, tone: n }) {
7458
7505
  let [r, i] = V(null);
7459
7506
  return /* @__PURE__ */ Q("span", {
7460
7507
  class: "markup-comment-avatar",
@@ -7470,11 +7517,11 @@ function _l({ name: e, image: t, tone: n }) {
7470
7517
  onError: () => i(t)
7471
7518
  }) : /* @__PURE__ */ Q("span", {
7472
7519
  class: "markup-avatar-initials",
7473
- children: vl(e)
7520
+ children: Dl(e)
7474
7521
  })
7475
7522
  });
7476
7523
  }
7477
- function vl(e) {
7524
+ function Dl(e) {
7478
7525
  let t = e.trim();
7479
7526
  if (!t) return "??";
7480
7527
  let n = t.split(/\s+/).filter(Boolean), r = n[0] ?? "";
@@ -7482,12 +7529,12 @@ function vl(e) {
7482
7529
  let i = n[n.length - 1] ?? "";
7483
7530
  return ((r[0] ?? "") + (i[0] ?? "")).toUpperCase();
7484
7531
  }
7485
- function yl(e) {
7532
+ function Ol(e) {
7486
7533
  let t = 0;
7487
7534
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
7488
7535
  return Math.abs(t) % 5 + 1;
7489
7536
  }
7490
- function bl(e) {
7537
+ function kl(e) {
7491
7538
  let t = Date.now() - e, n = Math.floor(t / 1e3);
7492
7539
  if (n < 60) return "just now";
7493
7540
  let r = Math.floor(n / 60);
@@ -7504,7 +7551,7 @@ function bl(e) {
7504
7551
  year: "numeric"
7505
7552
  });
7506
7553
  }
7507
- function xl(e) {
7554
+ function Al(e) {
7508
7555
  return new Date(e).toLocaleDateString([], {
7509
7556
  month: "long",
7510
7557
  day: "numeric",
@@ -7515,13 +7562,13 @@ function xl(e) {
7515
7562
  }
7516
7563
  //#endregion
7517
7564
  //#region src/runtime/ui/toolbar.tsx
7518
- function Sl(e) {
7565
+ function jl(e) {
7519
7566
  e.stopPropagation();
7520
7567
  }
7521
- function Cl(e) {
7522
- Sl(e), e.target?.closest?.(".markup-tb-btn") && e.preventDefault();
7568
+ function Ml(e) {
7569
+ jl(e), e.target?.closest?.(".markup-tb-btn") && e.preventDefault();
7523
7570
  }
7524
- function wl({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", unreadCount: i = 0, showInbox: a = !1, onOpenInbox: o, inboxOpen: s = !1, pinsVisible: c = !0, onTogglePins: l, identityButton: u, overflowButton: d, isLeaving: f = !1 }) {
7571
+ function Nl({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", unreadCount: i = 0, showInbox: a = !1, onOpenInbox: o, inboxOpen: s = !1, pinsVisible: c = !0, onTogglePins: l, identityButton: u, overflowButton: d, isLeaving: f = !1 }) {
7525
7572
  let p = W(0);
7526
7573
  i > 0 && (p.current = i);
7527
7574
  let m = r === "bottom-left" ? "markup-toolbar-left" : r === "bottom-center" ? "markup-toolbar-center" : "markup-toolbar-right";
@@ -7538,10 +7585,10 @@ function wl({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
7538
7585
  "aria-label": "Markup feedback toolbar",
7539
7586
  "aria-hidden": f,
7540
7587
  inert: f ? "" : void 0,
7541
- onPointerDown: Sl,
7542
- onMouseDown: Cl,
7543
- onPointerUp: Sl,
7544
- onMouseUp: Sl,
7588
+ onPointerDown: jl,
7589
+ onMouseDown: Ml,
7590
+ onPointerUp: jl,
7591
+ onMouseUp: jl,
7545
7592
  children: [
7546
7593
  /* @__PURE__ */ Q("button", {
7547
7594
  type: "button",
@@ -7551,7 +7598,7 @@ function wl({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
7551
7598
  title: e ? "Cancel placing markup" : "Leave a markup",
7552
7599
  "aria-pressed": e,
7553
7600
  onClick: h,
7554
- children: Q(e ? ks : Ls, { size: 16 })
7601
+ children: Q(e ? Rs : Ks, { size: 16 })
7555
7602
  }),
7556
7603
  a ? /* @__PURE__ */ Q("button", {
7557
7604
  type: "button",
@@ -7563,7 +7610,7 @@ function wl({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
7563
7610
  onClick: (e) => {
7564
7611
  e.preventDefault(), e.stopPropagation(), o?.();
7565
7612
  },
7566
- children: [/* @__PURE__ */ Q(Rs, { size: 16 }), /* @__PURE__ */ Q("span", {
7613
+ children: [/* @__PURE__ */ Q(qs, { size: 16 }), /* @__PURE__ */ Q("span", {
7567
7614
  class: "markup-tb-badge",
7568
7615
  "data-unread": i > 0 ? "true" : "false",
7569
7616
  "aria-hidden": "true",
@@ -7583,7 +7630,7 @@ function wl({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
7583
7630
  onClick: (e) => {
7584
7631
  e.preventDefault(), e.stopPropagation(), l();
7585
7632
  },
7586
- children: Q(c ? zs : Bs, { size: 16 })
7633
+ children: Q(c ? Js : Ys, { size: 16 })
7587
7634
  })] }) : null,
7588
7635
  u || d ? /* @__PURE__ */ Q("div", {
7589
7636
  class: "markup-tb-sep",
@@ -7597,15 +7644,15 @@ function wl({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
7597
7644
  "data-kind": "overflow",
7598
7645
  "aria-label": "More options",
7599
7646
  disabled: !0,
7600
- children: /* @__PURE__ */ Q(Vs, { size: 16 })
7647
+ children: /* @__PURE__ */ Q(Xs, { size: 16 })
7601
7648
  })
7602
7649
  ]
7603
7650
  });
7604
7651
  }
7605
7652
  //#endregion
7606
7653
  //#region src/runtime/ui/app.tsx
7607
- var Tl = [], El = [], Dl = [{ key: "toolbar" }], Ol = [];
7608
- function kl(e) {
7654
+ var Pl = [], Fl = [], Il = [{ key: "toolbar" }], Ll = [];
7655
+ function Rl(e) {
7609
7656
  let t = {
7610
7657
  clientId: `markup_user_${e.identity.id}`,
7611
7658
  name: e.identity.name,
@@ -7631,14 +7678,14 @@ function kl(e) {
7631
7678
  } : {}
7632
7679
  };
7633
7680
  }
7634
- function Al() {
7681
+ function zl() {
7635
7682
  let e = document.activeElement;
7636
7683
  for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement;
7637
7684
  if (!e) return !1;
7638
7685
  let t = e.tagName;
7639
7686
  return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable;
7640
7687
  }
7641
- var jl = Vr({
7688
+ var Bl = Vr({
7642
7689
  visible: {
7643
7690
  "hide-with-toast": () => ({ kind: "hidden-with-toast" }),
7644
7691
  toggle: () => ({ kind: "hidden" })
@@ -7649,26 +7696,26 @@ var jl = Vr({
7649
7696
  },
7650
7697
  hidden: { toggle: () => ({ kind: "visible" }) }
7651
7698
  });
7652
- function Ml(e) {
7699
+ function Vl(e) {
7653
7700
  return ra(e), e;
7654
7701
  }
7655
- var Nl = Vr({
7702
+ var Hl = Vr({
7656
7703
  unresolved: {
7657
- "mint-success": (e, t) => Ml({
7704
+ "mint-success": (e, t) => Vl({
7658
7705
  kind: "anon",
7659
7706
  identity: t.identity
7660
7707
  }),
7661
- "signed-in": (e, t) => Ml({
7708
+ "signed-in": (e, t) => Vl({
7662
7709
  kind: "verified",
7663
7710
  identity: t.identity
7664
7711
  })
7665
7712
  },
7666
7713
  anon: {
7667
- "signed-in": (e, t) => Ml({
7714
+ "signed-in": (e, t) => Vl({
7668
7715
  kind: "verified",
7669
7716
  identity: t.identity
7670
7717
  }),
7671
- "author-set": (e, t) => Ml({
7718
+ "author-set": (e, t) => Vl({
7672
7719
  kind: "anon",
7673
7720
  identity: {
7674
7721
  ...e.identity,
@@ -7676,35 +7723,35 @@ var Nl = Vr({
7676
7723
  email: t.email
7677
7724
  }
7678
7725
  }),
7679
- "forget-me": () => Ml({ kind: "unresolved" })
7726
+ "forget-me": () => Vl({ kind: "unresolved" })
7680
7727
  },
7681
7728
  verified: {
7682
- "signed-in": (e, t) => Ml({
7729
+ "signed-in": (e, t) => Vl({
7683
7730
  kind: "verified",
7684
7731
  identity: t.identity
7685
7732
  }),
7686
- unauthorized: (e) => Ml({
7733
+ unauthorized: (e) => Vl({
7687
7734
  kind: "recovering",
7688
7735
  preserved: {
7689
7736
  name: e.identity.name,
7690
7737
  email: e.identity.email
7691
7738
  }
7692
7739
  }),
7693
- "signed-out": () => Ml({ kind: "unresolved" })
7740
+ "signed-out": () => Vl({ kind: "unresolved" })
7694
7741
  },
7695
7742
  recovering: {
7696
- "mint-success": (e, t) => Ml({
7743
+ "mint-success": (e, t) => Vl({
7697
7744
  kind: "anon",
7698
7745
  identity: t.identity
7699
7746
  }),
7700
- "signed-in": (e, t) => Ml({
7747
+ "signed-in": (e, t) => Vl({
7701
7748
  kind: "verified",
7702
7749
  identity: t.identity
7703
7750
  })
7704
7751
  }
7705
7752
  });
7706
- function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
7707
- let [a, o] = V(_a), [s, c] = V([]), [l, u] = V(!1), d = nt(() => na(), []), [f, p] = Hr(Nl, d.state), [m, h] = V(null);
7753
+ function Ul({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
7754
+ let [a, o] = V(_a), [s, c] = V([]), [l, u] = V(!1), d = nt(() => na(), []), [f, p] = Hr(Hl, d.state), [m, h] = V(null);
7708
7755
  H(() => {
7709
7756
  let n = !1;
7710
7757
  return Hi(e, t).then((e) => {
@@ -7714,7 +7761,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7714
7761
  };
7715
7762
  }, [e, t]);
7716
7763
  let [g, _] = V(n), [v, y] = V(!0), [b, x] = V(!0), [C, w] = V(!1), [T, E] = V(null), D = G(() => E(null), []), O = W(f);
7717
- O.current = f, Ts(f, e, t, (e) => p({
7764
+ O.current = f, Ps(f, e, t, (e) => p({
7718
7765
  type: "signed-in",
7719
7766
  identity: e
7720
7767
  }), () => p({ type: "unauthorized" }));
@@ -7770,7 +7817,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7770
7817
  type: "patch",
7771
7818
  update: e
7772
7819
  });
7773
- }, [P]), se = Yr(), ce = Yr(), le = Yr(), ue = Yr(), de = Yr(), { run: I, reset: fe } = se, { run: pe } = ce, { run: me, reset: he } = le, { run: ge } = ue, { run: _e } = de, ve = de.isPending, be = se.isPending, xe = se.error ?? ce.error ?? le.error, [Se, Ce] = Hr(jl, { kind: "visible" }), we = Se.kind !== "visible", [Te, Ee] = V(0), [De, Oe] = V(0), ke = W(null), Ae = aa(f), L = f.kind === "verified", je = f.kind === "unresolved" || f.kind === "recovering", Me = ia(f), [R, Ne] = V(Li), [Pe, Fe] = V(null);
7820
+ }, [P]), se = Yr(), ce = Yr(), le = Yr(), ue = Yr(), de = Yr(), { run: I, reset: fe } = se, { run: pe } = ce, { run: me, reset: he } = le, { run: ge } = ue, { run: _e } = de, ve = de.isPending, be = se.isPending, xe = se.error ?? ce.error ?? le.error, [Se, Ce] = Hr(Bl, { kind: "visible" }), we = Se.kind !== "visible", [Te, Ee] = V(0), [De, Oe] = V(0), ke = W(null), Ae = aa(f), L = f.kind === "verified", je = f.kind === "unresolved" || f.kind === "recovering", Me = ia(f), [R, Ne] = V(Li), [Pe, Fe] = V(null);
7774
7821
  H(() => {
7775
7822
  Fe(null), ie.current += 1, P({ type: "reset" });
7776
7823
  }, [
@@ -7816,7 +7863,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7816
7863
  p,
7817
7864
  d
7818
7865
  ]);
7819
- let { token: ze, isCurrent: Be } = xs(k, f), [Ve, He] = V(null);
7866
+ let { token: ze, isCurrent: Be } = As(k, f), [Ve, He] = V(null);
7820
7867
  H(() => {
7821
7868
  let t = new Br(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
7822
7869
  return He(t), () => {
@@ -7904,7 +7951,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7904
7951
  }, [fe, he]);
7905
7952
  H(() => {
7906
7953
  function e(e) {
7907
- e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || A.kind === "idle" && (we || Al() || (e.preventDefault(), z())));
7954
+ e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || A.kind === "idle" && (we || zl() || (e.preventDefault(), z())));
7908
7955
  }
7909
7956
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
7910
7957
  }, [
@@ -7947,7 +7994,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7947
7994
  strictScrub: r?.strictScrub,
7948
7995
  redactSelector: r?.redactSelector
7949
7996
  };
7950
- ss(s, {
7997
+ cs(s, {
7951
7998
  x: t,
7952
7999
  y: n
7953
8000
  }, c).then((e) => {
@@ -7968,7 +8015,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7968
8015
  });
7969
8016
  }, [p]), B = ce.isPending, Je = G(async () => {
7970
8017
  ye("sign_in_started"), await pe(async () => {
7971
- let n = kl(await fa({
8018
+ let n = Rl(await fa({
7972
8019
  apiUrl: e,
7973
8020
  apiKey: t,
7974
8021
  useCookies: m === !0
@@ -8206,14 +8253,14 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8206
8253
  elements: pt.flatMap((e) => e.point.element ? [e.point.element] : [])
8207
8254
  };
8208
8255
  }, [pt]);
8209
- let ht = s.some((e) => e.anchorSelector != null), gt = $r(A.kind !== "placing" && !we && v ? pt : Tl, (e) => e.thread._id, 140), _t = $r(!we || A.kind === "placing" || A.kind === "composing-new" ? Dl : Ol, (e) => e.key, 160), vt = [];
8256
+ let ht = s.some((e) => e.anchorSelector != null), gt = $r(A.kind !== "placing" && !we && v ? pt : Pl, (e) => e.thread._id, 140), _t = $r(!we || A.kind === "placing" || A.kind === "composing-new" ? Il : Ll, (e) => e.key, 160), vt = [];
8210
8257
  Se.kind === "hidden-with-toast" && vt.push({
8211
8258
  key: "hud-hidden",
8212
8259
  body: /* @__PURE__ */ Q(S, { children: [
8213
8260
  "Markup hidden — press ",
8214
8261
  /* @__PURE__ */ Q("kbd", {
8215
8262
  class: "markup-kbd",
8216
- children: Es().mod
8263
+ children: Fs().mod
8217
8264
  }),
8218
8265
  /* @__PURE__ */ Q("kbd", {
8219
8266
  class: "markup-kbd",
@@ -8228,7 +8275,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8228
8275
  key: "signed-out",
8229
8276
  body: "Signed out — commenting anonymously again."
8230
8277
  });
8231
- let yt = $r(vt, (e) => e.key, 220), bt = $r(A.kind === "thread" && ut ? [ut] : El, (e) => e._id, 160), K = ei(A.kind === "composing-new" ? A : null, 160), xt = ei(T, 140);
8278
+ let yt = $r(vt, (e) => e.key, 220), bt = $r(A.kind === "thread" && ut ? [ut] : Fl, (e) => e._id, 160), K = ei(A.kind === "composing-new" ? A : null, 160), xt = ei(T, 140);
8232
8279
  return H(() => {
8233
8280
  if (!ht) return;
8234
8281
  let e = null, t = !1;
@@ -8256,13 +8303,13 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8256
8303
  ]), /* @__PURE__ */ Q("div", {
8257
8304
  class: "markup-root",
8258
8305
  ref: ke,
8259
- style: Qs,
8306
+ style: sc,
8260
8307
  children: [
8261
8308
  /* @__PURE__ */ Q("div", {
8262
8309
  class: "markup-pins-layer",
8263
8310
  children: [gt.map(({ key: e, value: { thread: t, point: n }, isLeaving: r, enterDelayMs: i }) => {
8264
8311
  let a = !r && A.kind === "thread" && A.threadId === t._id, o = t.comments.reduce((e, t) => e + +!t.deleted, 0);
8265
- return /* @__PURE__ */ Q(al, {
8312
+ return /* @__PURE__ */ Q(ml, {
8266
8313
  pageX: n.pageX,
8267
8314
  pageY: n.pageY,
8268
8315
  count: o,
@@ -8278,17 +8325,17 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8278
8325
  });
8279
8326
  }
8280
8327
  }, e);
8281
- }), K ? /* @__PURE__ */ Q(ol, {
8328
+ }), K ? /* @__PURE__ */ Q(hl, {
8282
8329
  pageX: K.value.pageX,
8283
8330
  pageY: K.value.pageY,
8284
8331
  isLeaving: K.isLeaving
8285
8332
  }) : null]
8286
8333
  }),
8287
- A.kind === "placing" ? /* @__PURE__ */ Q(sl, {
8334
+ A.kind === "placing" ? /* @__PURE__ */ Q(gl, {
8288
8335
  onPlace: Ke,
8289
8336
  onCancel: We
8290
8337
  }) : null,
8291
- bt.map(({ key: e, value: t, isLeaving: n }) => /* @__PURE__ */ Q(fl, {
8338
+ bt.map(({ key: e, value: t, isLeaving: n }) => /* @__PURE__ */ Q(xl, {
8292
8339
  thread: t,
8293
8340
  isLeaving: n,
8294
8341
  authorName: Ae,
@@ -8313,7 +8360,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8313
8360
  onDelete: Xe,
8314
8361
  onResolve: Ze
8315
8362
  }, e)),
8316
- K ? /* @__PURE__ */ Q(Gc, {
8363
+ K ? /* @__PURE__ */ Q(el, {
8317
8364
  isLeaving: K.isLeaving,
8318
8365
  pageX: K.value.pageX,
8319
8366
  pageY: K.value.pageY,
@@ -8336,7 +8383,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8336
8383
  onSubmit: Ye,
8337
8384
  onClose: We
8338
8385
  }) : null,
8339
- _t.map((t) => /* @__PURE__ */ Q(wl, {
8386
+ _t.map((t) => /* @__PURE__ */ Q(Nl, {
8340
8387
  isLeaving: t.isLeaving,
8341
8388
  isActive: A.kind === "placing",
8342
8389
  onToggle: () => A.kind === "placing" ? We() : z(),
@@ -8351,7 +8398,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8351
8398
  },
8352
8399
  pinsVisible: v,
8353
8400
  onTogglePins: () => y((e) => !e),
8354
- identityButton: /* @__PURE__ */ Q($s, {
8401
+ identityButton: /* @__PURE__ */ Q(cc, {
8355
8402
  identity: f,
8356
8403
  position: g,
8357
8404
  isSigningIn: B,
@@ -8362,7 +8409,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8362
8409
  onSignOut: lt,
8363
8410
  onForgetMe: ot
8364
8411
  }),
8365
- overflowButton: /* @__PURE__ */ Q(el, {
8412
+ overflowButton: /* @__PURE__ */ Q(ll, {
8366
8413
  position: g,
8367
8414
  onSetPosition: _,
8368
8415
  autoCapture: b && r?.enabled !== !1,
@@ -8377,18 +8424,18 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8377
8424
  isForgettingMe: ue.isPending,
8378
8425
  forgetMeError: ue.error,
8379
8426
  onForgetMe: ot,
8380
- version: "1.25.2",
8427
+ version: "1.26.0",
8381
8428
  dashboardUrl: i
8382
8429
  })
8383
8430
  }, t.key)),
8384
- xt?.value === "inbox" && L ? /* @__PURE__ */ Q(il, {
8431
+ xt?.value === "inbox" && L ? /* @__PURE__ */ Q(pl, {
8385
8432
  kind: "inbox",
8386
8433
  label: "Inbox",
8387
8434
  position: g,
8388
8435
  ignoreToolbarKind: "inbox",
8389
8436
  isLeaving: xt.isLeaving,
8390
8437
  onClose: D,
8391
- children: /* @__PURE__ */ Q(qc, {
8438
+ children: /* @__PURE__ */ Q(nl, {
8392
8439
  state: ne,
8393
8440
  isMarkingAll: F,
8394
8441
  onBack: D,
@@ -8398,7 +8445,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8398
8445
  onMarkAllRead: $e
8399
8446
  })
8400
8447
  }) : null,
8401
- yt.map((e) => /* @__PURE__ */ Q(Fl, {
8448
+ yt.map((e) => /* @__PURE__ */ Q(Wl, {
8402
8449
  position: g,
8403
8450
  isLeaving: e.isLeaving,
8404
8451
  children: e.value.body
@@ -8406,7 +8453,7 @@ function Pl({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
8406
8453
  ]
8407
8454
  });
8408
8455
  }
8409
- function Fl({ position: e, isLeaving: t, children: n }) {
8456
+ function Wl({ position: e, isLeaving: t, children: n }) {
8410
8457
  return /* @__PURE__ */ Q("div", {
8411
8458
  class: Z("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right", t && "is-leaving"),
8412
8459
  role: "status",
@@ -8417,7 +8464,7 @@ function Fl({ position: e, isLeaving: t, children: n }) {
8417
8464
  }
8418
8465
  //#endregion
8419
8466
  //#region src/runtime/mount.tsx
8420
- function Il(e, t) {
8467
+ function Gl(e, t) {
8421
8468
  e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none", Le(e, t.theme ?? "auto");
8422
8469
  let n = He(), r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
8423
8470
  i.textContent = le, r.appendChild(i);
@@ -8425,44 +8472,44 @@ function Il(e, t) {
8425
8472
  a.className = "markup-shadow-root", r.appendChild(a), Ae({
8426
8473
  apiUrl: t.apiUrl,
8427
8474
  apiKey: t.apiKey,
8428
- widgetVersion: "1.25.2"
8475
+ widgetVersion: "1.26.0"
8429
8476
  }), ve(t.analytics === !1 ? null : {
8430
8477
  apiUrl: t.apiUrl,
8431
8478
  apiKey: t.apiKey,
8432
- widgetVersion: "1.25.2"
8479
+ widgetVersion: "1.26.0"
8433
8480
  }), ye("widget_loaded");
8434
8481
  let { theme: o, analytics: s, ...c } = t;
8435
8482
  return ce(/* @__PURE__ */ Q(Se, {
8436
8483
  onError: (e) => L(e, { context: "render" }),
8437
- children: /* @__PURE__ */ Q(Pl, { ...c })
8484
+ children: /* @__PURE__ */ Q(Ul, { ...c })
8438
8485
  }), a), () => {
8439
8486
  n(), Ae(null), ve(null), ce(null, a);
8440
8487
  };
8441
8488
  }
8442
8489
  //#endregion
8443
8490
  //#region src/widget.ts
8444
- var Ll = null, Rl = null, zl = null, Bl = !1;
8445
- function Vl(e) {
8491
+ var Kl = null, ql = null, Jl = null, Yl = !1;
8492
+ function Xl(e) {
8446
8493
  if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey, so the widget was not mounted"), () => {};
8447
- e.fab != null && !Bl && (Bl = !0, console.warn("[markup] the `fab` option is ignored and will be removed in the next major. The toolbar replaced the floating action button. Remove it from your config.")), Hl();
8494
+ e.fab != null && !Yl && (Yl = !0, console.warn("[markup] the `fab` option is ignored and will be removed in the next major. The toolbar replaced the floating action button. Remove it from your config.")), Zl();
8448
8495
  let t = () => {
8449
- if (zl = null, !document.body) return;
8496
+ if (Jl = null, !document.body) return;
8450
8497
  let t = document.createElement("div");
8451
- t.id = "markup-widget", document.body.appendChild(t), Rl = t, Ll = Il(t, e);
8498
+ t.id = "markup-widget", document.body.appendChild(t), ql = t, Kl = Gl(t, e);
8452
8499
  };
8453
8500
  if (document.readyState === "loading" || !document.body) {
8454
8501
  let e = () => t();
8455
- zl = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
8502
+ Jl = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
8456
8503
  } else t();
8457
- return Hl;
8504
+ return Zl;
8458
8505
  }
8459
- function Hl() {
8460
- zl &&= (zl(), null), Ll &&= (Ll(), null), Rl?.parentNode && Rl.parentNode.removeChild(Rl), Rl = null;
8506
+ function Zl() {
8507
+ Jl &&= (Jl(), null), Kl &&= (Kl(), null), ql?.parentNode && ql.parentNode.removeChild(ql), ql = null;
8461
8508
  }
8462
8509
  if (typeof document < "u") {
8463
8510
  let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
8464
8511
  if (t && n) {
8465
- let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = e?.dataset.analytics !== "false", c = () => Vl({
8512
+ let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = e?.dataset.analytics !== "false", c = () => Xl({
8466
8513
  apiUrl: t,
8467
8514
  apiKey: n,
8468
8515
  position: r,
@@ -8475,6 +8522,6 @@ if (typeof document < "u") {
8475
8522
  }
8476
8523
  }
8477
8524
  //#endregion
8478
- export { Hl as destroy, Vl as init };
8525
+ export { Zl as destroy, Xl as init };
8479
8526
 
8480
8527
  //# sourceMappingURL=widget.js.map