glitchgrab 1.47.0 → 1.48.1

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/index.js CHANGED
@@ -73,6 +73,37 @@ var import_react6 = require("react");
73
73
  // src/error-boundary.tsx
74
74
  var React = __toESM(require("react"));
75
75
 
76
+ // ../report-ui/dist/assist-response.mjs
77
+ var ASSIST_OFFLINE_MESSAGE = "The assistant is unavailable \u2014 write your report below and send it as normal.";
78
+ function assistOffline() {
79
+ return { conversationId: null, question: null, report: null, degraded: ASSIST_OFFLINE_MESSAGE };
80
+ }
81
+ function toAssistTurnResult(ok, body) {
82
+ var _a, _b, _c, _d, _e, _f, _g, _h;
83
+ const envelope = body != null ? body : null;
84
+ if (!ok || !(envelope == null ? void 0 : envelope.success)) {
85
+ return {
86
+ ...assistOffline(),
87
+ // The server words why (cap, rate limit, switched off). An hourly limit
88
+ // keeps the assistant button for this report.
89
+ degraded: (_a = envelope == null ? void 0 : envelope.error) != null ? _a : ASSIST_OFFLINE_MESSAGE,
90
+ retryable: (envelope == null ? void 0 : envelope.retryable) === true
91
+ };
92
+ }
93
+ const d = (_b = envelope.data) != null ? _b : {};
94
+ return {
95
+ conversationId: (_c = d.conversationId) != null ? _c : null,
96
+ question: (_d = d.question) != null ? _d : null,
97
+ options: Array.isArray(d.options) ? d.options.filter((o) => typeof o === "string") : [],
98
+ report: (_e = d.report) != null ? _e : null,
99
+ duplicate: (_f = d.duplicate) != null ? _f : null,
100
+ related: (_g = d.related) != null ? _g : null,
101
+ solved: (_h = d.solved) != null ? _h : null,
102
+ aboutGlitchgrab: d.aboutGlitchgrab === true,
103
+ degraded: null
104
+ };
105
+ }
106
+
76
107
  // src/redact.ts
77
108
  var SENSITIVE_KEY_RE = /(pass|pwd|secret|token|auth|session|cookie|credential|apikey|api_key|access_key|private|signature|otp|pin|cvv|card|ssn|aadhaar|pan)/i;
78
109
  var EMAIL_RE = /[\w.+-]+@[\w-]+\.[\w.-]+/g;
@@ -747,13 +778,7 @@ async function findSimilarIssues(description, token, baseUrl, identity) {
747
778
  }
748
779
  }
749
780
  async function assistTurn(params, token, baseUrl) {
750
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
751
- const offline = {
752
- conversationId: null,
753
- question: null,
754
- report: null,
755
- degraded: "The assistant is unavailable \u2014 write your report below and send it as normal."
756
- };
781
+ const offline = assistOffline();
757
782
  try {
758
783
  const url = `${baseUrl != null ? baseUrl : DEFAULT_BASE_URL}/api/v1/ai/report-chat`;
759
784
  const response = await fetch(url, {
@@ -764,28 +789,7 @@ async function assistTurn(params, token, baseUrl) {
764
789
  },
765
790
  body: JSON.stringify(params)
766
791
  });
767
- const envelope = await response.json().catch(() => null);
768
- if (!response.ok || !(envelope == null ? void 0 : envelope.success)) {
769
- return {
770
- conversationId: null,
771
- question: null,
772
- report: null,
773
- degraded: (_a = envelope == null ? void 0 : envelope.error) != null ? _a : offline.degraded,
774
- // An hourly limit, not a cap: the dialog keeps the assistant button.
775
- retryable: (envelope == null ? void 0 : envelope.retryable) === true
776
- };
777
- }
778
- return {
779
- conversationId: (_c = (_b = envelope.data) == null ? void 0 : _b.conversationId) != null ? _c : null,
780
- question: (_e = (_d = envelope.data) == null ? void 0 : _d.question) != null ? _e : null,
781
- options: (_g = (_f = envelope.data) == null ? void 0 : _f.options) != null ? _g : [],
782
- report: (_i = (_h = envelope.data) == null ? void 0 : _h.report) != null ? _i : null,
783
- duplicate: (_k = (_j = envelope.data) == null ? void 0 : _j.duplicate) != null ? _k : null,
784
- related: (_m = (_l = envelope.data) == null ? void 0 : _l.related) != null ? _m : null,
785
- solved: (_o = (_n = envelope.data) == null ? void 0 : _n.solved) != null ? _o : null,
786
- aboutGlitchgrab: ((_p = envelope.data) == null ? void 0 : _p.aboutGlitchgrab) === true,
787
- degraded: null
788
- };
792
+ return toAssistTurnResult(response.ok, await response.json().catch(() => null));
789
793
  } catch (e) {
790
794
  return offline;
791
795
  }
@@ -1009,10 +1013,11 @@ var import_jsx_runtime = require("react/jsx-runtime");
1009
1013
  var import_react3 = require("react");
1010
1014
  var import_react_dom2 = require("react-dom");
1011
1015
  var import_jsx_runtime2 = require("react/jsx-runtime");
1016
+ var import_jsx_runtime3 = require("react/jsx-runtime");
1012
1017
  var import_react4 = require("react");
1013
1018
  var import_react_dom3 = require("react-dom");
1014
- var import_jsx_runtime3 = require("react/jsx-runtime");
1015
1019
  var import_jsx_runtime4 = require("react/jsx-runtime");
1020
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1016
1021
  var MAX_SCREENSHOT_DATA_URL_LENGTH = 18e5;
1017
1022
  var QUALITY_LADDER = [0.92, 0.85, 0.75];
1018
1023
  var DOWNSCALE_FACTOR = 0.7;
@@ -1443,6 +1448,412 @@ function getTypeLabel(type) {
1443
1448
  return "Other";
1444
1449
  }
1445
1450
  }
1451
+ var CODE = /`([^`\n]+)`/y;
1452
+ var MD_LINK = /\[([^\]\n]*)\]\((https?:\/\/[^\s)]+)\)/y;
1453
+ var BOLD_STAR = /\*\*(\S(?:[^\n]*?\S)?)\*\*/y;
1454
+ var BOLD_UNDER = /__(\S(?:[^\n]*?\S)?)__/y;
1455
+ var ITALIC_STAR = /\*(\S(?:[^*\n]*?\S)?)\*/y;
1456
+ var ITALIC_UNDER = /_(\S(?:[^_\n]*?\S)?)_/y;
1457
+ var STRIKE = /~~(\S(?:[^\n]*?\S)?)~~/y;
1458
+ var FULL_URL = /https?:\/\/[^\s<>]+/y;
1459
+ var BARE_URL = /(?:[a-z0-9-]+\.)+[a-z]{2,24}\/[^\s<>]*/y;
1460
+ var WORD = /[A-Za-z0-9]/;
1461
+ var URL_EDGE = /[A-Za-z0-9@./-]/;
1462
+ var TRAILING_PUNCT = /[.,;:!?'")\]*_~]+$/;
1463
+ var ESCAPABLE = "\\`*_{}[]()#+-.!|~>";
1464
+ var MONO = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
1465
+ function at(re, text, i) {
1466
+ re.lastIndex = i;
1467
+ return re.exec(text);
1468
+ }
1469
+ function isSafeHref(href) {
1470
+ try {
1471
+ const { protocol } = new URL(href);
1472
+ return protocol === "http:" || protocol === "https:";
1473
+ } catch (e) {
1474
+ return false;
1475
+ }
1476
+ }
1477
+ function renderInline(text, theme, key) {
1478
+ var _a, _b;
1479
+ const out = [];
1480
+ let plain = "";
1481
+ let i = 0;
1482
+ const flush = () => {
1483
+ if (plain) out.push(plain);
1484
+ plain = "";
1485
+ };
1486
+ const link = (href, label, k) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1487
+ "a",
1488
+ {
1489
+ href,
1490
+ target: "_blank",
1491
+ rel: "noopener noreferrer nofollow",
1492
+ title: href,
1493
+ style: {
1494
+ color: "inherit",
1495
+ textDecoration: "underline",
1496
+ textDecorationColor: theme.accent,
1497
+ textUnderlineOffset: "2px",
1498
+ wordBreak: "break-word"
1499
+ },
1500
+ children: label
1501
+ },
1502
+ k
1503
+ );
1504
+ while (i < text.length) {
1505
+ const ch = text[i];
1506
+ const prev = i > 0 ? text[i - 1] : "";
1507
+ const k = `${key}.${i}`;
1508
+ let m;
1509
+ if (ch === "\\" && i + 1 < text.length && ESCAPABLE.includes(text[i + 1])) {
1510
+ plain += text[i + 1];
1511
+ i += 2;
1512
+ continue;
1513
+ }
1514
+ if (ch === "`" && (m = at(CODE, text, i))) {
1515
+ flush();
1516
+ out.push(
1517
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1518
+ "code",
1519
+ {
1520
+ style: {
1521
+ fontFamily: MONO,
1522
+ fontSize: "0.92em",
1523
+ padding: "1px 4px",
1524
+ borderRadius: "4px",
1525
+ backgroundColor: theme.bg,
1526
+ border: `1px solid ${theme.border}`,
1527
+ wordBreak: "break-word"
1528
+ },
1529
+ children: m[1]
1530
+ },
1531
+ k
1532
+ )
1533
+ );
1534
+ i += m[0].length;
1535
+ continue;
1536
+ }
1537
+ const image = ch === "!" && text[i + 1] === "[";
1538
+ if ((ch === "[" || image) && (m = at(MD_LINK, text, image ? i + 1 : i)) && isSafeHref(m[2])) {
1539
+ flush();
1540
+ const label = m[1] ? renderInline(m[1], theme, k) : m[2];
1541
+ out.push(link(m[2], label, k));
1542
+ i += m[0].length + (image ? 1 : 0);
1543
+ continue;
1544
+ }
1545
+ if (ch === "~" && text[i + 1] === "~" && (m = at(STRIKE, text, i))) {
1546
+ flush();
1547
+ out.push(/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("del", { children: renderInline(m[1], theme, k) }, k));
1548
+ i += m[0].length;
1549
+ continue;
1550
+ }
1551
+ if ((ch === "*" || ch === "_") && !WORD.test(prev)) {
1552
+ const double = text[i + 1] === ch;
1553
+ const bold = double ? at(ch === "*" ? BOLD_STAR : BOLD_UNDER, text, i) : null;
1554
+ const italic = bold ? null : at(ch === "*" ? ITALIC_STAR : ITALIC_UNDER, text, i);
1555
+ m = bold != null ? bold : italic;
1556
+ if (m && !WORD.test((_a = text[i + m[0].length]) != null ? _a : "")) {
1557
+ flush();
1558
+ const inner = renderInline(m[1], theme, k);
1559
+ out.push(
1560
+ bold ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { style: { fontWeight: 700 }, children: inner }, k) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("em", { style: { fontStyle: "italic" }, children: inner }, k)
1561
+ );
1562
+ i += m[0].length;
1563
+ continue;
1564
+ }
1565
+ }
1566
+ if (!URL_EDGE.test(prev)) {
1567
+ m = ch === "h" ? at(FULL_URL, text, i) : null;
1568
+ const bare = m ? null : /[a-z0-9]/.test(ch) ? at(BARE_URL, text, i) : null;
1569
+ const raw = (_b = m == null ? void 0 : m[0]) != null ? _b : bare == null ? void 0 : bare[0];
1570
+ if (raw) {
1571
+ const shown = raw.replace(TRAILING_PUNCT, "");
1572
+ const href = m ? shown : `https://${shown}`;
1573
+ if (shown.includes("/") && isSafeHref(href)) {
1574
+ flush();
1575
+ out.push(link(href, shown, k));
1576
+ i += shown.length;
1577
+ continue;
1578
+ }
1579
+ }
1580
+ }
1581
+ plain += ch;
1582
+ i += 1;
1583
+ }
1584
+ flush();
1585
+ return out;
1586
+ }
1587
+ var FENCE = /^\s{0,3}(`{3,}|~{3,})/;
1588
+ var HEADING = /^\s{0,3}(#{1,6})\s+(.+?)(?:\s+#+)?\s*$/;
1589
+ var RULE = /^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/;
1590
+ var QUOTE = /^\s{0,3}>\s?(.*)$/;
1591
+ var LIST_ITEM = /^(\s*)([-*+]|\d{1,9}[.)])\s+(.*)$/;
1592
+ var TABLE_SEP = /^\s*\|?\s*:?-+:?\s*(?:\|\s*:?-+:?\s*)*\|?\s*$/;
1593
+ var TASK = /^\[([ xX])\]\s+(.*)$/;
1594
+ var STACK = {
1595
+ display: "flex",
1596
+ flexDirection: "column",
1597
+ gap: "6px",
1598
+ minWidth: 0
1599
+ };
1600
+ function splitRow(line) {
1601
+ let s = line.trim();
1602
+ if (s.startsWith("|")) s = s.slice(1);
1603
+ if (s.endsWith("|") && !s.endsWith("\\|")) s = s.slice(0, -1);
1604
+ const cells = [];
1605
+ let cell = "";
1606
+ for (let i = 0; i < s.length; i++) {
1607
+ if (s[i] === "\\" && s[i + 1] === "|") {
1608
+ cell += "|";
1609
+ i++;
1610
+ } else if (s[i] === "|") {
1611
+ cells.push(cell.trim());
1612
+ cell = "";
1613
+ } else {
1614
+ cell += s[i];
1615
+ }
1616
+ }
1617
+ cells.push(cell.trim());
1618
+ return cells;
1619
+ }
1620
+ function tableAt(lines, i) {
1621
+ const head = lines[i];
1622
+ const sep = lines[i + 1];
1623
+ if (!(head == null ? void 0 : head.includes("|")) || !(sep == null ? void 0 : sep.includes("|")) || !TABLE_SEP.test(sep)) return null;
1624
+ const aligns = splitRow(sep);
1625
+ return aligns.length === splitRow(head).length ? aligns : null;
1626
+ }
1627
+ function startsBlock(lines, i) {
1628
+ const line = lines[i];
1629
+ return FENCE.test(line) || HEADING.test(line) || RULE.test(line) || QUOTE.test(line) || LIST_ITEM.test(line) || tableAt(lines, i) !== null;
1630
+ }
1631
+ function renderBlocks(lines, theme, key) {
1632
+ const out = [];
1633
+ let i = 0;
1634
+ while (i < lines.length) {
1635
+ const line = lines[i];
1636
+ const k = `${key}-${i}`;
1637
+ let m;
1638
+ if (!line.trim()) {
1639
+ i++;
1640
+ continue;
1641
+ }
1642
+ if (m = FENCE.exec(line)) {
1643
+ const fence = m[1];
1644
+ const body = [];
1645
+ i++;
1646
+ while (i < lines.length) {
1647
+ const t2 = lines[i].trim();
1648
+ if (t2.length >= fence.length && [...t2].every((c) => c === fence[0])) break;
1649
+ body.push(lines[i]);
1650
+ i++;
1651
+ }
1652
+ i++;
1653
+ out.push(
1654
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1655
+ "pre",
1656
+ {
1657
+ style: {
1658
+ margin: 0,
1659
+ padding: "8px 10px",
1660
+ borderRadius: "6px",
1661
+ backgroundColor: theme.bg,
1662
+ border: `1px solid ${theme.border}`,
1663
+ overflowX: "auto",
1664
+ maxWidth: "100%",
1665
+ fontFamily: MONO,
1666
+ fontSize: "12px",
1667
+ lineHeight: 1.5,
1668
+ whiteSpace: "pre"
1669
+ },
1670
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("code", { style: { fontFamily: "inherit" }, children: body.join("\n") })
1671
+ },
1672
+ k
1673
+ )
1674
+ );
1675
+ continue;
1676
+ }
1677
+ if (m = HEADING.exec(line)) {
1678
+ const level = m[1].length;
1679
+ out.push(
1680
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1681
+ "div",
1682
+ {
1683
+ role: "heading",
1684
+ "aria-level": level,
1685
+ style: {
1686
+ fontWeight: 700,
1687
+ fontSize: level === 1 ? "1.15em" : level === 2 ? "1.08em" : "1em",
1688
+ lineHeight: 1.35
1689
+ },
1690
+ children: renderInline(m[2], theme, k)
1691
+ },
1692
+ k
1693
+ )
1694
+ );
1695
+ i++;
1696
+ continue;
1697
+ }
1698
+ if (RULE.test(line)) {
1699
+ out.push(/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { role: "separator", style: { borderTop: `1px solid ${theme.border}` } }, k));
1700
+ i++;
1701
+ continue;
1702
+ }
1703
+ if (QUOTE.test(line)) {
1704
+ const inner = [];
1705
+ while (i < lines.length && (m = QUOTE.exec(lines[i]))) {
1706
+ inner.push(m[1]);
1707
+ i++;
1708
+ }
1709
+ out.push(
1710
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1711
+ "blockquote",
1712
+ {
1713
+ style: {
1714
+ ...STACK,
1715
+ margin: 0,
1716
+ paddingLeft: "10px",
1717
+ // `border` is near the bubble's own colour; the bar vanished.
1718
+ borderLeft: `3px solid ${theme.accent}66`,
1719
+ color: theme.textMuted
1720
+ },
1721
+ children: renderBlocks(inner, theme, k)
1722
+ },
1723
+ k
1724
+ )
1725
+ );
1726
+ continue;
1727
+ }
1728
+ const aligns = tableAt(lines, i);
1729
+ if (aligns) {
1730
+ const head = splitRow(line);
1731
+ const rows = [];
1732
+ i += 2;
1733
+ while (i < lines.length && lines[i].trim() && lines[i].includes("|")) {
1734
+ rows.push(splitRow(lines[i]));
1735
+ i++;
1736
+ }
1737
+ const align = (c) => {
1738
+ var _a;
1739
+ const a = (_a = aligns[c]) != null ? _a : "";
1740
+ if (a.startsWith(":") && a.endsWith(":")) return "center";
1741
+ return a.endsWith(":") ? "right" : "left";
1742
+ };
1743
+ const cell = (c) => ({
1744
+ border: `1px solid ${theme.border}`,
1745
+ padding: "4px 8px",
1746
+ textAlign: align(c),
1747
+ verticalAlign: "top"
1748
+ });
1749
+ out.push(
1750
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { overflowX: "auto", maxWidth: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("table", { style: { borderCollapse: "collapse", fontSize: "12px", margin: 0 }, children: [
1751
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tr", { children: head.map((h, c) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { style: { ...cell(c), fontWeight: 600, backgroundColor: theme.bg }, children: renderInline(h, theme, `${k}h${c}`) }, c)) }) }),
1752
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tbody", { children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tr", { children: head.map((_, c) => {
1753
+ var _a;
1754
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { style: cell(c), children: renderInline((_a = row[c]) != null ? _a : "", theme, `${k}r${r}c${c}`) }, c);
1755
+ }) }, r)) })
1756
+ ] }) }, k)
1757
+ );
1758
+ continue;
1759
+ }
1760
+ if (m = LIST_ITEM.exec(line)) {
1761
+ const baseIndent = m[1].length;
1762
+ const ordered = /\d/.test(m[2]);
1763
+ const start = ordered ? parseInt(m[2], 10) : 1;
1764
+ const items = [];
1765
+ while (i < lines.length) {
1766
+ const l = lines[i];
1767
+ const lm = LIST_ITEM.exec(l);
1768
+ const indent = l.length - l.trimStart().length;
1769
+ if (lm && indent <= baseIndent + 1) {
1770
+ if (/\d/.test(lm[2]) !== ordered) break;
1771
+ items.push([lm[3]]);
1772
+ i++;
1773
+ continue;
1774
+ }
1775
+ const current = items[items.length - 1];
1776
+ if (!l.trim()) {
1777
+ const next = lines[i + 1];
1778
+ const nextIndent = next ? next.length - next.trimStart().length : 0;
1779
+ if ((next == null ? void 0 : next.trim()) && (nextIndent > baseIndent + 1 || LIST_ITEM.test(next))) {
1780
+ current.push("");
1781
+ i++;
1782
+ continue;
1783
+ }
1784
+ break;
1785
+ }
1786
+ if (indent > baseIndent + 1) {
1787
+ current.push(l.slice(Math.min(indent, baseIndent + 2)));
1788
+ i++;
1789
+ continue;
1790
+ }
1791
+ break;
1792
+ }
1793
+ const ListTag = ordered ? "ol" : "ul";
1794
+ out.push(
1795
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1796
+ ListTag,
1797
+ {
1798
+ start: ordered && start !== 1 ? start : void 0,
1799
+ style: {
1800
+ margin: 0,
1801
+ paddingLeft: "20px",
1802
+ listStyleType: ordered ? "decimal" : "disc",
1803
+ listStylePosition: "outside"
1804
+ },
1805
+ children: items.map((itemLines, n) => {
1806
+ const ik = `${k}i${n}`;
1807
+ const task = TASK.exec(itemLines[0]);
1808
+ const body = task ? [task[2], ...itemLines.slice(1)] : itemLines;
1809
+ const box = task ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-hidden": "true", style: { marginRight: "6px" }, children: task[1] === " " ? "\u2610" : "\u2611" }) : null;
1810
+ const simple = body.filter((x) => x.trim()).length === 1;
1811
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1812
+ "li",
1813
+ {
1814
+ style: {
1815
+ display: "list-item",
1816
+ marginTop: n ? "3px" : 0,
1817
+ paddingLeft: "2px",
1818
+ listStyleType: task ? "none" : void 0
1819
+ },
1820
+ children: simple ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
1821
+ box,
1822
+ renderInline(body[0], theme, ik)
1823
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: STACK, children: [
1824
+ box ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
1825
+ box,
1826
+ renderInline(body[0], theme, ik)
1827
+ ] }) : null,
1828
+ renderBlocks(box ? body.slice(1) : body, theme, ik)
1829
+ ] })
1830
+ },
1831
+ ik
1832
+ );
1833
+ })
1834
+ },
1835
+ k
1836
+ )
1837
+ );
1838
+ continue;
1839
+ }
1840
+ const para = [];
1841
+ while (i < lines.length && lines[i].trim() && !(para.length && startsBlock(lines, i))) {
1842
+ para.push(lines[i].trim());
1843
+ i++;
1844
+ }
1845
+ out.push(
1846
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: para.flatMap((p, n) => {
1847
+ const inline = renderInline(p, theme, `${k}p${n}`);
1848
+ return n ? [/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("br", {}, `${k}br${n}`), ...inline] : inline;
1849
+ }) }, k)
1850
+ );
1851
+ }
1852
+ return out;
1853
+ }
1854
+ function ChatMarkdown({ text, theme }) {
1855
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: STACK, children: renderBlocks(text.replace(/\r\n?/g, "\n").split("\n"), theme, "md") });
1856
+ }
1446
1857
  function pickAssistImages(all) {
1447
1858
  const picked = [];
1448
1859
  let total = 0;
@@ -1475,6 +1886,17 @@ var STARTERS = [
1475
1886
  "It did the wrong thing",
1476
1887
  "I wish it could\u2026"
1477
1888
  ];
1889
+ var CONFIRM_OPTION = "Yes, that's it";
1890
+ function isCheckBackQuestion(text) {
1891
+ const t2 = text.trim();
1892
+ return /^so,? you['’]?re saying\b/i.test(t2) || /\b(is that right|is that correct|did i get (that|it) right|have i got (that|it) right)\s*\??\s*$/i.test(t2);
1893
+ }
1894
+ function isAffirmativeReply(text) {
1895
+ return /^(y|ya|yah|yes|yess|yeah|yep|yup|ok|okay|sure|correct|right|exactly|confirm(ed)?|that['’]?s (it|right|correct)|yes,? that['’]?s (it|right)|haan|han|ha|ho|hmm yes|👍)[\s.!👍]*$/i.test(
1896
+ text.trim()
1897
+ );
1898
+ }
1899
+ var AUTO_FILE_SECONDS = 3;
1478
1900
  var NARROW_QUERY = "(max-width: 640px)";
1479
1901
  function useIsNarrow() {
1480
1902
  const [narrow, setNarrow] = (0, import_react3.useState)(false);
@@ -1491,7 +1913,7 @@ function useIsNarrow() {
1491
1913
  return narrow;
1492
1914
  }
1493
1915
  function Sparkle({ color, size = 14 }) {
1494
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1916
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1495
1917
  "path",
1496
1918
  {
1497
1919
  d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3zM19 15l.75 2.25L22 18l-2.25.75L19 21l-.75-2.25L16 18l2.25-.75L19 15z",
@@ -1507,7 +1929,7 @@ function Avatar({
1507
1929
  initials
1508
1930
  }) {
1509
1931
  const isAi = who === "assistant";
1510
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1932
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1511
1933
  "span",
1512
1934
  {
1513
1935
  "aria-hidden": "true",
@@ -1526,9 +1948,9 @@ function Avatar({
1526
1948
  fontSize: "10px",
1527
1949
  fontWeight: 700
1528
1950
  },
1529
- children: isAi ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Sparkle, { color: t2.accent, size: 12 }) : initials ? initials : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
1530
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "8", r: "3.4", stroke: "currentColor", strokeWidth: "1.8" }),
1531
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1951
+ children: isAi ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Sparkle, { color: t2.accent, size: 12 }) : initials ? initials : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
1952
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "8", r: "3.4", stroke: "currentColor", strokeWidth: "1.8" }),
1953
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1532
1954
  "path",
1533
1955
  {
1534
1956
  d: "M5 20c0-3.6 3.1-5.6 7-5.6s7 2 7 5.6",
@@ -1589,12 +2011,15 @@ function AssistSheet({
1589
2011
  const [duplicate, setDuplicate] = (0, import_react3.useState)(null);
1590
2012
  const [glitchgrabOffer, setGlitchgrabOffer] = (0, import_react3.useState)(false);
1591
2013
  const [solved, setSolved] = (0, import_react3.useState)(null);
2014
+ const needsSeverity = (tile) => showSeverity && tile === "BUG" && !severity;
1592
2015
  const [phase, setPhase] = (0, import_react3.useState)(
1593
- !typePicked ? "type" : currentTile === "RATING" ? "rating" : "chat"
2016
+ () => !typePicked ? "type" : currentTile === "RATING" ? "rating" : needsSeverity(currentTile) ? "severity" : "chat"
1594
2017
  );
2018
+ const [autoFileLeft, setAutoFileLeft] = (0, import_react3.useState)(null);
1595
2019
  const scrollRef = (0, import_react3.useRef)(null);
1596
2020
  const draftRef = (0, import_react3.useRef)(null);
1597
2021
  const seededRef = (0, import_react3.useRef)(false);
2022
+ const seedPendingRef = (0, import_react3.useRef)(false);
1598
2023
  const eventsRef = (0, import_react3.useRef)([]);
1599
2024
  const aiDraftRef = (0, import_react3.useRef)(null);
1600
2025
  function logEvent(type, detail) {
@@ -1634,14 +2059,33 @@ function AssistSheet({
1634
2059
  var _a;
1635
2060
  if (phase === "draft") (_a = draftRef.current) == null ? void 0 : _a.focus();
1636
2061
  }, [phase]);
2062
+ (0, import_react3.useEffect)(() => {
2063
+ if (autoFileLeft === null) return;
2064
+ if (isSubmitting || submitted || phase !== "draft") {
2065
+ setAutoFileLeft(null);
2066
+ return;
2067
+ }
2068
+ if (autoFileLeft <= 0) {
2069
+ sendDraft(true);
2070
+ return;
2071
+ }
2072
+ const id = setTimeout(() => setAutoFileLeft((n) => n === null ? null : n - 1), 1e3);
2073
+ return () => clearTimeout(id);
2074
+ }, [autoFileLeft, isSubmitting, submitted, phase]);
2075
+ function stopAutoFile(reason) {
2076
+ if (autoFileLeft === null) return;
2077
+ setAutoFileLeft(null);
2078
+ logEvent("auto_file_stopped", reason);
2079
+ }
1637
2080
  function degradeKeepingEvents(events, message, retryable) {
1638
2081
  if (events) eventsRef.current = [...events, ...eventsRef.current];
1639
2082
  flushEvents();
1640
2083
  onDegrade(message, retryable);
1641
2084
  }
1642
- async function runTurn(history2) {
2085
+ async function runTurn(history2, autoFile = false) {
1643
2086
  var _a, _b;
1644
2087
  setBusy(true);
2088
+ setAutoFileLeft(null);
1645
2089
  let result;
1646
2090
  const events = takeEvents();
1647
2091
  try {
@@ -1701,6 +2145,9 @@ function AssistSheet({
1701
2145
  setMessages([...history2, { role: "assistant", content: result.report, kind: "report" }]);
1702
2146
  setOptions([]);
1703
2147
  setPhase("draft");
2148
+ if (autoFile && !attach && !(severityAsked && !severity)) {
2149
+ setAutoFileLeft(AUTO_FILE_SECONDS);
2150
+ }
1704
2151
  return;
1705
2152
  }
1706
2153
  if (result.question) {
@@ -1714,13 +2161,34 @@ function AssistSheet({
1714
2161
  if (seededRef.current) return;
1715
2162
  seededRef.current = true;
1716
2163
  if (!typePicked || currentTile === "RATING") return;
2164
+ if (phase === "severity") {
2165
+ seedPendingRef.current = true;
2166
+ return;
2167
+ }
2168
+ seedFromDescription();
2169
+ }, []);
2170
+ function seedFromDescription() {
1717
2171
  const seed = description.trim();
1718
2172
  if (!seed) return;
1719
2173
  const history2 = [{ role: "user", content: seed }];
1720
2174
  setMessages(history2);
1721
2175
  void runTurn(history2);
1722
- }, []);
1723
- function send(text) {
2176
+ }
2177
+ function answerSeverity(value) {
2178
+ onSeverityChange(value);
2179
+ setPhase("chat");
2180
+ if (seedPendingRef.current) {
2181
+ seedPendingRef.current = false;
2182
+ seedFromDescription();
2183
+ }
2184
+ }
2185
+ function sendTyped(text) {
2186
+ var _a;
2187
+ const lastAssistant = [...messages].reverse().find((m) => m.role === "assistant");
2188
+ const checkingBack = options.includes(CONFIRM_OPTION) || (lastAssistant == null ? void 0 : lastAssistant.kind) !== "report" && isCheckBackQuestion((_a = lastAssistant == null ? void 0 : lastAssistant.content) != null ? _a : "");
2189
+ send(text, checkingBack && isAffirmativeReply(text));
2190
+ }
2191
+ function send(text, autoFile = false) {
1724
2192
  const value = text.trim();
1725
2193
  if (!value || busy) return;
1726
2194
  setOptions([]);
@@ -1735,11 +2203,11 @@ function AssistSheet({
1735
2203
  const history2 = [...base, { role: "user", content: value }];
1736
2204
  setMessages(history2);
1737
2205
  setInput("");
1738
- void runTurn(history2);
2206
+ void runTurn(history2, autoFile);
1739
2207
  }
1740
2208
  function pickType(tile) {
1741
2209
  onPickType(tile);
1742
- setPhase(tile === "RATING" ? "rating" : "chat");
2210
+ setPhase(tile === "RATING" ? "rating" : needsSeverity(tile) ? "severity" : "chat");
1743
2211
  }
1744
2212
  function withCurrentDraft(history2) {
1745
2213
  const current = description.trim();
@@ -1752,16 +2220,17 @@ function AssistSheet({
1752
2220
  }
1753
2221
  return next;
1754
2222
  }
1755
- function sendDraft() {
2223
+ function sendDraft(auto = false) {
2224
+ setAutoFileLeft(null);
1756
2225
  const edited = aiDraftRef.current !== null && description.trim() !== aiDraftRef.current.trim();
1757
- logEvent("draft_sent", edited ? "edited" : "as drafted");
2226
+ logEvent("draft_sent", auto ? "auto-filed" : edited ? "edited" : "as drafted");
1758
2227
  flushEvents();
1759
2228
  onSend();
1760
2229
  }
1761
2230
  const empty = phase === "chat" && messages.length === 0 && !busy;
1762
2231
  function renderKnownIssue({ title, footer }) {
1763
2232
  if (!duplicate) return null;
1764
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2233
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1765
2234
  "div",
1766
2235
  {
1767
2236
  "data-gg-known-issue": "",
@@ -1778,15 +2247,15 @@ function AssistSheet({
1778
2247
  minWidth: 0
1779
2248
  },
1780
2249
  children: [
1781
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { color: t2.text, fontWeight: 600 }, children: duplicate.kind === "related" ? title ? "Your request goes onto this issue" : `Connected to #${duplicate.number}` : title ? "Our team is already on this" : `Our team is already on #${duplicate.number}` }),
1782
- title && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { style: { color: t2.textMuted, wordBreak: "break-word" }, children: [
2250
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: t2.text, fontWeight: 600 }, children: duplicate.kind === "related" ? title ? "Your request goes onto this issue" : `Connected to #${duplicate.number}` : title ? "Our team is already on this" : `Our team is already on #${duplicate.number}` }),
2251
+ title && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: { color: t2.textMuted, wordBreak: "break-word" }, children: [
1783
2252
  "#",
1784
2253
  duplicate.number,
1785
2254
  " ",
1786
2255
  duplicate.title
1787
2256
  ] }),
1788
- duplicate.status && duplicate.kind !== "related" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { color: t2.text, fontWeight: 600 }, children: duplicate.status }),
1789
- footer && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { color: t2.textMuted }, children: duplicate.kind === "related" ? "Added as a separate request on it, not a repeat \u2014 the team sees both." : footer })
2257
+ duplicate.status && duplicate.kind !== "related" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: t2.text, fontWeight: 600 }, children: duplicate.status }),
2258
+ footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: t2.textMuted }, children: duplicate.kind === "related" ? "Added as a separate request on it, not a repeat \u2014 the team sees both." : footer })
1790
2259
  ]
1791
2260
  }
1792
2261
  );
@@ -1809,15 +2278,16 @@ function AssistSheet({
1809
2278
  animation: "gg-sheet-in .22s cubic-bezier(.2,.8,.2,1)"
1810
2279
  };
1811
2280
  return (0, import_react_dom2.createPortal)(
1812
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
1813
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", { children: `
2281
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2282
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("style", { children: `
1814
2283
  @keyframes gg-sheet-in{from{transform:translateX(24px);opacity:0}to{transform:translateX(0);opacity:1}}
1815
2284
  @keyframes gg-sheet-up{from{transform:translateY(24px);opacity:0}to{transform:translateY(0);opacity:1}}
1816
2285
  @keyframes gg-sheet-fade{from{opacity:0}to{opacity:1}}
2286
+ @keyframes gg-autofile{from{transform:scaleX(0)}to{transform:scaleX(1)}}
1817
2287
  @keyframes gg-dot{0%,80%,100%{transform:translateY(0);opacity:.4}40%{transform:translateY(-3px);opacity:1}}
1818
- [data-gg-sheet-send]:focus-visible,[data-gg-chip]:focus-visible,[data-gg-assist-remove]:focus-visible{outline:2px solid currentColor;outline-offset:2px}
2288
+ [data-gg-sheet-send]:focus-visible,[data-gg-chip]:focus-visible,[data-gg-assist-remove]:focus-visible,[data-gg-stop-auto-file]:focus-visible{outline:2px solid currentColor;outline-offset:2px}
1819
2289
  ` }),
1820
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2290
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1821
2291
  "div",
1822
2292
  {
1823
2293
  "data-glitchgrab-layer": "",
@@ -1837,7 +2307,7 @@ function AssistSheet({
1837
2307
  },
1838
2308
  onClick: () => leave("closed"),
1839
2309
  onPointerDown: (e) => e.stopPropagation(),
1840
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2310
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1841
2311
  "div",
1842
2312
  {
1843
2313
  onClick: (e) => e.stopPropagation(),
@@ -1858,7 +2328,7 @@ function AssistSheet({
1858
2328
  isolation: "isolate"
1859
2329
  },
1860
2330
  children: [
1861
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2331
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1862
2332
  "div",
1863
2333
  {
1864
2334
  "data-gg-sheet-header": "",
@@ -1873,8 +2343,8 @@ function AssistSheet({
1873
2343
  minWidth: 0
1874
2344
  },
1875
2345
  children: [
1876
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { minWidth: 0 }, children: [
1877
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2346
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { minWidth: 0 }, children: [
2347
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1878
2348
  "div",
1879
2349
  {
1880
2350
  style: {
@@ -1885,9 +2355,9 @@ function AssistSheet({
1885
2355
  fontWeight: 600
1886
2356
  },
1887
2357
  children: [
1888
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Sparkle, { color: t2.accent }),
2358
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Sparkle, { color: t2.accent }),
1889
2359
  "Describe it with AI",
1890
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2360
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1891
2361
  "span",
1892
2362
  {
1893
2363
  style: {
@@ -1906,12 +2376,13 @@ function AssistSheet({
1906
2376
  ]
1907
2377
  }
1908
2378
  ),
1909
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { fontSize: "11.5px", color: t2.textMuted, marginTop: "3px" }, children: [
2379
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { fontSize: "11.5px", color: t2.textMuted, marginTop: "3px" }, children: [
1910
2380
  phase === "type" ? null : reportTypeLabel,
1911
- projectSlot ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { marginLeft: "6px" }, children: projectSlot }) : null
2381
+ phase !== "type" && severityAsked && severity ? ` \xB7 ${SEVERITY_LABELS[severity]}` : null,
2382
+ projectSlot ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { marginLeft: "6px" }, children: projectSlot }) : null
1912
2383
  ] })
1913
2384
  ] }),
1914
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2385
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1915
2386
  "button",
1916
2387
  {
1917
2388
  type: "button",
@@ -1938,7 +2409,7 @@ function AssistSheet({
1938
2409
  ]
1939
2410
  }
1940
2411
  ),
1941
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2412
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1942
2413
  "div",
1943
2414
  {
1944
2415
  ref: scrollRef,
@@ -1950,7 +2421,7 @@ function AssistSheet({
1950
2421
  display: "flex",
1951
2422
  flexDirection: "column"
1952
2423
  },
1953
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2424
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1954
2425
  "div",
1955
2426
  {
1956
2427
  style: {
@@ -1961,10 +2432,10 @@ function AssistSheet({
1961
2432
  minWidth: 0
1962
2433
  },
1963
2434
  children: [
1964
- phase === "type" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
1965
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
1966
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Avatar, { who: "assistant", theme: t2 }),
1967
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2435
+ phase === "type" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
2436
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
2437
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t2 }),
2438
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1968
2439
  "div",
1969
2440
  {
1970
2441
  style: {
@@ -1982,7 +2453,7 @@ function AssistSheet({
1982
2453
  }
1983
2454
  )
1984
2455
  ] }),
1985
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2456
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1986
2457
  "div",
1987
2458
  {
1988
2459
  style: {
@@ -1993,7 +2464,7 @@ function AssistSheet({
1993
2464
  },
1994
2465
  children: tiles.map((tile) => {
1995
2466
  const rate = tile === "RATING";
1996
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2467
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1997
2468
  "button",
1998
2469
  {
1999
2470
  type: "button",
@@ -2026,10 +2497,66 @@ function AssistSheet({
2026
2497
  }
2027
2498
  )
2028
2499
  ] }),
2029
- phase === "rating" && !submitted && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
2030
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
2031
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Avatar, { who: "assistant", theme: t2 }),
2032
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2500
+ phase === "severity" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
2501
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
2502
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t2 }),
2503
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2504
+ "div",
2505
+ {
2506
+ style: {
2507
+ padding: "9px 12px",
2508
+ borderRadius: "12px 12px 12px 4px",
2509
+ backgroundColor: t2.bgSecondary,
2510
+ fontSize: "13px",
2511
+ lineHeight: 1.55,
2512
+ maxWidth: "88%"
2513
+ },
2514
+ children: "How bad is it?"
2515
+ }
2516
+ )
2517
+ ] }),
2518
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2519
+ "div",
2520
+ {
2521
+ role: "radiogroup",
2522
+ "aria-label": "Severity",
2523
+ style: {
2524
+ display: "flex",
2525
+ flexWrap: "wrap",
2526
+ gap: "6px",
2527
+ paddingLeft: "32px"
2528
+ },
2529
+ children: SEVERITY_LEVELS.map((s) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2530
+ "button",
2531
+ {
2532
+ type: "button",
2533
+ role: "radio",
2534
+ "aria-checked": severity === s,
2535
+ "data-gg-chip": "",
2536
+ "data-gg-severity": s,
2537
+ onClick: () => answerSeverity(s),
2538
+ style: {
2539
+ border: `1px solid ${t2.inputBorder}`,
2540
+ background: "transparent",
2541
+ color: t2.textMuted,
2542
+ borderRadius: "999px",
2543
+ // Same as the picker and option chips — one chip size.
2544
+ padding: "8px 12px",
2545
+ fontSize: "12px",
2546
+ fontFamily: "inherit",
2547
+ cursor: "pointer"
2548
+ },
2549
+ children: SEVERITY_LABELS[s]
2550
+ },
2551
+ s
2552
+ ))
2553
+ }
2554
+ )
2555
+ ] }),
2556
+ phase === "rating" && !submitted && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
2557
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
2558
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t2 }),
2559
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2033
2560
  "div",
2034
2561
  {
2035
2562
  style: {
@@ -2044,7 +2571,7 @@ function AssistSheet({
2044
2571
  }
2045
2572
  )
2046
2573
  ] }),
2047
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2574
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2048
2575
  "div",
2049
2576
  {
2050
2577
  style: {
@@ -2058,9 +2585,9 @@ function AssistSheet({
2058
2585
  backgroundColor: "rgba(245,158,11,0.06)"
2059
2586
  },
2060
2587
  children: [
2061
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { display: "flex", gap: "4px" }, role: "group", "aria-label": "Rating", children: [1, 2, 3, 4, 5].map((star) => {
2588
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { display: "flex", gap: "4px" }, role: "group", "aria-label": "Rating", children: [1, 2, 3, 4, 5].map((star) => {
2062
2589
  const filled = star <= (hoveredStar || rating);
2063
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2590
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2064
2591
  "button",
2065
2592
  {
2066
2593
  type: "button",
@@ -2076,7 +2603,7 @@ function AssistSheet({
2076
2603
  cursor: "pointer",
2077
2604
  lineHeight: 0
2078
2605
  },
2079
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "30", height: "30", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2606
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "30", height: "30", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2080
2607
  "path",
2081
2608
  {
2082
2609
  d: "M12 3l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.4 6.8 19.1l1-5.8L3.5 9.2l5.9-.9L12 3z",
@@ -2090,7 +2617,7 @@ function AssistSheet({
2090
2617
  star
2091
2618
  );
2092
2619
  }) }),
2093
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2620
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2094
2621
  "textarea",
2095
2622
  {
2096
2623
  value: description,
@@ -2113,7 +2640,7 @@ function AssistSheet({
2113
2640
  }
2114
2641
  }
2115
2642
  ),
2116
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2643
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2117
2644
  "button",
2118
2645
  {
2119
2646
  type: "button",
@@ -2137,10 +2664,10 @@ function AssistSheet({
2137
2664
  }
2138
2665
  )
2139
2666
  ] }),
2140
- empty && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
2141
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
2142
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Avatar, { who: "assistant", theme: t2 }),
2143
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2667
+ empty && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
2668
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
2669
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t2 }),
2670
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2144
2671
  "div",
2145
2672
  {
2146
2673
  style: {
@@ -2158,7 +2685,7 @@ function AssistSheet({
2158
2685
  }
2159
2686
  )
2160
2687
  ] }),
2161
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2688
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2162
2689
  "div",
2163
2690
  {
2164
2691
  style: {
@@ -2167,7 +2694,7 @@ function AssistSheet({
2167
2694
  gap: "6px",
2168
2695
  paddingLeft: "32px"
2169
2696
  },
2170
- children: STARTERS.map((s) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2697
+ children: STARTERS.map((s) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2171
2698
  "button",
2172
2699
  {
2173
2700
  type: "button",
@@ -2197,9 +2724,9 @@ function AssistSheet({
2197
2724
  const mine = m.role === "user";
2198
2725
  if (m.kind === "report") {
2199
2726
  const live = phase === "draft" && i === messages.length - 1;
2200
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: "8px", minWidth: 0 }, children: [
2201
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Avatar, { who: "assistant", theme: t2 }),
2202
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2727
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px", minWidth: 0 }, children: [
2728
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t2 }),
2729
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2203
2730
  "div",
2204
2731
  {
2205
2732
  "data-gg-draft-bubble": "",
@@ -2214,8 +2741,12 @@ function AssistSheet({
2214
2741
  color: t2.text,
2215
2742
  border: live ? "none" : `1px solid ${t2.accent}66`
2216
2743
  },
2217
- children: live ? "Here's your report \u2014 have a read." : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
2218
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2744
+ children: live ? (
2745
+ // #402: "have a read" beside a countdown reads as a
2746
+ // contradiction. Say what is about to happen instead.
2747
+ autoFileLeft !== null ? "Here's your report \u2014 I'll file it unless you want to change something." : "Here's your report \u2014 have a read."
2748
+ ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2749
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2219
2750
  "span",
2220
2751
  {
2221
2752
  style: {
@@ -2230,7 +2761,7 @@ function AssistSheet({
2230
2761
  children: "Draft so far"
2231
2762
  }
2232
2763
  ),
2233
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2764
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2234
2765
  "span",
2235
2766
  {
2236
2767
  style: {
@@ -2249,7 +2780,7 @@ function AssistSheet({
2249
2780
  )
2250
2781
  ] }, i);
2251
2782
  }
2252
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2783
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2253
2784
  "div",
2254
2785
  {
2255
2786
  style: {
@@ -2259,22 +2790,24 @@ function AssistSheet({
2259
2790
  flexDirection: mine ? "row-reverse" : "row"
2260
2791
  },
2261
2792
  children: [
2262
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Avatar, { who: m.role, theme: t2, initials }),
2263
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2793
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: m.role, theme: t2, initials }),
2794
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2264
2795
  "div",
2265
2796
  {
2266
2797
  style: {
2267
2798
  maxWidth: "82%",
2799
+ minWidth: 0,
2268
2800
  padding: "9px 12px",
2269
2801
  borderRadius: mine ? "12px 12px 4px 12px" : "12px 12px 12px 4px",
2270
2802
  fontSize: "13px",
2271
2803
  lineHeight: 1.55,
2272
- whiteSpace: "pre-wrap",
2804
+ // Markdown owns the assistant's line breaks and lists.
2805
+ whiteSpace: mine ? "pre-wrap" : "normal",
2273
2806
  wordBreak: "break-word",
2274
2807
  backgroundColor: mine ? t2.accent : t2.bgSecondary,
2275
2808
  color: mine ? t2.accentText : t2.text
2276
2809
  },
2277
- children: m.content
2810
+ children: mine ? m.content : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChatMarkdown, { text: m.content, theme: t2 })
2278
2811
  }
2279
2812
  )
2280
2813
  ]
@@ -2282,8 +2815,8 @@ function AssistSheet({
2282
2815
  i
2283
2816
  );
2284
2817
  }),
2285
- duplicate && !busy && phase === "chat" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { paddingLeft: "32px", minWidth: 0 }, children: renderKnownIssue({ title: false }) }),
2286
- glitchgrabOffer && onReportGlitchgrabProblem && !busy && phase === "chat" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { paddingLeft: "32px", minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2818
+ duplicate && !busy && phase === "chat" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { paddingLeft: "32px", minWidth: 0 }, children: renderKnownIssue({ title: false }) }),
2819
+ glitchgrabOffer && onReportGlitchgrabProblem && !busy && phase === "chat" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { paddingLeft: "32px", minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2287
2820
  "div",
2288
2821
  {
2289
2822
  "data-gg-glitchgrab-offer": "",
@@ -2299,10 +2832,10 @@ function AssistSheet({
2299
2832
  lineHeight: 1.5
2300
2833
  },
2301
2834
  children: [
2302
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { color: t2.text, fontWeight: 600 }, children: "This is about Glitchgrab, not this app" }),
2303
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { color: t2.textMuted }, children: "It goes to the team that builds this reporter, with your chat attached." }),
2304
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px" }, children: [
2305
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2835
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: t2.text, fontWeight: 600 }, children: "This is about Glitchgrab, not this app" }),
2836
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: t2.textMuted }, children: "It goes to the team that builds this reporter, with your chat attached." }),
2837
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px" }, children: [
2838
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2306
2839
  "button",
2307
2840
  {
2308
2841
  type: "button",
@@ -2331,7 +2864,7 @@ function AssistSheet({
2331
2864
  children: "Send to the Glitchgrab team"
2332
2865
  }
2333
2866
  ),
2334
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2867
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2335
2868
  "button",
2336
2869
  {
2337
2870
  type: "button",
@@ -2358,7 +2891,7 @@ function AssistSheet({
2358
2891
  ]
2359
2892
  }
2360
2893
  ) }),
2361
- options.length > 0 && !busy && phase === "chat" && !glitchgrabOffer && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2894
+ options.length > 0 && !busy && phase === "chat" && !glitchgrabOffer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2362
2895
  "div",
2363
2896
  {
2364
2897
  style: {
@@ -2373,7 +2906,7 @@ function AssistSheet({
2373
2906
  gap: "6px",
2374
2907
  paddingLeft: "32px"
2375
2908
  },
2376
- children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2909
+ children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2377
2910
  "button",
2378
2911
  {
2379
2912
  type: "button",
@@ -2381,7 +2914,7 @@ function AssistSheet({
2381
2914
  "data-gg-option": "",
2382
2915
  onClick: () => {
2383
2916
  logEvent("option_tap", option);
2384
- send(option);
2917
+ send(option, option === CONFIRM_OPTION);
2385
2918
  },
2386
2919
  style: {
2387
2920
  border: `1px solid ${t2.inputBorder}`,
@@ -2402,9 +2935,9 @@ function AssistSheet({
2402
2935
  ))
2403
2936
  }
2404
2937
  ),
2405
- busy && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: "8px" }, role: "status", "aria-label": "Thinking", children: [
2406
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Avatar, { who: "assistant", theme: t2 }),
2407
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2938
+ busy && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px" }, role: "status", "aria-label": "Thinking", children: [
2939
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t2 }),
2940
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2408
2941
  "span",
2409
2942
  {
2410
2943
  style: {
@@ -2415,7 +2948,7 @@ function AssistSheet({
2415
2948
  borderRadius: "12px 12px 12px 4px",
2416
2949
  backgroundColor: t2.bgSecondary
2417
2950
  },
2418
- children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2951
+ children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2419
2952
  "span",
2420
2953
  {
2421
2954
  style: {
@@ -2431,7 +2964,7 @@ function AssistSheet({
2431
2964
  }
2432
2965
  )
2433
2966
  ] }),
2434
- phase === "draft" && !submitted && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2967
+ phase === "draft" && !submitted && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2435
2968
  "div",
2436
2969
  {
2437
2970
  style: {
@@ -2446,7 +2979,7 @@ function AssistSheet({
2446
2979
  boxSizing: "border-box"
2447
2980
  },
2448
2981
  children: [
2449
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2982
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2450
2983
  "span",
2451
2984
  {
2452
2985
  style: {
@@ -2463,12 +2996,15 @@ function AssistSheet({
2463
2996
  title: true,
2464
2997
  footer: "Your details will be added to it instead of opening a new issue."
2465
2998
  }),
2466
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2999
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2467
3000
  "textarea",
2468
3001
  {
2469
3002
  ref: draftRef,
2470
3003
  value: description,
2471
- onChange: (e) => onDescriptionChange(e.target.value),
3004
+ onChange: (e) => {
3005
+ stopAutoFile("edited the draft");
3006
+ onDescriptionChange(e.target.value);
3007
+ },
2472
3008
  rows: 6,
2473
3009
  style: {
2474
3010
  width: "100%",
@@ -2487,8 +3023,8 @@ function AssistSheet({
2487
3023
  }
2488
3024
  }
2489
3025
  ),
2490
- severityAsked && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
2491
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3026
+ severityAsked && autoFileLeft === null && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
3027
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2492
3028
  "span",
2493
3029
  {
2494
3030
  style: {
@@ -2499,7 +3035,7 @@ function AssistSheet({
2499
3035
  },
2500
3036
  children: [
2501
3037
  "How bad is it?",
2502
- !severity && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3038
+ !severity && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2503
3039
  "span",
2504
3040
  {
2505
3041
  style: {
@@ -2513,7 +3049,7 @@ function AssistSheet({
2513
3049
  ]
2514
3050
  }
2515
3051
  ),
2516
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3052
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2517
3053
  "div",
2518
3054
  {
2519
3055
  role: "radiogroup",
@@ -2521,7 +3057,7 @@ function AssistSheet({
2521
3057
  style: { display: "flex", gap: "6px" },
2522
3058
  children: SEVERITY_LEVELS.map((s) => {
2523
3059
  const on = severity === s;
2524
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3060
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2525
3061
  "button",
2526
3062
  {
2527
3063
  type: "button",
@@ -2552,7 +3088,7 @@ function AssistSheet({
2552
3088
  }
2553
3089
  )
2554
3090
  ] }),
2555
- attachmentCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { style: { fontSize: "11.5px", color: t2.textMuted }, children: [
3091
+ attachmentCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: { fontSize: "11.5px", color: t2.textMuted }, children: [
2556
3092
  attachmentCount,
2557
3093
  " ",
2558
3094
  attachmentCount === 1 ? "attachment" : "attachments",
@@ -2561,10 +3097,10 @@ function AssistSheet({
2561
3097
  ]
2562
3098
  }
2563
3099
  ),
2564
- phase === "solved" && solved && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
2565
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
2566
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Avatar, { who: "assistant", theme: t2 }),
2567
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3100
+ phase === "solved" && solved && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
3101
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
3102
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t2 }),
3103
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2568
3104
  "div",
2569
3105
  {
2570
3106
  style: {
@@ -2580,7 +3116,7 @@ function AssistSheet({
2580
3116
  }
2581
3117
  )
2582
3118
  ] }),
2583
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3119
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2584
3120
  "span",
2585
3121
  {
2586
3122
  style: { fontSize: "11.5px", color: t2.textMuted, paddingLeft: "32px" },
@@ -2588,7 +3124,7 @@ function AssistSheet({
2588
3124
  }
2589
3125
  )
2590
3126
  ] }),
2591
- submitted && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3127
+ submitted && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2592
3128
  "div",
2593
3129
  {
2594
3130
  style: {
@@ -2609,7 +3145,7 @@ function AssistSheet({
2609
3145
  )
2610
3146
  }
2611
3147
  ),
2612
- !submitted && phase !== "type" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3148
+ !submitted && phase !== "type" && phase !== "severity" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2613
3149
  "div",
2614
3150
  {
2615
3151
  style: {
@@ -2620,7 +3156,7 @@ function AssistSheet({
2620
3156
  backgroundColor: t2.bg
2621
3157
  },
2622
3158
  children: [
2623
- phase === "solved" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3159
+ phase === "solved" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2624
3160
  "button",
2625
3161
  {
2626
3162
  type: "button",
@@ -2640,7 +3176,7 @@ function AssistSheet({
2640
3176
  },
2641
3177
  children: "Done"
2642
3178
  }
2643
- ) : phase === "rating" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3179
+ ) : phase === "rating" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2644
3180
  "button",
2645
3181
  {
2646
3182
  type: "button",
@@ -2666,8 +3202,8 @@ function AssistSheet({
2666
3202
  // element on both sides of a draft landing — it stays put
2667
3203
  // instead of remounting, and a draft is something you can
2668
3204
  // still reply to (#360), not a form that replaced the chat.
2669
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
2670
- (screenshots.length > 0 || files.length > 0 || onAddFiles) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3205
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3206
+ (screenshots.length > 0 || files.length > 0 || onAddFiles) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2671
3207
  "div",
2672
3208
  {
2673
3209
  style: {
@@ -2680,7 +3216,7 @@ function AssistSheet({
2680
3216
  children: [
2681
3217
  screenshots.map((shot, i) => {
2682
3218
  const read = readShots.has(shot);
2683
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3219
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2684
3220
  "div",
2685
3221
  {
2686
3222
  style: {
@@ -2690,7 +3226,7 @@ function AssistSheet({
2690
3226
  flexShrink: 0
2691
3227
  },
2692
3228
  children: [
2693
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3229
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2694
3230
  "img",
2695
3231
  {
2696
3232
  src: shot,
@@ -2708,7 +3244,7 @@ function AssistSheet({
2708
3244
  }
2709
3245
  }
2710
3246
  ),
2711
- onRemoveImage && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3247
+ onRemoveImage && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2712
3248
  "button",
2713
3249
  {
2714
3250
  type: "button",
@@ -2716,6 +3252,7 @@ function AssistSheet({
2716
3252
  "aria-label": `Remove image ${i + 1}`,
2717
3253
  title: "Remove this image",
2718
3254
  onClick: () => {
3255
+ stopAutoFile("changed attachments");
2719
3256
  logEvent(
2720
3257
  "image_removed",
2721
3258
  pageShot && shot === pageShot ? "page capture" : "attached"
@@ -2737,7 +3274,7 @@ function AssistSheet({
2737
3274
  justifyContent: "center",
2738
3275
  borderRadius: "50%"
2739
3276
  },
2740
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3277
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2741
3278
  "span",
2742
3279
  {
2743
3280
  "aria-hidden": "true",
@@ -2753,7 +3290,7 @@ function AssistSheet({
2753
3290
  alignItems: "center",
2754
3291
  justifyContent: "center"
2755
3292
  },
2756
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3293
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2757
3294
  "path",
2758
3295
  {
2759
3296
  d: "M1 1L9 9M9 1L1 9",
@@ -2774,7 +3311,7 @@ function AssistSheet({
2774
3311
  files.map((file, i) => {
2775
3312
  const read = readFiles.has(i);
2776
3313
  const why = read ? "the assistant reads this file" : isAssistReadableFile(file.name) ? "attached, but more than one message can carry, so the assistant is not reading it" : "attached to the report \u2014 the assistant can't read this kind of file";
2777
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3314
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2778
3315
  "div",
2779
3316
  {
2780
3317
  "data-gg-assist-file": "",
@@ -2795,7 +3332,7 @@ function AssistSheet({
2795
3332
  flexShrink: 0
2796
3333
  },
2797
3334
  children: [
2798
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", style: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3335
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", style: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2799
3336
  "path",
2800
3337
  {
2801
3338
  d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z M14 2v6h6",
@@ -2805,7 +3342,7 @@ function AssistSheet({
2805
3342
  strokeLinejoin: "round"
2806
3343
  }
2807
3344
  ) }),
2808
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3345
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2809
3346
  "span",
2810
3347
  {
2811
3348
  style: {
@@ -2818,7 +3355,7 @@ function AssistSheet({
2818
3355
  children: file.name
2819
3356
  }
2820
3357
  ),
2821
- onRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3358
+ onRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2822
3359
  "button",
2823
3360
  {
2824
3361
  type: "button",
@@ -2826,6 +3363,7 @@ function AssistSheet({
2826
3363
  "aria-label": `Remove file ${file.name}`,
2827
3364
  title: "Remove this file",
2828
3365
  onClick: () => {
3366
+ stopAutoFile("changed attachments");
2829
3367
  logEvent("file_removed", read ? "read" : "not read");
2830
3368
  onRemoveFile(i);
2831
3369
  },
@@ -2844,7 +3382,7 @@ function AssistSheet({
2844
3382
  justifyContent: "center",
2845
3383
  borderRadius: "50%"
2846
3384
  },
2847
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3385
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2848
3386
  "span",
2849
3387
  {
2850
3388
  "aria-hidden": "true",
@@ -2860,7 +3398,7 @@ function AssistSheet({
2860
3398
  alignItems: "center",
2861
3399
  justifyContent: "center"
2862
3400
  },
2863
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3401
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2864
3402
  "path",
2865
3403
  {
2866
3404
  d: "M1 1L9 9M9 1L1 9",
@@ -2878,7 +3416,7 @@ function AssistSheet({
2878
3416
  `file-${i}-${file.name}`
2879
3417
  );
2880
3418
  }),
2881
- onAddFiles && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3419
+ onAddFiles && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2882
3420
  "label",
2883
3421
  {
2884
3422
  "data-gg-assist-attach": "",
@@ -2898,7 +3436,7 @@ function AssistSheet({
2898
3436
  },
2899
3437
  children: [
2900
3438
  "+",
2901
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3439
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2902
3440
  "input",
2903
3441
  {
2904
3442
  type: "file",
@@ -2908,6 +3446,7 @@ function AssistSheet({
2908
3446
  var _a;
2909
3447
  const picked = Array.from((_a = e.target.files) != null ? _a : []);
2910
3448
  if (picked.length) {
3449
+ stopAutoFile("changed attachments");
2911
3450
  const images = picked.filter((f) => f.type.startsWith("image/")).length;
2912
3451
  if (images) logEvent("image_added", String(images));
2913
3452
  if (picked.length > images) {
@@ -2923,7 +3462,7 @@ function AssistSheet({
2923
3462
  ]
2924
3463
  }
2925
3464
  ),
2926
- readShots.size < screenshots.length && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { style: { color: t2.textMuted, fontSize: "11px" }, children: [
3465
+ readShots.size < screenshots.length && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: { color: t2.textMuted, fontSize: "11px" }, children: [
2927
3466
  readShots.size,
2928
3467
  " of ",
2929
3468
  screenshots.length,
@@ -2932,16 +3471,19 @@ function AssistSheet({
2932
3471
  ]
2933
3472
  }
2934
3473
  ),
2935
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end" }, children: [
2936
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3474
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end" }, children: [
3475
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2937
3476
  "textarea",
2938
3477
  {
2939
3478
  value: input,
2940
- onChange: (e) => setInput(e.target.value),
3479
+ onChange: (e) => {
3480
+ stopAutoFile("typing a change");
3481
+ setInput(e.target.value);
3482
+ },
2941
3483
  onKeyDown: (e) => {
2942
3484
  if (e.key === "Enter" && !e.shiftKey) {
2943
3485
  e.preventDefault();
2944
- send(input);
3486
+ sendTyped(input);
2945
3487
  }
2946
3488
  },
2947
3489
  placeholder: phase === "draft" ? "Anything to change? Tell me here\u2026" : "Type your answer\u2026",
@@ -2966,12 +3508,12 @@ function AssistSheet({
2966
3508
  }
2967
3509
  }
2968
3510
  ),
2969
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3511
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2970
3512
  "button",
2971
3513
  {
2972
3514
  type: "button",
2973
3515
  "data-gg-sheet-send": "",
2974
- onClick: () => send(input),
3516
+ onClick: () => sendTyped(input),
2975
3517
  disabled: busy || !input.trim(),
2976
3518
  "aria-label": "Send message",
2977
3519
  "data-gg-send-message": "",
@@ -2988,7 +3530,7 @@ function AssistSheet({
2988
3530
  color: busy || !input.trim() ? t2.textMuted : t2.accentText,
2989
3531
  cursor: busy || !input.trim() ? "default" : "pointer"
2990
3532
  },
2991
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "17", height: "17", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3533
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "17", height: "17", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2992
3534
  "path",
2993
3535
  {
2994
3536
  d: "M3 20.5L21.5 12 3 3.5V10l12 2-12 2v6.5z",
@@ -2998,8 +3540,8 @@ function AssistSheet({
2998
3540
  }
2999
3541
  )
3000
3542
  ] }),
3001
- phase === "draft" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
3002
- validationError && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3543
+ phase === "draft" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3544
+ validationError && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3003
3545
  "p",
3004
3546
  {
3005
3547
  style: {
@@ -3010,12 +3552,95 @@ function AssistSheet({
3010
3552
  children: validationError
3011
3553
  }
3012
3554
  ),
3013
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3555
+ autoFileLeft !== null ? (
3556
+ // #402: "Yes, that's it" was the confirmation. The draft
3557
+ // files itself unless they stop it — the bar shows how
3558
+ // long is left, the button sends now, the × on its right
3559
+ // stops it (#406). Stopping keeps the draft: Send Report
3560
+ // comes back, and closing the sheet drops it.
3561
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px", marginTop: "8px" }, children: [
3562
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3563
+ "button",
3564
+ {
3565
+ type: "button",
3566
+ "data-gg-sheet-send": "",
3567
+ "data-gg-auto-file": "",
3568
+ onClick: () => sendDraft(),
3569
+ style: {
3570
+ flex: 1,
3571
+ minWidth: 0,
3572
+ position: "relative",
3573
+ overflow: "hidden",
3574
+ padding: "12px",
3575
+ borderRadius: "10px",
3576
+ border: "none",
3577
+ backgroundColor: t2.accent,
3578
+ color: t2.accentText,
3579
+ fontSize: "14px",
3580
+ fontWeight: 700,
3581
+ fontFamily: "inherit",
3582
+ cursor: "pointer"
3583
+ },
3584
+ children: [
3585
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3586
+ "span",
3587
+ {
3588
+ "aria-hidden": "true",
3589
+ style: {
3590
+ position: "absolute",
3591
+ inset: 0,
3592
+ backgroundColor: "rgba(255,255,255,0.22)",
3593
+ transformOrigin: "left",
3594
+ animation: `gg-autofile ${AUTO_FILE_SECONDS}s linear forwards`
3595
+ }
3596
+ }
3597
+ ),
3598
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: { position: "relative" }, children: [
3599
+ "Filing in ",
3600
+ autoFileLeft,
3601
+ "s\u2026"
3602
+ ] })
3603
+ ]
3604
+ }
3605
+ ),
3606
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3607
+ "button",
3608
+ {
3609
+ type: "button",
3610
+ "data-gg-stop-auto-file": "",
3611
+ onClick: () => stopAutoFile("pressed stop"),
3612
+ "aria-label": "Stop \u2014 don't send",
3613
+ title: "Stop \u2014 don't send",
3614
+ style: {
3615
+ flexShrink: 0,
3616
+ width: "44px",
3617
+ borderRadius: "10px",
3618
+ border: `1px solid ${t2.inputBorder}`,
3619
+ background: "transparent",
3620
+ color: t2.text,
3621
+ display: "inline-flex",
3622
+ alignItems: "center",
3623
+ justifyContent: "center",
3624
+ cursor: "pointer"
3625
+ },
3626
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3627
+ "path",
3628
+ {
3629
+ d: "M6 6l12 12M18 6L6 18",
3630
+ stroke: "currentColor",
3631
+ strokeWidth: "2.25",
3632
+ strokeLinecap: "round"
3633
+ }
3634
+ ) })
3635
+ }
3636
+ )
3637
+ ] })
3638
+ ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3014
3639
  "button",
3015
3640
  {
3016
3641
  type: "button",
3017
3642
  "data-gg-sheet-send": "",
3018
- onClick: sendDraft,
3643
+ onClick: () => sendDraft(),
3019
3644
  disabled: isSubmitting || !description.trim(),
3020
3645
  style: {
3021
3646
  width: "100%",
@@ -3036,7 +3661,7 @@ function AssistSheet({
3036
3661
  ] })
3037
3662
  ] })
3038
3663
  ),
3039
- phase === "chat" && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3664
+ phase === "chat" && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3040
3665
  "button",
3041
3666
  {
3042
3667
  type: "button",
@@ -3056,7 +3681,7 @@ function AssistSheet({
3056
3681
  children: "Not getting it? Fill the form yourself \u2192"
3057
3682
  }
3058
3683
  ),
3059
- onReportGlitchgrabProblem && phase !== "solved" && !glitchgrabOffer && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3684
+ onReportGlitchgrabProblem && phase !== "solved" && !glitchgrabOffer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3060
3685
  "button",
3061
3686
  {
3062
3687
  type: "button",
@@ -3219,7 +3844,7 @@ function GlitchgrabProblemPanel({
3219
3844
  // `data-glitchgrab-layer` exempts this from the dialog's anti-focus-trap
3220
3845
  // sweep, which sets `inert` on every other role="dialog" on the page —
3221
3846
  // without it the panel renders but cannot be typed into.
3222
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3847
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3223
3848
  "div",
3224
3849
  {
3225
3850
  "data-glitchgrab-layer": "",
@@ -3239,7 +3864,7 @@ function GlitchgrabProblemPanel({
3239
3864
  boxSizing: "border-box",
3240
3865
  fontFamily: FONT
3241
3866
  },
3242
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3867
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3243
3868
  "div",
3244
3869
  {
3245
3870
  style: {
@@ -3253,10 +3878,10 @@ function GlitchgrabProblemPanel({
3253
3878
  boxShadow: "0 20px 50px rgba(0,0,0,0.5)",
3254
3879
  padding: "18px"
3255
3880
  },
3256
- children: sent ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3257
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { id: "gg-self-report-title", style: { fontSize: "15px", fontWeight: 600 }, children: "Sent to the Glitchgrab team" }),
3258
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: { margin: "6px 0 16px", fontSize: "13px", lineHeight: 1.5, color: t2.textMuted }, children: "Thanks \u2014 we'll look into it. Your report is still open behind this, exactly as you left it." }),
3259
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3881
+ children: sent ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
3882
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { id: "gg-self-report-title", style: { fontSize: "15px", fontWeight: 600 }, children: "Sent to the Glitchgrab team" }),
3883
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: { margin: "6px 0 16px", fontSize: "13px", lineHeight: 1.5, color: t2.textMuted }, children: "Thanks \u2014 we'll look into it. Your report is still open behind this, exactly as you left it." }),
3884
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3260
3885
  "button",
3261
3886
  {
3262
3887
  type: "button",
@@ -3266,8 +3891,8 @@ function GlitchgrabProblemPanel({
3266
3891
  children: "Back to your report"
3267
3892
  }
3268
3893
  )
3269
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3270
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3894
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
3895
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3271
3896
  "div",
3272
3897
  {
3273
3898
  style: {
@@ -3277,8 +3902,8 @@ function GlitchgrabProblemPanel({
3277
3902
  gap: "12px"
3278
3903
  },
3279
3904
  children: [
3280
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { id: "gg-self-report-title", style: { fontSize: "15px", fontWeight: 600 }, children: "Problem with Glitchgrab?" }),
3281
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3905
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { id: "gg-self-report-title", style: { fontSize: "15px", fontWeight: 600 }, children: "Problem with Glitchgrab?" }),
3906
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3282
3907
  "button",
3283
3908
  {
3284
3909
  type: "button",
@@ -3300,8 +3925,8 @@ function GlitchgrabProblemPanel({
3300
3925
  ]
3301
3926
  }
3302
3927
  ),
3303
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: { margin: "6px 0 12px", fontSize: "13px", lineHeight: 1.5, color: t2.textMuted }, children: "This goes to the people who build this reporter \u2014 not to this project's team. Tell us what went wrong: the AI chat, a button, anything." }),
3304
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3928
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: { margin: "6px 0 12px", fontSize: "13px", lineHeight: 1.5, color: t2.textMuted }, children: "This goes to the people who build this reporter \u2014 not to this project's team. Tell us what went wrong: the AI chat, a button, anything." }),
3929
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3305
3930
  "textarea",
3306
3931
  {
3307
3932
  ref: inputRef,
@@ -3335,7 +3960,7 @@ function GlitchgrabProblemPanel({
3335
3960
  }
3336
3961
  }
3337
3962
  ),
3338
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3963
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3339
3964
  "div",
3340
3965
  {
3341
3966
  "data-gg-self-report-images": "",
@@ -3347,8 +3972,8 @@ function GlitchgrabProblemPanel({
3347
3972
  marginTop: "10px"
3348
3973
  },
3349
3974
  children: [
3350
- images.map((src, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { position: "relative", width: "48px", height: "48px" }, children: [
3351
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3975
+ images.map((src, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { position: "relative", width: "48px", height: "48px" }, children: [
3976
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3352
3977
  "img",
3353
3978
  {
3354
3979
  src,
@@ -3364,7 +3989,7 @@ function GlitchgrabProblemPanel({
3364
3989
  }
3365
3990
  }
3366
3991
  ),
3367
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3992
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3368
3993
  "button",
3369
3994
  {
3370
3995
  type: "button",
@@ -3387,7 +4012,7 @@ function GlitchgrabProblemPanel({
3387
4012
  justifyContent: "center",
3388
4013
  borderRadius: "50%"
3389
4014
  },
3390
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4015
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3391
4016
  "span",
3392
4017
  {
3393
4018
  "aria-hidden": "true",
@@ -3403,7 +4028,7 @@ function GlitchgrabProblemPanel({
3403
4028
  alignItems: "center",
3404
4029
  justifyContent: "center"
3405
4030
  },
3406
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4031
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3407
4032
  "path",
3408
4033
  {
3409
4034
  d: "M1 1L9 9M9 1L1 9",
@@ -3417,7 +4042,7 @@ function GlitchgrabProblemPanel({
3417
4042
  }
3418
4043
  )
3419
4044
  ] }, i)),
3420
- images.length < MAX_SELF_REPORT_IMAGES && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4045
+ images.length < MAX_SELF_REPORT_IMAGES && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3421
4046
  "button",
3422
4047
  {
3423
4048
  type: "button",
@@ -3444,7 +4069,7 @@ function GlitchgrabProblemPanel({
3444
4069
  children: images.length >= 3 ? "+ Add" : "+ Add screenshot"
3445
4070
  }
3446
4071
  ),
3447
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4072
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3448
4073
  "input",
3449
4074
  {
3450
4075
  ref: fileRef,
@@ -3463,7 +4088,7 @@ function GlitchgrabProblemPanel({
3463
4088
  ]
3464
4089
  }
3465
4090
  ),
3466
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4091
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3467
4092
  "p",
3468
4093
  {
3469
4094
  "data-gg-self-report-includes": "",
@@ -3476,10 +4101,10 @@ function GlitchgrabProblemPanel({
3476
4101
  ]
3477
4102
  }
3478
4103
  ),
3479
- error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { role: "alert", style: { margin: "8px 0 0", fontSize: "12px", color: "#ef4444" }, children: error }),
3480
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", justifyContent: "flex-end", gap: "8px", marginTop: "14px" }, children: [
3481
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", onClick: onClose, style: secondaryButton, children: "Cancel" }),
3482
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4104
+ error && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { role: "alert", style: { margin: "8px 0 0", fontSize: "12px", color: "#ef4444" }, children: error }),
4105
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", justifyContent: "flex-end", gap: "8px", marginTop: "14px" }, children: [
4106
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: onClose, style: secondaryButton, children: "Cancel" }),
4107
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3483
4108
  "button",
3484
4109
  {
3485
4110
  type: "button",
@@ -3658,7 +4283,7 @@ var SHOT_WAIT_MS = 3e3;
3658
4283
  var SIMILAR_WAIT_MS = 2500;
3659
4284
  var MAX_SIMILAR_SHOWN = 3;
3660
4285
  function ButtonSpinner() {
3661
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
4286
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3662
4287
  "span",
3663
4288
  {
3664
4289
  "aria-hidden": "true",
@@ -3810,13 +4435,13 @@ function ReporterChip({
3810
4435
  const label = isAnonymous ? "Anonymous" : name;
3811
4436
  const title = isAnonymous ? "No reporter identity was passed to Glitchgrab \u2014 this report won't be attributed to anyone" : [name, reporter == null ? void 0 : reporter.email, reporter == null ? void 0 : reporter.role].filter(Boolean).join(" \xB7 ");
3812
4437
  const showAvatarImage = !!avatarUrl && !avatarFailed;
3813
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
4438
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3814
4439
  "span",
3815
4440
  {
3816
4441
  title,
3817
4442
  style: { display: "flex", alignItems: "center", gap: "6px", minWidth: 0 },
3818
4443
  children: [
3819
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
4444
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3820
4445
  "span",
3821
4446
  {
3822
4447
  "aria-hidden": "true",
@@ -3836,7 +4461,7 @@ function ReporterChip({
3836
4461
  color: isAnonymous ? t2.textMuted : t2.accentText,
3837
4462
  border: `1px solid ${isAnonymous ? t2.inputBorder : "transparent"}`
3838
4463
  },
3839
- children: showAvatarImage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
4464
+ children: showAvatarImage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3840
4465
  "img",
3841
4466
  {
3842
4467
  src: avatarUrl,
@@ -3846,9 +4471,9 @@ function ReporterChip({
3846
4471
  onError: () => setAvatarFailed(true),
3847
4472
  style: { width: "100%", height: "100%", objectFit: "cover" }
3848
4473
  }
3849
- ) : initials ? initials : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", children: [
3850
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "8", cy: "5.5", r: "2.75", stroke: "currentColor", strokeWidth: "1.4" }),
3851
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
4474
+ ) : initials ? initials : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", children: [
4475
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "8", cy: "5.5", r: "2.75", stroke: "currentColor", strokeWidth: "1.4" }),
4476
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3852
4477
  "path",
3853
4478
  {
3854
4479
  d: "M2.75 13.5c0-2.35 2.35-3.75 5.25-3.75s5.25 1.4 5.25 3.75",
@@ -3860,7 +4485,7 @@ function ReporterChip({
3860
4485
  ] })
3861
4486
  }
3862
4487
  ),
3863
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
4488
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3864
4489
  "span",
3865
4490
  {
3866
4491
  style: {
@@ -3991,9 +4616,11 @@ function ReportDialog({
3991
4616
  reporter,
3992
4617
  onClose,
3993
4618
  headerSlot,
3994
- reportGlitchgrabProblem
4619
+ reportGlitchgrabProblem,
4620
+ layout = "modal"
3995
4621
  }) {
3996
4622
  var _a;
4623
+ const sheet = layout === "sheet";
3997
4624
  const [isEnhancing, setIsEnhancing] = (0, import_react.useState)(false);
3998
4625
  const [assistOpen, setAssistOpen] = (0, import_react.useState)(false);
3999
4626
  const [assistNotice, setAssistNotice] = (0, import_react.useState)(null);
@@ -4748,9 +5375,9 @@ function ReportDialog({
4748
5375
  }
4749
5376
  };
4750
5377
  if (!mounted) return null;
4751
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
5378
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
4752
5379
  isOpen && (0, import_react_dom.createPortal)(
4753
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("style", { children: `
5380
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("style", { children: `
4754
5381
  @keyframes gg-pulse{0%,100%{opacity:1}50%{opacity:0.35}}
4755
5382
  @keyframes gg-spin{to{transform:rotate(360deg)}}
4756
5383
  @keyframes gg-b1{0%,100%{height:3px}40%{height:13px}}
@@ -4788,7 +5415,7 @@ function ReportDialog({
4788
5415
  document.body
4789
5416
  ),
4790
5417
  isOpen && (0, import_react_dom.createPortal)(
4791
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5418
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4792
5419
  "div",
4793
5420
  {
4794
5421
  "data-glitchgrab-layer": "",
@@ -4801,8 +5428,8 @@ function ReportDialog({
4801
5428
  // dialog's state IS the report, and unmounting would drop the
4802
5429
  // screenshots, attachments and step the reporter is on.
4803
5430
  display: sheetUp ? "none" : "flex",
4804
- alignItems: "center",
4805
- justifyContent: "center",
5431
+ alignItems: sheet ? "stretch" : "center",
5432
+ justifyContent: sheet ? "flex-end" : "center",
4806
5433
  backgroundColor: "rgba(0,0,0,0.5)",
4807
5434
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
4808
5435
  },
@@ -4811,7 +5438,7 @@ function ReportDialog({
4811
5438
  },
4812
5439
  onPointerDown: (e) => e.stopPropagation(),
4813
5440
  onFocus: (e) => e.stopPropagation(),
4814
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5441
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4815
5442
  "div",
4816
5443
  {
4817
5444
  ref: modalRef,
@@ -4822,21 +5449,22 @@ function ReportDialog({
4822
5449
  style: {
4823
5450
  position: "relative",
4824
5451
  zIndex: 2147483647,
4825
- width: "420px",
4826
- maxWidth: "calc(100% - 32px)",
4827
- maxHeight: "calc(100dvh - 32px)",
5452
+ width: sheet ? "440px" : "420px",
5453
+ maxWidth: sheet ? "100%" : "calc(100% - 32px)",
5454
+ maxHeight: sheet ? "100dvh" : "calc(100dvh - 32px)",
5455
+ ...sheet ? { height: "100dvh", borderLeft: `1px solid ${t2.inputBorder}` } : {},
4828
5456
  display: "flex",
4829
5457
  flexDirection: "column",
4830
5458
  backgroundColor: t2.bg,
4831
- borderRadius: "12px",
4832
- boxShadow: "0 20px 60px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1)",
5459
+ borderRadius: sheet ? 0 : "12px",
5460
+ boxShadow: sheet ? "0 20px 60px rgba(0, 0, 0, 0.35)" : "0 20px 60px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1)",
4833
5461
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
4834
5462
  overflow: "hidden",
4835
5463
  color: t2.text,
4836
5464
  isolation: "isolate"
4837
5465
  },
4838
5466
  children: [
4839
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5467
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4840
5468
  "div",
4841
5469
  {
4842
5470
  style: {
@@ -4845,7 +5473,7 @@ function ReportDialog({
4845
5473
  borderBottom: `1px solid ${t2.border}`
4846
5474
  },
4847
5475
  children: [
4848
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5476
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4849
5477
  "div",
4850
5478
  {
4851
5479
  style: {
@@ -4854,7 +5482,7 @@ function ReportDialog({
4854
5482
  alignItems: "center"
4855
5483
  },
4856
5484
  children: [
4857
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5485
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4858
5486
  "div",
4859
5487
  {
4860
5488
  style: {
@@ -4863,7 +5491,7 @@ function ReportDialog({
4863
5491
  gap: "8px"
4864
5492
  },
4865
5493
  children: [
4866
- step > 1 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5494
+ step > 1 && availableTypes.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4867
5495
  "button",
4868
5496
  {
4869
5497
  type: "button",
@@ -4877,14 +5505,14 @@ function ReportDialog({
4877
5505
  alignItems: "center"
4878
5506
  },
4879
5507
  "aria-label": "Back",
4880
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5508
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4881
5509
  "svg",
4882
5510
  {
4883
5511
  width: "16",
4884
5512
  height: "16",
4885
5513
  viewBox: "0 0 16 16",
4886
5514
  fill: "none",
4887
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5515
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4888
5516
  "path",
4889
5517
  {
4890
5518
  d: "M10 3L5 8L10 13",
@@ -4898,7 +5526,7 @@ function ReportDialog({
4898
5526
  )
4899
5527
  }
4900
5528
  ),
4901
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5529
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4902
5530
  "span",
4903
5531
  {
4904
5532
  style: {
@@ -4912,7 +5540,7 @@ function ReportDialog({
4912
5540
  ]
4913
5541
  }
4914
5542
  ),
4915
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5543
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4916
5544
  "div",
4917
5545
  {
4918
5546
  style: {
@@ -4921,7 +5549,7 @@ function ReportDialog({
4921
5549
  gap: "8px"
4922
5550
  },
4923
5551
  children: [
4924
- step === 1 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5552
+ step === 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4925
5553
  "span",
4926
5554
  {
4927
5555
  title: "Press this anywhere to open Glitchgrab",
@@ -4939,7 +5567,7 @@ function ReportDialog({
4939
5567
  children: getShortcutLabel()
4940
5568
  }
4941
5569
  ),
4942
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5570
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4943
5571
  "button",
4944
5572
  {
4945
5573
  type: "button",
@@ -4954,7 +5582,7 @@ function ReportDialog({
4954
5582
  justifyContent: "center"
4955
5583
  },
4956
5584
  "aria-label": "Close",
4957
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5585
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4958
5586
  "svg",
4959
5587
  {
4960
5588
  width: "16",
@@ -4962,7 +5590,7 @@ function ReportDialog({
4962
5590
  viewBox: "0 0 16 16",
4963
5591
  fill: "none",
4964
5592
  style: { display: "block" },
4965
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5593
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4966
5594
  "path",
4967
5595
  {
4968
5596
  d: "M4 4L12 12M12 4L4 12",
@@ -4981,7 +5609,7 @@ function ReportDialog({
4981
5609
  ]
4982
5610
  }
4983
5611
  ),
4984
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5612
+ availableTypes.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4985
5613
  "div",
4986
5614
  {
4987
5615
  style: {
@@ -4991,12 +5619,12 @@ function ReportDialog({
4991
5619
  gap: "0",
4992
5620
  marginTop: "12px"
4993
5621
  },
4994
- children: [1, 2].map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5622
+ children: [1, 2].map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4995
5623
  "div",
4996
5624
  {
4997
5625
  style: { display: "flex", alignItems: "center" },
4998
5626
  children: [
4999
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5627
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5000
5628
  "div",
5001
5629
  {
5002
5630
  style: {
@@ -5008,7 +5636,7 @@ function ReportDialog({
5008
5636
  }
5009
5637
  }
5010
5638
  ),
5011
- i < 1 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5639
+ i < 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5012
5640
  "div",
5013
5641
  {
5014
5642
  style: {
@@ -5028,7 +5656,7 @@ function ReportDialog({
5028
5656
  ]
5029
5657
  }
5030
5658
  ),
5031
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5659
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5032
5660
  "div",
5033
5661
  {
5034
5662
  style: {
@@ -5037,7 +5665,7 @@ function ReportDialog({
5037
5665
  flex: "1 1 auto",
5038
5666
  minHeight: 0
5039
5667
  },
5040
- children: submitted ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5668
+ children: submitted ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5041
5669
  "div",
5042
5670
  {
5043
5671
  style: {
@@ -5047,7 +5675,7 @@ function ReportDialog({
5047
5675
  fontSize: "14px",
5048
5676
  fontWeight: 500
5049
5677
  },
5050
- children: queuedMessage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5678
+ children: queuedMessage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5051
5679
  "span",
5052
5680
  {
5053
5681
  style: {
@@ -5060,9 +5688,9 @@ function ReportDialog({
5060
5688
  }
5061
5689
  ) : addedToIssue ? `Added to #${addedToIssue}${addedAsRelated ? " as a related request" : ""}. Thank you!` : `${getTypeLabel(reportType)} sent. Thank you!`
5062
5690
  }
5063
- ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
5064
- step === 1 && headerSlot ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { marginBottom: "14px" }, children: headerSlot }) : null,
5065
- step === 1 && sendFeedback2 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5691
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5692
+ step === 1 && headerSlot ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { marginBottom: "14px" }, children: headerSlot }) : null,
5693
+ step === 1 && sendFeedback2 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5066
5694
  "div",
5067
5695
  {
5068
5696
  style: {
@@ -5079,16 +5707,16 @@ function ReportDialog({
5079
5707
  },
5080
5708
  onMouseLeave: () => setHoveredStar(0),
5081
5709
  children: [
5082
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5710
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5083
5711
  "span",
5084
5712
  {
5085
5713
  style: { fontSize: "13px", fontWeight: 600, color: t2.text },
5086
5714
  children: "How are we doing?"
5087
5715
  }
5088
5716
  ),
5089
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { display: "flex", gap: "4px" }, children: [1, 2, 3, 4, 5].map((star) => {
5717
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { display: "flex", gap: "4px" }, children: [1, 2, 3, 4, 5].map((star) => {
5090
5718
  const filled = star <= (hoveredStar || rating);
5091
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5719
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5092
5720
  "button",
5093
5721
  {
5094
5722
  type: "button",
@@ -5109,7 +5737,7 @@ function ReportDialog({
5109
5737
  cursor: "pointer",
5110
5738
  lineHeight: 0
5111
5739
  },
5112
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { width: "26", height: "26", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5740
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "26", height: "26", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5113
5741
  "path",
5114
5742
  {
5115
5743
  d: "M12 3l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.4 6.8 19.1l1-5.8L3.5 9.2l5.9-.9L12 3z",
@@ -5126,7 +5754,7 @@ function ReportDialog({
5126
5754
  ]
5127
5755
  }
5128
5756
  ),
5129
- step === 1 && sendFeedback2 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5757
+ step === 1 && sendFeedback2 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5130
5758
  "div",
5131
5759
  {
5132
5760
  style: {
@@ -5136,13 +5764,13 @@ function ReportDialog({
5136
5764
  marginBottom: "16px"
5137
5765
  },
5138
5766
  children: [
5139
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { flex: 1, height: "1px", background: t2.border } }),
5140
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { fontSize: "11px", color: t2.textMuted }, children: "or report something" }),
5141
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { flex: 1, height: "1px", background: t2.border } })
5767
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { flex: 1, height: "1px", background: t2.border } }),
5768
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { fontSize: "11px", color: t2.textMuted }, children: "or report something" }),
5769
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { flex: 1, height: "1px", background: t2.border } })
5142
5770
  ]
5143
5771
  }
5144
5772
  ),
5145
- step === 1 && screenshots.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5773
+ step === 1 && screenshots.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5146
5774
  "div",
5147
5775
  {
5148
5776
  style: {
@@ -5156,7 +5784,7 @@ function ReportDialog({
5156
5784
  background: t2.inputBg
5157
5785
  },
5158
5786
  children: [
5159
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5787
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5160
5788
  "img",
5161
5789
  {
5162
5790
  src: screenshots[0],
@@ -5171,8 +5799,8 @@ function ReportDialog({
5171
5799
  }
5172
5800
  }
5173
5801
  ),
5174
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { fontSize: "11px", color: t2.textMuted, flex: 1 }, children: "Screenshot attached" }),
5175
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5802
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { fontSize: "11px", color: t2.textMuted, flex: 1 }, children: "Screenshot attached" }),
5803
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5176
5804
  "button",
5177
5805
  {
5178
5806
  type: "button",
@@ -5193,7 +5821,7 @@ function ReportDialog({
5193
5821
  ]
5194
5822
  }
5195
5823
  ),
5196
- step === 1 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5824
+ step === 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5197
5825
  "div",
5198
5826
  {
5199
5827
  ref: tileGridRef,
@@ -5203,7 +5831,7 @@ function ReportDialog({
5203
5831
  gridTemplateColumns: "1fr 1fr 1fr",
5204
5832
  gap: "10px"
5205
5833
  },
5206
- children: availableTypes.map((type) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5834
+ children: availableTypes.map((type) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5207
5835
  "button",
5208
5836
  {
5209
5837
  type: "button",
@@ -5234,7 +5862,7 @@ function ReportDialog({
5234
5862
  },
5235
5863
  children: [
5236
5864
  getTypeIcon(type, t2.accent, 22),
5237
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5865
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5238
5866
  "span",
5239
5867
  {
5240
5868
  style: {
@@ -5252,11 +5880,12 @@ function ReportDialog({
5252
5880
  ))
5253
5881
  }
5254
5882
  ),
5255
- step === 2 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
5256
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5883
+ step === 2 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5884
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5257
5885
  "button",
5258
5886
  {
5259
5887
  type: "button",
5888
+ disabled: availableTypes.length === 1,
5260
5889
  onClick: () => setStep(1),
5261
5890
  style: {
5262
5891
  display: "inline-flex",
@@ -5271,16 +5900,16 @@ function ReportDialog({
5271
5900
  fontSize: "11px",
5272
5901
  fontWeight: 600,
5273
5902
  fontFamily: "inherit",
5274
- cursor: "pointer"
5903
+ cursor: availableTypes.length === 1 ? "default" : "pointer"
5275
5904
  },
5276
5905
  children: [
5277
5906
  getTypeIcon(reportType, isRating ? "#f59e0b" : t2.accent, 13),
5278
5907
  getTypeLabel(reportType),
5279
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { color: t2.textMuted, fontWeight: 400 }, children: "\xB7 change" })
5908
+ availableTypes.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: t2.textMuted, fontWeight: 400 }, children: "\xB7 change" })
5280
5909
  ]
5281
5910
  }
5282
5911
  ),
5283
- isRating && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5912
+ isRating && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5284
5913
  "div",
5285
5914
  {
5286
5915
  style: {
@@ -5291,7 +5920,7 @@ function ReportDialog({
5291
5920
  onMouseLeave: () => setHoveredStar(0),
5292
5921
  children: [1, 2, 3, 4, 5].map((star) => {
5293
5922
  const filled = star <= (hoveredStar || rating);
5294
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5923
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5295
5924
  "button",
5296
5925
  {
5297
5926
  type: "button",
@@ -5308,7 +5937,7 @@ function ReportDialog({
5308
5937
  cursor: "pointer",
5309
5938
  lineHeight: 0
5310
5939
  },
5311
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { width: "30", height: "30", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5940
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "30", height: "30", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5312
5941
  "path",
5313
5942
  {
5314
5943
  d: "M12 3l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.4 6.8 19.1l1-5.8L3.5 9.2l5.9-.9L12 3z",
@@ -5324,7 +5953,7 @@ function ReportDialog({
5324
5953
  })
5325
5954
  }
5326
5955
  ),
5327
- assist && !isRating && !assistUsed && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5956
+ assist && !isRating && !assistUsed && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5328
5957
  "button",
5329
5958
  {
5330
5959
  type: "button",
@@ -5351,7 +5980,7 @@ function ReportDialog({
5351
5980
  },
5352
5981
  title: "Answer a question or two and the assistant writes the report for you",
5353
5982
  children: [
5354
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5983
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5355
5984
  "path",
5356
5985
  {
5357
5986
  d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3zM19 15l.75 2.25L22 18l-2.25.75L19 21l-.75-2.25L16 18l2.25-.75L19 15z",
@@ -5364,8 +5993,8 @@ function ReportDialog({
5364
5993
  ]
5365
5994
  }
5366
5995
  ),
5367
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { position: "relative" }, children: [
5368
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5996
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { position: "relative" }, children: [
5997
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5369
5998
  "textarea",
5370
5999
  {
5371
6000
  ref: textareaRef,
@@ -5407,7 +6036,7 @@ function ReportDialog({
5407
6036
  autoFocus: true
5408
6037
  }
5409
6038
  ),
5410
- (isListening || isTranscribing) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6039
+ (isListening || isTranscribing) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5411
6040
  "span",
5412
6041
  {
5413
6042
  style: {
@@ -5425,7 +6054,7 @@ function ReportDialog({
5425
6054
  zIndex: 1
5426
6055
  },
5427
6056
  children: [
5428
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6057
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5429
6058
  "span",
5430
6059
  {
5431
6060
  style: {
@@ -5440,7 +6069,7 @@ function ReportDialog({
5440
6069
  }
5441
6070
  ),
5442
6071
  isTranscribing ? "Transcribing\u2026" : "REC",
5443
- isListening && !isTranscribing && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6072
+ isListening && !isTranscribing && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5444
6073
  "span",
5445
6074
  {
5446
6075
  style: {
@@ -5467,7 +6096,7 @@ function ReportDialog({
5467
6096
  dur: "0.55s",
5468
6097
  delay: "0.15s"
5469
6098
  }
5470
- ].map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6099
+ ].map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5471
6100
  "span",
5472
6101
  {
5473
6102
  style: {
@@ -5487,7 +6116,7 @@ function ReportDialog({
5487
6116
  ]
5488
6117
  }
5489
6118
  ),
5490
- enhanceText2 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6119
+ enhanceText2 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5491
6120
  "button",
5492
6121
  {
5493
6122
  type: "button",
@@ -5532,7 +6161,7 @@ function ReportDialog({
5532
6161
  },
5533
6162
  title: "Polish grammar \u2014 preserves your meaning",
5534
6163
  children: [
5535
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6164
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5536
6165
  "svg",
5537
6166
  {
5538
6167
  width: "11",
@@ -5540,7 +6169,7 @@ function ReportDialog({
5540
6169
  viewBox: "0 0 24 24",
5541
6170
  fill: "none",
5542
6171
  "aria-hidden": "true",
5543
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6172
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5544
6173
  "path",
5545
6174
  {
5546
6175
  d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3zM19 15l.75 2.25L22 18l-2.25.75L19 21l-.75-2.25L16 18l2.25-.75L19 15z",
@@ -5555,7 +6184,7 @@ function ReportDialog({
5555
6184
  ]
5556
6185
  }
5557
6186
  ),
5558
- transcribeAudio2 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6187
+ transcribeAudio2 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5559
6188
  "button",
5560
6189
  {
5561
6190
  type: "button",
@@ -5581,7 +6210,7 @@ function ReportDialog({
5581
6210
  padding: 0,
5582
6211
  transition: "border-color 0.2s ease, color 0.2s ease"
5583
6212
  },
5584
- children: isListening ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6213
+ children: isListening ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5585
6214
  "svg",
5586
6215
  {
5587
6216
  width: "12",
@@ -5589,7 +6218,7 @@ function ReportDialog({
5589
6218
  viewBox: "0 0 24 24",
5590
6219
  fill: "currentColor",
5591
6220
  "aria-hidden": "true",
5592
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6221
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5593
6222
  "rect",
5594
6223
  {
5595
6224
  x: "6",
@@ -5600,7 +6229,7 @@ function ReportDialog({
5600
6229
  }
5601
6230
  )
5602
6231
  }
5603
- ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6232
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5604
6233
  "svg",
5605
6234
  {
5606
6235
  width: "13",
@@ -5609,7 +6238,7 @@ function ReportDialog({
5609
6238
  fill: "none",
5610
6239
  "aria-hidden": "true",
5611
6240
  children: [
5612
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6241
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5613
6242
  "rect",
5614
6243
  {
5615
6244
  x: "9",
@@ -5621,7 +6250,7 @@ function ReportDialog({
5621
6250
  strokeWidth: "1.8"
5622
6251
  }
5623
6252
  ),
5624
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6253
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5625
6254
  "path",
5626
6255
  {
5627
6256
  d: "M5 10a7 7 0 0014 0M12 19v3M9 22h6",
@@ -5636,7 +6265,7 @@ function ReportDialog({
5636
6265
  }
5637
6266
  )
5638
6267
  ] }),
5639
- transcribeAudio2 && !isListening && !isTranscribing && !voiceError && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6268
+ transcribeAudio2 && !isListening && !isTranscribing && !voiceError && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5640
6269
  "div",
5641
6270
  {
5642
6271
  style: {
@@ -5650,16 +6279,16 @@ function ReportDialog({
5650
6279
  userSelect: "none"
5651
6280
  },
5652
6281
  children: [
5653
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
5654
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }),
5655
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
5656
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "12", x2: "12", y1: "19", y2: "22" })
6282
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
6283
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }),
6284
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
6285
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "12", x2: "12", y1: "19", y2: "22" })
5657
6286
  ] }),
5658
6287
  "Hold Space to speak \u2014 we'll transcribe it"
5659
6288
  ]
5660
6289
  }
5661
6290
  ),
5662
- isEnhanced && originalDescription !== null && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6291
+ isEnhanced && originalDescription !== null && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5663
6292
  "div",
5664
6293
  {
5665
6294
  style: {
@@ -5673,7 +6302,7 @@ function ReportDialog({
5673
6302
  border: `1px solid ${t2.accent}40`
5674
6303
  },
5675
6304
  children: [
5676
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6305
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5677
6306
  "svg",
5678
6307
  {
5679
6308
  width: "12",
@@ -5681,7 +6310,7 @@ function ReportDialog({
5681
6310
  viewBox: "0 0 24 24",
5682
6311
  fill: "none",
5683
6312
  style: { flexShrink: 0 },
5684
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6313
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5685
6314
  "path",
5686
6315
  {
5687
6316
  d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3z",
@@ -5692,7 +6321,7 @@ function ReportDialog({
5692
6321
  )
5693
6322
  }
5694
6323
  ),
5695
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6324
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5696
6325
  "span",
5697
6326
  {
5698
6327
  style: {
@@ -5703,7 +6332,7 @@ function ReportDialog({
5703
6332
  children: "AI enhanced"
5704
6333
  }
5705
6334
  ),
5706
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6335
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5707
6336
  "button",
5708
6337
  {
5709
6338
  type: "button",
@@ -5725,7 +6354,7 @@ function ReportDialog({
5725
6354
  children: "Keep"
5726
6355
  }
5727
6356
  ),
5728
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6357
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5729
6358
  "button",
5730
6359
  {
5731
6360
  type: "button",
@@ -5751,7 +6380,7 @@ function ReportDialog({
5751
6380
  ]
5752
6381
  }
5753
6382
  ),
5754
- voiceError && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6383
+ voiceError && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5755
6384
  "p",
5756
6385
  {
5757
6386
  role: "alert",
@@ -5765,7 +6394,7 @@ function ReportDialog({
5765
6394
  children: voiceError
5766
6395
  }
5767
6396
  ),
5768
- assistNotice && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6397
+ assistNotice && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5769
6398
  "p",
5770
6399
  {
5771
6400
  style: {
@@ -5778,8 +6407,8 @@ function ReportDialog({
5778
6407
  children: assistNotice
5779
6408
  }
5780
6409
  ),
5781
- !isRating && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { marginTop: "10px" }, children: [
5782
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6410
+ !isRating && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { marginTop: "10px" }, children: [
6411
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5783
6412
  "span",
5784
6413
  {
5785
6414
  style: {
@@ -5795,7 +6424,7 @@ function ReportDialog({
5795
6424
  ]
5796
6425
  }
5797
6426
  ),
5798
- (screenshots.length > 0 || shotPending) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6427
+ (screenshots.length > 0 || shotPending) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5799
6428
  "div",
5800
6429
  {
5801
6430
  style: {
@@ -5805,7 +6434,7 @@ function ReportDialog({
5805
6434
  marginBottom: "8px"
5806
6435
  },
5807
6436
  children: [
5808
- shotPending && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6437
+ shotPending && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5809
6438
  "div",
5810
6439
  {
5811
6440
  role: "status",
@@ -5830,7 +6459,7 @@ function ReportDialog({
5830
6459
  children: "Capturing\u2026"
5831
6460
  }
5832
6461
  ),
5833
- screenshots.map((src, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6462
+ screenshots.map((src, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5834
6463
  "div",
5835
6464
  {
5836
6465
  style: {
@@ -5839,7 +6468,7 @@ function ReportDialog({
5839
6468
  height: "56px"
5840
6469
  },
5841
6470
  children: [
5842
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6471
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5843
6472
  "img",
5844
6473
  {
5845
6474
  src,
@@ -5857,7 +6486,7 @@ function ReportDialog({
5857
6486
  }
5858
6487
  }
5859
6488
  ),
5860
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6489
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5861
6490
  "button",
5862
6491
  {
5863
6492
  type: "button",
@@ -5883,14 +6512,14 @@ function ReportDialog({
5883
6512
  alignItems: "center",
5884
6513
  justifyContent: "center"
5885
6514
  },
5886
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6515
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5887
6516
  "svg",
5888
6517
  {
5889
6518
  width: "8",
5890
6519
  height: "8",
5891
6520
  viewBox: "0 0 10 10",
5892
6521
  fill: "none",
5893
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6522
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5894
6523
  "path",
5895
6524
  {
5896
6525
  d: "M1 1L9 9M9 1L1 9",
@@ -5903,7 +6532,7 @@ function ReportDialog({
5903
6532
  )
5904
6533
  }
5905
6534
  ),
5906
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6535
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5907
6536
  "button",
5908
6537
  {
5909
6538
  type: "button",
@@ -5928,14 +6557,14 @@ function ReportDialog({
5928
6557
  justifyContent: "center",
5929
6558
  boxShadow: "0 2px 8px rgba(0,0,0,0.45)"
5930
6559
  },
5931
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6560
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5932
6561
  "svg",
5933
6562
  {
5934
6563
  width: "12",
5935
6564
  height: "12",
5936
6565
  viewBox: "0 0 24 24",
5937
6566
  fill: "none",
5938
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6567
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5939
6568
  "path",
5940
6569
  {
5941
6570
  d: "M12 20h9M16.5 3.5a2.12 2.12 0 013 3L7 19l-4 1 1-4L16.5 3.5z",
@@ -5956,7 +6585,7 @@ function ReportDialog({
5956
6585
  ]
5957
6586
  }
5958
6587
  ),
5959
- attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6588
+ attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5960
6589
  "div",
5961
6590
  {
5962
6591
  style: {
@@ -5965,7 +6594,7 @@ function ReportDialog({
5965
6594
  gap: "6px",
5966
6595
  marginBottom: "8px"
5967
6596
  },
5968
- children: attachments.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6597
+ children: attachments.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5969
6598
  "div",
5970
6599
  {
5971
6600
  style: {
@@ -5977,7 +6606,7 @@ function ReportDialog({
5977
6606
  border: `1px solid ${t2.border}`
5978
6607
  },
5979
6608
  children: [
5980
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6609
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5981
6610
  "svg",
5982
6611
  {
5983
6612
  width: "14",
@@ -5986,7 +6615,7 @@ function ReportDialog({
5986
6615
  fill: "none",
5987
6616
  style: { flexShrink: 0, opacity: 0.6 },
5988
6617
  children: [
5989
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6618
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5990
6619
  "path",
5991
6620
  {
5992
6621
  d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",
@@ -5996,7 +6625,7 @@ function ReportDialog({
5996
6625
  strokeLinejoin: "round"
5997
6626
  }
5998
6627
  ),
5999
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6628
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6000
6629
  "path",
6001
6630
  {
6002
6631
  d: "M14 2v6h6",
@@ -6009,7 +6638,7 @@ function ReportDialog({
6009
6638
  ]
6010
6639
  }
6011
6640
  ),
6012
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6641
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6013
6642
  "span",
6014
6643
  {
6015
6644
  style: {
@@ -6023,7 +6652,7 @@ function ReportDialog({
6023
6652
  children: a.name
6024
6653
  }
6025
6654
  ),
6026
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6655
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6027
6656
  "span",
6028
6657
  {
6029
6658
  style: { fontSize: "10px", color: t2.textMuted },
@@ -6033,7 +6662,7 @@ function ReportDialog({
6033
6662
  ]
6034
6663
  }
6035
6664
  ),
6036
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6665
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6037
6666
  "button",
6038
6667
  {
6039
6668
  type: "button",
@@ -6057,14 +6686,14 @@ function ReportDialog({
6057
6686
  justifyContent: "center",
6058
6687
  flexShrink: 0
6059
6688
  },
6060
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6689
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6061
6690
  "svg",
6062
6691
  {
6063
6692
  width: "8",
6064
6693
  height: "8",
6065
6694
  viewBox: "0 0 10 10",
6066
6695
  fill: "none",
6067
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6696
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6068
6697
  "path",
6069
6698
  {
6070
6699
  d: "M1 1L9 9M9 1L1 9",
@@ -6083,7 +6712,7 @@ function ReportDialog({
6083
6712
  ))
6084
6713
  }
6085
6714
  ),
6086
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6715
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6087
6716
  "div",
6088
6717
  {
6089
6718
  onClick: () => {
@@ -6109,7 +6738,7 @@ function ReportDialog({
6109
6738
  background: screenshotDragOver ? isDark ? "rgba(34,211,238,0.06)" : "rgba(8,145,178,0.04)" : "transparent",
6110
6739
  transition: "border-color 0.15s ease, background 0.15s ease"
6111
6740
  },
6112
- children: screenshots.length + attachments.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6741
+ children: screenshots.length + attachments.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6113
6742
  "p",
6114
6743
  {
6115
6744
  style: {
@@ -6120,8 +6749,8 @@ function ReportDialog({
6120
6749
  },
6121
6750
  children: screenshotDragOver ? "Drop to attach" : "+ Add more \xB7 Drag & drop \xB7 Paste"
6122
6751
  }
6123
- ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
6124
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6752
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
6753
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6125
6754
  "svg",
6126
6755
  {
6127
6756
  width: "22",
@@ -6134,7 +6763,7 @@ function ReportDialog({
6134
6763
  opacity: 0.45
6135
6764
  },
6136
6765
  children: [
6137
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6766
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6138
6767
  "rect",
6139
6768
  {
6140
6769
  x: "3",
@@ -6146,7 +6775,7 @@ function ReportDialog({
6146
6775
  strokeWidth: "1.5"
6147
6776
  }
6148
6777
  ),
6149
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6778
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6150
6779
  "circle",
6151
6780
  {
6152
6781
  cx: "8.5",
@@ -6156,7 +6785,7 @@ function ReportDialog({
6156
6785
  strokeWidth: "1.5"
6157
6786
  }
6158
6787
  ),
6159
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6788
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6160
6789
  "path",
6161
6790
  {
6162
6791
  d: "M21 15l-5-5L5 21",
@@ -6169,7 +6798,7 @@ function ReportDialog({
6169
6798
  ]
6170
6799
  }
6171
6800
  ),
6172
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6801
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6173
6802
  "p",
6174
6803
  {
6175
6804
  style: {
@@ -6181,7 +6810,7 @@ function ReportDialog({
6181
6810
  children: screenshotDragOver ? "Drop to attach" : "Add screenshots or files"
6182
6811
  }
6183
6812
  ),
6184
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6813
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6185
6814
  "p",
6186
6815
  {
6187
6816
  style: {
@@ -6196,8 +6825,8 @@ function ReportDialog({
6196
6825
  }
6197
6826
  )
6198
6827
  ] }),
6199
- showSeverity && reportType === "BUG" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { marginTop: "10px" }, children: [
6200
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6828
+ showSeverity && reportType === "BUG" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { marginTop: "10px" }, children: [
6829
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6201
6830
  "span",
6202
6831
  {
6203
6832
  style: {
@@ -6210,7 +6839,7 @@ function ReportDialog({
6210
6839
  },
6211
6840
  children: [
6212
6841
  "How bad is it?",
6213
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6842
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6214
6843
  "span",
6215
6844
  {
6216
6845
  style: {
@@ -6223,7 +6852,7 @@ function ReportDialog({
6223
6852
  ]
6224
6853
  }
6225
6854
  ),
6226
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6855
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6227
6856
  "div",
6228
6857
  {
6229
6858
  role: "radiogroup",
@@ -6231,7 +6860,7 @@ function ReportDialog({
6231
6860
  style: { display: "flex", gap: "6px" },
6232
6861
  children: SEVERITY_LEVELS.map((s) => {
6233
6862
  const on = severity === s;
6234
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6863
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6235
6864
  "button",
6236
6865
  {
6237
6866
  type: "button",
@@ -6272,7 +6901,7 @@ function ReportDialog({
6272
6901
  }
6273
6902
  )
6274
6903
  ] }),
6275
- validationError && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6904
+ validationError && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6276
6905
  "p",
6277
6906
  {
6278
6907
  style: {
@@ -6287,7 +6916,7 @@ function ReportDialog({
6287
6916
  // Same visual language as the assistant's "Our team is
6288
6917
  // already on this" card, so both routes to a duplicate
6289
6918
  // read as one feature.
6290
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6919
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6291
6920
  "div",
6292
6921
  {
6293
6922
  "data-gg-similar": "",
@@ -6302,11 +6931,11 @@ function ReportDialog({
6302
6931
  backgroundColor: "rgba(245,158,11,0.08)"
6303
6932
  },
6304
6933
  children: [
6305
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
6306
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { color: t2.text, fontWeight: 600, fontSize: "13px" }, children: "Our team may already have this, or something close" }),
6307
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { color: t2.textMuted, fontSize: "12px", lineHeight: 1.5 }, children: similarIssues.length > 1 ? "Pick the one that matches. Same problem, or a different request for the same feature \u2014 it's added to that issue, so the team has it in one place." : "Same problem, or a different request for the same feature? Pick it \u2014 it's added to that issue, so the team has it in one place." })
6934
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
6935
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: t2.text, fontWeight: 600, fontSize: "13px" }, children: "Our team may already have this, or something close" }),
6936
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: t2.textMuted, fontSize: "12px", lineHeight: 1.5 }, children: similarIssues.length > 1 ? "Pick the one that matches. Same problem, or a different request for the same feature \u2014 it's added to that issue, so the team has it in one place." : "Same problem, or a different request for the same feature? Pick it \u2014 it's added to that issue, so the team has it in one place." })
6308
6937
  ] }),
6309
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6938
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6310
6939
  "div",
6311
6940
  {
6312
6941
  role: "radiogroup",
@@ -6314,7 +6943,7 @@ function ReportDialog({
6314
6943
  style: { display: "flex", flexDirection: "column", gap: "6px" },
6315
6944
  children: similarIssues.map((issue) => {
6316
6945
  const picked = pickedSimilar === issue.number;
6317
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6946
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6318
6947
  "button",
6319
6948
  {
6320
6949
  type: "button",
@@ -6339,7 +6968,7 @@ function ReportDialog({
6339
6968
  fontFamily: "inherit"
6340
6969
  },
6341
6970
  children: [
6342
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6971
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6343
6972
  "span",
6344
6973
  {
6345
6974
  "aria-hidden": "true",
@@ -6356,7 +6985,7 @@ function ReportDialog({
6356
6985
  }
6357
6986
  }
6358
6987
  ),
6359
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6988
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6360
6989
  "span",
6361
6990
  {
6362
6991
  style: {
@@ -6366,7 +6995,7 @@ function ReportDialog({
6366
6995
  minWidth: 0
6367
6996
  },
6368
6997
  children: [
6369
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6998
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6370
6999
  "span",
6371
7000
  {
6372
7001
  title: issue.title,
@@ -6380,7 +7009,7 @@ function ReportDialog({
6380
7009
  WebkitBoxOrient: "vertical"
6381
7010
  },
6382
7011
  children: [
6383
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { style: { color: t2.textMuted, fontWeight: 600 }, children: [
7012
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { color: t2.textMuted, fontWeight: 600 }, children: [
6384
7013
  "#",
6385
7014
  issue.number
6386
7015
  ] }),
@@ -6389,7 +7018,7 @@ function ReportDialog({
6389
7018
  ]
6390
7019
  }
6391
7020
  ),
6392
- issue.status && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { fontSize: "11.5px", color: t2.textMuted }, children: issue.status })
7021
+ issue.status && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { fontSize: "11.5px", color: t2.textMuted }, children: issue.status })
6393
7022
  ]
6394
7023
  }
6395
7024
  )
@@ -6400,7 +7029,7 @@ function ReportDialog({
6400
7029
  })
6401
7030
  }
6402
7031
  ),
6403
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7032
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6404
7033
  "button",
6405
7034
  {
6406
7035
  type: "button",
@@ -6425,15 +7054,15 @@ function ReportDialog({
6425
7054
  cursor: isSubmitting || !pickedSimilar ? "not-allowed" : "pointer",
6426
7055
  fontFamily: "inherit"
6427
7056
  },
6428
- children: typeof attachingTo === "number" && duplicateKind !== "related" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
6429
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ButtonSpinner, {}),
7057
+ children: typeof attachingTo === "number" && duplicateKind !== "related" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
7058
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ButtonSpinner, {}),
6430
7059
  "Adding to #",
6431
7060
  attachingTo,
6432
7061
  "\u2026"
6433
7062
  ] }) : pickedSimilar ? `Add to #${pickedSimilar}` : "Pick the matching issue"
6434
7063
  }
6435
7064
  ),
6436
- pickedSimilar && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7065
+ pickedSimilar && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6437
7066
  "button",
6438
7067
  {
6439
7068
  type: "button",
@@ -6458,15 +7087,15 @@ function ReportDialog({
6458
7087
  cursor: isSubmitting ? "not-allowed" : "pointer",
6459
7088
  fontFamily: "inherit"
6460
7089
  },
6461
- children: typeof attachingTo === "number" && duplicateKind === "related" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
6462
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ButtonSpinner, {}),
7090
+ children: typeof attachingTo === "number" && duplicateKind === "related" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
7091
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ButtonSpinner, {}),
6463
7092
  "Adding to #",
6464
7093
  attachingTo,
6465
7094
  "\u2026"
6466
7095
  ] }) : `Related request \u2014 add to #${pickedSimilar}`
6467
7096
  }
6468
7097
  ),
6469
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7098
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6470
7099
  "button",
6471
7100
  {
6472
7101
  type: "button",
@@ -6491,8 +7120,8 @@ function ReportDialog({
6491
7120
  cursor: isSubmitting ? "not-allowed" : "pointer",
6492
7121
  fontFamily: "inherit"
6493
7122
  },
6494
- children: attachingTo === "new" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
6495
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ButtonSpinner, {}),
7123
+ children: attachingTo === "new" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
7124
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ButtonSpinner, {}),
6496
7125
  "Sending as new\u2026"
6497
7126
  ] }) : "No, mine is different \u2014 send as new"
6498
7127
  }
@@ -6500,7 +7129,7 @@ function ReportDialog({
6500
7129
  ]
6501
7130
  }
6502
7131
  )
6503
- ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7132
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6504
7133
  "button",
6505
7134
  {
6506
7135
  type: "button",
@@ -6520,8 +7149,8 @@ function ReportDialog({
6520
7149
  fontFamily: "inherit",
6521
7150
  transition: "background-color 0.15s ease"
6522
7151
  },
6523
- children: checkingSimilar ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
6524
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ButtonSpinner, {}),
7152
+ children: checkingSimilar ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
7153
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ButtonSpinner, {}),
6525
7154
  "Checking for existing reports\u2026"
6526
7155
  ] }) : isSubmitting ? shotPending && !isRating ? "Attaching screenshot\u2026" : "Sending..." : isRating ? "Send Rating" : "Send Report"
6527
7156
  }
@@ -6530,7 +7159,7 @@ function ReportDialog({
6530
7159
  ] })
6531
7160
  }
6532
7161
  ),
6533
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7162
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6534
7163
  "div",
6535
7164
  {
6536
7165
  style: {
@@ -6542,8 +7171,8 @@ function ReportDialog({
6542
7171
  gap: "12px"
6543
7172
  },
6544
7173
  children: [
6545
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ReporterChip, { reporter, t: t2 }),
6546
- reportGlitchgrabProblem ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7174
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReporterChip, { reporter, t: t2 }),
7175
+ reportGlitchgrabProblem ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6547
7176
  "button",
6548
7177
  {
6549
7178
  type: "button",
@@ -6570,7 +7199,7 @@ function ReportDialog({
6570
7199
  },
6571
7200
  children: "Problem with Glitchgrab?"
6572
7201
  }
6573
- ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7202
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6574
7203
  "span",
6575
7204
  {
6576
7205
  style: {
@@ -6592,7 +7221,7 @@ function ReportDialog({
6592
7221
  ),
6593
7222
  document.body
6594
7223
  ),
6595
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7224
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6596
7225
  "input",
6597
7226
  {
6598
7227
  ref: fileInputRef,
@@ -6604,7 +7233,7 @@ function ReportDialog({
6604
7233
  }
6605
7234
  ),
6606
7235
  isOpen && previewIndex !== null && screenshots[previewIndex] && (0, import_react_dom.createPortal)(
6607
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7236
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6608
7237
  "div",
6609
7238
  {
6610
7239
  "data-glitchgrab-layer": "",
@@ -6626,7 +7255,7 @@ function ReportDialog({
6626
7255
  },
6627
7256
  onMouseDown: (e) => e.stopPropagation(),
6628
7257
  children: [
6629
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7258
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6630
7259
  "div",
6631
7260
  {
6632
7261
  ref: previewImgRef,
@@ -6638,7 +7267,7 @@ function ReportDialog({
6638
7267
  },
6639
7268
  onClick: (e) => e.stopPropagation(),
6640
7269
  children: [
6641
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7270
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6642
7271
  "div",
6643
7272
  {
6644
7273
  ref: previewScrollRef,
@@ -6657,7 +7286,7 @@ function ReportDialog({
6657
7286
  touchAction: "none",
6658
7287
  cursor: "grab"
6659
7288
  } : { maxWidth: "100%", lineHeight: 0 },
6660
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7289
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6661
7290
  "img",
6662
7291
  {
6663
7292
  ref: previewImgElRef,
@@ -6685,7 +7314,7 @@ function ReportDialog({
6685
7314
  )
6686
7315
  }
6687
7316
  ),
6688
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7317
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
6689
7318
  "button",
6690
7319
  {
6691
7320
  type: "button",
@@ -6713,7 +7342,7 @@ function ReportDialog({
6713
7342
  animation: "gg-pulse 2s ease-in-out infinite"
6714
7343
  },
6715
7344
  children: [
6716
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7345
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6717
7346
  "path",
6718
7347
  {
6719
7348
  d: "M12 20h9M16.5 3.5a2.12 2.12 0 013 3L7 19l-4 1 1-4L16.5 3.5z",
@@ -6730,7 +7359,7 @@ function ReportDialog({
6730
7359
  ]
6731
7360
  }
6732
7361
  ),
6733
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7362
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6734
7363
  "div",
6735
7364
  {
6736
7365
  style: {
@@ -6739,7 +7368,7 @@ function ReportDialog({
6739
7368
  alignItems: "center",
6740
7369
  gap: "12px"
6741
7370
  },
6742
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7371
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6743
7372
  "span",
6744
7373
  {
6745
7374
  style: {
@@ -6761,7 +7390,7 @@ function ReportDialog({
6761
7390
  document.body
6762
7391
  ),
6763
7392
  isOpen && annotatingIndex !== null && screenshots[annotatingIndex] && (0, import_react_dom.createPortal)(
6764
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7393
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6765
7394
  AnnotationCanvas,
6766
7395
  {
6767
7396
  imageSrc: screenshots[annotatingIndex],
@@ -6777,7 +7406,7 @@ function ReportDialog({
6777
7406
  ),
6778
7407
  document.body
6779
7408
  ),
6780
- isOpen && selfReportFrom && reportGlitchgrabProblem && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7409
+ isOpen && selfReportFrom && reportGlitchgrabProblem && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6781
7410
  GlitchgrabProblemPanel,
6782
7411
  {
6783
7412
  send: reportGlitchgrabProblem,
@@ -6790,7 +7419,7 @@ function ReportDialog({
6790
7419
  onClose: () => setSelfReportFrom(null)
6791
7420
  }
6792
7421
  ),
6793
- isOpen && sheetUp && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7422
+ isOpen && sheetUp && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6794
7423
  AssistSheet,
6795
7424
  {
6796
7425
  assist,
@@ -6891,7 +7520,7 @@ function getTypeIcon(type, color, size = 24) {
6891
7520
  };
6892
7521
  switch (type) {
6893
7522
  case "RATING":
6894
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7523
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6895
7524
  "path",
6896
7525
  {
6897
7526
  d: "M12 3l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.4 6.8 19.1l1-5.8L3.5 9.2l5.9-.9L12 3z",
@@ -6901,7 +7530,7 @@ function getTypeIcon(type, color, size = 24) {
6901
7530
  }
6902
7531
  ) });
6903
7532
  case "BUG":
6904
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7533
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6905
7534
  "path",
6906
7535
  {
6907
7536
  d: "M8 2L6.5 3.5M16 2L17.5 3.5M3 9H7M17 9H21M12 2a5 5 0 015 5v4a5 5 0 01-10 0V7a5 5 0 015-5zM7 16l-2 3M17 16l2 3",
@@ -6911,7 +7540,7 @@ function getTypeIcon(type, color, size = 24) {
6911
7540
  }
6912
7541
  ) });
6913
7542
  case "FEATURE_REQUEST":
6914
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7543
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6915
7544
  "path",
6916
7545
  {
6917
7546
  d: "M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2z",
@@ -6921,8 +7550,8 @@ function getTypeIcon(type, color, size = 24) {
6921
7550
  }
6922
7551
  ) });
6923
7552
  case "UI_IMPROVEMENT":
6924
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...props, children: [
6925
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7553
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { ...props, children: [
7554
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6926
7555
  "rect",
6927
7556
  {
6928
7557
  x: "3",
@@ -6934,7 +7563,7 @@ function getTypeIcon(type, color, size = 24) {
6934
7563
  strokeWidth: "1.5"
6935
7564
  }
6936
7565
  ),
6937
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7566
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6938
7567
  "path",
6939
7568
  {
6940
7569
  d: "M3 9h18M9 21V9",
@@ -6945,7 +7574,7 @@ function getTypeIcon(type, color, size = 24) {
6945
7574
  )
6946
7575
  ] });
6947
7576
  case "PERFORMANCE":
6948
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7577
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6949
7578
  "path",
6950
7579
  {
6951
7580
  d: "M12 21a9 9 0 100-18 9 9 0 000 18zM12 12l4-4M12 7v.01",
@@ -6956,7 +7585,7 @@ function getTypeIcon(type, color, size = 24) {
6956
7585
  }
6957
7586
  ) });
6958
7587
  case "SECURITY":
6959
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7588
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6960
7589
  "path",
6961
7590
  {
6962
7591
  d: "M12 3l7 3v5c0 4.5-3 8.5-7 10-4-1.5-7-5.5-7-10V6l7-3z",
@@ -6966,9 +7595,9 @@ function getTypeIcon(type, color, size = 24) {
6966
7595
  }
6967
7596
  ) });
6968
7597
  case "QUESTION":
6969
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...props, children: [
6970
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: "1.5" }),
6971
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7598
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { ...props, children: [
7599
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: "1.5" }),
7600
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6972
7601
  "path",
6973
7602
  {
6974
7603
  d: "M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3M12 17h.01",
@@ -6980,7 +7609,7 @@ function getTypeIcon(type, color, size = 24) {
6980
7609
  )
6981
7610
  ] });
6982
7611
  case "OTHER":
6983
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7612
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6984
7613
  "path",
6985
7614
  {
6986
7615
  d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2v10z",
@@ -6994,7 +7623,7 @@ function getTypeIcon(type, color, size = 24) {
6994
7623
 
6995
7624
  // src/booking-dialog.tsx
6996
7625
  var import_react5 = require("react");
6997
- var import_jsx_runtime5 = require("react/jsx-runtime");
7626
+ var import_jsx_runtime6 = require("react/jsx-runtime");
6998
7627
  var t = {
6999
7628
  bg: "#141414",
7000
7629
  surface: "#1c1c1c",
@@ -7156,7 +7785,7 @@ function BookingDialog({
7156
7785
  }
7157
7786
  }
7158
7787
  const canSubmitDetails = name.trim() && email.includes("@") && phone.replace(/\D/g, "").length >= 8;
7159
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7788
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7160
7789
  "div",
7161
7790
  {
7162
7791
  onClick: (e) => {
@@ -7173,7 +7802,7 @@ function BookingDialog({
7173
7802
  padding: 16,
7174
7803
  fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
7175
7804
  },
7176
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
7805
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7177
7806
  "div",
7178
7807
  {
7179
7808
  role: "dialog",
@@ -7191,7 +7820,7 @@ function BookingDialog({
7191
7820
  overflow: "hidden"
7192
7821
  },
7193
7822
  children: [
7194
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
7823
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7195
7824
  "div",
7196
7825
  {
7197
7826
  style: {
@@ -7203,11 +7832,11 @@ function BookingDialog({
7203
7832
  gap: 12
7204
7833
  },
7205
7834
  children: [
7206
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
7207
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { fontSize: 15, fontWeight: 600 }, children: heading.title }),
7208
- heading.description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { fontSize: 12, color: t.muted, marginTop: 2 }, children: heading.description })
7835
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
7836
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { fontSize: 15, fontWeight: 600 }, children: heading.title }),
7837
+ heading.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { fontSize: 12, color: t.muted, marginTop: 2 }, children: heading.description })
7209
7838
  ] }),
7210
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7839
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7211
7840
  "button",
7212
7841
  {
7213
7842
  onClick: onClose,
@@ -7219,10 +7848,10 @@ function BookingDialog({
7219
7848
  ]
7220
7849
  }
7221
7850
  ),
7222
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { padding: 18, overflowY: "auto", flex: "1 1 auto" }, children: [
7223
- error && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: t.danger, fontSize: 12, marginBottom: 12, lineHeight: 1.5 }, children: error }),
7224
- step === "slots" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
7225
- whatsappUrl && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
7851
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { padding: 18, overflowY: "auto", flex: "1 1 auto" }, children: [
7852
+ error && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { color: t.danger, fontSize: 12, marginBottom: 12, lineHeight: 1.5 }, children: error }),
7853
+ step === "slots" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
7854
+ whatsappUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7226
7855
  "a",
7227
7856
  {
7228
7857
  href: whatsappUrl,
@@ -7241,15 +7870,15 @@ function BookingDialog({
7241
7870
  },
7242
7871
  children: [
7243
7872
  "\u{1F4AC} Rather book on WhatsApp?",
7244
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { display: "block", fontSize: 11, color: t.muted, marginTop: 2 }, children: "We'll ask the same questions in chat." })
7873
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: { display: "block", fontSize: 11, color: t.muted, marginTop: 2 }, children: "We'll ask the same questions in chat." })
7245
7874
  ]
7246
7875
  }
7247
7876
  ),
7248
- slots === null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: t.muted, fontSize: 13 }, children: "Finding times\u2026" }),
7249
- (slots == null ? void 0 : slots.length) === 0 && !error && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { color: t.muted, fontSize: 13 }, children: "No times available right now." }),
7250
- [...byDay.entries()].map(([day, daySlots]) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { marginBottom: 18 }, children: [
7251
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { fontSize: 11, color: t.muted, marginBottom: 8, textTransform: "uppercase", letterSpacing: ".6px" }, children: formatDay(daySlots[0].startsAt) }),
7252
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: daySlots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7877
+ slots === null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { color: t.muted, fontSize: 13 }, children: "Finding times\u2026" }),
7878
+ (slots == null ? void 0 : slots.length) === 0 && !error && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { color: t.muted, fontSize: 13 }, children: "No times available right now." }),
7879
+ [...byDay.entries()].map(([day, daySlots]) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { marginBottom: 18 }, children: [
7880
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { fontSize: 11, color: t.muted, marginBottom: 8, textTransform: "uppercase", letterSpacing: ".6px" }, children: formatDay(daySlots[0].startsAt) }),
7881
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: daySlots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7253
7882
  "button",
7254
7883
  {
7255
7884
  onClick: () => {
@@ -7271,13 +7900,13 @@ function BookingDialog({
7271
7900
  )) })
7272
7901
  ] }, day))
7273
7902
  ] }),
7274
- step === "details" && selected && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
7275
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { fontSize: 13, color: t.muted }, children: [
7903
+ step === "details" && selected && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
7904
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { fontSize: 13, color: t.muted }, children: [
7276
7905
  formatDay(selected.startsAt),
7277
7906
  " \xB7 ",
7278
7907
  formatTime(selected.startsAt),
7279
7908
  " \xB7 ",
7280
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7909
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7281
7910
  "button",
7282
7911
  {
7283
7912
  onClick: () => setStep("slots"),
@@ -7286,9 +7915,9 @@ function BookingDialog({
7286
7915
  }
7287
7916
  )
7288
7917
  ] }),
7289
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Field, { label: "Your name", value: name, onChange: setName }),
7290
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Field, { label: "Email", value: email, onChange: setEmail, type: "email" }),
7291
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7918
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Field, { label: "Your name", value: name, onChange: setName }),
7919
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Field, { label: "Email", value: email, onChange: setEmail, type: "email" }),
7920
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7292
7921
  Field,
7293
7922
  {
7294
7923
  label: "Mobile number",
@@ -7298,8 +7927,8 @@ function BookingDialog({
7298
7927
  hint: "We send a code here to confirm, then a reminder before the call."
7299
7928
  }
7300
7929
  ),
7301
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Field, { label: "Anything we should know? (optional)", value: note, onChange: setNote }),
7302
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7930
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Field, { label: "Anything we should know? (optional)", value: note, onChange: setNote }),
7931
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7303
7932
  "button",
7304
7933
  {
7305
7934
  onClick: startBooking,
@@ -7309,10 +7938,10 @@ function BookingDialog({
7309
7938
  }
7310
7939
  )
7311
7940
  ] }),
7312
- step === "code" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
7313
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { fontSize: 13, color: t.muted, lineHeight: 1.5 }, children: "We sent a 4-digit code to your phone. Your slot is held for 10 minutes." }),
7314
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Field, { label: "Code", value: code, onChange: setCode }),
7315
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7941
+ step === "code" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
7942
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { fontSize: 13, color: t.muted, lineHeight: 1.5 }, children: "We sent a 4-digit code to your phone. Your slot is held for 10 minutes." }),
7943
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Field, { label: "Code", value: code, onChange: setCode }),
7944
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7316
7945
  "button",
7317
7946
  {
7318
7947
  onClick: confirmBooking,
@@ -7322,15 +7951,15 @@ function BookingDialog({
7322
7951
  }
7323
7952
  )
7324
7953
  ] }),
7325
- step === "done" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
7326
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { fontSize: 15, fontWeight: 600 }, children: "You're booked." }),
7327
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { fontSize: 13, color: t.muted, lineHeight: 1.6 }, children: [
7954
+ step === "done" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
7955
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { fontSize: 15, fontWeight: 600 }, children: "You're booked." }),
7956
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { fontSize: 13, color: t.muted, lineHeight: 1.6 }, children: [
7328
7957
  selected && `${formatDay(selected.startsAt)} at ${formatTime(selected.startsAt)}. `,
7329
7958
  "A calendar invite is on its way to ",
7330
7959
  email,
7331
7960
  ", and we'll send a WhatsApp reminder before the call."
7332
7961
  ] }),
7333
- meetUrl && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { href: meetUrl, target: "_blank", rel: "noreferrer", style: { ...primaryStyle(false), textAlign: "center", textDecoration: "none" }, children: "Open the meeting link" })
7962
+ meetUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { href: meetUrl, target: "_blank", rel: "noreferrer", style: { ...primaryStyle(false), textAlign: "center", textDecoration: "none" }, children: "Open the meeting link" })
7334
7963
  ] })
7335
7964
  ] })
7336
7965
  ]
@@ -7359,9 +7988,9 @@ function Field({
7359
7988
  type = "text",
7360
7989
  hint
7361
7990
  }) {
7362
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { style: { display: "block", fontSize: 11, color: t.muted }, children: [
7991
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { style: { display: "block", fontSize: 11, color: t.muted }, children: [
7363
7992
  label,
7364
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7993
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7365
7994
  "input",
7366
7995
  {
7367
7996
  type,
@@ -7382,7 +8011,7 @@ function Field({
7382
8011
  }
7383
8012
  }
7384
8013
  ),
7385
- hint && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { marginTop: 4, fontSize: 10, color: t.muted }, children: hint })
8014
+ hint && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { marginTop: 4, fontSize: 10, color: t.muted }, children: hint })
7386
8015
  ] });
7387
8016
  }
7388
8017
 
@@ -7523,7 +8152,7 @@ function matchesShortcut(e) {
7523
8152
  }
7524
8153
 
7525
8154
  // src/provider.tsx
7526
- var import_jsx_runtime6 = require("react/jsx-runtime");
8155
+ var import_jsx_runtime7 = require("react/jsx-runtime");
7527
8156
  var DEFAULT_BASE_URL2 = "https://glitchgrab.dev";
7528
8157
  var GlitchgrabContext = (0, import_react6.createContext)(null);
7529
8158
  function useGlitchgrab() {
@@ -8005,7 +8634,7 @@ function GlitchgrabProviderInner({
8005
8634
  (0, import_react6.useEffect)(() => {
8006
8635
  setShortcutLabel(getShortcutLabel2());
8007
8636
  }, []);
8008
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
8637
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
8009
8638
  GlitchgrabContext.Provider,
8010
8639
  {
8011
8640
  value: {
@@ -8025,7 +8654,7 @@ function GlitchgrabProviderInner({
8025
8654
  shortcutLabel
8026
8655
  },
8027
8656
  children: [
8028
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
8657
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
8029
8658
  GlitchgrabErrorBoundary,
8030
8659
  {
8031
8660
  token,
@@ -8037,7 +8666,7 @@ function GlitchgrabProviderInner({
8037
8666
  children
8038
8667
  }
8039
8668
  ),
8040
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
8669
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
8041
8670
  BookingDialog,
8042
8671
  {
8043
8672
  token,
@@ -8046,7 +8675,7 @@ function GlitchgrabProviderInner({
8046
8675
  onClose: () => setBookingOpen(false)
8047
8676
  }
8048
8677
  ),
8049
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
8678
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
8050
8679
  ReportDialog,
8051
8680
  {
8052
8681
  report,
@@ -8059,9 +8688,9 @@ function GlitchgrabProviderInner({
8059
8688
  types,
8060
8689
  showSeverity,
8061
8690
  reporter,
8062
- headerSlot: projectName ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { fontSize: 11, color: "#9aa0a6" }, children: [
8691
+ headerSlot: projectName ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { fontSize: 11, color: "#9aa0a6" }, children: [
8063
8692
  "Reporting to ",
8064
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("strong", { style: { color: "#e5e5e5" }, children: projectName })
8693
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { style: { color: "#e5e5e5" }, children: projectName })
8065
8694
  ] }) : null
8066
8695
  }
8067
8696
  )
@@ -8070,21 +8699,21 @@ function GlitchgrabProviderInner({
8070
8699
  );
8071
8700
  }
8072
8701
  function GlitchgrabProvider(props) {
8073
- if (!props.token) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: props.children });
8702
+ if (!props.token) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: props.children });
8074
8703
  const resolvedProps = {
8075
8704
  ...props,
8076
8705
  baseUrl: props.baseUrl || DEFAULT_BASE_URL2
8077
8706
  };
8078
8707
  try {
8079
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(GlitchgrabProviderInner, { ...resolvedProps });
8708
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(GlitchgrabProviderInner, { ...resolvedProps });
8080
8709
  } catch (e) {
8081
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: props.children });
8710
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: props.children });
8082
8711
  }
8083
8712
  }
8084
8713
 
8085
8714
  // src/report-button.tsx
8086
8715
  var import_react7 = require("react");
8087
- var import_jsx_runtime7 = require("react/jsx-runtime");
8716
+ var import_jsx_runtime8 = require("react/jsx-runtime");
8088
8717
  function useGlitchgrabSafe() {
8089
8718
  try {
8090
8719
  return useGlitchgrab();
@@ -8108,7 +8737,7 @@ function ReportButton({
8108
8737
  setCapturing(false);
8109
8738
  };
8110
8739
  if (children) {
8111
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: children({ onClick: handleClick, capturing }) });
8740
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: children({ onClick: handleClick, capturing }) });
8112
8741
  }
8113
8742
  const isTop = (_a = position == null ? void 0 : position.startsWith("top")) != null ? _a : false;
8114
8743
  const isLeft = (_b = position == null ? void 0 : position.endsWith("left")) != null ? _b : false;
@@ -8116,7 +8745,7 @@ function ReportButton({
8116
8745
  ...isLeft ? { left: "16px" } : { right: "16px" },
8117
8746
  ...isTop ? { top: "16px" } : { bottom: "16px" }
8118
8747
  };
8119
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
8748
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
8120
8749
  "button",
8121
8750
  {
8122
8751
  type: "button",
@@ -8151,7 +8780,7 @@ function ReportButton({
8151
8780
  },
8152
8781
  "aria-label": label,
8153
8782
  children: [
8154
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
8783
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8155
8784
  "svg",
8156
8785
  {
8157
8786
  width: "16",
@@ -8159,7 +8788,7 @@ function ReportButton({
8159
8788
  viewBox: "0 0 16 16",
8160
8789
  fill: "none",
8161
8790
  style: { flexShrink: 0 },
8162
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
8791
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8163
8792
  "path",
8164
8793
  {
8165
8794
  d: "M8 1C4.134 1 1 4.134 1 8s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zm0 12.5a.75.75 0 110-1.5.75.75 0 010 1.5zm.75-3.5a.75.75 0 01-1.5 0V5a.75.75 0 011.5 0v5z",
@@ -8175,15 +8804,15 @@ function ReportButton({
8175
8804
  }
8176
8805
 
8177
8806
  // src/book-demo-button.tsx
8178
- var import_jsx_runtime8 = require("react/jsx-runtime");
8807
+ var import_jsx_runtime9 = require("react/jsx-runtime");
8179
8808
  function BookDemoButton({
8180
8809
  label = "Book a demo",
8181
8810
  className,
8182
8811
  children
8183
8812
  }) {
8184
8813
  const { openBookingDialog } = useGlitchgrab();
8185
- if (children) return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: children({ onClick: openBookingDialog }) });
8186
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8814
+ if (children) return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: children({ onClick: openBookingDialog }) });
8815
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
8187
8816
  "button",
8188
8817
  {
8189
8818
  type: "button",
@@ -8205,7 +8834,7 @@ function BookDemoButton({
8205
8834
  }
8206
8835
 
8207
8836
  // src/feedback-button.tsx
8208
- var import_jsx_runtime9 = require("react/jsx-runtime");
8837
+ var import_jsx_runtime10 = require("react/jsx-runtime");
8209
8838
  function useGlitchgrabSafe2() {
8210
8839
  try {
8211
8840
  return useGlitchgrab();
@@ -8224,7 +8853,7 @@ function FeedbackButton({
8224
8853
  if (!glitchgrab) return null;
8225
8854
  const handleClick = () => glitchgrab.openFeedbackDialog();
8226
8855
  if (children) {
8227
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: children({ onClick: handleClick }) });
8856
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: children({ onClick: handleClick }) });
8228
8857
  }
8229
8858
  const isTop = (_a = position == null ? void 0 : position.startsWith("top")) != null ? _a : false;
8230
8859
  const isLeft = (_b = position == null ? void 0 : position.endsWith("left")) != null ? _b : false;
@@ -8232,7 +8861,7 @@ function FeedbackButton({
8232
8861
  ...isLeft ? { left: "16px" } : { right: "16px" },
8233
8862
  ...isTop ? { top: "16px" } : { bottom: "16px" }
8234
8863
  };
8235
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
8864
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
8236
8865
  "button",
8237
8866
  {
8238
8867
  type: "button",
@@ -8265,7 +8894,7 @@ function FeedbackButton({
8265
8894
  },
8266
8895
  "aria-label": label,
8267
8896
  children: [
8268
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
8897
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
8269
8898
  "svg",
8270
8899
  {
8271
8900
  width: "16",
@@ -8274,7 +8903,7 @@ function FeedbackButton({
8274
8903
  fill: "none",
8275
8904
  style: { flexShrink: 0 },
8276
8905
  "aria-hidden": "true",
8277
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
8906
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
8278
8907
  "path",
8279
8908
  {
8280
8909
  d: "M12 2.5l2.9 5.9 6.5.9-4.7 4.6 1.1 6.5L12 17.4l-5.8 3 1.1-6.5L2.6 9.3l6.5-.9L12 2.5z",