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