@printine/pod-editor 0.0.0-stage → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +224 -2
  2. package/dist/DesignerRuntimeContext.d.ts +3 -0
  3. package/dist/PrintineDesigner.d.ts +9 -0
  4. package/dist/api/asset-client.d.ts +8 -0
  5. package/dist/api/asset-client.js +40 -0
  6. package/dist/api/asset-endpoints.d.ts +36 -0
  7. package/dist/assets/icons/aspect_ratio.d.ts +3 -0
  8. package/dist/assets/icons/delete.d.ts +3 -0
  9. package/dist/assets/icons/fit_screen.d.ts +3 -0
  10. package/dist/assets/icons/index.d.ts +11 -0
  11. package/dist/assets/icons/loading_1.d.ts +3 -0
  12. package/dist/assets/icons/loading_2.d.ts +3 -0
  13. package/dist/assets/icons/loading_3.d.ts +3 -0
  14. package/dist/assets/icons/pan.d.ts +3 -0
  15. package/dist/assets/icons/setting.d.ts +3 -0
  16. package/dist/assets/icons/text_color.d.ts +3 -0
  17. package/dist/assets/icons/text_h.d.ts +3 -0
  18. package/dist/assets/icons/text_v.d.ts +3 -0
  19. package/dist/bundled-assets.d.ts +4 -0
  20. package/dist/components/add-design.d.ts +8 -0
  21. package/dist/components/assets-dialog.d.ts +24 -0
  22. package/dist/components/canvas-context-menu.d.ts +6 -0
  23. package/dist/components/color-picker/index.d.ts +11 -0
  24. package/dist/components/context.d.ts +24 -0
  25. package/dist/components/design.d.ts +9 -0
  26. package/dist/components/fonts.d.ts +26 -0
  27. package/dist/components/image-crop.d.ts +5 -0
  28. package/dist/components/image-edit.d.ts +1 -0
  29. package/dist/components/layout/aside.d.ts +4 -0
  30. package/dist/components/layout/bottom-nav/element-menu-sheet.d.ts +11 -0
  31. package/dist/components/layout/bottom-nav/element-sheet.d.ts +11 -0
  32. package/dist/components/layout/bottom-nav/index.d.ts +1 -0
  33. package/dist/components/layout/header.d.ts +1 -0
  34. package/dist/components/loading.d.ts +3 -0
  35. package/dist/components/menus/background.d.ts +6 -0
  36. package/dist/components/menus/clipart.d.ts +6 -0
  37. package/dist/components/menus/files.d.ts +7 -0
  38. package/dist/components/menus/image.d.ts +8 -0
  39. package/dist/components/menus/index.d.ts +13 -0
  40. package/dist/components/menus/layer.d.ts +5 -0
  41. package/dist/components/menus/product.d.ts +3 -0
  42. package/dist/components/menus/sca.d.ts +5 -0
  43. package/dist/components/menus/shapes.d.ts +6 -0
  44. package/dist/components/menus/templates.d.ts +6 -0
  45. package/dist/components/menus/text-effects.d.ts +5 -0
  46. package/dist/components/menus/text.d.ts +6 -0
  47. package/dist/components/placement-tab.d.ts +7 -0
  48. package/dist/components/preview/3d.d.ts +8 -0
  49. package/dist/components/preview/graphic.d.ts +15 -0
  50. package/dist/components/preview/index.d.ts +20 -0
  51. package/dist/components/preview/open.d.ts +7 -0
  52. package/dist/components/preview/real-time/3d.d.ts +12 -0
  53. package/dist/components/preview/real-time/graphic.d.ts +31 -0
  54. package/dist/components/preview/real-time/index.d.ts +12 -0
  55. package/dist/components/scale-tools.d.ts +7 -0
  56. package/dist/components/semi-deisgn-config.d.ts +13 -0
  57. package/dist/components/semi-design-link.d.ts +9 -0
  58. package/dist/components/semi-interact-editor.d.ts +27 -0
  59. package/dist/components/semi-renderer.d.ts +74 -0
  60. package/dist/components/store.d.ts +1 -0
  61. package/dist/components/toolbar.d.ts +2 -0
  62. package/dist/components/upload-types.d.ts +20 -0
  63. package/dist/config-D2qm60gf.js +16 -0
  64. package/dist/contracts/api-design.d.ts +180 -0
  65. package/dist/contracts/design.d.ts +86 -0
  66. package/dist/design-CZvEVkwi.js +21443 -0
  67. package/dist/designer-store-Da9fICz8.js +153 -0
  68. package/dist/engine/canvas-designer.d.ts +101 -0
  69. package/dist/engine/canvas-designer.js +313 -0
  70. package/dist/engine/constants.d.ts +26 -0
  71. package/dist/engine/constants.js +147 -0
  72. package/dist/engine/editor.d.ts +199 -0
  73. package/dist/engine/editor.js +801 -0
  74. package/dist/engine/events.d.ts +35 -0
  75. package/dist/engine/events.js +7 -0
  76. package/dist/engine/extensions/curved-text.d.ts +59 -0
  77. package/dist/engine/fabric.d.ts +4 -0
  78. package/dist/engine/fabric.js +187 -0
  79. package/dist/engine/history.d.ts +27 -0
  80. package/dist/engine/history.js +56 -0
  81. package/dist/engine/managers/event.d.ts +101 -0
  82. package/dist/engine/managers/event.js +410 -0
  83. package/dist/engine/managers/resize.d.ts +26 -0
  84. package/dist/engine/managers/resize.js +64 -0
  85. package/dist/engine/managers/snapline.d.ts +70 -0
  86. package/dist/engine/managers/snapline.js +124 -0
  87. package/dist/engine/managers/workspace.d.ts +29 -0
  88. package/dist/engine/managers/workspace.js +75 -0
  89. package/dist/engine/processors/image.d.ts +88 -0
  90. package/dist/engine/processors/image.js +473 -0
  91. package/dist/engine/processors/template.d.ts +45 -0
  92. package/dist/engine/processors/template.js +314 -0
  93. package/dist/engine/processors/text.d.ts +74 -0
  94. package/dist/engine/processors/text.js +215 -0
  95. package/dist/engine/semi-export-editor.d.ts +215 -0
  96. package/dist/engine/types.d.ts +28 -0
  97. package/dist/engine/utils/common.d.ts +25 -0
  98. package/dist/engine/utils/common.js +68 -0
  99. package/dist/engine/utils/dialog.d.ts +25 -0
  100. package/dist/engine/utils/font.d.ts +5 -0
  101. package/dist/engine/utils/font.js +39 -0
  102. package/dist/engine/utils/image.d.ts +8 -0
  103. package/dist/engine/utils/image.js +50 -0
  104. package/dist/engine/utils/loading.d.ts +17 -0
  105. package/dist/engine/utils/loading.js +71 -0
  106. package/dist/engine/utils/measure.d.ts +6 -0
  107. package/dist/engine/utils/measure.js +6 -0
  108. package/dist/engine/utils/mockup.d.ts +59 -0
  109. package/dist/engine/utils/setting.d.ts +4 -0
  110. package/dist/engine/utils/setting.js +73 -0
  111. package/dist/fabric-types.d.ts +59 -0
  112. package/dist/full-designer.js +13 -0
  113. package/dist/hooks/pagination.d.ts +19 -0
  114. package/dist/hooks/use-adobe-express.d.ts +50 -0
  115. package/dist/hooks/use-before-unload.d.ts +1 -0
  116. package/dist/hooks/use-image-drop.d.ts +18 -0
  117. package/dist/hooks/use-preview-assets.d.ts +2 -0
  118. package/dist/hooks/use-screen.d.ts +1 -0
  119. package/dist/i18n/index.d.ts +12 -0
  120. package/dist/images/design/asset_empty.png +0 -0
  121. package/dist/images/design/design/background.svg +3 -0
  122. package/dist/images/design/design/color-picker.svg +15 -0
  123. package/dist/images/design/design/computer.svg +1 -0
  124. package/dist/images/design/design/copy.svg +1 -0
  125. package/dist/images/design/design/image.svg +10 -0
  126. package/dist/images/design/design/line.svg +1 -0
  127. package/dist/images/design/design/text.svg +1 -0
  128. package/dist/images/design/design/title.svg +1 -0
  129. package/dist/images/design/empty.png +0 -0
  130. package/dist/images/design/layer_empty.png +0 -0
  131. package/dist/images/design/menu/ai.svg +1 -0
  132. package/dist/images/design/menu/back.svg +4 -0
  133. package/dist/images/design/menu/background.svg +6 -0
  134. package/dist/images/design/menu/clipart.svg +6 -0
  135. package/dist/images/design/menu/file.svg +4 -0
  136. package/dist/images/design/menu/fill.svg +1 -0
  137. package/dist/images/design/menu/image.svg +7 -0
  138. package/dist/images/design/menu/layer.svg +6 -0
  139. package/dist/images/design/menu/product.svg +3 -0
  140. package/dist/images/design/menu/sca.svg +5 -0
  141. package/dist/images/design/menu/shapes.svg +5 -0
  142. package/dist/images/design/menu/templates.svg +6 -0
  143. package/dist/images/design/menu/text.svg +6 -0
  144. package/dist/images/design/menu/uploads.svg +7 -0
  145. package/dist/images/design/spinner.svg +3 -0
  146. package/dist/images/design/spinners.svg +17 -0
  147. package/dist/images/design/transparent_pattern.svg +5 -0
  148. package/dist/index.d.ts +49 -0
  149. package/dist/index.js +156 -0
  150. package/dist/lib/analytics.d.ts +17 -0
  151. package/dist/lib/base-plate.d.ts +3 -0
  152. package/dist/lib/cn.d.ts +3 -0
  153. package/dist/lib/common.d.ts +16 -0
  154. package/dist/lib/config.d.ts +14 -0
  155. package/dist/lib/navigation.d.ts +2 -0
  156. package/dist/pixel-map-dSys7UAx.js +137 -0
  157. package/dist/renderer/ThreeDPreview.d.ts +14 -0
  158. package/dist/renderer/latest-task-queue.d.ts +17 -0
  159. package/dist/renderer/pixel-map.d.ts +37 -0
  160. package/dist/renderer/preview-asset-cache.d.ts +4 -0
  161. package/dist/renderer/render-layer-output.d.ts +5 -0
  162. package/dist/renderer/semi-resource-cache.d.ts +28 -0
  163. package/dist/renderer/sticker.d.ts +34 -0
  164. package/dist/renderer/sticker.js +1837 -0
  165. package/dist/renderer/three-d-preview.js +32 -0
  166. package/dist/semi-interact-editor-DfzphWy3.js +1409 -0
  167. package/dist/semi-renderer.d.ts +7 -0
  168. package/dist/semi-renderer.js +5 -0
  169. package/dist/state/designer-store.d.ts +43 -0
  170. package/dist/state/designer-store.js +8 -0
  171. package/dist/style.css +1 -0
  172. package/dist/types.d.ts +279 -0
  173. package/dist/ui/accordion.d.ts +7 -0
  174. package/dist/ui/button-group.d.ts +11 -0
  175. package/dist/ui/button.d.ts +10 -0
  176. package/dist/ui/checkbox.d.ts +4 -0
  177. package/dist/ui/command.d.ts +18 -0
  178. package/dist/ui/confirm-dialog.d.ts +15 -0
  179. package/dist/ui/context-menu.d.ts +25 -0
  180. package/dist/ui/dialog.d.ts +15 -0
  181. package/dist/ui/drawer.d.ts +15 -0
  182. package/dist/ui/editable-combobox.d.ts +11 -0
  183. package/dist/ui/hint.d.ts +8 -0
  184. package/dist/ui/image.d.ts +24 -0
  185. package/dist/ui/input-group.d.ts +16 -0
  186. package/dist/ui/input-with-addon.d.ts +17 -0
  187. package/dist/ui/input.d.ts +3 -0
  188. package/dist/ui/label.d.ts +4 -0
  189. package/dist/ui/loading-button.d.ts +15 -0
  190. package/dist/ui/popover.d.ts +9 -0
  191. package/dist/ui/scroll-area.d.ts +5 -0
  192. package/dist/ui/select.d.ts +22 -0
  193. package/dist/ui/separator.d.ts +4 -0
  194. package/dist/ui/shared-loading-button.d.ts +20 -0
  195. package/dist/ui/simple-dialog.d.ts +19 -0
  196. package/dist/ui/simple-popover.d.ts +13 -0
  197. package/dist/ui/simple-select.d.ts +20 -0
  198. package/dist/ui/skeleton.d.ts +2 -0
  199. package/dist/ui/slider.d.ts +4 -0
  200. package/dist/ui/spinner-box.d.ts +12 -0
  201. package/dist/ui/spinner.d.ts +2 -0
  202. package/dist/ui/switch.d.ts +6 -0
  203. package/dist/ui/tab/index.d.ts +15 -0
  204. package/dist/ui/textarea.d.ts +3 -0
  205. package/dist/ui/tooltip.d.ts +7 -0
  206. package/dist/workers/image-resize.worker.d.ts +1 -0
  207. package/dist/workers/mockup.worker.d.ts +5 -0
  208. package/dist/workers/pixel-map.worker.d.ts +1 -0
  209. package/dist/workers/render-asset-cache.d.ts +18 -0
  210. package/dist/workers/render.worker.d.ts +1 -0
  211. package/docs/HOST_DATA_CONTRACT.md +434 -0
  212. package/docs/INTEGRATION_API.md +547 -0
  213. package/docs/SEMI_RENDERER.md +141 -0
  214. package/docs/auth-api.md +3 -0
  215. package/package.json +199 -4
@@ -0,0 +1,1837 @@
1
+ import * as C from "pixi.js";
2
+ import * as P from "babylonjs";
3
+ import "babylonjs-loaders";
4
+ var Ge = Object.defineProperty, We = (o, s, t) => s in o ? Ge(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t, T = (o, s, t) => We(o, typeof s != "symbol" ? s + "" : s, t), Vt, Ft, zt, Gt, Wt, Ht, jt, Kt, qt, Qt, Jt, Zt, $t, te, ee, se, ie, ne, re, ae, oe, he, ce, le, xe, ue, fe, de, _e, ye, pe, me, ve, ge, be, Ie, we, Me, Ce;
5
+ const j = _t;
6
+ (function(o, s) {
7
+ const t = _t, e = o();
8
+ for (; ; )
9
+ try {
10
+ if (parseInt(t(167)) / 1 + -parseInt(t(166)) / 2 * (parseInt(t(150)) / 3) + -parseInt(t(168)) / 4 * (parseInt(t(154)) / 5) + -parseInt(t(178)) / 6 + -parseInt(t(171)) / 7 + parseInt(t(173)) / 8 * (parseInt(t(165)) / 9) + parseInt(t(177)) / 10 === s) break;
11
+ e.push(e.shift());
12
+ } catch {
13
+ e.push(e.shift());
14
+ }
15
+ })(yt, 223429);
16
+ function _t(o, s) {
17
+ const t = yt();
18
+ return _t = function(e, i) {
19
+ return e = e - 150, t[e];
20
+ }, _t(o, s);
21
+ }
22
+ class He {
23
+ constructor(s) {
24
+ T(this, Ft), T(this, Vt);
25
+ const t = j;
26
+ this[t(158)] = s;
27
+ }
28
+ async [(Ft = j(158), Vt = j(170), j(153))](s, t) {
29
+ const e = j;
30
+ !this[e(170)] && (this[e(170)] = new C[e(172)](), this.highlight[e(161)] = e(170)), this[e(170)][e(164)].length && this[e(170)][e(160)]();
31
+ const i = new C[e(174)](s);
32
+ this[e(170)].position[e(155)](t.x, t.y);
33
+ const n = new C[e(156)]();
34
+ n[e(163)](4, 16711680), n[e(152)](0, 0, s[e(157)], s.height), this[e(170)][e(169)](i), this[e(170)][e(169)](n), this[e(170)][e(175)] = !0;
35
+ const a = this[e(158)].stage[e(151)](e(170)), r = Math.max(...this[e(158)][e(159)].children[e(176)]((h) => h[e(162)]));
36
+ this[e(170)][e(162)] = r + 1, !a && this[e(158)][e(159)][e(169)](this[e(170)]);
37
+ }
38
+ toggleHighlight(s) {
39
+ const t = j;
40
+ this[t(170)] && (this[t(170)][t(175)] = s);
41
+ }
42
+ }
43
+ function yt() {
44
+ const o = ["2316528TJXgMz", "Sprite", "visible", "map", "9994820mkvSRs", "743736SxAWOr", "12SmyuVV", "getChildByName", "drawRect", "setHighlight", "5XpdGjU", "set", "Graphics", "width", "app", "stage", "removeChildren", "name", "zIndex", "lineStyle", "children", "9hwSXfH", "85238lzovAm", "2144GHNyDx", "1368848BSkDFJ", "addChild", "highlight", "3017833tXqfFp", "Container"];
45
+ return yt = function() {
46
+ return o;
47
+ }, yt();
48
+ }
49
+ (function(o, s) {
50
+ const t = Z, e = o();
51
+ for (; ; )
52
+ try {
53
+ if (parseInt(t(139)) / 1 + -parseInt(t(138)) / 2 + -parseInt(t(140)) / 3 * (-parseInt(t(141)) / 4) + -parseInt(t(135)) / 5 + -parseInt(t(134)) / 6 * (parseInt(t(136)) / 7) + parseInt(t(125)) / 8 * (parseInt(t(124)) / 9) + parseInt(t(133)) / 10 === s) break;
54
+ e.push(e.shift());
55
+ } catch {
56
+ e.push(e.shift());
57
+ }
58
+ })(pt, 152049);
59
+ function O(o, s, t) {
60
+ const e = (s.x - o.x) / 3, i = (s.y - o.y) / 3;
61
+ return { dx: t.x - o.x - e, dy: t.y - o.y - i };
62
+ }
63
+ function U(o) {
64
+ return { dx: o.dx, dy: o.dy, baseDx: 0, baseDy: 0, moved: !0 };
65
+ }
66
+ function je(o) {
67
+ const s = Z, { corners: t, curveCtrl: e } = o;
68
+ if (!t || t[s(129)] < 4) throw new Error(s(127));
69
+ if (!e || e.length < 8) throw new Error(s(137));
70
+ const i = t[0], n = t[1], a = t[2], r = t[3], h = e[0], x = e[1], c = e[2], l = e[3], u = e[4], f = e[5], m = e[6], b = e[7], I = U(O(i, n, h)), _ = U(O(i, r, b)), p = U(O(n, i, x)), y = U(O(n, a, c)), M = U(O(r, a, f)), v = U(O(r, i, m)), g = U(O(a, r, u)), w = U(O(a, n, l)), A = [[{ x: i.x, y: i.y, pin: !0, r: I, d: _ }, { x: n.x, y: n.y, pin: !0, l: p, d: y }], [{ x: r.x, y: r.y, pin: !0, r: M, u: v }, { x: a.x, y: a.y, pin: !0, l: g, u: w }]];
71
+ return { uLines: [0, 1], vLines: [0, 1], grid: A };
72
+ }
73
+ function Z(o, s) {
74
+ const t = pt();
75
+ return Z = function(e, i) {
76
+ return e = e - 124, t[e];
77
+ }, Z(o, s);
78
+ }
79
+ function pt() {
80
+ const o = ["length", "corners", "grid", "uLines", "2941010qKTScd", "6DqZjCC", "1101275hQKrDl", "791434sPdSiT", "legacyToMeshData: curveCtrl 长度必须 >=8", "268428PotYbx", "211021QlCFQQ", "3mbaMqd", "356476JOKtqO", "isArray", "228051eiTryu", "8YnubeQ", "curveCtrl", "legacyToMeshData: corners 长度必须 >=4", "vLines"];
81
+ return pt = function() {
82
+ return o;
83
+ }, pt();
84
+ }
85
+ function Ke(o) {
86
+ const s = Z;
87
+ return !!(o && Array[s(142)](o[s(132)]) && Array[s(142)](o[s(128)]) && Array[s(142)](o[s(131)]));
88
+ }
89
+ (function(o, s) {
90
+ const t = mt, e = o();
91
+ for (; ; )
92
+ try {
93
+ if (-parseInt(t(368)) / 1 * (-parseInt(t(370)) / 2) + parseInt(t(356)) / 3 * (-parseInt(t(365)) / 4) + -parseInt(t(367)) / 5 * (parseInt(t(360)) / 6) + -parseInt(t(361)) / 7 * (parseInt(t(358)) / 8) + parseInt(t(366)) / 9 * (parseInt(t(364)) / 10) + -parseInt(t(363)) / 11 * (-parseInt(t(355)) / 12) + parseInt(t(354)) / 13 * (parseInt(t(359)) / 14) === s) break;
94
+ e.push(e.shift());
95
+ } catch {
96
+ e.push(e.shift());
97
+ }
98
+ })(vt, 997866);
99
+ function Y(o, s) {
100
+ const t = mt, e = o && o[s];
101
+ return !e || !e[t(362)] ? { dx: 0, dy: 0 } : { dx: (Number(e.dx) || 0) - (Number(e[t(357)]) || 0), dy: (Number(e.dy) || 0) - (Number(e[t(369)]) || 0) };
102
+ }
103
+ function rt(o, s, t, e, i) {
104
+ const n = 1 - i;
105
+ return { x: n * n * n * o.x + 3 * n * n * i * s.x + 3 * n * i * i * t.x + i * i * i * e.x, y: n * n * n * o.y + 3 * n * n * i * s.y + 3 * n * i * i * t.y + i * i * i * e.y };
106
+ }
107
+ function mt(o, s) {
108
+ const t = vt();
109
+ return mt = function(e, i) {
110
+ return e = e - 354, t[e];
111
+ }, mt(o, s);
112
+ }
113
+ function Oe(o, s, t, e, i, n) {
114
+ const a = (v, g) => ({ dx: (g.x - v.x) / 3, dy: (g.y - v.y) / 3 }), r = (() => {
115
+ const v = a(o, s), g = Y(o, "r");
116
+ return { x: o.x + v.dx + g.dx, y: o.y + v.dy + g.dy };
117
+ })(), h = (() => {
118
+ const v = a(s, o), g = Y(s, "l");
119
+ return { x: s.x + v.dx + g.dx, y: s.y + v.dy + g.dy };
120
+ })(), x = (() => {
121
+ const v = a(t, e), g = Y(t, "r");
122
+ return { x: t.x + v.dx + g.dx, y: t.y + v.dy + g.dy };
123
+ })(), c = (() => {
124
+ const v = a(e, t), g = Y(e, "l");
125
+ return { x: e.x + v.dx + g.dx, y: e.y + v.dy + g.dy };
126
+ })(), l = (() => {
127
+ const v = a(o, t), g = Y(o, "d");
128
+ return { x: o.x + v.dx + g.dx, y: o.y + v.dy + g.dy };
129
+ })(), u = (() => {
130
+ const v = a(t, o), g = Y(t, "u");
131
+ return { x: t.x + v.dx + g.dx, y: t.y + v.dy + g.dy };
132
+ })(), f = (() => {
133
+ const v = a(s, e), g = Y(s, "d");
134
+ return { x: s.x + v.dx + g.dx, y: s.y + v.dy + g.dy };
135
+ })(), m = (() => {
136
+ const v = a(e, s), g = Y(e, "u");
137
+ return { x: e.x + v.dx + g.dx, y: e.y + v.dy + g.dy };
138
+ })(), b = rt({ x: o.x, y: o.y }, r, h, { x: s.x, y: s.y }, i), I = rt({ x: t.x, y: t.y }, x, c, { x: e.x, y: e.y }, i), _ = rt({ x: o.x, y: o.y }, l, u, { x: t.x, y: t.y }, n), p = rt({ x: s.x, y: s.y }, f, m, { x: e.x, y: e.y }, n), y = (1 - n) * (1 - i) * o.x + (1 - n) * i * s.x + n * (1 - i) * t.x + n * i * e.x, M = (1 - n) * (1 - i) * o.y + (1 - n) * i * s.y + n * (1 - i) * t.y + n * i * e.y;
139
+ return { x: (1 - n) * b.x + n * I.x + (1 - i) * _.x + i * p.x - y, y: (1 - n) * b.y + n * I.y + (1 - i) * _.y + i * p.y - M };
140
+ }
141
+ function vt() {
142
+ const o = ["354876XUnFzN", "12273489cRvLCf", "218245QqrPBm", "4049hlrHHv", "baseDy", "926cAxdqu", "34879EAZRYA", "6948fbAhTm", "51acBrNm", "baseDx", "232splfFI", "6370acqXxA", "186EkMSaI", "312809ZSvyky", "moved", "13222WiOTBH", "10rfYeYE"];
143
+ return vt = function() {
144
+ return o;
145
+ }, vt();
146
+ }
147
+ (function(o, s) {
148
+ const t = $, e = o();
149
+ for (; ; )
150
+ try {
151
+ if (parseInt(t(329)) / 1 * (parseInt(t(340)) / 2) + parseInt(t(332)) / 3 + parseInt(t(342)) / 4 + parseInt(t(334)) / 5 * (parseInt(t(338)) / 6) + -parseInt(t(337)) / 7 * (-parseInt(t(339)) / 8) + parseInt(t(335)) / 9 + -parseInt(t(336)) / 10 * (parseInt(t(331)) / 11) === s) break;
152
+ e.push(e.shift());
153
+ } catch {
154
+ e.push(e.shift());
155
+ }
156
+ })(gt, 376839);
157
+ function gt() {
158
+ const o = ["2066337GvbfyG", "8530750wDnVoj", "49uuNTPJ", "96syIGrn", "637144ctfsRX", "22bJttQd", "max", "2275840kbJnDt", "32474XNTBUJ", "length", "22odFvwU", "728187IFwsXO", "min", "39685QKXOHN"];
159
+ return gt = function() {
160
+ return o;
161
+ }, gt();
162
+ }
163
+ const qe = 1e-9;
164
+ function Qe(o, s) {
165
+ const t = $;
166
+ let e = 0, i = o[t(330)];
167
+ for (; e < i; ) {
168
+ const n = e + i >> 1;
169
+ o[n] < s ? e = n + 1 : i = n;
170
+ }
171
+ return e;
172
+ }
173
+ function bt(o, s, t = qe) {
174
+ const e = $, i = o.length;
175
+ if (i <= 2) return 0;
176
+ const n = Qe(o, s - t);
177
+ return Math[e(333)](Math[e(341)](n - 1, 0), i - 2);
178
+ }
179
+ function $(o, s) {
180
+ const t = gt();
181
+ return $ = function(e, i) {
182
+ return e = e - 329, t[e];
183
+ }, $(o, s);
184
+ }
185
+ function Je(o, s, t, e, i, n, a) {
186
+ const r = bt(o, e), h = bt(s, i), x = o[r + 1] - o[r], c = s[h + 1] - s[h], l = x > 1e-9 ? (e - o[r]) / x : 0, u = c > 1e-9 ? (i - s[h]) / c : 0, f = t[h][r], m = t[h][r + 1], b = t[h + 1][r], I = t[h + 1][r + 1];
187
+ return n ? a(f, m, b, I, l, u) : { x: f.x * (1 - l) * (1 - u) + m.x * l * (1 - u) + b.x * (1 - l) * u + I.x * l * u, y: f.y * (1 - l) * (1 - u) + m.y * l * (1 - u) + b.y * (1 - l) * u + I.y * l * u };
188
+ }
189
+ function It() {
190
+ const o = ["baseDy", "4hQPNIz", "push", "baseDx", "558qJXnis", "52908IheAgs", "moved", "692034gdXtPC", "174921lxlmom", "24YdcEil", "979ScMVof", "pin", "290ugpvtX", "1330629DCepok", "77570HUMxMQ", "15948RvDeXX", "1515720vXgxEc"];
191
+ return It = function() {
192
+ return o;
193
+ }, It();
194
+ }
195
+ function K(o, s) {
196
+ const t = It();
197
+ return K = function(e, i) {
198
+ return e = e - 420, t[e];
199
+ }, K(o, s);
200
+ }
201
+ (function(o, s) {
202
+ const t = K, e = o();
203
+ for (; ; )
204
+ try {
205
+ if (parseInt(t(423)) / 1 + parseInt(t(433)) / 2 * (parseInt(t(428)) / 3) + -parseInt(t(420)) / 4 * (parseInt(t(427)) / 5) + parseInt(t(431)) / 6 + -parseInt(t(422)) / 7 * (-parseInt(t(424)) / 8) + parseInt(t(436)) / 9 * (-parseInt(t(429)) / 10) + parseInt(t(425)) / 11 * (parseInt(t(430)) / 12) === s) break;
206
+ e.push(e.shift());
207
+ } catch {
208
+ e.push(e.shift());
209
+ }
210
+ })(It, 481394);
211
+ function dt(o, s, t, e) {
212
+ const i = K, n = o === 0, a = o === t - 1, r = s === 0, h = s === e - 1, x = [];
213
+ return h || x[i(434)]("r"), r || x.push("l"), a || x.push("d"), n || x.push("u"), x;
214
+ }
215
+ function Ze(o, s, t, e, i) {
216
+ const n = K, a = {}, r = dt(o, s, t, e);
217
+ for (const h of r)
218
+ if (i && i[h]) {
219
+ const x = i[h];
220
+ a[h] = { dx: Number(x.dx) || 0, dy: Number(x.dy) || 0, moved: !!x[n(421)], baseDx: x[n(435)] !== void 0 ? Number(x.baseDx) || 0 : Number(x.dx) || 0, baseDy: x[n(432)] !== void 0 ? Number(x[n(432)]) || 0 : Number(x.dy) || 0 };
221
+ } else a[h] = { dx: 0, dy: 0, moved: !1, baseDx: 0, baseDy: 0 };
222
+ return a;
223
+ }
224
+ function G(o, s, t, e, i, n, a) {
225
+ const r = K, h = !!(a && a[r(426)]);
226
+ return { x: o, y: s, pin: h, ...Ze(e, t, n, i, a || null) };
227
+ }
228
+ (function(o, s) {
229
+ const t = tt, e = o();
230
+ for (; ; )
231
+ try {
232
+ if (parseInt(t(453)) / 1 + parseInt(t(465)) / 2 + -parseInt(t(458)) / 3 * (-parseInt(t(466)) / 4) + -parseInt(t(456)) / 5 * (parseInt(t(461)) / 6) + parseInt(t(455)) / 7 * (-parseInt(t(467)) / 8) + parseInt(t(457)) / 9 * (parseInt(t(464)) / 10) + parseInt(t(460)) / 11 === s) break;
233
+ e.push(e.shift());
234
+ } catch {
235
+ e.push(e.shift());
236
+ }
237
+ })(wt, 327465);
238
+ function tt(o, s) {
239
+ const t = wt();
240
+ return tt = function(e, i) {
241
+ return e = e - 451, t[e];
242
+ }, tt(o, s);
243
+ }
244
+ function $e(o, s, t, e, i) {
245
+ const n = tt;
246
+ if (!(o[n(463)] === s && o[n(468)] === t && o.texCols === e && o[n(454)] === i && o.texUSeg)) {
247
+ o[n(463)] = s, o[n(468)] = t, o[n(462)] = e, o[n(454)] = i, o[n(459)] = new Int16Array(e + 1), o[n(469)] = new Int16Array(i + 1), o[n(452)] = new Float32Array(e + 1), o[n(451)] = new Float32Array(i + 1);
248
+ for (let a = 0; a <= e; a++) {
249
+ const r = a / e, h = bt(s, r), x = s[h], c = s[h + 1], l = c - x;
250
+ o[n(459)][a] = h, o[n(452)][a] = l > 1e-9 ? (r - x) / l : 0;
251
+ }
252
+ for (let a = 0; a <= i; a++) {
253
+ const r = a / i, h = bt(t, r), x = t[h], c = t[h + 1], l = c - x;
254
+ o[n(469)][a] = h, o[n(451)][a] = l > 1e-9 ? (r - x) / l : 0;
255
+ }
256
+ }
257
+ }
258
+ function ts(o, s, t, e, i, n) {
259
+ const a = o[t][s], r = o[t][s + 1], h = o[t + 1][s], x = o[t + 1][s + 1];
260
+ return n ? Oe(a, r, h, x, e, i) : { x: a.x * (1 - e) * (1 - i) + r.x * e * (1 - i) + h.x * (1 - e) * i + x.x * e * i, y: a.y * (1 - e) * (1 - i) + r.y * e * (1 - i) + h.y * (1 - e) * i + x.y * e * i };
261
+ }
262
+ function es(o) {
263
+ const s = tt, { texVerts: t, cache: e, grid: i, cols: n, rows: a, moved: r } = o, h = e[s(459)], x = e[s(469)], c = e[s(452)], l = e.texLV;
264
+ if (!h || !x || !c || !l) return;
265
+ let u = 0;
266
+ for (let f = 0; f <= a; f++) {
267
+ const m = x[f], b = l[f];
268
+ for (let I = 0; I <= n; I++) {
269
+ const _ = h[I], p = c[I], y = ts(i, _, m, p, b, r);
270
+ t[u++] = y.x, t[u++] = y.y;
271
+ }
272
+ }
273
+ }
274
+ function wt() {
275
+ const o = ["texRows", "983031hgAIGM", "5iAEgqg", "54adNFXQ", "63741boUZXI", "texUSeg", "286066NmtOEm", "3707064OsKqdk", "texCols", "texUArr", "605390uaFVYs", "994300TErhwj", "68sBrawj", "24ZsIfNu", "texVArr", "texVSeg", "texLV", "texLU", "119019aVpQqP"];
276
+ return wt = function() {
277
+ return o;
278
+ }, wt();
279
+ }
280
+ function Mt() {
281
+ const o = ["1269909TzAuWz", "isArray", "无效 JSON", "baseDy", "pin", "moved", "1283320cPnKFU", "vLines 无效", "1007834tlsXTY", "grid 列数不匹配", "17799921ojioKd", "length", "max", "10WPhcxo", "1699074nNTgUi", "14RicQGA", "uLines 无效", "map", "4254230NVYTtI", "vLines", "2883603JRVhXw", "grid 行数不匹配", "4edbglO", "grid"];
282
+ return Mt = function() {
283
+ return o;
284
+ }, Mt();
285
+ }
286
+ (function(o, s) {
287
+ const t = et, e = o();
288
+ for (; ; )
289
+ try {
290
+ if (-parseInt(t(292)) / 1 + -parseInt(t(300)) / 2 + -parseInt(t(288)) / 3 + parseInt(t(290)) / 4 * (parseInt(t(286)) / 5) + parseInt(t(306)) / 6 + -parseInt(t(307)) / 7 * (-parseInt(t(298)) / 8) + -parseInt(t(302)) / 9 * (-parseInt(t(305)) / 10) === s) break;
291
+ e.push(e.shift());
292
+ } catch {
293
+ e.push(e.shift());
294
+ }
295
+ })(Mt, 697597);
296
+ function at(o) {
297
+ const s = et;
298
+ return o ? { dx: Number(o.dx) || 0, dy: Number(o.dy) || 0, baseDx: o.baseDx !== void 0 && Number(o.baseDx) || 0, baseDy: o[s(295)] !== void 0 && Number(o[s(295)]) || 0, moved: !!o[s(297)] } : null;
299
+ }
300
+ function et(o, s) {
301
+ const t = Mt();
302
+ return et = function(e, i) {
303
+ return e = e - 286, t[e];
304
+ }, et(o, s);
305
+ }
306
+ function ss(o) {
307
+ const s = et;
308
+ if (!o || typeof o != "object") throw new Error(s(294));
309
+ const t = o.uLines, e = o[s(287)], i = o[s(291)];
310
+ if (!Array.isArray(t) || t.length < 2) throw new Error(s(308));
311
+ if (!Array[s(293)](e) || e[s(303)] < 2) throw new Error(s(299));
312
+ if (!Array[s(293)](i) || i[s(303)] !== e[s(303)]) throw new Error(s(289));
313
+ for (let a = 0; a < i[s(303)]; a++)
314
+ if (!Array[s(293)](i[a]) || i[a][s(303)] !== t[s(303)]) throw new Error(s(301));
315
+ const n = i[s(309)]((a) => a.map((r) => {
316
+ const h = s, x = { x: Number(r.x) || 0, y: Number(r.y) || 0, pin: !!r[h(296)] }, c = at(r.r);
317
+ c && (x.r = c);
318
+ const l = at(r.l);
319
+ l && (x.l = l);
320
+ const u = at(r.u);
321
+ u && (x.u = u);
322
+ const f = at(r.d);
323
+ return f && (x.d = f), x;
324
+ }));
325
+ return { uLines: [...t], vLines: [...e], grid: n };
326
+ }
327
+ function st(o, s) {
328
+ const t = Ct();
329
+ return st = function(e, i) {
330
+ return e = e - 388, t[e];
331
+ }, st(o, s);
332
+ }
333
+ (function(o, s) {
334
+ const t = st, e = o();
335
+ for (; ; )
336
+ try {
337
+ if (-parseInt(t(399)) / 1 * (-parseInt(t(395)) / 2) + -parseInt(t(396)) / 3 * (parseInt(t(392)) / 4) + -parseInt(t(390)) / 5 + parseInt(t(397)) / 6 + parseInt(t(401)) / 7 + -parseInt(t(388)) / 8 * (-parseInt(t(389)) / 9) + -parseInt(t(394)) / 10 === s) break;
338
+ e.push(e.shift());
339
+ } catch {
340
+ e.push(e.shift());
341
+ }
342
+ })(Ct, 150605);
343
+ function Ue(o) {
344
+ const s = st;
345
+ if (!o || typeof o != "object") return !1;
346
+ const t = o;
347
+ return t[s(403)] === s(400) || t[s(398)] !== void 0 || t[s(402)] !== void 0;
348
+ }
349
+ function Ct() {
350
+ const o = ["vertices", "length", "isFinite", "922840ubJVMa", "9wPfPlX", "987175XXxiEG", "isInteger", "732092AvdGbX", "every", "1891500teDdLN", "2IwzPZK", "3naoCSq", "1451622Gasdqi", "uvs", "241883vMpTcA", "view-pixels", "847266sBdVtV", "indices", "space"];
351
+ return Ct = function() {
352
+ return o;
353
+ }, Ct();
354
+ }
355
+ function Ve(o) {
356
+ const s = st;
357
+ if (!o || typeof o != "object") return !1;
358
+ const t = o;
359
+ if (!Array.isArray(t.vertices) || !Array.isArray(t.uvs) || !Array.isArray(t[s(402)]) || t[s(404)].length === 0 || t[s(404)][s(405)] % 2 !== 0 || t[s(398)][s(405)] !== t.vertices[s(405)] || t.indices[s(405)] === 0 || t[s(402)][s(405)] % 3 !== 0) return !1;
360
+ const e = t[s(404)].length / 2;
361
+ return t[s(404)][s(393)](Number[s(406)]) && t.uvs.every(Number[s(406)]) && t.indices.every((i) => Number[s(391)](i) && i >= 0 && i < e && i <= 65535);
362
+ }
363
+ (function(o, s) {
364
+ const t = q, e = o();
365
+ for (; ; )
366
+ try {
367
+ if (parseInt(t(455)) / 1 * (parseInt(t(458)) / 2) + parseInt(t(456)) / 3 * (parseInt(t(454)) / 4) + -parseInt(t(463)) / 5 * (-parseInt(t(459)) / 6) + -parseInt(t(460)) / 7 + -parseInt(t(449)) / 8 * (parseInt(t(462)) / 9) + -parseInt(t(451)) / 10 + parseInt(t(457)) / 11 === s) break;
368
+ e.push(e.shift());
369
+ } catch {
370
+ e.push(e.shift());
371
+ }
372
+ })(At, 434798);
373
+ function Ae(o, s, t = 1e-12) {
374
+ const e = q;
375
+ if (o === s) return !0;
376
+ if (!o || !s || o[e(450)] !== s[e(450)]) return !1;
377
+ for (let i = 0; i < o[e(450)]; i++) if (Math[e(448)](o[i] - s[i]) > t) return !1;
378
+ return !0;
379
+ }
380
+ function At() {
381
+ const o = ["6LSTMoI", "5802139VIXfKb", "findIndex", "153nqLtMc", "131315mifmii", "abs", "153848GziEdA", "length", "1827560ajDcXG", "filter", "isArray", "36wWAelj", "224097FlRPmu", "87051NQNxgm", "13880295UhlGhL", "2SlZcST"];
382
+ return At = function() {
383
+ return o;
384
+ }, At();
385
+ }
386
+ function Tt(o, s, t, e) {
387
+ const i = q;
388
+ if (!Array[i(453)](o) || o[i(450)] < 2 || s <= t || s >= 1 - t) return !1;
389
+ for (const n of o) if (Math.abs(n - s) < e) return !1;
390
+ return !0;
391
+ }
392
+ function Te(o, s) {
393
+ const t = [...o, s];
394
+ return t.sort((e, i) => e - i), t;
395
+ }
396
+ function q(o, s) {
397
+ const t = At();
398
+ return q = function(e, i) {
399
+ return e = e - 448, t[e];
400
+ }, q(o, s);
401
+ }
402
+ function Se(o, s, t, e, i, n) {
403
+ const a = Tt(o, t, i, n), r = Tt(s, e, i, n);
404
+ if (!a && !r) return null;
405
+ const h = a ? Te(o, t) : [...o], x = r ? Te(s, e) : [...s];
406
+ return { newU: h, newV: x };
407
+ }
408
+ function Le(o, s, t = 1e-9) {
409
+ const e = q;
410
+ if (!Array.isArray(o) || o[e(450)] < 3) return null;
411
+ const i = o[e(461)]((n, a) => a > 0 && a < o[e(450)] - 1 && Math[e(448)](n - s) < t);
412
+ return i < 0 ? null : o[e(452)]((n, a) => a !== i);
413
+ }
414
+ function is(o, s, t, e, i = 1e-9) {
415
+ let n = null, a = null;
416
+ t != null && (n = Le(o, t, i)), e != null && (a = Le(s, e, i));
417
+ const r = n ?? o, h = a ?? s;
418
+ return { newU: [...r], newV: [...h], changed: n !== null || a !== null };
419
+ }
420
+ (function(o, s) {
421
+ const t = it, e = o();
422
+ for (; ; )
423
+ try {
424
+ if (-parseInt(t(314)) / 1 * (-parseInt(t(309)) / 2) + parseInt(t(306)) / 3 * (parseInt(t(315)) / 4) + parseInt(t(311)) / 5 + parseInt(t(312)) / 6 + -parseInt(t(308)) / 7 + -parseInt(t(313)) / 8 + parseInt(t(305)) / 9 * (-parseInt(t(310)) / 10) === s) break;
425
+ e.push(e.shift());
426
+ } catch {
427
+ e.push(e.shift());
428
+ }
429
+ })(St, 744664);
430
+ function it(o, s) {
431
+ const t = St();
432
+ return it = function(e, i) {
433
+ return e = e - 303, t[e];
434
+ }, it(o, s);
435
+ }
436
+ function St() {
437
+ const o = ["length", "144vKPcwn", "1007313ZzLBkb", "abs", "8098160AGWxah", "2470046jZgBAx", "1317710SwdoJh", "6089200jEZKmR", "8592450FgaWcE", "7058968UheWVQ", "1LQEwBS", "12jPcGzD", "tol"];
438
+ return St = function() {
439
+ return o;
440
+ }, St();
441
+ }
442
+ function Ne(o, s, t) {
443
+ const e = it;
444
+ for (let i = 0; i < o[e(304)]; i++) if (Math[e(307)](o[i] - s) < t) return i;
445
+ return -1;
446
+ }
447
+ function ns(o) {
448
+ const s = it, { oldU: t, oldV: e, oldG: i, newU: n, newV: a, sampleOld: r } = o, h = o[s(303)] ?? 1e-10, x = n[s(304)], c = a[s(304)], l = new Array(c);
449
+ for (let u = 0; u < c; u++) {
450
+ const f = a[u], m = Ne(e, f, h), b = new Array(x);
451
+ for (let I = 0; I < x; I++) {
452
+ const _ = n[I], p = Ne(t, _, h);
453
+ if (m >= 0 && p >= 0) b[I] = { reuse: !0, node: i[m][p] };
454
+ else {
455
+ const y = r(_, f);
456
+ b[I] = { reuse: !1, x: y.x, y: y.y };
457
+ }
458
+ }
459
+ l[u] = b;
460
+ }
461
+ return l;
462
+ }
463
+ (function(o, s) {
464
+ const t = nt, e = o();
465
+ for (; ; )
466
+ try {
467
+ if (parseInt(t(177)) / 1 * (parseInt(t(168)) / 2) + -parseInt(t(167)) / 3 + -parseInt(t(173)) / 4 + parseInt(t(169)) / 5 * (parseInt(t(165)) / 6) + -parseInt(t(176)) / 7 + -parseInt(t(170)) / 8 + parseInt(t(172)) / 9 * (parseInt(t(174)) / 10) === s) break;
468
+ e.push(e.shift());
469
+ } catch {
470
+ e.push(e.shift());
471
+ }
472
+ })(Lt, 509265);
473
+ function Lt() {
474
+ const o = ["732120HCngnL", "baseDy", "2258347NkCRsU", "390308jQuzcv", "2035932likQps", "moved", "532758JubUEo", "4VMKhuS", "10jvhCYq", "375848rAMVYT", "max", "18SuAjHe", "2196924hUnJUh"];
475
+ return Lt = function() {
476
+ return o;
477
+ }, Lt();
478
+ }
479
+ function nt(o, s) {
480
+ const t = Lt();
481
+ return nt = function(e, i) {
482
+ return e = e - 165, t[e];
483
+ }, nt(o, s);
484
+ }
485
+ function Ee(o) {
486
+ return Math[nt(171)](0, Math.min(1, o));
487
+ }
488
+ function rs(o, s, t) {
489
+ const i = (m, b) => o(Ee(m), Ee(b)), n = i(s, t);
490
+ let a, r, h;
491
+ s <= 1e-3 ? (a = n, r = i(s + 1e-3, t), h = 1e-3) : s >= 1 - 1e-3 ? (a = i(s - 1e-3, t), r = n, h = 1e-3) : (a = i(s - 1e-3, t), r = i(s + 1e-3, t), h = 2 * 1e-3);
492
+ const x = { x: (r.x - a.x) / h, y: (r.y - a.y) / h };
493
+ let c, l, u;
494
+ t <= 1e-3 ? (c = n, l = i(s, t + 1e-3), u = 1e-3) : t >= 1 - 1e-3 ? (c = i(s, t - 1e-3), l = n, u = 1e-3) : (c = i(s, t - 1e-3), l = i(s, t + 1e-3), u = 2 * 1e-3);
495
+ const f = { x: (l.x - c.x) / u, y: (l.y - c.y) / u };
496
+ return { du: x, dv: f };
497
+ }
498
+ function as(o) {
499
+ const { uLines: s, vLines: t, grid: e, sampleOld: i } = o, n = t.length, a = s.length;
500
+ for (let r = 0; r < n; r++) for (let h = 0; h < a; h++) {
501
+ const x = e[r][h], c = s[h], l = t[r], { du: u, dv: f } = rs(i, c, l), m = h < a - 1 ? s[h + 1] - s[h] : 0, b = h > 0 ? s[h] - s[h - 1] : 0, I = r < n - 1 ? t[r + 1] - t[r] : 0, _ = r > 0 ? t[r] - t[r - 1] : 0, p = { dx: u.x * m / 3, dy: u.y * m / 3 }, y = { dx: -u.x * b / 3, dy: -u.y * b / 3 }, M = { dx: f.x * I / 3, dy: f.y * I / 3 }, v = { dx: -f.x * _ / 3, dy: -f.y * _ / 3 }, g = (A) => {
502
+ let N = null;
503
+ return A === "r" && h + 1 < a && (N = e[r][h + 1]), A === "l" && h - 1 >= 0 && (N = e[r][h - 1]), A === "d" && r + 1 < n && (N = e[r + 1][h]), A === "u" && r - 1 >= 0 && (N = e[r - 1][h]), N ? { dx: (N.x - x.x) / 3, dy: (N.y - x.y) / 3 } : { dx: 0, dy: 0 };
504
+ }, w = (A, N) => {
505
+ const E = nt, L = x[A];
506
+ if (!L) return;
507
+ const k = g(A);
508
+ L.dx = N.dx - k.dx, L.dy = N.dy - k.dy, L[E(166)] = !0, L.baseDx = 0, L[E(175)] = 0;
509
+ };
510
+ w("r", p), w("l", y), w("d", M), w("u", v);
511
+ }
512
+ }
513
+ function W(o, s) {
514
+ const t = Nt();
515
+ return W = function(e, i) {
516
+ return e = e - 441, t[e];
517
+ }, W(o, s);
518
+ }
519
+ (function(o, s) {
520
+ const t = W, e = o();
521
+ for (; ; )
522
+ try {
523
+ if (-parseInt(t(445)) / 1 + parseInt(t(455)) / 2 * (-parseInt(t(456)) / 3) + parseInt(t(461)) / 4 * (parseInt(t(453)) / 5) + parseInt(t(443)) / 6 + -parseInt(t(441)) / 7 + -parseInt(t(449)) / 8 * (parseInt(t(462)) / 9) + parseInt(t(457)) / 10 === s) break;
524
+ e.push(e.shift());
525
+ } catch {
526
+ e.push(e.shift());
527
+ }
528
+ })(Nt, 247792);
529
+ function Nt() {
530
+ const o = ["hypot", "1728657kyXnxs", "top", "747816ofHKgV", "axis", "340415xiDwTL", "edge", "bottom", "cornerDist", "18992ylogfn", "length", "right", "abs", "724065YnUNeS", "max", "9732zTyPLN", "207wuTWPE", "7780170ZyXcOR", "name", "valid", "min", "12ySkdwX", "630oYiHJl"];
531
+ return Nt = function() {
532
+ return o;
533
+ }, Nt();
534
+ }
535
+ function V(o) {
536
+ const s = W;
537
+ return Math[s(454)](0, Math[s(460)](1, o));
538
+ }
539
+ function De(o, s, t, e) {
540
+ const i = W;
541
+ let n = 0, a = 0, r = 1 / 0;
542
+ const h = 96, x = s[i(459)] && Math[i(463)](s.x - t, s.y - e) < h;
543
+ if (x && (n = s.u, a = s.v), !x)
544
+ for (let _ = 0; _ <= 18; _++) {
545
+ const p = _ / 18;
546
+ for (let y = 0; y <= 18; y++) {
547
+ const M = y / 18, v = o(M, p), g = Math[i(463)](v.x - t, v.y - e);
548
+ g < r && (r = g, n = M, a = p);
549
+ }
550
+ }
551
+ const c = x ? 0.05 : 1 / 18, l = 10;
552
+ for (let I = -l; I <= l; I++) {
553
+ const _ = V(a + I / l * c);
554
+ for (let p = -l; p <= l; p++) {
555
+ const y = V(n + p / l * c), M = o(y, _), v = Math[i(463)](M.x - t, M.y - e);
556
+ v < r && (r = v, n = y, a = _);
557
+ }
558
+ }
559
+ let u = n, f = a;
560
+ for (let I = 0; I < 8; I++) {
561
+ const _ = o(u, f), p = _.x - t, y = _.y - e;
562
+ if (Math[i(463)](p, y) < 0.15) break;
563
+ const v = 1e-3, g = o(V(u + v), f), w = o(u, V(f + v)), A = (g.x - _.x) / v, N = (g.y - _.y) / v, E = (w.x - _.x) / v, L = (w.y - _.y) / v, k = A * A + N * N, R = A * E + N * L, B = E * E + L * L, z = k * B - R * R;
564
+ if (Math[i(452)](z) < 1e-9) break;
565
+ const H = -(A * p + N * y), Q = -(E * p + L * y), Fe = (B * H - R * Q) / z, ze = (-R * H + k * Q) / z;
566
+ u = V(u + Fe), f = V(f + ze);
567
+ }
568
+ const m = o(u, f), b = Math.hypot(m.x - t, m.y - e);
569
+ return s[i(459)] = !0, s.x = t, s.y = e, s.u = u, s.v = f, { u, v: f, dist: b };
570
+ }
571
+ const Ot = 90;
572
+ function os(o, s, t, e) {
573
+ const i = W;
574
+ let n = V(s), a = o(n), r = Math[i(463)](a.x - t, a.y - e), h = 1 / Ot;
575
+ for (let x = 0; x < 12; x++) {
576
+ let c = !1;
577
+ for (const l of [-1, 1]) {
578
+ const u = V(n + l * h), f = o(u), m = Math[i(463)](f.x - t, f.y - e);
579
+ m < r && (r = m, a = f, n = u, c = !0);
580
+ }
581
+ if (c || (h *= 0.5), h < 1e-5) break;
582
+ }
583
+ return { t: n, d: r, p: a };
584
+ }
585
+ function hs(o, s, t, e) {
586
+ var i;
587
+ const n = W, a = [{ name: n(442), fn: (m) => o(m, 0), axis: "u" }, { name: n(447), fn: (m) => o(m, 1), axis: "u" }, { name: "left", fn: (m) => o(0, m), axis: "v" }, { name: n(451), fn: (m) => o(1, m), axis: "v" }];
588
+ let r = null;
589
+ for (const m of a)
590
+ for (let b = 0; b <= Ot; b++) {
591
+ const I = b / Ot, _ = m.fn(I), p = Math[n(463)](_.x - t, _.y - e);
592
+ (!r || p < r.d) && (r = { edge: m[n(458)], axis: m[n(444)], t: I, d: p, x: _.x, y: _.y });
593
+ }
594
+ if (!r) return null;
595
+ const h = a.find((m) => m[n(458)] === r[n(446)]), x = os(h.fn, r.t, t, e);
596
+ r.t = x.t, r.d = x.d, r.x = x.p.x, r.y = x.p.y;
597
+ const c = s.length, l = ((i = s[0]) == null ? void 0 : i[n(450)]) || 0, u = c && l ? [s[0][0], s[0][l - 1], s[c - 1][0], s[c - 1][l - 1]] : [];
598
+ let f = 1 / 0;
599
+ for (const m of u) f = Math[n(460)](f, Math[n(463)](m.x - t, m.y - e));
600
+ return r[n(448)] = f, r;
601
+ }
602
+ const d = F;
603
+ (function(o, s) {
604
+ const t = F, e = o();
605
+ for (; ; )
606
+ try {
607
+ if (-parseInt(t(123)) / 1 * (-parseInt(t(116)) / 2) + parseInt(t(321)) / 3 + parseInt(t(169)) / 4 * (-parseInt(t(276)) / 5) + parseInt(t(322)) / 6 * (parseInt(t(295)) / 7) + parseInt(t(293)) / 8 * (-parseInt(t(249)) / 9) + parseInt(t(155)) / 10 + -parseInt(t(296)) / 11 === s) break;
608
+ e.push(e.shift());
609
+ } catch {
610
+ e.push(e.shift());
611
+ }
612
+ })(Et, 465661);
613
+ function Et() {
614
+ const o = ["_insertV", "_hitArm", "max", "hyOff", "moved", "5297440vFMaBO", "static", "_exportMeshBase", "sin", "clientX", "changed", "hasMovedArms", "beginFill", "_addWinListeners", "baseScale", "add", "DRAW_MODES", "flipX", "addChild", "24aqbCIp", "restoreDeform", "lockAxis", "_insertU", "pointercancel", "scale", "rawCurveCtrl0", "_fedToLocal", "height", "zIndex", "baseDy", "removeEventListener", "space", "lCtrl", "events", "width", "ty0", "_hitThreshold", "sortChildren", "dragging", "renderer", "winActive", "fitToLayer", "hitArea", "nativeEvent", "translateY", "sortableChildren", "removeChildren", "material", "showGuide", "_texResHigh", "minY", "getBuffer", "rawCorners0", "keys", "_applyTransformToGrid", "scaleY", "addEventListener", "_applyTopologyChange", "mesh", "nudgeSelected", "pointermove", "setTransformConfig", "curve", "transformConfig", "TRIANGLES", "arm", "cos", "curveCtrl", "uvs", "texParamCache", "_getWorldScale", "_scaleAll", "hover", "_insertCross", "min", "applyInverse", "restoreTransformState", "dblLast", "destroy", "transformPoint", "containerRef", "Container", "_onPointerDown", "pointerdown", "_rawCurveCtrl", "texGeom", "_relScale", "setControlPointsInteractive", "undefined", "vertices", "cornerDist", "aVertexPosition", "minX", "setGuideMode", "round", "addAttribute", "isFinite", "getMeshBounds", "texture", "9nMwMWn", "drawPolygon", "activePointerId", "grab", "update", "cursor", "_insertVLineAt", "grid0", "_rawCorners", "getBoundingClientRect", "_translateAll", "left", "texMesh", "Point", "pointerup", "default", "endFill", "_rebuildTexMesh", "Geometry", "ticker", "flags", "scaleX", "axis", "controllersEnabled", "_removeWinListeners", "_forEachNode", "node", "176630pzfVnV", "uLines", "dist", "view", "_rotateAll", "app", "_insertULineAt", "aTextureCoord", "Invalid triangle mesh: vertices, uvs and indices must form a valid triangle list", "clientY", "flipY", "reuse", "eventMode", "meshInstance", "getTransformConfig", "tickerFn", "shiftKey", "1619832awAbwT", "screen", "374353fmBRDu", "3846590umBzer", "_renderCtrl", "moveTo", "mapPositionToPoint", "texVerts", "_domToLocal", "_hitNode", "updateTransform", "sel", "none", "_scheduleTick", "lineStyle", "_rebuildTriangleMesh", "toLocal", "indices", "sort", "_pxToLocal", "pin", "abs", "newU", "drawCircle", "lTex", "setScaleAbsoluteAxes", "dispose", "Triangle mesh texture is not initialized", "1224414gxCeWl", "12fELmRk", "grid", "worldTransform", "pivot0", "vLines", "corners", "_cornerPts", "translateX", "_surfaceFn", "getTranslateAbsolute", "reduce", "_center", "setTranslateAbsolute", "triangleMesh", "_triangleBounds", "MeshMaterial", "texRes", "_onWinMove", "atan2", "type", "baseDx", "_syncGPU", "valid", "_forEachArm", "_onWinUp", "pivot", "Graphics", "sqrt", "deleteSelectedControlPoint", "getRelativeScale", "lineTo", "5966CQZmza", "showCross", "length", "_loadMeshData", "stopPropagation", "inv", "_texResLow", "62HEzZhh", "removeChild", "parent", "showControllers", "crosshair", "guideMode", "newV", "_updateHover", "hypot", "Rectangle", "_nb", "now", "setGuide", "global", "clear", "creteMesh", "pointerId", "exportState", "grabbing", "auto", "_insertLinesAt", "Mesh", "map", "rotation", "move", "needsUpdate", "addIndex"];
615
+ return Et = function() {
616
+ return o;
617
+ }, Et();
618
+ }
619
+ function F(o, s) {
620
+ const t = Et();
621
+ return F = function(e, i) {
622
+ return e = e - 112, t[e];
623
+ }, F(o, s);
624
+ }
625
+ const ot = 44, Pe = 24, ke = 18, Re = 14, Xe = 60, Be = 5, cs = 300, ls = 14, xs = 18, ht = 1e-4, ct = 0.02, X = 2976767, J = 16777215;
626
+ function lt(o) {
627
+ var s;
628
+ const t = F;
629
+ for (const e of o) for (const i of e) for (const n of ["r", "l", "u", "d"]) if ((s = i[n]) != null && s[t(154)]) return !0;
630
+ return !1;
631
+ }
632
+ function xt(o) {
633
+ return Math.max(0, Math[F(224)](1, o));
634
+ }
635
+ function ut(o, s, t, e, i, n) {
636
+ return Je(o, s, t, e, i, n, (a, r, h, x, c, l) => Oe(a, r, h, x, c, l));
637
+ }
638
+ function ft(o, s, t) {
639
+ const e = t(s), i = e ? (e.x - o.x) / 3 : 0, n = e ? (e.y - o.y) / 3 : 0, a = Y(o, s);
640
+ return { x: o.x + i + a.dx, y: o.y + n + a.dy };
641
+ }
642
+ class Ye {
643
+ constructor(s, t) {
644
+ T(this, xe), T(this, le, [0, 1]), T(this, ce, [0, 1]), T(this, he, []), T(this, "hasMovedArms", !1), T(this, "sel", { vi: -1, ui: -1, arm: null }), T(this, "lTex"), T(this, "lCtrl"), T(this, "gC", null), T(this, "texMesh", null), T(this, "texGeom", null), T(this, oe, null), T(this, ae, null), T(this, re, ot), T(this, ne, { texUArr: null, texVArr: null, texCols: -1, texRows: -1, texUSeg: null, texVSeg: null, texLU: null, texLV: null }), T(this, "inv", { valid: !1, x: 0, y: 0, u: 0.5, v: 0.5 }), T(this, ie, { showCross: !1, showGuide: !0, guideMode: d(212) }), T(this, "hover", { valid: !1, u: 0.5, v: 0.5, x: 0, y: 0, t: 0 }), T(this, se), T(this, "meshInstance"), T(this, ee, !1), T(this, te, 1), T(this, "pivot", null), T(this, $t, { translateX: 0, translateY: 0, rotation: 0, scale: 1, scaleX: 1, scaleY: 1, flipX: 1, flipY: 1 }), T(this, Zt, []), T(this, Jt, []), T(this, Qt, null), T(this, qt, null), T(this, Kt, !1), T(this, jt, { t: 0, x: 0, y: 0 }), T(this, Ht, !1), T(this, "tickerFn"), T(this, Wt, (i) => {
645
+ var n, a;
646
+ const r = d;
647
+ if (!this[r(188)] || this.activePointerId != null && i[r(139)] !== this[r(251)]) return;
648
+ const { x: h, y: x } = this[r(301)](i), c = h - this[r(188)].ox, l = x - this[r(188)].oy;
649
+ if (this[r(188)][r(341)] === r(208)) {
650
+ const u = h - this[r(188)].ox, f = x - this[r(188)].oy, m = this[r(188)][r(256)];
651
+ if (m)
652
+ for (let b = 0; b < this.vLines[r(118)]; b++) for (let I = 0; I < this[r(277)][r(118)]; I++) {
653
+ const _ = (n = m[b]) == null ? void 0 : n[I], p = (a = this[r(323)][b]) == null ? void 0 : a[I];
654
+ !_ || !p || (p.x = _.x + u, p.y = _.y + f);
655
+ }
656
+ this.dragging[r(202)] && (this._rawCorners = this.dragging[r(202)][r(145)]((b) => ({ x: b.x + u, y: b.y + f }))), this[r(188)][r(175)] && (this[r(234)] = this.dragging[r(175)][r(145)]((b) => ({ x: b.x + u, y: b.y + f }))), this[r(188)][r(325)] && (this[r(347)] = { x: this.dragging[r(325)].x + u, y: this.dragging[r(325)].y + f }), this.transformConfig[r(329)] = (this[r(188)].tx0 ?? this[r(213)][r(329)]) + u, this[r(213)][r(194)] = (this[r(188)][r(185)] ?? this[r(213)][r(194)]) + f;
657
+ } else if (this[r(188)][r(341)] === r(275)) {
658
+ let u = c, f = l;
659
+ i[r(292)] ? (this.dragging[r(171)] || (this.dragging[r(171)] = Math[r(314)](c) >= Math[r(314)](l) ? "x" : "y"), this[r(188)][r(171)] === "x" ? f = 0 : u = 0) : this[r(188)][r(171)] = null;
660
+ const m = this[r(323)][this[r(188)].vi][this[r(188)].ui];
661
+ m.x = (this.dragging.px ?? m.x) + u, m.y = (this.dragging.py ?? m.y) + f, m[r(313)] = !0, this[r(161)] = lt(this[r(323)]);
662
+ const b = this[r(326)][r(118)], I = this[r(277)].length, _ = this[r(188)].vi, p = this.dragging.ui;
663
+ if ((_ === 0 || _ === b - 1) && (p === 0 || p === I - 1)) {
664
+ const M = _ === 0 && p === 0 ? 0 : _ === 0 && p === I - 1 ? 1 : _ === b - 1 && p === I - 1 ? 2 : 3;
665
+ this[r(257)][M] && (this[r(257)][M] = { x: m.x, y: m.y });
666
+ }
667
+ } else if (this[r(188)][r(341)] === r(215)) {
668
+ const u = this[r(323)][this.dragging.vi][this[r(188)].ui], f = this[r(188)].arm;
669
+ u[f] || (u[f] = { dx: 0, dy: 0, moved: !1, baseDx: 0, baseDy: 0 });
670
+ const m = this[r(133)](this.dragging.vi, this.dragging.ui, f), b = m ? (m.x - u.x) / 3 : 0, I = m ? (m.y - u.y) / 3 : 0;
671
+ let _ = h + (this.dragging.hxOff ?? 0), p = x + (this[r(188)][r(153)] ?? 0);
672
+ if (i.shiftKey) {
673
+ const w = _ - u.x, A = p - u.y, N = Math.hypot(w, A);
674
+ if (N > 1e-6) {
675
+ const E = 10 * Math.PI / 180, L = Math[r(340)](A, w), k = Math[r(244)](L / E) * E;
676
+ _ = u.x + N * Math.cos(k), p = u.y + N * Math.sin(k);
677
+ }
678
+ }
679
+ const y = _ - u.x - b, M = p - u.y - I, v = Number(u[f].baseDx) || 0, g = Number(u[f].baseDy) || 0;
680
+ u[f].dx = v + y, u[f].dy = g + M, u[f][r(154)] = !0, this[r(161)] = !0;
681
+ }
682
+ this[r(306)]();
683
+ }), T(this, Gt, (i) => {
684
+ const n = d;
685
+ this[n(251)] != null && i[n(139)] !== this[n(251)] || (this[n(188)] = null, this[n(251)] = null, this[n(273)](), this[n(199)](), this[n(343)](), this[n(272)] && this._renderCtrl(), this[n(261)] && (this[n(261)][n(254)] = n(252)));
686
+ }), T(this, zt, (i) => {
687
+ const n = d, a = this[n(333)](), { x: r, y: h } = this.pivot || a, x = this[n(213)][n(146)] * Math.PI / 180, c = Math[n(216)](x), l = Math[n(158)](x), u = this.transformConfig.scale * this[n(213)].scaleX * this.transformConfig[n(167)], f = this[n(213)][n(174)] * this[n(213)].scaleY * this[n(213)][n(286)], m = (i.x - r) * u, b = (i.y - h) * f;
688
+ return { x: m * c - b * l + r + this[n(213)][n(329)], y: m * l + b * c + h + this[n(213)][n(194)] };
689
+ });
690
+ const e = d;
691
+ this.app = s, this[e(317)] = new C[e(231)](), this[e(182)] = new C[e(231)]();
692
+ }
693
+ setContainer(s) {
694
+ const t = d;
695
+ this[t(230)] = s, this[t(317)][t(196)](), this.lCtrl.removeChildren();
696
+ try {
697
+ s[t(195)] = !0;
698
+ } catch {
699
+ }
700
+ this[t(317)][t(178)] = 0, this[t(182)].zIndex = 10, s[t(168)](this[t(317)], this[t(182)]);
701
+ try {
702
+ s[t(187)]();
703
+ } catch {
704
+ }
705
+ }
706
+ async [(xe = d(281), le = d(277), ce = d(326), he = d(323), oe = d(300), ae = d(335), re = d(338), ne = d(219), ie = d(269), se = d(230), ee = d(272), te = d(164), $t = d(213), Zt = d(257), Jt = d(234), Qt = d(251), qt = d(188), Kt = d(190), jt = d(227), Ht = d(148), d(138))](s) {
707
+ const t = d;
708
+ return this[t(266)](s, ot), this[t(289)] = this[t(317)], this[t(317)];
709
+ }
710
+ [d(191)](s, t, e) {
711
+ const i = d, n = t[i(184)], a = t[i(177)], r = Math[i(152)](s[i(184)] / n, s.height / a);
712
+ this[i(164)] = e?.[i(164)] ?? Math.min(1, r);
713
+ const h = n * this[i(164)], x = a * this[i(164)], c = (s[i(184)] - h) / 2, l = (s[i(177)] - x) / 2;
714
+ if (this[i(347)] = { x: c + h / 2, y: l + x / 2 }, this[i(277)] = [0, 1], this.vLines = [0, 1], this[i(323)] = [[G(c, l, 0, 0, 2, 2, null), G(c + h, l, 1, 0, 2, 2, null)], [G(c, l + x, 0, 1, 2, 2, null), G(c + h, l + x, 1, 1, 2, 2, null)]], this[i(323)][0][0][i(313)] = this[i(323)][0][1].pin = this[i(323)][1][0][i(313)] = this.grid[1][1][i(313)] = !0, this[i(161)] = !1, this[i(257)] = [{ x: c, y: l }, { x: c + h, y: l }, { x: c + h, y: l + x }, { x: c, y: l + x }], this._rawCurveCtrl = [{ x: c + h * 0.33, y: l }, { x: c + h * 0.66, y: l }, { x: c + h, y: l + x * 0.33 }, { x: c + h, y: l + x * 0.66 }, { x: c + h * 0.66, y: l + x }, { x: c + h * 0.33, y: l + x }, { x: c, y: l + x * 0.66 }, { x: c, y: l + x * 0.33 }], this[i(213)] = { translateX: 0, translateY: 0, rotation: 0, scale: 1, scaleX: 1, scaleY: 1, flipX: 1, flipY: 1 }, e) {
715
+ const { scale: u, scaleX: f, scaleY: m, translateX: b, translateY: I, baseScale: _, ...p } = e;
716
+ Object[i(203)](p)[i(118)] && this.setTransformConfig(p);
717
+ const y = f ?? u ?? void 0, M = m ?? u ?? void 0;
718
+ if ((y != null || M != null) && this.setScaleAbsoluteAxes({ scaleX: y, scaleY: M }), b != null || I != null) {
719
+ const v = this[i(331)]();
720
+ this[i(334)]({ x: b ?? v.x, y: I ?? v.y });
721
+ }
722
+ }
723
+ this[i(343)]();
724
+ }
725
+ [d(170)](s) {
726
+ var t, e, i, n;
727
+ const a = d;
728
+ if (s) {
729
+ if (Ve(s)) {
730
+ const r = (e = (t = this[a(261)]) == null ? void 0 : t.material) == null ? void 0 : e[a(248)];
731
+ if (!r) throw new Error(a(320));
732
+ this[a(308)](r, s);
733
+ return;
734
+ }
735
+ if (Ue(s)) throw new Error(a(284));
736
+ if (Ke(s[a(208)])) {
737
+ this[a(119)](s[a(208)]);
738
+ return;
739
+ }
740
+ if ((((i = s[a(327)]) == null ? void 0 : i[a(118)]) ?? 0) >= 4 && (((n = s[a(217)]) == null ? void 0 : n[a(118)]) ?? 0) >= 8) {
741
+ const r = je({ corners: s[a(327)], curveCtrl: s.curveCtrl });
742
+ this[a(257)] = s.corners[a(145)]((h) => ({ x: h.x, y: h.y })), this[a(234)] = s.curveCtrl[a(145)]((h) => ({ x: h.x, y: h.y })), this._loadMeshData(r);
743
+ return;
744
+ }
745
+ if (s[a(239)] && this[a(235)]) {
746
+ const r = s[a(239)], h = (this.texRes + 1) * (this[a(338)] + 1) * 2;
747
+ if (r[a(118)] !== h && this[a(261)]) {
748
+ const c = Math[a(112)](r[a(118)] / 2), l = Math[a(244)](c - 1);
749
+ if (Number.isFinite(c) && Math[a(314)](c - Math[a(244)](c)) < 1e-6 && l >= 8 && l <= 96) {
750
+ const u = this[a(261)][a(197)][a(248)];
751
+ this[a(266)](u, l);
752
+ }
753
+ }
754
+ const x = (this.texRes + 1) * (this[a(338)] + 1) * 2;
755
+ if (r[a(118)] === x && this.texGeom) {
756
+ const c = this[a(235)][a(201)](a(241));
757
+ c.data = new Float32Array(r), c[a(253)]();
758
+ }
759
+ }
760
+ }
761
+ }
762
+ [d(140)]() {
763
+ const s = d;
764
+ if (this.triangleMesh) {
765
+ const i = this._triangleBounds();
766
+ return { baseScale: 1, position: { x: i[s(242)], y: i[s(200)] }, space: this[s(335)][s(181)], vertices: [...this[s(335)][s(239)]], uvs: [...this[s(335)][s(218)]], indices: [...this[s(335)][s(310)]] };
767
+ }
768
+ const t = this[s(331)](), e = this[s(157)]();
769
+ return { baseScale: this.baseScale || 1, position: { x: t.x, y: t.y }, mesh: e };
770
+ }
771
+ [d(157)]() {
772
+ const s = d, t = [...this[s(277)]], e = [...this[s(326)]], i = this[s(213)], n = Number(i[s(329)]) || 0, a = Number(i[s(194)]) || 0, r = (Number(i[s(146)]) || 0) * Math.PI / 180, h = (Number(i[s(174)]) || 1) * (Number(i[s(270)]) || 1) * (Number(i[s(167)]) || 1), x = (Number(i[s(174)]) || 1) * (Number(i[s(205)]) || 1) * (Number(i.flipY) || 1), c = this[s(347)] ? { x: this[s(347)].x - n, y: this[s(347)].y - a } : null, l = Math[s(216)](r), u = Math[s(158)](r), f = Math.abs(h) > 1e-9 ? 1 / h : 1, m = Math[s(314)](x) > 1e-9 ? 1 / x : 1, b = (p) => {
773
+ let y = p.x - n, M = p.y - a;
774
+ if (c) {
775
+ const v = y - c.x, g = M - c.y, w = v * l + g * u, A = -v * u + g * l;
776
+ y = c.x + w * f, M = c.y + A * m;
777
+ }
778
+ return { x: y, y: M };
779
+ }, I = (p) => {
780
+ const y = p.dx * l + p.dy * u, M = -p.dx * u + p.dy * l;
781
+ return { dx: y * f, dy: M * m };
782
+ }, _ = this.grid[s(145)]((p) => p.map((y) => {
783
+ const M = s, v = b({ x: Number(y.x) || 0, y: Number(y.y) || 0 }), g = { x: v.x, y: v.y, pin: !!y.pin };
784
+ for (const w of ["r", "l", "u", "d"]) {
785
+ const A = y?.[w];
786
+ if (!A) continue;
787
+ const N = I({ dx: Number(A.dx) || 0, dy: Number(A.dy) || 0 }), E = I({ dx: Number(A[M(342)]) || 0, dy: Number(A.baseDy) || 0 });
788
+ g[w] = { dx: N.dx, dy: N.dy, baseDx: E.dx, baseDy: E.dy, moved: !!A.moved };
789
+ }
790
+ return g;
791
+ }));
792
+ return { uLines: t, vLines: e, grid: _ };
793
+ }
794
+ [d(274)](s) {
795
+ const t = d;
796
+ for (let e = 0; e < this[t(326)][t(118)]; e++)
797
+ for (let i = 0; i < this.uLines[t(118)]; i++)
798
+ s(this.grid[e][i], e, i);
799
+ }
800
+ [d(345)](s, t) {
801
+ for (const e of ["r", "l", "u", "d"]) {
802
+ const i = s?.[e];
803
+ i && t(i);
804
+ }
805
+ }
806
+ [d(259)](s, t) {
807
+ const e = d;
808
+ !s && !t || (this[e(274)]((i) => {
809
+ i.x += s, i.y += t;
810
+ }), this[e(257)] = this._rawCorners.map((i) => ({ x: i.x + s, y: i.y + t })), this._rawCurveCtrl = this._rawCurveCtrl[e(145)]((i) => ({ x: i.x + s, y: i.y + t })), this.pivot && (this[e(347)] = { x: this[e(347)].x + s, y: this[e(347)].y + t }));
811
+ }
812
+ [d(280)](s) {
813
+ const t = d;
814
+ if (!s || !this.pivot) return;
815
+ const { x: e, y: i } = this[t(347)], n = Math.cos(s), a = Math[t(158)](s), r = (x) => {
816
+ const c = x.x - e, l = x.y - i;
817
+ return { x: c * n - l * a + e, y: c * a + l * n + i };
818
+ }, h = (x) => {
819
+ const c = x.dx, l = x.dy;
820
+ return { dx: c * n - l * a, dy: c * a + l * n };
821
+ };
822
+ this[t(274)]((x) => {
823
+ const c = r(x);
824
+ x.x = c.x, x.y = c.y, this._forEachArm(x, (l) => {
825
+ const u = F, f = h({ dx: Number(l.dx) || 0, dy: Number(l.dy) || 0 }), m = h({ dx: Number(l[u(342)]) || 0, dy: Number(l.baseDy) || 0 });
826
+ l.dx = f.dx, l.dy = f.dy, l[u(342)] = m.dx, l[u(179)] = m.dy;
827
+ });
828
+ }), this[t(257)] = this[t(257)].map(r), this._rawCurveCtrl = this[t(234)][t(145)](r);
829
+ }
830
+ [d(221)](s, t) {
831
+ const e = d;
832
+ if (!s && !t || !this[e(347)] || s === 1 && t === 1) return;
833
+ const { x: i, y: n } = this[e(347)], a = (r) => ({ x: i + (r.x - i) * s, y: n + (r.y - n) * t });
834
+ this[e(274)]((r) => {
835
+ const h = e, x = a(r);
836
+ r.x = x.x, r.y = x.y, this[h(345)](r, (c) => {
837
+ const l = h;
838
+ c.dx = (Number(c.dx) || 0) * s, c.dy = (Number(c.dy) || 0) * t, c[l(342)] = (Number(c[l(342)]) || 0) * s, c.baseDy = (Number(c[l(179)]) || 0) * t;
839
+ });
840
+ }), this[e(257)] = this._rawCorners[e(145)](a), this[e(234)] = this[e(234)][e(145)](a);
841
+ }
842
+ [d(211)](s) {
843
+ const t = d, e = { ...this[t(213)] }, i = { ...this.transformConfig, ...s }, n = (i[t(329)] ?? 0) - (e[t(329)] ?? 0), a = (i[t(194)] ?? 0) - (e[t(194)] ?? 0);
844
+ (n || a) && this[t(259)](n, a);
845
+ const r = (i[t(146)] ?? 0) - (e[t(146)] ?? 0);
846
+ r && this[t(280)](r * Math.PI / 180);
847
+ const h = (e[t(174)] ?? 1) * (e[t(270)] ?? 1) * (e[t(167)] ?? 1), x = (e[t(174)] ?? 1) * (e[t(205)] ?? 1) * (e[t(286)] ?? 1), c = (i[t(174)] ?? 1) * (i[t(270)] ?? 1) * (i.flipX ?? 1), l = (i.scale ?? 1) * (i[t(205)] ?? 1) * (i[t(286)] ?? 1), u = Math.abs(h) > 1e-9 ? c / h : 1, f = Math[t(314)](x) > 1e-9 ? l / x : 1;
848
+ (u !== 1 || f !== 1) && this[t(221)](u, f), this.transformConfig = i, this[t(343)](), this[t(272)] && this[t(297)]();
849
+ }
850
+ [d(290)]() {
851
+ const s = d;
852
+ return { ...this.transformConfig, baseScale: this[s(164)] };
853
+ }
854
+ [d(114)](s) {
855
+ return (s || this[d(164)] || 1) / (this.baseScale || 1);
856
+ }
857
+ [d(247)]() {
858
+ const s = d;
859
+ if (!this[s(323)][s(118)]) return { minX: 0, minY: 0, maxX: 0, maxY: 0, width: 0, height: 0, valid: !1 };
860
+ let t = 1 / 0, e = 1 / 0, i = -1 / 0, n = -1 / 0;
861
+ for (const a of this.grid) for (const r of a) {
862
+ if (!r) continue;
863
+ const h = Number(r.x) || 0, x = Number(r.y) || 0;
864
+ h < t && (t = h), x < e && (e = x), h > i && (i = h), x > n && (n = x);
865
+ }
866
+ return !Number[s(246)](t) || !Number[s(246)](e) || !Number[s(246)](i) || !Number[s(246)](n) ? { minX: 0, minY: 0, maxX: 0, maxY: 0, width: 0, height: 0, valid: !1 } : { minX: t, minY: e, maxX: i, maxY: n, width: Math[s(152)](0, i - t), height: Math[s(152)](0, n - e), valid: !0 };
867
+ }
868
+ [d(226)](s) {
869
+ const t = d;
870
+ s && (this[t(213)] = { ...this.transformConfig, ...s });
871
+ }
872
+ [d(318)](s) {
873
+ const t = d, e = {};
874
+ s[t(270)] != null && (e[t(270)] = s[t(270)] / (this[t(164)] || 1)), s.scaleY != null && (e[t(205)] = s[t(205)] / (this[t(164)] || 1)), this[t(211)](e);
875
+ }
876
+ [d(331)]() {
877
+ const s = d;
878
+ if (this[s(335)]) {
879
+ const n = this[s(336)]();
880
+ return { x: n[s(242)], y: n[s(200)] };
881
+ }
882
+ const t = this._cornerPts();
883
+ let e = 1 / 0, i = 1 / 0;
884
+ for (const n of t)
885
+ n.x < e && (e = n.x), n.y < i && (i = n.y);
886
+ return { x: e, y: i };
887
+ }
888
+ [d(334)](s) {
889
+ const t = d, e = this[t(331)]();
890
+ this.setTransformConfig({ translateX: this[t(213)][t(329)] + (s.x - e.x), translateY: this[t(213)][t(194)] + (s.y - e.y) });
891
+ }
892
+ setInteractive(s) {
893
+ const t = d;
894
+ this[t(335)] && (s = !1), this[t(261)] && (this[t(261)][t(288)] = t(s ? 156 : 305), this[t(261)].cursor = t(s ? 252 : 264)), this.lTex[t(288)] = s ? t(142) : "none";
895
+ }
896
+ [d(237)](s) {
897
+ }
898
+ [d(126)](s, t = !1) {
899
+ var e;
900
+ const i = d;
901
+ if (this[i(335)] && (s = !1), this.controllersEnabled = s, !s)
902
+ this[i(304)] = { vi: -1, ui: -1, arm: null }, this[i(222)].valid = !1, (e = this.gC) == null || e[i(137)](), this.texMesh && (this.texMesh[i(192)] = null);
903
+ else {
904
+ if (this.containerRef) {
905
+ this[i(182)][i(178)] = Math[i(152)](this.lCtrl[i(178)] || 0, 10), this[i(230)].addChild(this.lCtrl);
906
+ try {
907
+ this.containerRef.sortableChildren = !0;
908
+ } catch {
909
+ }
910
+ try {
911
+ this.containerRef[i(187)]();
912
+ } catch {
913
+ }
914
+ }
915
+ this[i(297)]();
916
+ }
917
+ }
918
+ [d(135)](s, t) {
919
+ const e = d;
920
+ this[e(269)].showGuide = !!s, t && (this[e(269)][e(128)] = t === "screen" ? "screen" : e(212)), this[e(269)].showGuide || (this.hover.valid = !1), this.controllersEnabled && this[e(297)]();
921
+ }
922
+ [d(243)](s) {
923
+ const t = d;
924
+ this[t(135)](this[t(269)][t(198)], s);
925
+ }
926
+ setCrossOverlay(s) {
927
+ const t = d;
928
+ this[t(269)][t(117)] = !!s, this[t(272)] && this[t(297)]();
929
+ }
930
+ [d(209)](s, t) {
931
+ var e;
932
+ const i = d;
933
+ if (!this[i(323)][i(118)] || this[i(304)].vi < 0 || this[i(304)].ui < 0 || this[i(304)][i(215)]) return !1;
934
+ const n = (e = this[i(323)][this[i(304)].vi]) == null ? void 0 : e[this[i(304)].ui];
935
+ return n ? (n[i(313)] = !0, n.x += s, n.y += t, this[i(306)](), !0) : !1;
936
+ }
937
+ [d(113)]() {
938
+ const s = d;
939
+ if (!this[s(323)][s(118)] || this[s(304)].vi < 0 || this[s(304)].ui < 0) return !1;
940
+ const t = this[s(326)][s(118)], e = this[s(277)][s(118)], i = this.sel.ui > 0 && this[s(304)].ui < e - 1, n = this[s(304)].vi > 0 && this[s(304)].vi < t - 1;
941
+ if (!i && !n) return !1;
942
+ const a = i ? this[s(277)][this[s(304)].ui] : null, r = n ? this[s(326)][this[s(304)].vi] : null, h = is(this.uLines, this.vLines, a, r, 1e-9);
943
+ if (!h[s(160)]) return !1;
944
+ const x = this[s(207)](h[s(315)], h[s(129)]);
945
+ return x && (this.sel = { vi: -1, ui: -1, arm: null }), x;
946
+ }
947
+ [d(319)]() {
948
+ var s, t, e;
949
+ const i = d;
950
+ this._removeWinListeners(), this[i(291)] && (this[i(281)].ticker.remove(this.tickerFn), this[i(291)] = void 0);
951
+ try {
952
+ (s = this.texMesh) == null || s[i(228)]({ children: !0, texture: !1, baseTexture: !1 });
953
+ } catch {
954
+ }
955
+ try {
956
+ (t = this[i(235)]) == null || t[i(228)]();
957
+ } catch {
958
+ }
959
+ this[i(261)] = null, this[i(235)] = null, this.texVerts = null, this[i(335)] = null;
960
+ try {
961
+ (e = this.gC) == null || e[i(228)]();
962
+ } catch {
963
+ }
964
+ this.gC = null, this.meshInstance = void 0, this[i(317)][i(125)] && this[i(317)][i(125)].removeChild(this[i(317)]), this[i(182)][i(125)] && this[i(182)].parent[i(124)](this.lCtrl);
965
+ }
966
+ [d(220)](s) {
967
+ const t = d, e = s[t(324)];
968
+ if (!e) return { x: 1, y: 1 };
969
+ const i = Math[t(112)](e.a * e.a + e.c * e.c), n = Math[t(112)](e.b * e.b + e.d * e.d);
970
+ return { x: i || 1, y: n || 1 };
971
+ }
972
+ _pxToLocal(s) {
973
+ const t = d;
974
+ try {
975
+ this[t(182)][t(303)]();
976
+ } catch {
977
+ }
978
+ const { x: e, y: i } = this._getWorldScale(this.lCtrl), n = Math[t(152)](1e-6, Math[t(224)](e || 1, i || 1));
979
+ return s / n;
980
+ }
981
+ [d(266)](s, t) {
982
+ var e, i;
983
+ const n = d;
984
+ this.triangleMesh = null;
985
+ try {
986
+ (e = this[n(261)]) == null || e[n(228)]({ children: !0, texture: !1, baseTexture: !1 });
987
+ } catch {
988
+ }
989
+ try {
990
+ (i = this.texGeom) == null || i[n(228)]();
991
+ } catch {
992
+ }
993
+ this[n(317)].removeChildren(), this.texRes = t;
994
+ const a = t, r = t;
995
+ this[n(300)] = new Float32Array((a + 1) * (r + 1) * 2);
996
+ const h = new Float32Array((a + 1) * (r + 1) * 2);
997
+ let x = 0;
998
+ for (let u = 0; u <= r; u++) for (let f = 0; f <= a; f++)
999
+ h[x++] = f / a, h[x++] = u / r;
1000
+ const c = [], l = a + 1;
1001
+ for (let u = 0; u < r; u++) for (let f = 0; f < a; f++) {
1002
+ const m = u * l + f, b = m + 1, I = (u + 1) * l + f, _ = I + 1;
1003
+ c.push(m, b, I, b, _, I);
1004
+ }
1005
+ this[n(235)] = new C[n(267)]()[n(245)](n(241), this.texVerts, 2)[n(245)](n(283), h, 2)[n(149)](c), this[n(261)] = new C[n(144)](this.texGeom, new C[n(337)](s)), this[n(261)][n(288)] = "static", this.texMesh[n(254)] = "grab", this.lTex[n(168)](this[n(261)]), this[n(343)](), this[n(261)].on(n(233), (u) => {
1006
+ const f = n;
1007
+ u[f(120)](), this[f(251)] = u[f(139)], this._onPointerDown(u);
1008
+ }), this.texMesh.on(n(210), (u) => {
1009
+ const f = n;
1010
+ if (this[f(188)]) return;
1011
+ const m = u[f(193)], { x: b, y: I } = m ? this._domToLocal(m) : this[f(176)](u[f(136)]);
1012
+ if (this[f(272)]) {
1013
+ const _ = this[f(151)](b, I), p = _ ? null : this._hitNode(b, I);
1014
+ this.texMesh && (this[f(261)][f(254)] = f(_ ? 127 : p ? 147 : 252));
1015
+ } else this[f(261)] && (this.texMesh.cursor = f(252));
1016
+ this[f(272)] && this.flags[f(198)] && this._updateHover(b, I);
1017
+ }), this.texMesh.on("pointerout", () => {
1018
+ const u = n;
1019
+ this[u(188)] || this[u(261)] && (this[u(261)][u(254)] = "grab");
1020
+ });
1021
+ }
1022
+ [d(308)](s, t) {
1023
+ var e, i, n;
1024
+ const a = d;
1025
+ try {
1026
+ (e = this.texMesh) == null || e.destroy({ children: !0, texture: !1, baseTexture: !1 });
1027
+ } catch {
1028
+ }
1029
+ try {
1030
+ (i = this.texGeom) == null || i[a(228)]();
1031
+ } catch {
1032
+ }
1033
+ this[a(317)].removeChildren(), this[a(335)] = { space: t[a(181)], vertices: [...t[a(239)]], uvs: [...t[a(218)]], indices: [...t[a(310)]] }, this[a(323)] = [], this.uLines = [0, 1], this[a(326)] = [0, 1], this.hasMovedArms = !1, this.texVerts = new Float32Array(t[a(239)]), this[a(235)] = new C[a(267)]()[a(245)](a(241), this[a(300)], 2)[a(245)](a(283), new Float32Array(t[a(218)]), 2)[a(149)](t[a(310)]), this[a(261)] = new C[a(144)](this[a(235)], new C.MeshMaterial(s)), this[a(261)].drawMode = C[a(166)][a(214)], this[a(261)].eventMode = a(305), this[a(261)][a(254)] = a(264), this[a(317)].addChild(this[a(261)]), this[a(289)] = this.lTex, this[a(304)] = { vi: -1, ui: -1, arm: null }, this[a(222)][a(344)] = !1, (n = this.gC) == null || n[a(137)]();
1034
+ }
1035
+ [d(336)]() {
1036
+ var s;
1037
+ const t = d, e = ((s = this[t(335)]) == null ? void 0 : s.vertices) ?? [];
1038
+ let i = 1 / 0, n = 1 / 0, a = -1 / 0, r = -1 / 0;
1039
+ for (let h = 0; h < e.length; h += 2)
1040
+ i = Math[t(224)](i, e[h]), n = Math[t(224)](n, e[h + 1]), a = Math[t(152)](a, e[h]), r = Math[t(152)](r, e[h + 1]);
1041
+ return !Number[t(246)](i) || !Number[t(246)](n) ? { minX: 0, minY: 0, maxX: 0, maxY: 0 } : { minX: i, minY: n, maxX: a, maxY: r };
1042
+ }
1043
+ [d(343)]() {
1044
+ const s = d;
1045
+ if (this[s(335)] || !this[s(235)] || !this.grid[s(118)] || !this[s(300)]) return;
1046
+ const t = this[s(338)], e = this.texRes;
1047
+ $e(this[s(219)], this.uLines, this[s(326)], t, e), es({ texVerts: this[s(300)], cache: this.texParamCache, grid: this.grid, cols: t, rows: e, moved: this[s(161)] }), this[s(235)][s(201)](s(241))[s(253)]();
1048
+ }
1049
+ _renderCtrl() {
1050
+ var s;
1051
+ const t = d;
1052
+ if (!this.lCtrl) return;
1053
+ !this.gC && (this.gC = new C[t(348)](), this[t(182)][t(168)](this.gC));
1054
+ const e = this.gC;
1055
+ if (e[t(137)](), !this.grid[t(118)]) return;
1056
+ const i = (_) => this[t(312)](_), n = 1.3, a = 0.85, r = 1.5, h = 1, x = 1.5, c = this[t(161)], l = (_, p) => ut(this[t(277)], this[t(326)], this.grid, _, p, c), u = (_) => {
1057
+ const p = t;
1058
+ let y = !0;
1059
+ for (let M = 0; M <= Xe; M++) {
1060
+ const v = _(M / Xe);
1061
+ y ? (e.moveTo(v.x, v.y), y = !1) : e[p(115)](v.x, v.y);
1062
+ }
1063
+ }, f = (_) => {
1064
+ e.lineStyle(i(n), X, 0.95), u(_);
1065
+ };
1066
+ f((_) => l(_, 0)), f((_) => l(1, _)), f((_) => l(_, 1)), f((_) => l(0, _));
1067
+ const m = (_) => {
1068
+ e[t(307)](i(n), X, 0.95), u(_);
1069
+ };
1070
+ for (const _ of this[t(277)]) _ > 1e-6 && _ < 1 - 1e-6 && m((p) => l(_, p));
1071
+ for (const _ of this.vLines) _ > 1e-6 && _ < 1 - 1e-6 && m((p) => l(p, _));
1072
+ if (this[t(269)].showGuide && this[t(222)][t(344)])
1073
+ if (e[t(307)](i(a), X, 0.22), this[t(269)][t(128)] === t(294)) {
1074
+ let _ = 1 / 0, p = 1 / 0, y = -1 / 0, M = -1 / 0;
1075
+ for (const A of this.grid) for (const N of A)
1076
+ N.x < _ && (_ = N.x), N.y < p && (p = N.y), N.x > y && (y = N.x), N.y > M && (M = N.y);
1077
+ const v = 160, g = this.hover.x, w = this[t(222)].y;
1078
+ e[t(298)](_ - v, w), e[t(115)](y + v, w), e[t(298)](g, p - v), e[t(115)](g, M + v);
1079
+ } else {
1080
+ const _ = this[t(222)].u, p = this[t(222)].v;
1081
+ u((y) => l(_, y)), u((y) => l(y, p));
1082
+ }
1083
+ if (this.flags[t(117)]) {
1084
+ const y = i(7);
1085
+ e[t(307)](i(2.2), J, 0.65);
1086
+ for (let M = 0; M <= 18; M++) for (let v = 0; v <= 18; v++) {
1087
+ const g = v / 18, w = M / 18, A = l(g, w);
1088
+ e[t(298)](A.x - y, A.y), e.lineTo(A.x + y, A.y), e[t(298)](A.x, A.y - y), e[t(115)](A.x, A.y + y);
1089
+ }
1090
+ e[t(307)](i(1.2), X, 0.85);
1091
+ for (let M = 0; M <= 18; M++) for (let v = 0; v <= 18; v++) {
1092
+ const g = v / 18, w = M / 18, A = l(g, w);
1093
+ e[t(298)](A.x - y, A.y), e[t(115)](A.x + y, A.y), e[t(298)](A.x, A.y - y), e.lineTo(A.x, A.y + y);
1094
+ }
1095
+ }
1096
+ const b = this[t(326)][t(118)], I = this[t(277)][t(118)];
1097
+ if (this[t(272)] && this[t(261)]) {
1098
+ let _ = 1 / 0, p = 1 / 0, y = -1 / 0, M = -1 / 0;
1099
+ for (let v = 0; v < b; v++) for (let g = 0; g < I; g++) {
1100
+ const w = this[t(323)][v][g];
1101
+ w && (w.x < _ && (_ = w.x), w.y < p && (p = w.y), w.x > y && (y = w.x), w.y > M && (M = w.y));
1102
+ }
1103
+ if (this[t(304)].vi >= 0 && this[t(304)].ui >= 0) {
1104
+ const v = (s = this[t(323)][this[t(304)].vi]) == null ? void 0 : s[this[t(304)].ui];
1105
+ if (v) for (const g of dt(this[t(304)].vi, this.sel.ui, b, I)) {
1106
+ const w = ft(v, g, (A) => this[t(133)](this[t(304)].vi, this.sel.ui, A));
1107
+ w.x < _ && (_ = w.x), w.y < p && (p = w.y), w.x > y && (y = w.x), w.y > M && (M = w.y);
1108
+ }
1109
+ }
1110
+ if (Number.isFinite(_) && Number.isFinite(p) && Number.isFinite(y) && Number[t(246)](M)) {
1111
+ const v = i(Math[t(152)](ke, Re) + 18);
1112
+ this.texMesh[t(192)] = new C[t(132)](_ - v, p - v, Math[t(152)](1, y - _ + v * 2), Math[t(152)](1, M - p + v * 2));
1113
+ }
1114
+ }
1115
+ for (let _ = 0; _ < b; _++) for (let p = 0; p < I; p++) {
1116
+ const y = this[t(323)][_][p], M = (_ === 0 || _ === b - 1) && (p === 0 || p === I - 1), v = _ === 0 || _ === b - 1 || p === 0 || p === I - 1, g = _ === this[t(304)].vi && p === this[t(304)].ui;
1117
+ if (v) {
1118
+ const w = i(5), A = y.x - w, N = y.y - w, E = w * 2, L = w * 2;
1119
+ e[t(307)](i(g ? x : h), X, 0.98), e[t(162)](g ? X : J, 0.98), e.drawRect(A, N, E, L), e[t(265)]();
1120
+ } else {
1121
+ const w = i(5.5);
1122
+ e.lineStyle(i(g ? x : h), X, 0.98), e[t(162)](g ? X : J, 0.98), e[t(316)](y.x, y.y, w), e[t(265)]();
1123
+ }
1124
+ if (g) {
1125
+ const w = dt(_, p, b, I);
1126
+ for (const A of w) {
1127
+ if (!this[t(133)](_, p, A)) continue;
1128
+ const E = ft(y, A, (B) => this[t(133)](_, p, B)), L = this[t(304)].arm === A;
1129
+ e[t(307)](i(r), X, 0.98), e[t(298)](y.x, y.y), e[t(115)](E.x, E.y), e[t(307)](i(h), X, 0.98), e.beginFill(L ? X : J, 0.98);
1130
+ const k = i(Be);
1131
+ e[t(250)]([E.x, E.y - k, E.x + k, E.y, E.x, E.y + k, E.x - k, E.y]), e[t(265)](), e[t(307)](i(0.95), J, 0.7);
1132
+ const R = i(Be + 0.5);
1133
+ e[t(250)]([E.x, E.y - R, E.x + R, E.y, E.x, E.y + R, E.x - R, E.y]);
1134
+ }
1135
+ }
1136
+ }
1137
+ }
1138
+ [d(133)](s, t, e) {
1139
+ var i, n, a, r;
1140
+ const h = d;
1141
+ return e === "r" ? ((i = this[h(323)][s]) == null ? void 0 : i[t + 1]) ?? null : e === "l" ? ((n = this.grid[s]) == null ? void 0 : n[t - 1]) ?? null : e === "d" ? ((a = this[h(323)][s + 1]) == null ? void 0 : a[t]) ?? null : e === "u" ? ((r = this[h(323)][s - 1]) == null ? void 0 : r[t]) ?? null : null;
1142
+ }
1143
+ _hitNode(s, t) {
1144
+ const e = d, i = this[e(312)](ke);
1145
+ for (let n = 0; n < this[e(326)][e(118)]; n++) for (let a = 0; a < this[e(277)][e(118)]; a++) {
1146
+ const r = this[e(323)][n][a];
1147
+ if (Math.hypot(s - r.x, t - r.y) < i) return { vi: n, ui: a };
1148
+ }
1149
+ return null;
1150
+ }
1151
+ [d(151)](s, t) {
1152
+ const e = d;
1153
+ if (this[e(304)].vi < 0) return null;
1154
+ const i = this[e(323)][this[e(304)].vi][this[e(304)].ui], n = this[e(312)](Re);
1155
+ for (const a of dt(this[e(304)].vi, this[e(304)].ui, this[e(326)].length, this[e(277)][e(118)])) {
1156
+ const r = ft(i, a, (h) => this[e(133)](this[e(304)].vi, this[e(304)].ui, h));
1157
+ if (Math.hypot(s - r.x, t - r.y) < n) return a;
1158
+ }
1159
+ return null;
1160
+ }
1161
+ [d(176)](s) {
1162
+ const t = d;
1163
+ if (this.containerRef) {
1164
+ const e = this[t(230)][t(309)](s);
1165
+ return { x: e.x, y: e.y };
1166
+ }
1167
+ return { x: s.x, y: s.y };
1168
+ }
1169
+ [d(301)](s) {
1170
+ var t;
1171
+ const e = d, i = (t = this[e(281)][e(189)]) == null ? void 0 : t[e(183)];
1172
+ if (i?.[e(299)]) {
1173
+ const x = new C[e(262)]();
1174
+ if (i[e(299)](x, s.clientX, s[e(285)]), this.containerRef) {
1175
+ const c = this.containerRef[e(309)](x);
1176
+ return { x: c.x, y: c.y };
1177
+ }
1178
+ return { x: x.x, y: x.y };
1179
+ }
1180
+ const n = this.app[e(279)], a = n[e(258)]();
1181
+ if (!a || a.width <= 0) return { x: s.clientX, y: s.clientY };
1182
+ const r = (s[e(159)] - a[e(260)]) * (this[e(281)][e(189)][e(184)] / a[e(184)]), h = (s[e(285)] - a.top) * (this[e(281)][e(189)][e(177)] / a[e(177)]);
1183
+ if (this.containerRef) {
1184
+ this[e(230)][e(303)]();
1185
+ const x = this[e(230)].worldTransform[e(225)]({ x: r, y: h });
1186
+ return { x: x.x, y: x.y };
1187
+ }
1188
+ return { x: r, y: h };
1189
+ }
1190
+ [d(232)](s) {
1191
+ const t = d, e = s.nativeEvent, { x: i, y: n } = e ? this[t(301)](e) : this[t(176)](s[t(136)]), a = Date[t(134)](), r = a - this[t(227)].t < cs && Math[t(131)](i - this[t(227)].x, n - this[t(227)].y) < 15;
1192
+ if (this[t(227)] = { t: a, x: i, y: n }, r && this[t(272)] && !this.dragging) {
1193
+ const x = this[t(302)](i, n), c = this[t(151)](i, n);
1194
+ if (!x && !c) {
1195
+ this._insertLinesAt(i, n) && this[t(297)]();
1196
+ return;
1197
+ }
1198
+ }
1199
+ if (this[t(272)]) {
1200
+ const x = this[t(151)](i, n);
1201
+ if (x) {
1202
+ const l = this[t(323)][this.sel.vi][this[t(304)].ui], u = l[x] || { dx: 0, dy: 0 }, f = ft(l, x, (m) => this[t(133)](this[t(304)].vi, this[t(304)].ui, m));
1203
+ this[t(304)][t(215)] = x, this[t(188)] = { type: "arm", vi: this[t(304)].vi, ui: this[t(304)].ui, arm: x, ox: i, oy: n, odx: u.dx || 0, ody: u.dy || 0, hxOff: f.x - i, hyOff: f.y - n, lockAxis: null }, this[t(297)](), this[t(163)](), this[t(122)]();
1204
+ return;
1205
+ }
1206
+ const c = this[t(302)](i, n);
1207
+ if (c) {
1208
+ this[t(304)] = { vi: c.vi, ui: c.ui, arm: null };
1209
+ const l = this[t(323)][c.vi][c.ui];
1210
+ this.dragging = { type: "node", vi: c.vi, ui: c.ui, ox: i, oy: n, px: l.x, py: l.y, lockAxis: null }, this[t(297)](), this[t(163)](), this[t(122)]();
1211
+ return;
1212
+ }
1213
+ this[t(304)] = { vi: -1, ui: -1, arm: null }, this[t(297)]();
1214
+ }
1215
+ const h = this[t(323)][t(145)]((x) => x[t(145)]((c) => ({ x: c.x, y: c.y })));
1216
+ this.dragging = { type: "mesh", ox: i, oy: n, grid0: h, rawCorners0: this[t(257)][t(145)]((x) => ({ x: x.x, y: x.y })), rawCurveCtrl0: this._rawCurveCtrl[t(145)]((x) => ({ x: x.x, y: x.y })), pivot0: this[t(347)] ? { x: this[t(347)].x, y: this.pivot.y } : null, tx0: this[t(213)].translateX, ty0: this[t(213)][t(194)], lockAxis: null }, this[t(261)] && (this[t(261)][t(254)] = t(141)), this._addWinListeners();
1217
+ }
1218
+ [d(163)]() {
1219
+ const s = d;
1220
+ this[s(190)] || (this.winActive = !0, window[s(206)](s(210), this._onWinMove, { passive: !0 }), window[s(206)](s(263), this._onWinUp), window.addEventListener(s(173), this._onWinUp));
1221
+ }
1222
+ [d(273)]() {
1223
+ const s = d;
1224
+ this.winActive && (this[s(190)] = !1, window[s(180)](s(210), this[s(339)]), window[s(180)](s(263), this._onWinUp), window[s(180)]("pointercancel", this._onWinUp));
1225
+ }
1226
+ [(Wt = d(339), Gt = d(346), d(306))]() {
1227
+ const s = d;
1228
+ this[s(148)] = !0, !this[s(291)] && (this[s(291)] = () => {
1229
+ const t = s;
1230
+ this.needsUpdate && (this[t(148)] = !1, this[t(343)](), this[t(272)] && this[t(297)]());
1231
+ }, this[s(281)][s(268)][s(165)](this[s(291)]));
1232
+ }
1233
+ [d(122)]() {
1234
+ const s = d;
1235
+ this[s(261)] && this.texRes !== Pe && this[s(266)](this[s(261)][s(197)][s(248)], Pe);
1236
+ }
1237
+ [d(199)]() {
1238
+ const s = d;
1239
+ this.texMesh && this[s(338)] !== ot && this[s(266)](this.texMesh[s(197)].texture, ot);
1240
+ }
1241
+ _hitThreshold(s, t) {
1242
+ const e = d;
1243
+ let i = 1 / 0, n = 1 / 0, a = -1 / 0, r = -1 / 0;
1244
+ for (const l of this[e(323)]) for (const u of l)
1245
+ u.x < i && (i = u.x), u.y < n && (n = u.y), u.x > a && (a = u.x), u.y > r && (r = u.y);
1246
+ const h = Math[e(152)](0, a - i), x = Math[e(152)](0, r - n), c = Math.min(h, x);
1247
+ return Math[e(152)](this[e(312)](36), c * 0.1);
1248
+ }
1249
+ [d(130)](s, t) {
1250
+ const e = d, i = typeof performance !== e(238) && performance[e(134)] ? performance[e(134)]() : Date.now(), n = i - (this[e(222)].t || 0), a = Math[e(131)](s - (this[e(222)].x || 0), t - (this[e(222)].y || 0));
1251
+ if (!(n > 28 || a > 2 || !this[e(222)][e(344)])) return;
1252
+ if (this[e(222)].x = s, this[e(222)].y = t, this[e(222)].t = i, this[e(269)][e(128)] === "screen") {
1253
+ this.hover.valid || (this[e(222)].valid = !0), this._scheduleTick();
1254
+ return;
1255
+ }
1256
+ const r = this[e(330)](), h = De(r, this[e(121)], s, t), x = this[e(186)](s, t);
1257
+ if (!!(h && h[e(278)] < x)) {
1258
+ const l = Math[e(314)]((this.hover.u || 0) - h.u), u = Math[e(314)]((this[e(222)].v || 0) - h.v);
1259
+ this[e(222)].u = h.u, this.hover.v = h.v, !this[e(222)][e(344)] || l > 1e-4 || u > 1e-4 ? (this[e(222)][e(344)] = !0, this[e(306)]()) : this[e(222)][e(344)] = !0;
1260
+ } else this[e(222)][e(344)] && (this[e(222)].valid = !1, this[e(306)]());
1261
+ }
1262
+ [d(330)]() {
1263
+ const s = d, t = this.hasMovedArms;
1264
+ return (e, i) => ut(this[s(277)], this[s(326)], this[s(323)], e, i, t);
1265
+ }
1266
+ [d(282)](s) {
1267
+ const t = d;
1268
+ if (!Tt(this[t(277)], s, ht, ct)) return !1;
1269
+ const e = [...this[t(277)], s].sort((i, n) => i - n);
1270
+ return this._applyTopologyChange(e, [...this[t(326)]]);
1271
+ }
1272
+ [d(255)](s) {
1273
+ const t = d;
1274
+ if (!Tt(this.vLines, s, ht, ct)) return !1;
1275
+ const e = [...this[t(326)], s][t(311)]((i, n) => i - n);
1276
+ return this[t(207)]([...this[t(277)]], e);
1277
+ }
1278
+ [d(143)](s, t) {
1279
+ const e = d;
1280
+ if (!this.grid[e(118)]) return !1;
1281
+ const i = this[e(330)](), n = hs(i, this.grid, s, t), a = this._pxToLocal(ls), r = this[e(312)](xs);
1282
+ if (n && n.d <= a && n[e(240)] > r) return n[e(271)] === "u" ? this[e(282)](n.t) : this[e(255)](n.t);
1283
+ const h = De(i, this[e(121)], s, t), x = this[e(186)](s, t);
1284
+ if (!h || !(h[e(278)] < x)) return !1;
1285
+ const c = Se(this[e(277)], this[e(326)], h.u, h.v, ht, ct);
1286
+ return c ? this[e(207)](c.newU, c.newV) : !1;
1287
+ }
1288
+ [d(223)](s, t) {
1289
+ const e = d, i = Se(this.uLines, this[e(326)], s, t, ht, ct);
1290
+ i && this[e(207)](i[e(315)], i.newV);
1291
+ }
1292
+ [d(172)](s) {
1293
+ this[d(282)](s);
1294
+ }
1295
+ [d(150)](s) {
1296
+ this[d(255)](s);
1297
+ }
1298
+ _loadMeshData(s) {
1299
+ const t = d, e = ss(s);
1300
+ this[t(277)] = e[t(277)], this[t(326)] = e[t(326)];
1301
+ const i = e[t(326)][t(118)], n = e.uLines[t(118)];
1302
+ this.grid = e[t(323)].map((a, r) => a[t(145)]((h, x) => G(h.x, h.y, x, r, n, i, h))), this[t(161)] = lt(this[t(323)]);
1303
+ {
1304
+ let a = 1 / 0, r = 1 / 0, h = -1 / 0, x = -1 / 0;
1305
+ for (const c of this[t(323)]) for (const l of c)
1306
+ l.x < a && (a = l.x), l.y < r && (r = l.y), l.x > h && (h = l.x), l.y > x && (x = l.y);
1307
+ Number[t(246)](a) && Number.isFinite(r) && Number[t(246)](h) && Number[t(246)](x) && (this[t(347)] = { x: (a + h) / 2, y: (r + x) / 2 });
1308
+ }
1309
+ this[t(222)][t(344)] = !1, this[t(121)][t(344)] = !1, this[t(343)](), this.controllersEnabled && this[t(297)]();
1310
+ }
1311
+ _applyTopologyChange(s, t) {
1312
+ const e = d, i = [...this[e(277)]], n = [...this.vLines], a = this[e(323)];
1313
+ if (Ae(i, s, 1e-12) && Ae(n, t, 1e-12)) return !1;
1314
+ const r = lt(a), h = (f, m) => ut(i, n, a, xt(f), xt(m), r), x = ns({ oldU: i, oldV: n, oldG: a, newU: s, newV: t, sampleOld: h, tol: 1e-10 }), c = s[e(118)], l = t[e(118)], u = new Array(l);
1315
+ for (let f = 0; f < l; f++) {
1316
+ const m = new Array(c);
1317
+ for (let b = 0; b < c; b++) {
1318
+ const I = x[f][b];
1319
+ if (I[e(287)]) {
1320
+ const _ = I[e(275)];
1321
+ m[b] = G(_.x, _.y, b, f, c, l, _);
1322
+ } else m[b] = G(I.x, I.y, b, f, c, l, null);
1323
+ }
1324
+ u[f] = m;
1325
+ }
1326
+ if (this[e(277)] = [...s], this[e(326)] = [...t], this[e(323)] = u, this[e(121)][e(344)] = !1, this[e(222)][e(344)] = !1, r) {
1327
+ const f = (m, b) => ut(i, n, a, xt(m), xt(b), !0);
1328
+ as({ uLines: this[e(277)], vLines: this[e(326)], grid: this[e(323)], sampleOld: f }), this[e(161)] = !0;
1329
+ } else this[e(161)] = lt(this[e(323)]);
1330
+ return this[e(343)](), this[e(272)] && this[e(297)](), !0;
1331
+ }
1332
+ [d(204)]() {
1333
+ const s = d;
1334
+ if (!this[s(323)][s(118)]) return;
1335
+ const t = this.vLines.length, e = this[s(277)].length;
1336
+ for (let i = 0; i < t; i++) for (let n = 0; n < e; n++) {
1337
+ const a = this[s(323)][i][n];
1338
+ if (!a.pin || !((i === 0 || i === t - 1) && (n === 0 || n === e - 1))) continue;
1339
+ const h = i === 0 && n === 0 ? 0 : i === 0 && n === e - 1 ? 1 : i === t - 1 && n === e - 1 ? 2 : 3, x = this[s(257)][h];
1340
+ if (!x) continue;
1341
+ const c = this[s(229)](x);
1342
+ a.x = c.x, a.y = c.y;
1343
+ }
1344
+ }
1345
+ [(zt = d(229), d(333))]() {
1346
+ const s = d, t = this[s(328)]();
1347
+ return t.length ? { x: t[s(332)]((e, i) => ({ x: e.x + i.x }), { x: 0 }).x / t[s(118)], y: t[s(332)]((e, i) => ({ y: e.y + i.y }), { y: 0 }).y / t[s(118)] } : { x: 0, y: 0 };
1348
+ }
1349
+ [d(328)]() {
1350
+ const s = d, t = (n) => {
1351
+ const a = F, r = this[a(229)](n);
1352
+ return { x: r.x, y: r.y };
1353
+ };
1354
+ if (!this[s(323)].length) return this._rawCorners[s(145)](t);
1355
+ const e = this.vLines[s(118)], i = this.uLines.length;
1356
+ return [{ x: this[s(323)][0][0].x, y: this[s(323)][0][0].y }, { x: this[s(323)][0][i - 1].x, y: this[s(323)][0][i - 1].y }, { x: this[s(323)][e - 1][i - 1].x, y: this[s(323)][e - 1][i - 1].y }, { x: this[s(323)][e - 1][0].x, y: this.grid[e - 1][0].y }];
1357
+ }
1358
+ [d(236)](s) {
1359
+ const t = d;
1360
+ return s == null ? 1 : s / (this[t(164)] || 1);
1361
+ }
1362
+ }
1363
+ function Dt() {
1364
+ const o = ["fromURL", "design", "getChildByName", "map", "Delete", "find", "23364FOsaLY", "bind", "texMesh", "1374hWUGYK", "toBlob", "blendMode", "toFront", "getBlendMode", "view", "191299kTEOWK", "Application", "subdiv", "container", "removeBg", "ArrowDown", "prop", "screen", "meshManager", "boolean", "addChild", "from", "SCALE_MODES", "renderer", "parent", "highlightManager", "app", "stagePadding", "1564960WxtriC", "removeChild", "cache", "number", "corners", "keys", "selectLayer", "LINEAR", "nudgeSelected", "NORMAL", "_boundKeydown", "setTransformConfig", "BLEND_MODES", "shiftKey", "6QppLhN", "prepare", "setContainer", "originZIndex", "replaceStickerTexture", "upload", "toggleControllers", "transform", "off", "filter", "material", "activeLayerName", "startsWith", "ArrowUp", "composeColoredLayerToMultiplySprite", "includes", "buildMeshAndApplyLayer", "string", "sortableChildren", "addEventListener", "uvs", "anonymous", "ArrowLeft", "pivot", "select", "meshNudge", "addSticker", "children", "extract", "creteMesh", "enable", "height", "SpriteMaskFilter", "indices", "meshInstance", "toLowerCase", "entries", "enableEventControl", "ArrowRight", "position", "baseScale", "getState", "showHighlight", "dispose", "clientHeight", "scaleY", "get", "maskTextureMap", "input", "渲染失败", "enabled", "keyboardControlHandler", "keydown", "setPreferences", "orig", "8066586jfuVrw", "onOffscreenRender", "setInteractive", "1744WApaNk", "log", "name", "flipY", "Container", "zIndex", "setHighlight", "Texture", "getTransformConfig", "textarea", "initState", "TextureCache", "alphaMode", "4176WFYzth", "devicePixelRatio", "Assets", "translateX", "addImage", "update", 'Invalid triangle mesh for layer "', "bgSize", "deleteSelectedControlPoint", "meshDeletePoint", "canvas", "all", "6CIjUPS", "MeshMaterial", "value", "length", "resize", "preventDefault", "MULTIPLY", "textureSize", "vertices", "rotation", "showControllers", "NO_PREMULTIPLIED_ALPHA", "clear", "load", "https", "has", "key", "stage", "reset", "getTranslateAbsolute", "forEach", "_v2", "image/webp", "offscreenRender", "scaleX", "frame", "flipX", "setScaleAbsoluteAxes", "toggleHighlight", "opacity", "restoreTransformState", "render", "image", "setTranslateAbsolute", "filters", "create", "max", "color", "blend", "baseTexture", "restoreDeform", "resizeHandler", "layers", "tagName", "clientWidth", "renderable", "RenderTexture", "tint", "309340AWcqJU", "width", "#fff", "Sprite", "alpha", "hotkeys", "export", "mesh", "delete", "scale", "texture", "set", "utils", "min", "BaseTextureCache", "translateY", "sortChildren", "destroy", "blob:", "fitToLayer", "scaleMode", "floor", "config", "ALPHA_MODES", "activeElement", "2666132fddXWV"];
1365
+ return Dt = function() {
1366
+ return o;
1367
+ }, Dt();
1368
+ }
1369
+ const S = Pt;
1370
+ (function(o, s) {
1371
+ const t = Pt, e = o();
1372
+ for (; ; )
1373
+ try {
1374
+ if (parseInt(t(298)) / 1 * (-parseInt(t(330)) / 2) + parseInt(t(292)) / 3 * (parseInt(t(401)) / 4) + parseInt(t(257)) / 5 + -parseInt(t(413)) / 6 * (-parseInt(t(282)) / 7) + parseInt(t(388)) / 8 * (parseInt(t(289)) / 9) + parseInt(t(316)) / 10 + -parseInt(t(385)) / 11 === s) break;
1375
+ e.push(e.shift());
1376
+ } catch {
1377
+ e.push(e.shift());
1378
+ }
1379
+ })(Dt, 336097);
1380
+ function Pt(o, s) {
1381
+ const t = Dt();
1382
+ return Pt = function(e, i) {
1383
+ return e = e - 220, t[e];
1384
+ }, Pt(o, s);
1385
+ }
1386
+ C[S(403)][S(383)]({ crossOrigin: S(351) });
1387
+ const us = (o) => {
1388
+ var s, t, e, i;
1389
+ const n = S, a = ((s = o?.[n(384)]) == null ? void 0 : s[n(258)]) || ((t = o?.[n(234)]) == null ? void 0 : t[n(258)]) || o?.[n(258)] || 0, r = ((e = o?.orig) == null ? void 0 : e[n(361)]) || ((i = o?.[n(234)]) == null ? void 0 : i.height) || o?.[n(361)] || 0;
1390
+ return { w: a, h: r };
1391
+ }, Bt = async (o, s = 10) => {
1392
+ var t;
1393
+ for (let e = 0; e < s; e++) {
1394
+ const { w: i, h: n } = us(o || void 0);
1395
+ if (i > 0 && n > 0 && ((t = o?.baseTexture) != null && t.valid)) return { w: i, h: n };
1396
+ await new Promise((a) => requestAnimationFrame(() => a(null)));
1397
+ }
1398
+ return null;
1399
+ }, Yt = (o) => {
1400
+ var s, t;
1401
+ const e = S;
1402
+ try {
1403
+ o?.[e(248)] && (o[e(248)][e(400)] = C.ALPHA_MODES[e(220)]);
1404
+ } catch {
1405
+ }
1406
+ try {
1407
+ (t = (s = o?.baseTexture) == null ? void 0 : s[e(406)]) == null || t.call(s);
1408
+ } catch {
1409
+ }
1410
+ };
1411
+ class _s {
1412
+ constructor(s, t = !1, e = {}) {
1413
+ T(this, "app"), T(this, ge), T(this, ve), T(this, "maskTextureMap"), T(this, me, /* @__PURE__ */ new Map()), T(this, pe), T(this, ye), T(this, "subdiv"), T(this, "stagePadding"), T(this, _e, { enabled: !0, meshNudge: !0, meshDeletePoint: !0, moveStickerWhenNoSel: !0 }), T(this, de), T(this, fe, (n) => {
1414
+ var a, r;
1415
+ const h = S;
1416
+ this[h(314)][h(226)][h(369)].set((n?.[h(258)] || this[h(314)][h(305)][h(258)]) / 2, (n?.[h(361)] || this.app.screen[h(361)]) / 2);
1417
+ const x = Math.min((n?.[h(258)] || this[h(314)][h(305)][h(258)]) / (((a = this.bgSize) == null ? void 0 : a[h(258)]) || this[h(314)][h(226)][h(258)]), (n?.[h(361)] || this[h(314)][h(305)][h(361)]) / (((r = this[h(408)]) == null ? void 0 : r[h(361)]) || this[h(314)][h(226)][h(361)])) * this.stagePadding;
1418
+ this[h(314)][h(226)].scale[h(268)](x);
1419
+ }), T(this, ue, (n) => {
1420
+ const a = S, r = Object[a(321)](C[a(328)])[a(288)]((h) => h.toLowerCase() === n);
1421
+ if (r) return C.BLEND_MODES[r];
1422
+ });
1423
+ const i = S;
1424
+ this.app = new C[i(299)]({ width: s instanceof HTMLElement ? s[i(253)] : s[i(258)], height: s instanceof HTMLElement ? s[i(374)] : s.height, antialias: !0, resolution: window[i(402)] || 1, autoDensity: !0, resizeTo: s instanceof HTMLElement ? s : void 0, backgroundColor: i(259), backgroundAlpha: t ? 0 : 1, preserveDrawingBuffer: t }), this[i(314)].stage[i(348)] = !0, this[i(232)] = t, this[i(313)] = new He(this.app), this[i(377)] = /* @__PURE__ */ new Map(), this[i(300)] = e[i(300)] || 24, this[i(315)] = e[i(315)] || 1, this._boundKeydown = this[i(381)][i(290)](this), s instanceof HTMLElement && this[i(314)].renderer.on(i(417), (n, a) => {
1425
+ this[i(250)]({ width: n, height: a });
1426
+ });
1427
+ }
1428
+ get view() {
1429
+ const s = S;
1430
+ return this[s(314)][s(297)];
1431
+ }
1432
+ async [(ge = S(313), ve = S(408), me = S(251), pe = S(341), ye = S(232), _e = S(262), de = S(326), S(398))](s) {
1433
+ const t = S;
1434
+ try {
1435
+ const e = await C[t(403)][t(222)](s), i = C[t(260)].from(e);
1436
+ this[t(408)] = { width: i[t(258)], height: i.height }, this[t(314)][t(226)][t(353)].set(i[t(258)] / 2, i[t(361)] / 2), this[t(314)][t(226)][t(369)][t(268)](this[t(314)][t(305)].width / 2, this.app[t(305)][t(361)] / 2);
1437
+ const n = Math[t(270)](this[t(314)].screen.width / i.width, this[t(314)][t(305)].height / i.height) * this[t(315)];
1438
+ this[t(314)].stage[t(266)].set(n), this.app[t(226)][t(308)](i), this.enableEventControl();
1439
+ } catch {
1440
+ }
1441
+ }
1442
+ async [S(405)](s, t = {}) {
1443
+ const e = S, i = new C[e(392)]();
1444
+ t[e(390)] && (i[e(390)] = t[e(390)]), i.x = t.x || 0, i.y = t.y || 0, typeof t.zIndex === e(319) && (i[e(393)] = t[e(393)]);
1445
+ const n = await C[e(403)][e(222)](s), a = C[e(260)][e(309)](n);
1446
+ if (t[e(294)] && (a.blendMode = t.blendMode), typeof t[e(238)] === e(319)) {
1447
+ const r = t[e(238)] > 1 ? t[e(238)] / 255 : t.opacity;
1448
+ a[e(261)] = Math[e(245)](0, Math.min(1, r));
1449
+ }
1450
+ return t[e(246)] && (a[e(256)] = t[e(246)], a[e(294)] = t[e(294)] ?? C[e(328)][e(325)]), i.addChild(a), !this.offscreenRender && this[e(314)][e(226)][e(308)](i), i;
1451
+ }
1452
+ async [S(346)](s, t, e) {
1453
+ var i, n, a, r, h, x;
1454
+ const c = S, l = await s[c(359)](e);
1455
+ if (Ve(t[c(279)])) return s[c(249)]({ space: t[c(279)].space, vertices: t[c(279)][c(421)], uvs: t[c(279)][c(350)], indices: t[c(279)][c(363)] }), l;
1456
+ if (Ue(t[c(279)])) throw new Error(c(407) + t.name + '": vertices, uvs and indices must form a valid triangle list');
1457
+ const u = t[c(420)] ?? ((i = t[c(279)]) == null ? void 0 : i[c(420)]), f = e[c(258)] || 0, m = e[c(361)] || 0, b = u?.[0] || 0, I = u?.[1] || 0, _ = b > 0 && I > 0 && f > 0 && m > 0 && (b !== f || I !== m), p = _ ? b / f : 1, y = _ ? I / m : 1, M = _ ? Math.sqrt(p * y) : 1, v = (n = t.config) == null ? void 0 : n[c(264)], g = (a = t[c(279)]) == null ? void 0 : a[c(320)], w = (r = t[c(279)]) == null ? void 0 : r.curveCtrl, A = (h = t[c(279)]) == null ? void 0 : h[c(421)], N = (() => {
1458
+ var L;
1459
+ const k = c, R = (L = t[k(279)]) == null ? void 0 : L.transform;
1460
+ return !R || !_ ? R : { ...R, ...typeof R.baseScale === k(319) ? { baseScale: R[k(370)] * M } : {}, ...typeof R[k(266)] === k(319) ? { scale: R.scale * M } : {}, ...typeof R[k(233)] == "number" ? { scaleX: R[k(233)] * p } : {}, ...typeof R[k(375)] === k(319) ? { scaleY: R[k(375)] * y } : {} };
1461
+ })();
1462
+ if (!!(v || g || w || A)) {
1463
+ s[c(276)]({ width: t[c(258)], height: t[c(361)] }, e, { baseScale: N?.[c(370)] }), s[c(249)]({ mesh: v, corners: g, curveCtrl: w, vertices: A });
1464
+ const L = N || {};
1465
+ if (!!v && L[c(230)] === !0) s[c(239)](L);
1466
+ else {
1467
+ const B = {};
1468
+ typeof L.rotation === c(319) && (B[c(422)] = L[c(422)]), typeof L.flipX === c(319) && (B[c(235)] = L.flipX), typeof L[c(391)] === c(319) && (B[c(391)] = L.flipY), Object[c(321)](B)[c(416)] && s[c(327)](B);
1469
+ const z = typeof L.scaleX === c(319) ? L[c(233)] : typeof L[c(266)] === c(319) ? L.scale : void 0, H = typeof L[c(375)] == "number" ? L[c(375)] : typeof L[c(266)] == "number" ? L[c(266)] : void 0;
1470
+ if ((z !== void 0 || H !== void 0) && s[c(236)]({ ...z !== void 0 ? { scaleX: z } : {}, ...H !== void 0 ? { scaleY: H } : {} }), typeof L[c(404)] === c(319) || typeof L.translateY === c(319)) {
1471
+ const Q = s[c(228)]();
1472
+ s[c(242)]({ x: typeof L[c(404)] === c(319) ? L[c(404)] : Q.x, y: typeof L.translateY == "number" ? L[c(272)] : Q.y });
1473
+ }
1474
+ }
1475
+ } else s[c(276)]({ width: t[c(258)], height: t[c(361)] }, e, (x = t[c(279)]) == null ? void 0 : x[c(337)]);
1476
+ return l;
1477
+ }
1478
+ async [S(356)](s, t) {
1479
+ var e, i;
1480
+ const n = S, a = new C[n(392)]();
1481
+ a[n(390)] = t.name, typeof t[n(393)] === n(319) && (a[n(393)] = t[n(393)]), a.position[n(268)](t.x, t.y);
1482
+ const r = new Ye(this.app, this.subdiv);
1483
+ r[n(332)](a);
1484
+ const [h, x] = await Promise.all([this[n(232)] || s instanceof ImageBitmap || s[n(342)](n(275)) ? s instanceof ImageBitmap ? C.Texture[n(309)](s) : C.Texture[n(283)](s) : C[n(403)][n(222)](s), C.Assets[n(222)](t.image)]);
1485
+ s instanceof ImageBitmap && (Yt(h), await Bt(h));
1486
+ const c = await this[n(346)](r, t, h), l = C[n(260)][n(309)](x), u = new C[n(362)](l);
1487
+ if (u[n(294)] = ((e = t[n(279)]) == null ? void 0 : e[n(294)]) ?? C[n(328)][n(419)], c[n(243)] = [u], a[n(308)](l), a[n(308)](c), c.alpha = ((i = t[n(279)]) == null ? void 0 : i.opacity) ?? 1, l.renderable = !1, this[n(313)][n(237)](!1), r[n(387)](t[n(360)] ?? !1), r[n(423)](t[n(360)] ?? !1), t.enable && (this.activeLayerName = t[n(390)]), t[n(295)]) {
1488
+ const f = Math[n(245)](...this[n(314)][n(226)][n(357)][n(286)]((m) => m[n(393)]));
1489
+ a[n(393)] = f + 1;
1490
+ }
1491
+ return this[n(251)][n(268)](t.name, { container: a, meshManager: r, originZIndex: a[n(393)] }), this[n(232)] ? a : (this[n(314)].stage[n(308)](a), r[n(396)]());
1492
+ }
1493
+ async [S(334)](s, t) {
1494
+ var e, i, n, a;
1495
+ const r = S, h = this[r(251)].get(t.name);
1496
+ if (!h) return this[r(356)](s, t);
1497
+ const x = h.container, c = h[r(306)], l = this[r(341)] === t[r(390)], u = await (this.offscreenRender || s instanceof ImageBitmap || s[r(342)](r(275)) ? s instanceof ImageBitmap ? C.Texture[r(309)](s) : C[r(395)][r(283)](s) : C.Assets[r(222)](s));
1498
+ s instanceof ImageBitmap && (Yt(u), await Bt(u));
1499
+ const f = c[r(364)], m = c[r(291)], b = m?.[r(340)] instanceof C[r(414)] ? m[r(340)][r(267)] : void 0, I = !!(f && m && b && b[r(258)] > 0 && b[r(361)] > 0 && u[r(258)] > 0 && u.height > 0 && b.width === u[r(258)] && b[r(361)] === u[r(361)]), _ = I ? f : await this.buildMeshAndApplyLayer(c, t, u);
1500
+ I && m.material instanceof C[r(414)] && (m[r(340)][r(267)] = u, (i = (e = m[r(340)][r(267)][r(248)]) == null ? void 0 : e.update) == null || i.call(e));
1501
+ let p = x[r(357)][r(288)]((g) => g instanceof C[r(260)]);
1502
+ if (!p) {
1503
+ const g = await C.Assets[r(222)](t[r(241)]);
1504
+ p = C.Sprite[r(309)](g), x[r(308)](p);
1505
+ }
1506
+ p[r(254)] = !1;
1507
+ let M = (Array.isArray(_[r(243)]) ? _.filters : []).find((g) => g instanceof C[r(362)]);
1508
+ if ((!M || M.maskSprite !== p) && (M = new C[r(362)](p)), M[r(294)] = ((n = t[r(279)]) == null ? void 0 : n[r(294)]) ?? C[r(328)][r(419)], _[r(243)] = [M], _[r(261)] = ((a = t[r(279)]) == null ? void 0 : a[r(238)]) ?? 1, x.name = t.name, x[r(369)][r(268)](t.x, t.y), typeof t.zIndex == "number" && (x.zIndex = t[r(393)]), t[r(295)]) {
1509
+ const g = Math.max(...this[r(314)].stage.children[r(286)]((w) => w.zIndex));
1510
+ x[r(393)] = g + 1;
1511
+ }
1512
+ const v = typeof t.enable === r(307) ? t[r(360)] : l;
1513
+ this[r(313)].toggleHighlight(!1), c[r(387)](v), c.showControllers(v), v && (this[r(341)] = t.name), !this[r(232)] && !x[r(312)] && this[r(314)].stage[r(308)](x);
1514
+ try {
1515
+ x[r(273)]();
1516
+ } catch {
1517
+ }
1518
+ return this.layers.set(t[r(390)], { ...h, container: x, meshManager: c, originZIndex: h.originZIndex ?? x.zIndex }), c[r(396)]();
1519
+ }
1520
+ async [S(344)](s, t, e, i, n = 1) {
1521
+ var a, r, h, x, c;
1522
+ const l = S, u = ((a = s[l(279)]) == null ? void 0 : a.blendMode) ?? C[l(328)][l(419)], f = new C.Container();
1523
+ f[l(369)][l(268)](s.x * n, s.y * n), f[l(266)][l(268)](n);
1524
+ const m = new Ye(this[l(314)], this[l(300)]);
1525
+ m.setContainer(f);
1526
+ const [b, I] = await Promise[l(412)]([s.texture instanceof ImageBitmap ? C[l(395)].from(s[l(267)]) : (r = s[l(267)]) != null && r[l(342)](l(223)) ? C[l(403)].load(s[l(267)]) : C[l(395)][l(283)](s.texture), C.Assets[l(222)](s.image)]);
1527
+ s.texture instanceof ImageBitmap && (Yt(b), await Bt(b)), b[l(248)] && (b[l(248)][l(277)] = C[l(310)][l(323)]);
1528
+ const _ = await this.buildMeshAndApplyLayer(m, s, b), p = C[l(260)][l(309)](I), y = new C[l(362)](p);
1529
+ m[l(364)][l(243)] = [y], f.addChild(p), p.renderable = !1;
1530
+ const M = C.Sprite[l(309)](I);
1531
+ M[l(256)] = t, M[l(294)] = C[l(328)][l(325)], u !== C.BLEND_MODES[l(325)] && f[l(308)](M), f[l(308)](_), _[l(294)] = C.BLEND_MODES[l(325)], _[l(261)] = ((h = s[l(279)]) == null ? void 0 : h[l(238)]) ?? 1, await new Promise((w) => requestAnimationFrame(() => w(null))), (c = (x = this[l(314)].renderer.prepare) == null ? void 0 : x.upload) == null || c.call(x, f);
1532
+ const v = C[l(255)][l(244)]({ width: Math.floor(i[l(258)] * n), height: Math[l(278)](i[l(361)] * n) });
1533
+ this[l(314)][l(311)].render(f, { renderTexture: v, clear: !0 });
1534
+ const g = new C[l(260)](v);
1535
+ return g[l(294)] = u, g[l(393)] = e, m[l(373)](), f[l(274)]({ children: !0 }), g;
1536
+ }
1537
+ [S(336)](s, t) {
1538
+ const e = S, i = this[e(251)].get(s);
1539
+ i && i[e(306)][e(423)](t, !0);
1540
+ }
1541
+ [S(322)](s) {
1542
+ const t = S;
1543
+ this[t(341)] = s;
1544
+ for (const [e, i] of this.layers[t(366)]()) {
1545
+ const n = e === s;
1546
+ i.meshManager[t(387)](n), i[t(306)][t(423)](n), i[t(301)][t(393)] = n ? 9999 : i[t(333)] ?? 0;
1547
+ }
1548
+ s && (this.highlightManager[t(237)](!1), this.app[t(226)][t(273)]());
1549
+ }
1550
+ async removeSticker(s) {
1551
+ const t = S;
1552
+ if (!this[t(341)]) return;
1553
+ const e = this.layers.get(this.activeLayerName);
1554
+ e && (e.meshManager[t(387)](!1), e[t(306)][t(423)](!1), e[t(306)][t(373)](), e[t(301)][t(312)] && e.container.parent[t(317)](e[t(301)]), e[t(301)][t(274)]({ children: !0 }), this[t(251)][t(265)](this[t(341)]), this.showHighlight(s));
1555
+ }
1556
+ async updateSticker(s) {
1557
+ const t = S;
1558
+ if (!this[t(341)]) return;
1559
+ const e = this[t(251)][t(376)](this[t(341)]);
1560
+ if (e)
1561
+ if ([t(294), t(227)][t(345)](s.prop) && (e[t(306)].meshInstance.filters[0][t(294)] = s.prop === t(227) ? C[t(328)][t(419)] : s.value), [t(238), t(227)][t(345)](s[t(304)]) && (e[t(306)].meshInstance.alpha = s[t(304)] === t(227) ? 1 : s[t(415)]), s[t(304)] === t(266)) {
1562
+ if (typeof s.value == "number") {
1563
+ const i = s.value;
1564
+ e[t(306)][t(236)]({ scaleX: i, scaleY: i });
1565
+ } else if (s[t(415)] && typeof s[t(415)] == "object") {
1566
+ const i = s[t(415)], n = typeof i[t(266)] === t(319) ? i[t(266)] : void 0, a = typeof i[t(233)] === t(319) ? i[t(233)] : n, r = typeof i.scaleY === t(319) ? i[t(375)] : n;
1567
+ (a !== void 0 || r !== void 0) && e[t(306)].setScaleAbsoluteAxes({ ...a !== void 0 ? { scaleX: a } : {}, ...r !== void 0 ? { scaleY: r } : {} });
1568
+ }
1569
+ } else
1570
+ [t(233), t(375)][t(345)](s[t(304)]) ? e.meshManager.setScaleAbsoluteAxes({ [s[t(304)]]: s[t(415)] }) : s[t(304)] === "reset" ? e.meshManager[t(327)](s[t(415)]) : e.meshManager.setTransformConfig({ [s[t(304)]]: s[t(415)] });
1571
+ }
1572
+ async [S(372)](s) {
1573
+ const t = S, e = this.maskTextureMap[t(224)](s[t(390)]) ? this[t(377)].get(s[t(390)]) : await C.Assets[t(222)](s[t(241)]);
1574
+ !this[t(377)][t(224)](s[t(390)]) && this[t(377)].set(s.name, e), this[t(313)][t(394)](e, { x: s.x, y: s.y }), this[t(322)]("");
1575
+ }
1576
+ [S(371)]() {
1577
+ const s = S;
1578
+ return Array.from(this[s(251)].values()).map((t) => ({ ...t[s(306)].exportState(), id: t[s(301)][s(390)] }));
1579
+ }
1580
+ hasChild(s) {
1581
+ const t = S;
1582
+ return this[t(314)][t(226)][t(285)](s) !== null;
1583
+ }
1584
+ clearStage() {
1585
+ this.app.stage.removeChildren();
1586
+ }
1587
+ keyboardControlHandler(s) {
1588
+ const t = S;
1589
+ if (!this.hotkeys[t(380)]) return;
1590
+ const e = document[t(281)], i = e && e[t(252)] ? String(e[t(252)])[t(365)]() : "";
1591
+ if (i === t(378) || i === t(354) || i === t(397) || !this[t(341)]) return;
1592
+ const n = this[t(251)][t(376)](this[t(341)]);
1593
+ if (!n) return;
1594
+ if (this[t(262)][t(355)] && (s[t(225)] === t(343) || s.key === t(303) || s.key === t(352) || s[t(225)] === t(368))) {
1595
+ const r = s[t(329)] ? 10 : 1;
1596
+ let h = 0, x = 0;
1597
+ if (s[t(225)] === t(343) && (x = -r), s.key === t(303) && (x = r), s[t(225)] === t(352) && (h = -r), s[t(225)] === t(368) && (h = r), n.meshManager[t(324)](h, x)) {
1598
+ s.preventDefault();
1599
+ return;
1600
+ }
1601
+ }
1602
+ if (this[t(262)][t(410)] && (s[t(225)] === t(287) || s[t(225)] === "Backspace") && n[t(306)][t(409)]()) {
1603
+ s[t(418)]();
1604
+ return;
1605
+ }
1606
+ if (!this[t(262)].moveStickerWhenNoSel) return;
1607
+ const a = s.shiftKey ? 20 : 5;
1608
+ switch (s[t(225)]) {
1609
+ case t(343):
1610
+ n[t(306)][t(327)]({ translateY: n.meshManager.getTransformConfig()[t(272)] - a }), s[t(418)]();
1611
+ break;
1612
+ case t(303):
1613
+ n[t(306)][t(327)]({ translateY: n[t(306)][t(396)]().translateY + a }), s[t(418)]();
1614
+ break;
1615
+ case t(352):
1616
+ n[t(306)][t(327)]({ translateX: n[t(306)][t(396)]()[t(404)] - a }), s[t(418)]();
1617
+ break;
1618
+ case t(368):
1619
+ n[t(306)][t(327)]({ translateX: n[t(306)][t(396)]()[t(404)] + a }), s.preventDefault();
1620
+ break;
1621
+ }
1622
+ }
1623
+ async [(fe = S(250), ue = S(296), S(386))](s, t) {
1624
+ var e, i;
1625
+ const n = S, { color: a, scale: r = 1, cleanCache: h = !0, quality: x = 0.5, format: c = n(231) } = t, l = new C[n(392)]();
1626
+ l.sortableChildren = !0;
1627
+ const u = s[n(288)]((_) => _[n(390)] === "bg");
1628
+ if (!u) return;
1629
+ const f = Math[n(278)](u[n(258)] * r), m = Math[n(278)](u.height * r);
1630
+ this[n(314)][n(311)][n(417)](f, m);
1631
+ const b = [];
1632
+ let I = null;
1633
+ try {
1634
+ await Promise[n(412)](s[n(339)]((y) => !t[n(302)] || y[n(390)] !== "bg" && t.removeBg)[n(339)]((y) => !y[n(284)] || a || y[n(267)]).map(async (y, M) => {
1635
+ var v, g;
1636
+ const w = n;
1637
+ if (y.design) {
1638
+ if (y.texture) {
1639
+ if (a) {
1640
+ const A = await this.composeColoredLayerToMultiplySprite(y, a, M, u, r);
1641
+ l[w(308)](A);
1642
+ } else {
1643
+ const A = await this[w(356)](y.texture, y);
1644
+ A[w(369)][w(268)](y.x * r, y.y * r), A[w(266)].set(r), A[w(393)] = M, l[w(308)](A);
1645
+ }
1646
+ typeof y[w(267)] === w(347) && b.push(y.texture);
1647
+ } else if (a) {
1648
+ const A = await this.addImage(y[w(241)], { x: y.x * r, y: y.y * r, color: a, blendMode: C[w(328)][w(419)], zIndex: M });
1649
+ A[w(266)][w(268)](r), l[w(308)](A);
1650
+ }
1651
+ } else {
1652
+ const A = y[w(263)] ? this.getBlendMode((v = y.export) == null ? void 0 : v[w(247)]) : void 0, N = y[w(263)] ? (g = y[w(263)]) == null ? void 0 : g[w(238)] : void 0, E = await this[w(405)](y[w(241)], { x: y.x * r, y: y.y * r, zIndex: M, blendMode: A, opacity: N, name: y.name });
1653
+ E.scale[w(268)](r), l.addChild(E);
1654
+ }
1655
+ })), await new Promise((y) => requestAnimationFrame(() => y(null))), (i = (e = this.app[n(311)][n(331)]) == null ? void 0 : e[n(335)]) == null || i.call(e, l), I = C[n(255)].create({ width: f, height: m, alphaMode: C[n(280)][n(220)] }), this[n(314)][n(311)][n(240)](l, { renderTexture: I, clear: !0 });
1656
+ const _ = this[n(314)][n(311)][n(358)][n(411)](I), p = await new Promise((y) => {
1657
+ _[n(293)](y, c, x);
1658
+ });
1659
+ return l.destroy({ children: !0 }), I[n(274)](!0), b[n(229)]((y) => {
1660
+ const M = n;
1661
+ if (!y.startsWith("http") || h) {
1662
+ const v = C.utils[M(271)][y];
1663
+ v && v[M(274)](), delete C[M(269)].BaseTextureCache[y], delete C.utils.TextureCache[y];
1664
+ }
1665
+ }), p;
1666
+ } catch (_) {
1667
+ console[n(389)](n(379), _), l[n(274)]({ children: !0, texture: !0, baseTexture: !0 }), I?.destroy(!0), b[n(229)]((p) => {
1668
+ const y = n;
1669
+ delete C[y(269)][y(271)][p], delete C[y(269)][y(399)][p];
1670
+ });
1671
+ return;
1672
+ }
1673
+ }
1674
+ [S(367)]() {
1675
+ const s = S;
1676
+ this[s(326)] || (this[s(326)] = this[s(381)][s(290)](this)), window[s(349)](s(382), this[s(326)]);
1677
+ }
1678
+ [S(274)]() {
1679
+ const s = S;
1680
+ try {
1681
+ this[s(326)] && window.removeEventListener(s(382), this[s(326)]), this[s(251)][s(229)]((t) => {
1682
+ const e = s;
1683
+ t[e(306)][e(373)]();
1684
+ }), this[s(314)][s(311)] && this[s(314)][s(311)][s(338)]("resize"), this.layers[s(221)](), this.maskTextureMap[s(229)]((t) => {
1685
+ t[s(274)](!0);
1686
+ }), this[s(377)][s(221)](), this.app[s(274)](!0, { children: !0, texture: !0, baseTexture: !0 }), C[s(403)][s(318)].reset();
1687
+ } catch {
1688
+ }
1689
+ }
1690
+ }
1691
+ const D = kt;
1692
+ (function(o, s) {
1693
+ const t = kt, e = o();
1694
+ for (; ; )
1695
+ try {
1696
+ if (parseInt(t(382)) / 1 * (parseInt(t(402)) / 2) + -parseInt(t(425)) / 3 * (-parseInt(t(362)) / 4) + parseInt(t(424)) / 5 * (-parseInt(t(395)) / 6) + -parseInt(t(414)) / 7 * (parseInt(t(404)) / 8) + parseInt(t(411)) / 9 + -parseInt(t(373)) / 10 + -parseInt(t(381)) / 11 * (parseInt(t(363)) / 12) === s) break;
1697
+ e.push(e.shift());
1698
+ } catch {
1699
+ e.push(e.shift());
1700
+ }
1701
+ })(Rt, 655721);
1702
+ function kt(o, s) {
1703
+ const t = Rt();
1704
+ return kt = function(e, i) {
1705
+ return e = e - 345, t[e];
1706
+ }, kt(o, s);
1707
+ }
1708
+ function Rt() {
1709
+ const o = ["length", "setHardwareScalingLevel", "beta", "radius", "init", "getMeshByName", "WRAP_ADDRESSMODE", "filter", "canvas", "name", "updateTextureTransform", "runRenderLoop", "resize", "ArcRotateCamera", "addEventListener", "keys", "hasOwnProperty", "356frfYoj", "12gVeSUv", "toggleTextureVisible", "includes", "computeWorldMatrix", "cam", "forEach", "setParent", "getTransform", "removeEventListener", "diffuseTexture", "7017160CKckoI", "Color3", "max", "setEnvironment", "panningSensibility", "environmentTexture", "SceneLoader", "onResize", "326216WcuwWx", "1ZxxhSJ", "wAng", "updateMaterialColor", "placeholder", "Vector3", "rootProxy", "subtract", "set", "Material", "hasAlpha", "MeshBuilder", "TextureDirtyFlag", "camera", "42162aNKMuh", "root", "tan", "MinMax", "uAng", "lastIndexOf", "devicePixelRatio", "1959314ImhnDS", "scene", "144440MxgRIb", "vOffset", "albedoTexture", "uOffset", "materialTextureMap", "createDefaultSkybox", "updateSamplingMode", "7038801JPJMNd", "Color4", "FromHexString", "49dYKAOA", "Texture", "find", "function", "wrapV", "CreateBox", "render", "vAng", "Engine", "alpha", "275PKUQwF", "4659uhEuoh", "getTotalVertices", "loadModel", "add", "clearColor", "LINEAR_LINEAR_MIPLINEAR", "wrapU", "replaceTexture", "meshes", "call", "PBRMaterial", "material", "engine", "StandardMaterial", "albedoColor", "dispose"];
1710
+ return Rt = function() {
1711
+ return o;
1712
+ }, Rt();
1713
+ }
1714
+ const fs = { u_offset: D(407), v_offset: D(405), u_scale: "uScale", v_scale: "vScale", u_ang: D(399), v_ang: "vAng", w_ang: D(383) };
1715
+ class ys {
1716
+ constructor(s) {
1717
+ T(this, "scene"), T(this, Ce), T(this, Me), T(this, we), T(this, Ie), T(this, be, {}), T(this, "onResize");
1718
+ const t = D;
1719
+ this[t(353)] = s;
1720
+ }
1721
+ [(Ce = D(353), Me = D(437), we = D(394), Ie = D(396), be = D(408), D(349))](s = {}) {
1722
+ const t = D, { adaptToDeviceRatio: e = !0, clearColor: i = new P[t(412)](0.4, 0.4, 0.4, 1), envUrl: n, skyboxBlur: a = 0.6, envSamplingMode: r = P[t(415)][t(430)] } = s;
1723
+ this.engine = new P[t(422)](this[t(353)], !0, { preserveDrawingBuffer: !0, stencil: !0 }, e), this[t(437)][t(346)](1 / (window[t(401)] || 1)), this.scene = new P.Scene(this[t(437)]), this[t(403)][t(429)] = i, this[t(394)] = new P[t(358)](t(367), Math.PI / 3, Math.PI / 2, 6, new P[t(386)](0, 0, 0), this[t(403)]), this.camera.attachControl(this.canvas, !0), this[t(394)].wheelPrecision = 50, this[t(394)][t(377)] = 50, n && this[t(376)](n, a, r), this.root = P[t(392)].CreateBox(t(387), { size: 1e-3 }, this[t(403)]), this[t(396)].isVisible = !1, this.engine[t(356)](() => {
1724
+ const h = t;
1725
+ this[h(403)][h(420)]();
1726
+ }), this[t(380)] = () => this.engine && this[t(437)][t(357)](), window[t(359)](t(357), this[t(380)]);
1727
+ }
1728
+ [D(376)](s, t = 0.6, e = P[D(415)][D(430)]) {
1729
+ const i = D, n = P.CubeTexture.CreateFromPrefilteredData(s, this[i(403)]);
1730
+ return n[i(410)](e), this[i(403)][i(378)] = n, this.scene[i(409)](n, !0, void 0, t), n;
1731
+ }
1732
+ async [D(427)](s, t = {}) {
1733
+ const e = D, { targetSize: i = 2, orientHandleLeft: n = !0 } = t, a = s.substring(0, s[e(400)]("/") + 1), r = s.substring(s[e(400)]("/") + 1), { meshes: h } = await P[e(379)].ImportMeshAsync("", a, r, this.scene), x = h[e(352)]((g) => g !== this[e(403)][e(350)](e(387)));
1734
+ x.forEach((g) => {
1735
+ const w = e;
1736
+ g.parent || g[w(369)](this.root);
1737
+ });
1738
+ let c = x[e(352)]((g) => typeof g.getBoundingInfo === e(417) && typeof g[e(426)] == "function" && g[e(426)]() > 0);
1739
+ if (!c[e(345)]) {
1740
+ const g = P.MeshBuilder[e(419)](e(385), { size: 1 }, this[e(403)]);
1741
+ g[e(369)](this.root), c = [g];
1742
+ }
1743
+ c.forEach((g) => g.computeWorldMatrix(!0));
1744
+ const { min: l, max: u } = P.Mesh[e(398)](c), f = u[e(388)](l), m = Math[e(375)](f.x, f.y, f.z) || 1, b = i / m;
1745
+ this[e(396)].scaling[e(389)](b, b, b), c.forEach((g) => g[e(366)](!0));
1746
+ const { min: I, max: _ } = P.Mesh[e(398)](c), p = I[e(428)](_).scale(0.5), y = _.subtract(I)[e(345)]() * 0.5 || 1;
1747
+ this[e(394)].setTarget(p);
1748
+ const M = this[e(394)].fov, v = y / Math[e(397)](M * 0.5);
1749
+ if (this.camera[e(348)] = v, n) {
1750
+ const g = _.x - p.x, w = p.x - I.x;
1751
+ this[e(394)][e(423)] = g >= w ? Math.PI / 2 : -Math.PI / 2, this.camera[e(347)] = Math.PI / 2;
1752
+ }
1753
+ return x;
1754
+ }
1755
+ [D(350)](s) {
1756
+ const t = D;
1757
+ return this[t(403)][t(433)][t(416)]((e) => e.material && e[t(436)][t(354)] === s);
1758
+ }
1759
+ [D(370)](s = {}) {
1760
+ const t = D, e = {};
1761
+ return Object[t(360)](s).forEach((i) => {
1762
+ e[fs[i]] = s[i];
1763
+ }), e;
1764
+ }
1765
+ [D(355)](s, t) {
1766
+ var e, i;
1767
+ const n = D;
1768
+ t = this[n(370)](t);
1769
+ const a = this[n(350)](s), r = this[n(408)][s] || ((e = a?.material) == null ? void 0 : e[n(406)]) || ((i = a?.[n(436)]) == null ? void 0 : i[n(372)]);
1770
+ if (r) {
1771
+ for (const h in t)
1772
+ if (Object.prototype[n(361)][n(434)](r, h)) {
1773
+ let x = t[h];
1774
+ typeof x == "string" && (x = Number(x)), ["uAng", n(421), n(383)].includes(h) && (x = x * Math.PI / 180), r[h] = x;
1775
+ }
1776
+ r[n(431)] = P[n(415)][n(351)], r[n(418)] = P[n(415)].WRAP_ADDRESSMODE, a && a[n(436)] && a[n(436)].markAsDirty(P[n(390)][n(393)]);
1777
+ }
1778
+ }
1779
+ [D(384)](s, t) {
1780
+ const e = D, i = this[e(403)][e(433)][e(352)]((n) => n.material && s[e(365)](n[e(436)][e(354)]));
1781
+ i[e(345)] && (t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]), i[e(368)]((n) => {
1782
+ const a = e;
1783
+ n[a(436)] instanceof P[a(435)] ? n[a(436)][a(439)] = P[a(374)][a(413)](t) : n.material instanceof P[a(438)] && (n.material.diffuseColor = P[a(374)][a(413)](t));
1784
+ }));
1785
+ }
1786
+ [D(432)](s, t, e = {}, i = !0) {
1787
+ const n = D, a = this[n(350)](t);
1788
+ if (a)
1789
+ return new Promise((r) => {
1790
+ const h = n, x = new P[h(415)](s, this[h(403)], !1, !1, P[h(415)].TRILINEAR_SAMPLINGMODE, () => {
1791
+ const c = h;
1792
+ x[c(391)] = !0, this.materialTextureMap[t] = x, e && this[c(355)](t, e), i && (a[c(436)] instanceof P[c(435)] ? a[c(436)].albedoTexture = x : a[c(436)] instanceof P.StandardMaterial && (a[c(436)][c(372)] = x), r(null));
1793
+ }, (c) => {
1794
+ r(null);
1795
+ });
1796
+ });
1797
+ }
1798
+ [D(364)](s, t) {
1799
+ const e = D, i = this[e(350)](s);
1800
+ i && (i[e(436)] instanceof P.PBRMaterial ? i[e(436)].albedoTexture = t ? this[e(408)][s] : null : i[e(436)] instanceof P[e(438)] && (i[e(436)].diffuseTexture = t ? this[e(408)][s] : null));
1801
+ }
1802
+ [D(440)]() {
1803
+ const s = D;
1804
+ try {
1805
+ this[s(380)] && window[s(371)](s(357), this[s(380)]), this.scene && this[s(403)][s(440)](), this[s(437)] && this.engine[s(440)]();
1806
+ } finally {
1807
+ }
1808
+ }
1809
+ }
1810
+ function Xt() {
1811
+ var o = ["1110805vuhUYb", "1179BcVanG", "1607370OxFQwB", "2599003nUqICa", "1099zlarBc", "44QEEiUy", "8nMvBOL", "8202omuMrb", "4YJtrYH", "1796166EwDChb", "3118DChyjE"];
1812
+ return Xt = function() {
1813
+ return o;
1814
+ }, Xt();
1815
+ }
1816
+ (function(o, s) {
1817
+ for (var t = Ut, e = o(); ; )
1818
+ try {
1819
+ var i = parseInt(t(210)) / 1 * (-parseInt(t(215)) / 2) + -parseInt(t(217)) / 3 + parseInt(t(213)) / 4 * (parseInt(t(216)) / 5) + -parseInt(t(212)) / 6 * (parseInt(t(209)) / 7) + parseInt(t(211)) / 8 * (-parseInt(t(214)) / 9) + parseInt(t(207)) / 10 + parseInt(t(208)) / 11;
1820
+ if (i === s) break;
1821
+ e.push(e.shift());
1822
+ } catch {
1823
+ e.push(e.shift());
1824
+ }
1825
+ })(Xt, 135989);
1826
+ function Ut(o, s) {
1827
+ var t = Xt();
1828
+ return Ut = function(e, i) {
1829
+ e = e - 207;
1830
+ var n = t[e];
1831
+ return n;
1832
+ }, Ut(o, s);
1833
+ }
1834
+ export {
1835
+ ys as Sticker3DPlugin,
1836
+ _s as StickerPlugin
1837
+ };