useblocks 1.1.81 → 1.1.84

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 (41) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +17 -6
  3. package/iframe/css/sandbox-dark.css +1 -1
  4. package/iframe/css/sandbox-darktheme.css +3 -3
  5. package/iframe/css/sandbox-light.css +1 -1
  6. package/iframe/css/sandbox.css +2 -2
  7. package/iframe/js/amp.D1dkO3ub.js +1 -0
  8. package/iframe/js/iframe-eblock.js +1 -1
  9. package/iframe/js/iframe.js +1 -1
  10. package/iframe/js/rules.4N5s3OV-.js +1 -1
  11. package/package.json +1 -1
  12. package/static/core/{dfbad00e.js → 16c7408a.js} +4 -4
  13. package/static/core/{909c874d2.js → 278c19282.js} +982 -974
  14. package/static/core/{87de8255.js → 27b7d154.js} +3 -3
  15. package/static/core/{cc4c61c42.js → 7877b5712.js} +135 -135
  16. package/static/core/{ace7c2d1.js → 86acf537.js} +7 -7
  17. package/static/core/{6fc5508e2.js → 95074b4e2.js} +53 -53
  18. package/static/core/{f2b0c97b2.js → 9a1229572.js} +849 -836
  19. package/static/core/{6a3ea43c.js → ab3c035c.js} +6 -6
  20. package/static/core/{496a28e52.js → b8fa83f82.js} +562 -562
  21. package/static/core/{7cff1d56.js → bb8665a8.js} +77 -4
  22. package/static/core/{fc514220.js → c013e7cc.js} +73 -73
  23. package/static/core/{5cc21a00.js → c871702e.js} +608 -603
  24. package/static/core/{4296ff4b.js → cf26b064.js} +240 -240
  25. package/static/core/{d2293148.js → d15a988b.js} +7 -7
  26. package/static/core/{f7e3905a.js → d4962564.js} +3 -3
  27. package/static/core/{1ab52017.js → dc948de7.js} +7 -7
  28. package/static/core/{c287f8b6.js → e9b6fbb9.js} +36 -36
  29. package/static/core/{d70b5c31.js → ec6e74e5.js} +12965 -12545
  30. package/static/umd-runtime/{n8zqoGYh.js → D80ABE1O.js} +7 -1
  31. package/static/umd-runtime/runtime.js +2 -2
  32. package/static/umd-runtime/ui-kit.js +1742 -1734
  33. package/ui-kit/index.js +1859 -1851
  34. package/{useblocks-core.0a682f7d.js → useblocks-core.2fa005e8.js} +6 -6
  35. package/useblocks-esm.js +4 -4
  36. package/{useblocks-po.0a682f7d.js → useblocks-po.2fa005e8.js} +1 -1
  37. package/useblocks.d.ts +51 -24
  38. package/useblocks.js +3 -3
  39. package/iframe/js/amp.Da_6yDxX.js +0 -1
  40. /package/iframe/{iframe-eblock.0a682f7d.html → iframe-eblock.2fa005e8.html} +0 -0
  41. /package/iframe/{iframe.0a682f7d.html → iframe.2fa005e8.html} +0 -0
@@ -1,4 +1,4 @@
1
- __useblocks__.define("static/core/7cff1d56.js", [
1
+ __useblocks__.define("static/core/bb8665a8.js", [
2
2
  "require",
3
3
  "exports",
4
4
  "module",
@@ -2142,6 +2142,22 @@ __useblocks__.define("static/core/7cff1d56.js", [
2142
2142
  type: "application/x-www-form-urlencoded",
2143
2143
  ...n
2144
2144
  }),
2145
+ media_sideload_create: ({ id: e, ...t }, r, n = {}) => this.request({
2146
+ path: `/wp/v2/media/${e}/sideload`,
2147
+ method: "POST",
2148
+ body: r,
2149
+ type: "application/x-www-form-urlencoded",
2150
+ format: "json",
2151
+ ...n
2152
+ }),
2153
+ media_finalize_create: ({ id: e, ...t }, r, n = {}) => this.request({
2154
+ path: `/wp/v2/media/${e}/finalize`,
2155
+ method: "POST",
2156
+ body: r,
2157
+ type: "application/x-www-form-urlencoded",
2158
+ format: "json",
2159
+ ...n
2160
+ }),
2145
2161
  menu_items_list: (e, t = {}) => this.request({
2146
2162
  path: "/wp/v2/menu-items",
2147
2163
  method: "GET",
@@ -6251,7 +6267,8 @@ __useblocks__.define("static/core/7cff1d56.js", [
6251
6267
  em_layout_convert_never_suggest: "em_layout_convert_never_suggest",
6252
6268
  em_filemanager_v2: "em_filemanager_v2",
6253
6269
  em_projects_v2: "em_projects_v2",
6254
- em_translations_v2: "em_translations_v2"
6270
+ em_translations_v2: "em_translations_v2",
6271
+ em_guest_locale: "em_guest_locale"
6255
6272
  }, xm = "deleted", Fm = "not all", Gm = "light", Bm = "dark", Um = "system", Hm = "(prefers-color-scheme: light)", Wm = "(prefers-color-scheme: dark)", Qm = {
6256
6273
  auth: "/auth",
6257
6274
  projects_index: "/",
@@ -6462,6 +6479,11 @@ __useblocks__.define("static/core/7cff1d56.js", [
6462
6479
  REMOVE_ATOM: e("Remove element"),
6463
6480
  EDIT_ATOM: e("Edit element"),
6464
6481
  CHANGE_IMAGE: e("Change image"),
6482
+ CHANGE_IMAGE_EDIT: e("Edit"),
6483
+ CHANGE_IMAGE_STOCK: e("Stock"),
6484
+ CHANGE_IMAGE_CHANGETO: e("Upload"),
6485
+ CHANGE_IMAGE_GIF: e("GIF"),
6486
+ CHANGE_IMAGE_AI: e("Generate"),
6465
6487
  REORDER_BLOCK: e("Reorder block"),
6466
6488
  REORDER_BLOCK_UP: e("Move up"),
6467
6489
  REORDER_BLOCK_DOWN: e("Move down"),
@@ -10324,6 +10346,28 @@ The error may be correlated with this previous error:
10324
10346
  format: "json",
10325
10347
  ...t
10326
10348
  }),
10349
+ authUsersImpersonateCreate: ({ id: e }, t = {}) => this.request({
10350
+ path: `/admin/auth/users/${e}/impersonate`,
10351
+ method: "POST",
10352
+ secure: !0,
10353
+ format: "json",
10354
+ ...t
10355
+ }),
10356
+ authUsersPasswordCreate: ({ id: e }, t, r = {}) => this.request({
10357
+ path: `/admin/auth/users/${e}/password`,
10358
+ method: "POST",
10359
+ body: t,
10360
+ secure: !0,
10361
+ type: "application/json",
10362
+ ...r
10363
+ }),
10364
+ authUsersPasswordResetCreate: ({ id: e }, t = {}) => this.request({
10365
+ path: `/admin/auth/users/${e}/password-reset`,
10366
+ method: "POST",
10367
+ secure: !0,
10368
+ format: "json",
10369
+ ...t
10370
+ }),
10327
10371
  emailsTemplatesList: (e = {}, t = {}) => this.request({
10328
10372
  path: "/admin/emails/templates",
10329
10373
  method: "GET",
@@ -10449,6 +10493,15 @@ The error may be correlated with this previous error:
10449
10493
  type: "application/json",
10450
10494
  format: "json",
10451
10495
  ...r
10496
+ }),
10497
+ projectsOwnerUpdate: ({ id: e }, t, r = {}) => this.request({
10498
+ path: `/admin/projects/${e}/owner`,
10499
+ method: "PUT",
10500
+ body: t,
10501
+ secure: !0,
10502
+ type: "application/json",
10503
+ format: "json",
10504
+ ...r
10452
10505
  })
10453
10506
  };
10454
10507
  ai = {
@@ -10566,6 +10619,15 @@ The error may be correlated with this previous error:
10566
10619
  format: "json",
10567
10620
  ...e
10568
10621
  }),
10622
+ userPartialUpdate: (e, t = {}) => this.request({
10623
+ path: "/auth/user",
10624
+ method: "PATCH",
10625
+ body: e,
10626
+ secure: !0,
10627
+ type: "application/json",
10628
+ format: "json",
10629
+ ...t
10630
+ }),
10569
10631
  yandexCreate: (e, t = {}) => this.request({
10570
10632
  path: "/auth/yandex",
10571
10633
  method: "POST",
@@ -10875,11 +10937,12 @@ The error may be correlated with this previous error:
10875
10937
  format: "json",
10876
10938
  ...t
10877
10939
  }),
10878
- projectsDelete: ({ id: e }, t = {}) => this.request({
10940
+ projectsDelete: ({ id: e, ...t }, r = {}) => this.request({
10879
10941
  path: `/projects/${e}`,
10880
10942
  method: "DELETE",
10943
+ query: t,
10881
10944
  secure: !0,
10882
- ...t
10945
+ ...r
10883
10946
  }),
10884
10947
  projectsDetail: ({ id: e }, t = {}) => this.request({
10885
10948
  path: `/projects/${e}`,
@@ -11160,6 +11223,12 @@ The error may be correlated with this previous error:
11160
11223
  format: "json",
11161
11224
  ...r
11162
11225
  }),
11226
+ restoreCreate: ({ id: e }, t = {}) => this.request({
11227
+ path: `/projects/${e}/restore`,
11228
+ method: "POST",
11229
+ secure: !0,
11230
+ ...t
11231
+ }),
11163
11232
  settingsUpdate: ({ id: e }, t, r = {}) => this.request({
11164
11233
  path: `/projects/${e}/settings`,
11165
11234
  method: "PUT",
@@ -13041,6 +13110,7 @@ The error may be correlated with this previous error:
13041
13110
  optimizeSpamAssassinEnabled: !0,
13042
13111
  optimizeCheckCodeEnabled: !0,
13043
13112
  settingsEnabled: !0,
13113
+ settingsTabEnabled: !0,
13044
13114
  UTMEnabled: !0,
13045
13115
  annotationsEnabled: !0,
13046
13116
  subjectEnabled: !0,
@@ -13211,6 +13281,7 @@ The error may be correlated with this previous error:
13211
13281
  optimizeSpamAssassinEnabled: !0,
13212
13282
  optimizeCheckCodeEnabled: !0,
13213
13283
  settingsEnabled: !0,
13284
+ settingsTabEnabled: !0,
13214
13285
  UTMEnabled: !1,
13215
13286
  annotationsEnabled: !1,
13216
13287
  subjectEnabled: !0,
@@ -13380,6 +13451,7 @@ The error may be correlated with this previous error:
13380
13451
  optimizeSpamAssassinEnabled: !0,
13381
13452
  optimizeCheckCodeEnabled: !0,
13382
13453
  settingsEnabled: !0,
13454
+ settingsTabEnabled: !0,
13383
13455
  UTMEnabled: !1,
13384
13456
  annotationsEnabled: !1,
13385
13457
  subjectEnabled: !0,
@@ -13543,6 +13615,7 @@ The error may be correlated with this previous error:
13543
13615
  optimizeSpamAssassinEnabled: !0,
13544
13616
  optimizeCheckCodeEnabled: !0,
13545
13617
  settingsEnabled: !0,
13618
+ settingsTabEnabled: !0,
13546
13619
  UTMEnabled: !0,
13547
13620
  annotationsEnabled: !1,
13548
13621
  subjectEnabled: !0,
@@ -1,21 +1,21 @@
1
- __useblocks__.define("static/core/fc514220.js", [
1
+ __useblocks__.define("static/core/c013e7cc.js", [
2
2
  "require",
3
3
  "exports",
4
4
  "module",
5
5
  "static/core/df237243.js",
6
- "static/core/f2b0c97b2.js",
6
+ "static/core/9a1229572.js",
7
7
  "static/core/e199fd0a.js",
8
8
  "static/core/cf655a1a.js",
9
9
  "react",
10
10
  "antd",
11
11
  "react/jsx-runtime",
12
12
  "@ant-design/icons"
13
- ], function(R, le, ve) {
14
- const se = R("./df237243.js"), d = R("./f2b0c97b2.js"), z = R("./e199fd0a.js"), ce = R("./cf655a1a.js");
15
- let l = R("react");
13
+ ], function(x, le, ve) {
14
+ const se = x("./df237243.js"), d = x("./9a1229572.js"), z = x("./e199fd0a.js"), ce = x("./cf655a1a.js");
15
+ let l = x("react");
16
16
  l = se.__toESM(l);
17
- let U = R("antd"), w = R("react/jsx-runtime"), $ = R("@ant-design/icons");
18
- function fe(t, e, a, c, x, s) {
17
+ let M = x("antd"), w = x("react/jsx-runtime"), $ = x("@ant-design/icons");
18
+ function fe(t, e, a, c, R, s) {
19
19
  if (e.type === "linear") {
20
20
  let n = t.createLinearGradient(a + e.coords.x1, c + e.coords.y1, a + e.coords.x2, c + e.coords.y2);
21
21
  return e.colorStops.forEach((h) => n.addColorStop(h.offset, h.color)), n;
@@ -28,13 +28,13 @@ __useblocks__.define("static/core/fc514220.js", [
28
28
  }
29
29
  function de(t) {
30
30
  if (!this.backgroundColor) return;
31
- let e = this._getNonTransformedDimensions(), a = -e.x / 2, c = -e.y / 2, x = e.x, s = e.y, n = this.backgroundColor;
32
- if (typeof n == "string" || n instanceof CanvasGradient || n instanceof CanvasPattern) t.fillStyle = n, t.fillRect(a, c, x, s);
33
- else if (typeof n == "object" && "type" in n && (n.type === "linear" || n.type === "radial")) t.fillStyle = fe(t, n, a, c, x, s), t.fillRect(a, c, x, s);
31
+ let e = this._getNonTransformedDimensions(), a = -e.x / 2, c = -e.y / 2, R = e.x, s = e.y, n = this.backgroundColor;
32
+ if (typeof n == "string" || n instanceof CanvasGradient || n instanceof CanvasPattern) t.fillStyle = n, t.fillRect(a, c, R, s);
33
+ else if (typeof n == "object" && "type" in n && (n.type === "linear" || n.type === "radial")) t.fillStyle = fe(t, n, a, c, R, s), t.fillRect(a, c, R, s);
34
34
  else if ("source" in n && (n.source instanceof HTMLImageElement || n.source instanceof HTMLCanvasElement)) if (n.repeat) {
35
35
  let h = t.createPattern(n.source, n.repeat);
36
- h && (t.fillStyle = h, t.fillRect(a, c, x, s));
37
- } else t.drawImage(n.source, a, c, x, s);
36
+ h && (t.fillStyle = h, t.fillRect(a, c, R, s));
37
+ } else t.drawImage(n.source, a, c, R, s);
38
38
  this._removeShadow(t);
39
39
  }
40
40
  function ue(t) {
@@ -43,7 +43,7 @@ __useblocks__.define("static/core/fc514220.js", [
43
43
  a && a.name === "text" && (a._renderBackground = de);
44
44
  });
45
45
  }
46
- var H = "fm-pixie-editor", C = new class {
46
+ var H = "fm-pixie-editor", L = new class {
47
47
  constructor() {
48
48
  this._container = document.createElement("div"), this._instance = null, this._container.classList.add(H), this._container.style.width = "100%", this._container.style.height = "85vh", this._container.style.minHeight = "400px";
49
49
  }
@@ -88,27 +88,27 @@ __useblocks__.define("static/core/fc514220.js", [
88
88
  c.onload = () => e(c.result), c.onerror = () => a(c.error ?? Error("Failed to convert blob to data URL")), c.readAsDataURL(t);
89
89
  });
90
90
  }
91
- var he = ({ visible: t, onClose: e, file: a, onSave: c, onSaveCopy: x }) => {
92
- let { t: s } = d.Pn(), n = l.default.useRef(null), h = d.lr(), ye = d.qi(), { options: Y, actions: pe } = d.V(), { i18n: O } = d.Pn(), { config: u } = Y, { setCurrentMenuFile: Q } = pe, { getFileData: V, resolveFileForEditByUrl: X } = ye, [F, p] = l.default.useState(!1), [L, Z] = l.default.useState(null), [T, J] = l.default.useState(""), [S, K] = l.default.useState(!1), [q, P] = l.default.useState(!1), [o, A] = l.default.useState(null), j = l.default.useRef(!1), ee = l.default.useRef(void 0), te = l.default.useRef(void 0), ae = l.default.useRef("saveCopy"), M = l.default.useRef(void 0);
93
- ee.current = c, te.current = x, l.default.useEffect(() => {
91
+ var he = ({ visible: t, onClose: e, file: a, onSave: c, onSaveCopy: R }) => {
92
+ let { t: s } = d.zn(), n = l.default.useRef(null), h = d.mr(), ye = d.Qi(), { options: Q, actions: pe } = d.B(), { i18n: T } = d.zn(), { config: u } = Q, { setCurrentMenuFile: Y } = pe, { getFileData: V, resolveFileForEditByUrl: K } = ye, [F, p] = l.default.useState(!1), [C, X] = l.default.useState(null), [D, Z] = l.default.useState(""), [S, J] = l.default.useState(!1), [q, W] = l.default.useState(!1), [o, A] = l.default.useState(null), j = l.default.useRef(!1), ee = l.default.useRef(void 0), te = l.default.useRef(void 0), ae = l.default.useRef("saveCopy"), U = l.default.useRef(void 0);
93
+ ee.current = c, te.current = R, l.default.useEffect(() => {
94
94
  a && !j.current && (async () => {
95
- if (M.current !== a) {
95
+ if (U.current !== a) {
96
96
  if (typeof a == "object") {
97
97
  A(a);
98
98
  return;
99
99
  }
100
- M.current = a, p(!0);
100
+ U.current = a, p(!0);
101
101
  try {
102
102
  if (a.startsWith("data:")) A({
103
103
  thumbnail: a,
104
104
  saveWithoutFolder: !0
105
105
  });
106
106
  else {
107
- let i = await X(a);
108
- M.current === a && A(i);
107
+ let i = await K(a);
108
+ U.current === a && A(i);
109
109
  }
110
110
  } catch {
111
- M.current === a && (M.current = null), e?.();
111
+ U.current === a && (U.current = null), e?.();
112
112
  } finally {
113
113
  p(!1);
114
114
  }
@@ -117,7 +117,7 @@ __useblocks__.define("static/core/fc514220.js", [
117
117
  }, [
118
118
  a,
119
119
  e,
120
- X
120
+ K
121
121
  ]);
122
122
  let oe = l.default.useCallback(async (i) => {
123
123
  try {
@@ -133,7 +133,7 @@ __useblocks__.define("static/core/fc514220.js", [
133
133
  }
134
134
  }, [V, s]);
135
135
  l.default.useEffect(() => {
136
- if (!L && t && o) {
136
+ if (!C && t && o) {
137
137
  let i = !1;
138
138
  return (async () => {
139
139
  p(!0);
@@ -148,9 +148,9 @@ __useblocks__.define("static/core/fc514220.js", [
148
148
  if (m.length < 10) throw Error("Invalid image data: base64 content too short");
149
149
  if (!/^[A-Za-z0-9+/]+=*$/.test(m)) throw Error("Invalid image data: corrupted base64 content");
150
150
  if (!i) {
151
- Z(r);
152
- let v = d.Rr(o, "image/png");
153
- J(v.mimeType);
151
+ X(r);
152
+ let v = d.Ur(o, "image/png");
153
+ Z(v.mimeType);
154
154
  }
155
155
  } catch (r) {
156
156
  i || (h.error({
@@ -175,7 +175,7 @@ __useblocks__.define("static/core/fc514220.js", [
175
175
  }, [
176
176
  o,
177
177
  oe,
178
- L,
178
+ C,
179
179
  e,
180
180
  s,
181
181
  t
@@ -183,13 +183,13 @@ __useblocks__.define("static/core/fc514220.js", [
183
183
  let ie = l.default.useCallback(async (i, r, g) => {
184
184
  let f = await me(g, i), m = d.ae(f.type || `image/${g}`), v = u?.compessorUrl ?? u?.compressorUrl;
185
185
  if (m.startsWith("image/")) try {
186
- let _ = await d._i(new File([f], r, { type: m }), {
186
+ let _ = await d.Si(new File([f], r, { type: m }), {
187
187
  maxSizeMB: u?.compressMaxSize,
188
188
  maxWidthOrHeight: u?.compressMaxWidthOrHeight,
189
189
  mimeType: m,
190
190
  fileName: r,
191
191
  libURL: v,
192
- enableCompression: d.Hr(u, m)
192
+ enableCompression: d.qr(u, m)
193
193
  });
194
194
  f = _, m = _.type;
195
195
  } catch {}
@@ -198,13 +198,13 @@ __useblocks__.define("static/core/fc514220.js", [
198
198
  mimeType: m,
199
199
  thumbnailDataUrl: await ge(f)
200
200
  };
201
- }, [u]), D = l.default.useCallback(async (i, r, g, f) => {
201
+ }, [u]), N = l.default.useCallback(async (i, r, g, f) => {
202
202
  let m = f === "save" ? ee.current : te.current;
203
203
  if (!o || !m) return;
204
204
  let v = typeof o == "object" && o ? o : null, _ = null;
205
205
  try {
206
206
  p(!0);
207
- let { blob: E, mimeType: b, thumbnailDataUrl: k } = await ie(i, r, g), B = {
207
+ let { blob: E, mimeType: b, thumbnailDataUrl: k } = await ie(i, r, g), I = {
208
208
  ...o,
209
209
  thumbnail: k,
210
210
  size: E.size,
@@ -214,22 +214,22 @@ __useblocks__.define("static/core/fc514220.js", [
214
214
  name: o.name || r,
215
215
  extension: o.extension || (o.name || r).split(".").pop()?.toLowerCase() || ""
216
216
  };
217
- _ = B;
218
- let N = await m(B, {
217
+ _ = I;
218
+ let O = await m(I, {
219
219
  blob: E,
220
220
  mimeType: b,
221
221
  thumbnail: k,
222
222
  mode: f
223
223
  });
224
- if (N) return p(!1), N;
224
+ if (O) return p(!1), O;
225
225
  throw Error(s(f === "saveCopy" ? "Failed to save image copy" : "Failed to save changes"));
226
226
  } catch (E) {
227
227
  let b = _ ?? v;
228
228
  if (!E?.notificationShown) {
229
- let k = d.W(E), B = d.H(k?.code, s) ?? k?.message ?? s(f === "saveCopy" ? "Failed to save image copy" : "Error saving image");
229
+ let k = d.W(E), I = d.H(k?.code, s) ?? k?.message ?? s(f === "saveCopy" ? "Failed to save image copy" : "Error saving image");
230
230
  h.error({
231
231
  id: f === "saveCopy" ? "IMAGE_SAVE_COPY_FAILED" : "IMAGE_SAVE_FAILED",
232
- message: B,
232
+ message: I,
233
233
  placement: "bottomRight",
234
234
  data: {
235
235
  itemId: b?.id ?? void 0,
@@ -248,35 +248,35 @@ __useblocks__.define("static/core/fc514220.js", [
248
248
  ie,
249
249
  s
250
250
  ]), re = l.default.useCallback(async (i) => {
251
- if (!C.isLoaded() || !o) return;
251
+ if (!L.isLoaded() || !o) return;
252
252
  ae.current = i;
253
- let r = o.name || "edited-image", g = d.Rr(o, T);
253
+ let r = o.name || "edited-image", g = d.Ur(o, D);
254
254
  try {
255
- await C.tools?.export.save(r.replace(/\.[^/.]+$/, ""), g.pixieFormat, d.zr.QUALITY);
255
+ await L.tools?.export.save(r.replace(/\.[^/.]+$/, ""), g.pixieFormat, d.Wr.QUALITY);
256
256
  } catch {
257
257
  try {
258
- let m = C.canvas, v = m ? m.toDataURL(g.mimeType) : null;
259
- v && await D(v, r, g.extension, i);
258
+ let m = L.canvas, v = m ? m.toDataURL(g.mimeType) : null;
259
+ v && await N(v, r, g.extension, i);
260
260
  } catch {}
261
261
  }
262
262
  }, [
263
263
  o,
264
- T,
265
- D
264
+ D,
265
+ N
266
266
  ]), ne = l.default.useCallback(async () => {
267
- if (!(!L || !t || !S || j.current)) try {
267
+ if (!(!C || !t || !S || j.current)) try {
268
268
  j.current = !0;
269
269
  let i = n.current, r = 0;
270
270
  for (; r < 20 && (i.clientWidth === 0 || i.clientHeight === 0);) await new Promise((y) => setTimeout(y, 50)), r++;
271
- let g = u?.locale ? u?.locale.replace("_", "-") : "en", f = matchMedia("(prefers-color-scheme: dark)").matches ? d.C : d.S, m = u?.theme === "system" ? f : u?.theme, v = (u?.locale || O.language || "en").split("-")[0].split("_")[0], _ = (O.getResourceBundle(v, "translation") || {}).pixie || {}, E = (y) => y.split(" ").map((I) => I.charAt(0).toUpperCase() + I.slice(1).toLowerCase()).join(" "), b = {};
272
- Object.entries(_).forEach(([y, I]) => {
273
- let W = E(y);
274
- b[W] = I, b[y] = I;
271
+ let g = u?.locale ? u?.locale.replace("_", "-") : "en", f = matchMedia("(prefers-color-scheme: dark)").matches ? d.C : d.S, m = u?.theme === "system" ? f : u?.theme, v = (u?.locale || T.language || "en").split("-")[0].split("_")[0], _ = (T.getResourceBundle(v, "translation") || {}).pixie || {}, E = (y) => y.split(" ").map((B) => B.charAt(0).toUpperCase() + B.slice(1).toLowerCase()).join(" "), b = {};
272
+ Object.entries(_).forEach(([y, B]) => {
273
+ let P = E(y);
274
+ b[P] = B, b[y] = B;
275
275
  });
276
- let k = { [g]: b }, B = d.Rr(o, T), N = {
276
+ let k = { [g]: b }, I = d.Ur(o, D), O = {
277
277
  selector: "#pixie-editor",
278
278
  baseUrl: z.o(u?.baseUrl || "", u?.assetsUrl || "assets/image-editor"),
279
- image: L,
279
+ image: C,
280
280
  activeLanguage: g,
281
281
  languages: k,
282
282
  ui: {
@@ -319,8 +319,8 @@ __useblocks__.define("static/core/fc514220.js", [
319
319
  },
320
320
  tools: {
321
321
  export: {
322
- defaultFormat: B.pixieFormat,
323
- defaultQuality: d.zr.QUALITY,
322
+ defaultFormat: I.pixieFormat,
323
+ defaultQuality: d.Wr.QUALITY,
324
324
  defaultName: o?.name?.replace(/\.[^/.]+$/, "") || "image"
325
325
  },
326
326
  text: {
@@ -442,18 +442,18 @@ __useblocks__.define("static/core/fc514220.js", [
442
442
  ]
443
443
  }
444
444
  },
445
- onSave: async function(y, I, W) {
445
+ onSave: async function(y, B, P) {
446
446
  try {
447
- return p(!0), await D(y, I, W, ae.current);
447
+ return p(!0), await N(y, B, P, ae.current);
448
448
  } catch (we) {
449
449
  throw p(!1), we;
450
450
  }
451
451
  }
452
452
  };
453
453
  try {
454
- P(!1), await C.show(N, n.current);
455
- let y = C.canvas;
456
- y && y.focus(), P(!0), p(!1);
454
+ W(!1), await L.show(O, n.current);
455
+ let y = L.canvas;
456
+ y && y.focus(), W(!0), p(!1);
457
457
  } catch {}
458
458
  } catch (i) {
459
459
  h.error({
@@ -465,8 +465,8 @@ __useblocks__.define("static/core/fc514220.js", [
465
465
  }
466
466
  }, [
467
467
  o,
468
- T,
469
- L,
468
+ D,
469
+ C,
470
470
  t,
471
471
  S,
472
472
  u?.locale,
@@ -474,41 +474,41 @@ __useblocks__.define("static/core/fc514220.js", [
474
474
  u?.baseUrl,
475
475
  u?.assetsUrl,
476
476
  e,
477
- D,
477
+ N,
478
478
  h,
479
- O,
479
+ T,
480
480
  s
481
481
  ]);
482
482
  l.default.useEffect(() => {
483
- t && L && S && ne();
483
+ t && C && S && ne();
484
484
  }, [
485
485
  t,
486
- L,
486
+ C,
487
487
  S,
488
488
  ne
489
489
  ]), l.default.useEffect(() => {
490
490
  if (!t) {
491
491
  try {
492
- C.close();
492
+ L.close();
493
493
  } catch {}
494
- p(!1), Z(null), J(""), j.current = !1, K(!1), P(!1);
494
+ p(!1), X(null), Z(""), j.current = !1, J(!1), W(!1);
495
495
  }
496
496
  return () => {
497
497
  try {
498
- C.close();
498
+ L.close();
499
499
  } catch {}
500
500
  };
501
501
  }, [t]);
502
502
  let be = !!o?.id && u?.features?.enableUpdateFile !== !1;
503
- return (0, w.jsx)(U.Modal, {
503
+ return (0, w.jsx)(M.Modal, {
504
504
  title: o?.name ? s("Editing: {{name}}", { name: o.name }) : s("Editing image"),
505
505
  open: t,
506
506
  closeIcon: null,
507
507
  onCancel: e,
508
- afterOpenChange: (i) => K(i),
508
+ afterOpenChange: (i) => J(i),
509
509
  forceRender: !0,
510
510
  width: "100vw",
511
- getContainer: Y.getModalContainer,
511
+ getContainer: Q.getModalContainer,
512
512
  style: {
513
513
  top: 0,
514
514
  height: "100vh",
@@ -520,18 +520,18 @@ __useblocks__.define("static/core/fc514220.js", [
520
520
  padding: 0
521
521
  } },
522
522
  footer: [
523
- (0, w.jsx)(U.Button, {
523
+ (0, w.jsx)(M.Button, {
524
524
  onClick: e,
525
525
  disabled: !S || F,
526
526
  children: s("Cancel")
527
527
  }, "cancel"),
528
- (0, w.jsx)(U.Button, {
528
+ (0, w.jsx)(M.Button, {
529
529
  type: "primary",
530
530
  onClick: () => re("saveCopy"),
531
531
  loading: F,
532
532
  children: s("Save as copy and choose")
533
533
  }, "save-copy"),
534
- ...be ? [(0, w.jsx)(U.Button, {
534
+ ...be ? [(0, w.jsx)(M.Button, {
535
535
  type: "primary",
536
536
  onClick: () => re("save"),
537
537
  loading: F,
@@ -541,7 +541,7 @@ __useblocks__.define("static/core/fc514220.js", [
541
541
  mask: { closable: !1 },
542
542
  destroyOnHidden: !1,
543
543
  afterClose: () => {
544
- Q && Q("");
544
+ Y && Y("");
545
545
  },
546
546
  children: (0, w.jsxs)("div", {
547
547
  ref: n,