@meursyphus/flitter 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.global.js CHANGED
@@ -1,14 +1,13 @@
1
1
  (() => {
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __defProps = Object.defineProperties;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
4
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
5
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
10
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
7
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __typeError = (msg) => {
9
+ throw TypeError(msg);
10
+ };
12
11
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
12
  var __spreadValues = (a, b) => {
14
13
  for (var prop in b || (b = {}))
@@ -34,212 +33,16 @@
34
33
  }
35
34
  return target;
36
35
  };
37
- var __commonJS = (cb2, mod) => function __require() {
38
- return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
39
- };
40
36
  var __export = (target, all) => {
41
37
  for (var name in all)
42
38
  __defProp(target, name, { get: all[name], enumerable: true });
43
39
  };
44
- var __copyProps = (to, from, except, desc) => {
45
- if (from && typeof from === "object" || typeof from === "function") {
46
- for (let key of __getOwnPropNames(from))
47
- if (!__hasOwnProp.call(to, key) && key !== except)
48
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
49
- }
50
- return to;
51
- };
52
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
53
- // If the importer is in node compatibility mode or this is not an ESM
54
- // file that has been converted to a CommonJS file using a Babel-
55
- // compatible transform (i.e. "__esModule" has not been set), then set
56
- // "default" to the CommonJS "module.exports" for node compatibility.
57
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
58
- mod
59
- ));
60
- var __publicField = (obj, key, value) => {
61
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
62
- return value;
63
- };
64
- var __accessCheck = (obj, member, msg) => {
65
- if (!member.has(obj))
66
- throw TypeError("Cannot " + msg);
67
- };
68
- var __privateGet = (obj, member, getter) => {
69
- __accessCheck(obj, member, "read from private field");
70
- return getter ? getter.call(obj) : member.get(obj);
71
- };
72
- var __privateAdd = (obj, member, value) => {
73
- if (member.has(obj))
74
- throw TypeError("Cannot add the same private member more than once");
75
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
76
- };
77
- var __privateSet = (obj, member, value, setter) => {
78
- __accessCheck(obj, member, "write to private field");
79
- setter ? setter.call(obj, value) : member.set(obj, value);
80
- return value;
81
- };
82
- var __privateMethod = (obj, member, method) => {
83
- __accessCheck(obj, member, "access private method");
84
- return method;
85
- };
86
-
87
- // ../../node_modules/color-name/index.js
88
- var require_color_name = __commonJS({
89
- "../../node_modules/color-name/index.js"(exports, module) {
90
- "use strict";
91
- module.exports = {
92
- "aliceblue": [240, 248, 255],
93
- "antiquewhite": [250, 235, 215],
94
- "aqua": [0, 255, 255],
95
- "aquamarine": [127, 255, 212],
96
- "azure": [240, 255, 255],
97
- "beige": [245, 245, 220],
98
- "bisque": [255, 228, 196],
99
- "black": [0, 0, 0],
100
- "blanchedalmond": [255, 235, 205],
101
- "blue": [0, 0, 255],
102
- "blueviolet": [138, 43, 226],
103
- "brown": [165, 42, 42],
104
- "burlywood": [222, 184, 135],
105
- "cadetblue": [95, 158, 160],
106
- "chartreuse": [127, 255, 0],
107
- "chocolate": [210, 105, 30],
108
- "coral": [255, 127, 80],
109
- "cornflowerblue": [100, 149, 237],
110
- "cornsilk": [255, 248, 220],
111
- "crimson": [220, 20, 60],
112
- "cyan": [0, 255, 255],
113
- "darkblue": [0, 0, 139],
114
- "darkcyan": [0, 139, 139],
115
- "darkgoldenrod": [184, 134, 11],
116
- "darkgray": [169, 169, 169],
117
- "darkgreen": [0, 100, 0],
118
- "darkgrey": [169, 169, 169],
119
- "darkkhaki": [189, 183, 107],
120
- "darkmagenta": [139, 0, 139],
121
- "darkolivegreen": [85, 107, 47],
122
- "darkorange": [255, 140, 0],
123
- "darkorchid": [153, 50, 204],
124
- "darkred": [139, 0, 0],
125
- "darksalmon": [233, 150, 122],
126
- "darkseagreen": [143, 188, 143],
127
- "darkslateblue": [72, 61, 139],
128
- "darkslategray": [47, 79, 79],
129
- "darkslategrey": [47, 79, 79],
130
- "darkturquoise": [0, 206, 209],
131
- "darkviolet": [148, 0, 211],
132
- "deeppink": [255, 20, 147],
133
- "deepskyblue": [0, 191, 255],
134
- "dimgray": [105, 105, 105],
135
- "dimgrey": [105, 105, 105],
136
- "dodgerblue": [30, 144, 255],
137
- "firebrick": [178, 34, 34],
138
- "floralwhite": [255, 250, 240],
139
- "forestgreen": [34, 139, 34],
140
- "fuchsia": [255, 0, 255],
141
- "gainsboro": [220, 220, 220],
142
- "ghostwhite": [248, 248, 255],
143
- "gold": [255, 215, 0],
144
- "goldenrod": [218, 165, 32],
145
- "gray": [128, 128, 128],
146
- "green": [0, 128, 0],
147
- "greenyellow": [173, 255, 47],
148
- "grey": [128, 128, 128],
149
- "honeydew": [240, 255, 240],
150
- "hotpink": [255, 105, 180],
151
- "indianred": [205, 92, 92],
152
- "indigo": [75, 0, 130],
153
- "ivory": [255, 255, 240],
154
- "khaki": [240, 230, 140],
155
- "lavender": [230, 230, 250],
156
- "lavenderblush": [255, 240, 245],
157
- "lawngreen": [124, 252, 0],
158
- "lemonchiffon": [255, 250, 205],
159
- "lightblue": [173, 216, 230],
160
- "lightcoral": [240, 128, 128],
161
- "lightcyan": [224, 255, 255],
162
- "lightgoldenrodyellow": [250, 250, 210],
163
- "lightgray": [211, 211, 211],
164
- "lightgreen": [144, 238, 144],
165
- "lightgrey": [211, 211, 211],
166
- "lightpink": [255, 182, 193],
167
- "lightsalmon": [255, 160, 122],
168
- "lightseagreen": [32, 178, 170],
169
- "lightskyblue": [135, 206, 250],
170
- "lightslategray": [119, 136, 153],
171
- "lightslategrey": [119, 136, 153],
172
- "lightsteelblue": [176, 196, 222],
173
- "lightyellow": [255, 255, 224],
174
- "lime": [0, 255, 0],
175
- "limegreen": [50, 205, 50],
176
- "linen": [250, 240, 230],
177
- "magenta": [255, 0, 255],
178
- "maroon": [128, 0, 0],
179
- "mediumaquamarine": [102, 205, 170],
180
- "mediumblue": [0, 0, 205],
181
- "mediumorchid": [186, 85, 211],
182
- "mediumpurple": [147, 112, 219],
183
- "mediumseagreen": [60, 179, 113],
184
- "mediumslateblue": [123, 104, 238],
185
- "mediumspringgreen": [0, 250, 154],
186
- "mediumturquoise": [72, 209, 204],
187
- "mediumvioletred": [199, 21, 133],
188
- "midnightblue": [25, 25, 112],
189
- "mintcream": [245, 255, 250],
190
- "mistyrose": [255, 228, 225],
191
- "moccasin": [255, 228, 181],
192
- "navajowhite": [255, 222, 173],
193
- "navy": [0, 0, 128],
194
- "oldlace": [253, 245, 230],
195
- "olive": [128, 128, 0],
196
- "olivedrab": [107, 142, 35],
197
- "orange": [255, 165, 0],
198
- "orangered": [255, 69, 0],
199
- "orchid": [218, 112, 214],
200
- "palegoldenrod": [238, 232, 170],
201
- "palegreen": [152, 251, 152],
202
- "paleturquoise": [175, 238, 238],
203
- "palevioletred": [219, 112, 147],
204
- "papayawhip": [255, 239, 213],
205
- "peachpuff": [255, 218, 185],
206
- "peru": [205, 133, 63],
207
- "pink": [255, 192, 203],
208
- "plum": [221, 160, 221],
209
- "powderblue": [176, 224, 230],
210
- "purple": [128, 0, 128],
211
- "rebeccapurple": [102, 51, 153],
212
- "red": [255, 0, 0],
213
- "rosybrown": [188, 143, 143],
214
- "royalblue": [65, 105, 225],
215
- "saddlebrown": [139, 69, 19],
216
- "salmon": [250, 128, 114],
217
- "sandybrown": [244, 164, 96],
218
- "seagreen": [46, 139, 87],
219
- "seashell": [255, 245, 238],
220
- "sienna": [160, 82, 45],
221
- "silver": [192, 192, 192],
222
- "skyblue": [135, 206, 235],
223
- "slateblue": [106, 90, 205],
224
- "slategray": [112, 128, 144],
225
- "slategrey": [112, 128, 144],
226
- "snow": [255, 250, 250],
227
- "springgreen": [0, 255, 127],
228
- "steelblue": [70, 130, 180],
229
- "tan": [210, 180, 140],
230
- "teal": [0, 128, 128],
231
- "thistle": [216, 191, 216],
232
- "tomato": [255, 99, 71],
233
- "turquoise": [64, 224, 208],
234
- "violet": [238, 130, 238],
235
- "wheat": [245, 222, 179],
236
- "white": [255, 255, 255],
237
- "whitesmoke": [245, 245, 245],
238
- "yellow": [255, 255, 0],
239
- "yellowgreen": [154, 205, 50]
240
- };
241
- }
242
- });
40
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
41
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
42
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
43
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
44
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
45
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
243
46
 
244
47
  // src/framework/renderer/canvas/layer.ts
245
48
  var Layer = class {
@@ -256,7 +59,7 @@
256
59
  var PictureLayer = class extends Layer {
257
60
  constructor(paintBounds) {
258
61
  super();
259
- __privateAdd(this, _paintBounds, void 0);
62
+ __privateAdd(this, _paintBounds);
260
63
  __publicField(this, "picture");
261
64
  __privateSet(this, _paintBounds, paintBounds);
262
65
  }
@@ -325,7 +128,7 @@
325
128
  var _source;
326
129
  var Picture = class {
327
130
  constructor(source) {
328
- __privateAdd(this, _source, void 0);
131
+ __privateAdd(this, _source);
329
132
  __privateSet(this, _source, source);
330
133
  }
331
134
  toImage() {
@@ -346,7 +149,7 @@
346
149
  * @implements: This recorder is currently under implementation and does not actually record but directly reflects on the canvas context. Temporarily, it requires the paintSize immediately. The recorder is intended to manage the drawing order for implementing z-index. Once implemented, it will function as a recorder by not directly drawing on the canvas context but recording the operations.
347
150
  */
348
151
  constructor(paintBounds) {
349
- __privateAdd(this, _source2, void 0);
152
+ __privateAdd(this, _source2);
350
153
  __privateSet(this, _source2, document.createElement("canvas"));
351
154
  const dpr = window.devicePixelRatio;
352
155
  __privateGet(this, _source2).width = paintBounds.width * dpr;
@@ -389,8 +192,7 @@
389
192
  const dirtyElements = this.dirtyElements;
390
193
  this.dirtyElements = [];
391
194
  dirtyElements.sort((a, b) => a.depth - b.depth).forEach((elememt) => {
392
- if (!elememt.dirty)
393
- return;
195
+ if (!elememt.dirty) return;
394
196
  elememt.rebuild();
395
197
  });
396
198
  }
@@ -582,8 +384,7 @@
582
384
  return new _Alignment({ x: this.x * value, y: this.y * value });
583
385
  }
584
386
  equals(other) {
585
- if (other === this)
586
- return true;
387
+ if (other === this) return true;
587
388
  return this.x === other.x && this.y === other.y;
588
389
  }
589
390
  /**
@@ -789,8 +590,7 @@
789
590
  return Math.min(max, Math.max(min, value));
790
591
  }
791
592
  static arrayEqual(a, b) {
792
- if (a.length !== b.length)
793
- return false;
593
+ if (a.length !== b.length) return false;
794
594
  return a.every((value, i) => value === b[i]);
795
595
  }
796
596
  static lerp(a, b, t) {
@@ -816,8 +616,7 @@
816
616
  this.height = height;
817
617
  }
818
618
  equal(other) {
819
- if (this === other)
820
- return true;
619
+ if (this === other) return true;
821
620
  return this.width === other.width && this.height === other.height;
822
621
  }
823
622
  static maximum() {
@@ -1061,8 +860,7 @@
1061
860
  return this.equals(other);
1062
861
  }
1063
862
  equals(other) {
1064
- if (this === other)
1065
- return true;
863
+ if (this === other) return true;
1066
864
  return this.maxWidth === other.maxWidth && this.minWidth === other.minWidth && this.maxHeight === other.maxHeight && this.minHeight === other.minHeight;
1067
865
  }
1068
866
  clampDouble(value, min, max) {
@@ -1101,8 +899,7 @@
1101
899
  });
1102
900
  }
1103
901
  equals(other) {
1104
- if (this === other)
1105
- return;
902
+ if (this === other) return;
1106
903
  return this.top === other.top && this.bottom === other.bottom && this.left === other.left && this.right === other.right;
1107
904
  }
1108
905
  /**
@@ -1224,8 +1021,7 @@
1224
1021
  return result;
1225
1022
  }
1226
1023
  equals(other) {
1227
- if (this === other)
1228
- return true;
1024
+ if (this === other) return true;
1229
1025
  return this.topLeft.equals(other.topLeft) && this.topRight.equals(other.topRight) && this.bottomLeft.equals(other.bottomLeft) && this.bottomRight.equals(other.bottomRight);
1230
1026
  }
1231
1027
  /**
@@ -1357,8 +1153,7 @@
1357
1153
  })).close();
1358
1154
  }
1359
1155
  addPolygons(points) {
1360
- if (points.length < 3)
1361
- throw Error("polygons need at least 3 points");
1156
+ if (points.length < 3) throw Error("polygons need at least 3 points");
1362
1157
  this.moveTo(points[0]);
1363
1158
  points.slice(1).forEach((point) => this.lineTo(point));
1364
1159
  return this.close();
@@ -1428,8 +1223,7 @@
1428
1223
  return new _Radius(this.x * value, this.y * value);
1429
1224
  }
1430
1225
  equals(other) {
1431
- if (this === other)
1432
- return true;
1226
+ if (this === other) return true;
1433
1227
  return this.x === other.x && this.y === other.y;
1434
1228
  }
1435
1229
  /**
@@ -9724,8 +9518,7 @@
9724
9518
  return cloned;
9725
9519
  }
9726
9520
  equals(other) {
9727
- if (this === other)
9728
- return true;
9521
+ if (this === other) return true;
9729
9522
  return this.storage.every((value, i) => {
9730
9523
  return other._m4storage[i] === value;
9731
9524
  });
@@ -11319,8 +11112,159 @@
11319
11112
  })(BorderStyle || {});
11320
11113
  var border_style_default = BorderStyle;
11321
11114
 
11115
+ // ../../node_modules/color-name/index.js
11116
+ var color_name_default = {
11117
+ aliceblue: [240, 248, 255],
11118
+ antiquewhite: [250, 235, 215],
11119
+ aqua: [0, 255, 255],
11120
+ aquamarine: [127, 255, 212],
11121
+ azure: [240, 255, 255],
11122
+ beige: [245, 245, 220],
11123
+ bisque: [255, 228, 196],
11124
+ black: [0, 0, 0],
11125
+ blanchedalmond: [255, 235, 205],
11126
+ blue: [0, 0, 255],
11127
+ blueviolet: [138, 43, 226],
11128
+ brown: [165, 42, 42],
11129
+ burlywood: [222, 184, 135],
11130
+ cadetblue: [95, 158, 160],
11131
+ chartreuse: [127, 255, 0],
11132
+ chocolate: [210, 105, 30],
11133
+ coral: [255, 127, 80],
11134
+ cornflowerblue: [100, 149, 237],
11135
+ cornsilk: [255, 248, 220],
11136
+ crimson: [220, 20, 60],
11137
+ cyan: [0, 255, 255],
11138
+ darkblue: [0, 0, 139],
11139
+ darkcyan: [0, 139, 139],
11140
+ darkgoldenrod: [184, 134, 11],
11141
+ darkgray: [169, 169, 169],
11142
+ darkgreen: [0, 100, 0],
11143
+ darkgrey: [169, 169, 169],
11144
+ darkkhaki: [189, 183, 107],
11145
+ darkmagenta: [139, 0, 139],
11146
+ darkolivegreen: [85, 107, 47],
11147
+ darkorange: [255, 140, 0],
11148
+ darkorchid: [153, 50, 204],
11149
+ darkred: [139, 0, 0],
11150
+ darksalmon: [233, 150, 122],
11151
+ darkseagreen: [143, 188, 143],
11152
+ darkslateblue: [72, 61, 139],
11153
+ darkslategray: [47, 79, 79],
11154
+ darkslategrey: [47, 79, 79],
11155
+ darkturquoise: [0, 206, 209],
11156
+ darkviolet: [148, 0, 211],
11157
+ deeppink: [255, 20, 147],
11158
+ deepskyblue: [0, 191, 255],
11159
+ dimgray: [105, 105, 105],
11160
+ dimgrey: [105, 105, 105],
11161
+ dodgerblue: [30, 144, 255],
11162
+ firebrick: [178, 34, 34],
11163
+ floralwhite: [255, 250, 240],
11164
+ forestgreen: [34, 139, 34],
11165
+ fuchsia: [255, 0, 255],
11166
+ gainsboro: [220, 220, 220],
11167
+ ghostwhite: [248, 248, 255],
11168
+ gold: [255, 215, 0],
11169
+ goldenrod: [218, 165, 32],
11170
+ gray: [128, 128, 128],
11171
+ green: [0, 128, 0],
11172
+ greenyellow: [173, 255, 47],
11173
+ grey: [128, 128, 128],
11174
+ honeydew: [240, 255, 240],
11175
+ hotpink: [255, 105, 180],
11176
+ indianred: [205, 92, 92],
11177
+ indigo: [75, 0, 130],
11178
+ ivory: [255, 255, 240],
11179
+ khaki: [240, 230, 140],
11180
+ lavender: [230, 230, 250],
11181
+ lavenderblush: [255, 240, 245],
11182
+ lawngreen: [124, 252, 0],
11183
+ lemonchiffon: [255, 250, 205],
11184
+ lightblue: [173, 216, 230],
11185
+ lightcoral: [240, 128, 128],
11186
+ lightcyan: [224, 255, 255],
11187
+ lightgoldenrodyellow: [250, 250, 210],
11188
+ lightgray: [211, 211, 211],
11189
+ lightgreen: [144, 238, 144],
11190
+ lightgrey: [211, 211, 211],
11191
+ lightpink: [255, 182, 193],
11192
+ lightsalmon: [255, 160, 122],
11193
+ lightseagreen: [32, 178, 170],
11194
+ lightskyblue: [135, 206, 250],
11195
+ lightslategray: [119, 136, 153],
11196
+ lightslategrey: [119, 136, 153],
11197
+ lightsteelblue: [176, 196, 222],
11198
+ lightyellow: [255, 255, 224],
11199
+ lime: [0, 255, 0],
11200
+ limegreen: [50, 205, 50],
11201
+ linen: [250, 240, 230],
11202
+ magenta: [255, 0, 255],
11203
+ maroon: [128, 0, 0],
11204
+ mediumaquamarine: [102, 205, 170],
11205
+ mediumblue: [0, 0, 205],
11206
+ mediumorchid: [186, 85, 211],
11207
+ mediumpurple: [147, 112, 219],
11208
+ mediumseagreen: [60, 179, 113],
11209
+ mediumslateblue: [123, 104, 238],
11210
+ mediumspringgreen: [0, 250, 154],
11211
+ mediumturquoise: [72, 209, 204],
11212
+ mediumvioletred: [199, 21, 133],
11213
+ midnightblue: [25, 25, 112],
11214
+ mintcream: [245, 255, 250],
11215
+ mistyrose: [255, 228, 225],
11216
+ moccasin: [255, 228, 181],
11217
+ navajowhite: [255, 222, 173],
11218
+ navy: [0, 0, 128],
11219
+ oldlace: [253, 245, 230],
11220
+ olive: [128, 128, 0],
11221
+ olivedrab: [107, 142, 35],
11222
+ orange: [255, 165, 0],
11223
+ orangered: [255, 69, 0],
11224
+ orchid: [218, 112, 214],
11225
+ palegoldenrod: [238, 232, 170],
11226
+ palegreen: [152, 251, 152],
11227
+ paleturquoise: [175, 238, 238],
11228
+ palevioletred: [219, 112, 147],
11229
+ papayawhip: [255, 239, 213],
11230
+ peachpuff: [255, 218, 185],
11231
+ peru: [205, 133, 63],
11232
+ pink: [255, 192, 203],
11233
+ plum: [221, 160, 221],
11234
+ powderblue: [176, 224, 230],
11235
+ purple: [128, 0, 128],
11236
+ rebeccapurple: [102, 51, 153],
11237
+ red: [255, 0, 0],
11238
+ rosybrown: [188, 143, 143],
11239
+ royalblue: [65, 105, 225],
11240
+ saddlebrown: [139, 69, 19],
11241
+ salmon: [250, 128, 114],
11242
+ sandybrown: [244, 164, 96],
11243
+ seagreen: [46, 139, 87],
11244
+ seashell: [255, 245, 238],
11245
+ sienna: [160, 82, 45],
11246
+ silver: [192, 192, 192],
11247
+ skyblue: [135, 206, 235],
11248
+ slateblue: [106, 90, 205],
11249
+ slategray: [112, 128, 144],
11250
+ slategrey: [112, 128, 144],
11251
+ snow: [255, 250, 250],
11252
+ springgreen: [0, 255, 127],
11253
+ steelblue: [70, 130, 180],
11254
+ tan: [210, 180, 140],
11255
+ teal: [0, 128, 128],
11256
+ thistle: [216, 191, 216],
11257
+ tomato: [255, 99, 71],
11258
+ turquoise: [64, 224, 208],
11259
+ violet: [238, 130, 238],
11260
+ wheat: [245, 222, 179],
11261
+ white: [255, 255, 255],
11262
+ whitesmoke: [245, 245, 245],
11263
+ yellow: [255, 255, 0],
11264
+ yellowgreen: [154, 205, 50]
11265
+ };
11266
+
11322
11267
  // ../../node_modules/color-parse/index.js
11323
- var import_color_name = __toESM(require_color_name(), 1);
11324
11268
  var color_parse_default = parse;
11325
11269
  var baseHues = {
11326
11270
  red: 0,
@@ -11336,11 +11280,10 @@
11336
11280
  if (typeof cstr === "number") {
11337
11281
  return { space: "rgb", values: [cstr >>> 16, (cstr & 65280) >>> 8, cstr & 255], alpha: 1 };
11338
11282
  }
11339
- if (typeof cstr === "number")
11340
- return { space: "rgb", values: [cstr >>> 16, (cstr & 65280) >>> 8, cstr & 255], alpha: 1 };
11283
+ if (typeof cstr === "number") return { space: "rgb", values: [cstr >>> 16, (cstr & 65280) >>> 8, cstr & 255], alpha: 1 };
11341
11284
  cstr = String(cstr).toLowerCase();
11342
- if (import_color_name.default[cstr]) {
11343
- parts = import_color_name.default[cstr].slice();
11285
+ if (color_name_default[cstr]) {
11286
+ parts = color_name_default[cstr].slice();
11344
11287
  space = "rgb";
11345
11288
  } else if (cstr === "transparent") {
11346
11289
  alpha2 = 0;
@@ -11370,57 +11313,38 @@
11370
11313
  alpha2 = parseInt(base[6] + base[7], 16) / 255;
11371
11314
  }
11372
11315
  }
11373
- if (!parts[0])
11374
- parts[0] = 0;
11375
- if (!parts[1])
11376
- parts[1] = 0;
11377
- if (!parts[2])
11378
- parts[2] = 0;
11316
+ if (!parts[0]) parts[0] = 0;
11317
+ if (!parts[1]) parts[1] = 0;
11318
+ if (!parts[2]) parts[2] = 0;
11379
11319
  space = "rgb";
11380
11320
  } else if (m = /^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(cstr)) {
11381
11321
  var name = m[1];
11382
11322
  space = name.replace(/a$/, "");
11383
11323
  var dims = space === "cmyk" ? 4 : space === "gray" ? 1 : 3;
11384
11324
  parts = m[2].trim().split(/\s*[,\/]\s*|\s+/);
11385
- if (space === "color")
11386
- space = parts.shift();
11325
+ if (space === "color") space = parts.shift();
11387
11326
  parts = parts.map(function(x, i) {
11388
11327
  if (x[x.length - 1] === "%") {
11389
11328
  x = parseFloat(x) / 100;
11390
- if (i === 3)
11391
- return x;
11392
- if (space === "rgb")
11393
- return x * 255;
11394
- if (space[0] === "h")
11395
- return x * 100;
11396
- if (space[0] === "l" && !i)
11397
- return x * 100;
11398
- if (space === "lab")
11399
- return x * 125;
11400
- if (space === "lch")
11401
- return i < 2 ? x * 150 : x * 360;
11402
- if (space[0] === "o" && !i)
11403
- return x;
11404
- if (space === "oklab")
11405
- return x * 0.4;
11406
- if (space === "oklch")
11407
- return i < 2 ? x * 0.4 : x * 360;
11329
+ if (i === 3) return x;
11330
+ if (space === "rgb") return x * 255;
11331
+ if (space[0] === "h") return x * 100;
11332
+ if (space[0] === "l" && !i) return x * 100;
11333
+ if (space === "lab") return x * 125;
11334
+ if (space === "lch") return i < 2 ? x * 150 : x * 360;
11335
+ if (space[0] === "o" && !i) return x;
11336
+ if (space === "oklab") return x * 0.4;
11337
+ if (space === "oklch") return i < 2 ? x * 0.4 : x * 360;
11408
11338
  return x;
11409
11339
  }
11410
11340
  if (space[i] === "h" || i === 2 && space[space.length - 1] === "h") {
11411
- if (baseHues[x] !== void 0)
11412
- return baseHues[x];
11413
- if (x.endsWith("deg"))
11414
- return parseFloat(x);
11415
- if (x.endsWith("turn"))
11416
- return parseFloat(x) * 360;
11417
- if (x.endsWith("grad"))
11418
- return parseFloat(x) * 360 / 400;
11419
- if (x.endsWith("rad"))
11420
- return parseFloat(x) * 180 / Math.PI;
11341
+ if (baseHues[x] !== void 0) return baseHues[x];
11342
+ if (x.endsWith("deg")) return parseFloat(x);
11343
+ if (x.endsWith("turn")) return parseFloat(x) * 360;
11344
+ if (x.endsWith("grad")) return parseFloat(x) * 360 / 400;
11345
+ if (x.endsWith("rad")) return parseFloat(x) * 180 / Math.PI;
11421
11346
  }
11422
- if (x === "none")
11423
- return 0;
11347
+ if (x === "none") return 0;
11424
11348
  return parseFloat(x);
11425
11349
  });
11426
11350
  alpha2 = parts.length > dims ? parts.pop() : 1;
@@ -11455,8 +11379,7 @@
11455
11379
  alias: ["HSL"],
11456
11380
  rgb: function(hsl) {
11457
11381
  var h = hsl[0] / 360, s = hsl[1] / 100, l = hsl[2] / 100, t1, t2, t3, rgb, val, i = 0;
11458
- if (s === 0)
11459
- return val = l * 255, [val, val, val];
11382
+ if (s === 0) return val = l * 255, [val, val, val];
11460
11383
  t2 = l < 0.5 ? l * (1 + s) : l + s - l * s;
11461
11384
  t1 = 2 * l - t2;
11462
11385
  rgb = [0, 0, 0];
@@ -11497,14 +11420,11 @@
11497
11420
 
11498
11421
  // ../../node_modules/color-rgba/index.js
11499
11422
  function rgba(color2) {
11500
- if (Array.isArray(color2) && color2.raw)
11501
- color2 = String.raw(...arguments);
11502
- if (color2 instanceof Number)
11503
- color2 = +color2;
11423
+ if (Array.isArray(color2) && color2.raw) color2 = String.raw(...arguments);
11424
+ if (color2 instanceof Number) color2 = +color2;
11504
11425
  var values, i, l;
11505
11426
  var parsed = color_parse_default(color2);
11506
- if (!parsed.space)
11507
- return [];
11427
+ if (!parsed.space) return [];
11508
11428
  const min = parsed.space[0] === "h" ? hsl_default.min : rgb_default.min;
11509
11429
  const max = parsed.space[0] === "h" ? hsl_default.max : rgb_default.max;
11510
11430
  values = Array(3);
@@ -11555,8 +11475,7 @@
11555
11475
  });
11556
11476
  }
11557
11477
  equals(other) {
11558
- if (this === other)
11559
- return true;
11478
+ if (this === other) return true;
11560
11479
  return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;
11561
11480
  }
11562
11481
  };
@@ -11599,8 +11518,7 @@
11599
11518
  return this.equals(other);
11600
11519
  }
11601
11520
  equals(other) {
11602
- if (this === other)
11603
- return true;
11521
+ if (this === other) return true;
11604
11522
  return this.color === other.color && this.width === other.width && this.style === other.style && this.strokeAlign === other.strokeAlign;
11605
11523
  }
11606
11524
  static get none() {
@@ -11678,8 +11596,7 @@
11678
11596
  });
11679
11597
  }
11680
11598
  equals(other) {
11681
- if (this === other)
11682
- return true;
11599
+ if (this === other) return true;
11683
11600
  return this.top.equals(other.top) && this.right.equals(other.right) && this.bottom.equals(other.bottom) && this.left.equals(other.left);
11684
11601
  }
11685
11602
  /**
@@ -12299,8 +12216,7 @@
12299
12216
  });
12300
12217
  }
12301
12218
  equals(other) {
12302
- if (this === other)
12303
- return true;
12219
+ if (this === other) return true;
12304
12220
  return this.color === other.color && this.offset.equals(other.offset) && this.blurRadius === other.blurRadius;
12305
12221
  }
12306
12222
  };
@@ -12353,8 +12269,7 @@
12353
12269
  });
12354
12270
  }
12355
12271
  equals(other) {
12356
- if (this === other)
12357
- return true;
12272
+ if (this === other) return true;
12358
12273
  if (!(this.color == null && other.color == null) && (!(this.color != null && other.color != null) || !this.color.equals(other.color))) {
12359
12274
  return false;
12360
12275
  }
@@ -12367,8 +12282,7 @@
12367
12282
  if (!(this.boxShadow == null && other.boxShadow == null) && (!(this.boxShadow != null && other.boxShadow != null) || !box_shadow_default.equals(this.boxShadow, other.boxShadow))) {
12368
12283
  return false;
12369
12284
  }
12370
- if (this.shape !== other.shape)
12371
- return false;
12285
+ if (this.shape !== other.shape) return false;
12372
12286
  return true;
12373
12287
  }
12374
12288
  get padding() {
@@ -12600,8 +12514,7 @@
12600
12514
  this.height = height;
12601
12515
  }
12602
12516
  equals(other) {
12603
- if (this === other)
12604
- return true;
12517
+ if (this === other) return true;
12605
12518
  return this.inherit === other.inherit && this.color === other.color && this.fontSize === other.fontSize && this.fontWeight === other.fontWeight && this.fontFamily === other.fontFamily && this.textBaseline === other.textBaseline && this.fontStyle === other.fontStyle;
12606
12519
  }
12607
12520
  copyWidth({
@@ -12626,10 +12539,8 @@
12626
12539
  });
12627
12540
  }
12628
12541
  merge(other) {
12629
- if (other == null)
12630
- return this;
12631
- if (!other.inherit)
12632
- return other;
12542
+ if (other == null) return this;
12543
+ if (!other.inherit) return other;
12633
12544
  return this.copyWidth(__spreadValues({}, other));
12634
12545
  }
12635
12546
  getParagraphStyle({
@@ -12698,16 +12609,14 @@
12698
12609
  this.style = style;
12699
12610
  }
12700
12611
  static equals(targets, values) {
12701
- if (targets.length !== values.length)
12702
- return false;
12612
+ if (targets.length !== values.length) return false;
12703
12613
  return targets.every((value, i) => values[i].equals(value));
12704
12614
  }
12705
12615
  equals(other) {
12706
12616
  if (this.style != null || other.style != null) {
12707
12617
  return this.style.equals(other.style);
12708
12618
  }
12709
- if (this.style == null && other.style == null)
12710
- return true;
12619
+ if (this.style == null && other.style == null) return true;
12711
12620
  return false;
12712
12621
  }
12713
12622
  computeToPlainText() {
@@ -12739,8 +12648,7 @@
12739
12648
  this.text = text;
12740
12649
  }
12741
12650
  equals(other) {
12742
- if (other === this)
12743
- return true;
12651
+ if (other === this) return true;
12744
12652
  return this.text === other.text && this.style.equals(other.style) && Inline_span_default.equals(this.children, other.children);
12745
12653
  }
12746
12654
  visitChildren(visitor) {
@@ -12824,28 +12732,23 @@
12824
12732
  return ((_a = this.text) == null ? void 0 : _a.toPlainText()) || "";
12825
12733
  }
12826
12734
  get width() {
12827
- if (this.paragraph == null)
12828
- return 0;
12735
+ if (this.paragraph == null) return 0;
12829
12736
  return this.paragraph.width;
12830
12737
  }
12831
12738
  get height() {
12832
- if (this.paragraph == null)
12833
- return 0;
12739
+ if (this.paragraph == null) return 0;
12834
12740
  return this.paragraph.height;
12835
12741
  }
12836
12742
  get intrinsicWidth() {
12837
- if (this.paragraph == null)
12838
- return 0;
12743
+ if (this.paragraph == null) return 0;
12839
12744
  return this.paragraph.intrinsicWidth;
12840
12745
  }
12841
12746
  get intrinsicHeight() {
12842
- if (this.paragraph == null)
12843
- return 0;
12747
+ if (this.paragraph == null) return 0;
12844
12748
  return this.paragraph.intrinsicHeight;
12845
12749
  }
12846
12750
  get longestLine() {
12847
- if (this.paragraph == null)
12848
- return 0;
12751
+ if (this.paragraph == null) return 0;
12849
12752
  return this.paragraph.longestLine;
12850
12753
  }
12851
12754
  paintOnCanvas(ctx, offset) {
@@ -13583,8 +13486,7 @@
13583
13486
  const dirties = this.needsLayoutRenderObjects;
13584
13487
  this.needsLayoutRenderObjects = [];
13585
13488
  dirties.sort((a, b) => a.depth - b.depth).forEach((renderObject) => {
13586
- if (!renderObject.needsLayout)
13587
- return;
13489
+ if (!renderObject.needsLayout) return;
13588
13490
  renderObject.layoutWithoutResize();
13589
13491
  });
13590
13492
  }
@@ -13593,8 +13495,7 @@
13593
13495
  this.requestVisualUpdate();
13594
13496
  }
13595
13497
  recalculateZOrder() {
13596
- if (!__privateGet(this, _zOrderChanged))
13597
- return [];
13498
+ if (!__privateGet(this, _zOrderChanged)) return [];
13598
13499
  __privateSet(this, _zOrderChanged, false);
13599
13500
  const visitor = new ZOrderCalculatorVisitor();
13600
13501
  this.renderView.accept(visitor);
@@ -13609,8 +13510,7 @@
13609
13510
  const dirties = this.needsPaintTransformUpdateRenderObjects;
13610
13511
  this.needsPaintTransformUpdateRenderObjects = [];
13611
13512
  dirties.sort((a, b) => a.depth - b.depth).forEach((renderObject) => {
13612
- if (!renderObject.needsPaintTransformUpdate)
13613
- return;
13513
+ if (!renderObject.needsPaintTransformUpdate) return;
13614
13514
  renderObject.updatePaintTransform();
13615
13515
  });
13616
13516
  }
@@ -13652,21 +13552,21 @@
13652
13552
  this.renderObject.paintTransform = newValue;
13653
13553
  }
13654
13554
  };
13655
- var _visit, visit_fn;
13555
+ var _ZOrderCalculatorVisitor_instances, visit_fn;
13656
13556
  var ZOrderCalculatorVisitor = class {
13657
13557
  constructor() {
13658
- __privateAdd(this, _visit);
13558
+ __privateAdd(this, _ZOrderCalculatorVisitor_instances);
13659
13559
  __publicField(this, "collectedRenderObjects", []);
13660
13560
  __publicField(this, "currentVisitedOrder", 0);
13661
13561
  __publicField(this, "currentStackingContext", []);
13662
13562
  }
13663
13563
  visit(renderObject) {
13664
- __privateMethod(this, _visit, visit_fn).call(this, renderObject, {
13564
+ __privateMethod(this, _ZOrderCalculatorVisitor_instances, visit_fn).call(this, renderObject, {
13665
13565
  willCollect: renderObject.isPainter
13666
13566
  });
13667
13567
  }
13668
13568
  visitGestureDetector(gestureDetector) {
13669
- __privateMethod(this, _visit, visit_fn).call(this, gestureDetector, { willCollect: true });
13569
+ __privateMethod(this, _ZOrderCalculatorVisitor_instances, visit_fn).call(this, gestureDetector, { willCollect: true });
13670
13570
  }
13671
13571
  visitZIndex(renderObject) {
13672
13572
  this.currentStackingContext = [...this.currentStackingContext];
@@ -13674,7 +13574,7 @@
13674
13574
  visitedOrder: this.currentVisitedOrder,
13675
13575
  zIndex: renderObject.zIndex
13676
13576
  });
13677
- __privateMethod(this, _visit, visit_fn).call(this, renderObject, { willCollect: false });
13577
+ __privateMethod(this, _ZOrderCalculatorVisitor_instances, visit_fn).call(this, renderObject, { willCollect: false });
13678
13578
  this.currentStackingContext = [...this.currentStackingContext];
13679
13579
  this.currentStackingContext.pop();
13680
13580
  }
@@ -13717,7 +13617,7 @@
13717
13617
  return sorted.map(({ renderObject }) => renderObject);
13718
13618
  }
13719
13619
  };
13720
- _visit = new WeakSet();
13620
+ _ZOrderCalculatorVisitor_instances = new WeakSet();
13721
13621
  visit_fn = function(renderObject, { willCollect }) {
13722
13622
  if (willCollect) {
13723
13623
  this.collectedRenderObjects.push({
@@ -13732,11 +13632,11 @@
13732
13632
  };
13733
13633
 
13734
13634
  // src/framework/renderer/svg/svg-renderer.ts
13735
- var _rearrangeDomOrder, rearrangeDomOrder_fn;
13635
+ var _SvgRenderPipeline_instances, rearrangeDomOrder_fn;
13736
13636
  var SvgRenderPipeline = class extends RenderPipeline {
13737
13637
  constructor() {
13738
13638
  super(...arguments);
13739
- __privateAdd(this, _rearrangeDomOrder);
13639
+ __privateAdd(this, _SvgRenderPipeline_instances);
13740
13640
  __publicField(this, "paintContext", {
13741
13641
  isOnBrowser: () => typeof this.renderContext.window !== "undefined",
13742
13642
  createSvgEl: (tagName) => {
@@ -13764,21 +13664,20 @@
13764
13664
  this.flushPaintTransformUpdate();
13765
13665
  this.flushPaint();
13766
13666
  const painterRenderObjects = this.recalculateZOrder();
13767
- __privateMethod(this, _rearrangeDomOrder, rearrangeDomOrder_fn).call(this, painterRenderObjects);
13667
+ __privateMethod(this, _SvgRenderPipeline_instances, rearrangeDomOrder_fn).call(this, painterRenderObjects);
13768
13668
  }
13769
13669
  reinitializeFrame() {
13770
13670
  this.renderView.layout(constraints_default.tight(this.renderContext.viewSize));
13771
13671
  this.renderView.updatePaintTransform();
13772
13672
  this.renderView.svgPainter.paint(this.paintContext);
13773
13673
  const painterRenderObjects = this.recalculateZOrder();
13774
- __privateMethod(this, _rearrangeDomOrder, rearrangeDomOrder_fn).call(this, painterRenderObjects);
13674
+ __privateMethod(this, _SvgRenderPipeline_instances, rearrangeDomOrder_fn).call(this, painterRenderObjects);
13775
13675
  }
13776
13676
  flushPaint() {
13777
13677
  const dirties = this.needsPaintRenderObjects;
13778
13678
  this.needsPaintRenderObjects = [];
13779
13679
  dirties.sort((a, b) => a.depth - b.depth).forEach((renderObject) => {
13780
- if (!renderObject.needsPaint)
13781
- return;
13680
+ if (!renderObject.needsPaint) return;
13782
13681
  renderObject.svgPainter.paintWithoutLayout(this.paintContext);
13783
13682
  });
13784
13683
  }
@@ -13801,7 +13700,7 @@
13801
13700
  renderObject.svgPainter.didChangePaintTransform();
13802
13701
  }
13803
13702
  };
13804
- _rearrangeDomOrder = new WeakSet();
13703
+ _SvgRenderPipeline_instances = new WeakSet();
13805
13704
  rearrangeDomOrder_fn = function(painterRenderObjects) {
13806
13705
  painterRenderObjects.reverse();
13807
13706
  painterRenderObjects.forEach((child) => {
@@ -13821,16 +13720,15 @@
13821
13720
  }
13822
13721
 
13823
13722
  // src/framework/renderer/canvas/canvas-painting-context.ts
13824
- var _estimateBound, _containerLayer, _currentLayer, _recorder, _ctx2, _startRecording, startRecording_fn, _appendLayer, appendLayer_fn;
13723
+ var _estimateBound, _containerLayer, _currentLayer, _recorder, _ctx2, _CanvasPaintingContext_instances, startRecording_fn, appendLayer_fn;
13825
13724
  var _CanvasPaintingContext = class _CanvasPaintingContext {
13826
13725
  constructor(containerLayer, estimateBound) {
13827
- __privateAdd(this, _startRecording);
13828
- __privateAdd(this, _appendLayer);
13829
- __privateAdd(this, _estimateBound, void 0);
13830
- __privateAdd(this, _containerLayer, void 0);
13831
- __privateAdd(this, _currentLayer, void 0);
13832
- __privateAdd(this, _recorder, void 0);
13833
- __privateAdd(this, _ctx2, void 0);
13726
+ __privateAdd(this, _CanvasPaintingContext_instances);
13727
+ __privateAdd(this, _estimateBound);
13728
+ __privateAdd(this, _containerLayer);
13729
+ __privateAdd(this, _currentLayer);
13730
+ __privateAdd(this, _recorder);
13731
+ __privateAdd(this, _ctx2);
13834
13732
  __privateSet(this, _containerLayer, containerLayer);
13835
13733
  __privateSet(this, _estimateBound, estimateBound);
13836
13734
  }
@@ -13863,7 +13761,7 @@
13863
13761
  }
13864
13762
  get canvas() {
13865
13763
  if (__privateGet(this, _ctx2) == null) {
13866
- __privateMethod(this, _startRecording, startRecording_fn).call(this);
13764
+ __privateMethod(this, _CanvasPaintingContext_instances, startRecording_fn).call(this);
13867
13765
  }
13868
13766
  return __privateGet(this, _ctx2);
13869
13767
  }
@@ -13875,7 +13773,7 @@
13875
13773
  }
13876
13774
  addLayer(layer) {
13877
13775
  this.stopRecording();
13878
- __privateMethod(this, _appendLayer, appendLayer_fn).call(this, layer);
13776
+ __privateMethod(this, _CanvasPaintingContext_instances, appendLayer_fn).call(this, layer);
13879
13777
  }
13880
13778
  /**
13881
13779
  *
@@ -13895,39 +13793,37 @@
13895
13793
  _currentLayer = new WeakMap();
13896
13794
  _recorder = new WeakMap();
13897
13795
  _ctx2 = new WeakMap();
13898
- _startRecording = new WeakSet();
13796
+ _CanvasPaintingContext_instances = new WeakSet();
13899
13797
  startRecording_fn = function() {
13900
13798
  __privateSet(this, _currentLayer, new PictureLayer(__privateGet(this, _estimateBound)));
13901
13799
  __privateSet(this, _recorder, new PictureRecorder(__privateGet(this, _estimateBound)));
13902
13800
  __privateSet(this, _ctx2, __privateGet(this, _recorder).createCanvasContext());
13903
13801
  __privateGet(this, _containerLayer).append(__privateGet(this, _currentLayer));
13904
13802
  };
13905
- _appendLayer = new WeakSet();
13906
13803
  appendLayer_fn = function(layer) {
13907
13804
  __privateGet(this, _containerLayer).append(layer);
13908
13805
  };
13909
13806
  var CanvasPaintingContext = _CanvasPaintingContext;
13910
13807
 
13911
13808
  // src/framework/renderer/canvas/canvas-renderer.ts
13912
- var _compositeFrame, compositeFrame_fn, _prepareCanvas, prepareCanvas_fn;
13809
+ var _CanvasRenderPipeline_instances, compositeFrame_fn, prepareCanvas_fn;
13913
13810
  var CanvasRenderPipeline = class extends RenderPipeline {
13914
13811
  constructor() {
13915
13812
  super(...arguments);
13916
- __privateAdd(this, _compositeFrame);
13917
- __privateAdd(this, _prepareCanvas);
13813
+ __privateAdd(this, _CanvasRenderPipeline_instances);
13918
13814
  }
13919
13815
  drawFrame() {
13920
13816
  this.flushLayout();
13921
13817
  this.flushPaintTransformUpdate();
13922
13818
  this.flushPaint();
13923
13819
  this.recalculateZOrder();
13924
- __privateMethod(this, _compositeFrame, compositeFrame_fn).call(this);
13820
+ __privateMethod(this, _CanvasRenderPipeline_instances, compositeFrame_fn).call(this);
13925
13821
  }
13926
13822
  reinitializeFrame() {
13927
13823
  this.renderView.layout(constraints_default.tight(this.renderContext.viewSize));
13928
13824
  this.renderView.updatePaintTransform();
13929
13825
  CanvasPaintingContext.repaintCompositedChild(this.renderView);
13930
- __privateMethod(this, _compositeFrame, compositeFrame_fn).call(this);
13826
+ __privateMethod(this, _CanvasRenderPipeline_instances, compositeFrame_fn).call(this);
13931
13827
  }
13932
13828
  flushPaint() {
13933
13829
  const dirties = this.needsPaintRenderObjects;
@@ -13972,14 +13868,13 @@
13972
13868
  renderObjet.markNeedsPaint();
13973
13869
  }
13974
13870
  };
13975
- _compositeFrame = new WeakSet();
13871
+ _CanvasRenderPipeline_instances = new WeakSet();
13976
13872
  compositeFrame_fn = function() {
13977
13873
  const builder = new SceneBuilder();
13978
- const ctx = __privateMethod(this, _prepareCanvas, prepareCanvas_fn).call(this, this.renderContext.view);
13874
+ const ctx = __privateMethod(this, _CanvasRenderPipeline_instances, prepareCanvas_fn).call(this, this.renderContext.view);
13979
13875
  this.renderView.canvasPainter.layer.buildScene(builder);
13980
13876
  builder.render(ctx);
13981
13877
  };
13982
- _prepareCanvas = new WeakSet();
13983
13878
  prepareCanvas_fn = function(canvas) {
13984
13879
  const size = this.renderContext.viewSize;
13985
13880
  const dpr = window.devicePixelRatio;
@@ -14012,9 +13907,9 @@
14012
13907
  var SvgPainter = class extends Painter {
14013
13908
  constructor() {
14014
13909
  super(...arguments);
14015
- __privateAdd(this, _clipId, void 0);
13910
+ __privateAdd(this, _clipId);
14016
13911
  __privateAdd(this, _opacity, 1);
14017
- __privateAdd(this, _domNode, void 0);
13912
+ __privateAdd(this, _domNode);
14018
13913
  /**
14019
13914
  * domOrder is used to rearrange dom order
14020
13915
  */
@@ -14124,8 +14019,7 @@
14124
14019
  * It is currently only used on ZIndexRenderObject
14125
14020
  */
14126
14021
  rearrangeDomOrder() {
14127
- if (!__privateGet(this, _domOrderChanged))
14128
- return;
14022
+ if (!__privateGet(this, _domOrderChanged)) return;
14129
14023
  if (this.isPainter && this.domNode) {
14130
14024
  this.renderOwner.paintContext.insertSvgEl(
14131
14025
  this.domNode,
@@ -14153,7 +14047,7 @@
14153
14047
  var CanvasPainter = class extends Painter {
14154
14048
  constructor() {
14155
14049
  super(...arguments);
14156
- __privateAdd(this, _layer, void 0);
14050
+ __privateAdd(this, _layer);
14157
14051
  }
14158
14052
  get renderOwner() {
14159
14053
  return this.renderObject.renderOwner;
@@ -14233,8 +14127,7 @@
14233
14127
  }
14234
14128
  }
14235
14129
  schedule() {
14236
- if (this.hasScheduledFrame)
14237
- return;
14130
+ if (this.hasScheduledFrame) return;
14238
14131
  this.renderFrameDispatcher.dispatch();
14239
14132
  this.hasScheduledFrame = true;
14240
14133
  }
@@ -14264,24 +14157,95 @@
14264
14157
  };
14265
14158
  var Scheduler_default = Scheduler;
14266
14159
 
14160
+ // src/framework/Vsync.ts
14161
+ var Vsync = class _Vsync {
14162
+ constructor() {
14163
+ __publicField(this, "callbacks");
14164
+ __publicField(this, "frameRequested");
14165
+ __publicField(this, "rafId");
14166
+ /**
14167
+ * Handles the animation frame by executing all queued callbacks.
14168
+ */
14169
+ __publicField(this, "handleFrame", (time) => {
14170
+ this.frameRequested = false;
14171
+ this.rafId = null;
14172
+ const callbacksToRun = [...this.callbacks];
14173
+ this.callbacks = [];
14174
+ for (const callback of callbacksToRun) {
14175
+ callback(time);
14176
+ }
14177
+ if (this.callbacks.length > 0 && !this.frameRequested) {
14178
+ this.frameRequested = true;
14179
+ this.rafId = requestAnimationFrame(this.handleFrame);
14180
+ }
14181
+ });
14182
+ this.callbacks = [];
14183
+ this.frameRequested = false;
14184
+ this.rafId = null;
14185
+ }
14186
+ static getInstance() {
14187
+ if (typeof window === "undefined") {
14188
+ throw new Error("Vsync requires window object");
14189
+ }
14190
+ if (!window.__flitter_vsync__) {
14191
+ window.__flitter_vsync__ = new _Vsync();
14192
+ }
14193
+ return window.__flitter_vsync__;
14194
+ }
14195
+ /**
14196
+ * Schedules a callback to be executed in the next animation frame.
14197
+ * If there's already a frame requested, the callback will be queued
14198
+ * to run with other callbacks in that frame.
14199
+ */
14200
+ requestCallback(callback) {
14201
+ this.callbacks.push(callback);
14202
+ if (!this.frameRequested) {
14203
+ this.frameRequested = true;
14204
+ this.rafId = requestAnimationFrame(this.handleFrame);
14205
+ }
14206
+ }
14207
+ /**
14208
+ * Removes a previously scheduled callback.
14209
+ */
14210
+ cancelCallback(callback) {
14211
+ const index = this.callbacks.indexOf(callback);
14212
+ if (index !== -1) {
14213
+ this.callbacks.splice(index, 1);
14214
+ }
14215
+ if (this.callbacks.length === 0 && this.rafId !== null) {
14216
+ cancelAnimationFrame(this.rafId);
14217
+ this.frameRequested = false;
14218
+ this.rafId = null;
14219
+ }
14220
+ }
14221
+ };
14222
+
14267
14223
  // src/framework/RenderFrameDispatcher.ts
14224
+ var _vsync;
14268
14225
  var RenderFrameDispatcher = class {
14269
14226
  constructor({ onFrame } = {}) {
14270
14227
  __publicField(this, "onFrame");
14228
+ __privateAdd(this, _vsync, null);
14271
14229
  this.onFrame = onFrame;
14272
14230
  }
14231
+ get vsync() {
14232
+ if (!__privateGet(this, _vsync)) {
14233
+ __privateSet(this, _vsync, Vsync.getInstance());
14234
+ }
14235
+ return __privateGet(this, _vsync);
14236
+ }
14273
14237
  setOnFrame(callback) {
14274
14238
  this.onFrame = () => callback();
14275
14239
  }
14276
14240
  dispatch() {
14277
- if (typeof window === "undefined")
14278
- return;
14279
- window.requestAnimationFrame(() => {
14241
+ if (typeof window === "undefined") return;
14242
+ this.vsync.requestCallback(() => {
14280
14243
  var _a;
14281
14244
  (_a = this.onFrame) == null ? void 0 : _a.call(this);
14282
14245
  });
14283
14246
  }
14284
14247
  };
14248
+ _vsync = new WeakMap();
14285
14249
  var RenderFrameDispatcher_default = RenderFrameDispatcher;
14286
14250
 
14287
14251
  // src/framework/Globalkey.ts
@@ -14301,10 +14265,10 @@
14301
14265
  var Globalkey_default = GlobalKey;
14302
14266
 
14303
14267
  // src/renderobject/RenderObject.ts
14304
- var _zOrder, _svgPainter, _canvasPainter, _didChangePaintTransform2, didChangePaintTransform_fn;
14268
+ var _zOrder, _svgPainter, _canvasPainter, _RenderObject_instances, didChangePaintTransform_fn;
14305
14269
  var RenderObject = class {
14306
14270
  constructor({ isPainter }) {
14307
- __privateAdd(this, _didChangePaintTransform2);
14271
+ __privateAdd(this, _RenderObject_instances);
14308
14272
  __publicField(this, "runtimeType", this.constructor.name);
14309
14273
  __publicField(this, "isPainter");
14310
14274
  __publicField(this, "ownerElement");
@@ -14319,9 +14283,9 @@
14319
14283
  * zOrder is used to order the render objects in the z axis
14320
14284
  * Also related to event bubbling on HitTestDispatcher
14321
14285
  */
14322
- __privateAdd(this, _zOrder, void 0);
14323
- __privateAdd(this, _svgPainter, void 0);
14324
- __privateAdd(this, _canvasPainter, void 0);
14286
+ __privateAdd(this, _zOrder);
14287
+ __privateAdd(this, _svgPainter);
14288
+ __privateAdd(this, _canvasPainter);
14325
14289
  __publicField(this, "type", this.constructor.name);
14326
14290
  __publicField(this, "constraints", constraints_default.loose(size_default.maximum()));
14327
14291
  __publicField(this, "_offset", offset_default.zero());
@@ -14333,8 +14297,7 @@
14333
14297
  return __privateGet(this, _zOrder);
14334
14298
  }
14335
14299
  updateZOrder(value) {
14336
- if (__privateGet(this, _zOrder) === value)
14337
- return;
14300
+ if (__privateGet(this, _zOrder) === value) return;
14338
14301
  __privateSet(this, _zOrder, value);
14339
14302
  if (__privateGet(this, _svgPainter) != null) {
14340
14303
  __privateGet(this, _svgPainter).didDomOrderChange();
@@ -14371,8 +14334,7 @@
14371
14334
  return this._offset;
14372
14335
  }
14373
14336
  set offset(value) {
14374
- if (this.offset.x === value.x && this.offset.y === value.y)
14375
- return;
14337
+ if (this.offset.x === value.x && this.offset.y === value.y) return;
14376
14338
  this._offset = value;
14377
14339
  this.markNeedsPaintTransformUpdate();
14378
14340
  }
@@ -14468,7 +14430,7 @@
14468
14430
  }
14469
14431
  this.needsPaintTransformUpdate = false;
14470
14432
  this.paintTransform = newTransform;
14471
- __privateMethod(this, _didChangePaintTransform2, didChangePaintTransform_fn).call(this);
14433
+ __privateMethod(this, _RenderObject_instances, didChangePaintTransform_fn).call(this);
14472
14434
  const childPaintTransform = this.applyPaintTransform(newTransform);
14473
14435
  this.visitChildren((child) => {
14474
14436
  child.updatePaintTransform(childPaintTransform);
@@ -14478,7 +14440,7 @@
14478
14440
  _zOrder = new WeakMap();
14479
14441
  _svgPainter = new WeakMap();
14480
14442
  _canvasPainter = new WeakMap();
14481
- _didChangePaintTransform2 = new WeakSet();
14443
+ _RenderObject_instances = new WeakSet();
14482
14444
  didChangePaintTransform_fn = function() {
14483
14445
  this.renderOwner.didChangePaintTransform(this);
14484
14446
  };
@@ -14496,8 +14458,7 @@
14496
14458
  const constraint = this.constraints;
14497
14459
  if (!constraint.isTight)
14498
14460
  throw new Error("constraint must be tight on render view");
14499
- if (constraint.maxWidth === 0 || constraint.maxHeight === 0)
14500
- return;
14461
+ if (constraint.maxWidth === 0 || constraint.maxHeight === 0) return;
14501
14462
  this.size = new size_default({
14502
14463
  width: constraint.maxWidth,
14503
14464
  height: constraint.maxHeight
@@ -14565,8 +14526,7 @@
14565
14526
  result = child.renderObject;
14566
14527
  }
14567
14528
  });
14568
- if (result == null)
14569
- throw new Error("can not find render object");
14529
+ if (result == null) throw new Error("can not find render object");
14570
14530
  return result;
14571
14531
  }
14572
14532
  //There are 5 case
@@ -14619,8 +14579,7 @@
14619
14579
  return newChild;
14620
14580
  }
14621
14581
  rebuild({ force = false } = {}) {
14622
- if (!this.dirty && !force)
14623
- return;
14582
+ if (!this.dirty && !force) return;
14624
14583
  this.dirty = false;
14625
14584
  this.performRebuild();
14626
14585
  }
@@ -14695,8 +14654,7 @@
14695
14654
  return this.updateChild(matchedChild, newWidget);
14696
14655
  });
14697
14656
  oldChildren.forEach((oldChild, i) => {
14698
- if (updatedChildIndexes.includes(i))
14699
- return;
14657
+ if (updatedChildIndexes.includes(i)) return;
14700
14658
  this.updateChild(oldChild, null);
14701
14659
  });
14702
14660
  this.children = newChildren;
@@ -14778,7 +14736,7 @@
14778
14736
  __privateAdd(this, _activated, typeof window !== "undefined");
14779
14737
  __privateAdd(this, _detectors, []);
14780
14738
  __privateAdd(this, _rootPosition, null);
14781
- __privateAdd(this, _renderContext, void 0);
14739
+ __privateAdd(this, _renderContext);
14782
14740
  __privateAdd(this, _hitPosition, new offset_default({ x: 0, y: 0 }));
14783
14741
  __privateAdd(this, _handleMouseDown, (e) => {
14784
14742
  this.hitTest(e, "onMouseDown");
@@ -14795,8 +14753,7 @@
14795
14753
  e.isPropagationStopped = false;
14796
14754
  for (const i in __privateGet(this, _detectors)) {
14797
14755
  const detector = __privateGet(this, _detectors)[i];
14798
- if (e.isPropagationStopped)
14799
- return;
14756
+ if (e.isPropagationStopped) return;
14800
14757
  if (!__privateGet(this, _hitHistory)[i] && detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) })) {
14801
14758
  detector.onMouseEnter(e);
14802
14759
  }
@@ -14804,8 +14761,7 @@
14804
14761
  e.isPropagationStopped = false;
14805
14762
  for (const i in __privateGet(this, _detectors)) {
14806
14763
  const detector = __privateGet(this, _detectors)[i];
14807
- if (e.isPropagationStopped)
14808
- return;
14764
+ if (e.isPropagationStopped) return;
14809
14765
  if (__privateGet(this, _hitHistory)[i] && !detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) })) {
14810
14766
  detector.onMouseLeave(e);
14811
14767
  }
@@ -14829,10 +14785,8 @@
14829
14785
  this.hitTest(e, "onWheel");
14830
14786
  e.isPropagationStopped = false;
14831
14787
  for (const detector of __privateGet(this, _detectors)) {
14832
- if (e.isPropagationStopped)
14833
- return;
14834
- if (!detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) }))
14835
- continue;
14788
+ if (e.isPropagationStopped) return;
14789
+ if (!detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) })) continue;
14836
14790
  detector.onMouseEnter(e);
14837
14791
  }
14838
14792
  e.isPropagationStopped = false;
@@ -14849,10 +14803,8 @@
14849
14803
  });
14850
14804
  __publicField(this, "hitTest", (e, type) => {
14851
14805
  for (const detector of __privateGet(this, _detectors)) {
14852
- if (e.isPropagationStopped)
14853
- return;
14854
- if (!detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) }))
14855
- continue;
14806
+ if (e.isPropagationStopped) return;
14807
+ if (!detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) })) continue;
14856
14808
  detector.invokeCallback(type, e);
14857
14809
  }
14858
14810
  });
@@ -14873,8 +14825,7 @@
14873
14825
  __privateAdd(this, _didDomOrderChangeState, "idle");
14874
14826
  }
14875
14827
  init({ renderContext }) {
14876
- if (!__privateGet(this, _activated))
14877
- return;
14828
+ if (!__privateGet(this, _activated)) return;
14878
14829
  __privateSet(this, _renderContext, renderContext);
14879
14830
  const { view } = __privateGet(this, _renderContext);
14880
14831
  view.addEventListener("mousedown", __privateGet(this, _wrapEvent).call(this, __privateGet(this, _handleMouseDown)));
@@ -14886,14 +14837,12 @@
14886
14837
  view.addEventListener("mouseleave", __privateGet(this, _handleMouseLeave));
14887
14838
  }
14888
14839
  traceHitPosition(e) {
14889
- if (__privateGet(this, _rootPosition) == null)
14890
- return;
14840
+ if (__privateGet(this, _rootPosition) == null) return;
14891
14841
  __privateGet(this, _hitPosition).x = e.clientX - __privateGet(this, _rootPosition).x;
14892
14842
  __privateGet(this, _hitPosition).y = e.clientY - __privateGet(this, _rootPosition).y;
14893
14843
  }
14894
14844
  didZOrderChange() {
14895
- if (__privateGet(this, _didDomOrderChangeState) === "processing")
14896
- return;
14845
+ if (__privateGet(this, _didDomOrderChangeState) === "processing") return;
14897
14846
  __privateSet(this, _didDomOrderChangeState, "processing");
14898
14847
  setTimeout(() => {
14899
14848
  __privateSet(this, _detectors, __privateGet(this, _detectors).sort((a, b) => b.zOrder - a.zOrder));
@@ -14901,13 +14850,11 @@
14901
14850
  }, 0);
14902
14851
  }
14903
14852
  addDetector(detector) {
14904
- if (!__privateGet(this, _activated))
14905
- return;
14853
+ if (!__privateGet(this, _activated)) return;
14906
14854
  __privateGet(this, _detectors).push(detector);
14907
14855
  }
14908
14856
  removeDetector(detector) {
14909
- if (!__privateGet(this, _activated))
14910
- return;
14857
+ if (!__privateGet(this, _activated)) return;
14911
14858
  __privateSet(this, _detectors, __privateGet(this, _detectors).filter((d) => d !== detector));
14912
14859
  }
14913
14860
  };
@@ -15132,10 +15079,8 @@
15132
15079
  while (parent != null) {
15133
15080
  const current = parent;
15134
15081
  parent = current.parent;
15135
- if (!(current.type === 1 /* provider */))
15136
- continue;
15137
- if (current.providerKey !== key)
15138
- continue;
15082
+ if (!(current.type === 1 /* provider */)) continue;
15083
+ if (current.providerKey !== key) continue;
15139
15084
  return current.value;
15140
15085
  }
15141
15086
  throw { message: "can not find requested provider value" };
@@ -15293,9 +15238,8 @@
15293
15238
  // ../../node_modules/popmotion/node_modules/tslib/tslib.es6.js
15294
15239
  function __rest(s, e) {
15295
15240
  var t = {};
15296
- for (var p in s)
15297
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15298
- t[p] = s[p];
15241
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15242
+ t[p] = s[p];
15299
15243
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
15300
15244
  for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
15301
15245
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
@@ -16238,8 +16182,7 @@
16238
16182
  return this.status === "completed";
16239
16183
  }
16240
16184
  get value() {
16241
- if (this._value == null)
16242
- return 0;
16185
+ if (this._value == null) return 0;
16243
16186
  return this._value;
16244
16187
  }
16245
16188
  set value(value) {
@@ -16310,8 +16253,7 @@
16310
16253
  }
16311
16254
  animate(target, overrideOptions = {}) {
16312
16255
  var _a;
16313
- if (typeof window === "undefined")
16314
- return;
16256
+ if (typeof window === "undefined") return;
16315
16257
  (_a = this.animation) == null ? void 0 : _a.stop();
16316
16258
  this.animation = animate(__spreadValues({
16317
16259
  from: this.value,
@@ -16439,10 +16381,8 @@
16439
16381
  this.end = end != null ? end : begin;
16440
16382
  }
16441
16383
  transform(value) {
16442
- if (value === 0)
16443
- return this.begin;
16444
- if (value === 1)
16445
- return this.end;
16384
+ if (value === 0) return this.begin;
16385
+ if (value === 1) return this.end;
16446
16386
  return this.lerp(value);
16447
16387
  }
16448
16388
  lerp(t) {
@@ -16639,8 +16579,7 @@
16639
16579
  function reactivate(obj) {
16640
16580
  return new Proxy(obj, {
16641
16581
  set(target, key, value2) {
16642
- if (target[key] === value2)
16643
- return false;
16582
+ if (target[key] === value2) return false;
16644
16583
  target[key] = value2;
16645
16584
  notifier.notifyListeners();
16646
16585
  return true;
@@ -16688,8 +16627,7 @@
16688
16627
  return this._alignment;
16689
16628
  }
16690
16629
  set alignment(value) {
16691
- if (this._alignment.equals(value))
16692
- return;
16630
+ if (this._alignment.equals(value)) return;
16693
16631
  this._alignment = value;
16694
16632
  this.markNeedsLayout();
16695
16633
  }
@@ -16697,8 +16635,7 @@
16697
16635
  return this._textDirection;
16698
16636
  }
16699
16637
  set textDirection(value) {
16700
- if (this._textDirection == value)
16701
- return;
16638
+ if (this._textDirection == value) return;
16702
16639
  this._textDirection = value;
16703
16640
  this.markNeedsLayout();
16704
16641
  }
@@ -16706,8 +16643,7 @@
16706
16643
  return this.alignment.resolve(this.textDirection);
16707
16644
  }
16708
16645
  alignChild() {
16709
- if (this.child == null)
16710
- throw Error("child must not be null");
16646
+ if (this.child == null) throw Error("child must not be null");
16711
16647
  if (this.resolvedAlignment == null)
16712
16648
  throw Error("resolved alignment must not be null");
16713
16649
  this.child.offset = this.resolvedAlignment.alongOffset(
@@ -16748,8 +16684,7 @@
16748
16684
  return this._clipper;
16749
16685
  }
16750
16686
  set clipper(value) {
16751
- if (this._clipper === value)
16752
- return;
16687
+ if (this._clipper === value) return;
16753
16688
  this._clipper = value;
16754
16689
  this.markNeedsPaint();
16755
16690
  }
@@ -16844,8 +16779,7 @@
16844
16779
  this.clipped = clipped;
16845
16780
  }
16846
16781
  build(_) {
16847
- if (!this.clipped)
16848
- return this.child;
16782
+ if (!this.clipped) return this.child;
16849
16783
  return new BaseClipPath_default({ child: this.child, clipper: this.clipper });
16850
16784
  }
16851
16785
  };
@@ -16930,8 +16864,7 @@
16930
16864
  return this._direction;
16931
16865
  }
16932
16866
  set direction(newDirection) {
16933
- if (this._direction === newDirection)
16934
- return;
16867
+ if (this._direction === newDirection) return;
16935
16868
  this._direction = newDirection;
16936
16869
  this.markNeedsLayout();
16937
16870
  }
@@ -16939,8 +16872,7 @@
16939
16872
  return this._mainAxisAlignment;
16940
16873
  }
16941
16874
  set mainAxisAlignment(newMainAxisAlignment) {
16942
- if (this._mainAxisAlignment === newMainAxisAlignment)
16943
- return;
16875
+ if (this._mainAxisAlignment === newMainAxisAlignment) return;
16944
16876
  this._mainAxisAlignment = newMainAxisAlignment;
16945
16877
  this.markNeedsLayout();
16946
16878
  }
@@ -16948,8 +16880,7 @@
16948
16880
  return this._crossAxisAlignment;
16949
16881
  }
16950
16882
  set crossAxisAlignment(newCrossAxisAlignment) {
16951
- if (this._crossAxisAlignment === newCrossAxisAlignment)
16952
- return;
16883
+ if (this._crossAxisAlignment === newCrossAxisAlignment) return;
16953
16884
  this._crossAxisAlignment = newCrossAxisAlignment;
16954
16885
  this.markNeedsLayout();
16955
16886
  }
@@ -16957,8 +16888,7 @@
16957
16888
  return this._verticalDirection;
16958
16889
  }
16959
16890
  set verticalDirection(newVerticalDirection) {
16960
- if (this._verticalDirection === newVerticalDirection)
16961
- return;
16891
+ if (this._verticalDirection === newVerticalDirection) return;
16962
16892
  this._verticalDirection = newVerticalDirection;
16963
16893
  this.markNeedsLayout();
16964
16894
  }
@@ -16966,8 +16896,7 @@
16966
16896
  return this._mainAxisSize;
16967
16897
  }
16968
16898
  set mainAxisSize(newMainAxisSize) {
16969
- if (this._mainAxisSize === newMainAxisSize)
16970
- return;
16899
+ if (this._mainAxisSize === newMainAxisSize) return;
16971
16900
  this._mainAxisSize = newMainAxisSize;
16972
16901
  this.markNeedsLayout();
16973
16902
  }
@@ -17280,24 +17209,15 @@
17280
17209
  });
17281
17210
  }
17282
17211
  updateRenderObject(renderObject) {
17283
- if (this.softWrap != null)
17284
- renderObject.softWrap = this.softWrap;
17285
- if (this.overflow != null)
17286
- renderObject.overflow = this.overflow;
17287
- if (this.textScaleFactor != null)
17288
- renderObject.textScaleFactor = this.textScaleFactor;
17289
- if (this.maxLines != null)
17290
- renderObject.maxLines = this.maxLines;
17291
- if (this.textWidthBasis != null)
17292
- renderObject.textWidthBasis = this.textWidthBasis;
17293
- if (this.text != null)
17294
- renderObject.text = this.text;
17295
- if (this.textAlign != null)
17296
- renderObject.textAlign = this.textAlign;
17297
- if (this.textDirection != null)
17298
- renderObject.textDirection = this.textDirection;
17299
- if (this.textPainter != null)
17300
- renderObject.textPainter = this.textPainter;
17212
+ if (this.softWrap != null) renderObject.softWrap = this.softWrap;
17213
+ if (this.overflow != null) renderObject.overflow = this.overflow;
17214
+ if (this.textScaleFactor != null) renderObject.textScaleFactor = this.textScaleFactor;
17215
+ if (this.maxLines != null) renderObject.maxLines = this.maxLines;
17216
+ if (this.textWidthBasis != null) renderObject.textWidthBasis = this.textWidthBasis;
17217
+ if (this.text != null) renderObject.text = this.text;
17218
+ if (this.textAlign != null) renderObject.textAlign = this.textAlign;
17219
+ if (this.textDirection != null) renderObject.textDirection = this.textDirection;
17220
+ if (this.textPainter != null) renderObject.textPainter = this.textPainter;
17301
17221
  }
17302
17222
  };
17303
17223
  var _softWrap, _overflow, _textPainter;
@@ -17314,9 +17234,9 @@
17314
17234
  textPainter
17315
17235
  }) {
17316
17236
  super({ isPainter: true });
17317
- __privateAdd(this, _softWrap, void 0);
17318
- __privateAdd(this, _overflow, void 0);
17319
- __privateAdd(this, _textPainter, void 0);
17237
+ __privateAdd(this, _softWrap);
17238
+ __privateAdd(this, _overflow);
17239
+ __privateAdd(this, _textPainter);
17320
17240
  __publicField(this, "previousWidth");
17321
17241
  __publicField(this, "previousHeight");
17322
17242
  __publicField(this, "changedLayout");
@@ -17344,8 +17264,7 @@
17344
17264
  return __privateGet(this, _softWrap);
17345
17265
  }
17346
17266
  set softWrap(newSoftWrap) {
17347
- if (__privateGet(this, _softWrap) === newSoftWrap)
17348
- return;
17267
+ if (__privateGet(this, _softWrap) === newSoftWrap) return;
17349
17268
  __privateSet(this, _softWrap, newSoftWrap);
17350
17269
  this.markNeedsLayout();
17351
17270
  }
@@ -17353,8 +17272,7 @@
17353
17272
  return __privateGet(this, _overflow);
17354
17273
  }
17355
17274
  set overflow(newOverflow) {
17356
- if (__privateGet(this, _overflow) === newOverflow)
17357
- return;
17275
+ if (__privateGet(this, _overflow) === newOverflow) return;
17358
17276
  __privateSet(this, _overflow, newOverflow);
17359
17277
  this.markNeedsLayout();
17360
17278
  }
@@ -17362,8 +17280,7 @@
17362
17280
  return __privateGet(this, _textPainter);
17363
17281
  }
17364
17282
  set textPainter(value) {
17365
- if (__privateGet(this, _textPainter) === value)
17366
- return;
17283
+ if (__privateGet(this, _textPainter) === value) return;
17367
17284
  __privateSet(this, _textPainter, value);
17368
17285
  this.markNeedsLayout();
17369
17286
  }
@@ -17371,8 +17288,7 @@
17371
17288
  return this.textPainter.text;
17372
17289
  }
17373
17290
  set text(value) {
17374
- if (this.textPainter.text.equals(value))
17375
- return;
17291
+ if (this.textPainter.text.equals(value)) return;
17376
17292
  this.textPainter.text = value;
17377
17293
  this.markNeedsLayout();
17378
17294
  }
@@ -17380,8 +17296,7 @@
17380
17296
  return this.textPainter.textWidthBasis;
17381
17297
  }
17382
17298
  set textWidthBasis(value) {
17383
- if (this.textPainter.textWidthBasis === value)
17384
- return;
17299
+ if (this.textPainter.textWidthBasis === value) return;
17385
17300
  this.textPainter.textWidthBasis = value;
17386
17301
  this.markNeedsLayout();
17387
17302
  }
@@ -17389,8 +17304,7 @@
17389
17304
  return this.textPainter.textAlign;
17390
17305
  }
17391
17306
  set textAlign(textAlign) {
17392
- if (this.textPainter.textAlign === textAlign)
17393
- return;
17307
+ if (this.textPainter.textAlign === textAlign) return;
17394
17308
  this.textPainter.textAlign = textAlign;
17395
17309
  this.markNeedsLayout();
17396
17310
  }
@@ -17398,8 +17312,7 @@
17398
17312
  return this.textPainter.textDirection;
17399
17313
  }
17400
17314
  set textDirection(direction) {
17401
- if (this.textPainter.textDirection === direction)
17402
- return;
17315
+ if (this.textPainter.textDirection === direction) return;
17403
17316
  this.textPainter.textDirection = direction;
17404
17317
  this.markNeedsLayout();
17405
17318
  }
@@ -17407,8 +17320,7 @@
17407
17320
  return this.textPainter.textScaleFactor;
17408
17321
  }
17409
17322
  set textScaleFactor(scaleFactor) {
17410
- if (this.textPainter.textScaleFactor === scaleFactor)
17411
- return;
17323
+ if (this.textPainter.textScaleFactor === scaleFactor) return;
17412
17324
  this.textPainter.textScaleFactor = scaleFactor;
17413
17325
  this.markNeedsLayout();
17414
17326
  }
@@ -17416,8 +17328,7 @@
17416
17328
  return this.textPainter.maxLines;
17417
17329
  }
17418
17330
  set maxLines(value) {
17419
- if (this.textPainter.maxLines === value)
17420
- return;
17331
+ if (this.textPainter.maxLines === value) return;
17421
17332
  this.textPainter.maxLines = value;
17422
17333
  this.markNeedsLayout();
17423
17334
  }
@@ -17488,8 +17399,7 @@
17488
17399
  this.textPainter.paintOnSvg(newTextEl, context);
17489
17400
  return;
17490
17401
  }
17491
- if (!this.needsPaint && !this.changedLayout)
17492
- return;
17402
+ if (!this.needsPaint && !this.changedLayout) return;
17493
17403
  this.textPainter.paintOnSvg(textEl, context);
17494
17404
  }
17495
17405
  };
@@ -17602,8 +17512,7 @@
17602
17512
  __publicField(this, "isFlexible", true);
17603
17513
  __publicField(this, "flex");
17604
17514
  __publicField(this, "fit");
17605
- if (flex < 0)
17606
- throw new Error("flex must not be under zero");
17515
+ if (flex < 0) throw new Error("flex must not be under zero");
17607
17516
  this.flex = flex;
17608
17517
  this.fit = fit;
17609
17518
  }
@@ -17628,8 +17537,7 @@
17628
17537
  return this._flex;
17629
17538
  }
17630
17539
  set flex(newFlex) {
17631
- if (this._flex === newFlex)
17632
- return;
17540
+ if (this._flex === newFlex) return;
17633
17541
  this._flex = newFlex;
17634
17542
  this.markNeedsLayout();
17635
17543
  }
@@ -17637,8 +17545,7 @@
17637
17545
  return this._fit;
17638
17546
  }
17639
17547
  set fit(newFit) {
17640
- if (this._fit === newFit)
17641
- return;
17548
+ if (this._fit === newFit) return;
17642
17549
  this._fit = newFit;
17643
17550
  this.markNeedsLayout();
17644
17551
  }
@@ -17691,8 +17598,7 @@
17691
17598
  return this._additionalConstraint;
17692
17599
  }
17693
17600
  set additionalConstraint(constraint) {
17694
- if (constraint.equals(this._additionalConstraint))
17695
- return;
17601
+ if (constraint.equals(this._additionalConstraint)) return;
17696
17602
  this._additionalConstraint = constraint;
17697
17603
  this.markNeedsLayout();
17698
17604
  }
@@ -17811,8 +17717,7 @@
17811
17717
  return this._widthFactor;
17812
17718
  }
17813
17719
  set widthFactor(value) {
17814
- if (this._widthFactor === value)
17815
- return;
17720
+ if (this._widthFactor === value) return;
17816
17721
  this._widthFactor = value;
17817
17722
  this.markNeedsLayout();
17818
17723
  }
@@ -17820,8 +17725,7 @@
17820
17725
  return this._heightFactor;
17821
17726
  }
17822
17727
  set heightFactor(value) {
17823
- if (this._heightFactor === value)
17824
- return;
17728
+ if (this._heightFactor === value) return;
17825
17729
  this._heightFactor = value;
17826
17730
  this.markNeedsLayout();
17827
17731
  }
@@ -17878,8 +17782,7 @@
17878
17782
  return this._color;
17879
17783
  }
17880
17784
  set color(value) {
17881
- if (value === this._color)
17882
- return;
17785
+ if (value === this._color) return;
17883
17786
  this._color = value;
17884
17787
  this.markNeedsPaint();
17885
17788
  }
@@ -17952,8 +17855,7 @@
17952
17855
  return this._decoration;
17953
17856
  }
17954
17857
  set decoration(value) {
17955
- if (this.decoration.equals(value))
17956
- return;
17858
+ if (this.decoration.equals(value)) return;
17957
17859
  this._decoration = value;
17958
17860
  this.markNeedsPaint();
17959
17861
  }
@@ -18045,8 +17947,7 @@
18045
17947
  return this._maxWidth;
18046
17948
  }
18047
17949
  set maxWidth(newMaxWidth) {
18048
- if (this._maxWidth === newMaxWidth)
18049
- return;
17950
+ if (this._maxWidth === newMaxWidth) return;
18050
17951
  this._maxWidth = newMaxWidth;
18051
17952
  this.markNeedsLayout();
18052
17953
  }
@@ -18054,8 +17955,7 @@
18054
17955
  return this._maxHeight;
18055
17956
  }
18056
17957
  set maxHeight(newMaxHeight) {
18057
- if (this._maxHeight === newMaxHeight)
18058
- return;
17958
+ if (this._maxHeight === newMaxHeight) return;
18059
17959
  this._maxHeight = newMaxHeight;
18060
17960
  this.markNeedsLayout();
18061
17961
  }
@@ -18113,14 +18013,12 @@
18113
18013
  return this._padding;
18114
18014
  }
18115
18015
  set padding(value) {
18116
- if (value.eqaul(this._padding))
18117
- return;
18016
+ if (value.eqaul(this._padding)) return;
18118
18017
  this._padding = value;
18119
18018
  this.markNeedsLayout();
18120
18019
  }
18121
18020
  preformLayout() {
18122
- if (this.child == null)
18123
- return;
18021
+ if (this.child == null) return;
18124
18022
  const { top, left, right, bottom } = this.padding;
18125
18023
  const childConstraints = this.constraints.deflate(this.padding);
18126
18024
  this.child.layout(childConstraints);
@@ -18286,8 +18184,7 @@
18286
18184
  return this._origin;
18287
18185
  }
18288
18186
  set origin(value) {
18289
- if (value == null && this._origin == null)
18290
- return;
18187
+ if (value == null && this._origin == null) return;
18291
18188
  if (value != null && this._origin != null && this._origin.x === value.x && this._origin.y === value.y)
18292
18189
  return;
18293
18190
  this._origin = value;
@@ -18297,8 +18194,7 @@
18297
18194
  return this._alignment;
18298
18195
  }
18299
18196
  set alignment(value) {
18300
- if (this._alignment.equal(value))
18301
- return;
18197
+ if (this._alignment.equal(value)) return;
18302
18198
  this._alignment = value;
18303
18199
  this.markNeedsLayout();
18304
18200
  }
@@ -18306,8 +18202,7 @@
18306
18202
  return this._transform;
18307
18203
  }
18308
18204
  set transform(value) {
18309
- if (this.transform.equals(value))
18310
- return;
18205
+ if (this.transform.equals(value)) return;
18311
18206
  this._transform = value;
18312
18207
  this.markNeedsLayout();
18313
18208
  this.markNeedsPaintTransformUpdate();
@@ -18316,8 +18211,7 @@
18316
18211
  return this._textDirection;
18317
18212
  }
18318
18213
  set textDirection(value) {
18319
- if (this._textDirection == value)
18320
- return;
18214
+ if (this._textDirection == value) return;
18321
18215
  this._textDirection = value;
18322
18216
  this.markNeedsLayout();
18323
18217
  }
@@ -18619,8 +18513,7 @@
18619
18513
  return this._templateRows;
18620
18514
  }
18621
18515
  set templateRows(value) {
18622
- if (GridTemplate.equals(value, this._templateRows))
18623
- return;
18516
+ if (GridTemplate.equals(value, this._templateRows)) return;
18624
18517
  this._templateRows = value;
18625
18518
  this.markNeedsLayout();
18626
18519
  }
@@ -18628,8 +18521,7 @@
18628
18521
  return this._templateColumns;
18629
18522
  }
18630
18523
  set templateColumns(value) {
18631
- if (GridTemplate.equals(value, this._templateColumns))
18632
- return;
18524
+ if (GridTemplate.equals(value, this._templateColumns)) return;
18633
18525
  this._templateColumns = value;
18634
18526
  this.markNeedsLayout();
18635
18527
  }
@@ -18637,8 +18529,7 @@
18637
18529
  return this._autoColumn;
18638
18530
  }
18639
18531
  set autoColumn(value) {
18640
- if (value.equals(this._autoColumn))
18641
- return;
18532
+ if (value.equals(this._autoColumn)) return;
18642
18533
  this._autoColumn = value;
18643
18534
  this.markNeedsLayout();
18644
18535
  }
@@ -18646,8 +18537,7 @@
18646
18537
  return this._autoRow;
18647
18538
  }
18648
18539
  set autoRow(value) {
18649
- if (value.equals(this._autoRow))
18650
- return;
18540
+ if (value.equals(this._autoRow)) return;
18651
18541
  this._autoRow = value;
18652
18542
  this.markNeedsLayout();
18653
18543
  }
@@ -18655,8 +18545,7 @@
18655
18545
  return this._columnCounts;
18656
18546
  }
18657
18547
  set columnCounts(value) {
18658
- if (Utils.arrayEqual(value, this._columnCounts))
18659
- return;
18548
+ if (Utils.arrayEqual(value, this._columnCounts)) return;
18660
18549
  this._columnCounts = value;
18661
18550
  this.markNeedsLayout();
18662
18551
  }
@@ -18806,13 +18695,11 @@
18806
18695
  this.value = value;
18807
18696
  }
18808
18697
  static equals(target, other) {
18809
- if (target.length !== other.length)
18810
- return false;
18698
+ if (target.length !== other.length) return false;
18811
18699
  return target.every((value, i) => value.equals(other[i]));
18812
18700
  }
18813
18701
  equals(other) {
18814
- if (this === other)
18815
- return true;
18702
+ if (this === other) return true;
18816
18703
  return this.type === other.type && this.value === other.value;
18817
18704
  }
18818
18705
  static Fr(value) {
@@ -18894,8 +18781,7 @@
18894
18781
  return this._alignment;
18895
18782
  }
18896
18783
  set alignment(value) {
18897
- if (value.equal(this._alignment))
18898
- return;
18784
+ if (value.equal(this._alignment)) return;
18899
18785
  this._alignment = value;
18900
18786
  this.markNeedsLayout();
18901
18787
  }
@@ -18903,8 +18789,7 @@
18903
18789
  return this._fit;
18904
18790
  }
18905
18791
  set fit(value) {
18906
- if (this._fit !== value)
18907
- return;
18792
+ if (this._fit !== value) return;
18908
18793
  this._fit = value;
18909
18794
  this.markNeedsLayout();
18910
18795
  }
@@ -18912,8 +18797,7 @@
18912
18797
  return this._textDirection;
18913
18798
  }
18914
18799
  set textDirection(value) {
18915
- if (this._textDirection !== value)
18916
- return;
18800
+ if (this._textDirection !== value) return;
18917
18801
  this._textDirection = value;
18918
18802
  this.markNeedsPaint();
18919
18803
  }
@@ -19126,8 +19010,7 @@
19126
19010
  return this._top;
19127
19011
  }
19128
19012
  set top(newTop) {
19129
- if (this._top === newTop)
19130
- return;
19013
+ if (this._top === newTop) return;
19131
19014
  this._top = newTop;
19132
19015
  this.markNeedsLayout();
19133
19016
  }
@@ -19135,8 +19018,7 @@
19135
19018
  return this._bottom;
19136
19019
  }
19137
19020
  set bottom(newBottom) {
19138
- if (this._bottom === newBottom)
19139
- return;
19021
+ if (this._bottom === newBottom) return;
19140
19022
  this._bottom = newBottom;
19141
19023
  this.markNeedsLayout();
19142
19024
  }
@@ -19144,8 +19026,7 @@
19144
19026
  return this._right;
19145
19027
  }
19146
19028
  set right(newRight) {
19147
- if (this._right === newRight)
19148
- return;
19029
+ if (this._right === newRight) return;
19149
19030
  this._right = newRight;
19150
19031
  this.markNeedsLayout();
19151
19032
  }
@@ -19153,8 +19034,7 @@
19153
19034
  return this._left;
19154
19035
  }
19155
19036
  set left(newLeft) {
19156
- if (this._left === newLeft)
19157
- return;
19037
+ if (this._left === newLeft) return;
19158
19038
  this._left = newLeft;
19159
19039
  this.markNeedsLayout();
19160
19040
  }
@@ -19162,8 +19042,7 @@
19162
19042
  return this._width;
19163
19043
  }
19164
19044
  set width(newWidth) {
19165
- if (this._width === newWidth)
19166
- return;
19045
+ if (this._width === newWidth) return;
19167
19046
  this._width = newWidth;
19168
19047
  this.markNeedsLayout();
19169
19048
  }
@@ -19171,8 +19050,7 @@
19171
19050
  return this._height;
19172
19051
  }
19173
19052
  set height(newHeight) {
19174
- if (this._height === newHeight)
19175
- return;
19053
+ if (this._height === newHeight) return;
19176
19054
  this._height = newHeight;
19177
19055
  this.markNeedsLayout();
19178
19056
  }
@@ -19269,8 +19147,7 @@
19269
19147
  return this._constraintsTransform;
19270
19148
  }
19271
19149
  set constraintsTransform(value) {
19272
- if (value === this._constraintsTransform)
19273
- return;
19150
+ if (value === this._constraintsTransform) return;
19274
19151
  this._constraintsTransform = value;
19275
19152
  this.markNeedsLayout();
19276
19153
  }
@@ -19424,8 +19301,7 @@
19424
19301
  return this._minWidth;
19425
19302
  }
19426
19303
  set minWidth(newMinWidth) {
19427
- if (this._minWidth === newMinWidth)
19428
- return;
19304
+ if (this._minWidth === newMinWidth) return;
19429
19305
  this._minWidth = newMinWidth;
19430
19306
  this.markNeedsLayout();
19431
19307
  }
@@ -19433,8 +19309,7 @@
19433
19309
  return this._maxWidth;
19434
19310
  }
19435
19311
  set maxWidth(newMaxWidth) {
19436
- if (this._maxWidth === newMaxWidth)
19437
- return;
19312
+ if (this._maxWidth === newMaxWidth) return;
19438
19313
  this._maxWidth = newMaxWidth;
19439
19314
  this.markNeedsLayout();
19440
19315
  }
@@ -19442,8 +19317,7 @@
19442
19317
  return this._minHeight;
19443
19318
  }
19444
19319
  set minHeight(newMinHeight) {
19445
- if (this._minHeight === newMinHeight)
19446
- return;
19320
+ if (this._minHeight === newMinHeight) return;
19447
19321
  this._minHeight = newMinHeight;
19448
19322
  this.markNeedsLayout();
19449
19323
  }
@@ -19451,8 +19325,7 @@
19451
19325
  return this._maxHeight;
19452
19326
  }
19453
19327
  set maxHeight(newMaxHeight) {
19454
- if (this._maxHeight === newMaxHeight)
19455
- return;
19328
+ if (this._maxHeight === newMaxHeight) return;
19456
19329
  this._maxHeight = newMaxHeight;
19457
19330
  this.markNeedsLayout();
19458
19331
  }
@@ -19538,8 +19411,7 @@
19538
19411
  return this._widthFactor;
19539
19412
  }
19540
19413
  set widthFactor(newWidthFactor) {
19541
- if (this._widthFactor === newWidthFactor)
19542
- return;
19414
+ if (this._widthFactor === newWidthFactor) return;
19543
19415
  this._widthFactor = newWidthFactor;
19544
19416
  this.markNeedsLayout();
19545
19417
  }
@@ -19547,8 +19419,7 @@
19547
19419
  return this._heightFactor;
19548
19420
  }
19549
19421
  set heightFactor(newHeightFactor) {
19550
- if (this._heightFactor === newHeightFactor)
19551
- return;
19422
+ if (this._heightFactor === newHeightFactor) return;
19552
19423
  this._heightFactor = newHeightFactor;
19553
19424
  this.markNeedsLayout();
19554
19425
  }
@@ -19618,8 +19489,7 @@
19618
19489
  };
19619
19490
  var RenderIntrinsicHeight = class extends SingleChildRenderObject_default {
19620
19491
  preformLayout() {
19621
- if (this.child == null)
19622
- return;
19492
+ if (this.child == null) return;
19623
19493
  const height = this.child.getIntrinsicHeight(this.constraints.maxWidth) || 0;
19624
19494
  const constraint = constraints_default.tightFor({ height }).enforce(
19625
19495
  this.constraints
@@ -19642,8 +19512,7 @@
19642
19512
  };
19643
19513
  var RenderIntrinsicWidth = class extends SingleChildRenderObject_default {
19644
19514
  preformLayout() {
19645
- if (this.child == null)
19646
- return;
19515
+ if (this.child == null) return;
19647
19516
  const width = this.child.getIntrinsicWidth(this.constraints.maxHeight) || 0;
19648
19517
  const constraint = constraints_default.tightFor({ width }).enforce(
19649
19518
  this.constraints
@@ -19987,26 +19856,22 @@
19987
19856
  return this._painter;
19988
19857
  }
19989
19858
  set painter(value) {
19990
- if (this._painter === value)
19991
- return;
19859
+ if (this._painter === value) return;
19992
19860
  const oldPainter = this._painter;
19993
19861
  this._painter = value;
19994
19862
  this.didUpdatePainter(this._painter, oldPainter);
19995
19863
  }
19996
19864
  didUpdatePainter(newPainter, oldPainter) {
19997
19865
  const { shouldRepaint } = newPainter;
19998
- if (shouldRepaint == null)
19999
- return;
20000
- if (!shouldRepaint(oldPainter))
20001
- return;
19866
+ if (shouldRepaint == null) return;
19867
+ if (!shouldRepaint(oldPainter)) return;
20002
19868
  this.markNeedsPaint();
20003
19869
  }
20004
19870
  get preferredSize() {
20005
19871
  return this._preferredSize;
20006
19872
  }
20007
19873
  set preferredSize(value) {
20008
- if (value.equal(this.preferredSize))
20009
- return;
19874
+ if (value.equal(this.preferredSize)) return;
20010
19875
  this.preferredSize = value;
20011
19876
  this.markNeedsLayout();
20012
19877
  }
@@ -20037,13 +19902,11 @@
20037
19902
  return this.renderObject.painter;
20038
19903
  }
20039
19904
  performPaint(svgEls, _) {
20040
- if (this.painter.svg == null)
20041
- throw new Error("svg painter is not defined");
19905
+ if (this.painter.svg == null) throw new Error("svg painter is not defined");
20042
19906
  this.painter.svg.paint(svgEls, this.size);
20043
19907
  }
20044
19908
  createDefaultSvgEl(paintContext) {
20045
- if (this.painter.svg == null)
20046
- throw new Error("svg painter is not defined");
19909
+ if (this.painter.svg == null) throw new Error("svg painter is not defined");
20047
19910
  return this.painter.svg.createDefaultSvgEl(paintContext);
20048
19911
  }
20049
19912
  };
@@ -20193,8 +20056,7 @@
20193
20056
  return this._cursor;
20194
20057
  }
20195
20058
  set cursor(prop) {
20196
- if (this._cursor === prop)
20197
- return;
20059
+ if (this._cursor === prop) return;
20198
20060
  this._cursor = prop;
20199
20061
  this.markNeedsPaint();
20200
20062
  }
@@ -20202,88 +20064,77 @@
20202
20064
  return this._onClick;
20203
20065
  }
20204
20066
  set onClick(prop) {
20205
- if (this.onClick === prop)
20206
- return;
20067
+ if (this.onClick === prop) return;
20207
20068
  this._onClick = prop;
20208
20069
  }
20209
20070
  get onMouseDown() {
20210
20071
  return this._onMouseDown;
20211
20072
  }
20212
20073
  set onMouseDown(prop) {
20213
- if (this._onMouseDown === prop)
20214
- return;
20074
+ if (this._onMouseDown === prop) return;
20215
20075
  this._onMouseDown = prop;
20216
20076
  }
20217
20077
  get onMouseMove() {
20218
20078
  return this._onMouseMove;
20219
20079
  }
20220
20080
  set onMouseMove(prop) {
20221
- if (this._onMouseMove === prop)
20222
- return;
20081
+ if (this._onMouseMove === prop) return;
20223
20082
  this._onMouseMove = prop;
20224
20083
  }
20225
20084
  get onMouseUp() {
20226
20085
  return this._onMouseUp;
20227
20086
  }
20228
20087
  set onMouseUp(prop) {
20229
- if (this._onMouseUp === prop)
20230
- return;
20088
+ if (this._onMouseUp === prop) return;
20231
20089
  this._onMouseUp = prop;
20232
20090
  }
20233
20091
  get onMouseOver() {
20234
20092
  return this._onMouseOver;
20235
20093
  }
20236
20094
  set onMouseOver(prop) {
20237
- if (this._onMouseOver === prop)
20238
- return;
20095
+ if (this._onMouseOver === prop) return;
20239
20096
  this._onMouseOver = prop;
20240
20097
  }
20241
20098
  get onMouseEnter() {
20242
20099
  return this._onMouseEnter;
20243
20100
  }
20244
20101
  set onMouseEnter(prop) {
20245
- if (this._onMouseEnter === prop)
20246
- return;
20102
+ if (this._onMouseEnter === prop) return;
20247
20103
  this._onMouseEnter = prop;
20248
20104
  }
20249
20105
  get onMouseLeave() {
20250
20106
  return this._onMouseLeave;
20251
20107
  }
20252
20108
  set onMouseLeave(prop) {
20253
- if (this._onMouseLeave === prop)
20254
- return;
20109
+ if (this._onMouseLeave === prop) return;
20255
20110
  this._onMouseLeave = prop;
20256
20111
  }
20257
20112
  get onDragStart() {
20258
20113
  return this._onDragStart;
20259
20114
  }
20260
20115
  set onDragStart(prop) {
20261
- if (this._onDragStart === prop)
20262
- return;
20116
+ if (this._onDragStart === prop) return;
20263
20117
  this._onDragStart = prop;
20264
20118
  }
20265
20119
  get onDragMove() {
20266
20120
  return this._onDragMove;
20267
20121
  }
20268
20122
  set onDragMove(prop) {
20269
- if (this._onDragMove === prop)
20270
- return;
20123
+ if (this._onDragMove === prop) return;
20271
20124
  this._onDragMove = prop;
20272
20125
  }
20273
20126
  get onDragEnd() {
20274
20127
  return this._onDragEnd;
20275
20128
  }
20276
20129
  set onDragEnd(prop) {
20277
- if (this._onDragEnd === prop)
20278
- return;
20130
+ if (this._onDragEnd === prop) return;
20279
20131
  this._onDragEnd = prop;
20280
20132
  }
20281
20133
  get onWheel() {
20282
20134
  return this._onWheel;
20283
20135
  }
20284
20136
  set onWheel(prop) {
20285
- if (this._onWheel === prop)
20286
- return;
20137
+ if (this._onWheel === prop) return;
20287
20138
  this._onWheel = prop;
20288
20139
  }
20289
20140
  attach(ownerElement) {
@@ -20306,8 +20157,7 @@
20306
20157
  }
20307
20158
  addEventListeners() {
20308
20159
  const isBrowser = typeof window !== "undefined";
20309
- if (!isBrowser)
20310
- return;
20160
+ if (!isBrowser) return;
20311
20161
  const dragBackend = getSingletonDragBackend();
20312
20162
  dragBackend.isSetup || dragBackend.setup();
20313
20163
  backendRefCount++;
@@ -20349,14 +20199,12 @@
20349
20199
  __publicField(this, "dragEndListener", {});
20350
20200
  __publicField(this, "handleMouseMoveTop", (e) => {
20351
20201
  var _a, _b;
20352
- if (this.activeDragSourceId == null)
20353
- return;
20202
+ if (this.activeDragSourceId == null) return;
20354
20203
  (_b = (_a = this.dragMoveListener)[this.activeDragSourceId]) == null ? void 0 : _b.call(_a, e);
20355
20204
  });
20356
20205
  __publicField(this, "handleMouseUpTop", (e) => {
20357
20206
  var _a, _b;
20358
- if (this.activeDragSourceId == null)
20359
- return;
20207
+ if (this.activeDragSourceId == null) return;
20360
20208
  (_b = (_a = this.dragEndListener)[this.activeDragSourceId]) == null ? void 0 : _b.call(_a, e);
20361
20209
  this.activeDragSourceId = null;
20362
20210
  });
@@ -20369,17 +20217,14 @@
20369
20217
  return document;
20370
20218
  }
20371
20219
  setup() {
20372
- if (typeof window === "undefined")
20373
- return;
20374
- if (this.isSetup)
20375
- return;
20220
+ if (typeof window === "undefined") return;
20221
+ if (this.isSetup) return;
20376
20222
  this.root.addEventListener("mousemove", this.handleMouseMoveTop);
20377
20223
  this.root.addEventListener("mouseup", this.handleMouseUpTop);
20378
20224
  this.isSetup = true;
20379
20225
  }
20380
20226
  teardown() {
20381
- if (typeof window === "undefined")
20382
- return;
20227
+ if (typeof window === "undefined") return;
20383
20228
  this.root.removeEventListener("mousemove", this.handleMouseMoveTop);
20384
20229
  this.root.removeEventListener("mouseup", this.handleMouseUpTop);
20385
20230
  this.isSetup = false;
@@ -21051,8 +20896,7 @@
21051
20896
  });
21052
20897
  });
21053
20898
  __publicField(this, "handleMouseMove", ({ x, y }) => {
21054
- if (this.origin == null)
21055
- return;
20899
+ if (this.origin == null) return;
21056
20900
  this.setState(() => {
21057
20901
  var _a, _b;
21058
20902
  this.delta = this.lastDelta.plus(
@@ -21186,15 +21030,14 @@
21186
21030
  var RenderZIndex = class extends SingleChildRenderObject_default {
21187
21031
  constructor({ zIndex }) {
21188
21032
  super({ isPainter: false });
21189
- __privateAdd(this, _zIndex, void 0);
21033
+ __privateAdd(this, _zIndex);
21190
21034
  __privateSet(this, _zIndex, zIndex);
21191
21035
  }
21192
21036
  get zIndex() {
21193
21037
  return __privateGet(this, _zIndex);
21194
21038
  }
21195
21039
  set zIndex(value) {
21196
- if (__privateGet(this, _zIndex) === value)
21197
- return;
21040
+ if (__privateGet(this, _zIndex) === value) return;
21198
21041
  __privateSet(this, _zIndex, value);
21199
21042
  this.markNeedsUpdateZOrder();
21200
21043
  }
@@ -21262,52 +21105,39 @@
21262
21105
  }
21263
21106
  };
21264
21107
  var ZERO_WIDTH_SPACE = "\u200B";
21265
- var _nativeInput, _selection, _textPainter2, _selectionUI, _textKey, _selectionStart, _textFieldPosition, _focused, _isTyping, _typingTimer, _isComposing, _lineInfo, _currentCharUI, _hasSelection, hasSelection_get, _resetTypingTimer, resetTypingTimer_fn, _setText, setText_fn, _toTextSpan, toTextSpan_fn, _syncThis, syncThis_fn, _syncBlur, _render, render_fn, _calculateLineInfo, calculateLineInfo_fn, _findLineIndexForPosition, findLineIndexForPosition_fn, _calculateCurrentCharRect, calculateCurrentCharRect_fn, _calculateSelectionUI, calculateSelectionUI_fn, _setSelection, setSelection_fn, _getCharIndexFromMouseEvent;
21108
+ var _nativeInput, _selection, _textPainter2, _selectionUI, _textKey, _selectionStart, _textFieldPosition, _focused, _isTyping, _typingTimer, _isComposing, _lineInfo, _currentCharUI, _TextFieldState_instances, hasSelection_get, resetTypingTimer_fn, setText_fn, toTextSpan_fn, syncThis_fn, _syncBlur, render_fn, calculateLineInfo_fn, findLineIndexForPosition_fn, calculateCurrentCharRect_fn, calculateSelectionUI_fn, setSelection_fn, _getCharIndexFromMouseEvent;
21266
21109
  var TextFieldState = class extends State {
21267
21110
  constructor() {
21268
21111
  super();
21269
- __privateAdd(this, _hasSelection);
21270
- __privateAdd(this, _resetTypingTimer);
21271
- __privateAdd(this, _setText);
21272
- __privateAdd(this, _toTextSpan);
21273
- /**
21274
- * Sync the text field with the native input.
21275
- */
21276
- __privateAdd(this, _syncThis);
21277
- __privateAdd(this, _render);
21278
- __privateAdd(this, _calculateLineInfo);
21279
- __privateAdd(this, _findLineIndexForPosition);
21280
- __privateAdd(this, _calculateCurrentCharRect);
21281
- __privateAdd(this, _calculateSelectionUI);
21282
- __privateAdd(this, _setSelection);
21112
+ __privateAdd(this, _TextFieldState_instances);
21283
21113
  __privateAdd(this, _nativeInput, new NativeInput());
21284
21114
  __publicField(this, "value", "");
21285
21115
  __privateAdd(this, _selection, [0, 0]);
21286
- __privateAdd(this, _textPainter2, void 0);
21116
+ __privateAdd(this, _textPainter2);
21287
21117
  __privateAdd(this, _selectionUI, []);
21288
21118
  __privateAdd(this, _textKey, new Globalkey_default());
21289
21119
  __privateAdd(this, _selectionStart, 0);
21290
21120
  __privateAdd(this, _textFieldPosition, null);
21291
21121
  __privateAdd(this, _focused, false);
21292
21122
  __privateAdd(this, _isTyping, false);
21293
- __privateAdd(this, _typingTimer, void 0);
21123
+ __privateAdd(this, _typingTimer);
21294
21124
  __privateAdd(this, _isComposing, false);
21295
21125
  __privateAdd(this, _lineInfo, []);
21296
- __privateAdd(this, _currentCharUI, void 0);
21126
+ __privateAdd(this, _currentCharUI);
21297
21127
  __privateAdd(this, _syncBlur, () => {
21298
21128
  __privateSet(this, _selection, [0, 0]);
21299
21129
  __privateSet(this, _currentCharUI, null);
21300
21130
  __privateSet(this, _selectionUI, null);
21301
21131
  __privateSet(this, _focused, false);
21302
- __privateMethod(this, _render, render_fn).call(this);
21132
+ __privateMethod(this, _TextFieldState_instances, render_fn).call(this);
21303
21133
  });
21304
21134
  __publicField(this, "focus", (location = this.value.length) => {
21305
21135
  __privateGet(this, _nativeInput).value = this.value;
21306
21136
  __privateGet(this, _nativeInput).focus();
21307
- __privateMethod(this, _setSelection, setSelection_fn).call(this, location);
21137
+ __privateMethod(this, _TextFieldState_instances, setSelection_fn).call(this, location);
21308
21138
  __privateGet(this, _nativeInput).setCaret(location);
21309
21139
  __privateSet(this, _focused, true);
21310
- __privateMethod(this, _render, render_fn).call(this);
21140
+ __privateMethod(this, _TextFieldState_instances, render_fn).call(this);
21311
21141
  });
21312
21142
  __publicField(this, "blur", () => {
21313
21143
  __privateGet(this, _syncBlur).call(this);
@@ -21396,12 +21226,11 @@
21396
21226
  this.focus(globalCharIndex);
21397
21227
  });
21398
21228
  __publicField(this, "handleMouseMove", (e) => {
21399
- if (!__privateGet(this, _textFieldPosition))
21400
- return;
21229
+ if (!__privateGet(this, _textFieldPosition)) return;
21401
21230
  const currentIndex = __privateGet(this, _getCharIndexFromMouseEvent).call(this, e);
21402
21231
  const start = Math.min(__privateGet(this, _selectionStart), currentIndex);
21403
21232
  const end = Math.max(__privateGet(this, _selectionStart), currentIndex);
21404
- __privateMethod(this, _setSelection, setSelection_fn).call(this, start, end);
21233
+ __privateMethod(this, _TextFieldState_instances, setSelection_fn).call(this, start, end);
21405
21234
  __privateGet(this, _nativeInput).setSelection(start, end);
21406
21235
  });
21407
21236
  __publicField(this, "handleMouseUp", () => {
@@ -21410,7 +21239,7 @@
21410
21239
  }
21411
21240
  didUpdateWidget(oldWidget) {
21412
21241
  if (oldWidget.text !== this.widget.text || !oldWidget.style.equals(this.widget.style)) {
21413
- __privateMethod(this, _setText, setText_fn).call(this, this.widget.text);
21242
+ __privateMethod(this, _TextFieldState_instances, setText_fn).call(this, this.widget.text);
21414
21243
  return;
21415
21244
  }
21416
21245
  }
@@ -21419,7 +21248,7 @@
21419
21248
  return (_a = __privateGet(this, _textPainter2).paragraph) == null ? void 0 : _a.lines;
21420
21249
  }
21421
21250
  initState() {
21422
- __privateMethod(this, _setText, setText_fn).call(this, this.widget.text);
21251
+ __privateMethod(this, _TextFieldState_instances, setText_fn).call(this, this.widget.text);
21423
21252
  __privateGet(this, _nativeInput).addEventListener("compositionstart", () => {
21424
21253
  this.setState(() => {
21425
21254
  __privateSet(this, _isComposing, true);
@@ -21441,7 +21270,7 @@
21441
21270
  return;
21442
21271
  }
21443
21272
  setTimeout(() => {
21444
- __privateMethod(this, _syncThis, syncThis_fn).call(this);
21273
+ __privateMethod(this, _TextFieldState_instances, syncThis_fn).call(this);
21445
21274
  }, 0);
21446
21275
  });
21447
21276
  __privateGet(this, _nativeInput).addEventListener("blur", () => {
@@ -21552,25 +21381,23 @@
21552
21381
  _isComposing = new WeakMap();
21553
21382
  _lineInfo = new WeakMap();
21554
21383
  _currentCharUI = new WeakMap();
21555
- _hasSelection = new WeakSet();
21384
+ _TextFieldState_instances = new WeakSet();
21556
21385
  hasSelection_get = function() {
21557
21386
  return __privateGet(this, _selection)[0] !== __privateGet(this, _selection)[1];
21558
21387
  };
21559
- _resetTypingTimer = new WeakSet();
21560
21388
  resetTypingTimer_fn = function() {
21561
21389
  if (__privateGet(this, _typingTimer)) {
21562
21390
  clearTimeout(__privateGet(this, _typingTimer));
21563
21391
  }
21564
21392
  __privateSet(this, _typingTimer, setTimeout(() => {
21565
21393
  __privateSet(this, _isTyping, false);
21566
- __privateMethod(this, _render, render_fn).call(this);
21394
+ __privateMethod(this, _TextFieldState_instances, render_fn).call(this);
21567
21395
  }, 10));
21568
21396
  };
21569
- _setText = new WeakSet();
21570
21397
  setText_fn = function(text) {
21571
21398
  this.value = text;
21572
21399
  __privateSet(this, _textPainter2, new TextPainter({
21573
- text: __privateMethod(this, _toTextSpan, toTextSpan_fn).call(this),
21400
+ text: __privateMethod(this, _TextFieldState_instances, toTextSpan_fn).call(this),
21574
21401
  textDirection: this.widget.textDirection,
21575
21402
  textScaleFactor: 1,
21576
21403
  textWidthBasis: text_width_basis_default.parent,
@@ -21578,12 +21405,11 @@
21578
21405
  maxLines: this.widget.maxLines,
21579
21406
  ellipsis: void 0
21580
21407
  }));
21581
- __privateMethod(this, _render, render_fn).call(this);
21408
+ __privateMethod(this, _TextFieldState_instances, render_fn).call(this);
21582
21409
  this.element.scheduler.addPostFrameCallbacks(() => {
21583
- __privateSet(this, _lineInfo, __privateMethod(this, _calculateLineInfo, calculateLineInfo_fn).call(this));
21410
+ __privateSet(this, _lineInfo, __privateMethod(this, _TextFieldState_instances, calculateLineInfo_fn).call(this));
21584
21411
  });
21585
21412
  };
21586
- _toTextSpan = new WeakSet();
21587
21413
  toTextSpan_fn = function() {
21588
21414
  return new text_span_default({
21589
21415
  /**
@@ -21600,22 +21426,22 @@
21600
21426
  )
21601
21427
  });
21602
21428
  };
21603
- _syncThis = new WeakSet();
21429
+ /**
21430
+ * Sync the text field with the native input.
21431
+ */
21604
21432
  syncThis_fn = function() {
21605
- __privateMethod(this, _setText, setText_fn).call(this, __privateGet(this, _nativeInput).value);
21433
+ __privateMethod(this, _TextFieldState_instances, setText_fn).call(this, __privateGet(this, _nativeInput).value);
21606
21434
  __privateSet(this, _isTyping, true);
21607
- __privateMethod(this, _resetTypingTimer, resetTypingTimer_fn).call(this);
21435
+ __privateMethod(this, _TextFieldState_instances, resetTypingTimer_fn).call(this);
21608
21436
  this.element.scheduler.addPostFrameCallbacks(() => {
21609
- __privateMethod(this, _setSelection, setSelection_fn).call(this, ...__privateGet(this, _nativeInput).getSelection());
21610
- __privateMethod(this, _render, render_fn).call(this);
21437
+ __privateMethod(this, _TextFieldState_instances, setSelection_fn).call(this, ...__privateGet(this, _nativeInput).getSelection());
21438
+ __privateMethod(this, _TextFieldState_instances, render_fn).call(this);
21611
21439
  });
21612
21440
  };
21613
21441
  _syncBlur = new WeakMap();
21614
- _render = new WeakSet();
21615
21442
  render_fn = function() {
21616
21443
  this.setState();
21617
21444
  };
21618
- _calculateLineInfo = new WeakSet();
21619
21445
  calculateLineInfo_fn = function() {
21620
21446
  const lines = __privateGet(this, _textPainter2).paragraph.lines;
21621
21447
  let accumulatedChars = 0;
@@ -21632,7 +21458,6 @@
21632
21458
  return lineInfo;
21633
21459
  });
21634
21460
  };
21635
- _findLineIndexForPosition = new WeakSet();
21636
21461
  findLineIndexForPosition_fn = function(position) {
21637
21462
  let low = 0;
21638
21463
  let high = __privateGet(this, _lineInfo).length - 1;
@@ -21650,10 +21475,9 @@
21650
21475
  }
21651
21476
  return __privateGet(this, _lineInfo).length - 1;
21652
21477
  };
21653
- _calculateCurrentCharRect = new WeakSet();
21654
21478
  calculateCurrentCharRect_fn = function(caretLocation) {
21655
21479
  var _a, _b, _c, _d, _e;
21656
- const lineIndex = __privateMethod(this, _findLineIndexForPosition, findLineIndexForPosition_fn).call(this, caretLocation);
21480
+ const lineIndex = __privateMethod(this, _TextFieldState_instances, findLineIndexForPosition_fn).call(this, caretLocation);
21657
21481
  const line = __privateGet(this, _lineInfo)[lineIndex];
21658
21482
  const localCaretPosition = caretLocation - line.accumulatedChars;
21659
21483
  const lines = (_c = (_b = (_a = __privateGet(this, _textPainter2)) == null ? void 0 : _a.paragraph) == null ? void 0 : _b.lines) != null ? _c : [];
@@ -21691,11 +21515,10 @@
21691
21515
  }
21692
21516
  return charUI;
21693
21517
  };
21694
- _calculateSelectionUI = new WeakSet();
21695
21518
  calculateSelectionUI_fn = function(start, end) {
21696
21519
  var _a, _b, _c, _d, _e, _f, _g, _h;
21697
- const startLineIndex = __privateMethod(this, _findLineIndexForPosition, findLineIndexForPosition_fn).call(this, start);
21698
- const endLineIndex = __privateMethod(this, _findLineIndexForPosition, findLineIndexForPosition_fn).call(this, end);
21520
+ const startLineIndex = __privateMethod(this, _TextFieldState_instances, findLineIndexForPosition_fn).call(this, start);
21521
+ const endLineIndex = __privateMethod(this, _TextFieldState_instances, findLineIndexForPosition_fn).call(this, end);
21699
21522
  const segments = [];
21700
21523
  const lines = (_c = (_b = (_a = __privateGet(this, _textPainter2)) == null ? void 0 : _a.paragraph) == null ? void 0 : _b.lines) != null ? _c : [];
21701
21524
  for (let i = startLineIndex; i <= endLineIndex; i++) {
@@ -21714,18 +21537,17 @@
21714
21537
  }
21715
21538
  return segments;
21716
21539
  };
21717
- _setSelection = new WeakSet();
21718
21540
  setSelection_fn = function(start, end = start) {
21719
21541
  __privateSet(this, _selection, [start, end]);
21720
21542
  const caretLocation = start;
21721
- if (__privateGet(this, _hasSelection, hasSelection_get)) {
21722
- __privateSet(this, _selectionUI, __privateMethod(this, _calculateSelectionUI, calculateSelectionUI_fn).call(this, start, end));
21543
+ if (__privateGet(this, _TextFieldState_instances, hasSelection_get)) {
21544
+ __privateSet(this, _selectionUI, __privateMethod(this, _TextFieldState_instances, calculateSelectionUI_fn).call(this, start, end));
21723
21545
  __privateSet(this, _currentCharUI, null);
21724
21546
  } else {
21725
21547
  __privateSet(this, _selectionUI, null);
21726
- __privateSet(this, _currentCharUI, __privateMethod(this, _calculateCurrentCharRect, calculateCurrentCharRect_fn).call(this, caretLocation));
21548
+ __privateSet(this, _currentCharUI, __privateMethod(this, _TextFieldState_instances, calculateCurrentCharRect_fn).call(this, caretLocation));
21727
21549
  }
21728
- __privateMethod(this, _render, render_fn).call(this);
21550
+ __privateMethod(this, _TextFieldState_instances, render_fn).call(this);
21729
21551
  };
21730
21552
  _getCharIndexFromMouseEvent = new WeakMap();
21731
21553
  var Caret = class extends StatefulWidget_default {
@@ -21798,12 +21620,10 @@
21798
21620
  });
21799
21621
  }
21800
21622
  };
21801
- var _isComposing2, _element, _listeners, _createElement, createElement_fn, _setComposing, setComposing_fn, _disposed, _dispatch, dispatch_fn;
21623
+ var _isComposing2, _element, _listeners, _NativeInput_instances, createElement_fn, setComposing_fn, _disposed, dispatch_fn;
21802
21624
  var NativeInput = class {
21803
21625
  constructor() {
21804
- __privateAdd(this, _createElement);
21805
- __privateAdd(this, _setComposing);
21806
- __privateAdd(this, _dispatch);
21626
+ __privateAdd(this, _NativeInput_instances);
21807
21627
  __privateAdd(this, _isComposing2, false);
21808
21628
  __privateAdd(this, _element, null);
21809
21629
  __privateAdd(this, _listeners, {});
@@ -21838,7 +21658,7 @@
21838
21658
  assert(!__privateGet(this, _disposed), "invalid access. because native input is disposed");
21839
21659
  if (__privateGet(this, _element) == null) {
21840
21660
  if (browser) {
21841
- __privateSet(this, _element, __privateMethod(this, _createElement, createElement_fn).call(this));
21661
+ __privateSet(this, _element, __privateMethod(this, _NativeInput_instances, createElement_fn).call(this));
21842
21662
  document.body.appendChild(__privateGet(this, _element));
21843
21663
  } else {
21844
21664
  __privateSet(this, _element, {
@@ -21871,7 +21691,7 @@
21871
21691
  _isComposing2 = new WeakMap();
21872
21692
  _element = new WeakMap();
21873
21693
  _listeners = new WeakMap();
21874
- _createElement = new WeakSet();
21694
+ _NativeInput_instances = new WeakSet();
21875
21695
  createElement_fn = function() {
21876
21696
  const el = document.createElement("textarea");
21877
21697
  el.setAttribute(
@@ -21879,46 +21699,43 @@
21879
21699
  "position: absolute; opacity: 0; height: 0; width: 0;"
21880
21700
  );
21881
21701
  el.addEventListener("input", (e) => {
21882
- __privateMethod(this, _dispatch, dispatch_fn).call(this, "input", { value: this.value });
21702
+ __privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "input", { value: this.value });
21883
21703
  if (e.isComposing && this.value[this.value.length - 1] === " ") {
21884
- __privateMethod(this, _setComposing, setComposing_fn).call(this, false);
21704
+ __privateMethod(this, _NativeInput_instances, setComposing_fn).call(this, false);
21885
21705
  return;
21886
21706
  }
21887
- __privateMethod(this, _setComposing, setComposing_fn).call(this, e.isComposing);
21707
+ __privateMethod(this, _NativeInput_instances, setComposing_fn).call(this, e.isComposing);
21888
21708
  });
21889
21709
  el.addEventListener("keydown", (e) => {
21890
21710
  if (e.key === "Enter" && !e.shiftKey) {
21891
21711
  e.preventDefault();
21892
- __privateMethod(this, _setComposing, setComposing_fn).call(this, false);
21712
+ __privateMethod(this, _NativeInput_instances, setComposing_fn).call(this, false);
21893
21713
  }
21894
- __privateMethod(this, _setComposing, setComposing_fn).call(this, e.isComposing);
21895
- __privateMethod(this, _dispatch, dispatch_fn).call(this, "keydown", {
21714
+ __privateMethod(this, _NativeInput_instances, setComposing_fn).call(this, e.isComposing);
21715
+ __privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "keydown", {
21896
21716
  key: e.key,
21897
21717
  ctrlKey: e.ctrlKey,
21898
21718
  shiftKey: e.shiftKey
21899
21719
  });
21900
21720
  });
21901
21721
  el.addEventListener("focus", () => {
21902
- __privateMethod(this, _dispatch, dispatch_fn).call(this, "focus", void 0);
21722
+ __privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "focus", void 0);
21903
21723
  });
21904
21724
  el.addEventListener("blur", () => {
21905
- __privateMethod(this, _dispatch, dispatch_fn).call(this, "blur", void 0);
21725
+ __privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "blur", void 0);
21906
21726
  });
21907
21727
  return el;
21908
21728
  };
21909
- _setComposing = new WeakSet();
21910
21729
  setComposing_fn = function(isComposing) {
21911
- if (__privateGet(this, _isComposing2) === isComposing)
21912
- return;
21730
+ if (__privateGet(this, _isComposing2) === isComposing) return;
21913
21731
  __privateSet(this, _isComposing2, isComposing);
21914
21732
  if (isComposing) {
21915
- __privateMethod(this, _dispatch, dispatch_fn).call(this, "compositionstart", void 0);
21733
+ __privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "compositionstart", void 0);
21916
21734
  } else {
21917
- __privateMethod(this, _dispatch, dispatch_fn).call(this, "compositionend", void 0);
21735
+ __privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "compositionend", void 0);
21918
21736
  }
21919
21737
  };
21920
21738
  _disposed = new WeakMap();
21921
- _dispatch = new WeakSet();
21922
21739
  dispatch_fn = function(type, event) {
21923
21740
  var _a;
21924
21741
  (_a = __privateGet(this, _listeners)[type]) == null ? void 0 : _a.forEach((listener) => listener(event));
@@ -22098,11 +21915,11 @@
22098
21915
  objectPosition
22099
21916
  }) {
22100
21917
  super({ isPainter: true });
22101
- __privateAdd(this, _src, void 0);
22102
- __privateAdd(this, _fit, void 0);
22103
- __privateAdd(this, _width, void 0);
22104
- __privateAdd(this, _height, void 0);
22105
- __privateAdd(this, _position, void 0);
21918
+ __privateAdd(this, _src);
21919
+ __privateAdd(this, _fit);
21920
+ __privateAdd(this, _width);
21921
+ __privateAdd(this, _height);
21922
+ __privateAdd(this, _position);
22106
21923
  __publicField(this, "image");
22107
21924
  __publicField(this, "imageLoaded", false);
22108
21925
  __publicField(this, "calculatedImageSize");
@@ -22116,8 +21933,7 @@
22116
21933
  this.image = new Image();
22117
21934
  this.image.onload = () => {
22118
21935
  this.imageLoaded = true;
22119
- if (!__privateGet(this, _mounted))
22120
- return;
21936
+ if (!__privateGet(this, _mounted)) return;
22121
21937
  this.markNeedsLayout();
22122
21938
  };
22123
21939
  this.image.src = src;
@@ -22127,8 +21943,7 @@
22127
21943
  return __privateGet(this, _src);
22128
21944
  }
22129
21945
  set src(value) {
22130
- if (__privateGet(this, _src) === value)
22131
- return;
21946
+ if (__privateGet(this, _src) === value) return;
22132
21947
  __privateSet(this, _src, value);
22133
21948
  if (this.image != null) {
22134
21949
  this.image.src = value;
@@ -22139,8 +21954,7 @@
22139
21954
  return __privateGet(this, _fit);
22140
21955
  }
22141
21956
  set fit(value) {
22142
- if (__privateGet(this, _fit) === value)
22143
- return;
21957
+ if (__privateGet(this, _fit) === value) return;
22144
21958
  __privateSet(this, _fit, value);
22145
21959
  this.markNeedsLayout();
22146
21960
  }
@@ -22148,8 +21962,7 @@
22148
21962
  return __privateGet(this, _width);
22149
21963
  }
22150
21964
  set width(value) {
22151
- if (__privateGet(this, _width) === value)
22152
- return;
21965
+ if (__privateGet(this, _width) === value) return;
22153
21966
  __privateSet(this, _width, value);
22154
21967
  this.markNeedsLayout();
22155
21968
  }
@@ -22157,8 +21970,7 @@
22157
21970
  return __privateGet(this, _height);
22158
21971
  }
22159
21972
  set height(value) {
22160
- if (__privateGet(this, _height) === value)
22161
- return;
21973
+ if (__privateGet(this, _height) === value) return;
22162
21974
  __privateSet(this, _height, value);
22163
21975
  this.markNeedsLayout();
22164
21976
  }
@@ -22166,19 +21978,16 @@
22166
21978
  return __privateGet(this, _position);
22167
21979
  }
22168
21980
  set position(value) {
22169
- if (__privateGet(this, _position) === value)
22170
- return;
21981
+ if (__privateGet(this, _position) === value) return;
22171
21982
  __privateSet(this, _position, value);
22172
21983
  this.markNeedsLayout();
22173
21984
  }
22174
21985
  getIntrinsicWidth() {
22175
- if (this.width != null)
22176
- return this.width;
21986
+ if (this.width != null) return this.width;
22177
21987
  return 0;
22178
21988
  }
22179
21989
  getIntrinsicHeight() {
22180
- if (this.height != null)
22181
- return this.height;
21990
+ if (this.height != null) return this.height;
22182
21991
  return 0;
22183
21992
  }
22184
21993
  preformLayout() {
@@ -22236,10 +22045,8 @@
22236
22045
  calculatedImageSize: imageSize,
22237
22046
  position = "center"
22238
22047
  } = this.renderObject;
22239
- if (!image)
22240
- return;
22241
- if (!imageLoaded)
22242
- return;
22048
+ if (!image) return;
22049
+ if (!imageLoaded) return;
22243
22050
  assert(imageSize != null);
22244
22051
  const { sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight } = calculateImageRendering(
22245
22052
  { width: image.width, height: image.height },