viewgate-wrapper 1.8.1 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ViewGateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ViewGateOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,wBAAwB,CAAC;AA+GhC,eAAO,MAAM,eAAe,EAAE,EA2kB7B,CAAC"}
1
+ {"version":3,"file":"ViewGateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ViewGateOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,wBAAwB,CAAC;AA+GhC,eAAO,MAAM,eAAe,EAAE,EAslB7B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import Ae, { createContext as Ge, useState as C, useContext as $e, useCallback as ae, useEffect as ue } from "react";
2
+ import Ae, { createContext as Ge, useState as S, useContext as $e, useCallback as ae, useEffect as ue } from "react";
3
3
  var J = { exports: {} }, z = {};
4
4
  var de;
5
5
  function Le() {
@@ -330,7 +330,7 @@ const Ne = {
330
330
  if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
331
331
  return e;
332
332
  }, Ft = ({ children: e, language: t = "es", apiKey: r, baseUrl: n = "https://view-gate.vercel.app" }) => {
333
- const [a, s] = C([]), i = (u, d) => {
333
+ const [a, s] = S([]), i = (u, d) => {
334
334
  const m = Date.now();
335
335
  s((g) => [...g, { id: m, message: u, type: d }]), setTimeout(() => {
336
336
  s((g) => g.filter((y) => y.id !== m));
@@ -388,7 +388,7 @@ function We(e) {
388
388
  const t = X(e, "border-top-width"), r = X(e, "border-bottom-width");
389
389
  return e.clientHeight + t + r;
390
390
  }
391
- function Se(e, t = {}) {
391
+ function Ce(e, t = {}) {
392
392
  const r = t.width || ze(e), n = t.height || We(e);
393
393
  return { width: r, height: n };
394
394
  }
@@ -401,9 +401,9 @@ function Ue() {
401
401
  const r = t && t.env ? t.env.devicePixelRatio : null;
402
402
  return r && (e = parseInt(r, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
403
403
  }
404
- const S = 16384;
404
+ const C = 16384;
405
405
  function Ye(e) {
406
- (e.width > S || e.height > S) && (e.width > S && e.height > S ? e.width > e.height ? (e.height *= S / e.width, e.width = S) : (e.width *= S / e.height, e.height = S) : e.width > S ? (e.height *= S / e.width, e.width = S) : (e.width *= S / e.height, e.height = S));
406
+ (e.width > C || e.height > C) && (e.width > C && e.height > C ? e.width > e.height ? (e.height *= C / e.width, e.width = C) : (e.width *= C / e.height, e.height = C) : e.width > C ? (e.height *= C / e.width, e.width = C) : (e.width *= C / e.height, e.height = C));
407
407
  }
408
408
  function Z(e) {
409
409
  return new Promise((t, r) => {
@@ -488,7 +488,7 @@ function ie(e) {
488
488
  function rt(e, t) {
489
489
  return `data:${t};base64,${e}`;
490
490
  }
491
- async function Ce(e, t, r) {
491
+ async function Se(e, t, r) {
492
492
  const n = await fetch(e, t);
493
493
  if (n.status === 404)
494
494
  throw new Error(`Resource "${n.url}" not found`);
@@ -516,7 +516,7 @@ async function le(e, t, r) {
516
516
  r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
517
517
  let a;
518
518
  try {
519
- const s = await Ce(e, r.fetchRequestInit, ({ res: i, result: c }) => (t || (t = i.headers.get("Content-Type") || ""), tt(c)));
519
+ const s = await Se(e, r.fetchRequestInit, ({ res: i, result: c }) => (t || (t = i.headers.get("Content-Type") || ""), tt(c)));
520
520
  a = rt(s, t);
521
521
  } catch (s) {
522
522
  a = r.imagePlaceholder || "";
@@ -677,14 +677,14 @@ async function Et(e, t) {
677
677
  c.decode && (c.decode = s), c.loading === "lazy" && (c.loading = "eager"), r ? (e.srcset = "", e.src = a) : e.href.baseVal = a;
678
678
  });
679
679
  }
680
- async function St(e, t) {
680
+ async function Ct(e, t) {
681
681
  const n = j(e.childNodes).map((a) => Oe(a, t));
682
682
  await Promise.all(n).then(() => e);
683
683
  }
684
684
  async function Oe(e, t) {
685
- b(e, Element) && (await bt(e, t), await Et(e, t), await St(e, t));
685
+ b(e, Element) && (await bt(e, t), await Et(e, t), await Ct(e, t));
686
686
  }
687
- function Ct(e, t) {
687
+ function St(e, t) {
688
688
  const { style: r } = e;
689
689
  t.backgroundColor && (r.backgroundColor = t.backgroundColor), t.width && (r.width = `${t.width}px`), t.height && (r.height = `${t.height}px`);
690
690
  const n = t.style;
@@ -704,7 +704,7 @@ async function we(e, t) {
704
704
  let r = e.cssText;
705
705
  const n = /url\(["']?([^"')]+)["']?\)/g, s = (r.match(/url\([^)]+\)/g) || []).map(async (i) => {
706
706
  let c = i.replace(n, "$1");
707
- return c.startsWith("https://") || (c = new URL(c, e.url).href), Ce(c, t.fetchRequestInit, ({ result: u }) => (r = r.replace(i, `url(${u})`), [i, u]));
707
+ return c.startsWith("https://") || (c = new URL(c, e.url).href), Se(c, t.fetchRequestInit, ({ result: u }) => (r = r.replace(i, `url(${u})`), [i, u]));
708
708
  });
709
709
  return Promise.all(s).then(() => r);
710
710
  }
@@ -815,11 +815,11 @@ async function Pt(e, t) {
815
815
  }
816
816
  }
817
817
  async function _t(e, t = {}) {
818
- const { width: r, height: n } = Se(e, t), a = await K(e, t, !0);
819
- return await Pt(a, t), await Oe(a, t), Ct(a, t), await Be(a, r, n);
818
+ const { width: r, height: n } = Ce(e, t), a = await K(e, t, !0);
819
+ return await Pt(a, t), await Oe(a, t), St(a, t), await Be(a, r, n);
820
820
  }
821
821
  async function Vt(e, t = {}) {
822
- const { width: r, height: n } = Se(e, t), a = await _t(e, t), s = await Z(a), i = document.createElement("canvas"), c = i.getContext("2d"), u = t.pixelRatio || Ue(), d = t.canvasWidth || r, m = t.canvasHeight || n;
822
+ const { width: r, height: n } = Ce(e, t), a = await _t(e, t), s = await Z(a), i = document.createElement("canvas"), c = i.getContext("2d"), u = t.pixelRatio || Ue(), d = t.canvasWidth || r, m = t.canvasHeight || n;
823
823
  return i.width = d * u, i.height = m * u, t.skipAutoScale || Ye(i), i.style.width = `${d}`, i.style.height = `${m}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, i.width, i.height)), c.drawImage(s, 0, 0, i.width, i.height), i;
824
824
  }
825
825
  async function At(e, t = {}) {
@@ -890,7 +890,7 @@ const Gt = (e) => {
890
890
  }
891
891
  };
892
892
  }, Lt = () => {
893
- const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, m] = C(null), [g, y] = C(""), [E, R] = C(!1), [U, P] = C(!1), [F, Y] = C(!1), [N, Q] = C([]), [_, D] = C(null), [ee, te] = C(!1), [M, q] = C(!1), k = ae(async () => {
893
+ const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = S(!1), [c, u] = S(null), [d, m] = S(null), [g, y] = S(""), [E, R] = S(!1), [U, P] = S(!1), [F, Y] = S(!1), [N, Q] = S([]), [_, D] = S(null), [ee, te] = S(!1), [M, q] = S(!1), k = ae(async () => {
894
894
  if (n) {
895
895
  q(!0);
896
896
  try {
@@ -1090,20 +1090,29 @@ const Gt = (e) => {
1090
1090
  maxHeight: "200px",
1091
1091
  overflow: "hidden",
1092
1092
  backgroundColor: "#fdfdfd"
1093
- }, children: d.visualPreview ? /* @__PURE__ */ l.jsx(
1093
+ }, children: d.visualPreview ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:419", style: {
1094
+ position: "relative",
1095
+ width: "100%",
1096
+ height: "100%",
1097
+ display: "flex",
1098
+ alignItems: "center",
1099
+ justifyContent: "center"
1100
+ }, children: /* @__PURE__ */ l.jsx(
1094
1101
  "img",
1095
1102
  {
1096
1103
  src: d.visualPreview,
1097
1104
  alt: "Element Preview",
1098
1105
  style: {
1099
- maxWidth: "100%",
1100
- maxHeight: "120px",
1106
+ maxWidth: "90%",
1107
+ maxHeight: "160px",
1101
1108
  objectFit: "contain",
1102
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
1103
- borderRadius: "4px"
1109
+ boxShadow: "0 4px 12px rgba(0,0,0,0.12)",
1110
+ borderRadius: "6px",
1111
+ border: "1px solid #e2e8f0",
1112
+ backgroundColor: "white"
1104
1113
  }
1105
1114
  }
1106
- ) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:431", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic" }, children: [
1115
+ ) }) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:442", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic", textAlign: "center", padding: "0 20px" }, children: [
1107
1116
  '"',
1108
1117
  d.previewText,
1109
1118
  '"'
@@ -1120,7 +1129,7 @@ const Gt = (e) => {
1120
1129
  autoFocus: !0
1121
1130
  }
1122
1131
  ),
1123
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:447", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1132
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:458", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1124
1133
  /* @__PURE__ */ l.jsx(
1125
1134
  "button",
1126
1135
  {
@@ -1141,7 +1150,7 @@ const Gt = (e) => {
1141
1150
  )
1142
1151
  ] })
1143
1152
  ] }) }),
1144
- F && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:469", className: "vg-animate-fade", style: {
1153
+ F && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:480", className: "vg-animate-fade", style: {
1145
1154
  position: "fixed",
1146
1155
  top: 0,
1147
1156
  left: 0,
@@ -1153,7 +1162,7 @@ const Gt = (e) => {
1153
1162
  alignItems: "center",
1154
1163
  justifyContent: "center",
1155
1164
  zIndex: 99999
1156
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:482", className: "vg-glassmorphism vg-animate-slide", style: {
1165
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:493", className: "vg-glassmorphism vg-animate-slide", style: {
1157
1166
  padding: "32px",
1158
1167
  width: "600px",
1159
1168
  maxHeight: "80vh",
@@ -1162,40 +1171,46 @@ const Gt = (e) => {
1162
1171
  display: "flex",
1163
1172
  flexDirection: "column"
1164
1173
  }, children: [
1165
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:491", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1166
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:492", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1167
- /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:493", onClick: () => Y(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1174
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:502", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1175
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:503", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1176
+ /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:504", onClick: () => Y(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1168
1177
  ] }),
1169
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:496", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: M ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:498", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : N.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:500", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : N.map((p) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:503", style: {
1178
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:507", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: M ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:509", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : N.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:511", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : N.map((p) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:514", style: {
1170
1179
  border: "1px solid #e2e8f0",
1171
1180
  borderRadius: "12px",
1172
1181
  padding: "16px",
1173
1182
  backgroundColor: p.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1174
1183
  }, children: [
1175
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:509", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:510", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1176
- p.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:512", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1184
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:520", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:521", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1185
+ p.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:523", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1177
1186
  "✓ ",
1178
1187
  r.readyForReview
1179
- ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:514", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1188
+ ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:525", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1180
1189
  "⏳ ",
1181
1190
  r.pending
1182
1191
  ] }),
1183
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:516", style: { fontSize: "12px", color: "#64748b" }, children: new Date(p.timestamp).toLocaleString() })
1192
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:527", style: { fontSize: "12px", color: "#64748b" }, children: new Date(p.timestamp).toLocaleString() })
1184
1193
  ] }) }),
1185
- /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:522", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1194
+ /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:533", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1186
1195
  '"',
1187
1196
  p.message,
1188
1197
  '"'
1189
1198
  ] }),
1190
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:524", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1191
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:525", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: p.componentName || "UI Element" }),
1192
- p.filePath && p.filePath !== "unknown" && /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:529", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: A(p.filePath) })
1199
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:535", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1200
+ /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:536", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
1201
+ "📦 ",
1202
+ p.componentName?.split(" > ").pop() || "UI Element"
1203
+ ] }),
1204
+ p.filePath && p.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:540", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
1205
+ "📄 ",
1206
+ A(p.filePath)
1207
+ ] })
1193
1208
  ] }),
1194
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:535", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1209
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:546", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1195
1210
  p.status === "pending" ? /* @__PURE__ */ l.jsxs(
1196
1211
  "button",
1197
1212
  {
1198
- "data-source-path": "/src/components/ViewGateOverlay.tsx:537",
1213
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:548",
1199
1214
  className: "vg-button-primary",
1200
1215
  style: { display: "flex", alignItems: "center", gap: "6px" },
1201
1216
  onClick: async () => {
@@ -1217,7 +1232,7 @@ const Gt = (e) => {
1217
1232
  ) : /* @__PURE__ */ l.jsxs(
1218
1233
  "button",
1219
1234
  {
1220
- "data-source-path": "/src/components/ViewGateOverlay.tsx:559",
1235
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:570",
1221
1236
  className: "vg-button-ghost",
1222
1237
  style: { display: "flex", alignItems: "center", gap: "6px" },
1223
1238
  onClick: async () => {
@@ -1240,7 +1255,7 @@ const Gt = (e) => {
1240
1255
  /* @__PURE__ */ l.jsxs(
1241
1256
  "button",
1242
1257
  {
1243
- "data-source-path": "/src/components/ViewGateOverlay.tsx:582",
1258
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:593",
1244
1259
  className: "vg-button-ghost",
1245
1260
  style: { display: "flex", alignItems: "center", gap: "6px" },
1246
1261
  onClick: () => {
@@ -1257,7 +1272,7 @@ const Gt = (e) => {
1257
1272
  /* @__PURE__ */ l.jsxs(
1258
1273
  "button",
1259
1274
  {
1260
- "data-source-path": "/src/components/ViewGateOverlay.tsx:597",
1275
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:608",
1261
1276
  className: "vg-button-primary",
1262
1277
  style: { backgroundColor: "#ef4444", display: "flex", alignItems: "center", gap: "6px" },
1263
1278
  onClick: () => {
@@ -1287,7 +1302,7 @@ const Gt = (e) => {
1287
1302
  ] })
1288
1303
  ] }, p._id)) })
1289
1304
  ] }) }),
1290
- ee && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:636", style: {
1305
+ ee && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:647", style: {
1291
1306
  position: "fixed",
1292
1307
  top: 0,
1293
1308
  left: 0,
@@ -1300,11 +1315,11 @@ const Gt = (e) => {
1300
1315
  zIndex: 3e5,
1301
1316
  backdropFilter: "blur(10px)",
1302
1317
  color: "white"
1303
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:650", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
1304
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:651", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
1305
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:652", style: { fontSize: "18px", fontWeight: 600, letterSpacing: "0.5px" }, children: r.navigating })
1318
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:661", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
1319
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:662", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
1320
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:663", style: { fontSize: "18px", fontWeight: 600, letterSpacing: "0.5px" }, children: r.navigating })
1306
1321
  ] }) }),
1307
- _ && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:659", className: "vg-animate-fade", style: {
1322
+ _ && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:670", className: "vg-animate-fade", style: {
1308
1323
  position: "fixed",
1309
1324
  top: 0,
1310
1325
  left: 0,
@@ -1316,20 +1331,20 @@ const Gt = (e) => {
1316
1331
  alignItems: "center",
1317
1332
  justifyContent: "center",
1318
1333
  zIndex: 2e5
1319
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:672", className: "vg-glassmorphism vg-animate-slide", style: {
1334
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:683", className: "vg-glassmorphism vg-animate-slide", style: {
1320
1335
  padding: "32px",
1321
1336
  width: "400px",
1322
1337
  background: "white",
1323
1338
  textAlign: "center"
1324
1339
  }, children: [
1325
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:678", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
1326
- /* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:679", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: _.title }),
1327
- /* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:680", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: _.message }),
1328
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:682", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
1340
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:689", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
1341
+ /* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:690", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: _.title }),
1342
+ /* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:691", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: _.message }),
1343
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:693", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
1329
1344
  /* @__PURE__ */ l.jsx(
1330
1345
  "button",
1331
1346
  {
1332
- "data-source-path": "/src/components/ViewGateOverlay.tsx:683",
1347
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:694",
1333
1348
  className: "vg-button-ghost",
1334
1349
  onClick: () => D(null),
1335
1350
  style: { flex: 1 },
@@ -1339,7 +1354,7 @@ const Gt = (e) => {
1339
1354
  /* @__PURE__ */ l.jsx(
1340
1355
  "button",
1341
1356
  {
1342
- "data-source-path": "/src/components/ViewGateOverlay.tsx:690",
1357
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:701",
1343
1358
  className: "vg-button-primary",
1344
1359
  style: { backgroundColor: "#ef4444", flex: 1 },
1345
1360
  onClick: _.onConfirm,
@@ -5,6 +5,6 @@
5
5
  React keys must be passed directly to JSX without using spread:
6
6
  let props = %s;
7
7
  <%s key={someKey} {...props} />`,v,b,N,b),U[b+v]=!0)}if(b=null,y!==void 0&&(r(y),b=""+y),i(f)&&(r(f.key),b=""+f.key),"key"in f){y={};for(var ue in f)ue!=="key"&&(y[ue]=f[ue])}else y=f;return b&&c(y,typeof o=="function"?o.displayName||o.name||"Unknown":o),d(o,b,y,a(),q,le)}function g(o){w(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===$&&(o._payload.status==="fulfilled"?w(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function w(o){return typeof o=="object"&&o!==null&&o.$$typeof===k}var C=x,k=Symbol.for("react.transitional.element"),Z=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),T=Symbol.for("react.client.reference"),O=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,ce=Array.isArray,I=console.createTask?console.createTask:function(){return null};C={react_stack_bottom_frame:function(o){return o()}};var p,h={},P=C.react_stack_bottom_frame.bind(C,s)(),F=I(n(s)),U={};M.Fragment=G,M.jsx=function(o,f,y){var v=1e4>O.recentlyCreatedOwnerStacks++;return m(o,f,y,!1,v?Error("react-stack-top-frame"):P,v?I(n(o)):F)},M.jsxs=function(o,f,y){var v=1e4>O.recentlyCreatedOwnerStacks++;return m(o,f,y,!0,v?Error("react-stack-top-frame"):P,v?I(n(o)):F)}})()),M}var pe;function Le(){return pe||(pe=1,process.env.NODE_ENV==="production"?Y.exports=Ge():Y.exports=Ae()),Y.exports}var l=Le();const Ie={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 delete this annotation?",yes:"Yes, delete",no:"No, cancel",deleteSuccess:"The annotation has been deleted.",updateSuccess:"Status updated successfully.",navigating:"Navigating to source..."},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 este comentario?",yes:"Sí, eliminar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Estado actualizado correctamente.",navigating:"Redirigiendo al origen..."}},me=x.createContext(void 0),he=()=>{const e=x.useContext(me);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},Fe=({children:e,language:t="es",apiKey:r,baseUrl:n="https://view-gate.vercel.app"})=>{const[a,s]=x.useState([]),i=(u,d)=>{const m=Date.now();s(g=>[...g,{id:m,message:u,type:d}]),setTimeout(()=>{s(g=>g.filter(w=>w.id!==m))},4e3)},c=Ie[t];return l.jsxs(me.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:136",value:{addToast:i,language:t,t:c,apiKey:r,baseUrl:n},children:[e,l.jsx(Ve,{"data-source-path":"/src/components/ViewGateProvider.tsx:138"}),l.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:139",className:"vg-toasts",children:a.map(u=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:141",className:`vg-toast vg-glassmorphism vg-animate-slide ${u.type}`,children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:142",style:{fontSize:"20px"},children:u.type==="success"?"✅":"❌"}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:143",children:[l.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:144",style:{display:"block"},children:u.type==="success"?c.successHeader:c.errorHeader}),l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:145",style:{fontSize:"14px"},children:u.message})]})]},u.id))})]})};function Ne(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 r=document.implementation.createHTMLDocument(),n=r.createElement("base"),a=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(a),t&&(n.href=t),a.href=e,a.href}const De=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function j(e){const t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}let _=null;function ge(e={}){return _||(e.includeStyleProperties?(_=e.includeStyleProperties,_):(_=j(window.getComputedStyle(document.documentElement)),_))}function B(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function Me(e){const t=B(e,"border-left-width"),r=B(e,"border-right-width");return e.clientWidth+t+r}function He(e){const t=B(e,"border-top-width"),r=B(e,"border-bottom-width");return e.clientHeight+t+r}function xe(e,t={}){const r=t.width||Me(e),n=t.height||He(e);return{width:r,height:n}}function ze(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const E=16384;function We(e){(e.width>E||e.height>E)&&(e.width>E&&e.height>E?e.width>e.height?(e.height*=E/e.width,e.width=E):(e.width*=E/e.height,e.height=E):e.width>E?(e.height*=E/e.width,e.width=E):(e.width*=E/e.height,e.height=E))}function J(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function $e(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Ue(e,t,r){const n="http://www.w3.org/2000/svg",a=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${r}`),a.setAttribute("viewBox",`0 0 ${t} ${r}`),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),$e(a)}const S=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||S(r,t)};function Ye(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Be(e,t){return ge(t).map(r=>{const n=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${n}${a?" !important":""};`}).join(" ")}function Je(e,t,r,n){const a=`.${e}:${t}`,s=r.cssText?Ye(r):Be(r,n);return document.createTextNode(`${a}{${s}}`)}function ye(e,t,r,n){const a=window.getComputedStyle(e,r),s=a.getPropertyValue("content");if(s===""||s==="none")return;const i=De();try{t.className=`${t.className} ${i}`}catch{return}const c=document.createElement("style");c.appendChild(Je(i,r,a,n)),t.appendChild(c)}function Xe(e,t,r){ye(e,t,":before",r),ye(e,t,":after",r)}const we="application/font-woff",ve="image/jpeg",Ze={woff:we,woff2:we,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ve,jpeg:ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ke(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ee(e){const t=Ke(e).toLowerCase();return Ze[t]||""}function Qe(e){return e.split(/,/)[1]}function te(e){return e.search(/^(data:)/)!==-1}function qe(e,t){return`data:${t};base64,${e}`}async function be(e,t,r){const n=await fetch(e,t);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const a=await n.blob();return new Promise((s,i)=>{const c=new FileReader;c.onerror=i,c.onloadend=()=>{try{s(r({res:n,result:c.result}))}catch(u){i(u)}},c.readAsDataURL(a)})}const re={};function et(e,t,r){let n=e.replace(/\?.*/,"");return r&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function ne(e,t,r){const n=et(e,t,r.includeQueryParams);if(re[n]!=null)return re[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await be(e,r.fetchRequestInit,({res:i,result:c})=>(t||(t=i.headers.get("Content-Type")||""),Qe(c)));a=qe(s,t)}catch(s){a=r.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;s&&(i=typeof s=="string"?s:s.message),i&&console.warn(i)}return re[n]=a,a}async function tt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):J(t)}async function rt(e,t){if(e.currentSrc){const s=document.createElement("canvas"),i=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,i?.drawImage(e,0,0,s.width,s.height);const c=s.toDataURL();return J(c)}const r=e.poster,n=ee(r),a=await ne(r,n,t);return J(a)}async function nt(e,t){var r;try{if(!((r=e?.contentDocument)===null||r===void 0)&&r.body)return await X(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function st(e,t){return S(e,HTMLCanvasElement)?tt(e):S(e,HTMLVideoElement)?rt(e,t):S(e,HTMLIFrameElement)?nt(e,t):e.cloneNode(Se(e))}const at=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Se=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ot(e,t,r){var n,a;if(Se(t))return t;let s=[];return at(e)&&e.assignedNodes?s=j(e.assignedNodes()):S(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?s=j(e.contentDocument.body.childNodes):s=j(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||S(e,HTMLVideoElement)||await s.reduce((i,c)=>i.then(()=>X(c,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function it(e,t,r){const n=t.style;if(!n)return;const a=window.getComputedStyle(e);a.cssText?(n.cssText=a.cssText,n.transformOrigin=a.transformOrigin):ge(r).forEach(s=>{let i=a.getPropertyValue(s);s==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),S(e,HTMLIFrameElement)&&s==="display"&&i==="inline"&&(i="block"),s==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),n.setProperty(s,i,a.getPropertyPriority(s))})}function ct(e,t){S(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),S(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function lt(e,t){if(S(e,HTMLSelectElement)){const n=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));n&&n.setAttribute("selected","")}}function ut(e,t,r){return S(t,Element)&&(it(e,t,r),Xe(e,t,r),ct(e,t),lt(e,t)),t}async function dt(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const n={};for(let s=0;s<r.length;s++){const c=r[s].getAttribute("xlink:href");if(c){const u=e.querySelector(c),d=document.querySelector(c);!u&&d&&!n[c]&&(n[c]=await X(d,t,!0))}}const a=Object.values(n);if(a.length){const s="http://www.w3.org/1999/xhtml",i=document.createElementNS(s,"svg");i.setAttribute("xmlns",s),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const c=document.createElementNS(s,"defs");i.appendChild(c);for(let u=0;u<a.length;u++)c.appendChild(a[u]);e.appendChild(i)}return e}async function X(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>st(n,t)).then(n=>ot(e,n,t)).then(n=>ut(e,n,t)).then(n=>dt(n,t))}const Ee=/url\((['"]?)([^'"]+?)\1\)/g,ft=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,pt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function mt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ht(e){const t=[];return e.replace(Ee,(r,n,a)=>(t.push(a),r)),t.filter(r=>!te(r))}async function gt(e,t,r,n,a){try{const s=r?Ne(t,r):t,i=ee(t);let c;return a||(c=await ne(s,i,n)),e.replace(mt(t),`$1${c}$3`)}catch{}return e}function xt(e,{preferredFontFormat:t}){return t?e.replace(pt,r=>{for(;;){const[n,,a]=ft.exec(r)||[];if(!a)return"";if(a===t)return`src: ${n};`}}):e}function Ce(e){return e.search(Ee)!==-1}async function Re(e,t,r){if(!Ce(e))return e;const n=xt(e,r);return ht(n).reduce((s,i)=>s.then(c=>gt(c,i,t,r)),Promise.resolve(n))}async function V(e,t,r){var n;const a=(n=t.style)===null||n===void 0?void 0:n.getPropertyValue(e);if(a){const s=await Re(a,null,r);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function yt(e,t){await V("background",e,t)||await V("background-image",e,t),await V("mask",e,t)||await V("-webkit-mask",e,t)||await V("mask-image",e,t)||await V("-webkit-mask-image",e,t)}async function wt(e,t){const r=S(e,HTMLImageElement);if(!(r&&!te(e.src))&&!(S(e,SVGImageElement)&&!te(e.href.baseVal)))return;const n=r?e.src:e.href.baseVal,a=await ne(n,ee(n),t);await new Promise((s,i)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...u)=>{try{s(t.onImageErrorHandler(...u))}catch(d){i(d)}}:i;const c=e;c.decode&&(c.decode=s),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function vt(e,t){const n=j(e.childNodes).map(a=>ke(a,t));await Promise.all(n).then(()=>e)}async function ke(e,t){S(e,Element)&&(await yt(e,t),await wt(e,t),await vt(e,t))}function bt(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const n=t.style;return n!=null&&Object.keys(n).forEach(a=>{r[a]=n[a]}),e}const je={};async function Te(e){let t=je[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},je[e]=t,t}async function Oe(e,t){let r=e.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,s=(r.match(/url\([^)]+\)/g)||[]).map(async i=>{let c=i.replace(n,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),be(c,t.fetchRequestInit,({result:u})=>(r=r.replace(i,`url(${u})`),[i,u]))});return Promise.all(s).then(()=>r)}function Pe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(n);if(u===null)break;t.push(u[0])}n=n.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(i,"gi");for(;;){let u=s.exec(n);if(u===null){if(u=c.exec(n),u===null)break;s.lastIndex=c.lastIndex}else c.lastIndex=s.lastIndex;t.push(u[0])}return t}async function St(e,t){const r=[],n=[];return e.forEach(a=>{if("cssRules"in a)try{j(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let c=i+1;const u=s.href,d=Te(u).then(m=>Oe(m,t)).then(m=>Pe(m).forEach(g=>{try{a.insertRule(g,g.startsWith("@import")?c+=1:a.cssRules.length)}catch(w){console.error("Error inserting rule from remote css",{rule:g,error:w})}})).catch(m=>{console.error("Error loading remote css",m.toString())});n.push(d)}})}catch(s){const i=e.find(c=>c.href==null)||document.styleSheets[0];a.href!=null&&n.push(Te(a.href).then(c=>Oe(c,t)).then(c=>Pe(c).forEach(u=>{i.insertRule(u,i.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",s)}}),Promise.all(n).then(()=>(e.forEach(a=>{if("cssRules"in a)try{j(a.cssRules||[]).forEach(s=>{r.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),r))}function Et(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ce(t.style.getPropertyValue("src")))}async function Ct(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=j(e.ownerDocument.styleSheets),n=await St(r,t);return Et(n)}function _e(e){return e.trim().replace(/["']/g,"")}function Rt(e){const t=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(s=>{t.add(_e(s))}),Array.from(n.children).forEach(s=>{s instanceof HTMLElement&&r(s)})}return r(e),t}async function kt(e,t){const r=await Ct(e,t),n=Rt(e);return(await Promise.all(r.filter(s=>n.has(_e(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return Re(s.cssText,i,t)}))).join(`
8
- `)}async function jt(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await kt(e,t);if(r){const n=document.createElement("style"),a=document.createTextNode(r);n.appendChild(a),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}}async function Tt(e,t={}){const{width:r,height:n}=xe(e,t),a=await X(e,t,!0);return await jt(a,t),await ke(a,t),bt(a,t),await Ue(a,r,n)}async function Ot(e,t={}){const{width:r,height:n}=xe(e,t),a=await Tt(e,t),s=await J(a),i=document.createElement("canvas"),c=i.getContext("2d"),u=t.pixelRatio||ze(),d=t.canvasWidth||r,m=t.canvasHeight||n;return i.width=d*u,i.height=m*u,t.skipAutoScale||We(i),i.style.width=`${d}`,i.style.height=`${m}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,i.width,i.height)),c.drawImage(s,0,0,i.width,i.height),i}async function Pt(e,t={}){return(await Ot(e,t)).toDataURL()}const _t=e=>{const r=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!r)return"";const n=[];let a=e[r];for(;a;){const s=a.type;if(typeof s=="function"){const i=s.displayName||s.name;i&&!i.includes("ViewGate")&&!n.includes(i)&&n.unshift(i)}a=a.return}return n.join(" > ")||"Generic Component"},Vt=e=>{let t="unknown:0",r=e;for(;r;){const d=r.getAttribute("data-source-path");if(d){t=d;break}r=r.parentElement}const n=_t(e),s=(d=>{const m=[];let g=d;for(;g&&g.nodeType===Node.ELEMENT_NODE;){let w=g.nodeName.toLowerCase();if(g.id){w+="#"+g.id,m.unshift(w);break}else{let C=g,k=1;for(;C.previousElementSibling;)C=C.previousElementSibling,C.nodeName.toLowerCase()===w&&k++;k>1&&(w+=`:nth-of-type(${k})`)}m.unshift(w),g=g.parentElement}return m.join(" > ")})(e),i=(e.innerText||"").slice(0,50).trim(),c={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(d=>{const m=e.getAttribute(d);m&&(c[d]=m)});const u=`${e.tagName.toLowerCase()}-${i.replace(/\s+/g,"_")}-${s.split(" > ").slice(-2).join("_")}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:s,outerHtml:(e.outerHTML||"").slice(0,1e3),parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:n,signature:u,source:t,attributes:c,metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`}}},Ve=()=>{const{addToast:e,language:t,t:r,apiKey:n,baseUrl:a}=he(),[s,i]=x.useState(!1),[c,u]=x.useState(null),[d,m]=x.useState(null),[g,w]=x.useState(""),[C,k]=x.useState(!1),[Z,G]=x.useState(!1),[H,K]=x.useState(!1),[z,ae]=x.useState([]),[A,W]=x.useState(null),[oe,ie]=x.useState(!1),[$,Q]=x.useState(!1),T=x.useCallback(async()=>{if(n){Q(!0);try{const p=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":n}});if(p.ok){const h=await p.json();ae(h)}}catch(p){console.error("Failed to fetch annotations",p)}finally{Q(!1)}}},[n,a]);x.useEffect(()=>{T()},[T]);const O=x.useCallback(p=>{if(!s||d)return;const h=document.elementFromPoint(p.clientX,p.clientY);if(!h||h.id==="viewgate-overlay"||h.closest("#viewgate-ui")){u(null);return}h.getAttribute("data-source-path"),u({tag:h.tagName.toLowerCase(),source:h.getAttribute("data-source-path")||"unknown:0",rect:h.getBoundingClientRect(),element:h,previewText:(h.innerText||"").slice(0,100)||(h.getAttribute("placeholder")||"").slice(0,100)||h.tagName.toLowerCase(),semanticReference:Vt(h)})},[s,d]),L=x.useCallback(async p=>{if(!(!s||d)&&c){p.preventDefault(),p.stopPropagation(),G(!0);try{const h=c.element.style.display,P=window.getComputedStyle(c.element).display==="inline";P&&(c.element.style.display="inline-block");const F=await Pt(c.element,{backgroundColor:"#ffffff",pixelRatio:2,skipFonts:!0,style:{margin:"0",padding:"4px"}});P&&(c.element.style.display=h),m({...c,visualPreview:F})}catch(h){console.error("Failed to capture preview:",h),m(c)}finally{G(!1),u(null)}}},[s,c,d,H]);x.useEffect(()=>(s&&!d?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("mousemove",O),window.addEventListener("click",L,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("mousemove",O),window.removeEventListener("click",L,!0)}),[s,d,O,L]);const ce=async()=>{if(!d||!g.trim())return;k(!0);const{semanticReference:p}=d,[h,P]=p.source.split(":"),F=P||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({filePath:h,line:parseInt(F),url:window.location.href,message:g,componentName:p.componentPath||d.tag,reference:p})})).ok)throw new Error("Backend failed");e(r.success,"success"),m(null),w(""),i(!1),T()}catch(U){console.error(U),e(r.error,"error")}finally{k(!1)}},I=p=>p.split("/").pop()?.split("\\").pop()||"unknown";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:282",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:99999},id:"viewgate-ui",children:[l.jsx("button",{onClick:()=>i(!s),className:"vg-button-primary",style:{padding:"12px 24px",fontSize:"15px"},children:s?r.exitMode:r.enterMode}),z.length>0&&l.jsx("button",{onClick:()=>{K(!H),i(!1),m(null)},className:"vg-button-ghost",style:{padding:"12px 24px",fontSize:"15px",marginLeft:"12px",background:"white"},children:r.viewComments})]}),Z&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:307",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e5,cursor:"wait"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:320",className:"vg-glassmorphism",style:{padding:"30px 50px",fontWeight:700,display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"rgba(0,0,0,0.7)",color:"white",border:"1px solid rgba(255,255,255,0.1)"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:321",className:"vg-spinner"}),"Capturing..."]})}),s&&c&&!d&&!Z&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:329",style:{position:"fixed",top:c.rect.top,left:c.rect.left,width:c.rect.width,height:c.rect.height,border:"2px solid var(--vg-primary)",backgroundColor:"rgba(37, 19, 236, 0.05)",pointerEvents:"none",zIndex:99998,borderRadius:"4px",boxShadow:"0 0 15px rgba(37, 19, 236, 0.2)",transition:"all 0.1s ease-out"}}),d&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:347",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:360",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"460px",background:"white",color:"#0f172a"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:366",style:{margin:"0 0 10px 0",fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:368",style:{marginBottom:"20px"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:369",style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[d.semanticReference.componentPath?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:371",className:"vg-badge",style:{backgroundColor:"#f5f3ff",color:"#7c3aed",borderColor:"#ddd6fe"},children:["📦 ",d.tag]}):l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:375",className:"vg-badge",children:d.tag}),d.semanticReference.source&&!d.semanticReference.source.startsWith("unknown")?l.jsx(l.Fragment,{children:l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:380",className:"vg-badge",style:{backgroundColor:"#fdf2f8",color:"#db2777",borderColor:"#fbcfe8"},children:["📄 ",I(d.semanticReference.source.split(":")[0]||"unknown")]})}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:385",className:"vg-badge",style:{backgroundColor:"#f0f9ff",color:"#0369a1",borderColor:"#bae6fd",maxWidth:"300px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["🆔 ",d.semanticReference.signature]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:390",style:{marginTop:"8px",fontSize:"11px",color:"#94a3b8"},children:["🎯 ",d.semanticReference.selector]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:396",style:{backgroundColor:"#f8fafc",borderRadius:"8px",border:"1px solid #e2e8f0",marginBottom:"20px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:405",style:{padding:"8px 12px",fontSize:"10px",color:"#94a3b8",textTransform:"uppercase",fontWeight:700,borderBottom:"1px solid #f1f5f9"},children:r.preview}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:408",style:{padding:"12px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100px",maxHeight:"200px",overflow:"hidden",backgroundColor:"#fdfdfd"},children:d.visualPreview?l.jsx("img",{src:d.visualPreview,alt:"Element Preview",style:{maxWidth:"100%",maxHeight:"120px",objectFit:"contain",boxShadow:"0 2px 8px rgba(0,0,0,0.1)",borderRadius:"4px"}}):l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:431",style:{fontSize:"13px",color:"#64748b",fontStyle:"italic"},children:['"',d.previewText,'"']})})]}),l.jsx("textarea",{className:"vg-textarea",value:g,onChange:p=>w(p.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:447",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"24px"},children:[l.jsx("button",{onClick:()=>m(null),className:"vg-button-ghost",children:r.cancel}),l.jsx("button",{onClick:ce,className:"vg-button-primary",disabled:C||!g.trim(),style:{opacity:C||!g.trim()?.6:1},children:C?r.submitting:r.send})]})]})}),H&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:469",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:482",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"600px",maxHeight:"80vh",background:"white",color:"#0f172a",display:"flex",flexDirection:"column"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:491",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:492",style:{margin:0,fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:493",onClick:()=>K(!1),className:"vg-button-ghost",style:{padding:"6px 12px"},children:"✕"})]}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:496",style:{overflowY:"auto",flex:1,paddingRight:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:$?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:498",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:"Cargando..."}):z.length===0?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:500",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:r.noComments}):z.map(p=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:503",style:{border:"1px solid #e2e8f0",borderRadius:"12px",padding:"16px",backgroundColor:p.status==="ready_for_review"?"#f0fdf4":"#fff"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:509",style:{display:"flex",justifyContent:"space-between",marginBottom:"12px"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:510",style:{display:"flex",gap:"8px",alignItems:"center"},children:[p.status==="ready_for_review"?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:512",className:"vg-badge",style:{backgroundColor:"#dcfce7",color:"#166534",borderColor:"#bbf7d0"},children:["✓ ",r.readyForReview]}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:514",className:"vg-badge",style:{backgroundColor:"#fef3c7",color:"#92400e",borderColor:"#fde68a"},children:["⏳ ",r.pending]}),l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:516",style:{fontSize:"12px",color:"#64748b"},children:new Date(p.timestamp).toLocaleString()})]})}),l.jsxs("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:522",style:{margin:"0 0 12px 0",fontSize:"15px",fontWeight:600},children:['"',p.message,'"']}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:524",style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"16px"},children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:525",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:p.componentName||"UI Element"}),p.filePath&&p.filePath!=="unknown"&&l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:529",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:I(p.filePath)})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:535",style:{display:"flex",gap:"8px",justifyContent:"flex-end",borderTop:"1px solid #e2e8f0",paddingTop:"16px",marginTop:"8px"},children:[p.status==="pending"?l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:537",className:"vg-button-primary",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${p._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"ready_for_review"})})).ok&&(T(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["✅ ",r.markReady]}):l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:559",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${p._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"pending"})})).ok&&(T(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["🔄 ",r.reopen]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:582",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{p.url&&(ie(!0),setTimeout(()=>{window.location.href=p.url},1e3))},children:["👁️ ",r.review]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:597",className:"vg-button-primary",style:{backgroundColor:"#ef4444",display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{W({title:r.deleteConfirm,message:r.confirmDelete,onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${p._id}`,{method:"DELETE",headers:{"x-api-key":n}})).ok&&(T(),e(r.deleteSuccess,"success"))}catch{e(r.error,"error")}finally{W(null)}}})},children:["🗑️ ",r.close]})]})]},p._id))})]})}),oe&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:636",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:3e5,backdropFilter:"blur(10px)",color:"white"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:650",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"20px"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:651",className:"vg-spinner",style:{width:"50px",height:"50px",borderTopColor:"white"}}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:652",style:{fontSize:"18px",fontWeight:600,letterSpacing:"0.5px"},children:r.navigating})]})}),A&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:659",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e5},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:672",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",background:"white",textAlign:"center"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:678",style:{fontSize:"48px",marginBottom:"16px"},children:"⚠️"}),l.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:679",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:700,color:"#0f172a"},children:A.title}),l.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:680",style:{margin:"0 0 24px 0",fontSize:"15px",color:"#64748b",lineHeight:1.5},children:A.message}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:682",style:{display:"flex",gap:"12px",justifyContent:"center"},children:[l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:683",className:"vg-button-ghost",onClick:()=>W(null),style:{flex:1},children:r.no}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:690",className:"vg-button-primary",style:{backgroundColor:"#ef4444",flex:1},onClick:A.onConfirm,children:r.yes})]})]})})]})};function se(e,t,r){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const n=c=>c.replace(/\\/g,"/"),a=n(t).replace(n(r),"");return e.split(`
8
+ `)}async function jt(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await kt(e,t);if(r){const n=document.createElement("style"),a=document.createTextNode(r);n.appendChild(a),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}}async function Tt(e,t={}){const{width:r,height:n}=xe(e,t),a=await X(e,t,!0);return await jt(a,t),await ke(a,t),bt(a,t),await Ue(a,r,n)}async function Ot(e,t={}){const{width:r,height:n}=xe(e,t),a=await Tt(e,t),s=await J(a),i=document.createElement("canvas"),c=i.getContext("2d"),u=t.pixelRatio||ze(),d=t.canvasWidth||r,m=t.canvasHeight||n;return i.width=d*u,i.height=m*u,t.skipAutoScale||We(i),i.style.width=`${d}`,i.style.height=`${m}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,i.width,i.height)),c.drawImage(s,0,0,i.width,i.height),i}async function Pt(e,t={}){return(await Ot(e,t)).toDataURL()}const _t=e=>{const r=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!r)return"";const n=[];let a=e[r];for(;a;){const s=a.type;if(typeof s=="function"){const i=s.displayName||s.name;i&&!i.includes("ViewGate")&&!n.includes(i)&&n.unshift(i)}a=a.return}return n.join(" > ")||"Generic Component"},Vt=e=>{let t="unknown:0",r=e;for(;r;){const d=r.getAttribute("data-source-path");if(d){t=d;break}r=r.parentElement}const n=_t(e),s=(d=>{const m=[];let g=d;for(;g&&g.nodeType===Node.ELEMENT_NODE;){let w=g.nodeName.toLowerCase();if(g.id){w+="#"+g.id,m.unshift(w);break}else{let C=g,k=1;for(;C.previousElementSibling;)C=C.previousElementSibling,C.nodeName.toLowerCase()===w&&k++;k>1&&(w+=`:nth-of-type(${k})`)}m.unshift(w),g=g.parentElement}return m.join(" > ")})(e),i=(e.innerText||"").slice(0,50).trim(),c={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(d=>{const m=e.getAttribute(d);m&&(c[d]=m)});const u=`${e.tagName.toLowerCase()}-${i.replace(/\s+/g,"_")}-${s.split(" > ").slice(-2).join("_")}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:s,outerHtml:(e.outerHTML||"").slice(0,1e3),parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:n,signature:u,source:t,attributes:c,metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`}}},Ve=()=>{const{addToast:e,language:t,t:r,apiKey:n,baseUrl:a}=he(),[s,i]=x.useState(!1),[c,u]=x.useState(null),[d,m]=x.useState(null),[g,w]=x.useState(""),[C,k]=x.useState(!1),[Z,G]=x.useState(!1),[H,K]=x.useState(!1),[z,ae]=x.useState([]),[A,W]=x.useState(null),[oe,ie]=x.useState(!1),[$,Q]=x.useState(!1),T=x.useCallback(async()=>{if(n){Q(!0);try{const p=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":n}});if(p.ok){const h=await p.json();ae(h)}}catch(p){console.error("Failed to fetch annotations",p)}finally{Q(!1)}}},[n,a]);x.useEffect(()=>{T()},[T]);const O=x.useCallback(p=>{if(!s||d)return;const h=document.elementFromPoint(p.clientX,p.clientY);if(!h||h.id==="viewgate-overlay"||h.closest("#viewgate-ui")){u(null);return}h.getAttribute("data-source-path"),u({tag:h.tagName.toLowerCase(),source:h.getAttribute("data-source-path")||"unknown:0",rect:h.getBoundingClientRect(),element:h,previewText:(h.innerText||"").slice(0,100)||(h.getAttribute("placeholder")||"").slice(0,100)||h.tagName.toLowerCase(),semanticReference:Vt(h)})},[s,d]),L=x.useCallback(async p=>{if(!(!s||d)&&c){p.preventDefault(),p.stopPropagation(),G(!0);try{const h=c.element.style.display,P=window.getComputedStyle(c.element).display==="inline";P&&(c.element.style.display="inline-block");const F=await Pt(c.element,{backgroundColor:"#ffffff",pixelRatio:2,skipFonts:!0,style:{margin:"0",padding:"4px"}});P&&(c.element.style.display=h),m({...c,visualPreview:F})}catch(h){console.error("Failed to capture preview:",h),m(c)}finally{G(!1),u(null)}}},[s,c,d,H]);x.useEffect(()=>(s&&!d?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("mousemove",O),window.addEventListener("click",L,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("mousemove",O),window.removeEventListener("click",L,!0)}),[s,d,O,L]);const ce=async()=>{if(!d||!g.trim())return;k(!0);const{semanticReference:p}=d,[h,P]=p.source.split(":"),F=P||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({filePath:h,line:parseInt(F),url:window.location.href,message:g,componentName:p.componentPath||d.tag,reference:p})})).ok)throw new Error("Backend failed");e(r.success,"success"),m(null),w(""),i(!1),T()}catch(U){console.error(U),e(r.error,"error")}finally{k(!1)}},I=p=>p.split("/").pop()?.split("\\").pop()||"unknown";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:282",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:99999},id:"viewgate-ui",children:[l.jsx("button",{onClick:()=>i(!s),className:"vg-button-primary",style:{padding:"12px 24px",fontSize:"15px"},children:s?r.exitMode:r.enterMode}),z.length>0&&l.jsx("button",{onClick:()=>{K(!H),i(!1),m(null)},className:"vg-button-ghost",style:{padding:"12px 24px",fontSize:"15px",marginLeft:"12px",background:"white"},children:r.viewComments})]}),Z&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:307",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e5,cursor:"wait"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:320",className:"vg-glassmorphism",style:{padding:"30px 50px",fontWeight:700,display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"rgba(0,0,0,0.7)",color:"white",border:"1px solid rgba(255,255,255,0.1)"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:321",className:"vg-spinner"}),"Capturing..."]})}),s&&c&&!d&&!Z&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:329",style:{position:"fixed",top:c.rect.top,left:c.rect.left,width:c.rect.width,height:c.rect.height,border:"2px solid var(--vg-primary)",backgroundColor:"rgba(37, 19, 236, 0.05)",pointerEvents:"none",zIndex:99998,borderRadius:"4px",boxShadow:"0 0 15px rgba(37, 19, 236, 0.2)",transition:"all 0.1s ease-out"}}),d&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:347",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:360",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"460px",background:"white",color:"#0f172a"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:366",style:{margin:"0 0 10px 0",fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:368",style:{marginBottom:"20px"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:369",style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[d.semanticReference.componentPath?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:371",className:"vg-badge",style:{backgroundColor:"#f5f3ff",color:"#7c3aed",borderColor:"#ddd6fe"},children:["📦 ",d.tag]}):l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:375",className:"vg-badge",children:d.tag}),d.semanticReference.source&&!d.semanticReference.source.startsWith("unknown")?l.jsx(l.Fragment,{children:l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:380",className:"vg-badge",style:{backgroundColor:"#fdf2f8",color:"#db2777",borderColor:"#fbcfe8"},children:["📄 ",I(d.semanticReference.source.split(":")[0]||"unknown")]})}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:385",className:"vg-badge",style:{backgroundColor:"#f0f9ff",color:"#0369a1",borderColor:"#bae6fd",maxWidth:"300px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["🆔 ",d.semanticReference.signature]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:390",style:{marginTop:"8px",fontSize:"11px",color:"#94a3b8"},children:["🎯 ",d.semanticReference.selector]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:396",style:{backgroundColor:"#f8fafc",borderRadius:"8px",border:"1px solid #e2e8f0",marginBottom:"20px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:405",style:{padding:"8px 12px",fontSize:"10px",color:"#94a3b8",textTransform:"uppercase",fontWeight:700,borderBottom:"1px solid #f1f5f9"},children:r.preview}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:408",style:{padding:"12px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100px",maxHeight:"200px",overflow:"hidden",backgroundColor:"#fdfdfd"},children:d.visualPreview?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:419",style:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx("img",{src:d.visualPreview,alt:"Element Preview",style:{maxWidth:"90%",maxHeight:"160px",objectFit:"contain",boxShadow:"0 4px 12px rgba(0,0,0,0.12)",borderRadius:"6px",border:"1px solid #e2e8f0",backgroundColor:"white"}})}):l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:442",style:{fontSize:"13px",color:"#64748b",fontStyle:"italic",textAlign:"center",padding:"0 20px"},children:['"',d.previewText,'"']})})]}),l.jsx("textarea",{className:"vg-textarea",value:g,onChange:p=>w(p.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:458",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"24px"},children:[l.jsx("button",{onClick:()=>m(null),className:"vg-button-ghost",children:r.cancel}),l.jsx("button",{onClick:ce,className:"vg-button-primary",disabled:C||!g.trim(),style:{opacity:C||!g.trim()?.6:1},children:C?r.submitting:r.send})]})]})}),H&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:480",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:493",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"600px",maxHeight:"80vh",background:"white",color:"#0f172a",display:"flex",flexDirection:"column"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:502",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:503",style:{margin:0,fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:504",onClick:()=>K(!1),className:"vg-button-ghost",style:{padding:"6px 12px"},children:"✕"})]}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:507",style:{overflowY:"auto",flex:1,paddingRight:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:$?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:509",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:"Cargando..."}):z.length===0?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:511",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:r.noComments}):z.map(p=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:514",style:{border:"1px solid #e2e8f0",borderRadius:"12px",padding:"16px",backgroundColor:p.status==="ready_for_review"?"#f0fdf4":"#fff"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:520",style:{display:"flex",justifyContent:"space-between",marginBottom:"12px"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:521",style:{display:"flex",gap:"8px",alignItems:"center"},children:[p.status==="ready_for_review"?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:523",className:"vg-badge",style:{backgroundColor:"#dcfce7",color:"#166534",borderColor:"#bbf7d0"},children:["✓ ",r.readyForReview]}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:525",className:"vg-badge",style:{backgroundColor:"#fef3c7",color:"#92400e",borderColor:"#fde68a"},children:["⏳ ",r.pending]}),l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:527",style:{fontSize:"12px",color:"#64748b"},children:new Date(p.timestamp).toLocaleString()})]})}),l.jsxs("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:533",style:{margin:"0 0 12px 0",fontSize:"15px",fontWeight:600},children:['"',p.message,'"']}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:535",style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"16px"},children:[l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:536",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📦 ",p.componentName?.split(" > ").pop()||"UI Element"]}),p.filePath&&p.filePath!=="unknown"&&l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:540",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📄 ",I(p.filePath)]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:546",style:{display:"flex",gap:"8px",justifyContent:"flex-end",borderTop:"1px solid #e2e8f0",paddingTop:"16px",marginTop:"8px"},children:[p.status==="pending"?l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:548",className:"vg-button-primary",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${p._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"ready_for_review"})})).ok&&(T(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["✅ ",r.markReady]}):l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:570",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${p._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"pending"})})).ok&&(T(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["🔄 ",r.reopen]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:593",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{p.url&&(ie(!0),setTimeout(()=>{window.location.href=p.url},1e3))},children:["👁️ ",r.review]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:608",className:"vg-button-primary",style:{backgroundColor:"#ef4444",display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{W({title:r.deleteConfirm,message:r.confirmDelete,onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${p._id}`,{method:"DELETE",headers:{"x-api-key":n}})).ok&&(T(),e(r.deleteSuccess,"success"))}catch{e(r.error,"error")}finally{W(null)}}})},children:["🗑️ ",r.close]})]})]},p._id))})]})}),oe&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:647",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:3e5,backdropFilter:"blur(10px)",color:"white"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:661",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"20px"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:662",className:"vg-spinner",style:{width:"50px",height:"50px",borderTopColor:"white"}}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:663",style:{fontSize:"18px",fontWeight:600,letterSpacing:"0.5px"},children:r.navigating})]})}),A&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:670",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e5},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:683",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",background:"white",textAlign:"center"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:689",style:{fontSize:"48px",marginBottom:"16px"},children:"⚠️"}),l.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:690",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:700,color:"#0f172a"},children:A.title}),l.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:691",style:{margin:"0 0 24px 0",fontSize:"15px",color:"#64748b",lineHeight:1.5},children:A.message}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:693",style:{display:"flex",gap:"12px",justifyContent:"center"},children:[l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:694",className:"vg-button-ghost",onClick:()=>W(null),style:{flex:1},children:r.no}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:701",className:"vg-button-primary",style:{backgroundColor:"#ef4444",flex:1},onClick:A.onConfirm,children:r.yes})]})]})})]})};function se(e,t,r){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const n=c=>c.replace(/\\/g,"/"),a=n(t).replace(n(r),"");return e.split(`
9
9
  `).map((c,u)=>{const d=u+1;return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(m,g,w)=>m.includes("data-source-path")||w==="Fragment"||w==="React.Fragment"?m:`${g}<${w} data-source-path="${a}:${d}"`)}).join(`
10
10
  `)}function Gt(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:se(e,t,process.cwd()),map:null}}}}function At(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,se(e,t,process.cwd())):e}R.ViewGate=Fe,R.ViewGateOverlay=Ve,R.transformSourcePaths=se,R.useViewGate=he,R.viewgateNextLoader=At,R.viewgatePlugin=Gt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-wrapper",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "type": "module",
5
5
  "main": "./dist/viewgate-wrapper.umd.cjs",
6
6
  "module": "./dist/viewgate-wrapper.js",