@bitux/review-layer-react 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -116
- package/dist/review-layer-react.js +980 -957
- package/dist/review-layer-react.js.map +1 -1
- package/dist/review-layer-react.umd.cjs +339 -339
- package/dist/review-layer-react.umd.cjs.map +1 -1
- package/dist/utils/positioning.d.ts +3 -3
- package/package.json +59 -59
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
3
|
-
var
|
|
1
|
+
import lr, { memo as Re, useState as F, useEffect as A, useCallback as j, useRef as me, useMemo as Ne, createContext as Mr, useContext as Wr } from "react";
|
|
2
|
+
import { createPortal as sr } from "react-dom";
|
|
3
|
+
var Ae = { exports: {} }, le = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,21 +10,21 @@ var Ar = { exports: {} }, lr = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
w !== void 0 && (P = "" + w), d.key !== void 0 && (P = "" + d.key), d.ref !== void 0 && (
|
|
21
|
-
for (
|
|
22
|
-
if (g && g.defaultProps) for (
|
|
23
|
-
return { $$typeof: t, type: g, key: P, ref:
|
|
13
|
+
var rr;
|
|
14
|
+
function Br() {
|
|
15
|
+
if (rr) return le;
|
|
16
|
+
rr = 1;
|
|
17
|
+
var r = lr, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function p(g, d, w) {
|
|
19
|
+
var h, y = {}, P = null, k = null;
|
|
20
|
+
w !== void 0 && (P = "" + w), d.key !== void 0 && (P = "" + d.key), d.ref !== void 0 && (k = d.ref);
|
|
21
|
+
for (h in d) i.call(d, h) && !s.hasOwnProperty(h) && (y[h] = d[h]);
|
|
22
|
+
if (g && g.defaultProps) for (h in d = g.defaultProps, d) y[h] === void 0 && (y[h] = d[h]);
|
|
23
|
+
return { $$typeof: t, type: g, key: P, ref: k, props: y, _owner: a.current };
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return le.Fragment = o, le.jsx = p, le.jsxs = p, le;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var se = {};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-jsx-runtime.development.js
|
|
@@ -34,61 +34,61 @@ var sr = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
37
|
+
var or;
|
|
38
|
+
function Yr() {
|
|
39
|
+
return or || (or = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
+
var r = lr, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), g = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), V = Symbol.iterator, $ = "@@iterator";
|
|
41
|
+
function z(e) {
|
|
42
|
+
if (e === null || typeof e != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var n = V &&
|
|
44
|
+
var n = V && e[V] || e[$];
|
|
45
45
|
return typeof n == "function" ? n : null;
|
|
46
46
|
}
|
|
47
|
-
var c =
|
|
48
|
-
function
|
|
47
|
+
var c = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
+
function f(e) {
|
|
49
49
|
{
|
|
50
|
-
for (var n = arguments.length, u = new Array(n > 1 ? n - 1 : 0),
|
|
51
|
-
u[
|
|
52
|
-
I("error",
|
|
50
|
+
for (var n = arguments.length, u = new Array(n > 1 ? n - 1 : 0), v = 1; v < n; v++)
|
|
51
|
+
u[v - 1] = arguments[v];
|
|
52
|
+
I("error", e, u);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function I(
|
|
55
|
+
function I(e, n, u) {
|
|
56
56
|
{
|
|
57
|
-
var
|
|
57
|
+
var v = c.ReactDebugCurrentFrame, E = v.getStackAddendum();
|
|
58
58
|
E !== "" && (n += "%s", u = u.concat([E]));
|
|
59
|
-
var
|
|
60
|
-
return String(
|
|
59
|
+
var S = u.map(function(x) {
|
|
60
|
+
return String(x);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
S.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, S);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var N = !1, H = !1,
|
|
65
|
+
var N = !1, H = !1, re = !1, oe = !1, te = !1, X;
|
|
66
66
|
X = Symbol.for("react.module.reference");
|
|
67
|
-
function m(
|
|
68
|
-
return !!(typeof
|
|
67
|
+
function m(e) {
|
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === i || e === s || te || e === a || e === w || e === h || oe || e === k || N || H || re || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === y || e.$$typeof === p || e.$$typeof === g || e.$$typeof === d || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
|
-
|
|
72
|
+
e.$$typeof === X || e.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
var
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
74
|
+
function R(e, n, u) {
|
|
75
|
+
var v = e.displayName;
|
|
76
|
+
if (v)
|
|
77
|
+
return v;
|
|
78
78
|
var E = n.displayName || n.name || "";
|
|
79
79
|
return E !== "" ? u + "(" + E + ")" : u;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
81
|
+
function O(e) {
|
|
82
|
+
return e.displayName || "Context";
|
|
83
83
|
}
|
|
84
|
-
function T(
|
|
85
|
-
if (
|
|
84
|
+
function T(e) {
|
|
85
|
+
if (e == null)
|
|
86
86
|
return null;
|
|
87
|
-
if (typeof
|
|
88
|
-
return
|
|
89
|
-
if (typeof
|
|
90
|
-
return
|
|
91
|
-
switch (
|
|
87
|
+
if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
|
+
return e.displayName || e.name || null;
|
|
89
|
+
if (typeof e == "string")
|
|
90
|
+
return e;
|
|
91
|
+
switch (e) {
|
|
92
92
|
case i:
|
|
93
93
|
return "Fragment";
|
|
94
94
|
case o:
|
|
@@ -99,26 +99,26 @@ function Be() {
|
|
|
99
99
|
return "StrictMode";
|
|
100
100
|
case w:
|
|
101
101
|
return "Suspense";
|
|
102
|
-
case
|
|
102
|
+
case h:
|
|
103
103
|
return "SuspenseList";
|
|
104
104
|
}
|
|
105
|
-
if (typeof
|
|
106
|
-
switch (
|
|
105
|
+
if (typeof e == "object")
|
|
106
|
+
switch (e.$$typeof) {
|
|
107
107
|
case g:
|
|
108
|
-
var n =
|
|
109
|
-
return
|
|
110
|
-
case
|
|
111
|
-
var u =
|
|
112
|
-
return
|
|
108
|
+
var n = e;
|
|
109
|
+
return O(n) + ".Consumer";
|
|
110
|
+
case p:
|
|
111
|
+
var u = e;
|
|
112
|
+
return O(u._context) + ".Provider";
|
|
113
113
|
case d:
|
|
114
|
-
return
|
|
114
|
+
return R(e, e.render, "ForwardRef");
|
|
115
115
|
case y:
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var v = e.displayName || null;
|
|
117
|
+
return v !== null ? v : T(e.type) || "Memo";
|
|
118
118
|
case P: {
|
|
119
|
-
var E =
|
|
119
|
+
var E = e, S = E._payload, x = E._init;
|
|
120
120
|
try {
|
|
121
|
-
return T(
|
|
121
|
+
return T(x(S));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,303 +126,303 @@ function Be() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var G = Object.assign, Y = 0, J,
|
|
130
|
-
function
|
|
129
|
+
var G = Object.assign, Y = 0, J, de, fe, ne, ie, _, q;
|
|
130
|
+
function ae() {
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
function
|
|
132
|
+
ae.__reactDisabledLog = !0;
|
|
133
|
+
function ve() {
|
|
134
134
|
{
|
|
135
135
|
if (Y === 0) {
|
|
136
|
-
J = console.log,
|
|
137
|
-
var
|
|
136
|
+
J = console.log, de = console.info, fe = console.warn, ne = console.error, ie = console.group, _ = console.groupCollapsed, q = console.groupEnd;
|
|
137
|
+
var e = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
140
|
-
value:
|
|
140
|
+
value: ae,
|
|
141
141
|
writable: !0
|
|
142
142
|
};
|
|
143
143
|
Object.defineProperties(console, {
|
|
144
|
-
info:
|
|
145
|
-
log:
|
|
146
|
-
warn:
|
|
147
|
-
error:
|
|
148
|
-
group:
|
|
149
|
-
groupCollapsed:
|
|
150
|
-
groupEnd:
|
|
144
|
+
info: e,
|
|
145
|
+
log: e,
|
|
146
|
+
warn: e,
|
|
147
|
+
error: e,
|
|
148
|
+
group: e,
|
|
149
|
+
groupCollapsed: e,
|
|
150
|
+
groupEnd: e
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
Y++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function pe() {
|
|
157
157
|
{
|
|
158
158
|
if (Y--, Y === 0) {
|
|
159
|
-
var
|
|
159
|
+
var e = {
|
|
160
160
|
configurable: !0,
|
|
161
161
|
enumerable: !0,
|
|
162
162
|
writable: !0
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
|
-
log: G({},
|
|
165
|
+
log: G({}, e, {
|
|
166
166
|
value: J
|
|
167
167
|
}),
|
|
168
|
-
info: G({},
|
|
169
|
-
value:
|
|
168
|
+
info: G({}, e, {
|
|
169
|
+
value: de
|
|
170
170
|
}),
|
|
171
|
-
warn: G({},
|
|
172
|
-
value:
|
|
171
|
+
warn: G({}, e, {
|
|
172
|
+
value: fe
|
|
173
173
|
}),
|
|
174
|
-
error: G({},
|
|
175
|
-
value:
|
|
174
|
+
error: G({}, e, {
|
|
175
|
+
value: ne
|
|
176
176
|
}),
|
|
177
|
-
group: G({},
|
|
178
|
-
value:
|
|
177
|
+
group: G({}, e, {
|
|
178
|
+
value: ie
|
|
179
179
|
}),
|
|
180
|
-
groupCollapsed: G({},
|
|
180
|
+
groupCollapsed: G({}, e, {
|
|
181
181
|
value: _
|
|
182
182
|
}),
|
|
183
|
-
groupEnd: G({},
|
|
183
|
+
groupEnd: G({}, e, {
|
|
184
184
|
value: q
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
Y < 0 &&
|
|
188
|
+
Y < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
191
|
+
var ke = c.ReactCurrentDispatcher, Ce;
|
|
192
|
+
function ge(e, n, u) {
|
|
193
193
|
{
|
|
194
|
-
if (
|
|
194
|
+
if (Ce === void 0)
|
|
195
195
|
try {
|
|
196
196
|
throw Error();
|
|
197
197
|
} catch (E) {
|
|
198
|
-
var
|
|
199
|
-
|
|
198
|
+
var v = E.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
Ce = v && v[1] || "";
|
|
200
200
|
}
|
|
201
201
|
return `
|
|
202
|
-
` +
|
|
202
|
+
` + Ce + e;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var
|
|
205
|
+
var Pe = !1, be;
|
|
206
206
|
{
|
|
207
|
-
var
|
|
208
|
-
|
|
207
|
+
var br = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
be = new br();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
if (!
|
|
210
|
+
function $e(e, n) {
|
|
211
|
+
if (!e || Pe)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
214
|
-
var u =
|
|
214
|
+
var u = be.get(e);
|
|
215
215
|
if (u !== void 0)
|
|
216
216
|
return u;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
219
|
-
|
|
218
|
+
var v;
|
|
219
|
+
Pe = !0;
|
|
220
220
|
var E = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
|
-
var
|
|
223
|
-
|
|
222
|
+
var S;
|
|
223
|
+
S = ke.current, ke.current = null, ve();
|
|
224
224
|
try {
|
|
225
225
|
if (n) {
|
|
226
|
-
var
|
|
226
|
+
var x = function() {
|
|
227
227
|
throw Error();
|
|
228
228
|
};
|
|
229
|
-
if (Object.defineProperty(
|
|
229
|
+
if (Object.defineProperty(x.prototype, "props", {
|
|
230
230
|
set: function() {
|
|
231
231
|
throw Error();
|
|
232
232
|
}
|
|
233
233
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
234
|
try {
|
|
235
|
-
Reflect.construct(
|
|
235
|
+
Reflect.construct(x, []);
|
|
236
236
|
} catch (W) {
|
|
237
|
-
|
|
237
|
+
v = W;
|
|
238
238
|
}
|
|
239
|
-
Reflect.construct(
|
|
239
|
+
Reflect.construct(e, [], x);
|
|
240
240
|
} else {
|
|
241
241
|
try {
|
|
242
|
-
|
|
242
|
+
x.call();
|
|
243
243
|
} catch (W) {
|
|
244
|
-
|
|
244
|
+
v = W;
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
e.call(x.prototype);
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
250
250
|
throw Error();
|
|
251
251
|
} catch (W) {
|
|
252
|
-
|
|
252
|
+
v = W;
|
|
253
253
|
}
|
|
254
|
-
|
|
254
|
+
e();
|
|
255
255
|
}
|
|
256
256
|
} catch (W) {
|
|
257
|
-
if (W &&
|
|
257
|
+
if (W && v && typeof W.stack == "string") {
|
|
258
258
|
for (var b = W.stack.split(`
|
|
259
|
-
`), M =
|
|
260
|
-
`), D = b.length - 1,
|
|
261
|
-
|
|
262
|
-
for (; D >= 1 &&
|
|
263
|
-
if (b[D] !== M[
|
|
264
|
-
if (D !== 1 ||
|
|
259
|
+
`), M = v.stack.split(`
|
|
260
|
+
`), D = b.length - 1, L = M.length - 1; D >= 1 && L >= 0 && b[D] !== M[L]; )
|
|
261
|
+
L--;
|
|
262
|
+
for (; D >= 1 && L >= 0; D--, L--)
|
|
263
|
+
if (b[D] !== M[L]) {
|
|
264
|
+
if (D !== 1 || L !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (D--,
|
|
266
|
+
if (D--, L--, L < 0 || b[D] !== M[L]) {
|
|
267
267
|
var U = `
|
|
268
268
|
` + b[D].replace(" at new ", " at ");
|
|
269
|
-
return
|
|
269
|
+
return e.displayName && U.includes("<anonymous>") && (U = U.replace("<anonymous>", e.displayName)), typeof e == "function" && be.set(e, U), U;
|
|
270
270
|
}
|
|
271
|
-
while (D >= 1 &&
|
|
271
|
+
while (D >= 1 && L >= 0);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
|
|
276
|
+
Pe = !1, ke.current = S, pe(), Error.prepareStackTrace = E;
|
|
277
277
|
}
|
|
278
|
-
var K =
|
|
279
|
-
return typeof
|
|
278
|
+
var K = e ? e.displayName || e.name : "", Z = K ? ge(K) : "";
|
|
279
|
+
return typeof e == "function" && be.set(e, Z), Z;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return
|
|
281
|
+
function hr(e, n, u) {
|
|
282
|
+
return $e(e, !1);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
var n =
|
|
284
|
+
function xr(e) {
|
|
285
|
+
var n = e.prototype;
|
|
286
286
|
return !!(n && n.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
if (
|
|
288
|
+
function he(e, n, u) {
|
|
289
|
+
if (e == null)
|
|
290
290
|
return "";
|
|
291
|
-
if (typeof
|
|
292
|
-
return
|
|
293
|
-
if (typeof
|
|
294
|
-
return
|
|
295
|
-
switch (
|
|
291
|
+
if (typeof e == "function")
|
|
292
|
+
return $e(e, xr(e));
|
|
293
|
+
if (typeof e == "string")
|
|
294
|
+
return ge(e);
|
|
295
|
+
switch (e) {
|
|
296
296
|
case w:
|
|
297
|
-
return
|
|
298
|
-
case
|
|
299
|
-
return
|
|
297
|
+
return ge("Suspense");
|
|
298
|
+
case h:
|
|
299
|
+
return ge("SuspenseList");
|
|
300
300
|
}
|
|
301
|
-
if (typeof
|
|
302
|
-
switch (
|
|
301
|
+
if (typeof e == "object")
|
|
302
|
+
switch (e.$$typeof) {
|
|
303
303
|
case d:
|
|
304
|
-
return
|
|
304
|
+
return hr(e.render);
|
|
305
305
|
case y:
|
|
306
|
-
return
|
|
306
|
+
return he(e.type, n, u);
|
|
307
307
|
case P: {
|
|
308
|
-
var
|
|
308
|
+
var v = e, E = v._payload, S = v._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return he(S(E), n, u);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var
|
|
318
|
-
function
|
|
319
|
-
if (
|
|
320
|
-
var n =
|
|
321
|
-
|
|
317
|
+
var ue = Object.prototype.hasOwnProperty, Me = {}, We = c.ReactDebugCurrentFrame;
|
|
318
|
+
function xe(e) {
|
|
319
|
+
if (e) {
|
|
320
|
+
var n = e._owner, u = he(e.type, e._source, n ? n.type : null);
|
|
321
|
+
We.setExtraStackFrame(u);
|
|
322
322
|
} else
|
|
323
|
-
|
|
323
|
+
We.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function yr(e, n, u, v, E) {
|
|
326
326
|
{
|
|
327
|
-
var
|
|
328
|
-
for (var
|
|
329
|
-
if (
|
|
327
|
+
var S = Function.call.bind(ue);
|
|
328
|
+
for (var x in e)
|
|
329
|
+
if (S(e, x)) {
|
|
330
330
|
var b = void 0;
|
|
331
331
|
try {
|
|
332
|
-
if (typeof
|
|
333
|
-
var M = Error((
|
|
332
|
+
if (typeof e[x] != "function") {
|
|
333
|
+
var M = Error((v || "React class") + ": " + u + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
334
|
throw M.name = "Invariant Violation", M;
|
|
335
335
|
}
|
|
336
|
-
b =
|
|
336
|
+
b = e[x](n, x, v, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
337
|
} catch (D) {
|
|
338
338
|
b = D;
|
|
339
339
|
}
|
|
340
|
-
b && !(b instanceof Error) && (
|
|
340
|
+
b && !(b instanceof Error) && (xe(E), f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", u, x, typeof b), xe(null)), b instanceof Error && !(b.message in Me) && (Me[b.message] = !0, xe(E), f("Failed %s type: %s", u, b.message), xe(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
var
|
|
345
|
-
function
|
|
346
|
-
return
|
|
344
|
+
var mr = Array.isArray;
|
|
345
|
+
function je(e) {
|
|
346
|
+
return mr(e);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function wr(e) {
|
|
349
349
|
{
|
|
350
|
-
var n = typeof Symbol == "function" && Symbol.toStringTag, u = n &&
|
|
350
|
+
var n = typeof Symbol == "function" && Symbol.toStringTag, u = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
351
|
return u;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function _r(e) {
|
|
355
355
|
try {
|
|
356
|
-
return
|
|
356
|
+
return Be(e), !1;
|
|
357
357
|
} catch {
|
|
358
358
|
return !0;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
return "" +
|
|
361
|
+
function Be(e) {
|
|
362
|
+
return "" + e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
return
|
|
364
|
+
function Ye(e) {
|
|
365
|
+
if (_r(e))
|
|
366
|
+
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wr(e)), Be(e);
|
|
367
367
|
}
|
|
368
|
-
var
|
|
368
|
+
var Ue = c.ReactCurrentOwner, Er = {
|
|
369
369
|
key: !0,
|
|
370
370
|
ref: !0,
|
|
371
371
|
__self: !0,
|
|
372
372
|
__source: !0
|
|
373
|
-
},
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
376
|
-
var n = Object.getOwnPropertyDescriptor(
|
|
373
|
+
}, Ge, He;
|
|
374
|
+
function Rr(e) {
|
|
375
|
+
if (ue.call(e, "ref")) {
|
|
376
|
+
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
377
|
if (n && n.isReactWarning)
|
|
378
378
|
return !1;
|
|
379
379
|
}
|
|
380
|
-
return
|
|
380
|
+
return e.ref !== void 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
384
|
-
var n = Object.getOwnPropertyDescriptor(
|
|
382
|
+
function Sr(e) {
|
|
383
|
+
if (ue.call(e, "key")) {
|
|
384
|
+
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
385
|
if (n && n.isReactWarning)
|
|
386
386
|
return !1;
|
|
387
387
|
}
|
|
388
|
-
return
|
|
388
|
+
return e.key !== void 0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
typeof
|
|
390
|
+
function kr(e, n) {
|
|
391
|
+
typeof e.ref == "string" && Ue.current;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Cr(e, n) {
|
|
394
394
|
{
|
|
395
395
|
var u = function() {
|
|
396
|
-
|
|
396
|
+
Ge || (Ge = !0, f("%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://reactjs.org/link/special-props)", n));
|
|
397
397
|
};
|
|
398
|
-
u.isReactWarning = !0, Object.defineProperty(
|
|
398
|
+
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
399
|
get: u,
|
|
400
400
|
configurable: !0
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function Pr(e, n) {
|
|
405
405
|
{
|
|
406
406
|
var u = function() {
|
|
407
|
-
|
|
407
|
+
He || (He = !0, f("%s: `ref` 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://reactjs.org/link/special-props)", n));
|
|
408
408
|
};
|
|
409
|
-
u.isReactWarning = !0, Object.defineProperty(
|
|
409
|
+
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
410
|
get: u,
|
|
411
411
|
configurable: !0
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
415
|
+
var jr = function(e, n, u, v, E, S, x) {
|
|
416
416
|
var b = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
418
|
$$typeof: t,
|
|
419
419
|
// Built-in properties that belong on the element
|
|
420
|
-
type:
|
|
420
|
+
type: e,
|
|
421
421
|
key: n,
|
|
422
422
|
ref: u,
|
|
423
|
-
props:
|
|
423
|
+
props: x,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
|
-
_owner:
|
|
425
|
+
_owner: S
|
|
426
426
|
};
|
|
427
427
|
return b._store = {}, Object.defineProperty(b._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
@@ -433,7 +433,7 @@ function Be() {
|
|
|
433
433
|
configurable: !1,
|
|
434
434
|
enumerable: !1,
|
|
435
435
|
writable: !1,
|
|
436
|
-
value:
|
|
436
|
+
value: v
|
|
437
437
|
}), Object.defineProperty(b, "_source", {
|
|
438
438
|
configurable: !1,
|
|
439
439
|
enumerable: !1,
|
|
@@ -441,58 +441,58 @@ function Be() {
|
|
|
441
441
|
value: E
|
|
442
442
|
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
|
443
443
|
};
|
|
444
|
-
function
|
|
444
|
+
function Vr(e, n, u, v, E) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
u !== void 0 && (
|
|
448
|
-
for (
|
|
449
|
-
|
|
450
|
-
if (
|
|
451
|
-
var D =
|
|
452
|
-
for (
|
|
453
|
-
|
|
446
|
+
var S, x = {}, b = null, M = null;
|
|
447
|
+
u !== void 0 && (Ye(u), b = "" + u), Sr(n) && (Ye(n.key), b = "" + n.key), Rr(n) && (M = n.ref, kr(n, E));
|
|
448
|
+
for (S in n)
|
|
449
|
+
ue.call(n, S) && !Er.hasOwnProperty(S) && (x[S] = n[S]);
|
|
450
|
+
if (e && e.defaultProps) {
|
|
451
|
+
var D = e.defaultProps;
|
|
452
|
+
for (S in D)
|
|
453
|
+
x[S] === void 0 && (x[S] = D[S]);
|
|
454
454
|
}
|
|
455
455
|
if (b || M) {
|
|
456
|
-
var
|
|
457
|
-
b &&
|
|
456
|
+
var L = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
+
b && Cr(x, L), M && Pr(x, L);
|
|
458
458
|
}
|
|
459
|
-
return
|
|
459
|
+
return jr(e, b, M, E, v, Ue.current, x);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var
|
|
463
|
-
function Q(
|
|
464
|
-
if (
|
|
465
|
-
var n =
|
|
466
|
-
|
|
462
|
+
var Ve = c.ReactCurrentOwner, Xe = c.ReactDebugCurrentFrame;
|
|
463
|
+
function Q(e) {
|
|
464
|
+
if (e) {
|
|
465
|
+
var n = e._owner, u = he(e.type, e._source, n ? n.type : null);
|
|
466
|
+
Xe.setExtraStackFrame(u);
|
|
467
467
|
} else
|
|
468
|
-
|
|
468
|
+
Xe.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
|
-
var
|
|
471
|
-
|
|
472
|
-
function
|
|
473
|
-
return typeof
|
|
470
|
+
var Te;
|
|
471
|
+
Te = !1;
|
|
472
|
+
function De(e) {
|
|
473
|
+
return typeof e == "object" && e !== null && e.$$typeof === t;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Je() {
|
|
476
476
|
{
|
|
477
|
-
if (
|
|
478
|
-
var
|
|
479
|
-
if (
|
|
477
|
+
if (Ve.current) {
|
|
478
|
+
var e = T(Ve.current.type);
|
|
479
|
+
if (e)
|
|
480
480
|
return `
|
|
481
481
|
|
|
482
|
-
Check the render method of \`` +
|
|
482
|
+
Check the render method of \`` + e + "`.";
|
|
483
483
|
}
|
|
484
484
|
return "";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function Tr(e) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
490
|
+
var qe = {};
|
|
491
|
+
function Dr(e) {
|
|
492
492
|
{
|
|
493
|
-
var n =
|
|
493
|
+
var n = Je();
|
|
494
494
|
if (!n) {
|
|
495
|
-
var u = typeof
|
|
495
|
+
var u = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
496
|
u && (n = `
|
|
497
497
|
|
|
498
498
|
Check the top-level render call using <` + u + ">.");
|
|
@@ -500,41 +500,41 @@ Check the top-level render call using <` + u + ">.");
|
|
|
500
500
|
return n;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ze(e, n) {
|
|
504
504
|
{
|
|
505
|
-
if (!
|
|
505
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
506
506
|
return;
|
|
507
|
-
|
|
508
|
-
var u =
|
|
509
|
-
if (
|
|
507
|
+
e._store.validated = !0;
|
|
508
|
+
var u = Dr(n);
|
|
509
|
+
if (qe[u])
|
|
510
510
|
return;
|
|
511
|
-
|
|
512
|
-
var
|
|
513
|
-
|
|
511
|
+
qe[u] = !0;
|
|
512
|
+
var v = "";
|
|
513
|
+
e && e._owner && e._owner !== Ve.current && (v = " It was passed a child from " + T(e._owner.type) + "."), Q(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, v), Q(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Qe(e, n) {
|
|
517
517
|
{
|
|
518
|
-
if (typeof
|
|
518
|
+
if (typeof e != "object")
|
|
519
519
|
return;
|
|
520
|
-
if (
|
|
521
|
-
for (var u = 0; u <
|
|
522
|
-
var
|
|
523
|
-
|
|
520
|
+
if (je(e))
|
|
521
|
+
for (var u = 0; u < e.length; u++) {
|
|
522
|
+
var v = e[u];
|
|
523
|
+
De(v) && Ze(v, n);
|
|
524
524
|
}
|
|
525
|
-
else if (
|
|
526
|
-
|
|
527
|
-
else if (
|
|
528
|
-
var E =
|
|
529
|
-
if (typeof E == "function" && E !==
|
|
530
|
-
for (var
|
|
531
|
-
|
|
525
|
+
else if (De(e))
|
|
526
|
+
e._store && (e._store.validated = !0);
|
|
527
|
+
else if (e) {
|
|
528
|
+
var E = z(e);
|
|
529
|
+
if (typeof E == "function" && E !== e.entries)
|
|
530
|
+
for (var S = E.call(e), x; !(x = S.next()).done; )
|
|
531
|
+
De(x.value) && Ze(x.value, n);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Ir(e) {
|
|
536
536
|
{
|
|
537
|
-
var n =
|
|
537
|
+
var n = e.type;
|
|
538
538
|
if (n == null || typeof n == "string")
|
|
539
539
|
return;
|
|
540
540
|
var u;
|
|
@@ -547,90 +547,90 @@ Check the top-level render call using <` + u + ">.");
|
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
549
|
if (u) {
|
|
550
|
-
var
|
|
551
|
-
|
|
552
|
-
} else if (n.PropTypes !== void 0 && !
|
|
553
|
-
|
|
550
|
+
var v = T(n);
|
|
551
|
+
yr(u, e.props, "prop", v, e);
|
|
552
|
+
} else if (n.PropTypes !== void 0 && !Te) {
|
|
553
|
+
Te = !0;
|
|
554
554
|
var E = T(n);
|
|
555
|
-
|
|
555
|
+
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
|
|
556
556
|
}
|
|
557
|
-
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved &&
|
|
557
|
+
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function Or(e) {
|
|
561
561
|
{
|
|
562
|
-
for (var n = Object.keys(
|
|
563
|
-
var
|
|
564
|
-
if (
|
|
565
|
-
Q(
|
|
562
|
+
for (var n = Object.keys(e.props), u = 0; u < n.length; u++) {
|
|
563
|
+
var v = n[u];
|
|
564
|
+
if (v !== "children" && v !== "key") {
|
|
565
|
+
Q(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), Q(null);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
|
|
569
|
+
e.ref !== null && (Q(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
var
|
|
573
|
-
function
|
|
572
|
+
var Ke = {};
|
|
573
|
+
function er(e, n, u, v, E, S) {
|
|
574
574
|
{
|
|
575
|
-
var
|
|
576
|
-
if (!
|
|
575
|
+
var x = m(e);
|
|
576
|
+
if (!x) {
|
|
577
577
|
var b = "";
|
|
578
|
-
(
|
|
579
|
-
var M =
|
|
580
|
-
M ? b += M : b +=
|
|
578
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
+
var M = Tr();
|
|
580
|
+
M ? b += M : b += Je();
|
|
581
581
|
var D;
|
|
582
|
-
|
|
582
|
+
e === null ? D = "null" : je(e) ? D = "array" : e !== void 0 && e.$$typeof === t ? (D = "<" + (T(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, b);
|
|
583
583
|
}
|
|
584
|
-
var
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
if (
|
|
584
|
+
var L = Vr(e, n, u, E, S);
|
|
585
|
+
if (L == null)
|
|
586
|
+
return L;
|
|
587
|
+
if (x) {
|
|
588
588
|
var U = n.children;
|
|
589
589
|
if (U !== void 0)
|
|
590
|
-
if (
|
|
591
|
-
if (
|
|
590
|
+
if (v)
|
|
591
|
+
if (je(U)) {
|
|
592
592
|
for (var K = 0; K < U.length; K++)
|
|
593
|
-
|
|
593
|
+
Qe(U[K], e);
|
|
594
594
|
Object.freeze && Object.freeze(U);
|
|
595
595
|
} else
|
|
596
|
-
|
|
596
|
+
f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
|
|
598
|
+
Qe(U, e);
|
|
599
599
|
}
|
|
600
|
-
if (
|
|
601
|
-
var Z = T(
|
|
602
|
-
return
|
|
603
|
-
}),
|
|
604
|
-
if (!
|
|
605
|
-
var
|
|
606
|
-
|
|
600
|
+
if (ue.call(n, "key")) {
|
|
601
|
+
var Z = T(e), W = Object.keys(n).filter(function($r) {
|
|
602
|
+
return $r !== "key";
|
|
603
|
+
}), Ie = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
+
if (!Ke[Z + Ie]) {
|
|
605
|
+
var Nr = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
+
f(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`,
|
|
611
|
+
<%s key={someKey} {...props} />`, Ie, Z, Nr, Z), Ke[Z + Ie] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return
|
|
614
|
+
return e === i ? Or(L) : Ir(L), L;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
617
|
+
function Lr(e, n, u) {
|
|
618
|
+
return er(e, n, u, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
620
|
+
function zr(e, n, u) {
|
|
621
|
+
return er(e, n, u, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
}()),
|
|
623
|
+
var Ar = zr, Fr = Lr;
|
|
624
|
+
se.Fragment = i, se.jsx = Ar, se.jsxs = Fr;
|
|
625
|
+
}()), se;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var l =
|
|
629
|
-
function
|
|
630
|
-
if (
|
|
631
|
-
return `#${
|
|
627
|
+
process.env.NODE_ENV === "production" ? Ae.exports = Br() : Ae.exports = Yr();
|
|
628
|
+
var l = Ae.exports;
|
|
629
|
+
function Ur(r) {
|
|
630
|
+
if (r.id && /^[a-zA-Z][\w-]*$/.test(r.id))
|
|
631
|
+
return `#${r.id}`;
|
|
632
632
|
const t = [];
|
|
633
|
-
let o =
|
|
633
|
+
let o = r;
|
|
634
634
|
for (; o && o.nodeType === Node.ELEMENT_NODE; ) {
|
|
635
635
|
let i = o.nodeName.toLowerCase();
|
|
636
636
|
if (o.id && /^[a-zA-Z][\w-]*$/.test(o.id)) {
|
|
@@ -640,7 +640,7 @@ function Ye(e) {
|
|
|
640
640
|
if (o.className && typeof o.className == "string") {
|
|
641
641
|
const a = o.className.trim().split(/\s+/).filter(Boolean);
|
|
642
642
|
if (a.length > 0) {
|
|
643
|
-
const s = a.filter((
|
|
643
|
+
const s = a.filter((p) => /^[a-zA-Z][\w-]*$/.test(p)).slice(0, 2).map((p) => `.${p}`).join("");
|
|
644
644
|
s && (i += s);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
@@ -648,11 +648,11 @@ function Ye(e) {
|
|
|
648
648
|
const a = o.parentElement;
|
|
649
649
|
if (a) {
|
|
650
650
|
const s = Array.from(a.children).filter(
|
|
651
|
-
(
|
|
651
|
+
(p) => p.nodeName === o.nodeName
|
|
652
652
|
);
|
|
653
653
|
if (s.length > 1) {
|
|
654
|
-
const
|
|
655
|
-
i += `:nth-child(${
|
|
654
|
+
const p = s.indexOf(o) + 1;
|
|
655
|
+
i += `:nth-child(${p})`;
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
}
|
|
@@ -660,87 +660,84 @@ function Ye(e) {
|
|
|
660
660
|
}
|
|
661
661
|
return t.join(" > ");
|
|
662
662
|
}
|
|
663
|
-
const
|
|
664
|
-
function
|
|
665
|
-
if (typeof window > "u") return { x:
|
|
666
|
-
const i = o, a = o, s = window.innerWidth - o,
|
|
663
|
+
const Gr = "[data-review-layer-root]", Hr = 16;
|
|
664
|
+
function Fe(r, t, o = Hr) {
|
|
665
|
+
if (typeof window > "u") return { x: r, y: t };
|
|
666
|
+
const i = o, a = o, s = window.innerWidth - o, p = window.innerHeight - o;
|
|
667
667
|
return {
|
|
668
|
-
x: Math.max(i, Math.min(s,
|
|
669
|
-
y: Math.max(a, Math.min(
|
|
668
|
+
x: Math.max(i, Math.min(s, r)),
|
|
669
|
+
y: Math.max(a, Math.min(p, t))
|
|
670
670
|
};
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function cr(r) {
|
|
673
673
|
var t;
|
|
674
|
-
if (typeof document > "u" || !(
|
|
674
|
+
if (typeof document > "u" || !(r != null && r.trim())) return null;
|
|
675
675
|
try {
|
|
676
|
-
const o = document.querySelector(
|
|
677
|
-
return !o || (t = o.closest) != null && t.call(o,
|
|
676
|
+
const o = document.querySelector(r);
|
|
677
|
+
return !o || (t = o.closest) != null && t.call(o, Gr) ? null : o.getBoundingClientRect();
|
|
678
678
|
} catch {
|
|
679
679
|
return null;
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function Xr(r) {
|
|
683
683
|
if (typeof window > "u")
|
|
684
684
|
return { relativeX: 0, relativeY: 0 };
|
|
685
685
|
const t = window.innerWidth, o = window.innerHeight;
|
|
686
686
|
return {
|
|
687
|
-
relativeX: t > 0 ?
|
|
688
|
-
relativeY: o > 0 ?
|
|
687
|
+
relativeX: t > 0 ? r.left / t : 0,
|
|
688
|
+
relativeY: o > 0 ? r.top / o : 0
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function dr(r) {
|
|
692
692
|
if (typeof window > "u")
|
|
693
693
|
return {
|
|
694
|
-
x:
|
|
695
|
-
y:
|
|
694
|
+
x: r.x ?? 0,
|
|
695
|
+
y: r.y ?? 0
|
|
696
696
|
};
|
|
697
|
-
const t =
|
|
697
|
+
const t = r.relativeX ?? r.relative_x ?? null, o = r.relativeY ?? r.relative_y ?? null;
|
|
698
698
|
return t != null && o != null ? {
|
|
699
699
|
x: t * window.innerWidth,
|
|
700
700
|
y: o * window.innerHeight
|
|
701
701
|
} : {
|
|
702
|
-
x:
|
|
703
|
-
y:
|
|
702
|
+
x: r.x ?? 0,
|
|
703
|
+
y: r.y ?? 0
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
|
-
function
|
|
707
|
-
const { x: t, y: o } =
|
|
706
|
+
function Jr(r) {
|
|
707
|
+
const { x: t, y: o } = dr(r), i = r.width ?? 100, a = r.height ?? 40;
|
|
708
708
|
return new DOMRect(t, o, i, a);
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
const i = ce(e.selector);
|
|
716
|
-
if (i != null)
|
|
717
|
-
return { x: i.left, y: i.top };
|
|
710
|
+
function we(r) {
|
|
711
|
+
if (r.selector) {
|
|
712
|
+
const t = cr(r.selector);
|
|
713
|
+
if (t != null)
|
|
714
|
+
return { x: t.left, y: t.top };
|
|
718
715
|
}
|
|
719
|
-
return
|
|
716
|
+
return dr(r);
|
|
720
717
|
}
|
|
721
|
-
const
|
|
718
|
+
const C = {
|
|
722
719
|
PENDING: "pending",
|
|
723
720
|
DEV_FIXED: "dev_fixed",
|
|
724
721
|
VALIDATED: "validated"
|
|
725
722
|
};
|
|
726
|
-
function
|
|
723
|
+
function ce(r) {
|
|
727
724
|
return {
|
|
728
725
|
"Content-Type": "application/json",
|
|
729
|
-
"x-review-key":
|
|
726
|
+
"x-review-key": r
|
|
730
727
|
};
|
|
731
728
|
}
|
|
732
|
-
async function
|
|
733
|
-
const i = await fetch(`${
|
|
734
|
-
headers:
|
|
729
|
+
async function qr(r, t, o) {
|
|
730
|
+
const i = await fetch(`${r}/reviewers`, {
|
|
731
|
+
headers: ce(t),
|
|
735
732
|
signal: o == null ? void 0 : o.signal
|
|
736
733
|
});
|
|
737
734
|
if (!i.ok) throw new Error("Failed to fetch reviewers");
|
|
738
735
|
return (await i.json()).data ?? [];
|
|
739
736
|
}
|
|
740
|
-
async function
|
|
741
|
-
const i = await fetch(`${
|
|
737
|
+
async function Zr(r, t, o) {
|
|
738
|
+
const i = await fetch(`${r}/comments`, {
|
|
742
739
|
method: "POST",
|
|
743
|
-
headers:
|
|
740
|
+
headers: ce(t),
|
|
744
741
|
body: JSON.stringify(o)
|
|
745
742
|
});
|
|
746
743
|
if (!i.ok) {
|
|
@@ -749,30 +746,30 @@ async function qe(e, t, o) {
|
|
|
749
746
|
}
|
|
750
747
|
return (await i.json()).data;
|
|
751
748
|
}
|
|
752
|
-
async function
|
|
753
|
-
const a = new URLSearchParams({ url: o }), s = await fetch(`${
|
|
754
|
-
headers:
|
|
749
|
+
async function Qr(r, t, o, i) {
|
|
750
|
+
const a = new URLSearchParams({ url: o }), s = await fetch(`${r}/comments?${a}`, {
|
|
751
|
+
headers: ce(t),
|
|
755
752
|
signal: i == null ? void 0 : i.signal
|
|
756
753
|
});
|
|
757
754
|
if (!s.ok) throw new Error("Failed to fetch comments");
|
|
758
755
|
return (await s.json()).data ?? [];
|
|
759
756
|
}
|
|
760
|
-
async function
|
|
761
|
-
const a = await fetch(`${
|
|
757
|
+
async function Kr(r, t, o, i) {
|
|
758
|
+
const a = await fetch(`${r}/comments/${o}/status`, {
|
|
762
759
|
method: "PATCH",
|
|
763
|
-
headers:
|
|
760
|
+
headers: ce(t),
|
|
764
761
|
body: JSON.stringify({ status: i })
|
|
765
762
|
});
|
|
766
763
|
if (!a.ok) {
|
|
767
|
-
const
|
|
768
|
-
throw new Error(
|
|
764
|
+
const p = await a.json().catch(() => ({}));
|
|
765
|
+
throw new Error(p.message || "Failed to update comment status");
|
|
769
766
|
}
|
|
770
767
|
return (await a.json()).data;
|
|
771
768
|
}
|
|
772
|
-
async function
|
|
773
|
-
const i = await fetch(`${
|
|
769
|
+
async function eo(r, t, o) {
|
|
770
|
+
const i = await fetch(`${r}/comments/${o}`, {
|
|
774
771
|
method: "DELETE",
|
|
775
|
-
headers:
|
|
772
|
+
headers: ce(t)
|
|
776
773
|
});
|
|
777
774
|
if (!i.ok) {
|
|
778
775
|
const a = await i.json().catch(() => ({}));
|
|
@@ -784,7 +781,7 @@ const ro = {
|
|
|
784
781
|
inset: 0,
|
|
785
782
|
zIndex: 999997,
|
|
786
783
|
backgroundColor: "transparent"
|
|
787
|
-
},
|
|
784
|
+
}, oo = {
|
|
788
785
|
position: "fixed",
|
|
789
786
|
minWidth: 320,
|
|
790
787
|
maxWidth: 400,
|
|
@@ -794,7 +791,7 @@ const ro = {
|
|
|
794
791
|
borderRadius: "var(--ui-radius_8, 8px)",
|
|
795
792
|
boxShadow: "0 8px 24px var(--ui-color-black-alpha-20, rgba(0,0,0,0.15))",
|
|
796
793
|
zIndex: 999998
|
|
797
|
-
},
|
|
794
|
+
}, to = {
|
|
798
795
|
width: "100%",
|
|
799
796
|
minHeight: 80,
|
|
800
797
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
|
|
@@ -805,14 +802,14 @@ const ro = {
|
|
|
805
802
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
806
803
|
resize: "vertical",
|
|
807
804
|
boxSizing: "border-box"
|
|
808
|
-
},
|
|
805
|
+
}, no = {
|
|
809
806
|
width: "100%",
|
|
810
807
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
|
|
811
808
|
marginBottom: "var(--ui-positive-Value_300, 12px)",
|
|
812
809
|
border: "1px solid var(--ui-color-border-default, #d9d9d9)",
|
|
813
810
|
borderRadius: "var(--ui-radius_6, 6px)",
|
|
814
811
|
fontSize: "var(--ui-font-size-sm, 14px)"
|
|
815
|
-
},
|
|
812
|
+
}, tr = {
|
|
816
813
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_400, 16px)",
|
|
817
814
|
backgroundColor: "var(--ui-color-bg-fill-danger-default, #ff4d4f)",
|
|
818
815
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
@@ -823,55 +820,59 @@ const ro = {
|
|
|
823
820
|
fontWeight: "var(--ui-font-weight-medium, 500)"
|
|
824
821
|
};
|
|
825
822
|
function io({
|
|
826
|
-
apiUrl:
|
|
823
|
+
apiUrl: r,
|
|
827
824
|
apiKey: t,
|
|
828
825
|
reviewers: o,
|
|
829
826
|
position: i,
|
|
830
827
|
payload: a,
|
|
831
828
|
onClose: s,
|
|
832
|
-
onSuccess:
|
|
829
|
+
onSuccess: p
|
|
833
830
|
}) {
|
|
834
|
-
var
|
|
835
|
-
const [g, d] =
|
|
836
|
-
((
|
|
837
|
-
), [y, P] =
|
|
838
|
-
|
|
839
|
-
o.length > 0 && !w &&
|
|
831
|
+
var z;
|
|
832
|
+
const [g, d] = F(""), [w, h] = F(
|
|
833
|
+
((z = o[0]) == null ? void 0 : z.id) ?? 0
|
|
834
|
+
), [y, P] = F(!1), [k, V] = F(null);
|
|
835
|
+
A(() => {
|
|
836
|
+
o.length > 0 && !w && h(o[0].id);
|
|
840
837
|
}, [o, w]);
|
|
841
838
|
const $ = j(
|
|
842
839
|
async (c) => {
|
|
843
840
|
if (c.preventDefault(), !(!g.trim() || !w)) {
|
|
844
841
|
P(!0), V(null);
|
|
845
842
|
try {
|
|
846
|
-
await
|
|
843
|
+
await Zr(r, t, {
|
|
847
844
|
...a,
|
|
848
845
|
message: g.trim(),
|
|
849
846
|
reviewerId: w
|
|
850
|
-
}),
|
|
851
|
-
} catch (
|
|
852
|
-
V(
|
|
847
|
+
}), p(), s();
|
|
848
|
+
} catch (f) {
|
|
849
|
+
V(f instanceof Error ? f.message : "Failed to send comment");
|
|
853
850
|
} finally {
|
|
854
851
|
P(!1);
|
|
855
852
|
}
|
|
856
853
|
}
|
|
857
854
|
},
|
|
858
|
-
[
|
|
855
|
+
[r, t, a, g, w, p, s]
|
|
859
856
|
);
|
|
860
|
-
return
|
|
857
|
+
return A(() => {
|
|
858
|
+
const c = (f) => {
|
|
859
|
+
f.key === "Escape" && (f.preventDefault(), s());
|
|
860
|
+
};
|
|
861
|
+
return document.addEventListener("keydown", c, !0), () => document.removeEventListener("keydown", c, !0);
|
|
862
|
+
}, [s]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
861
863
|
/* @__PURE__ */ l.jsx(
|
|
862
864
|
"div",
|
|
863
865
|
{
|
|
864
866
|
role: "presentation",
|
|
865
867
|
style: ro,
|
|
866
|
-
onClick: s
|
|
867
|
-
onKeyDown: (c) => c.key === "Escape" && s()
|
|
868
|
+
onClick: s
|
|
868
869
|
}
|
|
869
870
|
),
|
|
870
871
|
/* @__PURE__ */ l.jsx(
|
|
871
872
|
"div",
|
|
872
873
|
{
|
|
873
874
|
style: {
|
|
874
|
-
...
|
|
875
|
+
...oo,
|
|
875
876
|
left: Math.min(i.x, typeof window < "u" ? window.innerWidth - 420 : i.x),
|
|
876
877
|
top: i.y + 12
|
|
877
878
|
},
|
|
@@ -883,7 +884,7 @@ function io({
|
|
|
883
884
|
placeholder: "Escribe tu comentario...",
|
|
884
885
|
value: g,
|
|
885
886
|
onChange: (c) => d(c.target.value),
|
|
886
|
-
style:
|
|
887
|
+
style: to,
|
|
887
888
|
required: !0,
|
|
888
889
|
autoFocus: !0
|
|
889
890
|
}
|
|
@@ -892,8 +893,8 @@ function io({
|
|
|
892
893
|
"select",
|
|
893
894
|
{
|
|
894
895
|
value: w,
|
|
895
|
-
onChange: (c) =>
|
|
896
|
-
style:
|
|
896
|
+
onChange: (c) => h(Number(c.target.value)),
|
|
897
|
+
style: no,
|
|
897
898
|
required: !0,
|
|
898
899
|
disabled: o.length === 0,
|
|
899
900
|
children: [
|
|
@@ -902,7 +903,7 @@ function io({
|
|
|
902
903
|
]
|
|
903
904
|
}
|
|
904
905
|
),
|
|
905
|
-
|
|
906
|
+
k && /* @__PURE__ */ l.jsx(
|
|
906
907
|
"div",
|
|
907
908
|
{
|
|
908
909
|
style: {
|
|
@@ -910,59 +911,74 @@ function io({
|
|
|
910
911
|
fontSize: "var(--ui-font-size-xs, 12px)",
|
|
911
912
|
marginBottom: "var(--ui-positive-Value_200, 8px)"
|
|
912
913
|
},
|
|
913
|
-
children:
|
|
914
|
+
children: k
|
|
914
915
|
}
|
|
915
916
|
),
|
|
916
|
-
/* @__PURE__ */ l.
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
917
|
+
/* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: "var(--ui-positive-Value_200, 8px)" }, children: [
|
|
918
|
+
/* @__PURE__ */ l.jsx(
|
|
919
|
+
"button",
|
|
920
|
+
{
|
|
921
|
+
type: "button",
|
|
922
|
+
onClick: s,
|
|
923
|
+
style: {
|
|
924
|
+
...tr,
|
|
925
|
+
backgroundColor: "var(--ui-color-bg-fill-secondary-default, #f0f0f0)",
|
|
926
|
+
color: "var(--ui-color-text-primary, #333)"
|
|
927
|
+
},
|
|
928
|
+
children: "Cancelar"
|
|
929
|
+
}
|
|
930
|
+
),
|
|
931
|
+
/* @__PURE__ */ l.jsx(
|
|
932
|
+
"button",
|
|
933
|
+
{
|
|
934
|
+
type: "submit",
|
|
935
|
+
style: tr,
|
|
936
|
+
disabled: y || o.length === 0,
|
|
937
|
+
children: y ? "Enviando..." : "Enviar comentario"
|
|
938
|
+
}
|
|
939
|
+
)
|
|
940
|
+
] })
|
|
925
941
|
] })
|
|
926
942
|
}
|
|
927
943
|
)
|
|
928
944
|
] });
|
|
929
945
|
}
|
|
930
|
-
const ao =
|
|
931
|
-
function lo(
|
|
946
|
+
const ao = Re(io), uo = "var(--ui-color-red-500, #ef4444)";
|
|
947
|
+
function lo(r) {
|
|
932
948
|
return {
|
|
933
949
|
position: "fixed",
|
|
934
|
-
outline: `2px solid ${
|
|
950
|
+
outline: `2px solid ${r}`,
|
|
935
951
|
outlineOffset: "var(--ui-positive-Value_200, 2px)",
|
|
936
952
|
pointerEvents: "none",
|
|
937
953
|
zIndex: 999997,
|
|
938
954
|
boxSizing: "border-box"
|
|
939
955
|
};
|
|
940
956
|
}
|
|
941
|
-
const so =
|
|
957
|
+
const so = Re(function({
|
|
942
958
|
selector: t,
|
|
943
959
|
active: o,
|
|
944
960
|
fallbackComment: i,
|
|
945
961
|
outlineColor: a = uo
|
|
946
962
|
}) {
|
|
947
|
-
const [s,
|
|
963
|
+
const [s, p] = F(null), g = j(() => {
|
|
948
964
|
if (!o) {
|
|
949
|
-
|
|
965
|
+
p(null);
|
|
950
966
|
return;
|
|
951
967
|
}
|
|
952
|
-
const d = t != null && t.trim() ?
|
|
968
|
+
const d = t != null && t.trim() ? cr(t) : null;
|
|
953
969
|
if (d) {
|
|
954
|
-
|
|
970
|
+
p(d);
|
|
955
971
|
return;
|
|
956
972
|
}
|
|
957
973
|
if (i) {
|
|
958
|
-
|
|
974
|
+
p(Jr(i));
|
|
959
975
|
return;
|
|
960
976
|
}
|
|
961
|
-
|
|
977
|
+
p(null);
|
|
962
978
|
}, [t, o, i]);
|
|
963
|
-
return
|
|
979
|
+
return A(() => {
|
|
964
980
|
g();
|
|
965
|
-
}, [g]),
|
|
981
|
+
}, [g]), A(() => {
|
|
966
982
|
if (o)
|
|
967
983
|
return window.addEventListener("scroll", g, !0), window.addEventListener("resize", g), () => {
|
|
968
984
|
window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g);
|
|
@@ -980,7 +996,7 @@ const so = Rr(function({
|
|
|
980
996
|
}
|
|
981
997
|
}
|
|
982
998
|
);
|
|
983
|
-
}),
|
|
999
|
+
}), _e = 32, nr = 150, Oe = 250, B = {
|
|
984
1000
|
cardBg: "var(--ui-color-bg-surface-default, #ffffff)",
|
|
985
1001
|
cardFooterBg: "var(--ui-color-bg-surface-secondary-default, #f8fafc)",
|
|
986
1002
|
textDark: "var(--ui-color-text-primary, #333333)",
|
|
@@ -988,36 +1004,36 @@ const so = Rr(function({
|
|
|
988
1004
|
border: "var(--ui-color-border-default, #cccccc)",
|
|
989
1005
|
shadow: "var(--ui-shadow-card, 0 4px 16px rgba(0, 0, 0, 0.12))"
|
|
990
1006
|
}, co = {
|
|
991
|
-
[
|
|
992
|
-
[
|
|
993
|
-
[
|
|
1007
|
+
[C.PENDING]: "Pendiente",
|
|
1008
|
+
[C.DEV_FIXED]: "Corregido",
|
|
1009
|
+
[C.VALIDATED]: "Validado"
|
|
994
1010
|
}, fo = {
|
|
995
|
-
[
|
|
996
|
-
[
|
|
997
|
-
[
|
|
998
|
-
},
|
|
999
|
-
[
|
|
1000
|
-
[
|
|
1001
|
-
[
|
|
1002
|
-
},
|
|
1003
|
-
[
|
|
1004
|
-
[
|
|
1005
|
-
[
|
|
1006
|
-
},
|
|
1007
|
-
[
|
|
1008
|
-
[
|
|
1009
|
-
[
|
|
1011
|
+
[C.PENDING]: "PENDIENTE",
|
|
1012
|
+
[C.DEV_FIXED]: "CORREGIDO",
|
|
1013
|
+
[C.VALIDATED]: "VALIDADO"
|
|
1014
|
+
}, ee = {
|
|
1015
|
+
[C.PENDING]: "var(--ui-color-red-500, rgb(240, 69, 69))",
|
|
1016
|
+
[C.DEV_FIXED]: "var(--ui-color-yellow-500, rgb(235, 179, 8))",
|
|
1017
|
+
[C.VALIDATED]: "var(--ui-color-green-500, rgb(33, 196, 94))"
|
|
1018
|
+
}, ir = {
|
|
1019
|
+
[C.PENDING]: "var(--ui-color-bg-surface-danger-default, #fef2f2)",
|
|
1020
|
+
[C.DEV_FIXED]: "var(--ui-color-bg-surface-warning-default, #fffbeb)",
|
|
1021
|
+
[C.VALIDATED]: "var(--ui-color-bg-surface-success-default, #f0fdf4)"
|
|
1022
|
+
}, Ee = {
|
|
1023
|
+
[C.PENDING]: "var(--ui-color-red-500, #ef4444)",
|
|
1024
|
+
[C.DEV_FIXED]: "var(--ui-color-orange-500, #f59e0b)",
|
|
1025
|
+
[C.VALIDATED]: "var(--ui-color-green-500, #22c55e)"
|
|
1010
1026
|
};
|
|
1011
|
-
function vo(
|
|
1012
|
-
const t =
|
|
1013
|
-
return t.length >= 2 ? (t[0][0] + t[t.length - 1][0]).toUpperCase() :
|
|
1027
|
+
function vo(r) {
|
|
1028
|
+
const t = r.trim().split(/\s+/);
|
|
1029
|
+
return t.length >= 2 ? (t[0][0] + t[t.length - 1][0]).toUpperCase() : r.slice(0, 2).toUpperCase() || "?";
|
|
1014
1030
|
}
|
|
1015
|
-
const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: { marginRight: 4, flexShrink: 0 }, children: /* @__PURE__ */ l.jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), go = ({ color:
|
|
1031
|
+
const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: { marginRight: 4, flexShrink: 0 }, children: /* @__PURE__ */ l.jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), go = ({ color: r }) => /* @__PURE__ */ l.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", style: { flexShrink: 0 }, children: [
|
|
1016
1032
|
/* @__PURE__ */ l.jsx(
|
|
1017
1033
|
"path",
|
|
1018
1034
|
{
|
|
1019
1035
|
d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z",
|
|
1020
|
-
stroke:
|
|
1036
|
+
stroke: r,
|
|
1021
1037
|
strokeWidth: "2",
|
|
1022
1038
|
strokeLinecap: "round",
|
|
1023
1039
|
strokeLinejoin: "round",
|
|
@@ -1033,12 +1049,12 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1033
1049
|
strokeLinecap: "round"
|
|
1034
1050
|
}
|
|
1035
1051
|
)
|
|
1036
|
-
] }), bo = (
|
|
1052
|
+
] }), bo = (r) => ({
|
|
1037
1053
|
position: "fixed",
|
|
1038
|
-
width:
|
|
1039
|
-
height:
|
|
1054
|
+
width: _e,
|
|
1055
|
+
height: _e,
|
|
1040
1056
|
borderRadius: "50%",
|
|
1041
|
-
backgroundColor:
|
|
1057
|
+
backgroundColor: ee[r] ?? ee[C.PENDING],
|
|
1042
1058
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
1043
1059
|
display: "flex",
|
|
1044
1060
|
alignItems: "center",
|
|
@@ -1050,9 +1066,9 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1050
1066
|
border: "2px solid var(--ui-color-white, #fff)"
|
|
1051
1067
|
}), ho = {
|
|
1052
1068
|
position: "fixed",
|
|
1053
|
-
width:
|
|
1054
|
-
minWidth:
|
|
1055
|
-
maxWidth:
|
|
1069
|
+
width: Oe,
|
|
1070
|
+
minWidth: Oe,
|
|
1071
|
+
maxWidth: Oe,
|
|
1056
1072
|
boxSizing: "border-box",
|
|
1057
1073
|
backgroundColor: B.cardBg,
|
|
1058
1074
|
borderRadius: "var(--ui-radius_12, 12px)",
|
|
@@ -1068,11 +1084,11 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1068
1084
|
gap: "var(--ui-positive-Value_250, 10px)",
|
|
1069
1085
|
borderBottom: `1px solid ${B.border}`,
|
|
1070
1086
|
padding: "var(--ui-positive-Value_300, 12px)"
|
|
1071
|
-
}, yo = (
|
|
1087
|
+
}, yo = (r) => ({
|
|
1072
1088
|
width: 40,
|
|
1073
1089
|
height: 40,
|
|
1074
1090
|
borderRadius: "50%",
|
|
1075
|
-
backgroundColor:
|
|
1091
|
+
backgroundColor: ee[r] ?? ee[C.PENDING],
|
|
1076
1092
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
1077
1093
|
border: "2px solid var(--ui-color-white, #fff)",
|
|
1078
1094
|
display: "flex",
|
|
@@ -1082,14 +1098,14 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1082
1098
|
fontWeight: "var(--ui-font-weight-bold, 700)",
|
|
1083
1099
|
flexShrink: 0,
|
|
1084
1100
|
overflow: "hidden"
|
|
1085
|
-
}), mo =
|
|
1101
|
+
}), mo = Re(function({
|
|
1086
1102
|
reviewer: t,
|
|
1087
1103
|
status: o
|
|
1088
1104
|
}) {
|
|
1089
1105
|
const i = t == null ? void 0 : t.image_url, a = (t == null ? void 0 : t.name) ?? "Revisor", s = yo(o);
|
|
1090
1106
|
if (i && i.trim()) {
|
|
1091
|
-
const
|
|
1092
|
-
return /* @__PURE__ */ l.jsx("div", { style: { ...s, border: `2px solid ${
|
|
1107
|
+
const p = ee[o] ?? ee[C.PENDING];
|
|
1108
|
+
return /* @__PURE__ */ l.jsx("div", { style: { ...s, border: `2px solid ${p}` }, children: /* @__PURE__ */ l.jsx(
|
|
1093
1109
|
"img",
|
|
1094
1110
|
{
|
|
1095
1111
|
src: i,
|
|
@@ -1119,8 +1135,8 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1119
1135
|
display: "flex",
|
|
1120
1136
|
alignItems: "center",
|
|
1121
1137
|
justifyContent: "center"
|
|
1122
|
-
}, _o = (
|
|
1123
|
-
const t =
|
|
1138
|
+
}, _o = (r) => {
|
|
1139
|
+
const t = Ee[r] ?? Ee[C.PENDING];
|
|
1124
1140
|
return {
|
|
1125
1141
|
display: "inline-flex",
|
|
1126
1142
|
alignItems: "center",
|
|
@@ -1131,7 +1147,7 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1131
1147
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1132
1148
|
textTransform: "uppercase",
|
|
1133
1149
|
letterSpacing: "0.02em",
|
|
1134
|
-
backgroundColor:
|
|
1150
|
+
backgroundColor: ir[r] ?? ir[C.PENDING],
|
|
1135
1151
|
color: t,
|
|
1136
1152
|
border: `1px solid ${t}`
|
|
1137
1153
|
};
|
|
@@ -1166,7 +1182,7 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1166
1182
|
padding: "var(--ui-positive-Value_300, 12px)",
|
|
1167
1183
|
borderTop: `1px solid ${B.border}`,
|
|
1168
1184
|
backgroundColor: B.cardFooterBg
|
|
1169
|
-
},
|
|
1185
|
+
}, fr = {
|
|
1170
1186
|
minWidth: 100,
|
|
1171
1187
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_350, 14px)",
|
|
1172
1188
|
fontSize: "var(--ui-font-size-xs, 13px)",
|
|
@@ -1175,53 +1191,53 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1175
1191
|
borderRadius: "var(--ui-radius_8, 8px)",
|
|
1176
1192
|
cursor: "pointer",
|
|
1177
1193
|
border: "none"
|
|
1178
|
-
},
|
|
1179
|
-
...
|
|
1194
|
+
}, ko = {
|
|
1195
|
+
...fr,
|
|
1180
1196
|
backgroundColor: "transparent",
|
|
1181
1197
|
color: B.textDark
|
|
1182
|
-
},
|
|
1198
|
+
}, ye = "review-layer-resolve-btn", Co = [
|
|
1183
1199
|
"pending",
|
|
1184
1200
|
"dev_fixed",
|
|
1185
1201
|
"validated"
|
|
1186
1202
|
], Po = {
|
|
1187
|
-
...
|
|
1203
|
+
...fr,
|
|
1188
1204
|
backgroundColor: "var(--ui-color-bg-fill-success-default, #22c55e)",
|
|
1189
1205
|
color: "var(--ui-color-text-on-color, #fff)"
|
|
1190
1206
|
};
|
|
1191
1207
|
function jo({
|
|
1192
|
-
comment:
|
|
1208
|
+
comment: r,
|
|
1193
1209
|
offset: t = { dx: 0, dy: 0 },
|
|
1194
1210
|
apiUrl: o,
|
|
1195
1211
|
apiKey: i,
|
|
1196
1212
|
onStatusChange: a,
|
|
1197
1213
|
reviewMode: s = !1
|
|
1198
1214
|
}) {
|
|
1199
|
-
var
|
|
1200
|
-
const [
|
|
1201
|
-
y(
|
|
1202
|
-
}, [
|
|
1203
|
-
|
|
1215
|
+
var ne, ie;
|
|
1216
|
+
const [p, g] = F(!1), [d, w] = F(!1), [h, y] = F(() => we(r)), [P, k] = F(!1), [V, $] = F(null), z = me(null), c = me(null), f = me(null), I = j(() => {
|
|
1217
|
+
y(we(r));
|
|
1218
|
+
}, [r]);
|
|
1219
|
+
A(() => {
|
|
1204
1220
|
I();
|
|
1205
|
-
}, [I]),
|
|
1221
|
+
}, [I]), A(() => {
|
|
1206
1222
|
if (!(typeof window > "u"))
|
|
1207
1223
|
return window.addEventListener("scroll", I, !0), window.addEventListener("resize", I), () => {
|
|
1208
1224
|
window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I);
|
|
1209
1225
|
};
|
|
1210
1226
|
}, [I]);
|
|
1211
1227
|
const N = j(() => {
|
|
1212
|
-
|
|
1228
|
+
z.current !== null && (clearTimeout(z.current), z.current = null);
|
|
1213
1229
|
}, []), H = j(() => {
|
|
1214
1230
|
s || (N(), g(!0));
|
|
1215
|
-
}, [s, N]),
|
|
1216
|
-
d || (
|
|
1217
|
-
|
|
1218
|
-
},
|
|
1219
|
-
}, [d]),
|
|
1231
|
+
}, [s, N]), re = j(() => {
|
|
1232
|
+
d || (z.current = setTimeout(() => {
|
|
1233
|
+
z.current = null, g(!1);
|
|
1234
|
+
}, nr));
|
|
1235
|
+
}, [d]), oe = j(() => {
|
|
1220
1236
|
N(), g(!0);
|
|
1221
|
-
}, [N]),
|
|
1222
|
-
d || (
|
|
1223
|
-
|
|
1224
|
-
},
|
|
1237
|
+
}, [N]), te = j(() => {
|
|
1238
|
+
d || (z.current = setTimeout(() => {
|
|
1239
|
+
z.current = null, g(!1);
|
|
1240
|
+
}, nr));
|
|
1225
1241
|
}, [d]), X = j(() => {
|
|
1226
1242
|
if (s) {
|
|
1227
1243
|
d && (w(!1), g(!1));
|
|
@@ -1229,54 +1245,54 @@ function jo({
|
|
|
1229
1245
|
}
|
|
1230
1246
|
d ? (w(!1), g(!1)) : (w(!0), g(!0));
|
|
1231
1247
|
}, [s, d]);
|
|
1232
|
-
|
|
1248
|
+
A(() => {
|
|
1233
1249
|
if (!d) return;
|
|
1234
1250
|
const _ = (q) => {
|
|
1235
|
-
var
|
|
1236
|
-
const
|
|
1237
|
-
(
|
|
1251
|
+
var ve, pe;
|
|
1252
|
+
const ae = q.target;
|
|
1253
|
+
(ve = c.current) != null && ve.contains(ae) || (pe = f.current) != null && pe.contains(ae) || (w(!1), g(!1));
|
|
1238
1254
|
};
|
|
1239
1255
|
return document.addEventListener("mousedown", _, !0), () => document.removeEventListener("mousedown", _, !0);
|
|
1240
|
-
}, [d]),
|
|
1256
|
+
}, [d]), A(() => () => N(), [N]), A(() => {
|
|
1241
1257
|
s && (w(!1), g(!1));
|
|
1242
1258
|
}, [s]);
|
|
1243
|
-
const m =
|
|
1259
|
+
const m = h.x + t.dx, R = h.y + t.dy, { x: O, y: T } = Fe(m, R, _e / 2), G = p && !d, Y = j(() => {
|
|
1244
1260
|
w(!1), g(!1);
|
|
1245
1261
|
}, []), J = j(
|
|
1246
1262
|
async (_) => {
|
|
1247
|
-
if (_ !==
|
|
1248
|
-
$(null),
|
|
1263
|
+
if (_ !== r.status) {
|
|
1264
|
+
$(null), k(!0);
|
|
1249
1265
|
try {
|
|
1250
|
-
await
|
|
1266
|
+
await Kr(o, i, r.id, _), a();
|
|
1251
1267
|
} catch (q) {
|
|
1252
1268
|
$(q instanceof Error ? q.message : "Error al actualizar");
|
|
1253
1269
|
} finally {
|
|
1254
|
-
|
|
1270
|
+
k(!1);
|
|
1255
1271
|
}
|
|
1256
1272
|
}
|
|
1257
1273
|
},
|
|
1258
|
-
[o, i,
|
|
1259
|
-
),
|
|
1260
|
-
$(null),
|
|
1274
|
+
[o, i, r.id, r.status, a]
|
|
1275
|
+
), de = j(async () => {
|
|
1276
|
+
$(null), k(!0);
|
|
1261
1277
|
try {
|
|
1262
|
-
await
|
|
1278
|
+
await eo(o, i, r.id), a(), Y();
|
|
1263
1279
|
} catch (_) {
|
|
1264
1280
|
$(_ instanceof Error ? _.message : "Error al eliminar");
|
|
1265
1281
|
} finally {
|
|
1266
|
-
|
|
1282
|
+
k(!1);
|
|
1267
1283
|
}
|
|
1268
|
-
}, [o, i,
|
|
1269
|
-
() => ({ ...bo(
|
|
1270
|
-
[
|
|
1284
|
+
}, [o, i, r.id, a, Y]), fe = Ne(
|
|
1285
|
+
() => ({ ...bo(r.status), left: O, top: T, transform: "translate(-50%, -50%)" }),
|
|
1286
|
+
[r.status, O, T]
|
|
1271
1287
|
);
|
|
1272
1288
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1273
1289
|
/* @__PURE__ */ l.jsx(
|
|
1274
1290
|
so,
|
|
1275
1291
|
{
|
|
1276
|
-
selector:
|
|
1292
|
+
selector: r.selector,
|
|
1277
1293
|
active: G,
|
|
1278
|
-
fallbackComment:
|
|
1279
|
-
outlineColor:
|
|
1294
|
+
fallbackComment: r,
|
|
1295
|
+
outlineColor: Ee[r.status] ?? Ee[C.PENDING]
|
|
1280
1296
|
}
|
|
1281
1297
|
),
|
|
1282
1298
|
/* @__PURE__ */ l.jsx(
|
|
@@ -1285,46 +1301,46 @@ function jo({
|
|
|
1285
1301
|
ref: c,
|
|
1286
1302
|
role: "button",
|
|
1287
1303
|
tabIndex: 0,
|
|
1288
|
-
"aria-label": `Comentario: ${
|
|
1289
|
-
"aria-expanded":
|
|
1290
|
-
style:
|
|
1304
|
+
"aria-label": `Comentario: ${r.message.slice(0, 30)}...`,
|
|
1305
|
+
"aria-expanded": p,
|
|
1306
|
+
style: fe,
|
|
1291
1307
|
onMouseEnter: H,
|
|
1292
|
-
onMouseLeave:
|
|
1308
|
+
onMouseLeave: re,
|
|
1293
1309
|
onClick: X,
|
|
1294
1310
|
children: /* @__PURE__ */ l.jsx(go, { color: "var(--ui-color-white, #fff)" })
|
|
1295
1311
|
}
|
|
1296
1312
|
),
|
|
1297
|
-
|
|
1313
|
+
p && /* @__PURE__ */ l.jsxs(
|
|
1298
1314
|
"div",
|
|
1299
1315
|
{
|
|
1300
|
-
ref:
|
|
1316
|
+
ref: f,
|
|
1301
1317
|
role: "dialog",
|
|
1302
1318
|
"aria-label": "Detalle del comentario",
|
|
1303
1319
|
style: {
|
|
1304
1320
|
...ho,
|
|
1305
|
-
left:
|
|
1321
|
+
left: O + _e / 2 + 6,
|
|
1306
1322
|
top: T
|
|
1307
1323
|
},
|
|
1308
|
-
onMouseEnter:
|
|
1309
|
-
onMouseLeave:
|
|
1324
|
+
onMouseEnter: oe,
|
|
1325
|
+
onMouseLeave: te,
|
|
1310
1326
|
children: [
|
|
1311
1327
|
/* @__PURE__ */ l.jsxs("div", { style: xo, children: [
|
|
1312
1328
|
/* @__PURE__ */ l.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, flex: 1, minWidth: 0 }, children: [
|
|
1313
|
-
/* @__PURE__ */ l.jsx(mo, { reviewer:
|
|
1329
|
+
/* @__PURE__ */ l.jsx(mo, { reviewer: r.reviewer, status: r.status }),
|
|
1314
1330
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
1315
|
-
/* @__PURE__ */ l.jsx("div", { style: { fontWeight: 700, fontSize: 14, color: B.textDark }, children: ((
|
|
1316
|
-
/* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: B.textMuted }, children: ((
|
|
1331
|
+
/* @__PURE__ */ l.jsx("div", { style: { fontWeight: 700, fontSize: 14, color: B.textDark }, children: ((ne = r.reviewer) == null ? void 0 : ne.name) ?? "Revisor" }),
|
|
1332
|
+
/* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: B.textMuted }, children: ((ie = r.reviewer) == null ? void 0 : ie.job_title) ?? "Revisor" })
|
|
1317
1333
|
] })
|
|
1318
1334
|
] }),
|
|
1319
1335
|
/* @__PURE__ */ l.jsx(
|
|
1320
1336
|
"button",
|
|
1321
1337
|
{
|
|
1322
1338
|
type: "button",
|
|
1323
|
-
"aria-label":
|
|
1339
|
+
"aria-label": r.status === C.VALIDATED ? "Eliminar comentario" : "Cerrar",
|
|
1324
1340
|
style: wo,
|
|
1325
1341
|
disabled: P,
|
|
1326
1342
|
onClick: (_) => {
|
|
1327
|
-
_.stopPropagation(),
|
|
1343
|
+
_.stopPropagation(), r.status === C.VALIDATED ? de() : Y();
|
|
1328
1344
|
},
|
|
1329
1345
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1330
1346
|
children: "✕"
|
|
@@ -1332,24 +1348,24 @@ function jo({
|
|
|
1332
1348
|
)
|
|
1333
1349
|
] }),
|
|
1334
1350
|
/* @__PURE__ */ l.jsxs("div", { style: { padding: 12, display: "flex", alignItems: "flex-start", flexDirection: "column", gap: 4 }, children: [
|
|
1335
|
-
/* @__PURE__ */ l.jsxs("div", { style: _o(
|
|
1336
|
-
|
|
1337
|
-
fo[
|
|
1351
|
+
/* @__PURE__ */ l.jsxs("div", { style: _o(r.status), children: [
|
|
1352
|
+
r.status === C.VALIDATED && /* @__PURE__ */ l.jsx(po, {}),
|
|
1353
|
+
fo[r.status] ?? r.status
|
|
1338
1354
|
] }),
|
|
1339
|
-
/* @__PURE__ */ l.jsx("div", { style: { color: B.textDark, lineHeight: 1.5, marginBottom: 12, marginTop: 12 }, children:
|
|
1355
|
+
/* @__PURE__ */ l.jsx("div", { style: { color: B.textDark, lineHeight: 1.5, marginBottom: 12, marginTop: 12 }, children: r.message }),
|
|
1340
1356
|
/* @__PURE__ */ l.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" }, children: [
|
|
1341
|
-
/* @__PURE__ */ l.jsx("label", { style: Eo, htmlFor: `comment-status-${
|
|
1357
|
+
/* @__PURE__ */ l.jsx("label", { style: Eo, htmlFor: `comment-status-${r.id}`, children: "Cambiar estado" }),
|
|
1342
1358
|
/* @__PURE__ */ l.jsx(
|
|
1343
1359
|
"select",
|
|
1344
1360
|
{
|
|
1345
|
-
id: `comment-status-${
|
|
1361
|
+
id: `comment-status-${r.id}`,
|
|
1346
1362
|
style: Ro,
|
|
1347
|
-
value:
|
|
1363
|
+
value: r.status,
|
|
1348
1364
|
disabled: P,
|
|
1349
1365
|
onChange: (_) => J(_.target.value),
|
|
1350
1366
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1351
1367
|
"aria-label": "Cambiar estado del comentario",
|
|
1352
|
-
children:
|
|
1368
|
+
children: Co.map((_) => /* @__PURE__ */ l.jsx("option", { value: _, children: co[_] }, _))
|
|
1353
1369
|
}
|
|
1354
1370
|
),
|
|
1355
1371
|
V && /* @__PURE__ */ l.jsx("div", { style: { marginTop: 8, fontSize: 11, color: "var(--ui-color-text-danger-default, rgb(240, 69, 69))" }, children: V })
|
|
@@ -1360,7 +1376,7 @@ function jo({
|
|
|
1360
1376
|
"button",
|
|
1361
1377
|
{
|
|
1362
1378
|
type: "button",
|
|
1363
|
-
style:
|
|
1379
|
+
style: ko,
|
|
1364
1380
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1365
1381
|
onClick: (_) => {
|
|
1366
1382
|
_.stopPropagation(), Y();
|
|
@@ -1368,15 +1384,15 @@ function jo({
|
|
|
1368
1384
|
children: "Cerrar"
|
|
1369
1385
|
}
|
|
1370
1386
|
),
|
|
1371
|
-
|
|
1387
|
+
r.status !== C.VALIDATED && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1372
1388
|
/* @__PURE__ */ l.jsx("style", { children: `
|
|
1373
|
-
.${
|
|
1389
|
+
.${ye}:hover:not(:disabled) {
|
|
1374
1390
|
background-color: var(--ui-color-bg-fill-success-hover, #16a34a) !important;
|
|
1375
1391
|
}
|
|
1376
|
-
.${
|
|
1392
|
+
.${ye}:active:not(:disabled) {
|
|
1377
1393
|
background-color: var(--ui-color-bg-fill-success-pressed, #15803d) !important;
|
|
1378
1394
|
}
|
|
1379
|
-
.${
|
|
1395
|
+
.${ye}:disabled {
|
|
1380
1396
|
background-color: var(--ui-color-bg-fill-success-default, #22c55e) !important;
|
|
1381
1397
|
opacity: 0.7;
|
|
1382
1398
|
cursor: not-allowed;
|
|
@@ -1386,7 +1402,7 @@ function jo({
|
|
|
1386
1402
|
"button",
|
|
1387
1403
|
{
|
|
1388
1404
|
type: "button",
|
|
1389
|
-
className:
|
|
1405
|
+
className: ye,
|
|
1390
1406
|
style: Po,
|
|
1391
1407
|
disabled: P,
|
|
1392
1408
|
onMouseDown: (_) => _.stopPropagation(),
|
|
@@ -1403,15 +1419,15 @@ function jo({
|
|
|
1403
1419
|
)
|
|
1404
1420
|
] });
|
|
1405
1421
|
}
|
|
1406
|
-
const Vo =
|
|
1407
|
-
function Io(
|
|
1422
|
+
const Vo = Re(jo), To = 25, Do = 36;
|
|
1423
|
+
function Io(r) {
|
|
1408
1424
|
const t = /* @__PURE__ */ new Map();
|
|
1409
|
-
for (let o = 0; o <
|
|
1410
|
-
const i =
|
|
1425
|
+
for (let o = 0; o < r.length; o++) {
|
|
1426
|
+
const i = r[o], { x: a, y: s } = we(i), { x: p, y: g } = Fe(a, s);
|
|
1411
1427
|
let d = 0;
|
|
1412
1428
|
for (let w = 0; w < o; w++) {
|
|
1413
|
-
const { x, y } =
|
|
1414
|
-
Math.hypot(
|
|
1429
|
+
const { x: h, y } = we(r[w]), { x: P, y: k } = Fe(h, y);
|
|
1430
|
+
Math.hypot(p - P, g - k) < To && d++;
|
|
1415
1431
|
}
|
|
1416
1432
|
t.set(i.id, { dx: d * Do, dy: 0 });
|
|
1417
1433
|
}
|
|
@@ -1421,23 +1437,23 @@ function Oo() {
|
|
|
1421
1437
|
return typeof window > "u" ? "" : `${window.innerWidth}x${window.innerHeight}`;
|
|
1422
1438
|
}
|
|
1423
1439
|
function Lo({
|
|
1424
|
-
apiUrl:
|
|
1440
|
+
apiUrl: r,
|
|
1425
1441
|
apiKey: t,
|
|
1426
1442
|
reviewMode: o,
|
|
1427
1443
|
setReviewMode: i,
|
|
1428
1444
|
reviewers: a,
|
|
1429
1445
|
comments: s,
|
|
1430
|
-
loadComments:
|
|
1446
|
+
loadComments: p,
|
|
1431
1447
|
commentsLoadFailed: g = !1
|
|
1432
1448
|
}) {
|
|
1433
|
-
const [d, w] =
|
|
1449
|
+
const [d, w] = F(null), h = me(null), [y, P] = F(null), k = j(() => {
|
|
1434
1450
|
d && (d.style.outline = "", d.style.outlineOffset = "", w(null));
|
|
1435
1451
|
}, [d]), V = j(() => {
|
|
1436
|
-
|
|
1452
|
+
h.current && (h.current.style.outline = "", h.current.style.outlineOffset = "", h.current = null);
|
|
1437
1453
|
}, []);
|
|
1438
|
-
|
|
1439
|
-
o || (
|
|
1440
|
-
}, [o,
|
|
1454
|
+
A(() => {
|
|
1455
|
+
o || (k(), V());
|
|
1456
|
+
}, [o, k, V]), A(() => {
|
|
1441
1457
|
if (typeof document > "u") return;
|
|
1442
1458
|
const m = document.body.style.cursor;
|
|
1443
1459
|
return y ? document.body.style.cursor = "default" : o && (document.body.style.cursor = "crosshair"), () => {
|
|
@@ -1445,34 +1461,34 @@ function Lo({
|
|
|
1445
1461
|
};
|
|
1446
1462
|
}, [o, y]);
|
|
1447
1463
|
const $ = j((m) => {
|
|
1448
|
-
var
|
|
1464
|
+
var O;
|
|
1449
1465
|
if (!m || typeof document > "u" || m === document.body || m === document.documentElement) return !0;
|
|
1450
|
-
const
|
|
1451
|
-
return
|
|
1452
|
-
}, []),
|
|
1466
|
+
const R = (O = m.tagName) == null ? void 0 : O.toUpperCase();
|
|
1467
|
+
return R === "BODY" || R === "HTML" ? !0 : m.parentElement !== document.body ? !1 : m.id === "root" || m.getAttribute("data-review-layer-host") != null || document.body.children.length === 1;
|
|
1468
|
+
}, []), z = j(
|
|
1453
1469
|
(m) => {
|
|
1454
1470
|
if (!o || y) return;
|
|
1455
|
-
const
|
|
1456
|
-
!
|
|
1471
|
+
const R = m.target.nodeType === Node.ELEMENT_NODE ? m.target : m.target.parentElement;
|
|
1472
|
+
!R || $(R) || (k(), w(R), R.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", R.style.outlineOffset = "2px");
|
|
1457
1473
|
},
|
|
1458
|
-
[o, y,
|
|
1474
|
+
[o, y, k, $]
|
|
1459
1475
|
), c = j(
|
|
1460
1476
|
(m) => {
|
|
1461
|
-
var
|
|
1477
|
+
var O;
|
|
1462
1478
|
if (y) return;
|
|
1463
|
-
const
|
|
1464
|
-
d && (!
|
|
1479
|
+
const R = m.relatedTarget;
|
|
1480
|
+
d && (!R || !d.contains(R)) && !(R && ((O = d.contains) != null && O.call(d, R))) && k();
|
|
1465
1481
|
},
|
|
1466
|
-
[d, y,
|
|
1467
|
-
),
|
|
1482
|
+
[d, y, k]
|
|
1483
|
+
), f = j(
|
|
1468
1484
|
(m) => {
|
|
1469
1485
|
if (!o || y) return;
|
|
1470
|
-
const
|
|
1471
|
-
if (!
|
|
1472
|
-
m.preventDefault(), m.stopPropagation(),
|
|
1473
|
-
const
|
|
1474
|
-
|
|
1475
|
-
const T =
|
|
1486
|
+
const R = m.target;
|
|
1487
|
+
if (!R || $(R) || R.closest("[data-review-layer-root]")) return;
|
|
1488
|
+
m.preventDefault(), m.stopPropagation(), k();
|
|
1489
|
+
const O = R;
|
|
1490
|
+
h.current = O, O.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", O.style.outlineOffset = "2px";
|
|
1491
|
+
const T = O.getBoundingClientRect(), G = Ur(R), { relativeX: Y, relativeY: J } = Xr(T);
|
|
1476
1492
|
P({
|
|
1477
1493
|
position: { x: T.left + T.width / 2, y: T.bottom },
|
|
1478
1494
|
payload: {
|
|
@@ -1490,35 +1506,42 @@ function Lo({
|
|
|
1490
1506
|
}
|
|
1491
1507
|
});
|
|
1492
1508
|
},
|
|
1493
|
-
[o, y,
|
|
1509
|
+
[o, y, k, $]
|
|
1494
1510
|
);
|
|
1495
|
-
|
|
1511
|
+
A(() => {
|
|
1496
1512
|
if (o)
|
|
1497
|
-
return document.addEventListener("mouseover",
|
|
1498
|
-
document.removeEventListener("mouseover",
|
|
1513
|
+
return document.addEventListener("mouseover", z, !0), document.addEventListener("mouseout", c, !0), document.addEventListener("click", f, !0), () => {
|
|
1514
|
+
document.removeEventListener("mouseover", z, !0), document.removeEventListener("mouseout", c, !0), document.removeEventListener("click", f, !0);
|
|
1499
1515
|
};
|
|
1500
|
-
}, [o,
|
|
1501
|
-
const [I, N] =
|
|
1502
|
-
|
|
1516
|
+
}, [o, z, c, f]);
|
|
1517
|
+
const [I, N] = F(0);
|
|
1518
|
+
A(() => {
|
|
1503
1519
|
if (typeof window > "u") return;
|
|
1504
|
-
const m = () =>
|
|
1520
|
+
const m = () => {
|
|
1521
|
+
if (N((R) => R + 1), h.current) {
|
|
1522
|
+
const R = h.current.getBoundingClientRect();
|
|
1523
|
+
P(
|
|
1524
|
+
(O) => O ? { ...O, position: { x: R.left + R.width / 2, y: R.bottom } } : null
|
|
1525
|
+
);
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1505
1528
|
return window.addEventListener("resize", m), window.addEventListener("scroll", m, !0), () => {
|
|
1506
1529
|
window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
|
|
1507
1530
|
};
|
|
1508
1531
|
}, []);
|
|
1509
|
-
const H =
|
|
1532
|
+
const H = Ne(
|
|
1510
1533
|
() => Io(s),
|
|
1511
1534
|
[s, I]
|
|
1512
|
-
),
|
|
1535
|
+
), re = j(() => {
|
|
1513
1536
|
V(), P(null);
|
|
1514
|
-
}, [V]),
|
|
1537
|
+
}, [V]), oe = {
|
|
1515
1538
|
position: "fixed",
|
|
1516
1539
|
inset: 0,
|
|
1517
1540
|
zIndex: 999999,
|
|
1518
1541
|
pointerEvents: "none",
|
|
1519
1542
|
cursor: o ? "crosshair" : void 0
|
|
1520
|
-
},
|
|
1521
|
-
/* @__PURE__ */ l.jsx("div", { style:
|
|
1543
|
+
}, te = /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1544
|
+
/* @__PURE__ */ l.jsx("div", { style: oe, "aria-hidden": !0, "data-review-layer-root": !0 }),
|
|
1522
1545
|
o && /* @__PURE__ */ l.jsxs(
|
|
1523
1546
|
"div",
|
|
1524
1547
|
{
|
|
@@ -1596,7 +1619,7 @@ function Lo({
|
|
|
1596
1619
|
"button",
|
|
1597
1620
|
{
|
|
1598
1621
|
type: "button",
|
|
1599
|
-
onClick: () =>
|
|
1622
|
+
onClick: () => p(),
|
|
1600
1623
|
style: {
|
|
1601
1624
|
padding: "var(--ui-positive-Value_100, 4px) var(--ui-positive-Value_250, 10px)",
|
|
1602
1625
|
fontSize: "var(--ui-font-size-xs, 12px)",
|
|
@@ -1618,437 +1641,437 @@ function Lo({
|
|
|
1618
1641
|
{
|
|
1619
1642
|
comment: m,
|
|
1620
1643
|
offset: H.get(m.id),
|
|
1621
|
-
apiUrl:
|
|
1644
|
+
apiUrl: r,
|
|
1622
1645
|
apiKey: t,
|
|
1623
|
-
onStatusChange:
|
|
1646
|
+
onStatusChange: p,
|
|
1624
1647
|
reviewMode: o
|
|
1625
1648
|
}
|
|
1626
1649
|
) }, m.id)),
|
|
1627
1650
|
y && /* @__PURE__ */ l.jsx("div", { "data-review-layer-modal": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ l.jsx(
|
|
1628
1651
|
ao,
|
|
1629
1652
|
{
|
|
1630
|
-
apiUrl:
|
|
1653
|
+
apiUrl: r,
|
|
1631
1654
|
apiKey: t,
|
|
1632
1655
|
reviewers: a,
|
|
1633
1656
|
position: y.position,
|
|
1634
1657
|
payload: y.payload,
|
|
1635
|
-
onClose:
|
|
1636
|
-
onSuccess:
|
|
1658
|
+
onClose: re,
|
|
1659
|
+
onSuccess: p
|
|
1637
1660
|
}
|
|
1638
1661
|
) })
|
|
1639
1662
|
] }), X = typeof document < "u" ? document.body : null;
|
|
1640
|
-
return X ?
|
|
1663
|
+
return X ? sr(te, X) : null;
|
|
1664
|
+
}
|
|
1665
|
+
const zo = `/**
|
|
1666
|
+
* Tokens de diseño UI para review-layer-react.
|
|
1667
|
+
* Las variables se inyectan en :root al montar ReviewProvider.
|
|
1668
|
+
* Puedes sobrescribirlas en tu app para adaptar el tema.
|
|
1669
|
+
*/
|
|
1670
|
+
:root {
|
|
1671
|
+
/* Colores base */
|
|
1672
|
+
--ui-color-white: rgb(255, 255, 255);
|
|
1673
|
+
--ui-color-black: rgb(0, 0, 0);
|
|
1674
|
+
--ui-color-red-50: rgb(255, 242, 242);
|
|
1675
|
+
--ui-color-red-100: rgb(252, 227, 227);
|
|
1676
|
+
--ui-color-red-200: rgb(250, 189, 189);
|
|
1677
|
+
--ui-color-red-300: rgb(245, 148, 148);
|
|
1678
|
+
--ui-color-red-400: rgb(242, 107, 107);
|
|
1679
|
+
--ui-color-red-500: rgb(240, 69, 69);
|
|
1680
|
+
--ui-color-red-600: rgb(212, 61, 61);
|
|
1681
|
+
--ui-color-red-700: rgb(184, 51, 51);
|
|
1682
|
+
--ui-color-red-800: rgb(156, 43, 43);
|
|
1683
|
+
--ui-color-red-900: rgb(128, 36, 36);
|
|
1684
|
+
--ui-color-orange-50: rgb(255, 247, 242);
|
|
1685
|
+
--ui-color-orange-100: rgb(252, 237, 227);
|
|
1686
|
+
--ui-color-orange-200: rgb(252, 209, 176);
|
|
1687
|
+
--ui-color-orange-300: rgb(250, 176, 125);
|
|
1688
|
+
--ui-color-orange-400: rgb(250, 145, 74);
|
|
1689
|
+
--ui-color-orange-500: rgb(250, 115, 23);
|
|
1690
|
+
--ui-color-orange-600: rgb(219, 102, 20);
|
|
1691
|
+
--ui-color-orange-700: rgb(189, 87, 18);
|
|
1692
|
+
--ui-color-orange-800: rgb(158, 74, 13);
|
|
1693
|
+
--ui-color-orange-900: rgb(128, 59, 10);
|
|
1694
|
+
--ui-color-yellow-50: rgb(255, 250, 242);
|
|
1695
|
+
--ui-color-yellow-100: rgb(252, 245, 227);
|
|
1696
|
+
--ui-color-yellow-200: rgb(247, 230, 173);
|
|
1697
|
+
--ui-color-yellow-300: rgb(242, 214, 117);
|
|
1698
|
+
--ui-color-yellow-400: rgb(240, 196, 64);
|
|
1699
|
+
--ui-color-yellow-500: rgb(235, 179, 8);
|
|
1700
|
+
--ui-color-yellow-600: rgb(209, 158, 8);
|
|
1701
|
+
--ui-color-yellow-700: rgb(181, 140, 5);
|
|
1702
|
+
--ui-color-yellow-800: rgb(156, 120, 5);
|
|
1703
|
+
--ui-color-yellow-900: rgb(128, 97, 5);
|
|
1704
|
+
--ui-color-lime-50: rgb(250, 255, 242);
|
|
1705
|
+
--ui-color-lime-100: rgb(242, 252, 227);
|
|
1706
|
+
--ui-color-lime-200: rgb(214, 240, 176);
|
|
1707
|
+
--ui-color-lime-300: rgb(186, 227, 125);
|
|
1708
|
+
--ui-color-lime-400: rgb(161, 217, 74);
|
|
1709
|
+
--ui-color-lime-500: rgb(133, 204, 23);
|
|
1710
|
+
--ui-color-lime-600: rgb(120, 186, 20);
|
|
1711
|
+
--ui-color-lime-700: rgb(107, 166, 18);
|
|
1712
|
+
--ui-color-lime-800: rgb(97, 148, 15);
|
|
1713
|
+
--ui-color-lime-900: rgb(84, 128, 13);
|
|
1714
|
+
--ui-color-green-50: rgb(242, 255, 245);
|
|
1715
|
+
--ui-color-green-100: rgb(227, 252, 237);
|
|
1716
|
+
--ui-color-green-200: rgb(179, 240, 201);
|
|
1717
|
+
--ui-color-green-300: rgb(130, 224, 166);
|
|
1718
|
+
--ui-color-green-400: rgb(84, 212, 130);
|
|
1719
|
+
--ui-color-green-500: rgb(33, 196, 94);
|
|
1720
|
+
--ui-color-green-600: rgb(31, 181, 87);
|
|
1721
|
+
--ui-color-green-700: rgb(28, 163, 79);
|
|
1722
|
+
--ui-color-green-800: rgb(26, 145, 69);
|
|
1723
|
+
--ui-color-green-900: rgb(23, 128, 61);
|
|
1724
|
+
--ui-color-cyan-50: rgb(242, 252, 255);
|
|
1725
|
+
--ui-color-cyan-100: rgb(227, 250, 252);
|
|
1726
|
+
--ui-color-cyan-200: rgb(171, 232, 242);
|
|
1727
|
+
--ui-color-cyan-300: rgb(117, 217, 232);
|
|
1728
|
+
--ui-color-cyan-400: rgb(61, 199, 222);
|
|
1729
|
+
--ui-color-cyan-500: rgb(5, 181, 212);
|
|
1730
|
+
--ui-color-cyan-600: rgb(5, 163, 191);
|
|
1731
|
+
--ui-color-cyan-700: rgb(5, 145, 171);
|
|
1732
|
+
--ui-color-cyan-800: rgb(5, 128, 148);
|
|
1733
|
+
--ui-color-cyan-900: rgb(5, 110, 128);
|
|
1734
|
+
--ui-color-azure-50: rgb(242, 250, 255);
|
|
1735
|
+
--ui-color-azure-100: rgb(227, 245, 252);
|
|
1736
|
+
--ui-color-azure-200: rgb(173, 224, 247);
|
|
1737
|
+
--ui-color-azure-300: rgb(120, 204, 242);
|
|
1738
|
+
--ui-color-azure-400: rgb(69, 186, 237);
|
|
1739
|
+
--ui-color-azure-500: rgb(13, 166, 232);
|
|
1740
|
+
--ui-color-azure-600: rgb(13, 148, 207);
|
|
1741
|
+
--ui-color-azure-700: rgb(10, 128, 181);
|
|
1742
|
+
--ui-color-azure-800: rgb(10, 110, 156);
|
|
1743
|
+
--ui-color-azure-900: rgb(8, 89, 128);
|
|
1744
|
+
--ui-color-blue-50: rgb(242, 245, 255);
|
|
1745
|
+
--ui-color-blue-100: rgb(227, 232, 252);
|
|
1746
|
+
--ui-color-blue-200: rgb(184, 196, 237);
|
|
1747
|
+
--ui-color-blue-300: rgb(140, 161, 222);
|
|
1748
|
+
--ui-color-blue-400: rgb(97, 125, 209);
|
|
1749
|
+
--ui-color-blue-500: rgb(54, 89, 194);
|
|
1750
|
+
--ui-color-blue-600: rgb(51, 82, 176);
|
|
1751
|
+
--ui-color-blue-700: rgb(46, 74, 161);
|
|
1752
|
+
--ui-color-blue-800: rgb(41, 66, 145);
|
|
1753
|
+
--ui-color-blue-900: rgb(36, 59, 128);
|
|
1754
|
+
--ui-color-violet-50: rgb(245, 242, 255);
|
|
1755
|
+
--ui-color-violet-100: rgb(237, 227, 252);
|
|
1756
|
+
--ui-color-violet-200: rgb(209, 186, 250);
|
|
1757
|
+
--ui-color-violet-300: rgb(181, 143, 245);
|
|
1758
|
+
--ui-color-violet-400: rgb(153, 102, 242);
|
|
1759
|
+
--ui-color-violet-500: rgb(125, 59, 237);
|
|
1760
|
+
--ui-color-violet-600: rgb(110, 51, 209);
|
|
1761
|
+
--ui-color-violet-700: rgb(97, 46, 184);
|
|
1762
|
+
--ui-color-violet-800: rgb(82, 38, 156);
|
|
1763
|
+
--ui-color-violet-900: rgb(66, 31, 128);
|
|
1764
|
+
--ui-color-magenta-50: rgb(255, 242, 247);
|
|
1765
|
+
--ui-color-magenta-100: rgb(252, 227, 240);
|
|
1766
|
+
--ui-color-magenta-200: rgb(247, 184, 214);
|
|
1767
|
+
--ui-color-magenta-300: rgb(245, 140, 186);
|
|
1768
|
+
--ui-color-magenta-400: rgb(240, 94, 161);
|
|
1769
|
+
--ui-color-magenta-500: rgb(235, 51, 135);
|
|
1770
|
+
--ui-color-magenta-600: rgb(209, 46, 120);
|
|
1771
|
+
--ui-color-magenta-700: rgb(181, 41, 105);
|
|
1772
|
+
--ui-color-magenta-800: rgb(156, 33, 89);
|
|
1773
|
+
--ui-color-magenta-900: rgb(128, 28, 74);
|
|
1774
|
+
--ui-color-rose-50: rgb(255, 242, 245);
|
|
1775
|
+
--ui-color-rose-100: rgb(252, 227, 232);
|
|
1776
|
+
--ui-color-rose-200: rgb(245, 179, 194);
|
|
1777
|
+
--ui-color-rose-300: rgb(240, 128, 153);
|
|
1778
|
+
--ui-color-rose-400: rgb(232, 79, 112);
|
|
1779
|
+
--ui-color-rose-500: rgb(224, 28, 71);
|
|
1780
|
+
--ui-color-rose-600: rgb(201, 26, 64);
|
|
1781
|
+
--ui-color-rose-700: rgb(176, 23, 56);
|
|
1782
|
+
--ui-color-rose-800: rgb(153, 20, 48);
|
|
1783
|
+
--ui-color-rose-900: rgb(128, 15, 41);
|
|
1784
|
+
--ui-color-light-gray-50: rgb(247, 247, 250);
|
|
1785
|
+
--ui-color-light-gray-100: rgb(240, 242, 242);
|
|
1786
|
+
--ui-color-light-gray-200: rgb(224, 227, 230);
|
|
1787
|
+
--ui-color-light-gray-300: rgb(212, 214, 217);
|
|
1788
|
+
--ui-color-light-gray-400: rgb(199, 199, 204);
|
|
1789
|
+
--ui-color-light-gray-500: rgb(186, 189, 191);
|
|
1790
|
+
--ui-color-light-gray-600: rgb(171, 173, 179);
|
|
1791
|
+
--ui-color-light-gray-700: rgb(158, 163, 166);
|
|
1792
|
+
--ui-color-light-gray-800: rgb(145, 148, 153);
|
|
1793
|
+
--ui-color-light-gray-900: rgb(133, 135, 140);
|
|
1794
|
+
--ui-color-dark-gray-50: rgb(120, 122, 128);
|
|
1795
|
+
--ui-color-dark-gray-100: rgb(107, 110, 115);
|
|
1796
|
+
--ui-color-dark-gray-200: rgb(97, 99, 105);
|
|
1797
|
+
--ui-color-dark-gray-300: rgb(89, 89, 94);
|
|
1798
|
+
--ui-color-dark-gray-400: rgb(77, 79, 84);
|
|
1799
|
+
--ui-color-dark-gray-500: rgb(69, 69, 74);
|
|
1800
|
+
--ui-color-dark-gray-600: rgb(59, 61, 64);
|
|
1801
|
+
--ui-color-dark-gray-700: rgb(48, 51, 54);
|
|
1802
|
+
--ui-color-dark-gray-800: rgb(38, 41, 43);
|
|
1803
|
+
--ui-color-dark-gray-900: rgb(31, 31, 33);
|
|
1804
|
+
--ui-color-black-alpha-transparent: rgba(0, 0, 0, 0);
|
|
1805
|
+
--ui-color-black-alpha-5: rgba(0, 0, 0, 0.05);
|
|
1806
|
+
--ui-color-black-alpha-10: rgba(0, 0, 0, 0.1);
|
|
1807
|
+
--ui-color-black-alpha-20: rgba(0, 0, 0, 0.2);
|
|
1808
|
+
--ui-color-black-alpha-30: rgba(0, 0, 0, 0.3);
|
|
1809
|
+
--ui-color-black-alpha-40: rgba(0, 0, 0, 0.4);
|
|
1810
|
+
--ui-color-black-alpha-50: rgba(0, 0, 0, 0.5);
|
|
1811
|
+
--ui-color-black-alpha-60: rgba(0, 0, 0, 0.6);
|
|
1812
|
+
--ui-color-black-alpha-70: rgba(0, 0, 0, 0.7);
|
|
1813
|
+
--ui-color-black-alpha-80: rgba(0, 0, 0, 0.8);
|
|
1814
|
+
--ui-color-black-alpha-90: rgba(0, 0, 0, 0.9);
|
|
1815
|
+
|
|
1816
|
+
/* Espaciado positivo */
|
|
1817
|
+
--ui-positive-Value_0: 0;
|
|
1818
|
+
--ui-positive-Value_12: 0.66px;
|
|
1819
|
+
--ui-positive-Value_25: 1px;
|
|
1820
|
+
--ui-positive-Value_50: 2px;
|
|
1821
|
+
--ui-positive-Value_100: 4px;
|
|
1822
|
+
--ui-positive-Value_150: 6px;
|
|
1823
|
+
--ui-positive-Value_200: 8px;
|
|
1824
|
+
--ui-positive-Value_250: 10px;
|
|
1825
|
+
--ui-positive-Value_275: 11px;
|
|
1826
|
+
--ui-positive-Value_300: 12px;
|
|
1827
|
+
--ui-positive-Value_325: 13px;
|
|
1828
|
+
--ui-positive-Value_350: 14px;
|
|
1829
|
+
--ui-positive-Value_400: 16px;
|
|
1830
|
+
--ui-positive-Value_450: 18px;
|
|
1831
|
+
--ui-positive-Value_500: 20px;
|
|
1832
|
+
--ui-positive-Value_600: 24px;
|
|
1833
|
+
--ui-positive-Value_700: 28px;
|
|
1834
|
+
--ui-positive-Value_750: 30px;
|
|
1835
|
+
--ui-positive-Value_800: 32px;
|
|
1836
|
+
--ui-positive-Value_900: 36px;
|
|
1837
|
+
--ui-positive-Value_1000: 40px;
|
|
1838
|
+
--ui-positive-Value_1200: 48px;
|
|
1839
|
+
--ui-positive-Value_1400: 56px;
|
|
1840
|
+
--ui-positive-Value_1600: 64px;
|
|
1841
|
+
--ui-positive-Value_2000: 80px;
|
|
1842
|
+
--ui-positive-Value_2400: 96px;
|
|
1843
|
+
--ui-positive-Value_2800: 112px;
|
|
1844
|
+
--ui-positive-Value_3200: 128px;
|
|
1845
|
+
--ui-positive-Value_full: 9999px;
|
|
1846
|
+
|
|
1847
|
+
/* Sombras */
|
|
1848
|
+
--ui-shadow-01-x: 0;
|
|
1849
|
+
--ui-shadow-01-y: 1px;
|
|
1850
|
+
--ui-shadow-01-blur: 2px;
|
|
1851
|
+
--ui-shadow-01-Spread: 0;
|
|
1852
|
+
--ui-shadow-02-x: 0;
|
|
1853
|
+
--ui-shadow-02-y: 2px;
|
|
1854
|
+
--ui-shadow-02-blur: 4px;
|
|
1855
|
+
--ui-shadow-02-Spread: -1px;
|
|
1856
|
+
--ui-shadow-03-x: 0;
|
|
1857
|
+
--ui-shadow-03-y: 4px;
|
|
1858
|
+
--ui-shadow-03-blur: 8px;
|
|
1859
|
+
--ui-shadow-03-Spread: -2px;
|
|
1860
|
+
--ui-shadow-04-x: 0;
|
|
1861
|
+
--ui-shadow-04-y: 8px;
|
|
1862
|
+
--ui-shadow-04-blur: 16px;
|
|
1863
|
+
--ui-shadow-04-Spread: -4px;
|
|
1864
|
+
--ui-shadow-05-x: 0;
|
|
1865
|
+
--ui-shadow-05-y: 16px;
|
|
1866
|
+
--ui-shadow-05-blur: 24px;
|
|
1867
|
+
--ui-shadow-05-Spread: -8px;
|
|
1868
|
+
--ui-shadow-01-Color: var(--ui-color-black-alpha-10);
|
|
1869
|
+
--ui-shadow-02-Color: var(--ui-color-black-alpha-20);
|
|
1870
|
+
--ui-shadow-03-Color: var(--ui-color-black-alpha-20);
|
|
1871
|
+
--ui-shadow-04-Color: var(--ui-color-black-alpha-30);
|
|
1872
|
+
--ui-shadow-05-Color: var(--ui-color-black-alpha-30);
|
|
1873
|
+
|
|
1874
|
+
/* Z-index */
|
|
1875
|
+
--ui-z-hide: -1;
|
|
1876
|
+
--ui-z-base: 0;
|
|
1877
|
+
--ui-z-raised: 100;
|
|
1878
|
+
--ui-z-sticky: 200;
|
|
1879
|
+
--ui-z-shell: 300;
|
|
1880
|
+
--ui-z-dropdown: 400;
|
|
1881
|
+
--ui-z-popover: 500;
|
|
1882
|
+
--ui-z-tooltip: 600;
|
|
1883
|
+
--ui-z-modalBackdrop: 690;
|
|
1884
|
+
--ui-z-modal: 700;
|
|
1885
|
+
--ui-z-toast: 800;
|
|
1886
|
+
--ui-z-overlay: 900;
|
|
1887
|
+
--ui-z-max: 99999;
|
|
1888
|
+
|
|
1889
|
+
/* Tipografía */
|
|
1890
|
+
--ui-font-family-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
1891
|
+
--ui-font-family-mono: "IBM Plex Mono";
|
|
1892
|
+
--ui-font-weight-regular: 400;
|
|
1893
|
+
--ui-font-weight-medium: 500;
|
|
1894
|
+
--ui-font-weight-semibold: 600;
|
|
1895
|
+
--ui-font-weight-bold: 700;
|
|
1896
|
+
|
|
1897
|
+
/* Radios */
|
|
1898
|
+
--ui-radius_0: 0;
|
|
1899
|
+
--ui-radius_2: 2px;
|
|
1900
|
+
--ui-radius_4: 4px;
|
|
1901
|
+
--ui-radius_6: 6px;
|
|
1902
|
+
--ui-radius_8: 8px;
|
|
1903
|
+
--ui-radius_10: 10px;
|
|
1904
|
+
--ui-radius_12: 12px;
|
|
1905
|
+
--ui-radius_16: 16px;
|
|
1906
|
+
--ui-radius_24: 24px;
|
|
1907
|
+
--ui-radius_full: 9999px;
|
|
1908
|
+
|
|
1909
|
+
/* Semánticos: texto */
|
|
1910
|
+
--ui-color-text-primary: var(--ui-color-dark-gray-700);
|
|
1911
|
+
--ui-color-text-secondary: var(--ui-color-dark-gray-300);
|
|
1912
|
+
--ui-color-text-tertiary: var(--ui-color-dark-gray-100);
|
|
1913
|
+
--ui-color-text-disabled: var(--ui-color-light-gray-500);
|
|
1914
|
+
--ui-color-text-on-color: var(--ui-color-white);
|
|
1915
|
+
--ui-color-text-danger-default: var(--ui-color-red-700);
|
|
1916
|
+
--ui-color-text-danger-hover: var(--ui-color-red-800);
|
|
1917
|
+
--ui-color-text-danger-pressed: var(--ui-color-red-900);
|
|
1918
|
+
|
|
1919
|
+
/* Semánticos: bordes */
|
|
1920
|
+
--ui-color-border-default: var(--ui-color-light-gray-400);
|
|
1921
|
+
--ui-color-border-subtle: var(--ui-color-light-gray-300);
|
|
1922
|
+
--ui-color-border-strong: var(--ui-color-dark-gray-400);
|
|
1923
|
+
--ui-color-border-danger: var(--ui-color-red-500);
|
|
1924
|
+
|
|
1925
|
+
/* Semánticos: superficies y fondos */
|
|
1926
|
+
--ui-color-bg-surface-default: var(--ui-color-white);
|
|
1927
|
+
--ui-color-bg-surface-secondary-default: var(--ui-color-light-gray-50);
|
|
1928
|
+
--ui-color-bg-surface-secondary-hover: var(--ui-color-light-gray-100);
|
|
1929
|
+
--ui-color-bg-fill-danger-default: var(--ui-color-red-500);
|
|
1930
|
+
--ui-color-bg-fill-danger-hover: var(--ui-color-red-600);
|
|
1931
|
+
--ui-color-bg-fill-danger-pressed: var(--ui-color-red-700);
|
|
1932
|
+
--ui-color-bg-fill-success-default: var(--ui-color-green-500);
|
|
1933
|
+
--ui-color-bg-fill-success-hover: var(--ui-color-green-600);
|
|
1934
|
+
--ui-color-bg-fill-success-pressed: var(--ui-color-green-700);
|
|
1935
|
+
--ui-color-bg-surface-success-default: var(--ui-color-green-50);
|
|
1936
|
+
--ui-color-bg-surface-success-hover: var(--ui-color-green-100);
|
|
1937
|
+
--ui-color-bg-surface-success-selected: var(--ui-color-green-200);
|
|
1938
|
+
--ui-color-bg-surface-danger-default: var(--ui-color-red-50);
|
|
1939
|
+
--ui-color-bg-surface-danger-hover: var(--ui-color-red-100);
|
|
1940
|
+
--ui-color-bg-surface-danger-selected: var(--ui-color-red-200);
|
|
1941
|
+
--ui-color-bg-surface-warning-default: var(--ui-color-yellow-50);
|
|
1942
|
+
--ui-color-bg-surface-warning-hover: var(--ui-color-yellow-100);
|
|
1943
|
+
--ui-color-bg-surface-warning-selected: var(--ui-color-yellow-200);
|
|
1944
|
+
|
|
1945
|
+
/* Espaciado (space) */
|
|
1946
|
+
--ui-Positive-space_0: var(--ui-positive-Value_0);
|
|
1947
|
+
--ui-Positive-space_2: var(--ui-positive-Value_100);
|
|
1948
|
+
--ui-Positive-space_4: var(--ui-positive-Value_100);
|
|
1949
|
+
--ui-Positive-space_6: var(--ui-positive-Value_150);
|
|
1950
|
+
--ui-Positive-space_8: var(--ui-positive-Value_200);
|
|
1951
|
+
--ui-Positive-space_10: var(--ui-positive-Value_250);
|
|
1952
|
+
--ui-Positive-space_12: var(--ui-positive-Value_300);
|
|
1953
|
+
--ui-Positive-space_16: var(--ui-positive-Value_400);
|
|
1954
|
+
--ui-Positive-space_20: var(--ui-positive-Value_500);
|
|
1955
|
+
--ui-Positive-space_24: var(--ui-positive-Value_600);
|
|
1956
|
+
--ui-Positive-space_28: var(--ui-positive-Value_700);
|
|
1957
|
+
--ui-Positive-space_32: var(--ui-positive-Value_800);
|
|
1958
|
+
--ui-Positive-space_40: var(--ui-positive-Value_1000);
|
|
1959
|
+
--ui-Positive-space_48: var(--ui-positive-Value_1200);
|
|
1960
|
+
--ui-Positive-space_56: var(--ui-positive-Value_1400);
|
|
1961
|
+
--ui-Positive-space_64: var(--ui-positive-Value_1600);
|
|
1962
|
+
--ui-Positive-space_80: var(--ui-positive-Value_2000);
|
|
1963
|
+
--ui-Positive-space_96: var(--ui-positive-Value_2400);
|
|
1964
|
+
|
|
1965
|
+
/* Tamaños de fuente */
|
|
1966
|
+
--ui-font-size-2xs: var(--ui-positive-Value_250);
|
|
1967
|
+
--ui-font-size-xs: var(--ui-positive-Value_300);
|
|
1968
|
+
--ui-font-size-sm: var(--ui-positive-Value_350);
|
|
1969
|
+
--ui-font-size-md: var(--ui-positive-Value_400);
|
|
1970
|
+
--ui-font-size-lg: var(--ui-positive-Value_450);
|
|
1971
|
+
--ui-font-size-xl: var(--ui-positive-Value_500);
|
|
1972
|
+
--ui-font-size-2xl: var(--ui-positive-Value_600);
|
|
1973
|
+
--ui-font-size-3xl: var(--ui-positive-Value_750);
|
|
1974
|
+
--ui-font-size-4xl: var(--ui-positive-Value_900);
|
|
1975
|
+
--ui-font-size-5xl: var(--ui-positive-Value_1200);
|
|
1976
|
+
|
|
1977
|
+
/* Line height (muestra) */
|
|
1978
|
+
--ui-font-lh-10-normal: 14.5px;
|
|
1979
|
+
--ui-font-lh-12-normal: 17.5px;
|
|
1980
|
+
--ui-font-lh-14-normal: 20.5px;
|
|
1981
|
+
--ui-font-lh-16-normal: 23px;
|
|
1982
|
+
--ui-font-lh-18-normal: 26px;
|
|
1983
|
+
--ui-font-lh-20-snug: 25px;
|
|
1984
|
+
|
|
1985
|
+
/* Sombras compuestas (para uso en box-shadow) */
|
|
1986
|
+
--ui-shadow-card: 0 4px 16px var(--ui-shadow-01-Color);
|
|
1987
|
+
--ui-shadow-popover: 0 var(--ui-shadow-02-y) var(--ui-shadow-02-blur) var(--ui-shadow-02-Color);
|
|
1988
|
+
--ui-shadow-modal: 0 var(--ui-shadow-04-y) var(--ui-shadow-04-blur) var(--ui-shadow-04-Color);
|
|
1641
1989
|
}
|
|
1642
|
-
const zo = `/**\r
|
|
1643
|
-
* Tokens de diseño UI para review-layer-react.\r
|
|
1644
|
-
* Las variables se inyectan en :root al montar ReviewProvider.\r
|
|
1645
|
-
* Puedes sobrescribirlas en tu app para adaptar el tema.\r
|
|
1646
|
-
*/\r
|
|
1647
|
-
:root {\r
|
|
1648
|
-
/* Colores base */\r
|
|
1649
|
-
--ui-color-white: rgb(255, 255, 255);\r
|
|
1650
|
-
--ui-color-black: rgb(0, 0, 0);\r
|
|
1651
|
-
--ui-color-red-50: rgb(255, 242, 242);\r
|
|
1652
|
-
--ui-color-red-100: rgb(252, 227, 227);\r
|
|
1653
|
-
--ui-color-red-200: rgb(250, 189, 189);\r
|
|
1654
|
-
--ui-color-red-300: rgb(245, 148, 148);\r
|
|
1655
|
-
--ui-color-red-400: rgb(242, 107, 107);\r
|
|
1656
|
-
--ui-color-red-500: rgb(240, 69, 69);\r
|
|
1657
|
-
--ui-color-red-600: rgb(212, 61, 61);\r
|
|
1658
|
-
--ui-color-red-700: rgb(184, 51, 51);\r
|
|
1659
|
-
--ui-color-red-800: rgb(156, 43, 43);\r
|
|
1660
|
-
--ui-color-red-900: rgb(128, 36, 36);\r
|
|
1661
|
-
--ui-color-orange-50: rgb(255, 247, 242);\r
|
|
1662
|
-
--ui-color-orange-100: rgb(252, 237, 227);\r
|
|
1663
|
-
--ui-color-orange-200: rgb(252, 209, 176);\r
|
|
1664
|
-
--ui-color-orange-300: rgb(250, 176, 125);\r
|
|
1665
|
-
--ui-color-orange-400: rgb(250, 145, 74);\r
|
|
1666
|
-
--ui-color-orange-500: rgb(250, 115, 23);\r
|
|
1667
|
-
--ui-color-orange-600: rgb(219, 102, 20);\r
|
|
1668
|
-
--ui-color-orange-700: rgb(189, 87, 18);\r
|
|
1669
|
-
--ui-color-orange-800: rgb(158, 74, 13);\r
|
|
1670
|
-
--ui-color-orange-900: rgb(128, 59, 10);\r
|
|
1671
|
-
--ui-color-yellow-50: rgb(255, 250, 242);\r
|
|
1672
|
-
--ui-color-yellow-100: rgb(252, 245, 227);\r
|
|
1673
|
-
--ui-color-yellow-200: rgb(247, 230, 173);\r
|
|
1674
|
-
--ui-color-yellow-300: rgb(242, 214, 117);\r
|
|
1675
|
-
--ui-color-yellow-400: rgb(240, 196, 64);\r
|
|
1676
|
-
--ui-color-yellow-500: rgb(235, 179, 8);\r
|
|
1677
|
-
--ui-color-yellow-600: rgb(209, 158, 8);\r
|
|
1678
|
-
--ui-color-yellow-700: rgb(181, 140, 5);\r
|
|
1679
|
-
--ui-color-yellow-800: rgb(156, 120, 5);\r
|
|
1680
|
-
--ui-color-yellow-900: rgb(128, 97, 5);\r
|
|
1681
|
-
--ui-color-lime-50: rgb(250, 255, 242);\r
|
|
1682
|
-
--ui-color-lime-100: rgb(242, 252, 227);\r
|
|
1683
|
-
--ui-color-lime-200: rgb(214, 240, 176);\r
|
|
1684
|
-
--ui-color-lime-300: rgb(186, 227, 125);\r
|
|
1685
|
-
--ui-color-lime-400: rgb(161, 217, 74);\r
|
|
1686
|
-
--ui-color-lime-500: rgb(133, 204, 23);\r
|
|
1687
|
-
--ui-color-lime-600: rgb(120, 186, 20);\r
|
|
1688
|
-
--ui-color-lime-700: rgb(107, 166, 18);\r
|
|
1689
|
-
--ui-color-lime-800: rgb(97, 148, 15);\r
|
|
1690
|
-
--ui-color-lime-900: rgb(84, 128, 13);\r
|
|
1691
|
-
--ui-color-green-50: rgb(242, 255, 245);\r
|
|
1692
|
-
--ui-color-green-100: rgb(227, 252, 237);\r
|
|
1693
|
-
--ui-color-green-200: rgb(179, 240, 201);\r
|
|
1694
|
-
--ui-color-green-300: rgb(130, 224, 166);\r
|
|
1695
|
-
--ui-color-green-400: rgb(84, 212, 130);\r
|
|
1696
|
-
--ui-color-green-500: rgb(33, 196, 94);\r
|
|
1697
|
-
--ui-color-green-600: rgb(31, 181, 87);\r
|
|
1698
|
-
--ui-color-green-700: rgb(28, 163, 79);\r
|
|
1699
|
-
--ui-color-green-800: rgb(26, 145, 69);\r
|
|
1700
|
-
--ui-color-green-900: rgb(23, 128, 61);\r
|
|
1701
|
-
--ui-color-cyan-50: rgb(242, 252, 255);\r
|
|
1702
|
-
--ui-color-cyan-100: rgb(227, 250, 252);\r
|
|
1703
|
-
--ui-color-cyan-200: rgb(171, 232, 242);\r
|
|
1704
|
-
--ui-color-cyan-300: rgb(117, 217, 232);\r
|
|
1705
|
-
--ui-color-cyan-400: rgb(61, 199, 222);\r
|
|
1706
|
-
--ui-color-cyan-500: rgb(5, 181, 212);\r
|
|
1707
|
-
--ui-color-cyan-600: rgb(5, 163, 191);\r
|
|
1708
|
-
--ui-color-cyan-700: rgb(5, 145, 171);\r
|
|
1709
|
-
--ui-color-cyan-800: rgb(5, 128, 148);\r
|
|
1710
|
-
--ui-color-cyan-900: rgb(5, 110, 128);\r
|
|
1711
|
-
--ui-color-azure-50: rgb(242, 250, 255);\r
|
|
1712
|
-
--ui-color-azure-100: rgb(227, 245, 252);\r
|
|
1713
|
-
--ui-color-azure-200: rgb(173, 224, 247);\r
|
|
1714
|
-
--ui-color-azure-300: rgb(120, 204, 242);\r
|
|
1715
|
-
--ui-color-azure-400: rgb(69, 186, 237);\r
|
|
1716
|
-
--ui-color-azure-500: rgb(13, 166, 232);\r
|
|
1717
|
-
--ui-color-azure-600: rgb(13, 148, 207);\r
|
|
1718
|
-
--ui-color-azure-700: rgb(10, 128, 181);\r
|
|
1719
|
-
--ui-color-azure-800: rgb(10, 110, 156);\r
|
|
1720
|
-
--ui-color-azure-900: rgb(8, 89, 128);\r
|
|
1721
|
-
--ui-color-blue-50: rgb(242, 245, 255);\r
|
|
1722
|
-
--ui-color-blue-100: rgb(227, 232, 252);\r
|
|
1723
|
-
--ui-color-blue-200: rgb(184, 196, 237);\r
|
|
1724
|
-
--ui-color-blue-300: rgb(140, 161, 222);\r
|
|
1725
|
-
--ui-color-blue-400: rgb(97, 125, 209);\r
|
|
1726
|
-
--ui-color-blue-500: rgb(54, 89, 194);\r
|
|
1727
|
-
--ui-color-blue-600: rgb(51, 82, 176);\r
|
|
1728
|
-
--ui-color-blue-700: rgb(46, 74, 161);\r
|
|
1729
|
-
--ui-color-blue-800: rgb(41, 66, 145);\r
|
|
1730
|
-
--ui-color-blue-900: rgb(36, 59, 128);\r
|
|
1731
|
-
--ui-color-violet-50: rgb(245, 242, 255);\r
|
|
1732
|
-
--ui-color-violet-100: rgb(237, 227, 252);\r
|
|
1733
|
-
--ui-color-violet-200: rgb(209, 186, 250);\r
|
|
1734
|
-
--ui-color-violet-300: rgb(181, 143, 245);\r
|
|
1735
|
-
--ui-color-violet-400: rgb(153, 102, 242);\r
|
|
1736
|
-
--ui-color-violet-500: rgb(125, 59, 237);\r
|
|
1737
|
-
--ui-color-violet-600: rgb(110, 51, 209);\r
|
|
1738
|
-
--ui-color-violet-700: rgb(97, 46, 184);\r
|
|
1739
|
-
--ui-color-violet-800: rgb(82, 38, 156);\r
|
|
1740
|
-
--ui-color-violet-900: rgb(66, 31, 128);\r
|
|
1741
|
-
--ui-color-magenta-50: rgb(255, 242, 247);\r
|
|
1742
|
-
--ui-color-magenta-100: rgb(252, 227, 240);\r
|
|
1743
|
-
--ui-color-magenta-200: rgb(247, 184, 214);\r
|
|
1744
|
-
--ui-color-magenta-300: rgb(245, 140, 186);\r
|
|
1745
|
-
--ui-color-magenta-400: rgb(240, 94, 161);\r
|
|
1746
|
-
--ui-color-magenta-500: rgb(235, 51, 135);\r
|
|
1747
|
-
--ui-color-magenta-600: rgb(209, 46, 120);\r
|
|
1748
|
-
--ui-color-magenta-700: rgb(181, 41, 105);\r
|
|
1749
|
-
--ui-color-magenta-800: rgb(156, 33, 89);\r
|
|
1750
|
-
--ui-color-magenta-900: rgb(128, 28, 74);\r
|
|
1751
|
-
--ui-color-rose-50: rgb(255, 242, 245);\r
|
|
1752
|
-
--ui-color-rose-100: rgb(252, 227, 232);\r
|
|
1753
|
-
--ui-color-rose-200: rgb(245, 179, 194);\r
|
|
1754
|
-
--ui-color-rose-300: rgb(240, 128, 153);\r
|
|
1755
|
-
--ui-color-rose-400: rgb(232, 79, 112);\r
|
|
1756
|
-
--ui-color-rose-500: rgb(224, 28, 71);\r
|
|
1757
|
-
--ui-color-rose-600: rgb(201, 26, 64);\r
|
|
1758
|
-
--ui-color-rose-700: rgb(176, 23, 56);\r
|
|
1759
|
-
--ui-color-rose-800: rgb(153, 20, 48);\r
|
|
1760
|
-
--ui-color-rose-900: rgb(128, 15, 41);\r
|
|
1761
|
-
--ui-color-light-gray-50: rgb(247, 247, 250);\r
|
|
1762
|
-
--ui-color-light-gray-100: rgb(240, 242, 242);\r
|
|
1763
|
-
--ui-color-light-gray-200: rgb(224, 227, 230);\r
|
|
1764
|
-
--ui-color-light-gray-300: rgb(212, 214, 217);\r
|
|
1765
|
-
--ui-color-light-gray-400: rgb(199, 199, 204);\r
|
|
1766
|
-
--ui-color-light-gray-500: rgb(186, 189, 191);\r
|
|
1767
|
-
--ui-color-light-gray-600: rgb(171, 173, 179);\r
|
|
1768
|
-
--ui-color-light-gray-700: rgb(158, 163, 166);\r
|
|
1769
|
-
--ui-color-light-gray-800: rgb(145, 148, 153);\r
|
|
1770
|
-
--ui-color-light-gray-900: rgb(133, 135, 140);\r
|
|
1771
|
-
--ui-color-dark-gray-50: rgb(120, 122, 128);\r
|
|
1772
|
-
--ui-color-dark-gray-100: rgb(107, 110, 115);\r
|
|
1773
|
-
--ui-color-dark-gray-200: rgb(97, 99, 105);\r
|
|
1774
|
-
--ui-color-dark-gray-300: rgb(89, 89, 94);\r
|
|
1775
|
-
--ui-color-dark-gray-400: rgb(77, 79, 84);\r
|
|
1776
|
-
--ui-color-dark-gray-500: rgb(69, 69, 74);\r
|
|
1777
|
-
--ui-color-dark-gray-600: rgb(59, 61, 64);\r
|
|
1778
|
-
--ui-color-dark-gray-700: rgb(48, 51, 54);\r
|
|
1779
|
-
--ui-color-dark-gray-800: rgb(38, 41, 43);\r
|
|
1780
|
-
--ui-color-dark-gray-900: rgb(31, 31, 33);\r
|
|
1781
|
-
--ui-color-black-alpha-transparent: rgba(0, 0, 0, 0);\r
|
|
1782
|
-
--ui-color-black-alpha-5: rgba(0, 0, 0, 0.05);\r
|
|
1783
|
-
--ui-color-black-alpha-10: rgba(0, 0, 0, 0.1);\r
|
|
1784
|
-
--ui-color-black-alpha-20: rgba(0, 0, 0, 0.2);\r
|
|
1785
|
-
--ui-color-black-alpha-30: rgba(0, 0, 0, 0.3);\r
|
|
1786
|
-
--ui-color-black-alpha-40: rgba(0, 0, 0, 0.4);\r
|
|
1787
|
-
--ui-color-black-alpha-50: rgba(0, 0, 0, 0.5);\r
|
|
1788
|
-
--ui-color-black-alpha-60: rgba(0, 0, 0, 0.6);\r
|
|
1789
|
-
--ui-color-black-alpha-70: rgba(0, 0, 0, 0.7);\r
|
|
1790
|
-
--ui-color-black-alpha-80: rgba(0, 0, 0, 0.8);\r
|
|
1791
|
-
--ui-color-black-alpha-90: rgba(0, 0, 0, 0.9);\r
|
|
1792
|
-
\r
|
|
1793
|
-
/* Espaciado positivo */\r
|
|
1794
|
-
--ui-positive-Value_0: 0;\r
|
|
1795
|
-
--ui-positive-Value_12: 0.66px;\r
|
|
1796
|
-
--ui-positive-Value_25: 1px;\r
|
|
1797
|
-
--ui-positive-Value_50: 2px;\r
|
|
1798
|
-
--ui-positive-Value_100: 4px;\r
|
|
1799
|
-
--ui-positive-Value_150: 6px;\r
|
|
1800
|
-
--ui-positive-Value_200: 8px;\r
|
|
1801
|
-
--ui-positive-Value_250: 10px;\r
|
|
1802
|
-
--ui-positive-Value_275: 11px;\r
|
|
1803
|
-
--ui-positive-Value_300: 12px;\r
|
|
1804
|
-
--ui-positive-Value_325: 13px;\r
|
|
1805
|
-
--ui-positive-Value_350: 14px;\r
|
|
1806
|
-
--ui-positive-Value_400: 16px;\r
|
|
1807
|
-
--ui-positive-Value_450: 18px;\r
|
|
1808
|
-
--ui-positive-Value_500: 20px;\r
|
|
1809
|
-
--ui-positive-Value_600: 24px;\r
|
|
1810
|
-
--ui-positive-Value_700: 28px;\r
|
|
1811
|
-
--ui-positive-Value_750: 30px;\r
|
|
1812
|
-
--ui-positive-Value_800: 32px;\r
|
|
1813
|
-
--ui-positive-Value_900: 36px;\r
|
|
1814
|
-
--ui-positive-Value_1000: 40px;\r
|
|
1815
|
-
--ui-positive-Value_1200: 48px;\r
|
|
1816
|
-
--ui-positive-Value_1400: 56px;\r
|
|
1817
|
-
--ui-positive-Value_1600: 64px;\r
|
|
1818
|
-
--ui-positive-Value_2000: 80px;\r
|
|
1819
|
-
--ui-positive-Value_2400: 96px;\r
|
|
1820
|
-
--ui-positive-Value_2800: 112px;\r
|
|
1821
|
-
--ui-positive-Value_3200: 128px;\r
|
|
1822
|
-
--ui-positive-Value_full: 9999px;\r
|
|
1823
|
-
\r
|
|
1824
|
-
/* Sombras */\r
|
|
1825
|
-
--ui-shadow-01-x: 0;\r
|
|
1826
|
-
--ui-shadow-01-y: 1px;\r
|
|
1827
|
-
--ui-shadow-01-blur: 2px;\r
|
|
1828
|
-
--ui-shadow-01-Spread: 0;\r
|
|
1829
|
-
--ui-shadow-02-x: 0;\r
|
|
1830
|
-
--ui-shadow-02-y: 2px;\r
|
|
1831
|
-
--ui-shadow-02-blur: 4px;\r
|
|
1832
|
-
--ui-shadow-02-Spread: -1px;\r
|
|
1833
|
-
--ui-shadow-03-x: 0;\r
|
|
1834
|
-
--ui-shadow-03-y: 4px;\r
|
|
1835
|
-
--ui-shadow-03-blur: 8px;\r
|
|
1836
|
-
--ui-shadow-03-Spread: -2px;\r
|
|
1837
|
-
--ui-shadow-04-x: 0;\r
|
|
1838
|
-
--ui-shadow-04-y: 8px;\r
|
|
1839
|
-
--ui-shadow-04-blur: 16px;\r
|
|
1840
|
-
--ui-shadow-04-Spread: -4px;\r
|
|
1841
|
-
--ui-shadow-05-x: 0;\r
|
|
1842
|
-
--ui-shadow-05-y: 16px;\r
|
|
1843
|
-
--ui-shadow-05-blur: 24px;\r
|
|
1844
|
-
--ui-shadow-05-Spread: -8px;\r
|
|
1845
|
-
--ui-shadow-01-Color: var(--ui-color-black-alpha-10);\r
|
|
1846
|
-
--ui-shadow-02-Color: var(--ui-color-black-alpha-20);\r
|
|
1847
|
-
--ui-shadow-03-Color: var(--ui-color-black-alpha-20);\r
|
|
1848
|
-
--ui-shadow-04-Color: var(--ui-color-black-alpha-30);\r
|
|
1849
|
-
--ui-shadow-05-Color: var(--ui-color-black-alpha-30);\r
|
|
1850
|
-
\r
|
|
1851
|
-
/* Z-index */\r
|
|
1852
|
-
--ui-z-hide: -1;\r
|
|
1853
|
-
--ui-z-base: 0;\r
|
|
1854
|
-
--ui-z-raised: 100;\r
|
|
1855
|
-
--ui-z-sticky: 200;\r
|
|
1856
|
-
--ui-z-shell: 300;\r
|
|
1857
|
-
--ui-z-dropdown: 400;\r
|
|
1858
|
-
--ui-z-popover: 500;\r
|
|
1859
|
-
--ui-z-tooltip: 600;\r
|
|
1860
|
-
--ui-z-modalBackdrop: 690;\r
|
|
1861
|
-
--ui-z-modal: 700;\r
|
|
1862
|
-
--ui-z-toast: 800;\r
|
|
1863
|
-
--ui-z-overlay: 900;\r
|
|
1864
|
-
--ui-z-max: 99999;\r
|
|
1865
|
-
\r
|
|
1866
|
-
/* Tipografía */\r
|
|
1867
|
-
--ui-font-family-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\r
|
|
1868
|
-
--ui-font-family-mono: "IBM Plex Mono";\r
|
|
1869
|
-
--ui-font-weight-regular: 400;\r
|
|
1870
|
-
--ui-font-weight-medium: 500;\r
|
|
1871
|
-
--ui-font-weight-semibold: 600;\r
|
|
1872
|
-
--ui-font-weight-bold: 700;\r
|
|
1873
|
-
\r
|
|
1874
|
-
/* Radios */\r
|
|
1875
|
-
--ui-radius_0: 0;\r
|
|
1876
|
-
--ui-radius_2: 2px;\r
|
|
1877
|
-
--ui-radius_4: 4px;\r
|
|
1878
|
-
--ui-radius_6: 6px;\r
|
|
1879
|
-
--ui-radius_8: 8px;\r
|
|
1880
|
-
--ui-radius_10: 10px;\r
|
|
1881
|
-
--ui-radius_12: 12px;\r
|
|
1882
|
-
--ui-radius_16: 16px;\r
|
|
1883
|
-
--ui-radius_24: 24px;\r
|
|
1884
|
-
--ui-radius_full: 9999px;\r
|
|
1885
|
-
\r
|
|
1886
|
-
/* Semánticos: texto */\r
|
|
1887
|
-
--ui-color-text-primary: var(--ui-color-dark-gray-700);\r
|
|
1888
|
-
--ui-color-text-secondary: var(--ui-color-dark-gray-300);\r
|
|
1889
|
-
--ui-color-text-tertiary: var(--ui-color-dark-gray-100);\r
|
|
1890
|
-
--ui-color-text-disabled: var(--ui-color-light-gray-500);\r
|
|
1891
|
-
--ui-color-text-on-color: var(--ui-color-white);\r
|
|
1892
|
-
--ui-color-text-danger-default: var(--ui-color-red-700);\r
|
|
1893
|
-
--ui-color-text-danger-hover: var(--ui-color-red-800);\r
|
|
1894
|
-
--ui-color-text-danger-pressed: var(--ui-color-red-900);\r
|
|
1895
|
-
\r
|
|
1896
|
-
/* Semánticos: bordes */\r
|
|
1897
|
-
--ui-color-border-default: var(--ui-color-light-gray-400);\r
|
|
1898
|
-
--ui-color-border-subtle: var(--ui-color-light-gray-300);\r
|
|
1899
|
-
--ui-color-border-strong: var(--ui-color-dark-gray-400);\r
|
|
1900
|
-
--ui-color-border-danger: var(--ui-color-red-500);\r
|
|
1901
|
-
\r
|
|
1902
|
-
/* Semánticos: superficies y fondos */\r
|
|
1903
|
-
--ui-color-bg-surface-default: var(--ui-color-white);\r
|
|
1904
|
-
--ui-color-bg-surface-secondary-default: var(--ui-color-light-gray-50);\r
|
|
1905
|
-
--ui-color-bg-surface-secondary-hover: var(--ui-color-light-gray-100);\r
|
|
1906
|
-
--ui-color-bg-fill-danger-default: var(--ui-color-red-500);\r
|
|
1907
|
-
--ui-color-bg-fill-danger-hover: var(--ui-color-red-600);\r
|
|
1908
|
-
--ui-color-bg-fill-danger-pressed: var(--ui-color-red-700);\r
|
|
1909
|
-
--ui-color-bg-fill-success-default: var(--ui-color-green-500);\r
|
|
1910
|
-
--ui-color-bg-fill-success-hover: var(--ui-color-green-600);\r
|
|
1911
|
-
--ui-color-bg-fill-success-pressed: var(--ui-color-green-700);\r
|
|
1912
|
-
--ui-color-bg-surface-success-default: var(--ui-color-green-50);\r
|
|
1913
|
-
--ui-color-bg-surface-success-hover: var(--ui-color-green-100);\r
|
|
1914
|
-
--ui-color-bg-surface-success-selected: var(--ui-color-green-200);\r
|
|
1915
|
-
--ui-color-bg-surface-danger-default: var(--ui-color-red-50);\r
|
|
1916
|
-
--ui-color-bg-surface-danger-hover: var(--ui-color-red-100);\r
|
|
1917
|
-
--ui-color-bg-surface-danger-selected: var(--ui-color-red-200);\r
|
|
1918
|
-
--ui-color-bg-surface-warning-default: var(--ui-color-yellow-50);\r
|
|
1919
|
-
--ui-color-bg-surface-warning-hover: var(--ui-color-yellow-100);\r
|
|
1920
|
-
--ui-color-bg-surface-warning-selected: var(--ui-color-yellow-200);\r
|
|
1921
|
-
\r
|
|
1922
|
-
/* Espaciado (space) */\r
|
|
1923
|
-
--ui-Positive-space_0: var(--ui-positive-Value_0);\r
|
|
1924
|
-
--ui-Positive-space_2: var(--ui-positive-Value_100);\r
|
|
1925
|
-
--ui-Positive-space_4: var(--ui-positive-Value_100);\r
|
|
1926
|
-
--ui-Positive-space_6: var(--ui-positive-Value_150);\r
|
|
1927
|
-
--ui-Positive-space_8: var(--ui-positive-Value_200);\r
|
|
1928
|
-
--ui-Positive-space_10: var(--ui-positive-Value_250);\r
|
|
1929
|
-
--ui-Positive-space_12: var(--ui-positive-Value_300);\r
|
|
1930
|
-
--ui-Positive-space_16: var(--ui-positive-Value_400);\r
|
|
1931
|
-
--ui-Positive-space_20: var(--ui-positive-Value_500);\r
|
|
1932
|
-
--ui-Positive-space_24: var(--ui-positive-Value_600);\r
|
|
1933
|
-
--ui-Positive-space_28: var(--ui-positive-Value_700);\r
|
|
1934
|
-
--ui-Positive-space_32: var(--ui-positive-Value_800);\r
|
|
1935
|
-
--ui-Positive-space_40: var(--ui-positive-Value_1000);\r
|
|
1936
|
-
--ui-Positive-space_48: var(--ui-positive-Value_1200);\r
|
|
1937
|
-
--ui-Positive-space_56: var(--ui-positive-Value_1400);\r
|
|
1938
|
-
--ui-Positive-space_64: var(--ui-positive-Value_1600);\r
|
|
1939
|
-
--ui-Positive-space_80: var(--ui-positive-Value_2000);\r
|
|
1940
|
-
--ui-Positive-space_96: var(--ui-positive-Value_2400);\r
|
|
1941
|
-
\r
|
|
1942
|
-
/* Tamaños de fuente */\r
|
|
1943
|
-
--ui-font-size-2xs: var(--ui-positive-Value_250);\r
|
|
1944
|
-
--ui-font-size-xs: var(--ui-positive-Value_300);\r
|
|
1945
|
-
--ui-font-size-sm: var(--ui-positive-Value_350);\r
|
|
1946
|
-
--ui-font-size-md: var(--ui-positive-Value_400);\r
|
|
1947
|
-
--ui-font-size-lg: var(--ui-positive-Value_450);\r
|
|
1948
|
-
--ui-font-size-xl: var(--ui-positive-Value_500);\r
|
|
1949
|
-
--ui-font-size-2xl: var(--ui-positive-Value_600);\r
|
|
1950
|
-
--ui-font-size-3xl: var(--ui-positive-Value_750);\r
|
|
1951
|
-
--ui-font-size-4xl: var(--ui-positive-Value_900);\r
|
|
1952
|
-
--ui-font-size-5xl: var(--ui-positive-Value_1200);\r
|
|
1953
|
-
\r
|
|
1954
|
-
/* Line height (muestra) */\r
|
|
1955
|
-
--ui-font-lh-10-normal: 14.5px;\r
|
|
1956
|
-
--ui-font-lh-12-normal: 17.5px;\r
|
|
1957
|
-
--ui-font-lh-14-normal: 20.5px;\r
|
|
1958
|
-
--ui-font-lh-16-normal: 23px;\r
|
|
1959
|
-
--ui-font-lh-18-normal: 26px;\r
|
|
1960
|
-
--ui-font-lh-20-snug: 25px;\r
|
|
1961
|
-
\r
|
|
1962
|
-
/* Sombras compuestas (para uso en box-shadow) */\r
|
|
1963
|
-
--ui-shadow-card: 0 4px 16px var(--ui-shadow-01-Color);\r
|
|
1964
|
-
--ui-shadow-popover: 0 var(--ui-shadow-02-y) var(--ui-shadow-02-blur) var(--ui-shadow-02-Color);\r
|
|
1965
|
-
--ui-shadow-modal: 0 var(--ui-shadow-04-y) var(--ui-shadow-04-blur) var(--ui-shadow-04-Color);\r
|
|
1966
|
-
}\r
|
|
1967
1990
|
`;
|
|
1968
|
-
function Ao(
|
|
1991
|
+
function Ao(r, t, o) {
|
|
1969
1992
|
const i = j(() => {
|
|
1970
|
-
|
|
1971
|
-
}, [
|
|
1972
|
-
|
|
1973
|
-
if (!
|
|
1993
|
+
r && o((a) => !a);
|
|
1994
|
+
}, [r, o]);
|
|
1995
|
+
A(() => {
|
|
1996
|
+
if (!r) return;
|
|
1974
1997
|
const a = (s) => {
|
|
1975
1998
|
(s.key === "r" || s.key === "R" || s.code === "KeyR") && s.shiftKey && !s.ctrlKey && !s.metaKey && (s.preventDefault(), i());
|
|
1976
1999
|
};
|
|
1977
2000
|
return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
|
|
1978
|
-
}, [
|
|
2001
|
+
}, [r, i]);
|
|
1979
2002
|
}
|
|
1980
2003
|
const Fo = "review_layer:v1:";
|
|
1981
|
-
function No(
|
|
1982
|
-
if (
|
|
2004
|
+
function No(r, t) {
|
|
2005
|
+
if (r == null) return t;
|
|
1983
2006
|
try {
|
|
1984
|
-
return JSON.parse(
|
|
2007
|
+
return JSON.parse(r) ?? t;
|
|
1985
2008
|
} catch {
|
|
1986
2009
|
return t;
|
|
1987
2010
|
}
|
|
1988
2011
|
}
|
|
1989
|
-
function
|
|
1990
|
-
const a = `${Fo}${$o(
|
|
2012
|
+
function Se(r, t, o, i) {
|
|
2013
|
+
const a = `${Fo}${$o(r)}:${o}`;
|
|
1991
2014
|
return i != null ? `${a}:${i}` : a;
|
|
1992
2015
|
}
|
|
1993
|
-
function $o(
|
|
1994
|
-
return
|
|
2016
|
+
function $o(r) {
|
|
2017
|
+
return r.replace(/\/+$/, "") || "/";
|
|
1995
2018
|
}
|
|
1996
|
-
function
|
|
2019
|
+
function vr(r) {
|
|
1997
2020
|
if (typeof localStorage > "u") return null;
|
|
1998
|
-
const t = localStorage.getItem(
|
|
2021
|
+
const t = localStorage.getItem(r);
|
|
1999
2022
|
return No(t, null);
|
|
2000
2023
|
}
|
|
2001
|
-
function
|
|
2024
|
+
function pr(r, t) {
|
|
2002
2025
|
if (!(typeof localStorage > "u"))
|
|
2003
2026
|
try {
|
|
2004
|
-
localStorage.setItem(
|
|
2027
|
+
localStorage.setItem(r, JSON.stringify({ data: t, at: Date.now() }));
|
|
2005
2028
|
} catch {
|
|
2006
2029
|
}
|
|
2007
2030
|
}
|
|
2008
|
-
function
|
|
2009
|
-
const i =
|
|
2031
|
+
function Le(r, t, o) {
|
|
2032
|
+
const i = vr(Se(r, t, "comments", o));
|
|
2010
2033
|
return (i == null ? void 0 : i.data) ?? null;
|
|
2011
2034
|
}
|
|
2012
|
-
function Mo(
|
|
2013
|
-
|
|
2035
|
+
function Mo(r, t, o, i) {
|
|
2036
|
+
pr(Se(r, t, "comments", o), i);
|
|
2014
2037
|
}
|
|
2015
|
-
function
|
|
2016
|
-
const o =
|
|
2038
|
+
function ar(r, t) {
|
|
2039
|
+
const o = vr(Se(r, t, "reviewers"));
|
|
2017
2040
|
return (o == null ? void 0 : o.data) ?? null;
|
|
2018
2041
|
}
|
|
2019
|
-
function Wo(
|
|
2020
|
-
|
|
2042
|
+
function Wo(r, t, o) {
|
|
2043
|
+
pr(Se(r, t, "reviewers"), o);
|
|
2021
2044
|
}
|
|
2022
2045
|
const Bo = "https://review-layer-api.onrender.com/api";
|
|
2023
|
-
function
|
|
2046
|
+
function ur() {
|
|
2024
2047
|
return typeof window > "u" ? "/" : window.location.pathname || "/";
|
|
2025
2048
|
}
|
|
2026
|
-
const
|
|
2027
|
-
let
|
|
2049
|
+
const gr = Mr(null);
|
|
2050
|
+
let ze = null;
|
|
2028
2051
|
function Go() {
|
|
2029
|
-
const
|
|
2030
|
-
if (!
|
|
2052
|
+
const r = Wr(gr);
|
|
2053
|
+
if (!r)
|
|
2031
2054
|
throw new Error("useReview must be used within ReviewProvider");
|
|
2032
|
-
return
|
|
2055
|
+
return r;
|
|
2033
2056
|
}
|
|
2034
2057
|
function Ho({
|
|
2035
|
-
children:
|
|
2058
|
+
children: r,
|
|
2036
2059
|
enabled: t = !0,
|
|
2037
2060
|
apiUrl: o,
|
|
2038
2061
|
apiKey: i
|
|
2039
2062
|
}) {
|
|
2040
|
-
const a = (o == null ? void 0 : o.trim()) || Bo, [s,
|
|
2041
|
-
Ao(t, s,
|
|
2042
|
-
const
|
|
2063
|
+
const a = (o == null ? void 0 : o.trim()) || Bo, [s, p] = F(!1), [g, d] = F([]), [w, h] = F([]), [y, P] = F(!1);
|
|
2064
|
+
Ao(t, s, p);
|
|
2065
|
+
const k = j(
|
|
2043
2066
|
async (c) => {
|
|
2044
2067
|
if (!(!t || !a || !i))
|
|
2045
2068
|
try {
|
|
2046
|
-
const
|
|
2047
|
-
c != null && c.aborted || (d(
|
|
2048
|
-
} catch (
|
|
2049
|
-
if (
|
|
2069
|
+
const f = await qr(a, i, { signal: c });
|
|
2070
|
+
c != null && c.aborted || (d(f), Wo(a, i, f));
|
|
2071
|
+
} catch (f) {
|
|
2072
|
+
if (f instanceof Error && f.name === "AbortError") return;
|
|
2050
2073
|
if (!(c != null && c.aborted)) {
|
|
2051
|
-
const I =
|
|
2074
|
+
const I = ar(a, i);
|
|
2052
2075
|
I != null && d(I);
|
|
2053
2076
|
}
|
|
2054
2077
|
}
|
|
@@ -2057,68 +2080,68 @@ function Ho({
|
|
|
2057
2080
|
), V = j(
|
|
2058
2081
|
async (c) => {
|
|
2059
2082
|
if (!t || !a || !i) return;
|
|
2060
|
-
const
|
|
2061
|
-
I != null &&
|
|
2083
|
+
const f = ur(), I = Le(a, i, f);
|
|
2084
|
+
I != null && h(I);
|
|
2062
2085
|
try {
|
|
2063
2086
|
P(!1);
|
|
2064
|
-
const N = await
|
|
2065
|
-
c != null && c.aborted || (
|
|
2087
|
+
const N = await Qr(a, i, f, { signal: c });
|
|
2088
|
+
c != null && c.aborted || (h(N), Mo(a, i, f, N));
|
|
2066
2089
|
} catch (N) {
|
|
2067
2090
|
if (N instanceof Error && N.name === "AbortError") return;
|
|
2068
2091
|
if (!(c != null && c.aborted)) {
|
|
2069
2092
|
P(!0);
|
|
2070
|
-
const H =
|
|
2071
|
-
H != null &&
|
|
2093
|
+
const H = Le(a, i, f);
|
|
2094
|
+
H != null && h(H);
|
|
2072
2095
|
}
|
|
2073
2096
|
}
|
|
2074
2097
|
},
|
|
2075
2098
|
[t, a, i]
|
|
2076
2099
|
);
|
|
2077
|
-
|
|
2100
|
+
A(() => {
|
|
2078
2101
|
if (!t || !a || !i) return;
|
|
2079
|
-
const c =
|
|
2080
|
-
|
|
2081
|
-
}, [t, a, i]),
|
|
2102
|
+
const c = ur(), f = ar(a, i), I = Le(a, i, c);
|
|
2103
|
+
f != null && d(f), I != null && h(I);
|
|
2104
|
+
}, [t, a, i]), A(() => {
|
|
2082
2105
|
if (typeof document > "u") return;
|
|
2083
2106
|
const c = "review-layer-ui-variables";
|
|
2084
2107
|
if (!document.getElementById(c)) {
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2108
|
+
const f = document.createElement("style");
|
|
2109
|
+
f.id = c, f.textContent = zo, document.head.appendChild(f);
|
|
2087
2110
|
}
|
|
2088
|
-
}, []),
|
|
2111
|
+
}, []), A(() => {
|
|
2089
2112
|
if (!t || !a || !i) return;
|
|
2090
2113
|
const c = `${a}:${i}`;
|
|
2091
|
-
if (
|
|
2092
|
-
return
|
|
2114
|
+
if (ze !== c)
|
|
2115
|
+
return ze = c, k(), V(), () => {
|
|
2093
2116
|
setTimeout(() => {
|
|
2094
|
-
|
|
2117
|
+
ze = null;
|
|
2095
2118
|
}, 0);
|
|
2096
2119
|
};
|
|
2097
|
-
}, [t, a, i,
|
|
2120
|
+
}, [t, a, i, k, V]), A(() => {
|
|
2098
2121
|
if (!t) return;
|
|
2099
2122
|
const c = () => V();
|
|
2100
2123
|
return window.addEventListener("popstate", c), () => window.removeEventListener("popstate", c);
|
|
2101
2124
|
}, [t, V]);
|
|
2102
|
-
const $ =
|
|
2125
|
+
const $ = Ne(
|
|
2103
2126
|
() => ({
|
|
2104
2127
|
apiUrl: a,
|
|
2105
2128
|
apiKey: i,
|
|
2106
2129
|
reviewMode: s,
|
|
2107
|
-
setReviewMode:
|
|
2130
|
+
setReviewMode: p,
|
|
2108
2131
|
reviewers: g,
|
|
2109
2132
|
comments: w,
|
|
2110
2133
|
loadComments: V,
|
|
2111
2134
|
commentsLoadFailed: y
|
|
2112
2135
|
}),
|
|
2113
|
-
[a, i, s,
|
|
2114
|
-
),
|
|
2136
|
+
[a, i, s, p, g, w, V, y]
|
|
2137
|
+
), z = t && typeof document < "u" ? sr(
|
|
2115
2138
|
/* @__PURE__ */ l.jsx(
|
|
2116
2139
|
Lo,
|
|
2117
2140
|
{
|
|
2118
2141
|
apiUrl: a,
|
|
2119
2142
|
apiKey: i,
|
|
2120
2143
|
reviewMode: s,
|
|
2121
|
-
setReviewMode:
|
|
2144
|
+
setReviewMode: p,
|
|
2122
2145
|
reviewers: g,
|
|
2123
2146
|
comments: w,
|
|
2124
2147
|
loadComments: V,
|
|
@@ -2127,9 +2150,9 @@ function Ho({
|
|
|
2127
2150
|
),
|
|
2128
2151
|
document.body
|
|
2129
2152
|
) : null;
|
|
2130
|
-
return /* @__PURE__ */ l.jsxs(
|
|
2131
|
-
|
|
2132
|
-
|
|
2153
|
+
return /* @__PURE__ */ l.jsxs(gr.Provider, { value: $, children: [
|
|
2154
|
+
r,
|
|
2155
|
+
z
|
|
2133
2156
|
] });
|
|
2134
2157
|
}
|
|
2135
2158
|
export {
|