viewgate-wrapper 1.6.1 → 1.7.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
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 $e, useState as C, useContext as Le, useCallback as te, useEffect as ue } from "react";
3
- var Y = { exports: {} }, N = {};
2
+ import Ae, { createContext as Ge, useState as S, useContext as $e, useCallback as ne, useEffect as ue } from "react";
3
+ var J = { exports: {} }, W = {};
4
4
  var de;
5
- function Ge() {
6
- if (de) return N;
5
+ function Le() {
6
+ if (de) return W;
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,47 +21,47 @@ function Ge() {
21
21
  props: s
22
22
  };
23
23
  }
24
- return N.Fragment = t, N.jsx = r, N.jsxs = r, N;
24
+ return W.Fragment = t, W.jsx = r, W.jsxs = r, W;
25
25
  }
26
- var D = {};
26
+ var z = {};
27
27
  var fe;
28
28
  function Fe() {
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 === z ? null : o.displayName || o.name || null;
33
+ return o.$$typeof === N ? null : o.displayName || o.name || null;
34
34
  if (typeof o == "string") return o;
35
35
  switch (o) {
36
- case O:
36
+ case P:
37
37
  return "Fragment";
38
- case H:
38
+ case Y:
39
39
  return "Profiler";
40
- case L:
40
+ case $:
41
41
  return "StrictMode";
42
- case W:
42
+ case F:
43
43
  return "Suspense";
44
- case k:
44
+ case ee:
45
45
  return "SuspenseList";
46
- case K:
46
+ case I:
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 M:
53
+ case U:
54
54
  return "Portal";
55
- case X:
55
+ case Q:
56
56
  return o.displayName || "Context";
57
- case G:
57
+ case L:
58
58
  return (o._context.displayName || "Context") + ".Consumer";
59
- case Z:
59
+ case O:
60
60
  var f = o.render;
61
61
  return o = o.displayName, o || (o = f.displayName || f.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
62
- case F:
62
+ case q:
63
63
  return f = o.displayName || null, f !== null ? f : e(o.type) || "Memo";
64
- case P:
64
+ case R:
65
65
  f = o._payload, o = o._init;
66
66
  try {
67
67
  return e(o(f));
@@ -82,8 +82,8 @@ function Fe() {
82
82
  }
83
83
  if (f) {
84
84
  f = console;
85
- var y = f.error, w = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
86
- return y.call(
85
+ var x = f.error, w = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
86
+ return x.call(
87
87
  f,
88
88
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
89
89
  w
@@ -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 === P) return "<>";
95
+ if (typeof o == "object" && o !== null && o.$$typeof === R)
96
96
  return "<...>";
97
97
  try {
98
98
  var f = e(o);
@@ -102,46 +102,46 @@ function Fe() {
102
102
  }
103
103
  }
104
104
  function a() {
105
- var o = m.A;
105
+ var o = D.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 (h.call(o, "key")) {
112
+ if (M.call(o, "key")) {
113
113
  var f = Object.getOwnPropertyDescriptor(o, "key").get;
114
114
  if (f && f.isReactWarning) return !1;
115
115
  }
116
116
  return o.key !== void 0;
117
117
  }
118
118
  function c(o, f) {
119
- function y() {
120
- I || (I = !0, console.error(
119
+ function x() {
120
+ T || (T = !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
122
  f
123
123
  ));
124
124
  }
125
- y.isReactWarning = !0, Object.defineProperty(o, "key", {
126
- get: y,
125
+ x.isReactWarning = !0, Object.defineProperty(o, "key", {
126
+ get: x,
127
127
  configurable: !0
128
128
  });
129
129
  }
130
130
  function u() {
131
131
  var o = e(this.type);
132
- return oe[o] || (oe[o] = !0, console.error(
132
+ return _[o] || (_[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, y, w, U, Q) {
137
- var b = y.ref;
136
+ function d(o, f, x, w, B, te) {
137
+ var v = x.ref;
138
138
  return o = {
139
- $$typeof: R,
139
+ $$typeof: k,
140
140
  type: o,
141
141
  key: f,
142
- props: y,
142
+ props: x,
143
143
  _owner: w
144
- }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(o, "ref", {
144
+ }, (v !== void 0 ? v : 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,33 +158,33 @@ function Fe() {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
- value: U
161
+ value: B
162
162
  }), Object.defineProperty(o, "_debugTask", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: Q
166
+ value: te
167
167
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
168
168
  }
169
- function p(o, f, y, w, U, Q) {
170
- var b = f.children;
171
- if (b !== void 0)
169
+ function p(o, f, x, w, B, te) {
170
+ var v = f.children;
171
+ if (v !== void 0)
172
172
  if (w)
173
- if (_(b)) {
174
- for (w = 0; w < b.length; w++)
175
- g(b[w]);
176
- Object.freeze && Object.freeze(b);
173
+ if (m(v)) {
174
+ for (w = 0; w < v.length; w++)
175
+ g(v[w]);
176
+ Object.freeze && Object.freeze(v);
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(b);
182
- if (h.call(f, "key")) {
183
- b = e(o);
181
+ else g(v);
182
+ if (M.call(f, "key")) {
183
+ v = e(o);
184
184
  var V = Object.keys(f).filter(function(Ve) {
185
185
  return Ve !== "key";
186
186
  });
187
- w = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", le[b + w] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ w = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", le[v + w] || (V = 0 < V.length ? "{" + V.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} />
@@ -192,35 +192,35 @@ React keys must be passed directly to JSX without using spread:
192
192
  let props = %s;
193
193
  <%s key={someKey} {...props} />`,
194
194
  w,
195
- b,
195
+ v,
196
196
  V,
197
- b
198
- ), le[b + w] = !0);
197
+ v
198
+ ), le[v + w] = !0);
199
199
  }
200
- if (b = null, y !== void 0 && (r(y), b = "" + y), i(f) && (r(f.key), b = "" + f.key), "key" in f) {
201
- y = {};
202
- for (var ee in f)
203
- ee !== "key" && (y[ee] = f[ee]);
204
- } else y = f;
205
- return b && c(
206
- y,
200
+ if (v = null, x !== void 0 && (r(x), v = "" + x), i(f) && (r(f.key), v = "" + f.key), "key" in f) {
201
+ x = {};
202
+ for (var re in f)
203
+ re !== "key" && (x[re] = f[re]);
204
+ } else x = f;
205
+ return v && c(
206
+ x,
207
207
  typeof o == "function" ? o.displayName || o.name || "Unknown" : o
208
208
  ), d(
209
209
  o,
210
- b,
211
- y,
210
+ v,
211
+ x,
212
212
  a(),
213
- U,
214
- Q
213
+ B,
214
+ te
215
215
  );
216
216
  }
217
217
  function g(o) {
218
- x(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === P && (o._payload.status === "fulfilled" ? x(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
218
+ y(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === R && (o._payload.status === "fulfilled" ? y(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
219
219
  }
220
- function x(o) {
221
- return typeof o == "object" && o !== null && o.$$typeof === R;
220
+ function y(o) {
221
+ return typeof o == "object" && o !== null && o.$$typeof === k;
222
222
  }
223
- var E = Ae, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), M = /* @__PURE__ */ Symbol.for("react.portal"), O = /* @__PURE__ */ Symbol.for("react.fragment"), L = /* @__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"), k = /* @__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 = E.__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 E = Ae, k = /* @__PURE__ */ Symbol.for("react.transitional.element"), U = /* @__PURE__ */ Symbol.for("react.portal"), P = /* @__PURE__ */ Symbol.for("react.fragment"), $ = /* @__PURE__ */ Symbol.for("react.strict_mode"), Y = /* @__PURE__ */ Symbol.for("react.profiler"), L = /* @__PURE__ */ Symbol.for("react.consumer"), Q = /* @__PURE__ */ Symbol.for("react.context"), O = /* @__PURE__ */ Symbol.for("react.forward_ref"), F = /* @__PURE__ */ Symbol.for("react.suspense"), ee = /* @__PURE__ */ Symbol.for("react.suspense_list"), q = /* @__PURE__ */ Symbol.for("react.memo"), R = /* @__PURE__ */ Symbol.for("react.lazy"), I = /* @__PURE__ */ Symbol.for("react.activity"), N = /* @__PURE__ */ Symbol.for("react.client.reference"), D = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, m = Array.isArray, h = 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 I, oe = {}, ie = E.react_stack_bottom_frame.bind(
231
+ var T, _ = {}, H = E.react_stack_bottom_frame.bind(
232
232
  E,
233
233
  s
234
- )(), ce = j(n(s)), le = {};
235
- D.Fragment = O, D.jsx = function(o, f, y) {
236
- var w = 1e4 > m.recentlyCreatedOwnerStacks++;
234
+ )(), ce = h(n(s)), le = {};
235
+ z.Fragment = P, z.jsx = function(o, f, x) {
236
+ var w = 1e4 > D.recentlyCreatedOwnerStacks++;
237
237
  return p(
238
238
  o,
239
239
  f,
240
- y,
240
+ x,
241
241
  !1,
242
- w ? Error("react-stack-top-frame") : ie,
243
- w ? j(n(o)) : ce
242
+ w ? Error("react-stack-top-frame") : H,
243
+ w ? h(n(o)) : ce
244
244
  );
245
- }, D.jsxs = function(o, f, y) {
246
- var w = 1e4 > m.recentlyCreatedOwnerStacks++;
245
+ }, z.jsxs = function(o, f, x) {
246
+ var w = 1e4 > D.recentlyCreatedOwnerStacks++;
247
247
  return p(
248
248
  o,
249
249
  f,
250
- y,
250
+ x,
251
251
  !0,
252
- w ? Error("react-stack-top-frame") : ie,
253
- w ? j(n(o)) : ce
252
+ w ? Error("react-stack-top-frame") : H,
253
+ w ? h(n(o)) : ce
254
254
  );
255
255
  };
256
- })()), D;
256
+ })()), z;
257
257
  }
258
258
  var me;
259
259
  function Ie() {
260
- return me || (me = 1, process.env.NODE_ENV === "production" ? Y.exports = Ge() : Y.exports = Fe()), Y.exports;
260
+ return me || (me = 1, process.env.NODE_ENV === "production" ? J.exports = Le() : J.exports = Fe()), J.exports;
261
261
  }
262
262
  var l = Ie();
263
263
  const Ne = {
@@ -284,7 +284,11 @@ const Ne = {
284
284
  noComments: "No comments found.",
285
285
  deleteConfirm: "Are you sure you want to close/delete this comment?",
286
286
  markReady: "Mark as Ready",
287
- reopen: "Reopen"
287
+ reopen: "Reopen",
288
+ goToSite: "Go to Site",
289
+ confirmDelete: "Are you sure you want to delete this annotation?",
290
+ yes: "Yes, delete",
291
+ no: "No, cancel"
288
292
  },
289
293
  es: {
290
294
  enterMode: "🚀 Activar Modo Comentarios",
@@ -309,27 +313,31 @@ const Ne = {
309
313
  noComments: "No hay comentarios.",
310
314
  deleteConfirm: "¿Estás seguro de que deseas cerrar y eliminar este comentario?",
311
315
  markReady: "Marcar como Listo",
312
- reopen: "Reabrir"
316
+ reopen: "Reabrir",
317
+ goToSite: "Ir a la Web",
318
+ confirmDelete: "¿Estás seguro de que deseas eliminar este comentario?",
319
+ yes: "Sí, eliminar",
320
+ no: "No, cancelar"
313
321
  }
314
- }, ve = $e(void 0), De = () => {
315
- const e = Le(ve);
322
+ }, be = Ge(void 0), De = () => {
323
+ const e = $e(be);
316
324
  if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
317
325
  return e;
318
326
  }, It = ({ children: e, language: t = "es", apiKey: r, baseUrl: n = "https://view-gate.vercel.app" }) => {
319
- const [a, s] = C([]), i = (u, d) => {
327
+ const [a, s] = S([]), i = (u, d) => {
320
328
  const p = Date.now();
321
329
  s((g) => [...g, { id: p, message: u, type: d }]), setTimeout(() => {
322
- s((g) => g.filter((x) => x.id !== p));
330
+ s((g) => g.filter((y) => y.id !== p));
323
331
  }, 4e3);
324
332
  }, c = Ne[t];
325
- return /* @__PURE__ */ l.jsxs(ve.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:122", value: { addToast: i, language: t, t: c, apiKey: r, baseUrl: n }, children: [
333
+ return /* @__PURE__ */ l.jsxs(be.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:130", value: { addToast: i, language: t, t: c, apiKey: r, baseUrl: n }, children: [
326
334
  e,
327
- /* @__PURE__ */ l.jsx(Gt, { "data-source-path": "/src/components/ViewGateProvider.tsx:124" }),
328
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:125", className: "vg-toasts", children: a.map((u) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:127", className: `vg-toast vg-glassmorphism vg-animate-slide ${u.type}`, children: [
329
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:128", style: { fontSize: "20px" }, children: u.type === "success" ? "✅" : "❌" }),
330
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:129", children: [
331
- /* @__PURE__ */ l.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:130", style: { display: "block" }, children: u.type === "success" ? c.successHeader : c.errorHeader }),
332
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:131", style: { fontSize: "14px" }, children: u.message })
335
+ /* @__PURE__ */ l.jsx(Lt, { "data-source-path": "/src/components/ViewGateProvider.tsx:132" }),
336
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:133", className: "vg-toasts", children: a.map((u) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:135", className: `vg-toast vg-glassmorphism vg-animate-slide ${u.type}`, children: [
337
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:136", style: { fontSize: "20px" }, children: u.type === "success" ? "✅" : "❌" }),
338
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:137", children: [
339
+ /* @__PURE__ */ l.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:138", style: { display: "block" }, children: u.type === "success" ? c.successHeader : c.errorHeader }),
340
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:139", style: { fontSize: "14px" }, children: u.message })
333
341
  ] })
334
342
  ] }, u.id)) })
335
343
  ] });
@@ -352,7 +360,7 @@ const He = /* @__PURE__ */ (() => {
352
360
  );
353
361
  return () => (e += 1, `u${t()}${e}`);
354
362
  })();
355
- function T(e) {
363
+ function j(e) {
356
364
  const t = [];
357
365
  for (let r = 0, n = e.length; r < n; r++)
358
366
  t.push(e[r]);
@@ -360,21 +368,21 @@ function T(e) {
360
368
  }
361
369
  let A = null;
362
370
  function Ee(e = {}) {
363
- return A || (e.includeStyleProperties ? (A = e.includeStyleProperties, A) : (A = T(window.getComputedStyle(document.documentElement)), A));
371
+ return A || (e.includeStyleProperties ? (A = e.includeStyleProperties, A) : (A = j(window.getComputedStyle(document.documentElement)), A));
364
372
  }
365
- function q(e, t) {
373
+ function X(e, t) {
366
374
  const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
367
375
  return n ? parseFloat(n.replace("px", "")) : 0;
368
376
  }
369
377
  function We(e) {
370
- const t = q(e, "border-left-width"), r = q(e, "border-right-width");
378
+ const t = X(e, "border-left-width"), r = X(e, "border-right-width");
371
379
  return e.clientWidth + t + r;
372
380
  }
373
381
  function ze(e) {
374
- const t = q(e, "border-top-width"), r = q(e, "border-bottom-width");
382
+ const t = X(e, "border-top-width"), r = X(e, "border-bottom-width");
375
383
  return e.clientHeight + t + r;
376
384
  }
377
- function Se(e, t = {}) {
385
+ function Ce(e, t = {}) {
378
386
  const r = t.width || We(e), n = t.height || ze(e);
379
387
  return { width: r, height: n };
380
388
  }
@@ -387,11 +395,11 @@ function Ue() {
387
395
  const r = t && t.env ? t.env.devicePixelRatio : null;
388
396
  return r && (e = parseInt(r, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
389
397
  }
390
- const S = 16384;
398
+ const C = 16384;
391
399
  function Ye(e) {
392
- (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));
400
+ (e.width > C || e.height > C) && (e.width > C && e.height > C ? e.width > e.height ? (e.height *= C / e.width, e.width = C) : (e.width *= C / e.height, e.height = C) : e.width > C ? (e.height *= C / e.width, e.width = C) : (e.width *= C / e.height, e.height = C));
393
401
  }
394
- function B(e) {
402
+ function Z(e) {
395
403
  return new Promise((t, r) => {
396
404
  const n = new Image();
397
405
  n.onload = () => {
@@ -408,11 +416,11 @@ async function Be(e, t, r) {
408
416
  const n = "http://www.w3.org/2000/svg", a = document.createElementNS(n, "svg"), s = document.createElementNS(n, "foreignObject");
409
417
  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), qe(a);
410
418
  }
411
- const v = (e, t) => {
419
+ const b = (e, t) => {
412
420
  if (e instanceof t)
413
421
  return !0;
414
422
  const r = Object.getPrototypeOf(e);
415
- return r === null ? !1 : r.constructor.name === t.name || v(r, t);
423
+ return r === null ? !1 : r.constructor.name === t.name || b(r, t);
416
424
  };
417
425
  function Je(e) {
418
426
  const t = e.getPropertyValue("content");
@@ -461,20 +469,20 @@ function et(e) {
461
469
  const t = /\.([^./]*?)$/g.exec(e);
462
470
  return t ? t[1] : "";
463
471
  }
464
- function se(e) {
472
+ function oe(e) {
465
473
  const t = et(e).toLowerCase();
466
474
  return Qe[t] || "";
467
475
  }
468
476
  function tt(e) {
469
477
  return e.split(/,/)[1];
470
478
  }
471
- function ne(e) {
479
+ function ae(e) {
472
480
  return e.search(/^(data:)/) !== -1;
473
481
  }
474
482
  function rt(e, t) {
475
483
  return `data:${t};base64,${e}`;
476
484
  }
477
- async function Ce(e, t, r) {
485
+ async function Se(e, t, r) {
478
486
  const n = await fetch(e, t);
479
487
  if (n.status === 404)
480
488
  throw new Error(`Resource "${n.url}" not found`);
@@ -490,52 +498,52 @@ async function Ce(e, t, r) {
490
498
  }, c.readAsDataURL(a);
491
499
  });
492
500
  }
493
- const re = {};
501
+ const se = {};
494
502
  function nt(e, t, r) {
495
503
  let n = e.replace(/\?.*/, "");
496
504
  return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
497
505
  }
498
- async function ae(e, t, r) {
506
+ async function ie(e, t, r) {
499
507
  const n = nt(e, t, r.includeQueryParams);
500
- if (re[n] != null)
501
- return re[n];
508
+ if (se[n] != null)
509
+ return se[n];
502
510
  r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
503
511
  let a;
504
512
  try {
505
- const s = await Ce(e, r.fetchRequestInit, ({ res: i, result: c }) => (t || (t = i.headers.get("Content-Type") || ""), tt(c)));
513
+ const s = await Se(e, r.fetchRequestInit, ({ res: i, result: c }) => (t || (t = i.headers.get("Content-Type") || ""), tt(c)));
506
514
  a = rt(s, t);
507
515
  } catch (s) {
508
516
  a = r.imagePlaceholder || "";
509
517
  let i = `Failed to fetch resource: ${e}`;
510
518
  s && (i = typeof s == "string" ? s : s.message), i && console.warn(i);
511
519
  }
512
- return re[n] = a, a;
520
+ return se[n] = a, a;
513
521
  }
514
522
  async function st(e) {
515
523
  const t = e.toDataURL();
516
- return t === "data:," ? e.cloneNode(!1) : B(t);
524
+ return t === "data:," ? e.cloneNode(!1) : Z(t);
517
525
  }
518
526
  async function at(e, t) {
519
527
  if (e.currentSrc) {
520
528
  const s = document.createElement("canvas"), i = s.getContext("2d");
521
529
  s.width = e.clientWidth, s.height = e.clientHeight, i?.drawImage(e, 0, 0, s.width, s.height);
522
530
  const c = s.toDataURL();
523
- return B(c);
531
+ return Z(c);
524
532
  }
525
- const r = e.poster, n = se(r), a = await ae(r, n, t);
526
- return B(a);
533
+ const r = e.poster, n = oe(r), a = await ie(r, n, t);
534
+ return Z(a);
527
535
  }
528
536
  async function ot(e, t) {
529
537
  var r;
530
538
  try {
531
539
  if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
532
- return await J(e.contentDocument.body, t, !0);
540
+ return await K(e.contentDocument.body, t, !0);
533
541
  } catch {
534
542
  }
535
543
  return e.cloneNode(!1);
536
544
  }
537
545
  async function it(e, t) {
538
- return v(e, HTMLCanvasElement) ? st(e) : v(e, HTMLVideoElement) ? at(e, t) : v(e, HTMLIFrameElement) ? ot(e, t) : e.cloneNode(Re(e));
546
+ return b(e, HTMLCanvasElement) ? st(e) : b(e, HTMLVideoElement) ? at(e, t) : b(e, HTMLIFrameElement) ? ot(e, t) : e.cloneNode(Re(e));
539
547
  }
540
548
  const ct = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Re = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
541
549
  async function lt(e, t, r) {
@@ -543,7 +551,7 @@ async function lt(e, t, r) {
543
551
  if (Re(t))
544
552
  return t;
545
553
  let s = [];
546
- return ct(e) && e.assignedNodes ? s = T(e.assignedNodes()) : v(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = T(e.contentDocument.body.childNodes) : s = T(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || v(e, HTMLVideoElement) || await s.reduce((i, c) => i.then(() => J(c, r)).then((u) => {
554
+ 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) => {
547
555
  u && t.appendChild(u);
548
556
  }), Promise.resolve()), t;
549
557
  }
@@ -554,20 +562,20 @@ function ut(e, t, r) {
554
562
  const a = window.getComputedStyle(e);
555
563
  a.cssText ? (n.cssText = a.cssText, n.transformOrigin = a.transformOrigin) : Ee(r).forEach((s) => {
556
564
  let i = a.getPropertyValue(s);
557
- s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), v(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));
565
+ s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), b(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));
558
566
  });
559
567
  }
560
568
  function dt(e, t) {
561
- v(e, HTMLTextAreaElement) && (t.innerHTML = e.value), v(e, HTMLInputElement) && t.setAttribute("value", e.value);
569
+ b(e, HTMLTextAreaElement) && (t.innerHTML = e.value), b(e, HTMLInputElement) && t.setAttribute("value", e.value);
562
570
  }
563
571
  function ft(e, t) {
564
- if (v(e, HTMLSelectElement)) {
572
+ if (b(e, HTMLSelectElement)) {
565
573
  const n = Array.from(t.children).find((a) => e.value === a.getAttribute("value"));
566
574
  n && n.setAttribute("selected", "");
567
575
  }
568
576
  }
569
577
  function mt(e, t, r) {
570
- return v(t, Element) && (ut(e, t, r), Ke(e, t, r), dt(e, t), ft(e, t)), t;
578
+ return b(t, Element) && (ut(e, t, r), Ke(e, t, r), dt(e, t), ft(e, t)), t;
571
579
  }
572
580
  async function pt(e, t) {
573
581
  const r = e.querySelectorAll ? e.querySelectorAll("use") : [];
@@ -578,7 +586,7 @@ async function pt(e, t) {
578
586
  const c = r[s].getAttribute("xlink:href");
579
587
  if (c) {
580
588
  const u = e.querySelector(c), d = document.querySelector(c);
581
- !u && d && !n[c] && (n[c] = await J(d, t, !0));
589
+ !u && d && !n[c] && (n[c] = await K(d, t, !0));
582
590
  }
583
591
  }
584
592
  const a = Object.values(n);
@@ -593,28 +601,28 @@ async function pt(e, t) {
593
601
  }
594
602
  return e;
595
603
  }
596
- async function J(e, t, r) {
604
+ async function K(e, t, r) {
597
605
  return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => it(n, t)).then((n) => lt(e, n, t)).then((n) => mt(e, n, t)).then((n) => pt(n, t));
598
606
  }
599
607
  const ke = /url\((['"]?)([^'"]+?)\1\)/g, ht = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, gt = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
600
- function yt(e) {
608
+ function xt(e) {
601
609
  const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
602
610
  return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
603
611
  }
604
- function xt(e) {
612
+ function yt(e) {
605
613
  const t = [];
606
- return e.replace(ke, (r, n, a) => (t.push(a), r)), t.filter((r) => !ne(r));
614
+ return e.replace(ke, (r, n, a) => (t.push(a), r)), t.filter((r) => !ae(r));
607
615
  }
608
616
  async function wt(e, t, r, n, a) {
609
617
  try {
610
- const s = r ? Me(t, r) : t, i = se(t);
618
+ const s = r ? Me(t, r) : t, i = oe(t);
611
619
  let c;
612
- return a || (c = await ae(s, i, n)), e.replace(yt(t), `$1${c}$3`);
620
+ return a || (c = await ie(s, i, n)), e.replace(xt(t), `$1${c}$3`);
613
621
  } catch {
614
622
  }
615
623
  return e;
616
624
  }
617
- function bt(e, { preferredFontFormat: t }) {
625
+ function vt(e, { preferredFontFormat: t }) {
618
626
  return t ? e.replace(gt, (r) => {
619
627
  for (; ; ) {
620
628
  const [n, , a] = ht.exec(r) || [];
@@ -625,32 +633,32 @@ function bt(e, { preferredFontFormat: t }) {
625
633
  }
626
634
  }) : e;
627
635
  }
628
- function Te(e) {
636
+ function je(e) {
629
637
  return e.search(ke) !== -1;
630
638
  }
631
- async function Pe(e, t, r) {
632
- if (!Te(e))
639
+ async function Te(e, t, r) {
640
+ if (!je(e))
633
641
  return e;
634
- const n = bt(e, r);
635
- return xt(n).reduce((s, i) => s.then((c) => wt(c, i, t, r)), Promise.resolve(n));
642
+ const n = vt(e, r);
643
+ return yt(n).reduce((s, i) => s.then((c) => wt(c, i, t, r)), Promise.resolve(n));
636
644
  }
637
- async function $(e, t, r) {
645
+ async function G(e, t, r) {
638
646
  var n;
639
647
  const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
640
648
  if (a) {
641
- const s = await Pe(a, null, r);
649
+ const s = await Te(a, null, r);
642
650
  return t.style.setProperty(e, s, t.style.getPropertyPriority(e)), !0;
643
651
  }
644
652
  return !1;
645
653
  }
646
- async function vt(e, t) {
647
- 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);
654
+ async function bt(e, t) {
655
+ await G("background", e, t) || await G("background-image", e, t), await G("mask", e, t) || await G("-webkit-mask", e, t) || await G("mask-image", e, t) || await G("-webkit-mask-image", e, t);
648
656
  }
649
657
  async function Et(e, t) {
650
- const r = v(e, HTMLImageElement);
651
- if (!(r && !ne(e.src)) && !(v(e, SVGImageElement) && !ne(e.href.baseVal)))
658
+ const r = b(e, HTMLImageElement);
659
+ if (!(r && !ae(e.src)) && !(b(e, SVGImageElement) && !ae(e.href.baseVal)))
652
660
  return;
653
- const n = r ? e.src : e.href.baseVal, a = await ae(n, se(n), t);
661
+ const n = r ? e.src : e.href.baseVal, a = await ie(n, oe(n), t);
654
662
  await new Promise((s, i) => {
655
663
  e.onload = s, e.onerror = t.onImageErrorHandler ? (...u) => {
656
664
  try {
@@ -663,14 +671,14 @@ async function Et(e, t) {
663
671
  c.decode && (c.decode = s), c.loading === "lazy" && (c.loading = "eager"), r ? (e.srcset = "", e.src = a) : e.href.baseVal = a;
664
672
  });
665
673
  }
666
- async function St(e, t) {
667
- const n = T(e.childNodes).map((a) => je(a, t));
674
+ async function Ct(e, t) {
675
+ const n = j(e.childNodes).map((a) => Pe(a, t));
668
676
  await Promise.all(n).then(() => e);
669
677
  }
670
- async function je(e, t) {
671
- v(e, Element) && (await vt(e, t), await Et(e, t), await St(e, t));
678
+ async function Pe(e, t) {
679
+ b(e, Element) && (await bt(e, t), await Et(e, t), await Ct(e, t));
672
680
  }
673
- function Ct(e, t) {
681
+ function St(e, t) {
674
682
  const { style: r } = e;
675
683
  t.backgroundColor && (r.backgroundColor = t.backgroundColor), t.width && (r.width = `${t.width}px`), t.height && (r.height = `${t.height}px`);
676
684
  const n = t.style;
@@ -678,23 +686,23 @@ function Ct(e, t) {
678
686
  r[a] = n[a];
679
687
  }), e;
680
688
  }
681
- const ye = {};
682
- async function xe(e) {
683
- let t = ye[e];
689
+ const xe = {};
690
+ async function ye(e) {
691
+ let t = xe[e];
684
692
  if (t != null)
685
693
  return t;
686
694
  const n = await (await fetch(e)).text();
687
- return t = { url: e, cssText: n }, ye[e] = t, t;
695
+ return t = { url: e, cssText: n }, xe[e] = t, t;
688
696
  }
689
697
  async function we(e, t) {
690
698
  let r = e.cssText;
691
699
  const n = /url\(["']?([^"')]+)["']?\)/g, s = (r.match(/url\([^)]+\)/g) || []).map(async (i) => {
692
700
  let c = i.replace(n, "$1");
693
- return c.startsWith("https://") || (c = new URL(c, e.url).href), Ce(c, t.fetchRequestInit, ({ result: u }) => (r = r.replace(i, `url(${u})`), [i, u]));
701
+ return c.startsWith("https://") || (c = new URL(c, e.url).href), Se(c, t.fetchRequestInit, ({ result: u }) => (r = r.replace(i, `url(${u})`), [i, u]));
694
702
  });
695
703
  return Promise.all(s).then(() => r);
696
704
  }
697
- function be(e) {
705
+ function ve(e) {
698
706
  if (e == null)
699
707
  return [];
700
708
  const t = [], r = /(\/\*[\s\S]*?\*\/)/gi;
@@ -725,16 +733,16 @@ async function Rt(e, t) {
725
733
  return e.forEach((a) => {
726
734
  if ("cssRules" in a)
727
735
  try {
728
- T(a.cssRules || []).forEach((s, i) => {
736
+ j(a.cssRules || []).forEach((s, i) => {
729
737
  if (s.type === CSSRule.IMPORT_RULE) {
730
738
  let c = i + 1;
731
- const u = s.href, d = xe(u).then((p) => we(p, t)).then((p) => be(p).forEach((g) => {
739
+ const u = s.href, d = ye(u).then((p) => we(p, t)).then((p) => ve(p).forEach((g) => {
732
740
  try {
733
741
  a.insertRule(g, g.startsWith("@import") ? c += 1 : a.cssRules.length);
734
- } catch (x) {
742
+ } catch (y) {
735
743
  console.error("Error inserting rule from remote css", {
736
744
  rule: g,
737
- error: x
745
+ error: y
738
746
  });
739
747
  }
740
748
  })).catch((p) => {
@@ -745,7 +753,7 @@ async function Rt(e, t) {
745
753
  });
746
754
  } catch (s) {
747
755
  const i = e.find((c) => c.href == null) || document.styleSheets[0];
748
- a.href != null && n.push(xe(a.href).then((c) => we(c, t)).then((c) => be(c).forEach((u) => {
756
+ a.href != null && n.push(ye(a.href).then((c) => we(c, t)).then((c) => ve(c).forEach((u) => {
749
757
  i.insertRule(u, i.cssRules.length);
750
758
  })).catch((c) => {
751
759
  console.error("Error loading remote stylesheet", c);
@@ -754,7 +762,7 @@ async function Rt(e, t) {
754
762
  }), Promise.all(n).then(() => (e.forEach((a) => {
755
763
  if ("cssRules" in a)
756
764
  try {
757
- T(a.cssRules || []).forEach((s) => {
765
+ j(a.cssRules || []).forEach((s) => {
758
766
  r.push(s);
759
767
  });
760
768
  } catch (s) {
@@ -763,18 +771,18 @@ async function Rt(e, t) {
763
771
  }), r));
764
772
  }
765
773
  function kt(e) {
766
- return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => Te(t.style.getPropertyValue("src")));
774
+ return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => je(t.style.getPropertyValue("src")));
767
775
  }
768
- async function Tt(e, t) {
776
+ async function jt(e, t) {
769
777
  if (e.ownerDocument == null)
770
778
  throw new Error("Provided element is not within a Document");
771
- const r = T(e.ownerDocument.styleSheets), n = await Rt(r, t);
779
+ const r = j(e.ownerDocument.styleSheets), n = await Rt(r, t);
772
780
  return kt(n);
773
781
  }
774
782
  function Oe(e) {
775
783
  return e.trim().replace(/["']/g, "");
776
784
  }
777
- function Pt(e) {
785
+ function Tt(e) {
778
786
  const t = /* @__PURE__ */ new Set();
779
787
  function r(n) {
780
788
  (n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((s) => {
@@ -785,33 +793,33 @@ function Pt(e) {
785
793
  }
786
794
  return r(e), t;
787
795
  }
788
- async function jt(e, t) {
789
- const r = await Tt(e, t), n = Pt(e);
796
+ async function Pt(e, t) {
797
+ const r = await jt(e, t), n = Tt(e);
790
798
  return (await Promise.all(r.filter((s) => n.has(Oe(s.style.fontFamily))).map((s) => {
791
799
  const i = s.parentStyleSheet ? s.parentStyleSheet.href : null;
792
- return Pe(s.cssText, i, t);
800
+ return Te(s.cssText, i, t);
793
801
  }))).join(`
794
802
  `);
795
803
  }
796
804
  async function Ot(e, t) {
797
- const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await jt(e, t);
805
+ const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await Pt(e, t);
798
806
  if (r) {
799
807
  const n = document.createElement("style"), a = document.createTextNode(r);
800
808
  n.appendChild(a), e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n);
801
809
  }
802
810
  }
803
811
  async function _t(e, t = {}) {
804
- const { width: r, height: n } = Se(e, t), a = await J(e, t, !0);
805
- return await Ot(a, t), await je(a, t), Ct(a, t), await Be(a, r, n);
812
+ const { width: r, height: n } = Ce(e, t), a = await K(e, t, !0);
813
+ return await Ot(a, t), await Pe(a, t), St(a, t), await Be(a, r, n);
806
814
  }
807
815
  async function Vt(e, t = {}) {
808
- const { width: r, height: n } = Se(e, t), a = await _t(e, t), s = await B(a), i = document.createElement("canvas"), c = i.getContext("2d"), u = t.pixelRatio || Ue(), d = t.canvasWidth || r, p = t.canvasHeight || n;
816
+ const { width: r, height: n } = Ce(e, t), a = await _t(e, t), s = await Z(a), i = document.createElement("canvas"), c = i.getContext("2d"), u = t.pixelRatio || Ue(), d = t.canvasWidth || r, p = t.canvasHeight || n;
809
817
  return i.width = d * u, i.height = p * u, t.skipAutoScale || Ye(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;
810
818
  }
811
819
  async function At(e, t = {}) {
812
820
  return (await Vt(e, t)).toDataURL();
813
821
  }
814
- const $t = (e) => {
822
+ const Gt = (e) => {
815
823
  const r = Object.keys(e).find((s) => s.startsWith("__reactFiber$") || s.startsWith("__reactInternalInstance$"));
816
824
  if (!r) return "";
817
825
  const n = [];
@@ -825,7 +833,7 @@ const $t = (e) => {
825
833
  a = a.return;
826
834
  }
827
835
  return n.join(" > ") || "Generic Component";
828
- }, Lt = (e) => {
836
+ }, $t = (e) => {
829
837
  let t = "unknown:0", r = e;
830
838
  for (; r; ) {
831
839
  const d = r.getAttribute("data-source-path");
@@ -835,21 +843,21 @@ const $t = (e) => {
835
843
  }
836
844
  r = r.parentElement;
837
845
  }
838
- const n = $t(e), s = ((d) => {
846
+ const n = Gt(e), s = ((d) => {
839
847
  const p = [];
840
848
  let g = d;
841
849
  for (; g && g.nodeType === Node.ELEMENT_NODE; ) {
842
- let x = g.nodeName.toLowerCase();
850
+ let y = g.nodeName.toLowerCase();
843
851
  if (g.id) {
844
- x += "#" + g.id, p.unshift(x);
852
+ y += "#" + g.id, p.unshift(y);
845
853
  break;
846
854
  } else {
847
- let E = g, R = 1;
855
+ let E = g, k = 1;
848
856
  for (; E.previousElementSibling; )
849
- E = E.previousElementSibling, E.nodeName.toLowerCase() === x && R++;
850
- R > 1 && (x += `:nth-of-type(${R})`);
857
+ E = E.previousElementSibling, E.nodeName.toLowerCase() === y && k++;
858
+ k > 1 && (y += `:nth-of-type(${k})`);
851
859
  }
852
- p.unshift(x), g = g.parentElement;
860
+ p.unshift(y), g = g.parentElement;
853
861
  }
854
862
  return p.join(" > ");
855
863
  })(e), i = (e.innerText || "").slice(0, 50).trim(), c = {};
@@ -875,29 +883,29 @@ const $t = (e) => {
875
883
  hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`
876
884
  }
877
885
  };
878
- }, Gt = () => {
879
- 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, x] = C(""), [E, R] = C(!1), [M, O] = C(!1), [L, H] = C(!1), [G, X] = C([]), [Z, W] = C(!1), k = te(async () => {
886
+ }, Lt = () => {
887
+ const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = S(!1), [c, u] = S(null), [d, p] = S(null), [g, y] = S(""), [E, k] = S(!1), [U, P] = S(!1), [$, Y] = S(!1), [L, Q] = S([]), [O, F] = S(null), [ee, q] = S(!1), R = ne(async () => {
880
888
  if (n) {
881
- W(!0);
889
+ q(!0);
882
890
  try {
883
891
  const m = await fetch(`${a}/api/annotations`, {
884
892
  headers: { "x-api-key": n }
885
893
  });
886
894
  if (m.ok) {
887
895
  const h = await m.json();
888
- X(h);
896
+ Q(h);
889
897
  }
890
898
  } catch (m) {
891
899
  console.error("Failed to fetch annotations", m);
892
900
  } finally {
893
- W(!1);
901
+ q(!1);
894
902
  }
895
903
  }
896
904
  }, [n, a]);
897
905
  ue(() => {
898
- k();
899
- }, [k]);
900
- const F = te((m) => {
906
+ R();
907
+ }, [R]);
908
+ const I = ne((m) => {
901
909
  if (!s || d) return;
902
910
  const h = document.elementFromPoint(m.clientX, m.clientY);
903
911
  if (!h || h.id === "viewgate-overlay" || h.closest("#viewgate-ui")) {
@@ -910,15 +918,15 @@ const $t = (e) => {
910
918
  rect: h.getBoundingClientRect(),
911
919
  element: h,
912
920
  previewText: (h.innerText || "").slice(0, 100) || (h.getAttribute("placeholder") || "").slice(0, 100) || h.tagName.toLowerCase(),
913
- semanticReference: Lt(h)
921
+ semanticReference: $t(h)
914
922
  });
915
- }, [s, d]), P = te(async (m) => {
923
+ }, [s, d]), N = ne(async (m) => {
916
924
  if (!(!s || d) && c) {
917
- m.preventDefault(), m.stopPropagation(), O(!0);
925
+ m.preventDefault(), m.stopPropagation(), P(!0);
918
926
  try {
919
- const h = c.element.style.display, _ = window.getComputedStyle(c.element).display === "inline";
920
- _ && (c.element.style.display = "inline-block");
921
- const j = await At(c.element, {
927
+ const h = c.element.style.display, T = window.getComputedStyle(c.element).display === "inline";
928
+ T && (c.element.style.display = "inline-block");
929
+ const _ = await At(c.element, {
922
930
  backgroundColor: "#ffffff",
923
931
  pixelRatio: 2,
924
932
  skipFonts: !0,
@@ -928,21 +936,21 @@ const $t = (e) => {
928
936
  // Extra padding for better look
929
937
  }
930
938
  });
931
- _ && (c.element.style.display = h), p({ ...c, visualPreview: j });
939
+ T && (c.element.style.display = h), p({ ...c, visualPreview: _ });
932
940
  } catch (h) {
933
941
  console.error("Failed to capture preview:", h), p(c);
934
942
  } finally {
935
- O(!1), u(null);
943
+ P(!1), u(null);
936
944
  }
937
945
  }
938
- }, [s, c, d, L]);
939
- 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), () => {
940
- document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", F), window.removeEventListener("click", P, !0);
941
- }), [s, d, F, P]);
942
- const K = async () => {
946
+ }, [s, c, d, $]);
947
+ ue(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", I), window.addEventListener("click", N, !0), () => {
948
+ document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", I), window.removeEventListener("click", N, !0);
949
+ }), [s, d, I, N]);
950
+ const D = async () => {
943
951
  if (!d || !g.trim()) return;
944
- R(!0);
945
- const { semanticReference: m } = d, [h, _] = m.source.split(":"), j = _ || "0";
952
+ k(!0);
953
+ const { semanticReference: m } = d, [h, T] = m.source.split(":"), _ = T || "0";
946
954
  try {
947
955
  if (!(await fetch(`${a}/api/annotations`, {
948
956
  method: "POST",
@@ -952,22 +960,22 @@ const $t = (e) => {
952
960
  },
953
961
  body: JSON.stringify({
954
962
  filePath: h,
955
- line: parseInt(j),
963
+ line: parseInt(_),
956
964
  url: window.location.href,
957
965
  message: g,
958
966
  componentName: m.componentPath || d.tag,
959
967
  reference: m
960
968
  })
961
969
  })).ok) throw new Error("Backend failed");
962
- e(r.success, "success"), p(null), x(""), i(!1), k();
963
- } catch (I) {
964
- console.error(I), e(r.error, "error");
970
+ e(r.success, "success"), p(null), y(""), i(!1), R();
971
+ } catch (H) {
972
+ console.error(H), e(r.error, "error");
965
973
  } finally {
966
- R(!1);
974
+ k(!1);
967
975
  }
968
- }, z = (m) => m.split("/").pop()?.split("\\").pop() || "unknown";
976
+ }, M = (m) => m.split("/").pop()?.split("\\").pop() || "unknown";
969
977
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
970
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:276", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
978
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:281", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
971
979
  /* @__PURE__ */ l.jsx(
972
980
  "button",
973
981
  {
@@ -977,11 +985,11 @@ const $t = (e) => {
977
985
  children: s ? r.exitMode : r.enterMode
978
986
  }
979
987
  ),
980
- G.length > 0 && /* @__PURE__ */ l.jsx(
988
+ L.length > 0 && /* @__PURE__ */ l.jsx(
981
989
  "button",
982
990
  {
983
991
  onClick: () => {
984
- H(!L), i(!1), p(null);
992
+ Y(!$), i(!1), p(null);
985
993
  },
986
994
  className: "vg-button-ghost",
987
995
  style: { padding: "12px 24px", fontSize: "15px", marginLeft: "12px", background: "white" },
@@ -989,7 +997,7 @@ const $t = (e) => {
989
997
  }
990
998
  )
991
999
  ] }),
992
- M && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:301", style: {
1000
+ U && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:306", style: {
993
1001
  position: "fixed",
994
1002
  top: 0,
995
1003
  left: 0,
@@ -1001,11 +1009,11 @@ const $t = (e) => {
1001
1009
  justifyContent: "center",
1002
1010
  zIndex: 1e5,
1003
1011
  cursor: "wait"
1004
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:314", 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: [
1005
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:315", className: "vg-spinner" }),
1012
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:319", 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: [
1013
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:320", className: "vg-spinner" }),
1006
1014
  "Capturing..."
1007
1015
  ] }) }),
1008
- s && c && !d && !M && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:323", style: {
1016
+ s && c && !d && !U && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:328", style: {
1009
1017
  position: "fixed",
1010
1018
  top: c.rect.top,
1011
1019
  left: c.rect.left,
@@ -1019,7 +1027,7 @@ const $t = (e) => {
1019
1027
  boxShadow: "0 0 15px rgba(37, 19, 236, 0.2)",
1020
1028
  transition: "all 0.1s ease-out"
1021
1029
  } }),
1022
- d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:341", className: "vg-animate-fade", style: {
1030
+ d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:346", className: "vg-animate-fade", style: {
1023
1031
  position: "fixed",
1024
1032
  top: 0,
1025
1033
  left: 0,
@@ -1031,33 +1039,33 @@ const $t = (e) => {
1031
1039
  alignItems: "center",
1032
1040
  justifyContent: "center",
1033
1041
  zIndex: 99999
1034
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:354", className: "vg-glassmorphism vg-animate-slide", style: {
1042
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:359", className: "vg-glassmorphism vg-animate-slide", style: {
1035
1043
  padding: "32px",
1036
1044
  width: "460px",
1037
1045
  background: "white",
1038
1046
  color: "#0f172a"
1039
1047
  }, children: [
1040
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:360", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1041
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:362", style: { marginBottom: "20px" }, children: [
1042
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:363", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1043
- d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:365", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
1048
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:365", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1049
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:367", style: { marginBottom: "20px" }, children: [
1050
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:368", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1051
+ d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:370", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
1044
1052
  "📦 ",
1045
1053
  d.semanticReference.componentPath
1046
- ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:369", className: "vg-badge", children: d.tag }),
1047
- 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:374", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
1054
+ ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:374", className: "vg-badge", children: d.tag }),
1055
+ 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:379", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
1048
1056
  "📄 ",
1049
- z(d.semanticReference.source.split(":")[0] || "unknown")
1050
- ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:379", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1057
+ M(d.semanticReference.source.split(":")[0] || "unknown")
1058
+ ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:384", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1051
1059
  "🆔 ",
1052
1060
  d.semanticReference.signature
1053
1061
  ] })
1054
1062
  ] }),
1055
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:384", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
1063
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:389", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
1056
1064
  "🎯 ",
1057
1065
  d.semanticReference.selector
1058
1066
  ] })
1059
1067
  ] }),
1060
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:390", style: {
1068
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:395", style: {
1061
1069
  backgroundColor: "#f8fafc",
1062
1070
  borderRadius: "8px",
1063
1071
  border: "1px solid #e2e8f0",
@@ -1066,8 +1074,8 @@ const $t = (e) => {
1066
1074
  display: "flex",
1067
1075
  flexDirection: "column"
1068
1076
  }, children: [
1069
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:399", style: { padding: "8px 12px", fontSize: "10px", color: "#94a3b8", textTransform: "uppercase", fontWeight: 700, borderBottom: "1px solid #f1f5f9" }, children: r.preview }),
1070
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:402", style: {
1077
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:404", style: { padding: "8px 12px", fontSize: "10px", color: "#94a3b8", textTransform: "uppercase", fontWeight: 700, borderBottom: "1px solid #f1f5f9" }, children: r.preview }),
1078
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:407", style: {
1071
1079
  padding: "12px",
1072
1080
  display: "flex",
1073
1081
  justifyContent: "center",
@@ -1089,7 +1097,7 @@ const $t = (e) => {
1089
1097
  borderRadius: "4px"
1090
1098
  }
1091
1099
  }
1092
- ) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:425", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic" }, children: [
1100
+ ) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:430", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic" }, children: [
1093
1101
  '"',
1094
1102
  d.previewText,
1095
1103
  '"'
@@ -1100,13 +1108,13 @@ const $t = (e) => {
1100
1108
  {
1101
1109
  className: "vg-textarea",
1102
1110
  value: g,
1103
- onChange: (m) => x(m.target.value),
1111
+ onChange: (m) => y(m.target.value),
1104
1112
  rows: 4,
1105
1113
  placeholder: r.placeholder,
1106
1114
  autoFocus: !0
1107
1115
  }
1108
1116
  ),
1109
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:441", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1117
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:446", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1110
1118
  /* @__PURE__ */ l.jsx(
1111
1119
  "button",
1112
1120
  {
@@ -1118,7 +1126,7 @@ const $t = (e) => {
1118
1126
  /* @__PURE__ */ l.jsx(
1119
1127
  "button",
1120
1128
  {
1121
- onClick: K,
1129
+ onClick: D,
1122
1130
  className: "vg-button-primary",
1123
1131
  disabled: E || !g.trim(),
1124
1132
  style: { opacity: E || !g.trim() ? 0.6 : 1 },
@@ -1127,7 +1135,7 @@ const $t = (e) => {
1127
1135
  )
1128
1136
  ] })
1129
1137
  ] }) }),
1130
- L && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:463", className: "vg-animate-fade", style: {
1138
+ $ && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:468", className: "vg-animate-fade", style: {
1131
1139
  position: "fixed",
1132
1140
  top: 0,
1133
1141
  left: 0,
@@ -1139,7 +1147,7 @@ const $t = (e) => {
1139
1147
  alignItems: "center",
1140
1148
  justifyContent: "center",
1141
1149
  zIndex: 99999
1142
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:476", className: "vg-glassmorphism vg-animate-slide", style: {
1150
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:481", className: "vg-glassmorphism vg-animate-slide", style: {
1143
1151
  padding: "32px",
1144
1152
  width: "600px",
1145
1153
  maxHeight: "80vh",
@@ -1148,40 +1156,40 @@ const $t = (e) => {
1148
1156
  display: "flex",
1149
1157
  flexDirection: "column"
1150
1158
  }, children: [
1151
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:485", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1152
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:486", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1153
- /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:487", onClick: () => H(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1159
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:490", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1160
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:491", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1161
+ /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:492", onClick: () => Y(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1154
1162
  ] }),
1155
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:490", 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:492", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : G.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:494", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : G.map((m) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:497", style: {
1163
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:495", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: ee ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:497", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : L.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:499", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : L.map((m) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:502", style: {
1156
1164
  border: "1px solid #e2e8f0",
1157
1165
  borderRadius: "12px",
1158
1166
  padding: "16px",
1159
1167
  backgroundColor: m.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1160
1168
  }, children: [
1161
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:503", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:504", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1162
- m.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:506", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1169
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:508", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:509", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1170
+ m.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:511", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1163
1171
  "✓ ",
1164
1172
  r.readyForReview
1165
- ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:508", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1173
+ ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:513", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1166
1174
  "⏳ ",
1167
1175
  r.pending
1168
1176
  ] }),
1169
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:510", style: { fontSize: "12px", color: "#64748b" }, children: new Date(m.timestamp).toLocaleString() })
1177
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:515", style: { fontSize: "12px", color: "#64748b" }, children: new Date(m.timestamp).toLocaleString() })
1170
1178
  ] }) }),
1171
- /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:516", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1179
+ /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:521", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1172
1180
  '"',
1173
1181
  m.message,
1174
1182
  '"'
1175
1183
  ] }),
1176
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:518", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1177
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:519", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: m.componentName || "UI Element" }),
1178
- m.filePath && m.filePath !== "unknown" && /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:523", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: z(m.filePath) })
1184
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:523", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1185
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:524", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: m.componentName || "UI Element" }),
1186
+ m.filePath && m.filePath !== "unknown" && /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:528", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: M(m.filePath) })
1179
1187
  ] }),
1180
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:529", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1188
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:534", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1181
1189
  m.status === "pending" ? /* @__PURE__ */ l.jsxs(
1182
1190
  "button",
1183
1191
  {
1184
- "data-source-path": "/src/components/ViewGateOverlay.tsx:531",
1192
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:536",
1185
1193
  className: "vg-button-primary",
1186
1194
  style: { display: "flex", alignItems: "center", gap: "6px" },
1187
1195
  onClick: async () => {
@@ -1190,7 +1198,7 @@ const $t = (e) => {
1190
1198
  method: "PATCH",
1191
1199
  headers: { "Content-Type": "application/json", "x-api-key": n },
1192
1200
  body: JSON.stringify({ status: "ready_for_review" })
1193
- })).ok && (k(), e(r.success, "success"));
1201
+ })).ok && (R(), e(r.success, "success"));
1194
1202
  } catch {
1195
1203
  e(r.error, "error");
1196
1204
  }
@@ -1203,7 +1211,7 @@ const $t = (e) => {
1203
1211
  ) : /* @__PURE__ */ l.jsxs(
1204
1212
  "button",
1205
1213
  {
1206
- "data-source-path": "/src/components/ViewGateOverlay.tsx:553",
1214
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:558",
1207
1215
  className: "vg-button-ghost",
1208
1216
  style: { display: "flex", alignItems: "center", gap: "6px" },
1209
1217
  onClick: async () => {
@@ -1212,7 +1220,7 @@ const $t = (e) => {
1212
1220
  method: "PATCH",
1213
1221
  headers: { "Content-Type": "application/json", "x-api-key": n },
1214
1222
  body: JSON.stringify({ status: "pending" })
1215
- })).ok && (k(), e(r.success, "success"));
1223
+ })).ok && (R(), e(r.success, "success"));
1216
1224
  } catch {
1217
1225
  e(r.error, "error");
1218
1226
  }
@@ -1226,19 +1234,41 @@ const $t = (e) => {
1226
1234
  /* @__PURE__ */ l.jsxs(
1227
1235
  "button",
1228
1236
  {
1229
- "data-source-path": "/src/components/ViewGateOverlay.tsx:576",
1237
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:581",
1238
+ className: "vg-button-ghost",
1239
+ style: { display: "flex", alignItems: "center", gap: "6px" },
1240
+ onClick: () => {
1241
+ m.url && (window.location.href = m.url);
1242
+ },
1243
+ children: [
1244
+ "🌐 ",
1245
+ r.goToSite
1246
+ ]
1247
+ }
1248
+ ),
1249
+ /* @__PURE__ */ l.jsxs(
1250
+ "button",
1251
+ {
1252
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:593",
1230
1253
  className: "vg-button-primary",
1231
1254
  style: { backgroundColor: "#ef4444", display: "flex", alignItems: "center", gap: "6px" },
1232
- onClick: async () => {
1233
- if (window.confirm(r.deleteConfirm))
1234
- try {
1235
- (await fetch(`${a}/api/annotations/${m._id}`, {
1236
- method: "DELETE",
1237
- headers: { "x-api-key": n }
1238
- })).ok && (k(), e(r.success, "success"));
1239
- } catch {
1240
- e(r.error, "error");
1255
+ onClick: () => {
1256
+ F({
1257
+ title: r.deleteConfirm,
1258
+ message: r.confirmDelete,
1259
+ onConfirm: async () => {
1260
+ try {
1261
+ (await fetch(`${a}/api/annotations/${m._id}`, {
1262
+ method: "DELETE",
1263
+ headers: { "x-api-key": n }
1264
+ })).ok && (R(), e(r.success, "success"));
1265
+ } catch {
1266
+ e(r.error, "error");
1267
+ } finally {
1268
+ F(null);
1269
+ }
1241
1270
  }
1271
+ });
1242
1272
  },
1243
1273
  children: [
1244
1274
  "🗑️ ",
@@ -1248,6 +1278,50 @@ const $t = (e) => {
1248
1278
  )
1249
1279
  ] })
1250
1280
  ] }, m._id)) })
1281
+ ] }) }),
1282
+ O && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:632", className: "vg-animate-fade", style: {
1283
+ position: "fixed",
1284
+ top: 0,
1285
+ left: 0,
1286
+ width: "100%",
1287
+ height: "100%",
1288
+ backgroundColor: "rgba(0,0,0,0.6)",
1289
+ backdropFilter: "blur(8px)",
1290
+ display: "flex",
1291
+ alignItems: "center",
1292
+ justifyContent: "center",
1293
+ zIndex: 2e5
1294
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:645", className: "vg-glassmorphism vg-animate-slide", style: {
1295
+ padding: "32px",
1296
+ width: "400px",
1297
+ background: "white",
1298
+ textAlign: "center"
1299
+ }, children: [
1300
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:651", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
1301
+ /* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:652", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: O.title }),
1302
+ /* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:653", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: O.message }),
1303
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:655", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
1304
+ /* @__PURE__ */ l.jsx(
1305
+ "button",
1306
+ {
1307
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:656",
1308
+ className: "vg-button-ghost",
1309
+ onClick: () => F(null),
1310
+ style: { flex: 1 },
1311
+ children: r.no
1312
+ }
1313
+ ),
1314
+ /* @__PURE__ */ l.jsx(
1315
+ "button",
1316
+ {
1317
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:663",
1318
+ className: "vg-button-primary",
1319
+ style: { backgroundColor: "#ef4444", flex: 1 },
1320
+ onClick: O.onConfirm,
1321
+ children: r.yes
1322
+ }
1323
+ )
1324
+ ] })
1251
1325
  ] }) })
1252
1326
  ] });
1253
1327
  };
@@ -1257,7 +1331,7 @@ function _e(e, t, r) {
1257
1331
  return e.split(`
1258
1332
  `).map((c, u) => {
1259
1333
  const d = u + 1;
1260
- return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (p, g, x) => p.includes("data-source-path") || x === "Fragment" || x === "React.Fragment" ? p : `${g}<${x} data-source-path="${a}:${d}"`);
1334
+ return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (p, g, y) => p.includes("data-source-path") || y === "Fragment" || y === "React.Fragment" ? p : `${g}<${y} data-source-path="${a}:${d}"`);
1261
1335
  }).join(`
1262
1336
  `);
1263
1337
  }
@@ -1279,7 +1353,7 @@ function Dt(e) {
1279
1353
  }
1280
1354
  export {
1281
1355
  It as ViewGate,
1282
- Gt as ViewGateOverlay,
1356
+ Lt as ViewGateOverlay,
1283
1357
  _e as transformSourcePaths,
1284
1358
  De as useViewGate,
1285
1359
  Dt as viewgateNextLoader,