viewgate-wrapper 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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;AA4FhC,eAAO,MAAM,eAAe,EAAE,EA8e7B,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;AA4FhC,eAAO,MAAM,eAAe,EAAE,EA4e7B,CAAC"}
@@ -33,11 +33,11 @@ function Fe() {
33
33
  return o.$$typeof === z ? null : o.displayName || o.name || null;
34
34
  if (typeof o == "string") return o;
35
35
  switch (o) {
36
- case O:
36
+ case j:
37
37
  return "Fragment";
38
38
  case H:
39
39
  return "Profiler";
40
- case T:
40
+ case $:
41
41
  return "StrictMode";
42
42
  case W:
43
43
  return "Suspense";
@@ -61,7 +61,7 @@ function Fe() {
61
61
  return o = o.displayName, o || (o = f.displayName || f.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
62
62
  case F:
63
63
  return f = o.displayName || null, f !== null ? f : e(o.type) || "Memo";
64
- case P:
64
+ case T:
65
65
  f = o._payload, o = o._init;
66
66
  try {
67
67
  return e(o(f));
@@ -91,8 +91,8 @@ function Fe() {
91
91
  }
92
92
  }
93
93
  function n(o) {
94
- if (o === O) return "<>";
95
- if (typeof o == "object" && o !== null && o.$$typeof === P)
94
+ if (o === j) return "<>";
95
+ if (typeof o == "object" && o !== null && o.$$typeof === T)
96
96
  return "<...>";
97
97
  try {
98
98
  var f = e(o);
@@ -136,7 +136,7 @@ function Fe() {
136
136
  function d(o, f, y, x, U, Q) {
137
137
  var w = y.ref;
138
138
  return o = {
139
- $$typeof: $,
139
+ $$typeof: L,
140
140
  type: o,
141
141
  key: f,
142
142
  props: y,
@@ -170,7 +170,7 @@ function Fe() {
170
170
  var w = f.children;
171
171
  if (w !== void 0)
172
172
  if (x)
173
- if (_(w)) {
173
+ if (O(w)) {
174
174
  for (x = 0; x < w.length; x++)
175
175
  g(w[x]);
176
176
  Object.freeze && Object.freeze(w);
@@ -181,10 +181,10 @@ function Fe() {
181
181
  else g(w);
182
182
  if (h.call(f, "key")) {
183
183
  w = e(o);
184
- var V = Object.keys(f).filter(function(Ve) {
184
+ var _ = Object.keys(f).filter(function(Ve) {
185
185
  return Ve !== "key";
186
186
  });
187
- x = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", le[w + x] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ x = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", le[w + x] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
188
188
  `A props object containing a "key" prop is being spread into JSX:
189
189
  let props = %s;
190
190
  <%s {...props} />
@@ -193,7 +193,7 @@ React keys must be passed directly to JSX without using spread:
193
193
  <%s key={someKey} {...props} />`,
194
194
  x,
195
195
  w,
196
- V,
196
+ _,
197
197
  w
198
198
  ), le[w + x] = !0);
199
199
  }
@@ -215,12 +215,12 @@ React keys must be passed directly to JSX without using spread:
215
215
  );
216
216
  }
217
217
  function g(o) {
218
- v(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === P && (o._payload.status === "fulfilled" ? v(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
218
+ v(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === T && (o._payload.status === "fulfilled" ? v(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
219
219
  }
220
220
  function v(o) {
221
- return typeof o == "object" && o !== null && o.$$typeof === $;
221
+ return typeof o == "object" && o !== null && o.$$typeof === L;
222
222
  }
223
- var S = Ae, $ = /* @__PURE__ */ Symbol.for("react.transitional.element"), M = /* @__PURE__ */ Symbol.for("react.portal"), O = /* @__PURE__ */ Symbol.for("react.fragment"), T = /* @__PURE__ */ Symbol.for("react.strict_mode"), H = /* @__PURE__ */ Symbol.for("react.profiler"), G = /* @__PURE__ */ Symbol.for("react.consumer"), X = /* @__PURE__ */ Symbol.for("react.context"), Z = /* @__PURE__ */ Symbol.for("react.forward_ref"), W = /* @__PURE__ */ Symbol.for("react.suspense"), R = /* @__PURE__ */ Symbol.for("react.suspense_list"), F = /* @__PURE__ */ Symbol.for("react.memo"), P = /* @__PURE__ */ Symbol.for("react.lazy"), K = /* @__PURE__ */ Symbol.for("react.activity"), z = /* @__PURE__ */ Symbol.for("react.client.reference"), m = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, h = Object.prototype.hasOwnProperty, _ = Array.isArray, j = console.createTask ? console.createTask : function() {
223
+ var S = Ae, L = /* @__PURE__ */ Symbol.for("react.transitional.element"), M = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), $ = /* @__PURE__ */ Symbol.for("react.strict_mode"), H = /* @__PURE__ */ Symbol.for("react.profiler"), G = /* @__PURE__ */ Symbol.for("react.consumer"), X = /* @__PURE__ */ Symbol.for("react.context"), Z = /* @__PURE__ */ Symbol.for("react.forward_ref"), W = /* @__PURE__ */ Symbol.for("react.suspense"), R = /* @__PURE__ */ Symbol.for("react.suspense_list"), F = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), K = /* @__PURE__ */ Symbol.for("react.activity"), z = /* @__PURE__ */ Symbol.for("react.client.reference"), m = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, h = Object.prototype.hasOwnProperty, O = Array.isArray, P = console.createTask ? console.createTask : function() {
224
224
  return null;
225
225
  };
226
226
  S = {
@@ -231,8 +231,8 @@ React keys must be passed directly to JSX without using spread:
231
231
  var I, oe = {}, ie = S.react_stack_bottom_frame.bind(
232
232
  S,
233
233
  s
234
- )(), ce = j(n(s)), le = {};
235
- D.Fragment = O, D.jsx = function(o, f, y) {
234
+ )(), ce = P(n(s)), le = {};
235
+ D.Fragment = j, D.jsx = function(o, f, y) {
236
236
  var x = 1e4 > m.recentlyCreatedOwnerStacks++;
237
237
  return p(
238
238
  o,
@@ -240,7 +240,7 @@ React keys must be passed directly to JSX without using spread:
240
240
  y,
241
241
  !1,
242
242
  x ? Error("react-stack-top-frame") : ie,
243
- x ? j(n(o)) : ce
243
+ x ? P(n(o)) : ce
244
244
  );
245
245
  }, D.jsxs = function(o, f, y) {
246
246
  var x = 1e4 > m.recentlyCreatedOwnerStacks++;
@@ -250,7 +250,7 @@ React keys must be passed directly to JSX without using spread:
250
250
  y,
251
251
  !0,
252
252
  x ? Error("react-stack-top-frame") : ie,
253
- x ? j(n(o)) : ce
253
+ x ? P(n(o)) : ce
254
254
  );
255
255
  };
256
256
  })()), D;
@@ -358,9 +358,9 @@ function k(e) {
358
358
  t.push(e[r]);
359
359
  return t;
360
360
  }
361
- let A = null;
361
+ let V = null;
362
362
  function Ee(e = {}) {
363
- return A || (e.includeStyleProperties ? (A = e.includeStyleProperties, A) : (A = k(window.getComputedStyle(document.documentElement)), A));
363
+ return V || (e.includeStyleProperties ? (V = e.includeStyleProperties, V) : (V = k(window.getComputedStyle(document.documentElement)), V));
364
364
  }
365
365
  function q(e, t) {
366
366
  const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
@@ -634,7 +634,7 @@ async function Pe(e, t, r) {
634
634
  const n = vt(e, r);
635
635
  return xt(n).reduce((s, i) => s.then((c) => wt(c, i, t, r)), Promise.resolve(n));
636
636
  }
637
- async function L(e, t, r) {
637
+ async function A(e, t, r) {
638
638
  var n;
639
639
  const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
640
640
  if (a) {
@@ -644,7 +644,7 @@ async function L(e, t, r) {
644
644
  return !1;
645
645
  }
646
646
  async function bt(e, t) {
647
- await L("background", e, t) || await L("background-image", e, t), await L("mask", e, t) || await L("-webkit-mask", e, t) || await L("mask-image", e, t) || await L("-webkit-mask-image", e, t);
647
+ await A("background", e, t) || await A("background-image", e, t), await A("mask", e, t) || await A("-webkit-mask", e, t) || await A("mask-image", e, t) || await A("-webkit-mask-image", e, t);
648
648
  }
649
649
  async function Et(e, t) {
650
650
  const r = b(e, HTMLImageElement);
@@ -857,7 +857,7 @@ const Lt = (e) => {
857
857
  source: t
858
858
  };
859
859
  }, Gt = () => {
860
- const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, p] = C(null), [g, v] = C(""), [S, $] = C(!1), [M, O] = C(!1), [T, H] = C(!1), [G, X] = C([]), [Z, W] = C(!1), R = te(async () => {
860
+ const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, p] = C(null), [g, v] = C(""), [S, L] = C(!1), [M, j] = C(!1), [$, H] = C(!1), [G, X] = C([]), [Z, W] = C(!1), R = te(async () => {
861
861
  if (n) {
862
862
  W(!0);
863
863
  try {
@@ -876,8 +876,8 @@ const Lt = (e) => {
876
876
  }
877
877
  }, [n, a]);
878
878
  ue(() => {
879
- (s || T) && R();
880
- }, [s, T, R]);
879
+ R();
880
+ }, [R]);
881
881
  const F = te((m) => {
882
882
  if (!s || d) return;
883
883
  const h = document.elementFromPoint(m.clientX, m.clientY);
@@ -893,13 +893,13 @@ const Lt = (e) => {
893
893
  previewText: (h.innerText || "").slice(0, 100) || (h.getAttribute("placeholder") || "").slice(0, 100) || h.tagName.toLowerCase(),
894
894
  semanticReference: $t(h)
895
895
  });
896
- }, [s, d]), P = te(async (m) => {
896
+ }, [s, d]), T = te(async (m) => {
897
897
  if (!(!s || d) && c) {
898
- m.preventDefault(), m.stopPropagation(), O(!0);
898
+ m.preventDefault(), m.stopPropagation(), j(!0);
899
899
  try {
900
- const h = c.element.style.display, _ = window.getComputedStyle(c.element).display === "inline";
901
- _ && (c.element.style.display = "inline-block");
902
- const j = await At(c.element, {
900
+ const h = c.element.style.display, O = window.getComputedStyle(c.element).display === "inline";
901
+ O && (c.element.style.display = "inline-block");
902
+ const P = await At(c.element, {
903
903
  backgroundColor: "#ffffff",
904
904
  pixelRatio: 2,
905
905
  skipFonts: !0,
@@ -909,21 +909,21 @@ const Lt = (e) => {
909
909
  // Extra padding for better look
910
910
  }
911
911
  });
912
- _ && (c.element.style.display = h), p({ ...c, visualPreview: j });
912
+ O && (c.element.style.display = h), p({ ...c, visualPreview: P });
913
913
  } catch (h) {
914
914
  console.error("Failed to capture preview:", h), p(c);
915
915
  } finally {
916
- O(!1), u(null);
916
+ j(!1), u(null);
917
917
  }
918
918
  }
919
- }, [s, c, d, T]);
920
- ue(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", F), window.addEventListener("click", P, !0), () => {
921
- document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", F), window.removeEventListener("click", P, !0);
922
- }), [s, d, F, P]);
919
+ }, [s, c, d, $]);
920
+ ue(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", F), window.addEventListener("click", T, !0), () => {
921
+ document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", F), window.removeEventListener("click", T, !0);
922
+ }), [s, d, F, T]);
923
923
  const K = async () => {
924
924
  if (!d || !g.trim()) return;
925
- $(!0);
926
- const { semanticReference: m } = d, [h, _] = m.source.split(":"), j = _ || "0";
925
+ L(!0);
926
+ const { semanticReference: m } = d, [h, O] = m.source.split(":"), P = O || "0";
927
927
  try {
928
928
  if (!(await fetch(`${a}/api/annotations`, {
929
929
  method: "POST",
@@ -933,7 +933,7 @@ const Lt = (e) => {
933
933
  },
934
934
  body: JSON.stringify({
935
935
  filePath: h,
936
- line: parseInt(j),
936
+ line: parseInt(P),
937
937
  url: window.location.href,
938
938
  message: g,
939
939
  componentName: m.componentPath || d.tag,
@@ -944,11 +944,11 @@ const Lt = (e) => {
944
944
  } catch (I) {
945
945
  console.error(I), e(r.error, "error");
946
946
  } finally {
947
- $(!1);
947
+ L(!1);
948
948
  }
949
949
  }, z = (m) => m.split("/").pop()?.split("\\").pop() || "unknown";
950
950
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
951
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:259", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
951
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:257", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
952
952
  /* @__PURE__ */ l.jsx(
953
953
  "button",
954
954
  {
@@ -962,7 +962,7 @@ const Lt = (e) => {
962
962
  "button",
963
963
  {
964
964
  onClick: () => {
965
- H(!T), i(!1), p(null);
965
+ H(!$), i(!1), p(null);
966
966
  },
967
967
  className: "vg-button-ghost",
968
968
  style: { padding: "12px 24px", fontSize: "15px", marginLeft: "12px", background: "white" },
@@ -970,7 +970,7 @@ const Lt = (e) => {
970
970
  }
971
971
  )
972
972
  ] }),
973
- M && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:284", style: {
973
+ M && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:282", style: {
974
974
  position: "fixed",
975
975
  top: 0,
976
976
  left: 0,
@@ -982,11 +982,11 @@ const Lt = (e) => {
982
982
  justifyContent: "center",
983
983
  zIndex: 1e5,
984
984
  cursor: "wait"
985
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:297", 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: [
986
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:298", className: "vg-spinner" }),
985
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:295", 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: [
986
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:296", className: "vg-spinner" }),
987
987
  "Capturing..."
988
988
  ] }) }),
989
- s && c && !d && !M && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:306", style: {
989
+ s && c && !d && !M && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:304", style: {
990
990
  position: "fixed",
991
991
  top: c.rect.top,
992
992
  left: c.rect.left,
@@ -1000,7 +1000,7 @@ const Lt = (e) => {
1000
1000
  boxShadow: "0 0 15px rgba(37, 19, 236, 0.2)",
1001
1001
  transition: "all 0.1s ease-out"
1002
1002
  } }),
1003
- d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:324", className: "vg-animate-fade", style: {
1003
+ d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:322", className: "vg-animate-fade", style: {
1004
1004
  position: "fixed",
1005
1005
  top: 0,
1006
1006
  left: 0,
@@ -1012,33 +1012,33 @@ const Lt = (e) => {
1012
1012
  alignItems: "center",
1013
1013
  justifyContent: "center",
1014
1014
  zIndex: 99999
1015
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:337", className: "vg-glassmorphism vg-animate-slide", style: {
1015
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:335", className: "vg-glassmorphism vg-animate-slide", style: {
1016
1016
  padding: "32px",
1017
1017
  width: "460px",
1018
1018
  background: "white",
1019
1019
  color: "#0f172a"
1020
1020
  }, children: [
1021
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:343", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1022
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:345", style: { marginBottom: "20px" }, children: [
1023
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:346", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1024
- d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:348", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
1021
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:341", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1022
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:343", style: { marginBottom: "20px" }, children: [
1023
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:344", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1024
+ d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:346", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
1025
1025
  "📦 ",
1026
1026
  d.semanticReference.componentPath
1027
- ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:352", className: "vg-badge", children: d.tag }),
1028
- d.semanticReference.source && !d.semanticReference.source.startsWith("unknown") ? /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:357", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
1027
+ ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:350", className: "vg-badge", children: d.tag }),
1028
+ d.semanticReference.source && !d.semanticReference.source.startsWith("unknown") ? /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:355", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
1029
1029
  "📄 ",
1030
1030
  z(d.semanticReference.source.split(":")[0] || "unknown")
1031
- ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:362", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1031
+ ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:360", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1032
1032
  "🆔 ",
1033
1033
  d.semanticReference.signature
1034
1034
  ] })
1035
1035
  ] }),
1036
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:367", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
1036
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:365", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
1037
1037
  "🎯 ",
1038
1038
  d.semanticReference.selector
1039
1039
  ] })
1040
1040
  ] }),
1041
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:373", style: {
1041
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:371", style: {
1042
1042
  backgroundColor: "#f8fafc",
1043
1043
  borderRadius: "8px",
1044
1044
  border: "1px solid #e2e8f0",
@@ -1047,8 +1047,8 @@ const Lt = (e) => {
1047
1047
  display: "flex",
1048
1048
  flexDirection: "column"
1049
1049
  }, children: [
1050
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:382", style: { padding: "8px 12px", fontSize: "10px", color: "#94a3b8", textTransform: "uppercase", fontWeight: 700, borderBottom: "1px solid #f1f5f9" }, children: r.preview }),
1051
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:385", style: {
1050
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:380", style: { padding: "8px 12px", fontSize: "10px", color: "#94a3b8", textTransform: "uppercase", fontWeight: 700, borderBottom: "1px solid #f1f5f9" }, children: r.preview }),
1051
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:383", style: {
1052
1052
  padding: "12px",
1053
1053
  display: "flex",
1054
1054
  justifyContent: "center",
@@ -1070,7 +1070,7 @@ const Lt = (e) => {
1070
1070
  borderRadius: "4px"
1071
1071
  }
1072
1072
  }
1073
- ) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:408", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic" }, children: [
1073
+ ) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:406", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic" }, children: [
1074
1074
  '"',
1075
1075
  d.previewText,
1076
1076
  '"'
@@ -1087,7 +1087,7 @@ const Lt = (e) => {
1087
1087
  autoFocus: !0
1088
1088
  }
1089
1089
  ),
1090
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:424", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1090
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:422", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1091
1091
  /* @__PURE__ */ l.jsx(
1092
1092
  "button",
1093
1093
  {
@@ -1108,7 +1108,7 @@ const Lt = (e) => {
1108
1108
  )
1109
1109
  ] })
1110
1110
  ] }) }),
1111
- T && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:446", className: "vg-animate-fade", style: {
1111
+ $ && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:444", className: "vg-animate-fade", style: {
1112
1112
  position: "fixed",
1113
1113
  top: 0,
1114
1114
  left: 0,
@@ -1120,7 +1120,7 @@ const Lt = (e) => {
1120
1120
  alignItems: "center",
1121
1121
  justifyContent: "center",
1122
1122
  zIndex: 99999
1123
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:459", className: "vg-glassmorphism vg-animate-slide", style: {
1123
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:457", className: "vg-glassmorphism vg-animate-slide", style: {
1124
1124
  padding: "32px",
1125
1125
  width: "600px",
1126
1126
  maxHeight: "80vh",
@@ -1129,40 +1129,40 @@ const Lt = (e) => {
1129
1129
  display: "flex",
1130
1130
  flexDirection: "column"
1131
1131
  }, children: [
1132
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:468", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1133
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:469", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1134
- /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:470", onClick: () => H(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1132
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:466", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1133
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:467", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1134
+ /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:468", onClick: () => H(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1135
1135
  ] }),
1136
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:473", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: Z ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:475", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : G.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:477", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : G.map((m) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:480", style: {
1136
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:471", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: Z ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:473", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : G.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:475", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : G.map((m) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:478", style: {
1137
1137
  border: "1px solid #e2e8f0",
1138
1138
  borderRadius: "12px",
1139
1139
  padding: "16px",
1140
1140
  backgroundColor: m.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1141
1141
  }, children: [
1142
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:486", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:487", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1143
- m.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:489", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1142
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:484", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:485", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1143
+ m.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:487", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1144
1144
  "✓ ",
1145
1145
  r.readyForReview
1146
- ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:491", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1146
+ ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:489", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1147
1147
  "⏳ ",
1148
1148
  r.pending
1149
1149
  ] }),
1150
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:493", style: { fontSize: "12px", color: "#64748b" }, children: new Date(m.timestamp).toLocaleString() })
1150
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:491", style: { fontSize: "12px", color: "#64748b" }, children: new Date(m.timestamp).toLocaleString() })
1151
1151
  ] }) }),
1152
- /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:499", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1152
+ /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:497", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1153
1153
  '"',
1154
1154
  m.message,
1155
1155
  '"'
1156
1156
  ] }),
1157
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:501", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1158
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:502", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: m.componentName || "UI Element" }),
1159
- m.filePath && m.filePath !== "unknown" && /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:506", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: z(m.filePath) })
1157
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:499", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1158
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:500", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: m.componentName || "UI Element" }),
1159
+ m.filePath && m.filePath !== "unknown" && /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:504", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: z(m.filePath) })
1160
1160
  ] }),
1161
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:512", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1161
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:510", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1162
1162
  m.status === "pending" ? /* @__PURE__ */ l.jsxs(
1163
1163
  "button",
1164
1164
  {
1165
- "data-source-path": "/src/components/ViewGateOverlay.tsx:514",
1165
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:512",
1166
1166
  className: "vg-button-primary",
1167
1167
  style: { display: "flex", alignItems: "center", gap: "6px" },
1168
1168
  onClick: async () => {
@@ -1184,7 +1184,7 @@ const Lt = (e) => {
1184
1184
  ) : /* @__PURE__ */ l.jsxs(
1185
1185
  "button",
1186
1186
  {
1187
- "data-source-path": "/src/components/ViewGateOverlay.tsx:536",
1187
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:534",
1188
1188
  className: "vg-button-ghost",
1189
1189
  style: { display: "flex", alignItems: "center", gap: "6px" },
1190
1190
  onClick: async () => {
@@ -1207,7 +1207,7 @@ const Lt = (e) => {
1207
1207
  /* @__PURE__ */ l.jsxs(
1208
1208
  "button",
1209
1209
  {
1210
- "data-source-path": "/src/components/ViewGateOverlay.tsx:559",
1210
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:557",
1211
1211
  className: "vg-button-primary",
1212
1212
  style: { backgroundColor: "#ef4444", display: "flex", alignItems: "center", gap: "6px" },
1213
1213
  onClick: async () => {
@@ -1,10 +1,10 @@
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
- (function(C,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],y):(C=typeof globalThis<"u"?globalThis:C||self,y(C.ViewGateWrapper={},C.React))})(this,(function(C,y){"use strict";var $={exports:{}},F={};var ie;function Ae(){if(ie)return F;ie=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:s}}return F.Fragment=t,F.jsx=r,F.jsxs=r,F}var I={};var ce;function Le(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===X?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case A:return"Fragment";case B:return"Profiler";case P:return"StrictMode";case J:return"Suspense";case T:return"SuspenseList";case se:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case Y:return"Portal";case re:return o.displayName||"Context";case D:return(o._context.displayName||"Context")+".Consumer";case ne:var f=o.render;return o=o.displayName,o||(o=f.displayName||f.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return f=o.displayName||null,f!==null?f:e(o.type)||"Memo";case j:f=o._payload,o=o._init;try{return e(o(f))}catch{}}return null}function t(o){return""+o}function r(o){try{t(o);var f=!1}catch{f=!0}if(f){f=console;var x=f.error,w=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return x.call(f,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",w),t(o)}}function n(o){if(o===A)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===j)return"<...>";try{var f=e(o);return f?"<"+f+">":"<...>"}catch{return"<...>"}}function a(){var o=m.A;return o===null?null:o.getOwner()}function s(){return Error("react-stack-top-frame")}function i(o){if(h.call(o,"key")){var f=Object.getOwnPropertyDescriptor(o,"key").get;if(f&&f.isReactWarning)return!1}return o.key!==void 0}function c(o,f){function x(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",f))}x.isReactWarning=!0,Object.defineProperty(o,"key",{get:x,configurable:!0})}function u(){var o=e(this.type);return je[o]||(je[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function d(o,f,x,w,Z,ae){var v=x.ref;return o={$$typeof:N,type:o,key:f,props:x,_owner:w},(v!==void 0?v:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:u}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function p(o,f,x,w,Z,ae){var v=f.children;if(v!==void 0)if(w)if(L(v)){for(w=0;w<v.length;w++)g(v[w]);Object.freeze&&Object.freeze(v)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(v);if(h.call(f,"key")){v=e(o);var G=Object.keys(f).filter(function(Gt){return Gt!=="key"});w=0<G.length?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}",Ve[v+w]||(G=0<G.length?"{"+G.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ (function(C,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],y):(C=typeof globalThis<"u"?globalThis:C||self,y(C.ViewGateWrapper={},C.React))})(this,(function(C,y){"use strict";var $={exports:{}},G={};var ie;function Ae(){if(ie)return G;ie=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:s}}return G.Fragment=t,G.jsx=r,G.jsxs=r,G}var F={};var ce;function Le(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===X?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case V:return"Fragment";case B:return"Profiler";case N:return"StrictMode";case J:return"Suspense";case T:return"SuspenseList";case se:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case Y:return"Portal";case re:return o.displayName||"Context";case D:return(o._context.displayName||"Context")+".Consumer";case ne:var f=o.render;return o=o.displayName,o||(o=f.displayName||f.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return f=o.displayName||null,f!==null?f:e(o.type)||"Memo";case P:f=o._payload,o=o._init;try{return e(o(f))}catch{}}return null}function t(o){return""+o}function r(o){try{t(o);var f=!1}catch{f=!0}if(f){f=console;var x=f.error,w=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return x.call(f,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",w),t(o)}}function n(o){if(o===V)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===P)return"<...>";try{var f=e(o);return f?"<"+f+">":"<...>"}catch{return"<...>"}}function a(){var o=m.A;return o===null?null:o.getOwner()}function s(){return Error("react-stack-top-frame")}function i(o){if(h.call(o,"key")){var f=Object.getOwnPropertyDescriptor(o,"key").get;if(f&&f.isReactWarning)return!1}return o.key!==void 0}function c(o,f){function x(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",f))}x.isReactWarning=!0,Object.defineProperty(o,"key",{get:x,configurable:!0})}function u(){var o=e(this.type);return je[o]||(je[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function d(o,f,x,w,Z,ae){var v=x.ref;return o={$$typeof:I,type:o,key:f,props:x,_owner:w},(v!==void 0?v:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:u}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function p(o,f,x,w,Z,ae){var v=f.children;if(v!==void 0)if(w)if(A(v)){for(w=0;w<v.length;w++)g(v[w]);Object.freeze&&Object.freeze(v)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(v);if(h.call(f,"key")){v=e(o);var L=Object.keys(f).filter(function(Gt){return Gt!=="key"});w=0<L.length?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}",Ve[v+w]||(L=0<L.length?"{"+L.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
3
3
  let props = %s;
4
4
  <%s {...props} />
5
5
  React keys must be passed directly to JSX without using spread:
6
6
  let props = %s;
7
- <%s key={someKey} {...props} />`,w,v,G,v),Ve[v+w]=!0)}if(v=null,x!==void 0&&(r(x),v=""+x),i(f)&&(r(f.key),v=""+f.key),"key"in f){x={};for(var oe in f)oe!=="key"&&(x[oe]=f[oe])}else x=f;return v&&c(x,typeof o=="function"?o.displayName||o.name||"Unknown":o),d(o,v,x,a(),Z,ae)}function g(o){b(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===j&&(o._payload.status==="fulfilled"?b(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function b(o){return typeof o=="object"&&o!==null&&o.$$typeof===N}var k=y,N=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),re=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),m=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h=Object.prototype.hasOwnProperty,L=Array.isArray,O=console.createTask?console.createTask:function(){return null};k={react_stack_bottom_frame:function(o){return o()}};var H,je={},Oe=k.react_stack_bottom_frame.bind(k,s)(),_e=O(n(s)),Ve={};I.Fragment=A,I.jsx=function(o,f,x){var w=1e4>m.recentlyCreatedOwnerStacks++;return p(o,f,x,!1,w?Error("react-stack-top-frame"):Oe,w?O(n(o)):_e)},I.jsxs=function(o,f,x){var w=1e4>m.recentlyCreatedOwnerStacks++;return p(o,f,x,!0,w?Error("react-stack-top-frame"):Oe,w?O(n(o)):_e)}})()),I}var le;function Ge(){return le||(le=1,process.env.NODE_ENV==="production"?$.exports=Ae():$.exports=Le()),$.exports}var l=Ge();const Fe={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"},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"}},ue=y.createContext(void 0),de=()=>{const e=y.useContext(ue);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},Ie=({children:e,language:t="es",apiKey:r,baseUrl:n="https://view-gate.vercel.app"})=>{const[a,s]=y.useState([]),i=(u,d)=>{const p=Date.now();s(g=>[...g,{id:p,message:u,type:d}]),setTimeout(()=>{s(g=>g.filter(b=>b.id!==p))},4e3)},c=Fe[t];return l.jsxs(ue.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:117",value:{addToast:i,language:t,t:c,apiKey:r,baseUrl:n},children:[e,l.jsx(Pe,{"data-source-path":"/src/components/ViewGateProvider.tsx:119"}),l.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:120",className:"vg-toasts",children:a.map(u=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:122",className:`vg-toast vg-glassmorphism vg-animate-slide ${u.type}`,children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:123",style:{fontSize:"20px"},children:u.type==="success"?"✅":"❌"}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:124",children:[l.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:125",style:{display:"block"},children:u.type==="success"?c.successHeader:c.errorHeader}),l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:126",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 R(e){const t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}let _=null;function fe(e={}){return _||(e.includeStyleProperties?(_=e.includeStyleProperties,_):(_=R(window.getComputedStyle(document.documentElement)),_))}function W(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function Me(e){const t=W(e,"border-left-width"),r=W(e,"border-right-width");return e.clientWidth+t+r}function He(e){const t=W(e,"border-top-width"),r=W(e,"border-bottom-width");return e.clientHeight+t+r}function me(e,t={}){const r=t.width||Me(e),n=t.height||He(e);return{width:r,height:n}}function $e(){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 S=16384;function We(e){(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))}function z(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 ze(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),ze(a)}const E=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||E(r,t)};function Ye(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Be(e,t){return fe(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 pe(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){pe(e,t,":before",r),pe(e,t,":after",r)}const he="application/font-woff",ge="image/jpeg",Ze={woff:he,woff2:he,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 qe(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function q(e){const t=qe(e).toLowerCase();return Ze[t]||""}function Ke(e){return e.split(/,/)[1]}function K(e){return e.search(/^(data:)/)!==-1}function Qe(e,t){return`data:${t};base64,${e}`}async function ye(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 Q={};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 ee(e,t,r){const n=et(e,t,r.includeQueryParams);if(Q[n]!=null)return Q[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await ye(e,r.fetchRequestInit,({res:i,result:c})=>(t||(t=i.headers.get("Content-Type")||""),Ke(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 Q[n]=a,a}async function tt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):z(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 z(c)}const r=e.poster,n=q(r),a=await ee(r,n,t);return z(a)}async function nt(e,t){var r;try{if(!((r=e?.contentDocument)===null||r===void 0)&&r.body)return await U(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function st(e,t){return E(e,HTMLCanvasElement)?tt(e):E(e,HTMLVideoElement)?rt(e,t):E(e,HTMLIFrameElement)?nt(e,t):e.cloneNode(xe(e))}const at=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",xe=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ot(e,t,r){var n,a;if(xe(t))return t;let s=[];return at(e)&&e.assignedNodes?s=R(e.assignedNodes()):E(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?s=R(e.contentDocument.body.childNodes):s=R(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||E(e,HTMLVideoElement)||await s.reduce((i,c)=>i.then(()=>U(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):fe(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`),E(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){E(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),E(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function lt(e,t){if(E(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 E(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 U(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 U(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 we=/url\((['"]?)([^'"]+?)\1\)/g,ft=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,mt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function pt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ht(e){const t=[];return e.replace(we,(r,n,a)=>(t.push(a),r)),t.filter(r=>!K(r))}async function gt(e,t,r,n,a){try{const s=r?Ne(t,r):t,i=q(t);let c;return a||(c=await ee(s,i,n)),e.replace(pt(t),`$1${c}$3`)}catch{}return e}function yt(e,{preferredFontFormat:t}){return t?e.replace(mt,r=>{for(;;){const[n,,a]=ft.exec(r)||[];if(!a)return"";if(a===t)return`src: ${n};`}}):e}function ve(e){return e.search(we)!==-1}async function be(e,t,r){if(!ve(e))return e;const n=yt(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 be(a,null,r);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function xt(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=E(e,HTMLImageElement);if(!(r&&!K(e.src))&&!(E(e,SVGImageElement)&&!K(e.href.baseVal)))return;const n=r?e.src:e.href.baseVal,a=await ee(n,q(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=R(e.childNodes).map(a=>Ee(a,t));await Promise.all(n).then(()=>e)}async function Ee(e,t){E(e,Element)&&(await xt(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 Se={};async function Ce(e){let t=Se[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},Se[e]=t,t}async function Re(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),ye(c,t.fetchRequestInit,({result:u})=>(r=r.replace(i,`url(${u})`),[i,u]))});return Promise.all(s).then(()=>r)}function ke(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 Et(e,t){const r=[],n=[];return e.forEach(a=>{if("cssRules"in a)try{R(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let c=i+1;const u=s.href,d=Ce(u).then(p=>Re(p,t)).then(p=>ke(p).forEach(g=>{try{a.insertRule(g,g.startsWith("@import")?c+=1:a.cssRules.length)}catch(b){console.error("Error inserting rule from remote css",{rule:g,error:b})}})).catch(p=>{console.error("Error loading remote css",p.toString())});n.push(d)}})}catch(s){const i=e.find(c=>c.href==null)||document.styleSheets[0];a.href!=null&&n.push(Ce(a.href).then(c=>Re(c,t)).then(c=>ke(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{R(a.cssRules||[]).forEach(s=>{r.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),r))}function St(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>ve(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=R(e.ownerDocument.styleSheets),n=await Et(r,t);return St(n)}function Te(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(Te(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(Te(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return be(s.cssText,i,t)}))).join(`
8
- `)}async function Tt(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 Pt(e,t={}){const{width:r,height:n}=me(e,t),a=await U(e,t,!0);return await Tt(a,t),await Ee(a,t),bt(a,t),await Ue(a,r,n)}async function jt(e,t={}){const{width:r,height:n}=me(e,t),a=await Pt(e,t),s=await z(a),i=document.createElement("canvas"),c=i.getContext("2d"),u=t.pixelRatio||$e(),d=t.canvasWidth||r,p=t.canvasHeight||n;return i.width=d*u,i.height=p*u,t.skipAutoScale||We(i),i.style.width=`${d}`,i.style.height=`${p}`,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 Ot(e,t={}){return(await jt(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=>{const t=e.getAttribute("data-source-path")||"unknown:0",r=_t(e),a=(c=>{const u=[];let d=c;for(;d&&d.nodeType===Node.ELEMENT_NODE;){let p=d.nodeName.toLowerCase();if(d.id){p+="#"+d.id,u.unshift(p);break}else{let g=d,b=1;for(;g.previousElementSibling;)g=g.previousElementSibling,g.nodeName.toLowerCase()===p&&b++;b>1&&(p+=`:nth-of-type(${b})`)}u.unshift(p),d=d.parentElement}return u.join(" > ")})(e),s=(e.innerText||"").slice(0,50).trim(),i=`${e.tagName.toLowerCase()}-${s.replace(/\s+/g,"_")}-${a.split(" > ").slice(-2).join("_")}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:a,outerHtml:(e.outerHTML||"").slice(0,500),parentContext:(e.parentElement?.innerText||"").slice(0,100).trim(),componentPath:r,signature:i,source:t}},Pe=()=>{const{addToast:e,language:t,t:r,apiKey:n,baseUrl:a}=de(),[s,i]=y.useState(!1),[c,u]=y.useState(null),[d,p]=y.useState(null),[g,b]=y.useState(""),[k,N]=y.useState(!1),[Y,A]=y.useState(!1),[P,B]=y.useState(!1),[D,re]=y.useState([]),[ne,J]=y.useState(!1),T=y.useCallback(async()=>{if(n){J(!0);try{const m=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":n}});if(m.ok){const h=await m.json();re(h)}}catch(m){console.error("Failed to fetch annotations",m)}finally{J(!1)}}},[n,a]);y.useEffect(()=>{(s||P)&&T()},[s,P,T]);const M=y.useCallback(m=>{if(!s||d)return;const h=document.elementFromPoint(m.clientX,m.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]),j=y.useCallback(async m=>{if(!(!s||d)&&c){m.preventDefault(),m.stopPropagation(),A(!0);try{const h=c.element.style.display,L=window.getComputedStyle(c.element).display==="inline";L&&(c.element.style.display="inline-block");const O=await Ot(c.element,{backgroundColor:"#ffffff",pixelRatio:2,skipFonts:!0,style:{margin:"0",padding:"4px"}});L&&(c.element.style.display=h),p({...c,visualPreview:O})}catch(h){console.error("Failed to capture preview:",h),p(c)}finally{A(!1),u(null)}}},[s,c,d,P]);y.useEffect(()=>(s&&!d?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("mousemove",M),window.addEventListener("click",j,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("mousemove",M),window.removeEventListener("click",j,!0)}),[s,d,M,j]);const se=async()=>{if(!d||!g.trim())return;N(!0);const{semanticReference:m}=d,[h,L]=m.source.split(":"),O=L||"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(O),url:window.location.href,message:g,componentName:m.componentPath||d.tag,reference:m})})).ok)throw new Error("Backend failed");e(r.success,"success"),p(null),b(""),i(!1),T()}catch(H){console.error(H),e(r.error,"error")}finally{N(!1)}},X=m=>m.split("/").pop()?.split("\\").pop()||"unknown";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:259",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}),D.length>0&&l.jsx("button",{onClick:()=>{B(!P),i(!1),p(null)},className:"vg-button-ghost",style:{padding:"12px 24px",fontSize:"15px",marginLeft:"12px",background:"white"},children:r.viewComments})]}),Y&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:284",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:297",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:298",className:"vg-spinner"}),"Capturing..."]})}),s&&c&&!d&&!Y&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:306",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:324",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:337",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:343",style:{margin:"0 0 10px 0",fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:345",style:{marginBottom:"20px"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:346",style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[d.semanticReference.componentPath?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:348",className:"vg-badge",style:{backgroundColor:"#f5f3ff",color:"#7c3aed",borderColor:"#ddd6fe"},children:["📦 ",d.semanticReference.componentPath]}):l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:352",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:357",className:"vg-badge",style:{backgroundColor:"#fdf2f8",color:"#db2777",borderColor:"#fbcfe8"},children:["📄 ",X(d.semanticReference.source.split(":")[0]||"unknown")]})}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:362",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:367",style:{marginTop:"8px",fontSize:"11px",color:"#94a3b8"},children:["🎯 ",d.semanticReference.selector]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:373",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:382",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:385",style:{padding:"12px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60px",maxHeight:"150px",overflow:"hidden",backgroundColor:"white"},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:408",style:{fontSize:"13px",color:"#64748b",fontStyle:"italic"},children:['"',d.previewText,'"']})})]}),l.jsx("textarea",{className:"vg-textarea",value:g,onChange:m=>b(m.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:424",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"24px"},children:[l.jsx("button",{onClick:()=>p(null),className:"vg-button-ghost",children:r.cancel}),l.jsx("button",{onClick:se,className:"vg-button-primary",disabled:k||!g.trim(),style:{opacity:k||!g.trim()?.6:1},children:k?r.submitting:r.send})]})]})}),P&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:446",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:459",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:468",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:469",style:{margin:0,fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:470",onClick:()=>B(!1),className:"vg-button-ghost",style:{padding:"6px 12px"},children:"✕"})]}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:473",style:{overflowY:"auto",flex:1,paddingRight:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:ne?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:475",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:"Cargando..."}):D.length===0?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:477",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:r.noComments}):D.map(m=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:480",style:{border:"1px solid #e2e8f0",borderRadius:"12px",padding:"16px",backgroundColor:m.status==="ready_for_review"?"#f0fdf4":"#fff"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:486",style:{display:"flex",justifyContent:"space-between",marginBottom:"12px"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:487",style:{display:"flex",gap:"8px",alignItems:"center"},children:[m.status==="ready_for_review"?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:489",className:"vg-badge",style:{backgroundColor:"#dcfce7",color:"#166534",borderColor:"#bbf7d0"},children:["✓ ",r.readyForReview]}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:491",className:"vg-badge",style:{backgroundColor:"#fef3c7",color:"#92400e",borderColor:"#fde68a"},children:["⏳ ",r.pending]}),l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:493",style:{fontSize:"12px",color:"#64748b"},children:new Date(m.timestamp).toLocaleString()})]})}),l.jsxs("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:499",style:{margin:"0 0 12px 0",fontSize:"15px",fontWeight:600},children:['"',m.message,'"']}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:501",style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"16px"},children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:502",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:m.componentName||"UI Element"}),m.filePath&&m.filePath!=="unknown"&&l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:506",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:X(m.filePath)})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:512",style:{display:"flex",gap:"8px",justifyContent:"flex-end",borderTop:"1px solid #e2e8f0",paddingTop:"16px",marginTop:"8px"},children:[m.status==="pending"?l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:514",className:"vg-button-primary",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${m._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"ready_for_review"})})).ok&&(T(),e(r.success,"success"))}catch{e(r.error,"error")}},children:["✅ ",r.markReady]}):l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:536",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${m._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"pending"})})).ok&&(T(),e(r.success,"success"))}catch{e(r.error,"error")}},children:["🔄 ",r.reopen]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:559",className:"vg-button-primary",style:{backgroundColor:"#ef4444",display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{if(window.confirm(r.deleteConfirm))try{(await fetch(`${a}/api/annotations/${m._id}`,{method:"DELETE",headers:{"x-api-key":n}})).ok&&(T(),e(r.success,"success"))}catch{e(r.error,"error")}},children:["🗑️ ",r.close]})]})]},m._id))})]})})]})};function te(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(`
7
+ <%s key={someKey} {...props} />`,w,v,L,v),Ve[v+w]=!0)}if(v=null,x!==void 0&&(r(x),v=""+x),i(f)&&(r(f.key),v=""+f.key),"key"in f){x={};for(var oe in f)oe!=="key"&&(x[oe]=f[oe])}else x=f;return v&&c(x,typeof o=="function"?o.displayName||o.name||"Unknown":o),d(o,v,x,a(),Z,ae)}function g(o){b(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===P&&(o._payload.status==="fulfilled"?b(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function b(o){return typeof o=="object"&&o!==null&&o.$$typeof===I}var k=y,I=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),re=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),m=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h=Object.prototype.hasOwnProperty,A=Array.isArray,j=console.createTask?console.createTask:function(){return null};k={react_stack_bottom_frame:function(o){return o()}};var H,je={},Oe=k.react_stack_bottom_frame.bind(k,s)(),_e=j(n(s)),Ve={};F.Fragment=V,F.jsx=function(o,f,x){var w=1e4>m.recentlyCreatedOwnerStacks++;return p(o,f,x,!1,w?Error("react-stack-top-frame"):Oe,w?j(n(o)):_e)},F.jsxs=function(o,f,x){var w=1e4>m.recentlyCreatedOwnerStacks++;return p(o,f,x,!0,w?Error("react-stack-top-frame"):Oe,w?j(n(o)):_e)}})()),F}var le;function Ge(){return le||(le=1,process.env.NODE_ENV==="production"?$.exports=Ae():$.exports=Le()),$.exports}var l=Ge();const Fe={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"},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"}},ue=y.createContext(void 0),de=()=>{const e=y.useContext(ue);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},Ie=({children:e,language:t="es",apiKey:r,baseUrl:n="https://view-gate.vercel.app"})=>{const[a,s]=y.useState([]),i=(u,d)=>{const p=Date.now();s(g=>[...g,{id:p,message:u,type:d}]),setTimeout(()=>{s(g=>g.filter(b=>b.id!==p))},4e3)},c=Fe[t];return l.jsxs(ue.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:117",value:{addToast:i,language:t,t:c,apiKey:r,baseUrl:n},children:[e,l.jsx(Pe,{"data-source-path":"/src/components/ViewGateProvider.tsx:119"}),l.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:120",className:"vg-toasts",children:a.map(u=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:122",className:`vg-toast vg-glassmorphism vg-animate-slide ${u.type}`,children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:123",style:{fontSize:"20px"},children:u.type==="success"?"✅":"❌"}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:124",children:[l.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:125",style:{display:"block"},children:u.type==="success"?c.successHeader:c.errorHeader}),l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:126",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 R(e){const t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}let O=null;function fe(e={}){return O||(e.includeStyleProperties?(O=e.includeStyleProperties,O):(O=R(window.getComputedStyle(document.documentElement)),O))}function W(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function Me(e){const t=W(e,"border-left-width"),r=W(e,"border-right-width");return e.clientWidth+t+r}function He(e){const t=W(e,"border-top-width"),r=W(e,"border-bottom-width");return e.clientHeight+t+r}function me(e,t={}){const r=t.width||Me(e),n=t.height||He(e);return{width:r,height:n}}function $e(){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 S=16384;function We(e){(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))}function z(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 ze(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),ze(a)}const E=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||E(r,t)};function Ye(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Be(e,t){return fe(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 pe(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){pe(e,t,":before",r),pe(e,t,":after",r)}const he="application/font-woff",ge="image/jpeg",Ze={woff:he,woff2:he,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 qe(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function q(e){const t=qe(e).toLowerCase();return Ze[t]||""}function Ke(e){return e.split(/,/)[1]}function K(e){return e.search(/^(data:)/)!==-1}function Qe(e,t){return`data:${t};base64,${e}`}async function ye(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 Q={};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 ee(e,t,r){const n=et(e,t,r.includeQueryParams);if(Q[n]!=null)return Q[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await ye(e,r.fetchRequestInit,({res:i,result:c})=>(t||(t=i.headers.get("Content-Type")||""),Ke(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 Q[n]=a,a}async function tt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):z(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 z(c)}const r=e.poster,n=q(r),a=await ee(r,n,t);return z(a)}async function nt(e,t){var r;try{if(!((r=e?.contentDocument)===null||r===void 0)&&r.body)return await U(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function st(e,t){return E(e,HTMLCanvasElement)?tt(e):E(e,HTMLVideoElement)?rt(e,t):E(e,HTMLIFrameElement)?nt(e,t):e.cloneNode(xe(e))}const at=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",xe=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ot(e,t,r){var n,a;if(xe(t))return t;let s=[];return at(e)&&e.assignedNodes?s=R(e.assignedNodes()):E(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?s=R(e.contentDocument.body.childNodes):s=R(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||E(e,HTMLVideoElement)||await s.reduce((i,c)=>i.then(()=>U(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):fe(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`),E(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){E(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),E(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function lt(e,t){if(E(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 E(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 U(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 U(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 we=/url\((['"]?)([^'"]+?)\1\)/g,ft=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,mt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function pt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ht(e){const t=[];return e.replace(we,(r,n,a)=>(t.push(a),r)),t.filter(r=>!K(r))}async function gt(e,t,r,n,a){try{const s=r?Ne(t,r):t,i=q(t);let c;return a||(c=await ee(s,i,n)),e.replace(pt(t),`$1${c}$3`)}catch{}return e}function yt(e,{preferredFontFormat:t}){return t?e.replace(mt,r=>{for(;;){const[n,,a]=ft.exec(r)||[];if(!a)return"";if(a===t)return`src: ${n};`}}):e}function ve(e){return e.search(we)!==-1}async function be(e,t,r){if(!ve(e))return e;const n=yt(e,r);return ht(n).reduce((s,i)=>s.then(c=>gt(c,i,t,r)),Promise.resolve(n))}async function _(e,t,r){var n;const a=(n=t.style)===null||n===void 0?void 0:n.getPropertyValue(e);if(a){const s=await be(a,null,r);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function xt(e,t){await _("background",e,t)||await _("background-image",e,t),await _("mask",e,t)||await _("-webkit-mask",e,t)||await _("mask-image",e,t)||await _("-webkit-mask-image",e,t)}async function wt(e,t){const r=E(e,HTMLImageElement);if(!(r&&!K(e.src))&&!(E(e,SVGImageElement)&&!K(e.href.baseVal)))return;const n=r?e.src:e.href.baseVal,a=await ee(n,q(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=R(e.childNodes).map(a=>Ee(a,t));await Promise.all(n).then(()=>e)}async function Ee(e,t){E(e,Element)&&(await xt(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 Se={};async function Ce(e){let t=Se[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},Se[e]=t,t}async function Re(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),ye(c,t.fetchRequestInit,({result:u})=>(r=r.replace(i,`url(${u})`),[i,u]))});return Promise.all(s).then(()=>r)}function ke(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 Et(e,t){const r=[],n=[];return e.forEach(a=>{if("cssRules"in a)try{R(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let c=i+1;const u=s.href,d=Ce(u).then(p=>Re(p,t)).then(p=>ke(p).forEach(g=>{try{a.insertRule(g,g.startsWith("@import")?c+=1:a.cssRules.length)}catch(b){console.error("Error inserting rule from remote css",{rule:g,error:b})}})).catch(p=>{console.error("Error loading remote css",p.toString())});n.push(d)}})}catch(s){const i=e.find(c=>c.href==null)||document.styleSheets[0];a.href!=null&&n.push(Ce(a.href).then(c=>Re(c,t)).then(c=>ke(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{R(a.cssRules||[]).forEach(s=>{r.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),r))}function St(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>ve(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=R(e.ownerDocument.styleSheets),n=await Et(r,t);return St(n)}function Te(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(Te(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(Te(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return be(s.cssText,i,t)}))).join(`
8
+ `)}async function Tt(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 Pt(e,t={}){const{width:r,height:n}=me(e,t),a=await U(e,t,!0);return await Tt(a,t),await Ee(a,t),bt(a,t),await Ue(a,r,n)}async function jt(e,t={}){const{width:r,height:n}=me(e,t),a=await Pt(e,t),s=await z(a),i=document.createElement("canvas"),c=i.getContext("2d"),u=t.pixelRatio||$e(),d=t.canvasWidth||r,p=t.canvasHeight||n;return i.width=d*u,i.height=p*u,t.skipAutoScale||We(i),i.style.width=`${d}`,i.style.height=`${p}`,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 Ot(e,t={}){return(await jt(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=>{const t=e.getAttribute("data-source-path")||"unknown:0",r=_t(e),a=(c=>{const u=[];let d=c;for(;d&&d.nodeType===Node.ELEMENT_NODE;){let p=d.nodeName.toLowerCase();if(d.id){p+="#"+d.id,u.unshift(p);break}else{let g=d,b=1;for(;g.previousElementSibling;)g=g.previousElementSibling,g.nodeName.toLowerCase()===p&&b++;b>1&&(p+=`:nth-of-type(${b})`)}u.unshift(p),d=d.parentElement}return u.join(" > ")})(e),s=(e.innerText||"").slice(0,50).trim(),i=`${e.tagName.toLowerCase()}-${s.replace(/\s+/g,"_")}-${a.split(" > ").slice(-2).join("_")}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:a,outerHtml:(e.outerHTML||"").slice(0,500),parentContext:(e.parentElement?.innerText||"").slice(0,100).trim(),componentPath:r,signature:i,source:t}},Pe=()=>{const{addToast:e,language:t,t:r,apiKey:n,baseUrl:a}=de(),[s,i]=y.useState(!1),[c,u]=y.useState(null),[d,p]=y.useState(null),[g,b]=y.useState(""),[k,I]=y.useState(!1),[Y,V]=y.useState(!1),[N,B]=y.useState(!1),[D,re]=y.useState([]),[ne,J]=y.useState(!1),T=y.useCallback(async()=>{if(n){J(!0);try{const m=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":n}});if(m.ok){const h=await m.json();re(h)}}catch(m){console.error("Failed to fetch annotations",m)}finally{J(!1)}}},[n,a]);y.useEffect(()=>{T()},[T]);const M=y.useCallback(m=>{if(!s||d)return;const h=document.elementFromPoint(m.clientX,m.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]),P=y.useCallback(async m=>{if(!(!s||d)&&c){m.preventDefault(),m.stopPropagation(),V(!0);try{const h=c.element.style.display,A=window.getComputedStyle(c.element).display==="inline";A&&(c.element.style.display="inline-block");const j=await Ot(c.element,{backgroundColor:"#ffffff",pixelRatio:2,skipFonts:!0,style:{margin:"0",padding:"4px"}});A&&(c.element.style.display=h),p({...c,visualPreview:j})}catch(h){console.error("Failed to capture preview:",h),p(c)}finally{V(!1),u(null)}}},[s,c,d,N]);y.useEffect(()=>(s&&!d?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("mousemove",M),window.addEventListener("click",P,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("mousemove",M),window.removeEventListener("click",P,!0)}),[s,d,M,P]);const se=async()=>{if(!d||!g.trim())return;I(!0);const{semanticReference:m}=d,[h,A]=m.source.split(":"),j=A||"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(j),url:window.location.href,message:g,componentName:m.componentPath||d.tag,reference:m})})).ok)throw new Error("Backend failed");e(r.success,"success"),p(null),b(""),i(!1),T()}catch(H){console.error(H),e(r.error,"error")}finally{I(!1)}},X=m=>m.split("/").pop()?.split("\\").pop()||"unknown";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:257",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}),D.length>0&&l.jsx("button",{onClick:()=>{B(!N),i(!1),p(null)},className:"vg-button-ghost",style:{padding:"12px 24px",fontSize:"15px",marginLeft:"12px",background:"white"},children:r.viewComments})]}),Y&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:282",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:295",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:296",className:"vg-spinner"}),"Capturing..."]})}),s&&c&&!d&&!Y&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:304",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:322",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:335",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:341",style:{margin:"0 0 10px 0",fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:343",style:{marginBottom:"20px"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:344",style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[d.semanticReference.componentPath?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:346",className:"vg-badge",style:{backgroundColor:"#f5f3ff",color:"#7c3aed",borderColor:"#ddd6fe"},children:["📦 ",d.semanticReference.componentPath]}):l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:350",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:355",className:"vg-badge",style:{backgroundColor:"#fdf2f8",color:"#db2777",borderColor:"#fbcfe8"},children:["📄 ",X(d.semanticReference.source.split(":")[0]||"unknown")]})}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:360",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:365",style:{marginTop:"8px",fontSize:"11px",color:"#94a3b8"},children:["🎯 ",d.semanticReference.selector]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:371",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:380",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:383",style:{padding:"12px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60px",maxHeight:"150px",overflow:"hidden",backgroundColor:"white"},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:406",style:{fontSize:"13px",color:"#64748b",fontStyle:"italic"},children:['"',d.previewText,'"']})})]}),l.jsx("textarea",{className:"vg-textarea",value:g,onChange:m=>b(m.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:422",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"24px"},children:[l.jsx("button",{onClick:()=>p(null),className:"vg-button-ghost",children:r.cancel}),l.jsx("button",{onClick:se,className:"vg-button-primary",disabled:k||!g.trim(),style:{opacity:k||!g.trim()?.6:1},children:k?r.submitting:r.send})]})]})}),N&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:444",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:457",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:466",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:467",style:{margin:0,fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:468",onClick:()=>B(!1),className:"vg-button-ghost",style:{padding:"6px 12px"},children:"✕"})]}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:471",style:{overflowY:"auto",flex:1,paddingRight:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:ne?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:473",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:"Cargando..."}):D.length===0?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:475",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:r.noComments}):D.map(m=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:478",style:{border:"1px solid #e2e8f0",borderRadius:"12px",padding:"16px",backgroundColor:m.status==="ready_for_review"?"#f0fdf4":"#fff"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:484",style:{display:"flex",justifyContent:"space-between",marginBottom:"12px"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:485",style:{display:"flex",gap:"8px",alignItems:"center"},children:[m.status==="ready_for_review"?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:487",className:"vg-badge",style:{backgroundColor:"#dcfce7",color:"#166534",borderColor:"#bbf7d0"},children:["✓ ",r.readyForReview]}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:489",className:"vg-badge",style:{backgroundColor:"#fef3c7",color:"#92400e",borderColor:"#fde68a"},children:["⏳ ",r.pending]}),l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:491",style:{fontSize:"12px",color:"#64748b"},children:new Date(m.timestamp).toLocaleString()})]})}),l.jsxs("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:497",style:{margin:"0 0 12px 0",fontSize:"15px",fontWeight:600},children:['"',m.message,'"']}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:499",style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"16px"},children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:500",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:m.componentName||"UI Element"}),m.filePath&&m.filePath!=="unknown"&&l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:504",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:X(m.filePath)})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:510",style:{display:"flex",gap:"8px",justifyContent:"flex-end",borderTop:"1px solid #e2e8f0",paddingTop:"16px",marginTop:"8px"},children:[m.status==="pending"?l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:512",className:"vg-button-primary",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${m._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"ready_for_review"})})).ok&&(T(),e(r.success,"success"))}catch{e(r.error,"error")}},children:["✅ ",r.markReady]}):l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:534",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${m._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"pending"})})).ok&&(T(),e(r.success,"success"))}catch{e(r.error,"error")}},children:["🔄 ",r.reopen]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:557",className:"vg-button-primary",style:{backgroundColor:"#ef4444",display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{if(window.confirm(r.deleteConfirm))try{(await fetch(`${a}/api/annotations/${m._id}`,{method:"DELETE",headers:{"x-api-key":n}})).ok&&(T(),e(r.success,"success"))}catch{e(r.error,"error")}},children:["🗑️ ",r.close]})]})]},m._id))})]})})]})};function te(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,(p,g,b)=>p.includes("data-source-path")||b==="Fragment"||b==="React.Fragment"?p:`${g}<${b} data-source-path="${a}:${d}"`)}).join(`
10
10
  `)}function At(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:te(e,t,process.cwd()),map:null}}}}function Lt(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,te(e,t,process.cwd())):e}C.ViewGate=Ie,C.ViewGateOverlay=Pe,C.transformSourcePaths=te,C.useViewGate=de,C.viewgateNextLoader=Lt,C.viewgatePlugin=At,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-wrapper",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "type": "module",
5
5
  "main": "./dist/viewgate-wrapper.umd.cjs",
6
6
  "module": "./dist/viewgate-wrapper.js",