@mlightcad/mtext-renderer 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  var jh = (n, e) => () => (e || n((e = { exports: {} }).exports, e), e.exports);
2
- var Kd = jh((O) => {
2
+ var t1 = jh((O) => {
3
3
  /**
4
4
  * @license
5
5
  * Copyright 2010-2024 Three.js Authors
@@ -1168,9 +1168,9 @@ var Kd = jh((O) => {
1168
1168
  yield this._x, yield this._y, yield this._z, yield this._w;
1169
1169
  }
1170
1170
  }
1171
- class M {
1171
+ class A {
1172
1172
  constructor(e = 0, t = 0, r = 0) {
1173
- M.prototype.isVector3 = !0, this.x = e, this.y = t, this.z = r;
1173
+ A.prototype.isVector3 = !0, this.x = e, this.y = t, this.z = r;
1174
1174
  }
1175
1175
  set(e, t, r) {
1176
1176
  return r === void 0 && (r = this.z), this.x = e, this.y = t, this.z = r, this;
@@ -1435,9 +1435,9 @@ var Kd = jh((O) => {
1435
1435
  yield this.x, yield this.y, yield this.z;
1436
1436
  }
1437
1437
  }
1438
- const ii = /* @__PURE__ */ new M(), $s = /* @__PURE__ */ new Bt();
1439
- class Le {
1440
- constructor(e = new M(1 / 0, 1 / 0, 1 / 0), t = new M(-1 / 0, -1 / 0, -1 / 0)) {
1438
+ const ii = /* @__PURE__ */ new A(), $s = /* @__PURE__ */ new Bt();
1439
+ class Ae {
1440
+ constructor(e = new A(1 / 0, 1 / 0, 1 / 0), t = new A(-1 / 0, -1 / 0, -1 / 0)) {
1441
1441
  this.isBox3 = !0, this.min = e, this.max = t;
1442
1442
  }
1443
1443
  set(e, t) {
@@ -1595,15 +1595,15 @@ var Kd = jh((O) => {
1595
1595
  }
1596
1596
  }
1597
1597
  const it = [
1598
- /* @__PURE__ */ new M(),
1599
- /* @__PURE__ */ new M(),
1600
- /* @__PURE__ */ new M(),
1601
- /* @__PURE__ */ new M(),
1602
- /* @__PURE__ */ new M(),
1603
- /* @__PURE__ */ new M(),
1604
- /* @__PURE__ */ new M(),
1605
- /* @__PURE__ */ new M()
1606
- ], ze = /* @__PURE__ */ new M(), nn = /* @__PURE__ */ new Le(), Zt = /* @__PURE__ */ new M(), Jt = /* @__PURE__ */ new M(), $t = /* @__PURE__ */ new M(), yt = /* @__PURE__ */ new M(), mt = /* @__PURE__ */ new M(), Lt = /* @__PURE__ */ new M(), wr = /* @__PURE__ */ new M(), sn = /* @__PURE__ */ new M(), an = /* @__PURE__ */ new M(), Ut = /* @__PURE__ */ new M();
1598
+ /* @__PURE__ */ new A(),
1599
+ /* @__PURE__ */ new A(),
1600
+ /* @__PURE__ */ new A(),
1601
+ /* @__PURE__ */ new A(),
1602
+ /* @__PURE__ */ new A(),
1603
+ /* @__PURE__ */ new A(),
1604
+ /* @__PURE__ */ new A(),
1605
+ /* @__PURE__ */ new A()
1606
+ ], ze = /* @__PURE__ */ new A(), nn = /* @__PURE__ */ new Ae(), Zt = /* @__PURE__ */ new A(), Jt = /* @__PURE__ */ new A(), $t = /* @__PURE__ */ new A(), yt = /* @__PURE__ */ new A(), mt = /* @__PURE__ */ new A(), Lt = /* @__PURE__ */ new A(), wr = /* @__PURE__ */ new A(), sn = /* @__PURE__ */ new A(), an = /* @__PURE__ */ new A(), Ut = /* @__PURE__ */ new A();
1607
1607
  function si(n, e, t, r, i) {
1608
1608
  for (let s = 0, a = n.length - 3; s <= a; s += 3) {
1609
1609
  Ut.fromArray(n, s);
@@ -1613,9 +1613,9 @@ var Kd = jh((O) => {
1613
1613
  }
1614
1614
  return !0;
1615
1615
  }
1616
- const sc = /* @__PURE__ */ new Le(), Sr = /* @__PURE__ */ new M(), ai = /* @__PURE__ */ new M();
1616
+ const sc = /* @__PURE__ */ new Ae(), Sr = /* @__PURE__ */ new A(), ai = /* @__PURE__ */ new A();
1617
1617
  class xs {
1618
- constructor(e = new M(), t = -1) {
1618
+ constructor(e = new A(), t = -1) {
1619
1619
  this.isSphere = !0, this.center = e, this.radius = t;
1620
1620
  }
1621
1621
  set(e, t) {
@@ -1688,9 +1688,9 @@ var Kd = jh((O) => {
1688
1688
  return new this.constructor().copy(this);
1689
1689
  }
1690
1690
  }
1691
- const st = /* @__PURE__ */ new M(), oi = /* @__PURE__ */ new M(), on = /* @__PURE__ */ new M(), vt = /* @__PURE__ */ new M(), hi = /* @__PURE__ */ new M(), hn = /* @__PURE__ */ new M(), ci = /* @__PURE__ */ new M();
1691
+ const st = /* @__PURE__ */ new A(), oi = /* @__PURE__ */ new A(), on = /* @__PURE__ */ new A(), vt = /* @__PURE__ */ new A(), hi = /* @__PURE__ */ new A(), hn = /* @__PURE__ */ new A(), ci = /* @__PURE__ */ new A();
1692
1692
  class Do {
1693
- constructor(e = new M(), t = new M(0, 0, -1)) {
1693
+ constructor(e = new A(), t = new A(0, 0, -1)) {
1694
1694
  this.origin = e, this.direction = t;
1695
1695
  }
1696
1696
  set(e, t) {
@@ -2189,7 +2189,7 @@ var Kd = jh((O) => {
2189
2189
  return e[t] = r[0], e[t + 1] = r[1], e[t + 2] = r[2], e[t + 3] = r[3], e[t + 4] = r[4], e[t + 5] = r[5], e[t + 6] = r[6], e[t + 7] = r[7], e[t + 8] = r[8], e[t + 9] = r[9], e[t + 10] = r[10], e[t + 11] = r[11], e[t + 12] = r[12], e[t + 13] = r[13], e[t + 14] = r[14], e[t + 15] = r[15], e;
2190
2190
  }
2191
2191
  }
2192
- const jt = /* @__PURE__ */ new M(), Ne = /* @__PURE__ */ new be(), ac = /* @__PURE__ */ new M(0, 0, 0), oc = /* @__PURE__ */ new M(1, 1, 1), xt = /* @__PURE__ */ new M(), cn = /* @__PURE__ */ new M(), Te = /* @__PURE__ */ new M(), js = /* @__PURE__ */ new be(), Qs = /* @__PURE__ */ new Bt();
2192
+ const jt = /* @__PURE__ */ new A(), Ne = /* @__PURE__ */ new be(), ac = /* @__PURE__ */ new A(0, 0, 0), oc = /* @__PURE__ */ new A(1, 1, 1), xt = /* @__PURE__ */ new A(), cn = /* @__PURE__ */ new A(), Te = /* @__PURE__ */ new A(), js = /* @__PURE__ */ new be(), Qs = /* @__PURE__ */ new Bt();
2193
2193
  class Vr {
2194
2194
  constructor(e = 0, t = 0, r = 0, i = Vr.DEFAULT_ORDER) {
2195
2195
  this.isEuler = !0, this._x = e, this._y = t, this._z = r, this._order = i;
@@ -2311,11 +2311,11 @@ var Kd = jh((O) => {
2311
2311
  }
2312
2312
  }
2313
2313
  let cc = 0;
2314
- const Ks = /* @__PURE__ */ new M(), Qt = /* @__PURE__ */ new Bt(), at = /* @__PURE__ */ new be(), un = /* @__PURE__ */ new M(), Fr = /* @__PURE__ */ new M(), uc = /* @__PURE__ */ new M(), lc = /* @__PURE__ */ new Bt(), ea = /* @__PURE__ */ new M(1, 0, 0), ta = /* @__PURE__ */ new M(0, 1, 0), ra = /* @__PURE__ */ new M(0, 0, 1), na = { type: "added" }, fc = { type: "removed" }, Kt = { type: "childadded", child: null }, ui = { type: "childremoved", child: null };
2314
+ const Ks = /* @__PURE__ */ new A(), Qt = /* @__PURE__ */ new Bt(), at = /* @__PURE__ */ new be(), un = /* @__PURE__ */ new A(), Fr = /* @__PURE__ */ new A(), uc = /* @__PURE__ */ new A(), lc = /* @__PURE__ */ new Bt(), ea = /* @__PURE__ */ new A(1, 0, 0), ta = /* @__PURE__ */ new A(0, 1, 0), ra = /* @__PURE__ */ new A(0, 0, 1), na = { type: "added" }, fc = { type: "removed" }, Kt = { type: "childadded", child: null }, ui = { type: "childremoved", child: null };
2315
2315
  class De extends Yn {
2316
2316
  constructor() {
2317
2317
  super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: cc++ }), this.uuid = gr(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = De.DEFAULT_UP.clone();
2318
- const e = new M(), t = new Vr(), r = new Bt(), i = new M(1, 1, 1);
2318
+ const e = new A(), t = new Vr(), r = new Bt(), i = new A(1, 1, 1);
2319
2319
  function s() {
2320
2320
  r.setFromEuler(t, !1);
2321
2321
  }
@@ -2609,12 +2609,12 @@ var Kd = jh((O) => {
2609
2609
  return this;
2610
2610
  }
2611
2611
  }
2612
- De.DEFAULT_UP = /* @__PURE__ */ new M(0, 1, 0);
2612
+ De.DEFAULT_UP = /* @__PURE__ */ new A(0, 1, 0);
2613
2613
  De.DEFAULT_MATRIX_AUTO_UPDATE = !0;
2614
2614
  De.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
2615
- const Ge = /* @__PURE__ */ new M(), ot = /* @__PURE__ */ new M(), li = /* @__PURE__ */ new M(), ht = /* @__PURE__ */ new M(), er = /* @__PURE__ */ new M(), tr = /* @__PURE__ */ new M(), ia = /* @__PURE__ */ new M(), fi = /* @__PURE__ */ new M(), pi = /* @__PURE__ */ new M(), di = /* @__PURE__ */ new M(), gi = /* @__PURE__ */ new qr(), yi = /* @__PURE__ */ new qr(), mi = /* @__PURE__ */ new qr();
2615
+ const Ge = /* @__PURE__ */ new A(), ot = /* @__PURE__ */ new A(), li = /* @__PURE__ */ new A(), ht = /* @__PURE__ */ new A(), er = /* @__PURE__ */ new A(), tr = /* @__PURE__ */ new A(), ia = /* @__PURE__ */ new A(), fi = /* @__PURE__ */ new A(), pi = /* @__PURE__ */ new A(), di = /* @__PURE__ */ new A(), gi = /* @__PURE__ */ new qr(), yi = /* @__PURE__ */ new qr(), mi = /* @__PURE__ */ new qr();
2616
2616
  class qe {
2617
- constructor(e = new M(), t = new M(), r = new M()) {
2617
+ constructor(e = new A(), t = new A(), r = new A()) {
2618
2618
  this.a = e, this.b = t, this.c = r;
2619
2619
  }
2620
2620
  static getNormal(e, t, r, i) {
@@ -3171,7 +3171,7 @@ var Kd = jh((O) => {
3171
3171
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
3172
3172
  }
3173
3173
  }
3174
- const fe = /* @__PURE__ */ new M(), fn = /* @__PURE__ */ new V();
3174
+ const pe = /* @__PURE__ */ new A(), fn = /* @__PURE__ */ new V();
3175
3175
  class Ve {
3176
3176
  constructor(e, t, r = !1) {
3177
3177
  if (Array.isArray(e))
@@ -3210,22 +3210,22 @@ var Kd = jh((O) => {
3210
3210
  fn.fromBufferAttribute(this, t), fn.applyMatrix3(e), this.setXY(t, fn.x, fn.y);
3211
3211
  else if (this.itemSize === 3)
3212
3212
  for (let t = 0, r = this.count; t < r; t++)
3213
- fe.fromBufferAttribute(this, t), fe.applyMatrix3(e), this.setXYZ(t, fe.x, fe.y, fe.z);
3213
+ pe.fromBufferAttribute(this, t), pe.applyMatrix3(e), this.setXYZ(t, pe.x, pe.y, pe.z);
3214
3214
  return this;
3215
3215
  }
3216
3216
  applyMatrix4(e) {
3217
3217
  for (let t = 0, r = this.count; t < r; t++)
3218
- fe.fromBufferAttribute(this, t), fe.applyMatrix4(e), this.setXYZ(t, fe.x, fe.y, fe.z);
3218
+ pe.fromBufferAttribute(this, t), pe.applyMatrix4(e), this.setXYZ(t, pe.x, pe.y, pe.z);
3219
3219
  return this;
3220
3220
  }
3221
3221
  applyNormalMatrix(e) {
3222
3222
  for (let t = 0, r = this.count; t < r; t++)
3223
- fe.fromBufferAttribute(this, t), fe.applyNormalMatrix(e), this.setXYZ(t, fe.x, fe.y, fe.z);
3223
+ pe.fromBufferAttribute(this, t), pe.applyNormalMatrix(e), this.setXYZ(t, pe.x, pe.y, pe.z);
3224
3224
  return this;
3225
3225
  }
3226
3226
  transformDirection(e) {
3227
3227
  for (let t = 0, r = this.count; t < r; t++)
3228
- fe.fromBufferAttribute(this, t), fe.transformDirection(e), this.setXYZ(t, fe.x, fe.y, fe.z);
3228
+ pe.fromBufferAttribute(this, t), pe.transformDirection(e), this.setXYZ(t, pe.x, pe.y, pe.z);
3229
3229
  return this;
3230
3230
  }
3231
3231
  set(e, t = 0) {
@@ -3307,7 +3307,7 @@ var Kd = jh((O) => {
3307
3307
  }
3308
3308
  }
3309
3309
  let yc = 0;
3310
- const Ee = /* @__PURE__ */ new be(), xi = /* @__PURE__ */ new De(), rr = /* @__PURE__ */ new M(), Ce = /* @__PURE__ */ new Le(), Tr = /* @__PURE__ */ new Le(), ge = /* @__PURE__ */ new M();
3310
+ const Be = /* @__PURE__ */ new be(), xi = /* @__PURE__ */ new De(), rr = /* @__PURE__ */ new A(), Ce = /* @__PURE__ */ new Ae(), Tr = /* @__PURE__ */ new Ae(), ge = /* @__PURE__ */ new A();
3311
3311
  class Ue extends Yn {
3312
3312
  constructor() {
3313
3313
  super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: yc++ }), this.uuid = gr(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
@@ -3361,22 +3361,22 @@ var Kd = jh((O) => {
3361
3361
  return i !== void 0 && (i.transformDirection(e), i.needsUpdate = !0), this.boundingBox !== null && this.computeBoundingBox(), this.boundingSphere !== null && this.computeBoundingSphere(), this;
3362
3362
  }
3363
3363
  applyQuaternion(e) {
3364
- return Ee.makeRotationFromQuaternion(e), this.applyMatrix4(Ee), this;
3364
+ return Be.makeRotationFromQuaternion(e), this.applyMatrix4(Be), this;
3365
3365
  }
3366
3366
  rotateX(e) {
3367
- return Ee.makeRotationX(e), this.applyMatrix4(Ee), this;
3367
+ return Be.makeRotationX(e), this.applyMatrix4(Be), this;
3368
3368
  }
3369
3369
  rotateY(e) {
3370
- return Ee.makeRotationY(e), this.applyMatrix4(Ee), this;
3370
+ return Be.makeRotationY(e), this.applyMatrix4(Be), this;
3371
3371
  }
3372
3372
  rotateZ(e) {
3373
- return Ee.makeRotationZ(e), this.applyMatrix4(Ee), this;
3373
+ return Be.makeRotationZ(e), this.applyMatrix4(Be), this;
3374
3374
  }
3375
3375
  translate(e, t, r) {
3376
- return Ee.makeTranslation(e, t, r), this.applyMatrix4(Ee), this;
3376
+ return Be.makeTranslation(e, t, r), this.applyMatrix4(Be), this;
3377
3377
  }
3378
3378
  scale(e, t, r) {
3379
- return Ee.makeScale(e, t, r), this.applyMatrix4(Ee), this;
3379
+ return Be.makeScale(e, t, r), this.applyMatrix4(Be), this;
3380
3380
  }
3381
3381
  lookAt(e) {
3382
3382
  return xi.lookAt(e), xi.updateMatrix(), this.applyMatrix4(xi.matrix), this;
@@ -3404,12 +3404,12 @@ var Kd = jh((O) => {
3404
3404
  return this;
3405
3405
  }
3406
3406
  computeBoundingBox() {
3407
- this.boundingBox === null && (this.boundingBox = new Le());
3407
+ this.boundingBox === null && (this.boundingBox = new Ae());
3408
3408
  const e = this.attributes.position, t = this.morphAttributes.position;
3409
3409
  if (e && e.isGLBufferAttribute) {
3410
3410
  console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this), this.boundingBox.set(
3411
- new M(-1 / 0, -1 / 0, -1 / 0),
3412
- new M(1 / 0, 1 / 0, 1 / 0)
3411
+ new A(-1 / 0, -1 / 0, -1 / 0),
3412
+ new A(1 / 0, 1 / 0, 1 / 0)
3413
3413
  );
3414
3414
  return;
3415
3415
  }
@@ -3427,7 +3427,7 @@ var Kd = jh((O) => {
3427
3427
  this.boundingSphere === null && (this.boundingSphere = new xs());
3428
3428
  const e = this.attributes.position, t = this.morphAttributes.position;
3429
3429
  if (e && e.isGLBufferAttribute) {
3430
- console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this), this.boundingSphere.set(new M(), 1 / 0);
3430
+ console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this), this.boundingSphere.set(new A(), 1 / 0);
3431
3431
  return;
3432
3432
  }
3433
3433
  if (e) {
@@ -3460,8 +3460,8 @@ var Kd = jh((O) => {
3460
3460
  this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new Ve(new Float32Array(4 * r.count), 4));
3461
3461
  const a = this.getAttribute("tangent"), o = [], h = [];
3462
3462
  for (let B = 0; B < r.count; B++)
3463
- o[B] = new M(), h[B] = new M();
3464
- const c = new M(), u = new M(), f = new M(), l = new V(), p = new V(), g = new V(), m = new M(), x = new M();
3463
+ o[B] = new A(), h[B] = new A();
3464
+ const c = new A(), u = new A(), f = new A(), l = new V(), p = new V(), g = new V(), m = new A(), x = new A();
3465
3465
  function v(B, D, N) {
3466
3466
  c.fromBufferAttribute(r, B), u.fromBufferAttribute(r, D), f.fromBufferAttribute(r, N), l.fromBufferAttribute(s, B), p.fromBufferAttribute(s, D), g.fromBufferAttribute(s, N), u.sub(c), f.sub(c), p.sub(l), g.sub(l);
3467
3467
  const G = 1 / (p.x * g.y - g.x * p.y);
@@ -3481,7 +3481,7 @@ var Kd = jh((O) => {
3481
3481
  e.getX(Y + 2)
3482
3482
  );
3483
3483
  }
3484
- const b = new M(), S = new M(), C = new M(), _ = new M();
3484
+ const b = new A(), S = new A(), C = new A(), _ = new A();
3485
3485
  function E(B) {
3486
3486
  C.fromBufferAttribute(i, B), _.copy(C);
3487
3487
  const D = o[B];
@@ -3504,7 +3504,7 @@ var Kd = jh((O) => {
3504
3504
  else
3505
3505
  for (let l = 0, p = r.count; l < p; l++)
3506
3506
  r.setXYZ(l, 0, 0, 0);
3507
- const i = new M(), s = new M(), a = new M(), o = new M(), h = new M(), c = new M(), u = new M(), f = new M();
3507
+ const i = new A(), s = new A(), a = new A(), o = new A(), h = new A(), c = new A(), u = new A(), f = new A();
3508
3508
  if (e)
3509
3509
  for (let l = 0, p = e.count; l < p; l += 3) {
3510
3510
  const g = e.getX(l + 0), m = e.getX(l + 1), x = e.getX(l + 2);
@@ -3636,7 +3636,7 @@ var Kd = jh((O) => {
3636
3636
  this.dispatchEvent({ type: "dispose" });
3637
3637
  }
3638
3638
  }
3639
- const sa = /* @__PURE__ */ new be(), Rt = /* @__PURE__ */ new Do(), pn = /* @__PURE__ */ new xs(), aa = /* @__PURE__ */ new M(), dn = /* @__PURE__ */ new M(), gn = /* @__PURE__ */ new M(), yn = /* @__PURE__ */ new M(), bi = /* @__PURE__ */ new M(), mn = /* @__PURE__ */ new M(), oa = /* @__PURE__ */ new M(), vn = /* @__PURE__ */ new M();
3639
+ const sa = /* @__PURE__ */ new be(), Rt = /* @__PURE__ */ new Do(), pn = /* @__PURE__ */ new xs(), aa = /* @__PURE__ */ new A(), dn = /* @__PURE__ */ new A(), gn = /* @__PURE__ */ new A(), yn = /* @__PURE__ */ new A(), bi = /* @__PURE__ */ new A(), mn = /* @__PURE__ */ new A(), oa = /* @__PURE__ */ new A(), vn = /* @__PURE__ */ new A();
3640
3640
  class Dn extends De {
3641
3641
  constructor(e = new Ue(), t = new zo()) {
3642
3642
  super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.updateMorphTargets();
@@ -3727,13 +3727,13 @@ var Kd = jh((O) => {
3727
3727
  n.getVertexPosition(o, dn), n.getVertexPosition(h, gn), n.getVertexPosition(c, yn);
3728
3728
  const u = mc(n, e, t, r, dn, gn, yn, oa);
3729
3729
  if (u) {
3730
- const f = new M();
3731
- qe.getBarycoord(oa, dn, gn, yn, f), i && (u.uv = qe.getInterpolatedAttribute(i, o, h, c, f, new V())), s && (u.uv1 = qe.getInterpolatedAttribute(s, o, h, c, f, new V())), a && (u.normal = qe.getInterpolatedAttribute(a, o, h, c, f, new M()), u.normal.dot(r.direction) > 0 && u.normal.multiplyScalar(-1));
3730
+ const f = new A();
3731
+ qe.getBarycoord(oa, dn, gn, yn, f), i && (u.uv = qe.getInterpolatedAttribute(i, o, h, c, f, new V())), s && (u.uv1 = qe.getInterpolatedAttribute(s, o, h, c, f, new V())), a && (u.normal = qe.getInterpolatedAttribute(a, o, h, c, f, new A()), u.normal.dot(r.direction) > 0 && u.normal.multiplyScalar(-1));
3732
3732
  const l = {
3733
3733
  a: o,
3734
3734
  b: h,
3735
3735
  c,
3736
- normal: new M(),
3736
+ normal: new A(),
3737
3737
  materialIndex: 0
3738
3738
  };
3739
3739
  qe.getNormal(dn, gn, yn, l.normal), u.face = l, u.barycoord = f;
@@ -3748,7 +3748,7 @@ var Kd = jh((O) => {
3748
3748
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this.fog = e.fog, this;
3749
3749
  }
3750
3750
  }
3751
- const In = /* @__PURE__ */ new M(), Pn = /* @__PURE__ */ new M(), ha = /* @__PURE__ */ new be(), Cr = /* @__PURE__ */ new Do(), bn = /* @__PURE__ */ new xs(), wi = /* @__PURE__ */ new M(), ca = /* @__PURE__ */ new M();
3751
+ const In = /* @__PURE__ */ new A(), Pn = /* @__PURE__ */ new A(), ha = /* @__PURE__ */ new be(), Cr = /* @__PURE__ */ new Do(), bn = /* @__PURE__ */ new xs(), wi = /* @__PURE__ */ new A(), ca = /* @__PURE__ */ new A();
3752
3752
  class bs extends De {
3753
3753
  constructor(e = new Ue(), t = new No()) {
3754
3754
  super(), this.isLine = !0, this.type = "Line", this.geometry = e, this.material = t, this.updateMorphTargets();
@@ -3826,7 +3826,7 @@ var Kd = jh((O) => {
3826
3826
  object: n
3827
3827
  };
3828
3828
  }
3829
- const ua = /* @__PURE__ */ new M(), la = /* @__PURE__ */ new M();
3829
+ const ua = /* @__PURE__ */ new A(), la = /* @__PURE__ */ new A();
3830
3830
  class vc extends bs {
3831
3831
  constructor(e, t) {
3832
3832
  super(e, t), this.isLineSegments = !0, this.type = "LineSegments";
@@ -3926,7 +3926,7 @@ var Kd = jh((O) => {
3926
3926
  getTangent(e, t) {
3927
3927
  let i = e - 1e-4, s = e + 1e-4;
3928
3928
  i < 0 && (i = 0), s > 1 && (s = 1);
3929
- const a = this.getPoint(i), o = this.getPoint(s), h = t || (a.isVector2 ? new V() : new M());
3929
+ const a = this.getPoint(i), o = this.getPoint(s), h = t || (a.isVector2 ? new V() : new A());
3930
3930
  return h.copy(o).sub(a).normalize(), h;
3931
3931
  }
3932
3932
  getTangentAt(e, t) {
@@ -3934,12 +3934,12 @@ var Kd = jh((O) => {
3934
3934
  return this.getTangent(r, t);
3935
3935
  }
3936
3936
  computeFrenetFrames(e, t) {
3937
- const r = new M(), i = [], s = [], a = [], o = new M(), h = new be();
3937
+ const r = new A(), i = [], s = [], a = [], o = new A(), h = new be();
3938
3938
  for (let p = 0; p <= e; p++) {
3939
3939
  const g = p / e;
3940
- i[p] = this.getTangentAt(g, new M());
3940
+ i[p] = this.getTangentAt(g, new A());
3941
3941
  }
3942
- s[0] = new M(), a[0] = new M();
3942
+ s[0] = new A(), a[0] = new A();
3943
3943
  let c = Number.MAX_VALUE;
3944
3944
  const u = Math.abs(i[0].x), f = Math.abs(i[0].y), l = Math.abs(i[0].z);
3945
3945
  u <= c && (c = u, r.set(1, 0, 0)), f <= c && (c = f, r.set(0, 1, 0)), l <= c && r.set(0, 0, 1), o.crossVectors(i[0], r).normalize(), s[0].crossVectors(i[0], o), a[0].crossVectors(i[0], s[0]);
@@ -4037,12 +4037,12 @@ var Kd = jh((O) => {
4037
4037
  }
4038
4038
  };
4039
4039
  }
4040
- const Sn = /* @__PURE__ */ new M(), Si = /* @__PURE__ */ new ws(), Fi = /* @__PURE__ */ new ws(), Ti = /* @__PURE__ */ new ws();
4040
+ const Sn = /* @__PURE__ */ new A(), Si = /* @__PURE__ */ new ws(), Fi = /* @__PURE__ */ new ws(), Ti = /* @__PURE__ */ new ws();
4041
4041
  class bc extends nt {
4042
4042
  constructor(e = [], t = !1, r = "centripetal", i = 0.5) {
4043
4043
  super(), this.isCatmullRomCurve3 = !0, this.type = "CatmullRomCurve3", this.points = e, this.closed = t, this.curveType = r, this.tension = i;
4044
4044
  }
4045
- getPoint(e, t = new M()) {
4045
+ getPoint(e, t = new A()) {
4046
4046
  const r = t, i = this.points, s = i.length, a = (s - (this.closed ? 0 : 1)) * e;
4047
4047
  let o = Math.floor(a), h = a - o;
4048
4048
  this.closed ? o += o > 0 ? 0 : (Math.floor(Math.abs(o) / s) + 1) * s : h === 0 && o === s - 1 && (o = s - 2, h = 1);
@@ -4081,7 +4081,7 @@ var Kd = jh((O) => {
4081
4081
  super.fromJSON(e), this.points = [];
4082
4082
  for (let t = 0, r = e.points.length; t < r; t++) {
4083
4083
  const i = e.points[t];
4084
- this.points.push(new M().fromArray(i));
4084
+ this.points.push(new A().fromArray(i));
4085
4085
  }
4086
4086
  return this.closed = e.closed, this.curveType = e.curveType, this.tension = e.tension, this;
4087
4087
  }
@@ -4143,10 +4143,10 @@ var Kd = jh((O) => {
4143
4143
  }
4144
4144
  }
4145
4145
  class Mc extends nt {
4146
- constructor(e = new M(), t = new M(), r = new M(), i = new M()) {
4146
+ constructor(e = new A(), t = new A(), r = new A(), i = new A()) {
4147
4147
  super(), this.isCubicBezierCurve3 = !0, this.type = "CubicBezierCurve3", this.v0 = e, this.v1 = t, this.v2 = r, this.v3 = i;
4148
4148
  }
4149
- getPoint(e, t = new M()) {
4149
+ getPoint(e, t = new A()) {
4150
4150
  const r = t, i = this.v0, s = this.v1, a = this.v2, o = this.v3;
4151
4151
  return r.set(
4152
4152
  Br(e, i.x, s.x, a.x, o.x),
@@ -4195,10 +4195,10 @@ var Kd = jh((O) => {
4195
4195
  }
4196
4196
  }
4197
4197
  class Ec extends nt {
4198
- constructor(e = new M(), t = new M()) {
4198
+ constructor(e = new A(), t = new A()) {
4199
4199
  super(), this.isLineCurve3 = !0, this.type = "LineCurve3", this.v1 = e, this.v2 = t;
4200
4200
  }
4201
- getPoint(e, t = new M()) {
4201
+ getPoint(e, t = new A()) {
4202
4202
  const r = t;
4203
4203
  return e === 1 ? r.copy(this.v2) : (r.copy(this.v2).sub(this.v1), r.multiplyScalar(e).add(this.v1)), r;
4204
4204
  }
@@ -4206,7 +4206,7 @@ var Kd = jh((O) => {
4206
4206
  getPointAt(e, t) {
4207
4207
  return this.getPoint(e, t);
4208
4208
  }
4209
- getTangent(e, t = new M()) {
4209
+ getTangent(e, t = new A()) {
4210
4210
  return t.subVectors(this.v2, this.v1).normalize();
4211
4211
  }
4212
4212
  getTangentAt(e, t) {
@@ -4246,10 +4246,10 @@ var Kd = jh((O) => {
4246
4246
  }
4247
4247
  }
4248
4248
  class Bc extends nt {
4249
- constructor(e = new M(), t = new M(), r = new M()) {
4249
+ constructor(e = new A(), t = new A(), r = new A()) {
4250
4250
  super(), this.isQuadraticBezierCurve3 = !0, this.type = "QuadraticBezierCurve3", this.v0 = e, this.v1 = t, this.v2 = r;
4251
4251
  }
4252
- getPoint(e, t = new M()) {
4252
+ getPoint(e, t = new A()) {
4253
4253
  const r = t, i = this.v0, s = this.v1, a = this.v2;
4254
4254
  return r.set(
4255
4255
  Er(e, i.x, s.x, a.x),
@@ -6729,98 +6729,98 @@ var Kd = jh((O) => {
6729
6729
  longDateTime: 8,
6730
6730
  tag: 4
6731
6731
  };
6732
- function A(n, e) {
6732
+ function M(n, e) {
6733
6733
  this.data = n, this.offset = e, this.relativeOffset = 0;
6734
6734
  }
6735
- A.prototype.parseByte = function() {
6735
+ M.prototype.parseByte = function() {
6736
6736
  var n = this.data.getUint8(this.offset + this.relativeOffset);
6737
6737
  return this.relativeOffset += 1, n;
6738
6738
  };
6739
- A.prototype.parseChar = function() {
6739
+ M.prototype.parseChar = function() {
6740
6740
  var n = this.data.getInt8(this.offset + this.relativeOffset);
6741
6741
  return this.relativeOffset += 1, n;
6742
6742
  };
6743
- A.prototype.parseCard8 = A.prototype.parseByte;
6744
- A.prototype.parseUShort = function() {
6743
+ M.prototype.parseCard8 = M.prototype.parseByte;
6744
+ M.prototype.parseUShort = function() {
6745
6745
  var n = this.data.getUint16(this.offset + this.relativeOffset);
6746
6746
  return this.relativeOffset += 2, n;
6747
6747
  };
6748
- A.prototype.parseCard16 = A.prototype.parseUShort;
6749
- A.prototype.parseSID = A.prototype.parseUShort;
6750
- A.prototype.parseOffset16 = A.prototype.parseUShort;
6751
- A.prototype.parseShort = function() {
6748
+ M.prototype.parseCard16 = M.prototype.parseUShort;
6749
+ M.prototype.parseSID = M.prototype.parseUShort;
6750
+ M.prototype.parseOffset16 = M.prototype.parseUShort;
6751
+ M.prototype.parseShort = function() {
6752
6752
  var n = this.data.getInt16(this.offset + this.relativeOffset);
6753
6753
  return this.relativeOffset += 2, n;
6754
6754
  };
6755
- A.prototype.parseF2Dot14 = function() {
6755
+ M.prototype.parseF2Dot14 = function() {
6756
6756
  var n = this.data.getInt16(this.offset + this.relativeOffset) / 16384;
6757
6757
  return this.relativeOffset += 2, n;
6758
6758
  };
6759
- A.prototype.parseULong = function() {
6759
+ M.prototype.parseULong = function() {
6760
6760
  var n = Cs(this.data, this.offset + this.relativeOffset);
6761
6761
  return this.relativeOffset += 4, n;
6762
6762
  };
6763
- A.prototype.parseOffset32 = A.prototype.parseULong;
6764
- A.prototype.parseFixed = function() {
6763
+ M.prototype.parseOffset32 = M.prototype.parseULong;
6764
+ M.prototype.parseFixed = function() {
6765
6765
  var n = sh(this.data, this.offset + this.relativeOffset);
6766
6766
  return this.relativeOffset += 4, n;
6767
6767
  };
6768
- A.prototype.parseString = function(n) {
6768
+ M.prototype.parseString = function(n) {
6769
6769
  var e = this.data, t = this.offset + this.relativeOffset, r = "";
6770
6770
  this.relativeOffset += n;
6771
6771
  for (var i = 0; i < n; i++)
6772
6772
  r += String.fromCharCode(e.getUint8(t + i));
6773
6773
  return r;
6774
6774
  };
6775
- A.prototype.parseTag = function() {
6775
+ M.prototype.parseTag = function() {
6776
6776
  return this.parseString(4);
6777
6777
  };
6778
- A.prototype.parseLongDateTime = function() {
6778
+ M.prototype.parseLongDateTime = function() {
6779
6779
  var n = Cs(this.data, this.offset + this.relativeOffset + 4);
6780
6780
  return n -= 2082844800, this.relativeOffset += 8, n;
6781
6781
  };
6782
- A.prototype.parseVersion = function(n) {
6782
+ M.prototype.parseVersion = function(n) {
6783
6783
  var e = Vn(this.data, this.offset + this.relativeOffset), t = Vn(this.data, this.offset + this.relativeOffset + 2);
6784
6784
  return this.relativeOffset += 4, n === void 0 && (n = 4096), e + t / n / 10;
6785
6785
  };
6786
- A.prototype.skip = function(n, e) {
6786
+ M.prototype.skip = function(n, e) {
6787
6787
  e === void 0 && (e = 1), this.relativeOffset += Ou[n] * e;
6788
6788
  };
6789
- A.prototype.parseULongList = function(n) {
6789
+ M.prototype.parseULongList = function(n) {
6790
6790
  n === void 0 && (n = this.parseULong());
6791
6791
  for (var e = new Array(n), t = this.data, r = this.offset + this.relativeOffset, i = 0; i < n; i++)
6792
6792
  e[i] = t.getUint32(r), r += 4;
6793
6793
  return this.relativeOffset += n * 4, e;
6794
6794
  };
6795
- A.prototype.parseOffset16List = A.prototype.parseUShortList = function(n) {
6795
+ M.prototype.parseOffset16List = M.prototype.parseUShortList = function(n) {
6796
6796
  n === void 0 && (n = this.parseUShort());
6797
6797
  for (var e = new Array(n), t = this.data, r = this.offset + this.relativeOffset, i = 0; i < n; i++)
6798
6798
  e[i] = t.getUint16(r), r += 2;
6799
6799
  return this.relativeOffset += n * 2, e;
6800
6800
  };
6801
- A.prototype.parseShortList = function(n) {
6801
+ M.prototype.parseShortList = function(n) {
6802
6802
  for (var e = new Array(n), t = this.data, r = this.offset + this.relativeOffset, i = 0; i < n; i++)
6803
6803
  e[i] = t.getInt16(r), r += 2;
6804
6804
  return this.relativeOffset += n * 2, e;
6805
6805
  };
6806
- A.prototype.parseByteList = function(n) {
6806
+ M.prototype.parseByteList = function(n) {
6807
6807
  for (var e = new Array(n), t = this.data, r = this.offset + this.relativeOffset, i = 0; i < n; i++)
6808
6808
  e[i] = t.getUint8(r++);
6809
6809
  return this.relativeOffset += n, e;
6810
6810
  };
6811
- A.prototype.parseList = function(n, e) {
6811
+ M.prototype.parseList = function(n, e) {
6812
6812
  e || (e = n, n = this.parseUShort());
6813
6813
  for (var t = new Array(n), r = 0; r < n; r++)
6814
6814
  t[r] = e.call(this);
6815
6815
  return t;
6816
6816
  };
6817
- A.prototype.parseList32 = function(n, e) {
6817
+ M.prototype.parseList32 = function(n, e) {
6818
6818
  e || (e = n, n = this.parseULong());
6819
6819
  for (var t = new Array(n), r = 0; r < n; r++)
6820
6820
  t[r] = e.call(this);
6821
6821
  return t;
6822
6822
  };
6823
- A.prototype.parseRecordList = function(n, e) {
6823
+ M.prototype.parseRecordList = function(n, e) {
6824
6824
  e || (e = n, n = this.parseUShort());
6825
6825
  for (var t = new Array(n), r = Object.keys(e), i = 0; i < n; i++) {
6826
6826
  for (var s = {}, a = 0; a < r.length; a++) {
@@ -6831,7 +6831,7 @@ var Kd = jh((O) => {
6831
6831
  }
6832
6832
  return t;
6833
6833
  };
6834
- A.prototype.parseRecordList32 = function(n, e) {
6834
+ M.prototype.parseRecordList32 = function(n, e) {
6835
6835
  e || (e = n, n = this.parseULong());
6836
6836
  for (var t = new Array(n), r = Object.keys(e), i = 0; i < n; i++) {
6837
6837
  for (var s = {}, a = 0; a < r.length; a++) {
@@ -6842,7 +6842,7 @@ var Kd = jh((O) => {
6842
6842
  }
6843
6843
  return t;
6844
6844
  };
6845
- A.prototype.parseStruct = function(n) {
6845
+ M.prototype.parseStruct = function(n) {
6846
6846
  if (typeof n == "function")
6847
6847
  return n.call(this);
6848
6848
  for (var e = Object.keys(n), t = {}, r = 0; r < e.length; r++) {
@@ -6851,28 +6851,28 @@ var Kd = jh((O) => {
6851
6851
  }
6852
6852
  return t;
6853
6853
  };
6854
- A.prototype.parseValueRecord = function(n) {
6854
+ M.prototype.parseValueRecord = function(n) {
6855
6855
  if (n === void 0 && (n = this.parseUShort()), n !== 0) {
6856
6856
  var e = {};
6857
6857
  return n & 1 && (e.xPlacement = this.parseShort()), n & 2 && (e.yPlacement = this.parseShort()), n & 4 && (e.xAdvance = this.parseShort()), n & 8 && (e.yAdvance = this.parseShort()), n & 16 && (e.xPlaDevice = void 0, this.parseShort()), n & 32 && (e.yPlaDevice = void 0, this.parseShort()), n & 64 && (e.xAdvDevice = void 0, this.parseShort()), n & 128 && (e.yAdvDevice = void 0, this.parseShort()), e;
6858
6858
  }
6859
6859
  };
6860
- A.prototype.parseValueRecordList = function() {
6860
+ M.prototype.parseValueRecordList = function() {
6861
6861
  for (var n = this.parseUShort(), e = this.parseUShort(), t = new Array(e), r = 0; r < e; r++)
6862
6862
  t[r] = this.parseValueRecord(n);
6863
6863
  return t;
6864
6864
  };
6865
- A.prototype.parsePointer = function(n) {
6865
+ M.prototype.parsePointer = function(n) {
6866
6866
  var e = this.parseOffset16();
6867
6867
  if (e > 0)
6868
- return new A(this.data, this.offset + e).parseStruct(n);
6868
+ return new M(this.data, this.offset + e).parseStruct(n);
6869
6869
  };
6870
- A.prototype.parsePointer32 = function(n) {
6870
+ M.prototype.parsePointer32 = function(n) {
6871
6871
  var e = this.parseOffset32();
6872
6872
  if (e > 0)
6873
- return new A(this.data, this.offset + e).parseStruct(n);
6873
+ return new M(this.data, this.offset + e).parseStruct(n);
6874
6874
  };
6875
- A.prototype.parseListOfLists = function(n) {
6875
+ M.prototype.parseListOfLists = function(n) {
6876
6876
  for (var e = this.parseOffset16List(), t = e.length, r = this.relativeOffset, i = new Array(t), s = 0; s < t; s++) {
6877
6877
  var a = e[s];
6878
6878
  if (a === 0) {
@@ -6888,7 +6888,7 @@ var Kd = jh((O) => {
6888
6888
  }
6889
6889
  return this.relativeOffset = r, i;
6890
6890
  };
6891
- A.prototype.parseCoverage = function() {
6891
+ M.prototype.parseCoverage = function() {
6892
6892
  var n = this.offset + this.relativeOffset, e = this.parseUShort(), t = this.parseUShort();
6893
6893
  if (e === 1)
6894
6894
  return {
@@ -6909,7 +6909,7 @@ var Kd = jh((O) => {
6909
6909
  }
6910
6910
  throw new Error("0x" + n.toString(16) + ": Coverage format must be 1 or 2.");
6911
6911
  };
6912
- A.prototype.parseClassDef = function() {
6912
+ M.prototype.parseClassDef = function() {
6913
6913
  var n = this.offset + this.relativeOffset, e = this.parseUShort();
6914
6914
  if (e === 1)
6915
6915
  return {
@@ -6921,98 +6921,98 @@ var Kd = jh((O) => {
6921
6921
  return {
6922
6922
  format: 2,
6923
6923
  ranges: this.parseRecordList({
6924
- start: A.uShort,
6925
- end: A.uShort,
6926
- classId: A.uShort
6924
+ start: M.uShort,
6925
+ end: M.uShort,
6926
+ classId: M.uShort
6927
6927
  })
6928
6928
  };
6929
6929
  throw new Error("0x" + n.toString(16) + ": ClassDef format must be 1 or 2.");
6930
6930
  };
6931
- A.list = function(n, e) {
6931
+ M.list = function(n, e) {
6932
6932
  return function() {
6933
6933
  return this.parseList(n, e);
6934
6934
  };
6935
6935
  };
6936
- A.list32 = function(n, e) {
6936
+ M.list32 = function(n, e) {
6937
6937
  return function() {
6938
6938
  return this.parseList32(n, e);
6939
6939
  };
6940
6940
  };
6941
- A.recordList = function(n, e) {
6941
+ M.recordList = function(n, e) {
6942
6942
  return function() {
6943
6943
  return this.parseRecordList(n, e);
6944
6944
  };
6945
6945
  };
6946
- A.recordList32 = function(n, e) {
6946
+ M.recordList32 = function(n, e) {
6947
6947
  return function() {
6948
6948
  return this.parseRecordList32(n, e);
6949
6949
  };
6950
6950
  };
6951
- A.pointer = function(n) {
6951
+ M.pointer = function(n) {
6952
6952
  return function() {
6953
6953
  return this.parsePointer(n);
6954
6954
  };
6955
6955
  };
6956
- A.pointer32 = function(n) {
6956
+ M.pointer32 = function(n) {
6957
6957
  return function() {
6958
6958
  return this.parsePointer32(n);
6959
6959
  };
6960
6960
  };
6961
- A.tag = A.prototype.parseTag;
6962
- A.byte = A.prototype.parseByte;
6963
- A.uShort = A.offset16 = A.prototype.parseUShort;
6964
- A.uShortList = A.prototype.parseUShortList;
6965
- A.uLong = A.offset32 = A.prototype.parseULong;
6966
- A.uLongList = A.prototype.parseULongList;
6967
- A.struct = A.prototype.parseStruct;
6968
- A.coverage = A.prototype.parseCoverage;
6969
- A.classDef = A.prototype.parseClassDef;
6961
+ M.tag = M.prototype.parseTag;
6962
+ M.byte = M.prototype.parseByte;
6963
+ M.uShort = M.offset16 = M.prototype.parseUShort;
6964
+ M.uShortList = M.prototype.parseUShortList;
6965
+ M.uLong = M.offset32 = M.prototype.parseULong;
6966
+ M.uLongList = M.prototype.parseULongList;
6967
+ M.struct = M.prototype.parseStruct;
6968
+ M.coverage = M.prototype.parseCoverage;
6969
+ M.classDef = M.prototype.parseClassDef;
6970
6970
  var La = {
6971
- reserved: A.uShort,
6972
- reqFeatureIndex: A.uShort,
6973
- featureIndexes: A.uShortList
6974
- };
6975
- A.prototype.parseScriptList = function() {
6976
- return this.parsePointer(A.recordList({
6977
- tag: A.tag,
6978
- script: A.pointer({
6979
- defaultLangSys: A.pointer(La),
6980
- langSysRecords: A.recordList({
6981
- tag: A.tag,
6982
- langSys: A.pointer(La)
6971
+ reserved: M.uShort,
6972
+ reqFeatureIndex: M.uShort,
6973
+ featureIndexes: M.uShortList
6974
+ };
6975
+ M.prototype.parseScriptList = function() {
6976
+ return this.parsePointer(M.recordList({
6977
+ tag: M.tag,
6978
+ script: M.pointer({
6979
+ defaultLangSys: M.pointer(La),
6980
+ langSysRecords: M.recordList({
6981
+ tag: M.tag,
6982
+ langSys: M.pointer(La)
6983
6983
  })
6984
6984
  })
6985
6985
  })) || [];
6986
6986
  };
6987
- A.prototype.parseFeatureList = function() {
6988
- return this.parsePointer(A.recordList({
6989
- tag: A.tag,
6990
- feature: A.pointer({
6991
- featureParams: A.offset16,
6992
- lookupListIndexes: A.uShortList
6987
+ M.prototype.parseFeatureList = function() {
6988
+ return this.parsePointer(M.recordList({
6989
+ tag: M.tag,
6990
+ feature: M.pointer({
6991
+ featureParams: M.offset16,
6992
+ lookupListIndexes: M.uShortList
6993
6993
  })
6994
6994
  })) || [];
6995
6995
  };
6996
- A.prototype.parseLookupList = function(n) {
6997
- return this.parsePointer(A.list(A.pointer(function() {
6996
+ M.prototype.parseLookupList = function(n) {
6997
+ return this.parsePointer(M.list(M.pointer(function() {
6998
6998
  var e = this.parseUShort();
6999
6999
  H.argument(1 <= e && e <= 9, "GPOS/GSUB lookup type " + e + " unknown.");
7000
7000
  var t = this.parseUShort(), r = t & 16;
7001
7001
  return {
7002
7002
  lookupType: e,
7003
7003
  lookupFlag: t,
7004
- subtables: this.parseList(A.pointer(n[e])),
7004
+ subtables: this.parseList(M.pointer(n[e])),
7005
7005
  markFilteringSet: r ? this.parseUShort() : void 0
7006
7006
  };
7007
7007
  }))) || [];
7008
7008
  };
7009
- A.prototype.parseFeatureVariationsList = function() {
7009
+ M.prototype.parseFeatureVariationsList = function() {
7010
7010
  return this.parsePointer32(function() {
7011
7011
  var n = this.parseUShort(), e = this.parseUShort();
7012
7012
  H.argument(n === 1 && e < 1, "GPOS/GSUB feature variations table unknown.");
7013
7013
  var t = this.parseRecordList32({
7014
- conditionSetOffset: A.offset32,
7015
- featureTableSubstitutionOffset: A.offset32
7014
+ conditionSetOffset: M.offset32,
7015
+ featureTableSubstitutionOffset: M.offset32
7016
7016
  });
7017
7017
  return t;
7018
7018
  }) || [];
@@ -7029,7 +7029,7 @@ var Kd = jh((O) => {
7029
7029
  getOffset: Eu,
7030
7030
  getBytes: Bu,
7031
7031
  bytesToString: _u,
7032
- Parser: A
7032
+ Parser: M
7033
7033
  };
7034
7034
  function Lu(n, e) {
7035
7035
  e.parseUShort(), n.length = e.parseULong(), n.language = e.parseULong();
@@ -10396,13 +10396,13 @@ var Kd = jh((O) => {
10396
10396
  if (t === 1)
10397
10397
  return {
10398
10398
  substFormat: 1,
10399
- coverage: this.parsePointer(A.coverage),
10399
+ coverage: this.parsePointer(M.coverage),
10400
10400
  deltaGlyphId: this.parseUShort()
10401
10401
  };
10402
10402
  if (t === 2)
10403
10403
  return {
10404
10404
  substFormat: 2,
10405
- coverage: this.parsePointer(A.coverage),
10405
+ coverage: this.parsePointer(M.coverage),
10406
10406
  substitute: this.parseOffset16List()
10407
10407
  };
10408
10408
  H.assert(!1, "0x" + e.toString(16) + ": lookup type 1 format must be 1 or 2.");
@@ -10411,7 +10411,7 @@ var Kd = jh((O) => {
10411
10411
  var e = this.parseUShort();
10412
10412
  return H.argument(e === 1, "GSUB Multiple Substitution Subtable identifier-format must be 1"), {
10413
10413
  substFormat: e,
10414
- coverage: this.parsePointer(A.coverage),
10414
+ coverage: this.parsePointer(M.coverage),
10415
10415
  sequences: this.parseListOfLists()
10416
10416
  };
10417
10417
  };
@@ -10419,7 +10419,7 @@ var Kd = jh((O) => {
10419
10419
  var e = this.parseUShort();
10420
10420
  return H.argument(e === 1, "GSUB Alternate Substitution Subtable identifier-format must be 1"), {
10421
10421
  substFormat: e,
10422
- coverage: this.parsePointer(A.coverage),
10422
+ coverage: this.parsePointer(M.coverage),
10423
10423
  alternateSets: this.parseListOfLists()
10424
10424
  };
10425
10425
  };
@@ -10427,7 +10427,7 @@ var Kd = jh((O) => {
10427
10427
  var e = this.parseUShort();
10428
10428
  return H.argument(e === 1, "GSUB ligature table identifier-format must be 1"), {
10429
10429
  substFormat: e,
10430
- coverage: this.parsePointer(A.coverage),
10430
+ coverage: this.parsePointer(M.coverage),
10431
10431
  ligatureSets: this.parseListOfLists(function() {
10432
10432
  return {
10433
10433
  ligGlyph: this.parseUShort(),
@@ -10437,15 +10437,15 @@ var Kd = jh((O) => {
10437
10437
  };
10438
10438
  };
10439
10439
  var ur = {
10440
- sequenceIndex: A.uShort,
10441
- lookupListIndex: A.uShort
10440
+ sequenceIndex: M.uShort,
10441
+ lookupListIndex: M.uShort
10442
10442
  };
10443
10443
  Xe[5] = function() {
10444
10444
  var e = this.offset + this.relativeOffset, t = this.parseUShort();
10445
10445
  if (t === 1)
10446
10446
  return {
10447
10447
  substFormat: t,
10448
- coverage: this.parsePointer(A.coverage),
10448
+ coverage: this.parsePointer(M.coverage),
10449
10449
  ruleSets: this.parseListOfLists(function() {
10450
10450
  var s = this.parseUShort(), a = this.parseUShort();
10451
10451
  return {
@@ -10457,8 +10457,8 @@ var Kd = jh((O) => {
10457
10457
  if (t === 2)
10458
10458
  return {
10459
10459
  substFormat: t,
10460
- coverage: this.parsePointer(A.coverage),
10461
- classDef: this.parsePointer(A.classDef),
10460
+ coverage: this.parsePointer(M.coverage),
10461
+ classDef: this.parsePointer(M.classDef),
10462
10462
  classSets: this.parseListOfLists(function() {
10463
10463
  var s = this.parseUShort(), a = this.parseUShort();
10464
10464
  return {
@@ -10471,7 +10471,7 @@ var Kd = jh((O) => {
10471
10471
  var r = this.parseUShort(), i = this.parseUShort();
10472
10472
  return {
10473
10473
  substFormat: t,
10474
- coverages: this.parseList(r, A.pointer(A.coverage)),
10474
+ coverages: this.parseList(r, M.pointer(M.coverage)),
10475
10475
  lookupRecords: this.parseRecordList(i, ur)
10476
10476
  };
10477
10477
  }
@@ -10482,7 +10482,7 @@ var Kd = jh((O) => {
10482
10482
  if (t === 1)
10483
10483
  return {
10484
10484
  substFormat: 1,
10485
- coverage: this.parsePointer(A.coverage),
10485
+ coverage: this.parsePointer(M.coverage),
10486
10486
  chainRuleSets: this.parseListOfLists(function() {
10487
10487
  return {
10488
10488
  backtrack: this.parseUShortList(),
@@ -10495,10 +10495,10 @@ var Kd = jh((O) => {
10495
10495
  if (t === 2)
10496
10496
  return {
10497
10497
  substFormat: 2,
10498
- coverage: this.parsePointer(A.coverage),
10499
- backtrackClassDef: this.parsePointer(A.classDef),
10500
- inputClassDef: this.parsePointer(A.classDef),
10501
- lookaheadClassDef: this.parsePointer(A.classDef),
10498
+ coverage: this.parsePointer(M.coverage),
10499
+ backtrackClassDef: this.parsePointer(M.classDef),
10500
+ inputClassDef: this.parsePointer(M.classDef),
10501
+ lookaheadClassDef: this.parsePointer(M.classDef),
10502
10502
  chainClassSet: this.parseListOfLists(function() {
10503
10503
  return {
10504
10504
  backtrack: this.parseUShortList(),
@@ -10511,9 +10511,9 @@ var Kd = jh((O) => {
10511
10511
  if (t === 3)
10512
10512
  return {
10513
10513
  substFormat: 3,
10514
- backtrackCoverage: this.parseList(A.pointer(A.coverage)),
10515
- inputCoverage: this.parseList(A.pointer(A.coverage)),
10516
- lookaheadCoverage: this.parseList(A.pointer(A.coverage)),
10514
+ backtrackCoverage: this.parseList(M.pointer(M.coverage)),
10515
+ inputCoverage: this.parseList(M.pointer(M.coverage)),
10516
+ lookaheadCoverage: this.parseList(M.pointer(M.coverage)),
10517
10517
  lookupRecords: this.parseRecordList(ur)
10518
10518
  };
10519
10519
  H.assert(!1, "0x" + e.toString(16) + ": lookup type 6 format must be 1, 2 or 3.");
@@ -10521,7 +10521,7 @@ var Kd = jh((O) => {
10521
10521
  Xe[7] = function() {
10522
10522
  var e = this.parseUShort();
10523
10523
  H.argument(e === 1, "GSUB Extension Substitution subtable identifier-format must be 1");
10524
- var t = this.parseUShort(), r = new A(this.data, this.offset + this.parseULong());
10524
+ var t = this.parseUShort(), r = new M(this.data, this.offset + this.parseULong());
10525
10525
  return {
10526
10526
  substFormat: 1,
10527
10527
  lookupType: t,
@@ -10532,15 +10532,15 @@ var Kd = jh((O) => {
10532
10532
  var e = this.parseUShort();
10533
10533
  return H.argument(e === 1, "GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"), {
10534
10534
  substFormat: e,
10535
- coverage: this.parsePointer(A.coverage),
10536
- backtrackCoverage: this.parseList(A.pointer(A.coverage)),
10537
- lookaheadCoverage: this.parseList(A.pointer(A.coverage)),
10535
+ coverage: this.parsePointer(M.coverage),
10536
+ backtrackCoverage: this.parseList(M.pointer(M.coverage)),
10537
+ lookaheadCoverage: this.parseList(M.pointer(M.coverage)),
10538
10538
  substitutes: this.parseUShortList()
10539
10539
  };
10540
10540
  };
10541
10541
  function zl(n, e) {
10542
10542
  e = e || 0;
10543
- var t = new A(n, e), r = t.parseVersion(1);
10543
+ var t = new M(n, e), r = t.parseVersion(1);
10544
10544
  return H.argument(r === 1 || r === 1.1, "Unsupported GSUB table version."), r === 1 ? {
10545
10545
  version: r,
10546
10546
  scripts: t.parseScriptList(),
@@ -11098,7 +11098,7 @@ var Kd = jh((O) => {
11098
11098
  if (this.font.tables.gpos)
11099
11099
  return this.getLookupTables(n, e, "kern", 2);
11100
11100
  };
11101
- function Ae(n) {
11101
+ function Me(n) {
11102
11102
  Xr.call(this, n, "gsub");
11103
11103
  }
11104
11104
  function Xl(n, e) {
@@ -11119,8 +11119,8 @@ var Kd = jh((O) => {
11119
11119
  if (t)
11120
11120
  return r.push(t), t;
11121
11121
  }
11122
- Ae.prototype = Xr.prototype;
11123
- Ae.prototype.createDefaultTable = function() {
11122
+ Me.prototype = Xr.prototype;
11123
+ Me.prototype.createDefaultTable = function() {
11124
11124
  return {
11125
11125
  version: 1,
11126
11126
  scripts: [{
@@ -11134,7 +11134,7 @@ var Kd = jh((O) => {
11134
11134
  lookups: []
11135
11135
  };
11136
11136
  };
11137
- Ae.prototype.getSingle = function(n, e, t) {
11137
+ Me.prototype.getSingle = function(n, e, t) {
11138
11138
  for (var r = [], i = this.getLookupTables(e, t, n, 1), s = 0; s < i.length; s++)
11139
11139
  for (var a = i[s].subtables, o = 0; o < a.length; o++) {
11140
11140
  var h = a[o], c = this.expandCoverage(h.coverage), u = void 0;
@@ -11152,7 +11152,7 @@ var Kd = jh((O) => {
11152
11152
  }
11153
11153
  return r;
11154
11154
  };
11155
- Ae.prototype.getMultiple = function(n, e, t) {
11155
+ Me.prototype.getMultiple = function(n, e, t) {
11156
11156
  for (var r = [], i = this.getLookupTables(e, t, n, 2), s = 0; s < i.length; s++)
11157
11157
  for (var a = i[s].subtables, o = 0; o < a.length; o++) {
11158
11158
  var h = a[o], c = this.expandCoverage(h.coverage), u = void 0;
@@ -11163,14 +11163,14 @@ var Kd = jh((O) => {
11163
11163
  }
11164
11164
  return r;
11165
11165
  };
11166
- Ae.prototype.getAlternates = function(n, e, t) {
11166
+ Me.prototype.getAlternates = function(n, e, t) {
11167
11167
  for (var r = [], i = this.getLookupTables(e, t, n, 3), s = 0; s < i.length; s++)
11168
11168
  for (var a = i[s].subtables, o = 0; o < a.length; o++)
11169
11169
  for (var h = a[o], c = this.expandCoverage(h.coverage), u = h.alternateSets, f = 0; f < c.length; f++)
11170
11170
  r.push({ sub: c[f], by: u[f] });
11171
11171
  return r;
11172
11172
  };
11173
- Ae.prototype.getLigatures = function(n, e, t) {
11173
+ Me.prototype.getLigatures = function(n, e, t) {
11174
11174
  for (var r = [], i = this.getLookupTables(e, t, n, 4), s = 0; s < i.length; s++)
11175
11175
  for (var a = i[s].subtables, o = 0; o < a.length; o++)
11176
11176
  for (var h = a[o], c = this.expandCoverage(h.coverage), u = h.ligatureSets, f = 0; f < c.length; f++)
@@ -11183,7 +11183,7 @@ var Kd = jh((O) => {
11183
11183
  }
11184
11184
  return r;
11185
11185
  };
11186
- Ae.prototype.addSingle = function(n, e, t, r) {
11186
+ Me.prototype.addSingle = function(n, e, t, r) {
11187
11187
  var i = this.getLookupTables(t, r, n, 1, !0)[0], s = Es(i, 2, {
11188
11188
  // lookup type 1 subtable, format 2, coverage format 1
11189
11189
  substFormat: 2,
@@ -11194,7 +11194,7 @@ var Kd = jh((O) => {
11194
11194
  var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
11195
11195
  o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.substitute.splice(o, 0, 0)), s.substitute[o] = e.by;
11196
11196
  };
11197
- Ae.prototype.addMultiple = function(n, e, t, r) {
11197
+ Me.prototype.addMultiple = function(n, e, t, r) {
11198
11198
  H.assert(e.by instanceof Array && e.by.length > 1, 'Multiple: "by" must be an array of two or more ids');
11199
11199
  var i = this.getLookupTables(t, r, n, 2, !0)[0], s = Es(i, 1, {
11200
11200
  // lookup type 2 subtable, format 1, coverage format 1
@@ -11206,7 +11206,7 @@ var Kd = jh((O) => {
11206
11206
  var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
11207
11207
  o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.sequences.splice(o, 0, 0)), s.sequences[o] = e.by;
11208
11208
  };
11209
- Ae.prototype.addAlternate = function(n, e, t, r) {
11209
+ Me.prototype.addAlternate = function(n, e, t, r) {
11210
11210
  var i = this.getLookupTables(t, r, n, 3, !0)[0], s = Es(i, 1, {
11211
11211
  // lookup type 3 subtable, format 1, coverage format 1
11212
11212
  substFormat: 1,
@@ -11217,7 +11217,7 @@ var Kd = jh((O) => {
11217
11217
  var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
11218
11218
  o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.alternateSets.splice(o, 0, 0)), s.alternateSets[o] = e.by;
11219
11219
  };
11220
- Ae.prototype.addLigature = function(n, e, t, r) {
11220
+ Me.prototype.addLigature = function(n, e, t, r) {
11221
11221
  var i = this.getLookupTables(t, r, n, 4, !0)[0], s = i.subtables[0];
11222
11222
  s || (s = {
11223
11223
  // lookup type 4 subtable, format 1, coverage format 1
@@ -11237,7 +11237,7 @@ var Kd = jh((O) => {
11237
11237
  } else
11238
11238
  c = -1 - c, s.coverage.glyphs.splice(c, 0, a), s.ligatureSets.splice(c, 0, [h]);
11239
11239
  };
11240
- Ae.prototype.getFeature = function(n, e, t) {
11240
+ Me.prototype.getFeature = function(n, e, t) {
11241
11241
  if (/ss\d\d/.test(n))
11242
11242
  return this.getSingle(n, e, t);
11243
11243
  switch (n) {
@@ -11254,7 +11254,7 @@ var Kd = jh((O) => {
11254
11254
  return this.getMultiple(n, e, t);
11255
11255
  }
11256
11256
  };
11257
- Ae.prototype.add = function(n, e, t, r) {
11257
+ Me.prototype.add = function(n, e, t, r) {
11258
11258
  if (/ss\d\d/.test(n))
11259
11259
  return this.addSingle(n, e, t, r);
11260
11260
  switch (n) {
@@ -13189,7 +13189,7 @@ var Kd = jh((O) => {
13189
13189
  function _0(n) {
13190
13190
  return /\s/.test(n);
13191
13191
  }
13192
- function Me(n) {
13192
+ function Ee(n) {
13193
13193
  this.font = n, this.features = {};
13194
13194
  }
13195
13195
  function Nt(n) {
@@ -13291,7 +13291,7 @@ var Kd = jh((O) => {
13291
13291
  var t = $r(n, e.coverage);
13292
13292
  return t === -1 ? null : e.sequences[t];
13293
13293
  }
13294
- Me.prototype.getDefaultScriptFeaturesIndexes = function() {
13294
+ Ee.prototype.getDefaultScriptFeaturesIndexes = function() {
13295
13295
  for (var n = this.font.tables.gsub.scripts, e = 0; e < n.length; e++) {
13296
13296
  var t = n[e];
13297
13297
  if (t.tag === "DFLT")
@@ -13299,7 +13299,7 @@ var Kd = jh((O) => {
13299
13299
  }
13300
13300
  return [];
13301
13301
  };
13302
- Me.prototype.getScriptFeaturesIndexes = function(n) {
13302
+ Ee.prototype.getScriptFeaturesIndexes = function(n) {
13303
13303
  var e = this.font.tables;
13304
13304
  if (!e.gsub)
13305
13305
  return [];
@@ -13321,14 +13321,14 @@ var Kd = jh((O) => {
13321
13321
  }
13322
13322
  return this.getDefaultScriptFeaturesIndexes();
13323
13323
  };
13324
- Me.prototype.mapTagsToFeatures = function(n, e) {
13324
+ Ee.prototype.mapTagsToFeatures = function(n, e) {
13325
13325
  for (var t = {}, r = 0; r < n.length; r++) {
13326
13326
  var i = n[r].tag, s = n[r].feature;
13327
13327
  t[i] = s;
13328
13328
  }
13329
13329
  this.features[e].tags = t;
13330
13330
  };
13331
- Me.prototype.getScriptFeatures = function(n) {
13331
+ Ee.prototype.getScriptFeatures = function(n) {
13332
13332
  var e = this.features[n];
13333
13333
  if (this.features.hasOwnProperty(n))
13334
13334
  return e;
@@ -13340,11 +13340,11 @@ var Kd = jh((O) => {
13340
13340
  return r.features[i];
13341
13341
  }), this.features[n] = e, this.mapTagsToFeatures(e, n), e;
13342
13342
  };
13343
- Me.prototype.getSubstitutionType = function(n, e) {
13343
+ Ee.prototype.getSubstitutionType = function(n, e) {
13344
13344
  var t = n.lookupType.toString(), r = e.substFormat.toString();
13345
13345
  return t + r;
13346
13346
  };
13347
- Me.prototype.getLookupMethod = function(n, e) {
13347
+ Ee.prototype.getLookupMethod = function(n, e) {
13348
13348
  var t = this, r = this.getSubstitutionType(n, e);
13349
13349
  switch (r) {
13350
13350
  case "11":
@@ -13388,7 +13388,7 @@ var Kd = jh((O) => {
13388
13388
  );
13389
13389
  }
13390
13390
  };
13391
- Me.prototype.lookupFeature = function(n) {
13391
+ Ee.prototype.lookupFeature = function(n) {
13392
13392
  var e = n.contextParams, t = e.index, r = this.getFeature({
13393
13393
  tag: n.tag,
13394
13394
  script: n.script
@@ -13441,7 +13441,7 @@ var Kd = jh((O) => {
13441
13441
  }
13442
13442
  return s.length ? s : null;
13443
13443
  };
13444
- Me.prototype.supports = function(n) {
13444
+ Ee.prototype.supports = function(n) {
13445
13445
  if (!n.script)
13446
13446
  return !1;
13447
13447
  this.getScriptFeatures(n.script);
@@ -13453,17 +13453,17 @@ var Kd = jh((O) => {
13453
13453
  });
13454
13454
  return e && t;
13455
13455
  };
13456
- Me.prototype.getLookupSubtables = function(n) {
13456
+ Ee.prototype.getLookupSubtables = function(n) {
13457
13457
  return n.subtables || null;
13458
13458
  };
13459
- Me.prototype.getLookupByIndex = function(n) {
13459
+ Ee.prototype.getLookupByIndex = function(n) {
13460
13460
  var e = this.font.tables.gsub.lookups;
13461
13461
  return e[n] || null;
13462
13462
  };
13463
- Me.prototype.getFeatureLookups = function(n) {
13463
+ Ee.prototype.getFeatureLookups = function(n) {
13464
13464
  return n.lookupListIndexes.map(this.getLookupByIndex.bind(this));
13465
13465
  };
13466
- Me.prototype.getFeature = function(e) {
13466
+ Ee.prototype.getFeature = function(e) {
13467
13467
  if (!this.font)
13468
13468
  return { FAIL: "No font was found" };
13469
13469
  this.features.hasOwnProperty(e.script) || this.getScriptFeatures(e.script);
@@ -13732,7 +13732,7 @@ var Kd = jh((O) => {
13732
13732
  throw new Error(
13733
13733
  "No valid font was provided to apply features"
13734
13734
  );
13735
- this.query || (this.query = new Me(n));
13735
+ this.query || (this.query = new Ee(n));
13736
13736
  for (var t = 0; t < e.length; t++) {
13737
13737
  var r = e[t];
13738
13738
  this.query.supports({ script: r.script }) && this.registerFeatures(r.script, r.tags);
@@ -13829,7 +13829,7 @@ var Kd = jh((O) => {
13829
13829
  usWidthClass: n.widthClass || this.usWidthClasses.MEDIUM,
13830
13830
  fsSelection: n.fsSelection || this.fsSelectionValues.REGULAR
13831
13831
  }, n.tables.os2)
13832
- })), this.supported = !0, this.glyphs = new rt.GlyphSet(this, n.glyphs || []), this.encoding = new oh(this), this.position = new Yr(this), this.substitution = new Ae(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
13832
+ })), this.supported = !0, this.glyphs = new rt.GlyphSet(this, n.glyphs || []), this.encoding = new oh(this), this.position = new Yr(this), this.substitution = new Me(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
13833
13833
  get: function() {
13834
13834
  if (this._hinting)
13835
13835
  return this._hinting;
@@ -14108,8 +14108,8 @@ var Kd = jh((O) => {
14108
14108
  }
14109
14109
  var fp = { make: up, parse: lp }, pp = function() {
14110
14110
  return {
14111
- coverage: this.parsePointer(A.coverage),
14112
- attachPoints: this.parseList(A.pointer(A.uShortList))
14111
+ coverage: this.parsePointer(M.coverage),
14112
+ attachPoints: this.parseList(M.pointer(M.uShortList))
14113
14113
  };
14114
14114
  }, dp = function() {
14115
14115
  var n = this.parseUShort();
@@ -14123,28 +14123,28 @@ var Kd = jh((O) => {
14123
14123
  if (n === 3)
14124
14124
  return { coordinate: this.parseShort() };
14125
14125
  }, gp = function() {
14126
- return this.parseList(A.pointer(dp));
14126
+ return this.parseList(M.pointer(dp));
14127
14127
  }, yp = function() {
14128
14128
  return {
14129
- coverage: this.parsePointer(A.coverage),
14130
- ligGlyphs: this.parseList(A.pointer(gp))
14129
+ coverage: this.parsePointer(M.coverage),
14130
+ ligGlyphs: this.parseList(M.pointer(gp))
14131
14131
  };
14132
14132
  }, mp = function() {
14133
- return this.parseUShort(), this.parseList(A.pointer(A.coverage));
14133
+ return this.parseUShort(), this.parseList(M.pointer(M.coverage));
14134
14134
  };
14135
14135
  function vp(n, e) {
14136
14136
  e = e || 0;
14137
- var t = new A(n, e), r = t.parseVersion(1);
14137
+ var t = new M(n, e), r = t.parseVersion(1);
14138
14138
  H.argument(
14139
14139
  r === 1 || r === 1.2 || r === 1.3,
14140
14140
  "Unsupported GDEF table version."
14141
14141
  );
14142
14142
  var i = {
14143
14143
  version: r,
14144
- classDef: t.parsePointer(A.classDef),
14144
+ classDef: t.parsePointer(M.classDef),
14145
14145
  attachList: t.parsePointer(pp),
14146
14146
  ligCaretList: t.parsePointer(yp),
14147
- markAttachClassDef: t.parsePointer(A.classDef)
14147
+ markAttachClassDef: t.parsePointer(M.classDef)
14148
14148
  };
14149
14149
  return r >= 1.2 && (i.markGlyphSets = t.parsePointer(mp)), i;
14150
14150
  }
@@ -14154,13 +14154,13 @@ var Kd = jh((O) => {
14154
14154
  if (t === 1)
14155
14155
  return {
14156
14156
  posFormat: 1,
14157
- coverage: this.parsePointer(A.coverage),
14157
+ coverage: this.parsePointer(M.coverage),
14158
14158
  value: this.parseValueRecord()
14159
14159
  };
14160
14160
  if (t === 2)
14161
14161
  return {
14162
14162
  posFormat: 2,
14163
- coverage: this.parsePointer(A.coverage),
14163
+ coverage: this.parsePointer(M.coverage),
14164
14164
  values: this.parseValueRecordList()
14165
14165
  };
14166
14166
  H.assert(!1, "0x" + e.toString(16) + ": GPOS lookup type 1 format must be 1 or 2.");
@@ -14168,14 +14168,14 @@ var Kd = jh((O) => {
14168
14168
  Ze[2] = function() {
14169
14169
  var e = this.offset + this.relativeOffset, t = this.parseUShort();
14170
14170
  H.assert(t === 1 || t === 2, "0x" + e.toString(16) + ": GPOS lookup type 2 format must be 1 or 2.");
14171
- var r = this.parsePointer(A.coverage), i = this.parseUShort(), s = this.parseUShort();
14171
+ var r = this.parsePointer(M.coverage), i = this.parseUShort(), s = this.parseUShort();
14172
14172
  if (t === 1)
14173
14173
  return {
14174
14174
  posFormat: t,
14175
14175
  coverage: r,
14176
14176
  valueFormat1: i,
14177
14177
  valueFormat2: s,
14178
- pairSets: this.parseList(A.pointer(A.list(function() {
14178
+ pairSets: this.parseList(M.pointer(M.list(function() {
14179
14179
  return {
14180
14180
  // pairValueRecord
14181
14181
  secondGlyph: this.parseUShort(),
@@ -14185,7 +14185,7 @@ var Kd = jh((O) => {
14185
14185
  })))
14186
14186
  };
14187
14187
  if (t === 2) {
14188
- var a = this.parsePointer(A.classDef), o = this.parsePointer(A.classDef), h = this.parseUShort(), c = this.parseUShort();
14188
+ var a = this.parsePointer(M.classDef), o = this.parsePointer(M.classDef), h = this.parseUShort(), c = this.parseUShort();
14189
14189
  return {
14190
14190
  // Class Pair Adjustment
14191
14191
  posFormat: t,
@@ -14196,7 +14196,7 @@ var Kd = jh((O) => {
14196
14196
  classDef2: o,
14197
14197
  class1Count: h,
14198
14198
  class2Count: c,
14199
- classRecords: this.parseList(h, A.list(c, function() {
14199
+ classRecords: this.parseList(h, M.list(c, function() {
14200
14200
  return {
14201
14201
  value1: this.parseValueRecord(i),
14202
14202
  value2: this.parseValueRecord(s)
@@ -14228,7 +14228,7 @@ var Kd = jh((O) => {
14228
14228
  };
14229
14229
  function bp(n, e) {
14230
14230
  e = e || 0;
14231
- var t = new A(n, e), r = t.parseVersion(1);
14231
+ var t = new M(n, e), r = t.parseVersion(1);
14232
14232
  return H.argument(r === 1 || r === 1.1, "Unsupported GPOS table version " + r), r === 1 ? {
14233
14233
  version: r,
14234
14234
  scripts: t.parseScriptList(),
@@ -16206,11 +16206,11 @@ var Kd = jh((O) => {
16206
16206
  Qn.byteLength = ad;
16207
16207
  Qn.toByteArray = hd;
16208
16208
  Qn.fromByteArray = ld;
16209
- var et = [], Be = [], id = typeof Uint8Array < "u" ? Uint8Array : Array, Ii = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
16209
+ var et = [], _e = [], id = typeof Uint8Array < "u" ? Uint8Array : Array, Ii = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
16210
16210
  for (var ir = 0, sd = Ii.length; ir < sd; ++ir)
16211
- et[ir] = Ii[ir], Be[Ii.charCodeAt(ir)] = ir;
16212
- Be[45] = 62;
16213
- Be[95] = 63;
16211
+ et[ir] = Ii[ir], _e[Ii.charCodeAt(ir)] = ir;
16212
+ _e[45] = 62;
16213
+ _e[95] = 63;
16214
16214
  function Vh(n) {
16215
16215
  var e = n.length;
16216
16216
  if (e % 4 > 0)
@@ -16230,8 +16230,8 @@ var Kd = jh((O) => {
16230
16230
  function hd(n) {
16231
16231
  var e, t = Vh(n), r = t[0], i = t[1], s = new id(od(n, r, i)), a = 0, o = i > 0 ? r - 4 : r, h;
16232
16232
  for (h = 0; h < o; h += 4)
16233
- e = Be[n.charCodeAt(h)] << 18 | Be[n.charCodeAt(h + 1)] << 12 | Be[n.charCodeAt(h + 2)] << 6 | Be[n.charCodeAt(h + 3)], s[a++] = e >> 16 & 255, s[a++] = e >> 8 & 255, s[a++] = e & 255;
16234
- return i === 2 && (e = Be[n.charCodeAt(h)] << 2 | Be[n.charCodeAt(h + 1)] >> 4, s[a++] = e & 255), i === 1 && (e = Be[n.charCodeAt(h)] << 10 | Be[n.charCodeAt(h + 1)] << 4 | Be[n.charCodeAt(h + 2)] >> 2, s[a++] = e >> 8 & 255, s[a++] = e & 255), s;
16233
+ e = _e[n.charCodeAt(h)] << 18 | _e[n.charCodeAt(h + 1)] << 12 | _e[n.charCodeAt(h + 2)] << 6 | _e[n.charCodeAt(h + 3)], s[a++] = e >> 16 & 255, s[a++] = e >> 8 & 255, s[a++] = e & 255;
16234
+ return i === 2 && (e = _e[n.charCodeAt(h)] << 2 | _e[n.charCodeAt(h + 1)] >> 4, s[a++] = e & 255), i === 1 && (e = _e[n.charCodeAt(h)] << 10 | _e[n.charCodeAt(h + 1)] << 4 | _e[n.charCodeAt(h + 2)] >> 2, s[a++] = e >> 8 & 255, s[a++] = e & 255), s;
16235
16235
  }
16236
16236
  function cd(n) {
16237
16237
  return et[n >> 18 & 63] + et[n >> 12 & 63] + et[n >> 6 & 63] + et[n & 63];
@@ -17060,13 +17060,13 @@ var Kd = jh((O) => {
17060
17060
  return d;
17061
17061
  }();
17062
17062
  })(Ls);
17063
- var Rn = Ls, lr = Rn.Buffer, _e = {}, Oe;
17064
- for (Oe in Rn)
17065
- Rn.hasOwnProperty(Oe) && (Oe === "SlowBuffer" || Oe === "Buffer" || (_e[Oe] = Rn[Oe]));
17066
- var fr = _e.Buffer = {};
17067
- for (Oe in lr)
17068
- lr.hasOwnProperty(Oe) && (Oe === "allocUnsafe" || Oe === "allocUnsafeSlow" || (fr[Oe] = lr[Oe]));
17069
- _e.Buffer.prototype = lr.prototype;
17063
+ var Rn = Ls, lr = Rn.Buffer, Oe = {}, Le;
17064
+ for (Le in Rn)
17065
+ Rn.hasOwnProperty(Le) && (Le === "SlowBuffer" || Le === "Buffer" || (Oe[Le] = Rn[Le]));
17066
+ var fr = Oe.Buffer = {};
17067
+ for (Le in lr)
17068
+ lr.hasOwnProperty(Le) && (Le === "allocUnsafe" || Le === "allocUnsafeSlow" || (fr[Le] = lr[Le]));
17069
+ Oe.Buffer.prototype = lr.prototype;
17070
17070
  (!fr.from || fr.from === Uint8Array.from) && (fr.from = function(n, e, t) {
17071
17071
  if (typeof n == "number")
17072
17072
  throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof n);
@@ -17082,15 +17082,15 @@ var Kd = jh((O) => {
17082
17082
  var r = lr(n);
17083
17083
  return !e || e.length === 0 ? r.fill(0) : typeof t == "string" ? r.fill(e, t) : r.fill(e), r;
17084
17084
  });
17085
- if (!_e.kStringMaxLength)
17085
+ if (!Oe.kStringMaxLength)
17086
17086
  try {
17087
- _e.kStringMaxLength = process.binding("buffer").kStringMaxLength;
17087
+ Oe.kStringMaxLength = process.binding("buffer").kStringMaxLength;
17088
17088
  } catch {
17089
17089
  }
17090
- _e.constants || (_e.constants = {
17091
- MAX_LENGTH: _e.kMaxLength
17092
- }, _e.kStringMaxLength && (_e.constants.MAX_STRING_LENGTH = _e.kStringMaxLength));
17093
- var Ot = _e, Rs = {}, Xh = "\uFEFF";
17090
+ Oe.constants || (Oe.constants = {
17091
+ MAX_LENGTH: Oe.kMaxLength
17092
+ }, Oe.kStringMaxLength && (Oe.constants.MAX_STRING_LENGTH = Oe.kStringMaxLength));
17093
+ var Ot = Oe, Rs = {}, Xh = "\uFEFF";
17094
17094
  Rs.PrependBOM = Ds;
17095
17095
  function Ds(n, e) {
17096
17096
  this.encoder = n, this.addBOM = !0;
@@ -28870,8 +28870,57 @@ var Kd = jh((O) => {
28870
28870
  this.type = e, this.ctx = t, this.data = r;
28871
28871
  }
28872
28872
  }
28873
- var pr = /* @__PURE__ */ ((n) => (n[n.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", n[n.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", n[n.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", n[n.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", n[n.BY_STYLE = 5] = "BY_STYLE", n))(pr || {}), pe = /* @__PURE__ */ ((n) => (n.CHAR = "CHAR", n.NEW_PARAGRAPH = "NEW_PARAGRAPH", n.STACK = "STACK", n))(pe || {});
28874
- const Yd = /* @__PURE__ */ new M(), Zd = 1.666666, On = 0.3, vs = "";
28873
+ var pr = /* @__PURE__ */ ((n) => (n[n.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", n[n.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", n[n.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", n[n.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", n[n.BY_STYLE = 5] = "BY_STYLE", n))(pr || {}), fe = /* @__PURE__ */ ((n) => (n.CHAR = "CHAR", n.NEW_PARAGRAPH = "NEW_PARAGRAPH", n.STACK = "STACK", n))(fe || {});
28874
+ const vs = "";
28875
+ function Yd(n) {
28876
+ if (!(!n || [
28877
+ n.min.x,
28878
+ n.min.y,
28879
+ n.min.z,
28880
+ n.max.x,
28881
+ n.max.y,
28882
+ n.max.z
28883
+ ].some((t) => !Number.isFinite(t))))
28884
+ return n;
28885
+ }
28886
+ function Zd(n, e, t) {
28887
+ const r = [];
28888
+ if (n.filter((l) => l.char !== vs).forEach((l) => {
28889
+ const p = Yd(
28890
+ new Ae().copy(l.box).applyMatrix4(e)
28891
+ );
28892
+ p && r.push({
28893
+ type: l.type === fe.NEW_PARAGRAPH ? fe.NEW_PARAGRAPH : fe.CHAR,
28894
+ box: p,
28895
+ char: l.type === fe.NEW_PARAGRAPH ? `
28896
+ ` : l.char,
28897
+ children: []
28898
+ });
28899
+ }), t !== fe.STACK)
28900
+ return r;
28901
+ const i = (l) => l.type === fe.CHAR && l.char.trim().length === 0, s = (l) => l.type === fe.CHAR && l.char.trim().length > 0, a = r.findIndex(s);
28902
+ if (a < 0) return r;
28903
+ let o = -1;
28904
+ for (let l = r.length - 1; l >= 0; l--)
28905
+ if (s(r[l])) {
28906
+ o = l;
28907
+ break;
28908
+ }
28909
+ const h = r.slice(0, a).filter(i), c = r.slice(o + 1).filter(i), u = r.slice(a, o + 1).filter(s);
28910
+ if (u.length === 0) return [...h, ...c];
28911
+ const f = new Ae().copy(u[0].box);
28912
+ return u.slice(1).forEach((l) => f.union(l.box)), [
28913
+ ...h,
28914
+ {
28915
+ type: fe.STACK,
28916
+ char: "",
28917
+ box: f,
28918
+ children: u
28919
+ },
28920
+ ...c
28921
+ ];
28922
+ }
28923
+ const Jd = /* @__PURE__ */ new A(), $d = 1.666666, On = 0.3;
28875
28924
  class Ns extends jr {
28876
28925
  /**
28877
28926
  * Creates a new RenderContext instance with optional initial values.
@@ -28905,7 +28954,7 @@ var Kd = jh((O) => {
28905
28954
  this.color.rgb = [t, r, i];
28906
28955
  }
28907
28956
  }
28908
- class Jd {
28957
+ class jd {
28909
28958
  /**
28910
28959
  * Construct one instance of this class and initialize some properties with default values.
28911
28960
  * @param style Input text style
@@ -29004,7 +29053,7 @@ var Kd = jh((O) => {
29004
29053
  * The height of current line of texts
29005
29054
  */
29006
29055
  get currentLineHeight() {
29007
- return this.defaultLineSpaceFactor * this.currentFontSize * Zd + this.currentMaxFontSize;
29056
+ return this.defaultLineSpaceFactor * this.currentFontSize * $d + this.currentMaxFontSize;
29008
29057
  }
29009
29058
  /**
29010
29059
  * The maximum font size in current line. Characters in one line may have different font and font
@@ -29211,7 +29260,7 @@ var Kd = jh((O) => {
29211
29260
  i,
29212
29261
  s
29213
29262
  );
29214
- const c = h[2] === "^" ? pe.CHAR : pe.STACK;
29263
+ const c = h[2] === "^" ? fe.CHAR : fe.STACK;
29215
29264
  this.processGeometries(
29216
29265
  t,
29217
29266
  r,
@@ -29229,7 +29278,7 @@ var Kd = jh((O) => {
29229
29278
  a
29230
29279
  ), this.processLastLine(), a;
29231
29280
  }
29232
- processGeometries(e, t, r, i, s, a = pe.CHAR) {
29281
+ processGeometries(e, t, r, i, s, a = fe.CHAR) {
29233
29282
  if (e.length > 0 || t.length > 0) {
29234
29283
  const o = this.toThreeObject(
29235
29284
  e,
@@ -29362,17 +29411,17 @@ var Kd = jh((O) => {
29362
29411
  }
29363
29412
  recordStackDivider(e, t, r, i, s) {
29364
29413
  if (this._options.collectCharBoxes === !1) return;
29365
- const a = t - this.currentFontSize * 0.8 + this.defaultFontSize * On, o = new Le(
29366
- new M(e, a, 0),
29367
- new M(e + r, a, 0)
29414
+ const a = t - this.currentFontSize * 0.8 + this.defaultFontSize * On, o = new Ae(
29415
+ new A(e, a, 0),
29416
+ new A(e + r, a, 0)
29368
29417
  );
29369
29418
  this.resolveCharBoxTarget(i, s) === "mesh" ? i.push({
29370
- type: pe.CHAR,
29419
+ type: fe.CHAR,
29371
29420
  box: o,
29372
29421
  char: vs,
29373
29422
  children: []
29374
29423
  }) : s.push({
29375
- type: pe.CHAR,
29424
+ type: fe.CHAR,
29376
29425
  box: o,
29377
29426
  char: vs,
29378
29427
  children: []
@@ -29387,21 +29436,21 @@ var Kd = jh((O) => {
29387
29436
  }
29388
29437
  processBlank(e, t) {
29389
29438
  if (this._options.collectCharBoxes !== !1) {
29390
- const r = this._hOffset, i = this.flowDirection == pr.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.defaultFontSize, s = new Le(
29391
- new M(r, i, 0),
29392
- new M(
29439
+ const r = this._hOffset, i = this.flowDirection == pr.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.defaultFontSize, s = new Ae(
29440
+ new A(r, i, 0),
29441
+ new A(
29393
29442
  r + this._currentContext.blankWidth,
29394
29443
  i + this.currentFontSize,
29395
29444
  0
29396
29445
  )
29397
29446
  );
29398
29447
  this.resolveCharBoxTarget(e, t) === "mesh" ? e.push({
29399
- type: pe.CHAR,
29448
+ type: fe.CHAR,
29400
29449
  box: s,
29401
29450
  char: " ",
29402
29451
  children: []
29403
29452
  }) : t.push({
29404
- type: pe.CHAR,
29453
+ type: fe.CHAR,
29405
29454
  box: s,
29406
29455
  char: " ",
29407
29456
  children: []
@@ -29411,15 +29460,16 @@ var Kd = jh((O) => {
29411
29460
  }
29412
29461
  recordLineBreak(e, t) {
29413
29462
  if (this._options.collectCharBoxes === !1 || !e || !t) return;
29463
+ const r = new A(this._hOffset, this._vOffset, 0), i = new Ae(r.clone(), r.clone());
29414
29464
  this.resolveCharBoxTarget(e, t) === "mesh" ? e.push({
29415
- type: pe.NEW_PARAGRAPH,
29416
- box: void 0,
29465
+ type: fe.NEW_PARAGRAPH,
29466
+ box: i,
29417
29467
  char: `
29418
29468
  `,
29419
29469
  children: []
29420
29470
  }) : t.push({
29421
- type: pe.NEW_PARAGRAPH,
29422
- box: void 0,
29471
+ type: fe.NEW_PARAGRAPH,
29472
+ box: i,
29423
29473
  char: `
29424
29474
  `,
29425
29475
  children: []
@@ -29460,14 +29510,14 @@ var Kd = jh((O) => {
29460
29510
  const u = this.hOffset, f = this.flowDirection == pr.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.defaultFontSize, l = a.width * this.currentWidthFactor, p = this.currentFontSize;
29461
29511
  if (o.translate(u, f, 0), this.currentHorizontalAlignment == We.DISTRIBUTED ? this._hOffset += a.width * this.currentWidthFactor : this._hOffset += a.width * this.currentWordSpace * this.currentWidthFactor, t.push(o), this._options.collectCharBoxes !== !1) {
29462
29512
  o.userData.char = e, o.boundingBox || o.computeBoundingBox();
29463
- const x = new Le().copy(o.boundingBox);
29513
+ const x = new Ae().copy(o.boundingBox);
29464
29514
  o instanceof cr ? (this._lastCharBoxTarget = "mesh", i.push({
29465
- type: pe.CHAR,
29515
+ type: fe.CHAR,
29466
29516
  box: x,
29467
29517
  char: e,
29468
29518
  children: []
29469
29519
  })) : (this._lastCharBoxTarget = "line", s.push({
29470
- type: pe.CHAR,
29520
+ type: fe.CHAR,
29471
29521
  box: x,
29472
29522
  char: e,
29473
29523
  children: []
@@ -29592,11 +29642,11 @@ var Kd = jh((O) => {
29592
29642
  if (e.forEach((a, o) => {
29593
29643
  a.geometry.boundingBox || a.geometry.computeBoundingBox(), o === 0 ? t = a.geometry.boundingBox : t.union(a.geometry.boundingBox);
29594
29644
  }), !t) return;
29595
- const r = t, i = r.getSize(Yd), s = (a, o) => {
29645
+ const r = t, i = r.getSize(Jd), s = (a, o) => {
29596
29646
  var c;
29597
29647
  const h = (c = a.userData) == null ? void 0 : c.charBoxes;
29598
29648
  if (h && h.length > 0) {
29599
- const u = new M(o, 0, 0);
29649
+ const u = new A(o, 0, 0);
29600
29650
  h.forEach((f) => {
29601
29651
  var l;
29602
29652
  return (l = f.box) == null ? void 0 : l.translate(u);
@@ -29684,7 +29734,7 @@ var Kd = jh((O) => {
29684
29734
  this.calcuateLineParams(e);
29685
29735
  }
29686
29736
  }
29687
- const $i = /* @__PURE__ */ new M(), It = /* @__PURE__ */ new M(), ji = /* @__PURE__ */ new M(), Qi = /* @__PURE__ */ new Bt(), Ki = /* @__PURE__ */ new be(), Oo = /* @__PURE__ */ new be(), Lo = /* @__PURE__ */ new M(1, 0, 0);
29737
+ const $i = /* @__PURE__ */ new A(), It = /* @__PURE__ */ new A(), ji = /* @__PURE__ */ new A(), Qi = /* @__PURE__ */ new Bt(), Ki = /* @__PURE__ */ new be(), Oo = /* @__PURE__ */ new be(), Lo = /* @__PURE__ */ new A(1, 0, 0);
29688
29738
  class Gs extends De {
29689
29739
  /**
29690
29740
  * Extracts all unique font names used in an MText string.
@@ -29719,7 +29769,7 @@ var Kd = jh((O) => {
29719
29769
  super(), this._style = t, this._styleManager = r, this._fontManager = i, this._colorSettings = {
29720
29770
  byLayerColor: s.byLayerColor,
29721
29771
  byBlockColor: s.byBlockColor
29722
- }, this._box = new Le(), this._charBoxes = [], this._mtextData = e, this._fontsInStyleLoaded = !1;
29772
+ }, this._box = new Ae(), this._charBoxes = [], this._mtextData = e, this._fontsInStyleLoaded = !1;
29723
29773
  }
29724
29774
  /**
29725
29775
  * Gets the font manager instance associated with this MText object.
@@ -29796,7 +29846,8 @@ var Kd = jh((O) => {
29796
29846
  *
29797
29847
  * Token semantics:
29798
29848
  * - `CHAR`: `char` is the rendered character, `box` is defined, `children` is empty.
29799
- * - `NEW_PARAGRAPH`: `char` is `\n`, `box` is `undefined`, `children` is empty.
29849
+ * - `NEW_PARAGRAPH`: `char` is `\n`. The `box` represents a zero-width vertical
29850
+ * line whose height equals the current line height. `children` is empty.
29800
29851
  * - `STACK`: `char` is empty string (`''`), `box` is the union of stack component boxes,
29801
29852
  * and `children` contains the stack sub-components.
29802
29853
  *
@@ -29850,7 +29901,7 @@ var Kd = jh((O) => {
29850
29901
  });
29851
29902
  let o = e.rotation || 0;
29852
29903
  if (e.directionVector) {
29853
- const c = e.directionVector, u = new M(c.x, c.y, c.z), f = u.clone().cross(Lo), l = Lo.angleTo(u);
29904
+ const c = e.directionVector, u = new A(c.x, c.y, c.z), f = u.clone().cross(Lo), l = Lo.angleTo(u);
29854
29905
  o = f.z > 0 ? -l : l;
29855
29906
  }
29856
29907
  r.matrix.compose(It, Qi, ji);
@@ -29889,7 +29940,7 @@ var Kd = jh((O) => {
29889
29940
  value: e.widthFactor ?? 1,
29890
29941
  isRelative: !0
29891
29942
  }, u.align = s, u.paragraph.align = i;
29892
- const f = new Jd(
29943
+ const f = new jd(
29893
29944
  t,
29894
29945
  this.styleManager,
29895
29946
  this.fontManager,
@@ -29955,43 +30006,21 @@ var Kd = jh((O) => {
29955
30006
  e.updateWorldMatrix(!1, !1);
29956
30007
  const r = (s = e.userData) == null ? void 0 : s.charBoxes;
29957
30008
  if (r && r.length > 0) {
29958
- const h = r.filter((u) => u.char !== vs).map((u) => {
29959
- const f = u.box ? new Le().copy(u.box).applyMatrix4(e.matrixWorld) : void 0;
29960
- return {
29961
- type: u.type === pe.NEW_PARAGRAPH ? pe.NEW_PARAGRAPH : pe.CHAR,
29962
- box: f,
29963
- char: u.type === pe.NEW_PARAGRAPH ? `
29964
- ` : u.char,
29965
- children: []
29966
- };
29967
- });
29968
- if (((a = e.userData) == null ? void 0 : a.charBoxType) === pe.STACK) {
29969
- const u = new Le();
29970
- let f = !1;
29971
- h.forEach((l) => {
29972
- l.box && (f ? u.union(l.box) : (u.copy(l.box), f = !0));
29973
- }), t.push({
29974
- type: pe.STACK,
29975
- char: "",
29976
- box: f ? u : void 0,
29977
- children: h
29978
- });
29979
- } else
29980
- h.forEach((u) => {
29981
- t.push({
29982
- ...u,
29983
- box: u.type === pe.NEW_PARAGRAPH ? void 0 : u.box
29984
- });
29985
- });
30009
+ const h = (a = e.userData) == null ? void 0 : a.charBoxType, c = Zd(
30010
+ r,
30011
+ e.matrixWorld,
30012
+ h
30013
+ );
30014
+ t.push(...c);
29986
30015
  return;
29987
30016
  }
29988
30017
  if (e instanceof bs || e instanceof Dn) {
29989
30018
  const h = e.geometry;
29990
30019
  if (!((o = h.userData) != null && o.isDecoration)) {
29991
30020
  h.boundingBox === null && h.computeBoundingBox();
29992
- const c = new Le().copy(h.boundingBox);
30021
+ const c = new Ae().copy(h.boundingBox);
29993
30022
  c.applyMatrix4(e.matrixWorld), t.push({
29994
- type: pe.CHAR,
30023
+ type: fe.CHAR,
29995
30024
  box: c,
29996
30025
  char: "",
29997
30026
  children: []
@@ -30033,7 +30062,7 @@ var Kd = jh((O) => {
30033
30062
  }
30034
30063
  }
30035
30064
  }
30036
- const es = ft.instance, $d = new Gd();
30065
+ const es = ft.instance, Qd = new Gd();
30037
30066
  self.addEventListener("message", async (n) => {
30038
30067
  const { type: e, id: t, data: r } = n.data;
30039
30068
  try {
@@ -30044,12 +30073,12 @@ var Kd = jh((O) => {
30044
30073
  let o = new Gs(
30045
30074
  i,
30046
30075
  s,
30047
- $d,
30076
+ Qd,
30048
30077
  es,
30049
30078
  a
30050
30079
  );
30051
30080
  await o.asyncDraw(), o.updateMatrixWorld(!0);
30052
- const { data: h, transferableObjects: c } = jd(o);
30081
+ const { data: h, transferableObjects: c } = Kd(o);
30053
30082
  self.postMessage(
30054
30083
  {
30055
30084
  type: "render",
@@ -30105,12 +30134,12 @@ var Kd = jh((O) => {
30105
30134
  });
30106
30135
  }
30107
30136
  });
30108
- function jd(n) {
30109
- const e = n.matrixWorld.clone(), t = new M(), r = new Bt(), i = new M();
30137
+ function Kd(n) {
30138
+ const e = n.matrixWorld.clone(), t = new A(), r = new Bt(), i = new A();
30110
30139
  e.decompose(t, r, i);
30111
30140
  const s = n.box.clone();
30112
30141
  s.applyMatrix4(e);
30113
- const { children: a, transferableObjects: o } = Qd(n);
30142
+ const { children: a, transferableObjects: o } = e1(n);
30114
30143
  return { data: {
30115
30144
  // Basic properties
30116
30145
  type: "MText",
@@ -30146,13 +30175,13 @@ var Kd = jh((O) => {
30146
30175
  children: a
30147
30176
  }, transferableObjects: o };
30148
30177
  }
30149
- function Qd(n) {
30178
+ function e1(n) {
30150
30179
  const e = [], t = [];
30151
30180
  return n.traverse((r) => {
30152
30181
  if (r instanceof Dn || r instanceof bs) {
30153
30182
  const i = r.geometry, s = r.material;
30154
30183
  if (i instanceof Ue) {
30155
- const a = r.matrixWorld.clone(), o = new M(), h = new Bt(), c = new M();
30184
+ const a = r.matrixWorld.clone(), o = new A(), h = new Bt(), c = new A();
30156
30185
  a.decompose(o, h, c);
30157
30186
  const u = {};
30158
30187
  i.attributes && Object.keys(i.attributes).forEach((g) => {
@@ -30221,4 +30250,4 @@ var Kd = jh((O) => {
30221
30250
  }), { children: e, transferableObjects: t };
30222
30251
  }
30223
30252
  });
30224
- export default Kd();
30253
+ export default t1();