viewgate-wrapper 1.10.1 → 1.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewGateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ViewGateOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAiB1E,OAAO,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"ViewGateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ViewGateOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAiB1E,OAAO,wBAAwB,CAAC;AAiahC,eAAO,MAAM,eAAe,EAAE,EAuxB7B,CAAC"}
|
package/dist/viewgate-wrapper.js
CHANGED
|
@@ -1102,7 +1102,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1102
1102
|
);
|
|
1103
1103
|
}
|
|
1104
1104
|
a(o.toDataURL("image/png"));
|
|
1105
|
-
}, s.src = e;
|
|
1105
|
+
}, s.onerror = () => a(""), s.src = e;
|
|
1106
1106
|
}), Lr = (e) => {
|
|
1107
1107
|
const t = window.getComputedStyle(e), r = {};
|
|
1108
1108
|
return [
|
|
@@ -1343,8 +1343,8 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1343
1343
|
if (!(l.current?.contains(h) || h.closest(".vg-no-capture")) && i) {
|
|
1344
1344
|
d.preventDefault(), d.stopPropagation(), N(!0);
|
|
1345
1345
|
try {
|
|
1346
|
-
const y = i.element.getBoundingClientRect(), P = 24, F =
|
|
1347
|
-
quality: 0.
|
|
1346
|
+
const y = i.element.getBoundingClientRect(), P = 24, F = 2, $ = await Rr(document.body, {
|
|
1347
|
+
quality: 0.95,
|
|
1348
1348
|
pixelRatio: F,
|
|
1349
1349
|
filter: (ee) => !l.current?.contains(ee)
|
|
1350
1350
|
}), S = await Nr($, y, P, F), Se = {
|
|
@@ -1422,8 +1422,8 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1422
1422
|
O(!1);
|
|
1423
1423
|
}
|
|
1424
1424
|
};
|
|
1425
|
-
return /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1426
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1425
|
+
return /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:710", className: "vg-container", children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:711", className: "vg-no-capture", children: [
|
|
1426
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:713", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: Fe }, id: "viewgate-ui", children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:714", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
|
|
1427
1427
|
/* @__PURE__ */ c.jsx(
|
|
1428
1428
|
"button",
|
|
1429
1429
|
{
|
|
@@ -1433,9 +1433,9 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1433
1433
|
padding: "12px 24px",
|
|
1434
1434
|
background: s ? "#ef4444" : void 0
|
|
1435
1435
|
},
|
|
1436
|
-
children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1437
|
-
s ? /* @__PURE__ */ c.jsx(Pe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1438
|
-
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1436
|
+
children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:723", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
1437
|
+
s ? /* @__PURE__ */ c.jsx(Pe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:724", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ c.jsx(me, { "data-source-path": "/src/components/ViewGateOverlay.tsx:724", size: 20, className: "vg-animate-pop" }),
|
|
1438
|
+
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:725", children: s ? r.exitMode : r.enterMode })
|
|
1439
1439
|
] })
|
|
1440
1440
|
}
|
|
1441
1441
|
),
|
|
@@ -1448,13 +1448,13 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1448
1448
|
className: "vg-button-ghost vg-animate-pop",
|
|
1449
1449
|
style: { animationDelay: "0.1s" },
|
|
1450
1450
|
children: [
|
|
1451
|
-
/* @__PURE__ */ c.jsx(vt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1452
|
-
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1451
|
+
/* @__PURE__ */ c.jsx(vt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:738", size: 20 }),
|
|
1452
|
+
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:739", children: r.viewComments })
|
|
1453
1453
|
]
|
|
1454
1454
|
}
|
|
1455
1455
|
)
|
|
1456
1456
|
] }) }),
|
|
1457
|
-
G && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1457
|
+
G && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:747", style: {
|
|
1458
1458
|
position: "fixed",
|
|
1459
1459
|
top: 0,
|
|
1460
1460
|
left: 0,
|
|
@@ -1467,14 +1467,14 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1467
1467
|
justifyContent: "center",
|
|
1468
1468
|
zIndex: Fe + 1,
|
|
1469
1469
|
cursor: "wait"
|
|
1470
|
-
}, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1471
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1472
|
-
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1470
|
+
}, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:753", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
|
|
1471
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:754", className: "vg-spinner" }),
|
|
1472
|
+
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:755", style: { fontWeight: 600, fontSize: "14px", color: "#1e293b" }, children: "Capturando..." })
|
|
1473
1473
|
] }) }),
|
|
1474
1474
|
s && !m && /* @__PURE__ */ c.jsx(
|
|
1475
1475
|
"div",
|
|
1476
1476
|
{
|
|
1477
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1477
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:762",
|
|
1478
1478
|
className: "vg-backdrop-blur",
|
|
1479
1479
|
style: {
|
|
1480
1480
|
opacity: 1,
|
|
@@ -1493,7 +1493,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1493
1493
|
s && i && !m && !G && /* @__PURE__ */ c.jsx(
|
|
1494
1494
|
"div",
|
|
1495
1495
|
{
|
|
1496
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1496
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:781",
|
|
1497
1497
|
className: "vg-selection-pulse",
|
|
1498
1498
|
style: {
|
|
1499
1499
|
top: i.rect.top - 4,
|
|
@@ -1505,17 +1505,17 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1505
1505
|
children: /* @__PURE__ */ c.jsxs(
|
|
1506
1506
|
"div",
|
|
1507
1507
|
{
|
|
1508
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1508
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:791",
|
|
1509
1509
|
className: "vg-selection-label",
|
|
1510
1510
|
style: {
|
|
1511
1511
|
...i.rect.top < 60 ? i.rect.bottom > window.innerHeight - 60 ? { top: "8px", bottom: "auto" } : { top: "100%", marginTop: "8px", bottom: "auto" } : { top: "-40px", bottom: "auto" },
|
|
1512
1512
|
...i.rect.left + 200 > window.innerWidth ? { left: "auto", right: "0" } : { left: "0", right: "auto" }
|
|
1513
1513
|
},
|
|
1514
1514
|
children: [
|
|
1515
|
-
/* @__PURE__ */ c.jsx(Et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1516
|
-
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1517
|
-
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1518
|
-
/* @__PURE__ */ c.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1515
|
+
/* @__PURE__ */ c.jsx(Et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:807", size: 16 }),
|
|
1516
|
+
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:808", style: { display: "flex", flexDirection: "column" }, children: [
|
|
1517
|
+
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:809", style: { fontWeight: 700 }, children: r.selectToComment }),
|
|
1518
|
+
/* @__PURE__ */ c.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:810", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
|
|
1519
1519
|
Math.round(i.rect.width),
|
|
1520
1520
|
" × ",
|
|
1521
1521
|
Math.round(i.rect.height)
|
|
@@ -1526,7 +1526,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1526
1526
|
)
|
|
1527
1527
|
}
|
|
1528
1528
|
),
|
|
1529
|
-
m && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1529
|
+
m && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:820", className: "vg-animate-fade", style: {
|
|
1530
1530
|
position: "fixed",
|
|
1531
1531
|
top: 0,
|
|
1532
1532
|
left: 0,
|
|
@@ -1538,13 +1538,13 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1538
1538
|
alignItems: "center",
|
|
1539
1539
|
justifyContent: "center",
|
|
1540
1540
|
zIndex: he
|
|
1541
|
-
}, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1541
|
+
}, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:825", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1542
1542
|
padding: "40px",
|
|
1543
1543
|
width: "500px",
|
|
1544
1544
|
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
1545
1545
|
}, children: [
|
|
1546
|
-
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1547
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1546
|
+
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:829", style: { textAlign: "center", marginBottom: "32px" }, children: [
|
|
1547
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:830", style: {
|
|
1548
1548
|
width: "48px",
|
|
1549
1549
|
height: "48px",
|
|
1550
1550
|
background: "var(--vg-primary-gradient)",
|
|
@@ -1555,11 +1555,11 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1555
1555
|
margin: "0 auto 16px",
|
|
1556
1556
|
color: "white",
|
|
1557
1557
|
boxShadow: "0 8px 16px rgba(99, 102, 241, 0.3)"
|
|
1558
|
-
}, children: /* @__PURE__ */ c.jsx(me, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1559
|
-
/* @__PURE__ */ c.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1560
|
-
/* @__PURE__ */ c.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1558
|
+
}, children: /* @__PURE__ */ c.jsx(me, { "data-source-path": "/src/components/ViewGateOverlay.tsx:835", size: 24 }) }),
|
|
1559
|
+
/* @__PURE__ */ c.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:837", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
|
|
1560
|
+
/* @__PURE__ */ c.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:838", style: { margin: 0, color: "#64748b", fontSize: "15px" }, children: r.feedbackSubheader })
|
|
1561
1561
|
] }),
|
|
1562
|
-
m.visualPreview && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1562
|
+
m.visualPreview && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:842", style: { marginBottom: "24px", borderRadius: "12px", overflow: "hidden", border: "1px solid #e2e8f0", background: "#f8fafc" }, children: /* @__PURE__ */ c.jsx(
|
|
1563
1563
|
"img",
|
|
1564
1564
|
{
|
|
1565
1565
|
src: m.visualPreview,
|
|
@@ -1579,7 +1579,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1579
1579
|
style: { fontSize: "15px", padding: "16px", marginBottom: "24px" }
|
|
1580
1580
|
}
|
|
1581
1581
|
),
|
|
1582
|
-
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1582
|
+
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:861", style: { display: "flex", gap: "12px" }, children: [
|
|
1583
1583
|
/* @__PURE__ */ c.jsx(
|
|
1584
1584
|
"button",
|
|
1585
1585
|
{
|
|
@@ -1596,15 +1596,15 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1596
1596
|
className: "vg-button-primary",
|
|
1597
1597
|
disabled: b || !x.trim(),
|
|
1598
1598
|
style: { flex: 2 },
|
|
1599
|
-
children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1600
|
-
b ? /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1601
|
-
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1599
|
+
children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:875", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1600
|
+
b ? /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:876", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ c.jsx(_t, { "data-source-path": "/src/components/ViewGateOverlay.tsx:876", size: 18 }),
|
|
1601
|
+
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:877", children: b ? r.submitting : r.sendFeedback || "Send Comment" })
|
|
1602
1602
|
] })
|
|
1603
1603
|
}
|
|
1604
1604
|
)
|
|
1605
1605
|
] })
|
|
1606
1606
|
] }) }),
|
|
1607
|
-
V && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1607
|
+
V && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:887", className: "vg-animate-fade", style: {
|
|
1608
1608
|
position: "fixed",
|
|
1609
1609
|
top: 0,
|
|
1610
1610
|
left: 0,
|
|
@@ -1616,23 +1616,23 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1616
1616
|
alignItems: "center",
|
|
1617
1617
|
justifyContent: "center",
|
|
1618
1618
|
zIndex: he
|
|
1619
|
-
}, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1619
|
+
}, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:892", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1620
1620
|
padding: "32px",
|
|
1621
1621
|
width: "650px",
|
|
1622
1622
|
maxHeight: "85vh",
|
|
1623
1623
|
display: "flex",
|
|
1624
1624
|
flexDirection: "column"
|
|
1625
1625
|
}, children: [
|
|
1626
|
-
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1627
|
-
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1628
|
-
/* @__PURE__ */ c.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1629
|
-
!I && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1626
|
+
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:896", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
|
|
1627
|
+
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:897", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
1628
|
+
/* @__PURE__ */ c.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:898", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: I ? r.commentDetails : r.annotations }),
|
|
1629
|
+
!I && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:902", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: E.length })
|
|
1630
1630
|
] }),
|
|
1631
|
-
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1631
|
+
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:907", style: { display: "flex", gap: "8px" }, children: [
|
|
1632
1632
|
I && /* @__PURE__ */ c.jsx(
|
|
1633
1633
|
"button",
|
|
1634
1634
|
{
|
|
1635
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1635
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:909",
|
|
1636
1636
|
className: "vg-button-ghost",
|
|
1637
1637
|
style: { padding: "6px 14px", fontSize: "12px" },
|
|
1638
1638
|
onClick: () => Z(null),
|
|
@@ -1642,21 +1642,21 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1642
1642
|
/* @__PURE__ */ c.jsx(
|
|
1643
1643
|
"button",
|
|
1644
1644
|
{
|
|
1645
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1645
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:917",
|
|
1646
1646
|
className: "vg-button-ghost",
|
|
1647
1647
|
style: { padding: "8px", borderRadius: "50%" },
|
|
1648
1648
|
onClick: () => {
|
|
1649
1649
|
A(!1), Z(null);
|
|
1650
1650
|
},
|
|
1651
|
-
children: /* @__PURE__ */ c.jsx(Pe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1651
|
+
children: /* @__PURE__ */ c.jsx(Pe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:922", size: 20 })
|
|
1652
1652
|
}
|
|
1653
1653
|
)
|
|
1654
1654
|
] })
|
|
1655
1655
|
] }),
|
|
1656
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1656
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:927", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: J ? /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:929", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:930", className: "vg-spinner" }) }) : (I ? E.filter((d) => d._id === I) : E).map((d, h) => /* @__PURE__ */ c.jsxs(
|
|
1657
1657
|
"div",
|
|
1658
1658
|
{
|
|
1659
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1659
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:934",
|
|
1660
1660
|
className: "vg-glassmorphism vg-animate-slide",
|
|
1661
1661
|
style: {
|
|
1662
1662
|
padding: "20px",
|
|
@@ -1666,17 +1666,17 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1666
1666
|
animationDelay: `${h * 0.05}s`
|
|
1667
1667
|
},
|
|
1668
1668
|
children: [
|
|
1669
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1670
|
-
d.status === "ready_for_review" ? /* @__PURE__ */ c.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1671
|
-
/* @__PURE__ */ c.jsx(X, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1669
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:945", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:946", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
|
|
1670
|
+
d.status === "ready_for_review" ? /* @__PURE__ */ c.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:948", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
|
|
1671
|
+
/* @__PURE__ */ c.jsx(X, { "data-source-path": "/src/components/ViewGateOverlay.tsx:949", size: 14 }),
|
|
1672
1672
|
" ",
|
|
1673
1673
|
r.readyForReview
|
|
1674
|
-
] }) : /* @__PURE__ */ c.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1675
|
-
/* @__PURE__ */ c.jsx(Ve, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1674
|
+
] }) : /* @__PURE__ */ c.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:952", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
|
|
1675
|
+
/* @__PURE__ */ c.jsx(Ve, { "data-source-path": "/src/components/ViewGateOverlay.tsx:953", size: 14 }),
|
|
1676
1676
|
" ",
|
|
1677
1677
|
r.pending
|
|
1678
1678
|
] }),
|
|
1679
|
-
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1679
|
+
/* @__PURE__ */ c.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:956", style: { fontSize: "12px", color: "#94a3b8" }, children: Ar(d.timestamp || d.createdAt || d.reference?.timestamp, t) })
|
|
1680
1680
|
] }) }),
|
|
1681
1681
|
U === d._id ? /* @__PURE__ */ c.jsx(
|
|
1682
1682
|
"textarea",
|
|
@@ -1688,12 +1688,12 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1688
1688
|
autoFocus: !0,
|
|
1689
1689
|
style: { marginBottom: "16px" }
|
|
1690
1690
|
}
|
|
1691
|
-
) : /* @__PURE__ */ c.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1692
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1691
|
+
) : /* @__PURE__ */ c.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:972", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: d.message }),
|
|
1692
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:975", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: U === d._id ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
1693
1693
|
/* @__PURE__ */ c.jsx(
|
|
1694
1694
|
"button",
|
|
1695
1695
|
{
|
|
1696
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1696
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:978",
|
|
1697
1697
|
className: "vg-button-primary vg-animate-pop",
|
|
1698
1698
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
1699
1699
|
onClick: async () => {
|
|
@@ -1710,19 +1710,19 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1710
1710
|
children: r.save
|
|
1711
1711
|
}
|
|
1712
1712
|
),
|
|
1713
|
-
/* @__PURE__ */ c.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1713
|
+
/* @__PURE__ */ c.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1000", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => q(null), children: r.cancel })
|
|
1714
1714
|
] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
1715
1715
|
/* @__PURE__ */ c.jsxs(
|
|
1716
1716
|
"button",
|
|
1717
1717
|
{
|
|
1718
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1718
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1004",
|
|
1719
1719
|
className: "vg-button-ghost vg-animate-pop",
|
|
1720
1720
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
1721
1721
|
onClick: () => {
|
|
1722
1722
|
q(d._id), Q(d.message);
|
|
1723
1723
|
},
|
|
1724
1724
|
children: [
|
|
1725
|
-
/* @__PURE__ */ c.jsx(St, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1725
|
+
/* @__PURE__ */ c.jsx(St, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1012", size: 14 }),
|
|
1726
1726
|
" ",
|
|
1727
1727
|
r.edit
|
|
1728
1728
|
]
|
|
@@ -1731,14 +1731,14 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1731
1731
|
/* @__PURE__ */ c.jsxs(
|
|
1732
1732
|
"button",
|
|
1733
1733
|
{
|
|
1734
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1734
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1014",
|
|
1735
1735
|
className: "vg-button-ghost vg-animate-pop",
|
|
1736
1736
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.05s" },
|
|
1737
1737
|
onClick: () => {
|
|
1738
1738
|
d.url && (window.location.href = d.url);
|
|
1739
1739
|
},
|
|
1740
1740
|
children: [
|
|
1741
|
-
/* @__PURE__ */ c.jsx(xt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1741
|
+
/* @__PURE__ */ c.jsx(xt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1021", size: 14 }),
|
|
1742
1742
|
" ",
|
|
1743
1743
|
r.review
|
|
1744
1744
|
]
|
|
@@ -1747,7 +1747,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1747
1747
|
d.status === "pending" ? /* @__PURE__ */ c.jsxs(
|
|
1748
1748
|
"button",
|
|
1749
1749
|
{
|
|
1750
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1750
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1024",
|
|
1751
1751
|
className: "vg-button-primary vg-animate-pop",
|
|
1752
1752
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
1753
1753
|
onClick: () => {
|
|
@@ -1771,7 +1771,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1771
1771
|
});
|
|
1772
1772
|
},
|
|
1773
1773
|
children: [
|
|
1774
|
-
/* @__PURE__ */ c.jsx(X, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1774
|
+
/* @__PURE__ */ c.jsx(X, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1052", size: 14 }),
|
|
1775
1775
|
" ",
|
|
1776
1776
|
r.markReady
|
|
1777
1777
|
]
|
|
@@ -1779,7 +1779,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1779
1779
|
) : /* @__PURE__ */ c.jsxs(
|
|
1780
1780
|
"button",
|
|
1781
1781
|
{
|
|
1782
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1782
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1055",
|
|
1783
1783
|
className: "vg-button-ghost vg-animate-pop",
|
|
1784
1784
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
1785
1785
|
onClick: () => {
|
|
@@ -1804,7 +1804,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1804
1804
|
});
|
|
1805
1805
|
},
|
|
1806
1806
|
children: [
|
|
1807
|
-
/* @__PURE__ */ c.jsx(jt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1807
|
+
/* @__PURE__ */ c.jsx(jt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1083", size: 14 }),
|
|
1808
1808
|
" ",
|
|
1809
1809
|
r.reopen
|
|
1810
1810
|
]
|
|
@@ -1813,7 +1813,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1813
1813
|
/* @__PURE__ */ c.jsx(
|
|
1814
1814
|
"button",
|
|
1815
1815
|
{
|
|
1816
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1816
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1086",
|
|
1817
1817
|
className: "vg-button-ghost vg-animate-pop",
|
|
1818
1818
|
style: { padding: "8px 12px", color: "#ef4444", borderColor: "#fee2e2", animationDelay: "0.15s" },
|
|
1819
1819
|
onClick: () => {
|
|
@@ -1835,7 +1835,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1835
1835
|
}
|
|
1836
1836
|
});
|
|
1837
1837
|
},
|
|
1838
|
-
children: /* @__PURE__ */ c.jsx(Te, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1838
|
+
children: /* @__PURE__ */ c.jsx(Te, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1113", size: 16 })
|
|
1839
1839
|
}
|
|
1840
1840
|
)
|
|
1841
1841
|
] }) })
|
|
@@ -1844,7 +1844,7 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1844
1844
|
d._id
|
|
1845
1845
|
)) })
|
|
1846
1846
|
] }) }),
|
|
1847
|
-
T && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1847
|
+
T && /* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1128", className: "vg-animate-fade", style: {
|
|
1848
1848
|
position: "fixed",
|
|
1849
1849
|
top: 0,
|
|
1850
1850
|
left: 0,
|
|
@@ -1856,8 +1856,8 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1856
1856
|
alignItems: "center",
|
|
1857
1857
|
justifyContent: "center",
|
|
1858
1858
|
zIndex: he + 1
|
|
1859
|
-
}, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1860
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1859
|
+
}, children: /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1133", className: "vg-glassmorphism vg-animate-slide", style: { padding: "32px", width: "400px", textAlign: "center" }, children: [
|
|
1860
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1134", style: {
|
|
1861
1861
|
width: "48px",
|
|
1862
1862
|
height: "48px",
|
|
1863
1863
|
background: T.type === "danger" ? "#fee2e2" : "#e0e7ff",
|
|
@@ -1867,15 +1867,15 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1867
1867
|
justifyContent: "center",
|
|
1868
1868
|
margin: "0 auto 20px",
|
|
1869
1869
|
color: T.type === "danger" ? "#ef4444" : "#6366f1"
|
|
1870
|
-
}, children: T.type === "danger" ? /* @__PURE__ */ c.jsx(Te, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1871
|
-
/* @__PURE__ */ c.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1872
|
-
/* @__PURE__ */ c.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1873
|
-
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1874
|
-
/* @__PURE__ */ c.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1870
|
+
}, children: T.type === "danger" ? /* @__PURE__ */ c.jsx(Te, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1142", size: 24 }) : /* @__PURE__ */ c.jsx(X, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1142", size: 24 }) }),
|
|
1871
|
+
/* @__PURE__ */ c.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1144", style: { margin: "0 0 8px 0", fontSize: "18px", fontWeight: 800, color: "#0f172a" }, children: T.title }),
|
|
1872
|
+
/* @__PURE__ */ c.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1145", style: { margin: "0 0 24px 0", fontSize: "14px", color: "#64748b", lineHeight: 1.5 }, children: T.message }),
|
|
1873
|
+
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1146", style: { display: "flex", gap: "12px" }, children: [
|
|
1874
|
+
/* @__PURE__ */ c.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1147", className: "vg-button-ghost", style: { flex: 1 }, onClick: () => L(null), children: r.no }),
|
|
1875
1875
|
/* @__PURE__ */ c.jsx(
|
|
1876
1876
|
"button",
|
|
1877
1877
|
{
|
|
1878
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1878
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1148",
|
|
1879
1879
|
className: "vg-button-primary",
|
|
1880
1880
|
style: {
|
|
1881
1881
|
flex: 1,
|
|
@@ -1916,19 +1916,19 @@ const jr = 2147483647, Fe = jr, he = 2e6, Or = 90, _r = 100, Vr = 50, Tr = () =>
|
|
|
1916
1916
|
A(!0), Z(d._id);
|
|
1917
1917
|
},
|
|
1918
1918
|
children: [
|
|
1919
|
-
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1920
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1921
|
-
/* @__PURE__ */ c.jsx(X, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1919
|
+
/* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1203", className: `vg-pin-tooltip ${pe[d._id] || ""}`, children: [
|
|
1920
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1204", style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: d.status === "ready_for_review" ? /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1206", style: { display: "flex", alignItems: "center", gap: "6px", color: "#16a34a", fontWeight: 700, fontSize: "11px" }, children: [
|
|
1921
|
+
/* @__PURE__ */ c.jsx(X, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1207", size: 12 }),
|
|
1922
1922
|
" ",
|
|
1923
1923
|
r.readyForReview
|
|
1924
|
-
] }) : /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1925
|
-
/* @__PURE__ */ c.jsx(Ve, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1924
|
+
] }) : /* @__PURE__ */ c.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1210", style: { display: "flex", alignItems: "center", gap: "6px", color: "#ea580c", fontWeight: 700, fontSize: "11px" }, children: [
|
|
1925
|
+
/* @__PURE__ */ c.jsx(Ve, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1211", size: 12 }),
|
|
1926
1926
|
" ",
|
|
1927
1927
|
r.pending
|
|
1928
1928
|
] }) }),
|
|
1929
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1929
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1215", style: { fontWeight: 500, color: "#1e293b", lineHeight: 1.4 }, children: d.message })
|
|
1930
1930
|
] }),
|
|
1931
|
-
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1931
|
+
/* @__PURE__ */ c.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1218", className: `vg-formal-pin ${d.status === "ready_for_review" ? "ready" : ""}`, children: d.status === "ready_for_review" ? /* @__PURE__ */ c.jsx(X, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1219", size: 18 }) : /* @__PURE__ */ c.jsx(me, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1219", size: 16 }) })
|
|
1932
1932
|
]
|
|
1933
1933
|
},
|
|
1934
1934
|
`pin-${d._id}`
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
React keys must be passed directly to JSX without using spread:
|
|
6
6
|
let props = %s;
|
|
7
7
|
<%s key={someKey} {...props} />`,b,C,d,C),de[C+b]=!0)}if(C=null,v!==void 0&&(n(v),C=""+v),o(p)&&(n(p.key),C=""+p.key),"key"in p){v={};for(var g in p)g!=="key"&&(v[g]=p[g])}else v=p;return C&&i(v,typeof l=="function"?l.displayName||l.name||"Unknown":l),f(l,C,v,a(),D,W)}function w(l){y(l)?l._store&&(l._store.validated=1):typeof l=="object"&&l!==null&&l.$$typeof===q&&(l._payload.status==="fulfilled"?y(l._payload.value)&&l._payload.value._store&&(l._payload.value._store.validated=1):l._store&&(l._store.validated=1))}function y(l){return typeof l=="object"&&l!==null&&l.$$typeof===V}var S=m,V=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),$=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),Je=Symbol.for("react.suspense_list"),Ze=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ve=Symbol.for("react.client.reference"),X=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,ee=Array.isArray,J=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(l){return l()}};var Z,te={},ne=S.react_stack_bottom_frame.bind(S,s)(),le=J(r(s)),de={};Q.Fragment=I,Q.jsx=function(l,p,v){var b=1e4>X.recentlyCreatedOwnerStacks++;return h(l,p,v,!1,b?Error("react-stack-top-frame"):ne,b?J(r(l)):le)},Q.jsxs=function(l,p,v){var b=1e4>X.recentlyCreatedOwnerStacks++;return h(l,p,v,!0,b?Error("react-stack-top-frame"):ne,b?J(r(l)):le)}})()),Q}var Ce;function tt(){return Ce||(Ce=1,process.env.NODE_ENV==="production"?se.exports=qe():se.exports=et()),se.exports}var c=tt();const nt=({children:e})=>{const t=m.useRef(null),[n,r]=m.useState(null);return m.useEffect(()=>{if(t.current&&!t.current.shadowRoot){const a=t.current.attachShadow({mode:"open"});document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach(i=>{(i.textContent?.includes(".vg-")||i.textContent?.includes("--vg-"))&&a.appendChild(i.cloneNode(!0))});const o=document.createElement("link");o.rel="stylesheet",o.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",a.appendChild(o),r(a)}},[]),c.jsx("div",{"data-source-path":"/src/components/ShadowRootWrapper.tsx:38",ref:t,id:"viewgate-shadow-host",children:n&&Qe.createPortal(e,n)})};const Ee=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const rt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const st=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ke=e=>{const t=st(e);return t.charAt(0).toUpperCase()+t.slice(1)};var at={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ot=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const it=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:o,...i},u)=>m.createElement("svg",{ref:u,...at,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ee("lucide",a),...!s&&!ot(i)&&{"aria-hidden":"true"},...i},[...o.map(([f,h])=>m.createElement(f,h)),...Array.isArray(s)?s:[s]]));const O=(e,t)=>{const n=m.forwardRef(({className:r,...a},s)=>m.createElement(it,{ref:s,iconNode:t,className:Ee(`lucide-${rt(ke(e))}`,`lucide-${e}`,r),...a}));return n.displayName=ke(e),n};const ct=O("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const U=O("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Re=O("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const lt=O("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const dt=O("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const ue=O("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);const ut=O("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const pt=O("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const mt=O("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const ft=O("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const _e=O("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const je=O("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ht={en:{enterMode:"Enter Feedback Mode",exitMode:"Exit Mode",feedbackHeader:"Feedback",selectedElement:"Selected element:",line:"Line",placeholder:"Tell us what you'd like to change...",cancel:"Cancel",send:"Send Feedback",submitting:"Submitting...",success:"Your feedback has been submitted successfully!",error:"Failed to submit feedback. Check backend connection.",successHeader:"Success",errorHeader:"Error",preview:"Preview",viewComments:"View Comments",close:"Close",observe:"Observe",pending:"Pending",readyForReview:"Ready for Review",noComments:"No comments found.",deleteConfirm:"Are you sure you want to close/delete this comment?",markReady:"Mark as Ready",reopen:"Reopen",review:"Review",confirmDelete:"Are you sure you want to permanently delete this comment?",markReadyConfirm:"Mark as Ready?",confirmMarkReady:"Are you sure you want to mark this comment as ready for review?",reopenConfirm:"Reopen Comment?",confirmReopen:"Are you sure you want to reopen this comment and set it back to pending?",yes:"Yes, proceed",no:"No, cancel",deleteSuccess:"The annotation has been deleted.",updateSuccess:"Updated successfully.",navigating:"Redirecting to review...",selectToComment:"Click to comment",feedbackSubheader:"What would you like to improve here?",sendFeedback:"Send Comment",edit:"Edit",save:"Save",commentDetails:"Comment Details",annotations:"Comments",viewAll:"View All"},es:{enterMode:"Activar Modo Comentarios",exitMode:"Salir del Modo",feedbackHeader:"Comentarios",selectedElement:"Elemento seleccionado:",line:"Línea",placeholder:"Cuéntanos qué te gustaría cambiar...",cancel:"Cancelar",send:"Enviar Comentarios",submitting:"Enviando...",success:"¡Tus comentarios se han enviado con éxito!",error:"Error al enviar comentarios. Revisa la conexión con el servidor.",successHeader:"Éxito",errorHeader:"Error",preview:"Vista previa",viewComments:"Ver Comentarios",close:"Cerrar",observe:"Observar",pending:"Pendiente",readyForReview:"Lista para revisión",noComments:"No hay comentarios.",deleteConfirm:"¿Estás seguro de que deseas cerrar y eliminar este comentario?",markReady:"Marcar como Listo",reopen:"Reabrir",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar permanentemente este comentario?",markReadyConfirm:"¿Marcar como listo?",confirmMarkReady:"¿Estás seguro de que deseas marcar este comentario como listo para revisión?",reopenConfirm:"¿Reabrir comentario?",confirmReopen:"¿Estás seguro de que deseas reabrir este comentario y volverlo al estado pendiente?",yes:"Sí, continuar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Actualizado correctamente.",navigating:"Redirigiendo a revisión...",selectToComment:"Haz clic para comentar",feedbackSubheader:"¿Qué te gustaría mejorar aquí?",sendFeedback:"Enviar Comentario",edit:"Editar",save:"Guardar",commentDetails:"Detalles del Comentario",annotations:"Comentarios",viewAll:"Ver Todos"}},Oe=m.createContext(void 0),Ve=()=>{const e=m.useContext(Oe);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},gt=({children:e,language:t="es",apiKey:n,baseUrl:r="https://view-gate.vercel.app"})=>{const[a,s]=m.useState([]),o=(u,f)=>{const h=Date.now();s(w=>[...w,{id:h,message:u,type:f}]),setTimeout(()=>{s(w=>w.filter(y=>y.id!==h))},4e3)},i=ht[t];return c.jsxs(Oe.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:211",value:{addToast:o,language:t,t:i,apiKey:n,baseUrl:r},children:[e,c.jsx(nt,{"data-source-path":"/src/components/ViewGateProvider.tsx:213",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:214",className:"vg-container",children:[c.jsx(Xe,{"data-source-path":"/src/components/ViewGateProvider.tsx:215"}),c.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:216",className:"vg-toasts",style:{zIndex:2147483646},children:a.map(u=>c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:218",className:`vg-toast vg-animate-slide ${u.type}`,children:[u.type==="success"?c.jsx(U,{"data-source-path":"/src/components/ViewGateProvider.tsx:220",size:24,color:"#22c55e"}):c.jsx(ct,{"data-source-path":"/src/components/ViewGateProvider.tsx:222",size:24,color:"#ef4444"}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:224",children:[c.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:225",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:u.type==="success"?i.successHeader:i.errorHeader}),c.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:228",style:{fontSize:"14px",color:"#64748b"},children:u.message})]})]},u.id))})]})})]})};function yt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),t&&(r.href=t),a.href=e,a.href}const xt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function F(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let B=null;function Te(e={}){return B||(e.includeStyleProperties?(B=e.includeStyleProperties,B):(B=F(window.getComputedStyle(document.documentElement)),B))}function ae(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function wt(e){const t=ae(e,"border-left-width"),n=ae(e,"border-right-width");return e.clientWidth+t+n}function vt(e){const t=ae(e,"border-top-width"),n=ae(e,"border-bottom-width");return e.clientHeight+t+n}function Pe(e,t={}){const n=t.width||wt(e),r=t.height||vt(e);return{width:n,height:r}}function bt(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const j=16384;function St(e){(e.width>j||e.height>j)&&(e.width>j&&e.height>j?e.width>e.height?(e.height*=j/e.width,e.width=j):(e.width*=j/e.height,e.height=j):e.width>j?(e.height*=j/e.width,e.width=j):(e.width*=j/e.height,e.height=j))}function oe(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Ct(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Et(e,t,n){const r="http://www.w3.org/2000/svg",a=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${n}`),a.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),a.appendChild(s),s.appendChild(e),Ct(a)}const R=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||R(n,t)};function kt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Rt(e,t){return Te(t).map(n=>{const r=e.getPropertyValue(n),a=e.getPropertyPriority(n);return`${n}: ${r}${a?" !important":""};`}).join(" ")}function _t(e,t,n,r){const a=`.${e}:${t}`,s=n.cssText?kt(n):Rt(n,r);return document.createTextNode(`${a}{${s}}`)}function Ae(e,t,n,r){const a=window.getComputedStyle(e,n),s=a.getPropertyValue("content");if(s===""||s==="none")return;const o=xt();try{t.className=`${t.className} ${o}`}catch{return}const i=document.createElement("style");i.appendChild(_t(o,n,a,r)),t.appendChild(i)}function jt(e,t,n){Ae(e,t,":before",n),Ae(e,t,":after",n)}const Ne="application/font-woff",Ge="image/jpeg",Ot={woff:Ne,woff2:Ne,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ge,jpeg:Ge,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Vt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function pe(e){const t=Vt(e).toLowerCase();return Ot[t]||""}function Tt(e){return e.split(/,/)[1]}function me(e){return e.search(/^(data:)/)!==-1}function Pt(e,t){return`data:${t};base64,${e}`}async function Le(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const a=await r.blob();return new Promise((s,o)=>{const i=new FileReader;i.onerror=o,i.onloadend=()=>{try{s(n({res:r,result:i.result}))}catch(u){o(u)}},i.readAsDataURL(a)})}const fe={};function At(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function he(e,t,n){const r=At(e,t,n.includeQueryParams);if(fe[r]!=null)return fe[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await Le(e,n.fetchRequestInit,({res:o,result:i})=>(t||(t=o.headers.get("Content-Type")||""),Tt(i)));a=Pt(s,t)}catch(s){a=n.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;s&&(o=typeof s=="string"?s:s.message),o&&console.warn(o)}return fe[r]=a,a}async function Nt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):oe(t)}async function Gt(e,t){if(e.currentSrc){const s=document.createElement("canvas"),o=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,o?.drawImage(e,0,0,s.width,s.height);const i=s.toDataURL();return oe(i)}const n=e.poster,r=pe(n),a=await he(n,r,t);return oe(a)}async function Lt(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await ie(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function It(e,t){return R(e,HTMLCanvasElement)?Nt(e):R(e,HTMLVideoElement)?Gt(e,t):R(e,HTMLIFrameElement)?Lt(e,t):e.cloneNode(Ie(e))}const zt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ie=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Ft(e,t,n){var r,a;if(Ie(t))return t;let s=[];return zt(e)&&e.assignedNodes?s=F(e.assignedNodes()):R(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=F(e.contentDocument.body.childNodes):s=F(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||R(e,HTMLVideoElement)||await s.reduce((o,i)=>o.then(()=>ie(i,n)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function Mt(e,t,n){const r=t.style;if(!r)return;const a=window.getComputedStyle(e);a.cssText?(r.cssText=a.cssText,r.transformOrigin=a.transformOrigin):Te(n).forEach(s=>{let o=a.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),R(e,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),r.setProperty(s,o,a.getPropertyPriority(s))})}function Dt(e,t){R(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),R(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ht(e,t){if(R(e,HTMLSelectElement)){const r=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));r&&r.setAttribute("selected","")}}function $t(e,t,n){return R(t,Element)&&(Mt(e,t,n),jt(e,t,n),Dt(e,t),Ht(e,t)),t}async function Wt(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const i=n[s].getAttribute("xlink:href");if(i){const u=e.querySelector(i),f=document.querySelector(i);!u&&f&&!r[i]&&(r[i]=await ie(f,t,!0))}}const a=Object.values(r);if(a.length){const s="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg");o.setAttribute("xmlns",s),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const i=document.createElementNS(s,"defs");o.appendChild(i);for(let u=0;u<a.length;u++)i.appendChild(a[u]);e.appendChild(o)}return e}async function ie(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>It(r,t)).then(r=>Ft(e,r,t)).then(r=>$t(e,r,t)).then(r=>Wt(r,t))}const ze=/url\((['"]?)([^'"]+?)\1\)/g,Ut=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Bt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Yt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Xt(e){const t=[];return e.replace(ze,(n,r,a)=>(t.push(a),n)),t.filter(n=>!me(n))}async function Jt(e,t,n,r,a){try{const s=n?yt(t,n):t,o=pe(t);let i;return a||(i=await he(s,o,r)),e.replace(Yt(t),`$1${i}$3`)}catch{}return e}function Zt(e,{preferredFontFormat:t}){return t?e.replace(Bt,n=>{for(;;){const[r,,a]=Ut.exec(n)||[];if(!a)return"";if(a===t)return`src: ${r};`}}):e}function Fe(e){return e.search(ze)!==-1}async function Me(e,t,n){if(!Fe(e))return e;const r=Zt(e,n);return Xt(r).reduce((s,o)=>s.then(i=>Jt(i,o,t,n)),Promise.resolve(r))}async function Y(e,t,n){var r;const a=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(a){const s=await Me(a,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function Kt(e,t){await Y("background",e,t)||await Y("background-image",e,t),await Y("mask",e,t)||await Y("-webkit-mask",e,t)||await Y("mask-image",e,t)||await Y("-webkit-mask-image",e,t)}async function Qt(e,t){const n=R(e,HTMLImageElement);if(!(n&&!me(e.src))&&!(R(e,SVGImageElement)&&!me(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,a=await he(r,pe(r),t);await new Promise((s,o)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...u)=>{try{s(t.onImageErrorHandler(...u))}catch(f){o(f)}}:o;const i=e;i.decode&&(i.decode=s),i.loading==="lazy"&&(i.loading="eager"),n?(e.srcset="",e.src=a):e.href.baseVal=a})}async function qt(e,t){const r=F(e.childNodes).map(a=>De(a,t));await Promise.all(r).then(()=>e)}async function De(e,t){R(e,Element)&&(await Kt(e,t),await Qt(e,t),await qt(e,t))}function en(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(a=>{n[a]=r[a]}),e}const He={};async function $e(e){let t=He[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},He[e]=t,t}async function We(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async o=>{let i=o.replace(r,"$1");return i.startsWith("https://")||(i=new URL(i,e.url).href),Le(i,t.fetchRequestInit,({result:u})=>(n=n.replace(o,`url(${u})`),[o,u]))});return Promise.all(s).then(()=>n)}function Ue(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(r);if(u===null)break;t.push(u[0])}r=r.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",i=new RegExp(o,"gi");for(;;){let u=s.exec(r);if(u===null){if(u=i.exec(r),u===null)break;s.lastIndex=i.lastIndex}else i.lastIndex=s.lastIndex;t.push(u[0])}return t}async function tn(e,t){const n=[],r=[];return e.forEach(a=>{if("cssRules"in a)try{F(a.cssRules||[]).forEach((s,o)=>{if(s.type===CSSRule.IMPORT_RULE){let i=o+1;const u=s.href,f=$e(u).then(h=>We(h,t)).then(h=>Ue(h).forEach(w=>{try{a.insertRule(w,w.startsWith("@import")?i+=1:a.cssRules.length)}catch(y){console.error("Error inserting rule from remote css",{rule:w,error:y})}})).catch(h=>{console.error("Error loading remote css",h.toString())});r.push(f)}})}catch(s){const o=e.find(i=>i.href==null)||document.styleSheets[0];a.href!=null&&r.push($e(a.href).then(i=>We(i,t)).then(i=>Ue(i).forEach(u=>{o.insertRule(u,o.cssRules.length)})).catch(i=>{console.error("Error loading remote stylesheet",i)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(a=>{if("cssRules"in a)try{F(a.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),n))}function nn(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Fe(t.style.getPropertyValue("src")))}async function rn(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=F(e.ownerDocument.styleSheets),r=await tn(n,t);return nn(r)}function Be(e){return e.trim().replace(/["']/g,"")}function sn(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(Be(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function an(e,t){const n=await rn(e,t),r=sn(e);return(await Promise.all(n.filter(s=>r.has(Be(s.style.fontFamily))).map(s=>{const o=s.parentStyleSheet?s.parentStyleSheet.href:null;return Me(s.cssText,o,t)}))).join(`
|
|
8
|
-
`)}async function on(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await an(e,t);if(n){const r=document.createElement("style"),a=document.createTextNode(n);r.appendChild(a),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function cn(e,t={}){const{width:n,height:r}=Pe(e,t),a=await ie(e,t,!0);return await on(a,t),await De(a,t),en(a,t),await Et(a,n,r)}async function ln(e,t={}){const{width:n,height:r}=Pe(e,t),a=await cn(e,t),s=await oe(a),o=document.createElement("canvas"),i=o.getContext("2d"),u=t.pixelRatio||bt(),f=t.canvasWidth||n,h=t.canvasHeight||r;return o.width=f*u,o.height=h*u,t.skipAutoScale||St(o),o.style.width=`${f}`,o.style.height=`${h}`,t.backgroundColor&&(i.fillStyle=t.backgroundColor,i.fillRect(0,0,o.width,o.height)),i.drawImage(s,0,0,o.width,o.height),o}async function dn(e,t={}){return(await ln(e,t)).toDataURL("image/jpeg",t.quality||1)}const Ye=2147483647,ge=2e6,un=90,pn=100,mn=50,fn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},hn=e=>{let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16)},gn=(e,t)=>{if(!e)return"";try{const n=new Date(e);return isNaN(n.getTime())?"":new Intl.DateTimeFormat(t==="es"?"es-ES":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n)}catch{return""}},yn=e=>{const t=(e.innerText||"").slice(0,30).trim(),n={tag:e.tagName.toLowerCase(),classHash:hn(e.className),textSnippet:t,parentTag:e.parentElement?.tagName.toLowerCase(),neighborCount:e.parentElement?.children.length||0},r=e.getAttribute("aria-label");r&&(n.ariaLabel=r);const a=e.getAttribute("role");a&&(n.role=a);const s=e.getAttribute("name");return s&&(n.name=s),n},xn=(()=>{let e=null,t=null;return n=>{if(!n||typeof window>"u"||typeof document>"u")return n;if(n.includes("oklch")||n.includes("oklab")||n.includes("lab(")||n.includes("lch(")||n.includes("color("))try{if(e||(e=document.createElement("canvas"),e.width=1,e.height=1),t||(t=e.getContext("2d",{willReadFrequently:!0})),t){t.fillStyle="#000000",t.fillStyle=n;const s=t.fillStyle;if(s&&!s.includes("oklch")&&!s.includes("oklab"))return s}const r=document.createElement("div");r.style.color=n,document.body.appendChild(r);const a=getComputedStyle(r).color;return document.body.removeChild(r),a&&!a.includes("oklch")?a:"rgb(0,0,0)"}catch{return"rgb(0,0,0)"}return n}})(),wn=(e,t,n,r)=>new Promise(a=>{const s=new Image;s.onload=()=>{const o=document.createElement("canvas"),i=window.devicePixelRatio||1,u=t.width+n*2,f=t.height+n*2;o.width=u*i,o.height=f*i;const h=o.getContext("2d");if(h){h.scale(i,i);const w=(t.left+window.scrollX-n)*r,y=(t.top+window.scrollY-n)*r,S=u*r,V=f*r;h.drawImage(s,w,y,S,V,0,0,u,f)}a(o.toDataURL("image/png"))},s.src=e}),vn=e=>{const t=window.getComputedStyle(e),n={};return["display","position","margin","padding","font-size","color","background-color","width","height","z-index"].forEach(a=>{const s=t.getPropertyValue(a);n[a]=xn(s)}),n},bn=e=>{const n=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!n)return"";const r=[];let a=e[n];for(;a;){const s=a.type;if(typeof s=="function"){const o=s.displayName||s.name;o&&!o.includes("ViewGate")&&!r.includes(o)&&r.unshift(o)}a=a.return}return r.join(" > ")||"Generic Component"},ye=(e,t=document)=>{const n=t.querySelector(e);if(n)return n;const r=t.querySelectorAll("*");for(const a of Array.from(r)){const s=a.shadowRoot;if(s){const o=ye(e,s);if(o)return o}}return null},Sn=e=>{if(!e.tag)return null;const t=document.getElementsByTagName(e.tag);let n=null,r=0;for(let a=0;a<t.length;a++){const s=t[a];let o=0;s.innerText?.includes(e.text.slice(0,20))&&(o+=4),e.fingerprint?.classHash&&s.className.includes(e.fingerprint.classHash)&&(o+=2),e.fingerprint?.ariaLabel&&s.getAttribute("aria-label")===e.fingerprint.ariaLabel&&(o+=3),e.fingerprint?.role&&s.getAttribute("role")===e.fingerprint.role&&(o+=2),e.parentContext&&(s.parentElement?.innerText||"").includes(e.parentContext.slice(0,30))&&(o+=2),e.fingerprint?.neighborCount===s.parentElement?.children.length&&(o+=1),e.fingerprint?.parentTag===s.parentElement?.tagName.toLowerCase()&&(o+=1),o>r&&o>=5&&(r=o,n=s)}return n},Cn=e=>{let t=ye(e.selector);if(t)return t;if(e.fallbackSelectors){for(const n of e.fallbackSelectors)if(t=ye(n),t)return t}if(t=Sn(e),t)return t;if(e.metadata?.scrollPosition&&e.viewportSize){const n=(e.normalizedOffset?.x||.5)*window.innerWidth,r=(e.normalizedOffset?.y||.5)*window.innerHeight;if(t=document.elementFromPoint(n,r),t&&t.tagName.toLowerCase()===e.tag)return t}return null},xe=e=>({tag:e.tagName.toLowerCase(),text:(e.innerText||e.getAttribute("placeholder")||"").slice(0,50).trim(),role:e.getAttribute("role")||void 0,type:e.getAttribute("type")||void 0}),En=e=>{const t=e.parentElement;if(!t)return;const n=Array.from(t.children).filter(o=>o!==e).slice(0,5).map(o=>xe(o)),r=Array.from(t.children),a=r.indexOf(e);let s="middle";return a===0&&(s="start"),a===r.length-1&&(s="end"),{target:{...xe(e),location:`${s} of ${t.tagName.toLowerCase()}`},parent:xe(t),siblings:n}},kn=e=>{let t="unknown:0",n=e;for(;n;){const h=n.getAttribute("data-source-path");if(h){t=h;break}n=n.parentElement}const r=bn(e),a=[],s=[],i=(h=>{const w=[];let y=h;for(;y&&y.nodeType===Node.ELEMENT_NODE;){let S=y.nodeName.toLowerCase();s.unshift(S);const V=y.id&&!y.id.startsWith("__")?y.id:null;V&&a.push(`#${V}`);const L=y.getAttribute("data-testid")||y.getAttribute("data-qa");L&&a.push(`[data-testid="${L}"]`);const I=y.getAttribute("aria-label"),T=y.getAttribute("role"),N=y.getAttribute("name");if(L){S=`[${y.hasAttribute("data-testid")?"data-testid":"data-qa"}="${L}"]`,w.unshift(S);break}else if(V){S="#"+V,w.unshift(S);break}else if(I){S=`${y.localName}[aria-label="${I}"]`,w.unshift(S);break}else if(T){S=`${y.localName}[role="${T}"]`,w.unshift(S);break}else if(N){S=`${y.localName}[name="${N}"]`,w.unshift(S);break}else{let E=y,$=1;for(;E.previousElementSibling;)E=E.previousElementSibling,E.nodeName.toLowerCase()===y.nodeName.toLowerCase()&&$++;$>1&&(S+=`:nth-of-type(${$})`)}w.unshift(S),y=y.parentElement}return w.join(" > ")})(e),u={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(h=>{const w=e.getAttribute(h);w&&(u[h]=w)});const f=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${i.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:i,outerHtml:e.outerHTML,parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:r,signature:f,source:t,attributes:u,fallbackSelectors:[...new Set(a)].slice(0,5),domPath:s.slice(-10),viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:En(e),fingerprint:yn(e),metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`,computedStyles:vn(e),viewportBreakpoint:fn(),outerHtml:e.outerHTML.slice(0,1500),scrollPosition:{x:window.scrollX,y:window.scrollY}}}},Xe=()=>{const{addToast:e,language:t,t:n,apiKey:r,baseUrl:a}=Ve(),[s,o]=m.useState(!1),[i,u]=m.useState(null),[f,h]=m.useState(null),[w,y]=m.useState(""),[S,V]=m.useState(!1),[L,I]=m.useState(!1),[T,N]=m.useState(!1),[E,$]=m.useState([]),[P,z]=m.useState(null),[Je,Ze]=m.useState(!1),[q,ce]=m.useState(!1),[ve,X]=m.useState({}),[M,ee]=m.useState(null),[J,Z]=m.useState(null),[te,ne]=m.useState(""),[le,de]=m.useState({}),l=m.useRef(null),p=m.useRef(null),v=m.useCallback(()=>{p.current||(p.current=requestAnimationFrame(()=>{const d={};E.forEach(g=>{if(!g.reference)return;const x=Cn(g.reference);if(x){const A=x.getBoundingClientRect();d[g._id]={top:A.top+window.scrollY,left:A.left+window.scrollX,width:A.width}}}),de(d),p.current=null}))},[E]),b=m.useCallback(async()=>{if(r){ce(!0);try{const d=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":r}});if(d.ok){const g=await d.json();$(g.data||[])}}catch(d){console.error("Failed to fetch annotations",d)}finally{ce(!1)}}},[r,a]);m.useEffect(()=>{if(!s&&E.length>0){v();const d=new MutationObserver(()=>v()),g=new ResizeObserver(()=>v()),x=()=>v();return d.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),g.observe(document.documentElement),window.addEventListener("scroll",x,!0),()=>{d.disconnect(),g.disconnect(),window.removeEventListener("scroll",x,!0),p.current&&cancelAnimationFrame(p.current)}}},[s,E.length,v]),m.useEffect(()=>{b()},[b]),m.useEffect(()=>{l.current=document.getElementById("viewgate-shadow-host")},[]);const D=m.useCallback(d=>{if(!s||f)return;const g=document.elementFromPoint(d.clientX,d.clientY);if(!g||l.current?.contains(g)||g.closest(".vg-no-capture")){u(null);return}const x=g.getBoundingClientRect();u({tag:g.tagName.toLowerCase(),source:g.getAttribute("data-source-path")||"unknown:0",rect:x,element:g,previewText:(g.innerText||"").slice(0,100)||(g.getAttribute("placeholder")||"").slice(0,100)||g.tagName.toLowerCase(),semanticReference:{...kn(g),normalizedOffset:{x:(d.clientX-x.left)/x.width,y:(d.clientY-x.top)/x.height}}})},[s,f]),W=m.useCallback(async d=>{if(!s||f)return;const g=d.target;if(!(l.current?.contains(g)||g.closest(".vg-no-capture"))&&i){d.preventDefault(),d.stopPropagation(),I(!0);try{const x=i.element.getBoundingClientRect(),A=24,H=.6,G=await dn(document.body,{quality:.5,pixelRatio:H,filter:re=>!l.current?.contains(re)}),k=await wn(G,x,A,H),Ke={...i.semanticReference,metadata:{...i.semanticReference.metadata,screenshotUrl:G,elementScreenshot:k}};h({...i,visualPreview:k,semanticReference:Ke})}catch(x){console.error("Failed to capture preview:",x),h(i)}finally{I(!1),u(null)}}},[s,i,f]);m.useEffect(()=>{const d=g=>{if(g.key==="Escape"){f?h(null):T?N(!1):s&&o(!1);return}const A=(()=>{let k=document.activeElement;for(;k&&k.shadowRoot&&k.shadowRoot.activeElement;)k=k.shadowRoot.activeElement;return k})();if(["input","textarea"].includes((A?.tagName||"").toLowerCase())||A?.isContentEditable)return;const G=g.key.toLowerCase();G==="c"&&!f&&!T&&o(k=>!k),G==="v"&&!f&&(N(k=>!k),T||o(!1))};return s&&!f?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",d),window.addEventListener("mousemove",D,!0),window.addEventListener("click",W,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",d),window.removeEventListener("mousemove",D,!0),window.removeEventListener("click",W,!0)}},[s,f,T,D,W]);const C=async()=>{if(!f||!w.trim())return;V(!0);const{semanticReference:d}=f,[g,x]=(d.source||"").split(":"),A=x||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({filePath:g,line:parseInt(A),url:window.location.href,message:w,componentName:d.componentPath||f.tag,reference:{...d,viewport:{width:window.innerWidth,height:window.innerHeight},userAgent:navigator.userAgent,timestamp:new Date().toISOString()}})})).ok)throw new Error("Backend failed");e(n.success,"success"),h(null),y(""),o(!1),b()}catch(H){console.error(H),e(n.error,"error")}finally{V(!1)}};return c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:708",className:"vg-container",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:709",className:"vg-no-capture",children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:711",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:Ye},id:"viewgate-ui",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:712",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[c.jsx("button",{onClick:()=>o(!s),className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:s?"#ef4444":void 0},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:721",style:{display:"flex",alignItems:"center",gap:"10px"},children:[s?c.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:722",size:20,className:"vg-animate-pop"}):c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:722",size:20,className:"vg-animate-pop"}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:723",children:s?n.exitMode:n.enterMode})]})}),E.length>0&&c.jsxs("button",{onClick:()=>{N(!T),o(!1),h(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[c.jsx(dt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:736",size:20}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:737",children:n.viewComments})]})]})}),L&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:745",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ye+1,cursor:"wait"},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:751",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:752",className:"vg-spinner"}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:753",style:{fontWeight:600,fontSize:"14px",color:"#1e293b"},children:"Capturando..."})]})}),s&&!f&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:760",className:"vg-backdrop-blur",style:{opacity:1,clipPath:i?`polygon(
|
|
8
|
+
`)}async function on(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await an(e,t);if(n){const r=document.createElement("style"),a=document.createTextNode(n);r.appendChild(a),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function cn(e,t={}){const{width:n,height:r}=Pe(e,t),a=await ie(e,t,!0);return await on(a,t),await De(a,t),en(a,t),await Et(a,n,r)}async function ln(e,t={}){const{width:n,height:r}=Pe(e,t),a=await cn(e,t),s=await oe(a),o=document.createElement("canvas"),i=o.getContext("2d"),u=t.pixelRatio||bt(),f=t.canvasWidth||n,h=t.canvasHeight||r;return o.width=f*u,o.height=h*u,t.skipAutoScale||St(o),o.style.width=`${f}`,o.style.height=`${h}`,t.backgroundColor&&(i.fillStyle=t.backgroundColor,i.fillRect(0,0,o.width,o.height)),i.drawImage(s,0,0,o.width,o.height),o}async function dn(e,t={}){return(await ln(e,t)).toDataURL("image/jpeg",t.quality||1)}const Ye=2147483647,ge=2e6,un=90,pn=100,mn=50,fn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},hn=e=>{let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16)},gn=(e,t)=>{if(!e)return"";try{const n=new Date(e);return isNaN(n.getTime())?"":new Intl.DateTimeFormat(t==="es"?"es-ES":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n)}catch{return""}},yn=e=>{const t=(e.innerText||"").slice(0,30).trim(),n={tag:e.tagName.toLowerCase(),classHash:hn(e.className),textSnippet:t,parentTag:e.parentElement?.tagName.toLowerCase(),neighborCount:e.parentElement?.children.length||0},r=e.getAttribute("aria-label");r&&(n.ariaLabel=r);const a=e.getAttribute("role");a&&(n.role=a);const s=e.getAttribute("name");return s&&(n.name=s),n},xn=(()=>{let e=null,t=null;return n=>{if(!n||typeof window>"u"||typeof document>"u")return n;if(n.includes("oklch")||n.includes("oklab")||n.includes("lab(")||n.includes("lch(")||n.includes("color("))try{if(e||(e=document.createElement("canvas"),e.width=1,e.height=1),t||(t=e.getContext("2d",{willReadFrequently:!0})),t){t.fillStyle="#000000",t.fillStyle=n;const s=t.fillStyle;if(s&&!s.includes("oklch")&&!s.includes("oklab"))return s}const r=document.createElement("div");r.style.color=n,document.body.appendChild(r);const a=getComputedStyle(r).color;return document.body.removeChild(r),a&&!a.includes("oklch")?a:"rgb(0,0,0)"}catch{return"rgb(0,0,0)"}return n}})(),wn=(e,t,n,r)=>new Promise(a=>{const s=new Image;s.onload=()=>{const o=document.createElement("canvas"),i=window.devicePixelRatio||1,u=t.width+n*2,f=t.height+n*2;o.width=u*i,o.height=f*i;const h=o.getContext("2d");if(h){h.scale(i,i);const w=(t.left+window.scrollX-n)*r,y=(t.top+window.scrollY-n)*r,S=u*r,V=f*r;h.drawImage(s,w,y,S,V,0,0,u,f)}a(o.toDataURL("image/png"))},s.onerror=()=>a(""),s.src=e}),vn=e=>{const t=window.getComputedStyle(e),n={};return["display","position","margin","padding","font-size","color","background-color","width","height","z-index"].forEach(a=>{const s=t.getPropertyValue(a);n[a]=xn(s)}),n},bn=e=>{const n=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!n)return"";const r=[];let a=e[n];for(;a;){const s=a.type;if(typeof s=="function"){const o=s.displayName||s.name;o&&!o.includes("ViewGate")&&!r.includes(o)&&r.unshift(o)}a=a.return}return r.join(" > ")||"Generic Component"},ye=(e,t=document)=>{const n=t.querySelector(e);if(n)return n;const r=t.querySelectorAll("*");for(const a of Array.from(r)){const s=a.shadowRoot;if(s){const o=ye(e,s);if(o)return o}}return null},Sn=e=>{if(!e.tag)return null;const t=document.getElementsByTagName(e.tag);let n=null,r=0;for(let a=0;a<t.length;a++){const s=t[a];let o=0;s.innerText?.includes(e.text.slice(0,20))&&(o+=4),e.fingerprint?.classHash&&s.className.includes(e.fingerprint.classHash)&&(o+=2),e.fingerprint?.ariaLabel&&s.getAttribute("aria-label")===e.fingerprint.ariaLabel&&(o+=3),e.fingerprint?.role&&s.getAttribute("role")===e.fingerprint.role&&(o+=2),e.parentContext&&(s.parentElement?.innerText||"").includes(e.parentContext.slice(0,30))&&(o+=2),e.fingerprint?.neighborCount===s.parentElement?.children.length&&(o+=1),e.fingerprint?.parentTag===s.parentElement?.tagName.toLowerCase()&&(o+=1),o>r&&o>=5&&(r=o,n=s)}return n},Cn=e=>{let t=ye(e.selector);if(t)return t;if(e.fallbackSelectors){for(const n of e.fallbackSelectors)if(t=ye(n),t)return t}if(t=Sn(e),t)return t;if(e.metadata?.scrollPosition&&e.viewportSize){const n=(e.normalizedOffset?.x||.5)*window.innerWidth,r=(e.normalizedOffset?.y||.5)*window.innerHeight;if(t=document.elementFromPoint(n,r),t&&t.tagName.toLowerCase()===e.tag)return t}return null},xe=e=>({tag:e.tagName.toLowerCase(),text:(e.innerText||e.getAttribute("placeholder")||"").slice(0,50).trim(),role:e.getAttribute("role")||void 0,type:e.getAttribute("type")||void 0}),En=e=>{const t=e.parentElement;if(!t)return;const n=Array.from(t.children).filter(o=>o!==e).slice(0,5).map(o=>xe(o)),r=Array.from(t.children),a=r.indexOf(e);let s="middle";return a===0&&(s="start"),a===r.length-1&&(s="end"),{target:{...xe(e),location:`${s} of ${t.tagName.toLowerCase()}`},parent:xe(t),siblings:n}},kn=e=>{let t="unknown:0",n=e;for(;n;){const h=n.getAttribute("data-source-path");if(h){t=h;break}n=n.parentElement}const r=bn(e),a=[],s=[],i=(h=>{const w=[];let y=h;for(;y&&y.nodeType===Node.ELEMENT_NODE;){let S=y.nodeName.toLowerCase();s.unshift(S);const V=y.id&&!y.id.startsWith("__")?y.id:null;V&&a.push(`#${V}`);const L=y.getAttribute("data-testid")||y.getAttribute("data-qa");L&&a.push(`[data-testid="${L}"]`);const I=y.getAttribute("aria-label"),T=y.getAttribute("role"),N=y.getAttribute("name");if(L){S=`[${y.hasAttribute("data-testid")?"data-testid":"data-qa"}="${L}"]`,w.unshift(S);break}else if(V){S="#"+V,w.unshift(S);break}else if(I){S=`${y.localName}[aria-label="${I}"]`,w.unshift(S);break}else if(T){S=`${y.localName}[role="${T}"]`,w.unshift(S);break}else if(N){S=`${y.localName}[name="${N}"]`,w.unshift(S);break}else{let E=y,$=1;for(;E.previousElementSibling;)E=E.previousElementSibling,E.nodeName.toLowerCase()===y.nodeName.toLowerCase()&&$++;$>1&&(S+=`:nth-of-type(${$})`)}w.unshift(S),y=y.parentElement}return w.join(" > ")})(e),u={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(h=>{const w=e.getAttribute(h);w&&(u[h]=w)});const f=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${i.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:i,outerHtml:e.outerHTML,parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:r,signature:f,source:t,attributes:u,fallbackSelectors:[...new Set(a)].slice(0,5),domPath:s.slice(-10),viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:En(e),fingerprint:yn(e),metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`,computedStyles:vn(e),viewportBreakpoint:fn(),outerHtml:e.outerHTML.slice(0,1500),scrollPosition:{x:window.scrollX,y:window.scrollY}}}},Xe=()=>{const{addToast:e,language:t,t:n,apiKey:r,baseUrl:a}=Ve(),[s,o]=m.useState(!1),[i,u]=m.useState(null),[f,h]=m.useState(null),[w,y]=m.useState(""),[S,V]=m.useState(!1),[L,I]=m.useState(!1),[T,N]=m.useState(!1),[E,$]=m.useState([]),[P,z]=m.useState(null),[Je,Ze]=m.useState(!1),[q,ce]=m.useState(!1),[ve,X]=m.useState({}),[M,ee]=m.useState(null),[J,Z]=m.useState(null),[te,ne]=m.useState(""),[le,de]=m.useState({}),l=m.useRef(null),p=m.useRef(null),v=m.useCallback(()=>{p.current||(p.current=requestAnimationFrame(()=>{const d={};E.forEach(g=>{if(!g.reference)return;const x=Cn(g.reference);if(x){const A=x.getBoundingClientRect();d[g._id]={top:A.top+window.scrollY,left:A.left+window.scrollX,width:A.width}}}),de(d),p.current=null}))},[E]),b=m.useCallback(async()=>{if(r){ce(!0);try{const d=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":r}});if(d.ok){const g=await d.json();$(g.data||[])}}catch(d){console.error("Failed to fetch annotations",d)}finally{ce(!1)}}},[r,a]);m.useEffect(()=>{if(!s&&E.length>0){v();const d=new MutationObserver(()=>v()),g=new ResizeObserver(()=>v()),x=()=>v();return d.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),g.observe(document.documentElement),window.addEventListener("scroll",x,!0),()=>{d.disconnect(),g.disconnect(),window.removeEventListener("scroll",x,!0),p.current&&cancelAnimationFrame(p.current)}}},[s,E.length,v]),m.useEffect(()=>{b()},[b]),m.useEffect(()=>{l.current=document.getElementById("viewgate-shadow-host")},[]);const D=m.useCallback(d=>{if(!s||f)return;const g=document.elementFromPoint(d.clientX,d.clientY);if(!g||l.current?.contains(g)||g.closest(".vg-no-capture")){u(null);return}const x=g.getBoundingClientRect();u({tag:g.tagName.toLowerCase(),source:g.getAttribute("data-source-path")||"unknown:0",rect:x,element:g,previewText:(g.innerText||"").slice(0,100)||(g.getAttribute("placeholder")||"").slice(0,100)||g.tagName.toLowerCase(),semanticReference:{...kn(g),normalizedOffset:{x:(d.clientX-x.left)/x.width,y:(d.clientY-x.top)/x.height}}})},[s,f]),W=m.useCallback(async d=>{if(!s||f)return;const g=d.target;if(!(l.current?.contains(g)||g.closest(".vg-no-capture"))&&i){d.preventDefault(),d.stopPropagation(),I(!0);try{const x=i.element.getBoundingClientRect(),A=24,H=2,G=await dn(document.body,{quality:.95,pixelRatio:H,filter:re=>!l.current?.contains(re)}),k=await wn(G,x,A,H),Ke={...i.semanticReference,metadata:{...i.semanticReference.metadata,screenshotUrl:G,elementScreenshot:k}};h({...i,visualPreview:k,semanticReference:Ke})}catch(x){console.error("Failed to capture preview:",x),h(i)}finally{I(!1),u(null)}}},[s,i,f]);m.useEffect(()=>{const d=g=>{if(g.key==="Escape"){f?h(null):T?N(!1):s&&o(!1);return}const A=(()=>{let k=document.activeElement;for(;k&&k.shadowRoot&&k.shadowRoot.activeElement;)k=k.shadowRoot.activeElement;return k})();if(["input","textarea"].includes((A?.tagName||"").toLowerCase())||A?.isContentEditable)return;const G=g.key.toLowerCase();G==="c"&&!f&&!T&&o(k=>!k),G==="v"&&!f&&(N(k=>!k),T||o(!1))};return s&&!f?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",d),window.addEventListener("mousemove",D,!0),window.addEventListener("click",W,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",d),window.removeEventListener("mousemove",D,!0),window.removeEventListener("click",W,!0)}},[s,f,T,D,W]);const C=async()=>{if(!f||!w.trim())return;V(!0);const{semanticReference:d}=f,[g,x]=(d.source||"").split(":"),A=x||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({filePath:g,line:parseInt(A),url:window.location.href,message:w,componentName:d.componentPath||f.tag,reference:{...d,viewport:{width:window.innerWidth,height:window.innerHeight},userAgent:navigator.userAgent,timestamp:new Date().toISOString()}})})).ok)throw new Error("Backend failed");e(n.success,"success"),h(null),y(""),o(!1),b()}catch(H){console.error(H),e(n.error,"error")}finally{V(!1)}};return c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:710",className:"vg-container",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:711",className:"vg-no-capture",children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:713",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:Ye},id:"viewgate-ui",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:714",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[c.jsx("button",{onClick:()=>o(!s),className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:s?"#ef4444":void 0},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:723",style:{display:"flex",alignItems:"center",gap:"10px"},children:[s?c.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:724",size:20,className:"vg-animate-pop"}):c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:724",size:20,className:"vg-animate-pop"}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:725",children:s?n.exitMode:n.enterMode})]})}),E.length>0&&c.jsxs("button",{onClick:()=>{N(!T),o(!1),h(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[c.jsx(dt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:738",size:20}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:739",children:n.viewComments})]})]})}),L&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:747",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ye+1,cursor:"wait"},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:753",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:754",className:"vg-spinner"}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:755",style:{fontWeight:600,fontSize:"14px",color:"#1e293b"},children:"Capturando..."})]})}),s&&!f&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:762",className:"vg-backdrop-blur",style:{opacity:1,clipPath:i?`polygon(
|
|
9
9
|
0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
|
|
10
10
|
${i.rect.left}px ${i.rect.top}px,
|
|
11
11
|
${i.rect.right}px ${i.rect.top}px,
|
|
12
12
|
${i.rect.right}px ${i.rect.bottom}px,
|
|
13
13
|
${i.rect.left}px ${i.rect.bottom}px,
|
|
14
14
|
${i.rect.left}px ${i.rect.top}px
|
|
15
|
-
)`:"none",zIndex:un}}),s&&i&&!f&&!L&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:779",className:"vg-selection-pulse",style:{top:i.rect.top-4,left:i.rect.left-4,width:i.rect.width+8,height:i.rect.height+8,zIndex:pn},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:789",className:"vg-selection-label",style:{...i.rect.top<60?i.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...i.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[c.jsx(ut,{"data-source-path":"/src/components/ViewGateOverlay.tsx:805",size:16}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:806",style:{display:"flex",flexDirection:"column"},children:[c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:807",style:{fontWeight:700},children:n.selectToComment}),c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:808",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(i.rect.width)," × ",Math.round(i.rect.height)]})]})]})}),f&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:818",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:823",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"500px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:827",style:{textAlign:"center",marginBottom:"32px"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:828",style:{width:"48px",height:"48px",background:"var(--vg-primary-gradient)",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",color:"white",boxShadow:"0 8px 16px rgba(99, 102, 241, 0.3)"},children:c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:833",size:24})}),c.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:835",style:{margin:"0 0 8px 0",fontSize:"24px",fontWeight:800,color:"#0f172a"},children:n.feedbackHeader}),c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:836",style:{margin:0,color:"#64748b",fontSize:"15px"},children:n.feedbackSubheader})]}),f.visualPreview&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:840",style:{marginBottom:"24px",borderRadius:"12px",overflow:"hidden",border:"1px solid #e2e8f0",background:"#f8fafc"},children:c.jsx("img",{src:f.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"200px",objectFit:"contain",display:"block",margin:"0 auto"}})}),c.jsx("textarea",{className:"vg-textarea",value:w,onChange:d=>y(d.target.value),rows:4,placeholder:n.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px"}}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:859",style:{display:"flex",gap:"12px"},children:[c.jsx("button",{onClick:()=>h(null),className:"vg-button-ghost",style:{flex:1,padding:"12px"},children:n.cancel}),c.jsx("button",{onClick:C,className:"vg-button-primary",disabled:S||!w.trim(),style:{flex:2},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:873",style:{display:"flex",alignItems:"center",gap:"8px"},children:[S?c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:874",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):c.jsx(ft,{"data-source-path":"/src/components/ViewGateOverlay.tsx:874",size:18}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:875",children:S?n.submitting:n.sendFeedback||"Send Comment"})]})})]})]})}),T&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:885",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:890",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"650px",maxHeight:"85vh",display:"flex",flexDirection:"column"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:894",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:895",style:{display:"flex",alignItems:"center",gap:"12px"},children:[c.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:896",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a"},children:M?n.commentDetails:n.annotations}),!M&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:900",className:"vg-badge",style:{background:"#e0e7ff",color:"#6366f1"},children:E.length})]}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:905",style:{display:"flex",gap:"8px"},children:[M&&c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:907",className:"vg-button-ghost",style:{padding:"6px 14px",fontSize:"12px"},onClick:()=>ee(null),children:n.viewAll||"View All"}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:915",className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{N(!1),ee(null)},children:c.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:920",size:20})})]})]}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:925",style:{maxHeight:"60vh",overflowY:"auto",paddingRight:"10px"},className:"vg-custom-scrollbar",children:q?c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:927",style:{display:"flex",justifyContent:"center",padding:"40px"},children:c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:928",className:"vg-spinner"})}):(M?E.filter(d=>d._id===M):E).map((d,g)=>c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:932",className:"vg-glassmorphism vg-animate-slide",style:{padding:"20px",marginBottom:"16px",border:"1px solid rgba(0,0,0,0.05)",background:"rgba(255,255,255,0.5)",animationDelay:`${g*.05}s`},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:943",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:944",style:{display:"flex",gap:"12px",alignItems:"center"},children:[d.status==="ready_for_review"?c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:946",className:"vg-badge",style:{backgroundColor:"#f0fdf4",color:"#16a34a"},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:947",size:14})," ",n.readyForReview]}):c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:950",className:"vg-badge",style:{backgroundColor:"#fff7ed",color:"#ea580c"},children:[c.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:951",size:14})," ",n.pending]}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:954",style:{fontSize:"12px",color:"#94a3b8"},children:gn(d.timestamp||d.createdAt||d.reference?.timestamp,t)})]})}),J===d._id?c.jsx("textarea",{className:"vg-textarea",value:te,onChange:x=>ne(x.target.value),rows:3,autoFocus:!0,style:{marginBottom:"16px"}}):c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:970",style:{margin:"0 0 20px 0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:d.message}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:973",style:{display:"flex",gap:"12px",justifyContent:"flex-end",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:J===d._id?c.jsxs(c.Fragment,{children:[c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:976",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({message:te})})).ok&&(Z(null),b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}},children:n.save}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:998",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>Z(null),children:n.cancel})]}):c.jsxs(c.Fragment,{children:[c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1002",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>{Z(d._id),ne(d.message)},children:[c.jsx(pt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1010",size:14})," ",n.edit]}),c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1012",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.05s"},onClick:()=>{d.url&&(window.location.href=d.url)},children:[c.jsx(lt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1019",size:14})," ",n.review]}),d.status==="pending"?c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1022",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.markReadyConfirm,message:n.confirmMarkReady,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"ready_for_review"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1050",size:14})," ",n.markReady]}):c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1053",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.reopenConfirm,message:n.confirmReopen,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"pending"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[c.jsx(mt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1081",size:14})," ",n.reopen]}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1084",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 12px",color:"#ef4444",borderColor:"#fee2e2",animationDelay:"0.15s"},onClick:()=>{z({title:n.deleteConfirm,message:n.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"DELETE",headers:{"x-api-key":r}})).ok&&(b(),e(n.deleteSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:c.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1111",size:16})})]})})]},d._id))})]})}),P&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1126",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge+1},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1131",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",textAlign:"center"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1132",style:{width:"48px",height:"48px",background:P.type==="danger"?"#fee2e2":"#e0e7ff",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px",color:P.type==="danger"?"#ef4444":"#6366f1"},children:P.type==="danger"?c.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1140",size:24}):c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1140",size:24})}),c.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1142",style:{margin:"0 0 8px 0",fontSize:"18px",fontWeight:800,color:"#0f172a"},children:P.title}),c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1143",style:{margin:"0 0 24px 0",fontSize:"14px",color:"#64748b",lineHeight:1.5},children:P.message}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1144",style:{display:"flex",gap:"12px"},children:[c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1145",className:"vg-button-ghost",style:{flex:1},onClick:()=>z(null),children:n.no}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1146",className:"vg-button-primary",style:{flex:1,backgroundColor:P.type==="danger"?"#ef4444":void 0,backgroundImage:P.type==="danger"?"none":void 0},onClick:P.onConfirm,children:n.yes})]})]})}),!s&&E.map((d,g)=>{const x=le[d._id];if(!x)return null;const H=E.slice(0,g).filter(G=>G.reference?.selector&&G.reference.selector===d.reference?.selector).length*34;return c.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:x.top-20-window.scrollY,left:x.left+x.width/2-16+H-window.scrollX,cursor:"pointer",animationDelay:`${g*.08}s`,transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:mn-g},onMouseEnter:G=>{const k=G.currentTarget.getBoundingClientRect();window.innerHeight-k.bottom<180?X(re=>({...re,[d._id]:"vg-top"})):X(re=>({...re,[d._id]:""}))},onClick:()=>{N(!0),ee(d._id)},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1201",className:`vg-pin-tooltip ${ve[d._id]||""}`,children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1202",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:d.status==="ready_for_review"?c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1204",style:{display:"flex",alignItems:"center",gap:"6px",color:"#16a34a",fontWeight:700,fontSize:"11px"},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1205",size:12})," ",n.readyForReview]}):c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1208",style:{display:"flex",alignItems:"center",gap:"6px",color:"#ea580c",fontWeight:700,fontSize:"11px"},children:[c.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1209",size:12})," ",n.pending]})}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1213",style:{fontWeight:500,color:"#1e293b",lineHeight:1.4},children:d.message})]}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1216",className:`vg-formal-pin ${d.status==="ready_for_review"?"ready":""}`,children:d.status==="ready_for_review"?c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1217",size:18}):c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1217",size:16})})]},`pin-${d._id}`)})]})})};function we(e,t,n){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const r=i=>i.replace(/\\/g,"/"),a=r(t).replace(r(n),"");return e.split(`
|
|
15
|
+
)`:"none",zIndex:un}}),s&&i&&!f&&!L&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:781",className:"vg-selection-pulse",style:{top:i.rect.top-4,left:i.rect.left-4,width:i.rect.width+8,height:i.rect.height+8,zIndex:pn},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:791",className:"vg-selection-label",style:{...i.rect.top<60?i.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...i.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[c.jsx(ut,{"data-source-path":"/src/components/ViewGateOverlay.tsx:807",size:16}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:808",style:{display:"flex",flexDirection:"column"},children:[c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:809",style:{fontWeight:700},children:n.selectToComment}),c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:810",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(i.rect.width)," × ",Math.round(i.rect.height)]})]})]})}),f&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:820",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:825",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"500px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:829",style:{textAlign:"center",marginBottom:"32px"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:830",style:{width:"48px",height:"48px",background:"var(--vg-primary-gradient)",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",color:"white",boxShadow:"0 8px 16px rgba(99, 102, 241, 0.3)"},children:c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:835",size:24})}),c.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:837",style:{margin:"0 0 8px 0",fontSize:"24px",fontWeight:800,color:"#0f172a"},children:n.feedbackHeader}),c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:838",style:{margin:0,color:"#64748b",fontSize:"15px"},children:n.feedbackSubheader})]}),f.visualPreview&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:842",style:{marginBottom:"24px",borderRadius:"12px",overflow:"hidden",border:"1px solid #e2e8f0",background:"#f8fafc"},children:c.jsx("img",{src:f.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"200px",objectFit:"contain",display:"block",margin:"0 auto"}})}),c.jsx("textarea",{className:"vg-textarea",value:w,onChange:d=>y(d.target.value),rows:4,placeholder:n.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px"}}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:861",style:{display:"flex",gap:"12px"},children:[c.jsx("button",{onClick:()=>h(null),className:"vg-button-ghost",style:{flex:1,padding:"12px"},children:n.cancel}),c.jsx("button",{onClick:C,className:"vg-button-primary",disabled:S||!w.trim(),style:{flex:2},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:875",style:{display:"flex",alignItems:"center",gap:"8px"},children:[S?c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:876",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):c.jsx(ft,{"data-source-path":"/src/components/ViewGateOverlay.tsx:876",size:18}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:877",children:S?n.submitting:n.sendFeedback||"Send Comment"})]})})]})]})}),T&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:887",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:892",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"650px",maxHeight:"85vh",display:"flex",flexDirection:"column"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:896",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:897",style:{display:"flex",alignItems:"center",gap:"12px"},children:[c.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:898",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a"},children:M?n.commentDetails:n.annotations}),!M&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:902",className:"vg-badge",style:{background:"#e0e7ff",color:"#6366f1"},children:E.length})]}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:907",style:{display:"flex",gap:"8px"},children:[M&&c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:909",className:"vg-button-ghost",style:{padding:"6px 14px",fontSize:"12px"},onClick:()=>ee(null),children:n.viewAll||"View All"}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:917",className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{N(!1),ee(null)},children:c.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:922",size:20})})]})]}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:927",style:{maxHeight:"60vh",overflowY:"auto",paddingRight:"10px"},className:"vg-custom-scrollbar",children:q?c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:929",style:{display:"flex",justifyContent:"center",padding:"40px"},children:c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:930",className:"vg-spinner"})}):(M?E.filter(d=>d._id===M):E).map((d,g)=>c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:934",className:"vg-glassmorphism vg-animate-slide",style:{padding:"20px",marginBottom:"16px",border:"1px solid rgba(0,0,0,0.05)",background:"rgba(255,255,255,0.5)",animationDelay:`${g*.05}s`},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:945",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:946",style:{display:"flex",gap:"12px",alignItems:"center"},children:[d.status==="ready_for_review"?c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:948",className:"vg-badge",style:{backgroundColor:"#f0fdf4",color:"#16a34a"},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:949",size:14})," ",n.readyForReview]}):c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:952",className:"vg-badge",style:{backgroundColor:"#fff7ed",color:"#ea580c"},children:[c.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:953",size:14})," ",n.pending]}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:956",style:{fontSize:"12px",color:"#94a3b8"},children:gn(d.timestamp||d.createdAt||d.reference?.timestamp,t)})]})}),J===d._id?c.jsx("textarea",{className:"vg-textarea",value:te,onChange:x=>ne(x.target.value),rows:3,autoFocus:!0,style:{marginBottom:"16px"}}):c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:972",style:{margin:"0 0 20px 0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:d.message}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:975",style:{display:"flex",gap:"12px",justifyContent:"flex-end",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:J===d._id?c.jsxs(c.Fragment,{children:[c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:978",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({message:te})})).ok&&(Z(null),b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}},children:n.save}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1000",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>Z(null),children:n.cancel})]}):c.jsxs(c.Fragment,{children:[c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1004",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>{Z(d._id),ne(d.message)},children:[c.jsx(pt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1012",size:14})," ",n.edit]}),c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1014",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.05s"},onClick:()=>{d.url&&(window.location.href=d.url)},children:[c.jsx(lt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1021",size:14})," ",n.review]}),d.status==="pending"?c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1024",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.markReadyConfirm,message:n.confirmMarkReady,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"ready_for_review"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1052",size:14})," ",n.markReady]}):c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1055",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.reopenConfirm,message:n.confirmReopen,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"pending"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[c.jsx(mt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1083",size:14})," ",n.reopen]}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1086",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 12px",color:"#ef4444",borderColor:"#fee2e2",animationDelay:"0.15s"},onClick:()=>{z({title:n.deleteConfirm,message:n.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"DELETE",headers:{"x-api-key":r}})).ok&&(b(),e(n.deleteSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:c.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1113",size:16})})]})})]},d._id))})]})}),P&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1128",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge+1},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1133",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",textAlign:"center"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1134",style:{width:"48px",height:"48px",background:P.type==="danger"?"#fee2e2":"#e0e7ff",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px",color:P.type==="danger"?"#ef4444":"#6366f1"},children:P.type==="danger"?c.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1142",size:24}):c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1142",size:24})}),c.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1144",style:{margin:"0 0 8px 0",fontSize:"18px",fontWeight:800,color:"#0f172a"},children:P.title}),c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1145",style:{margin:"0 0 24px 0",fontSize:"14px",color:"#64748b",lineHeight:1.5},children:P.message}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1146",style:{display:"flex",gap:"12px"},children:[c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1147",className:"vg-button-ghost",style:{flex:1},onClick:()=>z(null),children:n.no}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1148",className:"vg-button-primary",style:{flex:1,backgroundColor:P.type==="danger"?"#ef4444":void 0,backgroundImage:P.type==="danger"?"none":void 0},onClick:P.onConfirm,children:n.yes})]})]})}),!s&&E.map((d,g)=>{const x=le[d._id];if(!x)return null;const H=E.slice(0,g).filter(G=>G.reference?.selector&&G.reference.selector===d.reference?.selector).length*34;return c.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:x.top-20-window.scrollY,left:x.left+x.width/2-16+H-window.scrollX,cursor:"pointer",animationDelay:`${g*.08}s`,transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:mn-g},onMouseEnter:G=>{const k=G.currentTarget.getBoundingClientRect();window.innerHeight-k.bottom<180?X(re=>({...re,[d._id]:"vg-top"})):X(re=>({...re,[d._id]:""}))},onClick:()=>{N(!0),ee(d._id)},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1203",className:`vg-pin-tooltip ${ve[d._id]||""}`,children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1204",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:d.status==="ready_for_review"?c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1206",style:{display:"flex",alignItems:"center",gap:"6px",color:"#16a34a",fontWeight:700,fontSize:"11px"},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1207",size:12})," ",n.readyForReview]}):c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1210",style:{display:"flex",alignItems:"center",gap:"6px",color:"#ea580c",fontWeight:700,fontSize:"11px"},children:[c.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1211",size:12})," ",n.pending]})}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1215",style:{fontWeight:500,color:"#1e293b",lineHeight:1.4},children:d.message})]}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1218",className:`vg-formal-pin ${d.status==="ready_for_review"?"ready":""}`,children:d.status==="ready_for_review"?c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1219",size:18}):c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1219",size:16})})]},`pin-${d._id}`)})]})})};function we(e,t,n){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const r=i=>i.replace(/\\/g,"/"),a=r(t).replace(r(n),"");return e.split(`
|
|
16
16
|
`).map((i,u)=>{const f=u+1;return i.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(h,w,y)=>h.includes("data-source-path")||y==="Fragment"||y==="React.Fragment"?h:`${w}<${y} data-source-path="${a}:${f}"`)}).join(`
|
|
17
17
|
`)}function Rn(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:we(e,t,process.cwd()),map:null}}}}function _n(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,we(e,t,process.cwd())):e}_.ViewGate=gt,_.ViewGateOverlay=Xe,_.transformSourcePaths=we,_.useViewGate=Ve,_.viewgateNextLoader=_n,_.viewgatePlugin=Rn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
|