textmode.js 0.2.1-beta.3 → 0.2.1-beta.5

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.
Files changed (34) hide show
  1. package/dist/textmode.esm.js +2145 -1808
  2. package/dist/textmode.esm.min.js +1715 -1377
  3. package/dist/textmode.umd.js +9 -9
  4. package/dist/textmode.umd.min.js +8 -7
  5. package/dist/types/assets/shaders-minified/frag/image-to-mrt.d.ts +14 -0
  6. package/dist/types/assets/shaders-minified/frag/present.d.ts +14 -0
  7. package/dist/types/assets/shaders-minified/index.d.ts +2 -0
  8. package/dist/types/index.d.ts +1 -0
  9. package/dist/types/rendering/index.d.ts +0 -2
  10. package/dist/types/rendering/webgl/DrawQueue.d.ts +9 -7
  11. package/dist/types/rendering/webgl/InstanceData.d.ts +15 -15
  12. package/dist/types/rendering/webgl/RenderPipeline.d.ts +1 -0
  13. package/dist/types/rendering/webgl/RenderState.d.ts +13 -19
  14. package/dist/types/rendering/webgl/Renderer.d.ts +13 -2
  15. package/dist/types/rendering/webgl/Shader.d.ts +20 -5
  16. package/dist/types/rendering/webgl/ShaderManager.d.ts +12 -11
  17. package/dist/types/rendering/webgl/geometries/BaseGeometry.d.ts +2 -1
  18. package/dist/types/rendering/webgl/types/DrawCommand.d.ts +2 -2
  19. package/dist/types/textmode/Canvas.d.ts +6 -0
  20. package/dist/types/textmode/TextmodeImage.d.ts +92 -0
  21. package/dist/types/textmode/Textmodifier.d.ts +17 -2
  22. package/dist/types/textmode/font/CharacterExtractor.d.ts +14 -14
  23. package/dist/types/textmode/font/MetricsCalculator.d.ts +1 -21
  24. package/dist/types/textmode/font/typr/Typr.d.ts +2 -0
  25. package/dist/types/textmode/font/typr/types.d.ts +6 -0
  26. package/dist/types/textmode/font/utils/index.d.ts +0 -1
  27. package/dist/types/textmode/mixins/AnimationMixin.d.ts +8 -0
  28. package/dist/types/textmode/mixins/FontMixin.d.ts +43 -3
  29. package/dist/types/textmode/mixins/KeyboardMixin.d.ts +2 -3
  30. package/dist/types/textmode/mixins/MouseMixin.d.ts +6 -6
  31. package/dist/types/textmode/mixins/RenderingMixin.d.ts +23 -5
  32. package/package.json +1 -1
  33. package/dist/types/rendering/webgl/types/ShaderTypes.d.ts +0 -35
  34. package/dist/types/textmode/font/utils/CmapParser.d.ts +0 -47
@@ -1,2152 +1,2474 @@
1
- var q = Object.defineProperty;
2
- var AA = (E, A, t) => A in E ? q(E, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : E[A] = t;
3
- var Q = (E, A, t) => AA(E, typeof A != "symbol" ? A + "" : A, t);
4
- class I extends Error {
5
- constructor(A, t = {}) {
6
- super(I.A(A, t)), this.name = "TextmodeError";
7
- }
8
- static A(A, t) {
9
- return `${A}${t && Object.keys(t).length > 0 ? `
1
+ var ct = Object.defineProperty;
2
+ var lt = (a, t, e) => t in a ? ct(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
+ var h = (a, t, e) => lt(a, typeof t != "symbol" ? t + "" : t, e);
4
+ class U extends Error {
5
+ constructor(t, e = {}) {
6
+ super(U.i(t, e)), this.name = "TextmodeError";
7
+ }
8
+ static i(t, e) {
9
+ return `${t}${e && Object.keys(e).length > 0 ? `
10
10
 
11
- 📋 Context:` + Object.entries(t).map(([e, s]) => `
12
- - ${e}: ${I.C(s)}`).join("") : ""}
11
+ 📋 Context:` + Object.entries(e).map(([i, s]) => `
12
+ - ${i}: ${U.o(s)}`).join("") : ""}
13
13
 
14
14
  ${"↓".repeat(24)}
15
15
  `;
16
16
  }
17
- static C(A) {
18
- if (A === null) return "null";
19
- if (A === void 0) return "undefined";
20
- if (typeof A == "string") return `"${A}"`;
21
- if (typeof A == "number" || typeof A == "boolean") return A + "";
22
- if (Array.isArray(A)) return A.length === 0 ? "[]" : A.length <= 5 ? `[${A.map((t) => I.C(t)).join(", ")}]` : `[${A.slice(0, 3).map((t) => I.C(t)).join(", ")}, ... +${A.length - 3} more]`;
23
- if (typeof A == "object") {
24
- const t = Object.keys(A);
25
- return t.length === 0 ? "{}" : t.length <= 3 ? `{ ${t.map((e) => `${e}: ${I.C(A[e])}`).join(", ")} }` : `{ ${t.slice(0, 2).map((e) => `${e}: ${I.C(A[e])}`).join(", ")}, ... +${t.length - 2} more }`;
17
+ static o(t) {
18
+ if (t === null) return "null";
19
+ if (t === void 0) return "undefined";
20
+ if (typeof t == "string") return `"${t}"`;
21
+ if (typeof t == "number" || typeof t == "boolean") return t + "";
22
+ if (Array.isArray(t)) return t.length === 0 ? "[]" : t.length <= 5 ? `[${t.map((e) => U.o(e)).join(", ")}]` : `[${t.slice(0, 3).map((e) => U.o(e)).join(", ")}, ... +${t.length - 3} more]`;
23
+ if (typeof t == "object") {
24
+ const e = Object.keys(t);
25
+ return e.length === 0 ? "{}" : e.length <= 3 ? `{ ${e.map((i) => `${i}: ${U.o(t[i])}`).join(", ")} }` : `{ ${e.slice(0, 2).map((i) => `${i}: ${U.o(t[i])}`).join(", ")}, ... +${e.length - 2} more }`;
26
26
  }
27
- return A + "";
27
+ return t + "";
28
28
  }
29
29
  }
30
- var tA = ((E) => (E[E.SILENT = 0] = "SILENT", E[E.WARNING = 1] = "WARNING", E[E.ERROR = 2] = "ERROR", E[E.THROW = 3] = "THROW", E))(tA || {});
31
- const y = class y {
30
+ var ut = ((a) => (a[a.SILENT = 0] = "SILENT", a[a.WARNING = 1] = "WARNING", a[a.ERROR = 2] = "ERROR", a[a.THROW = 3] = "THROW", a))(ut || {});
31
+ const M = class M {
32
32
  constructor() {
33
- Q(this, "P", { globalLevel: 3 });
33
+ h(this, "u", { globalLevel: 3 });
34
34
  }
35
- static u() {
36
- return y.D || (y.D = new y()), y.D;
35
+ static m() {
36
+ return M.l || (M.l = new M()), M.l;
37
37
  }
38
- I(A, t) {
39
- const e = "%c[textmode.js] Oops! (╯°□°)╯︵ Something went wrong in your code.", s = "color: #f44336; font-weight: bold; background: #ffebee; padding: 2px 6px; border-radius: 3px;";
40
- switch (this.P.globalLevel) {
38
+ _(t, e) {
39
+ const i = "%c[textmode.js] Oops! (╯°□°)╯︵ Something went wrong in your code.", s = "color: #f44336; font-weight: bold; background: #ffebee; padding: 2px 6px; border-radius: 3px;";
40
+ switch (this.u.globalLevel) {
41
41
  case 0:
42
42
  return !1;
43
43
  case 1:
44
- return console.group(e, s), console.warn(I.A(A, t)), console.groupEnd(), !1;
44
+ return console.group(i, s), console.warn(U.i(t, e)), console.groupEnd(), !1;
45
45
  case 2:
46
- return console.group(e, s), console.error(I.A(A, t)), console.groupEnd(), !1;
46
+ return console.group(i, s), console.error(U.i(t, e)), console.groupEnd(), !1;
47
47
  default:
48
- throw new I(A, t);
48
+ throw new U(t, e);
49
49
  }
50
50
  }
51
- _(A, t, e) {
52
- return !!A || (this.I(t, e), !1);
51
+ v(t, e, i) {
52
+ return !!t || (this._(e, i), !1);
53
53
  }
54
- v(A) {
55
- this.P.globalLevel = A;
54
+ A(t) {
55
+ this.u.globalLevel = t;
56
56
  }
57
57
  };
58
- Q(y, "D", null);
59
- let L = y;
60
- const M = L.u(), V = /* @__PURE__ */ new WeakMap();
61
- function F(E, A) {
62
- V.set(E, A);
58
+ h(M, "l", null);
59
+ let K = M;
60
+ const N = K.m(), ot = /* @__PURE__ */ new WeakMap();
61
+ function H(a, t) {
62
+ ot.set(a, t);
63
63
  }
64
- function G(E) {
65
- return V.get(E);
64
+ function k(a) {
65
+ return ot.get(a);
66
66
  }
67
- class X {
67
+ class at {
68
68
  constructor() {
69
- Q(this, "$", 1);
70
- Q(this, "G", 0);
71
- Q(this, "M", 0);
72
- Q(this, "Y", 0);
73
- Q(this, "F", [0, 0, 0]);
74
- Q(this, "R", [1, 1, 1, 1]);
75
- Q(this, "S", [0, 0, 0, 1]);
76
- Q(this, "L", !1);
77
- Q(this, "O", !1);
78
- Q(this, "U", !1);
79
- Q(this, "W", [0, 0]);
80
- Q(this, "H", [0, 0, 0, 1]);
81
- Q(this, "K", []);
82
- }
83
- J() {
84
- this.K.push({ V: this.$, Z: this.G, N: this.M, X: this.Y, W: [...this.W], L: this.L, O: this.O, U: this.U, AA: [...this.F], tA: [...this.R], eA: [...this.S] });
85
- }
86
- sA() {
87
- const A = this.K.pop();
88
- A ? (this.$ = A.V, this.G = A.Z, this.M = A.N, this.Y = A.X, this.W = A.W, this.L = A.L, this.O = A.O, this.U = A.U, this.F = A.AA, this.R = A.tA, this.S = A.eA) : console.warn("pop() called without matching push()");
89
- }
90
- iA() {
91
- this.K = [], this.G = 0, this.M = 0, this.Y = 0;
92
- }
93
- BA(A) {
94
- A.lineWeight = this.$, A.rotationX = this.G, A.rotationY = this.M, A.rotationZ = this.Y, A.character[0] = this.F[0], A.character[1] = this.F[1], A.character[2] = this.F[2], A.charColor[0] = this.R[0], A.charColor[1] = this.R[1], A.charColor[2] = this.R[2], A.charColor[3] = this.R[3], A.bgColor[0] = this.S[0], A.bgColor[1] = this.S[1], A.bgColor[2] = this.S[2], A.bgColor[3] = this.S[3], A.flipHorizontally = this.L, A.flipVertically = this.O, A.invert = this.U, A.charRotation[0] = this.W[0], A.charRotation[1] = this.W[1];
69
+ h(this, "C", 1);
70
+ h(this, "U", 0);
71
+ h(this, "$", 0);
72
+ h(this, "M", 0);
73
+ h(this, "F", [0, 0, 0]);
74
+ h(this, "R", [1, 1, 1, 1]);
75
+ h(this, "P", [0, 0, 0, 1]);
76
+ h(this, "S", !1);
77
+ h(this, "G", !1);
78
+ h(this, "D", !1);
79
+ h(this, "L", [0, 0]);
80
+ h(this, "k", [0, 0, 0, 1]);
81
+ h(this, "O", []);
82
+ }
83
+ H() {
84
+ this.O.push({ I: this.C, N: this.U, X: this.$, W: this.M, L: [...this.L], V: this.S, K: this.G, D: this.D, j: [...this.F], Y: [...this.R], q: [...this.P] });
85
+ }
86
+ Z() {
87
+ const t = this.O.pop();
88
+ t ? (this.C = t.I, this.U = t.N, this.$ = t.X, this.M = t.W, this.L = t.L, this.S = t.V, this.G = t.K, this.D = t.D, this.F = t.j, this.R = t.Y, this.P = t.q) : console.warn("pop() called without matching push()");
89
+ }
90
+ J(t) {
91
+ t.I = this.C, t.N = this.U, t.X = this.$, t.W = this.M, t.j[0] = this.F[0], t.j[1] = this.F[1], t.j[2] = this.F[2], t.Y[0] = this.R[0], t.Y[1] = this.R[1], t.Y[2] = this.R[2], t.Y[3] = this.R[3], t.q[0] = this.P[0], t.q[1] = this.P[1], t.q[2] = this.P[2], t.q[3] = this.P[3], t.V = this.S, t.K = this.G, t.D = this.D, t.L[0] = this.L[0], t.L[1] = this.L[1];
95
92
  }
96
93
  get lineWeight() {
97
- return this.$;
94
+ return this.C;
98
95
  }
99
96
  get canvasBackgroundColor() {
100
- return this.H;
97
+ return this.k;
101
98
  }
102
- QA(A) {
103
- this.$ = Math.abs(A);
99
+ tt(t) {
100
+ this.C = Math.abs(t);
104
101
  }
105
- EA(A) {
106
- this.G = A;
102
+ et(t) {
103
+ this.U = t;
107
104
  }
108
- rA(A) {
109
- this.M = A;
105
+ st(t) {
106
+ this.$ = t;
110
107
  }
111
- nA(A) {
112
- this.Y = A;
108
+ it(t) {
109
+ this.M = t;
113
110
  }
114
- gA(A) {
115
- this.F = A;
111
+ rt(t) {
112
+ this.F = t;
116
113
  }
117
- oA(A, t, e, s = 255) {
118
- this.R = [A / 255, t / 255, e / 255, s / 255];
114
+ nt(t, e, i, s = 255) {
115
+ this.R = [t / 255, e / 255, i / 255, s / 255];
119
116
  }
120
- aA(A, t, e, s = 255) {
121
- this.S = [A / 255, t / 255, e / 255, s / 255];
117
+ ot(t, e, i, s = 255) {
118
+ this.P = [t / 255, e / 255, i / 255, s / 255];
122
119
  }
123
- hA(A) {
124
- this.L = A;
120
+ ht(t) {
121
+ this.S = t;
125
122
  }
126
- cA(A) {
127
- this.O = A;
123
+ ct(t) {
124
+ this.G = t;
128
125
  }
129
- CA(A) {
130
- this.U = A;
126
+ lt(t) {
127
+ this.D = t;
131
128
  }
132
- lA(A) {
133
- const t = 255 * A / 360, e = Math.floor(t) / 255, s = Math.round(t - Math.floor(t));
134
- this.W = [e, s];
129
+ ut(t) {
130
+ const e = 255 * t / 360, i = Math.floor(e) / 255, s = Math.round(e - Math.floor(e));
131
+ this.L = [i, s];
135
132
  }
136
- DA(A, t, e, s) {
137
- this.H = [A / 255, t / 255, e / 255, s / 255];
133
+ ft(t, e, i, s) {
134
+ this.k = [t / 255, e / 255, i / 255, s / 255];
138
135
  }
139
136
  }
140
- class U {
141
- constructor(A, t, e = t, s = 1, i = {}, B = null, r = !1) {
142
- Q(this, "PA");
143
- Q(this, "uA");
144
- Q(this, "P");
145
- Q(this, "IA", null);
146
- Q(this, "wA");
147
- Q(this, "fA");
148
- Q(this, "dA", []);
149
- Q(this, "_A");
150
- Q(this, "pA", null);
151
- Q(this, "mA", []);
152
- Q(this, "vA", null);
153
- Q(this, "yA", !1);
154
- Q(this, "bA", null);
155
- this.PA = t, this.uA = e, this.P = { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte", ...i }, this.wA = A, this._A = Math.min(Math.max(1, s), 8), this.vA = B, this.yA = !!r, this.bA = this.yA ? new X() : null;
156
- const n = A.getParameter(A.MAX_DRAW_BUFFERS), o = A.getParameter(A.MAX_COLOR_ATTACHMENTS);
157
- this._A = Math.min(this._A, n, o), this.fA = A.createFramebuffer(), this.$A(), this.GA(), this.mA = Array(this._A).fill(null);
158
- }
159
- $A() {
160
- const A = this.wA, t = this.P.filter === "linear" ? A.LINEAR : A.NEAREST, e = this.P.wrap === "repeat" ? A.REPEAT : A.CLAMP_TO_EDGE, s = this.P.type === "float" ? A.FLOAT : A.UNSIGNED_BYTE;
161
- for (let i = 0; i < this._A; i++) {
162
- const B = A.createTexture();
163
- A.bindTexture(A.TEXTURE_2D, B), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MIN_FILTER, t), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MAG_FILTER, t), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_S, e), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_T, e), A.texImage2D(A.TEXTURE_2D, 0, A.RGBA, this.PA, this.uA, 0, A.RGBA, s, null), this.dA.push(B);
137
+ class q {
138
+ constructor(t, e, i = e, s = 1, r = {}, n = null, o = !1) {
139
+ h(this, "dt");
140
+ h(this, "gt");
141
+ h(this, "u");
142
+ h(this, "_t", null);
143
+ h(this, "vt");
144
+ h(this, "yt");
145
+ h(this, "At", []);
146
+ h(this, "wt");
147
+ h(this, "Ct", null);
148
+ h(this, "bt", []);
149
+ h(this, "xt", null);
150
+ h(this, "$t", !1);
151
+ h(this, "Mt", null);
152
+ this.dt = e, this.gt = i, this.u = { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte", ...r }, this.vt = t, this.wt = Math.min(Math.max(1, s), 8), this.xt = n, this.$t = !!o, this.Mt = this.$t ? new at() : null;
153
+ const c = t.getParameter(t.MAX_DRAW_BUFFERS), l = t.getParameter(t.MAX_COLOR_ATTACHMENTS);
154
+ this.wt = Math.min(this.wt, c, l), this.yt = t.createFramebuffer(), this.Ft(), this.Rt(), this.bt = Array(this.wt).fill(null);
155
+ }
156
+ Ft() {
157
+ const t = this.vt, e = this.u.filter === "linear" ? t.LINEAR : t.NEAREST, i = this.u.wrap === "repeat" ? t.REPEAT : t.CLAMP_TO_EDGE, s = this.u.type === "float" ? t.FLOAT : t.UNSIGNED_BYTE;
158
+ for (let r = 0; r < this.wt; r++) {
159
+ const n = t.createTexture();
160
+ t.bindTexture(t.TEXTURE_2D, n), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, e), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, e), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, i), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, i), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, this.dt, this.gt, 0, t.RGBA, s, null), this.At.push(n);
164
161
  }
165
- A.bindTexture(A.TEXTURE_2D, null);
162
+ t.bindTexture(t.TEXTURE_2D, null);
166
163
  }
167
- GA() {
168
- const A = this.wA;
169
- if (A.bindFramebuffer(A.FRAMEBUFFER, this.fA), this._A === 1) A.framebufferTexture2D(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, this.dA[0], 0);
164
+ Rt() {
165
+ const t = this.vt;
166
+ if (t.bindFramebuffer(t.FRAMEBUFFER, this.yt), this.wt === 1) t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, this.At[0], 0);
170
167
  else {
171
- const e = [];
172
- for (let s = 0; s < this._A; s++) {
173
- const i = A.COLOR_ATTACHMENT0 + s;
174
- A.framebufferTexture2D(A.FRAMEBUFFER, i, A.TEXTURE_2D, this.dA[s], 0), e.push(i);
168
+ const i = [];
169
+ for (let s = 0; s < this.wt; s++) {
170
+ const r = t.COLOR_ATTACHMENT0 + s;
171
+ t.framebufferTexture2D(t.FRAMEBUFFER, r, t.TEXTURE_2D, this.At[s], 0), i.push(r);
175
172
  }
176
- A.drawBuffers(e);
173
+ t.drawBuffers(i);
177
174
  }
178
- const t = A.checkFramebufferStatus(A.FRAMEBUFFER);
179
- t !== A.FRAMEBUFFER_COMPLETE && console.error("GLFramebuffer is not complete:", t), A.bindFramebuffer(A.FRAMEBUFFER, null);
180
- }
181
- MA(A) {
182
- const t = this.wA;
183
- t.bindTexture(t.TEXTURE_2D, this.dA[0]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, 1), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, t.RGBA, t.UNSIGNED_BYTE, A), t.bindTexture(t.TEXTURE_2D, null);
184
- }
185
- resize(A, t) {
186
- this.PA = A, this.uA = t, this.IA = null, this.mA = Array(this._A).fill(null);
187
- const e = this.wA, s = this.P.type === "float" ? e.FLOAT : e.UNSIGNED_BYTE;
188
- for (const i of this.dA) e.bindTexture(e.TEXTURE_2D, i), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, this.PA, this.uA, 0, e.RGBA, s, null);
189
- e.bindTexture(e.TEXTURE_2D, null);
190
- }
191
- xA(A) {
192
- const t = this.wA, e = this.mA[A];
193
- if (e) return e;
194
- const s = this.PA, i = this.uA, B = new Uint8Array(s * i * 4), r = t.getParameter(t.READ_FRAMEBUFFER_BINDING);
195
- t.bindFramebuffer(t.READ_FRAMEBUFFER, this.fA), t.readBuffer(t.COLOR_ATTACHMENT0 + A), t.readPixels(0, 0, s, i, t.RGBA, t.UNSIGNED_BYTE, B), t.bindFramebuffer(t.READ_FRAMEBUFFER, r);
196
- const n = 4 * s, o = new Uint8Array(B.length);
197
- for (let a = 0; a < i; a++) {
198
- const g = (i - 1 - a) * n, h = a * n;
199
- o.set(B.subarray(g, g + n), h);
175
+ const e = t.checkFramebufferStatus(t.FRAMEBUFFER);
176
+ e !== t.FRAMEBUFFER_COMPLETE && console.error("GLFramebuffer is not complete:", e), t.bindFramebuffer(t.FRAMEBUFFER, null);
177
+ }
178
+ zt(t) {
179
+ const e = this.vt;
180
+ e.bindTexture(e.TEXTURE_2D, this.At[0]), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, 1), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, t), e.bindTexture(e.TEXTURE_2D, null);
181
+ }
182
+ resize(t, e) {
183
+ this.dt = t, this.gt = e, this._t = null, this.bt = Array(this.wt).fill(null);
184
+ const i = this.vt, s = this.u.type === "float" ? i.FLOAT : i.UNSIGNED_BYTE;
185
+ for (const r of this.At) i.bindTexture(i.TEXTURE_2D, r), i.texImage2D(i.TEXTURE_2D, 0, i.RGBA, this.dt, this.gt, 0, i.RGBA, s, null);
186
+ i.bindTexture(i.TEXTURE_2D, null);
187
+ }
188
+ Pt(t) {
189
+ const e = this.vt, i = this.bt[t];
190
+ if (i) return i;
191
+ const s = this.dt, r = this.gt, n = new Uint8Array(s * r * 4), o = e.getParameter(e.READ_FRAMEBUFFER_BINDING);
192
+ e.bindFramebuffer(e.READ_FRAMEBUFFER, this.yt), e.readBuffer(e.COLOR_ATTACHMENT0 + t), e.readPixels(0, 0, s, r, e.RGBA, e.UNSIGNED_BYTE, n), e.bindFramebuffer(e.READ_FRAMEBUFFER, o);
193
+ const c = 4 * s, l = new Uint8Array(n.length);
194
+ for (let f = 0; f < r; f++) {
195
+ const u = (r - 1 - f) * c, g = f * c;
196
+ l.set(n.subarray(u, u + c), g);
200
197
  }
201
- return this.mA[A] = o, o;
198
+ return this.bt[t] = l, l;
202
199
  }
203
200
  begin() {
204
- var t, e, s, i;
205
- const A = this.wA;
206
- if (this.vA) {
207
- const B = ((e = (t = this.vA).YA) == null ? void 0 : e.call(t)) ?? null;
208
- B && this.vA.FA(B), this.yA && this.bA && ((i = (s = this.vA).RA) == null || i.call(s, this.bA));
201
+ var e, i, s, r;
202
+ const t = this.vt;
203
+ if (this.xt) {
204
+ const n = ((i = (e = this.xt).Tt) == null ? void 0 : i.call(e)) ?? null;
205
+ n && this.xt.St(n), this.$t && this.Mt && ((r = (s = this.xt).Et) == null || r.call(s, this.Mt));
209
206
  }
210
- this.pA = { framebuffer: A.getParameter(A.FRAMEBUFFER_BINDING), viewport: A.getParameter(A.VIEWPORT) }, A.bindFramebuffer(A.FRAMEBUFFER, this.fA), this.mA = Array(this._A).fill(null);
211
- for (let B = 0; B < this._A; B++) A.clearBufferfv(A.COLOR, B, new Float32Array([0, 0, 0, 0]));
212
- A.viewport(0, 0, this.PA, this.uA), F(A, [0, 0, this.PA, this.uA]);
207
+ this.Ct = { framebuffer: t.getParameter(t.FRAMEBUFFER_BINDING), viewport: t.getParameter(t.VIEWPORT) }, t.bindFramebuffer(t.FRAMEBUFFER, this.yt), this.bt = Array(this.wt).fill(null);
208
+ for (let n = 0; n < this.wt; n++) t.clearBufferfv(t.COLOR, n, new Float32Array([0, 0, 0, 0]));
209
+ t.viewport(0, 0, this.dt, this.gt), H(t, [0, 0, this.dt, this.gt]);
213
210
  }
214
211
  end() {
215
- var t, e, s, i;
216
- if (!this.pA) return;
217
- const A = this.wA;
218
- if (this.vA) {
219
- const B = ((e = (t = this.vA).YA) == null ? void 0 : e.call(t)) ?? null;
220
- B && this.vA.FA(B);
212
+ var e, i, s, r;
213
+ if (!this.Ct) return;
214
+ const t = this.vt;
215
+ if (this.xt) {
216
+ const n = ((i = (e = this.xt).Tt) == null ? void 0 : i.call(e)) ?? null;
217
+ n && this.xt.St(n);
221
218
  }
222
- A.bindFramebuffer(A.FRAMEBUFFER, this.pA.framebuffer), A.viewport(...this.pA.viewport), F(A, this.pA.viewport), this.pA = null, this.vA && this.yA && this.bA && ((i = (s = this.vA).SA) == null || i.call(s));
219
+ t.bindFramebuffer(t.FRAMEBUFFER, this.Ct.framebuffer), t.viewport(...this.Ct.viewport), H(t, this.Ct.viewport), this.Ct = null, this.xt && this.$t && this.Mt && ((r = (s = this.xt).Bt) == null || r.call(s));
223
220
  }
224
- kA() {
225
- const A = this.wA;
226
- A.deleteFramebuffer(this.fA);
227
- for (const t of this.dA) A.deleteTexture(t);
221
+ Gt() {
222
+ const t = this.vt;
223
+ t.deleteFramebuffer(this.yt);
224
+ for (const e of this.At) t.deleteTexture(e);
228
225
  }
229
226
  get width() {
230
- return this.PA;
227
+ return this.dt;
231
228
  }
232
229
  get height() {
233
- return this.uA;
230
+ return this.gt;
234
231
  }
235
232
  get textures() {
236
- return [...this.dA];
233
+ return [...this.At];
237
234
  }
238
235
  }
239
- function k(E) {
240
- return typeof E == "string" ? E : E.sourceCode;
241
- }
242
- class T {
243
- constructor(A, t, e) {
244
- Q(this, "wA");
245
- Q(this, "zA");
246
- Q(this, "LA", /* @__PURE__ */ new Map());
247
- Q(this, "OA", 0);
248
- this.wA = A, this.zA = this.TA(k(t), k(e)), this.UA();
249
- }
250
- UA() {
251
- const A = this.wA.getProgramParameter(this.zA, this.wA.ACTIVE_UNIFORMS);
252
- for (let t = 0; t < A; t++) {
253
- const e = this.wA.getActiveUniform(this.zA, t);
254
- if (e) {
255
- const s = this.wA.getUniformLocation(this.zA, e.name);
256
- s && this.LA.set(e.name, s);
236
+ class _ {
237
+ constructor(t, e, i) {
238
+ h(this, "vt");
239
+ h(this, "Dt");
240
+ h(this, "Lt", /* @__PURE__ */ new Map());
241
+ h(this, "kt", /* @__PURE__ */ new Map());
242
+ h(this, "Ot", 0);
243
+ this.vt = t, this.Dt = this.Ht(e, i), this.It();
244
+ }
245
+ It() {
246
+ const t = this.vt.getProgramParameter(this.Dt, this.vt.ACTIVE_UNIFORMS);
247
+ for (let e = 0; e < t; e++) {
248
+ const i = this.vt.getActiveUniform(this.Dt, e);
249
+ if (i) {
250
+ const s = this.vt.getUniformLocation(this.Dt, i.name);
251
+ if (s && (this.Lt.set(i.name, s), this.kt.set(i.name, { type: i.type, size: i.size }), i.size > 1)) {
252
+ const r = i.name.replace(/\[.*\]$/, "");
253
+ this.Lt.has(r) || (this.Lt.set(r, s), this.kt.set(r, { type: i.type, size: i.size }));
254
+ }
257
255
  }
258
256
  }
259
257
  }
260
- TA(A, t) {
261
- const e = this.WA(this.wA.VERTEX_SHADER, A), s = this.WA(this.wA.FRAGMENT_SHADER, t), i = this.wA.createProgram();
262
- if (this.wA.attachShader(i, e), this.wA.attachShader(i, s), this.wA.linkProgram(i), !this.wA.getProgramParameter(i, this.wA.LINK_STATUS)) {
263
- const B = this.wA.getProgramInfoLog(i);
264
- throw Error("Shader program link error: " + B);
258
+ Ht(t, e) {
259
+ const i = this.Nt(this.vt.VERTEX_SHADER, t), s = this.Nt(this.vt.FRAGMENT_SHADER, e), r = this.vt.createProgram();
260
+ if (this.vt.attachShader(r, i), this.vt.attachShader(r, s), this.vt.linkProgram(r), !this.vt.getProgramParameter(r, this.vt.LINK_STATUS)) {
261
+ const n = this.vt.getProgramInfoLog(r);
262
+ throw Error("Shader program link error: " + n);
265
263
  }
266
- return this.wA.deleteShader(e), this.wA.deleteShader(s), i;
264
+ return this.vt.deleteShader(i), this.vt.deleteShader(s), r;
267
265
  }
268
- WA(A, t) {
269
- const e = this.wA.createShader(A);
270
- if (this.wA.shaderSource(e, t), this.wA.compileShader(e), !this.wA.getShaderParameter(e, this.wA.COMPILE_STATUS)) {
271
- const s = this.wA.getShaderInfoLog(e);
272
- throw this.wA.deleteShader(e), Error("Shader compilation error: " + s);
266
+ Nt(t, e) {
267
+ const i = this.vt.createShader(t);
268
+ if (this.vt.shaderSource(i, e), this.vt.compileShader(i), !this.vt.getShaderParameter(i, this.vt.COMPILE_STATUS)) {
269
+ const s = this.vt.getShaderInfoLog(i);
270
+ throw this.vt.deleteShader(i), Error("Shader compilation error: " + s);
273
271
  }
274
- return e;
272
+ return i;
275
273
  }
276
- HA() {
277
- this.wA.useProgram(this.zA), this.KA();
274
+ Xt() {
275
+ this.vt.useProgram(this.Dt), this.Wt();
278
276
  }
279
- KA() {
280
- this.OA = 0;
277
+ Wt() {
278
+ this.Ot = 0;
281
279
  }
282
- JA(A) {
283
- for (const [t, e] of Object.entries(A)) this.VA(t, e);
280
+ Vt(t) {
281
+ for (const [e, i] of Object.entries(t)) this.Kt(e, i);
284
282
  }
285
- ZA(A) {
286
- return this.LA.has(A);
283
+ jt(t) {
284
+ return this.Lt.has(t);
287
285
  }
288
- VA(A, t) {
289
- var s;
290
- const e = this.LA.get(A);
291
- if (e) if (typeof t == "number") this.wA.uniform1f(e, t);
292
- else if (typeof t == "boolean") this.wA.uniform1i(e, t ? 1 : 0);
293
- else if (Array.isArray(t)) if (Array.isArray(t[0])) {
294
- const i = t, B = ((s = i[0]) == null ? void 0 : s.length) || 0, r = i.flat();
295
- switch (B) {
296
- case 2:
297
- this.wA.uniform2fv(e, r);
286
+ Yt(t) {
287
+ return this.kt.get(t) || null;
288
+ }
289
+ qt() {
290
+ const t = [];
291
+ for (const [e, i] of this.kt.entries()) t.push({ name: e, ...i });
292
+ return t;
293
+ }
294
+ Kt(t, e) {
295
+ var c;
296
+ const i = this.Lt.get(t);
297
+ if (!i) return;
298
+ const s = this.kt.get(t);
299
+ if (!s) return void console.warn(`No type information found for uniform '${t}'`);
300
+ const { type: r, size: n } = s, o = this.vt;
301
+ if (typeof e == "number") switch (r) {
302
+ case o.INT:
303
+ case o.BOOL:
304
+ o.uniform1i(i, e);
305
+ break;
306
+ case o.FLOAT:
307
+ o.uniform1f(i, e);
308
+ break;
309
+ default:
310
+ console.warn(`Unexpected uniform type for scalar '${t}': ${r}`), o.uniform1f(i, e);
311
+ }
312
+ else if (typeof e == "boolean") o.uniform1i(i, e ? 1 : 0);
313
+ else if (Array.isArray(e)) if (Array.isArray(e[0])) {
314
+ const l = e, f = ((c = l[0]) == null ? void 0 : c.length) || 0, u = l.flat();
315
+ switch (r) {
316
+ case o.FLOAT_VEC2:
317
+ f === 2 ? o.uniform2fv(i, u) : console.warn(`Vector length mismatch for '${t}': expected 2, got ${f}`);
298
318
  break;
299
- case 3:
300
- this.wA.uniform3fv(e, r);
319
+ case o.FLOAT_VEC3:
320
+ f === 3 ? o.uniform3fv(i, u) : console.warn(`Vector length mismatch for '${t}': expected 3, got ${f}`);
301
321
  break;
302
- case 4:
303
- this.wA.uniform4fv(e, r);
322
+ case o.FLOAT_VEC4:
323
+ f === 4 ? o.uniform4fv(i, u) : console.warn(`Vector length mismatch for '${t}': expected 4, got ${f}`);
304
324
  break;
305
325
  default:
306
- return void console.warn(`Unsupported vector array length for '${A}': ${B}`);
326
+ console.warn(`Unsupported uniform type for vector array '${t}': ${r}`);
307
327
  }
308
- } else switch (t.length) {
309
- case 2:
310
- this.wA.uniform2f(e, t[0], t[1]);
328
+ } else switch (r) {
329
+ case o.FLOAT_VEC2:
330
+ e.length === 2 ? o.uniform2f(i, e[0], e[1]) : console.warn(`Vector length mismatch for '${t}': expected 2, got ${e.length}`);
311
331
  break;
312
- case 3:
313
- this.wA.uniform3f(e, t[0], t[1], t[2]);
332
+ case o.FLOAT_VEC3:
333
+ e.length === 3 ? o.uniform3f(i, e[0], e[1], e[2]) : console.warn(`Vector length mismatch for '${t}': expected 3, got ${e.length}`);
314
334
  break;
315
- case 4:
316
- this.wA.uniform4f(e, t[0], t[1], t[2], t[3]);
335
+ case o.FLOAT_VEC4:
336
+ e.length === 4 ? o.uniform4f(i, e[0], e[1], e[2], e[3]) : console.warn(`Vector length mismatch for '${t}': expected 4, got ${e.length}`);
337
+ break;
338
+ case o.INT:
339
+ n > 1 ? o.uniform1iv(i, e) : console.warn(`Array provided for scalar uniform '${t}'`);
340
+ break;
341
+ case o.FLOAT:
342
+ n > 1 ? o.uniform1fv(i, e) : console.warn(`Array provided for scalar uniform '${t}'`);
317
343
  break;
318
344
  default:
319
- return;
345
+ console.warn(`Unsupported uniform type for array '${t}': ${r}`);
320
346
  }
321
- else if (t instanceof WebGLTexture) {
322
- const i = this.NA();
323
- this.wA.uniform1i(e, i), this.wA.activeTexture(this.wA.TEXTURE0 + i), this.wA.bindTexture(this.wA.TEXTURE_2D, t);
324
- } else if (t instanceof U) {
325
- const i = this.NA();
326
- this.wA.uniform1i(e, i), this.wA.activeTexture(this.wA.TEXTURE0 + i), this.wA.bindTexture(this.wA.TEXTURE_2D, t.textures[0]);
327
- } else console.warn(`Unsupported uniform type for '${A}':`, typeof t);
347
+ else if (e instanceof WebGLTexture) {
348
+ const l = this.Zt();
349
+ o.uniform1i(i, l), o.activeTexture(o.TEXTURE0 + l), o.bindTexture(o.TEXTURE_2D, e);
350
+ } else if (e instanceof q) {
351
+ const l = this.Zt();
352
+ o.uniform1i(i, l), o.activeTexture(o.TEXTURE0 + l), o.bindTexture(o.TEXTURE_2D, e.textures[0]);
353
+ } else console.warn(`Unsupported uniform type for '${t}':`, typeof e);
328
354
  }
329
- NA() {
330
- return this.OA++;
355
+ Zt() {
356
+ return this.Ot++;
331
357
  }
332
- get XA() {
333
- return this.zA;
358
+ get Qt() {
359
+ return this.Dt;
334
360
  }
335
- kA() {
336
- this.wA.deleteProgram(this.zA);
361
+ Gt() {
362
+ this.vt.deleteProgram(this.Dt);
337
363
  }
338
364
  }
339
- const S = `#version 300 es
340
- in vec2 a_position;in vec2 a_texCoord;in vec2 a_instancePosition;in vec2 a_instanceSize;in vec3 a_instanceCharacter;in vec4 a_instancePrimaryColor;in vec4 a_instanceSecondaryColor;in vec2 a_instanceRotation;in vec3 a_instanceTransform;in vec3 a_instanceGlobalRotation;in vec2 a_instanceRotationCenter;in vec2 a_instanceBezierCP1;in vec2 a_instanceBezierCP2;in vec2 a_instanceBezierStart;in vec2 a_instanceBezierEnd;in vec2 a_instanceArcAngles;uniform float k;uniform vec2 t;out vec2 v_uv;out vec3 v_character;out vec4 v_primaryColor;out vec4 v_secondaryColor;out vec2 v_rotation;out vec3 v_transform;mat3 A(float B){float C=sin(B),D=cos(B);return mat3(1,0,0,0,D,-C,0,C,D);}mat3 E(float B){float C=sin(B),D=cos(B);return mat3(D,0,C,0,1,0,-C,0,D);}mat3 F(float B){float C=sin(B),D=cos(B);return mat3(D,-C,0,C,D,0,0,0,1);}vec2 G(float t,vec2 H,vec2 I,vec2 J,vec2 K){float L=1.-t,M=L*L,N=t*t;return M*L*H+3.*M*t*I+3.*L*N*J+N*t*K;}vec2 O(float t,vec2 H,vec2 I,vec2 J,vec2 K){float L=1.-t,M=L*L,N=t*t;return-3.*M*H+3.*M*I-6.*L*t*I+6.*L*t*J-3.*N*J+3.*N*K;}void main(){v_uv=a_texCoord;v_character=a_instanceCharacter;v_primaryColor=a_instancePrimaryColor;v_secondaryColor=a_instanceSecondaryColor;v_rotation=a_instanceRotation;v_transform=a_instanceTransform;vec2 P;bool Q=length(a_instanceBezierCP1)+length(a_instanceBezierCP2)+length(a_instanceBezierStart)+length(a_instanceBezierEnd)>0.;bool R=a_instanceArcAngles.x!=0.||a_instanceArcAngles.y!=0.;if(Q){float t=a_position.x;vec2 S=G(t,a_instanceBezierStart,a_instanceBezierCP1,a_instanceBezierCP2,a_instanceBezierEnd);vec2 T=O(t,a_instanceBezierStart,a_instanceBezierCP1,a_instanceBezierCP2,a_instanceBezierEnd);float U=length(T);T=U>0.?T/U:vec2(1,0);P=S+vec2(-T.y,T.x)*a_position.y*a_instanceSize.y;}else if(R){float C=a_instanceArcAngles.x,V=a_instanceArcAngles.y;C=mod(C,6.28318530718);if(C<0.)C+=6.28318530718;V=mod(V,6.28318530718);if(V<0.)V+=6.28318530718;float W=C-V;if(W<=0.)W+=6.28318530718;float X=C-a_position.x*W;vec2 Y=vec2(cos(X),sin(X))*a_position.y;P=Y*a_instanceSize*.5+a_instanceSize*.5+a_instancePosition;}else{P=a_position*a_instanceSize+a_instancePosition;}vec2 Z=(P/t)*2.-1.;Z.y=-Z.y;if(length(a_instanceGlobalRotation)>0.){vec3 a=vec3(Z-a_instanceRotationCenter,0);a.x*=k;if(a_instanceGlobalRotation.x!=0.)a=A(-a_instanceGlobalRotation.x)*a;if(a_instanceGlobalRotation.y!=0.)a=E(-a_instanceGlobalRotation.y)*a;if(a_instanceGlobalRotation.z!=0.)a=F(-a_instanceGlobalRotation.z)*a;a.x/=k;Z=a.xy+a_instanceRotationCenter;}gl_Position=vec4(Z,0,1);}`;
341
- class eA {
342
- constructor(A) {
343
- Q(this, "jA", /* @__PURE__ */ new Map());
344
- Q(this, "wA");
345
- this.wA = A;
346
- }
347
- qA(A, t) {
348
- if (!this.jA.has(A)) {
349
- const e = t();
350
- this.jA.set(A, e);
351
- }
352
- return this.jA.get(A);
353
- }
354
- At() {
355
- return this.qA("mrt-copy", () => new T(this.wA, S, `#version 300 es
356
- precision highp float;in vec2 v_uv;uniform sampler2D l;uniform sampler2D m;uniform sampler2D n;uniform sampler2D o;uniform sampler2D p;uniform vec2 q;layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;void main(){vec2 A=vec2(v_uv.x,1.-v_uv.y);vec2 B=A*q;vec2 C=(floor(B)+0.5f)/q;vec4 D=texture(l,C);vec4 E=texture(m,C);if(E.a==0.){discard;}vec4 F=texture(n,C);vec4 G=texture(o,C);vec4 H=texture(p,C);o_character=D;o_primaryColor=E;o_secondaryColor=F;o_rotation=G;o_transform=H;}`));
357
- }
358
- YA() {
359
- return this.qA("mrt-draw", () => new T(this.wA, S, `#version 300 es
360
- precision highp float;in vec2 v_uv;in vec3 v_character;in vec4 v_primaryColor;in vec4 v_secondaryColor;in vec2 v_rotation;in vec3 v_transform;layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;void main(){o_character=vec4(v_character,1.);o_primaryColor=v_primaryColor;o_secondaryColor=v_secondaryColor;o_rotation=vec4(v_rotation,0.,1.);o_transform=vec4(v_transform,1.);}`));
365
+ const X = `#version 300 es
366
+ in vec2 a_position;in vec2 a_texCoord;in vec2 a_instancePosition;in vec2 a_instanceSize;in vec3 a_instanceCharacter;in vec4 a_instancePrimaryColor;in vec4 a_instanceSecondaryColor;in vec2 a_instanceRotation;in vec3 a_instanceTransform;in vec3 a_instanceGlobalRotation;in vec2 a_instanceRotationCenter;in vec2 a_instanceBezierCP1;in vec2 a_instanceBezierCP2;in vec2 a_instanceBezierStart;in vec2 a_instanceBezierEnd;in vec2 a_instanceArcAngles;uniform float U9;uniform vec2 Uy;out vec2 v_uv;out vec3 v_character;out vec4 v_primaryColor;out vec4 v_secondaryColor;out vec2 v_rotation;out vec3 v_transform;mat3 A(float B){float C=sin(B),D=cos(B);return mat3(1,0,0,0,D,-C,0,C,D);}mat3 E(float B){float C=sin(B),D=cos(B);return mat3(D,0,C,0,1,0,-C,0,D);}mat3 F(float B){float C=sin(B),D=cos(B);return mat3(D,-C,0,C,D,0,0,0,1);}vec2 G(float H,vec2 I,vec2 J,vec2 K,vec2 L){float M=1.-H,N=M*M,O=H*H;return N*M*I+3.*N*H*J+3.*M*O*K+O*H*L;}vec2 P(float H,vec2 I,vec2 J,vec2 K,vec2 L){float M=1.-H,N=M*M,O=H*H;return-3.*N*I+3.*N*J-6.*M*H*J+6.*M*H*K-3.*O*K+3.*O*L;}void main(){v_uv=a_texCoord;v_character=a_instanceCharacter;v_primaryColor=a_instancePrimaryColor;v_secondaryColor=a_instanceSecondaryColor;v_rotation=a_instanceRotation;v_transform=a_instanceTransform;vec2 Q;bool R=length(a_instanceBezierCP1)+length(a_instanceBezierCP2)+length(a_instanceBezierStart)+length(a_instanceBezierEnd)>0.;bool S=a_instanceArcAngles.x!=0.||a_instanceArcAngles.y!=0.;if(R){float H=a_position.x;vec2 T=G(H,a_instanceBezierStart,a_instanceBezierCP1,a_instanceBezierCP2,a_instanceBezierEnd);vec2 U=P(H,a_instanceBezierStart,a_instanceBezierCP1,a_instanceBezierCP2,a_instanceBezierEnd);float V=length(U);U=V>0.?U/V:vec2(1,0);Q=T+vec2(-U.y,U.x)*a_position.y*a_instanceSize.y;}else if(S){float C=a_instanceArcAngles.x,W=a_instanceArcAngles.y;C=mod(C,6.28318530718);if(C<0.)C+=6.28318530718;W=mod(W,6.28318530718);if(W<0.)W+=6.28318530718;float X=C-W;if(X<=0.)X+=6.28318530718;float Y=C-a_position.x*X;vec2 Z=vec2(cos(Y),sin(Y))*a_position.y;Q=Z*a_instanceSize*.5+a_instanceSize*.5+a_instancePosition;}else{Q=a_position*a_instanceSize+a_instancePosition;}vec2 a=(Q/Uy)*2.-1.;a.y=-a.y;if(length(a_instanceGlobalRotation)>0.){vec3 b=vec3(a-a_instanceRotationCenter,0);b.x*=U9;if(a_instanceGlobalRotation.x!=0.)b=A(-a_instanceGlobalRotation.x)*b;if(a_instanceGlobalRotation.y!=0.)b=E(-a_instanceGlobalRotation.y)*b;if(a_instanceGlobalRotation.z!=0.)b=F(-a_instanceGlobalRotation.z)*b;b.x/=U9;a=b.xy+a_instanceRotationCenter;}gl_Position=vec4(a,0,1);}`, ht = "attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;void main(){v_uv=a_texCoord;gl_Position=vec4(a_position,0.,1.);}";
367
+ class ft {
368
+ constructor(t) {
369
+ h(this, "vt");
370
+ h(this, "Jt");
371
+ h(this, "te");
372
+ h(this, "ee");
373
+ h(this, "se");
374
+ this.vt = t, this.te = new _(this.vt, X, `#version 300 es
375
+ precision highp float;in vec2 v_uv;in vec3 v_character;in vec4 v_primaryColor;in vec4 v_secondaryColor;in vec2 v_rotation;in vec3 v_transform;layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;void main(){o_character=vec4(v_character,1.);o_primaryColor=v_primaryColor;o_secondaryColor=v_secondaryColor;o_rotation=vec4(v_rotation,0.,1.);o_transform=vec4(v_transform,1.);}`), this.Jt = new _(this.vt, X, `#version 300 es
376
+ precision highp float;in vec2 v_uv;uniform sampler2D Ue;uniform sampler2D Uf;uniform sampler2D Ug;uniform sampler2D Uh;uniform sampler2D Ui;uniform vec2 Uj;layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;void main(){vec2 A=vec2(v_uv.x,1.-v_uv.y);vec2 B=A*Uj;vec2 C=(floor(B)+0.5f)/Uj;vec4 D=texture(Ue,C);vec4 E=texture(Uf,C);if(E.a==0.){discard;}vec4 F=texture(Ug,C);vec4 G=texture(Uh,C);vec4 H=texture(Ui,C);o_character=D;o_primaryColor=E;o_secondaryColor=F;o_rotation=G;o_transform=H;}`), this.ee = new _(this.vt, ht, "precision mediump float;uniform sampler2D U0;uniform vec2 U1;uniform sampler2D U3;uniform sampler2D U4;uniform sampler2D U5;uniform sampler2D U2;uniform sampler2D U6;uniform vec2 U7;uniform vec2 U8;mat2 A(float B){float C=sin(B);float D=cos(B);return mat2(D,-C,C,D);}void main(){vec2 E=gl_FragCoord.xy/U8;vec2 F=E*U7;vec2 G=floor(F);vec2 H=(G+0.5)/U7;vec4 I=texture2D(U3,H);vec4 J=texture2D(U4,H);vec4 K=texture2D(U5,H);bool L=K.r>0.5;bool M=K.g>0.5;bool N=K.b>0.5;vec4 O=texture2D(U2,H);int P=int(O.r*255.+0.5)+int(O.g*255.+0.5)*256;int Q=int(mod(float(P),U1.x));int R=P/int(U1.x);float S=(U1.y-1.)-float(R);vec2 T=vec2(float(Q),S)/U1;vec4 U=texture2D(U6,H);float V=U.r*255.+U.g;float W=-(V*360./255.)*0.017453292;vec2 X=fract(F)-0.5;if(M)X.x=-X.x;if(N)X.y=-X.y;X=A(W)*X+0.5;vec2 Y=1./U1;vec2 Z=T+X*Y;vec2 a=T+Y;if(any(lessThan(Z,T))||any(greaterThan(Z,a))){gl_FragColor=L?I:J;return;}vec4 b=texture2D(U0,Z);if(L)b.rgb=1.-b.rgb;gl_FragColor=mix(J,I,b);}"), this.se = new _(this.vt, X, `#version 300 es
377
+ precision highp float;in vec2 v_uv;uniform sampler2D Uk;uniform bool Ul;uniform bool Um;uniform bool Un;uniform vec2 Uo;uniform bool Up;uniform vec3 Uq;uniform bool Ur;uniform vec3 Us;uniform vec4 Ut;uniform int Uu;uniform vec3 Uv[64];layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;float A(vec3 B){return dot(B,vec3(0.299,0.587,0.114));}void main(){vec2 C=vec2(v_uv.x,1.-v_uv.y);vec4 D=texture(Uk,C);float E=A(D.rgb);if(Uu>0){float F=float(Uu);float G=clamp(E*(F-1.),0.,F-1.);int H=int(floor(G+0.5));vec3 I=Uv[H];o_character=vec4(I,1.);}else{o_character=vec4(E,0.,0.,1.);}vec3 J=D.rgb;vec3 K=Up?Uq:J;vec3 L=Ur?Us:J;float M=Up?1.:D.a;float N;if(D.a<0.01){K=Ut.rgb;L=Ut.rgb;M=Ut.a;N=Ut.a;}else{N=Ur?1.:D.a;}o_primaryColor=vec4(K,M);o_secondaryColor=vec4(L,N);o_rotation=vec4(Uo.xy,0.,1.);o_transform=vec4(float(Ul),float(Um),float(Un),1.);}`);
378
+ }
379
+ ie() {
380
+ return this.Jt;
381
+ }
382
+ Tt() {
383
+ return this.te;
384
+ }
385
+ re() {
386
+ return this.ee;
361
387
  }
362
- tt() {
363
- return this.qA("ascii-conversion", () => new T(this.wA, "attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;void main(){v_uv=a_texCoord;gl_Position=vec4(a_position,0.,1.);}", "precision mediump float;uniform sampler2D a;uniform vec2 b;uniform sampler2D d;uniform sampler2D e;uniform sampler2D f;uniform sampler2D c;uniform sampler2D g;uniform vec2 h;uniform vec2 i;uniform vec2 j;mat2 A(float B){float C=sin(B);float c=cos(B);return mat2(c,-C,C,c);}void main(){vec2 D=(gl_FragCoord.xy-j)/i;vec2 E=D*h;vec2 F=floor(E);vec2 G=(F+0.5)/h;vec4 H=texture2D(d,G);vec4 I=texture2D(e,G);vec4 J=texture2D(f,G);bool K=J.r>0.5;bool L=J.g>0.5;bool M=J.b>0.5;vec4 N=texture2D(c,G);int O=int(N.r*255.+0.5)+int(N.g*255.+0.5)*256;int P=int(mod(float(O),b.x));int Q=O/int(b.x);float R=(b.y-1.)-float(Q);vec2 S=vec2(float(P),R)/b;vec4 T=texture2D(g,G);float U=T.r*255.+T.g;float V=-(U*360./255.)*0.017453292;vec2 W=fract(E)-0.5;if(L)W.x=-W.x;if(M)W.y=-W.y;W=A(V)*W+0.5;vec2 X=1./b;vec2 Y=S+W*X;vec2 Z=S+X;if(any(lessThan(Y,S))||any(greaterThan(Y,Z))){gl_FragColor=K?H:I;return;}vec4 a=texture2D(a,Y);if(K)a.rgb=1.-a.rgb;gl_FragColor=mix(I,H,a);}"));
388
+ ne() {
389
+ return this.se;
364
390
  }
365
- et(A) {
366
- return new T(this.wA, S, A);
391
+ oe(t) {
392
+ return new _(this.vt, X, t);
367
393
  }
368
- st(A, t) {
369
- return new T(this.wA, A, t);
394
+ ae(t, e) {
395
+ return new _(this.vt, t, e);
370
396
  }
371
- kA() {
372
- for (const A of this.jA.values()) A.kA();
373
- this.jA.clear();
397
+ Gt() {
398
+ this.Jt.Gt(), this.te.Gt(), this.ee.Gt(), this.se.Gt();
374
399
  }
375
400
  }
376
- var D = ((E) => (E.RECTANGLE = "rectangle", E.LINE = "line", E.ELLIPSE = "ellipse", E.ARC = "arc", E.TRIANGLE = "triangle", E.BEZIER_CURVE = "bezier_curve", E.CUSTOM = "custom", E))(D || {});
377
- class sA {
378
- constructor(A) {
379
- Q(this, "wA");
380
- Q(this, "it", /* @__PURE__ */ new Map());
381
- this.wA = A;
382
- }
383
- Bt(A, t, e, s) {
384
- const i = this.wA;
385
- let B = this.it.get(A);
386
- B || (B = /* @__PURE__ */ new Map(), this.it.set(A, B));
387
- let r = B.get(t) || null;
388
- if (!r) {
389
- r = i.createVertexArray(), B.set(t, r), i.bindVertexArray(r), i.bindBuffer(i.ARRAY_BUFFER, s);
390
- const n = i.getAttribLocation(A, "a_position");
391
- n !== -1 && (i.enableVertexAttribArray(n), i.vertexAttribPointer(n, e.Et.Qt.size, i.FLOAT, !1, e.rt, e.Et.Qt.offset), i.vertexAttribDivisor(n, 0));
392
- const o = i.getAttribLocation(A, "a_texCoord");
393
- o !== -1 && (i.enableVertexAttribArray(o), i.vertexAttribPointer(o, e.Et.nt.size, i.FLOAT, !1, e.rt, e.Et.nt.offset), i.vertexAttribDivisor(o, 0));
401
+ var E = ((a) => (a.RECTANGLE = "rectangle", a.LINE = "line", a.ELLIPSE = "ellipse", a.ARC = "arc", a.TRIANGLE = "triangle", a.BEZIER_CURVE = "bezier_curve", a.CUSTOM = "custom", a))(E || {});
402
+ class dt {
403
+ constructor(t) {
404
+ h(this, "vt");
405
+ h(this, "he", /* @__PURE__ */ new Map());
406
+ this.vt = t;
407
+ }
408
+ ce(t, e, i, s) {
409
+ const r = this.vt;
410
+ let n = this.he.get(t);
411
+ n || (n = /* @__PURE__ */ new Map(), this.he.set(t, n));
412
+ let o = n.get(e) || null;
413
+ if (!o) {
414
+ o = r.createVertexArray(), n.set(e, o), r.bindVertexArray(o), r.bindBuffer(r.ARRAY_BUFFER, s);
415
+ const c = r.getAttribLocation(t, "a_position");
416
+ c !== -1 && (r.enableVertexAttribArray(c), r.vertexAttribPointer(c, i.ue.le.size, r.FLOAT, !1, i.fe, i.ue.le.offset), r.vertexAttribDivisor(c, 0));
417
+ const l = r.getAttribLocation(t, "a_texCoord");
418
+ l !== -1 && (r.enableVertexAttribArray(l), r.vertexAttribPointer(l, i.ue.de.size, r.FLOAT, !1, i.fe, i.ue.de.offset), r.vertexAttribDivisor(l, 0));
394
419
  }
395
- i.bindVertexArray(r);
420
+ r.bindVertexArray(o);
396
421
  }
397
- gt() {
398
- this.wA.bindVertexArray(null);
422
+ pe() {
423
+ this.vt.bindVertexArray(null);
399
424
  }
400
- kA() {
401
- const A = this.wA;
402
- for (const [, t] of this.it) for (const [, e] of t) e && A.deleteVertexArray(e);
403
- this.it.clear();
425
+ Gt() {
426
+ for (const [, t] of this.he) for (const [, e] of t) e && this.vt.deleteVertexArray(e);
404
427
  }
405
428
  }
406
- class iA {
407
- constructor(A, t) {
408
- Q(this, "ot");
409
- Q(this, "wA");
410
- Q(this, "vA");
411
- Q(this, "ht", null);
412
- Q(this, "ct", null);
413
- this.wA = A, this.ot = new sA(A), this.vA = t;
414
- }
415
- Ct(A, t, e) {
416
- const { shader: s } = A, i = G(this.wA) || this.wA.getParameter(this.wA.VIEWPORT);
417
- s.JA({ k: i[2] / i[3], t: [i[2], i[3]] });
418
- const B = (o) => {
419
- if (!o || !o.lt()) return;
420
- const a = o.unitGeometry, g = o.unitBuffer;
429
+ class gt {
430
+ constructor(t, e) {
431
+ h(this, "me");
432
+ h(this, "vt");
433
+ h(this, "xt");
434
+ h(this, "ge", null);
435
+ h(this, "_e", null);
436
+ this.vt = t, this.me = new dt(t), this.xt = e;
437
+ }
438
+ ve(t, e, i) {
439
+ const { shader: s } = t, r = k(this.vt) || this.vt.getParameter(this.vt.VIEWPORT);
440
+ s.Vt({ U9: r[2] / r[3], Uy: [r[2], r[3]] });
441
+ const n = (l) => {
442
+ if (!l || !l.ye()) return;
443
+ const f = l.unitGeometry, u = l.unitBuffer;
421
444
  try {
422
- this.ot.Bt(s.XA, o.type + "", a, g), o.batch.Dt(s), o.batch.Pt(a.ut, a.It);
445
+ this.me.ce(s.Qt, l.type + "", f, u), l.batch.Ae(s), l.batch.we(f.Ce, f.be);
423
446
  } finally {
424
- o.batch.wt(s), this.ot.gt(), o.ft();
447
+ l.batch.xe(s), this.me.pe(), l.$e();
425
448
  }
426
449
  };
427
- let r = null, n = null;
428
- for (const o of t) {
429
- if (o.type === D.CUSTOM) {
430
- n && (B(n), r = null, n = null), this.dt(A, o.params, o.state, e.get(D.RECTANGLE));
450
+ let o = null, c = null;
451
+ for (const l of e) {
452
+ if (l.type === E.CUSTOM) {
453
+ c && (n(c), o = null, c = null), this.Me(t, l.params, l.state, i.get(E.RECTANGLE));
431
454
  continue;
432
455
  }
433
- r !== null && o.type !== r && (B(n), r = null, n = null);
434
- let a = n;
435
- a && o.type === r || (a = e.get(o.type) || null, n = a, r = o.type), a && a._t(o.params, o.state);
456
+ o !== null && l.type !== o && (n(c), o = null, c = null);
457
+ let f = c;
458
+ f && l.type === o || (f = i.get(l.type) || null, c = f, o = l.type), f && f.Fe(l.params, l.state);
436
459
  }
437
- B(n);
438
- }
439
- dt(A, t, e, s) {
440
- const { x: i, y: B, width: r, height: n, shader: o, uniforms: a } = t;
441
- if (o === this.vt()) return this.yt(s, o, a, Math.floor(i), Math.floor(B), Math.max(1, Math.floor(r)), Math.max(1, Math.floor(n)), e), void A.shader.HA();
442
- const g = this.bt(Math.max(1, Math.floor(r)), Math.max(1, Math.floor(n)));
443
- g.begin(), this.yt(s, o, a, 0, 0, g.width, g.height, {}), g.end();
444
- const h = this.vt(), c = { l: g.textures[0], m: g.textures[1], n: g.textures[2], o: g.textures[3], p: g.textures[4], q: [g.width, g.height] };
445
- this.yt(s, h, c, Math.floor(i), Math.floor(B), Math.max(1, Math.floor(r)), Math.max(1, Math.floor(n)), e), A.shader.HA();
446
- }
447
- yt(A, t, e, s, i, B, r, n) {
448
- t.HA(), t.JA(e);
449
- const o = this.wA.getParameter(this.wA.VIEWPORT);
450
- if (t.JA({ k: o[2] / o[3], t: [o[2], o[3]] }), A.ft(), A._t({ x: s, y: i, width: B, height: r }, n), A.lt()) {
451
- const a = A.unitGeometry, g = A.unitBuffer;
460
+ n(c);
461
+ }
462
+ Me(t, e, i, s) {
463
+ const { x: r, y: n, width: o, height: c, shader: l, uniforms: f } = e, u = this.Re(Math.max(1, Math.floor(o)), Math.max(1, Math.floor(c)));
464
+ u.begin(), this.ze(s, l, f, 0, 0, u.width, u.height, {}), u.end();
465
+ const g = this.Pe(), v = { Ue: u.textures[0], Uf: u.textures[1], Ug: u.textures[2], Uh: u.textures[3], Ui: u.textures[4], Uj: [u.width, u.height] };
466
+ this.ze(s, g, v, Math.floor(r), Math.floor(n), Math.max(1, Math.floor(o)), Math.max(1, Math.floor(c)), i), t.shader.Xt();
467
+ }
468
+ ze(t, e, i, s, r, n, o, c) {
469
+ e.Xt(), e.Vt(i);
470
+ const l = this.vt.getParameter(this.vt.VIEWPORT);
471
+ if (e.Vt({ U9: l[2] / l[3], Uy: [l[2], l[3]] }), t.$e(), t.Fe({ x: s, y: r, width: n, height: o }, c), t.ye()) {
472
+ const f = t.unitGeometry, u = t.unitBuffer;
452
473
  try {
453
- this.ot.Bt(t.XA, A.type + "", a, g), A.batch.Dt(t), A.batch.Pt(a.ut, a.It);
474
+ this.me.ce(e.Qt, t.type + "", f, u), t.batch.Ae(e), t.batch.we(f.Ce, f.be);
454
475
  } finally {
455
- A.batch.wt(t), this.ot.gt(), A.ft();
476
+ t.batch.xe(e), this.me.pe(), t.$e();
456
477
  }
457
478
  }
458
479
  }
459
- vt() {
460
- return this.vA.At();
480
+ Pe() {
481
+ return this.xt.ie();
461
482
  }
462
- bt(A, t) {
463
- return this.ht && this.ct && this.ct.w === A && this.ct.h === t || (this.ht && this.ht.kA(), this.ht = new U(this.wA, A, t, 5), this.ct = { w: A, h: t }), this.ht;
483
+ Re(t, e) {
484
+ return this.ge && this._e && this._e.w === t && this._e.h === e || (this.ge && this.ge.Gt(), this.ge = new q(this.vt, t, e, 5), this._e = { w: t, h: e }), this.ge;
485
+ }
486
+ Gt() {
487
+ this.me.Gt(), this.ge && this.ge.Gt();
464
488
  }
465
489
  }
466
- class BA {
490
+ class pt {
467
491
  constructor() {
468
- Q(this, "$t", []);
469
- Q(this, "Gt", 1);
470
- Q(this, "Mt", 0);
471
- }
472
- xt(A) {
473
- if (this.Mt >= this.$t.length) {
474
- const e = { id: this.Gt++, type: A, params: {}, state: { V: 1, Z: 0, N: 0, X: 0, character: [0, 0, 0], charColor: [1, 1, 1, 1], bgColor: [0, 0, 0, 1], flipHorizontally: !1, flipVertically: !1, invert: !1, charRotation: [0, 0] } };
475
- this.$t.push(e);
476
- }
477
- const t = this.$t[this.Mt];
478
- switch (t.id = this.Gt++, t.type = A, A) {
479
- case D.RECTANGLE:
480
- case D.ELLIPSE:
481
- t.params && "width" in t.params || (t.params = { x: 0, y: 0, width: 0, height: 0 });
482
- break;
483
- case D.CUSTOM:
484
- t.params && "shader" in t.params || (t.params = { x: 0, y: 0, width: 0, height: 0, shader: void 0, uniforms: {} });
485
- break;
486
- case D.ARC:
487
- t.params && "start" in t.params || (t.params = { x: 0, y: 0, width: 0, height: 0, start: 0, stop: 0 });
488
- break;
489
- case D.LINE:
490
- t.params && "x2" in t.params || (t.params = { x1: 0, y1: 0, x2: 0, y2: 0, thickness: void 0 });
491
- break;
492
- case D.TRIANGLE:
493
- t.params && "x3" in t.params || (t.params = { x1: 0, y1: 0, x2: 0, y2: 0, x3: 0, y3: 0 });
494
- break;
495
- case D.BEZIER_CURVE:
496
- t.params && "cp2y" in t.params || (t.params = { x1: 0, y1: 0, cp1x: 0, cp1y: 0, cp2x: 0, cp2y: 0, x2: 0, y2: 0, thickness: void 0 });
497
- break;
498
- default:
499
- t.params || (t.params = {});
492
+ h(this, "Te", []);
493
+ h(this, "Se", 1);
494
+ h(this, "Ee", 0);
495
+ }
496
+ Be(t) {
497
+ if (this.Ee >= this.Te.length) {
498
+ const i = { id: this.Se++, type: t, params: {}, state: { I: 1, N: 0, X: 0, W: 0, j: [0, 0, 0], Y: [1, 1, 1, 1], q: [0, 0, 0, 1], V: !1, K: !1, D: !1, L: [0, 0] } };
499
+ this.Te.push(i);
500
500
  }
501
- return this.Mt++, t;
501
+ const e = this.Te[this.Ee];
502
+ return e.id = this.Se++, e.type = t, this.Ee++, e;
502
503
  }
503
- Yt(A, t, e, s, i) {
504
- const B = this.xt(D.RECTANGLE);
505
- return B.params.x = A, B.params.y = t, B.params.width = e, B.params.height = s, i.BA(B.state), B.id;
504
+ Ge(t, e, i, s, r) {
505
+ const n = this.Be(E.RECTANGLE);
506
+ return n.params.x = t, n.params.y = e, n.params.width = i, n.params.height = s, r.J(n.state), n.id;
506
507
  }
507
- Ft(A, t, e, s, i, B, r) {
508
- const n = this.xt(D.CUSTOM);
509
- return n.params.x = A, n.params.y = t, n.params.width = e, n.params.height = s, n.params.shader = i, n.params.uniforms = B, r.BA(n.state), n.id;
508
+ De(t, e, i, s, r, n, o) {
509
+ const c = this.Be(E.CUSTOM);
510
+ return c.params.x = t, c.params.y = e, c.params.width = i, c.params.height = s, c.params.shader = r, c.params.uniforms = n, o.J(c.state), c.id;
510
511
  }
511
- Rt(A, t, e, s, i, B) {
512
- const r = this.xt(D.LINE);
513
- return r.params.x1 = A, r.params.y1 = t, r.params.x2 = e, r.params.y2 = s, r.params.thickness = i, B.BA(r.state), r.id;
512
+ Le(t, e, i, s, r, n) {
513
+ const o = this.Be(E.LINE);
514
+ return o.params.x1 = t, o.params.y1 = e, o.params.x2 = i, o.params.y2 = s, o.params.thickness = r, n.J(o.state), o.id;
514
515
  }
515
- St(A, t, e, s, i) {
516
- const B = this.xt(D.ELLIPSE);
517
- return B.params.x = A, B.params.y = t, B.params.width = e, B.params.height = s, i.BA(B.state), B.id;
516
+ ke(t, e, i, s, r) {
517
+ const n = this.Be(E.ELLIPSE);
518
+ return n.params.x = t, n.params.y = e, n.params.width = i, n.params.height = s, r.J(n.state), n.id;
518
519
  }
519
- kt(A, t, e, s, i, B, r) {
520
- const n = this.xt(D.ARC);
521
- return n.params.x = A, n.params.y = t, n.params.width = e, n.params.height = s, n.params.start = i, n.params.stop = B, r.BA(n.state), n.id;
520
+ Oe(t, e, i, s, r, n, o) {
521
+ const c = this.Be(E.ARC);
522
+ return c.params.x = t, c.params.y = e, c.params.width = i, c.params.height = s, c.params.start = r, c.params.stop = n, o.J(c.state), c.id;
522
523
  }
523
- zt(A, t, e, s, i, B, r) {
524
- const n = this.xt(D.TRIANGLE);
525
- return n.params.x1 = A, n.params.y1 = t, n.params.x2 = e, n.params.y2 = s, n.params.x3 = i, n.params.y3 = B, r.BA(n.state), n.id;
524
+ He(t, e, i, s, r, n, o) {
525
+ const c = this.Be(E.TRIANGLE);
526
+ return c.params.x1 = t, c.params.y1 = e, c.params.x2 = i, c.params.y2 = s, c.params.x3 = r, c.params.y3 = n, o.J(c.state), c.id;
526
527
  }
527
- Lt(A, t, e, s, i, B, r, n, o, a) {
528
- const g = this.xt(D.BEZIER_CURVE);
529
- return g.params.x1 = A, g.params.y1 = t, g.params.cp1x = e, g.params.cp1y = s, g.params.cp2x = i, g.params.cp2y = B, g.params.x2 = r, g.params.y2 = n, g.params.thickness = o, a.BA(g.state), g.id;
528
+ Ie(t, e, i, s, r, n, o, c, l, f) {
529
+ const u = this.Be(E.BEZIER_CURVE);
530
+ return u.params.x1 = t, u.params.y1 = e, u.params.cp1x = i, u.params.cp1y = s, u.params.cp2x = r, u.params.cp2y = n, u.params.x2 = o, u.params.y2 = c, u.params.thickness = l, f.J(u.state), u.id;
530
531
  }
531
532
  get length() {
532
- return this.Mt;
533
+ return this.Ee;
533
534
  }
534
535
  get isEmpty() {
535
- return this.Mt === 0;
536
+ return this.Ee === 0;
536
537
  }
537
- Ot() {
538
- this.Mt = 0;
538
+ Ne() {
539
+ this.Ee = 0;
539
540
  }
540
541
  [Symbol.iterator]() {
541
- let A = 0;
542
- const t = this.Mt, e = this.$t;
543
- return { next: () => A < t ? { value: e[A++], done: !1 } : { value: void 0, done: !0 } };
542
+ let t = 0;
543
+ const e = this.Ee, i = this.Te;
544
+ return { next: () => t < e ? { value: i[t++], done: !1 } : { value: void 0, done: !0 } };
544
545
  }
545
546
  }
546
- const v = class v {
547
- static Tt(A, t, e = 0) {
548
- var B, r, n, o, a, g, h, c, l, C;
549
- const s = t || new Float32Array(v.FLOATS_PER_INSTANCE);
550
- let i = e;
551
- return s[i++] = A.position[0], s[i++] = A.position[1], s[i++] = A.size[0], s[i++] = A.size[1], s[i++] = A.AA[0], s[i++] = A.AA[1], s[i++] = A.AA[2], s[i++] = A.primaryColor[0], s[i++] = A.primaryColor[1], s[i++] = A.primaryColor[2], s[i++] = A.primaryColor[3], s[i++] = A.secondaryColor[0], s[i++] = A.secondaryColor[1], s[i++] = A.secondaryColor[2], s[i++] = A.secondaryColor[3], s[i++] = A.rotation[0], s[i++] = A.rotation[1], s[i++] = A.transform[0], s[i++] = A.transform[1], s[i++] = A.transform[2], s[i++] = A.globalRotationX, s[i++] = A.globalRotationY, s[i++] = A.globalRotationZ, s[i++] = A.rotationCenter[0], s[i++] = A.rotationCenter[1], s[i++] = ((B = A.arcAngles) == null ? void 0 : B[0]) || 0, s[i++] = ((r = A.arcAngles) == null ? void 0 : r[1]) || 0, s[i++] = ((n = A.bezierControlPoint1) == null ? void 0 : n[0]) || 0, s[i++] = ((o = A.bezierControlPoint1) == null ? void 0 : o[1]) || 0, s[i++] = ((a = A.bezierControlPoint2) == null ? void 0 : a[0]) || 0, s[i++] = ((g = A.bezierControlPoint2) == null ? void 0 : g[1]) || 0, s[i++] = ((h = A.bezierStartPoint) == null ? void 0 : h[0]) || 0, s[i++] = ((c = A.bezierStartPoint) == null ? void 0 : c[1]) || 0, s[i++] = ((l = A.bezierEndPoint) == null ? void 0 : l[0]) || 0, s[i++] = ((C = A.bezierEndPoint) == null ? void 0 : C[1]) || 0, s;
552
- }
553
- static Ut(A) {
554
- const t = A.length * v.FLOATS_PER_INSTANCE, e = new Float32Array(t);
555
- for (let s = 0; s < A.length; s++) {
556
- const i = s * v.FLOATS_PER_INSTANCE;
557
- v.Tt(A[s], e, i);
547
+ const P = class P {
548
+ static Xe(t, e, i = 0) {
549
+ var n, o, c, l, f, u, g, v, m, d;
550
+ const s = e || new Float32Array(P.FLOATS_PER_INSTANCE);
551
+ let r = i;
552
+ return s[r++] = t.le[0], s[r++] = t.le[1], s[r++] = t.Ee[0], s[r++] = t.Ee[1], s[r++] = t.j[0], s[r++] = t.j[1], s[r++] = t.j[2], s[r++] = t.Y[0], s[r++] = t.Y[1], s[r++] = t.Y[2], s[r++] = t.Y[3], s[r++] = t.q[0], s[r++] = t.q[1], s[r++] = t.q[2], s[r++] = t.q[3], s[r++] = t.L[0], s[r++] = t.L[1], s[r++] = t.We[0], s[r++] = t.We[1], s[r++] = t.We[2], s[r++] = t.N, s[r++] = t.X, s[r++] = t.W, s[r++] = t.Ve[0], s[r++] = t.Ve[1], s[r++] = ((n = t.Ke) == null ? void 0 : n[0]) || 0, s[r++] = ((o = t.Ke) == null ? void 0 : o[1]) || 0, s[r++] = ((c = t.je) == null ? void 0 : c[0]) || 0, s[r++] = ((l = t.je) == null ? void 0 : l[1]) || 0, s[r++] = ((f = t.Ye) == null ? void 0 : f[0]) || 0, s[r++] = ((u = t.Ye) == null ? void 0 : u[1]) || 0, s[r++] = ((g = t.qe) == null ? void 0 : g[0]) || 0, s[r++] = ((v = t.qe) == null ? void 0 : v[1]) || 0, s[r++] = ((m = t.Ze) == null ? void 0 : m[0]) || 0, s[r++] = ((d = t.Ze) == null ? void 0 : d[1]) || 0, s;
553
+ }
554
+ static Qe(t) {
555
+ const e = t.length * P.FLOATS_PER_INSTANCE, i = new Float32Array(e);
556
+ for (let s = 0; s < t.length; s++) {
557
+ const r = s * P.FLOATS_PER_INSTANCE;
558
+ P.Xe(t[s], i, r);
558
559
  }
559
- return e;
560
+ return i;
560
561
  }
561
562
  };
562
- Q(v, "BYTES_PER_INSTANCE", 140), Q(v, "FLOATS_PER_INSTANCE", 35);
563
- let x = v;
564
- const P = class P {
563
+ h(P, "BYTES_PER_INSTANCE", 140), h(P, "FLOATS_PER_INSTANCE", 35);
564
+ let D = P;
565
+ const T = class T {
565
566
  };
566
- Q(P, "STRIDE", x.BYTES_PER_INSTANCE), Q(P, "ATTRIBUTES", { a_instancePosition: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 0, divisor: 1 }, a_instanceSize: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 8, divisor: 1 }, a_instanceCharacter: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 16, divisor: 1 }, a_instancePrimaryColor: { location: -1, size: 4, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 28, divisor: 1 }, a_instanceSecondaryColor: { location: -1, size: 4, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 44, divisor: 1 }, a_instanceRotation: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 60, divisor: 1 }, a_instanceTransform: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 68, divisor: 1 }, a_instanceGlobalRotation: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 80, divisor: 1 }, a_instanceRotationCenter: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 92, divisor: 1 }, a_instanceArcAngles: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 100, divisor: 1 }, a_instanceBezierCP1: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 108, divisor: 1 }, a_instanceBezierCP2: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 116, divisor: 1 }, a_instanceBezierStart: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 124, divisor: 1 }, a_instanceBezierEnd: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 132, divisor: 1 } });
567
- let Y = P;
568
- class rA {
569
- constructor(A, t = 1e3, e = 1.5) {
570
- Q(this, "wA");
571
- Q(this, "Wt", []);
572
- Q(this, "Ht");
573
- Q(this, "Kt");
574
- Q(this, "Jt", null);
575
- Q(this, "Vt", !0);
576
- Q(this, "Zt", 0);
577
- Q(this, "Nt", /* @__PURE__ */ new Map());
578
- Q(this, "Xt", null);
579
- this.wA = A, this.Ht = t, this.Kt = e, this.jt();
580
- }
581
- _t(A) {
582
- const t = this.Wt.length;
583
- return this.Wt.push(A), this.Vt = !0, t;
567
+ h(T, "STRIDE", D.BYTES_PER_INSTANCE), h(T, "ATTRIBUTES", { a_instancePosition: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 0, divisor: 1 }, a_instanceSize: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 8, divisor: 1 }, a_instanceCharacter: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 16, divisor: 1 }, a_instancePrimaryColor: { location: -1, size: 4, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 28, divisor: 1 }, a_instanceSecondaryColor: { location: -1, size: 4, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 44, divisor: 1 }, a_instanceRotation: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 60, divisor: 1 }, a_instanceTransform: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 68, divisor: 1 }, a_instanceGlobalRotation: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 80, divisor: 1 }, a_instanceRotationCenter: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 92, divisor: 1 }, a_instanceArcAngles: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 100, divisor: 1 }, a_instanceBezierCP1: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 108, divisor: 1 }, a_instanceBezierCP2: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 116, divisor: 1 }, a_instanceBezierStart: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 124, divisor: 1 }, a_instanceBezierEnd: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: T.STRIDE, offset: 132, divisor: 1 } });
568
+ let Y = T;
569
+ class mt {
570
+ constructor(t, e = 1e3, i = 1.5) {
571
+ h(this, "vt");
572
+ h(this, "Je", []);
573
+ h(this, "ts");
574
+ h(this, "es");
575
+ h(this, "ss", null);
576
+ h(this, "rs", !0);
577
+ h(this, "ns", 0);
578
+ h(this, "hs", /* @__PURE__ */ new Map());
579
+ h(this, "cs", null);
580
+ this.vt = t, this.ts = e, this.es = i, this.ls();
581
+ }
582
+ Fe(t) {
583
+ const e = this.Je.length;
584
+ return this.Je.push(t), this.rs = !0, e;
584
585
  }
585
586
  get count() {
586
- return this.Wt.length;
587
+ return this.Je.length;
587
588
  }
588
589
  get isEmpty() {
589
- return this.Wt.length === 0;
590
+ return this.Je.length === 0;
590
591
  }
591
592
  clear() {
592
- this.Wt.length = 0, this.Vt = !0;
593
- }
594
- qt(A) {
595
- if (A <= this.Ht) return;
596
- const t = Math.ceil(A * this.Kt);
597
- this.Ht = t, this.jt();
598
- }
599
- jt() {
600
- const A = this.wA;
601
- this.Jt && A.deleteBuffer(this.Jt), this.Jt = A.createBuffer();
602
- const t = this.Ht * x.BYTES_PER_INSTANCE;
603
- A.bindBuffer(A.ARRAY_BUFFER, this.Jt), A.bufferData(A.ARRAY_BUFFER, t, A.DYNAMIC_DRAW), A.bindBuffer(A.ARRAY_BUFFER, null), this.Vt = !0, this.Zt = 0;
604
- }
605
- Ae() {
606
- if (!this.Vt || this.Wt.length === 0) return;
607
- const A = this.wA, t = this.Wt.length;
608
- this.qt(t), (!this.Xt || this.Xt.length < t * x.FLOATS_PER_INSTANCE) && (this.Xt = new Float32Array(t * x.FLOATS_PER_INSTANCE));
609
- const e = x.Ut(this.Wt);
610
- A.bindBuffer(A.ARRAY_BUFFER, this.Jt), t <= this.Zt ? A.bufferSubData(A.ARRAY_BUFFER, 0, e) : A.bufferData(A.ARRAY_BUFFER, e, A.DYNAMIC_DRAW), A.bindBuffer(A.ARRAY_BUFFER, null), this.Vt = !1, this.Zt = t;
611
- }
612
- te(A) {
613
- let t = this.Nt.get(A);
614
- if (!t) {
615
- t = /* @__PURE__ */ new Map();
616
- const e = this.wA;
593
+ this.Je.length = 0, this.rs = !0;
594
+ }
595
+ us(t) {
596
+ if (t <= this.ts) return;
597
+ const e = Math.ceil(t * this.es);
598
+ this.ts = e, this.ls();
599
+ }
600
+ ls() {
601
+ const t = this.vt;
602
+ this.ss && t.deleteBuffer(this.ss), this.ss = t.createBuffer();
603
+ const e = this.ts * D.BYTES_PER_INSTANCE;
604
+ t.bindBuffer(t.ARRAY_BUFFER, this.ss), t.bufferData(t.ARRAY_BUFFER, e, t.DYNAMIC_DRAW), t.bindBuffer(t.ARRAY_BUFFER, null), this.rs = !0, this.ns = 0;
605
+ }
606
+ fs() {
607
+ if (!this.rs || this.Je.length === 0) return;
608
+ const t = this.vt, e = this.Je.length;
609
+ this.us(e), (!this.cs || this.cs.length < e * D.FLOATS_PER_INSTANCE) && (this.cs = new Float32Array(e * D.FLOATS_PER_INSTANCE));
610
+ const i = D.Qe(this.Je);
611
+ t.bindBuffer(t.ARRAY_BUFFER, this.ss), e <= this.ns ? t.bufferSubData(t.ARRAY_BUFFER, 0, i) : t.bufferData(t.ARRAY_BUFFER, i, t.DYNAMIC_DRAW), t.bindBuffer(t.ARRAY_BUFFER, null), this.rs = !1, this.ns = e;
612
+ }
613
+ ds(t) {
614
+ let e = this.hs.get(t);
615
+ if (!e) {
616
+ e = /* @__PURE__ */ new Map();
617
+ const i = this.vt;
617
618
  for (const s in Y.ATTRIBUTES) {
618
- const i = e.getAttribLocation(A, s);
619
- i !== -1 && t.set(s, i);
619
+ const r = i.getAttribLocation(t, s);
620
+ r !== -1 && e.set(s, r);
620
621
  }
621
- this.Nt.set(A, t);
622
+ this.hs.set(t, e);
622
623
  }
623
- return t;
624
+ return e;
624
625
  }
625
- Dt(A) {
626
- if (!this.Jt || this.Wt.length === 0) return;
627
- const t = this.wA, e = A.XA;
628
- this.Ae();
629
- const s = this.te(e);
630
- t.bindBuffer(t.ARRAY_BUFFER, this.Jt);
631
- for (const [i, B] of s) {
632
- const r = Y.ATTRIBUTES[i];
633
- r && (t.enableVertexAttribArray(B), t.vertexAttribPointer(B, r.size, r.type, r.normalized, r.stride, r.offset), t.vertexAttribDivisor(B, r.divisor));
626
+ Ae(t) {
627
+ if (!this.ss || this.Je.length === 0) return;
628
+ const e = this.vt, i = t.Qt;
629
+ this.fs();
630
+ const s = this.ds(i);
631
+ e.bindBuffer(e.ARRAY_BUFFER, this.ss);
632
+ for (const [r, n] of s) {
633
+ const o = Y.ATTRIBUTES[r];
634
+ o && (e.enableVertexAttribArray(n), e.vertexAttribPointer(n, o.size, o.type, o.normalized, o.stride, o.offset), e.vertexAttribDivisor(n, o.divisor));
634
635
  }
635
636
  }
636
- wt(A) {
637
- const t = this.wA, e = this.te(A.XA);
638
- for (const [, s] of e) t.disableVertexAttribArray(s), t.vertexAttribDivisor(s, 0);
637
+ xe(t) {
638
+ const e = this.vt, i = this.ds(t.Qt);
639
+ for (const [, s] of i) e.disableVertexAttribArray(s), e.vertexAttribDivisor(s, 0);
639
640
  }
640
- Pt(A, t) {
641
- this.Wt.length !== 0 && this.wA.drawArraysInstanced(A, 0, t, this.Wt.length);
641
+ we(t, e) {
642
+ this.Je.length !== 0 && this.vt.drawArraysInstanced(t, 0, e, this.Je.length);
642
643
  }
643
- kA() {
644
- const A = this.wA;
645
- this.Jt && (A.deleteBuffer(this.Jt), this.Jt = null), this.Wt.length = 0, this.Nt.clear(), this.Xt = null;
644
+ Gt() {
645
+ this.ss && this.vt.deleteBuffer(this.ss);
646
646
  }
647
647
  }
648
- class b {
649
- constructor(A, t, e, s) {
650
- Q(this, "wA");
651
- Q(this, "ee");
652
- Q(this, "se");
653
- Q(this, "ie");
654
- Q(this, "Be", null);
655
- this.wA = A, this.ee = t, this.se = e, this.ie = s;
656
- const i = this.wA.createBuffer();
657
- if (!i) throw Error("Failed to create unit geometry buffer");
658
- this.wA.bindBuffer(this.wA.ARRAY_BUFFER, i), this.wA.bufferData(this.wA.ARRAY_BUFFER, this.ie.Qe, this.wA.STATIC_DRAW), this.wA.bindBuffer(this.wA.ARRAY_BUFFER, null), this.Be = i;
648
+ class I {
649
+ constructor(t, e, i, s) {
650
+ h(this, "vt");
651
+ h(this, "ps");
652
+ h(this, "gs");
653
+ h(this, "_s");
654
+ h(this, "vs", null);
655
+ this.vt = t, this.ps = e, this.gs = i, this._s = s;
656
+ const r = this.vt.createBuffer();
657
+ if (!r) throw Error("Failed to create unit geometry buffer");
658
+ this.vt.bindBuffer(this.vt.ARRAY_BUFFER, r), this.vt.bufferData(this.vt.ARRAY_BUFFER, this._s.As, this.vt.STATIC_DRAW), this.vt.bindBuffer(this.vt.ARRAY_BUFFER, null), this.vs = r;
659
659
  }
660
660
  get type() {
661
- return this.se;
661
+ return this.gs;
662
662
  }
663
663
  get unitGeometry() {
664
- return this.ie;
664
+ return this._s;
665
665
  }
666
666
  get unitBuffer() {
667
- return this.Be;
667
+ return this.vs;
668
668
  }
669
669
  get batch() {
670
- return this.ee;
670
+ return this.ps;
671
671
  }
672
- ft() {
673
- this.ee.clear();
672
+ $e() {
673
+ this.ps.clear();
674
674
  }
675
- lt() {
676
- return !this.ee.isEmpty;
675
+ ye() {
676
+ return !this.ps.isEmpty;
677
677
  }
678
- kA() {
679
- this.ee.kA(), this.Be && (this.wA.deleteBuffer(this.Be), this.Be = null);
678
+ Gt() {
679
+ this.ps.Gt(), this.vt.deleteBuffer(this.vs);
680
680
  }
681
- Ee(A, t, e, s, i) {
682
- const B = this.re(A, t, e, s, i.rotationX || 0, i.rotationY || 0, i.rotationZ || 0);
683
- return { position: [A, t], size: [e, s], AA: i.character || [0, 0, 0], primaryColor: i.charColor || [1, 1, 1, 1], secondaryColor: i.bgColor || [0, 0, 0, 1], rotation: i.charRotation || [0, 0], transform: [i.invert ? 1 : 0, i.flipHorizontally ? 1 : 0, i.flipVertically ? 1 : 0], globalRotationX: B.radiansX, globalRotationY: B.radiansY, globalRotationZ: B.radiansZ, rotationCenter: [B.centerX, B.centerY] };
681
+ ws(t, e, i, s, r) {
682
+ const n = this.Cs(t, e, i, s, r.N || 0, r.X || 0, r.W || 0);
683
+ return { le: [t, e], Ee: [i, s], j: r.j || [0, 0, 0], Y: r.Y || [1, 1, 1, 1], q: r.q || [0, 0, 0, 1], L: r.L || [0, 0], We: [r.D ? 1 : 0, r.V ? 1 : 0, r.K ? 1 : 0], N: n.radiansX, X: n.radiansY, W: n.radiansZ, Ve: [n.centerX, n.centerY] };
684
684
  }
685
- ne(A, t) {
686
- const e = G(this.wA) || [0, 0, this.wA.canvas.width, this.wA.canvas.height];
687
- return { nx: A / e[2] * 2 - 1, ny: 1 - t / e[3] * 2 };
685
+ bs(t, e) {
686
+ const i = k(this.vt) || [0, 0, this.vt.canvas.width, this.vt.canvas.height];
687
+ return { nx: t / i[2] * 2 - 1, ny: 1 - e / i[3] * 2 };
688
688
  }
689
- ge(A, t, e) {
690
- const s = this.ne(t, e);
691
- A.rotationCenter = [s.nx, s.ny];
689
+ $s(t, e, i) {
690
+ const s = this.bs(e, i);
691
+ t.Ve = [s.nx, s.ny];
692
692
  }
693
- re(A, t, e, s, i, B, r) {
694
- const n = G(this.wA) || [0, 0, this.wA.canvas.width, this.wA.canvas.height], o = n[2], a = n[3];
695
- return { centerX: (A + e / 2) / o * 2 - 1, centerY: 1 - (t + s / 2) / a * 2, radiansX: -i * Math.PI / 180, radiansY: -B * Math.PI / 180, radiansZ: -r * Math.PI / 180, aspectRatio: o / a };
693
+ Cs(t, e, i, s, r, n, o) {
694
+ const c = k(this.vt) || [0, 0, this.vt.canvas.width, this.vt.canvas.height], l = c[2], f = c[3];
695
+ return { centerX: (t + i / 2) / l * 2 - 1, centerY: 1 - (e + s / 2) / f * 2, radiansX: -r * Math.PI / 180, radiansY: -n * Math.PI / 180, radiansZ: -o * Math.PI / 180, aspectRatio: l / f };
696
696
  }
697
697
  }
698
- const EA = { Qe: new Float32Array([0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1]), It: 6, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
699
- class QA extends b {
700
- constructor(A, t) {
701
- super(A, t, D.RECTANGLE, EA);
698
+ const vt = { As: new Float32Array([0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1]), be: 6, Ce: WebGL2RenderingContext.TRIANGLES, fe: 16, ue: { le: { size: 2, offset: 0 }, de: { size: 2, offset: 8 } } };
699
+ class At extends I {
700
+ constructor(t, e) {
701
+ super(t, e, E.RECTANGLE, vt);
702
702
  }
703
- _t(A, t) {
704
- const e = this.Ee(A.x, A.y, A.width, A.height, t);
705
- return this.ee._t(e);
703
+ Fe(t, e) {
704
+ const i = this.ws(t.x, t.y, t.width, t.height, e);
705
+ return this.ps.Fe(i);
706
706
  }
707
707
  }
708
- const nA = { Qe: new Float32Array([0, -0.5, 0, 0, 1, -0.5, 1, 0, 0, 0.5, 0, 1, 0, 0.5, 0, 1, 1, -0.5, 1, 0, 1, 0.5, 1, 1]), It: 6, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
709
- class oA extends b {
710
- constructor(A, t) {
711
- super(A, t, D.LINE, nA);
708
+ const xt = { As: new Float32Array([0, -0.5, 0, 0, 1, -0.5, 1, 0, 0, 0.5, 0, 1, 0, 0.5, 0, 1, 1, -0.5, 1, 0, 1, 0.5, 1, 1]), be: 6, Ce: WebGL2RenderingContext.TRIANGLES, fe: 16, ue: { le: { size: 2, offset: 0 }, de: { size: 2, offset: 8 } } };
709
+ class yt extends I {
710
+ constructor(t, e) {
711
+ super(t, e, E.LINE, xt);
712
712
  }
713
- _t(A, t) {
714
- const e = A.x2 - A.x1, s = A.y2 - A.y1, i = Math.hypot(e, s), B = Math.atan2(s, e), r = A.thickness || t.lineWeight || 1, n = A.x1 + e / 2, o = A.y1 + s / 2, a = n - i / 2, g = o, h = { character: t.character, charColor: t.charColor, bgColor: t.bgColor, charRotation: t.charRotation, flipHorizontally: t.flipHorizontally, flipVertically: t.flipVertically, invert: t.invert, rotationX: t.rotationX || 0, rotationY: t.rotationY || 0, rotationZ: (t.rotationZ || 0) + 180 * B / Math.PI, lineWeight: r }, c = this.Ee(a, g, i, r, h);
715
- return this.ge(c, n, o), this.ee._t(c);
713
+ Fe(t, e) {
714
+ const i = t.x2 - t.x1, s = t.y2 - t.y1, r = Math.hypot(i, s), n = t.thickness || e.I || 1, o = t.x1 + i / 2, c = t.y1 + s / 2, l = o - r / 2, f = c, u = this.ws(l, f, r, n, e);
715
+ return this.$s(u, o, c), this.ps.Fe(u);
716
716
  }
717
717
  }
718
- const gA = { Qe: function(E = 32) {
719
- const A = [], t = 2 * Math.PI / E;
720
- for (let e = 0; e < E; e++) {
721
- const s = e * t, i = (e + 1) % E * t, B = Math.cos(s), r = Math.sin(s), n = 0.5 * (B + 1), o = 0.5 * (r + 1), a = Math.cos(i), g = Math.sin(i), h = 0.5 * (a + 1), c = 0.5 * (g + 1);
722
- A.push(0, 0, 0.5, 0.5, B, r, n, o, a, g, h, c);
723
- }
724
- return new Float32Array(A);
725
- }(32), It: 96, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
726
- class aA extends b {
727
- constructor(A, t) {
728
- super(A, t, D.ELLIPSE, gA);
729
- }
730
- _t(A, t) {
731
- const e = this.Ee(A.x, A.y, A.width, A.height, t);
732
- return this.ge(e, A.x, A.y), this.ee._t(e);
718
+ const Et = { As: function(a = 32) {
719
+ const t = [], e = 2 * Math.PI / a;
720
+ for (let i = 0; i < a; i++) {
721
+ const s = i * e, r = (i + 1) % a * e, n = Math.cos(s), o = Math.sin(s), c = 0.5 * (n + 1), l = 0.5 * (o + 1), f = Math.cos(r), u = Math.sin(r), g = 0.5 * (f + 1), v = 0.5 * (u + 1);
722
+ t.push(0, 0, 0.5, 0.5, n, o, c, l, f, u, g, v);
723
+ }
724
+ return new Float32Array(t);
725
+ }(32), be: 96, Ce: WebGL2RenderingContext.TRIANGLES, fe: 16, ue: { le: { size: 2, offset: 0 }, de: { size: 2, offset: 8 } } };
726
+ class wt extends I {
727
+ constructor(t, e) {
728
+ super(t, e, E.ELLIPSE, Et);
729
+ }
730
+ Fe(t, e) {
731
+ const i = this.ws(t.x, t.y, t.width, t.height, e);
732
+ return this.$s(i, t.x, t.y), this.ps.Fe(i);
733
733
  }
734
734
  }
735
- let hA = { Qe: function(E) {
736
- const A = [];
737
- for (let t = 0; t < E; t++) {
738
- const e = t / E, s = (t + 1) / E;
739
- A.push(e, 0, e, 0, e, 1, e, 1, s, 1, s, 1);
740
- }
741
- return new Float32Array(A);
742
- }(32), It: 96, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
743
- class cA extends b {
744
- constructor(A, t) {
745
- super(A, t, D.ARC, hA);
746
- }
747
- _t(A, t) {
748
- const e = A.x - A.width / 2, s = A.y - A.height / 2, i = A.start * Math.PI / 180, B = A.stop * Math.PI / 180, r = this.Ee(e, s, A.width, A.height, t);
749
- return this.ge(r, A.x, A.y), r.arcAngles = [i, B], this.ee._t(r);
735
+ let Rt = { As: function(a) {
736
+ const t = [];
737
+ for (let e = 0; e < a; e++) {
738
+ const i = e / a, s = (e + 1) / a;
739
+ t.push(i, 0, i, 0, i, 1, i, 1, s, 1, s, 1);
740
+ }
741
+ return new Float32Array(t);
742
+ }(32), be: 96, Ce: WebGL2RenderingContext.TRIANGLES, fe: 16, ue: { le: { size: 2, offset: 0 }, de: { size: 2, offset: 8 } } };
743
+ class bt extends I {
744
+ constructor(t, e) {
745
+ super(t, e, E.ARC, Rt);
746
+ }
747
+ Fe(t, e) {
748
+ const i = t.x - t.width / 2, s = t.y - t.height / 2, r = t.start * Math.PI / 180, n = t.stop * Math.PI / 180, o = this.ws(i, s, t.width, t.height, e);
749
+ return this.$s(o, t.x, t.y), o.Ke = [r, n], this.ps.Fe(o);
750
750
  }
751
751
  }
752
- const lA = { Qe: new Float32Array([0, 0, 0, 0, 1, 0, 1, 0, 0.5, 1, 0.5, 1]), It: 3, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
753
- class CA extends b {
754
- constructor(A, t) {
755
- super(A, t, D.TRIANGLE, lA);
752
+ const Tt = { As: new Float32Array([0, 0, 0, 0, 1, 0, 1, 0, 0.5, 1, 0.5, 1]), be: 3, Ce: WebGL2RenderingContext.TRIANGLES, fe: 16, ue: { le: { size: 2, offset: 0 }, de: { size: 2, offset: 8 } } };
753
+ class Ct extends I {
754
+ constructor(t, e) {
755
+ super(t, e, E.TRIANGLE, Tt);
756
756
  }
757
- _t(A, t) {
758
- const e = Math.min(A.x1, A.x2, A.x3), s = Math.max(A.x1, A.x2, A.x3), i = Math.min(A.y1, A.y2, A.y3), B = s - e, r = Math.max(A.y1, A.y2, A.y3) - i, n = this.Ee(e, i, B, r, t), o = e + 0.5 * B, a = i + r * (1 / 3);
759
- return this.ge(n, o, a), this.ee._t(n);
757
+ Fe(t, e) {
758
+ const i = Math.min(t.x1, t.x2, t.x3), s = Math.max(t.x1, t.x2, t.x3), r = Math.min(t.y1, t.y2, t.y3), n = s - i, o = Math.max(t.y1, t.y2, t.y3) - r, c = this.ws(i, r, n, o, e), l = i + 0.5 * n, f = r + o * (1 / 3);
759
+ return this.$s(c, l, f), this.ps.Fe(c);
760
760
  }
761
761
  }
762
- function H(E, A, t, e, s) {
763
- const i = 1 - E, B = i * i, r = E * E;
764
- return B * i * A + 3 * B * E * t + 3 * i * r * e + r * E * s;
762
+ function et(a, t, e, i, s) {
763
+ const r = 1 - a, n = r * r, o = a * a;
764
+ return n * r * t + 3 * n * a * e + 3 * r * o * i + o * a * s;
765
765
  }
766
- const DA = { Qe: function(E = 16) {
767
- const A = [];
768
- for (let t = 0; t < E; t++) {
769
- const e = t / E, s = (t + 1) / E;
770
- A.push(e, -0.5, e, 0), A.push(s, -0.5, s, 0), A.push(e, 0.5, e, 1), A.push(e, 0.5, e, 1), A.push(s, -0.5, s, 0), A.push(s, 0.5, s, 1);
771
- }
772
- return new Float32Array(A);
773
- }(16), It: 96, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
774
- class PA extends b {
775
- constructor(A, t) {
776
- super(A, t, D.BEZIER_CURVE, DA);
777
- }
778
- _t(A, t) {
779
- const e = t.lineWeight || 1, s = H(0.5, A.x1, A.cp1x, A.cp2x, A.x2), i = H(0.5, A.y1, A.cp1y, A.cp2y, A.y2), B = { character: t.character, charColor: t.charColor, bgColor: t.bgColor, charRotation: t.charRotation, flipHorizontally: t.flipHorizontally, flipVertically: t.flipVertically, invert: t.invert, rotationX: t.rotationX || 0, rotationY: t.rotationY || 0, rotationZ: t.rotationZ || 0, lineWeight: e }, r = this.Ee(0, 0, 1, e, B);
780
- return this.ge(r, s, i), r.bezierStartPoint = [A.x1, A.y1], r.bezierControlPoint1 = [A.cp1x, A.cp1y], r.bezierControlPoint2 = [A.cp2x, A.cp2y], r.bezierEndPoint = [A.x2, A.y2], this.ee._t(r);
766
+ const Ut = { As: function(a = 16) {
767
+ const t = [];
768
+ for (let e = 0; e < a; e++) {
769
+ const i = e / a, s = (e + 1) / a;
770
+ t.push(i, -0.5, i, 0), t.push(s, -0.5, s, 0), t.push(i, 0.5, i, 1), t.push(i, 0.5, i, 1), t.push(s, -0.5, s, 0), t.push(s, 0.5, s, 1);
771
+ }
772
+ return new Float32Array(t);
773
+ }(16), be: 96, Ce: WebGL2RenderingContext.TRIANGLES, fe: 16, ue: { le: { size: 2, offset: 0 }, de: { size: 2, offset: 8 } } };
774
+ class Ft extends I {
775
+ constructor(t, e) {
776
+ super(t, e, E.BEZIER_CURVE, Ut);
777
+ }
778
+ Fe(t, e) {
779
+ const i = e.I || 1, s = et(0.5, t.x1, t.cp1x, t.cp2x, t.x2), r = et(0.5, t.y1, t.cp1y, t.cp2y, t.y2), n = this.ws(0, 0, 1, i, e);
780
+ return this.$s(n, s, r), n.qe = [t.x1, t.y1], n.je = [t.cp1x, t.cp1y], n.Ye = [t.cp2x, t.cp2y], n.Ze = [t.x2, t.y2], this.ps.Fe(n);
781
781
  }
782
782
  }
783
- class uA {
784
- constructor(A) {
785
- Q(this, "wA");
786
- Q(this, "oe", null);
787
- Q(this, "ae");
788
- Q(this, "he", null);
789
- Q(this, "ce", {});
790
- Q(this, "Ce", null);
791
- Q(this, "le", /* @__PURE__ */ new Map());
792
- Q(this, "De");
793
- Q(this, "Pe");
794
- Q(this, "ue");
795
- Q(this, "K", []);
796
- this.wA = A, this.ae = new eA(A), this.ue = new X(), this.De = new iA(A, this), this.Pe = new BA(), this.Ce = A.createBuffer(), F(this.wA, [0, 0, this.wA.canvas.width, this.wA.canvas.height]);
783
+ class St {
784
+ constructor(t) {
785
+ h(this, "vt");
786
+ h(this, "Ms", null);
787
+ h(this, "Fs");
788
+ h(this, "Rs", null);
789
+ h(this, "zs", {});
790
+ h(this, "Ps", null);
791
+ h(this, "Ts", /* @__PURE__ */ new Map());
792
+ h(this, "Ss");
793
+ h(this, "Es");
794
+ h(this, "Bs");
795
+ h(this, "O", []);
796
+ this.vt = t, this.Fs = new ft(t), this.Bs = new at(), this.Ss = new gt(t, this), this.Es = new pt(), this.Ps = t.createBuffer(), H(this.vt, [0, 0, this.vt.canvas.width, this.vt.canvas.height]);
797
+ }
798
+ Gs(t) {
799
+ let e = this.Ts.get(t);
800
+ if (e) return e;
801
+ const i = new mt(this.vt);
802
+ return e = (0, { [E.RECTANGLE]: () => new At(this.vt, i), [E.LINE]: () => new yt(this.vt, i), [E.ELLIPSE]: () => new wt(this.vt, i), [E.ARC]: () => new bt(this.vt, i), [E.TRIANGLE]: () => new Ct(this.vt, i), [E.BEZIER_CURVE]: () => new Ft(this.vt, i) }[t])(), this.Ts.set(t, e), e;
803
+ }
804
+ Ds(t) {
805
+ this.Ms !== t && (this.Ms = t, t.Xt());
797
806
  }
798
- Ie(A) {
799
- let t = this.le.get(A);
800
- if (t) return t;
801
- const e = new rA(this.wA);
802
- return t = (0, { [D.RECTANGLE]: () => new QA(this.wA, e), [D.LINE]: () => new oA(this.wA, e), [D.ELLIPSE]: () => new aA(this.wA, e), [D.ARC]: () => new cA(this.wA, e), [D.TRIANGLE]: () => new CA(this.wA, e), [D.BEZIER_CURVE]: () => new PA(this.wA, e) }[A])(), this.le.set(A, t), t;
807
+ ae(t, e) {
808
+ return this.Fs.ae(t, e);
803
809
  }
804
- we(A) {
805
- this.oe !== A && (this.oe = A, A.HA());
810
+ ie() {
811
+ return this.Fs.ie();
806
812
  }
807
- fe(A, t) {
808
- return this.ae.st(A, t);
813
+ Tt() {
814
+ return this.Fs.Tt();
809
815
  }
810
- At() {
811
- return this.ae.At();
816
+ re() {
817
+ return this.Fs.re();
812
818
  }
813
- YA() {
814
- return this.ae.YA();
819
+ ne() {
820
+ return this.Fs.ne();
815
821
  }
816
- tt() {
817
- return this.ae.tt();
822
+ Ls(t) {
823
+ this.Rs = t, t && (this.zs = {});
818
824
  }
819
- de(A) {
820
- this.he = A, A && (this.ce = {});
825
+ Kt(t, e) {
826
+ this.zs[t] = e;
821
827
  }
822
- VA(A, t) {
823
- this.ce[A] = t;
828
+ ks(t) {
829
+ Object.assign(this.zs, t);
824
830
  }
825
- _e(A) {
826
- Object.assign(this.ce, A);
831
+ oe(t) {
832
+ return this.Fs.oe(t);
827
833
  }
828
- et(A) {
829
- return this.ae.et(A);
834
+ Os(t, e, i, s, r) {
835
+ const n = this.ie(), o = { Ue: t.textures[0], Uf: t.textures[1], Ug: t.textures[2], Uh: t.textures[3], Ui: t.textures[4], Uj: [t.width, t.height] };
836
+ this.Es.De(e, i, s, r, n, o, this.Bs);
830
837
  }
831
- pe(A, t, e, s, i) {
832
- const B = this.At(), r = { l: A.textures[0], m: A.textures[1], n: A.textures[2], o: A.textures[3], p: A.textures[4], q: [A.width, A.height] };
833
- this.Pe.Ft(t, e, s, i, B, r, this.ue);
838
+ Hs(t, e, i, s, r) {
839
+ const n = this.ne(), o = t.texture, c = t.flags, l = t.charRotationRG, f = [l[0], l[1]], u = t.colorUniforms ?? { charColorFixed: !1, Y: [1, 1, 1], cellColorFixed: !1, cellColor: [0, 0, 0], backgroundColor: [0, 0, 0, 1] }, g = t.characterListUniforms, v = { Uk: o, Ul: !!c.invert, Um: !!c.flipX, Un: !!c.flipY, Uo: f, Up: !!u.charColorFixed, Uq: u.Y, Ur: !!u.cellColorFixed, Us: u.cellColor, Ut: u.backgroundColor, Uu: g.count, Uv: g.list };
840
+ this.Es.De(e, i, s, r, n, v, this.Bs);
834
841
  }
835
- me(A, t, e, s) {
836
- var C;
837
- const i = this.wA, B = i.canvas.width, r = i.canvas.height, n = A / B * 2 - 1, o = (A + e) / B * 2 - 1, a = 1 - t / r * 2, g = 1 - (t + s) / r * 2, h = new Float32Array([n, g, o, g, n, a, o, g, o, a, n, a]);
838
- i.bindBuffer(i.ARRAY_BUFFER, this.Ce), i.bufferData(i.ARRAY_BUFFER, h, i.DYNAMIC_DRAW);
839
- const c = ((C = this.oe) == null ? void 0 : C.XA) || i.getParameter(i.CURRENT_PROGRAM), l = c ? i.getAttribLocation(c, "a_position") : -1;
840
- l !== -1 && (i.enableVertexAttribArray(l), i.vertexAttribPointer(l, 2, i.FLOAT, !1, 8, 0)), i.drawArrays(i.TRIANGLES, 0, 6), l !== -1 && i.disableVertexAttribArray(l);
842
+ Is(t, e, i, s) {
843
+ var d;
844
+ const r = this.vt, n = r.canvas.width, o = r.canvas.height, c = t / n * 2 - 1, l = (t + i) / n * 2 - 1, f = 1 - e / o * 2, u = 1 - (e + s) / o * 2, g = new Float32Array([c, u, l, u, c, f, l, u, l, f, c, f]);
845
+ r.bindBuffer(r.ARRAY_BUFFER, this.Ps), r.bufferData(r.ARRAY_BUFFER, g, r.DYNAMIC_DRAW);
846
+ const v = ((d = this.Ms) == null ? void 0 : d.Qt) || r.getParameter(r.CURRENT_PROGRAM), m = v ? r.getAttribLocation(v, "a_position") : -1;
847
+ m !== -1 && (r.enableVertexAttribArray(m), r.vertexAttribPointer(m, 2, r.FLOAT, !1, 8, 0)), r.drawArrays(r.TRIANGLES, 0, 6), m !== -1 && r.disableVertexAttribArray(m);
841
848
  }
842
- ve(A, t, e, s) {
843
- this.he ? (this.Pe.Ft(A, t, e, s, this.he, { ...this.ce }, this.ue), this.he = null, this.ce = {}) : this.Pe.Yt(A, t, e, s, this.ue);
849
+ Ns(t, e, i, s) {
850
+ this.Rs ? (this.Es.De(t, e, i, s, this.Rs, { ...this.zs }, this.Bs), this.Rs = null, this.zs = {}) : this.Es.Ge(t, e, i, s, this.Bs);
844
851
  }
845
- ye(A, t, e, s) {
846
- this.Pe.Rt(A, t, e, s, this.ue.lineWeight, this.ue);
852
+ Xs(t, e, i, s) {
853
+ this.Es.Le(t, e, i, s, this.Bs.lineWeight, this.Bs);
847
854
  }
848
- be(A, t, e, s) {
849
- this.Pe.St(A, t, e, s, this.ue);
855
+ Ws(t, e, i, s) {
856
+ this.Es.ke(t, e, i, s, this.Bs);
850
857
  }
851
- $e(A, t, e, s, i, B) {
852
- this.Pe.zt(A, t, e, s, i, B, this.ue);
858
+ Vs(t, e, i, s, r, n) {
859
+ this.Es.He(t, e, i, s, r, n, this.Bs);
853
860
  }
854
- Ge(A, t, e, s, i, B, r, n) {
855
- const o = this.ue.lineWeight;
856
- this.Pe.Lt(A, t, e, s, i, B, r, n, o, this.ue);
861
+ Ks(t, e, i, s, r, n, o, c) {
862
+ const l = this.Bs.lineWeight;
863
+ this.Es.Ie(t, e, i, s, r, n, o, c, l, this.Bs);
857
864
  }
858
- Me(A, t, e = 1, s = {}) {
859
- return new U(this.wA, A, t, e, s, this, !0);
865
+ js(t, e, i = 1, s = {}) {
866
+ return new q(this.vt, t, e, i, s, this, !0);
860
867
  }
861
- xe(A, t, e, s, i, B) {
862
- this.Pe.kt(A, t, e, s, i, B, this.ue);
868
+ Ys(t, e, i, s, r, n) {
869
+ this.Es.Oe(t, e, i, s, r, n, this.Bs);
863
870
  }
864
- Ye(A, t = A, e = A, s = 255) {
865
- this.state.DA(A, t, e, s), this.Ot(A / 255, t / 255, e / 255, s / 255);
871
+ qs(t, e = t, i = t, s = 255) {
872
+ this.state.ft(t, e, i, s), this.Ne(t / 255, e / 255, i / 255, s / 255);
866
873
  }
867
- Ot(A = 0, t = 0, e = 0, s = 0) {
868
- this.wA.clearColor(A, t, e, s), this.wA.clear(this.wA.COLOR_BUFFER_BIT);
874
+ Ne(t = 0, e = 0, i = 0, s = 0) {
875
+ this.vt.clearColor(t, e, i, s), this.vt.clear(this.vt.COLOR_BUFFER_BIT);
869
876
  }
870
- Fe() {
871
- this.wA.viewport(0, 0, this.wA.canvas.width, this.wA.canvas.height), F(this.wA, [0, 0, this.wA.canvas.width, this.wA.canvas.height]);
877
+ Zs() {
878
+ this.vt.viewport(0, 0, this.vt.canvas.width, this.vt.canvas.height), H(this.vt, [0, 0, this.vt.canvas.width, this.vt.canvas.height]);
872
879
  }
873
880
  get context() {
874
- return this.wA;
881
+ return this.vt;
875
882
  }
876
883
  get state() {
877
- return this.ue;
884
+ return this.Bs;
878
885
  }
879
- RA(A) {
880
- this.K.push(this.ue), this.ue = A;
886
+ Et(t) {
887
+ this.O.push(this.Bs), this.Bs = t;
881
888
  }
882
- SA() {
883
- const A = this.K.pop();
884
- A && (this.ue = A);
889
+ Bt() {
890
+ const t = this.O.pop();
891
+ t && (this.Bs = t);
885
892
  }
886
- FA(A) {
887
- const t = A, e = G(this.wA) ?? this.wA.getParameter(this.wA.VIEWPORT), s = { shader: t, gl: this.wA, viewport: e };
888
- this.we(t);
889
- const i = /* @__PURE__ */ new Set();
890
- for (const B of this.Pe) B.type === D.CUSTOM ? i.add(D.RECTANGLE) : i.add(B.type);
891
- for (const B of i) B !== D.CUSTOM && this.Ie(B);
892
- this.De.Ct(s, this.Pe, this.le), this.Pe.Ot();
893
+ St(t) {
894
+ const e = t, i = k(this.vt) ?? this.vt.getParameter(this.vt.VIEWPORT), s = { shader: e, gl: this.vt, viewport: i };
895
+ this.Ds(e);
896
+ const r = /* @__PURE__ */ new Set();
897
+ for (const n of this.Es) n.type === E.CUSTOM ? r.add(E.RECTANGLE) : r.add(n.type);
898
+ for (const n of r) n !== E.CUSTOM && this.Gs(n);
899
+ this.Ss.ve(s, this.Es, this.Ts), this.Es.Ne();
893
900
  }
894
- kA() {
895
- this.wA.deleteBuffer(this.Ce), this.Pe.Ot();
896
- for (const A of this.le.values()) A.kA();
897
- this.ae.kA();
901
+ Gt() {
902
+ this.vt.deleteBuffer(this.Ps), this.Es.Ne();
903
+ for (const t of this.Ts.values()) t.Gt();
904
+ this.Fs.Gt(), this.Ss.Gt();
898
905
  }
899
906
  }
900
- const u = { readShort: (E, A) => (u.t.uint16[0] = E[A] << 8 | E[A + 1], u.t.int16[0]), readUshort: (E, A) => E[A] << 8 | E[A + 1], readUshorts(E, A, t) {
901
- const e = [];
902
- for (let s = 0; s < t; s++) e.push(u.readUshort(E, A + 2 * s));
903
- return e;
904
- }, readUint(E, A) {
905
- const t = u.t.uint8;
906
- return t[3] = E[A], t[2] = E[A + 1], t[1] = E[A + 2], t[0] = E[A + 3], u.t.uint32[0];
907
- }, readASCII(E, A, t) {
908
- let e = "";
909
- for (let s = 0; s < t; s++) e += String.fromCharCode(E[A + s]);
910
- return e;
907
+ const w = { readShort: (a, t) => (w.t.uint16[0] = a[t] << 8 | a[t + 1], w.t.int16[0]), readUshort: (a, t) => a[t] << 8 | a[t + 1], readUshorts(a, t, e) {
908
+ const i = [];
909
+ for (let s = 0; s < e; s++) i.push(w.readUshort(a, t + 2 * s));
910
+ return i;
911
+ }, readUint(a, t) {
912
+ const e = w.t.uint8;
913
+ return e[3] = a[t], e[2] = a[t + 1], e[1] = a[t + 2], e[0] = a[t + 3], w.t.uint32[0];
914
+ }, readASCII(a, t, e) {
915
+ let i = "";
916
+ for (let s = 0; s < e; s++) i += String.fromCharCode(a[t + s]);
917
+ return i;
918
+ }, writeUshort(a, t, e) {
919
+ a[t] = e >>> 8 & 255, a[t + 1] = 255 & e;
920
+ }, writeUint(a, t, e) {
921
+ a[t] = e >>> 24 & 255, a[t + 1] = e >>> 16 & 255, a[t + 2] = e >>> 8 & 255, a[t + 3] = 255 & e;
922
+ }, writeASCII(a, t, e) {
923
+ for (let i = 0; i < e.length; i++) a[t + i] = 255 & e.charCodeAt(i);
911
924
  }, t: (() => {
912
- const E = new ArrayBuffer(8);
913
- return { uint8: new Uint8Array(E), int16: new Int16Array(E), uint16: new Uint16Array(E), uint32: new Uint32Array(E) };
914
- })() }, wA = { parseTab(E, A, t) {
915
- const e = { tables: [], ids: {}, off: A };
916
- E = new Uint8Array(E.buffer, A, t), A = 0;
917
- const s = u, i = s.readUshort, B = i(E, A += 2);
918
- A += 2;
919
- const r = [];
920
- for (let n = 0; n < B; n++) {
921
- const o = i(E, A), a = i(E, A += 2);
922
- A += 2;
923
- const g = s.readUint(E, A);
924
- A += 4;
925
- const h = `p${o}e${a}`;
926
- let c = r.indexOf(g);
927
- if (c === -1) {
928
- let l;
929
- c = e.tables.length, r.push(g);
930
- const C = i(E, g);
931
- l = C === 4 ? this.parse4(E, g) : C === 12 ? this.parse12(E, g) : { format: C }, e.tables.push(l);
925
+ const a = new ArrayBuffer(8);
926
+ return { uint8: new Uint8Array(a), int16: new Int16Array(a), uint16: new Uint16Array(a), uint32: new Uint32Array(a) };
927
+ })() };
928
+ function W(a) {
929
+ return a + 3 & -4;
930
+ }
931
+ function V(a, t, e) {
932
+ const i = t + e;
933
+ let s = 0;
934
+ const r = w.t;
935
+ for (let n = t; n < i; n += 4) r.uint8[3] = a[n] || 0, r.uint8[2] = a[n + 1] || 0, r.uint8[1] = a[n + 2] || 0, r.uint8[0] = a[n + 3] || 0, s = s + (r.uint32[0] >>> 0) >>> 0;
936
+ return s >>> 0;
937
+ }
938
+ class Bt {
939
+ constructor(t) {
940
+ h(this, "b");
941
+ h(this, "p", 0);
942
+ h(this, "bitbuf", 0);
943
+ h(this, "bitcnt", 0);
944
+ this.b = t;
945
+ }
946
+ readBits(t) {
947
+ for (; this.bitcnt < t; ) {
948
+ const i = this.b[this.p++] || 0;
949
+ this.bitbuf |= i << this.bitcnt, this.bitcnt += 8;
932
950
  }
933
- e.ids[h] = c;
934
- }
935
- return e;
936
- }, parse4(E, A) {
937
- const t = u, e = t.readUshort, s = t.readUshorts, i = A, B = e(E, A += 2);
938
- A += 2;
939
- const r = e(E, A += 2) >>> 1, n = { format: 4, searchRange: e(E, A += 2), entrySelector: 0, rangeShift: 0, endCount: [], startCount: [], idDelta: [], idRangeOffset: [], glyphIdArray: [] };
940
- A += 2, n.entrySelector = e(E, A), A += 2, n.rangeShift = e(E, A), A += 2, n.endCount = s(E, A, r), A += 2 * r, A += 2, n.startCount = s(E, A, r), A += 2 * r;
941
- for (let o = 0; o < r; o++) n.idDelta.push(t.readShort(E, A)), A += 2;
942
- return n.idRangeOffset = s(E, A, r), A += 2 * r, n.glyphIdArray = s(E, A, i + B - A >> 1), n;
943
- }, parse12(E, A) {
944
- const t = u.readUint;
945
- t(E, A += 4), t(E, A += 4);
946
- const e = t(E, A += 4);
947
- A += 4;
948
- const s = new Uint32Array(3 * e);
949
- for (let i = 0; i < 3 * e; i += 3) s[i] = t(E, A + (i << 2)), s[i + 1] = t(E, A + (i << 2) + 4), s[i + 2] = t(E, A + (i << 2) + 8);
950
- return { format: 12, groups: s };
951
- } }, IA = { parseTab(E, A, t) {
952
- const e = u;
953
- A += 18;
954
- const s = e.readUshort(E, A);
955
- A += 2, A += 16;
956
- const i = e.readShort(E, A);
957
- A += 2;
958
- const B = e.readShort(E, A);
959
- A += 2;
960
- const r = e.readShort(E, A);
961
- A += 2;
962
- const n = e.readShort(E, A);
963
- return A += 2, A += 6, { unitsPerEm: s, xMin: i, yMin: B, xMax: r, yMax: n, indexToLocFormat: e.readShort(E, A) };
964
- } }, fA = { parseTab(E, A, t) {
965
- const e = u;
966
- A += 4;
967
- const s = ["ascender", "descender", "lineGap", "advanceWidthMax", "minLeftSideBearing", "minRightSideBearing", "xMaxExtent", "caretSlopeRise", "caretSlopeRun", "caretOffset", "res0", "res1", "res2", "res3", "metricDataFormat", "numberOfHMetrics"], i = {};
968
- for (let B = 0; B < s.length; B++) {
969
- const r = s[B], n = r === "advanceWidthMax" || r === "numberOfHMetrics" ? e.readUshort : e.readShort;
970
- i[r] = n(E, A + 2 * B);
951
+ const e = this.bitbuf & (1 << t) - 1;
952
+ return this.bitbuf >>>= t, this.bitcnt -= t, e;
971
953
  }
972
- return i;
973
- } }, dA = { parseTab(E, A, t, e) {
974
- const s = u, i = [], B = [], r = e.maxp.numGlyphs, n = e.hhea.numberOfHMetrics;
975
- let o = 0, a = 0, g = 0;
976
- for (; g < n; ) o = s.readUshort(E, A + (g << 2)), a = s.readShort(E, A + (g << 2) + 2), i.push(o), B.push(a), g++;
977
- for (; g < r; ) i.push(o), B.push(a), g++;
978
- return { aWidth: i, lsBearing: B };
979
- } }, N = { cmap: wA, head: IA, hhea: fA, maxp: { parseTab(E, A, t) {
980
- const e = u;
981
- return e.readUint(E, A), A += 4, { numGlyphs: e.readUshort(E, A) };
982
- } }, hmtx: dA, loca: { parseTab(E, A, t, e) {
983
- const s = u, i = [], B = e.head.indexToLocFormat, r = e.maxp.numGlyphs + 1;
984
- if (B === 0) for (let n = 0; n < r; n++) i.push(s.readUshort(E, A + (n << 1)) << 1);
985
- else if (B === 1) for (let n = 0; n < r; n++) i.push(s.readUint(E, A + (n << 2)));
986
- return i;
987
- } }, glyf: { parseTab(E, A, t, e) {
988
- const s = [], i = e.maxp.numGlyphs;
989
- for (let B = 0; B < i; B++) s.push(null);
990
- return s;
991
- }, Re(E, A) {
992
- const t = u, e = E.Se, s = E.loca;
993
- if (s[A] === s[A + 1]) return null;
994
- const i = m.findTable(e, "glyf", E.ke);
995
- if (!i) return null;
996
- let B = i[0] + s[A];
997
- const r = {};
998
- if (r.noc = t.readShort(e, B), B += 2, r.xMin = t.readShort(e, B), B += 2, r.yMin = t.readShort(e, B), B += 2, r.xMax = t.readShort(e, B), B += 2, r.yMax = t.readShort(e, B), B += 2, r.xMin >= r.xMax || r.yMin >= r.yMax) return null;
999
- if (r.noc > 0) {
1000
- r.endPts = [];
1001
- for (let h = 0; h < r.noc; h++) r.endPts.push(t.readUshort(e, B)), B += 2;
1002
- const n = t.readUshort(e, B);
1003
- if (B += 2, e.length - B < n) return null;
1004
- B += n;
1005
- const o = r.endPts[r.noc - 1] + 1;
1006
- r.flags = [];
1007
- for (let h = 0; h < o; h++) {
1008
- const c = e[B];
1009
- if (B++, r.flags.push(c), 8 & c) {
1010
- const l = e[B];
1011
- B++;
1012
- for (let C = 0; C < l; C++) r.flags.push(c), h++;
1013
- }
954
+ alignToByte() {
955
+ this.bitbuf = 0, this.bitcnt = 0;
956
+ }
957
+ get offset() {
958
+ return this.p;
959
+ }
960
+ }
961
+ function G(a) {
962
+ let t = 32, e = 0;
963
+ for (const o of a) o && (o < t && (t = o), o > e && (e = o));
964
+ if (e === 0) return { min: 0, max: 0, table: /* @__PURE__ */ new Map() };
965
+ const i = new Uint32Array(e + 1);
966
+ for (const o of a) o && i[o]++;
967
+ const s = new Uint32Array(e + 1);
968
+ let r = 0;
969
+ i[0] = 0;
970
+ for (let o = 1; o <= e; o++) r = r + i[o - 1] << 1, s[o] = r;
971
+ const n = /* @__PURE__ */ new Map();
972
+ for (let o = 0; o < a.length; o++) {
973
+ const c = a[o];
974
+ if (!c) continue;
975
+ const l = s[c]++;
976
+ let f = n.get(c);
977
+ f || (f = [], n.set(c, f)), f[Pt(l, c)] = o;
978
+ }
979
+ return { min: t, max: e, table: n };
980
+ }
981
+ function j(a, t) {
982
+ let e = 0;
983
+ for (let i = 1; i <= t.max; i++) {
984
+ e |= a.readBits(1) << i - 1;
985
+ const s = t.table.get(i);
986
+ if (s && e < s.length) {
987
+ const r = s[e];
988
+ if (r !== void 0) return r;
1014
989
  }
1015
- r.xs = [];
1016
- for (let h = 0; h < o; h++) {
1017
- const c = r.flags[h], l = !!(16 & c);
1018
- 2 & c ? (r.xs.push(l ? e[B] : -e[B]), B++) : l ? r.xs.push(0) : (r.xs.push(t.readShort(e, B)), B += 2);
990
+ }
991
+ throw Error("Invalid Huffman code");
992
+ }
993
+ function Pt(a, t) {
994
+ let e = 0;
995
+ for (let i = 0; i < t; i++) e = e << 1 | 1 & a, a >>>= 1;
996
+ return e >>> 0;
997
+ }
998
+ function Lt(a) {
999
+ if (a.length < 2) throw Error("ZLIB data too short");
1000
+ const t = a[0], e = a[1];
1001
+ if ((15 & t) != 8) throw Error("Unsupported ZLIB compression method");
1002
+ if (((t << 8) + e) % 31 != 0) throw Error("Bad ZLIB header check");
1003
+ let i = 2;
1004
+ 32 & e && (i += 4);
1005
+ const s = [];
1006
+ return function(r, n) {
1007
+ const o = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258], c = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], l = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577], f = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];
1008
+ let u = 0;
1009
+ for (; !u; ) {
1010
+ u = r.readBits(1);
1011
+ const g = r.readBits(2);
1012
+ if (g === 0) {
1013
+ r.alignToByte();
1014
+ const v = r.readBits(16);
1015
+ if ((65535 & (65535 ^ v)) !== r.readBits(16)) throw Error("DEFLATE uncompressed LEN/NLEN mismatch");
1016
+ for (let m = 0; m < v; m++) n.push(r.readBits(8));
1017
+ } else {
1018
+ if (g !== 1 && g !== 2) throw Error("Unsupported DEFLATE type");
1019
+ {
1020
+ let v, m;
1021
+ if (g === 1) {
1022
+ const d = Array(288).fill(0);
1023
+ for (let A = 0; A <= 143; A++) d[A] = 8;
1024
+ for (let A = 144; A <= 255; A++) d[A] = 9;
1025
+ for (let A = 256; A <= 279; A++) d[A] = 7;
1026
+ for (let A = 280; A <= 287; A++) d[A] = 8;
1027
+ v = G(d), m = G(Array(32).fill(5));
1028
+ } else {
1029
+ const d = r.readBits(5) + 257, A = r.readBits(5) + 1, p = r.readBits(4) + 4, y = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], x = Array(19).fill(0);
1030
+ for (let F = 0; F < p; F++) x[y[F]] = r.readBits(3);
1031
+ const C = G(x), R = [];
1032
+ for (; R.length < d + A; ) {
1033
+ const F = j(r, C);
1034
+ if (F <= 15) R.push(F);
1035
+ else if (F === 16) {
1036
+ const O = r.readBits(2) + 3, L = R[R.length - 1] || 0;
1037
+ for (let tt = 0; tt < O; tt++) R.push(L);
1038
+ } else if (F === 17) {
1039
+ const O = r.readBits(3) + 3;
1040
+ for (let L = 0; L < O; L++) R.push(0);
1041
+ } else {
1042
+ if (F !== 18) throw Error("Invalid code length symbol");
1043
+ {
1044
+ const O = r.readBits(7) + 11;
1045
+ for (let L = 0; L < O; L++) R.push(0);
1046
+ }
1047
+ }
1048
+ }
1049
+ const b = R.slice(0, d), S = R.slice(d, d + A);
1050
+ v = G(b), m = G(S);
1051
+ }
1052
+ for (; ; ) {
1053
+ const d = j(r, v);
1054
+ if (d < 256) n.push(d);
1055
+ else {
1056
+ if (d === 256) break;
1057
+ if (d > 256 && d < 286) {
1058
+ const A = d - 257;
1059
+ let p = o[A];
1060
+ const y = c[A];
1061
+ y && (p += r.readBits(y));
1062
+ const x = j(r, m);
1063
+ if (x >= 30) throw Error("Invalid distance symbol");
1064
+ let C = l[x];
1065
+ const R = f[x];
1066
+ R && (C += r.readBits(R));
1067
+ const b = n.length - C;
1068
+ if (b < 0) throw Error("Invalid distance");
1069
+ for (let S = 0; S < p; S++) n.push(n[b + S] || 0);
1070
+ } else if (d === 286 || d === 287) throw Error("Reserved length symbol");
1071
+ }
1072
+ }
1073
+ }
1074
+ }
1019
1075
  }
1020
- r.ys = [];
1021
- for (let h = 0; h < o; h++) {
1022
- const c = r.flags[h], l = !!(32 & c);
1023
- 4 & c ? (r.ys.push(l ? e[B] : -e[B]), B++) : l ? r.ys.push(0) : (r.ys.push(t.readShort(e, B)), B += 2);
1076
+ }(new Bt(a.subarray(i)), s), new Uint8Array(s);
1077
+ }
1078
+ function Mt(a) {
1079
+ const t = w, e = new Uint8Array(a);
1080
+ if (t.readASCII(e, 0, 4) !== "wOFF") throw Error("Invalid WOFF signature");
1081
+ const i = t.readUint(e, 4), s = t.readUshort(e, 12), r = t.readUint(e, 16), n = [];
1082
+ let o = 44;
1083
+ for (let p = 0; p < s; p++) {
1084
+ const y = t.readASCII(e, o, 4), x = t.readUint(e, o + 4), C = t.readUint(e, o + 8), R = t.readUint(e, o + 12), b = t.readUint(e, o + 16);
1085
+ n.push({ tag: y, offset: x, compLength: C, origLength: R, checksum: b }), o += 20;
1086
+ }
1087
+ for (const p of n) {
1088
+ const y = new Uint8Array(e.buffer, p.offset, p.compLength);
1089
+ if (p.compLength === p.origLength) p.data = new Uint8Array(y);
1090
+ else if (p.data = Lt(y), p.data.length !== p.origLength) if (p.data.length < p.origLength) {
1091
+ const x = new Uint8Array(p.origLength);
1092
+ x.set(p.data), p.data = x;
1093
+ } else p.data = p.data.subarray(0, p.origLength);
1094
+ }
1095
+ const c = s;
1096
+ let l = 1, f = 0;
1097
+ for (; l << 1 <= c; ) l <<= 1, f++;
1098
+ const u = 16 * l, g = 16 * c - u;
1099
+ let v = 12 + 16 * c;
1100
+ const m = {};
1101
+ for (const p of n) m[p.tag] = v, v = W(v + p.data.length);
1102
+ const d = new Uint8Array(Math.max(r || 0, v));
1103
+ t.writeUint(d, 0, i), t.writeUshort(d, 4, c), t.writeUshort(d, 6, u), t.writeUshort(d, 8, f), t.writeUshort(d, 10, g);
1104
+ let A = 12;
1105
+ for (const p of n) {
1106
+ t.writeASCII(d, A, p.tag), A += 4;
1107
+ let y = p.data;
1108
+ if (p.tag === "head" && y.length >= 12) {
1109
+ const x = new Uint8Array(y);
1110
+ t.writeUint(x, 8, 0);
1111
+ const C = V(x, 0, W(x.length));
1112
+ t.writeUint(d, A, C), A += 4;
1113
+ } else {
1114
+ const x = V(y, 0, W(y.length));
1115
+ t.writeUint(d, A, x), A += 4;
1024
1116
  }
1025
- let a = 0, g = 0;
1026
- for (let h = 0; h < o; h++) a += r.xs[h], g += r.ys[h], r.xs[h] = a, r.ys[h] = g;
1027
- } else r.parts = [], r.endPts = [], r.flags = [], r.xs = [], r.ys = [];
1028
- return r;
1029
- } } }, m = { parse: (E) => [((A, t, e, s) => {
1030
- const i = N, B = { Se: A, ze: t, ke: e };
1031
- for (const r in i) {
1032
- const n = r, o = m.findTable(A, n, e);
1033
- if (o) {
1034
- const [a, g] = o;
1035
- let h = s[a];
1036
- h == null && (h = i[n].parseTab(A, a, g, B), s[a] = h), B[n] = h;
1117
+ t.writeUint(d, A, m[p.tag]), A += 4, t.writeUint(d, A, p.data.length), A += 4;
1118
+ }
1119
+ for (const p of n) {
1120
+ const y = m[p.tag];
1121
+ d.set(p.data, y);
1122
+ }
1123
+ if (n.find((p) => p.tag === "head")) {
1124
+ const p = m.head, y = function(x, C) {
1125
+ const R = w, b = C + 8, S = [x[b], x[b + 1], x[b + 2], x[b + 3]];
1126
+ R.writeUint(x, b, 0);
1127
+ const F = 2981146554 - (V(x, 0, W(x.length)) >>> 0) >>> 0;
1128
+ return x[b] = S[0], x[b + 1] = S[1], x[b + 2] = S[2], x[b + 3] = S[3], F >>> 0;
1129
+ }(d, p);
1130
+ t.writeUint(d, p + 8, y);
1131
+ }
1132
+ return d.buffer;
1133
+ }
1134
+ const Dt = { parseTab(a, t, e) {
1135
+ const i = { tables: [], ids: {}, off: t };
1136
+ a = new Uint8Array(a.buffer, t, e), t = 0;
1137
+ const s = w, r = s.readUshort, n = r(a, t += 2);
1138
+ t += 2;
1139
+ const o = [];
1140
+ for (let c = 0; c < n; c++) {
1141
+ const l = r(a, t), f = r(a, t += 2);
1142
+ t += 2;
1143
+ const u = s.readUint(a, t);
1144
+ t += 4;
1145
+ const g = `p${l}e${f}`;
1146
+ let v = o.indexOf(u);
1147
+ if (v === -1) {
1148
+ let m;
1149
+ v = i.tables.length, o.push(u);
1150
+ const d = r(a, u);
1151
+ m = d === 4 ? this.parse4(a, u) : d === 12 ? this.parse12(a, u) : { format: d }, i.tables.push(m);
1037
1152
  }
1153
+ i.ids[g] = v;
1038
1154
  }
1039
- return B;
1040
- })(new Uint8Array(E), 0, 0, {})], findTable(E, A, t) {
1041
- const e = u, s = e.readUshort(E, t + 4);
1042
- let i = t + 12;
1043
- for (let B = 0; B < s; B++) {
1044
- const r = e.readASCII(E, i, 4);
1045
- e.readUint(E, i + 4);
1046
- const n = e.readUint(E, i + 8), o = e.readUint(E, i + 12);
1047
- if (r === A) return [n, o];
1048
- i += 16;
1155
+ return i;
1156
+ }, parse4(a, t) {
1157
+ const e = w, i = e.readUshort, s = e.readUshorts, r = t, n = i(a, t += 2);
1158
+ t += 2;
1159
+ const o = i(a, t += 2) >>> 1, c = { format: 4, searchRange: i(a, t += 2), entrySelector: 0, rangeShift: 0, endCount: [], startCount: [], idDelta: [], idRangeOffset: [], glyphIdArray: [] };
1160
+ t += 2, c.entrySelector = i(a, t), t += 2, c.rangeShift = i(a, t), t += 2, c.endCount = s(a, t, o), t += 2 * o, t += 2, c.startCount = s(a, t, o), t += 2 * o;
1161
+ for (let l = 0; l < o; l++) c.idDelta.push(e.readShort(a, t)), t += 2;
1162
+ return c.idRangeOffset = s(a, t, o), t += 2 * o, c.glyphIdArray = s(a, t, r + n - t >> 1), c;
1163
+ }, parse12(a, t) {
1164
+ const e = w.readUint;
1165
+ e(a, t += 4), e(a, t += 4);
1166
+ const i = e(a, t += 4);
1167
+ t += 4;
1168
+ const s = new Uint32Array(3 * i);
1169
+ for (let r = 0; r < 3 * i; r += 3) s[r] = e(a, t + (r << 2)), s[r + 1] = e(a, t + (r << 2) + 4), s[r + 2] = e(a, t + (r << 2) + 8);
1170
+ return { format: 12, groups: s };
1171
+ } }, _t = { parseTab(a, t, e) {
1172
+ const i = w;
1173
+ t += 18;
1174
+ const s = i.readUshort(a, t);
1175
+ t += 2, t += 16;
1176
+ const r = i.readShort(a, t);
1177
+ t += 2;
1178
+ const n = i.readShort(a, t);
1179
+ t += 2;
1180
+ const o = i.readShort(a, t);
1181
+ t += 2;
1182
+ const c = i.readShort(a, t);
1183
+ return t += 2, t += 6, { unitsPerEm: s, xMin: r, yMin: n, xMax: o, yMax: c, indexToLocFormat: i.readShort(a, t) };
1184
+ } }, It = { parseTab(a, t, e) {
1185
+ const i = w;
1186
+ t += 4;
1187
+ const s = ["ascender", "descender", "lineGap", "advanceWidthMax", "minLeftSideBearing", "minRightSideBearing", "xMaxExtent", "caretSlopeRise", "caretSlopeRun", "caretOffset", "res0", "res1", "res2", "res3", "metricDataFormat", "numberOfHMetrics"], r = {};
1188
+ for (let n = 0; n < s.length; n++) {
1189
+ const o = s[n], c = o === "advanceWidthMax" || o === "numberOfHMetrics" ? i.readUshort : i.readShort;
1190
+ r[o] = c(a, t + 2 * n);
1049
1191
  }
1050
- return null;
1051
- }, T: N, B: u };
1052
- class _ {
1053
- constructor() {
1054
- Q(this, "Le", /* @__PURE__ */ new Map());
1055
- Q(this, "Oe", /* @__PURE__ */ new Map());
1056
- }
1057
- Te(A, t) {
1058
- const e = `${this.Ue(A)}_${t}`;
1059
- if (this.Le.has(e)) return this.Le.get(e);
1060
- const s = A.cmap;
1061
- if (!s || !s.tables) return this.Le.set(e, 0), 0;
1062
- let i = 0;
1063
- for (const B of s.tables) if (B.format === 4 ? i = this.We(t, B) : B.format === 12 && (i = this.He(t, B)), i > 0) break;
1064
- return this.Le.set(e, i), i;
1065
- }
1066
- Ke(A, t) {
1067
- const e = t.codePointAt(0);
1068
- return e === void 0 ? 0 : this.Te(A, e);
1069
- }
1070
- Je(A, t) {
1071
- const e = A.hmtx;
1072
- return e && e.aWidth && e.aWidth.length !== 0 ? t < e.aWidth.length ? e.aWidth[t] : e.aWidth[e.aWidth.length - 1] : 0;
1073
- }
1074
- Ve(A, t) {
1075
- const e = t / A.head.unitsPerEm, s = A.hhea.ascender * e, i = A.hhea.descender * e, B = A.hhea.lineGap * e;
1076
- return { ascender: s, descender: i, lineGap: B, lineHeight: s - i + B, unitsPerEm: A.head.unitsPerEm, scale: e };
1077
- }
1078
- Ze() {
1079
- this.Le.clear(), this.Oe.clear();
1080
- }
1081
- Ue(A) {
1082
- return `${A.ke}_${A.Se.length}`;
1083
- }
1084
- We(A, t) {
1085
- const e = t.endCount.length;
1086
- let s = -1;
1087
- for (let i = 0; i < e; i++) if (A <= t.endCount[i]) {
1088
- s = i;
1089
- break;
1090
- }
1091
- if (s === -1 || A < t.startCount[s]) return 0;
1092
- if (t.idRangeOffset[s] === 0) return A + t.idDelta[s] & 65535;
1093
- {
1094
- const i = t.idRangeOffset[s] / 2 + (A - t.startCount[s]) - (e - s);
1095
- if (i >= 0 && i < t.glyphIdArray.length) {
1096
- const B = t.glyphIdArray[i];
1097
- return B === 0 ? 0 : B + t.idDelta[s] & 65535;
1192
+ return r;
1193
+ } }, Ot = { parseTab(a, t, e, i) {
1194
+ const s = w, r = [], n = [], o = i.maxp.numGlyphs, c = i.hhea.numberOfHMetrics;
1195
+ let l = 0, f = 0, u = 0;
1196
+ for (; u < c; ) l = s.readUshort(a, t + (u << 2)), f = s.readShort(a, t + (u << 2) + 2), r.push(l), n.push(f), u++;
1197
+ for (; u < o; ) r.push(l), n.push(f), u++;
1198
+ return { aWidth: r, lsBearing: n };
1199
+ } }, it = { cmap: Dt, head: _t, hhea: It, maxp: { parseTab(a, t, e) {
1200
+ const i = w;
1201
+ return i.readUint(a, t), t += 4, { numGlyphs: i.readUshort(a, t) };
1202
+ } }, hmtx: Ot, loca: { parseTab(a, t, e, i) {
1203
+ const s = w, r = [], n = i.head.indexToLocFormat, o = i.maxp.numGlyphs + 1;
1204
+ if (n === 0) for (let c = 0; c < o; c++) r.push(s.readUshort(a, t + (c << 1)) << 1);
1205
+ else if (n === 1) for (let c = 0; c < o; c++) r.push(s.readUint(a, t + (c << 2)));
1206
+ return r;
1207
+ } }, glyf: { parseTab(a, t, e, i) {
1208
+ const s = [], r = i.maxp.numGlyphs;
1209
+ for (let n = 0; n < r; n++) s.push(null);
1210
+ return s;
1211
+ }, Qs(a, t) {
1212
+ const e = w, i = a.Js, s = a.loca;
1213
+ if (s[t] === s[t + 1]) return null;
1214
+ const r = B.findTable(i, "glyf", a.ti);
1215
+ if (!r) return null;
1216
+ let n = r[0] + s[t];
1217
+ const o = {};
1218
+ if (o.noc = e.readShort(i, n), n += 2, o.xMin = e.readShort(i, n), n += 2, o.yMin = e.readShort(i, n), n += 2, o.xMax = e.readShort(i, n), n += 2, o.yMax = e.readShort(i, n), n += 2, o.xMin >= o.xMax || o.yMin >= o.yMax) return null;
1219
+ if (o.noc > 0) {
1220
+ o.endPts = [];
1221
+ for (let g = 0; g < o.noc; g++) o.endPts.push(e.readUshort(i, n)), n += 2;
1222
+ const c = e.readUshort(i, n);
1223
+ if (n += 2, i.length - n < c) return null;
1224
+ n += c;
1225
+ const l = o.endPts[o.noc - 1] + 1;
1226
+ o.flags = [];
1227
+ for (let g = 0; g < l; g++) {
1228
+ const v = i[n];
1229
+ if (n++, o.flags.push(v), 8 & v) {
1230
+ const m = i[n];
1231
+ n++;
1232
+ for (let d = 0; d < m; d++) o.flags.push(v), g++;
1098
1233
  }
1099
1234
  }
1100
- return 0;
1101
- }
1102
- He(A, t) {
1103
- const e = t.groups.length / 3;
1104
- for (let s = 0; s < e; s++) {
1105
- const i = t.groups[3 * s], B = t.groups[3 * s + 1], r = t.groups[3 * s + 2];
1106
- if (A >= i && A <= B) return r + (A - i);
1235
+ o.xs = [];
1236
+ for (let g = 0; g < l; g++) {
1237
+ const v = o.flags[g], m = !!(16 & v);
1238
+ 2 & v ? (o.xs.push(m ? i[n] : -i[n]), n++) : m ? o.xs.push(0) : (o.xs.push(e.readShort(i, n)), n += 2);
1107
1239
  }
1108
- return 0;
1109
- }
1110
- }
1111
- class pA {
1112
- constructor(A) {
1113
- Q(this, "Ne");
1114
- this.Ne = A;
1240
+ o.ys = [];
1241
+ for (let g = 0; g < l; g++) {
1242
+ const v = o.flags[g], m = !!(32 & v);
1243
+ 4 & v ? (o.ys.push(m ? i[n] : -i[n]), n++) : m ? o.ys.push(0) : (o.ys.push(e.readShort(i, n)), n += 2);
1244
+ }
1245
+ let f = 0, u = 0;
1246
+ for (let g = 0; g < l; g++) f += o.xs[g], u += o.ys[g], o.xs[g] = f, o.ys[g] = u;
1247
+ } else o.parts = [], o.endPts = [], o.flags = [], o.xs = [], o.ys = [];
1248
+ return o;
1249
+ } } }, B = { parse(a) {
1250
+ const t = new Uint8Array(a), e = w.readASCII(t, 0, 4);
1251
+ if (e === "wOFF") a = Mt(a);
1252
+ else if (e === "wOF2") throw Error("WOFF2 is not supported in this build (Brotli + WOFF2 transforms required)");
1253
+ return [((i, s, r, n) => {
1254
+ const o = it, c = { Js: i, ei: s, ti: r };
1255
+ for (const l in o) {
1256
+ const f = l, u = B.findTable(i, f, r);
1257
+ if (u) {
1258
+ const [g, v] = u;
1259
+ let m = n[g];
1260
+ m == null && (m = o[f].parseTab(i, g, v, c), n[g] = m), c[f] = m;
1261
+ }
1262
+ }
1263
+ return c;
1264
+ })(new Uint8Array(a), 0, 0, {})];
1265
+ }, findTable(a, t, e) {
1266
+ const i = w, s = i.readUshort(a, e + 4);
1267
+ let r = e + 12;
1268
+ for (let n = 0; n < s; n++) {
1269
+ const o = i.readASCII(a, r, 4);
1270
+ i.readUint(a, r + 4);
1271
+ const c = i.readUint(a, r + 8), l = i.readUint(a, r + 12);
1272
+ if (o === t) return [c, l];
1273
+ r += 16;
1115
1274
  }
1116
- Xe(A) {
1117
- var e;
1118
- const t = [];
1119
- return (e = A.cmap) != null && e.tables ? (A.cmap.tables.forEach((s) => {
1275
+ return null;
1276
+ }, T: it, B: w };
1277
+ class Gt {
1278
+ si(t) {
1279
+ var i;
1280
+ const e = [];
1281
+ return (i = t.cmap) != null && i.tables ? (t.cmap.tables.forEach((s) => {
1120
1282
  if (s.format === 4) {
1121
- const i = this.je(s);
1122
- t.push(...i);
1283
+ const r = this.ii(s);
1284
+ e.push(...r);
1123
1285
  } else if (s.format === 12) {
1124
- const i = this.qe(s);
1125
- t.push(...i);
1286
+ const r = this.ri(s);
1287
+ e.push(...r);
1126
1288
  }
1127
- }), [...new Set(t)]) : [];
1128
- }
1129
- As(A, t) {
1130
- return this.Ne.Ke(A, t) > 0;
1289
+ }), [...new Set(e)]) : [];
1131
1290
  }
1132
- ts(A, t) {
1133
- for (const e of t) if (!this.As(A, e)) return !1;
1134
- return !0;
1291
+ ni(t) {
1292
+ return t.filter((e) => this.oi(e));
1135
1293
  }
1136
- es(A, t) {
1137
- return t.filter((e) => this.As(A, e));
1138
- }
1139
- ss(A) {
1140
- return A.filter((t) => this.Bs(t));
1141
- }
1142
- je(A) {
1143
- const t = [];
1144
- if (!(A.startCount && A.endCount && A.idRangeOffset && A.idDelta)) return t;
1145
- for (let e = 0; e < A.startCount.length; e++) {
1146
- const s = A.startCount[e], i = A.endCount[e];
1147
- if (s !== 65535 || i !== 65535) {
1148
- for (let B = s; B <= i; B++)
1149
- if (this.Qs(A, B, e) > 0) try {
1150
- const r = String.fromCodePoint(B);
1151
- t.push(r);
1294
+ ii(t) {
1295
+ const e = [];
1296
+ if (!(t.startCount && t.endCount && t.idRangeOffset && t.idDelta)) return e;
1297
+ for (let i = 0; i < t.startCount.length; i++) {
1298
+ const s = t.startCount[i], r = t.endCount[i];
1299
+ if (s !== 65535 || r !== 65535) {
1300
+ for (let n = s; n <= r; n++)
1301
+ if (this.ai(t, n, i) > 0) try {
1302
+ const o = String.fromCodePoint(n);
1303
+ e.push(o);
1152
1304
  } catch {
1153
1305
  }
1154
1306
  }
1155
1307
  }
1156
- return t;
1308
+ return e;
1157
1309
  }
1158
- qe(A) {
1159
- const t = [];
1160
- if (!A.groups) return t;
1161
- for (let e = 0; e < A.groups.length; e += 3) {
1162
- const s = A.groups[e], i = A.groups[e + 1], B = A.groups[e + 2];
1163
- for (let r = s; r <= i; r++)
1164
- if (B + (r - s) > 0) try {
1165
- const n = String.fromCodePoint(r);
1166
- t.push(n);
1310
+ ri(t) {
1311
+ const e = [];
1312
+ if (!t.groups) return e;
1313
+ for (let i = 0; i < t.groups.length; i += 3) {
1314
+ const s = t.groups[i], r = t.groups[i + 1], n = t.groups[i + 2];
1315
+ for (let o = s; o <= r; o++)
1316
+ if (n + (o - s) > 0) try {
1317
+ const c = String.fromCodePoint(o);
1318
+ e.push(c);
1167
1319
  } catch {
1168
1320
  }
1169
1321
  }
1170
- return t;
1322
+ return e;
1171
1323
  }
1172
- Qs(A, t, e) {
1173
- if (A.idRangeOffset[e] === 0) return t + A.idDelta[e] & 65535;
1324
+ ai(t, e, i) {
1325
+ if (t.idRangeOffset[i] === 0) return e + t.idDelta[i] & 65535;
1174
1326
  {
1175
- const s = A.idRangeOffset[e] / 2 + (t - A.startCount[e]) - (A.startCount.length - e);
1176
- if (s >= 0 && A.glyphIdArray && s < A.glyphIdArray.length) {
1177
- const i = A.glyphIdArray[s];
1178
- if (i !== 0) return i + A.idDelta[e] & 65535;
1327
+ const s = t.idRangeOffset[i] / 2 + (e - t.startCount[i]) - (t.startCount.length - i);
1328
+ if (s >= 0 && t.glyphIdArray && s < t.glyphIdArray.length) {
1329
+ const r = t.glyphIdArray[s];
1330
+ if (r !== 0) return r + t.idDelta[i] & 65535;
1179
1331
  }
1180
1332
  }
1181
1333
  return 0;
1182
1334
  }
1183
- Bs(A) {
1184
- const t = A.codePointAt(0) || 0;
1185
- return !(t >= 0 && t <= 31 && t !== 9 && t !== 10 && t !== 13 || t >= 127 && t <= 159);
1335
+ oi(t) {
1336
+ const e = t.codePointAt(0) || 0;
1337
+ return !(e >= 0 && e <= 31 && e !== 9 && e !== 10 && e !== 13 || e >= 127 && e <= 159);
1186
1338
  }
1187
1339
  }
1188
- class mA {
1340
+ class Z {
1189
1341
  constructor() {
1190
- Q(this, "Es");
1191
- const A = new _();
1192
- this.Es = new pA(A);
1193
- }
1194
- extractCharacters(A) {
1195
- return this.Es.Xe(A);
1196
- }
1197
- filterProblematicCharacters(A) {
1198
- return this.Es.ss(A);
1199
- }
1200
- characterExists(A, t) {
1201
- return this.Es.As(A, t);
1342
+ h(this, "hi", /* @__PURE__ */ new Map());
1343
+ h(this, "ci", /* @__PURE__ */ new Map());
1344
+ }
1345
+ li(t, e) {
1346
+ const i = `${this.ui(t)}_${e}`;
1347
+ if (this.hi.has(i)) return this.hi.get(i);
1348
+ const s = t.cmap;
1349
+ if (!s || !s.tables) return this.hi.set(i, 0), 0;
1350
+ let r = 0;
1351
+ for (const n of s.tables) if (n.format === 4 ? r = this.fi(e, n) : n.format === 12 && (r = this.di(e, n)), r > 0) break;
1352
+ return this.hi.set(i, r), r;
1353
+ }
1354
+ pi(t, e) {
1355
+ const i = e.codePointAt(0);
1356
+ return i === void 0 ? 0 : this.li(t, i);
1357
+ }
1358
+ mi(t, e) {
1359
+ const i = t.hmtx;
1360
+ return i && i.aWidth && i.aWidth.length !== 0 ? e < i.aWidth.length ? i.aWidth[e] : i.aWidth[i.aWidth.length - 1] : 0;
1361
+ }
1362
+ gi(t, e) {
1363
+ const i = e / t.head.unitsPerEm, s = t.hhea.ascender * i, r = t.hhea.descender * i, n = t.hhea.lineGap * i;
1364
+ return { ascender: s, descender: r, lineGap: n, lineHeight: s - r + n, unitsPerEm: t.head.unitsPerEm, scale: i };
1365
+ }
1366
+ _i() {
1367
+ this.hi.clear(), this.ci.clear();
1368
+ }
1369
+ ui(t) {
1370
+ return `${t.ti}_${t.Js.length}`;
1371
+ }
1372
+ fi(t, e) {
1373
+ const i = e.endCount.length;
1374
+ let s = -1;
1375
+ for (let r = 0; r < i; r++) if (t <= e.endCount[r]) {
1376
+ s = r;
1377
+ break;
1378
+ }
1379
+ if (s === -1 || t < e.startCount[s]) return 0;
1380
+ if (e.idRangeOffset[s] === 0) return t + e.idDelta[s] & 65535;
1381
+ {
1382
+ const r = e.idRangeOffset[s] / 2 + (t - e.startCount[s]) - (i - s);
1383
+ if (r >= 0 && r < e.glyphIdArray.length) {
1384
+ const n = e.glyphIdArray[r];
1385
+ return n === 0 ? 0 : n + e.idDelta[s] & 65535;
1386
+ }
1387
+ }
1388
+ return 0;
1202
1389
  }
1203
- allCharactersExist(A, t) {
1204
- return this.Es.ts(A, t);
1390
+ di(t, e) {
1391
+ const i = e.groups.length / 3;
1392
+ for (let s = 0; s < i; s++) {
1393
+ const r = e.groups[3 * s], n = e.groups[3 * s + 1], o = e.groups[3 * s + 2];
1394
+ if (t >= r && t <= n) return o + (t - r);
1395
+ }
1396
+ return 0;
1205
1397
  }
1206
1398
  }
1207
- class vA {
1208
- constructor(A) {
1209
- Q(this, "rs");
1210
- Q(this, "ns");
1211
- Q(this, "vA");
1212
- Q(this, "gs");
1213
- this.vA = A, this.gs = new _(), this.rs = document.createElement("canvas"), this.ns = this.rs.getContext("2d", { willReadFrequently: !0, alpha: !1 });
1214
- }
1215
- createTextureAtlas(A, t, e, s) {
1216
- const i = A.length, B = Math.ceil(Math.sqrt(i)), r = Math.ceil(i / B), n = t.width * B, o = t.height * r, a = typeof s == "object" ? s : null;
1217
- this.hs(n, o), this.cs(A, t, B, e, a);
1218
- const g = this.vA.Me(n, o, 1, { filter: "nearest" });
1219
- return g.MA(this.rs), { framebuffer: g, columns: B, rows: r };
1220
- }
1221
- hs(A, t) {
1222
- this.rs.width = A, this.rs.height = t, this.rs.style.width = A + "px", this.rs.style.height = A + "px", this.ns.imageSmoothingEnabled = !1, this.rs.style.imageRendering = "pixelated", this.ns.fillStyle = "black", this.ns.fillRect(0, 0, A, t), this.ns.textBaseline = "top", this.ns.textAlign = "left", this.ns.fillStyle = "white";
1223
- }
1224
- cs(A, t, e, s, i) {
1225
- const B = s / i.head.unitsPerEm;
1226
- for (let r = 0; r < A.length; r++) {
1227
- const n = r % e, o = Math.floor(r / e), a = A[r].character, g = this.Cs(i, a);
1228
- if (!g) continue;
1229
- const h = a.codePointAt(0) || 0, c = this.gs.Te(i, h), l = this.ls(i, c) * B, C = n * t.width, f = o * t.height, w = C + 0.5 * t.width, d = f + 0.5 * t.height, p = Math.round(w - 0.5 * t.width), R = Math.round(d - 0.5 * s), Z = p + 0.5 * (t.width - l), j = R + i.hhea.ascender * B;
1230
- this.Ds(g, Z, j, B);
1399
+ class Nt {
1400
+ constructor(t) {
1401
+ h(this, "yi");
1402
+ h(this, "Ai");
1403
+ h(this, "xt");
1404
+ h(this, "wi");
1405
+ this.xt = t, this.wi = new Z(), this.yi = document.createElement("canvas"), this.Ai = this.yi.getContext("2d", { willReadFrequently: !0, alpha: !1 });
1406
+ }
1407
+ createTextureAtlas(t, e, i, s) {
1408
+ const r = t.length, n = Math.ceil(Math.sqrt(r)), o = Math.ceil(r / n), c = e.width * n, l = e.height * o, f = typeof s == "object" ? s : null;
1409
+ this.Ci(c, l), this.bi(t, e, n, i, f);
1410
+ const u = this.xt.js(c, l, 1, { filter: "nearest" });
1411
+ return u.zt(this.yi), { framebuffer: u, columns: n, rows: o };
1412
+ }
1413
+ Ci(t, e) {
1414
+ this.yi.width = t, this.yi.height = e, this.yi.style.width = t + "px", this.yi.style.height = t + "px", this.Ai.imageSmoothingEnabled = !1, this.yi.style.imageRendering = "pixelated", this.Ai.fillStyle = "black", this.Ai.fillRect(0, 0, t, e), this.Ai.textBaseline = "top", this.Ai.textAlign = "left", this.Ai.fillStyle = "white";
1415
+ }
1416
+ bi(t, e, i, s, r) {
1417
+ const n = s / r.head.unitsPerEm;
1418
+ for (let o = 0; o < t.length; o++) {
1419
+ const c = o % i, l = Math.floor(o / i), f = t[o].character, u = this.xi(r, f);
1420
+ if (!u) continue;
1421
+ const g = f.codePointAt(0) || 0, v = this.wi.li(r, g), m = this.$i(r, v) * n, d = c * e.width, A = l * e.height, p = d + 0.5 * e.width, y = A + 0.5 * e.height, x = Math.round(p - 0.5 * e.width), C = Math.round(y - 0.5 * s), R = x + 0.5 * (e.width - m), b = C + r.hhea.ascender * n;
1422
+ this.Mi(u, R, b, n);
1231
1423
  }
1232
1424
  }
1233
- Cs(A, t) {
1234
- const e = t.codePointAt(0) || 0, s = this.gs.Te(A, e);
1425
+ xi(t, e) {
1426
+ const i = e.codePointAt(0) || 0, s = this.wi.li(t, i);
1235
1427
  if (s === 0) return null;
1236
- if (A.glyf && A.glyf[s] !== null) return A.glyf[s];
1237
- if (m && m.T && m.T.glyf) {
1238
- const i = m.T.glyf.Re(A, s);
1239
- return A.glyf && i && (A.glyf[s] = i), i;
1428
+ if (t.glyf && t.glyf[s] !== null) return t.glyf[s];
1429
+ if (B && B.T && B.T.glyf) {
1430
+ const r = B.T.glyf.Qs(t, s);
1431
+ return t.glyf && r && (t.glyf[s] = r), r;
1240
1432
  }
1241
1433
  return null;
1242
1434
  }
1243
- ls(A, t) {
1244
- const e = A.hmtx;
1245
- return e && e.aWidth ? t < e.aWidth.length ? e.aWidth[t] : e.aWidth[e.aWidth.length - 1] : 0;
1246
- }
1247
- Ds(A, t, e, s) {
1248
- if (!A || !A.xs || A.noc === 0) return;
1249
- const { xs: i, ys: B, endPts: r, flags: n } = A;
1250
- if (!(i && B && r && n)) return;
1251
- this.ns.beginPath();
1252
- let o = 0;
1253
- for (let a = 0; a < r.length; a++) {
1254
- const g = r[a];
1255
- if (!(g < o)) {
1256
- if (g >= o) {
1257
- const h = t + i[o] * s, c = e - B[o] * s;
1258
- this.ns.moveTo(h, c);
1259
- let l = o + 1;
1260
- for (; l <= g; )
1261
- if (1 & n[l]) {
1262
- const C = t + i[l] * s, f = e - B[l] * s;
1263
- this.ns.lineTo(C, f), l++;
1435
+ $i(t, e) {
1436
+ const i = t.hmtx;
1437
+ return i && i.aWidth ? e < i.aWidth.length ? i.aWidth[e] : i.aWidth[i.aWidth.length - 1] : 0;
1438
+ }
1439
+ Mi(t, e, i, s) {
1440
+ if (!t || !t.xs || t.noc === 0) return;
1441
+ const { xs: r, ys: n, endPts: o, flags: c } = t;
1442
+ if (!(r && n && o && c)) return;
1443
+ this.Ai.beginPath();
1444
+ let l = 0;
1445
+ for (let f = 0; f < o.length; f++) {
1446
+ const u = o[f];
1447
+ if (!(u < l)) {
1448
+ if (u >= l) {
1449
+ const g = e + r[l] * s, v = i - n[l] * s;
1450
+ this.Ai.moveTo(g, v);
1451
+ let m = l + 1;
1452
+ for (; m <= u; )
1453
+ if (1 & c[m]) {
1454
+ const d = e + r[m] * s, A = i - n[m] * s;
1455
+ this.Ai.lineTo(d, A), m++;
1264
1456
  } else {
1265
- const C = t + i[l] * s, f = e - B[l] * s;
1266
- let w = l + 1 > g ? o : l + 1;
1267
- if (1 & n[w]) {
1268
- const d = t + i[w] * s, p = e - B[w] * s;
1269
- this.ns.quadraticCurveTo(C, f, d, p), l = w + 1;
1457
+ const d = e + r[m] * s, A = i - n[m] * s;
1458
+ let p = m + 1 > u ? l : m + 1;
1459
+ if (1 & c[p]) {
1460
+ const y = e + r[p] * s, x = i - n[p] * s;
1461
+ this.Ai.quadraticCurveTo(d, A, y, x), m = p + 1;
1270
1462
  } else {
1271
- const d = (C + (t + i[w] * s)) / 2, p = (f + (e - B[w] * s)) / 2;
1272
- this.ns.quadraticCurveTo(C, f, d, p), l = w;
1463
+ const y = (d + (e + r[p] * s)) / 2, x = (A + (i - n[p] * s)) / 2;
1464
+ this.Ai.quadraticCurveTo(d, A, y, x), m = p;
1273
1465
  }
1274
1466
  }
1275
- this.ns.closePath();
1467
+ this.Ai.closePath();
1276
1468
  }
1277
- o = g + 1;
1469
+ l = u + 1;
1278
1470
  }
1279
1471
  }
1280
- this.ns.fill();
1472
+ this.Ai.fill();
1281
1473
  }
1282
1474
  }
1283
- class yA {
1475
+ class zt {
1284
1476
  constructor() {
1285
- Q(this, "Ne");
1286
- this.Ne = new _();
1477
+ h(this, "Fi");
1478
+ this.Fi = new Z();
1287
1479
  }
1288
- calculateMaxGlyphDimensions(A, t, e) {
1480
+ Ri(t, e, i) {
1289
1481
  let s = 0;
1290
- const i = this.Ne.Ve(e, t), B = i.lineHeight;
1291
- for (const r of A) {
1292
- const n = this.Ne.Ke(e, r);
1293
- if (n === 0) continue;
1294
- const o = this.Ne.Je(e, n) * i.scale;
1295
- s = Math.max(s, o);
1482
+ const r = this.Fi.gi(i, e), n = r.lineHeight;
1483
+ for (const o of t) {
1484
+ const c = this.Fi.pi(i, o);
1485
+ if (c === 0) continue;
1486
+ const l = this.Fi.mi(i, c) * r.scale;
1487
+ s = Math.max(s, l);
1296
1488
  }
1297
- return { width: Math.ceil(s), height: Math.ceil(B) };
1489
+ return { width: Math.ceil(s), height: Math.ceil(n) };
1298
1490
  }
1299
- getCharacterAdvanceWidth(A, t, e) {
1300
- const s = this.Ne.Ve(e, t), i = this.Ne.Ke(e, A);
1301
- return this.Ne.Je(e, i) * s.scale;
1302
- }
1303
- getFontMetrics(A, t) {
1304
- return this.Ne.Ve(t, A);
1305
- }
1306
- Ze() {
1307
- this.Ne.Ze();
1491
+ _i() {
1492
+ this.Fi._i();
1308
1493
  }
1309
1494
  }
1310
- class xA {
1495
+ class Xt {
1311
1496
  constructor() {
1312
- Q(this, "gs");
1313
- this.gs = new _();
1314
- }
1315
- createCharacterObjects(A, t) {
1316
- return A.map((e, s) => {
1317
- const i = e.codePointAt(0) || 0, B = this.Ps(s);
1318
- let r = 0;
1319
- if (t.hmtx && t.hmtx.aWidth) {
1320
- const n = this.gs.Te(t, i);
1321
- n > 0 && t.hmtx.aWidth[n] !== void 0 && (r = t.hmtx.aWidth[n]);
1497
+ h(this, "wi");
1498
+ this.wi = new Z();
1499
+ }
1500
+ createCharacterObjects(t, e) {
1501
+ return t.map((i, s) => {
1502
+ const r = i.codePointAt(0) || 0, n = this.zi(s);
1503
+ let o = 0;
1504
+ if (e.hmtx && e.hmtx.aWidth) {
1505
+ const c = this.wi.li(e, r);
1506
+ c > 0 && e.hmtx.aWidth[c] !== void 0 && (o = e.hmtx.aWidth[c]);
1322
1507
  }
1323
- return { character: e, unicode: i, color: B, advanceWidth: r };
1508
+ return { character: i, unicode: r, color: n, advanceWidth: o };
1324
1509
  });
1325
1510
  }
1326
- Ps(A) {
1327
- return [A % 256 / 255, Math.floor(A / 256) % 256 / 255, Math.floor(A / 65536) % 256 / 255];
1511
+ zi(t) {
1512
+ return [t % 256 / 255, Math.floor(t / 256) % 256 / 255, Math.floor(t / 65536) % 256 / 255];
1328
1513
  }
1329
- us(A, t) {
1330
- if (!M._(typeof A == "string", "Character must be a string.", { method: "getCharacterColor", providedValue: A })) return [0, 0, 0];
1331
- const e = t.find((s) => s.character === A);
1332
- return e ? e.color : [0, 0, 0];
1514
+ Pi(t, e) {
1515
+ if (!N.v(typeof t == "string", "Character must be a string.", { method: "getCharacterColor", providedValue: t })) return [0, 0, 0];
1516
+ const i = e.find((s) => s.character === t);
1517
+ return i ? i.color : [0, 0, 0];
1333
1518
  }
1334
- Is(A, t) {
1335
- return M._(typeof A == "string" && A.length > 0, "Characters must be a string with at least one character.", { method: "getCharacterColors", providedValue: A }) ? Array.from(A).map((e) => this.us(e, t) || [0, 0, 0]) : [[0, 0, 0]];
1519
+ Ti(t, e) {
1520
+ return N.v(typeof t == "string" && t.length > 0, "Characters must be a string with at least one character.", { method: "getCharacterColors", providedValue: t }) ? Array.from(t).map((i) => this.Pi(i, e) || [0, 0, 0]) : [[0, 0, 0]];
1336
1521
  }
1337
1522
  }
1338
- class bA {
1339
- constructor(A, t = 16) {
1340
- Q(this, "ws");
1341
- Q(this, "fs", []);
1342
- Q(this, "ds");
1343
- Q(this, "_s", 16);
1344
- Q(this, "ps", 0);
1345
- Q(this, "vs", 0);
1346
- Q(this, "bs", { width: 0, height: 0 });
1347
- Q(this, "$s");
1348
- Q(this, "Gs");
1349
- Q(this, "Ms");
1350
- Q(this, "Ys");
1351
- Q(this, "Fs");
1352
- this._s = t, this.Gs = new mA(), this.Ms = new vA(A), this.Ys = new yA(), this.Fs = new xA();
1353
- }
1354
- async Rs(A) {
1355
- let t;
1356
- if (A) {
1357
- const e = await fetch(A);
1358
- if (!e.ok) throw new I(`Failed to load font file: ${e.status} ${e.statusText}`);
1359
- t = await e.arrayBuffer();
1523
+ class Wt {
1524
+ constructor(t, e = 16) {
1525
+ h(this, "Si");
1526
+ h(this, "Ei", []);
1527
+ h(this, "Bi");
1528
+ h(this, "Gi", 16);
1529
+ h(this, "Di", 0);
1530
+ h(this, "Li", 0);
1531
+ h(this, "ki", { width: 0, height: 0 });
1532
+ h(this, "Oi");
1533
+ h(this, "Hi");
1534
+ h(this, "Ii");
1535
+ h(this, "Ni");
1536
+ h(this, "Xi");
1537
+ this.Gi = e, this.Hi = new Gt(), this.Ii = new Nt(t), this.Ni = new zt(), this.Xi = new Xt();
1538
+ }
1539
+ async Wi(t) {
1540
+ let e;
1541
+ if (t) {
1542
+ const i = await fetch(t);
1543
+ if (!i.ok) throw new U(`Failed to load font file: ${i.status} ${i.statusText}`);
1544
+ e = await i.arrayBuffer();
1360
1545
  } else
1361
- t = await (await fetch(`data:font/truetype;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMs+QEyQAAAEoAAAAYGNtYXAg7yVJAAAFjAAACSBnbHlmuHLTdAAAErQAAGi0aGVhZFvXdUwAAACsAAAANmhoZWELAQUCAAAA5AAAACRobXR4BACDgAAAAYgAAAQEbG9jYQAy54AAAA6sAAAECG1heHABIgCCAAABCAAAACBuYW1lVs/OSgAAe2gAAAOicG9zdABpADQAAH8MAAAAIAABAAAAAQAAzOWHqV8PPPUAAAQAAAAAAHxiGCcAAAAAfGIYJwAAAAAEAAQAAAAACAACAAEAAAAAAAEAAAQAAAAAAAQAAAAAAAcAAAEAAAAAAAAAAAAAAAAAAAEBAAEAAAEBAIAAIAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAgQAAZAABQAEAgACAAAAAAACAAIAAAACAAAzAMwAAAAABAAAAAAAAACAAACLAABw4wAAAAAAAAAAWUFMLgBAACAmawQAAAAAAAQAAAAAAAFRAAAAAAMABAAAAAAgAAAEAAAABAAAAAQAAAAEAAGABAABAAQAAIAEAACABAAAgAQAAIAEAAGABAABAAQAAQAEAACABAABAAQAAIAEAACABAABAAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAAGABAAAgAQAAIAEAAGABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABgAQAAQAEAACABAAAAAQAAgAEAACABAAAgAQAAIAEAACABAACAAQAAAAEAAIABAABgAQAAgAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAAABAAAAAQAAAAEAAIABAADAAQAAAAEAAAABAAAgAQAAYAEAAAABAAAAAQAAIAEAAAABAAAgAQAAIAEAACABAAAAAQAAIAEAAAABAAAAAQAAIAEAAGABAAAAAQAAAAEAAAABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAEABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAACAAQAAIAEAAAABAAAAAQAAAAEAACABAABAAQAAQAEAAEABAABAAQAAIAEAACABAAAAAQAAAAEAAAABAABAAQAAAAEAACABAAAAAQAAAAEAAIABAAAgAQAAAAEAAAABAAAAAQAAAAEAAAABAABgAQAAAAEAAAABAABgAQAAAAEAAGABAABgAQAAYAEAAAABAAAAAQAAAAEAAAABAABgAQAAYAEAAAABAAAAAQAAAAEAAAABAABgAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAABgAQAAAAEAAGABAABgAQAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\r
1362
- `)).arrayBuffer();
1363
- await this.Ss(t), this.ws = m.parse(t)[0], await this.ks();
1546
+ e = await (await fetch("data:font/woff;base64,d09GRgABAAAAABbwAAoAAAAAfywAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABjbWFwAAAA9AAAAbsAAAkgIO8lSWdseWYAAAKwAAAOfgAAaLS4ctN0aGVhZAAAETAAAAAsAAAAOCi8/PVoaGVhAAARXAAAABkAAAAkCwEFAmhtdHgAABF4AAAAhQAABAQEAIOAbG9jYQAAEgAAAAKUAAAECAAy54BtYXhwAAAUlAAAABgAAAAgASIAgm5hbWUAABSsAAAB5wAAA6RWz85KT1MvMgAAFpQAAABFAAAAYM+QEyRwb3N0AAAW3AAAABQAAAAgAGkANHja7dRPSFRRFMfx38wdXblw4cJC7M0bz60gWlULGUFctWgR0UIQQkmDyn27kpAQaaEO2jhWJuafiQFtcDJtSqGhiFZtot5x3jzEVQQhlRJcOb0khiRc1+J94R64uw8cOADCAJT/avwZAiIpRCK3/P999KAS9biOSUxhBhlksYjnWMFrvME7vMca1vEF37ANAwkNqYRKqkk1rdLqscqpVVVQryzbils3rJnocHTWPmgfso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aUApSy61LDxVc4uAjNxoJReoNKdCrYy8hZb1rrTcIuPMKfaY+QM899RH6AP3tDJEKqlcefzvzz/xrywD21ScoLK9N3ktW5E3hDl6hL7zG7HvhLrMfhNfxGonwBjUnwj2uz8JbzH4R3sZbPArvIMV34T28wQ+6qG6Puz5+Civyb+EOO/4Ir6GvOsJdaLUrvI53KhXeoGYs3MOu+iq8hai+CW/jo/olvIOiA+E97HeKw/xIp8M0nYQ6O/MunpvZwmbhafv01JK/MKGee6ePB8N/JCFzN6dO+8o4bee5cbnRM+NMyKyuFqHytdHR3MXSF0ZfNQOn93rVORoNm4l64ua3NMjsdYxVfZIkeTBZZC73ZeldPfBhllSLKR0KX2ZzlzyY4BO2JmNjrdeXPtjiAIfIcQTNbz/knWKCgBoZzuDhEHEOgxkWsMyFF9Xne/1Mf8Fdo5i3dY1jDOjz/ymB0eEGp63ao2J/Q5YT8pabqOnQsGn1lvuKjoHRc05Tj4x3jCUzRZu5Wp1winvGl54jruHqjI3C0fVW3qDxuWZ/pEvNPzjhylkxrETR5fQoW09HzYDPwJMm7emm8g5Fq8nIjpWHdronLV0TjJmxXJ4nuGwnWPYcAH8BoeumrAB42mNgYmFgnMDAysDCxMDEAAIQGoiNGc6A+CwMENDAwNDNwFDwGMpliHT00WNwYFBQy4aogJCMgSCSGcJTYGAAAEBYBpIAAAB42mNgZoCANAZjIMnIgAYADecAng==")).arrayBuffer();
1547
+ await this.Vi(e), this.Si = B.parse(e)[0], await this.Ki();
1364
1548
  }
1365
- zs(A) {
1366
- if (A === void 0) return this._s;
1367
- this._s = A, this.bs = this.Ys.calculateMaxGlyphDimensions(this.fs.map((e) => e.character), this._s, this.ws);
1368
- const t = this.Ms.createTextureAtlas(this.fs, this.bs, this._s, this.ws);
1369
- this.ds = t.framebuffer, this.ps = t.columns, this.vs = t.rows;
1549
+ ji(t) {
1550
+ if (t === void 0) return this.Gi;
1551
+ this.Gi = t, this.ki = this.Ni.Ri(this.Ei.map((i) => i.character), this.Gi, this.Si);
1552
+ const e = this.Ii.createTextureAtlas(this.Ei, this.ki, this.Gi, this.Si);
1553
+ this.Bi = e.framebuffer, this.Di = e.columns, this.Li = e.rows;
1370
1554
  }
1371
- async Ls(A) {
1555
+ async Yi(t) {
1372
1556
  try {
1373
- const t = await fetch(A);
1374
- if (!t.ok) throw new I(`Failed to load font file: ${t.status} ${t.statusText}`);
1375
- const e = await t.arrayBuffer();
1376
- await this.Ss(e);
1377
- const s = m.parse(e);
1557
+ const e = await fetch(t);
1558
+ if (!e.ok) throw new U(`Failed to load font file: ${e.status} ${e.statusText}`);
1559
+ const i = await e.arrayBuffer();
1560
+ await this.Vi(i);
1561
+ const s = B.parse(i);
1378
1562
  if (!s || s.length === 0) throw Error("Failed to parse font file");
1379
- this.ws = s[0], await this.ks();
1380
- } catch (t) {
1381
- throw new I("Failed to load font: " + (t instanceof Error ? t.message : "Unknown error"), t);
1563
+ this.Si = s[0], await this.Ki();
1564
+ } catch (e) {
1565
+ throw new U("Failed to load font: " + (e instanceof Error ? e.message : "Unknown error"), e);
1382
1566
  }
1383
1567
  }
1384
- async Ss(A) {
1385
- const t = Date.now();
1386
- this.$s = new FontFace("CustomFont_" + t, A), await this.$s.load(), document.fonts.add(this.$s);
1568
+ async Vi(t) {
1569
+ const e = Date.now();
1570
+ this.Oi = new FontFace("CustomFont_" + e, t), await this.Oi.load(), document.fonts.add(this.Oi);
1387
1571
  }
1388
- async ks() {
1389
- const A = this.Gs.extractCharacters(this.ws), t = this.Gs.filterProblematicCharacters(A);
1390
- this.fs = this.Fs.createCharacterObjects(t, this.ws), this.bs = this.Ys.calculateMaxGlyphDimensions(t, this._s, this.ws);
1391
- const e = this.Ms.createTextureAtlas(this.fs, this.bs, this._s, this.ws);
1392
- this.ds = e.framebuffer, this.ps = e.columns, this.vs = e.rows;
1572
+ async Ki() {
1573
+ const t = this.Hi.si(this.Si), e = this.Hi.ni(t);
1574
+ this.Ei = this.Xi.createCharacterObjects(e, this.Si), this.ki = this.Ni.Ri(e, this.Gi, this.Si);
1575
+ const i = this.Ii.createTextureAtlas(this.Ei, this.ki, this.Gi, this.Si);
1576
+ this.Bi = i.framebuffer, this.Di = i.columns, this.Li = i.rows;
1393
1577
  }
1394
- us(A) {
1395
- return this.Fs.us(A, this.fs);
1578
+ Pi(t) {
1579
+ return this.Xi.Pi(t, this.Ei);
1396
1580
  }
1397
- Is(A) {
1398
- return this.Fs.Is(A, this.fs);
1581
+ Ti(t) {
1582
+ return this.Xi.Ti(t, this.Ei);
1399
1583
  }
1400
- kA() {
1401
- this.ds.kA(), document.fonts.delete(this.$s);
1584
+ Gt() {
1585
+ this.Bi.Gt(), document.fonts.delete(this.Oi);
1402
1586
  }
1403
1587
  get fontFramebuffer() {
1404
- return this.ds;
1588
+ return this.Bi;
1405
1589
  }
1406
1590
  get characters() {
1407
- return this.fs;
1591
+ return this.Ei;
1408
1592
  }
1409
1593
  get textureColumns() {
1410
- return this.ps;
1594
+ return this.Di;
1411
1595
  }
1412
1596
  get textureRows() {
1413
- return this.vs;
1597
+ return this.Li;
1414
1598
  }
1415
1599
  get maxGlyphDimensions() {
1416
- return this.bs;
1600
+ return this.ki;
1417
1601
  }
1418
1602
  get fontSize() {
1419
- return this._s;
1603
+ return this.Gi;
1420
1604
  }
1421
1605
  get font() {
1422
- return this.ws;
1606
+ return this.Si;
1423
1607
  }
1424
1608
  }
1425
- class RA {
1426
- constructor(A, t, e) {
1427
- Q(this, "Os");
1428
- Q(this, "Ts");
1429
- Q(this, "PA");
1430
- Q(this, "uA");
1431
- Q(this, "Us");
1432
- Q(this, "Ws");
1433
- Q(this, "Hs");
1434
- Q(this, "Ks");
1435
- Q(this, "Js");
1436
- this.Hs = A, this.Ks = t, this.Js = e, this.iA();
1437
- }
1438
- iA() {
1439
- this.Os = Math.floor(this.Hs.width / this.Ks), this.Ts = Math.floor(this.Hs.height / this.Js), this.PA = this.Os * this.Ks, this.uA = this.Ts * this.Js, this.Us = Math.floor((this.Hs.width - this.PA) / 2), this.Ws = Math.floor((this.Hs.height - this.uA) / 2);
1440
- }
1441
- Vs(A, t) {
1442
- this.Ks = A, this.Js = t, this.iA();
1609
+ class Ht {
1610
+ constructor(t, e, i) {
1611
+ h(this, "qi");
1612
+ h(this, "Zi");
1613
+ h(this, "dt");
1614
+ h(this, "gt");
1615
+ h(this, "Qi");
1616
+ h(this, "Ji");
1617
+ h(this, "tr");
1618
+ h(this, "er");
1619
+ h(this, "sr");
1620
+ this.tr = t, this.er = e, this.sr = i, this.ir();
1621
+ }
1622
+ ir() {
1623
+ this.qi = Math.floor(this.tr.width / this.er), this.Zi = Math.floor(this.tr.height / this.sr), this.dt = this.qi * this.er, this.gt = this.Zi * this.sr, this.Qi = Math.floor((this.tr.width - this.dt) / 2), this.Ji = Math.floor((this.tr.height - this.gt) / 2);
1624
+ }
1625
+ rr(t, e) {
1626
+ this.er = t, this.sr = e, this.ir();
1443
1627
  }
1444
1628
  get cellWidth() {
1445
- return this.Ks;
1629
+ return this.er;
1446
1630
  }
1447
1631
  get cellHeight() {
1448
- return this.Js;
1632
+ return this.sr;
1449
1633
  }
1450
1634
  get cols() {
1451
- return this.Os;
1635
+ return this.qi;
1452
1636
  }
1453
1637
  get rows() {
1454
- return this.Ts;
1638
+ return this.Zi;
1455
1639
  }
1456
1640
  get width() {
1457
- return this.PA;
1641
+ return this.dt;
1458
1642
  }
1459
1643
  get height() {
1460
- return this.uA;
1644
+ return this.gt;
1461
1645
  }
1462
1646
  get offsetX() {
1463
- return this.Us;
1647
+ return this.Qi;
1464
1648
  }
1465
1649
  get offsetY() {
1466
- return this.Ws;
1650
+ return this.Ji;
1467
1651
  }
1468
1652
  }
1469
- class TA {
1470
- constructor(A = {}) {
1471
- Q(this, "Hs");
1472
- Q(this, "Zs");
1473
- Q(this, "Ns");
1474
- A.canvas ? (this.Hs = A.canvas, this.Ns = !1) : (this.Hs = this.Xs(A.width, A.height), this.Ns = !0), this.Hs.style.imageRendering = "pixelated";
1475
- }
1476
- Xs(A, t) {
1477
- const e = document.createElement("canvas");
1478
- return e.className = "textmodeCanvas", e.style.imageRendering = "pixelated", e.width = A || 800, e.height = t || 600, document.body.appendChild(e), e;
1479
- }
1480
- js(A, t) {
1481
- this.Hs.width = A ?? this.Hs.width, this.Hs.height = t ?? this.Hs.height;
1482
- }
1483
- qs() {
1484
- const A = this.Hs.getContext("webgl2", { alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1, stencil: !1, powerPreference: "high-performance" });
1485
- if (!A) throw new I("`textmode.js` requires WebGL2 support.");
1486
- return A;
1487
- }
1488
- kA() {
1489
- this.Zs && this.Zs.disconnect();
1490
- const A = this.Hs.getContext("webgl") || this.Hs.getContext("webgl2");
1491
- if (A) {
1492
- const t = A.getExtension("WEBGL_lose_context");
1493
- t && t.loseContext();
1653
+ class kt {
1654
+ constructor(t = {}) {
1655
+ h(this, "tr");
1656
+ h(this, "nr", null);
1657
+ h(this, "ar", !1);
1658
+ h(this, "hr");
1659
+ h(this, "cr");
1660
+ this.ar = t.overlay ?? !1, this.ar && t.canvas ? (this.nr = t.canvas, this.tr = this.lr(), this.cr = !0, this.ur()) : t.canvas ? (this.tr = t.canvas, this.cr = !1) : (this.tr = this.dr(t.width, t.height), this.cr = !0), this.tr.style.imageRendering = "pixelated";
1661
+ }
1662
+ dr(t, e) {
1663
+ const i = document.createElement("canvas");
1664
+ return i.className = "textmodeCanvas", i.style.imageRendering = "pixelated", i.width = t || 800, i.height = e || 600, document.body.appendChild(i), i;
1665
+ }
1666
+ lr() {
1667
+ const t = document.createElement("canvas");
1668
+ t.className = "textmodeCanvas", t.style.imageRendering = "pixelated";
1669
+ const e = this.nr.getBoundingClientRect();
1670
+ let i = Math.round(e.width), s = Math.round(e.height);
1671
+ if (this.nr instanceof HTMLVideoElement) {
1672
+ const o = this.nr;
1673
+ (i === 0 || s === 0) && o.videoWidth > 0 && o.videoHeight > 0 && (i = o.videoWidth, s = o.videoHeight);
1674
+ }
1675
+ t.width = i, t.height = s, t.style.position = "absolute", t.style.pointerEvents = "none";
1676
+ const r = window.getComputedStyle(this.nr);
1677
+ let n = parseInt(r.zIndex || "0", 10);
1678
+ return isNaN(n) && (n = 0), t.style.zIndex = "" + (n + 1), t;
1679
+ }
1680
+ ur() {
1681
+ var t;
1682
+ this.pr(), (t = this.nr.parentNode) == null || t.insertBefore(this.tr, this.nr.nextSibling), window.ResizeObserver && (this.hr = new ResizeObserver(() => {
1683
+ this.mr();
1684
+ }), this.hr.observe(this.nr)), window.addEventListener("resize", () => {
1685
+ this.mr();
1686
+ });
1687
+ }
1688
+ pr() {
1689
+ if (!this.nr) return;
1690
+ const t = this.nr.getBoundingClientRect();
1691
+ let e = this.nr.offsetParent;
1692
+ if (e && e !== document.body) {
1693
+ const i = e.getBoundingClientRect();
1694
+ this.tr.style.top = t.top - i.top + "px", this.tr.style.left = t.left - i.left + "px";
1695
+ } else this.tr.style.top = t.top + window.scrollY + "px", this.tr.style.left = t.left + window.scrollX + "px";
1696
+ }
1697
+ mr(t, e) {
1698
+ if (this.ar) {
1699
+ const i = this.nr.getBoundingClientRect();
1700
+ let s = Math.round(i.width), r = Math.round(i.height);
1701
+ if (this.nr instanceof HTMLVideoElement) {
1702
+ const n = this.nr;
1703
+ (s === 0 || r === 0) && n.videoWidth > 0 && n.videoHeight > 0 && (s = n.videoWidth, r = n.videoHeight);
1704
+ }
1705
+ this.tr.width = s, this.tr.height = r, this.pr();
1706
+ } else this.tr.width = t ?? this.tr.width, this.tr.height = e ?? this.tr.height;
1707
+ }
1708
+ gr() {
1709
+ const t = this.tr.getContext("webgl2", { alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1, stencil: !1, powerPreference: "high-performance" });
1710
+ if (!t) throw new U("`textmode.js` requires WebGL2 support.");
1711
+ return t;
1712
+ }
1713
+ Gt() {
1714
+ this.hr && this.hr.disconnect();
1715
+ const t = this.tr.getContext("webgl") || this.tr.getContext("webgl2");
1716
+ if (t) {
1717
+ const e = t.getExtension("WEBGL_lose_context");
1718
+ e && e.loseContext();
1494
1719
  }
1495
- this.Ns && this.Hs.parentNode && this.Hs.parentNode.removeChild(this.Hs);
1720
+ this.cr && this.tr.parentNode && this.tr.parentNode.removeChild(this.tr);
1496
1721
  }
1497
1722
  get canvas() {
1498
- return this.Hs;
1723
+ return this.tr;
1724
+ }
1725
+ get targetCanvas() {
1726
+ return this.nr;
1499
1727
  }
1500
1728
  get width() {
1501
- return this.Hs.width;
1729
+ return this.tr.width;
1502
1730
  }
1503
1731
  get height() {
1504
- return this.Hs.height;
1732
+ return this.tr.height;
1505
1733
  }
1506
1734
  }
1507
- class MA {
1508
- constructor(A = 60) {
1509
- Q(this, "Ai");
1510
- Q(this, "ti");
1511
- Q(this, "ei", null);
1512
- Q(this, "si", 0);
1513
- Q(this, "ii", !0);
1514
- Q(this, "Bi", 0);
1515
- Q(this, "Qi", 0);
1516
- Q(this, "Ei", []);
1517
- Q(this, "ri", 10);
1518
- Q(this, "ni", 0);
1519
- this.Ai = A, this.ti = 1e3 / A;
1520
- }
1521
- start(A) {
1522
- if (!this.ii) return;
1523
- this.si = performance.now();
1524
- const t = (e) => {
1525
- if (!this.ii) return void (this.ei = null);
1526
- const s = e - this.si;
1527
- s >= this.ti && (A(), this.si = e - s % this.ti), this.ii && (this.ei = requestAnimationFrame(t));
1735
+ class z {
1736
+ constructor(t, e, i, s) {
1737
+ h(this, "texture");
1738
+ h(this, "width");
1739
+ h(this, "height");
1740
+ h(this, "vt");
1741
+ h(this, "D", 0);
1742
+ h(this, "V", 0);
1743
+ h(this, "K", 0);
1744
+ h(this, "L", [0, 0]);
1745
+ h(this, "_r", "sampled");
1746
+ h(this, "vr", "fixed");
1747
+ h(this, "Y", [1, 1, 1]);
1748
+ h(this, "q", [0, 0, 0]);
1749
+ h(this, "yr", [0, 0, 0, 1]);
1750
+ h(this, "Ar", [[0.1, 0, 0]]);
1751
+ h(this, "wr");
1752
+ this.vt = t, this.texture = e, this.width = i, this.height = s;
1753
+ }
1754
+ Gt() {
1755
+ this.vt.deleteTexture(this.texture);
1756
+ }
1757
+ Cr(t) {
1758
+ return typeof t == "boolean" ? t ? 1 : 0 : (t == null ? 0 : Number(t)) > 0 ? 1 : 0;
1759
+ }
1760
+ invert(t = !0) {
1761
+ return this.D = this.Cr(t), this;
1762
+ }
1763
+ flipX(t = !0) {
1764
+ return this.V = this.Cr(t), this;
1765
+ }
1766
+ flipY(t = !0) {
1767
+ return this.K = this.Cr(t), this;
1768
+ }
1769
+ charRotation(t) {
1770
+ const e = 255 * t / 360, i = Math.floor(e) / 255, s = Math.round(e - Math.floor(e));
1771
+ return this.L = [i, s], this;
1772
+ }
1773
+ get flags() {
1774
+ return { invert: this.D, flipX: this.V, flipY: this.K };
1775
+ }
1776
+ get charRotationRG() {
1777
+ return this.L;
1778
+ }
1779
+ charColorMode(t) {
1780
+ return this._r = t, this;
1781
+ }
1782
+ cellColorMode(t) {
1783
+ return this.vr = t, this;
1784
+ }
1785
+ charColor(t, e, i) {
1786
+ return this.Y = [(t ?? 0) / 255, (e ?? t ?? 0) / 255, (i ?? t ?? 0) / 255], this;
1787
+ }
1788
+ cellColor(t, e, i) {
1789
+ return this.q = [(t ?? 0) / 255, (e ?? t ?? 0) / 255, (i ?? t ?? 0) / 255], this;
1790
+ }
1791
+ background(t, e, i, s) {
1792
+ return this.yr = [(t ?? 0) / 255, (e ?? t ?? 0) / 255, (i ?? t ?? 0) / 255, (s ?? 255) / 255], this;
1793
+ }
1794
+ charactersFromColors(t) {
1795
+ const e = t.filter((i) => Array.isArray(i)).slice(0, 64);
1796
+ return this.Ar = e, this;
1797
+ }
1798
+ characters(t) {
1799
+ const e = this.wr(t);
1800
+ return this.charactersFromColors(e), this;
1801
+ }
1802
+ get characterListUniforms() {
1803
+ return { count: this.Ar.length, list: this.Ar };
1804
+ }
1805
+ get colorUniforms() {
1806
+ return { charColorFixed: this._r === "fixed", Y: this.Y, cellColorFixed: this.vr === "fixed", cellColor: this.q, backgroundColor: this.yr };
1807
+ }
1808
+ static fromSource(t, e, i) {
1809
+ const s = t.context, r = s.createTexture();
1810
+ s.bindTexture(s.TEXTURE_2D, r), s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, 1), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MAG_FILTER, s.NEAREST), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_S, s.CLAMP_TO_EDGE), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_T, s.CLAMP_TO_EDGE), s.texImage2D(s.TEXTURE_2D, 0, s.RGBA, s.RGBA, s.UNSIGNED_BYTE, e), s.bindTexture(s.TEXTURE_2D, null);
1811
+ const n = e.naturalWidth ?? e.width ?? e.videoWidth ?? 0, o = e.naturalHeight ?? e.height ?? e.videoHeight ?? 0, c = new z(s, r, n, o);
1812
+ return c.wr = i, c;
1813
+ }
1814
+ }
1815
+ class Yt {
1816
+ constructor(t = 60) {
1817
+ h(this, "br");
1818
+ h(this, "$r");
1819
+ h(this, "Mr", null);
1820
+ h(this, "Fr", 0);
1821
+ h(this, "Rr", !0);
1822
+ h(this, "zr", 0);
1823
+ h(this, "Pr", 0);
1824
+ h(this, "Tr", []);
1825
+ h(this, "Sr", 10);
1826
+ h(this, "Er", 0);
1827
+ this.br = t, this.$r = 1e3 / t;
1828
+ }
1829
+ start(t) {
1830
+ if (!this.Rr) return;
1831
+ this.Fr = performance.now();
1832
+ const e = (i) => {
1833
+ if (!this.Rr) return void (this.Mr = null);
1834
+ const s = i - this.Fr;
1835
+ s >= this.$r && (t(), this.Fr = i - s % this.$r), this.Rr && (this.Mr = requestAnimationFrame(e));
1528
1836
  };
1529
- this.ei = requestAnimationFrame(t);
1837
+ this.Mr = requestAnimationFrame(e);
1530
1838
  }
1531
1839
  stop() {
1532
- this.ei && (cancelAnimationFrame(this.ei), this.ei = null);
1840
+ this.Mr && (cancelAnimationFrame(this.Mr), this.Mr = null);
1533
1841
  }
1534
1842
  pause() {
1535
- this.ii && (this.ii = !1, this.stop());
1843
+ this.Rr && (this.Rr = !1, this.stop());
1536
1844
  }
1537
- resume(A) {
1538
- this.ii || (this.ii = !0, this.start(A));
1845
+ resume(t) {
1846
+ this.Rr || (this.Rr = !0, this.start(t));
1539
1847
  }
1540
- frameRate(A, t) {
1541
- if (A === void 0) return this.Bi;
1542
- this.Ai = A, this.ti = 1e3 / A, this.ii && t && (this.stop(), this.start(t));
1848
+ frameRate(t, e) {
1849
+ if (t === void 0) return this.zr;
1850
+ this.br = t, this.$r = 1e3 / t, this.Rr && e && (this.stop(), this.start(e));
1543
1851
  }
1544
1852
  measureFrameRate() {
1545
- const A = performance.now();
1546
- if (this.Qi > 0) {
1547
- const t = A - this.Qi;
1548
- this.Ei.push(t), this.Ei.length > this.ri && this.Ei.shift();
1549
- const e = this.Ei.reduce((s, i) => s + i, 0) / this.Ei.length;
1550
- this.Bi = 1e3 / e;
1853
+ const t = performance.now();
1854
+ if (this.Pr > 0) {
1855
+ const e = t - this.Pr;
1856
+ this.Tr.push(e), this.Tr.length > this.Sr && this.Tr.shift();
1857
+ const i = this.Tr.reduce((s, r) => s + r, 0) / this.Tr.length;
1858
+ this.zr = 1e3 / i;
1551
1859
  }
1552
- this.Qi = A;
1860
+ this.Pr = t;
1553
1861
  }
1554
1862
  get isLooping() {
1555
- return this.ii;
1863
+ return this.Rr;
1556
1864
  }
1557
1865
  get frameRateLimit() {
1558
- return this.Ai;
1866
+ return this.br;
1559
1867
  }
1560
1868
  get currentFrameRate() {
1561
- return this.Bi;
1869
+ return this.zr;
1562
1870
  }
1563
1871
  get frameCount() {
1564
- return this.ni;
1872
+ return this.Er;
1565
1873
  }
1566
- set frameCount(A) {
1567
- this.ni = A;
1874
+ set frameCount(t) {
1875
+ this.Er = t;
1568
1876
  }
1569
1877
  incrementFrame() {
1570
- this.ni++;
1878
+ this.Er++;
1571
1879
  }
1572
1880
  resetFrameCount() {
1573
- this.ni = 0;
1881
+ this.Er = 0;
1574
1882
  }
1575
1883
  }
1576
- class FA {
1884
+ class Vt {
1577
1885
  constructor() {
1578
- Q(this, "gi", /* @__PURE__ */ new Map());
1579
- Q(this, "oi", null);
1580
- Q(this, "ai", null);
1581
- Q(this, "hi");
1582
- Q(this, "ci");
1583
- Q(this, "Ci", !1);
1584
- Q(this, "li");
1585
- Q(this, "Di");
1586
- Q(this, "Pi", { ArrowUp: "UP_ARROW", ArrowDown: "DOWN_ARROW", ArrowLeft: "LEFT_ARROW", ArrowRight: "RIGHT_ARROW", F1: "F1", F2: "F2", F3: "F3", F4: "F4", F5: "F5", F6: "F6", F7: "F7", F8: "F8", F9: "F9", F10: "F10", F11: "F11", F12: "F12", Enter: "ENTER", Return: "RETURN", Tab: "TAB", Escape: "ESCAPE", Backspace: "BACKSPACE", Delete: "DELETE", Insert: "INSERT", Home: "HOME", End: "END", PageUp: "PAGE_UP", PageDown: "PAGE_DOWN", Shift: "SHIFT", Control: "CONTROL", Alt: "ALT", Meta: "META", " ": "SPACE" });
1587
- }
1588
- ui() {
1589
- this.Ci || (this.hi = (A) => {
1590
- this.Ii(A);
1591
- }, this.ci = (A) => {
1592
- this.wi(A);
1593
- }, window.addEventListener("keydown", this.hi, { passive: !1 }), window.addEventListener("keyup", this.ci, { passive: !1 }), this.Ci = !0);
1594
- }
1595
- fi() {
1596
- this.Ci && (window.removeEventListener("keydown", this.hi), window.removeEventListener("keyup", this.ci), this.Ci = !1, this.gi.clear(), this.oi = null, this.ai = null);
1597
- }
1598
- di(A) {
1599
- this.li = A;
1600
- }
1601
- _i(A) {
1602
- this.Di = A;
1603
- }
1604
- pi(A) {
1605
- const t = this.mi(A), e = this.gi.get(A) || this.gi.get(t);
1606
- return (e == null ? void 0 : e.isPressed) || !1;
1607
- }
1608
- yi() {
1609
- return this.oi;
1610
- }
1611
- bi() {
1612
- return this.ai;
1613
- }
1614
- $i() {
1615
- const A = [];
1616
- for (const [t, e] of this.gi) e.isPressed && A.push(t);
1617
- return A;
1618
- }
1619
- Gi() {
1620
- return { ctrl: this.pi("Control"), shift: this.pi("Shift"), alt: this.pi("Alt"), meta: this.pi("Meta") };
1621
- }
1622
- Mi() {
1623
- this.gi.clear(), this.oi = null, this.ai = null;
1624
- }
1625
- Ii(A) {
1626
- const t = A.key, e = Date.now();
1627
- this.gi.has(t) || this.gi.set(t, { isPressed: !1, lastPressTime: 0, lastReleaseTime: 0 });
1628
- const s = this.gi.get(t);
1629
- if (!s.isPressed && (s.isPressed = !0, s.lastPressTime = e, this.oi = t, this.li)) {
1630
- const i = { key: t, keyCode: A.keyCode, ctrlKey: A.ctrlKey, shiftKey: A.shiftKey, altKey: A.altKey, metaKey: A.metaKey, isPressed: !0, originalEvent: A };
1631
- this.li(i);
1886
+ h(this, "Br", /* @__PURE__ */ new Map());
1887
+ h(this, "Gr", null);
1888
+ h(this, "Dr", null);
1889
+ h(this, "Lr");
1890
+ h(this, "kr");
1891
+ h(this, "Or", !1);
1892
+ h(this, "Hr");
1893
+ h(this, "Ir");
1894
+ h(this, "Nr", { ArrowUp: "UP_ARROW", ArrowDown: "DOWN_ARROW", ArrowLeft: "LEFT_ARROW", ArrowRight: "RIGHT_ARROW", F1: "F1", F2: "F2", F3: "F3", F4: "F4", F5: "F5", F6: "F6", F7: "F7", F8: "F8", F9: "F9", F10: "F10", F11: "F11", F12: "F12", Enter: "ENTER", Return: "RETURN", Tab: "TAB", Escape: "ESCAPE", Backspace: "BACKSPACE", Delete: "DELETE", Insert: "INSERT", Home: "HOME", End: "END", PageUp: "PAGE_UP", PageDown: "PAGE_DOWN", Shift: "SHIFT", Control: "CONTROL", Alt: "ALT", Meta: "META", " ": "SPACE" });
1895
+ }
1896
+ Xr() {
1897
+ this.Or || (this.Lr = (t) => {
1898
+ this.Wr(t);
1899
+ }, this.kr = (t) => {
1900
+ this.Vr(t);
1901
+ }, window.addEventListener("keydown", this.Lr, { passive: !1 }), window.addEventListener("keyup", this.kr, { passive: !1 }), this.Or = !0);
1902
+ }
1903
+ Kr() {
1904
+ this.Or && (window.removeEventListener("keydown", this.Lr), window.removeEventListener("keyup", this.kr), this.Or = !1, this.Br.clear(), this.Gr = null, this.Dr = null);
1905
+ }
1906
+ jr(t) {
1907
+ this.Hr = t;
1908
+ }
1909
+ Yr(t) {
1910
+ this.Ir = t;
1911
+ }
1912
+ qr(t) {
1913
+ const e = this.Zr(t), i = this.Br.get(t) || this.Br.get(e);
1914
+ return (i == null ? void 0 : i.isPressed) || !1;
1915
+ }
1916
+ Qr() {
1917
+ return this.Gr;
1918
+ }
1919
+ Jr() {
1920
+ return this.Dr;
1921
+ }
1922
+ tn() {
1923
+ const t = [];
1924
+ for (const [e, i] of this.Br) i.isPressed && t.push(e);
1925
+ return t;
1926
+ }
1927
+ en() {
1928
+ return { ctrl: this.qr("Control"), shift: this.qr("Shift"), alt: this.qr("Alt"), meta: this.qr("Meta") };
1929
+ }
1930
+ sn() {
1931
+ this.Br.clear(), this.Gr = null, this.Dr = null;
1932
+ }
1933
+ Wr(t) {
1934
+ const e = t.key, i = Date.now();
1935
+ this.Br.has(e) || this.Br.set(e, { isPressed: !1, lastPressTime: 0, lastReleaseTime: 0 });
1936
+ const s = this.Br.get(e);
1937
+ if (!s.isPressed && (s.isPressed = !0, s.lastPressTime = i, this.Gr = e, this.Hr)) {
1938
+ const r = { key: e, keyCode: t.keyCode, ctrlKey: t.ctrlKey, shiftKey: t.shiftKey, altKey: t.altKey, metaKey: t.metaKey, isPressed: !0, originalEvent: t };
1939
+ this.Hr(r);
1632
1940
  }
1633
1941
  }
1634
- wi(A) {
1635
- const t = A.key, e = Date.now();
1636
- this.gi.has(t) || this.gi.set(t, { isPressed: !1, lastPressTime: 0, lastReleaseTime: 0 });
1637
- const s = this.gi.get(t);
1638
- if (s.isPressed = !1, s.lastReleaseTime = e, this.ai = t, this.Di) {
1639
- const i = { key: t, keyCode: A.keyCode, ctrlKey: A.ctrlKey, shiftKey: A.shiftKey, altKey: A.altKey, metaKey: A.metaKey, isPressed: !1, originalEvent: A };
1640
- this.Di(i);
1942
+ Vr(t) {
1943
+ const e = t.key, i = Date.now();
1944
+ this.Br.has(e) || this.Br.set(e, { isPressed: !1, lastPressTime: 0, lastReleaseTime: 0 });
1945
+ const s = this.Br.get(e);
1946
+ if (s.isPressed = !1, s.lastReleaseTime = i, this.Dr = e, this.Ir) {
1947
+ const r = { key: e, keyCode: t.keyCode, ctrlKey: t.ctrlKey, shiftKey: t.shiftKey, altKey: t.altKey, metaKey: t.metaKey, isPressed: !1, originalEvent: t };
1948
+ this.Ir(r);
1641
1949
  }
1642
1950
  }
1643
- mi(A) {
1644
- return this.Pi[A] || A.toLowerCase();
1951
+ Zr(t) {
1952
+ return this.Nr[t] || t.toLowerCase();
1645
1953
  }
1646
1954
  }
1647
- class GA {
1648
- constructor(A) {
1649
- Q(this, "Hs");
1650
- Q(this, "xi");
1651
- Q(this, "Yi", { x: -1, y: -1 });
1652
- Q(this, "Fi", { x: -1, y: -1 });
1653
- Q(this, "Ri", null);
1654
- Q(this, "Si");
1655
- Q(this, "ki");
1656
- Q(this, "zi");
1657
- Q(this, "Li");
1658
- Q(this, "Oi");
1659
- Q(this, "Ti");
1660
- Q(this, "Ci", !1);
1661
- Q(this, "Ui");
1662
- Q(this, "Wi");
1663
- Q(this, "Hi");
1664
- Q(this, "Ki");
1665
- Q(this, "Ji");
1666
- this.Hs = A;
1667
- }
1668
- Rs(A) {
1669
- this.xi = A, this.Vi();
1670
- }
1671
- ui() {
1672
- if (this.Ci) return;
1673
- const A = this.Hs.canvas;
1674
- this.Si = (t) => {
1675
- this.Zi(t), this.Ni(t);
1676
- }, this.ki = () => {
1677
- this.Fi = { ...this.Yi }, this.Yi.x = -1, this.Yi.y = -1, this.Ri = null;
1678
- }, this.zi = (t) => {
1679
- this.Zi(t), this.Xi(t);
1680
- }, this.Li = (t) => {
1681
- this.Zi(t), this.ji(t);
1682
- }, this.Oi = (t) => {
1683
- this.Zi(t), this.qi(t);
1684
- }, this.Ti = (t) => {
1685
- this.Zi(t), this.AB(t);
1686
- }, A.addEventListener("mousemove", this.Si, { passive: !0 }), A.addEventListener("mouseleave", this.ki, { passive: !0 }), A.addEventListener("mousedown", this.zi, { passive: !0 }), A.addEventListener("mouseup", this.Li, { passive: !0 }), A.addEventListener("click", this.Oi, { passive: !0 }), A.addEventListener("wheel", this.Ti, { passive: !1 }), this.Ci = !0;
1687
- }
1688
- fi() {
1689
- if (!this.Ci) return;
1690
- const A = this.Hs.canvas;
1691
- A.removeEventListener("mousemove", this.Si), A.removeEventListener("mouseleave", this.ki), A.removeEventListener("mousedown", this.zi), A.removeEventListener("mouseup", this.Li), A.removeEventListener("click", this.Oi), A.removeEventListener("wheel", this.Ti), this.Ci = !1;
1692
- }
1693
- Vi() {
1694
- if (this.Ci) try {
1695
- if (this.Ri) {
1696
- const A = new MouseEvent("mousemove", { clientX: this.Ri.x, clientY: this.Ri.y, bubbles: !1, cancelable: !1 });
1697
- this.Zi(A);
1698
- } else this.Yi.x !== -1 && this.Yi.y !== -1 && (this.Yi.x >= this.xi.cols || this.Yi.y >= this.xi.rows) && (this.Yi.x = -1, this.Yi.y = -1);
1955
+ class jt {
1956
+ constructor(t) {
1957
+ h(this, "tr");
1958
+ h(this, "rn");
1959
+ h(this, "nn", { x: -1, y: -1 });
1960
+ h(this, "an", { x: -1, y: -1 });
1961
+ h(this, "hn", null);
1962
+ h(this, "cn");
1963
+ h(this, "ln");
1964
+ h(this, "un");
1965
+ h(this, "fn");
1966
+ h(this, "dn");
1967
+ h(this, "pn");
1968
+ h(this, "Or", !1);
1969
+ h(this, "mn");
1970
+ h(this, "gn");
1971
+ h(this, "_n");
1972
+ h(this, "vn");
1973
+ h(this, "yn");
1974
+ this.tr = t;
1975
+ }
1976
+ Wi(t) {
1977
+ this.rn = t, this.An();
1978
+ }
1979
+ Xr() {
1980
+ if (this.Or) return;
1981
+ const t = this.tr.canvas;
1982
+ this.cn = (e) => {
1983
+ this.wn(e), this.Cn(e);
1984
+ }, this.ln = () => {
1985
+ this.an = { ...this.nn }, this.nn.x = -1, this.nn.y = -1, this.hn = null;
1986
+ }, this.un = (e) => {
1987
+ this.wn(e), this.bn(e);
1988
+ }, this.fn = (e) => {
1989
+ this.wn(e), this.xn(e);
1990
+ }, this.dn = (e) => {
1991
+ this.wn(e), this.$n(e);
1992
+ }, this.pn = (e) => {
1993
+ this.wn(e), this.Mn(e);
1994
+ }, t.addEventListener("mousemove", this.cn, { passive: !0 }), t.addEventListener("mouseleave", this.ln, { passive: !0 }), t.addEventListener("mousedown", this.un, { passive: !0 }), t.addEventListener("mouseup", this.fn, { passive: !0 }), t.addEventListener("click", this.dn, { passive: !0 }), t.addEventListener("wheel", this.pn, { passive: !1 }), this.Or = !0;
1995
+ }
1996
+ Kr() {
1997
+ if (!this.Or) return;
1998
+ const t = this.tr.canvas;
1999
+ t.removeEventListener("mousemove", this.cn), t.removeEventListener("mouseleave", this.ln), t.removeEventListener("mousedown", this.un), t.removeEventListener("mouseup", this.fn), t.removeEventListener("click", this.dn), t.removeEventListener("wheel", this.pn), this.Or = !1;
2000
+ }
2001
+ An() {
2002
+ if (this.Or) try {
2003
+ if (this.hn) {
2004
+ const t = new MouseEvent("mousemove", { clientX: this.hn.x, clientY: this.hn.y, bubbles: !1, cancelable: !1 });
2005
+ this.wn(t);
2006
+ } else this.nn.x !== -1 && this.nn.y !== -1 && (this.nn.x >= this.rn.cols || this.nn.y >= this.rn.rows) && (this.nn.x = -1, this.nn.y = -1);
1699
2007
  } catch {
1700
- this.Yi.x = -1, this.Yi.y = -1;
2008
+ this.nn.x = -1, this.nn.y = -1;
1701
2009
  }
1702
2010
  }
1703
- tB(A) {
1704
- this.Ui = A;
2011
+ Fn(t) {
2012
+ this.mn = t;
1705
2013
  }
1706
- di(A) {
1707
- this.Wi = A;
2014
+ jr(t) {
2015
+ this.gn = t;
1708
2016
  }
1709
- _i(A) {
1710
- this.Hi = A;
2017
+ Yr(t) {
2018
+ this._n = t;
1711
2019
  }
1712
- eB(A) {
1713
- this.Ki = A;
2020
+ Rn(t) {
2021
+ this.vn = t;
1714
2022
  }
1715
- sB(A) {
1716
- this.Ji = A;
2023
+ zn(t) {
2024
+ this.yn = t;
1717
2025
  }
1718
- iB() {
1719
- return { x: this.Yi.x, y: this.Yi.y };
2026
+ Pn() {
2027
+ return { x: this.nn.x, y: this.nn.y };
1720
2028
  }
1721
- Ni(A) {
1722
- if (this.Ki) {
1723
- const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, originalEvent: A };
1724
- this.Ki(t);
2029
+ Cn(t) {
2030
+ if (this.vn) {
2031
+ const e = { position: { ...this.nn }, previousPosition: { ...this.an }, originalEvent: t };
2032
+ this.vn(e);
1725
2033
  }
1726
2034
  }
1727
- Xi(A) {
1728
- if (this.Wi) {
1729
- const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, button: A.button, originalEvent: A };
1730
- this.Wi(t);
2035
+ bn(t) {
2036
+ if (this.gn) {
2037
+ const e = { position: { ...this.nn }, previousPosition: { ...this.an }, button: t.button, originalEvent: t };
2038
+ this.gn(e);
1731
2039
  }
1732
2040
  }
1733
- ji(A) {
1734
- if (this.Hi) {
1735
- const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, button: A.button, originalEvent: A };
1736
- this.Hi(t);
2041
+ xn(t) {
2042
+ if (this._n) {
2043
+ const e = { position: { ...this.nn }, previousPosition: { ...this.an }, button: t.button, originalEvent: t };
2044
+ this._n(e);
1737
2045
  }
1738
2046
  }
1739
- qi(A) {
1740
- if (this.Ui) {
1741
- const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, button: A.button, originalEvent: A };
1742
- this.Ui(t);
2047
+ $n(t) {
2048
+ if (this.mn) {
2049
+ const e = { position: { ...this.nn }, previousPosition: { ...this.an }, button: t.button, originalEvent: t };
2050
+ this.mn(e);
1743
2051
  }
1744
2052
  }
1745
- AB(A) {
1746
- if (this.Ji) {
1747
- const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, delta: { x: A.deltaX, y: A.deltaY }, originalEvent: A };
1748
- this.Ji(t);
2053
+ Mn(t) {
2054
+ if (this.yn) {
2055
+ const e = { position: { ...this.nn }, previousPosition: { ...this.an }, delta: { x: t.deltaX, y: t.deltaY }, originalEvent: t };
2056
+ this.yn(e);
1749
2057
  }
1750
2058
  }
1751
- Zi(A) {
1752
- const t = this.Hs.canvas;
1753
- this.Fi = { ...this.Yi }, this.Ri = { x: A.clientX, y: A.clientY };
1754
- const e = t.getBoundingClientRect(), s = A.clientX - e.left, i = A.clientY - e.top, B = t.width / e.width, r = i * (t.height / e.height), n = s * B - this.xi.offsetX, o = r - this.xi.offsetY, a = Math.floor(n / this.xi.cellWidth), g = Math.floor(o / this.xi.cellHeight);
1755
- a >= 0 && a < this.xi.cols && g >= 0 && g < this.xi.rows ? (this.Yi.x = a, this.Yi.y = g) : (this.Yi.x = -1, this.Yi.y = -1);
2059
+ wn(t) {
2060
+ const e = this.tr.canvas;
2061
+ this.an = { ...this.nn }, this.hn = { x: t.clientX, y: t.clientY };
2062
+ const i = e.getBoundingClientRect(), s = t.clientX - i.left, r = t.clientY - i.top, n = e.width / i.width, o = r * (e.height / i.height), c = s * n - this.rn.offsetX, l = o - this.rn.offsetY, f = Math.floor(c / this.rn.cellWidth), u = Math.floor(l / this.rn.cellHeight);
2063
+ f >= 0 && f < this.rn.cols && u >= 0 && u < this.rn.rows ? (this.nn.x = f, this.nn.y = u) : (this.nn.x = -1, this.nn.y = -1);
1756
2064
  }
1757
2065
  }
1758
- const YA = (E) => class extends E {
1759
- rotate(A = 0, t = 0, e = 0) {
1760
- this.vA.state.EA(A), this.vA.state.rA(t), this.vA.state.nA(e);
2066
+ const Kt = (a) => class extends a {
2067
+ rotate(t = 0, e = 0, i = 0) {
2068
+ this.xt.state.et(t), this.xt.state.st(e), this.xt.state.it(i);
1761
2069
  }
1762
- rotateX(A) {
1763
- this.vA.state.EA(A);
2070
+ rotateX(t) {
2071
+ this.xt.state.et(t);
1764
2072
  }
1765
- rotateY(A) {
1766
- this.vA.state.rA(A);
2073
+ rotateY(t) {
2074
+ this.xt.state.st(t);
1767
2075
  }
1768
- rotateZ(A) {
1769
- this.vA.state.nA(A);
2076
+ rotateZ(t) {
2077
+ this.xt.state.it(t);
1770
2078
  }
1771
2079
  push() {
1772
- this.vA.state.J();
2080
+ this.xt.state.H();
1773
2081
  }
1774
2082
  pop() {
1775
- this.vA.state.sA();
2083
+ this.xt.state.Z();
1776
2084
  }
1777
- rect(A, t, e = 1, s = 1) {
1778
- this.vA.ve(A, t, e, s);
2085
+ rect(t, e, i = 1, s = 1) {
2086
+ this.xt.Ns(t, e, i, s);
1779
2087
  }
1780
- point(A, t) {
1781
- this.vA.ve(A, t, 1, 1);
2088
+ point(t, e) {
2089
+ this.xt.Ns(t, e, 1, 1);
1782
2090
  }
1783
- line(A, t, e, s) {
1784
- this.vA.ye(A, t, e, s);
2091
+ line(t, e, i, s) {
2092
+ this.xt.Xs(t, e, i, s);
1785
2093
  }
1786
- lineWeight(A) {
1787
- this.vA.state.QA(A);
2094
+ lineWeight(t) {
2095
+ this.xt.state.tt(t);
1788
2096
  }
1789
- background(A, t = A, e = A, s = 255) {
1790
- this.vA.Ye(A, t, e, s);
2097
+ background(t, e = t, i = t, s = 255) {
2098
+ this.xt.qs(t, e, i, s);
1791
2099
  }
1792
- char(A) {
1793
- this.vA.state.gA(this.ws.us(A));
2100
+ char(t) {
2101
+ this.xt.state.rt(this.Si.Pi(t));
1794
2102
  }
1795
- charColor(A, t, e) {
1796
- this.vA.state.oA(A, t, e);
2103
+ charColor(t, e, i) {
2104
+ this.xt.state.nt(t, e, i);
1797
2105
  }
1798
- cellColor(A, t, e) {
1799
- this.vA.state.aA(A, t, e);
2106
+ cellColor(t, e, i) {
2107
+ this.xt.state.ot(t, e, i);
1800
2108
  }
1801
- flipX(A) {
1802
- this.vA.state.hA(A);
2109
+ flipX(t) {
2110
+ this.xt.state.ht(t);
1803
2111
  }
1804
- flipY(A) {
1805
- this.vA.state.cA(A);
2112
+ flipY(t) {
2113
+ this.xt.state.ct(t);
1806
2114
  }
1807
- charRotation(A) {
1808
- this.vA.state.lA(A);
2115
+ charRotation(t) {
2116
+ this.xt.state.ut(t);
1809
2117
  }
1810
- invert(A) {
1811
- this.vA.state.CA(A);
2118
+ invert(t) {
2119
+ this.xt.state.lt(t);
1812
2120
  }
1813
2121
  clear() {
1814
- this.vA.Ye(0, 0, 0, 0);
2122
+ this.xt.qs(0, 0, 0, 0);
2123
+ }
2124
+ ellipse(t, e, i, s) {
2125
+ this.xt.Ws(t, e, i / 2, s / 2);
1815
2126
  }
1816
- ellipse(A, t, e, s) {
1817
- this.vA.be(A, t, e / 2, s / 2);
2127
+ triangle(t, e, i, s, r, n) {
2128
+ this.xt.Vs(t, e, i, s, r, n);
1818
2129
  }
1819
- triangle(A, t, e, s, i, B) {
1820
- this.vA.$e(A, t, e, s, i, B);
2130
+ bezierCurve(t, e, i, s, r, n, o, c) {
2131
+ this.xt.Ks(t, e, i, s, r, n, o, c);
1821
2132
  }
1822
- bezierCurve(A, t, e, s, i, B, r, n) {
1823
- this.vA.Ge(A, t, e, s, i, B, r, n);
2133
+ arc(t, e, i, s, r, n) {
2134
+ this.xt.Ys(t, e, i, s, r, n);
1824
2135
  }
1825
- arc(A, t, e, s, i, B) {
1826
- this.vA.xe(A, t, e, s, i, B);
2136
+ shader(t) {
2137
+ this.xt.Ls(t);
1827
2138
  }
1828
- shader(A) {
1829
- this.vA.de(A);
2139
+ setUniform(t, e) {
2140
+ this.xt.Kt(t, e);
1830
2141
  }
1831
- setUniform(A, t) {
1832
- this.vA.VA(A, t);
2142
+ setUniforms(t) {
2143
+ this.xt.ks(t);
1833
2144
  }
1834
- setUniforms(A) {
1835
- this.vA._e(A);
2145
+ createFilterShader(t) {
2146
+ return this.xt.oe(t);
1836
2147
  }
1837
- createFilterShader(A) {
1838
- return this.vA.et(A);
2148
+ createFramebuffer(t) {
2149
+ return this.xt.js(t.width, t.height, 5, { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte" });
1839
2150
  }
1840
- createFramebuffer(A) {
1841
- return this.vA.Me(A.width, A.height, 5, { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte" });
2151
+ image(t, e, i, s, r) {
2152
+ if (t.textures) {
2153
+ const n = t;
2154
+ this.xt.Os(n, e, i, s ?? n.width, r ?? n.height);
2155
+ } else {
2156
+ const n = t;
2157
+ this.xt.Hs(n, e, i, s ?? n.width, r ?? n.height);
2158
+ }
1842
2159
  }
1843
- image(A, t, e, s, i) {
1844
- this.vA.pe(A, t, e, s ?? A.width, i ?? A.height);
2160
+ async loadImage(t) {
2161
+ if (typeof t != "string") return z.fromSource(this.xt, t, (s) => this.Si.Ti(s));
2162
+ const e = t, i = await new Promise((s, r) => {
2163
+ const n = new Image();
2164
+ n.crossOrigin = "anonymous", n.onload = () => s(n), n.onerror = (o) => r(o), n.src = e;
2165
+ });
2166
+ return z.fromSource(this.xt, i, (s) => this.Si.Ti(s));
1845
2167
  }
1846
2168
  };
1847
- class O {
1848
- BB(A) {
1849
- const t = A.xA(0), e = A.xA(1), s = A.xA(2), i = A.xA(3);
1850
- return { characterPixels: t, primaryColorPixels: e, secondaryColorPixels: s, transformPixels: A.xA(4), rotationPixels: i };
2169
+ class $ {
2170
+ Tn(t) {
2171
+ const e = t.Pt(0), i = t.Pt(1), s = t.Pt(2), r = t.Pt(3);
2172
+ return { characterPixels: e, primaryColorPixels: i, secondaryColorPixels: s, transformPixels: t.Pt(4), rotationPixels: r };
1851
2173
  }
1852
- QB(A, t) {
1853
- return A[t] + (A[t + 1] << 8);
2174
+ Sn(t, e) {
2175
+ return t[e] + (t[e + 1] << 8);
1854
2176
  }
1855
- EB(A, t) {
1856
- return { r: A[t], g: A[t + 1], b: A[t + 2], a: A[t + 3] };
2177
+ En(t, e) {
2178
+ return { r: t[e], g: t[e + 1], b: t[e + 2], a: t[e + 3] };
1857
2179
  }
1858
2180
  }
1859
- class W {
1860
- rB(A, t) {
1861
- return new Blob([A], { type: t });
2181
+ class J {
2182
+ Bn(t, e) {
2183
+ return new Blob([t], { type: e });
1862
2184
  }
1863
- nB(A, t, e) {
2185
+ Gn(t, e, i) {
1864
2186
  try {
1865
- const s = this.rB(A, e), i = URL.createObjectURL(s), B = document.createElement("a");
1866
- B.href = i, B.download = t, B.style.display = "none", B.rel = "noopener", document.body.appendChild(B), B.click(), document.body.removeChild(B), URL.revokeObjectURL(i);
2187
+ const s = this.Bn(t, i), r = URL.createObjectURL(s), n = document.createElement("a");
2188
+ n.href = r, n.download = e, n.style.display = "none", n.rel = "noopener", document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(r);
1867
2189
  } catch (s) {
1868
- throw console.error("Failed to download file:", s), Error("File download failed: " + (s instanceof Error ? s.message : "Unknown error"));
2190
+ console.error("Failed to download file:", s);
1869
2191
  }
1870
2192
  }
1871
- gB() {
2193
+ Dn() {
1872
2194
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/:/g, "-");
1873
2195
  }
1874
- oB() {
1875
- const A = /* @__PURE__ */ new Date();
1876
- return { date: A.toISOString().split("T")[0], time: A.toTimeString().split(" ")[0].replace(/:/g, "-") };
2196
+ Ln() {
2197
+ const t = /* @__PURE__ */ new Date();
2198
+ return { date: t.toISOString().split("T")[0], time: t.toTimeString().split(" ")[0].replace(/:/g, "-") };
1877
2199
  }
1878
- aB(A) {
1879
- return A.replace(/[<>:"/\\|?*]/g, "_").replace(/\s+/g, "_").replace(/_{2,}/g, "_").replace(/^_+|_+$/g, "").substring(0, 255);
2200
+ kn(t) {
2201
+ return t.replace(/[<>:"/\\|?*]/g, "_").replace(/\s+/g, "_").replace(/_{2,}/g, "_").replace(/^_+|_+$/g, "").substring(0, 255);
1880
2202
  }
1881
- hB() {
1882
- return "textmode-export-" + this.gB();
2203
+ On() {
2204
+ return "textmode-export-" + this.Dn();
1883
2205
  }
1884
2206
  }
1885
- class _A extends O {
1886
- cB(A, t, e) {
1887
- const s = A[e] === 255, i = A[e + 1] === 255, B = A[e + 2] === 255, r = t[e], n = t[e + 1];
1888
- return { isInverted: s, flipHorizontal: i, flipVertical: B, rotation: Math.round(360 * (r + n / 255) / 255 * 100) / 100 };
2207
+ class qt extends $ {
2208
+ Hn(t, e, i) {
2209
+ const s = t[i] === 255, r = t[i + 1] === 255, n = t[i + 2] === 255, o = e[i], c = e[i + 1];
2210
+ return { isInverted: s, flipHorizontal: r, flipVertical: n, rotation: Math.round(360 * (o + c / 255) / 255 * 100) / 100 };
1889
2211
  }
1890
- CB(A, t, e) {
1891
- return { x: A, y: t, cellX: A * e.cellWidth, cellY: t * e.cellHeight };
2212
+ In(t, e, i) {
2213
+ return { x: t, y: e, cellX: t * i.cellWidth, cellY: e * i.cellHeight };
1892
2214
  }
1893
- lB(A, t) {
1894
- const e = [];
2215
+ Nn(t, e) {
2216
+ const i = [];
1895
2217
  let s = 0;
1896
- for (let i = 0; i < t.rows; i++) for (let B = 0; B < t.cols; B++) {
1897
- const r = 4 * s, n = this.QB(A.characterPixels, r);
1898
- let o = this.EB(A.primaryColorPixels, r), a = this.EB(A.secondaryColorPixels, r);
1899
- const g = this.cB(A.transformPixels, A.rotationPixels, r);
1900
- if (g.isInverted) {
1901
- const c = o;
1902
- o = a, a = c;
2218
+ for (let r = 0; r < e.rows; r++) for (let n = 0; n < e.cols; n++) {
2219
+ const o = 4 * s, c = this.Sn(t.characterPixels, o);
2220
+ let l = this.En(t.primaryColorPixels, o), f = this.En(t.secondaryColorPixels, o);
2221
+ const u = this.Hn(t.transformPixels, t.rotationPixels, o);
2222
+ if (u.isInverted) {
2223
+ const v = l;
2224
+ l = f, f = v;
1903
2225
  }
1904
- const h = this.CB(B, i, t);
1905
- e.push({ charIndex: n, primaryColor: o, secondaryColor: a, transform: g, position: h }), s++;
2226
+ const g = this.In(n, r, e);
2227
+ i.push({ charIndex: c, primaryColor: l, secondaryColor: f, transform: u, position: g }), s++;
1906
2228
  }
1907
- return e;
2229
+ return i;
1908
2230
  }
1909
2231
  }
1910
- class SA {
1911
- DB(A, t) {
1912
- const e = A.cmap;
1913
- for (const s of e.tables) if (s.format === 4) {
1914
- const i = s;
1915
- for (let B = 0; B < i.startCount.length; B++) if (t >= i.startCount[B] && t <= i.endCount[B]) {
1916
- if (i.idRangeOffset[B] === 0) return t + i.idDelta[B] & 65535;
2232
+ class Zt {
2233
+ Xn(t, e) {
2234
+ const i = t.cmap;
2235
+ for (const s of i.tables) if (s.format === 4) {
2236
+ const r = s;
2237
+ for (let n = 0; n < r.startCount.length; n++) if (e >= r.startCount[n] && e <= r.endCount[n]) {
2238
+ if (r.idRangeOffset[n] === 0) return e + r.idDelta[n] & 65535;
1917
2239
  {
1918
- const r = i.idRangeOffset[B] / 2 + (t - i.startCount[B]) - (i.startCount.length - B);
1919
- if (r >= 0 && r < i.glyphIdArray.length) {
1920
- const n = i.glyphIdArray[r];
1921
- if (n !== 0) return n + i.idDelta[B] & 65535;
2240
+ const o = r.idRangeOffset[n] / 2 + (e - r.startCount[n]) - (r.startCount.length - n);
2241
+ if (o >= 0 && o < r.glyphIdArray.length) {
2242
+ const c = r.glyphIdArray[o];
2243
+ if (c !== 0) return c + r.idDelta[n] & 65535;
1922
2244
  }
1923
2245
  }
1924
2246
  }
1925
2247
  } else if (s.format === 12) {
1926
- const i = s;
1927
- for (let B = 0; B < i.groups.length; B += 3) {
1928
- const r = i.groups[B], n = i.groups[B + 1], o = i.groups[B + 2];
1929
- if (t >= r && t <= n) return o + (t - r);
2248
+ const r = s;
2249
+ for (let n = 0; n < r.groups.length; n += 3) {
2250
+ const o = r.groups[n], c = r.groups[n + 1], l = r.groups[n + 2];
2251
+ if (e >= o && e <= c) return l + (e - o);
1930
2252
  }
1931
2253
  }
1932
2254
  return 0;
1933
2255
  }
1934
- PB(A, t, e, s, i) {
1935
- const B = i / A.head.unitsPerEm;
1936
- return { getBoundingBox: () => ({ x1: e + t.xMin * B, y1: s + -t.yMax * B, x2: e + t.xMax * B, y2: s + -t.yMin * B }), toSVG: () => this.uB(t, e, s, B) };
1937
- }
1938
- uB(A, t, e, s) {
1939
- if (!A || !A.xs) return "";
1940
- const { xs: i, ys: B, endPts: r, flags: n } = A;
1941
- if (!(i && B && r && n)) return "";
1942
- let o = "", a = 0;
1943
- for (let g = 0; g < r.length; g++) {
1944
- const h = r[g];
1945
- if (!(h < a)) {
1946
- if (h >= a) {
1947
- const c = t + i[a] * s, l = e - B[a] * s;
1948
- o += `M${c.toFixed(2)},${l.toFixed(2)}`;
1949
- let C = a + 1;
1950
- for (; C <= h; )
1951
- if (1 & n[C]) {
1952
- const f = t + i[C] * s, w = e - B[C] * s;
1953
- o += `L${f.toFixed(2)},${w.toFixed(2)}`, C++;
2256
+ Wn(t, e, i, s, r) {
2257
+ const n = r / t.head.unitsPerEm;
2258
+ return { getBoundingBox: () => ({ x1: i + e.xMin * n, y1: s + -e.yMax * n, x2: i + e.xMax * n, y2: s + -e.yMin * n }), toSVG: () => this.Vn(e, i, s, n) };
2259
+ }
2260
+ Vn(t, e, i, s) {
2261
+ if (!t || !t.xs) return "";
2262
+ const { xs: r, ys: n, endPts: o, flags: c } = t;
2263
+ if (!(r && n && o && c)) return "";
2264
+ let l = "", f = 0;
2265
+ for (let u = 0; u < o.length; u++) {
2266
+ const g = o[u];
2267
+ if (!(g < f)) {
2268
+ if (g >= f) {
2269
+ const v = e + r[f] * s, m = i - n[f] * s;
2270
+ l += `M${v.toFixed(2)},${m.toFixed(2)}`;
2271
+ let d = f + 1;
2272
+ for (; d <= g; )
2273
+ if (1 & c[d]) {
2274
+ const A = e + r[d] * s, p = i - n[d] * s;
2275
+ l += `L${A.toFixed(2)},${p.toFixed(2)}`, d++;
1954
2276
  } else {
1955
- const f = t + i[C] * s, w = e - B[C] * s;
1956
- let d = C + 1 > h ? a : C + 1;
1957
- if (1 & n[d]) {
1958
- const p = t + i[d] * s, R = e - B[d] * s;
1959
- o += `Q${f.toFixed(2)},${w.toFixed(2)} ${p.toFixed(2)},${R.toFixed(2)}`, C = d + 1;
2277
+ const A = e + r[d] * s, p = i - n[d] * s;
2278
+ let y = d + 1 > g ? f : d + 1;
2279
+ if (1 & c[y]) {
2280
+ const x = e + r[y] * s, C = i - n[y] * s;
2281
+ l += `Q${A.toFixed(2)},${p.toFixed(2)} ${x.toFixed(2)},${C.toFixed(2)}`, d = y + 1;
1960
2282
  } else {
1961
- const p = (f + (t + i[d] * s)) / 2, R = (w + (e - B[d] * s)) / 2;
1962
- o += `Q${f.toFixed(2)},${w.toFixed(2)} ${p.toFixed(2)},${R.toFixed(2)}`, C = d;
2283
+ const x = (A + (e + r[y] * s)) / 2, C = (p + (i - n[y] * s)) / 2;
2284
+ l += `Q${A.toFixed(2)},${p.toFixed(2)} ${x.toFixed(2)},${C.toFixed(2)}`, d = y;
1963
2285
  }
1964
2286
  }
1965
- o += "Z";
2287
+ l += "Z";
1966
2288
  }
1967
- a = h + 1;
2289
+ f = g + 1;
1968
2290
  }
1969
2291
  }
1970
- return o;
2292
+ return l;
1971
2293
  }
1972
- IB(A, t, e, s, i) {
1973
- const B = A.codePointAt(0) || 0, r = this.DB(t, B);
1974
- let n = null;
1975
- return t.glyf && t.glyf[r] !== null ? n = t.glyf[r] : (n = m.T.glyf.Re(t, r), t.glyf[r] = n), this.PB(t, n, e, s, i);
2294
+ Kn(t, e, i, s, r) {
2295
+ const n = t.codePointAt(0) || 0, o = this.Xn(e, n);
2296
+ let c = null;
2297
+ return e.glyf && e.glyf[o] !== null ? c = e.glyf[o] : (c = B.T.glyf.Qs(e, o), e.glyf[o] = c), this.Wn(e, c, i, s, r);
1976
2298
  }
1977
- wB(A, t, e, s, i, B, r, n) {
1978
- const o = e + (i - n * (r / t.head.unitsPerEm)) / 2, a = s + (B + 0.7 * r) / 2;
1979
- return this.IB(A, t, o, a, r).toSVG() || null;
2299
+ jn(t, e, i, s, r, n, o, c) {
2300
+ const l = i + (r - c * (o / e.head.unitsPerEm)) / 2, f = s + (n + 0.7 * o) / 2;
2301
+ return this.Kn(t, e, l, f, o).toSVG() || null;
1980
2302
  }
1981
2303
  }
1982
- class LA {
2304
+ class $t {
1983
2305
  constructor() {
1984
- Q(this, "fB");
1985
- this.fB = new SA();
2306
+ h(this, "Yn");
2307
+ this.Yn = new Zt();
1986
2308
  }
1987
- dB(A) {
1988
- const { width: t, height: e } = A;
1989
- return `<?xml version="1.0" encoding="UTF-8"?><svg width="${t}" height="${e}" viewBox="0 0 ${t} ${e}" xmlns="http://www.w3.org/2000/svg"><title>textmode.js sketch</title>`;
2309
+ qn(t) {
2310
+ const { width: e, height: i } = t;
2311
+ return `<?xml version="1.0" encoding="UTF-8"?><svg width="${e}" height="${i}" viewBox="0 0 ${e} ${i}" xmlns="http://www.w3.org/2000/svg"><title>textmode.js sketch</title>`;
1990
2312
  }
1991
- _B() {
2313
+ Zn() {
1992
2314
  return "</g></svg>";
1993
2315
  }
1994
- pB(A, t) {
1995
- if (!t.includeBackgroundRectangles) return "";
1996
- const [e, s, i, B] = t.backgroundColor;
1997
- return `<rect width="${A.width}" height="${A.height}" fill="rgba(${e},${s},${i},${B / 255})"/>`;
1998
- }
1999
- mB(A, t) {
2000
- const { transform: e, position: s } = A;
2001
- if (!e.flipHorizontal && !e.flipVertical && !e.rotation) return "";
2002
- const i = s.cellX + t.cellWidth / 2, B = s.cellY + t.cellHeight / 2, r = [];
2003
- if (e.flipHorizontal || e.flipVertical) {
2004
- const n = e.flipHorizontal ? -1 : 1, o = e.flipVertical ? -1 : 1;
2005
- r.push(`translate(${i} ${B})scale(${n} ${o})translate(${-i} ${-B})`);
2316
+ Qn(t, e) {
2317
+ if (!e.includeBackgroundRectangles) return "";
2318
+ const [i, s, r, n] = e.backgroundColor;
2319
+ return `<rect width="${t.width}" height="${t.height}" fill="rgba(${i},${s},${r},${n / 255})"/>`;
2320
+ }
2321
+ Jn(t, e) {
2322
+ const { transform: i, position: s } = t;
2323
+ if (!i.flipHorizontal && !i.flipVertical && !i.rotation) return "";
2324
+ const r = s.cellX + e.cellWidth / 2, n = s.cellY + e.cellHeight / 2, o = [];
2325
+ if (i.flipHorizontal || i.flipVertical) {
2326
+ const c = i.flipHorizontal ? -1 : 1, l = i.flipVertical ? -1 : 1;
2327
+ o.push(`translate(${r} ${n})scale(${c} ${l})translate(${-r} ${-n})`);
2006
2328
  }
2007
- return e.rotation && r.push(`rotate(${e.rotation} ${i} ${B})`), ` transform="${r.join(" ")}"`;
2008
- }
2009
- vB(A, t, e) {
2010
- if (!e.includeBackgroundRectangles || A.secondaryColor.a === 0) return "";
2011
- const { position: s } = A, { r: i, g: B, b: r, a: n } = A.secondaryColor, o = `rgba(${i},${B},${r},${n / 255})`;
2012
- return e.drawMode === "stroke" ? `<rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" stroke="${o}" fill="none" stroke-width="${e.strokeWidth}"/>` : `<rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" fill="${o}"/>`;
2013
- }
2014
- IB(A, t, e, s) {
2015
- const i = e.characters[A.charIndex];
2016
- if (!i) return "";
2017
- const B = this.fB.wB(i.character, e.font, A.position.cellX, A.position.cellY, t.cellWidth, t.cellHeight, e.fontSize, i.advanceWidth);
2018
- if (!B) return "";
2019
- const { r, g: n, b: o, a } = A.primaryColor, g = `rgba(${r},${n},${o},${a / 255})`;
2020
- return s.drawMode === "stroke" ? `<path d="${B}" stroke="${g}" stroke-width="${s.strokeWidth}" fill="none"/>` : `<path d="${B}" fill="${g}"/>`;
2021
- }
2022
- yB(A, t, e, s) {
2023
- const i = [], B = this.vB(A, t, s);
2024
- B && i.push(B);
2025
- const r = this.IB(A, t, e, s);
2026
- if (r) {
2027
- const n = this.mB(A, t);
2028
- i.push(n ? `<g${n}>${r}</g>` : r);
2329
+ return i.rotation && o.push(`rotate(${i.rotation} ${r} ${n})`), ` transform="${o.join(" ")}"`;
2330
+ }
2331
+ eo(t, e, i) {
2332
+ if (!i.includeBackgroundRectangles || t.secondaryColor.a === 0) return "";
2333
+ const { position: s } = t, { r, g: n, b: o, a: c } = t.secondaryColor, l = `rgba(${r},${n},${o},${c / 255})`;
2334
+ return i.drawMode === "stroke" ? `<rect x="${s.cellX}" y="${s.cellY}" width="${e.cellWidth}" height="${e.cellHeight}" stroke="${l}" fill="none" stroke-width="${i.strokeWidth}"/>` : `<rect x="${s.cellX}" y="${s.cellY}" width="${e.cellWidth}" height="${e.cellHeight}" fill="${l}"/>`;
2335
+ }
2336
+ Kn(t, e, i, s) {
2337
+ const r = i.characters[t.charIndex];
2338
+ if (!r) return "";
2339
+ const n = this.Yn.jn(r.character, i.font, t.position.cellX, t.position.cellY, e.cellWidth, e.cellHeight, i.fontSize, r.advanceWidth);
2340
+ if (!n) return "";
2341
+ const { r: o, g: c, b: l, a: f } = t.primaryColor, u = `rgba(${o},${c},${l},${f / 255})`;
2342
+ return s.drawMode === "stroke" ? `<path d="${n}" stroke="${u}" stroke-width="${s.strokeWidth}" fill="none"/>` : `<path d="${n}" fill="${u}"/>`;
2343
+ }
2344
+ so(t, e, i, s) {
2345
+ const r = [], n = this.eo(t, e, s);
2346
+ n && r.push(n);
2347
+ const o = this.Kn(t, e, i, s);
2348
+ if (o) {
2349
+ const c = this.Jn(t, e);
2350
+ r.push(c ? `<g${c}>${o}</g>` : o);
2029
2351
  }
2030
- return i.join("");
2352
+ return r.join("");
2031
2353
  }
2032
- bB(A, t, e, s) {
2033
- const i = [this.dB(t), this.pB(t, s), '<g id="ascii-cells">'];
2034
- for (const B of A) i.push(this.yB(B, t, e, s));
2035
- return i.push(this._B()), i.join("");
2354
+ io(t, e, i, s) {
2355
+ const r = [this.qn(e), this.Qn(e, s), '<g id="ascii-cells">'];
2356
+ for (const n of t) r.push(this.so(n, e, i, s));
2357
+ return r.push(this.Zn()), r.join("");
2036
2358
  }
2037
- $B(A) {
2038
- return A.replace(/<path[^>]*d=""[^>]*\/>/g, "").replace(/\s+/g, " ").replace(/> </g, "><");
2359
+ ro(t) {
2360
+ return t.replace(/<path[^>]*d=""[^>]*\/>/g, "").replace(/\s+/g, " ").replace(/> </g, "><");
2039
2361
  }
2040
2362
  }
2041
- class UA extends W {
2042
- GB(A) {
2043
- return this.rB(A, "image/svg+xml;charset=utf-8");
2363
+ class Jt extends J {
2364
+ no(t) {
2365
+ return this.Bn(t, "image/svg+xml;charset=utf-8");
2044
2366
  }
2045
- MB(A, t) {
2046
- this.nB(A, this.aB(t) + ".svg", "image/svg+xml;charset=utf-8");
2367
+ oo(t, e) {
2368
+ this.Gn(t, this.kn(e) + ".svg", "image/svg+xml;charset=utf-8");
2047
2369
  }
2048
- xB(A, t) {
2049
- this.MB(A, t || this.hB());
2370
+ ao(t, e) {
2371
+ this.oo(t, e || this.On());
2050
2372
  }
2051
2373
  }
2052
- class J {
2374
+ class st {
2053
2375
  constructor() {
2054
- Q(this, "YB");
2055
- Q(this, "FB");
2056
- Q(this, "RB");
2057
- this.YB = new _A(), this.FB = new LA(), this.RB = new UA();
2376
+ h(this, "ho");
2377
+ h(this, "co");
2378
+ h(this, "lo");
2379
+ this.ho = new qt(), this.co = new $t(), this.lo = new Jt();
2058
2380
  }
2059
- SB(A) {
2060
- return { includeBackgroundRectangles: A.includeBackgroundRectangles ?? !0, drawMode: A.drawMode ?? "fill", strokeWidth: A.strokeWidth ?? 1, backgroundColor: A.backgroundColor ?? [0, 0, 0, 0], filename: A.filename || this.RB.hB() };
2381
+ uo(t) {
2382
+ return { includeBackgroundRectangles: t.includeBackgroundRectangles ?? !0, drawMode: t.drawMode ?? "fill", strokeWidth: t.strokeWidth ?? 1, backgroundColor: t.backgroundColor ?? [0, 0, 0, 0], filename: t.filename || this.lo.On() };
2061
2383
  }
2062
- kB(A, t = {}) {
2063
- const e = this.YB.lB(this.YB.BB(A.pipeline), A.grid), s = this.FB.bB(e, A.grid, A.font, this.SB(t));
2064
- return this.FB.$B(s);
2384
+ fo(t, e = {}) {
2385
+ const i = this.ho.Nn(this.ho.Tn(t.pipeline), t.grid), s = this.co.io(i, t.grid, t.font, this.uo(e));
2386
+ return this.co.ro(s);
2065
2387
  }
2066
- xB(A, t = {}) {
2067
- this.RB.xB(this.kB(A, t), t.filename);
2388
+ ao(t, e = {}) {
2389
+ this.lo.ao(this.fo(t, e), e.filename);
2068
2390
  }
2069
2391
  }
2070
- class OA extends O {
2071
- zB(A, t, e, s = " ") {
2072
- var r;
2073
- const i = [];
2074
- let B = 0;
2075
- for (let n = 0; n < t.rows; n++) {
2076
- const o = [];
2077
- for (let a = 0; a < t.cols; a++) {
2078
- const g = 4 * B, h = this.QB(A.characterPixels, g), c = ((r = e.characters[h]) == null ? void 0 : r.character) || s;
2079
- o.push(c), B++;
2392
+ class Qt extends $ {
2393
+ do(t, e, i, s = " ") {
2394
+ var o;
2395
+ const r = [];
2396
+ let n = 0;
2397
+ for (let c = 0; c < e.rows; c++) {
2398
+ const l = [];
2399
+ for (let f = 0; f < e.cols; f++) {
2400
+ const u = 4 * n, g = this.Sn(t.characterPixels, u), v = ((o = i.characters[g]) == null ? void 0 : o.character) || s;
2401
+ l.push(v), n++;
2080
2402
  }
2081
- i.push(o);
2403
+ r.push(l);
2082
2404
  }
2083
- return i;
2405
+ return r;
2084
2406
  }
2085
2407
  }
2086
- class WA {
2087
- LB(A, t) {
2088
- const e = [];
2089
- for (const i of A) {
2090
- let B = i.join("");
2091
- t.preserveTrailingSpaces || (B = B.replace(/\s+$/, "")), e.push(B);
2408
+ class te {
2409
+ po(t, e) {
2410
+ const i = [];
2411
+ for (const r of t) {
2412
+ let n = r.join("");
2413
+ e.preserveTrailingSpaces || (n = n.replace(/\s+$/, "")), i.push(n);
2092
2414
  }
2093
- const s = t.lineEnding === "crlf" ? `\r
2415
+ const s = e.lineEnding === "crlf" ? `\r
2094
2416
  ` : `
2095
2417
  `;
2096
- return e.join(s);
2418
+ return i.join(s);
2097
2419
  }
2098
2420
  }
2099
- class zA extends W {
2100
- OB(A, t) {
2101
- const e = this.TB(t);
2102
- this.nB(A, e, "text/plain;charset=utf-8");
2421
+ class ee extends J {
2422
+ mo(t, e) {
2423
+ const i = this._o(e);
2424
+ this.Gn(t, i, "text/plain;charset=utf-8");
2103
2425
  }
2104
- TB(A) {
2105
- let t = this.aB(A);
2106
- return t === ".txt" || t.length <= 4 ? this.hB() : t;
2426
+ _o(t) {
2427
+ let e = this.kn(t);
2428
+ return e === ".txt" || e.length <= 4 ? this.On() : e;
2107
2429
  }
2108
2430
  }
2109
- class K {
2431
+ class rt {
2110
2432
  constructor() {
2111
- Q(this, "YB");
2112
- Q(this, "FB");
2113
- Q(this, "RB");
2114
- this.YB = new OA(), this.FB = new WA(), this.RB = new zA();
2433
+ h(this, "ho");
2434
+ h(this, "co");
2435
+ h(this, "lo");
2436
+ this.ho = new Qt(), this.co = new te(), this.lo = new ee();
2115
2437
  }
2116
- SB(A) {
2117
- return { preserveTrailingSpaces: A.preserveTrailingSpaces ?? !1, lineEnding: A.lineEnding ?? "lf", emptyCharacter: A.emptyCharacter ?? " ", filename: A.filename || this.RB.hB() };
2438
+ uo(t) {
2439
+ return { preserveTrailingSpaces: t.preserveTrailingSpaces ?? !1, lineEnding: t.lineEnding ?? "lf", emptyCharacter: t.emptyCharacter ?? " ", filename: t.filename || this.lo.On() };
2118
2440
  }
2119
- UB(A, t = {}) {
2120
- const e = this.SB(t), s = this.YB.zB(this.YB.BB(A.pipeline), A.grid, A.font, e.emptyCharacter);
2121
- return this.FB.LB(s, e);
2441
+ vo(t, e = {}) {
2442
+ const i = this.uo(e), s = this.ho.do(this.ho.Tn(t.pipeline), t.grid, t.font, i.emptyCharacter);
2443
+ return this.co.po(s, i);
2122
2444
  }
2123
- OB(A, t = {}) {
2124
- this.RB.OB(this.UB(A, t), t.filename);
2445
+ mo(t, e = {}) {
2446
+ this.lo.mo(this.vo(t, e), e.filename);
2125
2447
  }
2126
2448
  }
2127
- class kA extends O {
2128
- WB(A, t = 1, e = "transparent") {
2129
- const s = A.canvas;
2130
- if (t === 1 && e === "transparent") return s;
2131
- const i = document.createElement("canvas"), B = i.getContext("2d"), r = Math.round(s.width * t), n = Math.round(s.height * t);
2132
- return i.width = r, i.height = n, e !== "transparent" && (B.fillStyle = e, B.fillRect(0, 0, r, n)), B.imageSmoothingEnabled = !1, B.drawImage(s, 0, 0, s.width, s.height, 0, 0, r, n), i;
2449
+ class ie extends $ {
2450
+ yo(t, e = 1, i = "transparent") {
2451
+ const s = t.canvas;
2452
+ if (e === 1 && i === "transparent") return s;
2453
+ const r = document.createElement("canvas"), n = r.getContext("2d"), o = Math.round(s.width * e), c = Math.round(s.height * e);
2454
+ return r.width = o, r.height = c, i !== "transparent" && (n.fillStyle = i, n.fillRect(0, 0, o, c)), n.imageSmoothingEnabled = !1, n.drawImage(s, 0, 0, s.width, s.height, 0, 0, o, c), r;
2133
2455
  }
2134
2456
  }
2135
- class HA {
2136
- HB(A, t) {
2137
- const e = this.KB(t.format);
2138
- return t.format === "png" ? A.toDataURL(e) : A.toDataURL(e, t.quality);
2139
- }
2140
- async JB(A, t) {
2141
- return new Promise((e, s) => {
2142
- const i = this.KB(t.format), B = (r) => {
2143
- r ? e(r) : s(Error(`Failed to generate ${t.format.toUpperCase()} blob`));
2457
+ class se {
2458
+ Ao(t, e) {
2459
+ const i = this.wo(e.format);
2460
+ return e.format === "png" ? t.toDataURL(i) : t.toDataURL(i, e.quality);
2461
+ }
2462
+ async Co(t, e) {
2463
+ return new Promise((i, s) => {
2464
+ const r = this.wo(e.format), n = (o) => {
2465
+ o ? i(o) : s(Error(`Failed to generate ${e.format.toUpperCase()} blob`));
2144
2466
  };
2145
- t.format === "png" ? A.toBlob(B, i) : A.toBlob(B, i, t.quality);
2467
+ e.format === "png" ? t.toBlob(n, r) : t.toBlob(n, r, e.quality);
2146
2468
  });
2147
2469
  }
2148
- KB(A) {
2149
- switch (A) {
2470
+ wo(t) {
2471
+ switch (t) {
2150
2472
  case "png":
2151
2473
  return "image/png";
2152
2474
  case "jpg":
@@ -2154,268 +2476,283 @@ class HA {
2154
2476
  case "webp":
2155
2477
  return "image/webp";
2156
2478
  default:
2157
- throw Error("Unsupported image format: " + A);
2479
+ throw Error("Unsupported image format: " + t);
2158
2480
  }
2159
2481
  }
2160
2482
  }
2161
- const NA = { png: "image/png", jpg: "image/jpeg", webp: "image/webp" }, $ = { png: ".png", jpg: ".jpg", webp: ".webp" };
2162
- class JA extends W {
2163
- VB(A, t, e) {
2164
- this.ZB(A, this.aB(t) + $[e]);
2483
+ const re = { png: "image/png", jpg: "image/jpeg", webp: "image/webp" }, nt = { png: ".png", jpg: ".jpg", webp: ".webp" };
2484
+ class ne extends J {
2485
+ bo(t, e, i) {
2486
+ this.xo(t, this.kn(e) + nt[i]);
2165
2487
  }
2166
- ZB(A, t) {
2167
- const e = URL.createObjectURL(A);
2488
+ xo(t, e) {
2489
+ const i = URL.createObjectURL(t);
2168
2490
  try {
2169
2491
  const s = document.createElement("a");
2170
- s.href = e, s.download = t, s.style.display = "none", s.rel = "noopener", document.body.appendChild(s), s.click(), document.body.removeChild(s);
2492
+ s.href = i, s.download = e, s.style.display = "none", s.rel = "noopener", document.body.appendChild(s), s.click(), document.body.removeChild(s);
2171
2493
  } finally {
2172
- URL.revokeObjectURL(e);
2494
+ URL.revokeObjectURL(i);
2173
2495
  }
2174
2496
  }
2175
- NB(A) {
2176
- return A in NA && A in $;
2497
+ $o(t) {
2498
+ return t in re && t in nt;
2177
2499
  }
2178
2500
  }
2179
- class KA {
2501
+ class oe {
2180
2502
  constructor() {
2181
- Q(this, "YB");
2182
- Q(this, "FB");
2183
- Q(this, "RB");
2184
- this.YB = new kA(), this.FB = new HA(), this.RB = new JA();
2185
- }
2186
- SB(A) {
2187
- return { format: A.format ?? "png", quality: A.quality ?? 1, scale: A.scale ?? 1, backgroundColor: A.backgroundColor ?? "transparent", filename: A.filename || this.RB.hB() };
2188
- }
2189
- XB(A) {
2190
- if (!this.RB.NB(A.format)) throw Error(`Saving '${A.format}' files is not supported`);
2191
- if (A.quality < 0 || A.quality > 1) throw Error("Image quality must be between 0.0 and 1.0");
2192
- if (A.scale <= 0) throw Error("Scale factor must be greater than 0");
2193
- A.format === "jpg" && A.backgroundColor === "transparent" && (A.backgroundColor = "black");
2194
- }
2195
- async JB(A, t) {
2196
- if (t.scale === 1 && t.backgroundColor === "transparent") return await this.FB.JB(A.canvas, t);
2197
- const e = this.YB.WB(A, t.scale, t.backgroundColor);
2198
- return await this.FB.JB(e, t);
2199
- }
2200
- async VB(A, t = {}) {
2201
- const e = this.SB(t);
2202
- this.XB(e);
2203
- const s = await this.JB(A, e);
2204
- this.RB.VB(s, e.filename, e.format);
2503
+ h(this, "ho");
2504
+ h(this, "co");
2505
+ h(this, "lo");
2506
+ this.ho = new ie(), this.co = new se(), this.lo = new ne();
2507
+ }
2508
+ uo(t) {
2509
+ return { format: t.format ?? "png", quality: t.quality ?? 1, scale: t.scale ?? 1, backgroundColor: t.backgroundColor ?? "transparent", filename: t.filename || this.lo.On() };
2510
+ }
2511
+ Mo(t) {
2512
+ if (!this.lo.$o(t.format)) throw Error(`Saving '${t.format}' files is not supported`);
2513
+ if (t.quality < 0 || t.quality > 1) throw Error("Image quality must be between 0.0 and 1.0");
2514
+ if (t.scale <= 0) throw Error("Scale factor must be greater than 0");
2515
+ t.format === "jpg" && t.backgroundColor === "transparent" && (t.backgroundColor = "black");
2516
+ }
2517
+ async Co(t, e) {
2518
+ if (e.scale === 1 && e.backgroundColor === "transparent") return await this.co.Co(t.canvas, e);
2519
+ const i = this.ho.yo(t, e.scale, e.backgroundColor);
2520
+ return await this.co.Co(i, e);
2521
+ }
2522
+ async bo(t, e = {}) {
2523
+ const i = this.uo(e);
2524
+ this.Mo(i);
2525
+ const s = await this.Co(t, i);
2526
+ this.lo.bo(s, i.filename, i.format);
2205
2527
  }
2206
2528
  }
2207
- const $A = (E) => class extends E {
2208
- jB() {
2209
- this.vA.FA(this.qB);
2529
+ const ae = (a) => class extends a {
2530
+ Fo() {
2531
+ this.xt.St(this.Ro);
2210
2532
  }
2211
- toString(A = {}) {
2212
- return this.jB(), new K().UB({ pipeline: this.AQ, grid: this.xi, font: this.ws }, A);
2533
+ toString(t = {}) {
2534
+ return this.Fo(), new rt().vo({ pipeline: this.zo, grid: this.rn, font: this.Si }, t);
2213
2535
  }
2214
- saveStrings(A = {}) {
2215
- this.jB(), new K().OB({ pipeline: this.AQ, grid: this.xi, font: this.ws }, A);
2536
+ saveStrings(t = {}) {
2537
+ this.Fo(), new rt().mo({ pipeline: this.zo, grid: this.rn, font: this.Si }, t);
2216
2538
  }
2217
- toSVG(A = {}) {
2218
- return this.jB(), new J().kB({ pipeline: this.AQ, grid: this.xi, font: this.ws }, A);
2539
+ toSVG(t = {}) {
2540
+ return this.Fo(), new st().fo({ pipeline: this.zo, grid: this.rn, font: this.Si }, t);
2219
2541
  }
2220
- saveSVG(A = {}) {
2221
- this.jB(), new J().xB({ pipeline: this.AQ, grid: this.xi, font: this.ws }, A);
2542
+ saveSVG(t = {}) {
2543
+ this.Fo(), new st().ao({ pipeline: this.zo, grid: this.rn, font: this.Si }, t);
2222
2544
  }
2223
- async saveCanvas(A = {}) {
2224
- await new KA().VB(this.Hs, A);
2545
+ async saveCanvas(t = {}) {
2546
+ await new oe().bo(this.tr, t);
2225
2547
  }
2226
- }, VA = (E) => class extends E {
2227
- async loadFont(A) {
2228
- return this.ws.Ls(A).then(() => {
2229
- const t = this.ws.maxGlyphDimensions;
2230
- this.xi.Vs(t.width, t.height), this.AQ.resize(this.xi.cols, this.xi.rows), this.vA.Fe(), this.tQ.Vi();
2548
+ }, he = (a) => class extends a {
2549
+ async loadFont(t) {
2550
+ return this.Si.Yi(t).then(() => {
2551
+ const e = this.Si.maxGlyphDimensions;
2552
+ this.rn.rr(e.width, e.height), this.zo.resize(this.rn.cols, this.rn.rows), this.xt.Zs(), this.Po.An();
2231
2553
  });
2232
2554
  }
2233
- fontSize(A) {
2234
- if (!M._(typeof A == "number" && A > 0, "Font size must be a positive number greater than 0.", { method: "fontSize", providedValue: A }) || this.ws.fontSize === A) return;
2235
- this.ws.zs(A);
2236
- const t = this.ws.maxGlyphDimensions;
2237
- this.xi.Vs(t.width, t.height), this.AQ.resize(this.xi.cols, this.xi.rows), this.vA.Fe(), this.tQ.Vi();
2555
+ fontSize(t) {
2556
+ if (!N.v(typeof t == "number" && t > 0, "Font size must be a positive number greater than 0.", { method: "fontSize", providedValue: t }) || this.Si.fontSize === t) return;
2557
+ this.Si.ji(t);
2558
+ const e = this.Si.maxGlyphDimensions;
2559
+ this.rn.rr(e.width, e.height), this.zo.resize(this.rn.cols, this.rn.rows), this.xt.Zs(), this.Po.An();
2560
+ }
2561
+ glyphColor(t) {
2562
+ return this.Si.Pi(t);
2563
+ }
2564
+ glyphColors(t) {
2565
+ return this.Si.Ti(t);
2238
2566
  }
2239
- }, XA = (E) => class extends E {
2567
+ }, ce = (a) => class extends a {
2240
2568
  get frameCount() {
2241
- return this.eQ.frameCount;
2569
+ return this.To.frameCount;
2242
2570
  }
2243
- set frameCount(A) {
2244
- this.eQ.frameCount = A;
2571
+ set frameCount(t) {
2572
+ this.To.frameCount = t;
2245
2573
  }
2246
- frameRate(A) {
2247
- return A === void 0 ? this.eQ.currentFrameRate : this.eQ.frameRate(A, () => this.sQ());
2574
+ frameRate(t) {
2575
+ return t === void 0 ? this.To.currentFrameRate : this.To.frameRate(t, () => this.So());
2248
2576
  }
2249
2577
  noLoop() {
2250
- this.eQ.pause();
2578
+ this.To.pause();
2251
2579
  }
2252
2580
  loop() {
2253
- this.eQ.resume(() => this.sQ());
2581
+ this.To.resume(() => this.So());
2254
2582
  }
2255
- redraw(A = 1) {
2256
- if (M._(typeof A == "number" && A > 0 && Number.isInteger(A), "Redraw count must be a positive integer.", { method: "redraw", providedValue: A })) for (let t = 0; t < A; t++) this.sQ();
2583
+ redraw(t = 1) {
2584
+ if (N.v(typeof t == "number" && t > 0 && Number.isInteger(t), "Redraw count must be a positive integer.", { method: "redraw", providedValue: t })) for (let e = 0; e < t; e++) this.So();
2257
2585
  }
2258
2586
  isLooping() {
2259
- return this.eQ.isLooping;
2587
+ return this.To.isLooping;
2260
2588
  }
2261
- }, ZA = (E) => class extends E {
2262
- constructor(...A) {
2263
- super(...A);
2589
+ }, le = (a) => class extends a {
2590
+ constructor(...t) {
2591
+ super(...t);
2264
2592
  }
2265
- mouseClicked(A) {
2266
- this.tQ.tB(A);
2593
+ mouseClicked(t) {
2594
+ this.Po.Fn(t);
2267
2595
  }
2268
- mousePressed(A) {
2269
- this.tQ.di(A);
2596
+ mousePressed(t) {
2597
+ this.Po.jr(t);
2270
2598
  }
2271
- mouseReleased(A) {
2272
- this.tQ._i(A);
2599
+ mouseReleased(t) {
2600
+ this.Po.Yr(t);
2273
2601
  }
2274
- mouseMoved(A) {
2275
- this.tQ.eB(A);
2602
+ mouseMoved(t) {
2603
+ this.Po.Rn(t);
2276
2604
  }
2277
- mouseScrolled(A) {
2278
- this.tQ.sB(A);
2605
+ mouseScrolled(t) {
2606
+ this.Po.zn(t);
2279
2607
  }
2280
2608
  get mouse() {
2281
- return this.tQ.iB();
2609
+ return this.Po.Pn();
2282
2610
  }
2283
- }, jA = (E) => class extends E {
2284
- constructor(...A) {
2285
- super(...A);
2611
+ }, ue = (a) => class extends a {
2612
+ constructor(...t) {
2613
+ super(...t);
2286
2614
  }
2287
- keyPressed(A) {
2288
- this.iQ.di(A);
2615
+ keyPressed(t) {
2616
+ this.Eo.jr(t);
2289
2617
  }
2290
- keyReleased(A) {
2291
- this.iQ._i(A);
2618
+ keyReleased(t) {
2619
+ this.Eo.Yr(t);
2292
2620
  }
2293
- isKeyPressed(A) {
2294
- return this.iQ.pi(A);
2621
+ isKeyPressed(t) {
2622
+ return this.Eo.qr(t);
2295
2623
  }
2296
2624
  get lastKeyPressed() {
2297
- return this.iQ.yi();
2625
+ return this.Eo.Qr();
2298
2626
  }
2299
2627
  get lastKeyReleased() {
2300
- return this.iQ.bi();
2628
+ return this.Eo.Jr();
2301
2629
  }
2302
2630
  get pressedKeys() {
2303
- return this.iQ.$i();
2631
+ return this.Eo.tn();
2304
2632
  }
2305
2633
  get modifierState() {
2306
- return this.iQ.Gi();
2634
+ return this.Eo.en();
2307
2635
  }
2308
2636
  };
2309
- class qA {
2637
+ class fe {
2310
2638
  constructor() {
2311
- Q(this, "vA");
2312
- Q(this, "ws");
2313
- Q(this, "Hs");
2314
- Q(this, "xi");
2315
- Q(this, "eQ");
2316
- Q(this, "tQ");
2317
- Q(this, "iQ");
2318
- Q(this, "qB");
2319
- Q(this, "AQ");
2320
- Q(this, "BQ");
2321
- }
2322
- sQ() {
2639
+ h(this, "xt");
2640
+ h(this, "Si");
2641
+ h(this, "tr");
2642
+ h(this, "rn");
2643
+ h(this, "To");
2644
+ h(this, "Po");
2645
+ h(this, "Eo");
2646
+ h(this, "Ro");
2647
+ h(this, "zo");
2648
+ h(this, "Bo");
2649
+ h(this, "Go");
2650
+ h(this, "Do");
2651
+ }
2652
+ So() {
2323
2653
  }
2324
2654
  }
2325
- class At extends function(t, ...e) {
2326
- return e.reduce((s, i) => i(s), t);
2327
- }(qA, YA, $A, VA, XA, ZA, jA) {
2328
- constructor(t = {}) {
2655
+ class de extends function(e, ...i) {
2656
+ return i.reduce((s, r) => r(s), e);
2657
+ }(fe, Kt, ae, he, ce, le, ue) {
2658
+ constructor(e = {}) {
2329
2659
  super();
2330
- Q(this, "QQ", !1);
2331
- Q(this, "EQ", () => {
2660
+ h(this, "Lo", !1);
2661
+ h(this, "ko", () => {
2332
2662
  });
2333
- Q(this, "rQ", () => {
2663
+ h(this, "Oo", () => {
2334
2664
  });
2335
- Q(this, "nQ", () => {
2665
+ h(this, "Ho", () => {
2336
2666
  });
2337
- Q(this, "gQ");
2338
- this.Hs = new TA(t), this.vA = new uA(this.Hs.qs()), this.ws = new bA(this.vA, t.fontSize ?? 16), this.eQ = new MA(t.frameRate ?? 60), this.tQ = new GA(this.Hs), this.iQ = new FA(), this.qB = this.vA.YA(), this.BQ = this.vA.tt(), this.oQ(t);
2339
- }
2340
- async oQ(t) {
2341
- await this.ws.Rs(t.fontSource);
2342
- const e = this.ws.maxGlyphDimensions;
2343
- this.xi = new RA(this.Hs.canvas, e.width, e.height), this.tQ.Rs(this.xi), this.AQ = this.vA.Me(this.xi.cols, this.xi.rows, 5), this.aQ(), this.EQ(), this.eQ.start(() => this.sQ());
2344
- }
2345
- aQ() {
2346
- this.gQ = () => {
2347
- this.nQ();
2348
- }, window.addEventListener("resize", this.gQ), this.tQ.ui(), this.iQ.ui(), window.addEventListener("blur", () => {
2349
- this.iQ.Mi();
2667
+ h(this, "Io");
2668
+ h(this, "ar", !1);
2669
+ h(this, "No");
2670
+ this.ar = e.overlay ?? !1, this.tr = new kt(e), this.xt = new St(this.tr.gr()), this.Si = new Wt(this.xt, e.fontSize ?? 16), this.To = new Yt(e.frameRate ?? 60), this.Po = new jt(this.tr), this.Eo = new Vt(), this.Ro = this.xt.Tt(), this.Bo = this.xt.re(), this.Xo(e);
2671
+ }
2672
+ async Xo(e) {
2673
+ await this.Si.Wi(e.fontSource);
2674
+ const i = this.Si.maxGlyphDimensions;
2675
+ this.rn = new Ht(this.tr.canvas, i.width, i.height), this.Po.Wi(this.rn), this.zo = this.xt.js(this.rn.cols, this.rn.rows, 5), this.Go = this.xt.js(this.rn.width, this.rn.height, 1), this.ar && (this.No = z.fromSource(this.xt, this.tr.targetCanvas, (s) => this.Si.Ti(s))), this.Do = this.xt.ae(ht, "precision mediump float;uniform sampler2D Ua;uniform vec2 Ub;uniform vec2 Uc;uniform vec2 Ud;void main(){vec2 A=gl_FragCoord.xy-Uc;vec2 B=A*(Ub/Ud);vec2 C=(floor(B)+0.5)/Ub;gl_FragColor=texture2D(Ua,C);}"), this.Wo(), this.ko(), this.To.start(() => this.So());
2676
+ }
2677
+ Wo() {
2678
+ this.Io = () => {
2679
+ this.ar && this.resizeCanvas(this.tr.width, this.tr.height), this.Ho();
2680
+ }, window.addEventListener("resize", this.Io), this.Po.Xr(), this.Eo.Xr(), window.addEventListener("blur", () => {
2681
+ this.Eo.sn();
2350
2682
  });
2351
2683
  }
2352
- sQ() {
2353
- if (this.eQ.measureFrameRate(), this.eQ.incrementFrame(), this.QQ) return;
2354
- this.AQ.begin(), this.vA.we(this.qB), this.rQ(), this.vA.FA(this.qB), this.AQ.end();
2355
- const t = this.vA.state.canvasBackgroundColor;
2356
- this.vA.Ot(t[0], t[1], t[2], t[3]), this.vA.we(this.BQ), this.BQ.JA({ a: this.ws.fontFramebuffer, b: [this.ws.textureColumns, this.ws.textureRows], c: this.AQ.textures[0], d: this.AQ.textures[1], e: this.AQ.textures[2], f: this.AQ.textures[4], g: this.AQ.textures[3], h: [this.xi.cols, this.xi.rows], i: [this.xi.width, this.xi.height], j: [this.xi.offsetX, this.xi.offsetY], k: this.xi.width / this.xi.height }), this.vA.me(this.xi.offsetX, this.xi.offsetY, this.xi.width, this.xi.height);
2684
+ So() {
2685
+ if (this.To.measureFrameRate(), this.To.incrementFrame(), this.Lo) return;
2686
+ if (this.ar) {
2687
+ const i = this.xt.context;
2688
+ i.bindTexture(i.TEXTURE_2D, this.No.texture), i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL, 1), i.texImage2D(i.TEXTURE_2D, 0, i.RGBA, i.RGBA, i.UNSIGNED_BYTE, this.tr.targetCanvas), i.bindTexture(i.TEXTURE_2D, null), this.zo.begin(), this.xt.Hs(this.No, 0, 0, this.rn.cols, this.rn.rows), this.xt.Ds(this.Ro), this.Oo(), this.xt.St(this.Ro), this.zo.end();
2689
+ } else this.zo.begin(), this.xt.Ds(this.Ro), this.Oo(), this.xt.St(this.Ro), this.zo.end();
2690
+ this.Go.begin(), this.xt.Ds(this.Bo), this.Bo.Vt({ U0: this.Si.fontFramebuffer, U1: [this.Si.textureColumns, this.Si.textureRows], U2: this.zo.textures[0], U3: this.zo.textures[1], U4: this.zo.textures[2], U5: this.zo.textures[4], U6: this.zo.textures[3], U7: [this.rn.cols, this.rn.rows], U8: [this.Go.width, this.Go.height], U9: this.Go.width / this.Go.height }), this.xt.Is(0, 0, this.tr.width, this.tr.height), this.Go.end();
2691
+ const e = this.xt.state.canvasBackgroundColor;
2692
+ this.xt.Ne(e[0], e[1], e[2], e[3]), this.xt.Ds(this.Do), this.Do.Vt({ Ua: this.Go.textures[0], Ub: [this.Go.width, this.Go.height], Uc: [this.rn.offsetX, this.rn.offsetY], Ud: [this.rn.width, this.rn.height] }), this.xt.Is(this.rn.offsetX, this.rn.offsetY, this.rn.width, this.rn.height);
2357
2693
  }
2358
- setup(t) {
2359
- this.EQ = t;
2694
+ setup(e) {
2695
+ this.ko = e;
2360
2696
  }
2361
- draw(t) {
2362
- this.rQ = t;
2697
+ draw(e) {
2698
+ this.Oo = e;
2363
2699
  }
2364
- windowResized(t) {
2365
- this.nQ = t;
2700
+ windowResized(e) {
2701
+ this.Ho = e;
2366
2702
  }
2367
- resizeCanvas(t, e) {
2368
- this.Hs.js(t, e), this.xi.iA(), this.AQ.resize(this.xi.cols, this.xi.rows), this.vA.Fe(), this.tQ.Vi(), this.sQ();
2703
+ resizeCanvas(e, i) {
2704
+ this.tr.mr(e, i), this.rn.ir(), this.zo.resize(this.rn.cols, this.rn.rows), this.Go.resize(this.rn.width, this.rn.height), this.xt.Zs(), this.Po.An(), this.So();
2369
2705
  }
2370
2706
  destroy() {
2371
- this.QQ || (this.eQ.stop(), window.removeEventListener("resize", this.gQ), this.tQ.fi(), this.iQ.fi(), this.ws.kA(), this.vA.kA(), this.QQ = !0);
2707
+ this.Lo || (this.To.stop(), window.removeEventListener("resize", this.Io), this.Po.Kr(), this.Eo.Kr(), this.Si.Gt(), this.xt.Gt(), this.Go.Gt(), this.Do.Gt(), this.No && this.No.Gt(), this.Lo = !0);
2372
2708
  }
2373
2709
  get grid() {
2374
- return this.xi;
2710
+ return this.rn;
2375
2711
  }
2376
2712
  get font() {
2377
- return this.ws;
2713
+ return this.Si;
2378
2714
  }
2379
2715
  get width() {
2380
- return this.Hs.width;
2716
+ return this.tr.width;
2381
2717
  }
2382
2718
  get height() {
2383
- return this.Hs.height;
2719
+ return this.tr.height;
2384
2720
  }
2385
2721
  get canvas() {
2386
- return this.Hs.canvas;
2722
+ return this.tr.canvas;
2387
2723
  }
2388
2724
  get isDisposed() {
2389
- return this.QQ;
2725
+ return this.Lo;
2390
2726
  }
2391
- get drawFramebuffer() {
2392
- return this.AQ;
2727
+ get overlay() {
2728
+ return this.No;
2393
2729
  }
2394
2730
  }
2395
- class z {
2731
+ class Q {
2396
2732
  constructor() {
2397
2733
  }
2398
- static create(A = {}) {
2399
- return new At(A);
2734
+ static create(t = {}) {
2735
+ return new de(t);
2400
2736
  }
2401
- static setErrorLevel(A) {
2402
- M.v(A);
2737
+ static setErrorLevel(t) {
2738
+ N.A(t);
2403
2739
  }
2404
2740
  static get version() {
2405
- return "0.2.1-beta.3";
2741
+ return "0.2.1-beta.5";
2406
2742
  }
2407
2743
  }
2408
- const et = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), st = z.create, it = z.setErrorLevel, Bt = z.version;
2744
+ const pe = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), me = Q.create, ve = Q.setErrorLevel, Ae = Q.version;
2409
2745
  export {
2410
- TA as TextmodeCanvas,
2411
- tA as TextmodeErrorLevel,
2412
- bA as TextmodeFont,
2413
- U as TextmodeFramebuffer,
2414
- RA as TextmodeGrid,
2415
- At as Textmodifier,
2416
- st as create,
2417
- et as export,
2418
- it as setErrorLevel,
2419
- z as textmode,
2420
- Bt as version
2746
+ kt as TextmodeCanvas,
2747
+ ut as TextmodeErrorLevel,
2748
+ Wt as TextmodeFont,
2749
+ q as TextmodeFramebuffer,
2750
+ Ht as TextmodeGrid,
2751
+ z as TextmodeImage,
2752
+ de as Textmodifier,
2753
+ me as create,
2754
+ pe as export,
2755
+ ve as setErrorLevel,
2756
+ Q as textmode,
2757
+ Ae as version
2421
2758
  };