@kubohiroya/turbowarp-bubble 0.10.0 → 0.12.0

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.
@@ -335,10 +335,10 @@ var O = /* @__PURE__ */ o(((e, t) => {
335
335
  var t = 1, n;
336
336
  return (n = e >>> 16) != 0 && (e = n, t += 16), (n = e >> 8) != 0 && (e = n, t += 8), (n = e >> 4) != 0 && (e = n, t += 4), (n = e >> 2) != 0 && (e = n, t += 2), (n = e >> 1) != 0 && (e = n, t += 1), t;
337
337
  }
338
- function te() {
338
+ function k() {
339
339
  return this.t <= 0 ? 0 : this.DB * (this.t - 1) + O(this[this.t - 1] ^ this.s & this.DM);
340
340
  }
341
- function k(e, t) {
341
+ function te(e, t) {
342
342
  var n;
343
343
  for (n = this.t - 1; n >= 0; --n) t[n + e] = this[n];
344
344
  for (n = e - 1; n >= 0; --n) t[n] = 0;
@@ -354,7 +354,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
354
354
  for (s = a - 1; s >= 0; --s) t[s] = 0;
355
355
  t[a] = o, t.t = this.t + a + 1, t.s = this.s, t.clamp();
356
356
  }
357
- function ne(e, t) {
357
+ function M(e, t) {
358
358
  t.s = this.s;
359
359
  var n = Math.floor(e / this.DB);
360
360
  if (n >= this.t) {
@@ -366,7 +366,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
366
366
  for (var o = n + 1; o < this.t; ++o) t[o - n - 1] |= (this[o] & a) << i, t[o - n] = this[o] >> r;
367
367
  r > 0 && (t[this.t - n - 1] |= (this.s & a) << i), t.t = this.t - n, t.clamp();
368
368
  }
369
- function M(e, t) {
369
+ function N(e, t) {
370
370
  for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] - e[n], t[n++] = r & this.DM, r >>= this.DB;
371
371
  if (e.t < this.t) {
372
372
  for (r -= e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
@@ -377,13 +377,13 @@ var O = /* @__PURE__ */ o(((e, t) => {
377
377
  }
378
378
  t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
379
379
  }
380
- function re(e, t) {
380
+ function ne(e, t) {
381
381
  var n = this.abs(), r = e.abs(), i = n.t;
382
382
  for (t.t = i + r.t; --i >= 0;) t[i] = 0;
383
383
  for (i = 0; i < r.t; ++i) t[i + n.t] = n.am(0, r[i], t, i, 0, n.t);
384
384
  t.s = 0, t.clamp(), this.s != e.s && c.ZERO.subTo(t, t);
385
385
  }
386
- function ie(e) {
386
+ function re(e) {
387
387
  for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0;) e[n] = 0;
388
388
  for (n = 0; n < t.t - 1; ++n) {
389
389
  var r = t.am(n, t[n], e, 2 * n, 0, 1);
@@ -391,7 +391,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
391
391
  }
392
392
  e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
393
393
  }
394
- function ae(e, t, n) {
394
+ function ie(e, t, n) {
395
395
  var r = e.abs();
396
396
  if (!(r.t <= 0)) {
397
397
  var i = this.abs();
@@ -414,48 +414,48 @@ var O = /* @__PURE__ */ o(((e, t) => {
414
414
  }
415
415
  }
416
416
  }
417
- function N(e) {
417
+ function P(e) {
418
418
  var t = l();
419
419
  return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(c.ZERO) > 0 && e.subTo(t, t), t;
420
420
  }
421
- function P(e) {
421
+ function F(e) {
422
422
  this.m = e;
423
423
  }
424
- function oe(e) {
424
+ function ae(e) {
425
425
  return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
426
426
  }
427
- function se(e) {
427
+ function oe(e) {
428
428
  return e;
429
429
  }
430
- function ce(e) {
430
+ function se(e) {
431
431
  e.divRemTo(this.m, null, e);
432
432
  }
433
- function le(e, t, n) {
433
+ function ce(e, t, n) {
434
434
  e.multiplyTo(t, n), this.reduce(n);
435
435
  }
436
- function ue(e, t) {
436
+ function le(e, t) {
437
437
  e.squareTo(t), this.reduce(t);
438
438
  }
439
- P.prototype.convert = oe, P.prototype.revert = se, P.prototype.reduce = ce, P.prototype.mulTo = le, P.prototype.sqrTo = ue;
440
- function de() {
439
+ F.prototype.convert = ae, F.prototype.revert = oe, F.prototype.reduce = se, F.prototype.mulTo = ce, F.prototype.sqrTo = le;
440
+ function ue() {
441
441
  if (this.t < 1) return 0;
442
442
  var e = this[0];
443
443
  if (!(e & 1)) return 0;
444
444
  var t = e & 3;
445
445
  return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
446
446
  }
447
- function F(e) {
447
+ function I(e) {
448
448
  this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
449
449
  }
450
- function fe(e) {
450
+ function de(e) {
451
451
  var t = l();
452
452
  return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(c.ZERO) > 0 && this.m.subTo(t, t), t;
453
453
  }
454
- function pe(e) {
454
+ function fe(e) {
455
455
  var t = l();
456
456
  return e.copyTo(t), this.reduce(t), t;
457
457
  }
458
- function me(e) {
458
+ function pe(e) {
459
459
  for (; e.t <= this.mt2;) e[e.t++] = 0;
460
460
  for (var t = 0; t < this.m.t; ++t) {
461
461
  var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
@@ -463,17 +463,17 @@ var O = /* @__PURE__ */ o(((e, t) => {
463
463
  }
464
464
  e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
465
465
  }
466
- function he(e, t) {
466
+ function me(e, t) {
467
467
  e.squareTo(t), this.reduce(t);
468
468
  }
469
- function ge(e, t, n) {
469
+ function he(e, t, n) {
470
470
  e.multiplyTo(t, n), this.reduce(n);
471
471
  }
472
- F.prototype.convert = fe, F.prototype.revert = pe, F.prototype.reduce = me, F.prototype.mulTo = ge, F.prototype.sqrTo = he;
473
- function _e() {
472
+ I.prototype.convert = de, I.prototype.revert = fe, I.prototype.reduce = pe, I.prototype.mulTo = he, I.prototype.sqrTo = me;
473
+ function ge() {
474
474
  return (this.t > 0 ? this[0] & 1 : this.s) == 0;
475
475
  }
476
- function ve(e, t) {
476
+ function _e(e, t) {
477
477
  if (e > 4294967295 || e < 1) return c.ONE;
478
478
  var n = l(), r = l(), i = t.convert(this), a = O(e) - 1;
479
479
  for (i.copyTo(n); --a >= 0;) if (t.sqrTo(n, r), (e & 1 << a) > 0) t.mulTo(r, i, n);
@@ -483,16 +483,16 @@ var O = /* @__PURE__ */ o(((e, t) => {
483
483
  }
484
484
  return t.revert(n);
485
485
  }
486
- function ye(e, t) {
487
- var n = e < 256 || t.isEven() ? new P(t) : new F(t);
486
+ function ve(e, t) {
487
+ var n = e < 256 || t.isEven() ? new F(t) : new I(t);
488
488
  return this.exp(e, n);
489
489
  }
490
- c.prototype.copyTo = b, c.prototype.fromInt = x, c.prototype.fromString = C, c.prototype.clamp = w, c.prototype.dlShiftTo = k, c.prototype.drShiftTo = A, c.prototype.lShiftTo = j, c.prototype.rShiftTo = ne, c.prototype.subTo = M, c.prototype.multiplyTo = re, c.prototype.squareTo = ie, c.prototype.divRemTo = ae, c.prototype.invDigit = de, c.prototype.isEven = _e, c.prototype.exp = ve, c.prototype.toString = T, c.prototype.negate = E, c.prototype.abs = D, c.prototype.compareTo = ee, c.prototype.bitLength = te, c.prototype.mod = N, c.prototype.modPowInt = ye, c.ZERO = S(0), c.ONE = S(1);
491
- function be() {
490
+ c.prototype.copyTo = b, c.prototype.fromInt = x, c.prototype.fromString = C, c.prototype.clamp = w, c.prototype.dlShiftTo = te, c.prototype.drShiftTo = A, c.prototype.lShiftTo = j, c.prototype.rShiftTo = M, c.prototype.subTo = N, c.prototype.multiplyTo = ne, c.prototype.squareTo = re, c.prototype.divRemTo = ie, c.prototype.invDigit = ue, c.prototype.isEven = ge, c.prototype.exp = _e, c.prototype.toString = T, c.prototype.negate = E, c.prototype.abs = D, c.prototype.compareTo = ee, c.prototype.bitLength = k, c.prototype.mod = P, c.prototype.modPowInt = ve, c.ZERO = S(0), c.ONE = S(1);
491
+ function ye() {
492
492
  var e = l();
493
493
  return this.copyTo(e), e;
494
494
  }
495
- function xe() {
495
+ function be() {
496
496
  if (this.s < 0) {
497
497
  if (this.t == 1) return this[0] - this.DV;
498
498
  if (this.t == 0) return -1;
@@ -500,25 +500,25 @@ var O = /* @__PURE__ */ o(((e, t) => {
500
500
  else if (this.t == 0) return 0;
501
501
  return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
502
502
  }
503
- function Se() {
503
+ function xe() {
504
504
  return this.t == 0 ? this.s : this[0] << 24 >> 24;
505
505
  }
506
- function Ce() {
506
+ function Se() {
507
507
  return this.t == 0 ? this.s : this[0] << 16 >> 16;
508
508
  }
509
- function we(e) {
509
+ function Ce(e) {
510
510
  return Math.floor(Math.LN2 * this.DB / Math.log(e));
511
511
  }
512
- function Te() {
512
+ function we() {
513
513
  return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
514
514
  }
515
- function Ee(e) {
515
+ function Te(e) {
516
516
  if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
517
517
  var t = this.chunkSize(e), n = e ** +t, r = S(n), i = l(), a = l(), o = "";
518
518
  for (this.divRemTo(r, i, a); i.signum() > 0;) o = (n + a.intValue()).toString(e).substr(1) + o, i.divRemTo(r, i, a);
519
519
  return a.intValue().toString(e) + o;
520
520
  }
521
- function De(e, t) {
521
+ function Ee(e, t) {
522
522
  this.fromInt(0), t ??= 10;
523
523
  for (var n = this.chunkSize(t), r = t ** +n, i = !1, a = 0, o = 0, s = 0; s < e.length; ++s) {
524
524
  var l = y(e, s);
@@ -530,32 +530,32 @@ var O = /* @__PURE__ */ o(((e, t) => {
530
530
  }
531
531
  a > 0 && (this.dMultiply(t ** +a), this.dAddOffset(o, 0)), i && c.ZERO.subTo(this, this);
532
532
  }
533
- function Oe(e, t, n) {
533
+ function De(e, t, n) {
534
534
  if (typeof t == "number") {
535
535
  if (e < 2) this.fromInt(1);
536
- else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(c.ONE.shiftLeft(e - 1), Fe, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(c.ONE.shiftLeft(e - 1), this);
536
+ else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(c.ONE.shiftLeft(e - 1), Pe, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(c.ONE.shiftLeft(e - 1), this);
537
537
  } else {
538
538
  var r = [], i = e & 7;
539
539
  r.length = (e >> 3) + 1, t.nextBytes(r), i > 0 ? r[0] &= (1 << i) - 1 : r[0] = 0, this.fromString(r, 256);
540
540
  }
541
541
  }
542
- function ke() {
542
+ function Oe() {
543
543
  var e = this.t, t = [];
544
544
  t[0] = this.s;
545
545
  var n = this.DB - e * this.DB % 8, r, i = 0;
546
546
  if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[i++] = r | this.s << this.DB - n); e >= 0;) n < 8 ? (r = (this[e] & (1 << n) - 1) << 8 - n, r |= this[--e] >> (n += this.DB - 8)) : (r = this[e] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --e)), r & 128 && (r |= -256), i == 0 && (this.s & 128) != (r & 128) && ++i, (i > 0 || r != this.s) && (t[i++] = r);
547
547
  return t;
548
548
  }
549
- function I(e) {
549
+ function L(e) {
550
550
  return this.compareTo(e) == 0;
551
551
  }
552
- function Ae(e) {
552
+ function ke(e) {
553
553
  return this.compareTo(e) < 0 ? this : e;
554
554
  }
555
- function je(e) {
555
+ function Ae(e) {
556
556
  return this.compareTo(e) > 0 ? this : e;
557
557
  }
558
- function Me(e, t, n) {
558
+ function je(e, t, n) {
559
559
  var r, i, a = Math.min(e.t, this.t);
560
560
  for (r = 0; r < a; ++r) n[r] = t(this[r], e[r]);
561
561
  if (e.t < this.t) {
@@ -567,81 +567,81 @@ var O = /* @__PURE__ */ o(((e, t) => {
567
567
  }
568
568
  n.s = t(this.s, e.s), n.clamp();
569
569
  }
570
- function Ne(e, t) {
570
+ function Me(e, t) {
571
571
  return e & t;
572
572
  }
573
- function Pe(e) {
573
+ function Ne(e) {
574
574
  var t = l();
575
- return this.bitwiseTo(e, Ne, t), t;
575
+ return this.bitwiseTo(e, Me, t), t;
576
576
  }
577
- function Fe(e, t) {
577
+ function Pe(e, t) {
578
578
  return e | t;
579
579
  }
580
- function Ie(e) {
580
+ function Fe(e) {
581
581
  var t = l();
582
- return this.bitwiseTo(e, Fe, t), t;
582
+ return this.bitwiseTo(e, Pe, t), t;
583
583
  }
584
- function Le(e, t) {
584
+ function Ie(e, t) {
585
585
  return e ^ t;
586
586
  }
587
- function Re(e) {
587
+ function Le(e) {
588
588
  var t = l();
589
- return this.bitwiseTo(e, Le, t), t;
589
+ return this.bitwiseTo(e, Ie, t), t;
590
590
  }
591
- function ze(e, t) {
591
+ function Re(e, t) {
592
592
  return e & ~t;
593
593
  }
594
- function Be(e) {
594
+ function ze(e) {
595
595
  var t = l();
596
- return this.bitwiseTo(e, ze, t), t;
596
+ return this.bitwiseTo(e, Re, t), t;
597
597
  }
598
- function Ve() {
598
+ function Be() {
599
599
  for (var e = l(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
600
600
  return e.t = this.t, e.s = ~this.s, e;
601
601
  }
602
- function L(e) {
602
+ function R(e) {
603
603
  var t = l();
604
604
  return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
605
605
  }
606
- function R(e) {
606
+ function z(e) {
607
607
  var t = l();
608
608
  return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
609
609
  }
610
- function He(e) {
610
+ function Ve(e) {
611
611
  if (e == 0) return -1;
612
612
  var t = 0;
613
613
  return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
614
614
  }
615
- function Ue() {
616
- for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + He(this[e]);
615
+ function He() {
616
+ for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + Ve(this[e]);
617
617
  return this.s < 0 ? this.t * this.DB : -1;
618
618
  }
619
- function We(e) {
619
+ function Ue(e) {
620
620
  for (var t = 0; e != 0;) e &= e - 1, ++t;
621
621
  return t;
622
622
  }
623
- function Ge() {
624
- for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += We(this[n] ^ t);
623
+ function We() {
624
+ for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += Ue(this[n] ^ t);
625
625
  return e;
626
626
  }
627
- function Ke(e) {
627
+ function Ge(e) {
628
628
  var t = Math.floor(e / this.DB);
629
629
  return t >= this.t ? this.s != 0 : !!(this[t] & 1 << e % this.DB);
630
630
  }
631
- function qe(e, t) {
631
+ function Ke(e, t) {
632
632
  var n = c.ONE.shiftLeft(e);
633
633
  return this.bitwiseTo(n, t, n), n;
634
634
  }
635
- function z(e) {
636
- return this.changeBit(e, Fe);
635
+ function B(e) {
636
+ return this.changeBit(e, Pe);
637
637
  }
638
- function Je(e) {
639
- return this.changeBit(e, ze);
638
+ function qe(e) {
639
+ return this.changeBit(e, Re);
640
640
  }
641
- function Ye(e) {
642
- return this.changeBit(e, Le);
641
+ function Je(e) {
642
+ return this.changeBit(e, Ie);
643
643
  }
644
- function Xe(e, t) {
644
+ function Ye(e, t) {
645
645
  for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
646
646
  if (e.t < this.t) {
647
647
  for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
@@ -652,58 +652,58 @@ var O = /* @__PURE__ */ o(((e, t) => {
652
652
  }
653
653
  t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
654
654
  }
655
- function Ze(e) {
655
+ function Xe(e) {
656
656
  var t = l();
657
657
  return this.addTo(e, t), t;
658
658
  }
659
- function B(e) {
659
+ function V(e) {
660
660
  var t = l();
661
661
  return this.subTo(e, t), t;
662
662
  }
663
- function Qe(e) {
663
+ function Ze(e) {
664
664
  var t = l();
665
665
  return this.multiplyTo(e, t), t;
666
666
  }
667
- function $e() {
667
+ function Qe() {
668
668
  var e = l();
669
669
  return this.squareTo(e), e;
670
670
  }
671
- function et(e) {
671
+ function $e(e) {
672
672
  var t = l();
673
673
  return this.divRemTo(e, t, null), t;
674
674
  }
675
- function tt(e) {
675
+ function et(e) {
676
676
  var t = l();
677
677
  return this.divRemTo(e, null, t), t;
678
678
  }
679
- function nt(e) {
679
+ function tt(e) {
680
680
  var t = l(), n = l();
681
681
  return this.divRemTo(e, t, n), [t, n];
682
682
  }
683
- function rt(e) {
683
+ function nt(e) {
684
684
  this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
685
685
  }
686
- function it(e, t) {
686
+ function rt(e, t) {
687
687
  if (e != 0) {
688
688
  for (; this.t <= t;) this[this.t++] = 0;
689
689
  for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
690
690
  }
691
691
  }
692
- function at() {}
693
- function ot(e) {
692
+ function it() {}
693
+ function at(e) {
694
694
  return e;
695
695
  }
696
- function st(e, t, n) {
696
+ function ot(e, t, n) {
697
697
  e.multiplyTo(t, n);
698
698
  }
699
- function ct(e, t) {
699
+ function st(e, t) {
700
700
  e.squareTo(t);
701
701
  }
702
- at.prototype.convert = ot, at.prototype.revert = ot, at.prototype.mulTo = st, at.prototype.sqrTo = ct;
703
- function lt(e) {
704
- return this.exp(e, new at());
702
+ it.prototype.convert = at, it.prototype.revert = at, it.prototype.mulTo = ot, it.prototype.sqrTo = st;
703
+ function ct(e) {
704
+ return this.exp(e, new it());
705
705
  }
706
- function ut(e, t, n) {
706
+ function lt(e, t, n) {
707
707
  var r = Math.min(this.t + e.t, t);
708
708
  for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
709
709
  var i;
@@ -711,40 +711,40 @@ var O = /* @__PURE__ */ o(((e, t) => {
711
711
  for (i = Math.min(e.t, t); r < i; ++r) this.am(0, e[r], n, r, 0, t - r);
712
712
  n.clamp();
713
713
  }
714
- function dt(e, t, n) {
714
+ function ut(e, t, n) {
715
715
  --t;
716
716
  var r = n.t = this.t + e.t - t;
717
717
  for (n.s = 0; --r >= 0;) n[r] = 0;
718
718
  for (r = Math.max(t - this.t, 0); r < e.t; ++r) n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
719
719
  n.clamp(), n.drShiftTo(1, n);
720
720
  }
721
- function ft(e) {
721
+ function dt(e) {
722
722
  this.r2 = l(), this.q3 = l(), c.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e;
723
723
  }
724
- function pt(e) {
724
+ function ft(e) {
725
725
  if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
726
726
  if (e.compareTo(this.m) < 0) return e;
727
727
  var t = l();
728
728
  return e.copyTo(t), this.reduce(t), t;
729
729
  }
730
- function mt(e) {
730
+ function pt(e) {
731
731
  return e;
732
732
  }
733
- function ht(e) {
733
+ function mt(e) {
734
734
  for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;) e.dAddOffset(1, this.m.t + 1);
735
735
  for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
736
736
  }
737
- function gt(e, t) {
737
+ function ht(e, t) {
738
738
  e.squareTo(t), this.reduce(t);
739
739
  }
740
- function _t(e, t, n) {
740
+ function gt(e, t, n) {
741
741
  e.multiplyTo(t, n), this.reduce(n);
742
742
  }
743
- ft.prototype.convert = pt, ft.prototype.revert = mt, ft.prototype.reduce = ht, ft.prototype.mulTo = _t, ft.prototype.sqrTo = gt;
744
- function vt(e, t) {
743
+ dt.prototype.convert = ft, dt.prototype.revert = pt, dt.prototype.reduce = mt, dt.prototype.mulTo = gt, dt.prototype.sqrTo = ht;
744
+ function _t(e, t) {
745
745
  var n = e.bitLength(), r, i = S(1), a;
746
746
  if (n <= 0) return i;
747
- r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new P(t) : t.isEven() ? new ft(t) : new F(t);
747
+ r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new F(t) : t.isEven() ? new dt(t) : new I(t);
748
748
  var o = [], s = 3, c = r - 1, u = (1 << r) - 1;
749
749
  if (o[1] = a.convert(this), r > 1) {
750
750
  var d = l();
@@ -762,7 +762,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
762
762
  }
763
763
  return a.revert(i);
764
764
  }
765
- function yt(e) {
765
+ function vt(e) {
766
766
  var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
767
767
  if (t.compareTo(n) < 0) {
768
768
  var r = t;
@@ -773,7 +773,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
773
773
  for (i < a && (a = i), a > 0 && (t.rShiftTo(a, t), n.rShiftTo(a, n)); t.signum() > 0;) (i = t.getLowestSetBit()) > 0 && t.rShiftTo(i, t), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
774
774
  return a > 0 && n.lShiftTo(a, n), n;
775
775
  }
776
- function bt(e) {
776
+ function yt(e) {
777
777
  if (e <= 0) return 0;
778
778
  var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
779
779
  if (this.t > 0) {
@@ -782,7 +782,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
782
782
  }
783
783
  return n;
784
784
  }
785
- function xt(e) {
785
+ function bt(e) {
786
786
  var t = e.isEven();
787
787
  if (this.isEven() && t || e.signum() == 0) return c.ZERO;
788
788
  for (var n = e.clone(), r = this.clone(), i = S(1), a = S(0), o = S(0), s = S(1); n.signum() != 0;) {
@@ -796,7 +796,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
796
796
  else return s;
797
797
  return s.signum() < 0 ? s.add(e) : s;
798
798
  }
799
- var V = [
799
+ var H = [
800
800
  2,
801
801
  3,
802
802
  5,
@@ -965,27 +965,27 @@ var O = /* @__PURE__ */ o(((e, t) => {
965
965
  983,
966
966
  991,
967
967
  997
968
- ], St = (1 << 26) / V[V.length - 1];
969
- function Ct(e) {
968
+ ], xt = (1 << 26) / H[H.length - 1];
969
+ function St(e) {
970
970
  var t, n = this.abs();
971
- if (n.t == 1 && n[0] <= V[V.length - 1]) {
972
- for (t = 0; t < V.length; ++t) if (n[0] == V[t]) return !0;
971
+ if (n.t == 1 && n[0] <= H[H.length - 1]) {
972
+ for (t = 0; t < H.length; ++t) if (n[0] == H[t]) return !0;
973
973
  return !1;
974
974
  }
975
975
  if (n.isEven()) return !1;
976
- for (t = 1; t < V.length;) {
977
- for (var r = V[t], i = t + 1; i < V.length && r < St;) r *= V[i++];
978
- for (r = n.modInt(r); t < i;) if (r % V[t++] == 0) return !1;
976
+ for (t = 1; t < H.length;) {
977
+ for (var r = H[t], i = t + 1; i < H.length && r < xt;) r *= H[i++];
978
+ for (r = n.modInt(r); t < i;) if (r % H[t++] == 0) return !1;
979
979
  }
980
980
  return n.millerRabin(e);
981
981
  }
982
- function wt(e) {
982
+ function Ct(e) {
983
983
  var t = this.subtract(c.ONE), n = t.getLowestSetBit();
984
984
  if (n <= 0) return !1;
985
985
  var r = t.shiftRight(n);
986
- e = e + 1 >> 1, e > V.length && (e = V.length);
986
+ e = e + 1 >> 1, e > H.length && (e = H.length);
987
987
  for (var i = l(), a = 0; a < e; ++a) {
988
- i.fromInt(V[Math.floor(Math.random() * V.length)]);
988
+ i.fromInt(H[Math.floor(Math.random() * H.length)]);
989
989
  var o = i.modPow(r, this);
990
990
  if (o.compareTo(c.ONE) != 0 && o.compareTo(t) != 0) {
991
991
  for (var s = 1; s++ < n && o.compareTo(t) != 0;) if (o = o.modPowInt(2, this), o.compareTo(c.ONE) == 0) return !1;
@@ -994,29 +994,29 @@ var O = /* @__PURE__ */ o(((e, t) => {
994
994
  }
995
995
  return !0;
996
996
  }
997
- c.prototype.chunkSize = we, c.prototype.toRadix = Ee, c.prototype.fromRadix = De, c.prototype.fromNumber = Oe, c.prototype.bitwiseTo = Me, c.prototype.changeBit = qe, c.prototype.addTo = Xe, c.prototype.dMultiply = rt, c.prototype.dAddOffset = it, c.prototype.multiplyLowerTo = ut, c.prototype.multiplyUpperTo = dt, c.prototype.modInt = bt, c.prototype.millerRabin = wt, c.prototype.clone = be, c.prototype.intValue = xe, c.prototype.byteValue = Se, c.prototype.shortValue = Ce, c.prototype.signum = Te, c.prototype.toByteArray = ke, c.prototype.equals = I, c.prototype.min = Ae, c.prototype.max = je, c.prototype.and = Pe, c.prototype.or = Ie, c.prototype.xor = Re, c.prototype.andNot = Be, c.prototype.not = Ve, c.prototype.shiftLeft = L, c.prototype.shiftRight = R, c.prototype.getLowestSetBit = Ue, c.prototype.bitCount = Ge, c.prototype.testBit = Ke, c.prototype.setBit = z, c.prototype.clearBit = Je, c.prototype.flipBit = Ye, c.prototype.add = Ze, c.prototype.subtract = B, c.prototype.multiply = Qe, c.prototype.divide = et, c.prototype.remainder = tt, c.prototype.divideAndRemainder = nt, c.prototype.modPow = vt, c.prototype.modInverse = xt, c.prototype.pow = lt, c.prototype.gcd = yt, c.prototype.isProbablePrime = Ct, c.prototype.square = $e;
998
- var H = c;
999
- if (H.prototype.IsNegative = function() {
1000
- return this.compareTo(H.ZERO) == -1;
1001
- }, H.op_Equality = function(e, t) {
997
+ c.prototype.chunkSize = Ce, c.prototype.toRadix = Te, c.prototype.fromRadix = Ee, c.prototype.fromNumber = De, c.prototype.bitwiseTo = je, c.prototype.changeBit = Ke, c.prototype.addTo = Ye, c.prototype.dMultiply = nt, c.prototype.dAddOffset = rt, c.prototype.multiplyLowerTo = lt, c.prototype.multiplyUpperTo = ut, c.prototype.modInt = yt, c.prototype.millerRabin = Ct, c.prototype.clone = ye, c.prototype.intValue = be, c.prototype.byteValue = xe, c.prototype.shortValue = Se, c.prototype.signum = we, c.prototype.toByteArray = Oe, c.prototype.equals = L, c.prototype.min = ke, c.prototype.max = Ae, c.prototype.and = Ne, c.prototype.or = Fe, c.prototype.xor = Le, c.prototype.andNot = ze, c.prototype.not = Be, c.prototype.shiftLeft = R, c.prototype.shiftRight = z, c.prototype.getLowestSetBit = He, c.prototype.bitCount = We, c.prototype.testBit = Ge, c.prototype.setBit = B, c.prototype.clearBit = qe, c.prototype.flipBit = Je, c.prototype.add = Xe, c.prototype.subtract = V, c.prototype.multiply = Ze, c.prototype.divide = $e, c.prototype.remainder = et, c.prototype.divideAndRemainder = tt, c.prototype.modPow = _t, c.prototype.modInverse = bt, c.prototype.pow = ct, c.prototype.gcd = vt, c.prototype.isProbablePrime = St, c.prototype.square = Qe;
998
+ var U = c;
999
+ if (U.prototype.IsNegative = function() {
1000
+ return this.compareTo(U.ZERO) == -1;
1001
+ }, U.op_Equality = function(e, t) {
1002
1002
  return e.compareTo(t) == 0;
1003
- }, H.op_Inequality = function(e, t) {
1003
+ }, U.op_Inequality = function(e, t) {
1004
1004
  return e.compareTo(t) != 0;
1005
- }, H.op_GreaterThan = function(e, t) {
1005
+ }, U.op_GreaterThan = function(e, t) {
1006
1006
  return e.compareTo(t) > 0;
1007
- }, H.op_LessThan = function(e, t) {
1007
+ }, U.op_LessThan = function(e, t) {
1008
1008
  return e.compareTo(t) < 0;
1009
- }, H.op_Addition = function(e, t) {
1010
- return new H(e).add(new H(t));
1011
- }, H.op_Subtraction = function(e, t) {
1012
- return new H(e).subtract(new H(t));
1013
- }, H.Int128Mul = function(e, t) {
1014
- return new H(e).multiply(new H(t));
1015
- }, H.op_Division = function(e, t) {
1009
+ }, U.op_Addition = function(e, t) {
1010
+ return new U(e).add(new U(t));
1011
+ }, U.op_Subtraction = function(e, t) {
1012
+ return new U(e).subtract(new U(t));
1013
+ }, U.Int128Mul = function(e, t) {
1014
+ return new U(e).multiply(new U(t));
1015
+ }, U.op_Division = function(e, t) {
1016
1016
  return e.divide(t);
1017
- }, H.prototype.ToDouble = function() {
1017
+ }, U.prototype.ToDouble = function() {
1018
1018
  return parseFloat(this.toString());
1019
- }, U === void 0) var U = function(e, t) {
1019
+ }, W === void 0) var W = function(e, t) {
1020
1020
  var n;
1021
1021
  if (Object.getOwnPropertyNames === void 0) {
1022
1022
  for (n in t.prototype) (e.prototype[n] === void 0 || e.prototype[n] == Object.prototype[n]) && (e.prototype[n] = t.prototype[n]);
@@ -1072,7 +1072,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
1072
1072
  return this.m_Childs.length > 0 ? this.m_Childs[0] : null;
1073
1073
  }, e.PolyTree.prototype.Total = function() {
1074
1074
  return this.m_AllPolys.length;
1075
- }, U(e.PolyTree, e.PolyNode), e.Math_Abs_Int64 = e.Math_Abs_Int32 = e.Math_Abs_Double = function(e) {
1075
+ }, W(e.PolyTree, e.PolyNode), e.Math_Abs_Int64 = e.Math_Abs_Int32 = e.Math_Abs_Double = function(e) {
1076
1076
  return Math.abs(e);
1077
1077
  }, e.Math_Max_Int32_Int32 = function(e, t) {
1078
1078
  return Math.max(e, t);
@@ -1185,7 +1185,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
1185
1185
  } while (r != n);
1186
1186
  return !1;
1187
1187
  }, e.ClipperBase.prototype.PointOnLineSegment = function(e, t, n, r) {
1188
- return r ? e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && H.op_Equality(H.Int128Mul(e.X - t.X, n.Y - t.Y), H.Int128Mul(n.X - t.X, e.Y - t.Y)) : e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && (e.X - t.X) * (n.Y - t.Y) == (n.X - t.X) * (e.Y - t.Y);
1188
+ return r ? e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && U.op_Equality(U.Int128Mul(e.X - t.X, n.Y - t.Y), U.Int128Mul(n.X - t.X, e.Y - t.Y)) : e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && (e.X - t.X) * (n.Y - t.Y) == (n.X - t.X) * (e.Y - t.Y);
1189
1189
  }, e.ClipperBase.prototype.PointOnPolygon = function(e, t, n) {
1190
1190
  for (var r = t;;) {
1191
1191
  if (this.PointOnLineSegment(e, r.Pt, r.Next.Pt, n)) return !0;
@@ -1194,13 +1194,13 @@ var O = /* @__PURE__ */ o(((e, t) => {
1194
1194
  return !1;
1195
1195
  }, e.ClipperBase.prototype.SlopesEqual = e.ClipperBase.SlopesEqual = function() {
1196
1196
  var t = arguments, n = t.length, r, i, a, o, s, c, l;
1197
- return n == 3 ? (r = t[0], i = t[1], l = t[2], l ? H.op_Equality(H.Int128Mul(r.Delta.Y, i.Delta.X), H.Int128Mul(r.Delta.X, i.Delta.Y)) : e.Cast_Int64(r.Delta.Y * i.Delta.X) == e.Cast_Int64(r.Delta.X * i.Delta.Y)) : n == 4 ? (a = t[0], o = t[1], s = t[2], l = t[3], l ? H.op_Equality(H.Int128Mul(a.Y - o.Y, o.X - s.X), H.Int128Mul(a.X - o.X, o.Y - s.Y)) : e.Cast_Int64((a.Y - o.Y) * (o.X - s.X)) - e.Cast_Int64((a.X - o.X) * (o.Y - s.Y)) === 0) : (a = t[0], o = t[1], s = t[2], c = t[3], l = t[4], l ? H.op_Equality(H.Int128Mul(a.Y - o.Y, s.X - c.X), H.Int128Mul(a.X - o.X, s.Y - c.Y)) : e.Cast_Int64((a.Y - o.Y) * (s.X - c.X)) - e.Cast_Int64((a.X - o.X) * (s.Y - c.Y)) === 0);
1197
+ return n == 3 ? (r = t[0], i = t[1], l = t[2], l ? U.op_Equality(U.Int128Mul(r.Delta.Y, i.Delta.X), U.Int128Mul(r.Delta.X, i.Delta.Y)) : e.Cast_Int64(r.Delta.Y * i.Delta.X) == e.Cast_Int64(r.Delta.X * i.Delta.Y)) : n == 4 ? (a = t[0], o = t[1], s = t[2], l = t[3], l ? U.op_Equality(U.Int128Mul(a.Y - o.Y, o.X - s.X), U.Int128Mul(a.X - o.X, o.Y - s.Y)) : e.Cast_Int64((a.Y - o.Y) * (o.X - s.X)) - e.Cast_Int64((a.X - o.X) * (o.Y - s.Y)) === 0) : (a = t[0], o = t[1], s = t[2], c = t[3], l = t[4], l ? U.op_Equality(U.Int128Mul(a.Y - o.Y, s.X - c.X), U.Int128Mul(a.X - o.X, s.Y - c.Y)) : e.Cast_Int64((a.Y - o.Y) * (s.X - c.X)) - e.Cast_Int64((a.X - o.X) * (s.Y - c.Y)) === 0);
1198
1198
  }, e.ClipperBase.SlopesEqual3 = function(t, n, r) {
1199
- return r ? H.op_Equality(H.Int128Mul(t.Delta.Y, n.Delta.X), H.Int128Mul(t.Delta.X, n.Delta.Y)) : e.Cast_Int64(t.Delta.Y * n.Delta.X) == e.Cast_Int64(t.Delta.X * n.Delta.Y);
1199
+ return r ? U.op_Equality(U.Int128Mul(t.Delta.Y, n.Delta.X), U.Int128Mul(t.Delta.X, n.Delta.Y)) : e.Cast_Int64(t.Delta.Y * n.Delta.X) == e.Cast_Int64(t.Delta.X * n.Delta.Y);
1200
1200
  }, e.ClipperBase.SlopesEqual4 = function(t, n, r, i) {
1201
- return i ? H.op_Equality(H.Int128Mul(t.Y - n.Y, n.X - r.X), H.Int128Mul(t.X - n.X, n.Y - r.Y)) : e.Cast_Int64((t.Y - n.Y) * (n.X - r.X)) - e.Cast_Int64((t.X - n.X) * (n.Y - r.Y)) === 0;
1201
+ return i ? U.op_Equality(U.Int128Mul(t.Y - n.Y, n.X - r.X), U.Int128Mul(t.X - n.X, n.Y - r.Y)) : e.Cast_Int64((t.Y - n.Y) * (n.X - r.X)) - e.Cast_Int64((t.X - n.X) * (n.Y - r.Y)) === 0;
1202
1202
  }, e.ClipperBase.SlopesEqual5 = function(t, n, r, i, a) {
1203
- return a ? H.op_Equality(H.Int128Mul(t.Y - n.Y, r.X - i.X), H.Int128Mul(t.X - n.X, r.Y - i.Y)) : e.Cast_Int64((t.Y - n.Y) * (r.X - i.X)) - e.Cast_Int64((t.X - n.X) * (r.Y - i.Y)) === 0;
1203
+ return a ? U.op_Equality(U.Int128Mul(t.Y - n.Y, r.X - i.X), U.Int128Mul(t.X - n.X, r.Y - i.Y)) : e.Cast_Int64((t.Y - n.Y) * (r.X - i.X)) - e.Cast_Int64((t.X - n.X) * (r.Y - i.Y)) === 0;
1204
1204
  }, e.ClipperBase.prototype.Clear = function() {
1205
1205
  this.DisposeLocalMinimaList();
1206
1206
  for (var t = 0, n = this.m_edges.length; t < n; ++t) {
@@ -1878,16 +1878,16 @@ var O = /* @__PURE__ */ o(((e, t) => {
1878
1878
  }
1879
1879
  this.m_IntersectList.length = 0;
1880
1880
  };
1881
- var Tt = function(e) {
1881
+ var wt = function(e) {
1882
1882
  return e < 0 ? Math.ceil(e - .5) : Math.round(e);
1883
- }, Et = function(e) {
1883
+ }, Tt = function(e) {
1884
1884
  return e < 0 ? Math.ceil(e - .5) : Math.floor(e + .5);
1885
- }, W = function(e) {
1885
+ }, G = function(e) {
1886
1886
  return e < 0 ? -Math.round(Math.abs(e)) : Math.round(e);
1887
- }, Dt = function(e) {
1887
+ }, Et = function(e) {
1888
1888
  return e < 0 ? (e -= .5, e < -2147483648 ? Math.ceil(e) : e | 0) : (e += .5, e > 2147483647 ? Math.floor(e) : e | 0);
1889
1889
  };
1890
- a.msie ? e.Clipper.Round = Tt : a.chromium ? e.Clipper.Round = W : a.safari ? e.Clipper.Round = Dt : e.Clipper.Round = Et, e.Clipper.TopX = function(t, n) {
1890
+ a.msie ? e.Clipper.Round = wt : a.chromium ? e.Clipper.Round = G : a.safari ? e.Clipper.Round = Et : e.Clipper.Round = Tt, e.Clipper.TopX = function(t, n) {
1891
1891
  return n == t.Top.Y ? t.Top.X : t.Bot.X + e.Clipper.Round(t.Dx * (n - t.Bot.Y));
1892
1892
  }, e.Clipper.prototype.IntersectPoint = function(t, n, r) {
1893
1893
  r.X = 0, r.Y = 0;
@@ -2265,7 +2265,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
2265
2265
  }, e.Clipper.ClosedPathsFromPolyTree = function(t) {
2266
2266
  var n = new e.Paths();
2267
2267
  return e.Clipper.AddPolyNodeToPaths(t, e.Clipper.NodeType.ntClosed, n), n;
2268
- }, U(e.Clipper, e.ClipperBase), e.Clipper.NodeType = {
2268
+ }, W(e.Clipper, e.ClipperBase), e.Clipper.NodeType = {
2269
2269
  ntAny: 0,
2270
2270
  ntOpen: 1,
2271
2271
  ntClosed: 2
@@ -2528,7 +2528,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
2528
2528
  return n;
2529
2529
  };
2530
2530
  })();
2531
- })), te = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2531
+ })), k = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2532
2532
  var n = O(), r = 10 ** 5;
2533
2533
  function i(e) {
2534
2534
  return e.map(function(e) {
@@ -2714,7 +2714,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
2714
2714
  Polygon: _,
2715
2715
  ClipperLib: n
2716
2716
  };
2717
- })))(), 1), k = 18, A = Object.freeze({
2717
+ })))(), 1), te = 18, A = Object.freeze({
2718
2718
  x: 0,
2719
2719
  y: 0,
2720
2720
  scalePercent: 100
@@ -2723,7 +2723,7 @@ function j(e) {
2723
2723
  if (typeof e != "number" || !Number.isFinite(e) || e <= 0) throw TypeError("Bubble tail length must be greater than zero.");
2724
2724
  return e;
2725
2725
  }
2726
- function ne(e) {
2726
+ function M(e) {
2727
2727
  if (e.length !== 2 && e.length !== 3) throw TypeError("Bubble offset must be [x, y] or [x, y, scale].");
2728
2728
  let [t, n, r = 100] = e;
2729
2729
  if (![
@@ -2737,7 +2737,7 @@ function ne(e) {
2737
2737
  scalePercent: r
2738
2738
  });
2739
2739
  }
2740
- var M = Object.freeze([
2740
+ var N = Object.freeze([
2741
2741
  "NORMAL",
2742
2742
  "THINKING",
2743
2743
  "DREAMING",
@@ -2748,31 +2748,31 @@ var M = Object.freeze([
2748
2748
  "ANNOUNCEMENT",
2749
2749
  "NARRATION",
2750
2750
  "NO_BUBBLE"
2751
- ]), re = Object.freeze({
2751
+ ]), ne = Object.freeze({
2752
2752
  height: 96,
2753
2753
  width: 176
2754
- }), ie = Object.freeze({
2754
+ }), re = Object.freeze({
2755
2755
  height: 0,
2756
2756
  width: 0
2757
2757
  });
2758
- function ae(...e) {
2759
- return e.some((e) => e === "THINKING" || e === "DREAMING") ? re : ie;
2758
+ function ie(...e) {
2759
+ return e.some((e) => e === "THINKING" || e === "DREAMING") ? ne : re;
2760
2760
  }
2761
- function N(e) {
2761
+ function P(e) {
2762
2762
  return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&apos;");
2763
2763
  }
2764
- function P(e, t) {
2764
+ function F(e, t) {
2765
2765
  let n = e ?? t;
2766
2766
  if (!Number.isFinite(n) || n <= 0) throw TypeError("Bubble SVG dimensions must be positive and finite.");
2767
2767
  return n;
2768
2768
  }
2769
- function oe(e) {
2769
+ function ae(e) {
2770
2770
  if (e === null) return null;
2771
2771
  let t = e ?? 180;
2772
2772
  if (!Number.isFinite(t)) throw TypeError("tailDirection must be finite.");
2773
2773
  return (t % 360 + 360) % 360;
2774
2774
  }
2775
- function se(e, t, n = 18) {
2775
+ function oe(e, t, n = 18) {
2776
2776
  let r = e - 24, i = t - 24;
2777
2777
  return [
2778
2778
  {
@@ -2803,24 +2803,24 @@ function se(e, t, n = 18) {
2803
2803
  };
2804
2804
  }));
2805
2805
  }
2806
- function ce(e, t) {
2806
+ function se(e, t) {
2807
2807
  return e.x * t.y - e.y * t.x;
2808
2808
  }
2809
- function le(e, t) {
2809
+ function ce(e, t) {
2810
2810
  return {
2811
2811
  x: e.x - t.x,
2812
2812
  y: e.y - t.y
2813
2813
  };
2814
2814
  }
2815
- function ue(e, t) {
2815
+ function le(e, t) {
2816
2816
  return Math.hypot(e.x - t.x, e.y - t.y);
2817
2817
  }
2818
- function de(e, t, n, r) {
2818
+ function ue(e, t, n, r) {
2819
2819
  let i = t, a = r;
2820
2820
  for (; a > 0;) {
2821
2821
  let t = (i + n + e.length) % e.length, r = e[i], o = e[t];
2822
2822
  if (!r || !o) throw Error("Bubble border path is invalid.");
2823
- let s = ue(r, o);
2823
+ let s = le(r, o);
2824
2824
  if (a <= s) {
2825
2825
  let e = a / s;
2826
2826
  return {
@@ -2834,14 +2834,14 @@ function de(e, t, n, r) {
2834
2834
  if (!o) throw Error("Bubble border path is empty.");
2835
2835
  return o;
2836
2836
  }
2837
- function F(e, t, n, r, i) {
2837
+ function I(e, t, n, r, i) {
2838
2838
  let a;
2839
2839
  for (let r = 0; r < e.length; r += 1) {
2840
2840
  let i = e[r], o = e[(r + 1) % e.length];
2841
2841
  if (!i || !o) continue;
2842
- let s = le(o, i), c = ce(n, s);
2842
+ let s = ce(o, i), c = se(n, s);
2843
2843
  if (Math.abs(c) < 1e-9) continue;
2844
- let l = le(i, t), u = ce(l, s) / c, d = ce(l, n) / c;
2844
+ let l = ce(i, t), u = se(l, s) / c, d = se(l, n) / c;
2845
2845
  u < 0 || d < -1e-9 || d > 1 + 1e-9 || a && u >= a.rayScale || (a = {
2846
2846
  edgeIndex: r,
2847
2847
  point: {
@@ -2859,61 +2859,61 @@ function F(e, t, n, r, i) {
2859
2859
  ], s = a.edgeIndex + 1;
2860
2860
  return {
2861
2861
  borderPoint: a.point,
2862
- base: [de(o, s, -1, 9), de(o, s, 1, 9)],
2862
+ base: [ue(o, s, -1, 9), ue(o, s, 1, 9)],
2863
2863
  tip: {
2864
2864
  x: i?.x ?? t.x + n.x * (a.rayScale + r),
2865
2865
  y: i?.y ?? t.y + n.y * (a.rayScale + r)
2866
2866
  }
2867
2867
  };
2868
2868
  }
2869
- function fe(e) {
2869
+ function de(e) {
2870
2870
  let t = e * Math.PI / 180;
2871
2871
  return {
2872
2872
  x: Math.sin(t),
2873
2873
  y: -Math.cos(t)
2874
2874
  };
2875
2875
  }
2876
- function pe(e, t, n, r) {
2876
+ function fe(e, t, n, r) {
2877
2877
  return {
2878
2878
  x: n.x + (e.x - t.x) * r,
2879
2879
  y: n.y + (e.y - t.y) * r
2880
2880
  };
2881
2881
  }
2882
- function me(e, t, n, r, i, a) {
2882
+ function pe(e, t, n, r, i, a) {
2883
2883
  let o = {
2884
2884
  x: t / 2,
2885
2885
  y: n / 2
2886
- }, s = fe(r), c = F(e, o, s, i), l = ue(o, c.borderPoint), u = a.scalePercent / 100, d = {
2886
+ }, s = de(r), c = I(e, o, s, i), l = le(o, c.borderPoint), u = a.scalePercent / 100, d = {
2887
2887
  x: o.x - s.x * l * (u - 1) + a.x,
2888
2888
  y: o.y - s.y * l * (u - 1) - a.y
2889
2889
  };
2890
2890
  return {
2891
- body: e.map((e) => pe(e, o, d, u)),
2891
+ body: e.map((e) => fe(e, o, d, u)),
2892
2892
  bodyCenter: d,
2893
2893
  tip: c.tip
2894
2894
  };
2895
2895
  }
2896
- function he(e) {
2896
+ function me(e) {
2897
2897
  let t = e[0];
2898
2898
  if (!t) throw Error("Bubble polygon is empty.");
2899
2899
  return `M ${t.x.toFixed(4)} ${t.y.toFixed(4)} ${e.slice(1).map(({ x: e, y: t }) => `L ${e.toFixed(4)} ${t.toFixed(4)}`).join(" ")} Z`;
2900
2900
  }
2901
- function ge(e) {
2901
+ function he(e) {
2902
2902
  return Math.abs(e.reduce((t, n, r) => {
2903
2903
  let i = e[(r + 1) % e.length];
2904
2904
  return i ? t + n.x * i.y - i.x * n.y : t;
2905
2905
  }, 0) / 2);
2906
2906
  }
2907
- function _e(e, t, n, r = "") {
2908
- return `<path d="${he(e)}" fill="${t}" stroke="${n}" stroke-width="3" stroke-linejoin="round" ${r}/>`;
2907
+ function ge(e, t, n, r = "") {
2908
+ return `<path d="${me(e)}" fill="${t}" stroke="${n}" stroke-width="3" stroke-linejoin="round" ${r}/>`;
2909
2909
  }
2910
- function ve(e, t, n, r, i, a = "") {
2911
- let o = le(n, t), s = Math.hypot(o.x, o.y);
2910
+ function _e(e, t, n, r, i, a = "") {
2911
+ let o = ce(n, t), s = Math.hypot(o.x, o.y);
2912
2912
  if (!(s > 0)) throw TypeError("Bubble body center and tail tip must differ.");
2913
- let c = F(e, t, {
2913
+ let c = I(e, t, {
2914
2914
  x: o.x / s,
2915
2915
  y: o.y / s
2916
- }, 0, n), l = (e) => e.map(({ x: e, y: t }) => [e, t]), u = te.default.union([l(e)], [[l([
2916
+ }, 0, n), l = (e) => e.map(({ x: e, y: t }) => [e, t]), u = k.default.union([l(e)], [[l([
2917
2917
  c.base[0],
2918
2918
  c.tip,
2919
2919
  c.base[1]
@@ -2922,11 +2922,11 @@ function ve(e, t, n, r, i, a = "") {
2922
2922
  let d = u.map((e) => e.map(([e, t]) => ({
2923
2923
  x: e,
2924
2924
  y: t
2925
- }))).sort((e, t) => ge(t) - ge(e))[0];
2925
+ }))).sort((e, t) => he(t) - he(e))[0];
2926
2926
  if (!d) throw Error("JSClipper returned an empty Bubble outline.");
2927
- return `<path d="${he(d)}" fill="${r}" stroke="${i}" stroke-width="3" stroke-linejoin="round" data-boolean-operation="union" data-tail-base-on-border="true" ${a}/>`;
2927
+ return `<path d="${me(d)}" fill="${r}" stroke="${i}" stroke-width="3" stroke-linejoin="round" data-boolean-operation="union" data-tail-base-on-border="true" ${a}/>`;
2928
2928
  }
2929
- function ye(e) {
2929
+ function ve(e) {
2930
2930
  let t = e[0];
2931
2931
  if (!t || e.length < 3) throw TypeError("Smooth Bubble path requires at least three points.");
2932
2932
  let n = (e) => e.toFixed(4), r = e.map((t, r) => {
@@ -2943,12 +2943,12 @@ function ye(e) {
2943
2943
  });
2944
2944
  return `M ${n(t.x)} ${n(t.y)} ${r.join(" ")} Z`;
2945
2945
  }
2946
- function be(e, t, n, r) {
2946
+ function ye(e, t, n, r) {
2947
2947
  let i = e - 24, a = t - 24, o = i - 24, s = a - 24, c = (e, t) => ({
2948
2948
  x: 24 + o * e,
2949
2949
  y: 24 + s * t
2950
2950
  });
2951
- return `<path d="${ye([
2951
+ return `<path d="${ve([
2952
2952
  c(0, .5),
2953
2953
  c(.03, .3),
2954
2954
  c(.18, .2),
@@ -2967,8 +2967,8 @@ function be(e, t, n, r) {
2967
2967
  c(.03, .7)
2968
2968
  ])}" fill="${n}" stroke="${r}" stroke-width="3" stroke-linejoin="round"/>`;
2969
2969
  }
2970
- function xe(e, t, n, r, i, a) {
2971
- let o = le(n, t), s = Math.hypot(o.x, o.y), c = F(e, t, {
2970
+ function be(e, t, n, r, i, a) {
2971
+ let o = ce(n, t), s = Math.hypot(o.x, o.y), c = I(e, t, {
2972
2972
  x: o.x / s,
2973
2973
  y: o.y / s
2974
2974
  }, 0, n), l = {
@@ -2996,7 +2996,7 @@ function xe(e, t, n, r, i, a) {
2996
2996
  radius: 3.5
2997
2997
  }]).map(({ ratio: e, radius: t }) => `<circle cx="${l.x + (c.tip.x - l.x) * e}" cy="${l.y + (c.tip.y - l.y) * e}" r="${t}" fill="${r}" stroke="${i}" stroke-width="2"/>`).join("");
2998
2998
  }
2999
- function Se(e, t) {
2999
+ function xe(e, t) {
3000
3000
  let n = e / 2, r = t / 2;
3001
3001
  return Array.from({ length: 28 }, (i, a) => {
3002
3002
  let o = a * Math.PI * 2 / 28 - Math.PI / 2, s = a % 2 == 0, c = s ? e / 2 - 6 : e / 2 - 22, l = s ? t / 2 - 6 : t / 2 - 22;
@@ -3006,7 +3006,7 @@ function Se(e, t) {
3006
3006
  };
3007
3007
  });
3008
3008
  }
3009
- function Ce(e, t) {
3009
+ function Se(e, t) {
3010
3010
  let n = e - 24, r = t - 24, i = Array.from({ length: 21 }, (e, t) => {
3011
3011
  let n = t / 20;
3012
3012
  return {
@@ -3039,61 +3039,61 @@ function Ce(e, t) {
3039
3039
  }))
3040
3040
  ];
3041
3041
  }
3042
- function we(e, t, n) {
3043
- return e === "YELLING" ? Se(t, n) : e === "WAVY" ? Ce(t, n) : se(t, n);
3042
+ function Ce(e, t, n) {
3043
+ return e === "YELLING" ? xe(t, n) : e === "WAVY" ? Se(t, n) : oe(t, n);
3044
3044
  }
3045
- function Te(e) {
3046
- let t = ae(e.style), n = Math.max(P(e.width, 220), t.width), r = Math.max(P(e.height, 112), t.height), i = oe(e.tailDirection);
3045
+ function we(e) {
3046
+ let t = ie(e.style), n = Math.max(F(e.width, 220), t.width), r = Math.max(F(e.height, 112), t.height), i = ae(e.tailDirection);
3047
3047
  if (i === null) throw TypeError("Bubble body center offset requires a tail direction.");
3048
- let a = j(e.tailLength ?? k), o = ne(e.offset), s = {
3048
+ let a = j(e.tailLength ?? te), o = M(e.offset), s = {
3049
3049
  x: n / 2,
3050
3050
  y: r / 2
3051
- }, c = me(we(e.style, n, r), n, r, i, a, o);
3051
+ }, c = pe(Ce(e.style, n, r), n, r, i, a, o);
3052
3052
  return Object.freeze({
3053
3053
  x: c.bodyCenter.x - s.x,
3054
3054
  y: c.bodyCenter.y - s.y
3055
3055
  });
3056
3056
  }
3057
- function Ee(e, t, n, r, i, a, o, s) {
3058
- let c = se(t, n), l = (e) => r === null ? e : me(e, t, n, r, o, s).body, u = (e, c = "") => {
3059
- if (r === null) return _e(e, i, a, c);
3060
- let l = me(e, t, n, r, o, s);
3061
- return ve(l.body, l.bodyCenter, l.tip, i, a, c);
3057
+ function Te(e, t, n, r, i, a, o, s) {
3058
+ let c = oe(t, n), l = (e) => r === null ? e : pe(e, t, n, r, o, s).body, u = (e, c = "") => {
3059
+ if (r === null) return ge(e, i, a, c);
3060
+ let l = pe(e, t, n, r, o, s);
3061
+ return _e(l.body, l.bodyCenter, l.tip, i, a, c);
3062
3062
  };
3063
3063
  switch (e) {
3064
3064
  case "NO_BUBBLE": return "";
3065
3065
  case "THINKING":
3066
3066
  case "DREAMING": {
3067
- if (r === null) return be(t, n, i, a);
3068
- let l = me(c, t, n, r, o, s), u = s.scalePercent / 100, d = {
3067
+ if (r === null) return ye(t, n, i, a);
3068
+ let l = pe(c, t, n, r, o, s), u = s.scalePercent / 100, d = {
3069
3069
  x: t / 2,
3070
3070
  y: n / 2
3071
3071
  }, f = l.bodyCenter.x - d.x * u, p = l.bodyCenter.y - d.y * u;
3072
- return `${xe(l.body, l.bodyCenter, l.tip, i, a, e === "DREAMING")}<g transform="translate(${f} ${p}) scale(${u})">${be(t, n, i, a)}</g>`;
3072
+ return `${be(l.body, l.bodyCenter, l.tip, i, a, e === "DREAMING")}<g transform="translate(${f} ${p}) scale(${u})">${ye(t, n, i, a)}</g>`;
3073
3073
  }
3074
- case "YELLING": return u(Se(t, n));
3075
- case "WAVY": return u(Ce(t, n));
3074
+ case "YELLING": return u(xe(t, n));
3075
+ case "WAVY": return u(Se(t, n));
3076
3076
  case "WHISPERING": return u(c, "stroke-dasharray=\"5 5\"");
3077
3077
  case "ANNOUNCEMENT": return `${u(c)}<rect x="30" y="30" width="${t - 60}" height="${n - 60}" rx="13" fill="none" stroke="${a}" stroke-width="1.5"/>`;
3078
- case "NARRATION": return _e(l(c), i, a);
3078
+ case "NARRATION": return ge(l(c), i, a);
3079
3079
  case "OFF_PANEL": return u(c);
3080
3080
  case "NORMAL": return u(c);
3081
3081
  }
3082
3082
  }
3083
- function De(e) {
3084
- if (!M.includes(e.style)) throw TypeError(`Unsupported Bubble visual style: ${String(e.style)}`);
3083
+ function Ee(e) {
3084
+ if (!N.includes(e.style)) throw TypeError(`Unsupported Bubble visual style: ${String(e.style)}`);
3085
3085
  if (!Array.isArray(e.lines) || e.lines.some((e) => typeof e != "string")) throw TypeError("lines must be an array of strings.");
3086
- let t = P(e.width, 220), n = P(e.height, 112), r = P(e.fontSize, 15), i = oe(e.tailDirection), a = j(e.tailLength ?? k), o = e.offset === void 0 ? A : ne(e.offset), s = e.shapeTransition;
3087
- if (s !== void 0 && (!M.includes(s.from) || !M.includes(s.to) || !Number.isFinite(s.progress) || s.progress < 0 || s.progress > 1)) throw TypeError("Bubble shape transition is invalid.");
3088
- let c = ae(e.style, ...s === void 0 ? [] : [s.from, s.to]), l = Math.max(t, c.width), u = Math.max(n, c.height), d = e.fillColor ?? "#fff4cc", f = e.borderColor ?? "#6f5b45", p = e.textColor ?? "#25283a", m = e.fontFamily ?? "Noto Sans JP, sans-serif", h = r * 1.35, g = u / 2 - (e.lines.length - 1) * h / 2 + r * .35, _ = i === null ? 1 : o.scalePercent / 100, v = i === null ? {
3086
+ let t = F(e.width, 220), n = F(e.height, 112), r = F(e.fontSize, 15), i = ae(e.tailDirection), a = j(e.tailLength ?? te), o = e.offset === void 0 ? A : M(e.offset), s = e.shapeTransition;
3087
+ if (s !== void 0 && (!N.includes(s.from) || !N.includes(s.to) || !Number.isFinite(s.progress) || s.progress < 0 || s.progress > 1)) throw TypeError("Bubble shape transition is invalid.");
3088
+ let c = ie(e.style, ...s === void 0 ? [] : [s.from, s.to]), l = Math.max(t, c.width), u = Math.max(n, c.height), d = e.fillColor ?? "#fff4cc", f = e.borderColor ?? "#6f5b45", p = e.textColor ?? "#25283a", m = e.fontFamily ?? "Noto Sans JP, sans-serif", h = r * 1.35, g = u / 2 - (e.lines.length - 1) * h / 2 + r * .35, _ = i === null ? 1 : o.scalePercent / 100, v = i === null ? {
3089
3089
  x: l / 2,
3090
3090
  y: u / 2
3091
- } : me(se(l, u), l, u, i, a, o).bodyCenter, y = e.lines.map((e, t) => `<text x="${v.x}" y="${v.y + (g + t * h - u / 2) * _}" text-anchor="middle" fill="${N(p)}" font-family="${N(m)}" font-size="${r * _}">${N(e)}</text>`).join(""), b = s === void 0 ? Ee(e.style, l, u, i, d, f, a, o) : `<g opacity="${(1 - s.progress).toFixed(4)}">${Ee(s.from, l, u, i, d, f, a, o)}</g><g opacity="${s.progress.toFixed(4)}">${Ee(s.to, l, u, i, d, f, a, o)}</g>`, x = N(e.title ?? `${e.style} bubble`), S = s === void 0 ? "" : ` data-bubble-shape-transition-from="${s.from}" data-bubble-shape-transition-to="${s.to}" data-bubble-shape-transition-progress="${s.progress.toFixed(4)}"`;
3091
+ } : pe(oe(l, u), l, u, i, a, o).bodyCenter, y = e.lines.map((e, t) => `<text x="${v.x}" y="${v.y + (g + t * h - u / 2) * _}" text-anchor="middle" fill="${P(p)}" font-family="${P(m)}" font-size="${r * _}">${P(e)}</text>`).join(""), b = s === void 0 ? Te(e.style, l, u, i, d, f, a, o) : `<g opacity="${(1 - s.progress).toFixed(4)}">${Te(s.from, l, u, i, d, f, a, o)}</g><g opacity="${s.progress.toFixed(4)}">${Te(s.to, l, u, i, d, f, a, o)}</g>`, x = P(e.title ?? `${e.style} bubble`), S = s === void 0 ? "" : ` data-bubble-shape-transition-from="${s.from}" data-bubble-shape-transition-to="${s.to}" data-bubble-shape-transition-progress="${s.progress.toFixed(4)}"`;
3092
3092
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${u}" viewBox="0 0 ${l} ${u}" role="img" data-bubble-renderer="canonical" data-bubble-style="${e.style}" data-bubble-body-width="${l}" data-bubble-body-height="${u}"${S}><title>${x}</title>${b}${y}</svg>`;
3093
3093
  }
3094
3094
  //#endregion
3095
3095
  //#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/constants.js
3096
- var Oe = 2048, ke = 2112, I = Uint8Array, Ae = Uint16Array, je = Int32Array, Me = new I([
3096
+ var De = 2048, Oe = 2112, L = Uint8Array, ke = Uint16Array, Ae = Int32Array, je = new L([
3097
3097
  0,
3098
3098
  0,
3099
3099
  0,
@@ -3126,7 +3126,7 @@ var Oe = 2048, ke = 2112, I = Uint8Array, Ae = Uint16Array, je = Int32Array, Me
3126
3126
  0,
3127
3127
  0,
3128
3128
  0
3129
- ]), Ne = new I([
3129
+ ]), Me = new L([
3130
3130
  0,
3131
3131
  0,
3132
3132
  0,
@@ -3159,7 +3159,7 @@ var Oe = 2048, ke = 2112, I = Uint8Array, Ae = Uint16Array, je = Int32Array, Me
3159
3159
  13,
3160
3160
  0,
3161
3161
  0
3162
- ]), Pe = new I([
3162
+ ]), Ne = new L([
3163
3163
  16,
3164
3164
  17,
3165
3165
  18,
@@ -3179,51 +3179,51 @@ var Oe = 2048, ke = 2112, I = Uint8Array, Ae = Uint16Array, je = Int32Array, Me
3179
3179
  14,
3180
3180
  1,
3181
3181
  15
3182
- ]), Fe = function(e, t) {
3183
- for (var n = new Ae(31), r = 0; r < 31; ++r) n[r] = t += 1 << e[r - 1];
3184
- for (var i = new je(n[30]), r = 1; r < 30; ++r) for (var a = n[r]; a < n[r + 1]; ++a) i[a] = a - n[r] << 5 | r;
3182
+ ]), Pe = function(e, t) {
3183
+ for (var n = new ke(31), r = 0; r < 31; ++r) n[r] = t += 1 << e[r - 1];
3184
+ for (var i = new Ae(n[30]), r = 1; r < 30; ++r) for (var a = n[r]; a < n[r + 1]; ++a) i[a] = a - n[r] << 5 | r;
3185
3185
  return {
3186
3186
  b: n,
3187
3187
  r: i
3188
3188
  };
3189
- }, Ie = Fe(Me, 2), Le = Ie.b, Re = Ie.r;
3190
- Le[28] = 258, Re[258] = 28;
3191
- var ze = Fe(Ne, 0), Be = ze.b;
3192
- ze.r;
3193
- for (var Ve = new Ae(32768), L = 0; L < 32768; ++L) {
3194
- var R = (L & 43690) >> 1 | (L & 21845) << 1;
3195
- R = (R & 52428) >> 2 | (R & 13107) << 2, R = (R & 61680) >> 4 | (R & 3855) << 4, Ve[L] = ((R & 65280) >> 8 | (R & 255) << 8) >> 1;
3196
- }
3197
- for (var He = (function(e, t, n) {
3198
- for (var r = e.length, i = 0, a = new Ae(t); i < r; ++i) e[i] && ++a[e[i] - 1];
3199
- var o = new Ae(t);
3189
+ }, Fe = Pe(je, 2), Ie = Fe.b, Le = Fe.r;
3190
+ Ie[28] = 258, Le[258] = 28;
3191
+ var Re = Pe(Me, 0), ze = Re.b;
3192
+ Re.r;
3193
+ for (var Be = new ke(32768), R = 0; R < 32768; ++R) {
3194
+ var z = (R & 43690) >> 1 | (R & 21845) << 1;
3195
+ z = (z & 52428) >> 2 | (z & 13107) << 2, z = (z & 61680) >> 4 | (z & 3855) << 4, Be[R] = ((z & 65280) >> 8 | (z & 255) << 8) >> 1;
3196
+ }
3197
+ for (var Ve = (function(e, t, n) {
3198
+ for (var r = e.length, i = 0, a = new ke(t); i < r; ++i) e[i] && ++a[e[i] - 1];
3199
+ var o = new ke(t);
3200
3200
  for (i = 1; i < t; ++i) o[i] = o[i - 1] + a[i - 1] << 1;
3201
3201
  var s;
3202
3202
  if (n) {
3203
- s = new Ae(1 << t);
3203
+ s = new ke(1 << t);
3204
3204
  var c = 15 - t;
3205
- for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[Ve[d] >> c] = l;
3206
- } else for (s = new Ae(r), i = 0; i < r; ++i) e[i] && (s[i] = Ve[o[e[i] - 1]++] >> 15 - e[i]);
3205
+ for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[Be[d] >> c] = l;
3206
+ } else for (s = new ke(r), i = 0; i < r; ++i) e[i] && (s[i] = Be[o[e[i] - 1]++] >> 15 - e[i]);
3207
3207
  return s;
3208
- }), Ue = new I(288), L = 0; L < 144; ++L) Ue[L] = 8;
3209
- for (var L = 144; L < 256; ++L) Ue[L] = 9;
3210
- for (var L = 256; L < 280; ++L) Ue[L] = 7;
3211
- for (var L = 280; L < 288; ++L) Ue[L] = 8;
3212
- for (var We = new I(32), L = 0; L < 32; ++L) We[L] = 5;
3213
- var Ge = /*#__PURE__*/ He(Ue, 9, 1), Ke = /*#__PURE__*/ He(We, 5, 1), qe = function(e) {
3208
+ }), He = new L(288), R = 0; R < 144; ++R) He[R] = 8;
3209
+ for (var R = 144; R < 256; ++R) He[R] = 9;
3210
+ for (var R = 256; R < 280; ++R) He[R] = 7;
3211
+ for (var R = 280; R < 288; ++R) He[R] = 8;
3212
+ for (var Ue = new L(32), R = 0; R < 32; ++R) Ue[R] = 5;
3213
+ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = function(e) {
3214
3214
  for (var t = e[0], n = 1; n < e.length; ++n) e[n] > t && (t = e[n]);
3215
3215
  return t;
3216
- }, z = function(e, t, n) {
3216
+ }, B = function(e, t, n) {
3217
3217
  var r = t / 8 | 0;
3218
3218
  return (e[r] | e[r + 1] << 8) >> (t & 7) & n;
3219
- }, Je = function(e, t) {
3219
+ }, qe = function(e, t) {
3220
3220
  var n = t / 8 | 0;
3221
3221
  return (e[n] | e[n + 1] << 8 | e[n + 2] << 16) >> (t & 7);
3222
- }, Ye = function(e) {
3222
+ }, Je = function(e) {
3223
3223
  return (e + 7) / 8 | 0;
3224
- }, Xe = function(e, t, n) {
3225
- return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new I(e.subarray(t, n));
3226
- }, Ze = [
3224
+ }, Ye = function(e, t, n) {
3225
+ return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new L(e.subarray(t, n));
3226
+ }, Xe = [
3227
3227
  "unexpected EOF",
3228
3228
  "invalid block type",
3229
3229
  "invalid length/literal",
@@ -3238,121 +3238,121 @@ var Ge = /*#__PURE__*/ He(Ue, 9, 1), Ke = /*#__PURE__*/ He(We, 5, 1), qe = funct
3238
3238
  "filename too long",
3239
3239
  "stream finishing",
3240
3240
  "invalid zip data"
3241
- ], B = function(e, t, n) {
3242
- var r = Error(t || Ze[e]);
3243
- if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, B), !n) throw r;
3241
+ ], V = function(e, t, n) {
3242
+ var r = Error(t || Xe[e]);
3243
+ if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, V), !n) throw r;
3244
3244
  return r;
3245
- }, Qe = function(e, t, n, r) {
3245
+ }, Ze = function(e, t, n, r) {
3246
3246
  var i = e.length, a = r ? r.length : 0;
3247
- if (!i || t.f && !t.l) return n || new I(0);
3247
+ if (!i || t.f && !t.l) return n || new L(0);
3248
3248
  var o = !n, s = o || t.i != 2, c = t.i;
3249
- o && (n = new I(i * 3));
3249
+ o && (n = new L(i * 3));
3250
3250
  var l = function(e) {
3251
3251
  var t = n.length;
3252
3252
  if (e > t) {
3253
- var r = new I(Math.max(t * 2, e));
3253
+ var r = new L(Math.max(t * 2, e));
3254
3254
  r.set(n), n = r;
3255
3255
  }
3256
3256
  }, u = t.f || 0, d = t.p || 0, f = t.b || 0, p = t.l, m = t.d, h = t.m, g = t.n, _ = i * 8;
3257
3257
  do {
3258
3258
  if (!p) {
3259
- u = z(e, d, 1);
3260
- var v = z(e, d + 1, 3);
3259
+ u = B(e, d, 1);
3260
+ var v = B(e, d + 1, 3);
3261
3261
  if (d += 3, !v) {
3262
- var y = Ye(d) + 4, b = e[y - 4] | e[y - 3] << 8, x = y + b;
3262
+ var y = Je(d) + 4, b = e[y - 4] | e[y - 3] << 8, x = y + b;
3263
3263
  if (x > i) {
3264
- c && B(0);
3264
+ c && V(0);
3265
3265
  break;
3266
3266
  }
3267
3267
  s && l(f + b), n.set(e.subarray(y, x), f), t.b = f += b, t.p = d = x * 8, t.f = u;
3268
3268
  continue;
3269
3269
  }
3270
- if (v == 1) p = Ge, m = Ke, h = 9, g = 5;
3270
+ if (v == 1) p = We, m = Ge, h = 9, g = 5;
3271
3271
  else if (v == 2) {
3272
- var S = z(e, d, 31) + 257, C = z(e, d + 10, 15) + 4, w = S + z(e, d + 5, 31) + 1;
3272
+ var S = B(e, d, 31) + 257, C = B(e, d + 10, 15) + 4, w = S + B(e, d + 5, 31) + 1;
3273
3273
  d += 14;
3274
- for (var T = new I(w), E = new I(19), D = 0; D < C; ++D) E[Pe[D]] = z(e, d + D * 3, 7);
3274
+ for (var T = new L(w), E = new L(19), D = 0; D < C; ++D) E[Ne[D]] = B(e, d + D * 3, 7);
3275
3275
  d += C * 3;
3276
- for (var ee = qe(E), O = (1 << ee) - 1, te = He(E, ee, 1), D = 0; D < w;) {
3277
- var k = te[z(e, d, O)];
3278
- d += k & 15;
3279
- var y = k >> 4;
3276
+ for (var ee = Ke(E), O = (1 << ee) - 1, k = Ve(E, ee, 1), D = 0; D < w;) {
3277
+ var te = k[B(e, d, O)];
3278
+ d += te & 15;
3279
+ var y = te >> 4;
3280
3280
  if (y < 16) T[D++] = y;
3281
3281
  else {
3282
3282
  var A = 0, j = 0;
3283
- for (y == 16 ? (j = 3 + z(e, d, 3), d += 2, A = T[D - 1]) : y == 17 ? (j = 3 + z(e, d, 7), d += 3) : y == 18 && (j = 11 + z(e, d, 127), d += 7); j--;) T[D++] = A;
3283
+ for (y == 16 ? (j = 3 + B(e, d, 3), d += 2, A = T[D - 1]) : y == 17 ? (j = 3 + B(e, d, 7), d += 3) : y == 18 && (j = 11 + B(e, d, 127), d += 7); j--;) T[D++] = A;
3284
3284
  }
3285
3285
  }
3286
- var ne = T.subarray(0, S), M = T.subarray(S);
3287
- h = qe(ne), g = qe(M), p = He(ne, h, 1), m = He(M, g, 1);
3288
- } else B(1);
3286
+ var M = T.subarray(0, S), N = T.subarray(S);
3287
+ h = Ke(M), g = Ke(N), p = Ve(M, h, 1), m = Ve(N, g, 1);
3288
+ } else V(1);
3289
3289
  if (d > _) {
3290
- c && B(0);
3290
+ c && V(0);
3291
3291
  break;
3292
3292
  }
3293
3293
  }
3294
3294
  s && l(f + 131072);
3295
- for (var re = (1 << h) - 1, ie = (1 << g) - 1, ae = d;; ae = d) {
3296
- var A = p[Je(e, d) & re], N = A >> 4;
3295
+ for (var ne = (1 << h) - 1, re = (1 << g) - 1, ie = d;; ie = d) {
3296
+ var A = p[qe(e, d) & ne], P = A >> 4;
3297
3297
  if (d += A & 15, d > _) {
3298
- c && B(0);
3298
+ c && V(0);
3299
3299
  break;
3300
3300
  }
3301
- if (A || B(2), N < 256) n[f++] = N;
3302
- else if (N == 256) {
3303
- ae = d, p = null;
3301
+ if (A || V(2), P < 256) n[f++] = P;
3302
+ else if (P == 256) {
3303
+ ie = d, p = null;
3304
3304
  break;
3305
3305
  } else {
3306
- var P = N - 254;
3307
- if (N > 264) {
3308
- var D = N - 257, oe = Me[D];
3309
- P = z(e, d, (1 << oe) - 1) + Le[D], d += oe;
3306
+ var F = P - 254;
3307
+ if (P > 264) {
3308
+ var D = P - 257, ae = je[D];
3309
+ F = B(e, d, (1 << ae) - 1) + Ie[D], d += ae;
3310
3310
  }
3311
- var se = m[Je(e, d) & ie], ce = se >> 4;
3312
- se || B(3), d += se & 15;
3313
- var M = Be[ce];
3314
- if (ce > 3) {
3315
- var oe = Ne[ce];
3316
- M += Je(e, d) & (1 << oe) - 1, d += oe;
3311
+ var oe = m[qe(e, d) & re], se = oe >> 4;
3312
+ oe || V(3), d += oe & 15;
3313
+ var N = ze[se];
3314
+ if (se > 3) {
3315
+ var ae = Me[se];
3316
+ N += qe(e, d) & (1 << ae) - 1, d += ae;
3317
3317
  }
3318
3318
  if (d > _) {
3319
- c && B(0);
3319
+ c && V(0);
3320
3320
  break;
3321
3321
  }
3322
3322
  s && l(f + 131072);
3323
- var le = f + P;
3324
- if (f < M) {
3325
- var ue = a - M, de = Math.min(M, le);
3326
- for (ue + f < 0 && B(3); f < de; ++f) n[f] = r[ue + f];
3323
+ var ce = f + F;
3324
+ if (f < N) {
3325
+ var le = a - N, ue = Math.min(N, ce);
3326
+ for (le + f < 0 && V(3); f < ue; ++f) n[f] = r[le + f];
3327
3327
  }
3328
- for (; f < le; ++f) n[f] = n[f - M];
3328
+ for (; f < ce; ++f) n[f] = n[f - N];
3329
3329
  }
3330
3330
  }
3331
- t.l = p, t.p = ae, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
3331
+ t.l = p, t.p = ie, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
3332
3332
  } while (!u);
3333
- return f != n.length && o ? Xe(n, 0, f) : n.subarray(0, f);
3334
- }, $e = /*#__PURE__*/ new I(0), et = function(e) {
3335
- (e[0] != 31 || e[1] != 139 || e[2] != 8) && B(6, "invalid gzip data");
3333
+ return f != n.length && o ? Ye(n, 0, f) : n.subarray(0, f);
3334
+ }, Qe = /*#__PURE__*/ new L(0), $e = function(e) {
3335
+ (e[0] != 31 || e[1] != 139 || e[2] != 8) && V(6, "invalid gzip data");
3336
3336
  var t = e[3], n = 10;
3337
3337
  t & 4 && (n += (e[10] | e[11] << 8) + 2);
3338
3338
  for (var r = (t >> 3 & 1) + (t >> 4 & 1); r > 0; r -= !e[n++]);
3339
3339
  return n + (t & 2);
3340
- }, tt = function(e) {
3340
+ }, et = function(e) {
3341
3341
  var t = e.length;
3342
3342
  return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0;
3343
3343
  };
3344
- function nt(e, t) {
3345
- var n = et(e);
3346
- return n + 8 > e.length && B(6, "invalid gzip data"), Qe(e.subarray(n, -8), { i: 2 }, t && t.out || new I(tt(e)), t && t.dictionary);
3344
+ function tt(e, t) {
3345
+ var n = $e(e);
3346
+ return n + 8 > e.length && V(6, "invalid gzip data"), Ze(e.subarray(n, -8), { i: 2 }, t && t.out || new L(et(e)), t && t.dictionary);
3347
3347
  }
3348
- var rt = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
3348
+ var nt = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
3349
3349
  try {
3350
- rt.decode($e, { stream: !0 });
3350
+ nt.decode(Qe, { stream: !0 });
3351
3351
  } catch {}
3352
3352
  //#endregion
3353
3353
  //#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/swap.js
3354
- var it = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18;
3355
- function at(e) {
3354
+ var rt = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18;
3355
+ function it(e) {
3356
3356
  let t = e.length;
3357
3357
  for (let n = 0; n < t; n += 4) [e[n], e[n + 1], e[n + 2], e[n + 3]] = [
3358
3358
  e[n + 3],
@@ -3361,15 +3361,15 @@ function at(e) {
3361
3361
  e[n]
3362
3362
  ];
3363
3363
  }
3364
- function ot(e) {}
3365
- var st = it ? at : ot, ct = new TextDecoder(), lt = class e {
3364
+ function at(e) {}
3365
+ var ot = rt ? it : at, st = new TextDecoder(), ct = class e {
3366
3366
  constructor(e) {
3367
3367
  if (e instanceof Uint8Array) {
3368
3368
  let t = 0, n = new DataView(e.buffer);
3369
3369
  if (this.highStart = n.getUint32(0, !0), this.errorValue = n.getUint32(4, !0), t = n.getUint32(8, !0), t !== 4294967295) throw Error("Trie created with old version of @cto.af/unicode-trie.");
3370
3370
  if (t = n.getUint32(12, !0), 16 + t > e.byteLength) throw RangeError("Invalid input length");
3371
3371
  let r = e.subarray(16 + t);
3372
- this.values = r.length ? JSON.parse(ct.decode(nt(r))) : [], e = nt(e.subarray(16, 16 + t)), st(e), this.data = new Int32Array(e.buffer);
3372
+ this.values = r.length ? JSON.parse(st.decode(tt(r))) : [], e = tt(e.subarray(16, 16 + t)), ot(e), this.data = new Int32Array(e.buffer);
3373
3373
  } else ({data: this.data, highStart: this.highStart, errorValue: this.errorValue, values: this.values = []} = e);
3374
3374
  }
3375
3375
  static fromBase64(t) {
@@ -3382,10 +3382,10 @@ var st = it ? at : ot, ct = new TextDecoder(), lt = class e {
3382
3382
  let n = (this.data[e >> 5] << 2) + (e & 31);
3383
3383
  t = this.data[n];
3384
3384
  } else if (e <= 65535) {
3385
- let n = (this.data[Oe + (e - 55296 >> 5)] << 2) + (e & 31);
3385
+ let n = (this.data[De + (e - 55296 >> 5)] << 2) + (e & 31);
3386
3386
  t = this.data[n];
3387
3387
  } else if (e < this.highStart) {
3388
- let n = this.data[ke - 32 + (e >> 11)];
3388
+ let n = this.data[Oe - 32 + (e >> 11)];
3389
3389
  n = this.data[n + (e >> 5 & 63)], n = (n << 2) + (e & 31), t = this.data[n];
3390
3390
  } else t = this.data[this.data.length - 4];
3391
3391
  return t;
@@ -3394,26 +3394,26 @@ var st = it ? at : ot, ct = new TextDecoder(), lt = class e {
3394
3394
  let t = this.get(e);
3395
3395
  return this.values[t] ?? t;
3396
3396
  }
3397
- }, ut = lt.fromBase64("AAgOAAEAAAD/////nRQAAB+LCAC4xcFoAgPtnQnwlkUdx1+URLxABcUUghTEEK8Cmwp0LJAa\n MRrFbBSPSXHSAUYNdFQoBWMKyQrUCo/EyMIjD3TIAxXJM5NBHBm0RDSPzDOVdAz7/nB/07bt\n s8/e+/zhfef9zD7HPs/e129/u8/yzVutVWANeBl079xq9QJ9wUCwDxjqYQ4DI8BoMBYcBY4D\n 48FEw3NTwDTp/BxwAZgJLgaXgCvAAnADuA3cDe4Hj0rPLQerwLPgJfAaeBe8Az4EnT/Ram0D\n eoBdwe5gENgX0DsOhHkQGAlGgTHgaHACGA8mgilgGpgBLgJzweVgPlgIbgF3iPOl4BGwAqwG\n a8Er4C2wDnw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n Q+V7pdfDpy5rtv2qEPkU7XFY0v3Q+Oc8FpqHdHV9Xf415XFbPTPfPk7qNWsufow9vkqlz6v+\n eA4udH9l3XxtiA5ZyN5XpvxSNzdetRdQlWnKjzbP695Xt9+WTz/bJk5y6tDVlYHUe0Crv9Bv\n vMf+bnzq79DHenfs/ZD3y4TO7b0S7vPM8Z5yL2mTG1XXKcyMLh5093OzvwbVfzr/1hHDby7u\n ufhH5z/Vrm1YZPsheUtn2pQh+RnfMmCqy3PN7aSeN0oRtrp8m6oONOXflHVfrnj0ccdU1lVS\n yYu7Ssjz96ZwxEgz13rX1c3Y+Sp2vJve7eN+zP3nYsojYunAhMq1cs2vM1X9J99+Q2g+d+1z\n 5OznpXJD1zcKcc/U33KN39TzgCnr4lz95Fz1cW79kxT6SDF00UruT5ZDZ8Xl9x83MV0I0CwB\n AB+LCAC4xcFoAgMdjksWhCAMBO/CelYzJ4gMCqiI4t/n/a9hyk29JN3p5DL7bj7GTQrbKypR\n dDVVywyhZCz4xkUhnSIj5EExoFoQisIfbICE2WJOoAESSK7wecCscDJSxRXMbBAlfLCyIbTh\n T8tr5/YikvVFSYq3dURbKo/gf+Q3zBCELycCXW/uB2mPjCb8AAAA"), dt = Object.fromEntries(ut.values.map((e, t) => [e, t])), { values: ft } = ut, { AI: pt, AL: mt, CJ: ht, CM: gt, NS: _t, SA: vt, SG: yt, SP: bt, XX: xt } = dt;
3398
- function V(e) {
3397
+ }, lt = ct.fromBase64("AAgOAAEAAAD/////nRQAAB+LCAC4xcFoAgPtnQnwlkUdx1+URLxABcUUghTEEK8Cmwp0LJAa\n MRrFbBSPSXHSAUYNdFQoBWMKyQrUCo/EyMIjD3TIAxXJM5NBHBm0RDSPzDOVdAz7/nB/07bt\n s8/e+/zhfef9zD7HPs/e129/u8/yzVutVWANeBl079xq9QJ9wUCwDxjqYQ4DI8BoMBYcBY4D\n 48FEw3NTwDTp/BxwAZgJLgaXgCvAAnADuA3cDe4Hj0rPLQerwLPgJfAaeBe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08k67f5dtmuupKN2FvMpOsKObeDnVx\n k3ofp1h6VrFIVVdV7T2fYm9013l7k/5rbNlKaBuXso7LLV+K1d67uuWiJ19ShhcjvUP97FsO\n Q+V7pdfDpy5rtv2qEPkU7XFY0v3Q+Oc8FpqHdHV9Xf415XFbPTPfPk7qNWsufow9vkqlz6v+\n eA4udH9l3XxtiA5ZyN5XpvxSNzdetRdQlWnKjzbP695Xt9+WTz/bJk5y6tDVlYHUe0Crv9Bv\n vMf+bnzq79DHenfs/ZD3y4TO7b0S7vPM8Z5yL2mTG1XXKcyMLh5093OzvwbVfzr/1hHDby7u\n ufhH5z/Vrm1YZPsheUtn2pQh+RnfMmCqy3PN7aSeN0oRtrp8m6oONOXflHVfrnj0ccdU1lVS\n yYu7Ssjz96ZwxEgz13rX1c3Y+Sp2vJve7eN+zP3nYsojYunAhMq1cs2vM1X9J99+Q2g+d+1z\n 5OznpXJD1zcKcc/U33KN39TzgCnr4lz95Fz1cW79kxT6SDF00UruT5ZDZ8Xl9x83MV0I0CwB\n AB+LCAC4xcFoAgMdjksWhCAMBO/CelYzJ4gMCqiI4t/n/a9hyk29JN3p5DL7bj7GTQrbKypR\n dDVVywyhZCz4xkUhnSIj5EExoFoQisIfbICE2WJOoAESSK7wecCscDJSxRXMbBAlfLCyIbTh\n T8tr5/YikvVFSYq3dURbKo/gf+Q3zBCELycCXW/uB2mPjCb8AAAA"), ut = Object.fromEntries(lt.values.map((e, t) => [e, t])), { values: dt } = lt, { AI: ft, AL: pt, CJ: mt, CM: ht, NS: gt, SA: _t, SG: vt, SP: yt, XX: bt } = ut;
3398
+ function H(e) {
3399
3399
  switch (e) {
3400
3400
  case null: return null;
3401
3401
  case -1: return "sot";
3402
3402
  case -2: return "eot";
3403
- default: return ft[e];
3403
+ default: return dt[e];
3404
3404
  }
3405
3405
  }
3406
- function St(e, t) {
3406
+ function xt(e, t) {
3407
3407
  switch (e) {
3408
- case pt:
3409
- case yt:
3410
- case xt: return mt;
3411
- case vt: return /^[\p{gc=Mn}\p{gc=Mc}]$/u.test(t) ? gt : mt;
3412
- case ht: return _t;
3408
+ case ft:
3409
+ case vt:
3410
+ case bt: return pt;
3411
+ case _t: return /^[\p{gc=Mn}\p{gc=Mc}]$/u.test(t) ? ht : pt;
3412
+ case mt: return gt;
3413
3413
  }
3414
3414
  return e;
3415
3415
  }
3416
- var Ct = class {
3416
+ var St = class {
3417
3417
  cp = -Infinity;
3418
3418
  cls = -1;
3419
3419
  char = "";
@@ -3423,15 +3423,15 @@ var Ct = class {
3423
3423
  this.cls = e, this.cp = t, this.char = n, this.len = r;
3424
3424
  }
3425
3425
  [Symbol.for("nodejs.util.inspect.custom")](e, t, n) {
3426
- return `${V(this.cls)}(${this.cp.toString(16).padStart(4, "0")}:${JSON.stringify(this.char)})${this.ignored ? "Ig" : ""}`;
3426
+ return `${H(this.cls)}(${this.cp.toString(16).padStart(4, "0")}:${JSON.stringify(this.char)})${this.ignored ? "Ig" : ""}`;
3427
3427
  }
3428
- }, wt = class {
3428
+ }, Ct = class {
3429
3429
  str = "";
3430
3430
  len = 0;
3431
3431
  prevChunk = 0;
3432
- prev = new Ct(-1, -Infinity, "", 0);
3433
- cur = new Ct(-1, -Infinity, "", 0);
3434
- next = new Ct(-1, -Infinity, "", 0);
3432
+ prev = new St(-1, -Infinity, "", 0);
3433
+ cur = new St(-1, -Infinity, "", 0);
3434
+ next = new St(-1, -Infinity, "", 0);
3435
3435
  LB8 = !1;
3436
3436
  spaces = !1;
3437
3437
  RI = 0;
@@ -3444,13 +3444,13 @@ var Ct = class {
3444
3444
  this.next.ignored ? this.cur.len = this.next.len : (this.prev = this.cur, this.cur = this.next), this.next = e;
3445
3445
  }
3446
3446
  pushEnd() {
3447
- this.push(new Ct(-2, Infinity, "", this.next.len));
3447
+ this.push(new St(-2, Infinity, "", this.next.len));
3448
3448
  }
3449
3449
  *codePoints(e, t = !0) {
3450
3450
  if (t) for (; e < this.len;) if (e === this.cur.len && this.next.cls >= 0) yield this.next, e += this.next.char.length;
3451
3451
  else {
3452
- let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r = ut.get(t);
3453
- e += n.length, yield new Ct(St(r, n), t, n, e);
3452
+ let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r = lt.get(t);
3453
+ e += n.length, yield new St(xt(r, n), t, n, e);
3454
3454
  }
3455
3455
  else for (; e > 0;) if (e === this.cur.len) yield this.cur, e -= this.cur.char.length;
3456
3456
  else if (e === this.prev.len) yield this.prev, e -= this.prev.char.length;
@@ -3458,11 +3458,11 @@ var Ct = class {
3458
3458
  let t = e - 1, n = this.str.charCodeAt(t);
3459
3459
  n >= 56320 && n <= 57343 && t--;
3460
3460
  let r = this.str.codePointAt(t), i = String.fromCodePoint(r);
3461
- yield new Ct(St(ut.get(r), i), r, i, e), e = t;
3461
+ yield new St(xt(lt.get(r), i), r, i, e), e = t;
3462
3462
  }
3463
3463
  }
3464
3464
  classAfterSpaces(e) {
3465
- for (let { cls: t } of this.codePoints(e)) if (t !== bt) return t;
3465
+ for (let { cls: t } of this.codePoints(e)) if (t !== yt) return t;
3466
3466
  return -2;
3467
3467
  }
3468
3468
  afterNext(e = 1) {
@@ -3476,324 +3476,324 @@ var Ct = class {
3476
3476
  let r = `${n(this.prev)} => ${n(this.cur)} => ${n(this.next)}`;
3477
3477
  return this.LB8 && (r += " LB8"), this.spaces && (r += " spaces"), this.RI > 0 && (r += ` RI: ${this.RI}`), this.props && (r += ` ${JSON.stringify(this.props)}`), r;
3478
3478
  }
3479
- }, H = class {
3479
+ }, U = class {
3480
3480
  string = void 0;
3481
3481
  props = void 0;
3482
3482
  constructor(e, t = !1) {
3483
3483
  this.position = e, this.required = t;
3484
3484
  }
3485
- }, U = lt.fromBase64("AAAEAAAAAAD/////wQIAAB+LCAC1xcFoAgPtmj1IHUEQxzd5FiaEkMLSKqQIViEQCEmTjyqk\n SUgR7OySTrHxdVoIYqUg2AgqFhYWFhYidpYqKDaClVZaqJWF2qj/xT1cjjtv772Z3T1uHvzY\n 753d2b252ds3+1SpRbAMVkGSrlMo5LNjIfqoB/uEfR2Ao5yy4zb7PgUX4Brcgo6GUi9AF+gG\n r0EPeAc+AN3mM8KvJu6DH0bWb08yeyEneV77rHia/yjbMvEBxJum7mCqzQjSo1beuBWfRFy3\n 1fHpR2QJgiAIgiAIgiAIQpoZc45c8HhGd2WJYUyy5oIgCP5oRPhuEQQh7vvPVuAe34q5x1lH\n uJFh15J7HRt9Z7MJ9iKwg1fP72kG4osqz3ynUlNPHjhC2i5/9UypX8DOa6bSa0hfAbsf33zE\n /EPLr7NtOYj4zlTfD+v7dG0r8uzhXM39qEPH9TtBvTNwUXK9dyv0frzE3DSxje8mZ0yNjuz8\n zlT+S6T1OnQh7M5oo+f+Bvk67EGY/OfiPeKfTL5+hr6ZuM13k/cT4R/QC86tMfdZbf4a2Un6\n H9L9OXNIGCoo12yDYdR7mzG+tP8yhjoTpt607tuh/6r7b1VG7yv5ya/OP7iZQXEdYyi9UNel\n WKM83YTQE/f8qftudz9y7G/OdWlXLxTPYRm9cu+ZMutMaYuK2tnjyqpb5jnPa8+xH7n3eJFO\n ivRGbTNC6su3PeHYM0V7OxZ/hUtWLP5ZFfzDmMYQSieU8qj78rF3fMsI+axX5fwWYvw+5t9u\n f0VnNR964yh31bdLOce8qfYb11ndVWeUvibHfCj8tZD2LNZvTRyyW/GfQr1/OM8gob/LcPn8\n If3iVmVT23Iu/69KaxHzOYn6XenTNw1551DW/3V5X7v6c9Tfh7jPX9TrFtqOhjgPttqeW28u\n 33192kvqs2vW7w7BeyuJcEoAAB+LCAC1xcFoAgOLVvJT0lGKVIoFANHfAiwJAAAA");
3486
- Object.fromEntries(U.values.map((e, t) => [e, t]));
3487
- var { values: Tt } = U, { AK: Et, AL: W, AP: Dt, AS: Ot, B2: kt, BA: At, BB: jt, BK: Mt, CB: Nt, CL: Pt, CM: Ft, CP: It, CR: Lt, EB: Rt, EM: zt, EX: Bt, GL: Vt, H2: Ht, H3: Ut, HH: Wt, HL: G, HY: Gt, ID: Kt, IN: qt, IS: Jt, JL: Yt, JT: Xt, JV: Zt, LF: Qt, NU: K, OP: $t, NL: en, NS: tn, PO: nn, PR: rn, RI: an, SP: q, SY: on, QU: J, VF: sn, VI: cn, WJ: ln, ZW: un, ZWJ: dn } = dt, fn = /* @__PURE__ */ new Set([
3488
- W,
3485
+ }, W = ct.fromBase64("AAAEAAAAAAD/////wQIAAB+LCAC1xcFoAgPtmj1IHUEQxzd5FiaEkMLSKqQIViEQCEmTjyqk\n SUgR7OySTrHxdVoIYqUg2AgqFhYWFhYidpYqKDaClVZaqJWF2qj/xT1cjjtv772Z3T1uHvzY\n 753d2b252ds3+1SpRbAMVkGSrlMo5LNjIfqoB/uEfR2Ao5yy4zb7PgUX4Brcgo6GUi9AF+gG\n r0EPeAc+AN3mM8KvJu6DH0bWb08yeyEneV77rHia/yjbMvEBxJum7mCqzQjSo1beuBWfRFy3\n 1fHpR2QJgiAIgiAIgiAIQpoZc45c8HhGd2WJYUyy5oIgCP5oRPhuEQQh7vvPVuAe34q5x1lH\n uJFh15J7HRt9Z7MJ9iKwg1fP72kG4osqz3ynUlNPHjhC2i5/9UypX8DOa6bSa0hfAbsf33zE\n /EPLr7NtOYj4zlTfD+v7dG0r8uzhXM39qEPH9TtBvTNwUXK9dyv0frzE3DSxje8mZ0yNjuz8\n zlT+S6T1OnQh7M5oo+f+Bvk67EGY/OfiPeKfTL5+hr6ZuM13k/cT4R/QC86tMfdZbf4a2Un6\n H9L9OXNIGCoo12yDYdR7mzG+tP8yhjoTpt607tuh/6r7b1VG7yv5ya/OP7iZQXEdYyi9UNel\n WKM83YTQE/f8qftudz9y7G/OdWlXLxTPYRm9cu+ZMutMaYuK2tnjyqpb5jnPa8+xH7n3eJFO\n ivRGbTNC6su3PeHYM0V7OxZ/hUtWLP5ZFfzDmMYQSieU8qj78rF3fMsI+axX5fwWYvw+5t9u\n f0VnNR964yh31bdLOce8qfYb11ndVWeUvibHfCj8tZD2LNZvTRyyW/GfQr1/OM8gob/LcPn8\n If3iVmVT23Iu/69KaxHzOYn6XenTNw1551DW/3V5X7v6c9Tfh7jPX9TrFtqOhjgPttqeW28u\n 33192kvqs2vW7w7BeyuJcEoAAB+LCAC1xcFoAgOLVvJT0lGKVIoFANHfAiwJAAAA");
3486
+ Object.fromEntries(W.values.map((e, t) => [e, t]));
3487
+ var { values: wt } = W, { AK: Tt, AL: G, AP: Et, AS: Dt, B2: Ot, BA: kt, BB: At, BK: jt, CB: Mt, CL: Nt, CM: Pt, CP: Ft, CR: It, EB: Lt, EM: Rt, EX: zt, GL: Bt, H2: Vt, H3: Ht, HH: Ut, HL: K, HY: Wt, ID: Gt, IN: Kt, IS: qt, JL: Jt, JT: Yt, JV: Xt, LF: Zt, NU: q, OP: Qt, NL: $t, NS: en, PO: tn, PR: nn, RI: rn, SP: J, SY: an, QU: Y, VF: on, VI: sn, WJ: cn, ZW: ln, ZWJ: un } = ut, dn = /* @__PURE__ */ new Set([
3489
3488
  G,
3490
- K
3489
+ K,
3490
+ q
3491
+ ]), fn = /* @__PURE__ */ new Set([
3492
+ jt,
3493
+ It,
3494
+ Zt,
3495
+ $t,
3496
+ J,
3497
+ ln
3491
3498
  ]), pn = /* @__PURE__ */ new Set([
3492
- Mt,
3499
+ Gt,
3493
3500
  Lt,
3494
- Qt,
3495
- en,
3496
- q,
3497
- un
3501
+ Rt
3498
3502
  ]), mn = /* @__PURE__ */ new Set([
3499
- Kt,
3500
- Rt,
3501
- zt
3503
+ Jt,
3504
+ Xt,
3505
+ Vt,
3506
+ Ht
3502
3507
  ]), hn = /* @__PURE__ */ new Set([
3503
- Yt,
3504
- Zt,
3505
- Ht,
3506
- Ut
3507
- ]), gn = /* @__PURE__ */ new Set([
3508
- Yt,
3509
- Zt,
3508
+ Jt,
3510
3509
  Xt,
3511
- Ht,
3512
- Ut
3513
- ]), _n = /* @__PURE__ */ new Set([Zt, Xt]), vn = /* @__PURE__ */ new Set([
3514
- q,
3510
+ Yt,
3515
3511
  Vt,
3516
- ln,
3517
- Pt,
3512
+ Ht
3513
+ ]), gn = /* @__PURE__ */ new Set([Xt, Yt]), _n = /* @__PURE__ */ new Set([
3518
3514
  J,
3519
- It,
3520
3515
  Bt,
3521
- Jt,
3522
- on,
3523
- Mt,
3524
- Lt,
3525
- Qt,
3526
- en,
3527
- un
3528
- ]), yn = /* @__PURE__ */ new Set([
3516
+ cn,
3517
+ Nt,
3518
+ Y,
3519
+ Ft,
3520
+ zt,
3521
+ qt,
3522
+ an,
3523
+ jt,
3524
+ It,
3525
+ Zt,
3526
+ $t,
3527
+ ln
3528
+ ]), vn = /* @__PURE__ */ new Set([
3529
3529
  -1,
3530
- Mt,
3531
- Lt,
3532
- Qt,
3533
- en,
3530
+ jt,
3531
+ It,
3532
+ Zt,
3534
3533
  $t,
3534
+ Qt,
3535
+ Y,
3536
+ Bt,
3535
3537
  J,
3536
- Vt,
3537
- q,
3538
- un
3539
- ]), Y = Symbol("PASS"), X = Symbol("NO_BREAK"), Z = Symbol("MAY_BREAK"), bn = Symbol("MUST_BREAK");
3538
+ ln
3539
+ ]), X = Symbol("PASS"), Z = Symbol("NO_BREAK"), yn = Symbol("MAY_BREAK"), bn = Symbol("MUST_BREAK");
3540
3540
  function xn(e) {
3541
- return e.cur.cls === -1 && e.next.cls !== -2 ? X : Y;
3541
+ return e.cur.cls === -1 && e.next.cls !== -2 ? Z : X;
3542
3542
  }
3543
3543
  function Sn(e) {
3544
- return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? bn : Y;
3544
+ return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? bn : X;
3545
3545
  }
3546
3546
  function Cn(e) {
3547
- return e.cur.cls === Mt ? bn : Y;
3547
+ return e.cur.cls === jt ? bn : X;
3548
3548
  }
3549
3549
  function wn(e) {
3550
3550
  switch (e.cur.cls) {
3551
- case Lt: return e.next.cls === Qt ? X : bn;
3552
- case Qt:
3553
- case en: return bn;
3551
+ case It: return e.next.cls === Zt ? Z : bn;
3552
+ case Zt:
3553
+ case $t: return bn;
3554
3554
  }
3555
- return Y;
3555
+ return X;
3556
3556
  }
3557
3557
  function Tn(e) {
3558
3558
  switch (e.next.cls) {
3559
- case Mt:
3560
- case Lt:
3561
- case Qt:
3562
- case en: return X;
3559
+ case jt:
3560
+ case It:
3561
+ case Zt:
3562
+ case $t: return Z;
3563
3563
  }
3564
- return Y;
3564
+ return X;
3565
3565
  }
3566
3566
  function En(e) {
3567
- return e.cur.cls !== an && (e.RI = 0), e.spaces ? (e.next.cls !== q && (e.spaces = !1), X) : Y;
3567
+ return e.cur.cls !== rn && (e.RI = 0), e.spaces ? (e.next.cls !== J && (e.spaces = !1), Z) : X;
3568
3568
  }
3569
3569
  function Dn(e) {
3570
- if (e.next.cls === un) return X;
3571
- if (e.next.cls === q) switch (e.cur.cls) {
3572
- case un:
3573
- case $t:
3574
- case J:
3575
- case Pt:
3576
- case It:
3577
- case kt: break;
3578
- default: return X;
3570
+ if (e.next.cls === ln) return Z;
3571
+ if (e.next.cls === J) switch (e.cur.cls) {
3572
+ case ln:
3573
+ case Qt:
3574
+ case Y:
3575
+ case Nt:
3576
+ case Ft:
3577
+ case Ot: break;
3578
+ default: return Z;
3579
3579
  }
3580
- return Y;
3580
+ return X;
3581
3581
  }
3582
3582
  function On(e) {
3583
- return e.LB8 ? (e.LB8 = !1, Z) : e.cur.cls === un ? e.next.cls === q ? (e.LB8 = !0, X) : Z : Y;
3583
+ return e.LB8 ? (e.LB8 = !1, yn) : e.cur.cls === ln ? e.next.cls === J ? (e.LB8 = !0, Z) : yn : X;
3584
3584
  }
3585
3585
  function kn(e) {
3586
- return e.cur.cls === dn ? X : Y;
3586
+ return e.cur.cls === un ? Z : X;
3587
3587
  }
3588
3588
  function An(e) {
3589
- return !pn.has(e.cur.cls) && (e.next.cls === Ft || e.next.cls === dn) ? (e.next.ignored = !0, X) : Y;
3589
+ return !fn.has(e.cur.cls) && (e.next.cls === Pt || e.next.cls === un) ? (e.next.ignored = !0, Z) : X;
3590
3590
  }
3591
3591
  function jn(e) {
3592
- return e.cur.cls === Ft && (e.cur.cls = W), e.next.cls === Ft && (e.next.cls = W), Y;
3592
+ return e.cur.cls === Pt && (e.cur.cls = G), e.next.cls === Pt && (e.next.cls = G), X;
3593
3593
  }
3594
3594
  function Mn(e) {
3595
- return e.next.cls === ln || e.cur.cls === ln ? X : Y;
3595
+ return e.next.cls === cn || e.cur.cls === cn ? Z : X;
3596
3596
  }
3597
3597
  function Nn(e) {
3598
- return e.cur.cls === Vt ? X : Y;
3598
+ return e.cur.cls === Bt ? Z : X;
3599
3599
  }
3600
3600
  function Pn(e) {
3601
- if (e.next.cls === Vt) switch (e.cur.cls) {
3602
- case q:
3603
- case At:
3604
- case Gt:
3605
- case Wt: return Y;
3606
- default: return X;
3601
+ if (e.next.cls === Bt) switch (e.cur.cls) {
3602
+ case J:
3603
+ case kt:
3604
+ case Wt:
3605
+ case Ut: return X;
3606
+ default: return Z;
3607
3607
  }
3608
- return Y;
3608
+ return X;
3609
3609
  }
3610
3610
  function Fn(e) {
3611
3611
  switch (e.next.cls) {
3612
- case Pt:
3613
- case It:
3614
- case Bt:
3615
- case on: return X;
3612
+ case Nt:
3613
+ case Ft:
3614
+ case zt:
3615
+ case an: return Z;
3616
3616
  }
3617
- return Y;
3617
+ return X;
3618
3618
  }
3619
3619
  function In(e) {
3620
- return e.cur.cls === $t ? (e.next.cls === q && (e.spaces = !0), X) : Y;
3620
+ return e.cur.cls === Qt ? (e.next.cls === J && (e.spaces = !0), Z) : X;
3621
3621
  }
3622
3622
  function Ln(e) {
3623
- return yn.has(e.prev.cls) && /^\p{Pi}$/u.test(e.cur.char) && e.cur.cls === J ? (e.spaces = !0, X) : Y;
3623
+ return vn.has(e.prev.cls) && /^\p{Pi}$/u.test(e.cur.char) && e.cur.cls === Y ? (e.spaces = !0, Z) : X;
3624
3624
  }
3625
3625
  function Rn(e) {
3626
- if (/^\p{gc=Pf}$/u.test(e.next.char) && e.next.cls === J) {
3626
+ if (/^\p{gc=Pf}$/u.test(e.next.char) && e.next.cls === Y) {
3627
3627
  let t = e.afterNext();
3628
- if (!t || vn.has(t.cls)) return X;
3628
+ if (!t || _n.has(t.cls)) return Z;
3629
3629
  }
3630
- return Y;
3630
+ return X;
3631
3631
  }
3632
3632
  function zn(e) {
3633
- return e.cur.cls === q && e.next.cls === Jt && e.afterNext()?.cls === K ? Z : Y;
3633
+ return e.cur.cls === J && e.next.cls === qt && e.afterNext()?.cls === q ? yn : X;
3634
3634
  }
3635
3635
  function Bn(e) {
3636
- return e.next.cls === Jt ? X : Y;
3636
+ return e.next.cls === qt ? Z : X;
3637
3637
  }
3638
3638
  function Vn(e) {
3639
- if (e.cur.cls === Pt || e.cur.cls === It) {
3640
- if (e.classAfterSpaces(e.cur.len) === tn) return e.next.cls === q && (e.spaces = !0), X;
3641
- if (e.next.cls === q) return X;
3639
+ if (e.cur.cls === Nt || e.cur.cls === Ft) {
3640
+ if (e.classAfterSpaces(e.cur.len) === en) return e.next.cls === J && (e.spaces = !0), Z;
3641
+ if (e.next.cls === J) return Z;
3642
3642
  }
3643
- return Y;
3643
+ return X;
3644
3644
  }
3645
3645
  function Hn(e) {
3646
- if (e.cur.cls === kt) {
3647
- if (e.classAfterSpaces(e.cur.len) === kt) return e.next.cls === q && (e.spaces = !0), X;
3648
- if (e.next.cls === q) return X;
3646
+ if (e.cur.cls === Ot) {
3647
+ if (e.classAfterSpaces(e.cur.len) === Ot) return e.next.cls === J && (e.spaces = !0), Z;
3648
+ if (e.next.cls === J) return Z;
3649
3649
  }
3650
- return Y;
3650
+ return X;
3651
3651
  }
3652
3652
  function Un(e) {
3653
- return e.cur.cls === q ? Z : Y;
3653
+ return e.cur.cls === J ? yn : X;
3654
3654
  }
3655
3655
  function Wn(e) {
3656
- return e.next.cls === J && !/^\p{Pi}$/u.test(e.next.char) || e.cur.cls === J && !/^\p{Pf}$/u.test(e.cur.char) ? X : Y;
3656
+ return e.next.cls === Y && !/^\p{Pi}$/u.test(e.next.char) || e.cur.cls === Y && !/^\p{Pf}$/u.test(e.cur.char) ? Z : X;
3657
3657
  }
3658
3658
  function Gn(e) {
3659
- if (!U.get(e.cur.cp) && e.next.cls === J) return X;
3660
- if (e.next.cls === J) {
3659
+ if (!W.get(e.cur.cp) && e.next.cls === Y) return Z;
3660
+ if (e.next.cls === Y) {
3661
3661
  let t = e.afterNext();
3662
- if (!t || !U.get(t.cp)) return X;
3662
+ if (!t || !W.get(t.cp)) return Z;
3663
3663
  }
3664
- return e.cur.cls === J && !U.get(e.next.cp) || (e.prev.cls === -1 || !U.get(e.prev.cp)) && e.cur.cls === J ? X : Y;
3664
+ return e.cur.cls === Y && !W.get(e.next.cp) || (e.prev.cls === -1 || !W.get(e.prev.cp)) && e.cur.cls === Y ? Z : X;
3665
3665
  }
3666
3666
  function Kn(e) {
3667
- return e.cur.cls === Nt || e.next.cls === Nt ? Z : Y;
3667
+ return e.cur.cls === Mt || e.next.cls === Mt ? yn : X;
3668
3668
  }
3669
3669
  var qn = /* @__PURE__ */ new Set([
3670
3670
  -1,
3671
+ jt,
3672
+ It,
3673
+ Zt,
3674
+ $t,
3675
+ J,
3676
+ ln,
3671
3677
  Mt,
3672
- Lt,
3673
- Qt,
3674
- en,
3675
- q,
3676
- un,
3677
- Nt,
3678
- Vt
3678
+ Bt
3679
3679
  ]);
3680
3680
  function Jn(e) {
3681
- return qn.has(e.prev.cls) && (e.cur.cls === Gt || e.cur.cls === Wt) && (e.next.cls === W || e.next.cls === G) ? X : Y;
3681
+ return qn.has(e.prev.cls) && (e.cur.cls === Wt || e.cur.cls === Ut) && (e.next.cls === G || e.next.cls === K) ? Z : X;
3682
3682
  }
3683
3683
  function Yn(e) {
3684
- if (e.cur.cls === jt) return X;
3684
+ if (e.cur.cls === At) return Z;
3685
3685
  switch (e.next.cls) {
3686
- case At:
3686
+ case kt:
3687
+ case Ut:
3687
3688
  case Wt:
3688
- case Gt:
3689
- case tn: return X;
3689
+ case en: return Z;
3690
3690
  }
3691
- return Y;
3691
+ return X;
3692
3692
  }
3693
3693
  function Xn(e) {
3694
- return e.prev.cls === G && (e.cur.cls === Gt || e.cur.cls === Wt) && e.next.cls !== G ? X : Y;
3694
+ return e.prev.cls === K && (e.cur.cls === Wt || e.cur.cls === Ut) && e.next.cls !== K ? Z : X;
3695
3695
  }
3696
3696
  function Zn(e) {
3697
- return e.cur.cls === on && e.next.cls === G ? X : Y;
3697
+ return e.cur.cls === an && e.next.cls === K ? Z : X;
3698
3698
  }
3699
3699
  function Qn(e) {
3700
- return e.next.cls === qt ? X : Y;
3700
+ return e.next.cls === Kt ? Z : X;
3701
3701
  }
3702
3702
  function $n(e) {
3703
3703
  switch (e.cur.cls) {
3704
- case W:
3705
3704
  case G:
3706
- if (e.next.cls === K) return X;
3705
+ case K:
3706
+ if (e.next.cls === q) return Z;
3707
3707
  break;
3708
- case K: if (e.next.cls === W || e.next.cls === G) return X;
3708
+ case q: if (e.next.cls === G || e.next.cls === K) return Z;
3709
3709
  }
3710
- return Y;
3710
+ return X;
3711
3711
  }
3712
3712
  function er(e) {
3713
- return e.cur.cls === rn && mn.has(e.next.cls) || e.next.cls === nn && mn.has(e.cur.cls) ? X : Y;
3713
+ return e.cur.cls === nn && pn.has(e.next.cls) || e.next.cls === tn && pn.has(e.cur.cls) ? Z : X;
3714
3714
  }
3715
3715
  function tr(e) {
3716
- return (e.cur.cls === rn || e.cur.cls === nn) && (e.next.cls === W || e.next.cls === G) || (e.cur.cls === W || e.cur.cls === G) && (e.next.cls === rn || e.next.cls === nn) ? X : Y;
3716
+ return (e.cur.cls === nn || e.cur.cls === tn) && (e.next.cls === G || e.next.cls === K) || (e.cur.cls === G || e.cur.cls === K) && (e.next.cls === nn || e.next.cls === tn) ? Z : X;
3717
3717
  }
3718
- var nr = /* @__PURE__ */ new Set([nn, rn]), rr = /* @__PURE__ */ new Set([Pt, It]);
3718
+ var nr = /* @__PURE__ */ new Set([tn, nn]), rr = /* @__PURE__ */ new Set([Nt, Ft]);
3719
3719
  function ar(e) {
3720
3720
  let t = null;
3721
- if (nr.has(e.next.cls) ? t = rr.has(e.cur.cls) ? e.prev.len : e.cur.len : e.next.cls === K && (t = e.cur.len), t !== null) SyIsLoop: for (let { cls: n } of e.codePoints(t, !1)) switch (n) {
3722
- case on:
3723
- case Jt: continue;
3724
- case K: return X;
3721
+ if (nr.has(e.next.cls) ? t = rr.has(e.cur.cls) ? e.prev.len : e.cur.len : e.next.cls === q && (t = e.cur.len), t !== null) SyIsLoop: for (let { cls: n } of e.codePoints(t, !1)) switch (n) {
3722
+ case an:
3723
+ case qt: continue;
3724
+ case q: return Z;
3725
3725
  default: break SyIsLoop;
3726
3726
  }
3727
- if (e.cur.cls === nn || e.cur.cls === rn) {
3728
- if (e.next.cls === $t) {
3727
+ if (e.cur.cls === tn || e.cur.cls === nn) {
3728
+ if (e.next.cls === Qt) {
3729
3729
  let t = e.afterNext();
3730
- if (t && (t.cls === K || t.cls === Jt && e.afterNext(2)?.cls === K)) return X;
3731
- } else if (e.next.cls === K) return X;
3730
+ if (t && (t.cls === q || t.cls === qt && e.afterNext(2)?.cls === q)) return Z;
3731
+ } else if (e.next.cls === q) return Z;
3732
3732
  }
3733
- return e.cur.cls === Gt && e.next.cls === K || e.cur.cls === Jt && e.next.cls === K ? X : Y;
3733
+ return e.cur.cls === Wt && e.next.cls === q || e.cur.cls === qt && e.next.cls === q ? Z : X;
3734
3734
  }
3735
3735
  function or(e) {
3736
3736
  switch (e.cur.cls) {
3737
- case Yt:
3738
- if (hn.has(e.next.cls)) return X;
3739
- break;
3740
- case Zt:
3741
- case Ht:
3742
- if (_n.has(e.next.cls)) return X;
3737
+ case Jt:
3738
+ if (mn.has(e.next.cls)) return Z;
3743
3739
  break;
3744
3740
  case Xt:
3745
- case Ut: if (e.next.cls === Xt) return X;
3741
+ case Vt:
3742
+ if (gn.has(e.next.cls)) return Z;
3743
+ break;
3744
+ case Yt:
3745
+ case Ht: if (e.next.cls === Yt) return Z;
3746
3746
  }
3747
- return Y;
3747
+ return X;
3748
3748
  }
3749
3749
  function sr(e) {
3750
3750
  switch (e.cur.cls) {
3751
- case Yt:
3752
- case Zt:
3751
+ case Jt:
3753
3752
  case Xt:
3753
+ case Yt:
3754
+ case Vt:
3754
3755
  case Ht:
3755
- case Ut:
3756
- if (e.next.cls === nn) return X;
3756
+ if (e.next.cls === tn) return Z;
3757
3757
  break;
3758
- case rn: if (gn.has(e.next.cls)) return X;
3758
+ case nn: if (hn.has(e.next.cls)) return Z;
3759
3759
  }
3760
- return Y;
3760
+ return X;
3761
3761
  }
3762
3762
  function cr(e) {
3763
- return (e.cur.cls === W || e.cur.cls === G) && (e.next.cls === W || e.next.cls === G) ? X : Y;
3763
+ return (e.cur.cls === G || e.cur.cls === K) && (e.next.cls === G || e.next.cls === K) ? Z : X;
3764
3764
  }
3765
3765
  function lr(e) {
3766
3766
  let { prev: t, cur: n, next: r } = e;
3767
3767
  function i(e) {
3768
- return e.cls === Et || e.char === "◌" || e.cls === Ot;
3768
+ return e.cls === Tt || e.char === "◌" || e.cls === Dt;
3769
3769
  }
3770
- return n.cls === Dt && i(r) || i(n) && (r.cls === sn || r.cls === cn) || i(t) && n.cls === cn && (r.cls === Et || r.char === "◌") || i(n) && i(r) && e.afterNext()?.cls === sn ? X : Y;
3770
+ return n.cls === Et && i(r) || i(n) && (r.cls === on || r.cls === sn) || i(t) && n.cls === sn && (r.cls === Tt || r.char === "◌") || i(n) && i(r) && e.afterNext()?.cls === on ? Z : X;
3771
3771
  }
3772
3772
  function ur(e) {
3773
- return e.cur.cls === Jt && (e.next.cls === W || e.next.cls === G) ? X : Y;
3773
+ return e.cur.cls === qt && (e.next.cls === G || e.next.cls === K) ? Z : X;
3774
3774
  }
3775
3775
  function dr(e) {
3776
3776
  switch (e.cur.cls) {
3777
- case W:
3778
3777
  case G:
3779
3778
  case K:
3780
- if (e.next.cls === $t && !U.get(e.next.cp)) return X;
3779
+ case q:
3780
+ if (e.next.cls === Qt && !W.get(e.next.cp)) return Z;
3781
3781
  break;
3782
- case It: if (!U.get(e.cur.cp) && fn.has(e.next.cls)) return X;
3782
+ case Ft: if (!W.get(e.cur.cp) && dn.has(e.next.cls)) return Z;
3783
3783
  }
3784
- return Y;
3784
+ return X;
3785
3785
  }
3786
3786
  function fr(e) {
3787
- if (e.cur.cls === an) {
3788
- if (e.next.cls === an && ++e.RI % 2 != 0) return X;
3787
+ if (e.cur.cls === rn) {
3788
+ if (e.next.cls === rn && ++e.RI % 2 != 0) return Z;
3789
3789
  } else e.RI = 0;
3790
- return Y;
3790
+ return X;
3791
3791
  }
3792
3792
  function pr(e) {
3793
- return e.cur.cls === Rt && e.next.cls === zt || e.next.cls === zt && /^\p{ExtPict}$/u.test(e.cur.char) && /^\p{gc=Cn}$/u.test(e.cur.char) ? X : Y;
3793
+ return e.cur.cls === Lt && e.next.cls === Rt || e.next.cls === Rt && /^\p{ExtPict}$/u.test(e.cur.char) && /^\p{gc=Cn}$/u.test(e.cur.char) ? Z : X;
3794
3794
  }
3795
3795
  function mr() {
3796
- return Z;
3796
+ return yn;
3797
3797
  }
3798
3798
  var hr = [
3799
3799
  xn,
@@ -3849,7 +3849,7 @@ var hr = [
3849
3849
  verbose: !1,
3850
3850
  ...e
3851
3851
  }, this.rules = [...hr], this.#e.example7) throw Error("'example7' flag deprecated");
3852
- this.#e.verbose && this.rules.unshift((e) => (console.log(e.cur.len, e), Y));
3852
+ this.#e.verbose && this.rules.unshift((e) => (console.log(e.cur.len, e), X));
3853
3853
  }
3854
3854
  removeRule(...e) {
3855
3855
  let t = [];
@@ -3874,10 +3874,10 @@ var hr = [
3874
3874
  for (let t of this.rules) {
3875
3875
  let n = t.call(this, e);
3876
3876
  switch (n) {
3877
- case Y: break;
3878
- case X: return this.#e.verbose && console.log(` ${t.name}: NO_BREAK`), null;
3879
- case Z: return this.#e.verbose && console.log(` ${t.name}: MAY_BREAK`), new H(e.cur.len);
3880
- case bn: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new H(e.cur.len, !0);
3877
+ case X: break;
3878
+ case Z: return this.#e.verbose && console.log(` ${t.name}: NO_BREAK`), null;
3879
+ case yn: return this.#e.verbose && console.log(` ${t.name}: MAY_BREAK`), new U(e.cur.len);
3880
+ case bn: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new U(e.cur.len, !0);
3881
3881
  default: throw Error(`Invalid state: "${n}"`);
3882
3882
  }
3883
3883
  }
@@ -3888,7 +3888,7 @@ var hr = [
3888
3888
  t && (this.#e.string && (t.string = e.str.slice(e.prevChunk, e.cur.len)), e.props &&= (t.props = e.props, void 0), yield t, e.prevChunk = e.cur.len);
3889
3889
  }
3890
3890
  *breaks(e) {
3891
- let t = new wt(e);
3891
+ let t = new Ct(e);
3892
3892
  for (let e of t.codePoints(0)) t.push(e), yield* this.#n(t);
3893
3893
  t.pushEnd(), yield* this.#n(t);
3894
3894
  }
@@ -3983,22 +3983,87 @@ function Tr(e) {
3983
3983
  });
3984
3984
  }
3985
3985
  //#endregion
3986
+ //#region src/content-run.ts
3987
+ function Er(e) {
3988
+ return typeof e == "object" && !!e && !Array.isArray(e);
3989
+ }
3990
+ function Dr(e, t) {
3991
+ let n = /* @__PURE__ */ new Set(["type", ...t]), r = Object.keys(e).filter((e) => !n.has(e));
3992
+ if (r.length > 0) throw TypeError(`Bubble content run has unknown properties: ${r.join(", ")}.`);
3993
+ for (let n of t) if (typeof e[n] != "string") throw TypeError(`Bubble content run ${n} must be a string.`);
3994
+ }
3995
+ function Or(e) {
3996
+ if (!Er(e)) throw TypeError("Bubble content run must be an object.");
3997
+ if (e.type === "text") return Dr(e, ["text"]), Object.freeze({
3998
+ text: e.text,
3999
+ type: "text"
4000
+ });
4001
+ if (e.type === "ruby") {
4002
+ Dr(e, ["base", "reading"]);
4003
+ let t = e.base, n = e.reading;
4004
+ if (t.length === 0) throw TypeError("Bubble ruby run base must not be empty.");
4005
+ if (n.length === 0) throw TypeError("Bubble ruby run reading must not be empty.");
4006
+ return Object.freeze({
4007
+ base: t,
4008
+ reading: n,
4009
+ type: "ruby"
4010
+ });
4011
+ }
4012
+ throw TypeError("Bubble content run type must be text or ruby.");
4013
+ }
4014
+ function kr(e) {
4015
+ if (typeof e == "string") return Object.freeze([Object.freeze({
4016
+ text: e,
4017
+ type: "text"
4018
+ })]);
4019
+ if (!Array.isArray(e)) throw TypeError("Bubble text must be a string or content run array.");
4020
+ let t = e.map((e) => Or(e)).filter((e) => e.type !== "text" || e.text.length > 0);
4021
+ return t.length === 0 ? Object.freeze([Object.freeze({
4022
+ text: "",
4023
+ type: "text"
4024
+ })]) : Object.freeze(t);
4025
+ }
4026
+ function Ar(e) {
4027
+ return e.every((e) => e.type === "text");
4028
+ }
4029
+ function jr(e) {
4030
+ return e.map((e) => e.type === "ruby" ? e.base : e.text).join("");
4031
+ }
4032
+ function Mr(e) {
4033
+ return e.map((e) => e.type === "ruby" ? e.reading : "").join("");
4034
+ }
4035
+ function Nr(e) {
4036
+ let t = [];
4037
+ for (let n of e) {
4038
+ let e = t[t.length - 1];
4039
+ if (n.type === "text" && e?.type === "text") {
4040
+ t[t.length - 1] = Object.freeze({
4041
+ text: `${e.text}${n.text}`,
4042
+ type: "text"
4043
+ });
4044
+ continue;
4045
+ }
4046
+ t.push(n);
4047
+ }
4048
+ return Object.freeze(t);
4049
+ }
4050
+ //#endregion
3986
4051
  //#region src/reveal.ts
3987
- var Er = Object.freeze([
4052
+ var Pr = Object.freeze([
3988
4053
  "CHARACTER",
3989
4054
  "WORD",
3990
4055
  "LINE",
3991
4056
  "BLOCK"
3992
4057
  ]);
3993
- function Dr(e) {
4058
+ function Fr(e) {
3994
4059
  let t = globalThis.Intl?.Segmenter;
3995
4060
  return typeof t == "function" ? [...new t(void 0, { granularity: "grapheme" }).segment(e)].map(({ segment: e }) => e) : Array.from(e);
3996
4061
  }
3997
- function Or(e) {
3998
- if (typeof e != "string" || !Er.includes(e)) throw TypeError("Bubble reveal unit must be CHARACTER, WORD, LINE, or BLOCK.");
4062
+ function Ir(e) {
4063
+ if (typeof e != "string" || !Pr.includes(e)) throw TypeError("Bubble reveal unit must be CHARACTER, WORD, LINE, or BLOCK.");
3999
4064
  return e;
4000
4065
  }
4001
- function kr(e) {
4066
+ function Lr(e) {
4002
4067
  if (typeof e != "object" || !e || Array.isArray(e)) throw TypeError("Bubble reveal must be an object.");
4003
4068
  let t = e, n = /* @__PURE__ */ new Set([
4004
4069
  "unit",
@@ -4009,7 +4074,7 @@ function kr(e) {
4009
4074
  "sound"
4010
4075
  ]);
4011
4076
  if (Object.keys(t).filter((e) => !n.has(e)).length > 0 || t.unit === void 0) throw TypeError("Bubble reveal has unknown or missing properties.");
4012
- let r = Or(t.unit), i = t.delimiters ?? " \r\n";
4077
+ let r = Ir(t.unit), i = t.delimiters ?? " \r\n";
4013
4078
  if (typeof i != "string" || i.length === 0) throw TypeError("Bubble WORD delimiters must be a non-empty string.");
4014
4079
  let a = t.showDelimiters ?? !1;
4015
4080
  if (typeof a != "boolean") throw TypeError("Bubble reveal showDelimiters must be boolean.");
@@ -4028,16 +4093,16 @@ function kr(e) {
4028
4093
  ...c === void 0 ? {} : { sound: c }
4029
4094
  });
4030
4095
  }
4031
- function Ar(e, t, n) {
4096
+ function Rr(e, t, n) {
4032
4097
  let r = new Set(Array.from(t)), i = [], a = "";
4033
- for (let t of Dr(e)) a += t, r.has(t) && ((n || a.slice(0, -t.length).length > 0) && i.push(n ? a : a.slice(0, -t.length)), a = "");
4098
+ for (let t of Fr(e)) a += t, r.has(t) && ((n || a.slice(0, -t.length).length > 0) && i.push(n ? a : a.slice(0, -t.length)), a = "");
4034
4099
  return a.length > 0 && i.push(a), i.filter((e) => e.length > 0);
4035
4100
  }
4036
- function jr(e, t) {
4101
+ function zr(e, t) {
4037
4102
  if (e.length === 0) return Object.freeze([""]);
4038
- if (t.unit === "CHARACTER") return Object.freeze(Dr(e));
4103
+ if (t.unit === "CHARACTER") return Object.freeze(Fr(e));
4039
4104
  if (t.unit === "WORD") {
4040
- let n = Ar(e, t.delimiters, t.showDelimiters);
4105
+ let n = Rr(e, t.delimiters, t.showDelimiters);
4041
4106
  if (t.showDelimiters) return Object.freeze(n);
4042
4107
  let r = [], i = 0;
4043
4108
  for (let a of n) {
@@ -4055,30 +4120,75 @@ function jr(e, t) {
4055
4120
  let i = r;
4056
4121
  return Object.freeze(i.length > 0 ? i : [e]);
4057
4122
  }
4058
- function Mr(e, t) {
4123
+ function Br(e, t) {
4059
4124
  return e.slice(0, Math.max(0, Math.min(t, e.length))).join("");
4060
4125
  }
4126
+ function Vr(e) {
4127
+ return Object.freeze(Nr(Object.freeze([...e])));
4128
+ }
4129
+ function Hr(e) {
4130
+ return Object.freeze({
4131
+ text: e,
4132
+ type: "text"
4133
+ });
4134
+ }
4135
+ function Ur(e, t) {
4136
+ let n = [], r = [], i = () => {
4137
+ r.length !== 0 && (n.push(Vr(r)), r = []);
4138
+ };
4139
+ for (let n of e) {
4140
+ if (n.type === "ruby") {
4141
+ r.push(n);
4142
+ continue;
4143
+ }
4144
+ if (t === "LINE") {
4145
+ for (let e of n.text.split(/(?<=\n)/u)) e.length !== 0 && (r.push(Hr(e)), e.endsWith("\n") && i());
4146
+ continue;
4147
+ }
4148
+ let e = n.text.split(/(\n{2,})/u);
4149
+ for (let [t, n] of e.entries()) n.length !== 0 && (r.push(Hr(n)), t % 2 == 1 && i());
4150
+ }
4151
+ return i(), Object.freeze(n.length > 0 ? n : [Vr(e)]);
4152
+ }
4153
+ function Wr(e, t) {
4154
+ if (Ar(e)) return Object.freeze(zr(jr(e), t).map((e) => Object.freeze([Hr(e)])));
4155
+ if (t.unit === "LINE" || t.unit === "BLOCK") return Ur(e, t.unit);
4156
+ let n = [];
4157
+ for (let r of e) {
4158
+ if (r.type === "ruby") {
4159
+ n.push(Object.freeze([r]));
4160
+ continue;
4161
+ }
4162
+ let e = t.unit === "CHARACTER" ? Fr(r.text) : Rr(r.text, t.delimiters, t.showDelimiters);
4163
+ for (let t of e) n.push(Object.freeze([Hr(t)]));
4164
+ }
4165
+ return Object.freeze(n.length > 0 ? n : [Object.freeze([Hr("")])]);
4166
+ }
4167
+ function Gr(e, t) {
4168
+ let n = e.slice(0, Math.max(0, Math.min(t, e.length)));
4169
+ return Nr(Object.freeze(n.flat()));
4170
+ }
4061
4171
  //#endregion
4062
4172
  //#region src/portrait-layout.ts
4063
- var Nr = Object.freeze([
4173
+ var Kr = Object.freeze([
4064
4174
  "left",
4065
4175
  "right",
4066
4176
  "top-left",
4067
4177
  "top-right",
4068
4178
  "bottom-left",
4069
4179
  "bottom-right"
4070
- ]), Pr = "left", Fr = Object.freeze({
4180
+ ]), qr = "left", Jr = Object.freeze({
4071
4181
  x: 0,
4072
4182
  y: 0,
4073
4183
  zoomPercent: 100
4074
- }), Ir = 0;
4075
- function Lr(e) {
4184
+ }), Yr = 0;
4185
+ function Xr(e) {
4076
4186
  if (typeof e != "string") throw TypeError("Bubble portrait placement must be a string.");
4077
4187
  let t = e.trim().toLowerCase().replaceAll("_", "-");
4078
- if (!Nr.includes(t)) throw TypeError(`Unsupported Bubble portrait placement: ${e}`);
4188
+ if (!Kr.includes(t)) throw TypeError(`Unsupported Bubble portrait placement: ${e}`);
4079
4189
  return t;
4080
4190
  }
4081
- function Rr(e) {
4191
+ function Zr(e) {
4082
4192
  if (!Array.isArray(e) || e.length !== 2 && e.length !== 3) throw TypeError("Bubble portrait offset must be [x, y] or [x, y, zoom].");
4083
4193
  let [t, n, r = 100] = e;
4084
4194
  if (![
@@ -4092,13 +4202,13 @@ function Rr(e) {
4092
4202
  zoomPercent: r
4093
4203
  });
4094
4204
  }
4095
- function zr(e) {
4205
+ function Qr(e) {
4096
4206
  if (typeof e != "number" || !Number.isFinite(e) || e < 0) throw TypeError("Bubble portrait corner radius must be zero or greater.");
4097
4207
  return e;
4098
4208
  }
4099
4209
  //#endregion
4100
4210
  //#region src/scratch-default.ts
4101
- var Br = 330, Vr = 170, Hr = 50, Ur = 4, Wr = 10, Gr = 16, Kr = 12, qr = 14, Jr = 16, Yr = Object.freeze([
4211
+ var $r = 330, ei = 170, ti = 50, ni = 4, ri = 10, ii = 16, ai = 12, oi = 14, si = 16, ci = Object.freeze([
4102
4212
  "placement",
4103
4213
  "maxWidth",
4104
4214
  "textLocale",
@@ -4113,20 +4223,20 @@ var Br = 330, Vr = 170, Hr = 50, Ur = 4, Wr = 10, Gr = 16, Kr = 12, qr = 14, Jr
4113
4223
  "showAnimation",
4114
4224
  "hideAnimation"
4115
4225
  ]);
4116
- function Xr(e) {
4226
+ function li(e) {
4117
4227
  return typeof e == "object" && !!e && !Array.isArray(e);
4118
4228
  }
4119
- function Zr(e) {
4120
- return !Xr(e) || typeof e.textStyle != "string" || e.textStyle.trim() !== "default" ? "custom" : Yr.every((t) => e[t] === void 0) ? "scratch-default" : "custom";
4229
+ function ui(e) {
4230
+ return !li(e) || typeof e.textStyle != "string" || e.textStyle.trim() !== "default" ? "custom" : ci.every((t) => e[t] === void 0) ? "scratch-default" : "custom";
4121
4231
  }
4122
- function Qr(e) {
4123
- return Zr(e) === "scratch-default";
4232
+ function di(e) {
4233
+ return ui(e) === "scratch-default";
4124
4234
  }
4125
- function $r(e) {
4235
+ function fi(e) {
4126
4236
  let t = e;
4127
4237
  return typeof e == "number" && Math.abs(e) >= .01 && e % 1 != 0 && (t = e.toFixed(2)), String(t).slice(0, 330);
4128
4238
  }
4129
- function ei(e) {
4239
+ function pi(e) {
4130
4240
  let t = 0;
4131
4241
  for (let n of e) if (!/\p{Mark}/u.test(n)) {
4132
4242
  if (/\s/u.test(n)) {
@@ -4137,7 +4247,7 @@ function ei(e) {
4137
4247
  }
4138
4248
  return t * 14;
4139
4249
  }
4140
- function ti(e, t = ei) {
4250
+ function mi(e, t = pi) {
4141
4251
  let n = Tr({
4142
4252
  text: e.slice(0, 330),
4143
4253
  maxWidth: 170,
@@ -4146,9 +4256,9 @@ function ti(e, t = ei) {
4146
4256
  try {
4147
4257
  n = t(e);
4148
4258
  } catch {
4149
- return ei(e);
4259
+ return pi(e);
4150
4260
  }
4151
- return Number.isFinite(n) && n >= 0 ? n : ei(e);
4261
+ return Number.isFinite(n) && n >= 0 ? n : pi(e);
4152
4262
  }
4153
4263
  }), r = Object.freeze(n.lines.map((e) => Object.freeze({
4154
4264
  text: e.text,
@@ -4160,7 +4270,7 @@ function ti(e, t = ei) {
4160
4270
  text: r.map((e) => e.text).join("\n")
4161
4271
  });
4162
4272
  }
4163
- function ni(e) {
4273
+ function hi(e) {
4164
4274
  let t = Math.max(1, e.lines.length), n = Math.max(e.maxLineWidth, 50) + 20, r = 16 * t + 20;
4165
4275
  return Object.freeze({
4166
4276
  bodyHeight: r + 4,
@@ -4171,7 +4281,7 @@ function ni(e) {
4171
4281
  width: n + 4
4172
4282
  });
4173
4283
  }
4174
- function ri(e) {
4284
+ function gi(e) {
4175
4285
  let t = -e.stageWidth / 2, n = e.stageWidth / 2, r = e.stageHeight / 2, i = e.pointsLeft;
4176
4286
  !i && e.width + e.bounds.right > n && e.bounds.left - e.width > t ? i = !0 : i && e.bounds.left - e.width < t && e.width + e.bounds.right < n && (i = !1);
4177
4287
  let a = i ? Math.min(n - e.width, Math.max(t, e.bounds.left - e.width)) : Math.max(t, Math.min(n - e.width, e.bounds.right)), o = Math.min(r, e.bounds.bottom + e.height);
@@ -4183,10 +4293,10 @@ function ri(e) {
4183
4293
  top: o
4184
4294
  });
4185
4295
  }
4186
- function ii(e) {
4296
+ function _i(e) {
4187
4297
  return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&apos;");
4188
4298
  }
4189
- function ai(e) {
4299
+ function vi(e) {
4190
4300
  let { paddedHeight: t, paddedWidth: n } = e, r = Math.min(16, n / 2, t / 2);
4191
4301
  return [
4192
4302
  `M ${r} ${t}`,
@@ -4199,16 +4309,16 @@ function ai(e) {
4199
4309
  `Q ${n} ${t} ${n - r} ${t}`
4200
4310
  ].join(" ");
4201
4311
  }
4202
- function oi(e) {
4312
+ function yi(e) {
4203
4313
  let { paddedHeight: t, paddedWidth: n } = e;
4204
- return `<path d="${`${ai(e)} C ${n - 16} ${t + 4} ${n - 12} ${t + 8} ${n - 12} ${t + 10} Q ${n - 12} ${t + 12} ${n - 14} ${t + 12} C ${n - 17} ${t + 12} ${n - 27} ${t + 8} ${n - 32} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/>`;
4314
+ return `<path d="${`${vi(e)} C ${n - 16} ${t + 4} ${n - 12} ${t + 8} ${n - 12} ${t + 10} Q ${n - 12} ${t + 12} ${n - 14} ${t + 12} C ${n - 17} ${t + 12} ${n - 27} ${t + 8} ${n - 32} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/>`;
4205
4315
  }
4206
- function si(e) {
4316
+ function bi(e) {
4207
4317
  let { paddedHeight: t, paddedWidth: n } = e;
4208
- return `<path d="${`${ai(e)} L ${n - 28} ${t} A 4 4 0 0 1 ${n - 36} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/><circle cx="${n - 25.25}" cy="${t + 7.25}" r="2.25" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" paint-order="stroke fill"/><circle cx="${n - 17.5}" cy="${t + 9.5}" r="1.5" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" paint-order="stroke fill"/>`;
4318
+ return `<path d="${`${vi(e)} L ${n - 28} ${t} A 4 4 0 0 1 ${n - 36} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/><circle cx="${n - 25.25}" cy="${t + 7.25}" r="2.25" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" paint-order="stroke fill"/><circle cx="${n - 17.5}" cy="${t + 9.5}" r="1.5" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" paint-order="stroke fill"/>`;
4209
4319
  }
4210
- function ci(e) {
4211
- let t = ni(e.layout), n = e.kind === "say" ? oi(t) : si(t), r = e.pointsLeft ? "translate(2 2)" : `translate(${t.width} 0) scale(-1 1) translate(2 2)`, i = e.layout.lines.map((e, t) => `<text x="12" y="${24.6 + 16 * t}" fill="#575E75" font-family="Helvetica, sans-serif" font-size="14" xml:space="preserve">${ii(e.text)}</text>`).join(""), a = ii(e.title ?? `${e.kind} bubble`);
4320
+ function xi(e) {
4321
+ let t = hi(e.layout), n = e.kind === "say" ? yi(t) : bi(t), r = e.pointsLeft ? "translate(2 2)" : `translate(${t.width} 0) scale(-1 1) translate(2 2)`, i = e.layout.lines.map((e, t) => `<text x="12" y="${24.6 + 16 * t}" fill="#575E75" font-family="Helvetica, sans-serif" font-size="14" xml:space="preserve">${_i(e.text)}</text>`).join(""), a = _i(e.title ?? `${e.kind} bubble`);
4212
4322
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${t.width}" height="${t.height}" viewBox="0 0 ${t.width} ${t.height}" role="img" data-bubble-profile="scratch-default" data-bubble-kind="${e.kind}"><title>${a}</title><g transform="${r}">${n}</g>${i}</svg>`;
4213
4323
  }
4214
4324
  //#endregion
@@ -4218,11 +4328,11 @@ var Q = class extends Error {
4218
4328
  constructor(e, t) {
4219
4329
  super(t), this.name = "BubbleCompositionError", this.code = e;
4220
4330
  }
4221
- }, li = /* @__PURE__ */ new Set(["say", "think"]), ui = /* @__PURE__ */ new Set([
4331
+ }, Si = /* @__PURE__ */ new Set(["say", "think"]), Ci = /* @__PURE__ */ new Set([
4222
4332
  "idle",
4223
4333
  "talking",
4224
4334
  "awaiting-continue"
4225
- ]), di = /* @__PURE__ */ new Set([
4335
+ ]), wi = /* @__PURE__ */ new Set([
4226
4336
  "fadeIn",
4227
4337
  "fadeOut",
4228
4338
  "floatIn",
@@ -4234,7 +4344,7 @@ var Q = class extends Error {
4234
4344
  "shake",
4235
4345
  "explode",
4236
4346
  "animateBubbleShape"
4237
- ]), fi = /* @__PURE__ */ new Set([
4347
+ ]), Ti = /* @__PURE__ */ new Set([
4238
4348
  "linear",
4239
4349
  "easeIn",
4240
4350
  "easeOut",
@@ -4243,45 +4353,45 @@ var Q = class extends Error {
4243
4353
  function $(e) {
4244
4354
  return typeof e == "object" && !!e && !Array.isArray(e);
4245
4355
  }
4246
- function pi(e, t, n, r) {
4356
+ function Ei(e, t, n, r) {
4247
4357
  let i = /* @__PURE__ */ new Set([...t, ...n]), a = t.filter((t) => !Object.prototype.hasOwnProperty.call(e, t)), o = Object.keys(e).filter((e) => !i.has(e));
4248
4358
  if (a.length > 0 || o.length > 0) throw new Q("BUBBLE-COMPOSITION-001", `${r} has missing or unknown properties.`);
4249
4359
  }
4250
- function mi(e, t) {
4360
+ function Di(e, t) {
4251
4361
  if (typeof e != "string" || e.trim().length === 0) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be a non-empty string.`);
4252
4362
  return e.trim();
4253
4363
  }
4254
- function hi(e, t) {
4364
+ function Oi(e, t) {
4255
4365
  if (typeof e != "string" || e.length === 0) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be a non-empty string.`);
4256
4366
  return e;
4257
4367
  }
4258
- function gi(e, t, n) {
4368
+ function ki(e, t, n) {
4259
4369
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be an object.`);
4260
- if (pi(e, ["frames", "frameIntervalSeconds"], [], t), !Array.isArray(e.frames) || e.frames.length < n) throw new Q("BUBBLE-COMPOSITION-001", `${t}.frames must contain at least ${n} image asset name${n === 1 ? "" : "s"}.`);
4261
- let r = Object.freeze(e.frames.map((e, n) => hi(e, `${t}.frames[${n}]`))), i = e.frameIntervalSeconds;
4370
+ if (Ei(e, ["frames", "frameIntervalSeconds"], [], t), !Array.isArray(e.frames) || e.frames.length < n) throw new Q("BUBBLE-COMPOSITION-001", `${t}.frames must contain at least ${n} image asset name${n === 1 ? "" : "s"}.`);
4371
+ let r = Object.freeze(e.frames.map((e, n) => Oi(e, `${t}.frames[${n}]`))), i = e.frameIntervalSeconds;
4262
4372
  if (typeof i != "number" || !Number.isFinite(i) || i <= 0) throw new Q("BUBBLE-COMPOSITION-001", `${t}.frameIntervalSeconds must be a positive finite number.`);
4263
4373
  return Object.freeze({
4264
4374
  frames: r,
4265
4375
  frameIntervalSeconds: i
4266
4376
  });
4267
4377
  }
4268
- function _i(e) {
4378
+ function Ai(e) {
4269
4379
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble portrait must be an object.");
4270
- pi(e, ["base"], [
4380
+ Ei(e, ["base"], [
4271
4381
  "blink",
4272
4382
  "lipSync",
4273
4383
  "placement",
4274
4384
  "offset",
4275
4385
  "cornerRadius"
4276
4386
  ], "Bubble portrait");
4277
- let t = e.blink === void 0 ? void 0 : gi(e.blink, "Bubble portrait blink", 1), n = e.lipSync === void 0 ? void 0 : gi(e.lipSync, "Bubble portrait lip-sync", 1), r, i, a;
4387
+ let t = e.blink === void 0 ? void 0 : ki(e.blink, "Bubble portrait blink", 1), n = e.lipSync === void 0 ? void 0 : ki(e.lipSync, "Bubble portrait lip-sync", 1), r, i, a;
4278
4388
  try {
4279
- r = Lr(e.placement ?? "left"), i = e.offset === void 0 ? Fr : Rr(e.offset), a = zr(e.cornerRadius ?? 0);
4389
+ r = Xr(e.placement ?? "left"), i = e.offset === void 0 ? Jr : Zr(e.offset), a = Qr(e.cornerRadius ?? 0);
4280
4390
  } catch (e) {
4281
4391
  throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble portrait layout is invalid.");
4282
4392
  }
4283
4393
  return Object.freeze({
4284
- base: hi(e.base, "Bubble portrait base"),
4394
+ base: Oi(e.base, "Bubble portrait base"),
4285
4395
  ...t === void 0 ? {} : { blink: t },
4286
4396
  ...n === void 0 ? {} : { lipSync: n },
4287
4397
  placement: r,
@@ -4289,9 +4399,9 @@ function _i(e) {
4289
4399
  cornerRadius: a
4290
4400
  });
4291
4401
  }
4292
- function vi(e, t) {
4402
+ function ji(e, t) {
4293
4403
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be an object.`);
4294
- if (pi(e, ["name"], [
4404
+ if (Ei(e, ["name"], [
4295
4405
  "durationSeconds",
4296
4406
  "ease",
4297
4407
  "direction",
@@ -4299,7 +4409,7 @@ function vi(e, t) {
4299
4409
  "relativeScale",
4300
4410
  "speed",
4301
4411
  "visualStyle"
4302
- ], t), !di.has(e.name)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.name is not a supported Bubble motion.`);
4412
+ ], t), !wi.has(e.name)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.name is not a supported Bubble motion.`);
4303
4413
  let n = (n, r, i = !1) => {
4304
4414
  let a = e[n];
4305
4415
  if (a !== void 0) {
@@ -4309,9 +4419,9 @@ function vi(e, t) {
4309
4419
  }, r = n("durationSeconds", 0), i = n("count", 1, !0), a = n("relativeScale", 0), o = n("speed", 0), s = e.direction;
4310
4420
  if (s !== void 0 && typeof s != "number" && typeof s != "string") throw new Q("BUBBLE-COMPOSITION-001", `${t}.direction is invalid.`);
4311
4421
  let c = e.ease ?? "easeInOut";
4312
- if (typeof c != "string" || !fi.has(c)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.ease is invalid.`);
4422
+ if (typeof c != "string" || !Ti.has(c)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.ease is invalid.`);
4313
4423
  let l = e.visualStyle;
4314
- if (l !== void 0 && (typeof l != "string" || !M.includes(l))) throw new Q("BUBBLE-COMPOSITION-001", `${t}.visualStyle is invalid.`);
4424
+ if (l !== void 0 && (typeof l != "string" || !N.includes(l))) throw new Q("BUBBLE-COMPOSITION-001", `${t}.visualStyle is invalid.`);
4315
4425
  return Object.freeze({
4316
4426
  name: e.name,
4317
4427
  ...r === void 0 ? {} : { durationSeconds: r },
@@ -4323,10 +4433,10 @@ function vi(e, t) {
4323
4433
  ...l === void 0 ? {} : { visualStyle: l }
4324
4434
  });
4325
4435
  }
4326
- function yi(e) {
4436
+ function Mi(e) {
4327
4437
  if (e === void 0) return;
4328
4438
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble audio must be an object.");
4329
- pi(e, [], [
4439
+ Ei(e, [], [
4330
4440
  "voice",
4331
4441
  "reveal",
4332
4442
  "finish"
@@ -4338,13 +4448,13 @@ function yi(e) {
4338
4448
  "finish"
4339
4449
  ]) {
4340
4450
  let r = e[n];
4341
- r !== void 0 && (t[n] = hi(r, `Bubble audio ${n}`));
4451
+ r !== void 0 && (t[n] = Oi(r, `Bubble audio ${n}`));
4342
4452
  }
4343
4453
  return Object.freeze(t);
4344
4454
  }
4345
- function bi(e) {
4455
+ function Ni(e) {
4346
4456
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble style must be an object.");
4347
- pi(e, ["name", "textStyle"], [
4457
+ Ei(e, ["name", "textStyle"], [
4348
4458
  "placement",
4349
4459
  "maxWidth",
4350
4460
  "textLocale",
@@ -4359,13 +4469,13 @@ function bi(e) {
4359
4469
  "showAnimation",
4360
4470
  "hideAnimation"
4361
4471
  ], "Bubble style");
4362
- let t = e.portrait === void 0 ? void 0 : _i(e.portrait), n = e.continueIndicator === void 0 ? void 0 : gi(e.continueIndicator, "Bubble continue indicator", 2), r;
4472
+ let t = e.portrait === void 0 ? void 0 : Ai(e.portrait), n = e.continueIndicator === void 0 ? void 0 : ki(e.continueIndicator, "Bubble continue indicator", 2), r;
4363
4473
  if (e.reveal !== void 0) try {
4364
- r = kr(e.reveal);
4474
+ r = Lr(e.reveal);
4365
4475
  } catch (e) {
4366
4476
  throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble reveal is invalid.");
4367
4477
  }
4368
- let i = yi(e.audio), a = e.showAnimation === void 0 ? void 0 : vi(e.showAnimation, "Bubble showAnimation"), o = e.hideAnimation === void 0 ? void 0 : vi(e.hideAnimation, "Bubble hideAnimation"), s;
4478
+ let i = Mi(e.audio), a = e.showAnimation === void 0 ? void 0 : ji(e.showAnimation, "Bubble showAnimation"), o = e.hideAnimation === void 0 ? void 0 : ji(e.hideAnimation, "Bubble hideAnimation"), s;
4369
4479
  try {
4370
4480
  s = y(e.placement ?? "up-right");
4371
4481
  } catch (e) {
@@ -4378,16 +4488,16 @@ function bi(e) {
4378
4488
  throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble actor-relative transform is invalid.");
4379
4489
  }
4380
4490
  let d = e.visualStyle ?? "NORMAL";
4381
- if (typeof d != "string" || !M.includes(d)) throw new Q("BUBBLE-COMPOSITION-001", `Unsupported Bubble visual style: ${String(d)}`);
4491
+ if (typeof d != "string" || !N.includes(d)) throw new Q("BUBBLE-COMPOSITION-001", `Unsupported Bubble visual style: ${String(d)}`);
4382
4492
  let f;
4383
4493
  if (e.maxWidth !== void 0) {
4384
4494
  if (typeof e.maxWidth != "number" || !Number.isFinite(e.maxWidth) || e.maxWidth <= 0) throw new Q("BUBBLE-COMPOSITION-001", "Bubble style maxWidth must be a positive finite number.");
4385
4495
  f = e.maxWidth;
4386
4496
  }
4387
- let p = e.textLocale === void 0 ? void 0 : mi(e.textLocale, "Bubble style text locale"), m = Zr(e);
4497
+ let p = e.textLocale === void 0 ? void 0 : Di(e.textLocale, "Bubble style text locale"), m = ui(e);
4388
4498
  return Object.freeze({
4389
- name: mi(e.name, "Bubble style name"),
4390
- textStyle: mi(e.textStyle, "Bubble text style name"),
4499
+ name: Di(e.name, "Bubble style name"),
4500
+ textStyle: Di(e.textStyle, "Bubble text style name"),
4391
4501
  layoutProfile: m,
4392
4502
  ...f === void 0 ? {} : { maxWidth: f },
4393
4503
  ...p === void 0 ? {} : { textLocale: p },
@@ -4404,13 +4514,13 @@ function bi(e) {
4404
4514
  ...o === void 0 ? {} : { hideAnimation: o }
4405
4515
  });
4406
4516
  }
4407
- function xi(e) {
4517
+ function Pi(e) {
4408
4518
  if (e !== void 0) {
4409
4519
  if (!$(e) || typeof e.applyToTarget != "function" || typeof e.getMimeType != "function" || typeof e.isRegistered != "function") throw TypeError("Bubble image capability must provide applyToTarget, getMimeType, and isRegistered.");
4410
4520
  return e;
4411
4521
  }
4412
4522
  }
4413
- function Si(e) {
4523
+ function Fi(e) {
4414
4524
  if (e !== void 0) {
4415
4525
  if (!$(e) || typeof e.playSound != "function") throw TypeError("Bubble audio capability must provide playSound.");
4416
4526
  if (e.isRegistered !== void 0 && typeof e.isRegistered != "function") throw TypeError("Bubble audio capability isRegistered must be a function.");
@@ -4418,65 +4528,77 @@ function Si(e) {
4418
4528
  return e;
4419
4529
  }
4420
4530
  }
4421
- function Ci(e) {
4531
+ function Ii(e) {
4422
4532
  if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", "Bubble image assets require an image capability. Provide options.imageResolver.");
4423
4533
  return e;
4424
4534
  }
4425
- function wi(e) {
4535
+ function Li(e) {
4426
4536
  if (!$(e) || typeof e.setText != "function" || typeof e.releaseTarget != "function") throw TypeError("Bubble text capability must provide setText and releaseTarget.");
4427
4537
  return e;
4428
4538
  }
4429
- function Ti() {
4539
+ function Ri() {
4430
4540
  return Object.freeze({
4431
4541
  setTimeout: (e, t) => globalThis.setTimeout(e, t),
4432
4542
  clearTimeout: (e) => globalThis.clearTimeout(e)
4433
4543
  });
4434
4544
  }
4435
- function Ei(e) {
4545
+ function zi(e) {
4436
4546
  if (!$(e) || typeof e.setTimeout != "function" || typeof e.clearTimeout != "function") throw TypeError("Bubble scheduler must provide setTimeout and clearTimeout.");
4437
4547
  return e;
4438
4548
  }
4439
- function Di(e, t) {
4549
+ function Bi(e, t) {
4440
4550
  if (!$(e) || typeof e.id != "string" || e.id.length === 0 || typeof e.isStage != "boolean") throw new Q("BUBBLE-COMPOSITION-004", `${t} must provide id and isStage.`);
4441
4551
  return e;
4442
4552
  }
4443
- function Oi(e) {
4553
+ function Vi(e) {
4444
4554
  if (typeof e != "object" || !e) throw new Q("BUBBLE-COMPOSITION-004", "Bubble text target must be a non-null object.");
4445
4555
  return e;
4446
4556
  }
4447
- function ki(e, t) {
4557
+ function Hi(e, t) {
4448
4558
  if (!$(e) || !$(e.targets) || typeof e.setLayerVisible != "function" || typeof e.updateStyle != "function" || typeof e.show != "function" || typeof e.hide != "function" || typeof e.dispose != "function") throw new Q("BUBBLE-COMPOSITION-004", "Bubble surface is invalid.");
4449
4559
  let n = e.targets;
4450
- Oi(n.text);
4560
+ Vi(n.text);
4451
4561
  let r = /* @__PURE__ */ new Set(), i = (e, t) => {
4452
4562
  let i = n[e];
4453
4563
  if (!t && i === void 0) return;
4454
- let a = Di(i, `Bubble surface ${e}`);
4564
+ let a = Bi(i, `Bubble surface ${e}`);
4455
4565
  if (r.has(a.id)) throw new Q("BUBBLE-COMPOSITION-004", "Bubble image layers must use distinct target IDs.");
4456
4566
  r.add(a.id);
4457
4567
  };
4458
4568
  return i("portraitBase", t.portrait !== void 0), i("portraitBlink", t.portrait?.blink !== void 0), i("portraitLipSync", t.portrait?.lipSync !== void 0), i("continueIndicator", t.continueIndicator !== void 0), e;
4459
4569
  }
4460
- function Ai(e, t) {
4570
+ function Ui(e, t) {
4461
4571
  if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", `Bubble image capability is required for: ${t}. Provide options.imageResolver.`);
4462
4572
  if (!e.isRegistered(t)) throw new Q("BUBBLE-COMPOSITION-003", `Bubble image asset is not registered: ${t}`);
4463
4573
  if (!e.getMimeType(t).startsWith("image/")) throw new Q("BUBBLE-COMPOSITION-003", `Bubble asset is not an image: ${t}`);
4464
4574
  }
4465
- function ji(e, t) {
4575
+ function Wi(e, t) {
4466
4576
  if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", `Bubble audio assets require an audio capability: ${t}. Provide options.audio.`);
4467
4577
  if (e.isRegistered?.(t) === !1) throw new Q("BUBBLE-COMPOSITION-003", `Bubble audio asset is not registered: ${t}`);
4468
4578
  let n = e.getMimeType?.(t);
4469
4579
  if (n !== void 0 && !n.startsWith("audio/")) throw new Q("BUBBLE-COMPOSITION-003", `Bubble asset is not audio: ${t}`);
4470
4580
  }
4471
- function Mi(e) {
4581
+ function Gi(e) {
4472
4582
  return [...e.portrait === void 0 ? [] : [
4473
4583
  e.portrait.base,
4474
4584
  ...e.portrait.blink?.frames ?? [],
4475
4585
  ...e.portrait.lipSync?.frames ?? []
4476
4586
  ], ...e.continueIndicator?.frames ?? []];
4477
4587
  }
4478
- function Ni(e, t, n) {
4479
- if (t.layoutProfile === "scratch-default") return ti(e, (e) => typeof n.measureText == "function" ? n.measureText({
4588
+ function Ki(e) {
4589
+ let t = e.setRichText;
4590
+ if (typeof t != "function") throw new Q("BUBBLE-COMPOSITION-007", "Bubble ruby content requires the text capability setRichText method.");
4591
+ return t;
4592
+ }
4593
+ function qi(e, t, n, r) {
4594
+ return !Ar(e) && typeof r.splitRichText == "function" ? r.splitRichText({
4595
+ reveal: t,
4596
+ runs: e,
4597
+ styleName: n
4598
+ }) : Wr(e, t);
4599
+ }
4600
+ function Ji(e, t, n) {
4601
+ if (t.layoutProfile === "scratch-default") return mi(e, (e) => typeof n.measureText == "function" ? n.measureText({
4480
4602
  styleName: t.textStyle,
4481
4603
  text: e
4482
4604
  }) : NaN).text;
@@ -4492,11 +4614,11 @@ function Ni(e, t, n) {
4492
4614
  }) ?? 0
4493
4615
  }).lines.map(({ text: e }) => e).join("\n");
4494
4616
  }
4495
- function Pi(e, t) {
4617
+ function Yi(e, t) {
4496
4618
  if (e.length === 1) throw e[0];
4497
4619
  if (e.length > 1) throw AggregateError(e, t);
4498
4620
  }
4499
- function Fi(e) {
4621
+ function Xi(e) {
4500
4622
  let t = !1, n = 0, r = 0, i, a = Promise.resolve(), o = async (t) => {
4501
4623
  let n = e.animation.frames[t];
4502
4624
  n !== void 0 && await e.imageResolver.applyToTarget(n, e.target);
@@ -4531,40 +4653,45 @@ function Fi(e) {
4531
4653
  }
4532
4654
  });
4533
4655
  }
4534
- function Ii(e) {
4656
+ function Zi(e) {
4535
4657
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Show bubble input must be an object.");
4536
- if (pi(e, [
4658
+ if (Ei(e, [
4537
4659
  "actor",
4538
4660
  "actorKey",
4539
4661
  "kind",
4540
4662
  "text",
4541
4663
  "styleName"
4542
- ], ["animationMode", "reveal"], "Show bubble input"), !li.has(e.kind)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble kind must be say or think.");
4543
- if (typeof e.text != "string") throw new Q("BUBBLE-COMPOSITION-001", "Bubble text must be a string.");
4544
- let t = e.animationMode ?? "talking";
4545
- if (!ui.has(t)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid.");
4546
- let n;
4664
+ ], ["animationMode", "reveal"], "Show bubble input"), !Si.has(e.kind)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble kind must be say or think.");
4665
+ let t;
4666
+ try {
4667
+ t = kr(e.text);
4668
+ } catch (e) {
4669
+ throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble text is invalid.");
4670
+ }
4671
+ let n = e.animationMode ?? "talking";
4672
+ if (!Ci.has(n)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid.");
4673
+ let r;
4547
4674
  if (e.reveal !== void 0) try {
4548
- n = kr(e.reveal);
4675
+ r = Lr(e.reveal);
4549
4676
  } catch (e) {
4550
4677
  throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble reveal is invalid.");
4551
4678
  }
4552
4679
  return {
4553
4680
  actor: e.actor,
4554
- actorKey: mi(e.actorKey, "Bubble actor key"),
4681
+ actorKey: Di(e.actorKey, "Bubble actor key"),
4555
4682
  kind: e.kind,
4556
- text: e.text,
4557
- styleName: mi(e.styleName, "Bubble style name"),
4558
- animationMode: t,
4559
- ...n === void 0 ? {} : { reveal: n }
4683
+ content: t,
4684
+ styleName: Di(e.styleName, "Bubble style name"),
4685
+ animationMode: n,
4686
+ ...r === void 0 ? {} : { reveal: r }
4560
4687
  };
4561
4688
  }
4562
- function Li(e) {
4689
+ function Qi(e) {
4563
4690
  if (!$(e)) throw TypeError("Bubble composition options must be an object.");
4564
- let t = xi(e.imageResolver), n = Si(e.audio), r = wi(e.textCapability);
4691
+ let t = Pi(e.imageResolver), n = Fi(e.audio), r = Li(e.textCapability);
4565
4692
  if (typeof e.createSurface != "function") throw TypeError("Bubble composition createSurface must be a function.");
4566
4693
  if (e.onAnimationError !== void 0 && typeof e.onAnimationError != "function") throw TypeError("Bubble composition onAnimationError must be a function.");
4567
- let i = Ei(e.scheduler ?? Ti()), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = !1, l = () => {
4694
+ let i = zi(e.scheduler ?? Ri()), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = !1, l = () => {
4568
4695
  if (c) throw new Q("BUBBLE-COMPOSITION-005", "Bubble composition has been disposed.");
4569
4696
  }, u = async (e, t) => {
4570
4697
  let n = (s.get(e) ?? Promise.resolve()).catch(() => void 0).then(t);
@@ -4584,9 +4711,9 @@ function Li(e) {
4584
4711
  layoutProfile: "custom",
4585
4712
  reveal: s.reveal
4586
4713
  }));
4587
- let d = s.text, f = (e) => {
4588
- let n = new Set(Mi(e)), r = n.size === 0 ? void 0 : Ci(t);
4589
- for (let e of n) Ai(r, e);
4714
+ let d = s.content, f = (e) => {
4715
+ let n = new Set(Gi(e)), r = n.size === 0 ? void 0 : Ii(t);
4716
+ for (let e of n) Ui(r, e);
4590
4717
  return r;
4591
4718
  }, p = f(u);
4592
4719
  for (let e of [
@@ -4594,13 +4721,13 @@ function Li(e) {
4594
4721
  u.audio?.reveal,
4595
4722
  u.audio?.finish,
4596
4723
  u.reveal?.sound
4597
- ]) e !== void 0 && ji(n, e);
4724
+ ]) e !== void 0 && Wi(n, e);
4598
4725
  let m = async (e, t = !1) => {
4599
4726
  e !== void 0 && n !== void 0 && await n.playSound(e, { untilDone: t });
4600
4727
  }, h = async (e, t, n) => {
4601
- let r = Mi(e).length === 0 ? void 0 : Ci(t), i = [];
4728
+ let r = Gi(e).length === 0 ? void 0 : Ii(t), i = [];
4602
4729
  if (e.portrait) {
4603
- let t = Ci(r);
4730
+ let t = Ii(r);
4604
4731
  i.push(Promise.resolve(t.applyToTarget(e.portrait.base, n.targets.portraitBase)));
4605
4732
  let a = e.portrait.blink?.frames[0];
4606
4733
  a !== void 0 && i.push(Promise.resolve(t.applyToTarget(a, n.targets.portraitBlink)));
@@ -4609,169 +4736,176 @@ function Li(e) {
4609
4736
  }
4610
4737
  let a = e.continueIndicator?.frames[0];
4611
4738
  if (a !== void 0) {
4612
- let e = Ci(r);
4739
+ let e = Ii(r);
4613
4740
  i.push(Promise.resolve(e.applyToTarget(a, n.targets.continueIndicator)));
4614
4741
  }
4615
4742
  await Promise.all(i);
4616
4743
  }, g = (t, n, r) => {
4617
- x = t.portrait?.blink === void 0 ? void 0 : Fi({
4744
+ x = t.portrait?.blink === void 0 ? void 0 : Xi({
4618
4745
  actorKey: s.actorKey,
4619
4746
  layer: "portraitBlink",
4620
4747
  animation: t.portrait.blink,
4621
4748
  target: r.targets.portraitBlink,
4622
- imageResolver: Ci(n),
4749
+ imageResolver: Ii(n),
4623
4750
  scheduler: i,
4624
4751
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4625
- }), S = t.portrait?.lipSync === void 0 ? void 0 : Fi({
4752
+ }), S = t.portrait?.lipSync === void 0 ? void 0 : Xi({
4626
4753
  actorKey: s.actorKey,
4627
4754
  layer: "portraitLipSync",
4628
4755
  animation: t.portrait.lipSync,
4629
4756
  target: r.targets.portraitLipSync,
4630
- imageResolver: Ci(n),
4757
+ imageResolver: Ii(n),
4631
4758
  scheduler: i,
4632
4759
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4633
- }), C = t.continueIndicator === void 0 ? void 0 : Fi({
4760
+ }), C = t.continueIndicator === void 0 ? void 0 : Xi({
4634
4761
  actorKey: s.actorKey,
4635
4762
  layer: "continueIndicator",
4636
4763
  animation: t.continueIndicator,
4637
4764
  target: r.targets.continueIndicator,
4638
- imageResolver: Ci(n),
4765
+ imageResolver: Ii(n),
4639
4766
  scheduler: i,
4640
4767
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4641
4768
  });
4642
4769
  }, _ = o.get(s.actorKey);
4643
4770
  _ && await _.close();
4644
- let v, y = !1, b = !1, x, S, C, w = u.reveal, T = w ? jr(s.text, w) : Object.freeze([s.text]), E = w ? Math.min(1, T.length) : 1, D, ee = 0;
4771
+ let v, y = !1, b = !1, x, S, C, w = u.reveal, T = w ? qi(s.content, w, u.textStyle, r) : Object.freeze([s.content]), E = w ? Math.min(1, T.length) : 1, D, ee = 0;
4645
4772
  try {
4646
- v = ki(await e.createSurface(Object.freeze({
4773
+ v = Hi(await e.createSurface(Object.freeze({
4647
4774
  actor: s.actor,
4648
4775
  actorKey: s.actorKey,
4649
4776
  kind: s.kind,
4650
4777
  style: u
4651
4778
  })), u);
4652
- let t = async (e, t = u) => {
4653
- if (t.layoutProfile === "scratch-default" && v?.renderScratchText) {
4654
- let n = ti(e, (e) => typeof r.measureText == "function" ? r.measureText({
4655
- styleName: t.textStyle,
4779
+ let t = (e, t, n) => {
4780
+ Ki(r)({
4781
+ runs: e,
4782
+ styleName: t.textStyle,
4783
+ target: n,
4784
+ ...t.maxWidth === void 0 ? {} : { maxWidth: t.maxWidth }
4785
+ }), y = !0;
4786
+ }, a = () => !Ar(d), c = async (e, n = u) => {
4787
+ if (a()) {
4788
+ if (!v) return;
4789
+ if (n.layoutProfile === "scratch-default" && v.renderScratchText) throw new Q("BUBBLE-COMPOSITION-007", "Bubble ruby content requires a rich text capability; the scratch-default surface renders plain text only.");
4790
+ t(e, n, v.targets.text);
4791
+ return;
4792
+ }
4793
+ let i = jr(e);
4794
+ if (n.layoutProfile === "scratch-default" && v?.renderScratchText) {
4795
+ let e = mi(i, (e) => typeof r.measureText == "function" ? r.measureText({
4796
+ styleName: n.textStyle,
4656
4797
  text: e
4657
4798
  }) : NaN);
4658
- await v.renderScratchText(n);
4799
+ await v.renderScratchText(e);
4659
4800
  return;
4660
4801
  }
4661
4802
  v && (r.setText({
4662
- styleName: t.textStyle,
4803
+ styleName: n.textStyle,
4663
4804
  target: v.targets.text,
4664
- text: Ni(e, t, r)
4805
+ text: Ji(i, n, r)
4665
4806
  }), y = !0);
4666
- };
4667
- if (w?.layout === "RESERVED") {
4668
- let e = Ni(s.text, u, r);
4669
- r.setText({
4670
- styleName: u.textStyle,
4807
+ }, l = (e, n = u) => {
4808
+ v && (a() ? t(e, n, v.targets.text) : (r.setText({
4809
+ styleName: n.textStyle,
4671
4810
  target: v.targets.text,
4672
- text: e
4673
- }), y = !0, v.captureTextLayout?.();
4674
- }
4675
- await t(w ? Mr(T, E) : s.text), await h(u, p, v), g(u, p, v);
4676
- let a = "idle", c = !1, l = Promise.resolve(), _ = async () => {
4811
+ text: Ji(jr(e), n, r)
4812
+ }), y = !0), v.captureTextLayout?.());
4813
+ };
4814
+ w?.layout === "RESERVED" && l(s.content), await c(w ? Gr(T, E) : s.content), await h(u, p, v), g(u, p, v);
4815
+ let _ = "idle", O = !1, k = Promise.resolve(), te = async () => {
4677
4816
  if (!v) return;
4678
- let e = w ? Mr(T, E) : d;
4679
- await t(e), await v.show();
4680
- }, O = () => {
4817
+ let e = w ? Gr(T, E) : d;
4818
+ await c(e), await v.show();
4819
+ }, A = () => {
4681
4820
  ee += 1, D !== void 0 && i.clearTimeout(D), D = void 0;
4682
- }, te = async () => !w || E >= T.length ? !1 : (E += 1, await _(), await m(w.sound ?? u.audio?.reveal), E >= T.length && O(), !0), k = () => {
4821
+ }, j = async () => !w || E >= T.length ? !1 : (E += 1, await te(), await m(w.sound ?? u.audio?.reveal), E >= T.length && A(), !0), M = () => {
4683
4822
  if (!w || w.intervalSeconds <= 0 || E >= T.length) return;
4684
4823
  let e = ee;
4685
4824
  D = i.setTimeout(() => {
4686
- D = void 0, !(c || e !== ee) && (l = l.then(() => te()).then(() => k()));
4825
+ D = void 0, !(O || e !== ee) && (k = k.then(() => j()).then(() => M()));
4687
4826
  }, w.intervalSeconds * 1e3);
4688
- }, A = async (e) => {
4689
- e !== a && (e === "talking" ? (await C?.stop(), await v?.setLayerVisible("continueIndicator", !1), await v?.setLayerVisible("portraitLipSync", S !== void 0), await S?.start({ primed: !0 })) : e === "awaiting-continue" ? (await S?.stop({ reset: !0 }), await v?.setLayerVisible("portraitLipSync", !1), await v?.setLayerVisible("continueIndicator", C !== void 0), await C?.start({ primed: !0 })) : (await Promise.all([S?.stop({ reset: !0 }), C?.stop()]), await Promise.all([v?.setLayerVisible("portraitLipSync", !1), v?.setLayerVisible("continueIndicator", !1)])), a = e);
4827
+ }, N = async (e) => {
4828
+ e !== _ && (e === "talking" ? (await C?.stop(), await v?.setLayerVisible("continueIndicator", !1), await v?.setLayerVisible("portraitLipSync", S !== void 0), await S?.start({ primed: !0 })) : e === "awaiting-continue" ? (await S?.stop({ reset: !0 }), await v?.setLayerVisible("portraitLipSync", !1), await v?.setLayerVisible("continueIndicator", C !== void 0), await C?.start({ primed: !0 })) : (await Promise.all([S?.stop({ reset: !0 }), C?.stop()]), await Promise.all([v?.setLayerVisible("portraitLipSync", !1), v?.setLayerVisible("continueIndicator", !1)])), _ = e);
4690
4829
  };
4691
4830
  await Promise.all([
4692
4831
  v.setLayerVisible("portraitBase", u.portrait !== void 0),
4693
4832
  v.setLayerVisible("portraitBlink", u.portrait?.blink !== void 0),
4694
4833
  v.setLayerVisible("portraitLipSync", !1),
4695
4834
  v.setLayerVisible("continueIndicator", !1)
4696
- ]), await v.show(), b = !0, await m(u.audio?.voice), w !== void 0 && await m(w.sound ?? u.audio?.reveal), await x?.start({ primed: !0 }), await A(s.animationMode);
4697
- let j = Object.freeze({
4835
+ ]), await v.show(), b = !0, await m(u.audio?.voice), w !== void 0 && await m(w.sound ?? u.audio?.reveal), await x?.start({ primed: !0 }), await N(s.animationMode);
4836
+ let ne = Object.freeze({
4698
4837
  actorKey: s.actorKey,
4699
4838
  kind: s.kind,
4700
4839
  get animationMode() {
4701
- return a;
4840
+ return _;
4702
4841
  },
4703
4842
  setText(e) {
4704
- return c ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : typeof e == "string" ? (l = l.then(async () => {
4705
- v && (O(), d = e, w ? (T = jr(e, w), E = Math.min(1, T.length), w.layout === "RESERVED" && (r.setText({
4706
- styleName: u.textStyle,
4707
- target: v.targets.text,
4708
- text: Ni(e, u, r)
4709
- }), y = !0, v.captureTextLayout?.()), await _(), k()) : await _());
4710
- }), l) : Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble text must be a string."));
4843
+ if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4844
+ let t;
4845
+ try {
4846
+ t = kr(e);
4847
+ } catch (e) {
4848
+ return Promise.reject(new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble text is invalid."));
4849
+ }
4850
+ return k = k.then(async () => {
4851
+ v && (A(), d = t, w ? (T = qi(t, w, u.textStyle, r), E = Math.min(1, T.length), w.layout === "RESERVED" && l(t), await te(), M()) : await te());
4852
+ }), k;
4711
4853
  },
4712
4854
  updateStyle(e) {
4713
- if (c) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4714
- let i;
4855
+ if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4856
+ let t;
4715
4857
  try {
4716
- i = bi(e);
4858
+ t = Ni(e);
4717
4859
  } catch (e) {
4718
4860
  return Promise.reject(e);
4719
4861
  }
4720
- return l = l.then(async () => {
4862
+ return k = k.then(async () => {
4721
4863
  if (!v) return;
4722
- ki(v, i);
4723
- let e = f(i);
4864
+ Hi(v, t);
4865
+ let e = f(t);
4724
4866
  for (let e of [
4725
- i.audio?.voice,
4726
- i.audio?.reveal,
4727
- i.audio?.finish,
4728
- i.reveal?.sound
4729
- ]) e !== void 0 && ji(n, e);
4867
+ t.audio?.voice,
4868
+ t.audio?.reveal,
4869
+ t.audio?.finish,
4870
+ t.reveal?.sound
4871
+ ]) e !== void 0 && Wi(n, e);
4730
4872
  await Promise.all([
4731
4873
  x?.stop(),
4732
4874
  S?.stop(),
4733
4875
  C?.stop()
4734
- ]), await h(i, e, v), await v.updateStyle(i), u = i, w = i.reveal, T = w ? jr(d, w) : Object.freeze([d]), E = w ? Math.min(1, T.length) : 1, O(), w?.layout === "RESERVED" && (r.setText({
4735
- styleName: i.textStyle,
4736
- target: v.targets.text,
4737
- text: Ni(d, i, r)
4738
- }), y = !0, v.captureTextLayout?.()), await t(d, i), g(i, e, v), await Promise.all([
4739
- v.setLayerVisible("portraitBase", i.portrait !== void 0),
4740
- v.setLayerVisible("portraitBlink", i.portrait?.blink !== void 0),
4876
+ ]), await h(t, e, v), await v.updateStyle(t), u = t, w = t.reveal, T = w ? qi(d, w, t.textStyle, r) : Object.freeze([d]), E = w ? Math.min(1, T.length) : 1, A(), w?.layout === "RESERVED" && l(d, t), await c(d, t), g(t, e, v), await Promise.all([
4877
+ v.setLayerVisible("portraitBase", t.portrait !== void 0),
4878
+ v.setLayerVisible("portraitBlink", t.portrait?.blink !== void 0),
4741
4879
  v.setLayerVisible("portraitLipSync", !1),
4742
4880
  v.setLayerVisible("continueIndicator", !1)
4743
4881
  ]);
4744
- let o = a;
4745
- a = "idle", await x?.start({ primed: !0 }), await A(o), await _(), k(), await m(u.audio?.voice);
4746
- }), l;
4882
+ let i = _;
4883
+ _ = "idle", await x?.start({ primed: !0 }), await N(i), await te(), M(), await m(u.audio?.voice);
4884
+ }), k;
4747
4885
  },
4748
4886
  setAnimationMode(e) {
4749
- return c ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : ui.has(e) ? (l = l.then(() => A(e)), l) : Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid."));
4887
+ return O ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : Ci.has(e) ? (k = k.then(() => N(e)), k) : Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid."));
4750
4888
  },
4751
4889
  revealNext() {
4752
- if (c) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4890
+ if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4753
4891
  let e = !1;
4754
- return l = l.then(async () => {
4755
- e = await te(), e && k();
4756
- }), l.then(() => e);
4892
+ return k = k.then(async () => {
4893
+ e = await j(), e && M();
4894
+ }), k.then(() => e);
4757
4895
  },
4758
4896
  revealAll() {
4759
- return c ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : (l = l.then(async () => {
4760
- if (O(), w) for (; await te(););
4761
- }), l);
4897
+ return O ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : (k = k.then(async () => {
4898
+ if (A(), w) for (; await j(););
4899
+ }), k);
4762
4900
  },
4763
4901
  finish(e = {}) {
4764
- if (c) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4902
+ if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4765
4903
  let t = e.timeoutSeconds ?? 0;
4766
- return !Number.isFinite(t) || t < 0 ? Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble finish timeoutSeconds must be zero or greater.")) : e.condition !== void 0 && typeof e.condition != "function" ? Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble finish condition must be a function.")) : (l = l.then(async () => {
4767
- if (O(), e.unit !== void 0 && (w = kr({
4904
+ return !Number.isFinite(t) || t < 0 ? Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble finish timeoutSeconds must be zero or greater.")) : e.condition !== void 0 && typeof e.condition != "function" ? Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble finish condition must be a function.")) : (k = k.then(async () => {
4905
+ if (A(), e.unit !== void 0 && (w = Lr({
4768
4906
  ...w ?? {},
4769
4907
  unit: e.unit
4770
- }), T = jr(d, w), E = Math.min(1, T.length), w.layout === "RESERVED" && v && (r.setText({
4771
- styleName: u.textStyle,
4772
- target: v.targets.text,
4773
- text: Ni(d, u, r)
4774
- }), y = !0, v.captureTextLayout?.())), w) for (; await te(););
4908
+ }), T = qi(d, w, u.textStyle, r), E = Math.min(1, T.length), w.layout === "RESERVED" && v && l(d)), w) for (; await j(););
4775
4909
  let n = e.condition;
4776
4910
  if (n === void 0 && t === 0) {
4777
4911
  await m(u.audio?.finish);
@@ -4798,38 +4932,38 @@ function Li(e) {
4798
4932
  };
4799
4933
  l();
4800
4934
  });
4801
- }), l);
4935
+ }), k);
4802
4936
  },
4803
4937
  animate(e) {
4804
- if (c) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4805
- let n;
4938
+ if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4939
+ let t;
4806
4940
  try {
4807
- n = vi(e, "Bubble motion");
4941
+ t = ji(e, "Bubble motion");
4808
4942
  } catch (e) {
4809
4943
  return Promise.reject(e);
4810
4944
  }
4811
- return l = l.then(async () => {
4812
- if (n.name === "animateBubbleShape" && n.visualStyle) {
4945
+ return k = k.then(async () => {
4946
+ if (t.name === "animateBubbleShape" && t.visualStyle) {
4813
4947
  let e = Object.freeze({
4814
4948
  ...u,
4815
4949
  layoutProfile: "custom"
4816
- }), r = Object.freeze({
4950
+ }), n = Object.freeze({
4817
4951
  ...e,
4818
- visualStyle: n.visualStyle
4952
+ visualStyle: t.visualStyle
4819
4953
  });
4820
- u.layoutProfile === "scratch-default" && (await v?.updateStyle(e), await t(d, e), await v?.show()), await v?.animate?.(n), u = r, await v?.updateStyle(u);
4954
+ u.layoutProfile === "scratch-default" && (await v?.updateStyle(e), await c(d, e), await v?.show()), await v?.animate?.(t), u = n, await v?.updateStyle(u);
4821
4955
  return;
4822
4956
  }
4823
- await v?.animate?.(n);
4824
- }), l;
4957
+ await v?.animate?.(t);
4958
+ }), k;
4825
4959
  },
4826
4960
  async close() {
4827
- if (c) return;
4828
- c = !0;
4961
+ if (O) return;
4962
+ O = !0;
4829
4963
  let e = [];
4830
- O();
4964
+ A();
4831
4965
  try {
4832
- await l;
4966
+ await k;
4833
4967
  } catch (t) {
4834
4968
  e.push(t);
4835
4969
  }
@@ -4850,10 +4984,10 @@ function Li(e) {
4850
4984
  } catch (t) {
4851
4985
  e.push(t);
4852
4986
  }
4853
- o.get(s.actorKey) === j && o.delete(s.actorKey), Pi(e, `Failed to close bubble: ${s.actorKey}`);
4987
+ o.get(s.actorKey) === ne && o.delete(s.actorKey), Yi(e, `Failed to close bubble: ${s.actorKey}`);
4854
4988
  }
4855
4989
  });
4856
- return o.set(s.actorKey, j), k(), u.showAnimation !== void 0 && await j.animate(u.showAnimation), j;
4990
+ return o.set(s.actorKey, ne), M(), u.showAnimation !== void 0 && await ne.animate(u.showAnimation), ne;
4857
4991
  } catch (e) {
4858
4992
  o.delete(s.actorKey);
4859
4993
  let t = [], n = await Promise.allSettled([
@@ -4882,34 +5016,34 @@ function Li(e) {
4882
5016
  return Object.freeze({
4883
5017
  defineStyle(e) {
4884
5018
  l();
4885
- let t = bi(e);
5019
+ let t = Ni(e);
4886
5020
  a.set(t.name, t);
4887
5021
  },
4888
5022
  hasActiveBubble(e) {
4889
- return o.has(mi(e, "Bubble actor key"));
5023
+ return o.has(Di(e, "Bubble actor key"));
4890
5024
  },
4891
5025
  async show(e) {
4892
5026
  l();
4893
- let t = Ii(e);
5027
+ let t = Zi(e);
4894
5028
  return u(t.actorKey, () => d(t));
4895
5029
  },
4896
5030
  releaseTarget(e) {
4897
5031
  l();
4898
- let t = mi(e, "Bubble actor key");
5032
+ let t = Di(e, "Bubble actor key");
4899
5033
  return u(t, async () => {
4900
5034
  await o.get(t)?.close();
4901
5035
  });
4902
5036
  },
4903
5037
  async releaseAll() {
4904
- l(), await Promise.allSettled([...s.values()]), Pi((await Promise.allSettled([...o.values()].map((e) => e.close()))).flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to release all bubbles");
5038
+ l(), await Promise.allSettled([...s.values()]), Yi((await Promise.allSettled([...o.values()].map((e) => e.close()))).flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to release all bubbles");
4905
5039
  },
4906
5040
  async dispose() {
4907
5041
  if (c) return;
4908
5042
  c = !0, await Promise.allSettled([...s.values()]);
4909
5043
  let e = await Promise.allSettled([...o.values()].map((e) => e.close()));
4910
- a.clear(), Pi(e.flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to dispose bubble composition");
5044
+ a.clear(), Yi(e.flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to dispose bubble composition");
4911
5045
  }
4912
5046
  });
4913
5047
  }
4914
5048
  //#endregion
4915
- export { Q as BubbleCompositionError, vr as UnicodeLineBreakProvider, ee as actorRelativeBubbleCenter, d as bubbleBackgroundRegions, Te as bubbleBodyCenterOffset, u as bubbleDirectionAliases, l as bubbleDirectionNames, Zr as bubbleLayoutProfileForStyleInput, Nr as bubblePortraitPlacements, Er as bubbleRevealUnits, M as bubbleVisualStyles, Li as createBubbleComposition, x as defaultBubbleDistance, C as defaultBubbleOffset, f as defaultBubblePlacementInput, Ir as defaultBubblePortraitCornerRadius, Fr as defaultBubblePortraitOffset, Pr as defaultBubblePortraitPlacement, S as defaultBubbleTailLength, $r as formatScratchBubbleArgument, Qr as isScratchDefaultBubbleStyleInput, ti as layoutScratchBubbleText, T as normalizeBubbleDistance, D as normalizeBubbleOffset, y as normalizeBubblePlacement, zr as normalizeBubblePortraitCornerRadius, Rr as normalizeBubblePortraitOffset, Lr as normalizeBubblePortraitPlacement, kr as normalizeBubbleReveal, E as normalizeBubbleTailLength, ri as positionScratchBubble, De as renderBubbleSvg, ci as renderScratchBubbleSvg, Mr as revealedBubbleText, Gr as scratchBubbleCornerRadius, qr as scratchBubbleFontSize, Jr as scratchBubbleLineHeight, Vr as scratchBubbleMaximumLineWidth, ni as scratchBubbleMetrics, Hr as scratchBubbleMinimumTextWidth, Wr as scratchBubblePadding, Ur as scratchBubbleStrokeWidth, Kr as scratchBubbleTailHeight, Br as scratchBubbleTextLimit, jr as splitBubbleText, Tr as wrapText };
5049
+ export { Q as BubbleCompositionError, vr as UnicodeLineBreakProvider, ee as actorRelativeBubbleCenter, d as bubbleBackgroundRegions, we as bubbleBodyCenterOffset, jr as bubbleContentPlainText, Mr as bubbleContentReadingText, u as bubbleDirectionAliases, l as bubbleDirectionNames, ui as bubbleLayoutProfileForStyleInput, Kr as bubblePortraitPlacements, Pr as bubbleRevealUnits, N as bubbleVisualStyles, Qi as createBubbleComposition, x as defaultBubbleDistance, C as defaultBubbleOffset, f as defaultBubblePlacementInput, Yr as defaultBubblePortraitCornerRadius, Jr as defaultBubblePortraitOffset, qr as defaultBubblePortraitPlacement, S as defaultBubbleTailLength, fi as formatScratchBubbleArgument, Ar as isPlainBubbleContent, di as isScratchDefaultBubbleStyleInput, mi as layoutScratchBubbleText, Nr as mergeBubbleContent, kr as normalizeBubbleContent, T as normalizeBubbleDistance, D as normalizeBubbleOffset, y as normalizeBubblePlacement, Qr as normalizeBubblePortraitCornerRadius, Zr as normalizeBubblePortraitOffset, Xr as normalizeBubblePortraitPlacement, Lr as normalizeBubbleReveal, E as normalizeBubbleTailLength, gi as positionScratchBubble, Ee as renderBubbleSvg, xi as renderScratchBubbleSvg, Gr as revealedBubbleContent, Br as revealedBubbleText, ii as scratchBubbleCornerRadius, oi as scratchBubbleFontSize, si as scratchBubbleLineHeight, ei as scratchBubbleMaximumLineWidth, hi as scratchBubbleMetrics, ti as scratchBubbleMinimumTextWidth, ri as scratchBubblePadding, ni as scratchBubbleStrokeWidth, ai as scratchBubbleTailHeight, $r as scratchBubbleTextLimit, Wr as splitBubbleContent, zr as splitBubbleText, Tr as wrapText };