viewgate-wrapper 1.8.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import Ae, { createContext as Ge, useState as C, useContext as $e, useCallback as ae, useEffect as ue } from "react";
3
- var J = { exports: {} }, z = {};
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-pulse-green{0%{box-shadow:0 0 #10b981b3;border-color:#10b981}70%{box-shadow:0 0 0 15px #10b98100;border-color:#10b981}to{box-shadow:0 0 #10b98100;border-color:#10b981}}.vg-highlight-active{animation:vg-pulse-green 2s infinite!important;outline:4px solid #10b981!important;outline-offset:2px!important;transition:all .3s ease!important;position:relative!important;z-index:9999!important}.vg-highlight-active:after{content:"✓ Revised";position:absolute;top:-25px;left:0;background:#10b981;color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:800;text-transform:uppercase;white-space:nowrap;pointer-events:none}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import Ae, { createContext as Ge, useState as C, useContext as Le, useCallback as oe, useEffect as Z } from "react";
3
+ var K = { exports: {} }, U = {};
4
4
  var de;
5
- function Le() {
6
- if (de) return z;
5
+ function $e() {
6
+ if (de) return U;
7
7
  de = 1;
8
8
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
9
9
  function r(n, a, s) {
@@ -21,50 +21,50 @@ function Le() {
21
21
  props: s
22
22
  };
23
23
  }
24
- return z.Fragment = t, z.jsx = r, z.jsxs = r, z;
24
+ return U.Fragment = t, U.jsx = r, U.jsxs = r, U;
25
25
  }
26
- var W = {};
26
+ var Y = {};
27
27
  var fe;
28
28
  function Ie() {
29
29
  return fe || (fe = 1, process.env.NODE_ENV !== "production" && (function() {
30
30
  function e(o) {
31
31
  if (o == null) return null;
32
32
  if (typeof o == "function")
33
- return o.$$typeof === k ? null : o.displayName || o.name || null;
33
+ return o.$$typeof === P ? null : o.displayName || o.name || null;
34
34
  if (typeof o == "string") return o;
35
35
  switch (o) {
36
- case P:
36
+ case V:
37
37
  return "Fragment";
38
- case Y:
38
+ case B:
39
39
  return "Profiler";
40
- case F:
40
+ case N:
41
41
  return "StrictMode";
42
- case D:
42
+ case M:
43
43
  return "Suspense";
44
- case ee:
44
+ case ne:
45
45
  return "SuspenseList";
46
- case q:
46
+ case J:
47
47
  return "Activity";
48
48
  }
49
49
  if (typeof o == "object")
50
50
  switch (typeof o.tag == "number" && console.error(
51
51
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
52
52
  ), o.$$typeof) {
53
- case U:
53
+ case q:
54
54
  return "Portal";
55
- case Q:
55
+ case re:
56
56
  return o.displayName || "Context";
57
- case N:
57
+ case D:
58
58
  return (o._context.displayName || "Context") + ".Consumer";
59
- case _:
60
- var f = o.render;
61
- return o = o.displayName, o || (o = f.displayName || f.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
62
- case te:
63
- return f = o.displayName || null, f !== null ? f : e(o.type) || "Memo";
64
- case M:
65
- f = o._payload, o = o._init;
59
+ case A:
60
+ var p = o.render;
61
+ return o = o.displayName, o || (o = p.displayName || p.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
62
+ case se:
63
+ return p = o.displayName || null, p !== null ? p : e(o.type) || "Memo";
64
+ case H:
65
+ p = o._payload, o = o._init;
66
66
  try {
67
- return e(o(f));
67
+ return e(o(p));
68
68
  } catch {
69
69
  }
70
70
  }
@@ -76,50 +76,50 @@ function Ie() {
76
76
  function r(o) {
77
77
  try {
78
78
  t(o);
79
- var f = !1;
79
+ var p = !1;
80
80
  } catch {
81
- f = !0;
81
+ p = !0;
82
82
  }
83
- if (f) {
84
- f = console;
85
- var x = f.error, w = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
83
+ if (p) {
84
+ p = console;
85
+ var x = p.error, y = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
86
86
  return x.call(
87
- f,
87
+ p,
88
88
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
89
- w
89
+ y
90
90
  ), t(o);
91
91
  }
92
92
  }
93
93
  function n(o) {
94
- if (o === P) return "<>";
95
- if (typeof o == "object" && o !== null && o.$$typeof === M)
94
+ if (o === V) return "<>";
95
+ if (typeof o == "object" && o !== null && o.$$typeof === H)
96
96
  return "<...>";
97
97
  try {
98
- var f = e(o);
99
- return f ? "<" + f + ">" : "<...>";
98
+ var p = e(o);
99
+ return p ? "<" + p + ">" : "<...>";
100
100
  } catch {
101
101
  return "<...>";
102
102
  }
103
103
  }
104
104
  function a() {
105
- var o = T.A;
105
+ var o = G.A;
106
106
  return o === null ? null : o.getOwner();
107
107
  }
108
108
  function s() {
109
109
  return Error("react-stack-top-frame");
110
110
  }
111
111
  function i(o) {
112
- if (V.call(o, "key")) {
113
- var f = Object.getOwnPropertyDescriptor(o, "key").get;
114
- if (f && f.isReactWarning) return !1;
112
+ if (T.call(o, "key")) {
113
+ var p = Object.getOwnPropertyDescriptor(o, "key").get;
114
+ if (p && p.isReactWarning) return !1;
115
115
  }
116
116
  return o.key !== void 0;
117
117
  }
118
- function c(o, f) {
118
+ function c(o, p) {
119
119
  function x() {
120
- p || (p = !0, console.error(
120
+ X || (X = !0, console.error(
121
121
  "%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)",
122
- f
122
+ p
123
123
  ));
124
124
  }
125
125
  x.isReactWarning = !0, Object.defineProperty(o, "key", {
@@ -129,19 +129,19 @@ function Ie() {
129
129
  }
130
130
  function u() {
131
131
  var o = e(this.type);
132
- return h[o] || (h[o] = !0, console.error(
132
+ return W[o] || (W[o] = !0, console.error(
133
133
  "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."
134
134
  )), o = this.props.ref, o !== void 0 ? o : null;
135
135
  }
136
- function d(o, f, x, w, B, ne) {
137
- var v = x.ref;
136
+ function d(o, p, x, y, R, L) {
137
+ var w = x.ref;
138
138
  return o = {
139
- $$typeof: R,
139
+ $$typeof: j,
140
140
  type: o,
141
- key: f,
141
+ key: p,
142
142
  props: x,
143
- _owner: w
144
- }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(o, "ref", {
143
+ _owner: y
144
+ }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(o, "ref", {
145
145
  enumerable: !1,
146
146
  get: u
147
147
  }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
@@ -158,69 +158,69 @@ function Ie() {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
- value: B
161
+ value: R
162
162
  }), Object.defineProperty(o, "_debugTask", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: ne
166
+ value: L
167
167
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
168
168
  }
169
- function m(o, f, x, w, B, ne) {
170
- var v = f.children;
171
- if (v !== void 0)
172
- if (w)
173
- if (re(v)) {
174
- for (w = 0; w < v.length; w++)
175
- g(v[w]);
176
- Object.freeze && Object.freeze(v);
169
+ function h(o, p, x, y, R, L) {
170
+ var w = p.children;
171
+ if (w !== void 0)
172
+ if (y)
173
+ if (z(w)) {
174
+ for (y = 0; y < w.length; y++)
175
+ g(w[y]);
176
+ Object.freeze && Object.freeze(w);
177
177
  } else
178
178
  console.error(
179
179
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
180
180
  );
181
- else g(v);
182
- if (V.call(f, "key")) {
183
- v = e(o);
184
- var $ = Object.keys(f).filter(function(Ve) {
181
+ else g(w);
182
+ if (T.call(p, "key")) {
183
+ w = e(o);
184
+ var $ = Object.keys(p).filter(function(Ve) {
185
185
  return Ve !== "key";
186
186
  });
187
- w = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", H[v + w] || ($ = 0 < $.length ? "{" + $.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ y = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", k[w + y] || ($ = 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} />
191
191
  React keys must be passed directly to JSX without using spread:
192
192
  let props = %s;
193
193
  <%s key={someKey} {...props} />`,
194
+ y,
194
195
  w,
195
- v,
196
196
  $,
197
- v
198
- ), H[v + w] = !0);
197
+ w
198
+ ), k[w + y] = !0);
199
199
  }
200
- if (v = null, x !== void 0 && (r(x), v = "" + x), i(f) && (r(f.key), v = "" + f.key), "key" in f) {
200
+ if (w = null, x !== void 0 && (r(x), w = "" + x), i(p) && (r(p.key), w = "" + p.key), "key" in p) {
201
201
  x = {};
202
- for (var se in f)
203
- se !== "key" && (x[se] = f[se]);
204
- } else x = f;
205
- return v && c(
202
+ for (var ae in p)
203
+ ae !== "key" && (x[ae] = p[ae]);
204
+ } else x = p;
205
+ return w && c(
206
206
  x,
207
207
  typeof o == "function" ? o.displayName || o.name || "Unknown" : o
208
208
  ), d(
209
209
  o,
210
- v,
210
+ w,
211
211
  x,
212
212
  a(),
213
- B,
214
- ne
213
+ R,
214
+ L
215
215
  );
216
216
  }
217
217
  function g(o) {
218
- y(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === M && (o._payload.status === "fulfilled" ? y(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 === H && (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
- function y(o) {
221
- return typeof o == "object" && o !== null && o.$$typeof === R;
220
+ function v(o) {
221
+ return typeof o == "object" && o !== null && o.$$typeof === j;
222
222
  }
223
- var E = Ae, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), U = /* @__PURE__ */ Symbol.for("react.portal"), P = /* @__PURE__ */ Symbol.for("react.fragment"), F = /* @__PURE__ */ Symbol.for("react.strict_mode"), Y = /* @__PURE__ */ Symbol.for("react.profiler"), N = /* @__PURE__ */ Symbol.for("react.consumer"), Q = /* @__PURE__ */ Symbol.for("react.context"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), D = /* @__PURE__ */ Symbol.for("react.suspense"), ee = /* @__PURE__ */ Symbol.for("react.suspense_list"), te = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), q = /* @__PURE__ */ Symbol.for("react.activity"), k = /* @__PURE__ */ Symbol.for("react.client.reference"), T = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, re = Array.isArray, A = console.createTask ? console.createTask : function() {
223
+ var E = Ae, j = /* @__PURE__ */ Symbol.for("react.transitional.element"), q = /* @__PURE__ */ Symbol.for("react.portal"), V = /* @__PURE__ */ Symbol.for("react.fragment"), N = /* @__PURE__ */ Symbol.for("react.strict_mode"), B = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), re = /* @__PURE__ */ Symbol.for("react.context"), A = /* @__PURE__ */ Symbol.for("react.forward_ref"), M = /* @__PURE__ */ Symbol.for("react.suspense"), ne = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), H = /* @__PURE__ */ Symbol.for("react.lazy"), J = /* @__PURE__ */ Symbol.for("react.activity"), P = /* @__PURE__ */ Symbol.for("react.client.reference"), G = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, z = Array.isArray, _ = console.createTask ? console.createTask : function() {
224
224
  return null;
225
225
  };
226
226
  E = {
@@ -228,36 +228,36 @@ React keys must be passed directly to JSX without using spread:
228
228
  return o();
229
229
  }
230
230
  };
231
- var p, h = {}, O = E.react_stack_bottom_frame.bind(
231
+ var X, W = {}, f = E.react_stack_bottom_frame.bind(
232
232
  E,
233
233
  s
234
- )(), G = A(n(s)), H = {};
235
- W.Fragment = P, W.jsx = function(o, f, x) {
236
- var w = 1e4 > T.recentlyCreatedOwnerStacks++;
237
- return m(
234
+ )(), m = _(n(s)), k = {};
235
+ Y.Fragment = V, Y.jsx = function(o, p, x) {
236
+ var y = 1e4 > G.recentlyCreatedOwnerStacks++;
237
+ return h(
238
238
  o,
239
- f,
239
+ p,
240
240
  x,
241
241
  !1,
242
- w ? Error("react-stack-top-frame") : O,
243
- w ? A(n(o)) : G
242
+ y ? Error("react-stack-top-frame") : f,
243
+ y ? _(n(o)) : m
244
244
  );
245
- }, W.jsxs = function(o, f, x) {
246
- var w = 1e4 > T.recentlyCreatedOwnerStacks++;
247
- return m(
245
+ }, Y.jsxs = function(o, p, x) {
246
+ var y = 1e4 > G.recentlyCreatedOwnerStacks++;
247
+ return h(
248
248
  o,
249
- f,
249
+ p,
250
250
  x,
251
251
  !0,
252
- w ? Error("react-stack-top-frame") : O,
253
- w ? A(n(o)) : G
252
+ y ? Error("react-stack-top-frame") : f,
253
+ y ? _(n(o)) : m
254
254
  );
255
255
  };
256
- })()), W;
256
+ })()), Y;
257
257
  }
258
258
  var pe;
259
259
  function Fe() {
260
- return pe || (pe = 1, process.env.NODE_ENV === "production" ? J.exports = Le() : J.exports = Ie()), J.exports;
260
+ return pe || (pe = 1, process.env.NODE_ENV === "production" ? K.exports = $e() : K.exports = Ie()), K.exports;
261
261
  }
262
262
  var l = Fe();
263
263
  const Ne = {
@@ -291,7 +291,7 @@ const Ne = {
291
291
  no: "No, cancel",
292
292
  deleteSuccess: "The annotation has been deleted.",
293
293
  updateSuccess: "Status updated successfully.",
294
- navigating: "Navigating to source..."
294
+ navigating: "Redirecting to review..."
295
295
  },
296
296
  es: {
297
297
  enterMode: "🚀 Activar Modo Comentarios",
@@ -323,22 +323,22 @@ const Ne = {
323
323
  no: "No, cancelar",
324
324
  deleteSuccess: "El comentario ha sido eliminado.",
325
325
  updateSuccess: "Estado actualizado correctamente.",
326
- navigating: "Redirigiendo al origen..."
326
+ navigating: "Redirigiendo a revisión..."
327
327
  }
328
328
  }, be = Ge(void 0), De = () => {
329
- const e = $e(be);
329
+ const e = Le(be);
330
330
  if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
331
331
  return e;
332
332
  }, Ft = ({ children: e, language: t = "es", apiKey: r, baseUrl: n = "https://view-gate.vercel.app" }) => {
333
333
  const [a, s] = C([]), i = (u, d) => {
334
- const m = Date.now();
335
- s((g) => [...g, { id: m, message: u, type: d }]), setTimeout(() => {
336
- s((g) => g.filter((y) => y.id !== m));
334
+ const h = Date.now();
335
+ s((g) => [...g, { id: h, message: u, type: d }]), setTimeout(() => {
336
+ s((g) => g.filter((v) => v.id !== h));
337
337
  }, 4e3);
338
338
  }, c = Ne[t];
339
339
  return /* @__PURE__ */ l.jsxs(be.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:136", value: { addToast: i, language: t, t: c, apiKey: r, baseUrl: n }, children: [
340
340
  e,
341
- /* @__PURE__ */ l.jsx(Lt, { "data-source-path": "/src/components/ViewGateProvider.tsx:138" }),
341
+ /* @__PURE__ */ l.jsx($t, { "data-source-path": "/src/components/ViewGateProvider.tsx:138" }),
342
342
  /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:139", className: "vg-toasts", children: a.map((u) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:141", className: `vg-toast vg-glassmorphism vg-animate-slide ${u.type}`, children: [
343
343
  /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:142", style: { fontSize: "20px" }, children: u.type === "success" ? "✅" : "❌" }),
344
344
  /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:143", children: [
@@ -366,26 +366,26 @@ const He = /* @__PURE__ */ (() => {
366
366
  );
367
367
  return () => (e += 1, `u${t()}${e}`);
368
368
  })();
369
- function j(e) {
369
+ function O(e) {
370
370
  const t = [];
371
371
  for (let r = 0, n = e.length; r < n; r++)
372
372
  t.push(e[r]);
373
373
  return t;
374
374
  }
375
- let L = null;
375
+ let I = null;
376
376
  function Ee(e = {}) {
377
- return L || (e.includeStyleProperties ? (L = e.includeStyleProperties, L) : (L = j(window.getComputedStyle(document.documentElement)), L));
377
+ return I || (e.includeStyleProperties ? (I = e.includeStyleProperties, I) : (I = O(window.getComputedStyle(document.documentElement)), I));
378
378
  }
379
- function X(e, t) {
379
+ function Q(e, t) {
380
380
  const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
381
381
  return n ? parseFloat(n.replace("px", "")) : 0;
382
382
  }
383
383
  function ze(e) {
384
- const t = X(e, "border-left-width"), r = X(e, "border-right-width");
384
+ const t = Q(e, "border-left-width"), r = Q(e, "border-right-width");
385
385
  return e.clientWidth + t + r;
386
386
  }
387
387
  function We(e) {
388
- const t = X(e, "border-top-width"), r = X(e, "border-bottom-width");
388
+ const t = Q(e, "border-top-width"), r = Q(e, "border-bottom-width");
389
389
  return e.clientHeight + t + r;
390
390
  }
391
391
  function Se(e, t = {}) {
@@ -405,7 +405,7 @@ const S = 16384;
405
405
  function Ye(e) {
406
406
  (e.width > S || e.height > S) && (e.width > S && e.height > S ? e.width > e.height ? (e.height *= S / e.width, e.width = S) : (e.width *= S / e.height, e.height = S) : e.width > S ? (e.height *= S / e.width, e.width = S) : (e.width *= S / e.height, e.height = S));
407
407
  }
408
- function Z(e) {
408
+ function ee(e) {
409
409
  return new Promise((t, r) => {
410
410
  const n = new Image();
411
411
  n.onload = () => {
@@ -475,14 +475,14 @@ function et(e) {
475
475
  const t = /\.([^./]*?)$/g.exec(e);
476
476
  return t ? t[1] : "";
477
477
  }
478
- function ce(e) {
478
+ function le(e) {
479
479
  const t = et(e).toLowerCase();
480
480
  return Qe[t] || "";
481
481
  }
482
482
  function tt(e) {
483
483
  return e.split(/,/)[1];
484
484
  }
485
- function ie(e) {
485
+ function ce(e) {
486
486
  return e.search(/^(data:)/) !== -1;
487
487
  }
488
488
  function rt(e, t) {
@@ -504,15 +504,15 @@ async function Ce(e, t, r) {
504
504
  }, c.readAsDataURL(a);
505
505
  });
506
506
  }
507
- const oe = {};
507
+ const ie = {};
508
508
  function nt(e, t, r) {
509
509
  let n = e.replace(/\?.*/, "");
510
510
  return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
511
511
  }
512
- async function le(e, t, r) {
512
+ async function ue(e, t, r) {
513
513
  const n = nt(e, t, r.includeQueryParams);
514
- if (oe[n] != null)
515
- return oe[n];
514
+ if (ie[n] != null)
515
+ return ie[n];
516
516
  r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
517
517
  let a;
518
518
  try {
@@ -523,27 +523,27 @@ async function le(e, t, r) {
523
523
  let i = `Failed to fetch resource: ${e}`;
524
524
  s && (i = typeof s == "string" ? s : s.message), i && console.warn(i);
525
525
  }
526
- return oe[n] = a, a;
526
+ return ie[n] = a, a;
527
527
  }
528
528
  async function st(e) {
529
529
  const t = e.toDataURL();
530
- return t === "data:," ? e.cloneNode(!1) : Z(t);
530
+ return t === "data:," ? e.cloneNode(!1) : ee(t);
531
531
  }
532
532
  async function at(e, t) {
533
533
  if (e.currentSrc) {
534
534
  const s = document.createElement("canvas"), i = s.getContext("2d");
535
535
  s.width = e.clientWidth, s.height = e.clientHeight, i?.drawImage(e, 0, 0, s.width, s.height);
536
536
  const c = s.toDataURL();
537
- return Z(c);
537
+ return ee(c);
538
538
  }
539
- const r = e.poster, n = ce(r), a = await le(r, n, t);
540
- return Z(a);
539
+ const r = e.poster, n = le(r), a = await ue(r, n, t);
540
+ return ee(a);
541
541
  }
542
542
  async function ot(e, t) {
543
543
  var r;
544
544
  try {
545
545
  if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
546
- return await K(e.contentDocument.body, t, !0);
546
+ return await te(e.contentDocument.body, t, !0);
547
547
  } catch {
548
548
  }
549
549
  return e.cloneNode(!1);
@@ -557,7 +557,7 @@ async function lt(e, t, r) {
557
557
  if (Re(t))
558
558
  return t;
559
559
  let s = [];
560
- return ct(e) && e.assignedNodes ? s = j(e.assignedNodes()) : b(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = j(e.contentDocument.body.childNodes) : s = j(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || b(e, HTMLVideoElement) || await s.reduce((i, c) => i.then(() => K(c, r)).then((u) => {
560
+ return ct(e) && e.assignedNodes ? s = O(e.assignedNodes()) : b(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = O(e.contentDocument.body.childNodes) : s = O(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || b(e, HTMLVideoElement) || await s.reduce((i, c) => i.then(() => te(c, r)).then((u) => {
561
561
  u && t.appendChild(u);
562
562
  }), Promise.resolve()), t;
563
563
  }
@@ -592,7 +592,7 @@ async function mt(e, t) {
592
592
  const c = r[s].getAttribute("xlink:href");
593
593
  if (c) {
594
594
  const u = e.querySelector(c), d = document.querySelector(c);
595
- !u && d && !n[c] && (n[c] = await K(d, t, !0));
595
+ !u && d && !n[c] && (n[c] = await te(d, t, !0));
596
596
  }
597
597
  }
598
598
  const a = Object.values(n);
@@ -607,7 +607,7 @@ async function mt(e, t) {
607
607
  }
608
608
  return e;
609
609
  }
610
- async function K(e, t, r) {
610
+ async function te(e, t, r) {
611
611
  return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => it(n, t)).then((n) => lt(e, n, t)).then((n) => pt(e, n, t)).then((n) => mt(n, t));
612
612
  }
613
613
  const ke = /url\((['"]?)([^'"]+?)\1\)/g, ht = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, gt = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
@@ -617,13 +617,13 @@ function xt(e) {
617
617
  }
618
618
  function yt(e) {
619
619
  const t = [];
620
- return e.replace(ke, (r, n, a) => (t.push(a), r)), t.filter((r) => !ie(r));
620
+ return e.replace(ke, (r, n, a) => (t.push(a), r)), t.filter((r) => !ce(r));
621
621
  }
622
622
  async function wt(e, t, r, n, a) {
623
623
  try {
624
- const s = r ? Me(t, r) : t, i = ce(t);
624
+ const s = r ? Me(t, r) : t, i = le(t);
625
625
  let c;
626
- return a || (c = await le(s, i, n)), e.replace(xt(t), `$1${c}$3`);
626
+ return a || (c = await ue(s, i, n)), e.replace(xt(t), `$1${c}$3`);
627
627
  } catch {
628
628
  }
629
629
  return e;
@@ -648,7 +648,7 @@ async function Te(e, t, r) {
648
648
  const n = vt(e, r);
649
649
  return yt(n).reduce((s, i) => s.then((c) => wt(c, i, t, r)), Promise.resolve(n));
650
650
  }
651
- async function I(e, t, r) {
651
+ async function F(e, t, r) {
652
652
  var n;
653
653
  const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
654
654
  if (a) {
@@ -658,13 +658,13 @@ async function I(e, t, r) {
658
658
  return !1;
659
659
  }
660
660
  async function bt(e, t) {
661
- await I("background", e, t) || await I("background-image", e, t), await I("mask", e, t) || await I("-webkit-mask", e, t) || await I("mask-image", e, t) || await I("-webkit-mask-image", e, t);
661
+ await F("background", e, t) || await F("background-image", e, t), await F("mask", e, t) || await F("-webkit-mask", e, t) || await F("mask-image", e, t) || await F("-webkit-mask-image", e, t);
662
662
  }
663
663
  async function Et(e, t) {
664
664
  const r = b(e, HTMLImageElement);
665
- if (!(r && !ie(e.src)) && !(b(e, SVGImageElement) && !ie(e.href.baseVal)))
665
+ if (!(r && !ce(e.src)) && !(b(e, SVGImageElement) && !ce(e.href.baseVal)))
666
666
  return;
667
- const n = r ? e.src : e.href.baseVal, a = await le(n, ce(n), t);
667
+ const n = r ? e.src : e.href.baseVal, a = await ue(n, le(n), t);
668
668
  await new Promise((s, i) => {
669
669
  e.onload = s, e.onerror = t.onImageErrorHandler ? (...u) => {
670
670
  try {
@@ -678,7 +678,7 @@ async function Et(e, t) {
678
678
  });
679
679
  }
680
680
  async function St(e, t) {
681
- const n = j(e.childNodes).map((a) => Oe(a, t));
681
+ const n = O(e.childNodes).map((a) => Oe(a, t));
682
682
  await Promise.all(n).then(() => e);
683
683
  }
684
684
  async function Oe(e, t) {
@@ -739,20 +739,20 @@ async function Rt(e, t) {
739
739
  return e.forEach((a) => {
740
740
  if ("cssRules" in a)
741
741
  try {
742
- j(a.cssRules || []).forEach((s, i) => {
742
+ O(a.cssRules || []).forEach((s, i) => {
743
743
  if (s.type === CSSRule.IMPORT_RULE) {
744
744
  let c = i + 1;
745
- const u = s.href, d = ye(u).then((m) => we(m, t)).then((m) => ve(m).forEach((g) => {
745
+ const u = s.href, d = ye(u).then((h) => we(h, t)).then((h) => ve(h).forEach((g) => {
746
746
  try {
747
747
  a.insertRule(g, g.startsWith("@import") ? c += 1 : a.cssRules.length);
748
- } catch (y) {
748
+ } catch (v) {
749
749
  console.error("Error inserting rule from remote css", {
750
750
  rule: g,
751
- error: y
751
+ error: v
752
752
  });
753
753
  }
754
- })).catch((m) => {
755
- console.error("Error loading remote css", m.toString());
754
+ })).catch((h) => {
755
+ console.error("Error loading remote css", h.toString());
756
756
  });
757
757
  n.push(d);
758
758
  }
@@ -768,7 +768,7 @@ async function Rt(e, t) {
768
768
  }), Promise.all(n).then(() => (e.forEach((a) => {
769
769
  if ("cssRules" in a)
770
770
  try {
771
- j(a.cssRules || []).forEach((s) => {
771
+ O(a.cssRules || []).forEach((s) => {
772
772
  r.push(s);
773
773
  });
774
774
  } catch (s) {
@@ -782,7 +782,7 @@ function kt(e) {
782
782
  async function jt(e, t) {
783
783
  if (e.ownerDocument == null)
784
784
  throw new Error("Provided element is not within a Document");
785
- const r = j(e.ownerDocument.styleSheets), n = await Rt(r, t);
785
+ const r = O(e.ownerDocument.styleSheets), n = await Rt(r, t);
786
786
  return kt(n);
787
787
  }
788
788
  function Pe(e) {
@@ -815,12 +815,12 @@ async function Pt(e, t) {
815
815
  }
816
816
  }
817
817
  async function _t(e, t = {}) {
818
- const { width: r, height: n } = Se(e, t), a = await K(e, t, !0);
818
+ const { width: r, height: n } = Se(e, t), a = await te(e, t, !0);
819
819
  return await Pt(a, t), await Oe(a, t), Ct(a, t), await Be(a, r, n);
820
820
  }
821
821
  async function Vt(e, t = {}) {
822
- const { width: r, height: n } = Se(e, t), a = await _t(e, t), s = await Z(a), i = document.createElement("canvas"), c = i.getContext("2d"), u = t.pixelRatio || Ue(), d = t.canvasWidth || r, m = t.canvasHeight || n;
823
- return i.width = d * u, i.height = m * u, t.skipAutoScale || Ye(i), i.style.width = `${d}`, i.style.height = `${m}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, i.width, i.height)), c.drawImage(s, 0, 0, i.width, i.height), i;
822
+ const { width: r, height: n } = Se(e, t), a = await _t(e, t), s = await ee(a), i = document.createElement("canvas"), c = i.getContext("2d"), u = t.pixelRatio || Ue(), d = t.canvasWidth || r, h = t.canvasHeight || n;
823
+ return i.width = d * u, i.height = h * u, t.skipAutoScale || Ye(i), i.style.width = `${d}`, i.style.height = `${h}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, i.width, i.height)), c.drawImage(s, 0, 0, i.width, i.height), i;
824
824
  }
825
825
  async function At(e, t = {}) {
826
826
  return (await Vt(e, t)).toDataURL();
@@ -839,7 +839,7 @@ const Gt = (e) => {
839
839
  a = a.return;
840
840
  }
841
841
  return n.join(" > ") || "Generic Component";
842
- }, $t = (e) => {
842
+ }, Lt = (e) => {
843
843
  let t = "unknown:0", r = e;
844
844
  for (; r; ) {
845
845
  const d = r.getAttribute("data-source-path");
@@ -850,26 +850,26 @@ const Gt = (e) => {
850
850
  r = r.parentElement;
851
851
  }
852
852
  const n = Gt(e), s = ((d) => {
853
- const m = [];
853
+ const h = [];
854
854
  let g = d;
855
855
  for (; g && g.nodeType === Node.ELEMENT_NODE; ) {
856
- let y = g.nodeName.toLowerCase();
856
+ let v = g.nodeName.toLowerCase();
857
857
  if (g.id) {
858
- y += "#" + g.id, m.unshift(y);
858
+ v += "#" + g.id, h.unshift(v);
859
859
  break;
860
860
  } else {
861
- let E = g, R = 1;
861
+ let E = g, j = 1;
862
862
  for (; E.previousElementSibling; )
863
- E = E.previousElementSibling, E.nodeName.toLowerCase() === y && R++;
864
- R > 1 && (y += `:nth-of-type(${R})`);
863
+ E = E.previousElementSibling, E.nodeName.toLowerCase() === v && j++;
864
+ j > 1 && (v += `:nth-of-type(${j})`);
865
865
  }
866
- m.unshift(y), g = g.parentElement;
866
+ h.unshift(v), g = g.parentElement;
867
867
  }
868
- return m.join(" > ");
868
+ return h.join(" > ");
869
869
  })(e), i = (e.innerText || "").slice(0, 50).trim(), c = {};
870
870
  ["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((d) => {
871
- const m = e.getAttribute(d);
872
- m && (c[d] = m);
871
+ const h = e.getAttribute(d);
872
+ h && (c[d] = h);
873
873
  });
874
874
  const u = `${e.tagName.toLowerCase()}-${i.replace(/\s+/g, "_")}-${s.split(" > ").slice(-2).join("_")}`;
875
875
  return {
@@ -889,50 +889,82 @@ const Gt = (e) => {
889
889
  hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`
890
890
  }
891
891
  };
892
- }, Lt = () => {
893
- const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, m] = C(null), [g, y] = C(""), [E, R] = C(!1), [U, P] = C(!1), [F, Y] = C(!1), [N, Q] = C([]), [_, D] = C(null), [ee, te] = C(!1), [M, q] = C(!1), k = ae(async () => {
892
+ }, $t = () => {
893
+ const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, h] = C(null), [g, v] = C(""), [E, j] = C(!1), [q, V] = C(!1), [N, B] = C(!1), [D, re] = C([]), [A, M] = C(null), [ne, se] = C(!1), [H, J] = C(!1), [P, G] = C(null), T = oe(async () => {
894
894
  if (n) {
895
- q(!0);
895
+ J(!0);
896
896
  try {
897
- const p = await fetch(`${a}/api/annotations`, {
897
+ const f = await fetch(`${a}/api/annotations`, {
898
898
  headers: { "x-api-key": n }
899
899
  });
900
- if (p.ok) {
901
- const h = await p.json();
902
- Q(h);
900
+ if (f.ok) {
901
+ const m = await f.json();
902
+ re(m);
903
903
  }
904
- } catch (p) {
905
- console.error("Failed to fetch annotations", p);
904
+ } catch (f) {
905
+ console.error("Failed to fetch annotations", f);
906
906
  } finally {
907
- q(!1);
907
+ J(!1);
908
908
  }
909
909
  }
910
910
  }, [n, a]);
911
- ue(() => {
912
- k();
913
- }, [k]);
914
- const T = ae((p) => {
911
+ Z(() => {
912
+ const f = () => {
913
+ const m = window.location.hash;
914
+ if (m.includes("vg_hl=")) {
915
+ const k = m.split("vg_hl=");
916
+ if (k.length < 2) return;
917
+ const o = decodeURIComponent(k[1]);
918
+ [100, 500, 1e3, 2e3].forEach((x) => {
919
+ setTimeout(() => {
920
+ const y = document.querySelectorAll("*");
921
+ for (const R of y)
922
+ if (R.tagName.toLowerCase() === o.split("-")[0]) {
923
+ const L = R.getBoundingClientRect();
924
+ if (L.width > 0 && L.height > 0) {
925
+ const w = (R.innerText || "").slice(0, 50).trim().replace(/\s+/g, "_");
926
+ if (o.includes(w)) {
927
+ R.classList.add("vg-highlight-active"), G(R), R.scrollIntoView({ behavior: "smooth", block: "center" });
928
+ break;
929
+ }
930
+ }
931
+ }
932
+ }, x);
933
+ });
934
+ }
935
+ };
936
+ return f(), window.addEventListener("hashchange", f), () => window.removeEventListener("hashchange", f);
937
+ }, []), Z(() => {
938
+ if (!P) return;
939
+ const f = () => {
940
+ P.classList.remove("vg-highlight-active"), G(null), window.history.replaceState && window.history.replaceState(null, "", window.location.pathname + window.location.search);
941
+ };
942
+ return P.addEventListener("mouseover", f), () => P.removeEventListener("mouseover", f);
943
+ }, [P]), Z(() => {
944
+ T();
945
+ }, [T]);
946
+ const z = oe((f) => {
915
947
  if (!s || d) return;
916
- const h = document.elementFromPoint(p.clientX, p.clientY);
917
- if (!h || h.id === "viewgate-overlay" || h.closest("#viewgate-ui")) {
948
+ const m = document.elementFromPoint(f.clientX, f.clientY);
949
+ if (!m || m.id === "viewgate-overlay" || m.closest("#viewgate-ui")) {
918
950
  u(null);
919
951
  return;
920
952
  }
921
- h.getAttribute("data-source-path"), u({
922
- tag: h.tagName.toLowerCase(),
923
- source: h.getAttribute("data-source-path") || "unknown:0",
924
- rect: h.getBoundingClientRect(),
925
- element: h,
926
- previewText: (h.innerText || "").slice(0, 100) || (h.getAttribute("placeholder") || "").slice(0, 100) || h.tagName.toLowerCase(),
927
- semanticReference: $t(h)
953
+ m.getAttribute("data-source-path"), u({
954
+ tag: m.tagName.toLowerCase(),
955
+ source: m.getAttribute("data-source-path") || "unknown:0",
956
+ rect: m.getBoundingClientRect(),
957
+ element: m,
958
+ previewText: (m.innerText || "").slice(0, 100) || (m.getAttribute("placeholder") || "").slice(0, 100) || m.tagName.toLowerCase(),
959
+ semanticReference: Lt(m)
928
960
  });
929
- }, [s, d]), V = ae(async (p) => {
961
+ }, [s, d]), _ = oe(async (f) => {
930
962
  if (!(!s || d) && c) {
931
- p.preventDefault(), p.stopPropagation(), P(!0);
963
+ f.preventDefault(), f.stopPropagation(), V(!0);
932
964
  try {
933
- const h = c.element.style.display, O = window.getComputedStyle(c.element).display === "inline";
934
- O && (c.element.style.display = "inline-block");
935
- const G = await At(c.element, {
965
+ const m = c.element.style.display, k = window.getComputedStyle(c.element).display === "inline";
966
+ k && (c.element.style.display = "inline-block");
967
+ const o = await At(c.element, {
936
968
  backgroundColor: "#ffffff",
937
969
  pixelRatio: 2,
938
970
  skipFonts: !0,
@@ -942,21 +974,21 @@ const Gt = (e) => {
942
974
  // Extra padding for better look
943
975
  }
944
976
  });
945
- O && (c.element.style.display = h), m({ ...c, visualPreview: G });
946
- } catch (h) {
947
- console.error("Failed to capture preview:", h), m(c);
977
+ k && (c.element.style.display = m), h({ ...c, visualPreview: o });
978
+ } catch (m) {
979
+ console.error("Failed to capture preview:", m), h(c);
948
980
  } finally {
949
- P(!1), u(null);
981
+ V(!1), u(null);
950
982
  }
951
983
  }
952
- }, [s, c, d, F]);
953
- ue(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", T), window.addEventListener("click", V, !0), () => {
954
- document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", T), window.removeEventListener("click", V, !0);
955
- }), [s, d, T, V]);
956
- const re = async () => {
984
+ }, [s, c, d, N]);
985
+ Z(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", z), window.addEventListener("click", _, !0), () => {
986
+ document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", z), window.removeEventListener("click", _, !0);
987
+ }), [s, d, z, _]);
988
+ const X = async () => {
957
989
  if (!d || !g.trim()) return;
958
- R(!0);
959
- const { semanticReference: p } = d, [h, O] = p.source.split(":"), G = O || "0";
990
+ j(!0);
991
+ const { semanticReference: f } = d, [m, k] = f.source.split(":"), o = k || "0";
960
992
  try {
961
993
  if (!(await fetch(`${a}/api/annotations`, {
962
994
  method: "POST",
@@ -965,23 +997,23 @@ const Gt = (e) => {
965
997
  "x-api-key": n
966
998
  },
967
999
  body: JSON.stringify({
968
- filePath: h,
969
- line: parseInt(G),
1000
+ filePath: m,
1001
+ line: parseInt(o),
970
1002
  url: window.location.href,
971
1003
  message: g,
972
- componentName: p.componentPath || d.tag,
973
- reference: p
1004
+ componentName: f.componentPath || d.tag,
1005
+ reference: f
974
1006
  })
975
1007
  })).ok) throw new Error("Backend failed");
976
- e(r.success, "success"), m(null), y(""), i(!1), k();
977
- } catch (H) {
978
- console.error(H), e(r.error, "error");
1008
+ e(r.success, "success"), h(null), v(""), i(!1), T();
1009
+ } catch (p) {
1010
+ console.error(p), e(r.error, "error");
979
1011
  } finally {
980
- R(!1);
1012
+ j(!1);
981
1013
  }
982
- }, A = (p) => p.split("/").pop()?.split("\\").pop() || "unknown";
1014
+ }, W = (f) => f.split("/").pop()?.split("\\").pop() || "unknown";
983
1015
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
984
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:282", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
1016
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:344", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
985
1017
  /* @__PURE__ */ l.jsx(
986
1018
  "button",
987
1019
  {
@@ -991,11 +1023,11 @@ const Gt = (e) => {
991
1023
  children: s ? r.exitMode : r.enterMode
992
1024
  }
993
1025
  ),
994
- N.length > 0 && /* @__PURE__ */ l.jsx(
1026
+ D.length > 0 && /* @__PURE__ */ l.jsx(
995
1027
  "button",
996
1028
  {
997
1029
  onClick: () => {
998
- Y(!F), i(!1), m(null);
1030
+ B(!N), i(!1), h(null);
999
1031
  },
1000
1032
  className: "vg-button-ghost",
1001
1033
  style: { padding: "12px 24px", fontSize: "15px", marginLeft: "12px", background: "white" },
@@ -1003,7 +1035,7 @@ const Gt = (e) => {
1003
1035
  }
1004
1036
  )
1005
1037
  ] }),
1006
- U && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:307", style: {
1038
+ q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:369", style: {
1007
1039
  position: "fixed",
1008
1040
  top: 0,
1009
1041
  left: 0,
@@ -1015,11 +1047,11 @@ const Gt = (e) => {
1015
1047
  justifyContent: "center",
1016
1048
  zIndex: 1e5,
1017
1049
  cursor: "wait"
1018
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:320", className: "vg-glassmorphism", style: { padding: "30px 50px", fontWeight: 700, display: "flex", flexDirection: "column", alignItems: "center", backgroundColor: "rgba(0,0,0,0.7)", color: "white", border: "1px solid rgba(255,255,255,0.1)" }, children: [
1019
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:321", className: "vg-spinner" }),
1050
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:382", 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: [
1051
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:383", className: "vg-spinner" }),
1020
1052
  "Capturing..."
1021
1053
  ] }) }),
1022
- s && c && !d && !U && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:329", style: {
1054
+ s && c && !d && !q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:391", style: {
1023
1055
  position: "fixed",
1024
1056
  top: c.rect.top,
1025
1057
  left: c.rect.left,
@@ -1033,7 +1065,7 @@ const Gt = (e) => {
1033
1065
  boxShadow: "0 0 15px rgba(37, 19, 236, 0.2)",
1034
1066
  transition: "all 0.1s ease-out"
1035
1067
  } }),
1036
- d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:347", className: "vg-animate-fade", style: {
1068
+ d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:409", className: "vg-animate-fade", style: {
1037
1069
  position: "fixed",
1038
1070
  top: 0,
1039
1071
  left: 0,
@@ -1045,33 +1077,33 @@ const Gt = (e) => {
1045
1077
  alignItems: "center",
1046
1078
  justifyContent: "center",
1047
1079
  zIndex: 99999
1048
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:360", className: "vg-glassmorphism vg-animate-slide", style: {
1080
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:422", className: "vg-glassmorphism vg-animate-slide", style: {
1049
1081
  padding: "32px",
1050
1082
  width: "460px",
1051
1083
  background: "white",
1052
1084
  color: "#0f172a"
1053
1085
  }, children: [
1054
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:366", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1055
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:368", style: { marginBottom: "20px" }, children: [
1056
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:369", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1057
- d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:371", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
1086
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:428", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1087
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:430", style: { marginBottom: "20px" }, children: [
1088
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:431", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1089
+ d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:433", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
1058
1090
  "📦 ",
1059
1091
  d.tag
1060
- ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:375", className: "vg-badge", children: d.tag }),
1061
- 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:380", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
1092
+ ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:437", className: "vg-badge", children: d.tag }),
1093
+ 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:442", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
1062
1094
  "📄 ",
1063
- A(d.semanticReference.source.split(":")[0] || "unknown")
1064
- ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:385", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1095
+ W(d.semanticReference.source.split(":")[0] || "unknown")
1096
+ ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:447", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1065
1097
  "🆔 ",
1066
1098
  d.semanticReference.signature
1067
1099
  ] })
1068
1100
  ] }),
1069
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:390", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
1101
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:452", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
1070
1102
  "🎯 ",
1071
1103
  d.semanticReference.selector
1072
1104
  ] })
1073
1105
  ] }),
1074
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:396", style: {
1106
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:458", style: {
1075
1107
  backgroundColor: "#f8fafc",
1076
1108
  borderRadius: "8px",
1077
1109
  border: "1px solid #e2e8f0",
@@ -1080,8 +1112,8 @@ const Gt = (e) => {
1080
1112
  display: "flex",
1081
1113
  flexDirection: "column"
1082
1114
  }, children: [
1083
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:405", style: { padding: "8px 12px", fontSize: "10px", color: "#94a3b8", textTransform: "uppercase", fontWeight: 700, borderBottom: "1px solid #f1f5f9" }, children: r.preview }),
1084
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:408", style: {
1115
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:467", style: { padding: "8px 12px", fontSize: "10px", color: "#94a3b8", textTransform: "uppercase", fontWeight: 700, borderBottom: "1px solid #f1f5f9" }, children: r.preview }),
1116
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:470", style: {
1085
1117
  padding: "12px",
1086
1118
  display: "flex",
1087
1119
  justifyContent: "center",
@@ -1090,20 +1122,29 @@ const Gt = (e) => {
1090
1122
  maxHeight: "200px",
1091
1123
  overflow: "hidden",
1092
1124
  backgroundColor: "#fdfdfd"
1093
- }, children: d.visualPreview ? /* @__PURE__ */ l.jsx(
1125
+ }, children: d.visualPreview ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:481", style: {
1126
+ position: "relative",
1127
+ width: "100%",
1128
+ height: "100%",
1129
+ display: "flex",
1130
+ alignItems: "center",
1131
+ justifyContent: "center"
1132
+ }, children: /* @__PURE__ */ l.jsx(
1094
1133
  "img",
1095
1134
  {
1096
1135
  src: d.visualPreview,
1097
1136
  alt: "Element Preview",
1098
1137
  style: {
1099
- maxWidth: "100%",
1100
- maxHeight: "120px",
1138
+ maxWidth: "90%",
1139
+ maxHeight: "160px",
1101
1140
  objectFit: "contain",
1102
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
1103
- borderRadius: "4px"
1141
+ boxShadow: "0 4px 12px rgba(0,0,0,0.12)",
1142
+ borderRadius: "6px",
1143
+ border: "1px solid #e2e8f0",
1144
+ backgroundColor: "white"
1104
1145
  }
1105
1146
  }
1106
- ) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:431", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic" }, children: [
1147
+ ) }) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:504", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic", textAlign: "center", padding: "0 20px" }, children: [
1107
1148
  '"',
1108
1149
  d.previewText,
1109
1150
  '"'
@@ -1114,17 +1155,17 @@ const Gt = (e) => {
1114
1155
  {
1115
1156
  className: "vg-textarea",
1116
1157
  value: g,
1117
- onChange: (p) => y(p.target.value),
1158
+ onChange: (f) => v(f.target.value),
1118
1159
  rows: 4,
1119
1160
  placeholder: r.placeholder,
1120
1161
  autoFocus: !0
1121
1162
  }
1122
1163
  ),
1123
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:447", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1164
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:520", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1124
1165
  /* @__PURE__ */ l.jsx(
1125
1166
  "button",
1126
1167
  {
1127
- onClick: () => m(null),
1168
+ onClick: () => h(null),
1128
1169
  className: "vg-button-ghost",
1129
1170
  children: r.cancel
1130
1171
  }
@@ -1132,7 +1173,7 @@ const Gt = (e) => {
1132
1173
  /* @__PURE__ */ l.jsx(
1133
1174
  "button",
1134
1175
  {
1135
- onClick: re,
1176
+ onClick: X,
1136
1177
  className: "vg-button-primary",
1137
1178
  disabled: E || !g.trim(),
1138
1179
  style: { opacity: E || !g.trim() ? 0.6 : 1 },
@@ -1141,7 +1182,7 @@ const Gt = (e) => {
1141
1182
  )
1142
1183
  ] })
1143
1184
  ] }) }),
1144
- F && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:469", className: "vg-animate-fade", style: {
1185
+ N && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:542", className: "vg-animate-fade", style: {
1145
1186
  position: "fixed",
1146
1187
  top: 0,
1147
1188
  left: 0,
@@ -1153,7 +1194,7 @@ const Gt = (e) => {
1153
1194
  alignItems: "center",
1154
1195
  justifyContent: "center",
1155
1196
  zIndex: 99999
1156
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:482", className: "vg-glassmorphism vg-animate-slide", style: {
1197
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:555", className: "vg-glassmorphism vg-animate-slide", style: {
1157
1198
  padding: "32px",
1158
1199
  width: "600px",
1159
1200
  maxHeight: "80vh",
@@ -1162,49 +1203,55 @@ const Gt = (e) => {
1162
1203
  display: "flex",
1163
1204
  flexDirection: "column"
1164
1205
  }, children: [
1165
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:491", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1166
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:492", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1167
- /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:493", onClick: () => Y(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1206
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:564", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1207
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:565", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1208
+ /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:566", onClick: () => B(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1168
1209
  ] }),
1169
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:496", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: M ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:498", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : N.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:500", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : N.map((p) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:503", style: {
1210
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:569", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: H ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:571", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : D.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:573", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : D.map((f) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:576", style: {
1170
1211
  border: "1px solid #e2e8f0",
1171
1212
  borderRadius: "12px",
1172
1213
  padding: "16px",
1173
- backgroundColor: p.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1214
+ backgroundColor: f.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1174
1215
  }, children: [
1175
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:509", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:510", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1176
- p.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:512", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1216
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:582", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:583", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1217
+ f.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:585", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1177
1218
  "✓ ",
1178
1219
  r.readyForReview
1179
- ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:514", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1220
+ ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:587", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1180
1221
  "⏳ ",
1181
1222
  r.pending
1182
1223
  ] }),
1183
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:516", style: { fontSize: "12px", color: "#64748b" }, children: new Date(p.timestamp).toLocaleString() })
1224
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:589", style: { fontSize: "12px", color: "#64748b" }, children: new Date(f.timestamp).toLocaleString() })
1184
1225
  ] }) }),
1185
- /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:522", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1226
+ /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:595", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1186
1227
  '"',
1187
- p.message,
1228
+ f.message,
1188
1229
  '"'
1189
1230
  ] }),
1190
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:524", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1191
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:525", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: p.componentName || "UI Element" }),
1192
- p.filePath && p.filePath !== "unknown" && /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:529", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: A(p.filePath) })
1231
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:597", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1232
+ /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:598", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
1233
+ "📦 ",
1234
+ f.componentName?.split(" > ").pop() || "UI Element"
1235
+ ] }),
1236
+ f.filePath && f.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:602", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
1237
+ "📄 ",
1238
+ W(f.filePath)
1239
+ ] })
1193
1240
  ] }),
1194
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:535", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1195
- p.status === "pending" ? /* @__PURE__ */ l.jsxs(
1241
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:608", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1242
+ f.status === "pending" ? /* @__PURE__ */ l.jsxs(
1196
1243
  "button",
1197
1244
  {
1198
- "data-source-path": "/src/components/ViewGateOverlay.tsx:537",
1245
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:610",
1199
1246
  className: "vg-button-primary",
1200
1247
  style: { display: "flex", alignItems: "center", gap: "6px" },
1201
1248
  onClick: async () => {
1202
1249
  try {
1203
- (await fetch(`${a}/api/annotations/${p._id}`, {
1250
+ (await fetch(`${a}/api/annotations/${f._id}`, {
1204
1251
  method: "PATCH",
1205
1252
  headers: { "Content-Type": "application/json", "x-api-key": n },
1206
1253
  body: JSON.stringify({ status: "ready_for_review" })
1207
- })).ok && (k(), e(r.updateSuccess, "success"));
1254
+ })).ok && (T(), e(r.updateSuccess, "success"));
1208
1255
  } catch {
1209
1256
  e(r.error, "error");
1210
1257
  }
@@ -1217,16 +1264,16 @@ const Gt = (e) => {
1217
1264
  ) : /* @__PURE__ */ l.jsxs(
1218
1265
  "button",
1219
1266
  {
1220
- "data-source-path": "/src/components/ViewGateOverlay.tsx:559",
1267
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:632",
1221
1268
  className: "vg-button-ghost",
1222
1269
  style: { display: "flex", alignItems: "center", gap: "6px" },
1223
1270
  onClick: async () => {
1224
1271
  try {
1225
- (await fetch(`${a}/api/annotations/${p._id}`, {
1272
+ (await fetch(`${a}/api/annotations/${f._id}`, {
1226
1273
  method: "PATCH",
1227
1274
  headers: { "Content-Type": "application/json", "x-api-key": n },
1228
1275
  body: JSON.stringify({ status: "pending" })
1229
- })).ok && (k(), e(r.updateSuccess, "success"));
1276
+ })).ok && (T(), e(r.updateSuccess, "success"));
1230
1277
  } catch {
1231
1278
  e(r.error, "error");
1232
1279
  }
@@ -1240,13 +1287,17 @@ const Gt = (e) => {
1240
1287
  /* @__PURE__ */ l.jsxs(
1241
1288
  "button",
1242
1289
  {
1243
- "data-source-path": "/src/components/ViewGateOverlay.tsx:582",
1290
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:655",
1244
1291
  className: "vg-button-ghost",
1245
1292
  style: { display: "flex", alignItems: "center", gap: "6px" },
1246
1293
  onClick: () => {
1247
- p.url && (te(!0), setTimeout(() => {
1248
- window.location.href = p.url;
1249
- }, 1e3));
1294
+ if (f.url) {
1295
+ se(!0);
1296
+ const m = new URL(f.url);
1297
+ m.hash = `vg_hl=${encodeURIComponent(f.reference.signature)}`, setTimeout(() => {
1298
+ window.location.href = m.toString();
1299
+ }, 1e3);
1300
+ }
1250
1301
  },
1251
1302
  children: [
1252
1303
  "👁️ ",
@@ -1257,23 +1308,23 @@ const Gt = (e) => {
1257
1308
  /* @__PURE__ */ l.jsxs(
1258
1309
  "button",
1259
1310
  {
1260
- "data-source-path": "/src/components/ViewGateOverlay.tsx:597",
1311
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:672",
1261
1312
  className: "vg-button-primary",
1262
1313
  style: { backgroundColor: "#ef4444", display: "flex", alignItems: "center", gap: "6px" },
1263
1314
  onClick: () => {
1264
- D({
1315
+ M({
1265
1316
  title: r.deleteConfirm,
1266
1317
  message: r.confirmDelete,
1267
1318
  onConfirm: async () => {
1268
1319
  try {
1269
- (await fetch(`${a}/api/annotations/${p._id}`, {
1320
+ (await fetch(`${a}/api/annotations/${f._id}`, {
1270
1321
  method: "DELETE",
1271
1322
  headers: { "x-api-key": n }
1272
- })).ok && (k(), e(r.deleteSuccess, "success"));
1323
+ })).ok && (T(), e(r.deleteSuccess, "success"));
1273
1324
  } catch {
1274
1325
  e(r.error, "error");
1275
1326
  } finally {
1276
- D(null);
1327
+ M(null);
1277
1328
  }
1278
1329
  }
1279
1330
  });
@@ -1285,9 +1336,9 @@ const Gt = (e) => {
1285
1336
  }
1286
1337
  )
1287
1338
  ] })
1288
- ] }, p._id)) })
1339
+ ] }, f._id)) })
1289
1340
  ] }) }),
1290
- ee && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:636", style: {
1341
+ ne && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:711", style: {
1291
1342
  position: "fixed",
1292
1343
  top: 0,
1293
1344
  left: 0,
@@ -1300,11 +1351,11 @@ const Gt = (e) => {
1300
1351
  zIndex: 3e5,
1301
1352
  backdropFilter: "blur(10px)",
1302
1353
  color: "white"
1303
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:650", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
1304
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:651", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
1305
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:652", style: { fontSize: "18px", fontWeight: 600, letterSpacing: "0.5px" }, children: r.navigating })
1354
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:725", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
1355
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:726", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
1356
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:727", style: { fontSize: "18px", fontWeight: 600, letterSpacing: "0.5px" }, children: r.navigating })
1306
1357
  ] }) }),
1307
- _ && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:659", className: "vg-animate-fade", style: {
1358
+ A && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:734", className: "vg-animate-fade", style: {
1308
1359
  position: "fixed",
1309
1360
  top: 0,
1310
1361
  left: 0,
@@ -1316,22 +1367,22 @@ const Gt = (e) => {
1316
1367
  alignItems: "center",
1317
1368
  justifyContent: "center",
1318
1369
  zIndex: 2e5
1319
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:672", className: "vg-glassmorphism vg-animate-slide", style: {
1370
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:747", className: "vg-glassmorphism vg-animate-slide", style: {
1320
1371
  padding: "32px",
1321
1372
  width: "400px",
1322
1373
  background: "white",
1323
1374
  textAlign: "center"
1324
1375
  }, children: [
1325
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:678", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
1326
- /* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:679", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: _.title }),
1327
- /* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:680", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: _.message }),
1328
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:682", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
1376
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:753", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
1377
+ /* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:754", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: A.title }),
1378
+ /* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:755", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: A.message }),
1379
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:757", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
1329
1380
  /* @__PURE__ */ l.jsx(
1330
1381
  "button",
1331
1382
  {
1332
- "data-source-path": "/src/components/ViewGateOverlay.tsx:683",
1383
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:758",
1333
1384
  className: "vg-button-ghost",
1334
- onClick: () => D(null),
1385
+ onClick: () => M(null),
1335
1386
  style: { flex: 1 },
1336
1387
  children: r.no
1337
1388
  }
@@ -1339,10 +1390,10 @@ const Gt = (e) => {
1339
1390
  /* @__PURE__ */ l.jsx(
1340
1391
  "button",
1341
1392
  {
1342
- "data-source-path": "/src/components/ViewGateOverlay.tsx:690",
1393
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:765",
1343
1394
  className: "vg-button-primary",
1344
1395
  style: { backgroundColor: "#ef4444", flex: 1 },
1345
- onClick: _.onConfirm,
1396
+ onClick: A.onConfirm,
1346
1397
  children: r.yes
1347
1398
  }
1348
1399
  )
@@ -1356,7 +1407,7 @@ function _e(e, t, r) {
1356
1407
  return e.split(`
1357
1408
  `).map((c, u) => {
1358
1409
  const d = u + 1;
1359
- return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (m, g, y) => m.includes("data-source-path") || y === "Fragment" || y === "React.Fragment" ? m : `${g}<${y} data-source-path="${a}:${d}"`);
1410
+ return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (h, g, v) => h.includes("data-source-path") || v === "Fragment" || v === "React.Fragment" ? h : `${g}<${v} data-source-path="${a}:${d}"`);
1360
1411
  }).join(`
1361
1412
  `);
1362
1413
  }
@@ -1378,7 +1429,7 @@ function Dt(e) {
1378
1429
  }
1379
1430
  export {
1380
1431
  Ft as ViewGate,
1381
- Lt as ViewGateOverlay,
1432
+ $t as ViewGateOverlay,
1382
1433
  _e as transformSourcePaths,
1383
1434
  De as useViewGate,
1384
1435
  Dt as viewgateNextLoader,