viewgate-wrapper 1.10.5 → 1.10.6
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.
package/dist/viewgate-wrapper.js
CHANGED
|
@@ -1,290 +1,290 @@
|
|
|
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;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled{opacity:.5;cursor:not-allowed;transform:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:12px 16px;border-radius:12px;background:#fff;color:#1e293b;width:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .2s ease;border:1px solid #e2e8f0}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
|
|
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;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled,.vg-button-ghost:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(.4);transform:none!important;box-shadow:none!important;pointer-events:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:12px 16px;border-radius:12px;background:#fff;color:#1e293b;width:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .2s ease;border:1px solid #e2e8f0}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-animate-spin{animation:vg-spin .8s linear infinite}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
import pt, { useRef as Oe, useState as k, useEffect as J, forwardRef as Ke, createElement as _e, createContext as mt, useContext as ft, useCallback as fe } from "react";
|
|
3
|
+
import { createPortal as ht } from "react-dom";
|
|
4
|
+
var he = { exports: {} }, le = {};
|
|
5
|
+
var Ne;
|
|
6
|
+
function gt() {
|
|
7
|
+
if (Ne) return le;
|
|
8
|
+
Ne = 1;
|
|
9
9
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
10
|
function r(n, a, s) {
|
|
11
|
-
var
|
|
12
|
-
if (s !== void 0 && (
|
|
11
|
+
var i = null;
|
|
12
|
+
if (s !== void 0 && (i = "" + s), a.key !== void 0 && (i = "" + a.key), "key" in a) {
|
|
13
13
|
s = {};
|
|
14
|
-
for (var
|
|
15
|
-
|
|
14
|
+
for (var l in a)
|
|
15
|
+
l !== "key" && (s[l] = a[l]);
|
|
16
16
|
} else s = a;
|
|
17
17
|
return a = s.ref, {
|
|
18
18
|
$$typeof: e,
|
|
19
19
|
type: n,
|
|
20
|
-
key:
|
|
20
|
+
key: i,
|
|
21
21
|
ref: a !== void 0 ? a : null,
|
|
22
22
|
props: s
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
function e(
|
|
32
|
-
if (
|
|
33
|
-
if (typeof
|
|
34
|
-
return
|
|
35
|
-
if (typeof
|
|
36
|
-
switch (
|
|
37
|
-
case N:
|
|
38
|
-
return "Fragment";
|
|
25
|
+
return le.Fragment = t, le.jsx = r, le.jsxs = r, le;
|
|
26
|
+
}
|
|
27
|
+
var de = {};
|
|
28
|
+
var Le;
|
|
29
|
+
function yt() {
|
|
30
|
+
return Le || (Le = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
+
function e(c) {
|
|
32
|
+
if (c == null) return null;
|
|
33
|
+
if (typeof c == "function")
|
|
34
|
+
return c.$$typeof === se ? null : c.displayName || c.name || null;
|
|
35
|
+
if (typeof c == "string") return c;
|
|
36
|
+
switch (c) {
|
|
39
37
|
case L:
|
|
38
|
+
return "Fragment";
|
|
39
|
+
case q:
|
|
40
40
|
return "Profiler";
|
|
41
|
-
case
|
|
41
|
+
case U:
|
|
42
42
|
return "StrictMode";
|
|
43
|
-
case
|
|
43
|
+
case ve:
|
|
44
44
|
return "Suspense";
|
|
45
|
-
case
|
|
45
|
+
case I:
|
|
46
46
|
return "SuspenseList";
|
|
47
|
-
case
|
|
47
|
+
case $e:
|
|
48
48
|
return "Activity";
|
|
49
49
|
}
|
|
50
|
-
if (typeof
|
|
51
|
-
switch (typeof
|
|
50
|
+
if (typeof c == "object")
|
|
51
|
+
switch (typeof c.tag == "number" && console.error(
|
|
52
52
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
-
),
|
|
54
|
-
case
|
|
53
|
+
), c.$$typeof) {
|
|
54
|
+
case V:
|
|
55
55
|
return "Portal";
|
|
56
|
-
case
|
|
57
|
-
return
|
|
58
|
-
case
|
|
59
|
-
return (
|
|
60
|
-
case
|
|
61
|
-
var
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
|
|
56
|
+
case T:
|
|
57
|
+
return c.displayName || "Context";
|
|
58
|
+
case O:
|
|
59
|
+
return (c._context.displayName || "Context") + ".Consumer";
|
|
60
|
+
case S:
|
|
61
|
+
var f = c.render;
|
|
62
|
+
return c = c.displayName, c || (c = f.displayName || f.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
|
|
63
|
+
case M:
|
|
64
|
+
return f = c.displayName || null, f !== null ? f : e(c.type) || "Memo";
|
|
65
|
+
case ue:
|
|
66
|
+
f = c._payload, c = c._init;
|
|
67
67
|
try {
|
|
68
|
-
return e(
|
|
68
|
+
return e(c(f));
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
|
-
function t(
|
|
75
|
-
return "" +
|
|
74
|
+
function t(c) {
|
|
75
|
+
return "" + c;
|
|
76
76
|
}
|
|
77
|
-
function r(
|
|
77
|
+
function r(c) {
|
|
78
78
|
try {
|
|
79
|
-
t(
|
|
80
|
-
var
|
|
79
|
+
t(c);
|
|
80
|
+
var f = !1;
|
|
81
81
|
} catch {
|
|
82
|
-
|
|
82
|
+
f = !0;
|
|
83
83
|
}
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
return
|
|
88
|
-
|
|
84
|
+
if (f) {
|
|
85
|
+
f = console;
|
|
86
|
+
var C = f.error, E = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
|
|
87
|
+
return C.call(
|
|
88
|
+
f,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
|
|
91
|
-
), t(
|
|
90
|
+
E
|
|
91
|
+
), t(c);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function n(
|
|
95
|
-
if (
|
|
96
|
-
if (typeof
|
|
94
|
+
function n(c) {
|
|
95
|
+
if (c === L) return "<>";
|
|
96
|
+
if (typeof c == "object" && c !== null && c.$$typeof === ue)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
|
-
var
|
|
100
|
-
return
|
|
99
|
+
var f = e(c);
|
|
100
|
+
return f ? "<" + f + ">" : "<...>";
|
|
101
101
|
} catch {
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function a() {
|
|
106
|
-
var
|
|
107
|
-
return
|
|
106
|
+
var c = Z.A;
|
|
107
|
+
return c === null ? null : c.getOwner();
|
|
108
108
|
}
|
|
109
109
|
function s() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
112
|
+
function i(c) {
|
|
113
|
+
if (pe.call(c, "key")) {
|
|
114
|
+
var f = Object.getOwnPropertyDescriptor(c, "key").get;
|
|
115
|
+
if (f && f.isReactWarning) return !1;
|
|
116
116
|
}
|
|
117
|
-
return
|
|
117
|
+
return c.key !== void 0;
|
|
118
118
|
}
|
|
119
|
-
function c
|
|
120
|
-
function
|
|
121
|
-
|
|
119
|
+
function l(c, f) {
|
|
120
|
+
function C() {
|
|
121
|
+
K || (K = !0, console.error(
|
|
122
122
|
"%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)",
|
|
123
|
-
|
|
123
|
+
f
|
|
124
124
|
));
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
126
|
+
C.isReactWarning = !0, Object.defineProperty(c, "key", {
|
|
127
|
+
get: C,
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
var
|
|
133
|
-
return
|
|
131
|
+
function p() {
|
|
132
|
+
var c = e(this.type);
|
|
133
|
+
return B[c] || (B[c] = !0, console.error(
|
|
134
134
|
"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."
|
|
135
|
-
)),
|
|
135
|
+
)), c = this.props.ref, c !== void 0 ? c : null;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
var
|
|
139
|
-
return
|
|
140
|
-
$$typeof:
|
|
141
|
-
type:
|
|
142
|
-
key:
|
|
143
|
-
props:
|
|
144
|
-
_owner:
|
|
145
|
-
}, (
|
|
137
|
+
function u(c, f, C, E, z, D) {
|
|
138
|
+
var b = C.ref;
|
|
139
|
+
return c = {
|
|
140
|
+
$$typeof: v,
|
|
141
|
+
type: c,
|
|
142
|
+
key: f,
|
|
143
|
+
props: C,
|
|
144
|
+
_owner: E
|
|
145
|
+
}, (b !== void 0 ? b : null) !== null ? Object.defineProperty(c, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
147
|
-
get:
|
|
148
|
-
}) : Object.defineProperty(
|
|
147
|
+
get: p
|
|
148
|
+
}) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
149
149
|
configurable: !1,
|
|
150
150
|
enumerable: !1,
|
|
151
151
|
writable: !0,
|
|
152
152
|
value: 0
|
|
153
|
-
}), Object.defineProperty(
|
|
153
|
+
}), Object.defineProperty(c, "_debugInfo", {
|
|
154
154
|
configurable: !1,
|
|
155
155
|
enumerable: !1,
|
|
156
156
|
writable: !0,
|
|
157
157
|
value: null
|
|
158
|
-
}), Object.defineProperty(
|
|
158
|
+
}), Object.defineProperty(c, "_debugStack", {
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
|
-
value:
|
|
163
|
-
}), Object.defineProperty(
|
|
162
|
+
value: z
|
|
163
|
+
}), Object.defineProperty(c, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
168
|
-
}), Object.freeze && (Object.freeze(
|
|
167
|
+
value: D
|
|
168
|
+
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
170
|
+
function x(c, f, C, E, z, D) {
|
|
171
|
+
var b = f.children;
|
|
172
|
+
if (b !== void 0)
|
|
173
|
+
if (E)
|
|
174
|
+
if (me(b)) {
|
|
175
|
+
for (E = 0; E < b.length; E++)
|
|
176
|
+
m(b[E]);
|
|
177
|
+
Object.freeze && Object.freeze(b);
|
|
178
178
|
} else
|
|
179
179
|
console.error(
|
|
180
180
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
181
|
);
|
|
182
|
-
else
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
return
|
|
182
|
+
else m(b);
|
|
183
|
+
if (pe.call(f, "key")) {
|
|
184
|
+
b = e(c);
|
|
185
|
+
var P = Object.keys(f).filter(function(ie) {
|
|
186
|
+
return ie !== "key";
|
|
187
187
|
});
|
|
188
|
-
|
|
188
|
+
E = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", Q[b + E] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
190
|
let props = %s;
|
|
191
191
|
<%s {...props} />
|
|
192
192
|
React keys must be passed directly to JSX without using spread:
|
|
193
193
|
let props = %s;
|
|
194
194
|
<%s key={someKey} {...props} />`,
|
|
195
|
+
E,
|
|
195
196
|
b,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
), ie[C + b] = !0);
|
|
197
|
+
P,
|
|
198
|
+
b
|
|
199
|
+
), Q[b + E] = !0);
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
206
|
-
return
|
|
207
|
-
|
|
208
|
-
typeof
|
|
209
|
-
),
|
|
210
|
-
|
|
201
|
+
if (b = null, C !== void 0 && (r(C), b = "" + C), i(f) && (r(f.key), b = "" + f.key), "key" in f) {
|
|
202
|
+
C = {};
|
|
203
|
+
for (var Y in f)
|
|
204
|
+
Y !== "key" && (C[Y] = f[Y]);
|
|
205
|
+
} else C = f;
|
|
206
|
+
return b && l(
|
|
207
|
+
C,
|
|
208
|
+
typeof c == "function" ? c.displayName || c.name || "Unknown" : c
|
|
209
|
+
), u(
|
|
210
|
+
c,
|
|
211
|
+
b,
|
|
211
212
|
C,
|
|
212
|
-
v,
|
|
213
213
|
a(),
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
z,
|
|
215
|
+
D
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
218
|
+
function m(c) {
|
|
219
|
+
w(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === ue && (c._payload.status === "fulfilled" ? w(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
return typeof
|
|
221
|
+
function w(c) {
|
|
222
|
+
return typeof c == "object" && c !== null && c.$$typeof === v;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var g = pt, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), V = /* @__PURE__ */ Symbol.for("react.portal"), L = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), O = /* @__PURE__ */ Symbol.for("react.consumer"), T = /* @__PURE__ */ Symbol.for("react.context"), S = /* @__PURE__ */ Symbol.for("react.forward_ref"), ve = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), M = /* @__PURE__ */ Symbol.for("react.memo"), ue = /* @__PURE__ */ Symbol.for("react.lazy"), $e = /* @__PURE__ */ Symbol.for("react.activity"), se = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, pe = Object.prototype.hasOwnProperty, me = Array.isArray, F = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
|
-
|
|
228
|
-
react_stack_bottom_frame: function(
|
|
229
|
-
return
|
|
227
|
+
g = {
|
|
228
|
+
react_stack_bottom_frame: function(c) {
|
|
229
|
+
return c();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
232
|
+
var K, B = {}, ae = g.react_stack_bottom_frame.bind(
|
|
233
|
+
g,
|
|
234
234
|
s
|
|
235
|
-
)(), oe =
|
|
236
|
-
|
|
237
|
-
var
|
|
238
|
-
return
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
235
|
+
)(), oe = F(n(s)), Q = {};
|
|
236
|
+
de.Fragment = L, de.jsx = function(c, f, C) {
|
|
237
|
+
var E = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
238
|
+
return x(
|
|
239
|
+
c,
|
|
240
|
+
f,
|
|
241
|
+
C,
|
|
242
242
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
E ? Error("react-stack-top-frame") : ae,
|
|
244
|
+
E ? F(n(c)) : oe
|
|
245
245
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
248
|
-
return
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
246
|
+
}, de.jsxs = function(c, f, C) {
|
|
247
|
+
var E = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return x(
|
|
249
|
+
c,
|
|
250
|
+
f,
|
|
251
|
+
C,
|
|
252
252
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
E ? Error("react-stack-top-frame") : ae,
|
|
254
|
+
E ? F(n(c)) : oe
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
|
-
})()),
|
|
257
|
+
})()), de;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
259
|
+
var Ie;
|
|
260
|
+
function xt() {
|
|
261
|
+
return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? he.exports = gt() : he.exports = yt()), he.exports;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
const
|
|
265
|
-
const t =
|
|
266
|
-
return
|
|
263
|
+
var o = xt();
|
|
264
|
+
const wt = ({ children: e }) => {
|
|
265
|
+
const t = Oe(null), [r, n] = k(null);
|
|
266
|
+
return J(() => {
|
|
267
267
|
if (t.current && !t.current.shadowRoot) {
|
|
268
268
|
const a = t.current.attachShadow({ mode: "open" });
|
|
269
|
-
document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach((
|
|
270
|
-
(
|
|
269
|
+
document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach((l) => {
|
|
270
|
+
(l.textContent?.includes(".vg-") || l.textContent?.includes("--vg-")) && a.appendChild(l.cloneNode(!0));
|
|
271
271
|
});
|
|
272
|
-
const
|
|
273
|
-
|
|
272
|
+
const i = document.createElement("link");
|
|
273
|
+
i.rel = "stylesheet", i.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap", a.appendChild(i), n(a);
|
|
274
274
|
}
|
|
275
|
-
}, []), /* @__PURE__ */
|
|
275
|
+
}, []), /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ShadowRootWrapper.tsx:38", ref: t, id: "viewgate-shadow-host", children: r && ht(e, r) });
|
|
276
276
|
};
|
|
277
|
-
const
|
|
278
|
-
const
|
|
279
|
-
const
|
|
277
|
+
const Qe = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
|
|
278
|
+
const vt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
279
|
+
const bt = (e) => e.replace(
|
|
280
280
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
281
281
|
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
282
282
|
);
|
|
283
|
-
const
|
|
284
|
-
const t =
|
|
283
|
+
const ze = (e) => {
|
|
284
|
+
const t = bt(e);
|
|
285
285
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
286
286
|
};
|
|
287
|
-
var
|
|
287
|
+
var Ct = {
|
|
288
288
|
xmlns: "http://www.w3.org/2000/svg",
|
|
289
289
|
width: 24,
|
|
290
290
|
height: 24,
|
|
@@ -295,13 +295,13 @@ var wt = {
|
|
|
295
295
|
strokeLinecap: "round",
|
|
296
296
|
strokeLinejoin: "round"
|
|
297
297
|
};
|
|
298
|
-
const
|
|
298
|
+
const Et = (e) => {
|
|
299
299
|
for (const t in e)
|
|
300
300
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
301
301
|
return !0;
|
|
302
302
|
return !1;
|
|
303
303
|
};
|
|
304
|
-
const
|
|
304
|
+
const St = Ke(
|
|
305
305
|
({
|
|
306
306
|
color: e = "currentColor",
|
|
307
307
|
size: t = 24,
|
|
@@ -309,61 +309,61 @@ const bt = Xe(
|
|
|
309
309
|
absoluteStrokeWidth: n,
|
|
310
310
|
className: a = "",
|
|
311
311
|
children: s,
|
|
312
|
-
iconNode:
|
|
313
|
-
...
|
|
314
|
-
},
|
|
312
|
+
iconNode: i,
|
|
313
|
+
...l
|
|
314
|
+
}, p) => _e(
|
|
315
315
|
"svg",
|
|
316
316
|
{
|
|
317
|
-
ref:
|
|
318
|
-
...
|
|
317
|
+
ref: p,
|
|
318
|
+
...Ct,
|
|
319
319
|
width: t,
|
|
320
320
|
height: t,
|
|
321
321
|
stroke: e,
|
|
322
322
|
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
323
|
-
className:
|
|
324
|
-
...!s && !
|
|
325
|
-
...
|
|
323
|
+
className: Qe("lucide", a),
|
|
324
|
+
...!s && !Et(l) && { "aria-hidden": "true" },
|
|
325
|
+
...l
|
|
326
326
|
},
|
|
327
327
|
[
|
|
328
|
-
...
|
|
328
|
+
...i.map(([u, x]) => _e(u, x)),
|
|
329
329
|
...Array.isArray(s) ? s : [s]
|
|
330
330
|
]
|
|
331
331
|
)
|
|
332
332
|
);
|
|
333
|
-
const
|
|
334
|
-
const r =
|
|
335
|
-
({ className: n, ...a }, s) =>
|
|
333
|
+
const N = (e, t) => {
|
|
334
|
+
const r = Ke(
|
|
335
|
+
({ className: n, ...a }, s) => _e(St, {
|
|
336
336
|
ref: s,
|
|
337
337
|
iconNode: t,
|
|
338
|
-
className:
|
|
339
|
-
`lucide-${
|
|
338
|
+
className: Qe(
|
|
339
|
+
`lucide-${vt(ze(e))}`,
|
|
340
340
|
`lucide-${e}`,
|
|
341
341
|
n
|
|
342
342
|
),
|
|
343
343
|
...a
|
|
344
344
|
})
|
|
345
345
|
);
|
|
346
|
-
return r.displayName =
|
|
346
|
+
return r.displayName = ze(e), r;
|
|
347
347
|
};
|
|
348
|
-
const
|
|
348
|
+
const kt = [
|
|
349
349
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
350
350
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
351
351
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
352
|
-
],
|
|
353
|
-
const
|
|
352
|
+
], Rt = N("circle-alert", kt);
|
|
353
|
+
const jt = [
|
|
354
354
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
355
355
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
356
|
-
],
|
|
357
|
-
const
|
|
356
|
+
], ne = N("circle-check", jt);
|
|
357
|
+
const Ot = [
|
|
358
358
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
359
359
|
["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
|
|
360
|
-
],
|
|
361
|
-
const
|
|
360
|
+
], Me = N("clock", Ot);
|
|
361
|
+
const _t = [
|
|
362
362
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
363
363
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
364
364
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
365
|
-
],
|
|
366
|
-
const
|
|
365
|
+
], Fe = N("external-link", _t);
|
|
366
|
+
const Vt = [
|
|
367
367
|
[
|
|
368
368
|
"path",
|
|
369
369
|
{
|
|
@@ -372,8 +372,9 @@ const jt = [
|
|
|
372
372
|
}
|
|
373
373
|
],
|
|
374
374
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
375
|
-
],
|
|
376
|
-
const
|
|
375
|
+
], Tt = N("eye", Vt);
|
|
376
|
+
const Pt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], At = N("loader-circle", Pt);
|
|
377
|
+
const Gt = [
|
|
377
378
|
[
|
|
378
379
|
"path",
|
|
379
380
|
{
|
|
@@ -381,8 +382,8 @@ const _t = [
|
|
|
381
382
|
key: "18887p"
|
|
382
383
|
}
|
|
383
384
|
]
|
|
384
|
-
],
|
|
385
|
-
const
|
|
385
|
+
], Ce = N("message-square", Gt);
|
|
386
|
+
const $t = [
|
|
386
387
|
[
|
|
387
388
|
"path",
|
|
388
389
|
{
|
|
@@ -390,8 +391,8 @@ const Vt = [
|
|
|
390
391
|
key: "edeuup"
|
|
391
392
|
}
|
|
392
393
|
]
|
|
393
|
-
],
|
|
394
|
-
const
|
|
394
|
+
], Nt = N("mouse-pointer-2", $t);
|
|
395
|
+
const Lt = [
|
|
395
396
|
[
|
|
396
397
|
"path",
|
|
397
398
|
{
|
|
@@ -400,12 +401,12 @@ const Tt = [
|
|
|
400
401
|
}
|
|
401
402
|
],
|
|
402
403
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
403
|
-
],
|
|
404
|
-
const
|
|
404
|
+
], It = N("pencil", Lt);
|
|
405
|
+
const zt = [
|
|
405
406
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
406
407
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
407
|
-
],
|
|
408
|
-
const
|
|
408
|
+
], Mt = N("rotate-ccw", zt);
|
|
409
|
+
const Ft = [
|
|
409
410
|
[
|
|
410
411
|
"path",
|
|
411
412
|
{
|
|
@@ -414,18 +415,18 @@ const Nt = [
|
|
|
414
415
|
}
|
|
415
416
|
],
|
|
416
417
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
417
|
-
],
|
|
418
|
-
const
|
|
418
|
+
], Dt = N("send", Ft);
|
|
419
|
+
const Ht = [
|
|
419
420
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
420
421
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
421
422
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
422
423
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
423
424
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
424
|
-
],
|
|
425
|
-
const
|
|
425
|
+
], De = N("trash-2", Ht);
|
|
426
|
+
const Wt = [
|
|
426
427
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
427
428
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
428
|
-
],
|
|
429
|
+
], Ee = N("x", Wt), Ut = {
|
|
429
430
|
en: {
|
|
430
431
|
enterMode: "Enter Feedback Mode",
|
|
431
432
|
exitMode: "Exit Mode",
|
|
@@ -447,18 +448,18 @@ const Mt = [
|
|
|
447
448
|
pending: "Pending",
|
|
448
449
|
readyForReview: "Ready for Review",
|
|
449
450
|
noComments: "No comments found.",
|
|
450
|
-
deleteConfirm: "
|
|
451
|
+
deleteConfirm: "Delete comment",
|
|
451
452
|
markReady: "Mark as Ready",
|
|
452
453
|
reopen: "Reopen",
|
|
453
454
|
review: "Review",
|
|
454
|
-
confirmDelete: "Are you sure you want to permanently delete this comment?",
|
|
455
|
-
markReadyConfirm: "
|
|
456
|
-
confirmMarkReady: "
|
|
457
|
-
reopenConfirm: "Reopen
|
|
458
|
-
confirmReopen: "
|
|
459
|
-
yes: "Yes,
|
|
455
|
+
confirmDelete: "Are you sure you want to permanently delete this comment? This action cannot be undone.",
|
|
456
|
+
markReadyConfirm: "Complete review",
|
|
457
|
+
confirmMarkReady: "Do you want to mark this comment as ready? it will be moved to the completed state.",
|
|
458
|
+
reopenConfirm: "Reopen comment",
|
|
459
|
+
confirmReopen: "Do you want to set this comment back to pending status?",
|
|
460
|
+
yes: "Yes, confirm",
|
|
460
461
|
no: "No, cancel",
|
|
461
|
-
deleteSuccess: "
|
|
462
|
+
deleteSuccess: "Comment deleted successfully.",
|
|
462
463
|
updateSuccess: "Updated successfully.",
|
|
463
464
|
navigating: "Redirecting to review...",
|
|
464
465
|
selectToComment: "Click to comment",
|
|
@@ -491,16 +492,16 @@ const Mt = [
|
|
|
491
492
|
pending: "Pendiente",
|
|
492
493
|
readyForReview: "Lista para revisión",
|
|
493
494
|
noComments: "No hay comentarios.",
|
|
494
|
-
deleteConfirm: "
|
|
495
|
+
deleteConfirm: "Eliminar comentario",
|
|
495
496
|
markReady: "Marcar como Listo",
|
|
496
497
|
reopen: "Reabrir",
|
|
497
498
|
review: "Revisar",
|
|
498
|
-
confirmDelete: "¿Estás seguro de que deseas eliminar permanentemente este comentario?",
|
|
499
|
-
markReadyConfirm: "
|
|
500
|
-
confirmMarkReady: "¿
|
|
501
|
-
reopenConfirm: "
|
|
502
|
-
confirmReopen: "¿
|
|
503
|
-
yes: "Sí,
|
|
499
|
+
confirmDelete: "¿Estás seguro de que deseas eliminar permanentemente este comentario? Esta acción no se puede deshacer.",
|
|
500
|
+
markReadyConfirm: "Finalizar revisión",
|
|
501
|
+
confirmMarkReady: "¿Deseas marcar este comentario como listo? Pasará al estado completado.",
|
|
502
|
+
reopenConfirm: "Reabrir comentario",
|
|
503
|
+
confirmReopen: "¿Deseas volver a poner este comentario en estado pendiente?",
|
|
504
|
+
yes: "Sí, confirmar",
|
|
504
505
|
no: "No, cancelar",
|
|
505
506
|
deleteSuccess: "El comentario ha sido eliminado.",
|
|
506
507
|
updateSuccess: "Actualizado correctamente.",
|
|
@@ -514,37 +515,54 @@ const Mt = [
|
|
|
514
515
|
annotations: "Comentarios",
|
|
515
516
|
viewAll: "Ver Todos"
|
|
516
517
|
}
|
|
517
|
-
},
|
|
518
|
-
const e =
|
|
518
|
+
}, et = mt(void 0), qt = () => {
|
|
519
|
+
const e = ft(et);
|
|
519
520
|
if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
|
|
520
521
|
return e;
|
|
521
|
-
},
|
|
522
|
+
}, Ve = "viewgate_enabled", Bt = () => typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("viewgate") ? (sessionStorage.setItem(Ve, "true"), !0) : sessionStorage.getItem(Ve) === "true", an = ({
|
|
522
523
|
children: e,
|
|
523
524
|
language: t = "es",
|
|
524
525
|
apiKey: r,
|
|
525
526
|
baseUrl: n = "https://view-gate.vercel.app"
|
|
526
527
|
}) => {
|
|
527
|
-
const [a] =
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
const [a, s] = k(!1), [i, l] = k([]);
|
|
529
|
+
J(() => {
|
|
530
|
+
s(Bt());
|
|
531
|
+
}, []);
|
|
532
|
+
const p = () => {
|
|
533
|
+
if (sessionStorage.removeItem(Ve), s(!1), typeof window < "u") {
|
|
534
|
+
const m = new URL(window.location.href);
|
|
535
|
+
m.searchParams.delete("viewgate"), window.history.replaceState({}, "", m.toString());
|
|
536
|
+
}
|
|
537
|
+
}, u = (m, w) => {
|
|
538
|
+
const g = Date.now();
|
|
539
|
+
l((v) => [...v, { id: g, message: m, type: w }]), setTimeout(() => {
|
|
540
|
+
l((v) => v.filter((V) => V.id !== g));
|
|
531
541
|
}, 4e3);
|
|
532
|
-
},
|
|
533
|
-
return /* @__PURE__ */
|
|
542
|
+
}, x = Ut[t];
|
|
543
|
+
return /* @__PURE__ */ o.jsxs(et.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:244", value: {
|
|
544
|
+
addToast: u,
|
|
545
|
+
language: t,
|
|
546
|
+
t: x,
|
|
547
|
+
apiKey: r,
|
|
548
|
+
baseUrl: n,
|
|
549
|
+
disableViewGate: p,
|
|
550
|
+
hasActiveToasts: i.length > 0
|
|
551
|
+
}, children: [
|
|
534
552
|
e,
|
|
535
|
-
a && /* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */
|
|
553
|
+
a && /* @__PURE__ */ o.jsx(wt, { "data-source-path": "/src/components/ViewGateProvider.tsx:255", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:256", className: "vg-container", children: [
|
|
554
|
+
/* @__PURE__ */ o.jsx(rn, { "data-source-path": "/src/components/ViewGateProvider.tsx:257" }),
|
|
555
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:258", className: "vg-toasts", style: { zIndex: 2147483646 }, children: i.map((m) => /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:260", className: `vg-toast vg-animate-slide ${m.type}`, children: [
|
|
556
|
+
m.type === "success" ? /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateProvider.tsx:262", size: 24, color: "#22c55e" }) : /* @__PURE__ */ o.jsx(Rt, { "data-source-path": "/src/components/ViewGateProvider.tsx:264", size: 24, color: "#ef4444" }),
|
|
557
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:266", children: [
|
|
558
|
+
/* @__PURE__ */ o.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:267", style: { display: "block", fontSize: "13px", color: "#0f172a", textTransform: "uppercase", marginBottom: "2px" }, children: m.type === "success" ? x.successHeader : x.errorHeader }),
|
|
559
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:270", style: { fontSize: "14px", color: "#64748b" }, children: m.message })
|
|
542
560
|
] })
|
|
543
|
-
] },
|
|
561
|
+
] }, m.id)) })
|
|
544
562
|
] }) })
|
|
545
563
|
] });
|
|
546
564
|
};
|
|
547
|
-
function
|
|
565
|
+
function Yt(e, t) {
|
|
548
566
|
if (e.match(/^[a-z]+:\/\//i))
|
|
549
567
|
return e;
|
|
550
568
|
if (e.match(/^\/\//))
|
|
@@ -554,7 +572,7 @@ function Ht(e, t) {
|
|
|
554
572
|
const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), a = r.createElement("a");
|
|
555
573
|
return r.head.appendChild(n), r.body.appendChild(a), t && (n.href = t), a.href = e, a.href;
|
|
556
574
|
}
|
|
557
|
-
const
|
|
575
|
+
const Xt = /* @__PURE__ */ (() => {
|
|
558
576
|
let e = 0;
|
|
559
577
|
const t = () => (
|
|
560
578
|
// eslint-disable-next-line no-bitwise
|
|
@@ -562,33 +580,33 @@ const Wt = /* @__PURE__ */ (() => {
|
|
|
562
580
|
);
|
|
563
581
|
return () => (e += 1, `u${t()}${e}`);
|
|
564
582
|
})();
|
|
565
|
-
function
|
|
583
|
+
function W(e) {
|
|
566
584
|
const t = [];
|
|
567
585
|
for (let r = 0, n = e.length; r < n; r++)
|
|
568
586
|
t.push(e[r]);
|
|
569
587
|
return t;
|
|
570
588
|
}
|
|
571
|
-
let
|
|
572
|
-
function
|
|
573
|
-
return
|
|
589
|
+
let te = null;
|
|
590
|
+
function tt(e = {}) {
|
|
591
|
+
return te || (e.includeStyleProperties ? (te = e.includeStyleProperties, te) : (te = W(window.getComputedStyle(document.documentElement)), te));
|
|
574
592
|
}
|
|
575
|
-
function
|
|
593
|
+
function ge(e, t) {
|
|
576
594
|
const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
577
595
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
578
596
|
}
|
|
579
|
-
function
|
|
580
|
-
const t =
|
|
597
|
+
function Jt(e) {
|
|
598
|
+
const t = ge(e, "border-left-width"), r = ge(e, "border-right-width");
|
|
581
599
|
return e.clientWidth + t + r;
|
|
582
600
|
}
|
|
583
|
-
function
|
|
584
|
-
const t =
|
|
601
|
+
function Zt(e) {
|
|
602
|
+
const t = ge(e, "border-top-width"), r = ge(e, "border-bottom-width");
|
|
585
603
|
return e.clientHeight + t + r;
|
|
586
604
|
}
|
|
587
|
-
function
|
|
588
|
-
const r = t.width ||
|
|
605
|
+
function rt(e, t = {}) {
|
|
606
|
+
const r = t.width || Jt(e), n = t.height || Zt(e);
|
|
589
607
|
return { width: r, height: n };
|
|
590
608
|
}
|
|
591
|
-
function
|
|
609
|
+
function Kt() {
|
|
592
610
|
let e, t;
|
|
593
611
|
try {
|
|
594
612
|
t = process;
|
|
@@ -598,10 +616,10 @@ function Bt() {
|
|
|
598
616
|
return r && (e = parseInt(r, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
599
617
|
}
|
|
600
618
|
const $ = 16384;
|
|
601
|
-
function
|
|
619
|
+
function Qt(e) {
|
|
602
620
|
(e.width > $ || e.height > $) && (e.width > $ && e.height > $ ? e.width > e.height ? (e.height *= $ / e.width, e.width = $) : (e.width *= $ / e.height, e.height = $) : e.width > $ ? (e.height *= $ / e.width, e.width = $) : (e.width *= $ / e.height, e.height = $));
|
|
603
621
|
}
|
|
604
|
-
function
|
|
622
|
+
function ye(e) {
|
|
605
623
|
return new Promise((t, r) => {
|
|
606
624
|
const n = new Image();
|
|
607
625
|
n.onload = () => {
|
|
@@ -611,223 +629,223 @@ function pe(e) {
|
|
|
611
629
|
}, n.onerror = r, n.crossOrigin = "anonymous", n.decoding = "async", n.src = e;
|
|
612
630
|
});
|
|
613
631
|
}
|
|
614
|
-
async function
|
|
632
|
+
async function er(e) {
|
|
615
633
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
|
|
616
634
|
}
|
|
617
|
-
async function
|
|
635
|
+
async function tr(e, t, r) {
|
|
618
636
|
const n = "http://www.w3.org/2000/svg", a = document.createElementNS(n, "svg"), s = document.createElementNS(n, "foreignObject");
|
|
619
|
-
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),
|
|
637
|
+
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), er(a);
|
|
620
638
|
}
|
|
621
|
-
const
|
|
639
|
+
const A = (e, t) => {
|
|
622
640
|
if (e instanceof t)
|
|
623
641
|
return !0;
|
|
624
642
|
const r = Object.getPrototypeOf(e);
|
|
625
|
-
return r === null ? !1 : r.constructor.name === t.name ||
|
|
643
|
+
return r === null ? !1 : r.constructor.name === t.name || A(r, t);
|
|
626
644
|
};
|
|
627
|
-
function
|
|
645
|
+
function rr(e) {
|
|
628
646
|
const t = e.getPropertyValue("content");
|
|
629
647
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
630
648
|
}
|
|
631
|
-
function
|
|
632
|
-
return
|
|
649
|
+
function nr(e, t) {
|
|
650
|
+
return tt(t).map((r) => {
|
|
633
651
|
const n = e.getPropertyValue(r), a = e.getPropertyPriority(r);
|
|
634
652
|
return `${r}: ${n}${a ? " !important" : ""};`;
|
|
635
653
|
}).join(" ");
|
|
636
654
|
}
|
|
637
|
-
function
|
|
638
|
-
const a = `.${e}:${t}`, s = r.cssText ?
|
|
655
|
+
function sr(e, t, r, n) {
|
|
656
|
+
const a = `.${e}:${t}`, s = r.cssText ? rr(r) : nr(r, n);
|
|
639
657
|
return document.createTextNode(`${a}{${s}}`);
|
|
640
658
|
}
|
|
641
|
-
function
|
|
659
|
+
function He(e, t, r, n) {
|
|
642
660
|
const a = window.getComputedStyle(e, r), s = a.getPropertyValue("content");
|
|
643
661
|
if (s === "" || s === "none")
|
|
644
662
|
return;
|
|
645
|
-
const
|
|
663
|
+
const i = Xt();
|
|
646
664
|
try {
|
|
647
|
-
t.className = `${t.className} ${
|
|
665
|
+
t.className = `${t.className} ${i}`;
|
|
648
666
|
} catch {
|
|
649
667
|
return;
|
|
650
668
|
}
|
|
651
|
-
const
|
|
652
|
-
|
|
669
|
+
const l = document.createElement("style");
|
|
670
|
+
l.appendChild(sr(i, r, a, n)), t.appendChild(l);
|
|
653
671
|
}
|
|
654
|
-
function
|
|
655
|
-
|
|
672
|
+
function ar(e, t, r) {
|
|
673
|
+
He(e, t, ":before", r), He(e, t, ":after", r);
|
|
656
674
|
}
|
|
657
|
-
const
|
|
658
|
-
woff:
|
|
659
|
-
woff2:
|
|
675
|
+
const We = "application/font-woff", Ue = "image/jpeg", or = {
|
|
676
|
+
woff: We,
|
|
677
|
+
woff2: We,
|
|
660
678
|
ttf: "application/font-truetype",
|
|
661
679
|
eot: "application/vnd.ms-fontobject",
|
|
662
680
|
png: "image/png",
|
|
663
|
-
jpg:
|
|
664
|
-
jpeg:
|
|
681
|
+
jpg: Ue,
|
|
682
|
+
jpeg: Ue,
|
|
665
683
|
gif: "image/gif",
|
|
666
684
|
tiff: "image/tiff",
|
|
667
685
|
svg: "image/svg+xml",
|
|
668
686
|
webp: "image/webp"
|
|
669
687
|
};
|
|
670
|
-
function
|
|
688
|
+
function ir(e) {
|
|
671
689
|
const t = /\.([^./]*?)$/g.exec(e);
|
|
672
690
|
return t ? t[1] : "";
|
|
673
691
|
}
|
|
674
|
-
function
|
|
675
|
-
const t =
|
|
676
|
-
return
|
|
692
|
+
function Ae(e) {
|
|
693
|
+
const t = ir(e).toLowerCase();
|
|
694
|
+
return or[t] || "";
|
|
677
695
|
}
|
|
678
|
-
function
|
|
696
|
+
function cr(e) {
|
|
679
697
|
return e.split(/,/)[1];
|
|
680
698
|
}
|
|
681
|
-
function
|
|
699
|
+
function Te(e) {
|
|
682
700
|
return e.search(/^(data:)/) !== -1;
|
|
683
701
|
}
|
|
684
|
-
function
|
|
702
|
+
function lr(e, t) {
|
|
685
703
|
return `data:${t};base64,${e}`;
|
|
686
704
|
}
|
|
687
|
-
async function
|
|
705
|
+
async function nt(e, t, r) {
|
|
688
706
|
const n = await fetch(e, t);
|
|
689
707
|
if (n.status === 404)
|
|
690
708
|
throw new Error(`Resource "${n.url}" not found`);
|
|
691
709
|
const a = await n.blob();
|
|
692
|
-
return new Promise((s,
|
|
693
|
-
const
|
|
694
|
-
|
|
710
|
+
return new Promise((s, i) => {
|
|
711
|
+
const l = new FileReader();
|
|
712
|
+
l.onerror = i, l.onloadend = () => {
|
|
695
713
|
try {
|
|
696
|
-
s(r({ res: n, result:
|
|
697
|
-
} catch (
|
|
698
|
-
|
|
714
|
+
s(r({ res: n, result: l.result }));
|
|
715
|
+
} catch (p) {
|
|
716
|
+
i(p);
|
|
699
717
|
}
|
|
700
|
-
},
|
|
718
|
+
}, l.readAsDataURL(a);
|
|
701
719
|
});
|
|
702
720
|
}
|
|
703
|
-
const
|
|
704
|
-
function
|
|
721
|
+
const Se = {};
|
|
722
|
+
function dr(e, t, r) {
|
|
705
723
|
let n = e.replace(/\?.*/, "");
|
|
706
724
|
return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
|
|
707
725
|
}
|
|
708
|
-
async function
|
|
709
|
-
const n =
|
|
710
|
-
if (
|
|
711
|
-
return
|
|
726
|
+
async function Ge(e, t, r) {
|
|
727
|
+
const n = dr(e, t, r.includeQueryParams);
|
|
728
|
+
if (Se[n] != null)
|
|
729
|
+
return Se[n];
|
|
712
730
|
r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
713
731
|
let a;
|
|
714
732
|
try {
|
|
715
|
-
const s = await
|
|
716
|
-
a =
|
|
733
|
+
const s = await nt(e, r.fetchRequestInit, ({ res: i, result: l }) => (t || (t = i.headers.get("Content-Type") || ""), cr(l)));
|
|
734
|
+
a = lr(s, t);
|
|
717
735
|
} catch (s) {
|
|
718
736
|
a = r.imagePlaceholder || "";
|
|
719
|
-
let
|
|
720
|
-
s && (
|
|
737
|
+
let i = `Failed to fetch resource: ${e}`;
|
|
738
|
+
s && (i = typeof s == "string" ? s : s.message), i && console.warn(i);
|
|
721
739
|
}
|
|
722
|
-
return
|
|
740
|
+
return Se[n] = a, a;
|
|
723
741
|
}
|
|
724
|
-
async function
|
|
742
|
+
async function ur(e) {
|
|
725
743
|
const t = e.toDataURL();
|
|
726
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
744
|
+
return t === "data:," ? e.cloneNode(!1) : ye(t);
|
|
727
745
|
}
|
|
728
|
-
async function
|
|
746
|
+
async function pr(e, t) {
|
|
729
747
|
if (e.currentSrc) {
|
|
730
|
-
const s = document.createElement("canvas"),
|
|
731
|
-
s.width = e.clientWidth, s.height = e.clientHeight,
|
|
732
|
-
const
|
|
733
|
-
return
|
|
748
|
+
const s = document.createElement("canvas"), i = s.getContext("2d");
|
|
749
|
+
s.width = e.clientWidth, s.height = e.clientHeight, i?.drawImage(e, 0, 0, s.width, s.height);
|
|
750
|
+
const l = s.toDataURL();
|
|
751
|
+
return ye(l);
|
|
734
752
|
}
|
|
735
|
-
const r = e.poster, n =
|
|
736
|
-
return
|
|
753
|
+
const r = e.poster, n = Ae(r), a = await Ge(r, n, t);
|
|
754
|
+
return ye(a);
|
|
737
755
|
}
|
|
738
|
-
async function
|
|
756
|
+
async function mr(e, t) {
|
|
739
757
|
var r;
|
|
740
758
|
try {
|
|
741
759
|
if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
|
|
742
|
-
return await
|
|
760
|
+
return await xe(e.contentDocument.body, t, !0);
|
|
743
761
|
} catch {
|
|
744
762
|
}
|
|
745
763
|
return e.cloneNode(!1);
|
|
746
764
|
}
|
|
747
|
-
async function
|
|
748
|
-
return
|
|
765
|
+
async function fr(e, t) {
|
|
766
|
+
return A(e, HTMLCanvasElement) ? ur(e) : A(e, HTMLVideoElement) ? pr(e, t) : A(e, HTMLIFrameElement) ? mr(e, t) : e.cloneNode(st(e));
|
|
749
767
|
}
|
|
750
|
-
const
|
|
751
|
-
async function
|
|
768
|
+
const hr = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", st = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
769
|
+
async function gr(e, t, r) {
|
|
752
770
|
var n, a;
|
|
753
|
-
if (
|
|
771
|
+
if (st(t))
|
|
754
772
|
return t;
|
|
755
773
|
let s = [];
|
|
756
|
-
return
|
|
757
|
-
|
|
774
|
+
return hr(e) && e.assignedNodes ? s = W(e.assignedNodes()) : A(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = W(e.contentDocument.body.childNodes) : s = W(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || A(e, HTMLVideoElement) || await s.reduce((i, l) => i.then(() => xe(l, r)).then((p) => {
|
|
775
|
+
p && t.appendChild(p);
|
|
758
776
|
}), Promise.resolve()), t;
|
|
759
777
|
}
|
|
760
|
-
function
|
|
778
|
+
function yr(e, t, r) {
|
|
761
779
|
const n = t.style;
|
|
762
780
|
if (!n)
|
|
763
781
|
return;
|
|
764
782
|
const a = window.getComputedStyle(e);
|
|
765
|
-
a.cssText ? (n.cssText = a.cssText, n.transformOrigin = a.transformOrigin) :
|
|
766
|
-
let
|
|
767
|
-
s === "font-size" &&
|
|
783
|
+
a.cssText ? (n.cssText = a.cssText, n.transformOrigin = a.transformOrigin) : tt(r).forEach((s) => {
|
|
784
|
+
let i = a.getPropertyValue(s);
|
|
785
|
+
s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), A(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));
|
|
768
786
|
});
|
|
769
787
|
}
|
|
770
|
-
function
|
|
771
|
-
|
|
788
|
+
function xr(e, t) {
|
|
789
|
+
A(e, HTMLTextAreaElement) && (t.innerHTML = e.value), A(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
772
790
|
}
|
|
773
|
-
function
|
|
774
|
-
if (
|
|
791
|
+
function wr(e, t) {
|
|
792
|
+
if (A(e, HTMLSelectElement)) {
|
|
775
793
|
const n = Array.from(t.children).find((a) => e.value === a.getAttribute("value"));
|
|
776
794
|
n && n.setAttribute("selected", "");
|
|
777
795
|
}
|
|
778
796
|
}
|
|
779
|
-
function
|
|
780
|
-
return
|
|
797
|
+
function vr(e, t, r) {
|
|
798
|
+
return A(t, Element) && (yr(e, t, r), ar(e, t, r), xr(e, t), wr(e, t)), t;
|
|
781
799
|
}
|
|
782
|
-
async function
|
|
800
|
+
async function br(e, t) {
|
|
783
801
|
const r = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
784
802
|
if (r.length === 0)
|
|
785
803
|
return e;
|
|
786
804
|
const n = {};
|
|
787
805
|
for (let s = 0; s < r.length; s++) {
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
791
|
-
!
|
|
806
|
+
const l = r[s].getAttribute("xlink:href");
|
|
807
|
+
if (l) {
|
|
808
|
+
const p = e.querySelector(l), u = document.querySelector(l);
|
|
809
|
+
!p && u && !n[l] && (n[l] = await xe(u, t, !0));
|
|
792
810
|
}
|
|
793
811
|
}
|
|
794
812
|
const a = Object.values(n);
|
|
795
813
|
if (a.length) {
|
|
796
|
-
const s = "http://www.w3.org/1999/xhtml",
|
|
797
|
-
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
for (let
|
|
801
|
-
|
|
802
|
-
e.appendChild(
|
|
814
|
+
const s = "http://www.w3.org/1999/xhtml", i = document.createElementNS(s, "svg");
|
|
815
|
+
i.setAttribute("xmlns", s), i.style.position = "absolute", i.style.width = "0", i.style.height = "0", i.style.overflow = "hidden", i.style.display = "none";
|
|
816
|
+
const l = document.createElementNS(s, "defs");
|
|
817
|
+
i.appendChild(l);
|
|
818
|
+
for (let p = 0; p < a.length; p++)
|
|
819
|
+
l.appendChild(a[p]);
|
|
820
|
+
e.appendChild(i);
|
|
803
821
|
}
|
|
804
822
|
return e;
|
|
805
823
|
}
|
|
806
|
-
async function
|
|
807
|
-
return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) =>
|
|
824
|
+
async function xe(e, t, r) {
|
|
825
|
+
return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => fr(n, t)).then((n) => gr(e, n, t)).then((n) => vr(e, n, t)).then((n) => br(n, t));
|
|
808
826
|
}
|
|
809
|
-
const
|
|
810
|
-
function
|
|
827
|
+
const at = /url\((['"]?)([^'"]+?)\1\)/g, Cr = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Er = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
828
|
+
function Sr(e) {
|
|
811
829
|
const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
812
830
|
return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
|
|
813
831
|
}
|
|
814
|
-
function
|
|
832
|
+
function kr(e) {
|
|
815
833
|
const t = [];
|
|
816
|
-
return e.replace(
|
|
834
|
+
return e.replace(at, (r, n, a) => (t.push(a), r)), t.filter((r) => !Te(r));
|
|
817
835
|
}
|
|
818
|
-
async function
|
|
836
|
+
async function Rr(e, t, r, n, a) {
|
|
819
837
|
try {
|
|
820
|
-
const s = r ?
|
|
821
|
-
let
|
|
822
|
-
return a || (
|
|
838
|
+
const s = r ? Yt(t, r) : t, i = Ae(t);
|
|
839
|
+
let l;
|
|
840
|
+
return a || (l = await Ge(s, i, n)), e.replace(Sr(t), `$1${l}$3`);
|
|
823
841
|
} catch {
|
|
824
842
|
}
|
|
825
843
|
return e;
|
|
826
844
|
}
|
|
827
|
-
function
|
|
828
|
-
return t ? e.replace(
|
|
845
|
+
function jr(e, { preferredFontFormat: t }) {
|
|
846
|
+
return t ? e.replace(Er, (r) => {
|
|
829
847
|
for (; ; ) {
|
|
830
|
-
const [n, , a] =
|
|
848
|
+
const [n, , a] = Cr.exec(r) || [];
|
|
831
849
|
if (!a)
|
|
832
850
|
return "";
|
|
833
851
|
if (a === t)
|
|
@@ -835,52 +853,52 @@ function Cr(e, { preferredFontFormat: t }) {
|
|
|
835
853
|
}
|
|
836
854
|
}) : e;
|
|
837
855
|
}
|
|
838
|
-
function
|
|
839
|
-
return e.search(
|
|
856
|
+
function ot(e) {
|
|
857
|
+
return e.search(at) !== -1;
|
|
840
858
|
}
|
|
841
|
-
async function
|
|
842
|
-
if (!
|
|
859
|
+
async function it(e, t, r) {
|
|
860
|
+
if (!ot(e))
|
|
843
861
|
return e;
|
|
844
|
-
const n =
|
|
845
|
-
return
|
|
862
|
+
const n = jr(e, r);
|
|
863
|
+
return kr(n).reduce((s, i) => s.then((l) => Rr(l, i, t, r)), Promise.resolve(n));
|
|
846
864
|
}
|
|
847
|
-
async function
|
|
865
|
+
async function re(e, t, r) {
|
|
848
866
|
var n;
|
|
849
867
|
const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
|
|
850
868
|
if (a) {
|
|
851
|
-
const s = await
|
|
869
|
+
const s = await it(a, null, r);
|
|
852
870
|
return t.style.setProperty(e, s, t.style.getPropertyPriority(e)), !0;
|
|
853
871
|
}
|
|
854
872
|
return !1;
|
|
855
873
|
}
|
|
856
|
-
async function
|
|
857
|
-
await
|
|
874
|
+
async function Or(e, t) {
|
|
875
|
+
await re("background", e, t) || await re("background-image", e, t), await re("mask", e, t) || await re("-webkit-mask", e, t) || await re("mask-image", e, t) || await re("-webkit-mask-image", e, t);
|
|
858
876
|
}
|
|
859
|
-
async function
|
|
860
|
-
const r =
|
|
861
|
-
if (!(r && !
|
|
877
|
+
async function _r(e, t) {
|
|
878
|
+
const r = A(e, HTMLImageElement);
|
|
879
|
+
if (!(r && !Te(e.src)) && !(A(e, SVGImageElement) && !Te(e.href.baseVal)))
|
|
862
880
|
return;
|
|
863
|
-
const n = r ? e.src : e.href.baseVal, a = await
|
|
864
|
-
await new Promise((s,
|
|
865
|
-
e.onload = s, e.onerror = t.onImageErrorHandler ? (...
|
|
881
|
+
const n = r ? e.src : e.href.baseVal, a = await Ge(n, Ae(n), t);
|
|
882
|
+
await new Promise((s, i) => {
|
|
883
|
+
e.onload = s, e.onerror = t.onImageErrorHandler ? (...p) => {
|
|
866
884
|
try {
|
|
867
|
-
s(t.onImageErrorHandler(...
|
|
868
|
-
} catch (
|
|
869
|
-
|
|
885
|
+
s(t.onImageErrorHandler(...p));
|
|
886
|
+
} catch (u) {
|
|
887
|
+
i(u);
|
|
870
888
|
}
|
|
871
|
-
} :
|
|
872
|
-
const
|
|
873
|
-
|
|
889
|
+
} : i;
|
|
890
|
+
const l = e;
|
|
891
|
+
l.decode && (l.decode = s), l.loading === "lazy" && (l.loading = "eager"), r ? (e.srcset = "", e.src = a) : e.href.baseVal = a;
|
|
874
892
|
});
|
|
875
893
|
}
|
|
876
|
-
async function
|
|
877
|
-
const n =
|
|
894
|
+
async function Vr(e, t) {
|
|
895
|
+
const n = W(e.childNodes).map((a) => ct(a, t));
|
|
878
896
|
await Promise.all(n).then(() => e);
|
|
879
897
|
}
|
|
880
|
-
async function
|
|
881
|
-
|
|
898
|
+
async function ct(e, t) {
|
|
899
|
+
A(e, Element) && (await Or(e, t), await _r(e, t), await Vr(e, t));
|
|
882
900
|
}
|
|
883
|
-
function
|
|
901
|
+
function Tr(e, t) {
|
|
884
902
|
const { style: r } = e;
|
|
885
903
|
t.backgroundColor && (r.backgroundColor = t.backgroundColor), t.width && (r.width = `${t.width}px`), t.height && (r.height = `${t.height}px`);
|
|
886
904
|
const n = t.style;
|
|
@@ -888,83 +906,83 @@ function Rr(e, t) {
|
|
|
888
906
|
r[a] = n[a];
|
|
889
907
|
}), e;
|
|
890
908
|
}
|
|
891
|
-
const
|
|
892
|
-
async function
|
|
893
|
-
let t =
|
|
909
|
+
const qe = {};
|
|
910
|
+
async function Be(e) {
|
|
911
|
+
let t = qe[e];
|
|
894
912
|
if (t != null)
|
|
895
913
|
return t;
|
|
896
914
|
const n = await (await fetch(e)).text();
|
|
897
|
-
return t = { url: e, cssText: n },
|
|
915
|
+
return t = { url: e, cssText: n }, qe[e] = t, t;
|
|
898
916
|
}
|
|
899
|
-
async function
|
|
917
|
+
async function Ye(e, t) {
|
|
900
918
|
let r = e.cssText;
|
|
901
|
-
const n = /url\(["']?([^"')]+)["']?\)/g, s = (r.match(/url\([^)]+\)/g) || []).map(async (
|
|
902
|
-
let
|
|
903
|
-
return
|
|
919
|
+
const n = /url\(["']?([^"')]+)["']?\)/g, s = (r.match(/url\([^)]+\)/g) || []).map(async (i) => {
|
|
920
|
+
let l = i.replace(n, "$1");
|
|
921
|
+
return l.startsWith("https://") || (l = new URL(l, e.url).href), nt(l, t.fetchRequestInit, ({ result: p }) => (r = r.replace(i, `url(${p})`), [i, p]));
|
|
904
922
|
});
|
|
905
923
|
return Promise.all(s).then(() => r);
|
|
906
924
|
}
|
|
907
|
-
function
|
|
925
|
+
function Xe(e) {
|
|
908
926
|
if (e == null)
|
|
909
927
|
return [];
|
|
910
928
|
const t = [], r = /(\/\*[\s\S]*?\*\/)/gi;
|
|
911
929
|
let n = e.replace(r, "");
|
|
912
930
|
const a = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
913
931
|
for (; ; ) {
|
|
914
|
-
const
|
|
915
|
-
if (
|
|
932
|
+
const p = a.exec(n);
|
|
933
|
+
if (p === null)
|
|
916
934
|
break;
|
|
917
|
-
t.push(
|
|
935
|
+
t.push(p[0]);
|
|
918
936
|
}
|
|
919
937
|
n = n.replace(a, "");
|
|
920
|
-
const s = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,
|
|
938
|
+
const s = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, i = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", l = new RegExp(i, "gi");
|
|
921
939
|
for (; ; ) {
|
|
922
|
-
let
|
|
923
|
-
if (
|
|
924
|
-
if (
|
|
940
|
+
let p = s.exec(n);
|
|
941
|
+
if (p === null) {
|
|
942
|
+
if (p = l.exec(n), p === null)
|
|
925
943
|
break;
|
|
926
|
-
s.lastIndex =
|
|
944
|
+
s.lastIndex = l.lastIndex;
|
|
927
945
|
} else
|
|
928
|
-
|
|
929
|
-
t.push(
|
|
946
|
+
l.lastIndex = s.lastIndex;
|
|
947
|
+
t.push(p[0]);
|
|
930
948
|
}
|
|
931
949
|
return t;
|
|
932
950
|
}
|
|
933
|
-
async function
|
|
951
|
+
async function Pr(e, t) {
|
|
934
952
|
const r = [], n = [];
|
|
935
953
|
return e.forEach((a) => {
|
|
936
954
|
if ("cssRules" in a)
|
|
937
955
|
try {
|
|
938
|
-
|
|
956
|
+
W(a.cssRules || []).forEach((s, i) => {
|
|
939
957
|
if (s.type === CSSRule.IMPORT_RULE) {
|
|
940
|
-
let
|
|
941
|
-
const
|
|
958
|
+
let l = i + 1;
|
|
959
|
+
const p = s.href, u = Be(p).then((x) => Ye(x, t)).then((x) => Xe(x).forEach((m) => {
|
|
942
960
|
try {
|
|
943
|
-
a.insertRule(
|
|
944
|
-
} catch (
|
|
961
|
+
a.insertRule(m, m.startsWith("@import") ? l += 1 : a.cssRules.length);
|
|
962
|
+
} catch (w) {
|
|
945
963
|
console.error("Error inserting rule from remote css", {
|
|
946
|
-
rule:
|
|
947
|
-
error:
|
|
964
|
+
rule: m,
|
|
965
|
+
error: w
|
|
948
966
|
});
|
|
949
967
|
}
|
|
950
|
-
})).catch((
|
|
951
|
-
console.error("Error loading remote css",
|
|
968
|
+
})).catch((x) => {
|
|
969
|
+
console.error("Error loading remote css", x.toString());
|
|
952
970
|
});
|
|
953
|
-
n.push(
|
|
971
|
+
n.push(u);
|
|
954
972
|
}
|
|
955
973
|
});
|
|
956
974
|
} catch (s) {
|
|
957
|
-
const
|
|
958
|
-
a.href != null && n.push(
|
|
959
|
-
|
|
960
|
-
})).catch((
|
|
961
|
-
console.error("Error loading remote stylesheet",
|
|
975
|
+
const i = e.find((l) => l.href == null) || document.styleSheets[0];
|
|
976
|
+
a.href != null && n.push(Be(a.href).then((l) => Ye(l, t)).then((l) => Xe(l).forEach((p) => {
|
|
977
|
+
i.insertRule(p, i.cssRules.length);
|
|
978
|
+
})).catch((l) => {
|
|
979
|
+
console.error("Error loading remote stylesheet", l);
|
|
962
980
|
})), console.error("Error inlining remote css file", s);
|
|
963
981
|
}
|
|
964
982
|
}), Promise.all(n).then(() => (e.forEach((a) => {
|
|
965
983
|
if ("cssRules" in a)
|
|
966
984
|
try {
|
|
967
|
-
|
|
985
|
+
W(a.cssRules || []).forEach((s) => {
|
|
968
986
|
r.push(s);
|
|
969
987
|
});
|
|
970
988
|
} catch (s) {
|
|
@@ -972,66 +990,66 @@ async function jr(e, t) {
|
|
|
972
990
|
}
|
|
973
991
|
}), r));
|
|
974
992
|
}
|
|
975
|
-
function
|
|
976
|
-
return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) =>
|
|
993
|
+
function Ar(e) {
|
|
994
|
+
return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => ot(t.style.getPropertyValue("src")));
|
|
977
995
|
}
|
|
978
|
-
async function
|
|
996
|
+
async function Gr(e, t) {
|
|
979
997
|
if (e.ownerDocument == null)
|
|
980
998
|
throw new Error("Provided element is not within a Document");
|
|
981
|
-
const r =
|
|
982
|
-
return
|
|
999
|
+
const r = W(e.ownerDocument.styleSheets), n = await Pr(r, t);
|
|
1000
|
+
return Ar(n);
|
|
983
1001
|
}
|
|
984
|
-
function
|
|
1002
|
+
function lt(e) {
|
|
985
1003
|
return e.trim().replace(/["']/g, "");
|
|
986
1004
|
}
|
|
987
|
-
function
|
|
1005
|
+
function $r(e) {
|
|
988
1006
|
const t = /* @__PURE__ */ new Set();
|
|
989
1007
|
function r(n) {
|
|
990
1008
|
(n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((s) => {
|
|
991
|
-
t.add(
|
|
1009
|
+
t.add(lt(s));
|
|
992
1010
|
}), Array.from(n.children).forEach((s) => {
|
|
993
1011
|
s instanceof HTMLElement && r(s);
|
|
994
1012
|
});
|
|
995
1013
|
}
|
|
996
1014
|
return r(e), t;
|
|
997
1015
|
}
|
|
998
|
-
async function
|
|
999
|
-
const r = await
|
|
1000
|
-
return (await Promise.all(r.filter((s) => n.has(
|
|
1001
|
-
const
|
|
1002
|
-
return
|
|
1016
|
+
async function Nr(e, t) {
|
|
1017
|
+
const r = await Gr(e, t), n = $r(e);
|
|
1018
|
+
return (await Promise.all(r.filter((s) => n.has(lt(s.style.fontFamily))).map((s) => {
|
|
1019
|
+
const i = s.parentStyleSheet ? s.parentStyleSheet.href : null;
|
|
1020
|
+
return it(s.cssText, i, t);
|
|
1003
1021
|
}))).join(`
|
|
1004
1022
|
`);
|
|
1005
1023
|
}
|
|
1006
|
-
async function
|
|
1007
|
-
const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await
|
|
1024
|
+
async function Lr(e, t) {
|
|
1025
|
+
const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await Nr(e, t);
|
|
1008
1026
|
if (r) {
|
|
1009
1027
|
const n = document.createElement("style"), a = document.createTextNode(r);
|
|
1010
1028
|
n.appendChild(a), e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n);
|
|
1011
1029
|
}
|
|
1012
1030
|
}
|
|
1013
|
-
async function
|
|
1014
|
-
const { width: r, height: n } =
|
|
1015
|
-
return await
|
|
1031
|
+
async function Ir(e, t = {}) {
|
|
1032
|
+
const { width: r, height: n } = rt(e, t), a = await xe(e, t, !0);
|
|
1033
|
+
return await Lr(a, t), await ct(a, t), Tr(a, t), await tr(a, r, n);
|
|
1016
1034
|
}
|
|
1017
|
-
async function
|
|
1018
|
-
const { width: r, height: n } =
|
|
1019
|
-
return
|
|
1035
|
+
async function zr(e, t = {}) {
|
|
1036
|
+
const { width: r, height: n } = rt(e, t), a = await Ir(e, t), s = await ye(a), i = document.createElement("canvas"), l = i.getContext("2d"), p = t.pixelRatio || Kt(), u = t.canvasWidth || r, x = t.canvasHeight || n;
|
|
1037
|
+
return i.width = u * p, i.height = x * p, t.skipAutoScale || Qt(i), i.style.width = `${u}`, i.style.height = `${x}`, t.backgroundColor && (l.fillStyle = t.backgroundColor, l.fillRect(0, 0, i.width, i.height)), l.drawImage(s, 0, 0, i.width, i.height), i;
|
|
1020
1038
|
}
|
|
1021
|
-
async function
|
|
1022
|
-
return (await
|
|
1039
|
+
async function Mr(e, t = {}) {
|
|
1040
|
+
return (await zr(e, t)).toDataURL("image/jpeg", t.quality || 1);
|
|
1023
1041
|
}
|
|
1024
|
-
const
|
|
1042
|
+
const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 15, Wr = () => {
|
|
1025
1043
|
const e = window.innerWidth;
|
|
1026
1044
|
return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
|
|
1027
|
-
},
|
|
1045
|
+
}, Ur = (e) => {
|
|
1028
1046
|
let t = 0;
|
|
1029
1047
|
for (let r = 0; r < e.length; r++) {
|
|
1030
1048
|
const n = e.charCodeAt(r);
|
|
1031
1049
|
t = (t << 5) - t + n, t = t & t;
|
|
1032
1050
|
}
|
|
1033
1051
|
return Math.abs(t).toString(16);
|
|
1034
|
-
},
|
|
1052
|
+
}, qr = (e, t) => {
|
|
1035
1053
|
if (!e) return "";
|
|
1036
1054
|
try {
|
|
1037
1055
|
const r = new Date(e);
|
|
@@ -1046,10 +1064,10 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1046
1064
|
} catch {
|
|
1047
1065
|
return "";
|
|
1048
1066
|
}
|
|
1049
|
-
},
|
|
1067
|
+
}, Br = (e) => {
|
|
1050
1068
|
const t = (e.innerText || "").slice(0, 30).trim(), r = {
|
|
1051
1069
|
tag: e.tagName.toLowerCase(),
|
|
1052
|
-
classHash:
|
|
1070
|
+
classHash: Ur(e.className),
|
|
1053
1071
|
textSnippet: t,
|
|
1054
1072
|
parentTag: e.parentElement?.tagName.toLowerCase(),
|
|
1055
1073
|
neighborCount: e.parentElement?.children.length || 0
|
|
@@ -1059,7 +1077,7 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1059
1077
|
a && (r.role = a);
|
|
1060
1078
|
const s = e.getAttribute("name");
|
|
1061
1079
|
return s && (r.name = s), r;
|
|
1062
|
-
},
|
|
1080
|
+
}, Yr = /* @__PURE__ */ (() => {
|
|
1063
1081
|
let e = null, t = null;
|
|
1064
1082
|
return (r) => {
|
|
1065
1083
|
if (!r || typeof window > "u" || typeof document > "u") return r;
|
|
@@ -1080,30 +1098,30 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1080
1098
|
}
|
|
1081
1099
|
return r;
|
|
1082
1100
|
};
|
|
1083
|
-
})(),
|
|
1101
|
+
})(), Xr = (e, t, r, n) => new Promise((a) => {
|
|
1084
1102
|
const s = new Image();
|
|
1085
1103
|
s.onload = () => {
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
if (
|
|
1090
|
-
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1104
|
+
const i = document.createElement("canvas"), l = window.devicePixelRatio || 1, p = t.width + r * 2, u = t.height + r * 2;
|
|
1105
|
+
i.width = p * l, i.height = u * l;
|
|
1106
|
+
const x = i.getContext("2d");
|
|
1107
|
+
if (x) {
|
|
1108
|
+
x.scale(l, l);
|
|
1109
|
+
const m = (t.left - r) * n, w = (t.top - r) * n, g = p * n, v = u * n;
|
|
1110
|
+
x.drawImage(
|
|
1093
1111
|
s,
|
|
1094
|
-
|
|
1095
|
-
x,
|
|
1112
|
+
m,
|
|
1096
1113
|
w,
|
|
1097
|
-
|
|
1114
|
+
g,
|
|
1115
|
+
v,
|
|
1098
1116
|
0,
|
|
1099
1117
|
0,
|
|
1100
|
-
|
|
1101
|
-
|
|
1118
|
+
p,
|
|
1119
|
+
u
|
|
1102
1120
|
);
|
|
1103
1121
|
}
|
|
1104
|
-
a(
|
|
1122
|
+
a(i.toDataURL("image/png"));
|
|
1105
1123
|
}, s.onerror = () => a(""), s.src = e;
|
|
1106
|
-
}),
|
|
1124
|
+
}), Jr = (e) => {
|
|
1107
1125
|
const t = window.getComputedStyle(e), r = {};
|
|
1108
1126
|
return [
|
|
1109
1127
|
"display",
|
|
@@ -1118,9 +1136,9 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1118
1136
|
"z-index"
|
|
1119
1137
|
].forEach((a) => {
|
|
1120
1138
|
const s = t.getPropertyValue(a);
|
|
1121
|
-
r[a] =
|
|
1139
|
+
r[a] = Yr(s);
|
|
1122
1140
|
}), r;
|
|
1123
|
-
},
|
|
1141
|
+
}, Zr = (e) => {
|
|
1124
1142
|
const r = Object.keys(e).find((s) => s.startsWith("__reactFiber$") || s.startsWith("__reactInternalInstance$"));
|
|
1125
1143
|
if (!r) return "";
|
|
1126
1144
|
const n = [];
|
|
@@ -1128,13 +1146,13 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1128
1146
|
for (; a; ) {
|
|
1129
1147
|
const s = a.type;
|
|
1130
1148
|
if (typeof s == "function") {
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1149
|
+
const i = s.displayName || s.name;
|
|
1150
|
+
i && !i.includes("ViewGate") && !n.includes(i) && n.unshift(i);
|
|
1133
1151
|
}
|
|
1134
1152
|
a = a.return;
|
|
1135
1153
|
}
|
|
1136
1154
|
return n.join(" > ") || "Generic Component";
|
|
1137
|
-
},
|
|
1155
|
+
}, Je = (e) => {
|
|
1138
1156
|
if (!e.isConnected) return !1;
|
|
1139
1157
|
const t = window.getComputedStyle(e);
|
|
1140
1158
|
if (t.display === "none" || t.visibility === "hidden" || t.opacity === "0" || e.offsetWidth === 0 || e.offsetHeight === 0) return !1;
|
|
@@ -1146,19 +1164,19 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1146
1164
|
}
|
|
1147
1165
|
const n = e.getBoundingClientRect();
|
|
1148
1166
|
return !(n.width === 0 || n.height === 0 || n.top === 0 && n.left === 0 && n.width > window.innerWidth * 0.9);
|
|
1149
|
-
},
|
|
1167
|
+
}, Pe = (e, t = document) => {
|
|
1150
1168
|
const r = t.querySelector(e);
|
|
1151
1169
|
if (r) return r;
|
|
1152
1170
|
const n = t.querySelectorAll("*");
|
|
1153
1171
|
for (const a of Array.from(n)) {
|
|
1154
1172
|
const s = a.shadowRoot;
|
|
1155
1173
|
if (s) {
|
|
1156
|
-
const
|
|
1157
|
-
if (
|
|
1174
|
+
const i = Pe(e, s);
|
|
1175
|
+
if (i) return i;
|
|
1158
1176
|
}
|
|
1159
1177
|
}
|
|
1160
1178
|
return null;
|
|
1161
|
-
},
|
|
1179
|
+
}, Ze = (e, t) => {
|
|
1162
1180
|
let r = document.elementFromPoint(e, t);
|
|
1163
1181
|
for (; r && r.shadowRoot; ) {
|
|
1164
1182
|
const n = r.shadowRoot.elementFromPoint(e, t);
|
|
@@ -1166,105 +1184,93 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1166
1184
|
r = n;
|
|
1167
1185
|
}
|
|
1168
1186
|
return r;
|
|
1169
|
-
},
|
|
1187
|
+
}, Kr = (e) => {
|
|
1170
1188
|
if (!e.tag) return null;
|
|
1171
1189
|
const t = document.getElementsByTagName(e.tag);
|
|
1172
1190
|
let r = null, n = 0;
|
|
1173
1191
|
for (let a = 0; a < t.length; a++) {
|
|
1174
1192
|
const s = t[a];
|
|
1175
|
-
let
|
|
1176
|
-
s.innerText?.includes(e.text.slice(0, 20)) && (
|
|
1193
|
+
let i = 0;
|
|
1194
|
+
s.innerText?.includes(e.text.slice(0, 20)) && (i += 4), e.fingerprint?.classHash && s.className.includes(e.fingerprint.classHash) && (i += 2), e.fingerprint?.ariaLabel && s.getAttribute("aria-label") === e.fingerprint.ariaLabel && (i += 3), e.fingerprint?.role && s.getAttribute("role") === e.fingerprint.role && (i += 2), e.parentContext && (s.parentElement?.innerText || "").includes(e.parentContext.slice(0, 30)) && (i += 2), e.fingerprint?.neighborCount === s.parentElement?.children.length && (i += 1), e.fingerprint?.parentTag === s.parentElement?.tagName.toLowerCase() && (i += 1), i > n && i >= 5 && (n = i, r = s);
|
|
1177
1195
|
}
|
|
1178
1196
|
return r;
|
|
1179
|
-
},
|
|
1180
|
-
let t =
|
|
1197
|
+
}, Qr = (e) => {
|
|
1198
|
+
let t = Pe(e.selector);
|
|
1181
1199
|
if (t) return t;
|
|
1182
1200
|
if (e.fallbackSelectors) {
|
|
1183
1201
|
for (const r of e.fallbackSelectors)
|
|
1184
|
-
if (t =
|
|
1202
|
+
if (t = Pe(r), t) return t;
|
|
1185
1203
|
}
|
|
1186
|
-
return t =
|
|
1187
|
-
},
|
|
1204
|
+
return t = Kr(e), t || null;
|
|
1205
|
+
}, je = (e) => ({
|
|
1188
1206
|
tag: e.tagName.toLowerCase(),
|
|
1189
1207
|
text: (e.innerText || e.getAttribute("placeholder") || "").slice(0, 50).trim(),
|
|
1190
1208
|
role: e.getAttribute("role") || void 0,
|
|
1191
1209
|
type: e.getAttribute("type") || void 0
|
|
1192
|
-
}),
|
|
1210
|
+
}), en = (e) => {
|
|
1193
1211
|
const t = e.parentElement;
|
|
1194
1212
|
if (!t) return;
|
|
1195
|
-
const r = Array.from(t.children).filter((
|
|
1213
|
+
const r = Array.from(t.children).filter((i) => i !== e).slice(0, 5).map((i) => je(i)), n = Array.from(t.children), a = n.indexOf(e);
|
|
1196
1214
|
let s = "middle";
|
|
1197
1215
|
return a === 0 && (s = "start"), a === n.length - 1 && (s = "end"), {
|
|
1198
1216
|
target: {
|
|
1199
|
-
...
|
|
1217
|
+
...je(e),
|
|
1200
1218
|
location: `${s} of ${t.tagName.toLowerCase()}`
|
|
1201
1219
|
},
|
|
1202
|
-
parent:
|
|
1220
|
+
parent: je(t),
|
|
1203
1221
|
siblings: r
|
|
1204
1222
|
};
|
|
1205
|
-
},
|
|
1223
|
+
}, tn = (e) => {
|
|
1206
1224
|
let t = "unknown:0", r = e;
|
|
1207
1225
|
for (; r; ) {
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1210
|
-
t =
|
|
1226
|
+
const m = r.getAttribute("data-source-path");
|
|
1227
|
+
if (m) {
|
|
1228
|
+
t = m;
|
|
1211
1229
|
break;
|
|
1212
1230
|
}
|
|
1213
1231
|
r = r.parentElement;
|
|
1214
1232
|
}
|
|
1215
|
-
const n =
|
|
1233
|
+
const n = Zr(e), a = [], s = [], i = (m) => {
|
|
1216
1234
|
const w = [];
|
|
1217
|
-
let
|
|
1218
|
-
for (;
|
|
1219
|
-
let
|
|
1220
|
-
s.unshift(
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
const
|
|
1226
|
-
if (
|
|
1227
|
-
|
|
1228
|
-
break;
|
|
1229
|
-
} else if (N) {
|
|
1230
|
-
k = "#" + N, w.unshift(k);
|
|
1235
|
+
let g = m;
|
|
1236
|
+
for (; g && g.nodeType === Node.ELEMENT_NODE; ) {
|
|
1237
|
+
let v = g.nodeName.toLowerCase();
|
|
1238
|
+
s.unshift(v);
|
|
1239
|
+
const V = g.id && !g.id.startsWith("__") ? g.id : null;
|
|
1240
|
+
V && a.push(`#${V}`);
|
|
1241
|
+
const L = g.getAttribute("data-testid") || g.getAttribute("data-qa");
|
|
1242
|
+
L && a.push(`[data-testid="${L}"]`);
|
|
1243
|
+
const U = g.getAttribute("aria-label"), q = g.getAttribute("role"), O = g.getAttribute("name");
|
|
1244
|
+
if (L) {
|
|
1245
|
+
v = `[${g.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${L}"]`, w.unshift(v);
|
|
1231
1246
|
break;
|
|
1232
|
-
} else if (
|
|
1233
|
-
|
|
1247
|
+
} else if (V) {
|
|
1248
|
+
v = "#" + V, w.unshift(v);
|
|
1234
1249
|
break;
|
|
1235
|
-
} else if (
|
|
1236
|
-
|
|
1250
|
+
} else if (U) {
|
|
1251
|
+
v = `${g.localName}[aria-label="${U}"]`, w.unshift(v);
|
|
1237
1252
|
break;
|
|
1238
1253
|
} else if (q) {
|
|
1239
|
-
|
|
1254
|
+
v = `${g.localName}[role="${q}"]`, w.unshift(v);
|
|
1255
|
+
break;
|
|
1256
|
+
} else if (O) {
|
|
1257
|
+
v = `${g.localName}[name="${O}"]`, w.unshift(v);
|
|
1240
1258
|
break;
|
|
1241
1259
|
} else {
|
|
1242
|
-
let
|
|
1243
|
-
for (;
|
|
1244
|
-
|
|
1245
|
-
|
|
1260
|
+
let T = g, S = 1;
|
|
1261
|
+
for (; T.previousElementSibling; )
|
|
1262
|
+
T = T.previousElementSibling, T.nodeName.toLowerCase() === g.nodeName.toLowerCase() && S++;
|
|
1263
|
+
S > 1 && (v += `:nth-of-type(${S})`);
|
|
1246
1264
|
}
|
|
1247
|
-
w.unshift(
|
|
1265
|
+
w.unshift(v), g = g.parentElement;
|
|
1248
1266
|
}
|
|
1249
1267
|
return w.join(" > ");
|
|
1250
|
-
},
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
if (x) {
|
|
1255
|
-
const w = x.id;
|
|
1256
|
-
if (w) {
|
|
1257
|
-
const y = document.querySelector(`[aria-controls="${w}"], [data-target="#${w}"], [href="#${w}"]`);
|
|
1258
|
-
y && (x.contains(y) || (u = it(y)));
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
const p = o(e), g = {};
|
|
1263
|
-
["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((x) => {
|
|
1264
|
-
const w = e.getAttribute(x);
|
|
1265
|
-
w && (g[x] = w);
|
|
1268
|
+
}, l = !!(e.closest('[role="dialog"]') || e.closest('[aria-modal="true"]') || e.closest(".modal") || e.closest(".modal-content")), p = i(e), u = {};
|
|
1269
|
+
["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((m) => {
|
|
1270
|
+
const w = e.getAttribute(m);
|
|
1271
|
+
w && (u[m] = w);
|
|
1266
1272
|
});
|
|
1267
|
-
const
|
|
1273
|
+
const x = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${p.split(" > ").slice(-1)}`;
|
|
1268
1274
|
return {
|
|
1269
1275
|
tag: e.tagName.toLowerCase(),
|
|
1270
1276
|
id: e.id || "",
|
|
@@ -1274,161 +1280,170 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1274
1280
|
outerHtml: e.outerHTML,
|
|
1275
1281
|
parentContext: (e.parentElement?.innerText || "").slice(0, 150).trim(),
|
|
1276
1282
|
componentPath: n,
|
|
1277
|
-
signature:
|
|
1283
|
+
signature: x,
|
|
1278
1284
|
source: t,
|
|
1279
|
-
attributes:
|
|
1285
|
+
attributes: u,
|
|
1280
1286
|
fallbackSelectors: [...new Set(a)].slice(0, 5),
|
|
1281
1287
|
domPath: s.slice(-10),
|
|
1282
1288
|
viewportSize: { width: window.innerWidth, height: window.innerHeight },
|
|
1283
|
-
uiContext:
|
|
1284
|
-
fingerprint:
|
|
1289
|
+
uiContext: en(e),
|
|
1290
|
+
fingerprint: Br(e),
|
|
1285
1291
|
metadata: {
|
|
1286
1292
|
hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`,
|
|
1287
|
-
computedStyles:
|
|
1288
|
-
viewportBreakpoint:
|
|
1293
|
+
computedStyles: Jr(e),
|
|
1294
|
+
viewportBreakpoint: Wr(),
|
|
1289
1295
|
outerHtml: e.outerHTML.slice(0, 1500),
|
|
1290
1296
|
scrollPosition: { x: window.scrollX, y: window.scrollY },
|
|
1291
|
-
isModal:
|
|
1292
|
-
triggerReference: u
|
|
1297
|
+
isModal: l
|
|
1293
1298
|
}
|
|
1294
1299
|
};
|
|
1295
|
-
},
|
|
1296
|
-
const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } =
|
|
1297
|
-
|
|
1298
|
-
const d = {},
|
|
1299
|
-
|
|
1300
|
-
if (!
|
|
1301
|
-
const
|
|
1302
|
-
if (
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
if (xe && !O.contains(xe) && !l.current?.contains(xe))
|
|
1300
|
+
}, rn = () => {
|
|
1301
|
+
const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a, disableViewGate: s, hasActiveToasts: i } = qt(), [l, p] = k(!1), [u, x] = k(null), [m, w] = k(null), [g, v] = k(""), [V, L] = k(!1), [U, q] = k(!1), [O, T] = k(!1), [S, ve] = k([]), [I, M] = k(null), [ue, $e] = k(!1), [se, Z] = k(!1), [pe, me] = k({}), [F, K] = k(null), [B, ae] = k(!1), [oe, Q] = k(null), [c, f] = k(""), [C, E] = k({}), z = Oe(null), D = Oe(null), b = fe(() => {
|
|
1302
|
+
D.current || (D.current = requestAnimationFrame(() => {
|
|
1303
|
+
const d = {}, h = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal')).find((_) => Je(_)), H = !!h;
|
|
1304
|
+
S.forEach((_) => {
|
|
1305
|
+
if (!_.reference) return;
|
|
1306
|
+
const j = Qr(_.reference), R = !!_.reference.metadata?.isModal;
|
|
1307
|
+
if (j && Je(j)) {
|
|
1308
|
+
let X = !1;
|
|
1309
|
+
if (H ? X = h.contains(j) : X = !R, !X) return;
|
|
1310
|
+
const G = j.getBoundingClientRect(), ce = G.left + G.width / 2, ee = G.top + G.height / 2;
|
|
1311
|
+
if (ce >= 0 && ce <= window.innerWidth && ee >= 0 && ee <= window.innerHeight) {
|
|
1312
|
+
const be = document.elementFromPoint(ce, ee);
|
|
1313
|
+
if (be && !j.contains(be) && !z.current?.contains(be))
|
|
1310
1314
|
return;
|
|
1311
1315
|
}
|
|
1312
|
-
d[
|
|
1313
|
-
top:
|
|
1314
|
-
left:
|
|
1315
|
-
width:
|
|
1316
|
+
d[_._id] = {
|
|
1317
|
+
top: G.top + window.scrollY,
|
|
1318
|
+
left: G.left + window.scrollX,
|
|
1319
|
+
width: G.width,
|
|
1316
1320
|
isModal: R
|
|
1317
1321
|
};
|
|
1318
1322
|
}
|
|
1319
|
-
}),
|
|
1323
|
+
}), E(d), D.current = null;
|
|
1320
1324
|
}));
|
|
1321
|
-
}, [
|
|
1325
|
+
}, [S]), P = fe(async () => {
|
|
1322
1326
|
if (n) {
|
|
1323
|
-
|
|
1327
|
+
Z(!0);
|
|
1324
1328
|
try {
|
|
1325
1329
|
const d = await fetch(`${a}/api/annotations`, {
|
|
1326
1330
|
headers: { "x-api-key": n }
|
|
1327
1331
|
});
|
|
1328
1332
|
if (d.ok) {
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1333
|
+
const y = await d.json();
|
|
1334
|
+
ve(y.data || []);
|
|
1331
1335
|
}
|
|
1332
1336
|
} catch (d) {
|
|
1333
1337
|
console.error("Failed to fetch annotations", d);
|
|
1334
1338
|
} finally {
|
|
1335
|
-
|
|
1339
|
+
Z(!1);
|
|
1336
1340
|
}
|
|
1337
1341
|
}
|
|
1338
1342
|
}, [n, a]);
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
+
J(() => {
|
|
1344
|
+
O && S.length === 0 && !se && T(!1);
|
|
1345
|
+
}, [O, S.length, se]), J(() => {
|
|
1346
|
+
if (!l && S.length > 0) {
|
|
1347
|
+
b();
|
|
1348
|
+
const d = new MutationObserver(() => b()), y = new ResizeObserver(() => b()), h = () => b();
|
|
1343
1349
|
return d.observe(document.documentElement, {
|
|
1344
1350
|
childList: !0,
|
|
1345
1351
|
subtree: !0,
|
|
1346
1352
|
attributes: !0
|
|
1347
|
-
}),
|
|
1348
|
-
d.disconnect(),
|
|
1353
|
+
}), y.observe(document.documentElement), window.addEventListener("scroll", h, !0), () => {
|
|
1354
|
+
d.disconnect(), y.disconnect(), window.removeEventListener("scroll", h, !0), D.current && cancelAnimationFrame(D.current);
|
|
1349
1355
|
};
|
|
1350
1356
|
}
|
|
1351
|
-
}, [
|
|
1352
|
-
|
|
1353
|
-
}, [
|
|
1354
|
-
|
|
1357
|
+
}, [l, S.length, b]), J(() => {
|
|
1358
|
+
P();
|
|
1359
|
+
}, [P]), J(() => {
|
|
1360
|
+
z.current = document.getElementById("viewgate-shadow-host");
|
|
1355
1361
|
}, []);
|
|
1356
|
-
const
|
|
1357
|
-
if (!
|
|
1358
|
-
const
|
|
1359
|
-
if (!
|
|
1360
|
-
|
|
1362
|
+
const Y = fe((d) => {
|
|
1363
|
+
if (!l || m) return;
|
|
1364
|
+
const y = Ze(d.clientX, d.clientY);
|
|
1365
|
+
if (!y || z.current?.contains(y) || y.closest(".vg-no-capture")) {
|
|
1366
|
+
x(null);
|
|
1361
1367
|
return;
|
|
1362
1368
|
}
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1365
|
-
tag:
|
|
1366
|
-
source:
|
|
1367
|
-
rect:
|
|
1368
|
-
element:
|
|
1369
|
-
previewText: (
|
|
1369
|
+
const h = y.getBoundingClientRect();
|
|
1370
|
+
x({
|
|
1371
|
+
tag: y.tagName.toLowerCase(),
|
|
1372
|
+
source: y.getAttribute("data-source-path") || "unknown:0",
|
|
1373
|
+
rect: h,
|
|
1374
|
+
element: y,
|
|
1375
|
+
previewText: (y.innerText || "").slice(0, 100) || (y.getAttribute("placeholder") || "").slice(0, 100) || y.tagName.toLowerCase(),
|
|
1370
1376
|
semanticReference: {
|
|
1371
|
-
...
|
|
1377
|
+
...tn(y),
|
|
1372
1378
|
normalizedOffset: {
|
|
1373
|
-
x: (d.clientX -
|
|
1374
|
-
y: (d.clientY -
|
|
1379
|
+
x: (d.clientX - h.left) / h.width,
|
|
1380
|
+
y: (d.clientY - h.top) / h.height
|
|
1375
1381
|
}
|
|
1376
1382
|
}
|
|
1377
1383
|
});
|
|
1378
|
-
}, [
|
|
1379
|
-
if (!
|
|
1380
|
-
const
|
|
1381
|
-
if (!(!
|
|
1382
|
-
d.preventDefault(), d.stopPropagation(),
|
|
1384
|
+
}, [l, m]), ie = fe(async (d) => {
|
|
1385
|
+
if (!l || m) return;
|
|
1386
|
+
const y = Ze(d.clientX, d.clientY);
|
|
1387
|
+
if (!(!y || z.current?.contains(y) || y.closest(".vg-no-capture")) && u) {
|
|
1388
|
+
d.preventDefault(), d.stopPropagation(), q(!0);
|
|
1383
1389
|
try {
|
|
1384
|
-
const
|
|
1385
|
-
quality: 0.
|
|
1386
|
-
pixelRatio:
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
+
const h = u.element.getBoundingClientRect(), H = 24, _ = 2, j = await Mr(document.body, {
|
|
1391
|
+
quality: 0.9,
|
|
1392
|
+
pixelRatio: _,
|
|
1393
|
+
width: window.innerWidth,
|
|
1394
|
+
height: window.innerHeight,
|
|
1395
|
+
style: {
|
|
1396
|
+
transform: `scale(${1 / window.devicePixelRatio}) translate(-${window.scrollX}px, -${window.scrollY}px)`,
|
|
1397
|
+
transformOrigin: "top left"
|
|
1398
|
+
},
|
|
1399
|
+
filter: (ce) => {
|
|
1400
|
+
const ee = ce;
|
|
1401
|
+
return !(z.current?.contains(ee) || ee.id === "viewgate-ui");
|
|
1402
|
+
}
|
|
1403
|
+
}), R = u.element.getBoundingClientRect(), X = await Xr(j, R, H, _), G = {
|
|
1404
|
+
...u.semanticReference,
|
|
1390
1405
|
metadata: {
|
|
1391
|
-
...
|
|
1392
|
-
screenshotUrl:
|
|
1393
|
-
elementScreenshot:
|
|
1406
|
+
...u.semanticReference.metadata,
|
|
1407
|
+
screenshotUrl: j,
|
|
1408
|
+
elementScreenshot: X
|
|
1394
1409
|
}
|
|
1395
1410
|
};
|
|
1396
|
-
|
|
1397
|
-
...
|
|
1398
|
-
visualPreview:
|
|
1399
|
-
semanticReference:
|
|
1411
|
+
w({
|
|
1412
|
+
...u,
|
|
1413
|
+
visualPreview: X,
|
|
1414
|
+
semanticReference: G
|
|
1400
1415
|
});
|
|
1401
|
-
} catch (
|
|
1402
|
-
console.error("Failed to capture preview:",
|
|
1416
|
+
} catch (h) {
|
|
1417
|
+
console.error("Failed to capture preview:", h), w(u);
|
|
1403
1418
|
} finally {
|
|
1404
|
-
|
|
1419
|
+
q(!1), x(null);
|
|
1405
1420
|
}
|
|
1406
1421
|
}
|
|
1407
|
-
}, [
|
|
1408
|
-
|
|
1409
|
-
const d = (
|
|
1410
|
-
if (
|
|
1411
|
-
|
|
1422
|
+
}, [l, u, m]);
|
|
1423
|
+
J(() => {
|
|
1424
|
+
const d = (y) => {
|
|
1425
|
+
if (y.key === "Escape") {
|
|
1426
|
+
m ? w(null) : O ? T(!1) : l && p(!1);
|
|
1412
1427
|
return;
|
|
1413
1428
|
}
|
|
1414
|
-
const
|
|
1429
|
+
const H = (() => {
|
|
1415
1430
|
let R = document.activeElement;
|
|
1416
1431
|
for (; R && R.shadowRoot && R.shadowRoot.activeElement; )
|
|
1417
1432
|
R = R.shadowRoot.activeElement;
|
|
1418
1433
|
return R;
|
|
1419
1434
|
})();
|
|
1420
|
-
if (["input", "textarea"].includes((
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1435
|
+
if (["input", "textarea"].includes((H?.tagName || "").toLowerCase()) || H?.isContentEditable) return;
|
|
1436
|
+
const j = y.key.toLowerCase();
|
|
1437
|
+
j === "c" && !m && !O && p((R) => !R), j === "v" && !m && (S.length > 0 || O) && (T((R) => !R), O || p(!1));
|
|
1423
1438
|
};
|
|
1424
|
-
return
|
|
1425
|
-
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove",
|
|
1439
|
+
return l && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", d), window.addEventListener("mousemove", Y, !0), window.addEventListener("click", ie, !0), () => {
|
|
1440
|
+
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove", Y, !0), window.removeEventListener("click", ie, !0);
|
|
1426
1441
|
};
|
|
1427
|
-
}, [
|
|
1428
|
-
const
|
|
1429
|
-
if (!
|
|
1430
|
-
|
|
1431
|
-
const { semanticReference: d } =
|
|
1442
|
+
}, [l, m, O, S, Y, ie]);
|
|
1443
|
+
const ut = async () => {
|
|
1444
|
+
if (!m || !g.trim()) return;
|
|
1445
|
+
L(!0);
|
|
1446
|
+
const { semanticReference: d } = m, [y, h] = (d.source || "").split(":"), H = h || "0";
|
|
1432
1447
|
try {
|
|
1433
1448
|
if (!(await fetch(`${a}/api/annotations`, {
|
|
1434
1449
|
method: "POST",
|
|
@@ -1437,11 +1452,11 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1437
1452
|
"x-api-key": n
|
|
1438
1453
|
},
|
|
1439
1454
|
body: JSON.stringify({
|
|
1440
|
-
filePath:
|
|
1441
|
-
line: parseInt(
|
|
1455
|
+
filePath: y,
|
|
1456
|
+
line: parseInt(H),
|
|
1442
1457
|
url: window.location.href,
|
|
1443
|
-
message:
|
|
1444
|
-
componentName: d.componentPath ||
|
|
1458
|
+
message: g,
|
|
1459
|
+
componentName: d.componentPath || m.tag,
|
|
1445
1460
|
reference: {
|
|
1446
1461
|
...d,
|
|
1447
1462
|
viewport: {
|
|
@@ -1453,46 +1468,81 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1453
1468
|
}
|
|
1454
1469
|
})
|
|
1455
1470
|
})).ok) throw new Error("Backend failed");
|
|
1456
|
-
e(r.success, "success"),
|
|
1457
|
-
} catch (
|
|
1458
|
-
console.error(
|
|
1471
|
+
e(r.success, "success"), w(null), v(""), p(!1), P();
|
|
1472
|
+
} catch (_) {
|
|
1473
|
+
console.error(_), e(r.error, "error");
|
|
1459
1474
|
} finally {
|
|
1460
|
-
|
|
1475
|
+
L(!1);
|
|
1461
1476
|
}
|
|
1462
1477
|
};
|
|
1463
|
-
return /* @__PURE__ */
|
|
1464
|
-
|
|
1465
|
-
|
|
1478
|
+
return /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:806", className: "vg-container", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:807", className: "vg-no-capture", children: [
|
|
1479
|
+
!i && /* @__PURE__ */ o.jsx(
|
|
1480
|
+
"button",
|
|
1481
|
+
{
|
|
1482
|
+
onClick: (d) => {
|
|
1483
|
+
d.stopPropagation(), s();
|
|
1484
|
+
},
|
|
1485
|
+
title: "Cerrar ViewGate",
|
|
1486
|
+
style: {
|
|
1487
|
+
position: "fixed",
|
|
1488
|
+
top: "24px",
|
|
1489
|
+
right: "24px",
|
|
1490
|
+
width: "40px",
|
|
1491
|
+
height: "40px",
|
|
1492
|
+
borderRadius: "12px",
|
|
1493
|
+
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
1494
|
+
backdropFilter: "blur(8px)",
|
|
1495
|
+
display: "flex",
|
|
1496
|
+
alignItems: "center",
|
|
1497
|
+
justifyContent: "center",
|
|
1498
|
+
border: "1px solid rgba(0,0,0,0.05)",
|
|
1499
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.1)",
|
|
1500
|
+
cursor: "pointer",
|
|
1501
|
+
color: "#64748b",
|
|
1502
|
+
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
1503
|
+
zIndex: ke + 10
|
|
1504
|
+
},
|
|
1505
|
+
onMouseEnter: (d) => {
|
|
1506
|
+
d.currentTarget.style.transform = "scale(1.1) rotate(90deg)", d.currentTarget.style.color = "#ef4444", d.currentTarget.style.backgroundColor = "white";
|
|
1507
|
+
},
|
|
1508
|
+
onMouseLeave: (d) => {
|
|
1509
|
+
d.currentTarget.style.transform = "scale(1) rotate(0deg)", d.currentTarget.style.color = "#64748b", d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.9)";
|
|
1510
|
+
},
|
|
1511
|
+
children: /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:846", size: 20, strokeWidth: 2.5 })
|
|
1512
|
+
}
|
|
1513
|
+
),
|
|
1514
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:851", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: ke }, id: "viewgate-ui", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:852", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
|
|
1515
|
+
/* @__PURE__ */ o.jsx(
|
|
1466
1516
|
"button",
|
|
1467
1517
|
{
|
|
1468
|
-
onClick: () =>
|
|
1518
|
+
onClick: () => p(!l),
|
|
1469
1519
|
className: "vg-button-primary vg-animate-pop",
|
|
1470
1520
|
style: {
|
|
1471
1521
|
padding: "12px 24px",
|
|
1472
|
-
background:
|
|
1522
|
+
background: l ? "#ef4444" : void 0
|
|
1473
1523
|
},
|
|
1474
|
-
children: /* @__PURE__ */
|
|
1475
|
-
|
|
1476
|
-
/* @__PURE__ */
|
|
1524
|
+
children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:861", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
1525
|
+
l ? /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:862", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:862", size: 20, className: "vg-animate-pop" }),
|
|
1526
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:863", children: l ? r.exitMode : r.enterMode })
|
|
1477
1527
|
] })
|
|
1478
1528
|
}
|
|
1479
1529
|
),
|
|
1480
|
-
|
|
1530
|
+
S.length > 0 && /* @__PURE__ */ o.jsxs(
|
|
1481
1531
|
"button",
|
|
1482
1532
|
{
|
|
1483
1533
|
onClick: () => {
|
|
1484
|
-
|
|
1534
|
+
T(!O), p(!1), w(null);
|
|
1485
1535
|
},
|
|
1486
1536
|
className: "vg-button-ghost vg-animate-pop",
|
|
1487
1537
|
style: { animationDelay: "0.1s" },
|
|
1488
1538
|
children: [
|
|
1489
|
-
/* @__PURE__ */
|
|
1490
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ o.jsx(Tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:876", size: 20 }),
|
|
1540
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:877", children: r.viewComments })
|
|
1491
1541
|
]
|
|
1492
1542
|
}
|
|
1493
1543
|
)
|
|
1494
1544
|
] }) }),
|
|
1495
|
-
|
|
1545
|
+
U && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:885", style: {
|
|
1496
1546
|
position: "fixed",
|
|
1497
1547
|
top: 0,
|
|
1498
1548
|
left: 0,
|
|
@@ -1503,60 +1553,60 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1503
1553
|
display: "flex",
|
|
1504
1554
|
alignItems: "center",
|
|
1505
1555
|
justifyContent: "center",
|
|
1506
|
-
zIndex:
|
|
1556
|
+
zIndex: ke + 1,
|
|
1507
1557
|
cursor: "wait"
|
|
1508
|
-
}, children: /* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1558
|
+
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:891", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
|
|
1559
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:892", className: "vg-spinner" }),
|
|
1560
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:893", style: { fontWeight: 600, fontSize: "14px", color: "#1e293b" }, children: "Capturando..." })
|
|
1511
1561
|
] }) }),
|
|
1512
|
-
|
|
1562
|
+
l && !m && /* @__PURE__ */ o.jsx(
|
|
1513
1563
|
"div",
|
|
1514
1564
|
{
|
|
1515
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1565
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:900",
|
|
1516
1566
|
className: "vg-backdrop-blur",
|
|
1517
1567
|
style: {
|
|
1518
1568
|
opacity: 1,
|
|
1519
|
-
clipPath:
|
|
1569
|
+
clipPath: u ? `polygon(
|
|
1520
1570
|
0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
|
|
1521
|
-
${
|
|
1522
|
-
${
|
|
1523
|
-
${
|
|
1524
|
-
${
|
|
1525
|
-
${
|
|
1571
|
+
${u.rect.left}px ${u.rect.top}px,
|
|
1572
|
+
${u.rect.right}px ${u.rect.top}px,
|
|
1573
|
+
${u.rect.right}px ${u.rect.bottom}px,
|
|
1574
|
+
${u.rect.left}px ${u.rect.bottom}px,
|
|
1575
|
+
${u.rect.left}px ${u.rect.top}px
|
|
1526
1576
|
)` : "none",
|
|
1527
|
-
zIndex:
|
|
1577
|
+
zIndex: Fr
|
|
1528
1578
|
}
|
|
1529
1579
|
}
|
|
1530
1580
|
),
|
|
1531
|
-
|
|
1581
|
+
l && u && !m && !U && /* @__PURE__ */ o.jsx(
|
|
1532
1582
|
"div",
|
|
1533
1583
|
{
|
|
1534
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1584
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:919",
|
|
1535
1585
|
className: "vg-selection-pulse",
|
|
1536
1586
|
style: {
|
|
1537
|
-
top:
|
|
1538
|
-
left:
|
|
1539
|
-
width:
|
|
1540
|
-
height:
|
|
1541
|
-
zIndex:
|
|
1587
|
+
top: u.rect.top - 4,
|
|
1588
|
+
left: u.rect.left - 4,
|
|
1589
|
+
width: u.rect.width + 8,
|
|
1590
|
+
height: u.rect.height + 8,
|
|
1591
|
+
zIndex: Dr
|
|
1542
1592
|
},
|
|
1543
|
-
children: /* @__PURE__ */
|
|
1593
|
+
children: /* @__PURE__ */ o.jsxs(
|
|
1544
1594
|
"div",
|
|
1545
1595
|
{
|
|
1546
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1596
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:929",
|
|
1547
1597
|
className: "vg-selection-label",
|
|
1548
1598
|
style: {
|
|
1549
|
-
...
|
|
1550
|
-
...
|
|
1599
|
+
...u.rect.top < 60 ? u.rect.bottom > window.innerHeight - 60 ? { top: "8px", bottom: "auto" } : { top: "100%", marginTop: "8px", bottom: "auto" } : { top: "-40px", bottom: "auto" },
|
|
1600
|
+
...u.rect.left + 200 > window.innerWidth ? { left: "auto", right: "0" } : { left: "0", right: "auto" }
|
|
1551
1601
|
},
|
|
1552
1602
|
children: [
|
|
1553
|
-
/* @__PURE__ */
|
|
1554
|
-
/* @__PURE__ */
|
|
1555
|
-
/* @__PURE__ */
|
|
1556
|
-
/* @__PURE__ */
|
|
1557
|
-
Math.round(
|
|
1603
|
+
/* @__PURE__ */ o.jsx(Nt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:945", size: 16 }),
|
|
1604
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:946", style: { display: "flex", flexDirection: "column" }, children: [
|
|
1605
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:947", style: { fontWeight: 700 }, children: r.selectToComment }),
|
|
1606
|
+
/* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:948", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
|
|
1607
|
+
Math.round(u.rect.width),
|
|
1558
1608
|
" × ",
|
|
1559
|
-
Math.round(
|
|
1609
|
+
Math.round(u.rect.height)
|
|
1560
1610
|
] })
|
|
1561
1611
|
] })
|
|
1562
1612
|
]
|
|
@@ -1564,7 +1614,7 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1564
1614
|
)
|
|
1565
1615
|
}
|
|
1566
1616
|
),
|
|
1567
|
-
|
|
1617
|
+
m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:958", className: "vg-animate-fade", style: {
|
|
1568
1618
|
position: "fixed",
|
|
1569
1619
|
top: 0,
|
|
1570
1620
|
left: 0,
|
|
@@ -1575,14 +1625,14 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1575
1625
|
display: "flex",
|
|
1576
1626
|
alignItems: "center",
|
|
1577
1627
|
justifyContent: "center",
|
|
1578
|
-
zIndex:
|
|
1579
|
-
}, children: /* @__PURE__ */
|
|
1628
|
+
zIndex: Re
|
|
1629
|
+
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:963", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1580
1630
|
padding: "40px",
|
|
1581
1631
|
width: "500px",
|
|
1582
1632
|
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
1583
1633
|
}, children: [
|
|
1584
|
-
/* @__PURE__ */
|
|
1585
|
-
/* @__PURE__ */
|
|
1634
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:967", style: { textAlign: "center", marginBottom: "32px" }, children: [
|
|
1635
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:968", style: {
|
|
1586
1636
|
width: "48px",
|
|
1587
1637
|
height: "48px",
|
|
1588
1638
|
background: "var(--vg-primary-gradient)",
|
|
@@ -1593,56 +1643,65 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1593
1643
|
margin: "0 auto 16px",
|
|
1594
1644
|
color: "white",
|
|
1595
1645
|
boxShadow: "0 8px 16px rgba(99, 102, 241, 0.3)"
|
|
1596
|
-
}, children: /* @__PURE__ */
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
/* @__PURE__ */
|
|
1646
|
+
}, children: /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:973", size: 24 }) }),
|
|
1647
|
+
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:975", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
|
|
1648
|
+
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:976", style: { margin: 0, color: "#64748b", fontSize: "15px" }, children: r.feedbackSubheader })
|
|
1599
1649
|
] }),
|
|
1600
|
-
|
|
1650
|
+
m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:980", style: {
|
|
1651
|
+
marginBottom: "24px",
|
|
1652
|
+
borderRadius: "12px",
|
|
1653
|
+
overflow: "hidden",
|
|
1654
|
+
border: "1px solid #e2e8f0",
|
|
1655
|
+
background: "#f8fafc",
|
|
1656
|
+
width: "fit-content",
|
|
1657
|
+
margin: "0 auto 24px auto"
|
|
1658
|
+
}, children: /* @__PURE__ */ o.jsx(
|
|
1601
1659
|
"img",
|
|
1602
1660
|
{
|
|
1603
|
-
src:
|
|
1661
|
+
src: m.visualPreview,
|
|
1604
1662
|
alt: "Preview",
|
|
1605
|
-
style: { maxWidth: "100%", maxHeight: "200px", objectFit: "contain", display: "block"
|
|
1663
|
+
style: { maxWidth: "100%", maxHeight: "200px", objectFit: "contain", display: "block" }
|
|
1606
1664
|
}
|
|
1607
1665
|
) }),
|
|
1608
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ o.jsx(
|
|
1609
1667
|
"textarea",
|
|
1610
1668
|
{
|
|
1611
1669
|
className: "vg-textarea",
|
|
1612
|
-
value:
|
|
1613
|
-
onChange: (d) =>
|
|
1670
|
+
value: g,
|
|
1671
|
+
onChange: (d) => v(d.target.value),
|
|
1614
1672
|
rows: 4,
|
|
1615
1673
|
placeholder: r.placeholder,
|
|
1616
1674
|
autoFocus: !0,
|
|
1617
1675
|
style: { fontSize: "15px", padding: "16px", marginBottom: "24px" }
|
|
1618
1676
|
}
|
|
1619
1677
|
),
|
|
1620
|
-
/* @__PURE__ */
|
|
1621
|
-
/* @__PURE__ */
|
|
1678
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1007", style: { display: "flex", gap: "12px" }, children: [
|
|
1679
|
+
/* @__PURE__ */ o.jsx(
|
|
1622
1680
|
"button",
|
|
1623
1681
|
{
|
|
1624
|
-
onClick: () =>
|
|
1682
|
+
onClick: () => !V && w(null),
|
|
1625
1683
|
className: "vg-button-ghost",
|
|
1684
|
+
disabled: V,
|
|
1626
1685
|
style: { flex: 1, padding: "12px" },
|
|
1627
1686
|
children: r.cancel
|
|
1628
1687
|
}
|
|
1629
1688
|
),
|
|
1630
|
-
/* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ o.jsx(
|
|
1631
1690
|
"button",
|
|
1632
1691
|
{
|
|
1633
|
-
onClick:
|
|
1692
|
+
onClick: ut,
|
|
1634
1693
|
className: "vg-button-primary",
|
|
1635
|
-
disabled:
|
|
1694
|
+
disabled: V || !g.trim(),
|
|
1636
1695
|
style: { flex: 2 },
|
|
1637
|
-
children: /* @__PURE__ */
|
|
1638
|
-
|
|
1639
|
-
/* @__PURE__ */
|
|
1696
|
+
children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1022", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1697
|
+
V ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1023", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ o.jsx(Dt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1023", size: 18 }),
|
|
1698
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1024", children: V ? r.submitting : r.sendFeedback || "Send Comment" })
|
|
1640
1699
|
] })
|
|
1641
1700
|
}
|
|
1642
1701
|
)
|
|
1643
1702
|
] })
|
|
1644
1703
|
] }) }),
|
|
1645
|
-
|
|
1704
|
+
O && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1034", className: "vg-animate-fade", style: {
|
|
1646
1705
|
position: "fixed",
|
|
1647
1706
|
top: 0,
|
|
1648
1707
|
left: 0,
|
|
@@ -1653,85 +1712,85 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1653
1712
|
display: "flex",
|
|
1654
1713
|
alignItems: "center",
|
|
1655
1714
|
justifyContent: "center",
|
|
1656
|
-
zIndex:
|
|
1657
|
-
}, children: /* @__PURE__ */
|
|
1715
|
+
zIndex: Re
|
|
1716
|
+
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1039", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1658
1717
|
padding: "32px",
|
|
1659
1718
|
width: "650px",
|
|
1660
1719
|
maxHeight: "85vh",
|
|
1661
1720
|
display: "flex",
|
|
1662
1721
|
flexDirection: "column"
|
|
1663
1722
|
}, children: [
|
|
1664
|
-
/* @__PURE__ */
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
/* @__PURE__ */
|
|
1667
|
-
!
|
|
1723
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1043", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
|
|
1724
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1044", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
1725
|
+
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1045", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: F ? r.commentDetails : r.annotations }),
|
|
1726
|
+
!F && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1049", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: S.length })
|
|
1668
1727
|
] }),
|
|
1669
|
-
/* @__PURE__ */
|
|
1670
|
-
|
|
1728
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1054", style: { display: "flex", gap: "8px" }, children: [
|
|
1729
|
+
F && /* @__PURE__ */ o.jsx(
|
|
1671
1730
|
"button",
|
|
1672
1731
|
{
|
|
1673
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1732
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1056",
|
|
1674
1733
|
className: "vg-button-ghost",
|
|
1675
1734
|
style: { padding: "6px 14px", fontSize: "12px" },
|
|
1676
|
-
onClick: () =>
|
|
1735
|
+
onClick: () => K(null),
|
|
1677
1736
|
children: r.viewAll || "View All"
|
|
1678
1737
|
}
|
|
1679
1738
|
),
|
|
1680
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ o.jsx(
|
|
1681
1740
|
"button",
|
|
1682
1741
|
{
|
|
1683
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1742
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1064",
|
|
1684
1743
|
className: "vg-button-ghost",
|
|
1685
1744
|
style: { padding: "8px", borderRadius: "50%" },
|
|
1686
1745
|
onClick: () => {
|
|
1687
|
-
|
|
1746
|
+
T(!1), K(null);
|
|
1688
1747
|
},
|
|
1689
|
-
children: /* @__PURE__ */
|
|
1748
|
+
children: /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1069", size: 20 })
|
|
1690
1749
|
}
|
|
1691
1750
|
)
|
|
1692
1751
|
] })
|
|
1693
1752
|
] }),
|
|
1694
|
-
/* @__PURE__ */
|
|
1753
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1074", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: se ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1076", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1077", className: "vg-spinner" }) }) : (F ? S.filter((d) => d._id === F) : S).map((d, y) => /* @__PURE__ */ o.jsxs(
|
|
1695
1754
|
"div",
|
|
1696
1755
|
{
|
|
1697
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1756
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1081",
|
|
1698
1757
|
className: "vg-glassmorphism vg-animate-slide",
|
|
1699
1758
|
style: {
|
|
1700
1759
|
padding: "20px",
|
|
1701
1760
|
marginBottom: "16px",
|
|
1702
1761
|
border: "1px solid rgba(0,0,0,0.05)",
|
|
1703
1762
|
background: "rgba(255,255,255,0.5)",
|
|
1704
|
-
animationDelay: `${
|
|
1763
|
+
animationDelay: `${y * 0.05}s`
|
|
1705
1764
|
},
|
|
1706
1765
|
children: [
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
-
d.status === "ready_for_review" ? /* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1092", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1093", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
|
|
1767
|
+
d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1095", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
|
|
1768
|
+
/* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1096", size: 14 }),
|
|
1710
1769
|
" ",
|
|
1711
1770
|
r.readyForReview
|
|
1712
|
-
] }) : /* @__PURE__ */
|
|
1713
|
-
/* @__PURE__ */
|
|
1771
|
+
] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1099", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
|
|
1772
|
+
/* @__PURE__ */ o.jsx(Me, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1100", size: 14 }),
|
|
1714
1773
|
" ",
|
|
1715
1774
|
r.pending
|
|
1716
1775
|
] }),
|
|
1717
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1103", style: { fontSize: "12px", color: "#94a3b8" }, children: qr(d.timestamp || d.createdAt || d.reference?.timestamp, t) })
|
|
1718
1777
|
] }) }),
|
|
1719
|
-
|
|
1778
|
+
oe === d._id ? /* @__PURE__ */ o.jsx(
|
|
1720
1779
|
"textarea",
|
|
1721
1780
|
{
|
|
1722
1781
|
className: "vg-textarea",
|
|
1723
|
-
value:
|
|
1724
|
-
onChange: (
|
|
1782
|
+
value: c,
|
|
1783
|
+
onChange: (h) => f(h.target.value),
|
|
1725
1784
|
rows: 3,
|
|
1726
1785
|
autoFocus: !0,
|
|
1727
1786
|
style: { marginBottom: "16px" }
|
|
1728
1787
|
}
|
|
1729
|
-
) : /* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
1731
|
-
/* @__PURE__ */
|
|
1788
|
+
) : /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1119", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: d.message }),
|
|
1789
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1122", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: oe === d._id ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
1790
|
+
/* @__PURE__ */ o.jsx(
|
|
1732
1791
|
"button",
|
|
1733
1792
|
{
|
|
1734
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1793
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1125",
|
|
1735
1794
|
className: "vg-button-primary vg-animate-pop",
|
|
1736
1795
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
1737
1796
|
onClick: async () => {
|
|
@@ -1739,8 +1798,8 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1739
1798
|
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
1740
1799
|
method: "PATCH",
|
|
1741
1800
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
1742
|
-
body: JSON.stringify({ message:
|
|
1743
|
-
})).ok && (
|
|
1801
|
+
body: JSON.stringify({ message: c })
|
|
1802
|
+
})).ok && (Q(null), P(), e(r.updateSuccess, "success"));
|
|
1744
1803
|
} catch {
|
|
1745
1804
|
e(r.error, "error");
|
|
1746
1805
|
}
|
|
@@ -1748,48 +1807,48 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1748
1807
|
children: r.save
|
|
1749
1808
|
}
|
|
1750
1809
|
),
|
|
1751
|
-
/* @__PURE__ */
|
|
1752
|
-
] }) : /* @__PURE__ */
|
|
1753
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1147", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => Q(null), children: r.cancel })
|
|
1811
|
+
] }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
1812
|
+
/* @__PURE__ */ o.jsxs(
|
|
1754
1813
|
"button",
|
|
1755
1814
|
{
|
|
1756
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1815
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1151",
|
|
1757
1816
|
className: "vg-button-ghost vg-animate-pop",
|
|
1758
1817
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
1759
1818
|
onClick: () => {
|
|
1760
|
-
|
|
1819
|
+
Q(d._id), f(d.message);
|
|
1761
1820
|
},
|
|
1762
1821
|
children: [
|
|
1763
|
-
/* @__PURE__ */
|
|
1822
|
+
/* @__PURE__ */ o.jsx(It, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1159", size: 14 }),
|
|
1764
1823
|
" ",
|
|
1765
1824
|
r.edit
|
|
1766
1825
|
]
|
|
1767
1826
|
}
|
|
1768
1827
|
),
|
|
1769
|
-
/* @__PURE__ */
|
|
1828
|
+
/* @__PURE__ */ o.jsxs(
|
|
1770
1829
|
"button",
|
|
1771
1830
|
{
|
|
1772
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1831
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1161",
|
|
1773
1832
|
className: "vg-button-ghost vg-animate-pop",
|
|
1774
1833
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.05s" },
|
|
1775
1834
|
onClick: () => {
|
|
1776
1835
|
d.url && (window.location.href = d.url);
|
|
1777
1836
|
},
|
|
1778
1837
|
children: [
|
|
1779
|
-
/* @__PURE__ */
|
|
1838
|
+
/* @__PURE__ */ o.jsx(Fe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1168", size: 14 }),
|
|
1780
1839
|
" ",
|
|
1781
1840
|
r.review
|
|
1782
1841
|
]
|
|
1783
1842
|
}
|
|
1784
1843
|
),
|
|
1785
|
-
d.status === "pending" ? /* @__PURE__ */
|
|
1844
|
+
d.status === "pending" ? /* @__PURE__ */ o.jsxs(
|
|
1786
1845
|
"button",
|
|
1787
1846
|
{
|
|
1788
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1847
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1171",
|
|
1789
1848
|
className: "vg-button-primary vg-animate-pop",
|
|
1790
1849
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
1791
1850
|
onClick: () => {
|
|
1792
|
-
|
|
1851
|
+
M({
|
|
1793
1852
|
title: r.markReadyConfirm,
|
|
1794
1853
|
message: r.confirmMarkReady,
|
|
1795
1854
|
type: "success",
|
|
@@ -1799,29 +1858,29 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1799
1858
|
method: "PATCH",
|
|
1800
1859
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
1801
1860
|
body: JSON.stringify({ status: "ready_for_review" })
|
|
1802
|
-
})).ok && (
|
|
1861
|
+
})).ok && (P(), e(r.updateSuccess, "success"));
|
|
1803
1862
|
} catch {
|
|
1804
1863
|
e(r.error, "error");
|
|
1805
1864
|
} finally {
|
|
1806
|
-
|
|
1865
|
+
M(null);
|
|
1807
1866
|
}
|
|
1808
1867
|
}
|
|
1809
1868
|
});
|
|
1810
1869
|
},
|
|
1811
1870
|
children: [
|
|
1812
|
-
/* @__PURE__ */
|
|
1871
|
+
/* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1199", size: 14 }),
|
|
1813
1872
|
" ",
|
|
1814
1873
|
r.markReady
|
|
1815
1874
|
]
|
|
1816
1875
|
}
|
|
1817
|
-
) : /* @__PURE__ */
|
|
1876
|
+
) : /* @__PURE__ */ o.jsxs(
|
|
1818
1877
|
"button",
|
|
1819
1878
|
{
|
|
1820
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1879
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1202",
|
|
1821
1880
|
className: "vg-button-ghost vg-animate-pop",
|
|
1822
1881
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
1823
1882
|
onClick: () => {
|
|
1824
|
-
|
|
1883
|
+
M({
|
|
1825
1884
|
title: r.reopenConfirm,
|
|
1826
1885
|
message: r.confirmReopen,
|
|
1827
1886
|
type: "success",
|
|
@@ -1832,30 +1891,30 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1832
1891
|
method: "PATCH",
|
|
1833
1892
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
1834
1893
|
body: JSON.stringify({ status: "pending" })
|
|
1835
|
-
})).ok && (
|
|
1894
|
+
})).ok && (P(), e(r.updateSuccess, "success"));
|
|
1836
1895
|
} catch {
|
|
1837
1896
|
e(r.error, "error");
|
|
1838
1897
|
} finally {
|
|
1839
|
-
|
|
1898
|
+
M(null);
|
|
1840
1899
|
}
|
|
1841
1900
|
}
|
|
1842
1901
|
});
|
|
1843
1902
|
},
|
|
1844
1903
|
children: [
|
|
1845
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ o.jsx(Mt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1230", size: 14 }),
|
|
1846
1905
|
" ",
|
|
1847
1906
|
r.reopen
|
|
1848
1907
|
]
|
|
1849
1908
|
}
|
|
1850
1909
|
),
|
|
1851
|
-
/* @__PURE__ */
|
|
1910
|
+
/* @__PURE__ */ o.jsx(
|
|
1852
1911
|
"button",
|
|
1853
1912
|
{
|
|
1854
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1913
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1233",
|
|
1855
1914
|
className: "vg-button-ghost vg-animate-pop",
|
|
1856
1915
|
style: { padding: "8px 12px", color: "#ef4444", borderColor: "#fee2e2", animationDelay: "0.15s" },
|
|
1857
1916
|
onClick: () => {
|
|
1858
|
-
|
|
1917
|
+
M({
|
|
1859
1918
|
title: r.deleteConfirm,
|
|
1860
1919
|
message: r.confirmDelete,
|
|
1861
1920
|
type: "danger",
|
|
@@ -1864,16 +1923,16 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1864
1923
|
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
1865
1924
|
method: "DELETE",
|
|
1866
1925
|
headers: { "x-api-key": n }
|
|
1867
|
-
})).ok && (
|
|
1926
|
+
})).ok && (P(), e(r.deleteSuccess, "success"));
|
|
1868
1927
|
} catch {
|
|
1869
1928
|
e(r.error, "error");
|
|
1870
1929
|
} finally {
|
|
1871
|
-
|
|
1930
|
+
M(null);
|
|
1872
1931
|
}
|
|
1873
1932
|
}
|
|
1874
1933
|
});
|
|
1875
1934
|
},
|
|
1876
|
-
children: /* @__PURE__ */
|
|
1935
|
+
children: /* @__PURE__ */ o.jsx(De, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1260", size: 16 })
|
|
1877
1936
|
}
|
|
1878
1937
|
)
|
|
1879
1938
|
] }) })
|
|
@@ -1882,94 +1941,126 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1882
1941
|
d._id
|
|
1883
1942
|
)) })
|
|
1884
1943
|
] }) }),
|
|
1885
|
-
|
|
1944
|
+
I && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1275", className: "vg-animate-fade", style: {
|
|
1886
1945
|
position: "fixed",
|
|
1887
1946
|
top: 0,
|
|
1888
1947
|
left: 0,
|
|
1889
1948
|
width: "100%",
|
|
1890
1949
|
height: "100%",
|
|
1891
|
-
backgroundColor: "rgba(
|
|
1892
|
-
backdropFilter: "blur(
|
|
1950
|
+
backgroundColor: "rgba(11, 15, 25, 0.7)",
|
|
1951
|
+
backdropFilter: "blur(8px)",
|
|
1893
1952
|
display: "flex",
|
|
1894
1953
|
alignItems: "center",
|
|
1895
1954
|
justifyContent: "center",
|
|
1896
|
-
zIndex:
|
|
1897
|
-
}, children: /* @__PURE__ */
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1955
|
+
zIndex: Re + 100
|
|
1956
|
+
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1280", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1957
|
+
padding: "40px",
|
|
1958
|
+
width: "420px",
|
|
1959
|
+
textAlign: "center",
|
|
1960
|
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
1961
|
+
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.5)"
|
|
1962
|
+
}, children: [
|
|
1963
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1287", style: {
|
|
1964
|
+
width: "64px",
|
|
1965
|
+
height: "64px",
|
|
1966
|
+
background: I.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
|
|
1967
|
+
borderRadius: "20px",
|
|
1903
1968
|
display: "flex",
|
|
1904
1969
|
alignItems: "center",
|
|
1905
1970
|
justifyContent: "center",
|
|
1906
|
-
margin: "0 auto
|
|
1907
|
-
color:
|
|
1908
|
-
|
|
1909
|
-
/* @__PURE__ */
|
|
1910
|
-
/* @__PURE__ */
|
|
1911
|
-
/* @__PURE__ */
|
|
1912
|
-
|
|
1913
|
-
/* @__PURE__ */
|
|
1971
|
+
margin: "0 auto 24px",
|
|
1972
|
+
color: I.type === "danger" ? "#ef4444" : "#6366f1",
|
|
1973
|
+
transform: "rotate(-5deg)"
|
|
1974
|
+
}, children: I.type === "danger" ? /* @__PURE__ */ o.jsx(De, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1296", size: 32 }) : /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1296", size: 32 }) }),
|
|
1975
|
+
/* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1298", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#f8fafc", letterSpacing: "-0.02em" }, children: I.title }),
|
|
1976
|
+
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1299", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#94a3b8", lineHeight: 1.6 }, children: I.message }),
|
|
1977
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1300", style: { display: "flex", gap: "16px" }, children: [
|
|
1978
|
+
/* @__PURE__ */ o.jsx(
|
|
1979
|
+
"button",
|
|
1980
|
+
{
|
|
1981
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1301",
|
|
1982
|
+
className: "vg-button-ghost",
|
|
1983
|
+
style: { flex: 1, height: "44px" },
|
|
1984
|
+
onClick: () => !B && M(null),
|
|
1985
|
+
disabled: B,
|
|
1986
|
+
children: r.no
|
|
1987
|
+
}
|
|
1988
|
+
),
|
|
1989
|
+
/* @__PURE__ */ o.jsx(
|
|
1914
1990
|
"button",
|
|
1915
1991
|
{
|
|
1916
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1992
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1309",
|
|
1917
1993
|
className: "vg-button-primary",
|
|
1918
1994
|
style: {
|
|
1919
1995
|
flex: 1,
|
|
1920
|
-
|
|
1921
|
-
|
|
1996
|
+
height: "44px",
|
|
1997
|
+
backgroundColor: I.type === "danger" ? "#ef4444" : void 0,
|
|
1998
|
+
backgroundImage: I.type === "danger" ? "none" : void 0,
|
|
1999
|
+
display: "flex",
|
|
2000
|
+
alignItems: "center",
|
|
2001
|
+
justifyContent: "center",
|
|
2002
|
+
gap: "8px"
|
|
2003
|
+
},
|
|
2004
|
+
disabled: B,
|
|
2005
|
+
onClick: async () => {
|
|
2006
|
+
ae(!0);
|
|
2007
|
+
try {
|
|
2008
|
+
await I.onConfirm();
|
|
2009
|
+
} catch (d) {
|
|
2010
|
+
console.error("Confirmation error:", d);
|
|
2011
|
+
} finally {
|
|
2012
|
+
ae(!1);
|
|
2013
|
+
}
|
|
1922
2014
|
},
|
|
1923
|
-
|
|
1924
|
-
children: r.yes
|
|
2015
|
+
children: B ? /* @__PURE__ */ o.jsx(At, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1334", size: 18, className: "vg-animate-spin" }) : r.yes
|
|
1925
2016
|
}
|
|
1926
2017
|
)
|
|
1927
2018
|
] })
|
|
1928
2019
|
] }) }),
|
|
1929
|
-
!
|
|
1930
|
-
const
|
|
1931
|
-
if (!
|
|
1932
|
-
const
|
|
1933
|
-
(
|
|
2020
|
+
!l && !O && S.map((d, y) => {
|
|
2021
|
+
const h = C[d._id];
|
|
2022
|
+
if (!h) return null;
|
|
2023
|
+
const _ = S.slice(0, y).filter(
|
|
2024
|
+
(j) => j.reference?.selector && j.reference.selector === d.reference?.selector
|
|
1934
2025
|
).length * 34;
|
|
1935
|
-
return /* @__PURE__ */
|
|
2026
|
+
return /* @__PURE__ */ o.jsxs(
|
|
1936
2027
|
"div",
|
|
1937
2028
|
{
|
|
1938
2029
|
className: "vg-pin-container vg-animate-pop",
|
|
1939
2030
|
style: {
|
|
1940
2031
|
position: "fixed",
|
|
1941
|
-
top:
|
|
1942
|
-
left:
|
|
2032
|
+
top: h.top - 20 - window.scrollY,
|
|
2033
|
+
left: h.left + h.width / 2 - 16 + _ - window.scrollX,
|
|
1943
2034
|
cursor: "pointer",
|
|
1944
|
-
animationDelay: `${
|
|
2035
|
+
animationDelay: `${y * 0.08}s`,
|
|
1945
2036
|
transition: "all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",
|
|
1946
|
-
zIndex:
|
|
2037
|
+
zIndex: Hr - y
|
|
1947
2038
|
// Ensure staggered pins don't overlap tooltips weirdly
|
|
1948
2039
|
},
|
|
1949
|
-
onMouseEnter: (
|
|
1950
|
-
const R =
|
|
1951
|
-
window.innerHeight - R.bottom < 180 ?
|
|
2040
|
+
onMouseEnter: (j) => {
|
|
2041
|
+
const R = j.currentTarget.getBoundingClientRect();
|
|
2042
|
+
window.innerHeight - R.bottom < 180 ? me((G) => ({ ...G, [d._id]: "vg-top" })) : me((G) => ({ ...G, [d._id]: "" }));
|
|
1952
2043
|
},
|
|
1953
2044
|
onClick: () => {
|
|
1954
|
-
|
|
2045
|
+
T(!0), K(d._id);
|
|
1955
2046
|
},
|
|
1956
2047
|
children: [
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
d.status === "ready_for_review" ? /* @__PURE__ */
|
|
1960
|
-
/* @__PURE__ */
|
|
2048
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1381", className: `vg-pin-tooltip ${pe[d._id] || ""}`, children: [
|
|
2049
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1382", style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: [
|
|
2050
|
+
d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1384", style: { display: "flex", alignItems: "center", gap: "6px", color: "#16a34a", fontWeight: 700, fontSize: "11px" }, children: [
|
|
2051
|
+
/* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1385", size: 12 }),
|
|
1961
2052
|
" ",
|
|
1962
2053
|
r.readyForReview
|
|
1963
|
-
] }) : /* @__PURE__ */
|
|
1964
|
-
/* @__PURE__ */
|
|
2054
|
+
] }) : /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1388", style: { display: "flex", alignItems: "center", gap: "6px", color: h.isModal ? "#f59e0b" : "#ea580c", fontWeight: 700, fontSize: "11px" }, children: [
|
|
2055
|
+
/* @__PURE__ */ o.jsx(Me, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1389", size: 12 }),
|
|
1965
2056
|
" ",
|
|
1966
2057
|
r.pending
|
|
1967
2058
|
] }),
|
|
1968
|
-
|
|
2059
|
+
h.isModal && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1393", style: { display: "flex", alignItems: "center", gap: "6px", color: "#f59e0b", fontWeight: 700, fontSize: "11px", marginLeft: "auto" }, children: /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1394", children: "MODAL" }) })
|
|
1969
2060
|
] }),
|
|
1970
|
-
/* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1398", style: { fontWeight: 500, color: "#1e293b", lineHeight: 1.4 }, children: d.message })
|
|
1971
2062
|
] }),
|
|
1972
|
-
/* @__PURE__ */
|
|
2063
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1401", className: `vg-formal-pin ${d.status === "ready_for_review" ? "ready" : ""} ${h.isModal ? "modal-variant" : ""}`, children: d.status === "ready_for_review" ? /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1402", size: 18 }) : h.isModal ? /* @__PURE__ */ o.jsx(Fe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1402", size: 16 }) : /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1402", size: 16 }) })
|
|
1973
2064
|
]
|
|
1974
2065
|
},
|
|
1975
2066
|
`pin-${d._id}`
|
|
@@ -1977,37 +2068,37 @@ const fe = 2147483647, Ue = fe, be = 2e6, Nr = fe - 10, Lr = fe - 5, Ir = fe - 1
|
|
|
1977
2068
|
})
|
|
1978
2069
|
] }) });
|
|
1979
2070
|
};
|
|
1980
|
-
function
|
|
2071
|
+
function dt(e, t, r) {
|
|
1981
2072
|
if (!t.endsWith(".tsx") && !t.endsWith(".jsx") || t.includes("node_modules")) return e;
|
|
1982
|
-
const n = (
|
|
2073
|
+
const n = (l) => l.replace(/\\/g, "/"), a = n(t).replace(n(r), "");
|
|
1983
2074
|
return e.split(`
|
|
1984
|
-
`).map((
|
|
1985
|
-
const
|
|
1986
|
-
return
|
|
2075
|
+
`).map((l, p) => {
|
|
2076
|
+
const u = p + 1;
|
|
2077
|
+
return l.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (x, m, w) => x.includes("data-source-path") || w === "Fragment" || w === "React.Fragment" ? x : `${m}<${w} data-source-path="${a}:${u}"`);
|
|
1987
2078
|
}).join(`
|
|
1988
2079
|
`);
|
|
1989
2080
|
}
|
|
1990
|
-
function
|
|
2081
|
+
function on() {
|
|
1991
2082
|
return {
|
|
1992
2083
|
name: "vite-plugin-viewgate",
|
|
1993
2084
|
enforce: "pre",
|
|
1994
2085
|
transform(e, t) {
|
|
1995
2086
|
return {
|
|
1996
|
-
code:
|
|
2087
|
+
code: dt(e, t, process.cwd()),
|
|
1997
2088
|
map: null
|
|
1998
2089
|
};
|
|
1999
2090
|
}
|
|
2000
2091
|
};
|
|
2001
2092
|
}
|
|
2002
|
-
function
|
|
2093
|
+
function cn(e) {
|
|
2003
2094
|
const t = this.resourcePath;
|
|
2004
|
-
return t ? (process.env.NODE_ENV,
|
|
2095
|
+
return t ? (process.env.NODE_ENV, dt(e, t, process.cwd())) : e;
|
|
2005
2096
|
}
|
|
2006
2097
|
export {
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2098
|
+
an as ViewGate,
|
|
2099
|
+
rn as ViewGateOverlay,
|
|
2100
|
+
dt as transformSourcePaths,
|
|
2101
|
+
qt as useViewGate,
|
|
2102
|
+
cn as viewgateNextLoader,
|
|
2103
|
+
on as viewgatePlugin
|
|
2013
2104
|
};
|