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