textmode.js 0.1.9-beta.6 → 0.1.9

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 (31) hide show
  1. package/README.md +14 -13
  2. package/dist/textmode.esm.js +1038 -1000
  3. package/dist/textmode.esm.min.js +910 -872
  4. package/dist/textmode.umd.js +14 -14
  5. package/dist/textmode.umd.min.js +14 -14
  6. package/dist/types/ColorPalette.d.ts +2 -5
  7. package/dist/types/export/txt/TXTDataExtractor.d.ts +3 -3
  8. package/dist/types/export/txt/types.d.ts +5 -3
  9. package/dist/types/index.d.ts +2 -1
  10. package/dist/types/rendering/core/Framebuffer.d.ts +140 -0
  11. package/dist/types/rendering/core/Shader.d.ts +59 -0
  12. package/dist/types/rendering/core/index.d.ts +2 -0
  13. package/dist/types/rendering/index.d.ts +3 -2
  14. package/dist/types/rendering/webgl/Framebuffer.d.ts +5 -20
  15. package/dist/types/rendering/webgl/Renderer.d.ts +9 -7
  16. package/dist/types/rendering/webgl/Shader.d.ts +23 -7
  17. package/dist/types/textmode/ConversionPipeline.d.ts +1 -1
  18. package/dist/types/textmode/Textmodifier.d.ts +4 -4
  19. package/dist/types/textmode/converters/BrightnessConverter.d.ts +25 -25
  20. package/dist/types/textmode/converters/Converter.d.ts +12 -5
  21. package/dist/types/textmode/converters/FeatureConverter.d.ts +27 -5
  22. package/dist/types/textmode/converters/index.d.ts +3 -3
  23. package/dist/types/textmode/font/TextmodeFont.d.ts +2 -2
  24. package/dist/types/textmode/font/TextureAtlas.d.ts +2 -2
  25. package/dist/types/textmode/mixins/RenderingMixin.d.ts +3 -3
  26. package/package.json +1 -1
  27. package/dist/types/rendering/core/AbstractFramebuffer.d.ts +0 -1
  28. package/dist/types/rendering/core/AbstractGeometry.d.ts +0 -1
  29. package/dist/types/rendering/core/AbstractShader.d.ts +0 -1
  30. package/dist/types/rendering/core/AbstractTexture.d.ts +0 -1
  31. package/dist/types/rendering/core/GraphicsContext.d.ts +0 -1
@@ -1,6 +1,6 @@
1
- var AA = Object.defineProperty;
2
- var tA = (E, A, t) => A in E ? AA(E, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : E[A] = t;
3
- var o = (E, A, t) => tA(E, typeof A != "symbol" ? A + "" : A, t);
1
+ var sA = Object.defineProperty;
2
+ var rA = (o, A, t) => A in o ? sA(o, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[A] = t;
3
+ var E = (o, A, t) => rA(o, typeof A != "symbol" ? A + "" : A, t);
4
4
  class I extends Error {
5
5
  constructor(A, t = {}) {
6
6
  super(I.A(A, t)), this.name = "TextmodeError";
@@ -33,10 +33,10 @@ class I extends Error {
33
33
  return A + "";
34
34
  }
35
35
  }
36
- var eA = ((E) => (E[E.SILENT = 0] = "SILENT", E[E.WARNING = 1] = "WARNING", E[E.ERROR = 2] = "ERROR", E[E.THROW = 3] = "THROW", E))(eA || {});
36
+ var iA = ((o) => (o[o.SILENT = 0] = "SILENT", o[o.WARNING = 1] = "WARNING", o[o.ERROR = 2] = "ERROR", o[o.THROW = 3] = "THROW", o))(iA || {});
37
37
  const v = class v {
38
38
  constructor() {
39
- o(this, "h", { globalLevel: 3 });
39
+ E(this, "h", { globalLevel: 3 });
40
40
  }
41
41
  static l() {
42
42
  return v.o || (v.o = new v()), v.o;
@@ -61,586 +61,620 @@ const v = class v {
61
61
  this.h.globalLevel = A;
62
62
  }
63
63
  };
64
- o(v, "o", null);
65
- let S = v;
66
- const u = S.l(), X = /* @__PURE__ */ new WeakMap();
67
- function G(E, A) {
68
- X.set(E, A);
64
+ E(v, "o", null);
65
+ let U = v;
66
+ const D = U.l(), j = /* @__PURE__ */ new WeakMap();
67
+ function F(o, A) {
68
+ j.set(o, A);
69
69
  }
70
- function J(E) {
71
- return X.get(E);
70
+ function J(o) {
71
+ return j.get(o);
72
72
  }
73
- class K {
74
- constructor(A, t, e = t, s = {}) {
75
- o(this, "P");
76
- o(this, "I");
77
- o(this, "m");
78
- o(this, "p");
79
- o(this, "_");
80
- o(this, "h");
81
- o(this, "v", null);
82
- o(this, "M", null);
83
- this.P = A, this.p = t, this._ = e, this.h = { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte", ...s }, this.m = this.G(), this.I = A.createFramebuffer(), this.F();
84
- }
85
- $(A) {
86
- const { P: t } = this, e = t.getParameter(t.FRAMEBUFFER_BINDING);
87
- t.bindFramebuffer(t.FRAMEBUFFER, this.I);
73
+ class X {
74
+ constructor(A, t = A, e = {}) {
75
+ E(this, "P");
76
+ E(this, "I");
77
+ E(this, "h");
78
+ E(this, "m", null);
79
+ this.P = A, this.I = t, this.h = { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte", ...e };
80
+ }
81
+ get width() {
82
+ return this.P;
83
+ }
84
+ get height() {
85
+ return this.I;
86
+ }
87
+ get pixels() {
88
+ return this.m;
89
+ }
90
+ get options() {
91
+ return { ...this.h };
92
+ }
93
+ validateCoordinates(A, t, e = !0) {
94
+ return (A < 0 || t < 0 || A >= this.P || t >= this.I) && e && console.warn("The x and y values passed to Framebuffer.get are outside of its range and will be clamped."), [Math.max(0, Math.min(A, this.P - 1)), Math.max(0, Math.min(t, this.I - 1))];
95
+ }
96
+ validateRegion(A, t, e, s) {
97
+ return [A = Math.max(0, Math.min(A, this.P - 1)), t = Math.max(0, Math.min(t, this.I - 1)), e = Math.max(1, Math.min(e, this.P - A)), s = Math.max(1, Math.min(s, this.I - t))];
98
+ }
99
+ updateDimensions(A, t) {
100
+ this.P = A, this.I = t, this.m = null;
101
+ }
102
+ }
103
+ class K extends X {
104
+ constructor(t, e, s = e, r = {}) {
105
+ super(e, s, r);
106
+ E(this, "p");
107
+ E(this, "_");
108
+ E(this, "v");
109
+ E(this, "M", null);
110
+ this.p = t, this.v = this.G(), this._ = t.createFramebuffer(), this.F();
111
+ }
112
+ $(t) {
113
+ const { p: e } = this, s = e.getParameter(e.FRAMEBUFFER_BINDING);
114
+ e.bindFramebuffer(e.FRAMEBUFFER, this._);
88
115
  try {
89
- return A();
116
+ return t();
90
117
  } finally {
91
- t.bindFramebuffer(t.FRAMEBUFFER, e);
118
+ e.bindFramebuffer(e.FRAMEBUFFER, s);
92
119
  }
93
120
  }
94
121
  G() {
95
- const { P: A } = this, t = A.createTexture();
96
- A.bindTexture(A.TEXTURE_2D, t);
97
- const e = this.h.filter === "linear" ? A.LINEAR : A.NEAREST, s = this.h.wrap === "repeat" ? A.REPEAT : A.CLAMP_TO_EDGE;
98
- return A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MIN_FILTER, e), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MAG_FILTER, e), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_S, s), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_T, s), this.Y(), t;
122
+ const { p: t } = this, e = t.createTexture();
123
+ t.bindTexture(t.TEXTURE_2D, e);
124
+ const s = this.h.filter === "linear" ? t.LINEAR : t.NEAREST, r = this.h.wrap === "repeat" ? t.REPEAT : t.CLAMP_TO_EDGE;
125
+ return t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, s), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, s), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, r), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, r), this.Y(), e;
99
126
  }
100
127
  Y() {
101
- const { P: A } = this, t = this.h.type === "float" ? A.FLOAT : A.UNSIGNED_BYTE;
102
- A.texImage2D(A.TEXTURE_2D, 0, A.RGBA, this.p, this._, 0, A.RGBA, t, null);
128
+ const { p: t } = this, e = this.h.type === "float" ? t.FLOAT : t.UNSIGNED_BYTE;
129
+ t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, this.P, this.I, 0, t.RGBA, e, null);
103
130
  }
104
131
  F() {
105
- const { P: A } = this;
106
- A.bindFramebuffer(A.FRAMEBUFFER, this.I), A.framebufferTexture2D(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, this.m, 0), A.bindFramebuffer(A.FRAMEBUFFER, null);
132
+ const { p: t } = this;
133
+ t.bindFramebuffer(t.FRAMEBUFFER, this._), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, this.v, 0), t.bindFramebuffer(t.FRAMEBUFFER, null);
107
134
  }
108
- update(A) {
109
- const { P: t } = this;
110
- t.bindTexture(t.TEXTURE_2D, this.m), 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);
135
+ S(t) {
136
+ const { p: e } = this;
137
+ e.bindTexture(e.TEXTURE_2D, this.v), 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);
111
138
  }
112
- updatePixels(A, t, e) {
113
- const { P: s } = this;
114
- s.bindTexture(s.TEXTURE_2D, this.m), s.texImage2D(s.TEXTURE_2D, 0, s.RGBA, t, e, 0, s.RGBA, s.UNSIGNED_BYTE, A), s.bindTexture(s.TEXTURE_2D, null);
139
+ updatePixels(t, e, s) {
140
+ const { p: r } = this;
141
+ r.bindTexture(r.TEXTURE_2D, this.v), r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, e, s, 0, r.RGBA, r.UNSIGNED_BYTE, t), r.bindTexture(r.TEXTURE_2D, null);
115
142
  }
116
- resize(A, t) {
117
- const { P: e } = this;
118
- this.p = A, this._ = t, this.M = null, e.bindTexture(e.TEXTURE_2D, this.m), this.Y(), e.bindTexture(e.TEXTURE_2D, null);
143
+ resize(t, e) {
144
+ const { p: s } = this;
145
+ this.updateDimensions(t, e), s.bindTexture(s.TEXTURE_2D, this.v), this.Y(), s.bindTexture(s.TEXTURE_2D, null);
119
146
  }
120
147
  begin() {
121
- const { P: A } = this;
122
- this.v = { framebuffer: A.getParameter(A.FRAMEBUFFER_BINDING), viewport: A.getParameter(A.VIEWPORT) }, A.bindFramebuffer(A.FRAMEBUFFER, this.I), A.viewport(0, 0, this.p, this._), G(A, [0, 0, this.p, this._]);
148
+ const { p: t } = this;
149
+ this.M = { framebuffer: t.getParameter(t.FRAMEBUFFER_BINDING), viewport: t.getParameter(t.VIEWPORT) }, t.bindFramebuffer(t.FRAMEBUFFER, this._), t.viewport(0, 0, this.P, this.I), F(t, [0, 0, this.P, this.I]);
123
150
  }
124
151
  end() {
125
- if (!this.v) return;
126
- const { P: A } = this;
127
- A.bindFramebuffer(A.FRAMEBUFFER, this.v.framebuffer), A.viewport(...this.v.viewport), G(A, this.v.viewport), this.v = null;
152
+ if (!this.M) return;
153
+ const { p: t } = this;
154
+ t.bindFramebuffer(t.FRAMEBUFFER, this.M.framebuffer), t.viewport(...this.M.viewport), F(t, this.M.viewport), this.M = null;
128
155
  }
129
156
  loadPixels() {
130
- const { P: A } = this;
131
- this.M || (this.M = new Uint8Array(this.p * this._ * 4)), this.$(() => {
132
- A.readPixels(0, 0, this.p, this._, A.RGBA, A.UNSIGNED_BYTE, this.M);
157
+ const { p: t } = this;
158
+ this.m || (this.m = new Uint8Array(this.P * this.I * 4)), this.$(() => {
159
+ t.readPixels(0, 0, this.P, this.I, t.RGBA, t.UNSIGNED_BYTE, this.m);
133
160
  });
134
161
  }
135
- get(A, t, e, s) {
136
- const { P: r } = this;
137
- if (A === void 0 && t === void 0) {
138
- const i = new Uint8Array(this.p * this._ * 4);
139
- return this.$(() => (r.readPixels(0, 0, this.p, this._, r.RGBA, r.UNSIGNED_BYTE, i), i));
162
+ get(t, e, s, r) {
163
+ const { p: i } = this;
164
+ if (t === void 0 && e === void 0) {
165
+ const B = new Uint8Array(this.P * this.I * 4);
166
+ return this.$(() => (i.readPixels(0, 0, this.P, this.I, i.RGBA, i.UNSIGNED_BYTE, B), B));
140
167
  }
141
- if (e === void 0 && s === void 0) {
142
- (A < 0 || t < 0 || A >= this.p || t >= this._) && (console.warn("The x and y values passed to Framebuffer.get are outside of its range and will be clamped."), A = Math.max(0, Math.min(A, this.p - 1)), t = Math.max(0, Math.min(t, this._ - 1)));
143
- const i = new Uint8Array(4);
144
- return this.$(() => (r.readPixels(A, t, 1, 1, r.RGBA, r.UNSIGNED_BYTE, i), [i[0], i[1], i[2], i[3]]));
168
+ if (s === void 0 && r === void 0) {
169
+ const [B, Q] = this.validateCoordinates(t, e), n = new Uint8Array(4);
170
+ return this.$(() => (i.readPixels(B, Q, 1, 1, i.RGBA, i.UNSIGNED_BYTE, n), [n[0], n[1], n[2], n[3]]));
145
171
  }
146
172
  {
147
- A = Math.max(0, Math.min(A, this.p - 1)), t = Math.max(0, Math.min(t, this._ - 1)), e = Math.max(1, Math.min(e, this.p - A)), s = Math.max(1, Math.min(s, this._ - t));
148
- const i = new Uint8Array(e * s * 4);
149
- return this.$(() => (r.readPixels(A, t, e, s, r.RGBA, r.UNSIGNED_BYTE, i), i));
173
+ const [B, Q, n, g] = this.validateRegion(t, e, s, r), a = new Uint8Array(n * g * 4);
174
+ return this.$(() => (i.readPixels(B, Q, n, g, i.RGBA, i.UNSIGNED_BYTE, a), a));
150
175
  }
151
176
  }
152
- S() {
153
- this.I && this.P.deleteFramebuffer(this.I), this.m && this.P.deleteTexture(this.m);
177
+ O() {
178
+ this._ && this.p.deleteFramebuffer(this._), this.v && this.p.deleteTexture(this.v);
154
179
  }
155
180
  get framebuffer() {
156
- return this.I;
181
+ return this._;
157
182
  }
158
183
  get texture() {
159
- return this.m;
184
+ return this.v;
160
185
  }
161
- get width() {
162
- return this.p;
186
+ }
187
+ class q {
188
+ constructor() {
189
+ E(this, "U", !1);
163
190
  }
164
- get height() {
165
- return this._;
191
+ get isReady() {
192
+ return this.U;
166
193
  }
167
- get pixels() {
168
- return this.M;
194
+ setUniforms(A) {
195
+ for (const [t, e] of Object.entries(A)) this.setUniform(t, e);
169
196
  }
170
197
  }
171
- class x {
172
- constructor(A, t, e) {
173
- o(this, "P");
174
- o(this, "O");
175
- o(this, "U", /* @__PURE__ */ new Map());
176
- o(this, "k", /* @__PURE__ */ new Map());
177
- o(this, "R", 0);
178
- o(this, "V");
179
- this.P = A, this.O = this.H(t, e), this.V = A.getParameter(A.MAX_TEXTURE_IMAGE_UNITS), this.L();
180
- }
181
- L() {
182
- const A = this.P.getProgramParameter(this.O, this.P.ACTIVE_UNIFORMS);
183
- for (let t = 0; t < A; t++) {
184
- const e = this.P.getActiveUniform(this.O, t);
185
- if (e) {
186
- const s = this.P.getUniformLocation(this.O, e.name);
187
- s && (this.U.set(e.name, s), this.k.set(e.name, e.type));
198
+ class p extends q {
199
+ constructor(t, e, s) {
200
+ super();
201
+ E(this, "p");
202
+ E(this, "R");
203
+ E(this, "k", /* @__PURE__ */ new Map());
204
+ E(this, "V", /* @__PURE__ */ new Map());
205
+ E(this, "H", 0);
206
+ E(this, "L");
207
+ this.p = t, this.R = this.J(e, s), this.L = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS), this.j(), this.U = !0;
208
+ }
209
+ static fromSource(t, e) {
210
+ return new p(t, e.vertex, e.fragment);
211
+ }
212
+ j() {
213
+ const t = this.p.getProgramParameter(this.R, this.p.ACTIVE_UNIFORMS);
214
+ for (let e = 0; e < t; e++) {
215
+ const s = this.p.getActiveUniform(this.R, e);
216
+ if (s) {
217
+ const r = this.p.getUniformLocation(this.R, s.name);
218
+ r && (this.k.set(s.name, r), this.V.set(s.name, s.type));
188
219
  }
189
220
  }
190
221
  }
191
- H(A, t) {
192
- const e = this.J(this.P.VERTEX_SHADER, A), s = this.J(this.P.FRAGMENT_SHADER, t), r = this.P.createProgram();
193
- if (this.P.attachShader(r, e), this.P.attachShader(r, s), this.P.linkProgram(r), !this.P.getProgramParameter(r, this.P.LINK_STATUS)) {
194
- const i = this.P.getProgramInfoLog(r);
195
- throw Error("Shader program link error: " + i);
222
+ J(t, e) {
223
+ const s = this.K(this.p.VERTEX_SHADER, t), r = this.K(this.p.FRAGMENT_SHADER, e), i = this.p.createProgram();
224
+ if (this.p.attachShader(i, s), this.p.attachShader(i, r), this.p.linkProgram(i), !this.p.getProgramParameter(i, this.p.LINK_STATUS)) {
225
+ const B = this.p.getProgramInfoLog(i);
226
+ throw Error("Shader program link error: " + B);
196
227
  }
197
- return this.P.deleteShader(e), this.P.deleteShader(s), r;
228
+ return this.p.deleteShader(s), this.p.deleteShader(r), i;
198
229
  }
199
- J(A, t) {
200
- const e = this.P.createShader(A);
201
- if (this.P.shaderSource(e, t), this.P.compileShader(e), !this.P.getShaderParameter(e, this.P.COMPILE_STATUS)) {
202
- const s = this.P.getShaderInfoLog(e);
203
- throw this.P.deleteShader(e), Error("Shader compilation error: " + s);
230
+ K(t, e) {
231
+ const s = this.p.createShader(t);
232
+ if (this.p.shaderSource(s, e), this.p.compileShader(s), !this.p.getShaderParameter(s, this.p.COMPILE_STATUS)) {
233
+ const r = this.p.getShaderInfoLog(s);
234
+ throw this.p.deleteShader(s), Error("Shader compilation error: " + r);
204
235
  }
205
- return e;
236
+ return s;
206
237
  }
207
- K() {
208
- this.P.useProgram(this.O), this.W();
238
+ W() {
239
+ this.p.useProgram(this.R), this.N();
209
240
  }
210
- setUniform(A, t) {
211
- const e = this.U.get(A);
212
- if (e) if (typeof t == "number")
213
- this.j(A) ? this.P.uniform1i(e, Math.floor(t)) : this.P.uniform1f(e, t);
214
- else if (typeof t == "boolean") this.P.uniform1i(e, t ? 1 : 0);
215
- else if (Array.isArray(t)) switch (t.length) {
241
+ N() {
242
+ this.H = 0;
243
+ }
244
+ setUniform(t, e) {
245
+ const s = this.k.get(t);
246
+ if (s) if (typeof e == "number")
247
+ this.Z(t) ? this.p.uniform1i(s, Math.floor(e)) : this.p.uniform1f(s, e);
248
+ else if (typeof e == "boolean") this.p.uniform1i(s, e ? 1 : 0);
249
+ else if (Array.isArray(e)) switch (e.length) {
216
250
  case 2:
217
- this.P.uniform2f(e, t[0], t[1]);
251
+ this.p.uniform2f(s, e[0], e[1]);
218
252
  break;
219
253
  case 3:
220
- this.P.uniform3f(e, t[0], t[1], t[2]);
254
+ this.p.uniform3f(s, e[0], e[1], e[2]);
221
255
  break;
222
256
  case 4:
223
- this.P.uniform4f(e, t[0], t[1], t[2], t[3]);
257
+ this.p.uniform4f(s, e[0], e[1], e[2], e[3]);
224
258
  break;
225
259
  default:
226
- console.warn(`Unsupported array length ${t.length} for uniform '${A}'`);
260
+ console.warn(`Unsupported array length ${e.length} for uniform '${t}'`);
227
261
  }
228
- else if (t instanceof WebGLTexture) {
229
- const s = this.N();
230
- this.P.uniform1i(e, s), this.P.activeTexture(this.P.TEXTURE0 + s), this.P.bindTexture(this.P.TEXTURE_2D, t);
231
- } else if (t instanceof K) {
232
- const s = this.N();
233
- this.P.uniform1i(e, s), this.P.activeTexture(this.P.TEXTURE0 + s), this.P.bindTexture(this.P.TEXTURE_2D, t.texture);
234
- } else console.warn(`Unsupported uniform type for '${A}':`, typeof t);
235
- }
236
- N() {
237
- return this.R >= this.V && console.warn(`Exceeded maximum texture units (${this.V}). Texture may not render correctly.`), this.R++;
238
- }
239
- j(A) {
240
- const t = this.k.get(A);
241
- return !!t && (t === this.P.INT || t === this.P.INT_VEC2 || t === this.P.INT_VEC3 || t === this.P.INT_VEC4 || t === this.P.SAMPLER_2D || t === this.P.SAMPLER_CUBE);
262
+ else if (e instanceof WebGLTexture) {
263
+ const r = this.X();
264
+ this.p.uniform1i(s, r), this.p.activeTexture(this.p.TEXTURE0 + r), this.p.bindTexture(this.p.TEXTURE_2D, e);
265
+ } else if (e instanceof K) {
266
+ const r = this.X();
267
+ this.p.uniform1i(s, r), this.p.activeTexture(this.p.TEXTURE0 + r), this.p.bindTexture(this.p.TEXTURE_2D, e.texture);
268
+ } else if (typeof e == "object" && "texture" in e) {
269
+ const r = this.X();
270
+ this.p.uniform1i(s, r), this.p.activeTexture(this.p.TEXTURE0 + r), this.p.bindTexture(this.p.TEXTURE_2D, e.texture);
271
+ } else console.warn(`Unsupported uniform type for '${t}':`, typeof e);
272
+ }
273
+ X() {
274
+ return this.H >= this.L && console.warn(`Exceeded maximum texture units (${this.L}). Texture may not render correctly.`), this.H++;
275
+ }
276
+ Z(t) {
277
+ const e = this.V.get(t);
278
+ return !!e && (e === this.p.INT || e === this.p.INT_VEC2 || e === this.p.INT_VEC3 || e === this.p.INT_VEC4 || e === this.p.SAMPLER_2D || e === this.p.SAMPLER_CUBE);
242
279
  }
243
280
  get glProgram() {
244
- return this.O;
281
+ return this.R;
245
282
  }
246
- S() {
247
- this.P.deleteProgram(this.O);
248
- }
249
- W() {
250
- this.R = 0;
283
+ O() {
284
+ this.p.deleteProgram(this.R);
251
285
  }
252
286
  }
253
- class Z {
287
+ class AA {
254
288
  constructor(A) {
255
- o(this, "P");
256
- o(this, "Z", null);
257
- o(this, "X", 16);
258
- o(this, "q", /* @__PURE__ */ new Map());
259
- this.P = A;
260
- }
261
- AA() {
262
- if (this.Z) return;
263
- const A = this.P;
264
- this.Z = A.createBuffer(), A.bindBuffer(A.ARRAY_BUFFER, this.Z);
265
- }
266
- tA() {
267
- const A = this.P, t = A.getParameter(A.CURRENT_PROGRAM);
268
- let e = this.q.get(t);
269
- return e || (e = { a_position: A.getAttribLocation(t, "a_position"), a_texCoord: A.getAttribLocation(t, "a_texCoord") }, this.q.set(t, e)), A.enableVertexAttribArray(e.a_position), A.vertexAttribPointer(e.a_position, 2, A.FLOAT, !1, this.X, 0), A.enableVertexAttribArray(e.a_texCoord), A.vertexAttribPointer(e.a_texCoord, 2, A.FLOAT, !1, this.X, 8), { positionLoc: e.a_position, texLoc: e.a_texCoord };
270
- }
271
- eA(A, t) {
272
- const e = this.P;
289
+ E(this, "p");
290
+ E(this, "q", null);
291
+ E(this, "AA", 16);
292
+ E(this, "tA", /* @__PURE__ */ new Map());
293
+ this.p = A;
294
+ }
295
+ eA() {
296
+ if (this.q) return;
297
+ const A = this.p;
298
+ this.q = A.createBuffer(), A.bindBuffer(A.ARRAY_BUFFER, this.q);
299
+ }
300
+ sA() {
301
+ const A = this.p, t = A.getParameter(A.CURRENT_PROGRAM);
302
+ let e = this.tA.get(t);
303
+ return e || (e = { a_position: A.getAttribLocation(t, "a_position"), a_texCoord: A.getAttribLocation(t, "a_texCoord") }, this.tA.set(t, e)), A.enableVertexAttribArray(e.a_position), A.vertexAttribPointer(e.a_position, 2, A.FLOAT, !1, this.AA, 0), A.enableVertexAttribArray(e.a_texCoord), A.vertexAttribPointer(e.a_texCoord, 2, A.FLOAT, !1, this.AA, 8), { positionLoc: e.a_position, texLoc: e.a_texCoord };
304
+ }
305
+ rA(A, t) {
306
+ const e = this.p;
273
307
  e.disableVertexAttribArray(A), e.disableVertexAttribArray(t);
274
308
  }
275
- sA(A, t) {
276
- const e = this.P, s = J(e) || [0, 0, e.canvas.width, e.canvas.height];
309
+ BA(A, t) {
310
+ const e = this.p, s = J(e) || [0, 0, e.canvas.width, e.canvas.height];
277
311
  return { nx: A / s[2] * 2 - 1, ny: 1 - t / s[3] * 2 };
278
312
  }
279
- rA(A, t, e, s) {
280
- const r = this.P;
281
- this.AA(), r.bindBuffer(r.ARRAY_BUFFER, this.Z);
313
+ iA(A, t, e, s) {
314
+ const r = this.p;
315
+ this.eA(), r.bindBuffer(r.ARRAY_BUFFER, this.q);
282
316
  const i = new Float32Array([A, s, 0, 0, e, s, 1, 0, A, t, 0, 1, A, t, 0, 1, e, s, 1, 0, e, t, 1, 1]);
283
317
  r.bufferData(r.ARRAY_BUFFER, i, r.DYNAMIC_DRAW);
284
318
  }
285
- S() {
286
- this.Z && this.P.deleteBuffer(this.Z);
319
+ O() {
320
+ this.q && this.p.deleteBuffer(this.q);
287
321
  }
288
322
  }
289
- class sA extends Z {
323
+ class BA extends AA {
290
324
  constructor(A) {
291
325
  super(A);
292
326
  }
293
- BA(A, t, e, s) {
294
- const r = this.sA(A, t), i = this.sA(A + e, t + s);
295
- this.rA(r.nx, r.ny, i.nx, i.ny);
296
- const B = this.tA();
297
- this.P.drawArrays(this.P.TRIANGLES, 0, 6), this.eA(B.positionLoc, B.texLoc);
327
+ QA(A, t, e, s) {
328
+ const r = this.BA(A, t), i = this.BA(A + e, t + s);
329
+ this.iA(r.nx, r.ny, i.nx, i.ny);
330
+ const B = this.sA();
331
+ this.p.drawArrays(this.p.TRIANGLES, 0, 6), this.rA(B.positionLoc, B.texLoc);
298
332
  }
299
- iA(A, t, e, s, r) {
300
- this.BA(A, t, e, r), this.BA(A + e - r, t, r, s), this.BA(A, t + s - r, e, r), this.BA(A, t, r, s);
333
+ EA(A, t, e, s, r) {
334
+ this.QA(A, t, e, r), this.QA(A + e - r, t, r, s), this.QA(A, t + s - r, e, r), this.QA(A, t, r, s);
301
335
  }
302
336
  }
303
- class rA extends Z {
337
+ class oA extends AA {
304
338
  constructor(A) {
305
339
  super(A);
306
340
  }
307
- QA(A, t, e, s, r) {
341
+ oA(A, t, e, s, r) {
308
342
  const i = e - A, B = s - t, Q = Math.hypot(i, B);
309
343
  if (Q === 0) {
310
- const g = r / 2, h = this.sA(A - g, t - g), a = this.sA(A + g, t + g);
311
- this.rA(h.nx, h.ny, a.nx, a.ny);
344
+ const g = r / 2, a = this.BA(A - g, t - g), h = this.BA(A + g, t + g);
345
+ this.iA(a.nx, a.ny, h.nx, h.ny);
312
346
  } else {
313
- const g = -B / Q, h = i / Q, a = r / 2, D = A + g * a, c = t + h * a, l = A - g * a, d = t - h * a, C = e + g * a, P = s + h * a, p = e - g * a, m = s - h * a, y = this.sA(D, c), b = this.sA(l, d), _ = this.sA(C, P), V = this.sA(p, m), F = this.P;
314
- this.AA(), F.bindBuffer(F.ARRAY_BUFFER, this.Z);
315
- const q = new Float32Array([y.nx, y.ny, 0, 0, b.nx, b.ny, 0, 1, _.nx, _.ny, 1, 0, b.nx, b.ny, 0, 1, V.nx, V.ny, 1, 1, _.nx, _.ny, 1, 0]);
316
- F.bufferData(F.ARRAY_BUFFER, q, F.DYNAMIC_DRAW);
347
+ const g = -B / Q, a = i / Q, h = r / 2, u = A + g * h, c = t + a * h, l = A - g * h, d = t - a * h, C = e + g * h, P = s + a * h, w = e - g * h, m = s - a * h, y = this.BA(u, c), x = this.BA(l, d), _ = this.BA(C, P), V = this.BA(w, m), T = this.p;
348
+ this.eA(), T.bindBuffer(T.ARRAY_BUFFER, this.q);
349
+ const eA = new Float32Array([y.nx, y.ny, 0, 0, x.nx, x.ny, 0, 1, _.nx, _.ny, 1, 0, x.nx, x.ny, 0, 1, V.nx, V.ny, 1, 1, _.nx, _.ny, 1, 0]);
350
+ T.bufferData(T.ARRAY_BUFFER, eA, T.DYNAMIC_DRAW);
317
351
  }
318
- const n = this.tA();
319
- this.P.drawArrays(this.P.TRIANGLES, 0, 6), this.eA(n.positionLoc, n.texLoc);
352
+ const n = this.sA();
353
+ this.p.drawArrays(this.p.TRIANGLES, 0, 6), this.rA(n.positionLoc, n.texLoc);
320
354
  }
321
355
  }
322
- var R = "attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}";
323
- class iA {
356
+ var Y = "attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}";
357
+ class EA {
324
358
  constructor(A) {
325
- o(this, "P");
326
- o(this, "EA");
327
- o(this, "oA");
328
- o(this, "gA", null);
329
- o(this, "nA");
330
- o(this, "aA");
331
- o(this, "hA", [1, 1, 1, 1]);
332
- o(this, "lA", !0);
333
- o(this, "cA", [0, 0, 0, 1]);
334
- o(this, "DA", 1);
335
- o(this, "CA", !0);
336
- o(this, "uA", 0);
337
- o(this, "PA", []);
338
- this.P = A, this.EA = new x(this.P, R, "precision lowp float;uniform sampler2D u_texture;varying vec2 v_uv;void main(){gl_FragColor=texture2D(u_texture,v_uv);}"), this.oA = new x(this.P, R, "precision lowp float;uniform vec4 u_color;void main(){gl_FragColor=u_color;}"), this.nA = new sA(this.P), this.aA = new rA(this.P), this.P.enable(this.P.BLEND), this.P.blendEquation(this.P.FUNC_ADD), this.P.blendFunc(this.P.ONE, this.P.ONE_MINUS_SRC_ALPHA), G(this.P, [0, 0, this.P.canvas.width, this.P.canvas.height]);
339
- }
340
- IA(A) {
341
- this.gA !== A && (this.gA = A, A.K());
342
- }
343
- wA(A, t, e, s) {
344
- if (this.lA = !0, t === void 0 && e === void 0 && s === void 0) {
359
+ E(this, "p");
360
+ E(this, "gA");
361
+ E(this, "nA");
362
+ E(this, "aA", null);
363
+ E(this, "hA");
364
+ E(this, "lA");
365
+ E(this, "cA", [1, 1, 1, 1]);
366
+ E(this, "DA", !0);
367
+ E(this, "CA", [0, 0, 0, 1]);
368
+ E(this, "uA", 1);
369
+ E(this, "PA", !0);
370
+ E(this, "IA", 0);
371
+ E(this, "wA", []);
372
+ this.p = A, this.gA = new p(this.p, Y, "precision lowp float;uniform sampler2D u_texture;varying vec2 v_uv;void main(){gl_FragColor=texture2D(u_texture,v_uv);}"), this.nA = new p(this.p, Y, "precision lowp float;uniform vec4 u_color;void main(){gl_FragColor=u_color;}"), this.hA = new BA(this.p), this.lA = new oA(this.p), this.p.enable(this.p.BLEND), this.p.blendEquation(this.p.FUNC_ADD), this.p.blendFunc(this.p.ONE, this.p.ONE_MINUS_SRC_ALPHA), F(this.p, [0, 0, this.p.canvas.width, this.p.canvas.height]);
373
+ }
374
+ fA(A) {
375
+ this.aA !== A && (this.aA = A, A.W());
376
+ }
377
+ dA(A, t, e, s) {
378
+ if (this.DA = !0, t === void 0 && e === void 0 && s === void 0) {
345
379
  const r = A / 255;
346
- this.hA = [r, r, r, 1];
347
- } else if (e !== void 0 && s === void 0) this.hA = [A / 255, t / 255, e / 255, 1];
380
+ this.cA = [r, r, r, 1];
381
+ } else if (e !== void 0 && s === void 0) this.cA = [A / 255, t / 255, e / 255, 1];
348
382
  else {
349
383
  if (e === void 0 || s === void 0) throw Error("Invalid fill parameters. Use fill(gray), fill(r,g,b), or fill(r,g,b,a)");
350
- this.hA = [A / 255, t / 255, e / 255, s / 255];
384
+ this.cA = [A / 255, t / 255, e / 255, s / 255];
351
385
  }
352
386
  }
353
- fA(A, t, e, s) {
354
- if (this.CA = !0, t === void 0 && e === void 0 && s === void 0) {
387
+ mA(A, t, e, s) {
388
+ if (this.PA = !0, t === void 0 && e === void 0 && s === void 0) {
355
389
  const r = A / 255;
356
- this.cA = [r, r, r, 1];
357
- } else if (e !== void 0 && s === void 0) this.cA = [A / 255, t / 255, e / 255, 1];
390
+ this.CA = [r, r, r, 1];
391
+ } else if (e !== void 0 && s === void 0) this.CA = [A / 255, t / 255, e / 255, 1];
358
392
  else {
359
393
  if (e === void 0 || s === void 0) throw Error("Invalid stroke parameters. Use stroke(gray), stroke(r,g,b), or stroke(r,g,b,a)");
360
- this.cA = [A / 255, t / 255, e / 255, s / 255];
394
+ this.CA = [A / 255, t / 255, e / 255, s / 255];
361
395
  }
362
396
  }
363
- dA(A) {
397
+ pA(A) {
364
398
  if (A < 0) throw Error("Stroke weight must be non-negative");
365
- this.DA = A;
366
- }
367
- mA() {
368
- this.CA = !1;
369
- }
370
- pA() {
371
- this.lA = !1;
372
- }
373
- _A(A) {
374
399
  this.uA = A;
375
400
  }
401
+ _A() {
402
+ this.PA = !1;
403
+ }
376
404
  vA() {
377
- this.PA.push({ fillColor: [...this.hA], fillMode: this.lA, strokeColor: [...this.cA], strokeWeight: this.DA, strokeMode: this.CA, rotation: this.uA });
405
+ this.DA = !1;
378
406
  }
379
- bA() {
380
- const A = this.PA.pop();
381
- A ? (this.hA = A.fillColor, this.lA = A.fillMode, this.cA = A.strokeColor, this.DA = A.strokeWeight, this.CA = A.strokeMode, this.uA = A.rotation) : console.warn("pop() called without matching push()");
407
+ bA(A) {
408
+ this.IA = A;
382
409
  }
383
410
  xA() {
384
- this.gA = null, this.PA = [], this.uA = 0;
411
+ this.wA.push({ fillColor: [...this.cA], fillMode: this.DA, strokeColor: [...this.CA], strokeWeight: this.uA, strokeMode: this.PA, rotation: this.IA });
385
412
  }
386
- yA(A) {
387
- const t = A.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "").trim().match(/^#version\s+(\d+)\s+(es)?/i);
388
- return t ? parseInt(t[1], 10) >= 300 : !1;
413
+ yA() {
414
+ const A = this.wA.pop();
415
+ A ? (this.cA = A.fillColor, this.DA = A.fillMode, this.CA = A.strokeColor, this.uA = A.strokeWeight, this.PA = A.strokeMode, this.IA = A.rotation) : console.warn("pop() called without matching push()");
389
416
  }
390
- MA(A, t) {
391
- return new x(this.P, A, t);
417
+ MA() {
418
+ this.aA = null, this.wA = [], this.IA = 0;
392
419
  }
393
420
  GA(A) {
394
- const t = this.yA(A) ? `#version 300 es
395
- in vec2 a_position;in vec2 a_texCoord;out vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}` : R;
396
- return new x(this.P, t, A);
421
+ const t = A.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "").trim().match(/^#version\s+(\d+)\s+(es)?/i);
422
+ return t ? parseInt(t[1], 10) >= 300 : !1;
397
423
  }
398
424
  FA(A, t) {
399
- this.gA.setUniform(A, t);
425
+ return new p(this.p, A, t);
400
426
  }
401
- $A(A, t, e, s) {
402
- if (this.gA !== null) {
403
- const { centerX: h, centerY: a, radians: D, aspectRatio: c } = this.YA(A, t, e, s);
404
- return this.FA("u_rotation", D), this.FA("u_center", [h, a]), this.FA("u_aspectRatio", c), this.nA.BA(A, t, e, s), void (this.gA = null);
405
- }
406
- const r = this.oA;
407
- let i = 0, B = 0, Q = 0, n = 1;
408
- const g = this.YA(A, t, e, s);
409
- i = g.centerX, B = g.centerY, Q = g.radians, n = g.aspectRatio, this.lA && (this.IA(r), this.FA("u_color", this.hA), this.FA("u_rotation", Q), this.FA("u_center", [i, B]), this.FA("u_aspectRatio", n), this.nA.BA(A, t, e, s)), this.CA && this.DA > 0 && (this.IA(r), this.FA("u_color", this.cA), this.FA("u_rotation", Q), this.FA("u_center", [i, B]), this.FA("u_aspectRatio", n), this.nA.iA(A, t, e, s, this.DA)), this.gA = null;
427
+ $A(A) {
428
+ const t = this.GA(A) ? `#version 300 es
429
+ in vec2 a_position;in vec2 a_texCoord;out vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}` : Y;
430
+ return new p(this.p, t, A);
431
+ }
432
+ YA(A, t) {
433
+ this.aA.setUniform(A, t);
410
434
  }
411
435
  TA(A, t, e, s) {
412
- if (this.gA !== null) {
413
- const l = (A + e) / 2, d = (t + s) / 2, C = Math.abs(e - A) || 1, P = Math.abs(s - t) || 1, { centerX: p, centerY: m, radians: y, aspectRatio: b } = this.YA(l - C / 2, d - P / 2, C, P);
414
- this.FA("u_rotation", y), this.FA("u_center", [p, m]), this.FA("u_aspectRatio", b);
415
- const _ = this.DA > 0 ? this.DA : 1;
416
- return this.aA.QA(A, t, e, s, _), void (this.gA = null);
436
+ if (this.aA !== null) {
437
+ const { centerX: a, centerY: h, radians: u, aspectRatio: c } = this.SA(A, t, e, s);
438
+ return this.YA("u_rotation", u), this.YA("u_center", [a, h]), this.YA("u_aspectRatio", c), this.hA.QA(A, t, e, s), void (this.aA = null);
439
+ }
440
+ const r = this.nA;
441
+ let i = 0, B = 0, Q = 0, n = 1;
442
+ const g = this.SA(A, t, e, s);
443
+ i = g.centerX, B = g.centerY, Q = g.radians, n = g.aspectRatio, this.DA && (this.fA(r), this.YA("u_color", this.cA), this.YA("u_rotation", Q), this.YA("u_center", [i, B]), this.YA("u_aspectRatio", n), this.hA.QA(A, t, e, s)), this.PA && this.uA > 0 && (this.fA(r), this.YA("u_color", this.CA), this.YA("u_rotation", Q), this.YA("u_center", [i, B]), this.YA("u_aspectRatio", n), this.hA.EA(A, t, e, s, this.uA)), this.aA = null;
444
+ }
445
+ OA(A, t, e, s) {
446
+ if (this.aA !== null) {
447
+ const l = (A + e) / 2, d = (t + s) / 2, C = Math.abs(e - A) || 1, P = Math.abs(s - t) || 1, { centerX: w, centerY: m, radians: y, aspectRatio: x } = this.SA(l - C / 2, d - P / 2, C, P);
448
+ this.YA("u_rotation", y), this.YA("u_center", [w, m]), this.YA("u_aspectRatio", x);
449
+ const _ = this.uA > 0 ? this.uA : 1;
450
+ return this.lA.oA(A, t, e, s, _), void (this.aA = null);
417
451
  }
418
- if (!this.CA || this.DA <= 0) return;
419
- const r = this.oA, i = (A + e) / 2, B = (t + s) / 2, Q = Math.abs(e - A) || 1, n = Math.abs(s - t) || 1, g = this.uA !== 0;
420
- let h = 0, a = 0, D = 0, c = 1;
452
+ if (!this.PA || this.uA <= 0) return;
453
+ const r = this.nA, i = (A + e) / 2, B = (t + s) / 2, Q = Math.abs(e - A) || 1, n = Math.abs(s - t) || 1, g = this.IA !== 0;
454
+ let a = 0, h = 0, u = 0, c = 1;
421
455
  if (g) {
422
- const l = this.YA(i - Q / 2, B - n / 2, Q, n);
423
- h = l.centerX, a = l.centerY, D = l.radians, c = l.aspectRatio;
456
+ const l = this.SA(i - Q / 2, B - n / 2, Q, n);
457
+ a = l.centerX, h = l.centerY, u = l.radians, c = l.aspectRatio;
424
458
  }
425
- this.IA(r), this.FA("u_color", this.cA), g && (this.FA("u_rotation", D), this.FA("u_center", [h, a]), this.FA("u_aspectRatio", c)), this.aA.QA(A, t, e, s, this.DA);
459
+ this.fA(r), this.YA("u_color", this.CA), g && (this.YA("u_rotation", u), this.YA("u_center", [a, h]), this.YA("u_aspectRatio", c)), this.lA.oA(A, t, e, s, this.uA);
426
460
  }
427
- YA(A, t, e, s) {
428
- const r = J(this.P) || [0, 0, this.P.canvas.width, this.P.canvas.height], i = r[2], B = r[3], Q = i / B;
429
- return { centerX: (A + e / 2) / i * 2 - 1, centerY: 1 - (t + s / 2) / B * 2, radians: this.uA * Math.PI / 180, aspectRatio: Q };
461
+ SA(A, t, e, s) {
462
+ const r = J(this.p) || [0, 0, this.p.canvas.width, this.p.canvas.height], i = r[2], B = r[3], Q = i / B;
463
+ return { centerX: (A + e / 2) / i * 2 - 1, centerY: 1 - (t + s / 2) / B * 2, radians: this.IA * Math.PI / 180, aspectRatio: Q };
430
464
  }
431
- SA(A, t, e = {}) {
432
- return new K(this.P, A, t, e);
465
+ UA(A, t, e = {}) {
466
+ return new K(this.p, A, t, e);
433
467
  }
434
- OA(A, t = A, e = A, s = 255) {
435
- this.UA(A / 255, t / 255, e / 255, s / 255);
468
+ RA(A, t = A, e = A, s = 255) {
469
+ this.kA(A / 255, t / 255, e / 255, s / 255);
436
470
  }
437
- UA(A = 0, t = 0, e = 0, s = 0) {
438
- this.P.clearColor(A, t, e, s), this.P.clear(this.P.COLOR_BUFFER_BIT);
471
+ kA(A = 0, t = 0, e = 0, s = 0) {
472
+ this.p.clearColor(A, t, e, s), this.p.clear(this.p.COLOR_BUFFER_BIT);
439
473
  }
440
- kA() {
441
- this.P.viewport(0, 0, this.P.canvas.width, this.P.canvas.height), G(this.P, [0, 0, this.P.canvas.width, this.P.canvas.height]);
474
+ VA() {
475
+ this.p.viewport(0, 0, this.p.canvas.width, this.p.canvas.height), F(this.p, [0, 0, this.p.canvas.width, this.p.canvas.height]);
442
476
  }
443
477
  get context() {
444
- return this.P;
478
+ return this.p;
445
479
  }
446
- S() {
447
- this.EA.S(), this.oA.S(), this.nA.S(), this.aA.S();
480
+ O() {
481
+ this.gA.O(), this.nA.O(), this.hA.O(), this.lA.O();
448
482
  }
449
- RA(A, t, e, s, r) {
450
- const i = this.P, B = s ?? A.width, Q = r ?? A.height;
451
- this.IA(this.EA), this.FA("u_texture", A.texture);
452
- const n = this.YA(t, e, B, Q);
453
- this.FA("u_rotation", n.radians), this.FA("u_center", [n.centerX, n.centerY]), this.FA("u_aspectRatio", n.aspectRatio), this.nA.BA(t, e, B, Q), i.bindTexture(i.TEXTURE_2D, null), this.gA = null;
483
+ HA(A, t, e, s, r) {
484
+ const i = this.p, B = s ?? A.width, Q = r ?? A.height;
485
+ this.fA(this.gA), this.YA("u_texture", A);
486
+ const n = this.SA(t, e, B, Q);
487
+ this.YA("u_rotation", n.radians), this.YA("u_center", [n.centerX, n.centerY]), this.YA("u_aspectRatio", n.aspectRatio), this.hA.QA(t, e, B, Q), i.bindTexture(i.TEXTURE_2D, null), this.aA = null;
454
488
  }
455
489
  }
456
- const f = { readShort: (E, A) => (f.t.uint16[0] = E[A] << 8 | E[A + 1], f.t.int16[0]), readUshort: (E, A) => E[A] << 8 | E[A + 1], readUshorts(E, A, t) {
490
+ const f = { readShort: (o, A) => (f.t.uint16[0] = o[A] << 8 | o[A + 1], f.t.int16[0]), readUshort: (o, A) => o[A] << 8 | o[A + 1], readUshorts(o, A, t) {
457
491
  const e = [];
458
- for (let s = 0; s < t; s++) e.push(f.readUshort(E, A + 2 * s));
492
+ for (let s = 0; s < t; s++) e.push(f.readUshort(o, A + 2 * s));
459
493
  return e;
460
- }, readUint(E, A) {
494
+ }, readUint(o, A) {
461
495
  const t = f.t.uint8;
462
- return t[3] = E[A], t[2] = E[A + 1], t[1] = E[A + 2], t[0] = E[A + 3], f.t.uint32[0];
463
- }, readASCII(E, A, t) {
496
+ return t[3] = o[A], t[2] = o[A + 1], t[1] = o[A + 2], t[0] = o[A + 3], f.t.uint32[0];
497
+ }, readASCII(o, A, t) {
464
498
  let e = "";
465
- for (let s = 0; s < t; s++) e += String.fromCharCode(E[A + s]);
499
+ for (let s = 0; s < t; s++) e += String.fromCharCode(o[A + s]);
466
500
  return e;
467
501
  }, t: (() => {
468
- const E = new ArrayBuffer(8);
469
- return { uint8: new Uint8Array(E), int16: new Int16Array(E), uint16: new Uint16Array(E), uint32: new Uint32Array(E) };
470
- })() }, BA = { parseTab(E, A, t) {
502
+ const o = new ArrayBuffer(8);
503
+ return { uint8: new Uint8Array(o), int16: new Int16Array(o), uint16: new Uint16Array(o), uint32: new Uint32Array(o) };
504
+ })() }, QA = { parseTab(o, A, t) {
471
505
  const e = { tables: [], ids: {}, off: A };
472
- E = new Uint8Array(E.buffer, A, t), A = 0;
473
- const s = f, r = s.readUshort, i = r(E, A += 2);
506
+ o = new Uint8Array(o.buffer, A, t), A = 0;
507
+ const s = f, r = s.readUshort, i = r(o, A += 2);
474
508
  A += 2;
475
509
  const B = [];
476
510
  for (let Q = 0; Q < i; Q++) {
477
- const n = r(E, A), g = r(E, A += 2);
511
+ const n = r(o, A), g = r(o, A += 2);
478
512
  A += 2;
479
- const h = s.readUint(E, A);
513
+ const a = s.readUint(o, A);
480
514
  A += 4;
481
- const a = `p${n}e${g}`;
482
- let D = B.indexOf(h);
483
- if (D === -1) {
515
+ const h = `p${n}e${g}`;
516
+ let u = B.indexOf(a);
517
+ if (u === -1) {
484
518
  let c;
485
- D = e.tables.length, B.push(h);
486
- const l = r(E, h);
487
- c = l === 4 ? this.parse4(E, h) : l === 12 ? this.parse12(E, h) : { format: l }, e.tables.push(c);
519
+ u = e.tables.length, B.push(a);
520
+ const l = r(o, a);
521
+ c = l === 4 ? this.parse4(o, a) : l === 12 ? this.parse12(o, a) : { format: l }, e.tables.push(c);
488
522
  }
489
- e.ids[a] != null && console.warn("Multiple tables for one platform+encoding: " + a), e.ids[a] = D;
523
+ e.ids[h] != null && console.warn("Multiple tables for one platform+encoding: " + h), e.ids[h] = u;
490
524
  }
491
525
  return e;
492
- }, parse4(E, A) {
493
- const t = f, e = t.readUshort, s = t.readUshorts, r = A, i = e(E, A += 2);
526
+ }, parse4(o, A) {
527
+ const t = f, e = t.readUshort, s = t.readUshorts, r = A, i = e(o, A += 2);
494
528
  A += 2;
495
- const B = e(E, A += 2) >>> 1, Q = { format: 4, searchRange: e(E, A += 2), entrySelector: 0, rangeShift: 0, endCount: [], startCount: [], idDelta: [], idRangeOffset: [], glyphIdArray: [] };
496
- A += 2, Q.entrySelector = e(E, A), A += 2, Q.rangeShift = e(E, A), A += 2, Q.endCount = s(E, A, B), A += 2 * B, A += 2, Q.startCount = s(E, A, B), A += 2 * B;
497
- for (let n = 0; n < B; n++) Q.idDelta.push(t.readShort(E, A)), A += 2;
498
- return Q.idRangeOffset = s(E, A, B), A += 2 * B, Q.glyphIdArray = s(E, A, r + i - A >> 1), Q;
499
- }, parse12(E, A) {
529
+ const B = e(o, A += 2) >>> 1, Q = { format: 4, searchRange: e(o, A += 2), entrySelector: 0, rangeShift: 0, endCount: [], startCount: [], idDelta: [], idRangeOffset: [], glyphIdArray: [] };
530
+ A += 2, Q.entrySelector = e(o, A), A += 2, Q.rangeShift = e(o, A), A += 2, Q.endCount = s(o, A, B), A += 2 * B, A += 2, Q.startCount = s(o, A, B), A += 2 * B;
531
+ for (let n = 0; n < B; n++) Q.idDelta.push(t.readShort(o, A)), A += 2;
532
+ return Q.idRangeOffset = s(o, A, B), A += 2 * B, Q.glyphIdArray = s(o, A, r + i - A >> 1), Q;
533
+ }, parse12(o, A) {
500
534
  const t = f.readUint;
501
- t(E, A += 4), t(E, A += 4);
502
- const e = t(E, A += 4);
535
+ t(o, A += 4), t(o, A += 4);
536
+ const e = t(o, A += 4);
503
537
  A += 4;
504
538
  const s = new Uint32Array(3 * e);
505
- for (let r = 0; r < 3 * e; r += 3) s[r] = t(E, A + (r << 2)), s[r + 1] = t(E, A + (r << 2) + 4), s[r + 2] = t(E, A + (r << 2) + 8);
539
+ for (let r = 0; r < 3 * e; r += 3) s[r] = t(o, A + (r << 2)), s[r + 1] = t(o, A + (r << 2) + 4), s[r + 2] = t(o, A + (r << 2) + 8);
506
540
  return { format: 12, groups: s };
507
- } }, EA = { parseTab(E, A, t) {
541
+ } }, nA = { parseTab(o, A, t) {
508
542
  const e = f;
509
543
  A += 18;
510
- const s = e.readUshort(E, A);
544
+ const s = e.readUshort(o, A);
511
545
  A += 2, A += 16;
512
- const r = e.readShort(E, A);
546
+ const r = e.readShort(o, A);
513
547
  A += 2;
514
- const i = e.readShort(E, A);
548
+ const i = e.readShort(o, A);
515
549
  A += 2;
516
- const B = e.readShort(E, A);
550
+ const B = e.readShort(o, A);
517
551
  A += 2;
518
- const Q = e.readShort(E, A);
519
- return A += 2, A += 6, { unitsPerEm: s, xMin: r, yMin: i, xMax: B, yMax: Q, indexToLocFormat: e.readShort(E, A) };
520
- } }, oA = { parseTab(E, A, t) {
552
+ const Q = e.readShort(o, A);
553
+ return A += 2, A += 6, { unitsPerEm: s, xMin: r, yMin: i, xMax: B, yMax: Q, indexToLocFormat: e.readShort(o, A) };
554
+ } }, gA = { parseTab(o, A, t) {
521
555
  const e = f;
522
556
  A += 4;
523
557
  const s = ["ascender", "descender", "lineGap", "advanceWidthMax", "minLeftSideBearing", "minRightSideBearing", "xMaxExtent", "caretSlopeRise", "caretSlopeRun", "caretOffset", "res0", "res1", "res2", "res3", "metricDataFormat", "numberOfHMetrics"], r = {};
524
558
  for (let i = 0; i < s.length; i++) {
525
559
  const B = s[i], Q = B === "advanceWidthMax" || B === "numberOfHMetrics" ? e.readUshort : e.readShort;
526
- r[B] = Q(E, A + 2 * i);
560
+ r[B] = Q(o, A + 2 * i);
527
561
  }
528
562
  return r;
529
- } }, QA = { parseTab(E, A, t, e) {
563
+ } }, hA = { parseTab(o, A, t, e) {
530
564
  if (!e) throw Error("Font object required for hmtx parsing");
531
565
  const s = f, r = [], i = [], B = e.maxp.numGlyphs, Q = e.hhea.numberOfHMetrics;
532
- let n = 0, g = 0, h = 0;
533
- for (; h < Q; ) n = s.readUshort(E, A + (h << 2)), g = s.readShort(E, A + (h << 2) + 2), r.push(n), i.push(g), h++;
534
- for (; h < B; ) r.push(n), i.push(g), h++;
566
+ let n = 0, g = 0, a = 0;
567
+ for (; a < Q; ) n = s.readUshort(o, A + (a << 2)), g = s.readShort(o, A + (a << 2) + 2), r.push(n), i.push(g), a++;
568
+ for (; a < B; ) r.push(n), i.push(g), a++;
535
569
  return { aWidth: r, lsBearing: i };
536
- } }, $ = { cmap: BA, head: EA, hhea: oA, maxp: { parseTab(E, A, t) {
570
+ } }, N = { cmap: QA, head: nA, hhea: gA, maxp: { parseTab(o, A, t) {
537
571
  const e = f;
538
- return e.readUint(E, A), A += 4, { numGlyphs: e.readUshort(E, A) };
539
- } }, hmtx: QA, loca: { parseTab(E, A, t, e) {
572
+ return e.readUint(o, A), A += 4, { numGlyphs: e.readUshort(o, A) };
573
+ } }, hmtx: hA, loca: { parseTab(o, A, t, e) {
540
574
  if (!e) throw Error("Font object required for loca parsing");
541
575
  const s = f, r = [], i = e.head.indexToLocFormat, B = e.maxp.numGlyphs + 1;
542
- if (i === 0) for (let Q = 0; Q < B; Q++) r.push(s.readUshort(E, A + (Q << 1)) << 1);
543
- else if (i === 1) for (let Q = 0; Q < B; Q++) r.push(s.readUint(E, A + (Q << 2)));
576
+ if (i === 0) for (let Q = 0; Q < B; Q++) r.push(s.readUshort(o, A + (Q << 1)) << 1);
577
+ else if (i === 1) for (let Q = 0; Q < B; Q++) r.push(s.readUint(o, A + (Q << 2)));
544
578
  return r;
545
- } }, glyf: { parseTab(E, A, t, e) {
579
+ } }, glyf: { parseTab(o, A, t, e) {
546
580
  if (!e) throw Error("Font object required for glyf parsing");
547
581
  const s = [], r = e.maxp.numGlyphs;
548
582
  for (let i = 0; i < r; i++) s.push(null);
549
583
  return s;
550
- }, VA(E, A) {
551
- const t = f, e = E.HA, s = E.loca;
584
+ }, zA(o, A) {
585
+ const t = f, e = o.LA, s = o.loca;
552
586
  if (s[A] === s[A + 1]) return null;
553
- const r = w.findTable(e, "glyf", E.zA);
587
+ const r = b.findTable(e, "glyf", o.JA);
554
588
  if (!r) return null;
555
589
  let i = r[0] + s[A];
556
590
  const B = {};
557
591
  if (B.noc = t.readShort(e, i), i += 2, B.xMin = t.readShort(e, i), i += 2, B.yMin = t.readShort(e, i), i += 2, B.xMax = t.readShort(e, i), i += 2, B.yMax = t.readShort(e, i), i += 2, B.xMin >= B.xMax || B.yMin >= B.yMax) return null;
558
592
  if (B.noc > 0) {
559
593
  B.endPts = [];
560
- for (let a = 0; a < B.noc; a++) B.endPts.push(t.readUshort(e, i)), i += 2;
594
+ for (let h = 0; h < B.noc; h++) B.endPts.push(t.readUshort(e, i)), i += 2;
561
595
  const Q = t.readUshort(e, i);
562
596
  if (i += 2, e.length - i < Q) return null;
563
597
  i += Q;
564
598
  const n = B.endPts[B.noc - 1] + 1;
565
599
  B.flags = [];
566
- for (let a = 0; a < n; a++) {
567
- const D = e[i];
568
- if (i++, B.flags.push(D), 8 & D) {
600
+ for (let h = 0; h < n; h++) {
601
+ const u = e[i];
602
+ if (i++, B.flags.push(u), 8 & u) {
569
603
  const c = e[i];
570
604
  i++;
571
- for (let l = 0; l < c; l++) B.flags.push(D), a++;
605
+ for (let l = 0; l < c; l++) B.flags.push(u), h++;
572
606
  }
573
607
  }
574
608
  B.xs = [];
575
- for (let a = 0; a < n; a++) {
576
- const D = B.flags[a], c = !!(16 & D);
577
- 2 & D ? (B.xs.push(c ? e[i] : -e[i]), i++) : c ? B.xs.push(0) : (B.xs.push(t.readShort(e, i)), i += 2);
609
+ for (let h = 0; h < n; h++) {
610
+ const u = B.flags[h], c = !!(16 & u);
611
+ 2 & u ? (B.xs.push(c ? e[i] : -e[i]), i++) : c ? B.xs.push(0) : (B.xs.push(t.readShort(e, i)), i += 2);
578
612
  }
579
613
  B.ys = [];
580
- for (let a = 0; a < n; a++) {
581
- const D = B.flags[a], c = !!(32 & D);
582
- 4 & D ? (B.ys.push(c ? e[i] : -e[i]), i++) : c ? B.ys.push(0) : (B.ys.push(t.readShort(e, i)), i += 2);
614
+ for (let h = 0; h < n; h++) {
615
+ const u = B.flags[h], c = !!(32 & u);
616
+ 4 & u ? (B.ys.push(c ? e[i] : -e[i]), i++) : c ? B.ys.push(0) : (B.ys.push(t.readShort(e, i)), i += 2);
583
617
  }
584
- let g = 0, h = 0;
585
- for (let a = 0; a < n; a++) g += B.xs[a], h += B.ys[a], B.xs[a] = g, B.ys[a] = h;
618
+ let g = 0, a = 0;
619
+ for (let h = 0; h < n; h++) g += B.xs[h], a += B.ys[h], B.xs[h] = g, B.ys[h] = a;
586
620
  } else B.parts = [], B.endPts = [], B.flags = [], B.xs = [], B.ys = [];
587
621
  return B;
588
- } } }, w = { parse: (E) => [((A, t, e, s) => {
589
- const r = $, i = { HA: A, LA: t, zA: e };
622
+ } } }, b = { parse: (o) => [((A, t, e, s) => {
623
+ const r = N, i = { LA: A, jA: t, JA: e };
590
624
  for (const B in r) {
591
- const Q = B, n = w.findTable(A, Q, e);
625
+ const Q = B, n = b.findTable(A, Q, e);
592
626
  if (n) {
593
- const [g, h] = n;
594
- let a = s[g];
595
- a == null && (a = r[Q].parseTab(A, g, h, i), s[g] = a), i[Q] = a;
627
+ const [g, a] = n;
628
+ let h = s[g];
629
+ h == null && (h = r[Q].parseTab(A, g, a, i), s[g] = h), i[Q] = h;
596
630
  }
597
631
  }
598
632
  return i;
599
- })(new Uint8Array(E), 0, 0, {})], findTable(E, A, t) {
600
- const e = f, s = e.readUshort(E, t + 4);
633
+ })(new Uint8Array(o), 0, 0, {})], findTable(o, A, t) {
634
+ const e = f, s = e.readUshort(o, t + 4);
601
635
  let r = t + 12;
602
636
  for (let i = 0; i < s; i++) {
603
- const B = e.readASCII(E, r, 4);
604
- e.readUint(E, r + 4);
605
- const Q = e.readUint(E, r + 8), n = e.readUint(E, r + 12);
637
+ const B = e.readASCII(o, r, 4);
638
+ e.readUint(o, r + 4);
639
+ const Q = e.readUint(o, r + 8), n = e.readUint(o, r + 12);
606
640
  if (B === A) return [Q, n];
607
641
  r += 16;
608
642
  }
609
643
  return null;
610
- }, T: $, B: f };
611
- class U {
644
+ }, T: N, B: f };
645
+ class G {
612
646
  constructor() {
613
- o(this, "JA", /* @__PURE__ */ new Map());
614
- o(this, "KA", /* @__PURE__ */ new Map());
647
+ E(this, "KA", /* @__PURE__ */ new Map());
648
+ E(this, "WA", /* @__PURE__ */ new Map());
615
649
  }
616
- WA(A, t) {
617
- const e = `${this.jA(A)}_${t}`;
618
- if (this.JA.has(e)) return this.JA.get(e);
650
+ NA(A, t) {
651
+ const e = `${this.ZA(A)}_${t}`;
652
+ if (this.KA.has(e)) return this.KA.get(e);
619
653
  const s = A.cmap;
620
- if (!s || !s.tables) return this.JA.set(e, 0), 0;
654
+ if (!s || !s.tables) return this.KA.set(e, 0), 0;
621
655
  let r = 0;
622
- for (const i of s.tables) if (i.format === 4 ? r = this.NA(t, i) : i.format === 12 && (r = this.ZA(t, i)), r > 0) break;
623
- return this.JA.set(e, r), r;
656
+ for (const i of s.tables) if (i.format === 4 ? r = this.XA(t, i) : i.format === 12 && (r = this.qA(t, i)), r > 0) break;
657
+ return this.KA.set(e, r), r;
624
658
  }
625
- XA(A, t) {
659
+ At(A, t) {
626
660
  const e = t.codePointAt(0);
627
- return e === void 0 ? 0 : this.WA(A, e);
661
+ return e === void 0 ? 0 : this.NA(A, e);
628
662
  }
629
- qA(A, t) {
663
+ tt(A, t) {
630
664
  const e = A.hmtx;
631
665
  return e && e.aWidth && e.aWidth.length !== 0 ? t < e.aWidth.length ? e.aWidth[t] : e.aWidth[e.aWidth.length - 1] : 0;
632
666
  }
633
- At(A, t) {
667
+ et(A, t) {
634
668
  const e = t / A.head.unitsPerEm, s = A.hhea.ascender * e, r = A.hhea.descender * e, i = A.hhea.lineGap * e;
635
669
  return { ascender: s, descender: r, lineGap: i, lineHeight: s - r + i, unitsPerEm: A.head.unitsPerEm, scale: e };
636
670
  }
637
- tt() {
638
- this.JA.clear(), this.KA.clear();
671
+ st() {
672
+ this.KA.clear(), this.WA.clear();
639
673
  }
640
- jA(A) {
641
- return `${A.zA}_${A.HA.length}`;
674
+ ZA(A) {
675
+ return `${A.JA}_${A.LA.length}`;
642
676
  }
643
- NA(A, t) {
677
+ XA(A, t) {
644
678
  const e = t.endCount.length;
645
679
  let s = -1;
646
680
  for (let r = 0; r < e; r++) if (A <= t.endCount[r]) {
@@ -658,7 +692,7 @@ class U {
658
692
  }
659
693
  return 0;
660
694
  }
661
- ZA(A, t) {
695
+ qA(A, t) {
662
696
  const e = t.groups.length / 3;
663
697
  for (let s = 0; s < e; s++) {
664
698
  const r = t.groups[3 * s], i = t.groups[3 * s + 1], B = t.groups[3 * s + 2];
@@ -667,45 +701,45 @@ class U {
667
701
  return 0;
668
702
  }
669
703
  }
670
- class nA {
704
+ class aA {
671
705
  constructor(A) {
672
- o(this, "et");
673
- this.et = A;
706
+ E(this, "rt");
707
+ this.rt = A;
674
708
  }
675
- st(A) {
709
+ Bt(A) {
676
710
  var e;
677
711
  const t = [];
678
712
  return (e = A == null ? void 0 : A.cmap) != null && e.tables ? (A.cmap.tables.forEach((s) => {
679
713
  if (s.format === 4) {
680
- const r = this.rt(s);
714
+ const r = this.it(s);
681
715
  t.push(...r);
682
716
  } else if (s.format === 12) {
683
- const r = this.Bt(s);
717
+ const r = this.Qt(s);
684
718
  t.push(...r);
685
719
  }
686
720
  }), [...new Set(t)]) : [];
687
721
  }
688
- it(A, t) {
689
- return this.et.XA(A, t) > 0;
722
+ Et(A, t) {
723
+ return this.rt.At(A, t) > 0;
690
724
  }
691
- Qt(A, t) {
692
- for (const e of t) if (!this.it(A, e)) return !1;
725
+ ot(A, t) {
726
+ for (const e of t) if (!this.Et(A, e)) return !1;
693
727
  return !0;
694
728
  }
695
- Et(A, t) {
696
- return t.filter((e) => this.it(A, e));
729
+ gt(A, t) {
730
+ return t.filter((e) => this.Et(A, e));
697
731
  }
698
- ot(A) {
699
- return A.filter((t) => this.gt(t));
732
+ nt(A) {
733
+ return A.filter((t) => this.ht(t));
700
734
  }
701
- rt(A) {
735
+ it(A) {
702
736
  const t = [];
703
737
  if (!(A.startCount && A.endCount && A.idRangeOffset && A.idDelta)) return t;
704
738
  for (let e = 0; e < A.startCount.length; e++) {
705
739
  const s = A.startCount[e], r = A.endCount[e];
706
740
  if (s !== 65535 || r !== 65535) {
707
741
  for (let i = s; i <= r; i++)
708
- if (this.nt(A, i, e) > 0) try {
742
+ if (this.lt(A, i, e) > 0) try {
709
743
  const B = String.fromCodePoint(i);
710
744
  t.push(B);
711
745
  } catch {
@@ -714,7 +748,7 @@ class nA {
714
748
  }
715
749
  return t;
716
750
  }
717
- Bt(A) {
751
+ Qt(A) {
718
752
  const t = [];
719
753
  if (!A.groups) return t;
720
754
  for (let e = 0; e < A.groups.length; e += 3) {
@@ -728,7 +762,7 @@ class nA {
728
762
  }
729
763
  return t;
730
764
  }
731
- nt(A, t, e) {
765
+ lt(A, t, e) {
732
766
  if (A.idRangeOffset[e] === 0) return t + A.idDelta[e] & 65535;
733
767
  {
734
768
  const s = A.idRangeOffset[e] / 2 + (t - A.startCount[e]) - (A.startCount.length - e);
@@ -739,179 +773,179 @@ class nA {
739
773
  }
740
774
  return 0;
741
775
  }
742
- gt(A) {
776
+ ht(A) {
743
777
  const t = A.codePointAt(0) || 0;
744
778
  return !(t >= 0 && t <= 31 && t !== 9 && t !== 10 && t !== 13 || t >= 127 && t <= 159);
745
779
  }
746
780
  }
747
- class gA {
781
+ class lA {
748
782
  constructor() {
749
- o(this, "ht");
750
- const A = new U();
751
- this.ht = new nA(A);
783
+ E(this, "ct");
784
+ const A = new G();
785
+ this.ct = new aA(A);
752
786
  }
753
787
  extractCharacters(A) {
754
- return this.ht.st(A);
788
+ return this.ct.Bt(A);
755
789
  }
756
790
  filterProblematicCharacters(A) {
757
- return this.ht.ot(A);
791
+ return this.ct.nt(A);
758
792
  }
759
793
  characterExists(A, t) {
760
- return this.ht.it(A, t);
794
+ return this.ct.Et(A, t);
761
795
  }
762
796
  allCharactersExist(A, t) {
763
- return this.ht.Qt(A, t);
797
+ return this.ct.ot(A, t);
764
798
  }
765
799
  }
766
- class aA {
800
+ class cA {
767
801
  constructor(A) {
768
- o(this, "lt");
769
- o(this, "ct");
770
- o(this, "Dt");
771
- o(this, "Ct");
772
- this.Dt = A, this.Ct = new U(), this.lt = document.createElement("canvas"), this.ct = this.lt.getContext("2d", { willReadFrequently: !0, alpha: !1 });
802
+ E(this, "Dt");
803
+ E(this, "Ct");
804
+ E(this, "ut");
805
+ E(this, "Pt");
806
+ this.ut = A, this.Pt = new G(), this.Dt = document.createElement("canvas"), this.Ct = this.Dt.getContext("2d", { willReadFrequently: !0, alpha: !1 });
773
807
  }
774
808
  createTextureAtlas(A, t, e, s) {
775
809
  const r = A.length, i = Math.ceil(Math.sqrt(r)), B = Math.ceil(r / i), Q = t.width * i, n = t.height * B, g = typeof s == "object" ? s : null;
776
- this.ut(Q, n), this.Pt(A, t, i, e, g);
777
- const h = this.Dt.SA(Q, n, { filter: "nearest" });
778
- return h.update(this.lt), { framebuffer: h, columns: i, rows: B };
810
+ this.It(Q, n), this.wt(A, t, i, e, g);
811
+ const a = this.ut.UA(Q, n, { filter: "nearest" });
812
+ return a.S(this.Dt), { framebuffer: a, columns: i, rows: B };
779
813
  }
780
- ut(A, t) {
781
- this.lt.width = A, this.lt.height = t, this.lt.style.width = A + "px", this.lt.style.height = A + "px", this.ct.imageSmoothingEnabled = !1, this.lt.style.imageRendering = "pixelated", this.ct.fillStyle = "black", this.ct.fillRect(0, 0, A, t), this.ct.textBaseline = "top", this.ct.textAlign = "left", this.ct.fillStyle = "white";
814
+ It(A, t) {
815
+ this.Dt.width = A, this.Dt.height = t, this.Dt.style.width = A + "px", this.Dt.style.height = A + "px", this.Ct.imageSmoothingEnabled = !1, this.Dt.style.imageRendering = "pixelated", this.Ct.fillStyle = "black", this.Ct.fillRect(0, 0, A, t), this.Ct.textBaseline = "top", this.Ct.textAlign = "left", this.Ct.fillStyle = "white";
782
816
  }
783
- Pt(A, t, e, s, r) {
817
+ wt(A, t, e, s, r) {
784
818
  const i = s / r.head.unitsPerEm;
785
819
  for (let B = 0; B < A.length; B++) {
786
- const Q = B % e, n = Math.floor(B / e), g = A[B].character, h = this.It(r, g);
787
- if (!h) continue;
788
- const a = g.codePointAt(0) || 0, D = this.Ct.WA(r, a), c = this.wt(r, D) * i, l = Q * t.width, d = n * t.height, C = l + 0.5 * t.width, P = d + 0.5 * t.height, p = Math.round(C - 0.5 * t.width), m = Math.round(P - 0.5 * s), y = p + 0.5 * (t.width - c), b = m + r.hhea.ascender * i;
789
- this.ft(h, y, b, i);
820
+ const Q = B % e, n = Math.floor(B / e), g = A[B].character, a = this.ft(r, g);
821
+ if (!a) continue;
822
+ const h = g.codePointAt(0) || 0, u = this.Pt.NA(r, h), c = this.dt(r, u) * i, l = Q * t.width, d = n * t.height, C = l + 0.5 * t.width, P = d + 0.5 * t.height, w = Math.round(C - 0.5 * t.width), m = Math.round(P - 0.5 * s), y = w + 0.5 * (t.width - c), x = m + r.hhea.ascender * i;
823
+ this._t(a, y, x, i);
790
824
  }
791
825
  }
792
- It(A, t) {
793
- const e = t.codePointAt(0) || 0, s = this.Ct.WA(A, e);
826
+ ft(A, t) {
827
+ const e = t.codePointAt(0) || 0, s = this.Pt.NA(A, e);
794
828
  if (s === 0) return null;
795
829
  if (A.glyf && A.glyf[s] !== null) return A.glyf[s];
796
- if (w && w.T && w.T.glyf && w.T.glyf.VA) {
797
- const r = w.T.glyf.VA(A, s);
830
+ if (b && b.T && b.T.glyf) {
831
+ const r = b.T.glyf.zA(A, s);
798
832
  return A.glyf && r && (A.glyf[s] = r), r;
799
833
  }
800
834
  return null;
801
835
  }
802
- wt(A, t) {
836
+ dt(A, t) {
803
837
  const e = A.hmtx;
804
838
  return e && e.aWidth ? t < e.aWidth.length ? e.aWidth[t] : e.aWidth[e.aWidth.length - 1] : 0;
805
839
  }
806
- ft(A, t, e, s) {
840
+ _t(A, t, e, s) {
807
841
  if (!A || !A.xs || A.noc === 0) return;
808
842
  const { xs: r, ys: i, endPts: B, flags: Q } = A;
809
843
  if (!(r && i && B && Q)) return;
810
- this.ct.beginPath();
844
+ this.Ct.beginPath();
811
845
  let n = 0;
812
846
  for (let g = 0; g < B.length; g++) {
813
- const h = B[g];
814
- if (!(h < n)) {
815
- if (h >= n) {
816
- const a = t + r[n] * s, D = e - i[n] * s;
817
- this.ct.moveTo(a, D);
847
+ const a = B[g];
848
+ if (!(a < n)) {
849
+ if (a >= n) {
850
+ const h = t + r[n] * s, u = e - i[n] * s;
851
+ this.Ct.moveTo(h, u);
818
852
  let c = n + 1;
819
- for (; c <= h; )
853
+ for (; c <= a; )
820
854
  if (1 & Q[c]) {
821
855
  const l = t + r[c] * s, d = e - i[c] * s;
822
- this.ct.lineTo(l, d), c++;
856
+ this.Ct.lineTo(l, d), c++;
823
857
  } else {
824
858
  const l = t + r[c] * s, d = e - i[c] * s;
825
- let C = c + 1 > h ? n : c + 1;
859
+ let C = c + 1 > a ? n : c + 1;
826
860
  if (1 & Q[C]) {
827
- const P = t + r[C] * s, p = e - i[C] * s;
828
- this.ct.quadraticCurveTo(l, d, P, p), c = C + 1;
861
+ const P = t + r[C] * s, w = e - i[C] * s;
862
+ this.Ct.quadraticCurveTo(l, d, P, w), c = C + 1;
829
863
  } else {
830
- const P = (l + (t + r[C] * s)) / 2, p = (d + (e - i[C] * s)) / 2;
831
- this.ct.quadraticCurveTo(l, d, P, p), c = C;
864
+ const P = (l + (t + r[C] * s)) / 2, w = (d + (e - i[C] * s)) / 2;
865
+ this.Ct.quadraticCurveTo(l, d, P, w), c = C;
832
866
  }
833
867
  }
834
- this.ct.closePath();
868
+ this.Ct.closePath();
835
869
  }
836
- n = h + 1;
870
+ n = a + 1;
837
871
  }
838
872
  }
839
- this.ct.fill();
873
+ this.Ct.fill();
840
874
  }
841
875
  }
842
- class hA {
876
+ class uA {
843
877
  constructor() {
844
- o(this, "et");
845
- this.et = new U();
878
+ E(this, "rt");
879
+ this.rt = new G();
846
880
  }
847
881
  calculateMaxGlyphDimensions(A, t, e) {
848
882
  let s = 0;
849
- const r = this.et.At(e, t), i = r.lineHeight;
883
+ const r = this.rt.et(e, t), i = r.lineHeight;
850
884
  for (const B of A) {
851
- const Q = this.et.XA(e, B);
885
+ const Q = this.rt.At(e, B);
852
886
  if (Q === 0) continue;
853
- const n = this.et.qA(e, Q) * r.scale;
887
+ const n = this.rt.tt(e, Q) * r.scale;
854
888
  s = Math.max(s, n);
855
889
  }
856
890
  return { width: Math.ceil(s), height: Math.ceil(i) };
857
891
  }
858
892
  getCharacterAdvanceWidth(A, t, e) {
859
- const s = this.et.At(e, t), r = this.et.XA(e, A);
860
- return this.et.qA(e, r) * s.scale;
893
+ const s = this.rt.et(e, t), r = this.rt.At(e, A);
894
+ return this.rt.tt(e, r) * s.scale;
861
895
  }
862
896
  getFontMetrics(A, t) {
863
- return this.et.At(t, A);
897
+ return this.rt.et(t, A);
864
898
  }
865
- tt() {
866
- this.et.tt();
899
+ st() {
900
+ this.rt.st();
867
901
  }
868
902
  }
869
- class lA {
903
+ class CA {
870
904
  constructor() {
871
- o(this, "Ct");
872
- this.Ct = new U();
905
+ E(this, "Pt");
906
+ this.Pt = new G();
873
907
  }
874
908
  createCharacterObjects(A, t) {
875
909
  return A.map((e, s) => {
876
- const r = e.codePointAt(0) || 0, i = this.dt(s);
910
+ const r = e.codePointAt(0) || 0, i = this.vt(s);
877
911
  let B = 0;
878
912
  if (t.hmtx && t.hmtx.aWidth) {
879
- const Q = this.Ct.WA(t, r);
913
+ const Q = this.Pt.NA(t, r);
880
914
  Q > 0 && t.hmtx.aWidth[Q] !== void 0 && (B = t.hmtx.aWidth[Q]);
881
915
  }
882
916
  return { character: e, unicode: r, color: i, advanceWidth: B };
883
917
  });
884
918
  }
885
- dt(A) {
919
+ vt(A) {
886
920
  return [A % 256, Math.floor(A / 256) % 256, Math.floor(A / 65536) % 256];
887
921
  }
888
922
  getCharacterColor(A, t) {
889
- if (!u.C(typeof A == "string", "Character must be a string.", { method: "getCharacterColor", providedValue: A })) return [0, 0, 0];
923
+ if (!D.C(typeof A == "string", "Character must be a string.", { method: "getCharacterColor", providedValue: A })) return [0, 0, 0];
890
924
  const e = t.find((s) => s.character === A);
891
925
  return e ? e.color : [0, 0, 0];
892
926
  }
893
927
  getCharacterColors(A, t) {
894
- return u.C(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.getCharacterColor(e, t) || [0, 0, 0]) : [[0, 0, 0]];
928
+ return D.C(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.getCharacterColor(e, t) || [0, 0, 0]) : [[0, 0, 0]];
895
929
  }
896
930
  }
897
- class cA {
931
+ class DA {
898
932
  constructor(A, t = 16) {
899
- o(this, "_t");
900
- o(this, "vt", []);
901
- o(this, "bt");
902
- o(this, "xt", 16);
903
- o(this, "yt", 0);
904
- o(this, "Mt", 0);
905
- o(this, "Gt", { width: 0, height: 0 });
906
- o(this, "Ft");
907
- o(this, "$t", "UrsaFont");
908
- o(this, "Yt");
909
- o(this, "Tt");
910
- o(this, "St");
911
- o(this, "Ot");
912
- this.xt = t, this.Yt = new gA(), this.Tt = new aA(A), this.St = new hA(), this.Ot = new lA();
913
- }
914
- async Ut(A) {
933
+ E(this, "bt");
934
+ E(this, "xt", []);
935
+ E(this, "yt");
936
+ E(this, "Mt", 16);
937
+ E(this, "Gt", 0);
938
+ E(this, "Ft", 0);
939
+ E(this, "$t", { width: 0, height: 0 });
940
+ E(this, "Yt");
941
+ E(this, "Tt", "UrsaFont");
942
+ E(this, "St");
943
+ E(this, "Ot");
944
+ E(this, "Ut");
945
+ E(this, "Rt");
946
+ this.Mt = t, this.St = new lA(), this.Ot = new cA(A), this.Ut = new uA(), this.Rt = new CA();
947
+ }
948
+ async kt(A) {
915
949
  let t;
916
950
  if (A) {
917
951
  const e = await fetch(A);
@@ -920,235 +954,235 @@ class cA {
920
954
  } else
921
955
  t = await (await fetch(`data:font/truetype;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMs+QEyQAAAEoAAAAYGNtYXAg7yVJAAAFjAAACSBnbHlmuHLTdAAAErQAAGi0aGVhZFvXdUwAAACsAAAANmhoZWELAQUCAAAA5AAAACRobXR4BACDgAAAAYgAAAQEbG9jYQAy54AAAA6sAAAECG1heHABIgCCAAABCAAAACBuYW1lVs/OSgAAe2gAAAOicG9zdABpADQAAH8MAAAAIAABAAAAAQAAzOWHqV8PPPUAAAQAAAAAAHxiGCcAAAAAfGIYJwAAAAAEAAQAAAAACAACAAEAAAAAAAEAAAQAAAAAAAQAAAAAAAcAAAEAAAAAAAAAAAAAAAAAAAEBAAEAAAEBAIAAIAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAgQAAZAABQAEAgACAAAAAAACAAIAAAACAAAzAMwAAAAABAAAAAAAAACAAACLAABw4wAAAAAAAAAAWUFMLgBAACAmawQAAAAAAAQAAAAAAAFRAAAAAAMABAAAAAAgAAAEAAAABAAAAAQAAAAEAAGABAABAAQAAIAEAACABAAAgAQAAIAEAAGABAABAAQAAQAEAACABAABAAQAAIAEAACABAABAAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAAGABAAAgAQAAIAEAAGABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABgAQAAQAEAACABAAAAAQAAgAEAACABAAAgAQAAIAEAACABAACAAQAAAAEAAIABAABgAQAAgAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAAABAAAAAQAAAAEAAIABAADAAQAAAAEAAAABAAAgAQAAYAEAAAABAAAAAQAAIAEAAAABAAAgAQAAIAEAACABAAAAAQAAIAEAAAABAAAAAQAAIAEAAGABAAAAAQAAAAEAAAABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAEABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAACAAQAAIAEAAAABAAAAAQAAAAEAACABAABAAQAAQAEAAEABAABAAQAAIAEAACABAAAAAQAAAAEAAAABAABAAQAAAAEAACABAAAAAQAAAAEAAIABAAAgAQAAAAEAAAABAAAAAQAAAAEAAAABAABgAQAAAAEAAAABAABgAQAAAAEAAGABAABgAQAAYAEAAAABAAAAAQAAAAEAAAABAABgAQAAYAEAAAABAAAAAQAAAAEAAAABAABgAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAABgAQAAAAEAAGABAABgAQAAAAEAAAABAABgAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAYAEAAAABAAAAAQAAQAEAACABAAAAAQAAAAEAAAABAAAgAQAAIAEAACABAAAgAQAAIAEAAAABAABAAQAAIAEAACABAAAgAQAAIAEA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\r
922
956
  `)).arrayBuffer();
923
- await this.kt(t), this._t = w.parse(t)[0], await this.Rt();
957
+ await this.Vt(t), this.bt = b.parse(t)[0], await this.Ht();
924
958
  }
925
- Vt(A) {
926
- if (A === void 0) return this.xt;
927
- this.xt = A, this.Gt = this.St.calculateMaxGlyphDimensions(this.vt.map((e) => e.character), this.xt, this._t);
928
- const t = this.Tt.createTextureAtlas(this.vt, this.Gt, this.xt, this._t);
929
- this.bt = t.framebuffer, this.yt = t.columns, this.Mt = t.rows;
959
+ zt(A) {
960
+ if (A === void 0) return this.Mt;
961
+ this.Mt = A, this.$t = this.Ut.calculateMaxGlyphDimensions(this.xt.map((e) => e.character), this.Mt, this.bt);
962
+ const t = this.Ot.createTextureAtlas(this.xt, this.$t, this.Mt, this.bt);
963
+ this.yt = t.framebuffer, this.Gt = t.columns, this.Ft = t.rows;
930
964
  }
931
- async Ht(A) {
965
+ async Lt(A) {
932
966
  try {
933
967
  const t = await fetch(A);
934
968
  if (!t.ok) throw new I(`Failed to load font file: ${t.status} ${t.statusText}`);
935
969
  const e = await t.arrayBuffer();
936
- await this.kt(e);
937
- const s = w.parse(e);
970
+ await this.Vt(e);
971
+ const s = b.parse(e);
938
972
  if (!s || s.length === 0) throw Error("Failed to parse font file");
939
- this._t = s[0], await this.Rt();
973
+ this.bt = s[0], await this.Ht();
940
974
  } catch (t) {
941
975
  throw new I("Failed to load font: " + (t instanceof Error ? t.message : "Unknown error"), t);
942
976
  }
943
977
  }
944
- async kt(A) {
978
+ async Vt(A) {
945
979
  const t = Date.now();
946
- this.$t = this.$t === "UrsaFont" ? "UrsaFont" : "CustomFont_" + t, this.Ft = new FontFace(this.$t, A), await this.Ft.load(), document.fonts.add(this.Ft);
980
+ this.Tt = this.Tt === "UrsaFont" ? "UrsaFont" : "CustomFont_" + t, this.Yt = new FontFace(this.Tt, A), await this.Yt.load(), document.fonts.add(this.Yt);
947
981
  }
948
- async Rt() {
949
- const A = this.Yt.extractCharacters(this._t), t = this.Yt.filterProblematicCharacters(A);
950
- this.vt = this.Ot.createCharacterObjects(t, this._t), this.Gt = this.St.calculateMaxGlyphDimensions(t, this.xt, this._t);
951
- const e = this.Tt.createTextureAtlas(this.vt, this.Gt, this.xt, this._t);
952
- this.bt = e.framebuffer, this.yt = e.columns, this.Mt = e.rows;
982
+ async Ht() {
983
+ const A = this.St.extractCharacters(this.bt), t = this.St.filterProblematicCharacters(A);
984
+ this.xt = this.Rt.createCharacterObjects(t, this.bt), this.$t = this.Ut.calculateMaxGlyphDimensions(t, this.Mt, this.bt);
985
+ const e = this.Ot.createTextureAtlas(this.xt, this.$t, this.Mt, this.bt);
986
+ this.yt = e.framebuffer, this.Gt = e.columns, this.Ft = e.rows;
953
987
  }
954
988
  getCharacterColor(A) {
955
- return this.Ot.getCharacterColor(A, this.vt);
989
+ return this.Rt.getCharacterColor(A, this.xt);
956
990
  }
957
991
  getCharacterColors(A) {
958
- return this.Ot.getCharacterColors(A, this.vt);
992
+ return this.Rt.getCharacterColors(A, this.xt);
959
993
  }
960
994
  hasAllCharacters(A) {
961
995
  if (typeof A != "string" || A.length === 0) return !1;
962
- const t = new Set(this.vt.map((e) => e.character));
996
+ const t = new Set(this.xt.map((e) => e.character));
963
997
  for (const e of A) if (!t.has(e)) return !1;
964
998
  return !0;
965
999
  }
966
- S() {
967
- this.bt.S(), document.fonts.delete(this.Ft);
1000
+ O() {
1001
+ this.yt.O(), document.fonts.delete(this.Yt);
968
1002
  }
969
1003
  get fontFramebuffer() {
970
- return this.bt;
1004
+ return this.yt;
971
1005
  }
972
1006
  get characters() {
973
- return this.vt;
1007
+ return this.xt;
974
1008
  }
975
1009
  get textureColumns() {
976
- return this.yt;
1010
+ return this.Gt;
977
1011
  }
978
1012
  get textureRows() {
979
- return this.Mt;
1013
+ return this.Ft;
980
1014
  }
981
1015
  get maxGlyphDimensions() {
982
- return this.Gt;
1016
+ return this.$t;
983
1017
  }
984
1018
  get fontSize() {
985
- return this.xt;
1019
+ return this.Mt;
986
1020
  }
987
1021
  get font() {
988
- return this._t;
1022
+ return this.bt;
989
1023
  }
990
1024
  }
991
- class DA {
1025
+ class PA {
992
1026
  constructor(A, t, e) {
993
- o(this, "zt");
994
- o(this, "Lt");
995
- o(this, "p");
996
- o(this, "_");
997
- o(this, "Jt");
998
- o(this, "Kt");
999
- o(this, "Wt", !1);
1000
- o(this, "jt");
1001
- o(this, "Nt");
1002
- o(this, "Zt");
1003
- this.jt = A, this.Nt = t, this.Zt = e, this.xA();
1004
- }
1005
- xA() {
1006
- this.Wt || (this.zt = Math.floor(this.jt.width / this.Nt), this.Lt = Math.floor(this.jt.height / this.Zt)), this.Xt();
1007
- }
1008
- Xt() {
1009
- this.p = this.zt * this.Nt, this._ = this.Lt * this.Zt, this.Jt = Math.floor((this.jt.width - this.p) / 2), this.Kt = Math.floor((this.jt.height - this._) / 2);
1010
- }
1011
- qt(A, t) {
1012
- this.Nt = A, this.Zt = t, this.xA();
1027
+ E(this, "Jt");
1028
+ E(this, "jt");
1029
+ E(this, "P");
1030
+ E(this, "I");
1031
+ E(this, "Kt");
1032
+ E(this, "Wt");
1033
+ E(this, "Nt", !1);
1034
+ E(this, "Zt");
1035
+ E(this, "Xt");
1036
+ E(this, "qt");
1037
+ this.Zt = A, this.Xt = t, this.qt = e, this.MA();
1038
+ }
1039
+ MA() {
1040
+ this.Nt || (this.Jt = Math.floor(this.Zt.width / this.Xt), this.jt = Math.floor(this.Zt.height / this.qt)), this.Ae();
1041
+ }
1042
+ Ae() {
1043
+ this.P = this.Jt * this.Xt, this.I = this.jt * this.qt, this.Kt = Math.floor((this.Zt.width - this.P) / 2), this.Wt = Math.floor((this.Zt.height - this.I) / 2);
1044
+ }
1045
+ te(A, t) {
1046
+ this.Xt = A, this.qt = t, this.MA();
1013
1047
  }
1014
- Ae(A, t) {
1015
- this.Wt = !0, this.zt = A, this.Lt = t, this.Xt();
1048
+ ee(A, t) {
1049
+ this.Nt = !0, this.Jt = A, this.jt = t, this.Ae();
1016
1050
  }
1017
- te() {
1018
- this.Wt = !1, this.xA();
1051
+ se() {
1052
+ this.Nt = !1, this.MA();
1019
1053
  }
1020
- ee() {
1021
- this.Wt ? this.Xt() : this.xA();
1054
+ re() {
1055
+ this.Nt ? this.Ae() : this.MA();
1022
1056
  }
1023
- se(A) {
1024
- if (A === void 0) return this.Wt;
1025
- this.Wt = A;
1057
+ Be(A) {
1058
+ if (A === void 0) return this.Nt;
1059
+ this.Nt = A;
1026
1060
  }
1027
1061
  get cellWidth() {
1028
- return this.Nt;
1062
+ return this.Xt;
1029
1063
  }
1030
1064
  get cellHeight() {
1031
- return this.Zt;
1065
+ return this.qt;
1032
1066
  }
1033
1067
  get cols() {
1034
- return this.zt;
1068
+ return this.Jt;
1035
1069
  }
1036
1070
  get rows() {
1037
- return this.Lt;
1071
+ return this.jt;
1038
1072
  }
1039
1073
  get width() {
1040
- return this.p;
1074
+ return this.P;
1041
1075
  }
1042
1076
  get height() {
1043
- return this._;
1077
+ return this.I;
1044
1078
  }
1045
1079
  get offsetX() {
1046
- return this.Jt;
1080
+ return this.Kt;
1047
1081
  }
1048
1082
  get offsetY() {
1049
- return this.Kt;
1083
+ return this.Wt;
1050
1084
  }
1051
1085
  }
1052
- class CA {
1086
+ class dA {
1053
1087
  constructor(A, t = !1, e = {}) {
1054
- o(this, "jt");
1055
- o(this, "re");
1056
- o(this, "Be");
1057
- o(this, "ie");
1058
- o(this, "onTransformChange");
1059
- this.re = A, this.Be = t, this.jt = this.Qe(e.width, e.height), t && this.setupTransformObserver();
1060
- }
1061
- Qe(A, t) {
1088
+ E(this, "Zt");
1089
+ E(this, "ie");
1090
+ E(this, "Qe");
1091
+ E(this, "Ee");
1092
+ E(this, "onTransformChange");
1093
+ this.ie = A, this.Qe = t, this.Zt = this.oe(e.width, e.height), t && this.setupTransformObserver();
1094
+ }
1095
+ oe(A, t) {
1062
1096
  var s;
1063
1097
  const e = document.createElement("canvas");
1064
- if (e.className = "textmodeCanvas", e.style.imageRendering = "pixelated", this.Be) e.width = A || 800, e.height = t || 600, document.body.appendChild(e);
1098
+ if (e.className = "textmodeCanvas", e.style.imageRendering = "pixelated", this.Qe) e.width = A || 800, e.height = t || 600, document.body.appendChild(e);
1065
1099
  else {
1066
- const r = this.re.getBoundingClientRect();
1100
+ const r = this.ie.getBoundingClientRect();
1067
1101
  let i = Math.round(r.width), B = Math.round(r.height);
1068
- if (this.re instanceof HTMLVideoElement) {
1069
- const g = this.re;
1102
+ if (this.ie instanceof HTMLVideoElement) {
1103
+ const g = this.ie;
1070
1104
  (i === 0 || B === 0) && g.videoWidth > 0 && g.videoHeight > 0 && (i = g.videoWidth, B = g.videoHeight);
1071
1105
  }
1072
1106
  e.width = i, e.height = B, e.style.position = "absolute", e.style.pointerEvents = "none";
1073
- const Q = window.getComputedStyle(this.re);
1107
+ const Q = window.getComputedStyle(this.ie);
1074
1108
  let n = parseInt(Q.zIndex || "0", 10);
1075
- isNaN(n) && (n = 0), e.style.zIndex = "" + (n + 1), this.Ee(e), (s = this.re.parentNode) == null || s.insertBefore(e, this.re.nextSibling);
1109
+ isNaN(n) && (n = 0), e.style.zIndex = "" + (n + 1), this.ge(e), (s = this.ie.parentNode) == null || s.insertBefore(e, this.ie.nextSibling);
1076
1110
  }
1077
1111
  return e;
1078
1112
  }
1079
- Ee(A) {
1080
- const t = this.re.getBoundingClientRect();
1081
- let e = this.re.offsetParent;
1113
+ ge(A) {
1114
+ const t = this.ie.getBoundingClientRect();
1115
+ let e = this.ie.offsetParent;
1082
1116
  if (e && e !== document.body) {
1083
1117
  const s = e.getBoundingClientRect();
1084
1118
  A.style.top = t.top - s.top + "px", A.style.left = t.left - s.left + "px";
1085
1119
  } else A.style.top = t.top + window.scrollY + "px", A.style.left = t.left + window.scrollX + "px";
1086
1120
  }
1087
- ee(A, t) {
1088
- if (this.Be) this.jt.width = A ?? this.jt.width, this.jt.height = t ?? this.jt.height;
1121
+ re(A, t) {
1122
+ if (this.Qe) this.Zt.width = A ?? this.Zt.width, this.Zt.height = t ?? this.Zt.height;
1089
1123
  else {
1090
- const e = this.re.getBoundingClientRect();
1124
+ const e = this.ie.getBoundingClientRect();
1091
1125
  let s = Math.round(e.width), r = Math.round(e.height);
1092
- if (this.re instanceof HTMLVideoElement) {
1093
- const i = this.re;
1126
+ if (this.ie instanceof HTMLVideoElement) {
1127
+ const i = this.ie;
1094
1128
  (s === 0 || r === 0) && i.videoWidth > 0 && i.videoHeight > 0 && (s = i.videoWidth, r = i.videoHeight);
1095
1129
  }
1096
- this.jt.width = s, this.jt.height = r, this.Ee(this.jt);
1130
+ this.Zt.width = s, this.Zt.height = r, this.ge(this.Zt);
1097
1131
  }
1098
1132
  }
1099
- oe() {
1100
- const A = { alpha: !1, premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1, stencil: !1, powerPreference: "high-performance" }, t = this.jt.getContext("webgl2", A) || this.jt.getContext("webgl", A);
1133
+ ne() {
1134
+ const A = { alpha: !1, premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1, stencil: !1, powerPreference: "high-performance" }, t = this.Zt.getContext("webgl2", A) || this.Zt.getContext("webgl", A);
1101
1135
  if (!t) throw new I("WebGL context could not be created. Ensure your browser supports WebGL.");
1102
1136
  return t;
1103
1137
  }
1104
1138
  setupTransformObserver() {
1105
- this.ie = new ResizeObserver((A) => {
1139
+ this.Ee = new ResizeObserver((A) => {
1106
1140
  for (const t of A) {
1107
1141
  const e = t.contentRect;
1108
- !this.onTransformChange || Math.round(e.width) === this.jt.width && Math.round(e.height) === this.jt.height || this.onTransformChange();
1142
+ !this.onTransformChange || Math.round(e.width) === this.Zt.width && Math.round(e.height) === this.Zt.height || this.onTransformChange();
1109
1143
  }
1110
- }), this.ie.observe(this.jt);
1144
+ }), this.Ee.observe(this.Zt);
1111
1145
  }
1112
- S() {
1113
- this.ie && this.ie.disconnect();
1114
- const A = this.jt.getContext("webgl") || this.jt.getContext("webgl2");
1146
+ O() {
1147
+ this.Ee && this.Ee.disconnect();
1148
+ const A = this.Zt.getContext("webgl") || this.Zt.getContext("webgl2");
1115
1149
  if (A) {
1116
1150
  const t = A.getExtension("WEBGL_lose_context");
1117
1151
  t && t.loseContext();
1118
1152
  }
1119
- this.jt.parentNode && this.jt.parentNode.removeChild(this.jt);
1153
+ this.Zt.parentNode && this.Zt.parentNode.removeChild(this.Zt);
1120
1154
  }
1121
1155
  get canvas() {
1122
- return this.jt;
1156
+ return this.Zt;
1123
1157
  }
1124
1158
  get width() {
1125
- return this.jt.width;
1159
+ return this.Zt.width;
1126
1160
  }
1127
1161
  get height() {
1128
- return this.jt.height;
1162
+ return this.Zt.height;
1129
1163
  }
1130
1164
  }
1131
1165
  class M {
1132
1166
  constructor(A, t, e, s = {}) {
1133
- o(this, "Dt");
1134
- o(this, "ge");
1135
- o(this, "ne");
1136
- o(this, "ae");
1137
- o(this, "he");
1138
- o(this, "le");
1139
- o(this, "ce");
1140
- o(this, "De");
1141
- o(this, "h");
1142
- this.Dt = A, this.ge = t, this.ne = e, this.h = s;
1143
- const r = this.ne.cols, i = this.ne.rows;
1144
- this.ae = this.Dt.SA(r, i), this.he = this.Dt.SA(r, i), this.le = this.Dt.SA(r, i), this.ce = this.Dt.SA(r, i), this.De = this.Dt.SA(r, i);
1145
- }
1146
- ee() {
1147
- const A = this.ne.cols, t = this.ne.rows;
1148
- this.ae.resize(A, t), this.he.resize(A, t), this.le.resize(A, t), this.ce.resize(A, t), this.De.resize(A, t);
1167
+ E(this, "ut");
1168
+ E(this, "ae");
1169
+ E(this, "he");
1170
+ E(this, "le");
1171
+ E(this, "ce");
1172
+ E(this, "De");
1173
+ E(this, "Ce");
1174
+ E(this, "ue");
1175
+ E(this, "h");
1176
+ this.ut = A, this.ae = t, this.he = e, this.h = { enabled: !0, ...s };
1177
+ const r = this.he.cols, i = this.he.rows;
1178
+ this.le = this.ut.UA(r, i), this.ce = this.ut.UA(r, i), this.De = this.ut.UA(r, i), this.Ce = this.ut.UA(r, i), this.ue = this.ut.UA(r, i);
1179
+ }
1180
+ re() {
1181
+ const A = this.he.cols, t = this.he.rows;
1182
+ this.le.resize(A, t), this.ce.resize(A, t), this.De.resize(A, t), this.Ce.resize(A, t), this.ue.resize(A, t);
1149
1183
  }
1150
1184
  enabled(A) {
1151
- u.C(typeof A == "boolean" || typeof A == "number" && Number.isInteger(A), "Enabled must be a boolean value or an integer (0 for false, any other number for true).", { method: "enabled", providedValue: A }) && (this.h.enabled = !!A);
1185
+ D.C(typeof A == "boolean" || typeof A == "number" && Number.isInteger(A), "Enabled must be a boolean value or an integer (0 for false, any other number for true).", { method: "enabled", providedValue: A }) && (this.h.enabled = !!A);
1152
1186
  }
1153
1187
  enable() {
1154
1188
  this.enabled(!0);
@@ -1156,118 +1190,115 @@ class M {
1156
1190
  disable() {
1157
1191
  this.enabled(!1);
1158
1192
  }
1159
- S() {
1160
- this.ae.S(), this.he.S(), this.le.S(), this.ce.S(), this.De.S();
1193
+ O() {
1194
+ this.le.O(), this.ce.O(), this.De.O(), this.Ce.O(), this.ue.O();
1161
1195
  }
1162
1196
  get characterFramebuffer() {
1163
- return this.ae;
1197
+ return this.le;
1164
1198
  }
1165
1199
  get primaryColorFramebuffer() {
1166
- return this.he;
1200
+ return this.ce;
1167
1201
  }
1168
1202
  get secondaryColorFramebuffer() {
1169
- return this.le;
1203
+ return this.De;
1170
1204
  }
1171
1205
  get rotationFramebuffer() {
1172
- return this.ce;
1206
+ return this.Ce;
1173
1207
  }
1174
1208
  get transformFramebuffer() {
1175
- return this.De;
1209
+ return this.ue;
1176
1210
  }
1177
1211
  get options() {
1178
1212
  return this.h;
1179
1213
  }
1180
1214
  }
1181
- class uA {
1215
+ class IA {
1182
1216
  constructor(A, t) {
1183
- o(this, "I");
1184
- o(this, "Dt");
1185
- o(this, "Ce");
1186
- this.Dt = A, this.Ce = t;
1187
- const e = Math.max(this.Ce.length, 1);
1188
- this.I = this.Dt.SA(e, 1), this.ue();
1189
- }
1190
- ue() {
1191
- const A = this.Ce.length;
1192
- this.I.width !== A && this.I.resize(A, 1);
1217
+ E(this, "_");
1218
+ E(this, "ut");
1219
+ E(this, "Pe");
1220
+ this.ut = A, this.Pe = t;
1221
+ const e = Math.max(this.Pe.length, 1);
1222
+ this._ = this.ut.UA(e, 1), this.Ie();
1223
+ }
1224
+ Ie() {
1225
+ const A = this.Pe.length;
1226
+ this._.width !== A && this._.resize(A, 1);
1193
1227
  const t = new Uint8Array(1 * A * 4);
1194
1228
  for (let e = 0; e < A; e++) {
1195
- const s = this.Ce[e], r = 4 * e;
1229
+ const s = this.Pe[e], r = 4 * e;
1196
1230
  t[r] = s[0], t[r + 1] = s[1], t[r + 2] = s[2], t[r + 3] = 255;
1197
1231
  }
1198
- this.I.updatePixels(t, A, 1);
1232
+ this._.updatePixels(t, A, 1);
1199
1233
  }
1200
1234
  setColors(A) {
1201
- this.Ce = A, this.ue();
1235
+ this.Pe = A, this.Ie();
1202
1236
  }
1203
1237
  get colors() {
1204
- return this.Ce;
1238
+ return this.Pe;
1205
1239
  }
1206
1240
  get framebuffer() {
1207
- return this.I;
1208
- }
1209
- get texture() {
1210
- return this.I.texture;
1241
+ return this._;
1211
1242
  }
1212
1243
  }
1213
- class O extends M {
1244
+ class S extends M {
1214
1245
  constructor(t, e, s, r = {}) {
1215
- super(t, e, s, r);
1216
- o(this, "Pe");
1217
- this.Pe = new uA(this.Dt, this.ge.getCharacterColors(" .:-=+*%@#"));
1246
+ super(t, e, s, { enabled: !0, characters: " .:-=+*%@#", characterColor: [1, 1, 1, 1], characterColorMode: "sampled", cellColor: [0, 0, 0, 1], cellColorMode: "fixed", invert: !1, rotation: [0, 0, 0, 1], flipHorizontally: !1, flipVertically: !1, ...r });
1247
+ E(this, "we");
1248
+ this.we = new IA(this.ut, this.ae.getCharacterColors(" .:-=+*%@#"));
1218
1249
  }
1219
1250
  characters(t) {
1220
- u.C(this.ge.hasAllCharacters(t), "One or more characters do not exist in the current font.", { method: "characters", providedValue: t }) && (this.h.characters = t, this.Pe.setColors(this.ge.getCharacterColors(t)));
1251
+ D.C(this.ae.hasAllCharacters(t), "One or more characters do not exist in the current font.", { method: "characters", providedValue: t }) && (this.h.characters = t, this.we.setColors(this.ae.getCharacterColors(t)));
1221
1252
  }
1222
1253
  characterColor(t, e, s, r = 255) {
1223
- const i = this.Ie(t, "characterColor", e, s, r);
1254
+ const i = this.fe(t, "characterColor", e, s, r);
1224
1255
  i && (this.h.characterColor = i);
1225
1256
  }
1226
1257
  characterColorMode(t) {
1227
- this.we(t, "characterColorMode");
1258
+ this.de(t, "characterColorMode");
1228
1259
  }
1229
1260
  cellColor(t, e, s, r = 255) {
1230
- const i = this.Ie(t, "cellColor", e, s, r);
1261
+ const i = this.fe(t, "cellColor", e, s, r);
1231
1262
  i && (this.h.cellColor = i);
1232
1263
  }
1233
1264
  cellColorMode(t) {
1234
- this.we(t, "cellColorMode");
1265
+ this.de(t, "cellColorMode");
1235
1266
  }
1236
1267
  invert(t) {
1237
- this.fe(t, "invert", "Invert");
1268
+ this.me(t, "invert", "Invert");
1238
1269
  }
1239
1270
  rotation(t) {
1240
- if (!u.C(typeof t == "number", "Rotation angle must be a number.", { method: "rotation", providedValue: t })) return;
1271
+ if (!D.C(typeof t == "number", "Rotation angle must be a number.", { method: "rotation", providedValue: t })) return;
1241
1272
  (t %= 360) < 0 && (t += 360);
1242
1273
  const e = 255 * t / 360, s = Math.floor(e) / 255, r = Math.round(e - s);
1243
1274
  this.h.rotation = [s, r, 0, 1];
1244
1275
  }
1245
1276
  flipHorizontally(t) {
1246
- this.fe(t, "flipHorizontally", "Flip horizontally");
1277
+ this.me(t, "flipHorizontally", "Flip horizontally");
1247
1278
  }
1248
1279
  flipVertically(t) {
1249
- this.fe(t, "flipVertically", "Flip vertically");
1280
+ this.me(t, "flipVertically", "Flip vertically");
1250
1281
  }
1251
- Ie(t, e, s, r, i = 255) {
1282
+ fe(t, e, s, r, i = 255) {
1252
1283
  let B, Q, n, g;
1253
1284
  if (typeof t == "string") {
1254
- const h = this.de(t);
1255
- if (!h) return u.C(!1, "Invalid hex color format. Use '#FF0000', '#F00', 'FF0000', or 'F00'.", { method: e, providedValue: t }), null;
1256
- [B, Q, n, g] = h;
1257
- } else if (B = t, Q = s !== void 0 ? s : t, n = r !== void 0 ? r : t, g = i, !u.C([B, Q, n, g].every((h) => h >= 0 && h <= 255), e.charAt(0).toUpperCase() + e.slice(1) + " color values must be between 0 and 255", { method: e, providedValues: { r: B, g: Q, b: n, a: g } })) return null;
1285
+ const a = this.pe(t);
1286
+ if (!a) return D.C(!1, "Invalid hex color format. Use '#FF0000', '#F00', 'FF0000', or 'F00'.", { method: e, providedValue: t }), null;
1287
+ [B, Q, n, g] = a;
1288
+ } else if (B = t, Q = s !== void 0 ? s : t, n = r !== void 0 ? r : t, g = i, !D.C([B, Q, n, g].every((a) => a >= 0 && a <= 255), e.charAt(0).toUpperCase() + e.slice(1) + " color values must be between 0 and 255", { method: e, providedValues: { r: B, g: Q, b: n, a: g } })) return null;
1258
1289
  return [B / 255, Q / 255, n / 255, g / 255];
1259
1290
  }
1260
- we(t, e) {
1261
- u.C(["sampled", "fixed"].includes(t), "Invalid color mode. Must be 'sampled' or 'fixed'.", { method: e, providedValue: t }) && (this.h[e] = t);
1291
+ de(t, e) {
1292
+ D.C(["sampled", "fixed"].includes(t), "Invalid color mode. Must be 'sampled' or 'fixed'.", { method: e, providedValue: t }) && (this.h[e] = t);
1262
1293
  }
1263
- fe(t, e, s) {
1264
- u.C(typeof t == "boolean" || typeof t == "number" && Number.isInteger(t), s + " must be a boolean value or an integer (0 for false, any other number for true).", { method: e, providedValue: t }) && (this.h[e] = !!t);
1294
+ me(t, e, s) {
1295
+ D.C(typeof t == "boolean" || typeof t == "number" && Number.isInteger(t), s + " must be a boolean value or an integer (0 for false, any other number for true).", { method: e, providedValue: t }) && (this.h[e] = !!t);
1265
1296
  }
1266
- de(t) {
1297
+ pe(t) {
1267
1298
  return t = t.replace(/^#/, ""), /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(t) ? (t.length === 3 && (t = t.split("").map((e) => e + e).join("")), [parseInt(t.slice(0, 2), 16), parseInt(t.slice(2, 4), 16), parseInt(t.slice(4, 6), 16), 255]) : null;
1268
1299
  }
1269
1300
  }
1270
- const T = `attribute vec2 a_position;\r
1301
+ const R = `attribute vec2 a_position;\r
1271
1302
  attribute vec2 a_texCoord;\r
1272
1303
  varying vec2 v_uv;\r
1273
1304
  \r
@@ -1305,313 +1336,320 @@ void main() {\r
1305
1336
  \r
1306
1337
  gl_Position = vec4(pos, 0.0, 1.0);\r
1307
1338
  }\r
1308
- `, PA = { enabled: !0, characters: " .:-=+*%@#", characterColor: [1, 1, 1, 1], characterColorMode: "sampled", cellColor: [0, 0, 0, 1], cellColorMode: "fixed", invert: !1, rotation: [0, 0, 0, 255], flipHorizontally: !1, flipVertically: !1, brightnessRange: [0, 255] };
1309
- class Y extends O {
1339
+ `, tA = { enabled: !0, characters: " .:-=+*%@#", characterColor: [1, 1, 1, 1], characterColorMode: "sampled", cellColor: [0, 0, 0, 1], cellColorMode: "fixed", invert: !1, rotation: [0, 0, 0, 255], flipHorizontally: !1, flipVertically: !1, brightnessRange: [0, 255] };
1340
+ class O extends S {
1310
1341
  constructor(t, e, s) {
1311
- super(t, e, s, { ...PA });
1312
- o(this, "me");
1313
- o(this, "pe");
1314
- o(this, "_e");
1315
- o(this, "ve");
1316
- o(this, "be");
1317
- o(this, "xe");
1318
- this.me = new x(t.context, T, "precision lowp float;uniform sampler2D u_sketchTexture;uniform vec2 u_gridCellDimensions;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec2 cellCenter=(floor(v_uv*u_gridCellDimensions)+vec2(0.5))/u_gridCellDimensions;vec4 color=texture2D(u_sketchTexture,cellCenter);float brightness=dot(color.rgb,vec3(0.299,0.587,0.114));float brightnessValue=brightness*255.0;if(brightnessValue>=u_brightnessRange.x&&brightnessValue<=u_brightnessRange.y){gl_FragColor=color;}else{gl_FragColor=vec4(0.0);}}"), this.pe = new x(t.context, T, "precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_fillColor;uniform bool u_useFixedColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){if(u_useFixedColor){gl_FragColor=u_fillColor;}else{gl_FragColor=sampleColor;}}else{gl_FragColor=vec4(0.0);}}"), this.ve = new x(t.context, T, "precision lowp float;uniform sampler2D u_sampleTexture;uniform bool u_invert;uniform bool u_flipHorizontally;uniform bool u_flipVertically;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){float invertValue=u_invert ? 1.0 : 0.0;float flipHValue=u_flipHorizontally ? 1.0 : 0.0;float flipVValue=u_flipVertically ? 1.0 : 0.0;gl_FragColor=vec4(invertValue,flipHValue,flipVValue,1.0);}else{gl_FragColor=vec4(0.0);}}"), this.be = new x(t.context, T, "precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_rotationColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){gl_FragColor=u_rotationColor;}else{gl_FragColor=vec4(0.0);}}"), this._e = new x(t.context, T, "precision lowp float;uniform sampler2D u_colorSampleFramebuffer;uniform sampler2D u_charPaletteTexture;uniform vec2 u_charPaletteSize;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec4 color=texture2D(u_colorSampleFramebuffer,v_uv);if(color.a==0.0){gl_FragColor=vec4(0.0);return;}float brightness=dot(color.rgb,vec3(0.299,0.587,0.114))*255.0;vec2 range=u_brightnessRange;if(brightness<range.x||brightness>range.y){gl_FragColor=vec4(0.0);return;}float t=(brightness-range.x)/(range.y-range.x);float idx=clamp(floor(t*u_charPaletteSize.x),0.0,u_charPaletteSize.x-1.0);vec3 charColor=texture2D(u_charPaletteTexture,vec2((idx+0.5)/u_charPaletteSize.x,0.0)).rgb;gl_FragColor=vec4(charColor,1.0);}"), this.xe = this.Dt.SA(this.ne.cols, this.ne.rows);
1319
- }
1320
- ye(t) {
1321
- const e = this.ne.cols, s = this.ne.rows;
1322
- this.xe.begin(), this.Dt.UA(), this.Dt.IA(this.me), this.Dt.FA("u_sketchTexture", t), this.Dt.FA("u_gridCellDimensions", [e, s]), this.Dt.FA("u_brightnessRange", this.h.brightnessRange), this.Dt.$A(0, 0, e, s), this.xe.end(), this.he.begin(), this.Dt.UA(), this.Dt.IA(this.pe), this.Dt.FA("u_sampleTexture", this.xe), this.Dt.FA("u_fillColor", this.h.characterColor), this.Dt.FA("u_useFixedColor", this.h.characterColorMode === "fixed"), this.Dt.$A(0, 0, e, s), this.he.end(), this.le.begin(), this.Dt.UA(), this.Dt.IA(this.pe), this.Dt.FA("u_sampleTexture", this.xe), this.Dt.FA("u_fillColor", this.h.cellColor), this.Dt.FA("u_useFixedColor", this.h.cellColorMode === "fixed"), this.Dt.$A(0, 0, e, s), this.le.end(), this.De.begin(), this.Dt.UA(), this.Dt.IA(this.ve), this.Dt.FA("u_sampleTexture", this.xe), this.Dt.FA("u_invert", this.h.invert), this.Dt.FA("u_flipHorizontally", this.h.flipHorizontally), this.Dt.FA("u_flipVertically", this.h.flipVertically), this.Dt.$A(0, 0, e, s), this.De.end(), this.ce.begin(), this.Dt.UA(), this.Dt.IA(this.be), this.Dt.FA("u_sampleTexture", this.xe), this.Dt.FA("u_rotationColor", this.h.rotation), this.Dt.$A(0, 0, e, s), this.ce.end(), this.ae.begin(), this.Dt.UA(), this.Dt.IA(this._e), this.Dt.FA("u_colorSampleFramebuffer", this.xe), this.Dt.FA("u_charPaletteTexture", this.Pe.texture), this.Dt.FA("u_charPaletteSize", [this.Pe.colors.length, 1]), this.Dt.FA("u_brightnessRange", this.h.brightnessRange), this.Dt.$A(0, 0, e, s), this.ae.end();
1323
- }
1324
- ee() {
1325
- super.ee(), this.xe.resize(this.ne.cols, this.ne.rows);
1342
+ super(t, e, s, tA);
1343
+ E(this, "_e");
1344
+ E(this, "ve");
1345
+ E(this, "be");
1346
+ E(this, "xe");
1347
+ E(this, "ye");
1348
+ E(this, "Me");
1349
+ this._e = new p(t.context, R, "precision lowp float;uniform sampler2D u_sketchTexture;uniform vec2 u_gridCellDimensions;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec2 cellCenter=(floor(v_uv*u_gridCellDimensions)+vec2(0.5))/u_gridCellDimensions;vec4 color=texture2D(u_sketchTexture,cellCenter);float brightness=dot(color.rgb,vec3(0.299,0.587,0.114));float brightnessValue=brightness*255.0;if(brightnessValue>=u_brightnessRange.x&&brightnessValue<=u_brightnessRange.y){gl_FragColor=color;}else{gl_FragColor=vec4(0.0);}}"), this.ve = new p(t.context, R, "precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_fillColor;uniform bool u_useFixedColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){if(u_useFixedColor){gl_FragColor=u_fillColor;}else{gl_FragColor=sampleColor;}}else{gl_FragColor=vec4(0.0);}}"), this.xe = new p(t.context, R, "precision lowp float;uniform sampler2D u_sampleTexture;uniform bool u_invert;uniform bool u_flipHorizontally;uniform bool u_flipVertically;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){float invertValue=u_invert ? 1.0 : 0.0;float flipHValue=u_flipHorizontally ? 1.0 : 0.0;float flipVValue=u_flipVertically ? 1.0 : 0.0;gl_FragColor=vec4(invertValue,flipHValue,flipVValue,1.0);}else{gl_FragColor=vec4(0.0);}}"), this.ye = new p(t.context, R, "precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_rotationColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){gl_FragColor=u_rotationColor;}else{gl_FragColor=vec4(0.0);}}"), this.be = new p(t.context, R, "precision lowp float;uniform sampler2D u_colorSampleFramebuffer;uniform sampler2D u_charPaletteTexture;uniform vec2 u_charPaletteSize;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec4 color=texture2D(u_colorSampleFramebuffer,v_uv);if(color.a==0.0){gl_FragColor=vec4(0.0);return;}float brightness=dot(color.rgb,vec3(0.299,0.587,0.114))*255.0;vec2 range=u_brightnessRange;if(brightness<range.x||brightness>range.y){gl_FragColor=vec4(0.0);return;}float t=(brightness-range.x)/(range.y-range.x);float idx=clamp(floor(t*u_charPaletteSize.x),0.0,u_charPaletteSize.x-1.0);vec3 charColor=texture2D(u_charPaletteTexture,vec2((idx+0.5)/u_charPaletteSize.x,0.0)).rgb;gl_FragColor=vec4(charColor,1.0);}"), this.Me = this.ut.UA(this.he.cols, this.he.rows);
1350
+ }
1351
+ Ge(t) {
1352
+ const e = this.he.cols, s = this.he.rows;
1353
+ this.Me.begin(), this.ut.kA(), this.ut.fA(this._e), this.ut.YA("u_sketchTexture", t), this.ut.YA("u_gridCellDimensions", [e, s]), this.ut.YA("u_brightnessRange", this.h.brightnessRange), this.ut.TA(0, 0, e, s), this.Me.end(), this.ce.begin(), this.ut.kA(), this.ut.fA(this.ve), this.ut.YA("u_sampleTexture", this.Me), this.ut.YA("u_fillColor", this.h.characterColor), this.ut.YA("u_useFixedColor", this.h.characterColorMode === "fixed"), this.ut.TA(0, 0, e, s), this.ce.end(), this.De.begin(), this.ut.kA(), this.ut.fA(this.ve), this.ut.YA("u_sampleTexture", this.Me), this.ut.YA("u_fillColor", this.h.cellColor), this.ut.YA("u_useFixedColor", this.h.cellColorMode === "fixed"), this.ut.TA(0, 0, e, s), this.De.end(), this.ue.begin(), this.ut.kA(), this.ut.fA(this.xe), this.ut.YA("u_sampleTexture", this.Me), this.ut.YA("u_invert", this.h.invert), this.ut.YA("u_flipHorizontally", this.h.flipHorizontally), this.ut.YA("u_flipVertically", this.h.flipVertically), this.ut.TA(0, 0, e, s), this.ue.end(), this.Ce.begin(), this.ut.kA(), this.ut.fA(this.ye), this.ut.YA("u_sampleTexture", this.Me), this.ut.YA("u_rotationColor", this.h.rotation), this.ut.TA(0, 0, e, s), this.Ce.end(), this.le.begin(), this.ut.kA(), this.ut.fA(this.be), this.ut.YA("u_colorSampleFramebuffer", this.Me), this.ut.YA("u_charPaletteTexture", this.we.framebuffer), this.ut.YA("u_charPaletteSize", [this.we.colors.length, 1]), this.ut.YA("u_brightnessRange", this.h.brightnessRange), this.ut.TA(0, 0, e, s), this.le.end();
1354
+ }
1355
+ re() {
1356
+ super.re(), this.Me.resize(this.he.cols, this.he.rows);
1326
1357
  }
1327
1358
  brightnessRange(t) {
1328
- u.C(Array.isArray(t) && t.length === 2 && t.every((e) => typeof e == "number" && e >= 0 && e <= 255), "Brightness range must be an array of two numbers between 0 and 255.", { method: "brightnessRange", providedValue: t }) && (this.h.brightnessRange = t);
1359
+ D.C(Array.isArray(t) && t.length === 2 && t.every((e) => typeof e == "number" && e >= 0 && e <= 255), "Brightness range must be an array of two numbers between 0 and 255.", { method: "brightnessRange", providedValue: t }) && (this.h.brightnessRange = t);
1329
1360
  }
1330
1361
  }
1331
- const OA = Object.freeze(Object.defineProperty({ __proto__: null, TextmodeBrightnessConverter: Y, TextmodeConverter: M, TextmodeFeatureConverter: O }, Symbol.toStringTag, { value: "Module" }));
1332
- class dA {
1362
+ const LA = Object.freeze(Object.defineProperty({ __proto__: null, BRIGHTNESS_DEFAULT_OPTIONS: tA, TextmodeBrightnessConverter: O, TextmodeConverter: M, TextmodeFeatureConverter: S }, Symbol.toStringTag, { value: "Module" }));
1363
+ class fA {
1333
1364
  constructor(A, t, e) {
1334
- o(this, "Dt");
1335
- o(this, "_t");
1336
- o(this, "ne");
1337
- o(this, "Me");
1338
- o(this, "Ge");
1339
- o(this, "Fe");
1340
- o(this, "$e");
1341
- o(this, "Ye");
1342
- o(this, "ae");
1343
- o(this, "he");
1344
- o(this, "le");
1345
- o(this, "ce");
1346
- o(this, "De");
1347
- this.Dt = A, this._t = t, this.ne = e, this.Ye = this.Dt.MA(R, "precision mediump float;uniform sampler2D u_characterTexture;uniform vec2 u_charsetDimensions;uniform sampler2D u_primaryColorTexture;uniform sampler2D u_secondaryColorTexture;uniform sampler2D u_transformTexture;uniform sampler2D u_asciiCharacterTexture;uniform sampler2D u_rotationTexture;uniform sampler2D u_captureTexture;uniform vec2 u_captureDimensions;uniform int u_backgroundMode;uniform vec2 u_gridCellDimensions;uniform vec2 u_gridPixelDimensions;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){vec2 adjustedCoord=gl_FragCoord.xy/u_gridPixelDimensions;vec2 gridCoord=adjustedCoord*u_gridCellDimensions;vec2 cellCoord=floor(gridCoord);vec2 charIndexTexCoord=(cellCoord+0.5)/u_gridCellDimensions;vec4 primaryColor=texture2D(u_primaryColorTexture,charIndexTexCoord);vec4 secondaryColor=texture2D(u_secondaryColorTexture,charIndexTexCoord);vec4 transformColor=texture2D(u_transformTexture,charIndexTexCoord);bool isInverted=transformColor.r>0.5;bool flipHorizontal=transformColor.g>0.5;bool flipVertical=transformColor.b>0.5;vec4 encodedIndexVec=texture2D(u_asciiCharacterTexture,charIndexTexCoord);if(encodedIndexVec.a<0.01){gl_FragColor=(u_backgroundMode==0)? vec4(0.0):texture2D(u_captureTexture,gl_FragCoord.xy/u_captureDimensions);return;}int charIndex=int(encodedIndexVec.r*255.0+0.5)+int(encodedIndexVec.g*255.0+0.5)*256;int charCol=int(mod(float(charIndex),u_charsetDimensions.x));int charRow=charIndex/int(u_charsetDimensions.x);float flippedRow=(u_charsetDimensions.y-1.0)-float(charRow);vec2 charCoord=vec2(float(charCol),flippedRow)/u_charsetDimensions;vec4 rotationColor=texture2D(u_rotationTexture,charIndexTexCoord);float scaledAngle=rotationColor.r*255.0+rotationColor.g;float rotationAngle=(scaledAngle*360.0/255.0)*0.017453292;vec2 fractionalPart=fract(gridCoord)-0.5;if(flipHorizontal)fractionalPart.x=-fractionalPart.x;if(flipVertical)fractionalPart.y=-fractionalPart.y;fractionalPart=rotate2D(rotationAngle)*fractionalPart+0.5;vec2 cellSize=1.0/u_charsetDimensions;vec2 texCoord=charCoord+fractionalPart*cellSize;vec2 cellMax=charCoord+cellSize;if(any(lessThan(texCoord,charCoord))||any(greaterThan(texCoord,cellMax))){gl_FragColor=isInverted ? primaryColor : secondaryColor;return;}vec4 charTexel=texture2D(u_characterTexture,texCoord);if(isInverted)charTexel.rgb=1.0-charTexel.rgb;gl_FragColor=mix(secondaryColor,primaryColor,charTexel);}"), this.Ge = new Y(A, t, e), this.Fe = new M(A, t, e), this.Me = [this.Ge, this.Fe], this.ae = this.Dt.SA(e.cols, e.rows), this.he = this.Dt.SA(e.cols, e.rows), this.le = this.Dt.SA(e.cols, e.rows), this.ce = this.Dt.SA(e.cols, e.rows), this.De = this.Dt.SA(e.cols, e.rows), this.$e = this.Dt.SA(this.ne.width, this.ne.height);
1348
- }
1349
- Te(A) {
1350
- for (const e of this.Me) e.options.enabled && e instanceof O && e.ye(A);
1365
+ E(this, "ut");
1366
+ E(this, "bt");
1367
+ E(this, "he");
1368
+ E(this, "Fe");
1369
+ E(this, "$e");
1370
+ E(this, "Ye");
1371
+ E(this, "Te");
1372
+ E(this, "Se");
1373
+ E(this, "le");
1374
+ E(this, "ce");
1375
+ E(this, "De");
1376
+ E(this, "Ce");
1377
+ E(this, "ue");
1378
+ this.ut = A, this.bt = t, this.he = e, this.Se = this.ut.FA(Y, "precision mediump float;uniform sampler2D u_characterTexture;uniform vec2 u_charsetDimensions;uniform sampler2D u_primaryColorTexture;uniform sampler2D u_secondaryColorTexture;uniform sampler2D u_transformTexture;uniform sampler2D u_asciiCharacterTexture;uniform sampler2D u_rotationTexture;uniform sampler2D u_captureTexture;uniform vec2 u_captureDimensions;uniform int u_backgroundMode;uniform vec2 u_gridCellDimensions;uniform vec2 u_gridPixelDimensions;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){vec2 adjustedCoord=gl_FragCoord.xy/u_gridPixelDimensions;vec2 gridCoord=adjustedCoord*u_gridCellDimensions;vec2 cellCoord=floor(gridCoord);vec2 charIndexTexCoord=(cellCoord+0.5)/u_gridCellDimensions;vec4 primaryColor=texture2D(u_primaryColorTexture,charIndexTexCoord);vec4 secondaryColor=texture2D(u_secondaryColorTexture,charIndexTexCoord);vec4 transformColor=texture2D(u_transformTexture,charIndexTexCoord);bool isInverted=transformColor.r>0.5;bool flipHorizontal=transformColor.g>0.5;bool flipVertical=transformColor.b>0.5;vec4 encodedIndexVec=texture2D(u_asciiCharacterTexture,charIndexTexCoord);if(encodedIndexVec.a<0.01){gl_FragColor=(u_backgroundMode==0)? vec4(0.0):texture2D(u_captureTexture,gl_FragCoord.xy/u_captureDimensions);return;}int charIndex=int(encodedIndexVec.r*255.0+0.5)+int(encodedIndexVec.g*255.0+0.5)*256;int charCol=int(mod(float(charIndex),u_charsetDimensions.x));int charRow=charIndex/int(u_charsetDimensions.x);float flippedRow=(u_charsetDimensions.y-1.0)-float(charRow);vec2 charCoord=vec2(float(charCol),flippedRow)/u_charsetDimensions;vec4 rotationColor=texture2D(u_rotationTexture,charIndexTexCoord);float scaledAngle=rotationColor.r*255.0+rotationColor.g;float rotationAngle=(scaledAngle*360.0/255.0)*0.017453292;vec2 fractionalPart=fract(gridCoord)-0.5;if(flipHorizontal)fractionalPart.x=-fractionalPart.x;if(flipVertical)fractionalPart.y=-fractionalPart.y;fractionalPart=rotate2D(rotationAngle)*fractionalPart+0.5;vec2 cellSize=1.0/u_charsetDimensions;vec2 texCoord=charCoord+fractionalPart*cellSize;vec2 cellMax=charCoord+cellSize;if(any(lessThan(texCoord,charCoord))||any(greaterThan(texCoord,cellMax))){gl_FragColor=isInverted ? primaryColor : secondaryColor;return;}vec4 charTexel=texture2D(u_characterTexture,texCoord);if(isInverted)charTexel.rgb=1.0-charTexel.rgb;gl_FragColor=mix(secondaryColor,primaryColor,charTexel);}"), this.$e = new O(A, t, e), this.Ye = new M(A, t, e), this.Fe = [this.$e, this.Ye], this.le = this.ut.UA(e.cols, e.rows), this.ce = this.ut.UA(e.cols, e.rows), this.De = this.ut.UA(e.cols, e.rows), this.Ce = this.ut.UA(e.cols, e.rows), this.ue = this.ut.UA(e.cols, e.rows), this.Te = this.ut.UA(this.he.width, this.he.height);
1379
+ }
1380
+ Oe(A) {
1381
+ for (const e of this.Fe) e.options.enabled && e instanceof S && e.Ge(A);
1351
1382
  const t = (e, s) => {
1352
- e.begin(), this.Dt.UA();
1353
- for (const r of this.Me) r.options.enabled && this.Dt.RA(s(r), 0, 0);
1383
+ e.begin(), this.ut.kA();
1384
+ for (const r of this.Fe) r.options.enabled && this.ut.HA(s(r), 0, 0);
1354
1385
  e.end();
1355
1386
  };
1356
- t(this.ae, (e) => e.characterFramebuffer), t(this.he, (e) => e.primaryColorFramebuffer), t(this.le, (e) => e.secondaryColorFramebuffer), t(this.ce, (e) => e.rotationFramebuffer), t(this.De, (e) => e.transformFramebuffer), this.$e.begin(), this.Dt.UA(), this.Dt.IA(this.Ye), this.Dt.FA("u_characterTexture", this._t.fontFramebuffer), this.Dt.FA("u_charsetDimensions", [this._t.textureColumns, this._t.textureRows]), this.Dt.FA("u_asciiCharacterTexture", this.ae.texture), this.Dt.FA("u_primaryColorTexture", this.he.texture), this.Dt.FA("u_secondaryColorTexture", this.le.texture), this.Dt.FA("u_transformTexture", this.De.texture), this.Dt.FA("u_rotationTexture", this.ce.texture), this.Dt.FA("u_captureTexture", A.texture), this.Dt.FA("u_backgroundMode", !1), this.Dt.FA("u_captureDimensions", [A.width, A.height]), this.Dt.FA("u_gridCellDimensions", [this.ne.cols, this.ne.rows]), this.Dt.FA("u_gridPixelDimensions", [this.ne.width, this.ne.height]), this.Dt.$A(0, 0, this.$e.width, this.$e.height), this.$e.end();
1387
+ t(this.le, (e) => e.characterFramebuffer), t(this.ce, (e) => e.primaryColorFramebuffer), t(this.De, (e) => e.secondaryColorFramebuffer), t(this.Ce, (e) => e.rotationFramebuffer), t(this.ue, (e) => e.transformFramebuffer), this.Te.begin(), this.ut.kA(), this.ut.fA(this.Se), this.ut.YA("u_characterTexture", this.bt.fontFramebuffer), this.ut.YA("u_charsetDimensions", [this.bt.textureColumns, this.bt.textureRows]), this.ut.YA("u_asciiCharacterTexture", this.le), this.ut.YA("u_primaryColorTexture", this.ce), this.ut.YA("u_secondaryColorTexture", this.De), this.ut.YA("u_transformTexture", this.ue), this.ut.YA("u_rotationTexture", this.Ce), this.ut.YA("u_captureTexture", A), this.ut.YA("u_backgroundMode", !1), this.ut.YA("u_captureDimensions", [A.width, A.height]), this.ut.YA("u_gridCellDimensions", [this.he.cols, this.he.rows]), this.ut.YA("u_gridPixelDimensions", [this.he.width, this.he.height]), this.ut.TA(0, 0, this.Te.width, this.Te.height), this.Te.end();
1357
1388
  }
1358
1389
  add(A) {
1359
- if (!u.C(A === "brightness" || A === "custom", 'Converter type must be either "brightness" or "custom".', { method: "add", providedValue: A })) return;
1390
+ if (!D.C(A === "brightness" || A === "custom", 'Converter type must be either "brightness" or "custom".', { method: "add", providedValue: A })) return;
1360
1391
  let t;
1361
- return t = A === "brightness" ? new Y(this.Dt, this._t, this.ne) : new M(this.Dt, this._t, this.ne), this.Me.push(t), t;
1392
+ return t = A === "brightness" ? new O(this.ut, this.bt, this.he) : new M(this.ut, this.bt, this.he), this.Fe.push(t), t;
1362
1393
  }
1363
1394
  remove(A) {
1364
- if (!u.C(A instanceof M, "Parameter must be a TextmodeConverter instance.", { method: "remove", providedValue: A })) return;
1365
- const t = this.Me.indexOf(A);
1366
- u.C(t !== -1, "Converter instance not found in pipeline.", { method: "remove", providedValue: A, convertersCount: this.Me.length }) && this.Me.splice(t, 1);
1395
+ if (!D.C(A instanceof M, "Parameter must be a TextmodeConverter instance.", { method: "remove", providedValue: A })) return;
1396
+ const t = this.Fe.indexOf(A);
1397
+ D.C(t !== -1, "Converter instance not found in pipeline.", { method: "remove", providedValue: A, convertersCount: this.Fe.length }) && this.Fe.splice(t, 1);
1367
1398
  }
1368
1399
  swap(A, t) {
1369
1400
  const e = (B, Q) => {
1370
- if (typeof B == "number") return u.C(Number.isInteger(B) && B >= 0 && B < this.Me.length, Q + " index must be a valid integer within the converter array bounds.", { method: "swap", providedValue: B, convertersCount: this.Me.length }) ? B : null;
1401
+ if (typeof B == "number") return D.C(Number.isInteger(B) && B >= 0 && B < this.Fe.length, Q + " index must be a valid integer within the converter array bounds.", { method: "swap", providedValue: B, convertersCount: this.Fe.length }) ? B : null;
1371
1402
  if (B instanceof M) {
1372
- const n = this.Me.indexOf(B);
1373
- return u.C(n !== -1, Q + " converter instance not found in pipeline.", { method: "swap", providedValue: B, convertersCount: this.Me.length }) ? n : null;
1403
+ const n = this.Fe.indexOf(B);
1404
+ return D.C(n !== -1, Q + " converter instance not found in pipeline.", { method: "swap", providedValue: B, convertersCount: this.Fe.length }) ? n : null;
1374
1405
  }
1375
- return u.C(!1, Q + " parameter must be either an integer index or a TextmodeConverter instance.", { method: "swap", providedValue: B }), null;
1406
+ return D.C(!1, Q + " parameter must be either an integer index or a TextmodeConverter instance.", { method: "swap", providedValue: B }), null;
1376
1407
  }, s = e(A, "First"), r = e(t, "Second");
1377
- if (s === null || r === null || !u.C(s !== r, "Cannot swap a converter with itself.", { method: "swap", firstIndex: s, secondIndex: r })) return;
1378
- const i = this.Me[s];
1379
- this.Me[s] = this.Me[r], this.Me[r] = i;
1408
+ if (s === null || r === null || !D.C(s !== r, "Cannot swap a converter with itself.", { method: "swap", firstIndex: s, secondIndex: r })) return;
1409
+ const i = this.Fe[s];
1410
+ this.Fe[s] = this.Fe[r], this.Fe[r] = i;
1380
1411
  }
1381
- ee() {
1382
- this.$e.resize(this.ne.width, this.ne.height);
1383
- const A = this.ne.cols, t = this.ne.rows;
1384
- this.ae.resize(A, t), this.he.resize(A, t), this.le.resize(A, t), this.ce.resize(A, t), this.De.resize(A, t);
1385
- for (const e of this.Me) e.ee();
1412
+ re() {
1413
+ this.Te.resize(this.he.width, this.he.height);
1414
+ const A = this.he.cols, t = this.he.rows;
1415
+ this.le.resize(A, t), this.ce.resize(A, t), this.De.resize(A, t), this.Ce.resize(A, t), this.ue.resize(A, t);
1416
+ for (const e of this.Fe) e.re();
1386
1417
  }
1387
1418
  hasEnabledConverters() {
1388
- return this.Me.some((A) => A.options.enabled);
1419
+ return this.Fe.some((A) => A.options.enabled);
1389
1420
  }
1390
1421
  disable() {
1391
- for (const A of this.Me) A.disable();
1422
+ for (const A of this.Fe) A.disable();
1392
1423
  }
1393
1424
  enable() {
1394
- for (const A of this.Me) A.enable();
1425
+ for (const A of this.Fe) A.enable();
1395
1426
  }
1396
- S() {
1397
- for (const A of this.Me) A.S();
1398
- this.ae.S(), this.he.S(), this.le.S(), this.ce.S(), this.De.S(), this.$e.S(), this.Ye.S();
1427
+ O() {
1428
+ for (const A of this.Fe) A.O();
1429
+ this.le.O(), this.ce.O(), this.De.O(), this.Ce.O(), this.ue.O(), this.Te.O(), this.Se.O();
1399
1430
  }
1400
1431
  get texture() {
1401
- return this.$e;
1432
+ return this.Te;
1402
1433
  }
1403
1434
  get characterFramebuffer() {
1404
- return this.ae;
1435
+ return this.le;
1405
1436
  }
1406
1437
  get primaryColorFramebuffer() {
1407
- return this.he;
1438
+ return this.ce;
1408
1439
  }
1409
1440
  get secondaryColorFramebuffer() {
1410
- return this.le;
1441
+ return this.De;
1411
1442
  }
1412
1443
  get rotationFramebuffer() {
1413
- return this.ce;
1444
+ return this.Ce;
1414
1445
  }
1415
1446
  get transformFramebuffer() {
1416
- return this.De;
1447
+ return this.ue;
1417
1448
  }
1418
1449
  get brightness() {
1419
- return this.Ge;
1450
+ return this.$e;
1420
1451
  }
1421
1452
  get custom() {
1422
- return this.Fe;
1453
+ return this.Ye;
1423
1454
  }
1424
1455
  }
1425
- const IA = (E) => class extends E {
1456
+ const wA = (o) => class extends o {
1426
1457
  fill(A, t, e, s) {
1427
- this.Dt.wA(A, t, e, s);
1458
+ this.ut.dA(A, t, e, s);
1428
1459
  }
1429
1460
  stroke(A, t, e, s) {
1430
- this.Dt.fA(A, t, e, s);
1461
+ this.ut.mA(A, t, e, s);
1431
1462
  }
1432
1463
  strokeWeight(A) {
1433
- this.Dt.dA(A);
1464
+ this.ut.pA(A);
1434
1465
  }
1435
1466
  noStroke() {
1436
- this.Dt.mA();
1467
+ this.ut._A();
1437
1468
  }
1438
1469
  noFill() {
1439
- this.Dt.pA();
1470
+ this.ut.vA();
1440
1471
  }
1441
1472
  rotate(A) {
1442
- this.Dt._A(A);
1473
+ this.ut.bA(A);
1443
1474
  }
1444
1475
  push() {
1445
- this.Dt.vA();
1476
+ this.ut.xA();
1446
1477
  }
1447
1478
  pop() {
1448
- this.Dt.bA();
1479
+ this.ut.yA();
1449
1480
  }
1450
1481
  rect(A, t, e = 1, s = 1) {
1451
- this.Dt.$A(A, t, e, s);
1482
+ this.ut.TA(A, t, e, s);
1452
1483
  }
1453
1484
  line(A, t, e, s) {
1454
- this.Dt.TA(A, t, e, s);
1485
+ this.ut.OA(A, t, e, s);
1455
1486
  }
1456
1487
  background(A, t = A, e = A, s = 255) {
1457
- this.Dt.OA(A, t, e, s);
1488
+ this.ut.RA(A, t, e, s);
1458
1489
  }
1459
1490
  createShader(A, t) {
1460
- return this.Dt.MA(A, t);
1491
+ return this.ut.FA(A, t);
1461
1492
  }
1462
1493
  createFilterShader(A) {
1463
- return this.Dt.GA(A);
1494
+ return this.ut.$A(A);
1464
1495
  }
1465
1496
  shader(A) {
1466
- this.Dt.IA(A);
1497
+ this.ut.fA(A);
1467
1498
  }
1468
1499
  setUniform(A, t) {
1469
- this.Dt.FA(A, t);
1500
+ this.ut.YA(A, t);
1470
1501
  }
1471
1502
  image(A, t, e, s, r) {
1472
- this.Dt.RA(A, t, e, s, r);
1503
+ this.ut.HA(A, t, e, s, r);
1473
1504
  }
1474
1505
  clear() {
1475
- this.Dt.UA();
1506
+ this.ut.kA();
1476
1507
  }
1477
1508
  createFramebuffer(A, t, e = {}) {
1478
- return this.Dt.SA(A, t, e);
1509
+ return this.ut.UA(A, t, e);
1479
1510
  }
1480
1511
  };
1481
1512
  class k {
1482
- Se(A) {
1513
+ Ue(A) {
1483
1514
  const t = A.characterFramebuffer, e = A.primaryColorFramebuffer, s = A.secondaryColorFramebuffer, r = A.transformFramebuffer, i = A.rotationFramebuffer;
1484
1515
  return t == null || t.loadPixels(), e == null || e.loadPixels(), s == null || s.loadPixels(), r == null || r.loadPixels(), i == null || i.loadPixels(), { characterPixels: (t == null ? void 0 : t.pixels) || new Uint8Array(0), primaryColorPixels: (e == null ? void 0 : e.pixels) || new Uint8Array(0), secondaryColorPixels: (s == null ? void 0 : s.pixels) || new Uint8Array(0), transformPixels: (r == null ? void 0 : r.pixels) || new Uint8Array(0), rotationPixels: (i == null ? void 0 : i.pixels) || new Uint8Array(0) };
1485
1516
  }
1486
- Oe(A, t) {
1517
+ Re(A, t) {
1487
1518
  return A[t] + (A[t + 1] << 8);
1488
1519
  }
1489
- Ue(A, t) {
1520
+ ke(A, t) {
1490
1521
  return { r: A[t], g: A[t + 1], b: A[t + 2], a: A[t + 3] };
1491
1522
  }
1492
1523
  }
1493
1524
  class L {
1494
- ke(A, t) {
1525
+ Ve(A, t) {
1495
1526
  return new Blob([A], { type: t });
1496
1527
  }
1497
- Re(A, t, e) {
1528
+ He(A, t, e) {
1498
1529
  try {
1499
- const s = this.ke(A, e), r = URL.createObjectURL(s), i = document.createElement("a");
1530
+ const s = this.Ve(A, e), r = URL.createObjectURL(s), i = document.createElement("a");
1500
1531
  i.href = r, i.download = t, i.style.display = "none", i.rel = "noopener", document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
1501
1532
  } catch (s) {
1502
1533
  throw console.error("Failed to download file:", s), Error("File download failed: " + (s instanceof Error ? s.message : "Unknown error"));
1503
1534
  }
1504
1535
  }
1505
- Ve() {
1536
+ ze() {
1506
1537
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/:/g, "-");
1507
1538
  }
1508
- He() {
1539
+ Le() {
1509
1540
  const A = /* @__PURE__ */ new Date();
1510
1541
  return { date: A.toISOString().split("T")[0], time: A.toTimeString().split(" ")[0].replace(/:/g, "-") };
1511
1542
  }
1512
- ze(A) {
1543
+ Je(A) {
1513
1544
  return A.replace(/[<>:"/\\|?*]/g, "_").replace(/\s+/g, "_").replace(/_{2,}/g, "_").replace(/^_+|_+$/g, "").substring(0, 255);
1514
1545
  }
1515
- Le() {
1516
- return "'textmode-export'-" + this.Ve();
1546
+ je() {
1547
+ return "'textmode-export'-" + this.ze();
1517
1548
  }
1518
1549
  }
1519
- class fA extends k {
1520
- Je(A, t, e) {
1550
+ class pA extends k {
1551
+ Ke(A, t, e) {
1521
1552
  const s = A[e] === 255, r = A[e + 1] === 255, i = A[e + 2] === 255, B = t[e], Q = t[e + 1];
1522
1553
  return { isInverted: s, flipHorizontal: r, flipVertical: i, rotation: Math.round(360 * (B + Q / 255) / 255 * 100) / 100 };
1523
1554
  }
1524
- Ke(A, t, e) {
1555
+ We(A, t, e) {
1525
1556
  return { x: A, y: t, cellX: A * e.cellWidth, cellY: t * e.cellHeight };
1526
1557
  }
1527
- We(A, t) {
1558
+ Ne(A, t) {
1528
1559
  const e = [];
1529
1560
  let s = 0;
1530
1561
  for (let r = 0; r < t.rows; r++) for (let i = 0; i < t.cols; i++) {
1531
- const B = 4 * s, Q = this.Oe(A.characterPixels, B);
1532
- let n = this.Ue(A.primaryColorPixels, B), g = this.Ue(A.secondaryColorPixels, B);
1533
- const h = this.Je(A.transformPixels, A.rotationPixels, B);
1534
- if (h.isInverted) {
1535
- const D = n;
1536
- n = g, g = D;
1562
+ const B = 4 * s, Q = this.Re(A.characterPixels, B);
1563
+ let n = this.ke(A.primaryColorPixels, B), g = this.ke(A.secondaryColorPixels, B);
1564
+ const a = this.Ke(A.transformPixels, A.rotationPixels, B);
1565
+ if (a.isInverted) {
1566
+ const u = n;
1567
+ n = g, g = u;
1537
1568
  }
1538
- const a = this.Ke(i, r, t);
1539
- e.push({ charIndex: Q, primaryColor: n, secondaryColor: g, transform: h, position: a }), s++;
1569
+ const h = this.We(i, r, t);
1570
+ e.push({ charIndex: Q, primaryColor: n, secondaryColor: g, transform: a, position: h }), s++;
1540
1571
  }
1541
1572
  return e;
1542
1573
  }
1543
1574
  }
1544
- class wA {
1545
- je(A, t) {
1575
+ class mA {
1576
+ Ze(A, t) {
1546
1577
  const e = A.cmap;
1547
1578
  for (const s of e.tables) if (s.format === 4) {
1548
- for (let r = 0; r < s.startCount.length; r++) if (t >= s.startCount[r] && t <= s.endCount[r]) {
1549
- if (s.idRangeOffset[r] === 0) return t + s.idDelta[r] & 65535;
1579
+ const r = s;
1580
+ for (let i = 0; i < r.startCount.length; i++) if (t >= r.startCount[i] && t <= r.endCount[i]) {
1581
+ if (r.idRangeOffset[i] === 0) return t + r.idDelta[i] & 65535;
1550
1582
  {
1551
- const i = s.idRangeOffset[r] / 2 + (t - s.startCount[r]) - (s.startCount.length - r);
1552
- if (i >= 0 && i < s.glyphIdArray.length) {
1553
- const B = s.glyphIdArray[i];
1554
- if (B !== 0) return B + s.idDelta[r] & 65535;
1583
+ const B = r.idRangeOffset[i] / 2 + (t - r.startCount[i]) - (r.startCount.length - i);
1584
+ if (B >= 0 && B < r.glyphIdArray.length) {
1585
+ const Q = r.glyphIdArray[B];
1586
+ if (Q !== 0) return Q + r.idDelta[i] & 65535;
1555
1587
  }
1556
1588
  }
1557
1589
  }
1590
+ } else if (s.format === 12) {
1591
+ const r = s;
1592
+ for (let i = 0; i < r.groups.length; i += 3) {
1593
+ const B = r.groups[i], Q = r.groups[i + 1], n = r.groups[i + 2];
1594
+ if (t >= B && t <= Q) return n + (t - B);
1595
+ }
1558
1596
  }
1559
1597
  return 0;
1560
1598
  }
1561
- Ne(A, t, e, s, r) {
1599
+ Xe(A, t, e, s, r) {
1562
1600
  const i = r / A.head.unitsPerEm;
1563
- return { getBoundingBox: () => ({ x1: e + t.xMin * i, y1: s + -t.yMax * i, x2: e + t.xMax * i, y2: s + -t.yMin * i }), toSVG: () => this.Ze(t, e, s, i) };
1601
+ return { getBoundingBox: () => ({ x1: e + t.xMin * i, y1: s + -t.yMax * i, x2: e + t.xMax * i, y2: s + -t.yMin * i }), toSVG: () => this.qe(t, e, s, i) };
1564
1602
  }
1565
- Ze(A, t, e, s) {
1603
+ qe(A, t, e, s) {
1566
1604
  if (!A || !A.xs) return "";
1567
1605
  const { xs: r, ys: i, endPts: B, flags: Q } = A;
1568
1606
  if (!(r && i && B && Q)) return "";
1569
1607
  let n = "", g = 0;
1570
- for (let h = 0; h < B.length; h++) {
1571
- const a = B[h];
1572
- if (!(a < g)) {
1573
- if (a >= g) {
1574
- const D = t + r[g] * s, c = e - i[g] * s;
1575
- n += `M${D.toFixed(2)},${c.toFixed(2)}`;
1608
+ for (let a = 0; a < B.length; a++) {
1609
+ const h = B[a];
1610
+ if (!(h < g)) {
1611
+ if (h >= g) {
1612
+ const u = t + r[g] * s, c = e - i[g] * s;
1613
+ n += `M${u.toFixed(2)},${c.toFixed(2)}`;
1576
1614
  let l = g + 1;
1577
- for (; l <= a; )
1615
+ for (; l <= h; )
1578
1616
  if (1 & Q[l]) {
1579
1617
  const d = t + r[l] * s, C = e - i[l] * s;
1580
1618
  n += `L${d.toFixed(2)},${C.toFixed(2)}`, l++;
1581
1619
  } else {
1582
1620
  const d = t + r[l] * s, C = e - i[l] * s;
1583
- let P = l + 1 > a ? g : l + 1;
1621
+ let P = l + 1 > h ? g : l + 1;
1584
1622
  if (1 & Q[P]) {
1585
- const p = t + r[P] * s, m = e - i[P] * s;
1586
- n += `Q${d.toFixed(2)},${C.toFixed(2)} ${p.toFixed(2)},${m.toFixed(2)}`, l = P + 1;
1623
+ const w = t + r[P] * s, m = e - i[P] * s;
1624
+ n += `Q${d.toFixed(2)},${C.toFixed(2)} ${w.toFixed(2)},${m.toFixed(2)}`, l = P + 1;
1587
1625
  } else {
1588
- const p = (d + (t + r[P] * s)) / 2, m = (C + (e - i[P] * s)) / 2;
1589
- n += `Q${d.toFixed(2)},${C.toFixed(2)} ${p.toFixed(2)},${m.toFixed(2)}`, l = P;
1626
+ const w = (d + (t + r[P] * s)) / 2, m = (C + (e - i[P] * s)) / 2;
1627
+ n += `Q${d.toFixed(2)},${C.toFixed(2)} ${w.toFixed(2)},${m.toFixed(2)}`, l = P;
1590
1628
  }
1591
1629
  }
1592
1630
  n += "Z";
1593
1631
  }
1594
- g = a + 1;
1632
+ g = h + 1;
1595
1633
  }
1596
1634
  }
1597
1635
  return n;
1598
1636
  }
1599
- Xe(A, t, e, s, r) {
1600
- const i = A.codePointAt(0) || 0, B = this.je(t, i);
1637
+ As(A, t, e, s, r) {
1638
+ const i = A.codePointAt(0) || 0, B = this.Ze(t, i);
1601
1639
  let Q = null;
1602
- return t.glyf && t.glyf[B] !== null ? Q = t.glyf[B] : w && w.T && w.T.glyf && w.T.glyf.VA && (Q = w.T.glyf.VA(t, B), t.glyf && Q && (t.glyf[B] = Q)), this.Ne(t, Q, e, s, r);
1640
+ return t.glyf && t.glyf[B] !== null ? Q = t.glyf[B] : (Q = b.T.glyf.zA(t, B), t.glyf[B] = Q), this.Xe(t, Q, e, s, r);
1603
1641
  }
1604
- qe(A, t, e, s, r, i, B, Q) {
1642
+ ts(A, t, e, s, r, i, B, Q) {
1605
1643
  const n = e + (r - Q * (B / t.head.unitsPerEm)) / 2, g = s + (i + 0.7 * B) / 2;
1606
- return this.Xe(A, t, n, g, B).toSVG() || null;
1644
+ return this.As(A, t, n, g, B).toSVG() || null;
1607
1645
  }
1608
1646
  }
1609
- class pA {
1647
+ class bA {
1610
1648
  constructor() {
1611
- o(this, "As");
1612
- this.As = new wA();
1649
+ E(this, "es");
1650
+ this.es = new mA();
1613
1651
  }
1614
- ts(A) {
1652
+ ss(A) {
1615
1653
  return `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1616
1654
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
1617
1655
  <svg width="${A.width}" height="${A.height}" viewBox="0 0 ${A.width} ${A.height}"
@@ -1619,21 +1657,21 @@ class pA {
1619
1657
  <title>textmode art generated via textmode.js</title>
1620
1658
  <desc>textmode art visualization generated by textmode.js library</desc>`;
1621
1659
  }
1622
- es() {
1660
+ rs() {
1623
1661
  return `
1624
1662
  </g>
1625
1663
  </svg>`;
1626
1664
  }
1627
- ss(A, t) {
1665
+ Bs(A, t) {
1628
1666
  if (!t.includeBackgroundRectangles) return "";
1629
1667
  const e = t.backgroundColor, s = `rgba(${e[0]},${e[1]},${e[2]},${e[3] / 255})`;
1630
1668
  return `
1631
1669
  <rect width="${A.width}" height="${A.height}" fill="${s}" />`;
1632
1670
  }
1633
- rs(A) {
1671
+ Qs(A) {
1634
1672
  return `rgba(${A.r},${A.g},${A.b},${A.a / 255})`;
1635
1673
  }
1636
- Bs(A, t) {
1674
+ Es(A, t) {
1637
1675
  const { transform: e, position: s } = A, r = s.cellX + t.cellWidth / 2, i = s.cellY + t.cellHeight / 2, B = [];
1638
1676
  if (e.flipHorizontal || e.flipVertical) {
1639
1677
  const Q = e.flipHorizontal ? -1 : 1, n = e.flipVertical ? -1 : 1;
@@ -1641,91 +1679,91 @@ class pA {
1641
1679
  }
1642
1680
  return e.rotation && B.push(`rotate(${e.rotation} ${r} ${i})`), B.length ? ` transform="${B.join(" ")}"` : "";
1643
1681
  }
1644
- Qs(A, t, e) {
1682
+ gs(A, t, e) {
1645
1683
  if (!e.includeBackgroundRectangles || A.secondaryColor.a === 0) return "";
1646
- const { position: s } = A, r = this.rs(A.secondaryColor);
1684
+ const { position: s } = A, r = this.Qs(A.secondaryColor);
1647
1685
  return e.drawMode === "stroke" ? `
1648
1686
  <rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" stroke="${r}" fill="none" stroke-width="${e.strokeWidth}" />` : `
1649
1687
  <rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" fill="${r}" />`;
1650
1688
  }
1651
- Xe(A, t, e, s) {
1689
+ As(A, t, e, s) {
1652
1690
  const r = e.characters[A.charIndex];
1653
1691
  if (!r) return "";
1654
- const i = this.As.qe(r.character, e.font, A.position.cellX, A.position.cellY, t.cellWidth, t.cellHeight, e.fontSize, r.advanceWidth);
1692
+ const i = this.es.ts(r.character, e.font, A.position.cellX, A.position.cellY, t.cellWidth, t.cellHeight, e.fontSize, r.advanceWidth);
1655
1693
  if (!i) return "";
1656
- const B = this.rs(A.primaryColor);
1694
+ const B = this.Qs(A.primaryColor);
1657
1695
  return s.drawMode === "stroke" ? `
1658
1696
  <path id="${`path-${A.charIndex}-${A.position.cellX}-${A.position.cellY}`.replace(/\./g, "-")}" d="${i}" stroke="${B}" stroke-width="${s.strokeWidth}" fill="none" />` : `
1659
1697
  <path d="${i}" fill="${B}" />`;
1660
1698
  }
1661
- Es(A, t, e, s) {
1699
+ ns(A, t, e, s) {
1662
1700
  let r = "";
1663
- r += this.Qs(A, t, s);
1664
- const i = this.Bs(A, t), B = this.Xe(A, t, e, s);
1701
+ r += this.gs(A, t, s);
1702
+ const i = this.Es(A, t), B = this.As(A, t, e, s);
1665
1703
  return B && (i ? (r += `
1666
1704
  <g${i}>`, r += B, r += `
1667
1705
  </g>`) : r += B), r;
1668
1706
  }
1669
- gs(A, t, e, s) {
1670
- let r = this.ts(t);
1671
- r += this.ss(t, s), r += `
1707
+ hs(A, t, e, s) {
1708
+ let r = this.ss(t);
1709
+ r += this.Bs(t, s), r += `
1672
1710
  <g id="ascii-cells">`;
1673
- for (const i of A) r += this.Es(i, t, e, s);
1674
- return r += this.es(), r;
1711
+ for (const i of A) r += this.ns(i, t, e, s);
1712
+ return r += this.rs(), r;
1675
1713
  }
1676
- ns(A) {
1714
+ ls(A) {
1677
1715
  return A.replace(/<path[^>]*d=""[^>]*\/>/g, "").replace(/\n\s*\n/g, `
1678
1716
  `).replace(/[ \t]+$/gm, "");
1679
1717
  }
1680
1718
  }
1681
- class mA extends L {
1682
- hs(A) {
1683
- return this.ke(A, "image/svg+xml;charset=utf-8");
1719
+ class xA extends L {
1720
+ cs(A) {
1721
+ return this.Ve(A, "image/svg+xml;charset=utf-8");
1684
1722
  }
1685
- ls(A, t) {
1686
- this.Re(A, this.ze(t) + ".svg", "image/svg+xml;charset=utf-8");
1723
+ Ds(A, t) {
1724
+ this.He(A, this.Je(t) + ".svg", "image/svg+xml;charset=utf-8");
1687
1725
  }
1688
- cs(A, t) {
1689
- this.ls(A, t || this.Le());
1726
+ Cs(A, t) {
1727
+ this.Ds(A, t || this.je());
1690
1728
  }
1691
1729
  }
1692
- class H {
1730
+ class $ {
1693
1731
  constructor() {
1694
- o(this, "Ds");
1695
- o(this, "Cs");
1696
- o(this, "us");
1697
- this.Ds = new fA(), this.Cs = new pA(), this.us = new mA();
1732
+ E(this, "us");
1733
+ E(this, "Ps");
1734
+ E(this, "Is");
1735
+ this.us = new pA(), this.Ps = new bA(), this.Is = new xA();
1698
1736
  }
1699
- Ps(A) {
1737
+ ws(A) {
1700
1738
  return { includeBackgroundRectangles: A.includeBackgroundRectangles ?? !0, drawMode: A.drawMode ?? "fill", strokeWidth: A.strokeWidth ?? 1, backgroundColor: A.backgroundColor ?? [0, 0, 0, 0] };
1701
1739
  }
1702
- Is(A, t = {}) {
1703
- const e = this.Ps(t), s = this.Ds.Se(A.pipeline), r = this.Ds.We(s, A.grid), i = this.Cs.gs(r, A.grid, A.font, e);
1704
- return this.Cs.ns(i);
1740
+ fs(A, t = {}) {
1741
+ const e = this.ws(t), s = this.us.Ue(A.pipeline), r = this.us.Ne(s, A.grid), i = this.Ps.hs(r, A.grid, A.font, e);
1742
+ return this.Ps.ls(i);
1705
1743
  }
1706
- cs(A, t = {}) {
1707
- const e = this.Is(A, t), s = t.filename || this.us.Le();
1708
- this.us.cs(e, s);
1744
+ Cs(A, t = {}) {
1745
+ const e = this.fs(A, t), s = t.filename || this.Is.je();
1746
+ this.Is.Cs(e, s);
1709
1747
  }
1710
1748
  }
1711
- class xA extends k {
1712
- ws(A, t, e, s = " ") {
1749
+ class vA extends k {
1750
+ ds(A, t, e, s = " ") {
1713
1751
  var B;
1714
1752
  const r = [];
1715
1753
  let i = 0;
1716
1754
  for (let Q = 0; Q < t.rows; Q++) {
1717
1755
  const n = [];
1718
1756
  for (let g = 0; g < t.cols; g++) {
1719
- const h = 4 * i, a = this.Oe(A.characterPixels, h), D = ((B = e.characters[a]) == null ? void 0 : B.character) || s;
1720
- n.push(D), i++;
1757
+ const a = 4 * i, h = this.Re(A.characterPixels, a), u = ((B = e.characters[h]) == null ? void 0 : B.character) || s;
1758
+ n.push(u), i++;
1721
1759
  }
1722
1760
  r.push(n);
1723
1761
  }
1724
1762
  return r;
1725
1763
  }
1726
1764
  }
1727
- class bA {
1728
- fs(A, t) {
1765
+ class yA {
1766
+ ps(A, t) {
1729
1767
  const e = [];
1730
1768
  for (const r of A) {
1731
1769
  let i = r.join("");
@@ -1737,57 +1775,57 @@ class bA {
1737
1775
  return e.join(s);
1738
1776
  }
1739
1777
  }
1740
- class vA extends L {
1741
- ds(A, t) {
1742
- const e = this.ps(t);
1743
- this.Re(A, e, "text/plain;charset=utf-8");
1778
+ class _A extends L {
1779
+ _s(A, t) {
1780
+ const e = this.vs(t);
1781
+ this.He(A, e, "text/plain;charset=utf-8");
1744
1782
  }
1745
- ps(A) {
1746
- let t = this.ze(A);
1747
- return t === ".txt" || t.length <= 4 ? this.Le() : t;
1783
+ vs(A) {
1784
+ let t = this.Je(A);
1785
+ return t === ".txt" || t.length <= 4 ? this.je() : t;
1748
1786
  }
1749
1787
  }
1750
- class W {
1788
+ class z {
1751
1789
  constructor() {
1752
- o(this, "Ds");
1753
- o(this, "Cs");
1754
- o(this, "us");
1755
- this.Ds = new xA(), this.Cs = new bA(), this.us = new vA();
1790
+ E(this, "us");
1791
+ E(this, "Ps");
1792
+ E(this, "Is");
1793
+ this.us = new vA(), this.Ps = new yA(), this.Is = new _A();
1756
1794
  }
1757
- Ps(A) {
1795
+ ws(A) {
1758
1796
  return { preserveTrailingSpaces: A.preserveTrailingSpaces ?? !1, lineEnding: A.lineEnding ?? "lf", emptyCharacter: A.emptyCharacter ?? " " };
1759
1797
  }
1760
- _s(A, t = {}) {
1761
- const e = this.Ps(t), s = this.Ds.Se(A.pipeline), r = this.Ds.ws(s, A.grid, A.font, e.emptyCharacter);
1762
- return this.Cs.fs(r, e);
1798
+ bs(A, t = {}) {
1799
+ const e = this.ws(t), s = this.us.Ue(A.pipeline), r = this.us.ds(s, A.grid, A.font, e.emptyCharacter);
1800
+ return this.Ps.ps(r, e);
1763
1801
  }
1764
- ds(A, t = {}) {
1765
- const e = this._s(A, t), s = t.filename || this.us.Le();
1766
- this.us.ds(e, s);
1802
+ _s(A, t = {}) {
1803
+ const e = this.bs(A, t), s = t.filename || this.Is.je();
1804
+ this.Is._s(e, s);
1767
1805
  }
1768
1806
  }
1769
- class yA extends k {
1770
- vs(A, t = 1, e = "transparent") {
1807
+ class MA extends k {
1808
+ Ms(A, t = 1, e = "transparent") {
1771
1809
  const s = A.canvas;
1772
1810
  if (t === 1 && e === "transparent") return s;
1773
1811
  const r = document.createElement("canvas"), i = r.getContext("2d"), B = Math.round(s.width * t), Q = Math.round(s.height * t);
1774
1812
  return r.width = B, r.height = Q, e !== "transparent" && (i.fillStyle = e, i.fillRect(0, 0, B, Q)), i.imageSmoothingEnabled = !1, i.drawImage(s, 0, 0, s.width, s.height, 0, 0, B, Q), r;
1775
1813
  }
1776
1814
  }
1777
- class _A {
1778
- bs(A, t) {
1779
- const e = this.Ms(t.format);
1815
+ class TA {
1816
+ Gs(A, t) {
1817
+ const e = this.Fs(t.format);
1780
1818
  return t.format === "png" ? A.toDataURL(e) : A.toDataURL(e, t.quality);
1781
1819
  }
1782
- async Gs(A, t) {
1820
+ async $s(A, t) {
1783
1821
  return new Promise((e, s) => {
1784
- const r = this.Ms(t.format), i = (B) => {
1822
+ const r = this.Fs(t.format), i = (B) => {
1785
1823
  B ? e(B) : s(Error(`Failed to generate ${t.format.toUpperCase()} blob`));
1786
1824
  };
1787
1825
  t.format === "png" ? A.toBlob(i, r) : A.toBlob(i, r, t.quality);
1788
1826
  });
1789
1827
  }
1790
- Ms(A) {
1828
+ Fs(A) {
1791
1829
  switch (A) {
1792
1830
  case "png":
1793
1831
  return "image/png";
@@ -1800,12 +1838,12 @@ class _A {
1800
1838
  }
1801
1839
  }
1802
1840
  }
1803
- const MA = { png: "image/png", jpg: "image/jpeg", webp: "image/webp" }, N = { png: ".png", jpg: ".jpg", webp: ".webp" };
1804
- class FA extends L {
1805
- Fs(A, t, e) {
1806
- this.$s(A, this.ze(t) + N[e]);
1841
+ const RA = { png: "image/png", jpg: "image/jpeg", webp: "image/webp" }, Z = { png: ".png", jpg: ".jpg", webp: ".webp" };
1842
+ class YA extends L {
1843
+ Ys(A, t, e) {
1844
+ this.Ts(A, this.Je(t) + Z[e]);
1807
1845
  }
1808
- $s(A, t) {
1846
+ Ts(A, t) {
1809
1847
  const e = URL.createObjectURL(A);
1810
1848
  try {
1811
1849
  const s = document.createElement("a");
@@ -1814,259 +1852,259 @@ class FA extends L {
1814
1852
  URL.revokeObjectURL(e);
1815
1853
  }
1816
1854
  }
1817
- Ys(A) {
1818
- return A in MA && A in N;
1855
+ Ss(A) {
1856
+ return A in RA && A in Z;
1819
1857
  }
1820
1858
  }
1821
- class TA {
1859
+ class FA {
1822
1860
  constructor() {
1823
- o(this, "Ds");
1824
- o(this, "Cs");
1825
- o(this, "us");
1826
- this.Ds = new yA(), this.Cs = new _A(), this.us = new FA();
1861
+ E(this, "us");
1862
+ E(this, "Ps");
1863
+ E(this, "Is");
1864
+ this.us = new MA(), this.Ps = new TA(), this.Is = new YA();
1827
1865
  }
1828
- Ps(A) {
1866
+ ws(A) {
1829
1867
  return { format: A.format ?? "png", quality: A.quality ?? 1, scale: A.scale ?? 1, backgroundColor: A.backgroundColor ?? "transparent" };
1830
1868
  }
1831
- Ts(A) {
1832
- if (console.log("Validating image export options:", A), !this.us.Ys(A.format)) throw Error(`Saving '${A.format}' files is not supported`);
1869
+ Os(A) {
1870
+ if (console.log("Validating image export options:", A), !this.Is.Ss(A.format)) throw Error(`Saving '${A.format}' files is not supported`);
1833
1871
  if (A.quality < 0 || A.quality > 1) throw Error("Image quality must be between 0.0 and 1.0");
1834
1872
  if (A.scale <= 0) throw Error("Scale factor must be greater than 0");
1835
1873
  A.scale > 10 && console.warn("Large scale factors may result in very large files and slow performance"), A.format === "jpg" && A.backgroundColor === "transparent" && (A.backgroundColor = "black");
1836
1874
  }
1837
- Ss(A, t = {}) {
1838
- const e = this.Ps(t);
1839
- if (this.Ts(e), e.scale === 1 && e.backgroundColor === "transparent") return this.Cs.bs(A.canvas, e);
1840
- const s = this.Ds.vs(A, e.scale, e.backgroundColor);
1841
- return this.Cs.bs(s, e);
1875
+ Us(A, t = {}) {
1876
+ const e = this.ws(t);
1877
+ if (this.Os(e), e.scale === 1 && e.backgroundColor === "transparent") return this.Ps.Gs(A.canvas, e);
1878
+ const s = this.us.Ms(A, e.scale, e.backgroundColor);
1879
+ return this.Ps.Gs(s, e);
1842
1880
  }
1843
- async Gs(A, t = {}) {
1844
- const e = this.Ps(t);
1845
- if (this.Ts(e), e.scale === 1 && e.backgroundColor === "transparent") return await this.Cs.Gs(A.canvas, e);
1846
- const s = this.Ds.vs(A, e.scale, e.backgroundColor);
1847
- return await this.Cs.Gs(s, e);
1881
+ async $s(A, t = {}) {
1882
+ const e = this.ws(t);
1883
+ if (this.Os(e), e.scale === 1 && e.backgroundColor === "transparent") return await this.Ps.$s(A.canvas, e);
1884
+ const s = this.us.Ms(A, e.scale, e.backgroundColor);
1885
+ return await this.Ps.$s(s, e);
1848
1886
  }
1849
- async Fs(A, t = {}) {
1850
- const e = await this.Gs(A, t), s = t.format ?? "png", r = t.filename || this.us.Le();
1851
- this.us.Fs(e, r, s);
1887
+ async Ys(A, t = {}) {
1888
+ const e = await this.$s(A, t), s = t.format ?? "png", r = t.filename || this.Is.je();
1889
+ this.Is.Ys(e, r, s);
1852
1890
  }
1853
1891
  }
1854
- const RA = (E) => class extends E {
1892
+ const GA = (o) => class extends o {
1855
1893
  toString(A = {}) {
1856
- return new W()._s({ pipeline: this.Os, grid: this.ne, font: this._t }, A);
1894
+ return new z().bs({ pipeline: this.Rs, grid: this.he, font: this.bt }, A);
1857
1895
  }
1858
1896
  saveStrings(A = {}) {
1859
- new W().ds({ pipeline: this.Os, grid: this.ne, font: this._t }, A);
1897
+ new z()._s({ pipeline: this.Rs, grid: this.he, font: this.bt }, A);
1860
1898
  }
1861
1899
  toSVG(A = {}) {
1862
- return new H().Is(this, A);
1900
+ return new $().fs(this, A);
1863
1901
  }
1864
1902
  saveSVG(A = {}) {
1865
- new H().cs(this, A);
1903
+ new $().Cs(this, A);
1866
1904
  }
1867
1905
  async saveCanvas(A, t = "png", e = {}) {
1868
- await new TA().Fs(this.jt, { ...e, filename: A, format: t });
1906
+ await new FA().Ys(this.Zt, { ...e, filename: A, format: t });
1869
1907
  }
1870
- }, GA = (E) => class extends E {
1908
+ }, UA = (o) => class extends o {
1871
1909
  async loadFont(A) {
1872
- return this._t.Ht(A).then(() => {
1873
- const t = this._t.maxGlyphDimensions;
1874
- this.ne.qt(t.width, t.height), this.Os.ee();
1910
+ return this.bt.Lt(A).then(() => {
1911
+ const t = this.bt.maxGlyphDimensions;
1912
+ this.he.te(t.width, t.height), this.Rs.re();
1875
1913
  });
1876
1914
  }
1877
1915
  fontSize(A) {
1878
- if (!u.C(typeof A == "number" && A > 0, "Font size must be a positive number greater than 0.", { method: "fontSize", providedValue: A }) || this._t.fontSize === A) return;
1879
- this._t.Vt(A);
1880
- const t = this._t.maxGlyphDimensions;
1881
- this.ne.qt(t.width, t.height), this.Os.ee(), this.Dt.kA();
1916
+ if (!D.C(typeof A == "number" && A > 0, "Font size must be a positive number greater than 0.", { method: "fontSize", providedValue: A }) || this.bt.fontSize === A) return;
1917
+ this.bt.zt(A);
1918
+ const t = this.bt.maxGlyphDimensions;
1919
+ this.he.te(t.width, t.height), this.Rs.re(), this.ut.VA();
1882
1920
  }
1883
- }, UA = (E) => class extends E {
1921
+ }, OA = (o) => class extends o {
1884
1922
  addConverter(A) {
1885
- return this.Os.add(A);
1923
+ return this.Rs.add(A);
1886
1924
  }
1887
1925
  removeConverter(A) {
1888
- this.Os.remove(A);
1926
+ this.Rs.remove(A);
1889
1927
  }
1890
1928
  };
1891
1929
  class SA {
1892
1930
  constructor() {
1893
- o(this, "Dt");
1894
- o(this, "_t");
1895
- o(this, "Os");
1896
- o(this, "jt");
1897
- o(this, "ne");
1931
+ E(this, "ut");
1932
+ E(this, "bt");
1933
+ E(this, "Rs");
1934
+ E(this, "Zt");
1935
+ E(this, "he");
1898
1936
  }
1899
1937
  }
1900
- class z extends function(t, ...e) {
1938
+ class W extends function(t, ...e) {
1901
1939
  return e.reduce((s, r) => r(s), t);
1902
- }(SA, IA, RA, GA, UA) {
1940
+ }(SA, wA, GA, UA, OA) {
1903
1941
  constructor(t = null, e = {}) {
1904
1942
  super();
1905
- o(this, "re");
1906
- o(this, "Us");
1907
- o(this, "ie");
1908
- o(this, "ks");
1909
- o(this, "Rs");
1910
- o(this, "Vs", null);
1911
- o(this, "Hs", 0);
1912
- o(this, "zs");
1913
- o(this, "Ls", !0);
1914
- o(this, "Js", 0);
1915
- o(this, "Ks", 0);
1916
- o(this, "Ws", 0);
1917
- o(this, "js", []);
1918
- o(this, "Ns", 10);
1919
- o(this, "Zs", !1);
1920
- o(this, "Xs", !1);
1921
- o(this, "qs", () => {
1943
+ E(this, "ie");
1944
+ E(this, "ks");
1945
+ E(this, "Ee");
1946
+ E(this, "Vs");
1947
+ E(this, "Hs");
1948
+ E(this, "zs", null);
1949
+ E(this, "Ls", 0);
1950
+ E(this, "Js");
1951
+ E(this, "js", !0);
1952
+ E(this, "Ks", 0);
1953
+ E(this, "Ws", 0);
1954
+ E(this, "Ns", 0);
1955
+ E(this, "Zs", []);
1956
+ E(this, "Xs", 10);
1957
+ E(this, "qs", !1);
1958
+ E(this, "Ar", !1);
1959
+ E(this, "tr", () => {
1922
1960
  });
1923
- o(this, "Ar", () => {
1961
+ E(this, "er", () => {
1924
1962
  });
1925
- o(this, "tr");
1926
- this.re = t, this.Xs = t === null, this.ks = e.renderMode ?? "auto", this.Rs = e.frameRate ?? 60, this.zs = 1e3 / this.Rs;
1963
+ E(this, "sr");
1964
+ this.ie = t, this.Ar = t === null, this.Vs = e.renderMode ?? "auto", this.Hs = e.frameRate ?? 60, this.Js = 1e3 / this.Hs;
1927
1965
  }
1928
1966
  static async create(t = null, e = {}) {
1929
- const s = new this(t, e), r = s.Xs ? e : void 0;
1967
+ const s = new this(t, e), r = s.Ar ? e : void 0;
1930
1968
  let i, B;
1931
- s.jt = new CA(s.re, s.Xs, r), s.Dt = new iA(s.jt.oe()), s.Xs ? (i = e.width || 800, B = e.height || 600) : (i = s.jt.width || 800, B = s.jt.height || 600), s.Us = s.Dt.SA(i, B), s._t = new cA(s.Dt, e.fontSize ?? 16), await s._t.Ut(e.fontSource);
1932
- const Q = s._t.maxGlyphDimensions;
1933
- return s.ne = new DA(s.jt.canvas, Q.width, Q.height), s.Os = new dA(s.Dt, s._t, s.ne), s.er(), s.sr(), s;
1969
+ s.Zt = new dA(s.ie, s.Ar, r), s.ut = new EA(s.Zt.ne()), s.Ar ? (i = e.width || 800, B = e.height || 600) : (i = s.Zt.width || 800, B = s.Zt.height || 600), s.ks = s.ut.UA(i, B), s.bt = new DA(s.ut, e.fontSize ?? 16), await s.bt.kt(e.fontSource);
1970
+ const Q = s.bt.maxGlyphDimensions;
1971
+ return s.he = new PA(s.Zt.canvas, Q.width, Q.height), s.Rs = new fA(s.ut, s.bt, s.he), s.rr(), s.Br(), s;
1934
1972
  }
1935
- er() {
1936
- this.tr = () => {
1937
- this.Xs ? this.Ar() : this.rr();
1938
- }, window.addEventListener("resize", this.tr), window.ResizeObserver && this.re && !this.Xs && (this.ie = new ResizeObserver(() => {
1939
- this.rr();
1940
- }), this.ie.observe(this.re));
1973
+ rr() {
1974
+ this.sr = () => {
1975
+ this.Ar ? this.er() : this.ir();
1976
+ }, window.addEventListener("resize", this.sr), window.ResizeObserver && this.ie && !this.Ar && (this.Ee = new ResizeObserver(() => {
1977
+ this.ir();
1978
+ }), this.Ee.observe(this.ie));
1941
1979
  }
1942
1980
  render() {
1943
- this.Br(), this.Ws++, this.Zs ? console.warn("Cannot render: Required resources have been disposed") : (this.Xs ? (this.Us.begin(), this.qs(), this.Us.end()) : this.Us.update(this.re), this.Os.hasEnabledConverters() ? (this.Os.Te(this.Us), this.Dt.OA(0), this.Dt.RA(this.Os.texture, this.ne.offsetX, this.ne.offsetY, this.Os.texture.width, this.Os.texture.height)) : (this.Dt.UA(), this.Dt.RA(this.Us, this.ne.offsetX, this.ne.offsetY, this.Us.width, this.Us.height)));
1981
+ this.Qr(), this.Ns++, this.qs ? console.warn("Cannot render: Required resources have been disposed") : (this.Ar ? (this.ks.begin(), this.tr(), this.ks.end()) : this.ks.S(this.ie), this.Rs.hasEnabledConverters() ? (this.Rs.Oe(this.ks), this.ut.RA(0), this.ut.HA(this.Rs.texture, this.he.offsetX, this.he.offsetY, this.Rs.texture.width, this.Rs.texture.height)) : (this.ut.kA(), this.ut.HA(this.ks, this.he.offsetX, this.he.offsetY, this.ks.width, this.ks.height)));
1944
1982
  }
1945
- rr() {
1946
- this.jt.ee(), this.Us.resize(this.jt.width, this.jt.height), this.ne.ee(), this.Os.ee(), this.Dt.kA(), this.ks !== "manual" && this.render();
1983
+ ir() {
1984
+ this.Zt.re(), this.ks.resize(this.Zt.width, this.Zt.height), this.he.re(), this.Rs.re(), this.ut.VA(), this.Vs !== "manual" && this.render();
1947
1985
  }
1948
- sr() {
1949
- if (this.ks !== "auto" || !this.Ls) return;
1950
- this.Hs = performance.now();
1986
+ Br() {
1987
+ if (this.Vs !== "auto" || !this.js) return;
1988
+ this.Ls = performance.now();
1951
1989
  const t = (e) => {
1952
- if (!this.Ls) return void (this.Vs = null);
1953
- const s = e - this.Hs;
1954
- s >= this.zs && (this.render(), this.Hs = e - s % this.zs), this.Ls && (this.Vs = requestAnimationFrame(t));
1990
+ if (!this.js) return void (this.zs = null);
1991
+ const s = e - this.Ls;
1992
+ s >= this.Js && (this.render(), this.Ls = e - s % this.Js), this.js && (this.zs = requestAnimationFrame(t));
1955
1993
  };
1956
- this.Vs = requestAnimationFrame(t);
1994
+ this.zs = requestAnimationFrame(t);
1957
1995
  }
1958
- Br() {
1996
+ Qr() {
1959
1997
  const t = performance.now();
1960
- if (this.Ks > 0) {
1961
- const e = t - this.Ks;
1962
- this.js.push(e), this.js.length > this.Ns && this.js.shift();
1963
- const s = this.js.reduce((r, i) => r + i, 0) / this.js.length;
1964
- this.Js = 1e3 / s;
1998
+ if (this.Ws > 0) {
1999
+ const e = t - this.Ws;
2000
+ this.Zs.push(e), this.Zs.length > this.Xs && this.Zs.shift();
2001
+ const s = this.Zs.reduce((r, i) => r + i, 0) / this.Zs.length;
2002
+ this.Ks = 1e3 / s;
1965
2003
  }
1966
- this.Ks = t;
2004
+ this.Ws = t;
1967
2005
  }
1968
- ir() {
1969
- this.Vs && (cancelAnimationFrame(this.Vs), this.Vs = null);
2006
+ Er() {
2007
+ this.zs && (cancelAnimationFrame(this.zs), this.zs = null);
1970
2008
  }
1971
2009
  renderMode(t) {
1972
- this.ks !== t && (this.ir(), this.ks = t, t === "auto" && this.Ls && this.sr());
2010
+ this.Vs !== t && (this.Er(), this.Vs = t, t === "auto" && this.js && this.Br());
1973
2011
  }
1974
2012
  frameRate(t) {
1975
- if (t === void 0) return this.Js;
1976
- this.Rs = t, this.zs = 1e3 / t, this.ks === "auto" && this.Ls && (this.ir(), this.sr());
2013
+ if (t === void 0) return this.Ks;
2014
+ this.Hs = t, this.Js = 1e3 / t, this.Vs === "auto" && this.js && (this.Er(), this.Br());
1977
2015
  }
1978
2016
  noLoop() {
1979
- this.Ls && (this.Ls = !1, this.Vs && (cancelAnimationFrame(this.Vs), this.Vs = null));
2017
+ this.js && (this.js = !1, this.zs && (cancelAnimationFrame(this.zs), this.zs = null));
1980
2018
  }
1981
2019
  loop() {
1982
- this.Ls || (this.Ls = !0, this.ks === "auto" && this.sr());
2020
+ this.js || (this.js = !0, this.Vs === "auto" && this.Br());
1983
2021
  }
1984
2022
  redraw(t = 1) {
1985
- if (u.C(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.render();
2023
+ if (D.C(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.render();
1986
2024
  }
1987
2025
  isLooping() {
1988
- return this.ks === "auto" && this.Ls;
2026
+ return this.Vs === "auto" && this.js;
1989
2027
  }
1990
2028
  draw(t) {
1991
- this.qs = t;
2029
+ this.tr = t;
1992
2030
  }
1993
2031
  windowResized(t) {
1994
- this.Ar = t;
2032
+ this.er = t;
1995
2033
  }
1996
2034
  resizeCanvas(t, e) {
1997
- this.Xs && (this.jt.ee(t, e), this.Us.resize(this.jt.width, this.jt.height), this.ne.ee(), this.Os.ee(), this.Dt.kA(), this.ks !== "manual" && this.render());
2035
+ this.Ar && (this.Zt.re(t, e), this.ks.resize(this.Zt.width, this.Zt.height), this.he.re(), this.Rs.re(), this.ut.VA(), this.Vs !== "manual" && this.render());
1998
2036
  }
1999
2037
  destroy() {
2000
- this.Zs || (this.ir(), window.removeEventListener("resize", this.tr), this.ie && this.ie.disconnect(), this.Os.S(), this._t.S(), this.Us.S(), this.Dt.S(), this.Zs = !0);
2038
+ this.qs || (this.Er(), window.removeEventListener("resize", this.sr), this.Ee && this.Ee.disconnect(), this.Rs.O(), this.bt.O(), this.ks.O(), this.ut.O(), this.qs = !0);
2001
2039
  }
2002
2040
  get grid() {
2003
- return this.ne;
2041
+ return this.he;
2004
2042
  }
2005
2043
  get font() {
2006
- return this._t;
2044
+ return this.bt;
2007
2045
  }
2008
2046
  get mode() {
2009
- return this.ks;
2047
+ return this.Vs;
2010
2048
  }
2011
2049
  get pipeline() {
2012
- return this.Os;
2050
+ return this.Rs;
2013
2051
  }
2014
2052
  get frameCount() {
2015
- return this.Ws;
2053
+ return this.Ns;
2016
2054
  }
2017
2055
  get renderer() {
2018
- return this.Dt;
2056
+ return this.ut;
2019
2057
  }
2020
2058
  set frameCount(t) {
2021
- this.Ws = t;
2059
+ this.Ns = t;
2022
2060
  }
2023
2061
  get width() {
2024
- return this.jt.width;
2062
+ return this.Zt.width;
2025
2063
  }
2026
2064
  get height() {
2027
- return this.jt.height;
2065
+ return this.Zt.height;
2028
2066
  }
2029
2067
  get canvas() {
2030
- return this.jt;
2068
+ return this.Zt;
2031
2069
  }
2032
2070
  get isDisposed() {
2033
- return this.Zs;
2071
+ return this.qs;
2034
2072
  }
2035
2073
  }
2036
- class j {
2074
+ class H {
2037
2075
  constructor() {
2038
2076
  throw new I("Textmode is a static class and cannot be instantiated.");
2039
2077
  }
2040
2078
  static async create(A, t = {}) {
2041
2079
  if (!(A == null || A instanceof HTMLCanvasElement || A instanceof HTMLVideoElement || typeof A == "object")) throw new I("First parameter must be HTMLCanvasElement, HTMLVideoElement, or options object.");
2042
2080
  if (typeof t != "object") throw new I("Second parameter must be an options object.");
2043
- if (A instanceof HTMLCanvasElement || A instanceof HTMLVideoElement) return z.create(A, t);
2081
+ if (A instanceof HTMLCanvasElement || A instanceof HTMLVideoElement) return W.create(A, t);
2044
2082
  {
2045
2083
  const e = A || {};
2046
- return z.create(null, e);
2084
+ return W.create(null, e);
2047
2085
  }
2048
2086
  }
2049
2087
  static setErrorLevel(A) {
2050
- u.u(A);
2088
+ D.u(A);
2051
2089
  }
2052
2090
  static get version() {
2053
- return "0.1.9-beta.6";
2091
+ return "0.1.9";
2054
2092
  }
2055
2093
  }
2056
- const kA = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), LA = j.create, jA = j.setErrorLevel, VA = j.version;
2094
+ const HA = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), VA = Object.freeze(Object.defineProperty({ __proto__: null, DEFAULT_FRAMEBUFFER_OPTIONS: { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte" }, Framebuffer: X, Shader: q }, Symbol.toStringTag, { value: "Module" })), NA = H.create, $A = H.setErrorLevel, zA = H.version;
2057
2095
  export {
2058
- CA as TextmodeCanvas,
2059
- uA as TextmodeColorPalette,
2060
- dA as TextmodeConversionPipeline,
2061
- eA as TextmodeErrorLevel,
2062
- cA as TextmodeFont,
2063
- DA as TextmodeGrid,
2064
- z as Textmodifier,
2065
- OA as converters,
2066
- LA as create,
2067
- j as default,
2068
- kA as export,
2069
- jA as setErrorLevel,
2070
- j as textmode,
2071
- VA as version
2096
+ dA as TextmodeCanvas,
2097
+ IA as TextmodeColorPalette,
2098
+ fA as TextmodeConversionPipeline,
2099
+ iA as TextmodeErrorLevel,
2100
+ DA as TextmodeFont,
2101
+ PA as TextmodeGrid,
2102
+ W as Textmodifier,
2103
+ LA as converters,
2104
+ NA as create,
2105
+ HA as export,
2106
+ VA as rendering,
2107
+ $A as setErrorLevel,
2108
+ H as textmode,
2109
+ zA as version
2072
2110
  };