@gamelearn/arcade-components 3.31.5 → 3.31.7
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.
|
@@ -438,7 +438,7 @@ function requireReactJsxRuntime_development() {
|
|
|
438
438
|
ref: !0,
|
|
439
439
|
__self: !0,
|
|
440
440
|
__source: !0
|
|
441
|
-
},
|
|
441
|
+
}, Ye, lt, Be;
|
|
442
442
|
Be = {};
|
|
443
443
|
function rt(de) {
|
|
444
444
|
if (Fe.call(de, "ref")) {
|
|
@@ -465,7 +465,7 @@ function requireReactJsxRuntime_development() {
|
|
|
465
465
|
function De(de, be) {
|
|
466
466
|
{
|
|
467
467
|
var ze = function() {
|
|
468
|
-
|
|
468
|
+
Ye || (Ye = !0, R("%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)", be));
|
|
469
469
|
};
|
|
470
470
|
ze.isReactWarning = !0, Object.defineProperty(de, "key", {
|
|
471
471
|
get: ze,
|
|
@@ -531,7 +531,7 @@ function requireReactJsxRuntime_development() {
|
|
|
531
531
|
return ye(de, gt, kt, ht, tt, qe.current, vt);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
var
|
|
534
|
+
var Xe = b.ReactCurrentOwner, Ft = b.ReactDebugCurrentFrame;
|
|
535
535
|
function Pt(de) {
|
|
536
536
|
if (de) {
|
|
537
537
|
var be = de._owner, ze = Re(de.type, de._source, be ? be.type : null);
|
|
@@ -546,8 +546,8 @@ function requireReactJsxRuntime_development() {
|
|
|
546
546
|
}
|
|
547
547
|
function Ct() {
|
|
548
548
|
{
|
|
549
|
-
if (
|
|
550
|
-
var de = B(
|
|
549
|
+
if (Xe.current) {
|
|
550
|
+
var de = B(Xe.current.type);
|
|
551
551
|
if (de)
|
|
552
552
|
return `
|
|
553
553
|
|
|
@@ -590,7 +590,7 @@ Check the top-level render call using <` + ze + ">.");
|
|
|
590
590
|
return;
|
|
591
591
|
wt[ze] = !0;
|
|
592
592
|
var tt = "";
|
|
593
|
-
de && de._owner && de._owner !==
|
|
593
|
+
de && de._owner && de._owner !== Xe.current && (tt = " It was passed a child from " + B(de._owner.type) + "."), Pt(de), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ze, tt), Pt(null);
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
function ke(de, be) {
|
|
@@ -1260,8 +1260,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1260
1260
|
try {
|
|
1261
1261
|
if (ye && typeof De == "string") {
|
|
1262
1262
|
if (ye.addDefaultProtocol && De.startsWith("www.")) {
|
|
1263
|
-
const
|
|
1264
|
-
(
|
|
1263
|
+
const Xe = De.match(/\./g);
|
|
1264
|
+
(Xe == null ? void 0 : Xe.length) >= 2 && (De = `http://${De}`);
|
|
1265
1265
|
}
|
|
1266
1266
|
if (ye.tryConvertEncoding)
|
|
1267
1267
|
try {
|
|
@@ -1339,8 +1339,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1339
1339
|
if (Te < ye)
|
|
1340
1340
|
return String.fromCharCode.apply(null, De);
|
|
1341
1341
|
const Pe = [];
|
|
1342
|
-
for (let
|
|
1343
|
-
const Ft = Math.min(
|
|
1342
|
+
for (let Xe = 0; Xe < Te; Xe += ye) {
|
|
1343
|
+
const Ft = Math.min(Xe + ye, Te), Pt = De.subarray(Xe, Ft);
|
|
1344
1344
|
Pe.push(String.fromCharCode.apply(null, Pt));
|
|
1345
1345
|
}
|
|
1346
1346
|
return Pe.join("");
|
|
@@ -1413,23 +1413,23 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1413
1413
|
return [Te[0] * ye[0] + Te[2] * ye[1], Te[1] * ye[0] + Te[3] * ye[1], Te[0] * ye[2] + Te[2] * ye[3], Te[1] * ye[2] + Te[3] * ye[3], Te[0] * ye[4] + Te[2] * ye[5] + Te[4], Te[1] * ye[4] + Te[3] * ye[5] + Te[5]];
|
|
1414
1414
|
}
|
|
1415
1415
|
static applyTransform(Te, ye) {
|
|
1416
|
-
const Pe = Te[0] * ye[0] + Te[1] * ye[2] + ye[4],
|
|
1417
|
-
return [Pe,
|
|
1416
|
+
const Pe = Te[0] * ye[0] + Te[1] * ye[2] + ye[4], Xe = Te[0] * ye[1] + Te[1] * ye[3] + ye[5];
|
|
1417
|
+
return [Pe, Xe];
|
|
1418
1418
|
}
|
|
1419
1419
|
static applyInverseTransform(Te, ye) {
|
|
1420
|
-
const Pe = ye[0] * ye[3] - ye[1] * ye[2],
|
|
1421
|
-
return [
|
|
1420
|
+
const Pe = ye[0] * ye[3] - ye[1] * ye[2], Xe = (Te[0] * ye[3] - Te[1] * ye[2] + ye[2] * ye[5] - ye[4] * ye[3]) / Pe, Ft = (-Te[0] * ye[1] + Te[1] * ye[0] + ye[4] * ye[1] - ye[5] * ye[0]) / Pe;
|
|
1421
|
+
return [Xe, Ft];
|
|
1422
1422
|
}
|
|
1423
1423
|
static getAxialAlignedBoundingBox(Te, ye) {
|
|
1424
|
-
const Pe = this.applyTransform(Te, ye),
|
|
1425
|
-
return [Math.min(Pe[0],
|
|
1424
|
+
const Pe = this.applyTransform(Te, ye), Xe = this.applyTransform(Te.slice(2, 4), ye), Ft = this.applyTransform([Te[0], Te[3]], ye), Pt = this.applyTransform([Te[2], Te[1]], ye);
|
|
1425
|
+
return [Math.min(Pe[0], Xe[0], Ft[0], Pt[0]), Math.min(Pe[1], Xe[1], Ft[1], Pt[1]), Math.max(Pe[0], Xe[0], Ft[0], Pt[0]), Math.max(Pe[1], Xe[1], Ft[1], Pt[1])];
|
|
1426
1426
|
}
|
|
1427
1427
|
static inverseTransform(Te) {
|
|
1428
1428
|
const ye = Te[0] * Te[3] - Te[1] * Te[2];
|
|
1429
1429
|
return [Te[3] / ye, -Te[1] / ye, -Te[2] / ye, Te[0] / ye, (Te[2] * Te[5] - Te[4] * Te[3]) / ye, (Te[4] * Te[1] - Te[5] * Te[0]) / ye];
|
|
1430
1430
|
}
|
|
1431
1431
|
static singularValueDecompose2dScale(Te) {
|
|
1432
|
-
const ye = [Te[0], Te[2], Te[1], Te[3]], Pe = Te[0] * ye[0] + Te[1] * ye[2],
|
|
1432
|
+
const ye = [Te[0], Te[2], Te[1], Te[3]], Pe = Te[0] * ye[0] + Te[1] * ye[2], Xe = Te[0] * ye[1] + Te[1] * ye[3], Ft = Te[2] * ye[0] + Te[3] * ye[2], Pt = Te[2] * ye[1] + Te[3] * ye[3], Ie = (Pe + Pt) / 2, mt = Math.sqrt((Pe + Pt) ** 2 - 4 * (Pe * Pt - Ft * Xe)) / 2, Ct = Ie + mt || 1, st = Ie - mt || 1;
|
|
1433
1433
|
return [Math.sqrt(Ct), Math.sqrt(st)];
|
|
1434
1434
|
}
|
|
1435
1435
|
static normalizeRect(Te) {
|
|
@@ -1437,17 +1437,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1437
1437
|
return Te[0] > Te[2] && (ye[0] = Te[2], ye[2] = Te[0]), Te[1] > Te[3] && (ye[1] = Te[3], ye[3] = Te[1]), ye;
|
|
1438
1438
|
}
|
|
1439
1439
|
static intersect(Te, ye) {
|
|
1440
|
-
const Pe = Math.max(Math.min(Te[0], Te[2]), Math.min(ye[0], ye[2])),
|
|
1441
|
-
if (Pe >
|
|
1440
|
+
const Pe = Math.max(Math.min(Te[0], Te[2]), Math.min(ye[0], ye[2])), Xe = Math.min(Math.max(Te[0], Te[2]), Math.max(ye[0], ye[2]));
|
|
1441
|
+
if (Pe > Xe)
|
|
1442
1442
|
return null;
|
|
1443
1443
|
const Ft = Math.max(Math.min(Te[1], Te[3]), Math.min(ye[1], ye[3])), Pt = Math.min(Math.max(Te[1], Te[3]), Math.max(ye[1], ye[3]));
|
|
1444
|
-
return Ft > Pt ? null : [Pe, Ft,
|
|
1444
|
+
return Ft > Pt ? null : [Pe, Ft, Xe, Pt];
|
|
1445
1445
|
}
|
|
1446
|
-
static bezierBoundingBox(Te, ye, Pe,
|
|
1446
|
+
static bezierBoundingBox(Te, ye, Pe, Xe, Ft, Pt, Ie, mt) {
|
|
1447
1447
|
const Ct = [], st = [[], []];
|
|
1448
1448
|
let wt, Nt, qt, ke, pt, ot, _e, te;
|
|
1449
1449
|
for (let de = 0; de < 2; ++de) {
|
|
1450
|
-
if (de === 0 ? (Nt = 6 * Te - 12 * Pe + 6 * Ft, wt = -3 * Te + 9 * Pe - 9 * Ft + 3 * Ie, qt = 3 * Pe - 3 * Te) : (Nt = 6 * ye - 12 *
|
|
1450
|
+
if (de === 0 ? (Nt = 6 * Te - 12 * Pe + 6 * Ft, wt = -3 * Te + 9 * Pe - 9 * Ft + 3 * Ie, qt = 3 * Pe - 3 * Te) : (Nt = 6 * ye - 12 * Xe + 6 * Pt, wt = -3 * ye + 9 * Xe - 9 * Pt + 3 * mt, qt = 3 * Xe - 3 * ye), Math.abs(wt) < 1e-12) {
|
|
1451
1451
|
if (Math.abs(Nt) < 1e-12)
|
|
1452
1452
|
continue;
|
|
1453
1453
|
ke = -qt / Nt, 0 < ke && ke < 1 && Ct.push(ke);
|
|
@@ -1458,7 +1458,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1458
1458
|
let me = Ct.length, Ee;
|
|
1459
1459
|
const we = me;
|
|
1460
1460
|
for (; me--; )
|
|
1461
|
-
ke = Ct[me], Ee = 1 - ke, st[0][me] = Ee * Ee * Ee * Te + 3 * Ee * Ee * ke * Pe + 3 * Ee * ke * ke * Ft + ke * ke * ke * Ie, st[1][me] = Ee * Ee * Ee * ye + 3 * Ee * Ee * ke *
|
|
1461
|
+
ke = Ct[me], Ee = 1 - ke, st[0][me] = Ee * Ee * Ee * Te + 3 * Ee * Ee * ke * Pe + 3 * Ee * ke * ke * Ft + ke * ke * ke * Ie, st[1][me] = Ee * Ee * Ee * ye + 3 * Ee * Ee * ke * Xe + 3 * Ee * ke * ke * Pt + ke * ke * ke * mt;
|
|
1462
1462
|
return st[0][we] = Te, st[1][we] = ye, st[0][we + 1] = Ie, st[1][we + 1] = mt, st[0].length = st[1].length = we + 2, [Math.min(...st[0]), Math.min(...st[1]), Math.max(...st[0]), Math.max(...st[1])];
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
@@ -1471,16 +1471,16 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1471
1471
|
try {
|
|
1472
1472
|
const Pe = new TextDecoder(ye, {
|
|
1473
1473
|
fatal: !0
|
|
1474
|
-
}),
|
|
1475
|
-
return Pe.decode(
|
|
1474
|
+
}), Xe = ce(De);
|
|
1475
|
+
return Pe.decode(Xe);
|
|
1476
1476
|
} catch (Pe) {
|
|
1477
1477
|
se(`stringToPDFString: "${Pe}".`);
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
const Te = [];
|
|
1481
1481
|
for (let ye = 0, Pe = De.length; ye < Pe; ye++) {
|
|
1482
|
-
const
|
|
1483
|
-
Te.push(
|
|
1482
|
+
const Xe = yt[De.charCodeAt(ye)];
|
|
1483
|
+
Te.push(Xe ? String.fromCharCode(Xe) : De.charAt(ye));
|
|
1484
1484
|
}
|
|
1485
1485
|
return Te.join("");
|
|
1486
1486
|
}
|
|
@@ -1520,9 +1520,9 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
$e = new WeakMap(), e.PromiseCapability = St;
|
|
1523
|
-
let
|
|
1523
|
+
let Ye = null, lt = null;
|
|
1524
1524
|
function Be(De) {
|
|
1525
|
-
return
|
|
1525
|
+
return Ye || (Ye = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, lt = /* @__PURE__ */ new Map([["ſt", "ſt"]])), De.replaceAll(Ye, (Te, ye, Pe) => ye ? ye.normalize("NFKC") : lt.get(Pe));
|
|
1526
1526
|
}
|
|
1527
1527
|
function rt() {
|
|
1528
1528
|
if (typeof crypto < "u" && typeof (crypto == null ? void 0 : crypto.randomUUID) == "function")
|
|
@@ -1631,7 +1631,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1631
1631
|
return ee.promise.then(function() {
|
|
1632
1632
|
if (k.destroyed)
|
|
1633
1633
|
throw new Error("Loading aborted");
|
|
1634
|
-
const St = _fetchDocument(ee, Oe),
|
|
1634
|
+
const St = _fetchDocument(ee, Oe), Ye = new Promise(function(lt) {
|
|
1635
1635
|
let Be;
|
|
1636
1636
|
re ? Be = new _transport_stream.PDFDataTransportStream({
|
|
1637
1637
|
length: at,
|
|
@@ -1650,7 +1650,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1650
1650
|
disableStream: Fe
|
|
1651
1651
|
})), lt(Be);
|
|
1652
1652
|
});
|
|
1653
|
-
return Promise.all([St,
|
|
1653
|
+
return Promise.all([St, Ye]).then(function([lt, Be]) {
|
|
1654
1654
|
if (k.destroyed)
|
|
1655
1655
|
throw new Error("Loading aborted");
|
|
1656
1656
|
const rt = new _message_handler.MessageHandler(F, lt, ee.port), ft = new WorkerTransport(rt, k, Be, qe, Ke);
|
|
@@ -3538,37 +3538,37 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
3538
3538
|
};
|
|
3539
3539
|
window.addEventListener("pointerup", Qe), window.addEventListener("blur", Qe);
|
|
3540
3540
|
}, ee = new WeakSet(), Yv = function(V, G) {
|
|
3541
|
-
const [Y, ie] = this.parentDimensions, le = this.x, fe = this.y, ce = this.width, ge = this.height, Se = H.MIN_SIZE / Y, Re = H.MIN_SIZE / ie, Fe = (Pe) => Math.round(Pe * 1e4) / 1e4, Ne = Ue(this, j, Nm).call(this, this.rotation), Qe = (Pe,
|
|
3541
|
+
const [Y, ie] = this.parentDimensions, le = this.x, fe = this.y, ce = this.width, ge = this.height, Se = H.MIN_SIZE / Y, Re = H.MIN_SIZE / ie, Fe = (Pe) => Math.round(Pe * 1e4) / 1e4, Ne = Ue(this, j, Nm).call(this, this.rotation), Qe = (Pe, Xe) => [Ne[0] * Pe + Ne[2] * Xe, Ne[1] * Pe + Ne[3] * Xe], at = Ue(this, j, Nm).call(this, 360 - this.rotation), Ze = (Pe, Xe) => [at[0] * Pe + at[2] * Xe, at[1] * Pe + at[3] * Xe];
|
|
3542
3542
|
let yt, Ve, Me = !1, Le = !1;
|
|
3543
3543
|
switch (V) {
|
|
3544
3544
|
case "topLeft":
|
|
3545
|
-
Me = !0, yt = (Pe,
|
|
3545
|
+
Me = !0, yt = (Pe, Xe) => [0, 0], Ve = (Pe, Xe) => [Pe, Xe];
|
|
3546
3546
|
break;
|
|
3547
3547
|
case "topMiddle":
|
|
3548
|
-
yt = (Pe,
|
|
3548
|
+
yt = (Pe, Xe) => [Pe / 2, 0], Ve = (Pe, Xe) => [Pe / 2, Xe];
|
|
3549
3549
|
break;
|
|
3550
3550
|
case "topRight":
|
|
3551
|
-
Me = !0, yt = (Pe,
|
|
3551
|
+
Me = !0, yt = (Pe, Xe) => [Pe, 0], Ve = (Pe, Xe) => [0, Xe];
|
|
3552
3552
|
break;
|
|
3553
3553
|
case "middleRight":
|
|
3554
|
-
Le = !0, yt = (Pe,
|
|
3554
|
+
Le = !0, yt = (Pe, Xe) => [Pe, Xe / 2], Ve = (Pe, Xe) => [0, Xe / 2];
|
|
3555
3555
|
break;
|
|
3556
3556
|
case "bottomRight":
|
|
3557
|
-
Me = !0, yt = (Pe,
|
|
3557
|
+
Me = !0, yt = (Pe, Xe) => [Pe, Xe], Ve = (Pe, Xe) => [0, 0];
|
|
3558
3558
|
break;
|
|
3559
3559
|
case "bottomMiddle":
|
|
3560
|
-
yt = (Pe,
|
|
3560
|
+
yt = (Pe, Xe) => [Pe / 2, Xe], Ve = (Pe, Xe) => [Pe / 2, 0];
|
|
3561
3561
|
break;
|
|
3562
3562
|
case "bottomLeft":
|
|
3563
|
-
Me = !0, yt = (Pe,
|
|
3563
|
+
Me = !0, yt = (Pe, Xe) => [0, Xe], Ve = (Pe, Xe) => [Pe, 0];
|
|
3564
3564
|
break;
|
|
3565
3565
|
case "middleLeft":
|
|
3566
|
-
Le = !0, yt = (Pe,
|
|
3566
|
+
Le = !0, yt = (Pe, Xe) => [0, Xe / 2], Ve = (Pe, Xe) => [Pe, Xe / 2];
|
|
3567
3567
|
break;
|
|
3568
3568
|
}
|
|
3569
3569
|
const Ke = yt(ce, ge), Oe = Ve(ce, ge);
|
|
3570
3570
|
let qe = Qe(...Oe);
|
|
3571
|
-
const St = Fe(le + qe[0]),
|
|
3571
|
+
const St = Fe(le + qe[0]), Ye = Fe(fe + qe[1]);
|
|
3572
3572
|
let lt = 1, Be = 1, [rt, ft] = this.screenToPageTranslation(G.movementX, G.movementY);
|
|
3573
3573
|
if ([rt, ft] = Ze(rt / Y, ft / ie), Me) {
|
|
3574
3574
|
const Pe = Math.hypot(ce, ge);
|
|
@@ -3577,7 +3577,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
3577
3577
|
Le ? lt = Math.max(Se, Math.min(1, Math.abs(Oe[0] - Ke[0] - rt))) / ce : Be = Math.max(Re, Math.min(1, Math.abs(Oe[1] - Ke[1] - ft))) / ge;
|
|
3578
3578
|
const $e = Fe(ce * lt), De = Fe(ge * Be);
|
|
3579
3579
|
qe = Qe(...Ve($e, De));
|
|
3580
|
-
const Te = St - qe[0], ye =
|
|
3580
|
+
const Te = St - qe[0], ye = Ye - qe[1];
|
|
3581
3581
|
this.width = $e, this.height = De, this.x = Te, this.y = ye, this.setDims(Y * $e, ie * De), this.fixAndSetPosition();
|
|
3582
3582
|
}, ne = new WeakSet(), Om = async function() {
|
|
3583
3583
|
var Y;
|
|
@@ -3657,7 +3657,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
3657
3657
|
/* 5 */
|
|
3658
3658
|
/***/
|
|
3659
3659
|
(l, e, n) => {
|
|
3660
|
-
var x, S, g, v, b, km, w, C, N, D, P, Qv, M, j, B, z, X, re, se, ee, K, ne, ue, pe, J, H, W, V, G, Y, ie, le, fe, ce, ge, Se, Re, Fe, Ne, Qe, at, Ze, yt, Ve, Me, Le, Ke, Jv, qe, Fm,
|
|
3660
|
+
var x, S, g, v, b, km, w, C, N, D, P, Qv, M, j, B, z, X, re, se, ee, K, ne, ue, pe, J, H, W, V, G, Y, ie, le, fe, ce, ge, Se, Re, Fe, Ne, Qe, at, Ze, yt, Ve, Me, Le, Ke, Jv, qe, Fm, Ye, Mm, Be, zf, ft, Lm, De, jm, ye, Zi, Xe, Oc, Pt, Zv, mt, ey, st, Im, Nt, kc, ke, Um;
|
|
3661
3661
|
Object.defineProperty(e, "__esModule", {
|
|
3662
3662
|
value: !0
|
|
3663
3663
|
}), e.KeyboardManager = e.CommandManager = e.ColorManager = e.AnnotationEditorUIManager = void 0, e.bindEvents = o, e.opacityToHex = d;
|
|
@@ -3881,12 +3881,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
3881
3881
|
constructor(te, me, Ee, we, de, be) {
|
|
3882
3882
|
Ae(this, Ke);
|
|
3883
3883
|
Ae(this, qe);
|
|
3884
|
-
Ae(this,
|
|
3884
|
+
Ae(this, Ye);
|
|
3885
3885
|
Ae(this, Be);
|
|
3886
3886
|
Ae(this, ft);
|
|
3887
3887
|
Ae(this, De);
|
|
3888
3888
|
Ae(this, ye);
|
|
3889
|
-
Ae(this,
|
|
3889
|
+
Ae(this, Xe);
|
|
3890
3890
|
Ae(this, Pt);
|
|
3891
3891
|
Ae(this, mt);
|
|
3892
3892
|
Ae(this, st);
|
|
@@ -4054,7 +4054,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4054
4054
|
}), me.focus();
|
|
4055
4055
|
}
|
|
4056
4056
|
addEditListeners() {
|
|
4057
|
-
Ue(this,
|
|
4057
|
+
Ue(this, Ye, Mm).call(this), Ue(this, ft, Lm).call(this);
|
|
4058
4058
|
}
|
|
4059
4059
|
removeEditListeners() {
|
|
4060
4060
|
Ue(this, Be, zf).call(this), Ue(this, De, jm).call(this);
|
|
@@ -4130,7 +4130,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4130
4130
|
["undo", "redo", "delete", "selectAll"].includes(te.name) && this[te.name]();
|
|
4131
4131
|
}
|
|
4132
4132
|
setEditingState(te) {
|
|
4133
|
-
te ? (Ue(this, Ke, Jv).call(this), Ue(this,
|
|
4133
|
+
te ? (Ue(this, Ke, Jv).call(this), Ue(this, Ye, Mm).call(this), Ue(this, ft, Lm).call(this), Ue(this, ye, Zi).call(this, {
|
|
4134
4134
|
isEditing: Z(this, G) !== t.AnnotationEditorType.NONE,
|
|
4135
4135
|
isEmpty: Ue(this, Nt, kc).call(this),
|
|
4136
4136
|
hasSomethingToUndo: Z(this, re).hasSomethingToUndo(),
|
|
@@ -4144,7 +4144,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4144
4144
|
if (!Z(this, ne)) {
|
|
4145
4145
|
We(this, ne, te);
|
|
4146
4146
|
for (const me of Z(this, ne))
|
|
4147
|
-
Ue(this,
|
|
4147
|
+
Ue(this, Xe, Oc).call(this, me.defaultPropertiesToUpdate);
|
|
4148
4148
|
}
|
|
4149
4149
|
}
|
|
4150
4150
|
getId() {
|
|
@@ -4234,7 +4234,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4234
4234
|
Z(this, ee).delete(te.annotationElementId), te.deleted = !1;
|
|
4235
4235
|
}
|
|
4236
4236
|
setActiveEditor(te) {
|
|
4237
|
-
Z(this, M) !== te && (We(this, M, te), te && Ue(this,
|
|
4237
|
+
Z(this, M) !== te && (We(this, M, te), te && Ue(this, Xe, Oc).call(this, te.propertiesToUpdate));
|
|
4238
4238
|
}
|
|
4239
4239
|
toggleSelected(te) {
|
|
4240
4240
|
if (Z(this, Y).has(te)) {
|
|
@@ -4243,14 +4243,14 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4243
4243
|
});
|
|
4244
4244
|
return;
|
|
4245
4245
|
}
|
|
4246
|
-
Z(this, Y).add(te), te.select(), Ue(this,
|
|
4246
|
+
Z(this, Y).add(te), te.select(), Ue(this, Xe, Oc).call(this, te.propertiesToUpdate), Ue(this, ye, Zi).call(this, {
|
|
4247
4247
|
hasSelectedEditor: !0
|
|
4248
4248
|
});
|
|
4249
4249
|
}
|
|
4250
4250
|
setSelected(te) {
|
|
4251
4251
|
for (const me of Z(this, Y))
|
|
4252
4252
|
me !== te && me.unselect();
|
|
4253
|
-
Z(this, Y).clear(), Z(this, Y).add(te), te.select(), Ue(this,
|
|
4253
|
+
Z(this, Y).clear(), Z(this, Y).add(te), te.select(), Ue(this, Xe, Oc).call(this, te.propertiesToUpdate), Ue(this, ye, Zi).call(this, {
|
|
4254
4254
|
hasSelectedEditor: !0
|
|
4255
4255
|
});
|
|
4256
4256
|
}
|
|
@@ -4432,7 +4432,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4432
4432
|
window.addEventListener("focus", Z(this, fe)), window.addEventListener("blur", Z(this, le));
|
|
4433
4433
|
}, qe = new WeakSet(), Fm = function() {
|
|
4434
4434
|
window.removeEventListener("focus", Z(this, fe)), window.removeEventListener("blur", Z(this, le));
|
|
4435
|
-
},
|
|
4435
|
+
}, Ye = new WeakSet(), Mm = function() {
|
|
4436
4436
|
window.addEventListener("keydown", Z(this, Re), {
|
|
4437
4437
|
capture: !0
|
|
4438
4438
|
});
|
|
@@ -4449,7 +4449,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4449
4449
|
source: this,
|
|
4450
4450
|
details: Object.assign(Z(this, Ze), te)
|
|
4451
4451
|
});
|
|
4452
|
-
},
|
|
4452
|
+
}, Xe = new WeakSet(), Oc = function(te) {
|
|
4453
4453
|
this._eventBus.dispatch("annotationeditorparamschanged", {
|
|
4454
4454
|
source: this,
|
|
4455
4455
|
details: te
|
|
@@ -4532,22 +4532,22 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4532
4532
|
let Ke = Z(this, Y, tu).get(Le);
|
|
4533
4533
|
if (Ke)
|
|
4534
4534
|
return Ke;
|
|
4535
|
-
let Oe, qe, St,
|
|
4535
|
+
let Oe, qe, St, Ye;
|
|
4536
4536
|
if (Le.length === 1) {
|
|
4537
4537
|
const ft = Le[0], $e = new Array(256);
|
|
4538
4538
|
for (let De = 0; De < 256; De++)
|
|
4539
4539
|
$e[De] = ft[De] / 255;
|
|
4540
|
-
|
|
4540
|
+
Ye = Oe = qe = St = $e.join(",");
|
|
4541
4541
|
} else {
|
|
4542
4542
|
const [ft, $e, De] = Le, Te = new Array(256), ye = new Array(256), Pe = new Array(256);
|
|
4543
|
-
for (let
|
|
4544
|
-
Te[
|
|
4545
|
-
Oe = Te.join(","), qe = ye.join(","), St = Pe.join(","),
|
|
4543
|
+
for (let Xe = 0; Xe < 256; Xe++)
|
|
4544
|
+
Te[Xe] = ft[Xe] / 255, ye[Xe] = $e[Xe] / 255, Pe[Xe] = De[Xe] / 255;
|
|
4545
|
+
Oe = Te.join(","), qe = ye.join(","), St = Pe.join(","), Ye = `${Oe}${qe}${St}`;
|
|
4546
4546
|
}
|
|
4547
|
-
if (Ke = Z(this, Y, tu).get(
|
|
4547
|
+
if (Ke = Z(this, Y, tu).get(Ye), Ke)
|
|
4548
4548
|
return Z(this, Y, tu).set(Le, Ke), Ke;
|
|
4549
4549
|
const lt = `g_${Z(this, K)}_transfer_map_${Nc(this, G)._++}`, Be = `url(#${lt})`;
|
|
4550
|
-
Z(this, Y, tu).set(Le, Be), Z(this, Y, tu).set(
|
|
4550
|
+
Z(this, Y, tu).set(Le, Be), Z(this, Y, tu).set(Ye, Be);
|
|
4551
4551
|
const rt = Ue(this, Se, Gf).call(this, lt);
|
|
4552
4552
|
return Ue(this, Qe, Fc).call(this, Oe, qe, St, rt), Be;
|
|
4553
4553
|
}
|
|
@@ -4563,18 +4563,18 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4563
4563
|
const St = Ue(this, Ze, Mc).call(this, Ke);
|
|
4564
4564
|
if (Ke = s.Util.makeHexColor(...St), Z(this, le, nu).style.color = "", Le === "#000000" && Ke === "#ffffff" || Le === Ke)
|
|
4565
4565
|
return Z(this, J);
|
|
4566
|
-
const
|
|
4566
|
+
const Ye = new Array(256);
|
|
4567
4567
|
for (let De = 0; De <= 255; De++) {
|
|
4568
4568
|
const Te = De / 255;
|
|
4569
|
-
|
|
4569
|
+
Ye[De] = Te <= 0.03928 ? Te / 12.92 : ((Te + 0.055) / 1.055) ** 2.4;
|
|
4570
4570
|
}
|
|
4571
|
-
const lt =
|
|
4571
|
+
const lt = Ye.join(","), Be = `g_${Z(this, K)}_hcm_filter`, rt = We(this, H, Ue(this, Se, Gf).call(this, Be));
|
|
4572
4572
|
Ue(this, Qe, Fc).call(this, lt, lt, lt, rt), Ue(this, ce, Bm).call(this, rt);
|
|
4573
4573
|
const ft = (De, Te) => {
|
|
4574
|
-
const ye = qe[De] / 255, Pe = St[De] / 255,
|
|
4574
|
+
const ye = qe[De] / 255, Pe = St[De] / 255, Xe = new Array(Te + 1);
|
|
4575
4575
|
for (let Ft = 0; Ft <= Te; Ft++)
|
|
4576
|
-
|
|
4577
|
-
return
|
|
4576
|
+
Xe[Ft] = ye + Ft / Te * (Pe - ye);
|
|
4577
|
+
return Xe.join(",");
|
|
4578
4578
|
};
|
|
4579
4579
|
return Ue(this, Qe, Fc).call(this, ft(0, 5), ft(1, 5), ft(2, 5), rt), We(this, J, `url(#${Be})`), Z(this, J);
|
|
4580
4580
|
}
|
|
@@ -4585,11 +4585,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4585
4585
|
return Z(this, V);
|
|
4586
4586
|
if (We(this, W, St), We(this, V, "none"), (Pe = Z(this, H)) == null || Pe.remove(), !Le || !Ke)
|
|
4587
4587
|
return Z(this, V);
|
|
4588
|
-
const [
|
|
4589
|
-
let Be = Math.round(0.2126 *
|
|
4588
|
+
const [Ye, lt] = [Le, Ke].map(Ue(this, Ze, Mc).bind(this));
|
|
4589
|
+
let Be = Math.round(0.2126 * Ye[0] + 0.7152 * Ye[1] + 0.0722 * Ye[2]), rt = Math.round(0.2126 * lt[0] + 0.7152 * lt[1] + 0.0722 * lt[2]), [ft, $e] = [Oe, qe].map(Ue(this, Ze, Mc).bind(this));
|
|
4590
4590
|
rt < Be && ([Be, rt, ft, $e] = [rt, Be, $e, ft]), Z(this, le, nu).style.color = "";
|
|
4591
|
-
const De = (
|
|
4592
|
-
const Ie = new Array(256), mt = (rt - Be) / Pt, Ct =
|
|
4591
|
+
const De = (Xe, Ft, Pt) => {
|
|
4592
|
+
const Ie = new Array(256), mt = (rt - Be) / Pt, Ct = Xe / 255, st = (Ft - Xe) / (255 * Pt);
|
|
4593
4593
|
let wt = 0;
|
|
4594
4594
|
for (let Nt = 0; Nt <= Pt; Nt++) {
|
|
4595
4595
|
const qt = Math.round(Be + Nt * mt), ke = Ct + Nt * st;
|
|
@@ -4700,7 +4700,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4700
4700
|
dontFlip: St = !1
|
|
4701
4701
|
}) {
|
|
4702
4702
|
this.viewBox = Me, this.scale = Le, this.rotation = Ke, this.offsetX = Oe, this.offsetY = qe;
|
|
4703
|
-
const
|
|
4703
|
+
const Ye = (Me[2] + Me[0]) / 2, lt = (Me[3] + Me[1]) / 2;
|
|
4704
4704
|
let Be, rt, ft, $e;
|
|
4705
4705
|
switch (Ke %= 360, Ke < 0 && (Ke += 360), Ke) {
|
|
4706
4706
|
case 180:
|
|
@@ -4720,7 +4720,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4720
4720
|
}
|
|
4721
4721
|
St && (ft = -ft, $e = -$e);
|
|
4722
4722
|
let De, Te, ye, Pe;
|
|
4723
|
-
Be === 0 ? (De = Math.abs(lt - Me[1]) * Le + Oe, Te = Math.abs(
|
|
4723
|
+
Be === 0 ? (De = Math.abs(lt - Me[1]) * Le + Oe, Te = Math.abs(Ye - Me[0]) * Le + qe, ye = (Me[3] - Me[1]) * Le, Pe = (Me[2] - Me[0]) * Le) : (De = Math.abs(Ye - Me[0]) * Le + Oe, Te = Math.abs(lt - Me[1]) * Le + qe, ye = (Me[2] - Me[0]) * Le, Pe = (Me[3] - Me[1]) * Le), this.transform = [Be * Le, rt * Le, ft * Le, $e * Le, De - Be * Le * Ye - ft * Le * lt, Te - rt * Le * Ye - $e * Le * lt], this.width = ye, this.height = Pe;
|
|
4724
4724
|
}
|
|
4725
4725
|
get rawDims() {
|
|
4726
4726
|
const {
|
|
@@ -4869,15 +4869,15 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4869
4869
|
qe = qe >= 1 && qe <= 31 ? qe : 1;
|
|
4870
4870
|
let St = parseInt(Le[4], 10);
|
|
4871
4871
|
St = St >= 0 && St <= 23 ? St : 0;
|
|
4872
|
-
let
|
|
4873
|
-
|
|
4872
|
+
let Ye = parseInt(Le[5], 10);
|
|
4873
|
+
Ye = Ye >= 0 && Ye <= 59 ? Ye : 0;
|
|
4874
4874
|
let lt = parseInt(Le[6], 10);
|
|
4875
4875
|
lt = lt >= 0 && lt <= 59 ? lt : 0;
|
|
4876
4876
|
const Be = Le[7] || "Z";
|
|
4877
4877
|
let rt = parseInt(Le[8], 10);
|
|
4878
4878
|
rt = rt >= 0 && rt <= 23 ? rt : 0;
|
|
4879
4879
|
let ft = parseInt(Le[9], 10) || 0;
|
|
4880
|
-
return ft = ft >= 0 && ft <= 59 ? ft : 0, Be === "-" ? (St += rt,
|
|
4880
|
+
return ft = ft >= 0 && ft <= 59 ? ft : 0, Be === "-" ? (St += rt, Ye += ft) : Be === "+" && (St -= rt, Ye -= ft), new Date(Date.UTC(Ke, Oe, qe, St, Ye, lt));
|
|
4881
4881
|
}
|
|
4882
4882
|
}
|
|
4883
4883
|
e.PDFDateString = k;
|
|
@@ -4941,7 +4941,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4941
4941
|
pageHeight: qe
|
|
4942
4942
|
} = Me.rawDims, {
|
|
4943
4943
|
style: St
|
|
4944
|
-
} = Ve,
|
|
4944
|
+
} = Ve, Ye = s.FeatureTest.isCSSRoundSupported, lt = `var(--scale-factor) * ${Oe}px`, Be = `var(--scale-factor) * ${qe}px`, rt = Ye ? `round(${lt}, 1px)` : `calc(${lt})`, ft = Ye ? `round(${Be}, 1px)` : `calc(${Be})`;
|
|
4945
4945
|
!Le || Me.rotation % 180 === 0 ? (St.width = rt, St.height = ft) : (St.width = ft, St.height = rt);
|
|
4946
4946
|
}
|
|
4947
4947
|
Ke && Ve.setAttribute("data-main-rotation", Me.rotation);
|
|
@@ -5586,11 +5586,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
5586
5586
|
const Ke = at - fe;
|
|
5587
5587
|
let Oe = 0;
|
|
5588
5588
|
const qe = Ke > Ve ? V : Ke * 8 - 7, St = qe & -8;
|
|
5589
|
-
let
|
|
5589
|
+
let Ye = 0, lt = 0;
|
|
5590
5590
|
for (; Oe < St; Oe += 8)
|
|
5591
5591
|
lt = ge[fe++], Ze[ce++] = lt & 128 ? Me : Le, Ze[ce++] = lt & 64 ? Me : Le, Ze[ce++] = lt & 32 ? Me : Le, Ze[ce++] = lt & 16 ? Me : Le, Ze[ce++] = lt & 8 ? Me : Le, Ze[ce++] = lt & 4 ? Me : Le, Ze[ce++] = lt & 2 ? Me : Le, Ze[ce++] = lt & 1 ? Me : Le;
|
|
5592
5592
|
for (; Oe < qe; Oe++)
|
|
5593
|
-
|
|
5593
|
+
Ye === 0 && (lt = ge[fe++], Ye = 128), Ze[ce++] = lt & Ye ? Me : Le, Ye >>= 1;
|
|
5594
5594
|
}
|
|
5595
5595
|
for (; ce < yt; )
|
|
5596
5596
|
Ze[ce++] = 0;
|
|
@@ -5776,11 +5776,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
5776
5776
|
ce = JSON.stringify(ie ? le : [le.slice(0, 4), Y]), fe = this._cachedBitmapsMap.get(Oe), fe || (fe = /* @__PURE__ */ new Map(), this._cachedBitmapsMap.set(Oe, fe));
|
|
5777
5777
|
const qe = fe.get(ce);
|
|
5778
5778
|
if (qe && !ie) {
|
|
5779
|
-
const St = Math.round(Math.min(le[0], le[2]) + le[4]),
|
|
5779
|
+
const St = Math.round(Math.min(le[0], le[2]) + le[4]), Ye = Math.round(Math.min(le[1], le[3]) + le[5]);
|
|
5780
5780
|
return {
|
|
5781
5781
|
canvas: qe,
|
|
5782
5782
|
offsetX: St,
|
|
5783
|
-
offsetY:
|
|
5783
|
+
offsetY: Ye
|
|
5784
5784
|
};
|
|
5785
5785
|
}
|
|
5786
5786
|
ge = qe;
|
|
@@ -6093,7 +6093,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
6093
6093
|
continue;
|
|
6094
6094
|
}
|
|
6095
6095
|
let Oe = !1;
|
|
6096
|
-
const qe = (Ke.isSpace ? fe : 0) + le, St = Ke.fontChar,
|
|
6096
|
+
const qe = (Ke.isSpace ? fe : 0) + le, St = Ke.fontChar, Ye = Ke.accent;
|
|
6097
6097
|
let lt, Be, rt = Ke.width;
|
|
6098
6098
|
if (Re) {
|
|
6099
6099
|
const $e = Ke.vmetric || Ne, De = -(Ke.vmetric ? $e[1] : rt * 0.5) * Qe, Te = $e[2] * Qe;
|
|
@@ -6109,11 +6109,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
6109
6109
|
rt !== $e && (lt += (rt - $e) / 2e3 * G / ie);
|
|
6110
6110
|
}
|
|
6111
6111
|
if (this.contentVisible && (Ke.isInFont || V.missingFile)) {
|
|
6112
|
-
if (at && !
|
|
6112
|
+
if (at && !Ye)
|
|
6113
6113
|
Y.fillText(St, lt, Be);
|
|
6114
|
-
else if (this.paintChar(St, lt, Be, Ze),
|
|
6115
|
-
const $e = lt + G *
|
|
6116
|
-
this.paintChar(
|
|
6114
|
+
else if (this.paintChar(St, lt, Be, Ze), Ye) {
|
|
6115
|
+
const $e = lt + G * Ye.offset.x / ie, De = Be - G * Ye.offset.y / ie;
|
|
6116
|
+
this.paintChar(Ye.fontChar, $e, De, Ze);
|
|
6117
6117
|
}
|
|
6118
6118
|
}
|
|
6119
6119
|
const ft = Re ? rt * Qe - qe * ce : rt * Qe + qe * ce;
|
|
@@ -10080,7 +10080,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
10080
10080
|
/* 29 */
|
|
10081
10081
|
/***/
|
|
10082
10082
|
(l, e, n) => {
|
|
10083
|
-
var W, G, Uo, ie, oy, fe, ce, ge, Se, Re, Fe, Ne, Qe, at, Ze, yt, Ve, Me, Le, Ke, Oe, qe, St, ly, lt, Wf, rt, Ym, $e, qm, Te, ye, Pe,
|
|
10083
|
+
var W, G, Uo, ie, oy, fe, ce, ge, Se, Re, Fe, Ne, Qe, at, Ze, yt, Ve, Me, Le, Ke, Oe, qe, St, ly, lt, Wf, rt, Ym, $e, qm, Te, ye, Pe, Xe, Ft, Pt, Ie, Qm, Ct, st, wt, Nt, uy, ke, Jm;
|
|
10084
10084
|
Object.defineProperty(e, "__esModule", {
|
|
10085
10085
|
value: !0
|
|
10086
10086
|
}), e.StampAnnotationElement = e.InkAnnotationElement = e.FreeTextAnnotationElement = e.AnnotationLayer = void 0;
|
|
@@ -11443,7 +11443,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
11443
11443
|
isRenderable: !0,
|
|
11444
11444
|
ignoreBorder: !0
|
|
11445
11445
|
});
|
|
11446
|
-
Ae(this,
|
|
11446
|
+
Ae(this, Xe, null);
|
|
11447
11447
|
this.containerClassName = "polylineAnnotation", this.svgElementName = "svg:polyline";
|
|
11448
11448
|
}
|
|
11449
11449
|
render() {
|
|
@@ -11458,17 +11458,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
11458
11458
|
de.push(tt + "," + ht);
|
|
11459
11459
|
}
|
|
11460
11460
|
de = de.join(" ");
|
|
11461
|
-
const be = We(this,
|
|
11461
|
+
const be = We(this, Xe, this.svgFactory.createElement(this.svgElementName));
|
|
11462
11462
|
return be.setAttribute("points", de), be.setAttribute("stroke-width", te.borderStyle.width || 1), be.setAttribute("stroke", "transparent"), be.setAttribute("fill", "transparent"), we.append(be), this.container.append(we), !te.popupRef && this.hasPopupData && this._createPopup(), this.container;
|
|
11463
11463
|
}
|
|
11464
11464
|
getElementsToTriggerPopup() {
|
|
11465
|
-
return Z(this,
|
|
11465
|
+
return Z(this, Xe);
|
|
11466
11466
|
}
|
|
11467
11467
|
addHighlightArea() {
|
|
11468
11468
|
this.container.classList.add("highlightArea");
|
|
11469
11469
|
}
|
|
11470
11470
|
}
|
|
11471
|
-
|
|
11471
|
+
Xe = new WeakMap();
|
|
11472
11472
|
class X extends z {
|
|
11473
11473
|
constructor(_e) {
|
|
11474
11474
|
super(_e), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
|
|
@@ -12026,12 +12026,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12026
12026
|
/* 33 */
|
|
12027
12027
|
/***/
|
|
12028
12028
|
(l, e, n) => {
|
|
12029
|
-
var u, p, _, T, x, S, g, v, b, R, y, w, C, N, D, cy, k, dy, M, fy, B, hy, X, Zm, se, py, K, eg, ue, my, J, gy, W, vy, G, yy, ie, _y, fe, xa, ge, tg, Re, Kf, Ne, Xf, at, ru, yt, ng, Me, Yf, Ke, xy, qe, rg,
|
|
12029
|
+
var u, p, _, T, x, S, g, v, b, R, y, w, C, N, D, cy, k, dy, M, fy, B, hy, X, Zm, se, py, K, eg, ue, my, J, gy, W, vy, G, yy, ie, _y, fe, xa, ge, tg, Re, Kf, Ne, Xf, at, ru, yt, ng, Me, Yf, Ke, xy, qe, rg, Ye, Ey, Be, Sy, ft, ig, De, qf, ye, iu;
|
|
12030
12030
|
Object.defineProperty(e, "__esModule", {
|
|
12031
12031
|
value: !0
|
|
12032
12032
|
}), e.InkEditor = void 0;
|
|
12033
12033
|
var t = n(1), s = n(4), o = n(29), d = n(6), h = n(5);
|
|
12034
|
-
const
|
|
12034
|
+
const Xe = class Xe extends s.AnnotationEditor {
|
|
12035
12035
|
constructor(Ie) {
|
|
12036
12036
|
super({
|
|
12037
12037
|
...Ie,
|
|
@@ -12084,13 +12084,13 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12084
12084
|
static updateDefaultParams(Ie, mt) {
|
|
12085
12085
|
switch (Ie) {
|
|
12086
12086
|
case t.AnnotationEditorParamsType.INK_THICKNESS:
|
|
12087
|
-
|
|
12087
|
+
Xe._defaultThickness = mt;
|
|
12088
12088
|
break;
|
|
12089
12089
|
case t.AnnotationEditorParamsType.INK_COLOR:
|
|
12090
|
-
|
|
12090
|
+
Xe._defaultColor = mt;
|
|
12091
12091
|
break;
|
|
12092
12092
|
case t.AnnotationEditorParamsType.INK_OPACITY:
|
|
12093
|
-
|
|
12093
|
+
Xe._defaultOpacity = mt / 100;
|
|
12094
12094
|
break;
|
|
12095
12095
|
}
|
|
12096
12096
|
}
|
|
@@ -12108,10 +12108,10 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12108
12108
|
}
|
|
12109
12109
|
}
|
|
12110
12110
|
static get defaultPropertiesToUpdate() {
|
|
12111
|
-
return [[t.AnnotationEditorParamsType.INK_THICKNESS,
|
|
12111
|
+
return [[t.AnnotationEditorParamsType.INK_THICKNESS, Xe._defaultThickness], [t.AnnotationEditorParamsType.INK_COLOR, Xe._defaultColor || s.AnnotationEditor._defaultLineColor], [t.AnnotationEditorParamsType.INK_OPACITY, Math.round(Xe._defaultOpacity * 100)]];
|
|
12112
12112
|
}
|
|
12113
12113
|
get propertiesToUpdate() {
|
|
12114
|
-
return [[t.AnnotationEditorParamsType.INK_THICKNESS, this.thickness ||
|
|
12114
|
+
return [[t.AnnotationEditorParamsType.INK_THICKNESS, this.thickness || Xe._defaultThickness], [t.AnnotationEditorParamsType.INK_COLOR, this.color || Xe._defaultColor || s.AnnotationEditor._defaultLineColor], [t.AnnotationEditorParamsType.INK_OPACITY, Math.round(100 * (this.opacity ?? Xe._defaultOpacity))]];
|
|
12115
12115
|
}
|
|
12116
12116
|
rebuild() {
|
|
12117
12117
|
this.parent && (super.rebuild(), this.div !== null && (this.canvas || (Ue(this, Re, Kf).call(this), Ue(this, Ne, Xf).call(this)), this.isAttachedToDOM || (this.parent.add(this), Ue(this, at, ru).call(this)), Ue(this, ye, iu).call(this)));
|
|
@@ -12201,7 +12201,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12201
12201
|
for (let {
|
|
12202
12202
|
bezier: ze
|
|
12203
12203
|
} of _e) {
|
|
12204
|
-
ze = Ue(we =
|
|
12204
|
+
ze = Ue(we = Xe, Ye, Ey).call(we, ze, te, me);
|
|
12205
12205
|
const tt = [];
|
|
12206
12206
|
st.paths.push(tt);
|
|
12207
12207
|
let ht = pt * (ze[0] - ot), At = pt * (ze[1] - ot);
|
|
@@ -12301,7 +12301,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12301
12301
|
} = this;
|
|
12302
12302
|
Ie.lineWidth = st * wt / Nt, Ie.lineCap = "round", Ie.lineJoin = "round", Ie.miterLimit = 10, Ie.strokeStyle = `${mt}${(0, h.opacityToHex)(Ct)}`;
|
|
12303
12303
|
}, se = new WeakSet(), py = function(Ie, mt) {
|
|
12304
|
-
this.canvas.addEventListener("contextmenu", d.noContextMenu), this.canvas.addEventListener("pointerleave", Z(this, T)), this.canvas.addEventListener("pointermove", Z(this, _)), this.canvas.addEventListener("pointerup", Z(this, x)), this.canvas.removeEventListener("pointerdown", Z(this, S)), this.isEditing = !0, Z(this, R) || (We(this, R, !0), Ue(this, at, ru).call(this), this.thickness || (this.thickness =
|
|
12304
|
+
this.canvas.addEventListener("contextmenu", d.noContextMenu), this.canvas.addEventListener("pointerleave", Z(this, T)), this.canvas.addEventListener("pointermove", Z(this, _)), this.canvas.addEventListener("pointerup", Z(this, x)), this.canvas.removeEventListener("pointerdown", Z(this, S)), this.isEditing = !0, Z(this, R) || (We(this, R, !0), Ue(this, at, ru).call(this), this.thickness || (this.thickness = Xe._defaultThickness), this.color || (this.color = Xe._defaultColor || s.AnnotationEditor._defaultLineColor), this.opacity ?? (this.opacity = Xe._defaultOpacity)), this.currentPath.push([Ie, mt]), We(this, b, !1), Ue(this, X, Zm).call(this), We(this, N, () => {
|
|
12305
12305
|
Ue(this, W, vy).call(this), Z(this, N) && window.requestAnimationFrame(Z(this, N));
|
|
12306
12306
|
}), window.requestAnimationFrame(Z(this, N));
|
|
12307
12307
|
}, K = new WeakSet(), eg = function(Ie, mt) {
|
|
@@ -12441,7 +12441,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12441
12441
|
throw new Error("Invalid rotation");
|
|
12442
12442
|
}
|
|
12443
12443
|
return Ie;
|
|
12444
|
-
},
|
|
12444
|
+
}, Ye = new WeakSet(), Ey = function(Ie, mt, Ct) {
|
|
12445
12445
|
const [st, wt, Nt, qt] = mt;
|
|
12446
12446
|
switch (Ct) {
|
|
12447
12447
|
case 0:
|
|
@@ -12478,8 +12478,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12478
12478
|
Ee === 0 && (te.push(ht, At), me.push(ht, At)), te.push(vt, gt, kt, Mt, Ut, Kt), me.push(vt, gt), Ee === we - 1 && me.push(Ut, Kt);
|
|
12479
12479
|
}
|
|
12480
12480
|
wt.push({
|
|
12481
|
-
bezier: Ue(pt =
|
|
12482
|
-
points: Ue(ot =
|
|
12481
|
+
bezier: Ue(pt = Xe, qe, rg).call(pt, te, st, this.rotation),
|
|
12482
|
+
points: Ue(ot = Xe, qe, rg).call(ot, me, st, this.rotation)
|
|
12483
12483
|
});
|
|
12484
12484
|
}
|
|
12485
12485
|
return wt;
|
|
@@ -12508,8 +12508,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12508
12508
|
this.translationX = -mt[0], this.translationY = -mt[1], Ue(this, at, ru).call(this), Ue(this, fe, xa).call(this), We(this, w, st), We(this, C, wt), this.setDims(st, wt);
|
|
12509
12509
|
const ot = Ie ? Ct / this.scaleFactor / 2 : 0;
|
|
12510
12510
|
this.translate(ke - this.translationX - ot, pt - this.translationY - ot);
|
|
12511
|
-
}, Ae(
|
|
12512
|
-
let f =
|
|
12511
|
+
}, Ae(Xe, Ke), Ae(Xe, qe), Ae(Xe, Ye), Mn(Xe, "_defaultColor", null), Mn(Xe, "_defaultOpacity", 1), Mn(Xe, "_defaultThickness", 1), Mn(Xe, "_type", "ink");
|
|
12512
|
+
let f = Xe;
|
|
12513
12513
|
e.InkEditor = f;
|
|
12514
12514
|
},
|
|
12515
12515
|
/* 34 */
|
|
@@ -14266,11 +14266,11 @@ function Page(l) {
|
|
|
14266
14266
|
function St() {
|
|
14267
14267
|
return K ? jsxRuntimeExports.jsx(AnnotationLayer, {}, `${Le}_annotations`) : null;
|
|
14268
14268
|
}
|
|
14269
|
-
function
|
|
14269
|
+
function Ye() {
|
|
14270
14270
|
return jsxRuntimeExports.jsxs(PageContext.Provider, { value: Ve, children: [Oe(), qe(), St(), h] });
|
|
14271
14271
|
}
|
|
14272
14272
|
function lt() {
|
|
14273
|
-
return Se ? se === null || le === void 0 || le === null ? jsxRuntimeExports.jsx(Message$1, { type: "loading", children: typeof g == "function" ? g() : g }) : se === !1 || le === !1 ? jsxRuntimeExports.jsx(Message$1, { type: "error", children: typeof T == "function" ? T() : T }) :
|
|
14273
|
+
return Se ? se === null || le === void 0 || le === null ? jsxRuntimeExports.jsx(Message$1, { type: "loading", children: typeof g == "function" ? g() : g }) : se === !1 || le === !1 ? jsxRuntimeExports.jsx(Message$1, { type: "error", children: typeof T == "function" ? T() : T }) : Ye() : jsxRuntimeExports.jsx(Message$1, { type: "no-data", children: typeof v == "function" ? v() : v });
|
|
14274
14274
|
}
|
|
14275
14275
|
return jsxRuntimeExports.jsx("div", Object.assign({ className: clsx(t, f), "data-page-number": Se, ref: mergeRefs(S, ce), style: {
|
|
14276
14276
|
"--scale-factor": `${Fe}`,
|
|
@@ -22884,8 +22884,8 @@ var hls = { exports: {} };
|
|
|
22884
22884
|
se && (g |= M.length && re && (b && Math.abs(S - re / F) < 0.1 || Math.abs(M[0].pts - re - X) < F / 5)), g || (re = S * F), M.forEach(function(Oe) {
|
|
22885
22885
|
Oe.pts = z(Oe.pts - X, re), Oe.dts = z(Oe.dts - X, re);
|
|
22886
22886
|
}), M.sort(function(Oe, qe) {
|
|
22887
|
-
var St = Oe.dts - qe.dts,
|
|
22888
|
-
return St ||
|
|
22887
|
+
var St = Oe.dts - qe.dts, Ye = Oe.pts - qe.pts;
|
|
22888
|
+
return St || Ye || Oe.id - qe.id;
|
|
22889
22889
|
});
|
|
22890
22890
|
var ee = M.reduce(function(Oe, qe) {
|
|
22891
22891
|
return Math.max(Math.min(Oe, qe.pts - qe.dts), -18e3);
|
|
@@ -27931,7 +27931,7 @@ const noop$1 = () => {
|
|
|
27931
27931
|
B || (B = await h({
|
|
27932
27932
|
type: "getSpeech",
|
|
27933
27933
|
payload: j
|
|
27934
|
-
}), B ?
|
|
27934
|
+
}), B ? ttsCache[`${j.voiceId}_${j.text}`] = B : _()), B && (y.current = k(B));
|
|
27935
27935
|
} catch {
|
|
27936
27936
|
_();
|
|
27937
27937
|
}
|
|
@@ -27957,9 +27957,8 @@ const noop$1 = () => {
|
|
|
27957
27957
|
(n === "file" || !n) && o ? y.current = k(o == null ? void 0 : o.url) : _();
|
|
27958
27958
|
}, [o, n, P, w, _, F, k, s, e, l]), [y, M];
|
|
27959
27959
|
}, cleanTextOfHtmlTags = (l) => {
|
|
27960
|
-
const e =
|
|
27961
|
-
|
|
27962
|
-
return l.replace(e, "").replace(n, "").replace(/(<([^>]+)>)/gi, "");
|
|
27960
|
+
const e = document.createElement("div");
|
|
27961
|
+
return e.innerHTML = l, e.textContent || e.innerText || "";
|
|
27963
27962
|
}, READING_TIME = 0.2;
|
|
27964
27963
|
function LecturesComponent({
|
|
27965
27964
|
emitEvent: l,
|
|
@@ -30434,23 +30433,23 @@ function ConversationalProComponent({
|
|
|
30434
30433
|
e({ type: "success" });
|
|
30435
30434
|
}, [e]), Ze = useCallback(
|
|
30436
30435
|
($e, De) => {
|
|
30437
|
-
const Te = [3, 2, 1][$e.id], Pe = o.filter((
|
|
30436
|
+
const Te = [3, 2, 1][$e.id], Pe = o.filter((Xe) => Xe.fromId === X.id).find((Xe) => parseInt(Xe.fromPointIndex) === Te);
|
|
30438
30437
|
if (Pe) {
|
|
30439
|
-
const
|
|
30440
|
-
Pe.fromId === Pe.toId ? De() :
|
|
30438
|
+
const Xe = s.findIndex((Ft) => Ft.id === Pe.toId);
|
|
30439
|
+
Pe.fromId === Pe.toId ? De() : Xe >= 0 ? (P(Xe), e({ type: "notifyProgress", payload: { line: Xe } })) : at();
|
|
30441
30440
|
} else
|
|
30442
30441
|
at();
|
|
30443
30442
|
},
|
|
30444
30443
|
[X.id, o, e, at, s]
|
|
30445
30444
|
), yt = useCallback(
|
|
30446
30445
|
($e = !0) => {
|
|
30447
|
-
const De = $e ? ["fromId", "toId"] : ["toId", "fromId"], Te = o.filter((
|
|
30446
|
+
const De = $e ? ["fromId", "toId"] : ["toId", "fromId"], Te = o.filter((Xe) => Xe[De[0]] === X.id), ye = Te.length === 1 ? Te[0] : Te.find((Xe) => Xe[De[1]] === V);
|
|
30448
30447
|
if (!(ye != null && ye[De[0]])) {
|
|
30449
30448
|
at();
|
|
30450
30449
|
return;
|
|
30451
30450
|
}
|
|
30452
30451
|
$e || W(H.slice(0, -1));
|
|
30453
|
-
const Pe = s.findIndex((
|
|
30452
|
+
const Pe = s.findIndex((Xe) => Xe.id === ye[De[1]]);
|
|
30454
30453
|
Pe >= 0 ? (P(Pe), e({ type: "notifyProgress", payload: { line: Pe } })) : at();
|
|
30455
30454
|
},
|
|
30456
30455
|
[X.id, o, H, e, at, V, s]
|
|
@@ -30460,7 +30459,7 @@ function ConversationalProComponent({
|
|
|
30460
30459
|
if ($e) {
|
|
30461
30460
|
const De = [3, 2, 1][$e.id], ye = o.filter((Pe) => Pe.fromId === X.id).find((Pe) => parseInt(Pe.fromPointIndex) === De);
|
|
30462
30461
|
if (ye) {
|
|
30463
|
-
const Pe = s.findIndex((
|
|
30462
|
+
const Pe = s.findIndex((Xe) => Xe.id === ye.toId);
|
|
30464
30463
|
Pe >= 0 && e({ type: "notifyProgress", payload: { line: Pe } });
|
|
30465
30464
|
} else
|
|
30466
30465
|
e({ type: "saveNode" });
|
|
@@ -30510,7 +30509,7 @@ function ConversationalProComponent({
|
|
|
30510
30509
|
M("click-ui"), Ke() ? at() : (w(!1), Me());
|
|
30511
30510
|
}, qe = () => {
|
|
30512
30511
|
M("click-ui"), w(!1), Le();
|
|
30513
|
-
}, St = y && !pe && !t && !J,
|
|
30512
|
+
}, St = y && !pe && !t && !J, Ye = useMemo(() => G() >= 0 && H.length === 0 && ne || D === 0 && !ne || ie() || le(), [G, H.length, ne, D, ie, le]);
|
|
30514
30513
|
useEkho({
|
|
30515
30514
|
audioType: X == null ? void 0 : X.audioType,
|
|
30516
30515
|
volume: X == null ? void 0 : X.audioVolume,
|
|
@@ -30573,7 +30572,7 @@ function ConversationalProComponent({
|
|
|
30573
30572
|
disabled: pe,
|
|
30574
30573
|
repeat: !1,
|
|
30575
30574
|
forward: Oe,
|
|
30576
|
-
rewind:
|
|
30575
|
+
rewind: Ye ? null : qe
|
|
30577
30576
|
});
|
|
30578
30577
|
if (useEffect(() => lt(), [lt]), J)
|
|
30579
30578
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -30623,8 +30622,8 @@ function ConversationalProComponent({
|
|
|
30623
30622
|
"button",
|
|
30624
30623
|
{
|
|
30625
30624
|
"data-testid": "conversational-pro-button-back",
|
|
30626
|
-
className: `gat--btn__round ${
|
|
30627
|
-
disabled:
|
|
30625
|
+
className: `gat--btn__round ${Ye ? "disabled" : ""}`,
|
|
30626
|
+
disabled: Ye ? !0 : "",
|
|
30628
30627
|
type: "button",
|
|
30629
30628
|
onClick: qe,
|
|
30630
30629
|
"aria-label": LangIsRtl() ? fe("storylines.misc.forward") : fe("storylines.misc.rewind"),
|
|
@@ -40120,11 +40119,11 @@ function requireScheduler_development() {
|
|
|
40120
40119
|
}
|
|
40121
40120
|
function f(Be, rt, ft) {
|
|
40122
40121
|
for (var $e = ft, De = Be.length, Te = De >>> 1; $e < Te; ) {
|
|
40123
|
-
var ye = ($e + 1) * 2 - 1, Pe = Be[ye],
|
|
40122
|
+
var ye = ($e + 1) * 2 - 1, Pe = Be[ye], Xe = ye + 1, Ft = Be[Xe];
|
|
40124
40123
|
if (u(Pe, rt) < 0)
|
|
40125
|
-
|
|
40126
|
-
else if (
|
|
40127
|
-
Be[$e] = Ft, Be[
|
|
40124
|
+
Xe < De && u(Ft, Pe) < 0 ? (Be[$e] = Ft, Be[Xe] = rt, $e = Xe) : (Be[$e] = Pe, Be[ye] = rt, $e = ye);
|
|
40125
|
+
else if (Xe < De && u(Ft, rt) < 0)
|
|
40126
|
+
Be[$e] = Ft, Be[Xe] = rt, $e = Xe;
|
|
40128
40127
|
else
|
|
40129
40128
|
return;
|
|
40130
40129
|
}
|
|
@@ -40275,7 +40274,7 @@ function requireScheduler_development() {
|
|
|
40275
40274
|
ye = D;
|
|
40276
40275
|
break;
|
|
40277
40276
|
}
|
|
40278
|
-
var Pe = De + ye,
|
|
40277
|
+
var Pe = De + ye, Xe = {
|
|
40279
40278
|
id: j++,
|
|
40280
40279
|
callback: rt,
|
|
40281
40280
|
priorityLevel: Be,
|
|
@@ -40283,7 +40282,7 @@ function requireScheduler_development() {
|
|
|
40283
40282
|
expirationTime: Pe,
|
|
40284
40283
|
sortIndex: -1
|
|
40285
40284
|
};
|
|
40286
|
-
return De > $e ? (
|
|
40285
|
+
return De > $e ? (Xe.sortIndex = De, s(M, Xe), o(F) === null && Xe === o(M) && (se ? St() : se = !0, qe(pe, De - $e))) : (Xe.sortIndex = Pe, s(F, Xe), !re && !X && (re = !0, Oe(J))), Xe;
|
|
40287
40286
|
}
|
|
40288
40287
|
function ie() {
|
|
40289
40288
|
}
|
|
@@ -40350,8 +40349,8 @@ function requireScheduler_development() {
|
|
|
40350
40349
|
function St() {
|
|
40351
40350
|
K(Fe), Fe = -1;
|
|
40352
40351
|
}
|
|
40353
|
-
var
|
|
40354
|
-
l.unstable_IdlePriority = S, l.unstable_ImmediatePriority = p, l.unstable_LowPriority = x, l.unstable_NormalPriority = T, l.unstable_Profiling = lt, l.unstable_UserBlockingPriority = _, l.unstable_cancelCallback = ce, l.unstable_continueExecution = le, l.unstable_forceFrameRate = yt, l.unstable_getCurrentPriorityLevel = ge, l.unstable_getFirstCallbackNode = fe, l.unstable_next = V, l.unstable_pauseExecution = ie, l.unstable_requestPaint =
|
|
40352
|
+
var Ye = Ze, lt = null;
|
|
40353
|
+
l.unstable_IdlePriority = S, l.unstable_ImmediatePriority = p, l.unstable_LowPriority = x, l.unstable_NormalPriority = T, l.unstable_Profiling = lt, l.unstable_UserBlockingPriority = _, l.unstable_cancelCallback = ce, l.unstable_continueExecution = le, l.unstable_forceFrameRate = yt, l.unstable_getCurrentPriorityLevel = ge, l.unstable_getFirstCallbackNode = fe, l.unstable_next = V, l.unstable_pauseExecution = ie, l.unstable_requestPaint = Ye, l.unstable_runWithPriority = W, l.unstable_scheduleCallback = Y, l.unstable_shouldYield = at, l.unstable_wrapCallback = G, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
40355
40354
|
}();
|
|
40356
40355
|
}(scheduler_development)), scheduler_development;
|
|
40357
40356
|
}
|
|
@@ -40584,7 +40583,7 @@ function requireReactReconciler_production_min() {
|
|
|
40584
40583
|
}
|
|
40585
40584
|
return null;
|
|
40586
40585
|
}
|
|
40587
|
-
var X = Array.isArray, re = e.getPublicInstance, se = e.getRootHostContext, ee = e.getChildHostContext, K = e.prepareForCommit, ne = e.resetAfterCommit, ue = e.createInstance, pe = e.appendInitialChild, J = e.finalizeInitialChildren, H = e.prepareUpdate, W = e.shouldSetTextContent, V = e.createTextInstance, G = e.scheduleTimeout, Y = e.cancelTimeout, ie = e.noTimeout, le = e.isPrimaryRenderer, fe = e.supportsMutation, ce = e.supportsPersistence, ge = e.supportsHydration, Se = e.getInstanceFromNode, Re = e.preparePortalMount, Fe = e.getCurrentEventPriority, Ne = e.detachDeletedInstance, Qe = e.supportsMicrotasks, at = e.scheduleMicrotask, Ze = e.supportsTestSelectors, yt = e.findFiberRoot, Ve = e.getBoundingRect, Me = e.getTextContent, Le = e.isHiddenSubtree, Ke = e.matchAccessibilityRole, Oe = e.setFocusIfFocusable, qe = e.setupIntersectionObserver, St = e.appendChild,
|
|
40586
|
+
var X = Array.isArray, re = e.getPublicInstance, se = e.getRootHostContext, ee = e.getChildHostContext, K = e.prepareForCommit, ne = e.resetAfterCommit, ue = e.createInstance, pe = e.appendInitialChild, J = e.finalizeInitialChildren, H = e.prepareUpdate, W = e.shouldSetTextContent, V = e.createTextInstance, G = e.scheduleTimeout, Y = e.cancelTimeout, ie = e.noTimeout, le = e.isPrimaryRenderer, fe = e.supportsMutation, ce = e.supportsPersistence, ge = e.supportsHydration, Se = e.getInstanceFromNode, Re = e.preparePortalMount, Fe = e.getCurrentEventPriority, Ne = e.detachDeletedInstance, Qe = e.supportsMicrotasks, at = e.scheduleMicrotask, Ze = e.supportsTestSelectors, yt = e.findFiberRoot, Ve = e.getBoundingRect, Me = e.getTextContent, Le = e.isHiddenSubtree, Ke = e.matchAccessibilityRole, Oe = e.setFocusIfFocusable, qe = e.setupIntersectionObserver, St = e.appendChild, Ye = e.appendChildToContainer, lt = e.commitTextUpdate, Be = e.commitMount, rt = e.commitUpdate, ft = e.insertBefore, $e = e.insertInContainerBefore, De = e.removeChild, Te = e.removeChildFromContainer, ye = e.resetTextContent, Pe = e.hideInstance, Xe = e.hideTextInstance, Ft = e.unhideInstance, Pt = e.unhideTextInstance, Ie = e.clearContainer, mt = e.cloneInstance, Ct = e.createContainerChildSet, st = e.appendChildToContainerChildSet, wt = e.finalizeContainerChildren, Nt = e.replaceContainerChildren, qt = e.cloneHiddenInstance, ke = e.cloneHiddenTextInstance, pt = e.canHydrateInstance, ot = e.canHydrateTextInstance, _e = e.canHydrateSuspenseInstance, te = e.isSuspenseInstancePending, me = e.isSuspenseInstanceFallback, Ee = e.getSuspenseInstanceFallbackErrorDetails, we = e.registerSuspenseInstanceRetry, de = e.getNextHydratableSibling, be = e.getFirstHydratableChild, ze = e.getFirstHydratableChildWithinContainer, tt = e.getFirstHydratableChildWithinSuspenseInstance, ht = e.hydrateInstance, At = e.hydrateTextInstance, vt = e.hydrateSuspenseInstance, gt = e.getNextHydratableInstanceAfterSuspenseInstance, kt = e.commitHydratedContainer, Mt = e.commitHydratedSuspenseInstance, Ut = e.clearSuspenseBoundary, Kt = e.clearSuspenseBoundaryFromContainer, An = e.shouldDeleteUnhydratedTailInstances, _n = e.didNotMatchHydratedContainerTextInstance, zn = e.didNotMatchHydratedTextInstance, mi;
|
|
40588
40587
|
function Fr(E) {
|
|
40589
40588
|
if (mi === void 0)
|
|
40590
40589
|
try {
|
|
@@ -42728,7 +42727,7 @@ Error generating stack: ` + ae.message + `
|
|
|
42728
42727
|
function bl(E, A, I) {
|
|
42729
42728
|
var $ = E.tag;
|
|
42730
42729
|
if ($ === 5 || $ === 6)
|
|
42731
|
-
E = E.stateNode, A ? $e(I, E, A) :
|
|
42730
|
+
E = E.stateNode, A ? $e(I, E, A) : Ye(I, E);
|
|
42732
42731
|
else if ($ !== 4 && (E = E.child, E !== null))
|
|
42733
42732
|
for (bl(E, A, I), E = E.sibling; E !== null; )
|
|
42734
42733
|
bl(E, A, I), E = E.sibling;
|
|
@@ -43001,7 +43000,7 @@ Error generating stack: ` + ae.message + `
|
|
|
43001
43000
|
} else if (A.tag === 6) {
|
|
43002
43001
|
if ($ === null)
|
|
43003
43002
|
try {
|
|
43004
|
-
ae = A.stateNode, I ?
|
|
43003
|
+
ae = A.stateNode, I ? Xe(ae) : Pt(ae, A.memoizedProps);
|
|
43005
43004
|
} catch (It) {
|
|
43006
43005
|
vn(E, E.return, It);
|
|
43007
43006
|
}
|
|
@@ -44523,11 +44522,11 @@ function requireReactReconciler_development() {
|
|
|
44523
44522
|
function x(a, c) {
|
|
44524
44523
|
a._reactInternals = c;
|
|
44525
44524
|
}
|
|
44526
|
-
var S = !1, g = !1, v = !1, b = !1, R = !1, y = !0, w = !0, C = !0, N = 0, D = 1, P = 2, k = 3, F = 4, M = 5, j = 6, B = 7, z = 8, X = 9, re = 10, se = 11, ee = 12, K = 13, ne = 14, ue = 15, pe = 16, J = 17, H = 18, W = 19, V = 21, G = 22, Y = 23, ie = 24, le = 25, fe = Symbol.for("react.element"), ce = Symbol.for("react.portal"), ge = Symbol.for("react.fragment"), Se = Symbol.for("react.strict_mode"), Re = Symbol.for("react.profiler"), Fe = Symbol.for("react.provider"), Ne = Symbol.for("react.context"), Qe = Symbol.for("react.forward_ref"), at = Symbol.for("react.suspense"), Ze = Symbol.for("react.suspense_list"), yt = Symbol.for("react.memo"), Ve = Symbol.for("react.lazy"), Me = Symbol.for("react.scope"), Le = Symbol.for("react.debug_trace_mode"), Ke = Symbol.for("react.offscreen"), Oe = Symbol.for("react.legacy_hidden"), qe = Symbol.for("react.cache"), St = Symbol.for("react.tracing_marker"),
|
|
44525
|
+
var S = !1, g = !1, v = !1, b = !1, R = !1, y = !0, w = !0, C = !0, N = 0, D = 1, P = 2, k = 3, F = 4, M = 5, j = 6, B = 7, z = 8, X = 9, re = 10, se = 11, ee = 12, K = 13, ne = 14, ue = 15, pe = 16, J = 17, H = 18, W = 19, V = 21, G = 22, Y = 23, ie = 24, le = 25, fe = Symbol.for("react.element"), ce = Symbol.for("react.portal"), ge = Symbol.for("react.fragment"), Se = Symbol.for("react.strict_mode"), Re = Symbol.for("react.profiler"), Fe = Symbol.for("react.provider"), Ne = Symbol.for("react.context"), Qe = Symbol.for("react.forward_ref"), at = Symbol.for("react.suspense"), Ze = Symbol.for("react.suspense_list"), yt = Symbol.for("react.memo"), Ve = Symbol.for("react.lazy"), Me = Symbol.for("react.scope"), Le = Symbol.for("react.debug_trace_mode"), Ke = Symbol.for("react.offscreen"), Oe = Symbol.for("react.legacy_hidden"), qe = Symbol.for("react.cache"), St = Symbol.for("react.tracing_marker"), Ye = Symbol.iterator, lt = "@@iterator";
|
|
44527
44526
|
function Be(a) {
|
|
44528
44527
|
if (a === null || typeof a != "object")
|
|
44529
44528
|
return null;
|
|
44530
|
-
var c =
|
|
44529
|
+
var c = Ye && a[Ye] || a[lt];
|
|
44531
44530
|
return typeof c == "function" ? c : null;
|
|
44532
44531
|
}
|
|
44533
44532
|
function rt(a, c, O) {
|
|
@@ -44650,7 +44649,7 @@ function requireReactReconciler_development() {
|
|
|
44650
44649
|
var Pe = (
|
|
44651
44650
|
/* */
|
|
44652
44651
|
0
|
|
44653
|
-
),
|
|
44652
|
+
), Xe = (
|
|
44654
44653
|
/* */
|
|
44655
44654
|
1
|
|
44656
44655
|
), Ft = (
|
|
@@ -49189,7 +49188,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49189
49188
|
}
|
|
49190
49189
|
He(!1);
|
|
49191
49190
|
}
|
|
49192
|
-
return jn(), a !== null && !gs ? (kg(a, c, U), ga(a, c, U)) : (I() && Ce && Yu(c), c.flags |=
|
|
49191
|
+
return jn(), a !== null && !gs ? (kg(a, c, U), ga(a, c, U)) : (I() && Ce && Yu(c), c.flags |= Xe, di(a, c, ve, U), c.child);
|
|
49193
49192
|
}
|
|
49194
49193
|
function f0(a, c, O, L, U) {
|
|
49195
49194
|
if (a === null) {
|
|
@@ -49228,7 +49227,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49228
49227
|
if (Rt = Rt !== null ? Rt : Ge, Rt(Et, L) && a.ref === c.ref)
|
|
49229
49228
|
return ga(a, c, U);
|
|
49230
49229
|
}
|
|
49231
|
-
c.flags |=
|
|
49230
|
+
c.flags |= Xe;
|
|
49232
49231
|
var bt = Io(Je, L);
|
|
49233
49232
|
return bt.ref = c.ref, bt.return = c, c.child = bt, bt;
|
|
49234
49233
|
}
|
|
@@ -49355,7 +49354,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49355
49354
|
}
|
|
49356
49355
|
He(!1);
|
|
49357
49356
|
}
|
|
49358
|
-
return jn(), a !== null && !gs ? (kg(a, c, U), ga(a, c, U)) : (I() && Ce && Yu(c), c.flags |=
|
|
49357
|
+
return jn(), a !== null && !gs ? (kg(a, c, U), ga(a, c, U)) : (I() && Ce && Yu(c), c.flags |= Xe, di(a, c, ve, U), c.child);
|
|
49359
49358
|
}
|
|
49360
49359
|
function g0(a, c, O, L, U) {
|
|
49361
49360
|
{
|
|
@@ -49421,7 +49420,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49421
49420
|
}
|
|
49422
49421
|
jn();
|
|
49423
49422
|
}
|
|
49424
|
-
return c.flags |=
|
|
49423
|
+
return c.flags |= Xe, a !== null && oe ? c_(a, c, ve, q) : di(a, c, ve, q), c.memoizedState = he.state, U && ka(c, O, !0), c.child;
|
|
49425
49424
|
}
|
|
49426
49425
|
function v0(a) {
|
|
49427
49426
|
var c = a.stateNode;
|
|
@@ -49532,7 +49531,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49532
49531
|
}
|
|
49533
49532
|
c.mode & Tn && dt.recordLegacyContextWarning(c, null), He(!0), dc.current = c, he = $l(null, c, O, U, q, L), ve = Hl(), He(!1);
|
|
49534
49533
|
}
|
|
49535
|
-
if (jn(), c.flags |=
|
|
49534
|
+
if (jn(), c.flags |= Xe, typeof he == "object" && he !== null && typeof he.render == "function" && he.$$typeof === void 0) {
|
|
49536
49535
|
var je = $e(O) || "Unknown";
|
|
49537
49536
|
fc[je] || (u("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", je, je, je), fc[je] = !0);
|
|
49538
49537
|
}
|
|
@@ -49971,7 +49970,7 @@ Check the render method of \`` + L + "`.");
|
|
|
49971
49970
|
var oe = fr(L);
|
|
49972
49971
|
aa(c);
|
|
49973
49972
|
var he;
|
|
49974
|
-
return dc.current = c, He(!0), he = q(oe), He(!1), jn(), c.flags |=
|
|
49973
|
+
return dc.current = c, He(!0), he = q(oe), He(!1), jn(), c.flags |= Xe, di(a, c, he, O), c.child;
|
|
49975
49974
|
}
|
|
49976
49975
|
function hc() {
|
|
49977
49976
|
gs = !0;
|
|
@@ -54409,7 +54408,7 @@ function ImageClickWrapperComponent(l) {
|
|
|
54409
54408
|
rewards: (Pe = h == null ? void 0 : h.timerFeedback) == null ? void 0 : Pe.rewards
|
|
54410
54409
|
};
|
|
54411
54410
|
}), W(!0), Oe(), Ke();
|
|
54412
|
-
}, [Oe, Ke, (De = h.timerFeedback) == null ? void 0 : De.desc, (Te = h.timerFeedback) == null ? void 0 : Te.rewards]),
|
|
54411
|
+
}, [Oe, Ke, (De = h.timerFeedback) == null ? void 0 : De.desc, (Te = h.timerFeedback) == null ? void 0 : Te.rewards]), Ye = useCallback(() => {
|
|
54413
54412
|
clearInterval(Y.current), Y.current = setInterval(() => {
|
|
54414
54413
|
G.current = Date.now(), G.current > ie.current && St();
|
|
54415
54414
|
}, 250);
|
|
@@ -54418,13 +54417,13 @@ function ImageClickWrapperComponent(l) {
|
|
|
54418
54417
|
var ye;
|
|
54419
54418
|
if ((u.length === B.length || x && B.length > 0) && !X) {
|
|
54420
54419
|
re(!0);
|
|
54421
|
-
const Pe = B[B.length - 1],
|
|
54420
|
+
const Pe = B[B.length - 1], Xe = C == null ? void 0 : C.correctFeedbacks.find((Ft) => Ft.id === Pe.id);
|
|
54422
54421
|
(!((ye = C == null ? void 0 : C.correctFeedbacks) != null && ye.length) || C != null && C.correctFeedbacks.some((Ft) => !Ft.desc) || x) && (ne((Ft) => ({
|
|
54423
54422
|
...Ft,
|
|
54424
54423
|
show: !0,
|
|
54425
54424
|
success: !0,
|
|
54426
|
-
text:
|
|
54427
|
-
rewards:
|
|
54425
|
+
text: Xe ? Xe.desc : h.solution.right.desc,
|
|
54426
|
+
rewards: Xe ? Xe.rewards : h.solution.right.rewards
|
|
54428
54427
|
})), T && (Oe(), qe()));
|
|
54429
54428
|
}
|
|
54430
54429
|
}, [
|
|
@@ -54461,11 +54460,11 @@ function ImageClickWrapperComponent(l) {
|
|
|
54461
54460
|
se && o(!0);
|
|
54462
54461
|
}, [se, o]);
|
|
54463
54462
|
const lt = (ye, Pe = !1) => {
|
|
54464
|
-
var
|
|
54463
|
+
var Xe, Ft;
|
|
54465
54464
|
if (!X) {
|
|
54466
54465
|
const { rewards: Pt, desc: Ie } = at.wrong;
|
|
54467
54466
|
let mt = Ie, Ct = Pt;
|
|
54468
|
-
const st = (
|
|
54467
|
+
const st = (Xe = C == null ? void 0 : C.wrongFeedbacks) == null ? void 0 : Xe.find((wt) => wt.id === ye.id);
|
|
54469
54468
|
st && (mt = st.desc, Ct = st.rewards), _ && (z([]), Pe && (Ft = h == null ? void 0 : h.orderFeedback) != null && Ft.desc && (mt = h.orderFeedback.desc, Ct = h.orderFeedback.rewards)), T && (Oe(), qe()), ne((wt) => ({
|
|
54470
54469
|
...wt,
|
|
54471
54470
|
show: !0,
|
|
@@ -54477,7 +54476,7 @@ function ImageClickWrapperComponent(l) {
|
|
|
54477
54476
|
}, Be = useCallback(() => {
|
|
54478
54477
|
fe.current = Date.now();
|
|
54479
54478
|
const ye = fe.current + ce.current;
|
|
54480
|
-
G.current = null, ie.current = ye, (T || H) && (K.success ? u.length === B.length || x && B.length > 0 ? Oe() : (Fe(ce.current * 1e-3), Me(),
|
|
54479
|
+
G.current = null, ie.current = ye, (T || H) && (K.success ? u.length === B.length || x && B.length > 0 ? Oe() : (Fe(ce.current * 1e-3), Me(), Ye()) : (z([]), J(!0), D())), Le(K.rewards, K.success), Qe("click-ui"), ne((Pe) => ({
|
|
54481
54480
|
...Pe,
|
|
54482
54481
|
show: !1,
|
|
54483
54482
|
success: !1,
|
|
@@ -54497,16 +54496,16 @@ function ImageClickWrapperComponent(l) {
|
|
|
54497
54496
|
D,
|
|
54498
54497
|
Oe,
|
|
54499
54498
|
Me,
|
|
54500
|
-
|
|
54499
|
+
Ye
|
|
54501
54500
|
]), rt = (ye) => {
|
|
54502
|
-
var Pe,
|
|
54501
|
+
var Pe, Xe;
|
|
54503
54502
|
if (!B.some((Ft) => Ft.index === ye.index) && !K.show && !X) {
|
|
54504
54503
|
Qe("click-ui");
|
|
54505
54504
|
let Ft = at.right.desc, { rewards: Pt } = at.right;
|
|
54506
54505
|
const Ie = [...B, ye];
|
|
54507
54506
|
if (_ && ye.index === B.length || !_) {
|
|
54508
54507
|
if (T && qe(Re), s(), (Pe = C == null ? void 0 : C.correctFeedbacks) != null && Pe.length) {
|
|
54509
|
-
const mt = (
|
|
54508
|
+
const mt = (Xe = C.correctFeedbacks) == null ? void 0 : Xe.find((Ct) => Ct.id === ye.id);
|
|
54510
54509
|
mt && (Ft = mt.desc, Pt = mt.rewards), !Ft && u.length > Ie.length && !x ? Le(Pt, !0) : Ft && !x && (ne((Ct) => ({
|
|
54511
54510
|
...Ct,
|
|
54512
54511
|
show: !0,
|
|
@@ -54520,13 +54519,13 @@ function ImageClickWrapperComponent(l) {
|
|
|
54520
54519
|
lt(ye, !0);
|
|
54521
54520
|
}
|
|
54522
54521
|
}, ft = useCallback(() => {
|
|
54523
|
-
Oe(), Fe(T), Me(), !ue.current && P && F(), J(!1), V.current = Date.now(), ie.current = V.current + T * 1e3,
|
|
54522
|
+
Oe(), Fe(T), Me(), !ue.current && P && F(), J(!1), V.current = Date.now(), ie.current = V.current + T * 1e3, Ye();
|
|
54524
54523
|
}, [
|
|
54525
54524
|
Oe,
|
|
54526
54525
|
T,
|
|
54527
54526
|
Me,
|
|
54528
54527
|
P,
|
|
54529
|
-
|
|
54528
|
+
Ye,
|
|
54530
54529
|
F
|
|
54531
54530
|
]);
|
|
54532
54531
|
return useEffect(() => {
|
|
@@ -54535,7 +54534,7 @@ function ImageClickWrapperComponent(l) {
|
|
|
54535
54534
|
T && Re === 0 && St();
|
|
54536
54535
|
}, [Re, St, T]), useEffect(() => {
|
|
54537
54536
|
T && (M ? (Oe(), qe()) : Me());
|
|
54538
|
-
}, [Oe,
|
|
54537
|
+
}, [Oe, Ye, M, qe, Me, T]), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b, children: [
|
|
54539
54538
|
K.show ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54540
54539
|
FeedbackComponent$1,
|
|
54541
54540
|
{
|
|
@@ -56939,71 +56938,71 @@ function WriterPuzzleComponent({
|
|
|
56939
56938
|
backgroundImage: x,
|
|
56940
56939
|
hideBackgroundImageTheme: S = !1
|
|
56941
56940
|
}) {
|
|
56942
|
-
const g = (
|
|
56941
|
+
const g = (Ye) => e({ type: "translate", payload: Ye }), v = useRef(), [b, R] = useState(!1), [y, w] = useState(!1), [C, N] = useState(0), [D, P] = useState({
|
|
56943
56942
|
[`text_${C}`]: {
|
|
56944
56943
|
..._[C],
|
|
56945
56944
|
id: `text_${C}`,
|
|
56946
56945
|
correct: ""
|
|
56947
56946
|
}
|
|
56948
|
-
}), [k, F] = useState(!1), [M, j] = useState([]), [B, z] = useState(!1), [X, re] = useState(!1), [se, ee] = useState(!1), [K, ne] = useState(!0), [ue, pe] = useState([]), [J, H] = useState(!0), [W] = T, V = useRef({}), G = (
|
|
56947
|
+
}), [k, F] = useState(!1), [M, j] = useState([]), [B, z] = useState(!1), [X, re] = useState(!1), [se, ee] = useState(!1), [K, ne] = useState(!0), [ue, pe] = useState([]), [J, H] = useState(!0), [W] = T, V = useRef({}), G = (Ye) => {
|
|
56949
56948
|
let lt;
|
|
56950
|
-
return
|
|
56949
|
+
return Ye.electionTexts.forEach((Be, rt) => {
|
|
56951
56950
|
Be.correct && (lt = rt);
|
|
56952
56951
|
}), lt;
|
|
56953
56952
|
}, Y = useCallback(
|
|
56954
|
-
(
|
|
56953
|
+
(Ye) => M.filter((Be) => Be.currenTextParagraph === Ye)[0].fullText_labelId,
|
|
56955
56954
|
[M]
|
|
56956
56955
|
), ie = useCallback(
|
|
56957
|
-
() => _.map((
|
|
56958
|
-
if (
|
|
56959
|
-
return
|
|
56960
|
-
if (
|
|
56961
|
-
const Be = G(
|
|
56962
|
-
return Be >= 0 ?
|
|
56956
|
+
() => _.map((Ye, lt) => {
|
|
56957
|
+
if (Ye.type === "fixed")
|
|
56958
|
+
return Ye.fullText_labelId ?? Ye.fullText;
|
|
56959
|
+
if (Ye.type === "election") {
|
|
56960
|
+
const Be = G(Ye);
|
|
56961
|
+
return Be >= 0 ? Ye.electionTexts[Be].fullText_labelId : Y(lt);
|
|
56963
56962
|
}
|
|
56964
56963
|
return "";
|
|
56965
56964
|
}),
|
|
56966
56965
|
[Y, _]
|
|
56967
56966
|
), le = 12, fe = () => {
|
|
56968
56967
|
if (M) {
|
|
56969
|
-
const
|
|
56968
|
+
const Ye = M.length;
|
|
56970
56969
|
let lt = 0;
|
|
56971
|
-
for (let Be = 0; Be <
|
|
56970
|
+
for (let Be = 0; Be < Ye; Be += 1)
|
|
56972
56971
|
M[Be].isCorrect === "none" && (lt += 1);
|
|
56973
|
-
return lt ===
|
|
56972
|
+
return lt === Ye;
|
|
56974
56973
|
}
|
|
56975
56974
|
return !0;
|
|
56976
56975
|
}, ce = useCallback(() => {
|
|
56977
56976
|
if (M) {
|
|
56978
|
-
const
|
|
56977
|
+
const Ye = M.length;
|
|
56979
56978
|
let lt = 0;
|
|
56980
|
-
for (let Be = 0; Be <
|
|
56979
|
+
for (let Be = 0; Be < Ye; Be += 1)
|
|
56981
56980
|
M[Be].isCorrect === "green" && (lt += 1);
|
|
56982
|
-
return lt ===
|
|
56981
|
+
return lt === Ye;
|
|
56983
56982
|
}
|
|
56984
56983
|
return !0;
|
|
56985
|
-
}, [M]), ge = () => !!(M && M.length), Se = () => M.find((
|
|
56986
|
-
const { feedback: lt } = _[
|
|
56984
|
+
}, [M]), ge = () => !!(M && M.length), Se = () => M.find((Ye) => {
|
|
56985
|
+
const { feedback: lt } = _[Ye.currenTextParagraph].electionTexts[Ye.index];
|
|
56987
56986
|
return lt.body !== "";
|
|
56988
56987
|
}), Re = useCallback(() => {
|
|
56989
|
-
const
|
|
56988
|
+
const Ye = ie();
|
|
56990
56989
|
l({
|
|
56991
56990
|
type: "finishMedia",
|
|
56992
56991
|
payload: {
|
|
56993
56992
|
name: p,
|
|
56994
|
-
text:
|
|
56993
|
+
text: Ye,
|
|
56995
56994
|
documentType: d,
|
|
56996
56995
|
type: "text"
|
|
56997
56996
|
}
|
|
56998
56997
|
});
|
|
56999
56998
|
}, [ie, p, l, d]), Fe = useCallback(
|
|
57000
|
-
(
|
|
56999
|
+
(Ye) => {
|
|
57001
57000
|
const lt = ce();
|
|
57002
57001
|
W(y ? "fail" : lt ? "score" : "fail"), l({
|
|
57003
57002
|
type: "addPoints",
|
|
57004
57003
|
complex: !0,
|
|
57005
57004
|
finish: !0,
|
|
57006
|
-
payload:
|
|
57005
|
+
payload: Ye || ue,
|
|
57007
57006
|
onFinish: d !== "view" ? Re : null
|
|
57008
57007
|
}), l({ type: "passPuzzle" });
|
|
57009
57008
|
},
|
|
@@ -57030,15 +57029,15 @@ function WriterPuzzleComponent({
|
|
|
57030
57029
|
}, Qe = () => {
|
|
57031
57030
|
ge() ? fe() && (z(!0), Fe()) : (z(!0), ee(!0), Fe()), B ? (ne(!1), se && !X ? re(!0) : (X || !se && !X) && (!se && !X && s ? ce() ? Fe() : Ne() : Fe())) : (z(!0), Se() && ee(!0));
|
|
57032
57031
|
}, at = () => {
|
|
57033
|
-
const
|
|
57034
|
-
return
|
|
57035
|
-
}, Ze = (
|
|
57036
|
-
const lt = _[C].electionTexts[
|
|
57037
|
-
Be && Be[0] && Be[0].points && (V.current[`t${C}_e${
|
|
57032
|
+
const Ye = _[C].electionTexts.filter((Be) => Be.correct).length, lt = _[C].electionTexts;
|
|
57033
|
+
return Ye === 0 || Ye === lt;
|
|
57034
|
+
}, Ze = (Ye) => {
|
|
57035
|
+
const lt = _[C].electionTexts[Ye], Be = lt.feedback.rewards;
|
|
57036
|
+
Be && Be[0] && Be[0].points && (V.current[`t${C}_e${Ye}`] || (lt.correct && (V.current[`t${C}_e${Ye}`] = !0), pe([...ue, ...Be])));
|
|
57038
57037
|
const rt = () => at() ? "none" : lt.correct ? "green" : "red", ft = {
|
|
57039
57038
|
currenTextParagraph: C,
|
|
57040
57039
|
fullText: lt.fullText,
|
|
57041
|
-
index:
|
|
57040
|
+
index: Ye,
|
|
57042
57041
|
isCorrect: rt()
|
|
57043
57042
|
};
|
|
57044
57043
|
P({
|
|
@@ -57053,14 +57052,14 @@ function WriterPuzzleComponent({
|
|
|
57053
57052
|
v.current.scrollTop = v.current.scrollHeight + 100;
|
|
57054
57053
|
}, Ve = () => {
|
|
57055
57054
|
if (v.current.querySelector(".wrapfixed").offsetHeight > v.current.offsetHeight) {
|
|
57056
|
-
const
|
|
57055
|
+
const Ye = v.current.querySelector(".wrapfixed").offsetHeight;
|
|
57057
57056
|
v.current.scrollTo({
|
|
57058
|
-
top:
|
|
57057
|
+
top: Ye,
|
|
57059
57058
|
behavior: "smooth"
|
|
57060
57059
|
});
|
|
57061
57060
|
}
|
|
57062
|
-
}, Me = (
|
|
57063
|
-
const rt =
|
|
57061
|
+
}, Me = (Ye, lt, Be) => {
|
|
57062
|
+
const rt = Ye.fullText, ft = _[Be + 1] ? _[Be + 1].type : "", $e = (
|
|
57064
57063
|
// its magic
|
|
57065
57064
|
D[`text_${Be + 1}`] && D[`text_${Be + 1}`].type ? D[`text_${Be + 1}`].type : ft
|
|
57066
57065
|
);
|
|
@@ -57078,20 +57077,20 @@ function WriterPuzzleComponent({
|
|
|
57078
57077
|
},
|
|
57079
57078
|
Be.toString()
|
|
57080
57079
|
);
|
|
57081
|
-
}, Le = (
|
|
57082
|
-
const Be =
|
|
57083
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(FinishedTextComponent, { textToPrint: Be, correct:
|
|
57084
|
-
}, Ke = (
|
|
57080
|
+
}, Le = (Ye, lt) => {
|
|
57081
|
+
const Be = Ye.fullText;
|
|
57082
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(FinishedTextComponent, { textToPrint: Be, correct: Ye.correct }, lt);
|
|
57083
|
+
}, Ke = (Ye) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
57085
57084
|
ElectionComponent,
|
|
57086
57085
|
{
|
|
57087
57086
|
soundActions: T,
|
|
57088
|
-
textWithOpts:
|
|
57087
|
+
textWithOpts: Ye.electionTexts,
|
|
57089
57088
|
setCurrentDecisionSelected: Ze,
|
|
57090
57089
|
printed: yt,
|
|
57091
57090
|
disableExit: J
|
|
57092
57091
|
},
|
|
57093
|
-
|
|
57094
|
-
), Oe = (
|
|
57092
|
+
Ye.electionTexts
|
|
57093
|
+
), Oe = (Ye, lt, Be) => Ye.type === "fixed" ? Me(Ye, lt, Be) : Ke(Ye);
|
|
57095
57094
|
useEffect(() => {
|
|
57096
57095
|
k === !0 && (() => {
|
|
57097
57096
|
_[C + 1] ? (P({
|
|
@@ -57105,8 +57104,8 @@ function WriterPuzzleComponent({
|
|
|
57105
57104
|
})();
|
|
57106
57105
|
}, [k, C, D, _]);
|
|
57107
57106
|
const qe = useMemo(() => {
|
|
57108
|
-
let
|
|
57109
|
-
return S && (
|
|
57107
|
+
let Ye = `writer-puzzle writer-puzzle--${n}`;
|
|
57108
|
+
return S && (Ye += " disable-background-image"), Ye;
|
|
57110
57109
|
}, [S, n]), St = {
|
|
57111
57110
|
backgroundImage: x != null && x.url ? `url('${x.url}')` : ""
|
|
57112
57111
|
};
|
|
@@ -57139,9 +57138,9 @@ function WriterPuzzleComponent({
|
|
|
57139
57138
|
ref: v,
|
|
57140
57139
|
children: [
|
|
57141
57140
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "wrapfixed", children: K && !B && Object.values(D).map(
|
|
57142
|
-
(
|
|
57141
|
+
(Ye, lt) => Oe(Ye, Object.values(D).length - 1, lt)
|
|
57143
57142
|
) }),
|
|
57144
|
-
B && Object.values(D).map((
|
|
57143
|
+
B && Object.values(D).map((Ye, lt) => Le(Ye, lt))
|
|
57145
57144
|
]
|
|
57146
57145
|
}
|
|
57147
57146
|
) }),
|
|
@@ -60802,7 +60801,7 @@ function BubbleWrapper({ currentMessage: l, translate: e }) {
|
|
|
60802
60801
|
}
|
|
60803
60802
|
) });
|
|
60804
60803
|
}
|
|
60805
|
-
const cache = {}, loader = new GLTFLoader(), MIX_TIME = 0.
|
|
60804
|
+
const cache = {}, loader = new GLTFLoader(), MIX_TIME = 0.25;
|
|
60806
60805
|
function useStateMachine(l) {
|
|
60807
60806
|
const e = useThree((p) => p.scene), n = useMemo(() => {
|
|
60808
60807
|
var _;
|
|
@@ -60932,12 +60931,7 @@ function DialogComponent({
|
|
|
60932
60931
|
voiceOver: !1,
|
|
60933
60932
|
avatar: "",
|
|
60934
60933
|
show: !1
|
|
60935
|
-
})
|
|
60936
|
-
useFrame(() => {
|
|
60937
|
-
var ke;
|
|
60938
|
-
(ke = mt.current) != null && ke.node && (mt.current.node.weights.sil > 0.8 ? Xe() : St());
|
|
60939
|
-
});
|
|
60940
|
-
const Re = useMemo(() => t.reduce((ke, pt) => (pt.slots && pt.slots.filter((_e) => _e.uid).forEach((_e) => {
|
|
60934
|
+
}), Re = useMemo(() => t.reduce((ke, pt) => (pt.slots && pt.slots.filter((_e) => _e.uid).forEach((_e) => {
|
|
60941
60935
|
ke.includes(_e.uid) || ke.push(_e.uid);
|
|
60942
60936
|
}), ke), []), [t]), Fe = useCallback((ke) => n({ type: "translate", payload: ke }), [n]), [Ne, Qe] = useState([]), at = useMemo(() => Ne[Ne.length - 1], [Ne]), Ze = useCallback(() => {
|
|
60943
60937
|
const ke = o.find((ot) => ot.fromId === at) || o.find((ot) => ot.toId === at), pt = t.find((ot) => ot.id === (ke == null ? void 0 : ke.fromId));
|
|
@@ -61043,14 +61037,19 @@ function DialogComponent({
|
|
|
61043
61037
|
console.error(me);
|
|
61044
61038
|
});
|
|
61045
61039
|
}
|
|
61046
|
-
},
|
|
61040
|
+
}, Ye = () => {
|
|
61047
61041
|
if (!(K != null && K.uid) || z.current)
|
|
61048
61042
|
return;
|
|
61049
61043
|
const { emotion: ke, uid: pt, animation: ot } = K, _e = getCurrentVisible(pt, C);
|
|
61050
61044
|
if (_e) {
|
|
61051
61045
|
delete _e.userData._active;
|
|
61052
61046
|
const { isSeated: te } = _e;
|
|
61053
|
-
|
|
61047
|
+
if (V.current === pt)
|
|
61048
|
+
qe(pt, "neutral", null, te), V.current = null;
|
|
61049
|
+
else {
|
|
61050
|
+
const me = ke.includes("talking");
|
|
61051
|
+
qe(pt, me ? "neutral" : ke, me ? null : ot, te);
|
|
61052
|
+
}
|
|
61054
61053
|
}
|
|
61055
61054
|
}, lt = useCallback(() => {
|
|
61056
61055
|
z.current = !0, Se({ show: !1 }), Oe(), J(), h || e({ type: "success" });
|
|
@@ -61079,7 +61078,7 @@ function DialogComponent({
|
|
|
61079
61078
|
},
|
|
61080
61079
|
[j == null ? void 0 : j.id, o, lt, t]
|
|
61081
61080
|
), $e = useCallback(() => {
|
|
61082
|
-
if (ee.current = { ...K }, w(!1),
|
|
61081
|
+
if (ee.current = { ...K }, w(!1), Ye(), X)
|
|
61083
61082
|
rt(!1);
|
|
61084
61083
|
else if (!Ve()) {
|
|
61085
61084
|
const ke = x - 1;
|
|
@@ -61105,7 +61104,7 @@ function DialogComponent({
|
|
|
61105
61104
|
[o, x, t, e, j == null ? void 0 : j.id, X]
|
|
61106
61105
|
), Te = useCallback(
|
|
61107
61106
|
(ke, pt) => {
|
|
61108
|
-
if (ee.current = { ...K }, w(!1),
|
|
61107
|
+
if (ee.current = { ...K }, w(!1), Ye(), X)
|
|
61109
61108
|
Qe([...Ne, j.id]), ke ? ft(ke, pt) : rt();
|
|
61110
61109
|
else if (x < t.length - 1) {
|
|
61111
61110
|
const ot = x + 1;
|
|
@@ -61128,7 +61127,7 @@ function DialogComponent({
|
|
|
61128
61127
|
]
|
|
61129
61128
|
), ye = () => {
|
|
61130
61129
|
v(!1), $e();
|
|
61131
|
-
}, Pe = () => X ? j && j.type !== "conversationalDecision" && !o.find((ke) => ke.fromId === j.id) : x === t.length - 1,
|
|
61130
|
+
}, Pe = () => X ? j && j.type !== "conversationalDecision" && !o.find((ke) => ke.fromId === j.id) : x === t.length - 1, Xe = () => {
|
|
61132
61131
|
Pe() ? lt() : (v(!1), Te());
|
|
61133
61132
|
};
|
|
61134
61133
|
useEffect(() => {
|
|
@@ -61240,11 +61239,15 @@ function DialogComponent({
|
|
|
61240
61239
|
soundActions: d,
|
|
61241
61240
|
getEvent: n,
|
|
61242
61241
|
pauseTTS: p,
|
|
61242
|
+
onStart: () => {
|
|
61243
|
+
var ke;
|
|
61244
|
+
(ke = K == null ? void 0 : K.emotion) != null && ke.includes("think") || St();
|
|
61245
|
+
},
|
|
61243
61246
|
onError: () => {
|
|
61244
61247
|
w(!0);
|
|
61245
61248
|
},
|
|
61246
61249
|
onFinish: () => {
|
|
61247
|
-
|
|
61250
|
+
Ye(), ce && !p && Te();
|
|
61248
61251
|
}
|
|
61249
61252
|
});
|
|
61250
61253
|
useEffect(() => (Ct(), () => {
|
|
@@ -61256,7 +61259,7 @@ function DialogComponent({
|
|
|
61256
61259
|
const pt = characterMs * (((ke = ge == null ? void 0 : ge.text) == null ? void 0 : ke.length) || 0);
|
|
61257
61260
|
setTimeout(
|
|
61258
61261
|
() => {
|
|
61259
|
-
|
|
61262
|
+
Ye();
|
|
61260
61263
|
},
|
|
61261
61264
|
pt < minMs ? minMs : pt
|
|
61262
61265
|
);
|
|
@@ -61264,7 +61267,7 @@ function DialogComponent({
|
|
|
61264
61267
|
}, [
|
|
61265
61268
|
y,
|
|
61266
61269
|
j == null ? void 0 : j.audioType,
|
|
61267
|
-
|
|
61270
|
+
Ye,
|
|
61268
61271
|
St,
|
|
61269
61272
|
K == null ? void 0 : K.emotion,
|
|
61270
61273
|
ge
|
|
@@ -61292,7 +61295,7 @@ function DialogComponent({
|
|
|
61292
61295
|
const st = useMemo(() => yt() >= 0 && Ne.length === 0 && X || !X && x === 0 || Ve() || Me(), [x, Ve, Me, yt, Ne]), wt = l({
|
|
61293
61296
|
disabled: le || !ge.show,
|
|
61294
61297
|
repeat: !1,
|
|
61295
|
-
forward:
|
|
61298
|
+
forward: Xe,
|
|
61296
61299
|
rewind: st ? null : ye
|
|
61297
61300
|
});
|
|
61298
61301
|
useEffect(() => wt(), [wt]);
|
|
@@ -61367,7 +61370,7 @@ function DialogComponent({
|
|
|
61367
61370
|
"button",
|
|
61368
61371
|
{
|
|
61369
61372
|
type: "button",
|
|
61370
|
-
onClick:
|
|
61373
|
+
onClick: Xe,
|
|
61371
61374
|
disabled: !ge.show,
|
|
61372
61375
|
className: `gat--btn__round
|
|
61373
61376
|
${ge.show ? "" : "disabled"}
|
|
@@ -61784,8 +61787,8 @@ function MatchPuzzleComponent({
|
|
|
61784
61787
|
w(null);
|
|
61785
61788
|
return;
|
|
61786
61789
|
}
|
|
61787
|
-
const
|
|
61788
|
-
if (
|
|
61790
|
+
const Ye = qe(Oe.id), lt = qe(y), Be = St(Oe.id), rt = St(y);
|
|
61791
|
+
if (Ye && rt || Be && lt) {
|
|
61789
61792
|
K(Oe);
|
|
61790
61793
|
return;
|
|
61791
61794
|
}
|
|
@@ -61793,21 +61796,21 @@ function MatchPuzzleComponent({
|
|
|
61793
61796
|
}, se = (Oe) => {
|
|
61794
61797
|
let qe;
|
|
61795
61798
|
return Oe.startsWith("destination-item") ? qe = { [y]: Oe } : qe = { [Oe]: y }, _.some((St) => {
|
|
61796
|
-
const
|
|
61797
|
-
return
|
|
61799
|
+
const Ye = JSON.stringify(St), lt = JSON.stringify(qe);
|
|
61800
|
+
return Ye === lt;
|
|
61798
61801
|
});
|
|
61799
61802
|
}, ee = (Oe, qe) => {
|
|
61800
|
-
const St = new Map(Oe.map((
|
|
61801
|
-
return qe.forEach((
|
|
61802
|
-
St.has(
|
|
61803
|
+
const St = new Map(Oe.map((Ye) => [Ye.id, { ...Ye }]));
|
|
61804
|
+
return qe.forEach((Ye) => {
|
|
61805
|
+
St.has(Ye.id) ? St.get(Ye.id).points += Ye.points : St.set(Ye.id, { ...Ye });
|
|
61803
61806
|
}), Array.from(St.values());
|
|
61804
61807
|
}, K = (Oe) => {
|
|
61805
61808
|
var qe, St;
|
|
61806
61809
|
if (X("click-ui"), se(Oe.id)) {
|
|
61807
|
-
const
|
|
61810
|
+
const Ye = Oe.id.startsWith("source-item") ? Oe.id : y, lt = Oe.id.startsWith("destination-item") ? Oe.id : y, Be = [...b, { [Ye]: lt }];
|
|
61808
61811
|
if (R(Be), s.specificCorrectFeedbacks) {
|
|
61809
61812
|
const rt = s == null ? void 0 : s.correctFeedbacks.find(
|
|
61810
|
-
(De) => De.id === `${
|
|
61813
|
+
(De) => De.id === `${Ye}-${lt}`
|
|
61811
61814
|
), ft = ee(B, rt.rewards);
|
|
61812
61815
|
z([...ft]), ne(Be) && (Ze(), j(!0)), rt.desc && (F(rt == null ? void 0 : rt.desc), P(!0), N(!0), Ze());
|
|
61813
61816
|
const $e = ne(Be);
|
|
@@ -61823,18 +61826,18 @@ function MatchPuzzleComponent({
|
|
|
61823
61826
|
} else if (document.querySelector(`#${Oe.id}`).classList.add("match-button--error"), document.querySelector(`#${y}`).classList.add("match-button--error"), setTimeout(() => {
|
|
61824
61827
|
document.querySelector(`#${Oe.id}`).classList.remove("match-button--error"), document.querySelector(`#${y}`).classList.remove("match-button--error"), w(null);
|
|
61825
61828
|
}, 1e3), s.specificWrongFeedbacks) {
|
|
61826
|
-
const
|
|
61829
|
+
const Ye = Oe.id.startsWith("destination-item") ? Oe.id : y, lt = s == null ? void 0 : s.wrongFeedbacks.find((rt) => rt.id === Ye), Be = ee(B, lt.rewards);
|
|
61827
61830
|
z([...Be]), lt != null && lt.desc && (F(lt.desc), P(!1), N(!0), Ze());
|
|
61828
61831
|
} else {
|
|
61829
|
-
const
|
|
61830
|
-
z([...
|
|
61832
|
+
const Ye = ee(B, t.solution.wrong.rewards);
|
|
61833
|
+
z([...Ye]), (St = (qe = t.solution) == null ? void 0 : qe.wrong) != null && St.desc && (F(t.solution.wrong.desc), N(!0), Ze());
|
|
61831
61834
|
}
|
|
61832
61835
|
}, ne = (Oe) => {
|
|
61833
61836
|
if (_.length !== Oe.length)
|
|
61834
61837
|
return !1;
|
|
61835
|
-
const qe = new Set(_.map((
|
|
61836
|
-
for (const
|
|
61837
|
-
if (!qe.has(
|
|
61838
|
+
const qe = new Set(_.map((Ye) => JSON.stringify(Ye))), St = new Set(Oe.map((Ye) => JSON.stringify(Ye)));
|
|
61839
|
+
for (const Ye of St)
|
|
61840
|
+
if (!qe.has(Ye))
|
|
61838
61841
|
return !1;
|
|
61839
61842
|
return !0;
|
|
61840
61843
|
}, ue = (Oe) => {
|
|
@@ -61872,8 +61875,8 @@ function MatchPuzzleComponent({
|
|
|
61872
61875
|
o
|
|
61873
61876
|
]);
|
|
61874
61877
|
const W = (Oe, qe) => b.findIndex((St) => {
|
|
61875
|
-
const
|
|
61876
|
-
return
|
|
61878
|
+
const Ye = Object.keys(St)[0], lt = Object.values(St)[0];
|
|
61879
|
+
return Ye === Oe && lt === qe;
|
|
61877
61880
|
}), [V, G] = useState(!0), [Y, ie] = useState("storylines.misc.start"), [le, fe] = useState(!1), ce = () => {
|
|
61878
61881
|
ie("storylines.misc.retry"), G(!1), fe(!1), yt();
|
|
61879
61882
|
}, [ge, Se] = useState(!1), [Re, Fe] = useState(!1), [Ne, Qe] = useState(!1), at = () => {
|
|
@@ -61881,8 +61884,8 @@ function MatchPuzzleComponent({
|
|
|
61881
61884
|
if (s.specificCorrectFeedbacks) {
|
|
61882
61885
|
const qe = new Map(Oe.map((St) => [St.id, { ...St }]));
|
|
61883
61886
|
b.forEach((St) => {
|
|
61884
|
-
const
|
|
61885
|
-
(rt) => rt.id === `${
|
|
61887
|
+
const Ye = Object.keys(St)[0], lt = St[Ye], Be = s.correctFeedbacks.find(
|
|
61888
|
+
(rt) => rt.id === `${Ye}-${lt}`
|
|
61886
61889
|
);
|
|
61887
61890
|
Be != null && Be.rewards && Be.rewards.forEach((rt) => {
|
|
61888
61891
|
if (qe.has(rt.id)) {
|
|
@@ -61903,8 +61906,8 @@ function MatchPuzzleComponent({
|
|
|
61903
61906
|
const Oe = document.querySelector('button[id^="source-item"]'), qe = document.querySelector('button[id^="destination-item"]'), St = Oe.getBoundingClientRect().right, lt = qe.getBoundingClientRect().left + 6 - St;
|
|
61904
61907
|
u.items.forEach((Be, rt) => {
|
|
61905
61908
|
if (Be.matchDestinationId !== void 0 && Be.matchDestinationId !== null) {
|
|
61906
|
-
const ft = document.querySelector(`#${Be.id}`), $e = document.querySelector(`#${Be.matchDestinationId}`), De = ft.getBoundingClientRect().top, Te = $e.getBoundingClientRect().top, ye = Te > De, Pe = Math.abs(Te - De),
|
|
61907
|
-
Ft.style.setProperty("width", `${
|
|
61909
|
+
const ft = document.querySelector(`#${Be.id}`), $e = document.querySelector(`#${Be.matchDestinationId}`), De = ft.getBoundingClientRect().top, Te = $e.getBoundingClientRect().top, ye = Te > De, Pe = Math.abs(Te - De), Xe = Math.sqrt(lt * lt + Pe * Pe), Ft = ft.querySelector(".match-line__hipotenuse");
|
|
61910
|
+
Ft.style.setProperty("width", `${Xe}px`);
|
|
61908
61911
|
const Pt = Math.atan(Pe / lt), Ie = ye ? Pt * (180 / Math.PI) : -Pt * (180 / Math.PI);
|
|
61909
61912
|
Ft.style.setProperty("transform", `rotate(${Ie}deg)`);
|
|
61910
61913
|
}
|