@bitux/review-layer-react 0.1.5 → 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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
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
3
|
var Ae = { exports: {} }, le = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
@@ -10,17 +10,17 @@ var Ae = { exports: {} }, le = {};
|
|
|
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
|
|
13
|
+
var rr;
|
|
14
14
|
function Br() {
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var r =
|
|
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
18
|
function p(g, d, w) {
|
|
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:
|
|
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
25
|
return le.Fragment = o, le.jsx = p, le.jsxs = p, le;
|
|
26
26
|
}
|
|
@@ -34,11 +34,11 @@ var se = {};
|
|
|
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
|
|
37
|
+
var or;
|
|
38
38
|
function Yr() {
|
|
39
|
-
return
|
|
40
|
-
var r =
|
|
41
|
-
function
|
|
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
42
|
if (e === null || typeof e != "object")
|
|
43
43
|
return null;
|
|
44
44
|
var n = V && e[V] || e[$];
|
|
@@ -56,29 +56,29 @@ function Yr() {
|
|
|
56
56
|
{
|
|
57
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
65
|
var N = !1, H = !1, re = !1, oe = !1, te = !1, X;
|
|
66
66
|
X = Symbol.for("react.module.reference");
|
|
67
67
|
function m(e) {
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e === i || e === s || te || e === a || e === w || 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
|
|
74
|
+
function R(e, n, u) {
|
|
75
75
|
var v = e.displayName;
|
|
76
76
|
if (v)
|
|
77
77
|
return v;
|
|
78
78
|
var E = n.displayName || n.name || "";
|
|
79
79
|
return E !== "" ? u + "(" + E + ")" : u;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function O(e) {
|
|
82
82
|
return e.displayName || "Context";
|
|
83
83
|
}
|
|
84
84
|
function T(e) {
|
|
@@ -99,26 +99,26 @@ function Yr() {
|
|
|
99
99
|
return "StrictMode";
|
|
100
100
|
case w:
|
|
101
101
|
return "Suspense";
|
|
102
|
-
case
|
|
102
|
+
case h:
|
|
103
103
|
return "SuspenseList";
|
|
104
104
|
}
|
|
105
105
|
if (typeof e == "object")
|
|
106
106
|
switch (e.$$typeof) {
|
|
107
107
|
case g:
|
|
108
108
|
var n = e;
|
|
109
|
-
return
|
|
109
|
+
return O(n) + ".Consumer";
|
|
110
110
|
case p:
|
|
111
111
|
var u = e;
|
|
112
|
-
return
|
|
112
|
+
return O(u._context) + ".Provider";
|
|
113
113
|
case d:
|
|
114
|
-
return
|
|
114
|
+
return R(e, e.render, "ForwardRef");
|
|
115
115
|
case y:
|
|
116
116
|
var v = e.displayName || null;
|
|
117
117
|
return v !== null ? v : T(e.type) || "Memo";
|
|
118
118
|
case P: {
|
|
119
|
-
var E = 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
|
}
|
|
@@ -207,7 +207,7 @@ function Yr() {
|
|
|
207
207
|
var br = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
208
|
be = new br();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function $e(e, n) {
|
|
211
211
|
if (!e || Pe)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
@@ -219,31 +219,31 @@ function Yr() {
|
|
|
219
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(e, [],
|
|
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
|
-
e.call(
|
|
246
|
+
e.call(x.prototype);
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
@@ -257,29 +257,29 @@ function Yr() {
|
|
|
257
257
|
if (W && v && typeof W.stack == "string") {
|
|
258
258
|
for (var b = W.stack.split(`
|
|
259
259
|
`), M = v.stack.split(`
|
|
260
|
-
`), D = b.length - 1,
|
|
261
|
-
|
|
262
|
-
for (; D >= 1 &&
|
|
263
|
-
if (b[D] !== M[
|
|
264
|
-
if (D !== 1 ||
|
|
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
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
|
-
Pe = !1, ke.current =
|
|
276
|
+
Pe = !1, ke.current = S, pe(), Error.prepareStackTrace = E;
|
|
277
277
|
}
|
|
278
278
|
var K = e ? e.displayName || e.name : "", Z = K ? ge(K) : "";
|
|
279
279
|
return typeof e == "function" && be.set(e, Z), Z;
|
|
280
280
|
}
|
|
281
281
|
function hr(e, n, u) {
|
|
282
|
-
return
|
|
282
|
+
return $e(e, !1);
|
|
283
283
|
}
|
|
284
284
|
function xr(e) {
|
|
285
285
|
var n = e.prototype;
|
|
@@ -289,13 +289,13 @@ function Yr() {
|
|
|
289
289
|
if (e == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof e == "function")
|
|
292
|
-
return
|
|
292
|
+
return $e(e, xr(e));
|
|
293
293
|
if (typeof e == "string")
|
|
294
294
|
return ge(e);
|
|
295
295
|
switch (e) {
|
|
296
296
|
case w:
|
|
297
297
|
return ge("Suspense");
|
|
298
|
-
case
|
|
298
|
+
case h:
|
|
299
299
|
return ge("SuspenseList");
|
|
300
300
|
}
|
|
301
301
|
if (typeof e == "object")
|
|
@@ -305,39 +305,39 @@ function Yr() {
|
|
|
305
305
|
case y:
|
|
306
306
|
return he(e.type, n, u);
|
|
307
307
|
case P: {
|
|
308
|
-
var v = e, E = v._payload,
|
|
308
|
+
var v = e, E = v._payload, S = v._init;
|
|
309
309
|
try {
|
|
310
|
-
return he(
|
|
310
|
+
return he(S(E), n, u);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var ue = Object.prototype.hasOwnProperty,
|
|
317
|
+
var ue = Object.prototype.hasOwnProperty, Me = {}, We = c.ReactDebugCurrentFrame;
|
|
318
318
|
function xe(e) {
|
|
319
319
|
if (e) {
|
|
320
320
|
var n = e._owner, u = he(e.type, e._source, n ? n.type : null);
|
|
321
|
-
|
|
321
|
+
We.setExtraStackFrame(u);
|
|
322
322
|
} else
|
|
323
|
-
|
|
323
|
+
We.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
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 e[
|
|
333
|
-
var M = Error((v || "React class") + ": " + u + " type `" +
|
|
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 = e[
|
|
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) && (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,
|
|
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
|
}
|
|
@@ -353,24 +353,24 @@ function Yr() {
|
|
|
353
353
|
}
|
|
354
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
|
|
361
|
+
function Be(e) {
|
|
362
362
|
return "" + e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Ye(e) {
|
|
365
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)),
|
|
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
|
-
},
|
|
373
|
+
}, Ge, He;
|
|
374
374
|
function Rr(e) {
|
|
375
375
|
if (ue.call(e, "ref")) {
|
|
376
376
|
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -388,12 +388,12 @@ function Yr() {
|
|
|
388
388
|
return e.key !== void 0;
|
|
389
389
|
}
|
|
390
390
|
function kr(e, n) {
|
|
391
|
-
typeof e.ref == "string" &&
|
|
391
|
+
typeof e.ref == "string" && Ue.current;
|
|
392
392
|
}
|
|
393
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
398
|
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
399
|
get: u,
|
|
@@ -404,7 +404,7 @@ function Yr() {
|
|
|
404
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
409
|
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
410
|
get: u,
|
|
@@ -412,7 +412,7 @@ function Yr() {
|
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var jr = function(e, n, u, v, E,
|
|
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,
|
|
@@ -420,9 +420,9 @@ function Yr() {
|
|
|
420
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,
|
|
@@ -443,36 +443,36 @@ function Yr() {
|
|
|
443
443
|
};
|
|
444
444
|
function Vr(e, n, u, v, E) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
u !== void 0 && (
|
|
448
|
-
for (
|
|
449
|
-
ue.call(n,
|
|
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
450
|
if (e && e.defaultProps) {
|
|
451
451
|
var D = e.defaultProps;
|
|
452
|
-
for (
|
|
453
|
-
|
|
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 && Cr(
|
|
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 jr(e, b, M, E, v,
|
|
459
|
+
return jr(e, b, M, E, v, Ue.current, x);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var Ve = c.ReactCurrentOwner,
|
|
462
|
+
var Ve = c.ReactCurrentOwner, Xe = c.ReactDebugCurrentFrame;
|
|
463
463
|
function Q(e) {
|
|
464
464
|
if (e) {
|
|
465
465
|
var n = e._owner, u = he(e.type, e._source, n ? n.type : null);
|
|
466
|
-
|
|
466
|
+
Xe.setExtraStackFrame(u);
|
|
467
467
|
} else
|
|
468
|
-
|
|
468
|
+
Xe.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
470
|
var Te;
|
|
471
471
|
Te = !1;
|
|
472
472
|
function De(e) {
|
|
473
473
|
return typeof e == "object" && e !== null && e.$$typeof === t;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Je() {
|
|
476
476
|
{
|
|
477
477
|
if (Ve.current) {
|
|
478
478
|
var e = T(Ve.current.type);
|
|
@@ -487,10 +487,10 @@ Check the render method of \`` + e + "`.";
|
|
|
487
487
|
function Tr(e) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
|
-
var
|
|
490
|
+
var qe = {};
|
|
491
491
|
function Dr(e) {
|
|
492
492
|
{
|
|
493
|
-
var n =
|
|
493
|
+
var n = Je();
|
|
494
494
|
if (!n) {
|
|
495
495
|
var u = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
496
|
u && (n = `
|
|
@@ -500,35 +500,35 @@ 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
505
|
if (!e._store || e._store.validated || e.key != null)
|
|
506
506
|
return;
|
|
507
507
|
e._store.validated = !0;
|
|
508
508
|
var u = Dr(n);
|
|
509
|
-
if (
|
|
509
|
+
if (qe[u])
|
|
510
510
|
return;
|
|
511
|
-
|
|
511
|
+
qe[u] = !0;
|
|
512
512
|
var v = "";
|
|
513
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
518
|
if (typeof e != "object")
|
|
519
519
|
return;
|
|
520
520
|
if (je(e))
|
|
521
521
|
for (var u = 0; u < e.length; u++) {
|
|
522
522
|
var v = e[u];
|
|
523
|
-
De(v) &&
|
|
523
|
+
De(v) && Ze(v, n);
|
|
524
524
|
}
|
|
525
525
|
else if (De(e))
|
|
526
526
|
e._store && (e._store.validated = !0);
|
|
527
527
|
else if (e) {
|
|
528
|
-
var E =
|
|
528
|
+
var E = z(e);
|
|
529
529
|
if (typeof E == "function" && E !== e.entries)
|
|
530
|
-
for (var
|
|
531
|
-
De(
|
|
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
|
}
|
|
@@ -569,56 +569,56 @@ Check the top-level render call using <` + u + ">.");
|
|
|
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
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
579
|
var M = Tr();
|
|
580
|
-
M ? b += M : b +=
|
|
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
590
|
if (v)
|
|
591
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
600
|
if (ue.call(n, "key")) {
|
|
601
601
|
var Z = T(e), W = Object.keys(n).filter(function($r) {
|
|
602
602
|
return $r !== "key";
|
|
603
603
|
}), Ie = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
-
if (!
|
|
604
|
+
if (!Ke[Z + Ie]) {
|
|
605
605
|
var Nr = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
|
|
606
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} />`, Ie, Z, Nr, Z),
|
|
611
|
+
<%s key={someKey} {...props} />`, Ie, Z, Nr, Z), Ke[Z + Ie] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return e === i ? Or(
|
|
614
|
+
return e === i ? Or(L) : Ir(L), L;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
function Lr(e, n, u) {
|
|
618
|
-
return
|
|
618
|
+
return er(e, n, u, !0);
|
|
619
619
|
}
|
|
620
620
|
function zr(e, n, u) {
|
|
621
|
-
return
|
|
621
|
+
return er(e, n, u, !1);
|
|
622
622
|
}
|
|
623
623
|
var Ar = zr, Fr = Lr;
|
|
624
624
|
se.Fragment = i, se.jsx = Ar, se.jsxs = Fr;
|
|
@@ -669,7 +669,7 @@ function Fe(r, t, o = Hr) {
|
|
|
669
669
|
y: Math.max(a, Math.min(p, t))
|
|
670
670
|
};
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function cr(r) {
|
|
673
673
|
var t;
|
|
674
674
|
if (typeof document > "u" || !(r != null && r.trim())) return null;
|
|
675
675
|
try {
|
|
@@ -688,7 +688,7 @@ function Xr(r) {
|
|
|
688
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
694
|
x: r.x ?? 0,
|
|
@@ -704,19 +704,16 @@ function Ne(r) {
|
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
706
|
function Jr(r) {
|
|
707
|
-
const { x: t, y: o } =
|
|
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
710
|
function we(r) {
|
|
711
|
-
const t = (r.relativeX ?? r.relative_x) != null && (r.relativeY ?? r.relative_y) != null, o = r.x != null && r.y != null;
|
|
712
|
-
if (t || o)
|
|
713
|
-
return Ne(r);
|
|
714
711
|
if (r.selector) {
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
717
|
-
return { x:
|
|
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
718
|
const C = {
|
|
722
719
|
PENDING: "pending",
|
|
@@ -812,7 +809,7 @@ const ro = {
|
|
|
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)",
|
|
@@ -831,12 +828,12 @@ function io({
|
|
|
831
828
|
onClose: s,
|
|
832
829
|
onSuccess: p
|
|
833
830
|
}) {
|
|
834
|
-
var
|
|
835
|
-
const [g, d] = F(""), [w,
|
|
836
|
-
((
|
|
837
|
-
), [y, P] = F(!1), [
|
|
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) => {
|
|
@@ -857,7 +854,7 @@ function io({
|
|
|
857
854
|
},
|
|
858
855
|
[r, t, a, g, w, p, s]
|
|
859
856
|
);
|
|
860
|
-
return
|
|
857
|
+
return A(() => {
|
|
861
858
|
const c = (f) => {
|
|
862
859
|
f.key === "Escape" && (f.preventDefault(), s());
|
|
863
860
|
};
|
|
@@ -896,7 +893,7 @@ function io({
|
|
|
896
893
|
"select",
|
|
897
894
|
{
|
|
898
895
|
value: w,
|
|
899
|
-
onChange: (c) =>
|
|
896
|
+
onChange: (c) => h(Number(c.target.value)),
|
|
900
897
|
style: no,
|
|
901
898
|
required: !0,
|
|
902
899
|
disabled: o.length === 0,
|
|
@@ -906,7 +903,7 @@ function io({
|
|
|
906
903
|
]
|
|
907
904
|
}
|
|
908
905
|
),
|
|
909
|
-
|
|
906
|
+
k && /* @__PURE__ */ l.jsx(
|
|
910
907
|
"div",
|
|
911
908
|
{
|
|
912
909
|
style: {
|
|
@@ -914,7 +911,7 @@ function io({
|
|
|
914
911
|
fontSize: "var(--ui-font-size-xs, 12px)",
|
|
915
912
|
marginBottom: "var(--ui-positive-Value_200, 8px)"
|
|
916
913
|
},
|
|
917
|
-
children:
|
|
914
|
+
children: k
|
|
918
915
|
}
|
|
919
916
|
),
|
|
920
917
|
/* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: "var(--ui-positive-Value_200, 8px)" }, children: [
|
|
@@ -924,7 +921,7 @@ function io({
|
|
|
924
921
|
type: "button",
|
|
925
922
|
onClick: s,
|
|
926
923
|
style: {
|
|
927
|
-
...
|
|
924
|
+
...tr,
|
|
928
925
|
backgroundColor: "var(--ui-color-bg-fill-secondary-default, #f0f0f0)",
|
|
929
926
|
color: "var(--ui-color-text-primary, #333)"
|
|
930
927
|
},
|
|
@@ -935,7 +932,7 @@ function io({
|
|
|
935
932
|
"button",
|
|
936
933
|
{
|
|
937
934
|
type: "submit",
|
|
938
|
-
style:
|
|
935
|
+
style: tr,
|
|
939
936
|
disabled: y || o.length === 0,
|
|
940
937
|
children: y ? "Enviando..." : "Enviar comentario"
|
|
941
938
|
}
|
|
@@ -968,7 +965,7 @@ const so = Re(function({
|
|
|
968
965
|
p(null);
|
|
969
966
|
return;
|
|
970
967
|
}
|
|
971
|
-
const d = t != null && t.trim() ?
|
|
968
|
+
const d = t != null && t.trim() ? cr(t) : null;
|
|
972
969
|
if (d) {
|
|
973
970
|
p(d);
|
|
974
971
|
return;
|
|
@@ -979,9 +976,9 @@ const so = Re(function({
|
|
|
979
976
|
}
|
|
980
977
|
p(null);
|
|
981
978
|
}, [t, o, i]);
|
|
982
|
-
return
|
|
979
|
+
return A(() => {
|
|
983
980
|
g();
|
|
984
|
-
}, [g]),
|
|
981
|
+
}, [g]), A(() => {
|
|
985
982
|
if (o)
|
|
986
983
|
return window.addEventListener("scroll", g, !0), window.addEventListener("resize", g), () => {
|
|
987
984
|
window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g);
|
|
@@ -999,7 +996,7 @@ const so = Re(function({
|
|
|
999
996
|
}
|
|
1000
997
|
}
|
|
1001
998
|
);
|
|
1002
|
-
}), _e = 32,
|
|
999
|
+
}), _e = 32, nr = 150, Oe = 250, B = {
|
|
1003
1000
|
cardBg: "var(--ui-color-bg-surface-default, #ffffff)",
|
|
1004
1001
|
cardFooterBg: "var(--ui-color-bg-surface-secondary-default, #f8fafc)",
|
|
1005
1002
|
textDark: "var(--ui-color-text-primary, #333333)",
|
|
@@ -1018,7 +1015,7 @@ const so = Re(function({
|
|
|
1018
1015
|
[C.PENDING]: "var(--ui-color-red-500, rgb(240, 69, 69))",
|
|
1019
1016
|
[C.DEV_FIXED]: "var(--ui-color-yellow-500, rgb(235, 179, 8))",
|
|
1020
1017
|
[C.VALIDATED]: "var(--ui-color-green-500, rgb(33, 196, 94))"
|
|
1021
|
-
},
|
|
1018
|
+
}, ir = {
|
|
1022
1019
|
[C.PENDING]: "var(--ui-color-bg-surface-danger-default, #fef2f2)",
|
|
1023
1020
|
[C.DEV_FIXED]: "var(--ui-color-bg-surface-warning-default, #fffbeb)",
|
|
1024
1021
|
[C.VALIDATED]: "var(--ui-color-bg-surface-success-default, #f0fdf4)"
|
|
@@ -1150,7 +1147,7 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1150
1147
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1151
1148
|
textTransform: "uppercase",
|
|
1152
1149
|
letterSpacing: "0.02em",
|
|
1153
|
-
backgroundColor:
|
|
1150
|
+
backgroundColor: ir[r] ?? ir[C.PENDING],
|
|
1154
1151
|
color: t,
|
|
1155
1152
|
border: `1px solid ${t}`
|
|
1156
1153
|
};
|
|
@@ -1216,31 +1213,31 @@ function jo({
|
|
|
1216
1213
|
reviewMode: s = !1
|
|
1217
1214
|
}) {
|
|
1218
1215
|
var ne, ie;
|
|
1219
|
-
const [p, g] = F(!1), [d, w] = F(!1), [
|
|
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(() => {
|
|
1220
1217
|
y(we(r));
|
|
1221
1218
|
}, [r]);
|
|
1222
|
-
|
|
1219
|
+
A(() => {
|
|
1223
1220
|
I();
|
|
1224
|
-
}, [I]),
|
|
1221
|
+
}, [I]), A(() => {
|
|
1225
1222
|
if (!(typeof window > "u"))
|
|
1226
1223
|
return window.addEventListener("scroll", I, !0), window.addEventListener("resize", I), () => {
|
|
1227
1224
|
window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I);
|
|
1228
1225
|
};
|
|
1229
1226
|
}, [I]);
|
|
1230
1227
|
const N = j(() => {
|
|
1231
|
-
|
|
1228
|
+
z.current !== null && (clearTimeout(z.current), z.current = null);
|
|
1232
1229
|
}, []), H = j(() => {
|
|
1233
1230
|
s || (N(), g(!0));
|
|
1234
1231
|
}, [s, N]), re = j(() => {
|
|
1235
|
-
d || (
|
|
1236
|
-
|
|
1237
|
-
},
|
|
1232
|
+
d || (z.current = setTimeout(() => {
|
|
1233
|
+
z.current = null, g(!1);
|
|
1234
|
+
}, nr));
|
|
1238
1235
|
}, [d]), oe = j(() => {
|
|
1239
1236
|
N(), g(!0);
|
|
1240
1237
|
}, [N]), te = j(() => {
|
|
1241
|
-
d || (
|
|
1242
|
-
|
|
1243
|
-
},
|
|
1238
|
+
d || (z.current = setTimeout(() => {
|
|
1239
|
+
z.current = null, g(!1);
|
|
1240
|
+
}, nr));
|
|
1244
1241
|
}, [d]), X = j(() => {
|
|
1245
1242
|
if (s) {
|
|
1246
1243
|
d && (w(!1), g(!1));
|
|
@@ -1248,7 +1245,7 @@ function jo({
|
|
|
1248
1245
|
}
|
|
1249
1246
|
d ? (w(!1), g(!1)) : (w(!0), g(!0));
|
|
1250
1247
|
}, [s, d]);
|
|
1251
|
-
|
|
1248
|
+
A(() => {
|
|
1252
1249
|
if (!d) return;
|
|
1253
1250
|
const _ = (q) => {
|
|
1254
1251
|
var ve, pe;
|
|
@@ -1256,37 +1253,37 @@ function jo({
|
|
|
1256
1253
|
(ve = c.current) != null && ve.contains(ae) || (pe = f.current) != null && pe.contains(ae) || (w(!1), g(!1));
|
|
1257
1254
|
};
|
|
1258
1255
|
return document.addEventListener("mousedown", _, !0), () => document.removeEventListener("mousedown", _, !0);
|
|
1259
|
-
}, [d]),
|
|
1256
|
+
}, [d]), A(() => () => N(), [N]), A(() => {
|
|
1260
1257
|
s && (w(!1), g(!1));
|
|
1261
1258
|
}, [s]);
|
|
1262
|
-
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(() => {
|
|
1263
1260
|
w(!1), g(!1);
|
|
1264
1261
|
}, []), J = j(
|
|
1265
1262
|
async (_) => {
|
|
1266
1263
|
if (_ !== r.status) {
|
|
1267
|
-
$(null),
|
|
1264
|
+
$(null), k(!0);
|
|
1268
1265
|
try {
|
|
1269
1266
|
await Kr(o, i, r.id, _), a();
|
|
1270
1267
|
} catch (q) {
|
|
1271
1268
|
$(q instanceof Error ? q.message : "Error al actualizar");
|
|
1272
1269
|
} finally {
|
|
1273
|
-
|
|
1270
|
+
k(!1);
|
|
1274
1271
|
}
|
|
1275
1272
|
}
|
|
1276
1273
|
},
|
|
1277
1274
|
[o, i, r.id, r.status, a]
|
|
1278
1275
|
), de = j(async () => {
|
|
1279
|
-
$(null),
|
|
1276
|
+
$(null), k(!0);
|
|
1280
1277
|
try {
|
|
1281
1278
|
await eo(o, i, r.id), a(), Y();
|
|
1282
1279
|
} catch (_) {
|
|
1283
1280
|
$(_ instanceof Error ? _.message : "Error al eliminar");
|
|
1284
1281
|
} finally {
|
|
1285
|
-
|
|
1282
|
+
k(!1);
|
|
1286
1283
|
}
|
|
1287
|
-
}, [o, i, r.id, a, Y]), fe =
|
|
1288
|
-
() => ({ ...bo(r.status), left:
|
|
1289
|
-
[r.status,
|
|
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]
|
|
1290
1287
|
);
|
|
1291
1288
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1292
1289
|
/* @__PURE__ */ l.jsx(
|
|
@@ -1321,7 +1318,7 @@ function jo({
|
|
|
1321
1318
|
"aria-label": "Detalle del comentario",
|
|
1322
1319
|
style: {
|
|
1323
1320
|
...ho,
|
|
1324
|
-
left:
|
|
1321
|
+
left: O + _e / 2 + 6,
|
|
1325
1322
|
top: T
|
|
1326
1323
|
},
|
|
1327
1324
|
onMouseEnter: oe,
|
|
@@ -1429,8 +1426,8 @@ function Io(r) {
|
|
|
1429
1426
|
const i = r[o], { x: a, y: s } = we(i), { x: p, y: g } = Fe(a, s);
|
|
1430
1427
|
let d = 0;
|
|
1431
1428
|
for (let w = 0; w < o; w++) {
|
|
1432
|
-
const { x, y } = we(r[w]), { x: P, y:
|
|
1433
|
-
Math.hypot(p - P, g -
|
|
1429
|
+
const { x: h, y } = we(r[w]), { x: P, y: k } = Fe(h, y);
|
|
1430
|
+
Math.hypot(p - P, g - k) < To && d++;
|
|
1434
1431
|
}
|
|
1435
1432
|
t.set(i.id, { dx: d * Do, dy: 0 });
|
|
1436
1433
|
}
|
|
@@ -1449,14 +1446,14 @@ function Lo({
|
|
|
1449
1446
|
loadComments: p,
|
|
1450
1447
|
commentsLoadFailed: g = !1
|
|
1451
1448
|
}) {
|
|
1452
|
-
const [d, w] = F(null),
|
|
1449
|
+
const [d, w] = F(null), h = me(null), [y, P] = F(null), k = j(() => {
|
|
1453
1450
|
d && (d.style.outline = "", d.style.outlineOffset = "", w(null));
|
|
1454
1451
|
}, [d]), V = j(() => {
|
|
1455
|
-
|
|
1452
|
+
h.current && (h.current.style.outline = "", h.current.style.outlineOffset = "", h.current = null);
|
|
1456
1453
|
}, []);
|
|
1457
|
-
|
|
1458
|
-
o || (
|
|
1459
|
-
}, [o,
|
|
1454
|
+
A(() => {
|
|
1455
|
+
o || (k(), V());
|
|
1456
|
+
}, [o, k, V]), A(() => {
|
|
1460
1457
|
if (typeof document > "u") return;
|
|
1461
1458
|
const m = document.body.style.cursor;
|
|
1462
1459
|
return y ? document.body.style.cursor = "default" : o && (document.body.style.cursor = "crosshair"), () => {
|
|
@@ -1464,34 +1461,34 @@ function Lo({
|
|
|
1464
1461
|
};
|
|
1465
1462
|
}, [o, y]);
|
|
1466
1463
|
const $ = j((m) => {
|
|
1467
|
-
var
|
|
1464
|
+
var O;
|
|
1468
1465
|
if (!m || typeof document > "u" || m === document.body || m === document.documentElement) return !0;
|
|
1469
|
-
const
|
|
1470
|
-
return
|
|
1471
|
-
}, []),
|
|
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(
|
|
1472
1469
|
(m) => {
|
|
1473
1470
|
if (!o || y) return;
|
|
1474
|
-
const
|
|
1475
|
-
!
|
|
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");
|
|
1476
1473
|
},
|
|
1477
|
-
[o, y,
|
|
1474
|
+
[o, y, k, $]
|
|
1478
1475
|
), c = j(
|
|
1479
1476
|
(m) => {
|
|
1480
|
-
var
|
|
1477
|
+
var O;
|
|
1481
1478
|
if (y) return;
|
|
1482
|
-
const
|
|
1483
|
-
d && (!
|
|
1479
|
+
const R = m.relatedTarget;
|
|
1480
|
+
d && (!R || !d.contains(R)) && !(R && ((O = d.contains) != null && O.call(d, R))) && k();
|
|
1484
1481
|
},
|
|
1485
|
-
[d, y,
|
|
1482
|
+
[d, y, k]
|
|
1486
1483
|
), f = j(
|
|
1487
1484
|
(m) => {
|
|
1488
1485
|
if (!o || y) return;
|
|
1489
|
-
const
|
|
1490
|
-
if (!
|
|
1491
|
-
m.preventDefault(), m.stopPropagation(),
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
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);
|
|
1495
1492
|
P({
|
|
1496
1493
|
position: { x: T.left + T.width / 2, y: T.bottom },
|
|
1497
1494
|
payload: {
|
|
@@ -1509,23 +1506,30 @@ function Lo({
|
|
|
1509
1506
|
}
|
|
1510
1507
|
});
|
|
1511
1508
|
},
|
|
1512
|
-
[o, y,
|
|
1509
|
+
[o, y, k, $]
|
|
1513
1510
|
);
|
|
1514
|
-
|
|
1511
|
+
A(() => {
|
|
1515
1512
|
if (o)
|
|
1516
|
-
return document.addEventListener("mouseover",
|
|
1517
|
-
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);
|
|
1518
1515
|
};
|
|
1519
|
-
}, [o,
|
|
1516
|
+
}, [o, z, c, f]);
|
|
1520
1517
|
const [I, N] = F(0);
|
|
1521
|
-
|
|
1518
|
+
A(() => {
|
|
1522
1519
|
if (typeof window > "u") return;
|
|
1523
|
-
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
|
+
};
|
|
1524
1528
|
return window.addEventListener("resize", m), window.addEventListener("scroll", m, !0), () => {
|
|
1525
1529
|
window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
|
|
1526
1530
|
};
|
|
1527
1531
|
}, []);
|
|
1528
|
-
const H =
|
|
1532
|
+
const H = Ne(
|
|
1529
1533
|
() => Io(s),
|
|
1530
1534
|
[s, I]
|
|
1531
1535
|
), re = j(() => {
|
|
@@ -1656,7 +1660,7 @@ function Lo({
|
|
|
1656
1660
|
}
|
|
1657
1661
|
) })
|
|
1658
1662
|
] }), X = typeof document < "u" ? document.body : null;
|
|
1659
|
-
return X ?
|
|
1663
|
+
return X ? sr(te, X) : null;
|
|
1660
1664
|
}
|
|
1661
1665
|
const zo = `/**
|
|
1662
1666
|
* Tokens de diseño UI para review-layer-react.
|
|
@@ -1988,7 +1992,7 @@ function Ao(r, t, o) {
|
|
|
1988
1992
|
const i = j(() => {
|
|
1989
1993
|
r && o((a) => !a);
|
|
1990
1994
|
}, [r, o]);
|
|
1991
|
-
|
|
1995
|
+
A(() => {
|
|
1992
1996
|
if (!r) return;
|
|
1993
1997
|
const a = (s) => {
|
|
1994
1998
|
(s.key === "r" || s.key === "R" || s.code === "KeyR") && s.shiftKey && !s.ctrlKey && !s.metaKey && (s.preventDefault(), i());
|
|
@@ -2031,7 +2035,7 @@ function Le(r, t, o) {
|
|
|
2031
2035
|
function Mo(r, t, o, i) {
|
|
2032
2036
|
pr(Se(r, t, "comments", o), i);
|
|
2033
2037
|
}
|
|
2034
|
-
function
|
|
2038
|
+
function ar(r, t) {
|
|
2035
2039
|
const o = vr(Se(r, t, "reviewers"));
|
|
2036
2040
|
return (o == null ? void 0 : o.data) ?? null;
|
|
2037
2041
|
}
|
|
@@ -2039,7 +2043,7 @@ function Wo(r, t, o) {
|
|
|
2039
2043
|
pr(Se(r, t, "reviewers"), o);
|
|
2040
2044
|
}
|
|
2041
2045
|
const Bo = "https://review-layer-api.onrender.com/api";
|
|
2042
|
-
function
|
|
2046
|
+
function ur() {
|
|
2043
2047
|
return typeof window > "u" ? "/" : window.location.pathname || "/";
|
|
2044
2048
|
}
|
|
2045
2049
|
const gr = Mr(null);
|
|
@@ -2056,9 +2060,9 @@ function Ho({
|
|
|
2056
2060
|
apiUrl: o,
|
|
2057
2061
|
apiKey: i
|
|
2058
2062
|
}) {
|
|
2059
|
-
const a = (o == null ? void 0 : o.trim()) || Bo, [s, p] = F(!1), [g, d] = F([]), [w,
|
|
2063
|
+
const a = (o == null ? void 0 : o.trim()) || Bo, [s, p] = F(!1), [g, d] = F([]), [w, h] = F([]), [y, P] = F(!1);
|
|
2060
2064
|
Ao(t, s, p);
|
|
2061
|
-
const
|
|
2065
|
+
const k = j(
|
|
2062
2066
|
async (c) => {
|
|
2063
2067
|
if (!(!t || !a || !i))
|
|
2064
2068
|
try {
|
|
@@ -2067,7 +2071,7 @@ function Ho({
|
|
|
2067
2071
|
} catch (f) {
|
|
2068
2072
|
if (f instanceof Error && f.name === "AbortError") return;
|
|
2069
2073
|
if (!(c != null && c.aborted)) {
|
|
2070
|
-
const I =
|
|
2074
|
+
const I = ar(a, i);
|
|
2071
2075
|
I != null && d(I);
|
|
2072
2076
|
}
|
|
2073
2077
|
}
|
|
@@ -2076,49 +2080,49 @@ function Ho({
|
|
|
2076
2080
|
), V = j(
|
|
2077
2081
|
async (c) => {
|
|
2078
2082
|
if (!t || !a || !i) return;
|
|
2079
|
-
const f =
|
|
2080
|
-
I != null &&
|
|
2083
|
+
const f = ur(), I = Le(a, i, f);
|
|
2084
|
+
I != null && h(I);
|
|
2081
2085
|
try {
|
|
2082
2086
|
P(!1);
|
|
2083
2087
|
const N = await Qr(a, i, f, { signal: c });
|
|
2084
|
-
c != null && c.aborted || (
|
|
2088
|
+
c != null && c.aborted || (h(N), Mo(a, i, f, N));
|
|
2085
2089
|
} catch (N) {
|
|
2086
2090
|
if (N instanceof Error && N.name === "AbortError") return;
|
|
2087
2091
|
if (!(c != null && c.aborted)) {
|
|
2088
2092
|
P(!0);
|
|
2089
2093
|
const H = Le(a, i, f);
|
|
2090
|
-
H != null &&
|
|
2094
|
+
H != null && h(H);
|
|
2091
2095
|
}
|
|
2092
2096
|
}
|
|
2093
2097
|
},
|
|
2094
2098
|
[t, a, i]
|
|
2095
2099
|
);
|
|
2096
|
-
|
|
2100
|
+
A(() => {
|
|
2097
2101
|
if (!t || !a || !i) return;
|
|
2098
|
-
const c =
|
|
2099
|
-
f != null && d(f), I != null &&
|
|
2100
|
-
}, [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(() => {
|
|
2101
2105
|
if (typeof document > "u") return;
|
|
2102
2106
|
const c = "review-layer-ui-variables";
|
|
2103
2107
|
if (!document.getElementById(c)) {
|
|
2104
2108
|
const f = document.createElement("style");
|
|
2105
2109
|
f.id = c, f.textContent = zo, document.head.appendChild(f);
|
|
2106
2110
|
}
|
|
2107
|
-
}, []),
|
|
2111
|
+
}, []), A(() => {
|
|
2108
2112
|
if (!t || !a || !i) return;
|
|
2109
2113
|
const c = `${a}:${i}`;
|
|
2110
2114
|
if (ze !== c)
|
|
2111
|
-
return ze = c,
|
|
2115
|
+
return ze = c, k(), V(), () => {
|
|
2112
2116
|
setTimeout(() => {
|
|
2113
2117
|
ze = null;
|
|
2114
2118
|
}, 0);
|
|
2115
2119
|
};
|
|
2116
|
-
}, [t, a, i,
|
|
2120
|
+
}, [t, a, i, k, V]), A(() => {
|
|
2117
2121
|
if (!t) return;
|
|
2118
2122
|
const c = () => V();
|
|
2119
2123
|
return window.addEventListener("popstate", c), () => window.removeEventListener("popstate", c);
|
|
2120
2124
|
}, [t, V]);
|
|
2121
|
-
const $ =
|
|
2125
|
+
const $ = Ne(
|
|
2122
2126
|
() => ({
|
|
2123
2127
|
apiUrl: a,
|
|
2124
2128
|
apiKey: i,
|
|
@@ -2130,7 +2134,7 @@ function Ho({
|
|
|
2130
2134
|
commentsLoadFailed: y
|
|
2131
2135
|
}),
|
|
2132
2136
|
[a, i, s, p, g, w, V, y]
|
|
2133
|
-
),
|
|
2137
|
+
), z = t && typeof document < "u" ? sr(
|
|
2134
2138
|
/* @__PURE__ */ l.jsx(
|
|
2135
2139
|
Lo,
|
|
2136
2140
|
{
|
|
@@ -2148,7 +2152,7 @@ function Ho({
|
|
|
2148
2152
|
) : null;
|
|
2149
2153
|
return /* @__PURE__ */ l.jsxs(gr.Provider, { value: $, children: [
|
|
2150
2154
|
r,
|
|
2151
|
-
|
|
2155
|
+
z
|
|
2152
2156
|
] });
|
|
2153
2157
|
}
|
|
2154
2158
|
export {
|