@templatical/editor 0.27.0 → 0.27.1

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 (133) hide show
  1. package/dist/{AiFeatureMenu-DvrK-dzj.js → AiFeatureMenu-DrLGc2H2.js} +1 -1
  2. package/dist/{BlockPreviewCanvas-GZbr0ph5.js → BlockPreviewCanvas-2WASf5A4.js} +1 -1
  3. package/dist/{CloudHeaderExtras-Cx8gFWu2.js → CloudHeaderExtras-DWApyc4P.js} +1 -1
  4. package/dist/{CloudPanels-D0X449DD.js → CloudPanels-DvOhGdRj.js} +6 -1
  5. package/dist/{CollaboratorBar-DMSWCrX3.js → CollaboratorBar-C6MC0UCk.js} +1 -1
  6. package/dist/{ColorPicker-DCjFQCAg.js → ColorPicker-Di8L5TLQ.js} +1 -1
  7. package/dist/{CountdownToolbar-CSftc9Ma.js → CountdownToolbar-d9QM4m5x.js} +3 -3
  8. package/dist/{NumberWithSuffix-DdPCXfKf.js → NumberWithSuffix-D9mPtMJB.js} +1 -1
  9. package/dist/{ParagraphEditor-vDU-5y6r.js → ParagraphEditor-iwTjkjtx.js} +4 -4
  10. package/dist/{RestoreVersionDialog-DIn1muFD.js → RestoreVersionDialog-DyMPGfsr.js} +2 -2
  11. package/dist/{RichTextEditorContent-I83k5DtQ.js → RichTextEditorContent-BVXG9oF4.js} +1 -1
  12. package/dist/{SaveBlockDialog-C_QvYAeL.js → SaveBlockDialog-BMCAIfK9.js} +4 -4
  13. package/dist/{SavedBlocksBrowserModal-CefWWcdT.js → SavedBlocksBrowserModal-p5ma1qay.js} +5 -5
  14. package/dist/{SavedBlocksPanels-DnQwO-7O.js → SavedBlocksPanels-BsiSstsZ.js} +1 -1
  15. package/dist/{SavedBlocksPickBar-BsFubArH.js → SavedBlocksPickBar-fU4Mjm-8.js} +1 -1
  16. package/dist/{TestEmailModal-STPWDP79.js → TestEmailModal-EFYcrmTk.js} +4 -4
  17. package/dist/{TestEmailPanel-HYVjApKZ.js → TestEmailPanel-ljriUqs1.js} +1 -1
  18. package/dist/{TitleEditor-DnB0EJ_g.js → TitleEditor-BqRW7HTz.js} +2 -2
  19. package/dist/{TplModal-chvLhXmC.js → TplModal-CTC9-w6B.js} +1 -1
  20. package/dist/{VersionHistoryPanels-D7k_F7-9.js → VersionHistoryPanels-GkxkBiSi.js} +1 -1
  21. package/dist/{VersionPreviewBanner-DthyHe6C.js → VersionPreviewBanner-BdtTu9mI.js} +1 -1
  22. package/dist/{blockTypeIcons-B8r4jMBn.js → blockTypeIcons-CIrMr1SJ.js} +1 -1
  23. package/dist/bundle-stats.json +6 -6
  24. package/dist/{ca-Cqg9O8mx.js → ca-CEuJ6IRr.js} +4 -100
  25. package/dist/cdn/chunks/{AiFeatureMenu-Dyh7mUMB.js → AiFeatureMenu-BQz9Kczt.js} +2 -2
  26. package/dist/cdn/chunks/{AiFeatureMenu-Dyh7mUMB.js.map → AiFeatureMenu-BQz9Kczt.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockPreviewCanvas-DStQFo9P.js → BlockPreviewCanvas-40ocpXDD.js} +2 -2
  28. package/dist/cdn/chunks/{BlockPreviewCanvas-DStQFo9P.js.map → BlockPreviewCanvas-40ocpXDD.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudHeaderExtras-BZVu7dnO.js → CloudHeaderExtras-F_ySlW1S.js} +2 -2
  30. package/dist/cdn/chunks/{CloudHeaderExtras-BZVu7dnO.js.map → CloudHeaderExtras-F_ySlW1S.js.map} +1 -1
  31. package/dist/cdn/chunks/{CloudPanels-CXbaBKHQ.js → CloudPanels-C34bcHpc.js} +8 -3
  32. package/dist/cdn/chunks/{CloudPanels-CXbaBKHQ.js.map → CloudPanels-C34bcHpc.js.map} +1 -1
  33. package/dist/cdn/chunks/{CollaboratorBar-BH_lZlat.js → CollaboratorBar-WBtrPPnM.js} +2 -2
  34. package/dist/cdn/chunks/{CollaboratorBar-BH_lZlat.js.map → CollaboratorBar-WBtrPPnM.js.map} +1 -1
  35. package/dist/cdn/chunks/{ColorPicker-CStXen0Y.js → ColorPicker-CxKYd_8N.js} +2 -2
  36. package/dist/cdn/chunks/{ColorPicker-CStXen0Y.js.map → ColorPicker-CxKYd_8N.js.map} +1 -1
  37. package/dist/cdn/chunks/{CountdownToolbar-CZPtQIb8.js → CountdownToolbar-pVbkPNVo.js} +4 -4
  38. package/dist/cdn/chunks/{CountdownToolbar-CZPtQIb8.js.map → CountdownToolbar-pVbkPNVo.js.map} +1 -1
  39. package/dist/cdn/chunks/MergeTagSuggestion-DhllqTA3.js.map +1 -1
  40. package/dist/cdn/chunks/{NumberWithSuffix-yeQLcCyH.js → NumberWithSuffix-mm6AfIv4.js} +2 -2
  41. package/dist/cdn/chunks/{NumberWithSuffix-yeQLcCyH.js.map → NumberWithSuffix-mm6AfIv4.js.map} +1 -1
  42. package/dist/cdn/chunks/{ParagraphEditor-BJJ925sx.js → ParagraphEditor-BBcIQQK2.js} +5 -5
  43. package/dist/cdn/chunks/ParagraphEditor-BBcIQQK2.js.map +1 -0
  44. package/dist/cdn/chunks/{RestoreVersionDialog-B0Jadu6F.js → RestoreVersionDialog-DNUZHFa_.js} +3 -3
  45. package/dist/cdn/chunks/{RestoreVersionDialog-B0Jadu6F.js.map → RestoreVersionDialog-DNUZHFa_.js.map} +1 -1
  46. package/dist/cdn/chunks/{RichTextEditorContent-CfSq2wPR.js → RichTextEditorContent-Cl-acKAD.js} +2 -2
  47. package/dist/cdn/chunks/{RichTextEditorContent-CfSq2wPR.js.map → RichTextEditorContent-Cl-acKAD.js.map} +1 -1
  48. package/dist/cdn/chunks/{SaveBlockDialog-C1DXh6P9.js → SaveBlockDialog-BXTZ729e.js} +5 -5
  49. package/dist/cdn/chunks/{SaveBlockDialog-C1DXh6P9.js.map → SaveBlockDialog-BXTZ729e.js.map} +1 -1
  50. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BerMxAUt.js → SavedBlocksBrowserModal-BqGNBpRR.js} +5 -5
  51. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BerMxAUt.js.map → SavedBlocksBrowserModal-BqGNBpRR.js.map} +1 -1
  52. package/dist/cdn/chunks/{SavedBlocksPanels-BUE4lzVP.js → SavedBlocksPanels-nbK0UQTp.js} +2 -2
  53. package/dist/cdn/chunks/{SavedBlocksPanels-BUE4lzVP.js.map → SavedBlocksPanels-nbK0UQTp.js.map} +1 -1
  54. package/dist/cdn/chunks/{SavedBlocksPickBar-4HrqQfvl.js → SavedBlocksPickBar-B9mbw3Gk.js} +2 -2
  55. package/dist/cdn/chunks/{SavedBlocksPickBar-4HrqQfvl.js.map → SavedBlocksPickBar-B9mbw3Gk.js.map} +1 -1
  56. package/dist/cdn/chunks/{TestEmailModal-yfmFiavR.js → TestEmailModal-DE6fi3he.js} +5 -5
  57. package/dist/cdn/chunks/{TestEmailModal-yfmFiavR.js.map → TestEmailModal-DE6fi3he.js.map} +1 -1
  58. package/dist/cdn/chunks/{TestEmailPanel-DqTDh5ri.js → TestEmailPanel-CAjQDXle.js} +2 -2
  59. package/dist/cdn/chunks/{TestEmailPanel-DqTDh5ri.js.map → TestEmailPanel-CAjQDXle.js.map} +1 -1
  60. package/dist/cdn/chunks/{TitleEditor-nUAF7fKr.js → TitleEditor-BP0ewaWF.js} +3 -3
  61. package/dist/cdn/chunks/{TitleEditor-nUAF7fKr.js.map → TitleEditor-BP0ewaWF.js.map} +1 -1
  62. package/dist/cdn/chunks/{TplModal-C0IqikoV.js → TplModal-C4kJduTr.js} +2 -2
  63. package/dist/cdn/chunks/{TplModal-C0IqikoV.js.map → TplModal-C4kJduTr.js.map} +1 -1
  64. package/dist/cdn/chunks/{VersionHistoryPanels-6Hz9w20W.js → VersionHistoryPanels-DMq2PRee.js} +2 -2
  65. package/dist/cdn/chunks/{VersionHistoryPanels-6Hz9w20W.js.map → VersionHistoryPanels-DMq2PRee.js.map} +1 -1
  66. package/dist/cdn/chunks/{VersionPreviewBanner-D098_6_I.js → VersionPreviewBanner-04CL1SGY.js} +2 -2
  67. package/dist/cdn/chunks/{VersionPreviewBanner-D098_6_I.js.map → VersionPreviewBanner-04CL1SGY.js.map} +1 -1
  68. package/dist/cdn/chunks/{ca-Cqg9O8mx.js → ca-CEuJ6IRr.js} +5 -101
  69. package/dist/cdn/chunks/ca-CEuJ6IRr.js.map +1 -0
  70. package/dist/cdn/chunks/cloud-BA0OpRh-.js.map +1 -1
  71. package/dist/cdn/chunks/{createCloudRuntime-DmzV7OnU.js → createCloudRuntime-gXA8_QRU.js} +2 -2
  72. package/dist/cdn/chunks/{createCloudRuntime-DmzV7OnU.js.map → createCloudRuntime-gXA8_QRU.js.map} +1 -1
  73. package/dist/{de-Dbwm2cON.js → cdn/chunks/de-BytZwgn6.js} +3 -34
  74. package/dist/cdn/chunks/de-BytZwgn6.js.map +1 -0
  75. package/dist/{de-BXmeeFbX.js → cdn/chunks/de-aRxhZF_K.js} +6 -100
  76. package/dist/cdn/chunks/de-aRxhZF_K.js.map +1 -0
  77. package/dist/cdn/chunks/{en-DE_y1YWU.js → en-BCgVx9zM.js} +4 -3
  78. package/dist/cdn/chunks/{en-DE_y1YWU.js.map → en-BCgVx9zM.js.map} +1 -1
  79. package/dist/{en-DbBNy67B.js → cdn/chunks/en-BX4V_7YO.js} +6 -100
  80. package/dist/cdn/chunks/en-BX4V_7YO.js.map +1 -0
  81. package/dist/{en-Dzw4EqNI.js → cdn/chunks/en-DyOSV0lY.js} +3 -34
  82. package/dist/cdn/chunks/en-DyOSV0lY.js.map +1 -0
  83. package/dist/{es-JUsAjxWu.js → cdn/chunks/es-CA9uQ-5x.js} +6 -100
  84. package/dist/cdn/chunks/es-CA9uQ-5x.js.map +1 -0
  85. package/dist/{fr-J3qgXH4h.js → cdn/chunks/fr-iBuE60Ap.js} +6 -100
  86. package/dist/cdn/chunks/fr-iBuE60Ap.js.map +1 -0
  87. package/dist/cdn/chunks/keys-CbQuRX85.js.map +1 -1
  88. package/dist/{nl-D_4DkqOi.js → cdn/chunks/nl-Btw4ojNo.js} +6 -100
  89. package/dist/cdn/chunks/nl-Btw4ojNo.js.map +1 -0
  90. package/dist/{pt-BR-BxzQzWGJ.js → cdn/chunks/pt-BR-C1WLSGDh.js} +3 -34
  91. package/dist/cdn/chunks/pt-BR-C1WLSGDh.js.map +1 -0
  92. package/dist/{pt-BR-KGURyEEQ.js → cdn/chunks/pt-BR-GjVsCqbN.js} +6 -100
  93. package/dist/cdn/chunks/pt-BR-GjVsCqbN.js.map +1 -0
  94. package/dist/cdn/chunks/src-B_QJduQD.js.map +1 -1
  95. package/dist/cdn/chunks/{src-Dq3fgSIx.js → src-CoHDh8Ua.js} +777 -765
  96. package/dist/cdn/chunks/src-CoHDh8Ua.js.map +1 -0
  97. package/dist/cdn/chunks/{src-BOjFLNf7.js → src-Ct4Fsx3t.js} +2 -2
  98. package/dist/cdn/chunks/{src-BOjFLNf7.js.map → src-Ct4Fsx3t.js.map} +1 -1
  99. package/dist/cdn/chunks/{styleConstants-ByDqaYj_.js → styleConstants-9oK5kn21.js} +2 -4
  100. package/dist/cdn/chunks/{styleConstants-ByDqaYj_.js.map → styleConstants-9oK5kn21.js.map} +1 -1
  101. package/dist/cdn/chunks/{useEditorCore-CTu_qZ3W.js → useEditorCore-DC8gmfs6.js} +3 -3
  102. package/dist/cdn/chunks/useEditorCore-DC8gmfs6.js.map +1 -0
  103. package/dist/cdn/chunks/usePopoverPosition-BC-HA7TK.js.map +1 -1
  104. package/dist/cdn/editor.css +1 -1
  105. package/dist/cdn/editor.js +458 -442
  106. package/dist/cdn/editor.js.map +1 -1
  107. package/dist/{cdn/chunks/de-Dbwm2cON.js → de-BytZwgn6.js} +1 -36
  108. package/dist/{cdn/chunks/de-BXmeeFbX.js → de-aRxhZF_K.js} +4 -102
  109. package/dist/{cdn/chunks/en-DbBNy67B.js → en-BX4V_7YO.js} +4 -102
  110. package/dist/{cdn/chunks/en-Dzw4EqNI.js → en-DyOSV0lY.js} +1 -36
  111. package/dist/{cdn/chunks/es-JUsAjxWu.js → es-CA9uQ-5x.js} +4 -102
  112. package/dist/{cdn/chunks/fr-J3qgXH4h.js → fr-iBuE60Ap.js} +4 -102
  113. package/dist/{cdn/chunks/nl-D_4DkqOi.js → nl-Btw4ojNo.js} +4 -102
  114. package/dist/{cdn/chunks/pt-BR-BxzQzWGJ.js → pt-BR-C1WLSGDh.js} +1 -36
  115. package/dist/{cdn/chunks/pt-BR-KGURyEEQ.js → pt-BR-GjVsCqbN.js} +4 -102
  116. package/dist/style.css +1 -1
  117. package/dist/{styleConstants-ByDqaYj_.js → styleConstants-9oK5kn21.js} +1 -3
  118. package/dist/templatical-editor.js +458 -442
  119. package/dist/{useEditorCore-B-kONNRw.js → useEditorCore-CFLzobo_.js} +2 -2
  120. package/package.json +8 -8
  121. package/dist/cdn/chunks/ParagraphEditor-BJJ925sx.js.map +0 -1
  122. package/dist/cdn/chunks/ca-Cqg9O8mx.js.map +0 -1
  123. package/dist/cdn/chunks/de-BXmeeFbX.js.map +0 -1
  124. package/dist/cdn/chunks/de-Dbwm2cON.js.map +0 -1
  125. package/dist/cdn/chunks/en-DbBNy67B.js.map +0 -1
  126. package/dist/cdn/chunks/en-Dzw4EqNI.js.map +0 -1
  127. package/dist/cdn/chunks/es-JUsAjxWu.js.map +0 -1
  128. package/dist/cdn/chunks/fr-J3qgXH4h.js.map +0 -1
  129. package/dist/cdn/chunks/nl-D_4DkqOi.js.map +0 -1
  130. package/dist/cdn/chunks/pt-BR-BxzQzWGJ.js.map +0 -1
  131. package/dist/cdn/chunks/pt-BR-KGURyEEQ.js.map +0 -1
  132. package/dist/cdn/chunks/src-Dq3fgSIx.js.map +0 -1
  133. package/dist/cdn/chunks/useEditorCore-CTu_qZ3W.js.map +0 -1
@@ -4,8 +4,9 @@ import { a as te, n as ne, o as re, r as ie, s as I, t as ae } from "./dist-CM8T
4
4
  import { C as oe, Et as se, J as ce, K as le, Lt as ue, N as de, Pt as fe, U as pe, at as me, bt as he, ct as ge, d as _e, gt as ve, it as ye, n as be, s as xe, yt as Se, z as Ce } from "./icons-C36Ha5VU.js";
5
5
  import { t as we } from "./_plugin-vue_export-helper-B3ysoDQm.js";
6
6
  import { C as L, S as R, T as Te, x as Ee } from "./cloud-BA0OpRh-.js";
7
+ import { t as De } from "./en-BCgVx9zM.js";
7
8
  //#region ../media-library/src/api-client.ts
8
- var De = class {
9
+ var Oe = class {
9
10
  authManager;
10
11
  constructor(e) {
11
12
  this.authManager = e;
@@ -162,9 +163,9 @@ var De = class {
162
163
  };
163
164
  //#endregion
164
165
  //#region ../media-library/src/composable.ts
165
- function Oe(e) {
166
+ function ke(e) {
166
167
  if (!e.projectId) throw Error("projectId is required for useMediaLibrary");
167
- let t = new De(e.authManager), n = l([]), r = l([]), i = l(null), a = l("files"), o = l(""), s = l(null), c = l("newest"), u = l(!1), d = l(!1), f = l(!1), p = l(null), m = l(null), h = l(/* @__PURE__ */ new Set()), g = l(null), _ = l([]), v = l({}), y = l(!1), b = l([]), x = l(!1), S = l(null), C = l(!1), w = l(null), T = l(!1), E = l(null), D = l(null), O = 0;
168
+ let t = new Oe(e.authManager), n = l([]), r = l([]), i = l(null), a = l("files"), o = l(""), s = l(null), c = l("newest"), u = l(!1), d = l(!1), f = l(!1), p = l(null), m = l(null), h = l(/* @__PURE__ */ new Set()), g = l(null), _ = l([]), v = l({}), y = l(!1), b = l([]), x = l(!1), S = l(null), C = l(!1), w = l(null), T = l(!1), E = l(null), D = l(null), O = 0;
168
169
  async function k() {
169
170
  let r = ++O;
170
171
  u.value = !0;
@@ -458,9 +459,12 @@ function Oe(e) {
458
459
  };
459
460
  }
460
461
  //#endregion
462
+ //#region ../media-library/src/keys.ts
463
+ var Ae = Symbol("templaticalMediaPlanConfig"), je = Symbol("templaticalMediaPopoverTarget"), Me = Symbol("templaticalMediaTranslations"), Ne = Symbol("templaticalMediaUiTheme");
464
+ //#endregion
461
465
  //#region ../media-library/src/composables/useI18n.ts
462
466
  function z(e) {
463
- let n = e ?? t("translations"), r = k(n) ? n.value : n;
467
+ let n = e ?? t(Me, null), r = (k(n) ? n.value : n) ?? De;
464
468
  function i(e, t) {
465
469
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
466
470
  }
@@ -471,14 +475,14 @@ function z(e) {
471
475
  }
472
476
  //#endregion
473
477
  //#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
474
- var ke = {
478
+ var Pe = {
475
479
  key: 0,
476
480
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
477
481
  style: { color: "var(--tpl-text-muted)" }
478
- }, Ae = ["onClick"], je = {
482
+ }, Fe = ["onClick"], Ie = {
479
483
  key: 1,
480
484
  style: { color: "var(--tpl-text)" }
481
- }, Me = /* @__PURE__ */ d({
485
+ }, Le = /* @__PURE__ */ d({
482
486
  __name: "MediaBreadcrumb",
483
487
  props: {
484
488
  folders: {},
@@ -498,7 +502,7 @@ var ke = {
498
502
  }
499
503
  return !1;
500
504
  }
501
- return (e, t) => s.value.length > 0 ? (o(), y("div", ke, [O("button", {
505
+ return (e, t) => s.value.length > 0 ? (o(), y("div", Pe, [O("button", {
502
506
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
503
507
  style: { color: "var(--tpl-primary)" },
504
508
  onClick: t[0] ||= (e) => i("navigate", null)
@@ -510,47 +514,47 @@ var ke = {
510
514
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
511
515
  style: { color: "var(--tpl-primary)" },
512
516
  onClick: (t) => i("navigate", e.id)
513
- }, N(e.name), 9, Ae)) : (o(), y("span", je, N(e.name), 1))], 64))), 128))])) : b("", !0);
517
+ }, N(e.name), 9, Fe)) : (o(), y("span", Ie, N(e.name), 1))], 64))), 128))])) : b("", !0);
514
518
  }
515
- }), Ne = Symbol("templaticalMediaPlanConfig"), Pe = Symbol("templaticalMediaPopoverTarget");
519
+ });
516
520
  //#endregion
517
521
  //#region ../media-library/src/composables/useMediaCategories.ts
518
- function Fe() {
519
- let e = t(Ne, null);
520
- if (!e) throw Error("[Templatical] useMediaCategories() needs a plan config in scope. Render it under <MediaLibraryModal> (pass its `planConfig` prop) or provide PLAN_CONFIG_KEY yourself.");
521
- let n = v(() => e.config.value?.media ?? null), r = v(() => n.value?.use_media_library ?? !0), i = v(() => n.value?.categories ?? null), a = v(() => i.value ? Object.values(i.value).flatMap((e) => e.mime_types) : []), o = v(() => a.value.join(",")), s = v(() => n.value?.max_file_size ?? 0);
522
- function c(e, t) {
523
- return i.value ? !t || t.length === 0 ? a.value.includes(e) : t.some((t) => i.value[t]?.mime_types.includes(e)) : !1;
524
- }
525
- function l(e) {
526
- return i.value ? i.value.images?.mime_types.includes(e) ?? !1 : !1;
522
+ function Re(e) {
523
+ let n = e ?? t(Ae, null);
524
+ if (!n) throw Error("[Templatical] useMediaCategories() needs a plan config in scope. Render it under <MediaLibraryModal> (pass its `planConfig` prop) or provide PLAN_CONFIG_KEY yourself.");
525
+ let r = v(() => n.config.value?.media ?? null), i = v(() => r.value?.use_media_library ?? !0), a = v(() => r.value?.categories ?? null), o = v(() => a.value ? Object.values(a.value).flatMap((e) => e.mime_types) : []), s = v(() => o.value.join(",")), c = v(() => r.value?.max_file_size ?? 0);
526
+ function l(e, t) {
527
+ return a.value ? !t || t.length === 0 ? o.value.includes(e) : t.some((t) => a.value[t]?.mime_types.includes(e)) : !1;
527
528
  }
528
529
  function u(e) {
529
- if (!i.value) return null;
530
- for (let [t, n] of Object.entries(i.value)) if (n.mime_types.includes(e)) return t;
530
+ return a.value ? a.value.images?.mime_types.includes(e) ?? !1 : !1;
531
+ }
532
+ function d(e) {
533
+ if (!a.value) return null;
534
+ for (let [t, n] of Object.entries(a.value)) if (n.mime_types.includes(e)) return t;
531
535
  return null;
532
536
  }
533
537
  return {
534
- isMediaLibraryEnabled: r,
535
- allAcceptedMimeTypes: a,
536
- allAcceptedInputString: o,
537
- maxFileSize: s,
538
- availableCategories: v(() => i.value ? Object.keys(i.value) : []),
539
- isAcceptedMimeType: c,
540
- isImageMimeType: l,
541
- getCategoryForMimeType: u
538
+ isMediaLibraryEnabled: i,
539
+ allAcceptedMimeTypes: o,
540
+ allAcceptedInputString: s,
541
+ maxFileSize: c,
542
+ availableCategories: v(() => a.value ? Object.keys(a.value) : []),
543
+ isAcceptedMimeType: l,
544
+ isImageMimeType: u,
545
+ getCategoryForMimeType: d
542
546
  };
543
547
  }
544
548
  //#endregion
545
549
  //#region ../media-library/src/composables/useImageCrop.ts
546
- var Ie = {
550
+ var ze = {
547
551
  free: void 0,
548
552
  square: 1,
549
553
  landscape43: 4 / 3,
550
554
  landscape169: 16 / 9,
551
555
  original: void 0
552
556
  };
553
- function Le(e) {
557
+ function Be(e) {
554
558
  return e === "image/png" || e === "image/gif" ? {
555
559
  mimeType: "image/png",
556
560
  quality: 1
@@ -562,7 +566,7 @@ function Le(e) {
562
566
  quality: .92
563
567
  };
564
568
  }
565
- function Re(e, t, n) {
569
+ function Ve(e, t, n) {
566
570
  let r = e.width, i = e.height;
567
571
  if (!t && !n) return e;
568
572
  let a = r, o = i;
@@ -576,7 +580,7 @@ function Re(e, t, n) {
576
580
  let c = s.getContext("2d");
577
581
  return c && (c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(e, 0, 0, a, o)), s;
578
582
  }
579
- function ze(e, t, n) {
583
+ function He(e, t, n) {
580
584
  return new Promise((r, i) => {
581
585
  e.toBlob((e) => {
582
586
  if (!e) {
@@ -588,7 +592,7 @@ function ze(e, t, n) {
588
592
  }, n.mimeType, n.quality);
589
593
  });
590
594
  }
591
- function Be(e, t, n, r) {
595
+ function Ue(e, t, n, r) {
592
596
  let i = e, a = t;
593
597
  if (n && i > n) {
594
598
  let e = n / i;
@@ -605,7 +609,7 @@ function Be(e, t, n, r) {
605
609
  }
606
610
  //#endregion
607
611
  //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.41_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
608
- function Ve(e, t) {
612
+ function We(e, t) {
609
613
  var n = Object.keys(e);
610
614
  if (Object.getOwnPropertySymbols) {
611
615
  var r = Object.getOwnPropertySymbols(e);
@@ -618,9 +622,9 @@ function Ve(e, t) {
618
622
  function B(e) {
619
623
  for (var t = 1; t < arguments.length; t++) {
620
624
  var n = arguments[t] == null ? {} : arguments[t];
621
- t % 2 ? Ve(Object(n), !0).forEach((function(t) {
625
+ t % 2 ? We(Object(n), !0).forEach((function(t) {
622
626
  V(e, t, n[t]);
623
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ve(Object(n)).forEach((function(t) {
627
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : We(Object(n)).forEach((function(t) {
624
628
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
625
629
  }));
626
630
  }
@@ -634,7 +638,7 @@ function V(e, t, n) {
634
638
  writable: !0
635
639
  }) : e[t] = n, e;
636
640
  }
637
- function He(e, t) {
641
+ function Ge(e, t) {
638
642
  if (e == null) return {};
639
643
  var n, r, i = function(e, t) {
640
644
  if (e == null) return {};
@@ -648,28 +652,28 @@ function He(e, t) {
648
652
  }
649
653
  return i;
650
654
  }
651
- function Ue(e) {
655
+ function Ke(e) {
652
656
  return function(e) {
653
- if (Array.isArray(e)) return We(e);
657
+ if (Array.isArray(e)) return qe(e);
654
658
  }(e) || function(e) {
655
659
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
656
660
  }(e) || function(e, t) {
657
661
  if (e) {
658
- if (typeof e == "string") return We(e, t);
662
+ if (typeof e == "string") return qe(e, t);
659
663
  var n = Object.prototype.toString.call(e).slice(8, -1);
660
664
  if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
661
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return We(e, t);
665
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return qe(e, t);
662
666
  }
663
667
  }(e) || function() {
664
668
  throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
665
669
  }();
666
670
  }
667
- function We(e, t) {
671
+ function qe(e, t) {
668
672
  (t == null || t > e.length) && (t = e.length);
669
673
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
670
674
  return r;
671
675
  }
672
- var Ge, Ke, qe, H = (Ge = function(e) {
676
+ var Je, Ye, Xe, H = (Je = function(e) {
673
677
  (function() {
674
678
  var t = {}.hasOwnProperty;
675
679
  function n() {
@@ -693,15 +697,15 @@ var Ge, Ke, qe, H = (Ge = function(e) {
693
697
  }
694
698
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
695
699
  })();
696
- }, Ge(qe = {
697
- path: Ke,
700
+ }, Je(Xe = {
701
+ path: Ye,
698
702
  exports: {},
699
703
  require: function(e, t) {
700
704
  return function() {
701
705
  throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
702
- }(t == null && qe.path);
706
+ }(t == null && Xe.path);
703
707
  }
704
- }, qe.exports), qe.exports), U = function(e) {
708
+ }, Xe.exports), Xe.exports), U = function(e) {
705
709
  return function(t, n) {
706
710
  if (!t) return e;
707
711
  var r;
@@ -713,7 +717,7 @@ var Ge, Ke, qe, H = (Ge = function(e) {
713
717
  }), "") : "");
714
718
  };
715
719
  };
716
- function Je(e, t, n) {
720
+ function Ze(e, t, n) {
717
721
  var r, i, a, o, s;
718
722
  function c() {
719
723
  var l = Date.now() - o;
@@ -731,65 +735,65 @@ function Je(e, t, n) {
731
735
  r &&= (s = e.apply(a, i), a = i = null, clearTimeout(r), null);
732
736
  }, l;
733
737
  }
734
- Je.debounce = Je;
735
- var Ye = Je, W = function() {
738
+ Ze.debounce = Ze;
739
+ var Qe = Ze, W = function() {
736
740
  return W = Object.assign || function(e) {
737
741
  for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
738
742
  return e;
739
743
  }, W.apply(this, arguments);
740
744
  };
741
- function Xe(e, t) {
745
+ function $e(e, t) {
742
746
  var n, r;
743
747
  return e && t ? (n = "" + e + t[0].toUpperCase() + t.slice(1), r = e + "-" + t) : (n = e || t, r = e || t), {
744
748
  name: n,
745
749
  classname: r
746
750
  };
747
751
  }
748
- function Ze(e) {
752
+ function et(e) {
749
753
  return /^blob:/.test(e);
750
754
  }
751
- function Qe(e) {
752
- return Ze(e) || function(e) {
755
+ function tt(e) {
756
+ return et(e) || function(e) {
753
757
  return /^data:/.test(e);
754
758
  }(e);
755
759
  }
756
- function $e(e) {
760
+ function nt(e) {
757
761
  return !!(e && e.constructor && e.call && e.apply);
758
762
  }
759
763
  function G(e) {
760
764
  return e === void 0;
761
765
  }
762
- function et(e) {
766
+ function rt(e) {
763
767
  return typeof e == "object" && !!e;
764
768
  }
765
- function tt(e, t, n) {
769
+ function it(e, t, n) {
766
770
  var r = {};
767
- return et(e) ? (Object.keys(t).forEach((function(i) {
768
- r[i] = G(e[i]) ? t[i] : et(t[i]) ? et(e[i]) ? tt(e[i], t[i], n[i]) : e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? !!e[i] : e[i];
771
+ return rt(e) ? (Object.keys(t).forEach((function(i) {
772
+ r[i] = G(e[i]) ? t[i] : rt(t[i]) ? rt(e[i]) ? it(e[i], t[i], n[i]) : e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? !!e[i] : e[i];
769
773
  })), r) : e ? t : n;
770
774
  }
771
- function nt(e) {
775
+ function at(e) {
772
776
  var t = Number(e);
773
777
  return Number.isNaN(t) ? e : t;
774
778
  }
775
- function rt(e) {
779
+ function ot(e) {
776
780
  return typeof (e == "number" || function(e) {
777
781
  return typeof e == "object" && !!e;
778
- }(e) && toString.call(e) == "[object Number]") && !it(e);
782
+ }(e) && toString.call(e) == "[object Number]") && !st(e);
779
783
  }
780
- function it(e) {
784
+ function st(e) {
781
785
  return e != e;
782
786
  }
783
- function at(e, t) {
787
+ function ct(e, t) {
784
788
  return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
785
789
  }
786
- var ot = function(e, t) {
790
+ var lt = function(e, t) {
787
791
  e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
788
- }, st = function(e, t) {
792
+ }, ut = function(e, t) {
789
793
  t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
790
- }, ct = function(e) {
794
+ }, dt = function(e) {
791
795
  this.type = "move", this.directions = e;
792
- }, lt = function() {
796
+ }, ft = function() {
793
797
  function e(e, t, n, r, i) {
794
798
  this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = r, this.element = t, this.anchor = i;
795
799
  }
@@ -807,7 +811,7 @@ var ot = function(e, t) {
807
811
  top: 0
808
812
  };
809
813
  }, e;
810
- }(), ut = {
814
+ }(), pt = {
811
815
  name: "DraggableElement",
812
816
  props: { classname: { type: String } },
813
817
  beforeMount: function() {
@@ -828,7 +832,7 @@ var ot = function(e, t) {
828
832
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
829
833
  },
830
834
  onTouchStart: function(e) {
831
- e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = Ue(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
835
+ e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = Ke(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
832
836
  return {
833
837
  clientX: t.clientX + n.clientX / e.touches.length,
834
838
  clientY: t.clientY + n.clientY / e.touches.length
@@ -874,11 +878,11 @@ var ot = function(e, t) {
874
878
  };
875
879
  },
876
880
  processMove: function(e, t) {
877
- var n = Ue(t);
881
+ var n = Ke(t);
878
882
  if (this.touches.length) {
879
883
  if (this.touches.length === 1 && n.length === 1) {
880
884
  var r = this.$refs.draggable;
881
- this.$emit("drag", new lt(e, r, {
885
+ this.$emit("drag", new ft(e, r, {
882
886
  left: n[0].clientX,
883
887
  top: n[0].clientY
884
888
  }, {
@@ -900,7 +904,7 @@ var ot = function(e, t) {
900
904
  "enter"
901
905
  ]
902
906
  };
903
- ut.render = function(e, t, n, r, a, s) {
907
+ pt.render = function(e, t, n, r, a, s) {
904
908
  return o(), w("div", {
905
909
  ref: "draggable",
906
910
  class: n.classname,
@@ -918,9 +922,9 @@ ut.render = function(e, t, n, r, a, s) {
918
922
  }
919
923
  }, [i(e.$slots, "default")], 34);
920
924
  };
921
- var dt = U("vue-handler-wrapper"), ft = {
925
+ var mt = U("vue-handler-wrapper"), ht = {
922
926
  name: "HandlerWrapper",
923
- components: { DraggableElement: ut },
927
+ components: { DraggableElement: pt },
924
928
  props: {
925
929
  horizontalPosition: { type: String },
926
930
  verticalPosition: { type: String },
@@ -932,12 +936,12 @@ var dt = U("vue-handler-wrapper"), ft = {
932
936
  computed: { classes: function() {
933
937
  var e;
934
938
  if (this.horizontalPosition || this.verticalPosition) {
935
- var t, n = Xe(this.horizontalPosition, this.verticalPosition);
936
- e = dt((V(t = {}, n.classname, !0), V(t, "disabled", this.disabled), t));
937
- } else e = dt({ disabled: this.disabled });
939
+ var t, n = $e(this.horizontalPosition, this.verticalPosition);
940
+ e = mt((V(t = {}, n.classname, !0), V(t, "disabled", this.disabled), t));
941
+ } else e = mt({ disabled: this.disabled });
938
942
  return {
939
943
  root: e,
940
- draggable: dt("draggable")
944
+ draggable: mt("draggable")
941
945
  };
942
946
  } },
943
947
  emits: [
@@ -947,7 +951,7 @@ var dt = U("vue-handler-wrapper"), ft = {
947
951
  "drag-end"
948
952
  ]
949
953
  };
950
- ft.render = function(e, t, n, s, c, l) {
954
+ ht.render = function(e, t, n, s, c, l) {
951
955
  var u = a("DraggableElement");
952
956
  return o(), w("div", { class: l.classes.root }, [m(u, {
953
957
  class: l.classes.draggable,
@@ -970,9 +974,9 @@ ft.render = function(e, t, n, s, c, l) {
970
974
  _: 3
971
975
  }, 8, ["class"])], 2);
972
976
  };
973
- var pt = U("vue-line-wrapper"), mt = {
977
+ var gt = U("vue-line-wrapper"), _t = {
974
978
  name: "LineWrapper",
975
- components: { DraggableElement: ut },
979
+ components: { DraggableElement: pt },
976
980
  props: {
977
981
  position: {
978
982
  type: String,
@@ -985,7 +989,7 @@ var pt = U("vue-line-wrapper"), mt = {
985
989
  },
986
990
  computed: { classname: function() {
987
991
  var e;
988
- return pt((V(e = {}, this.position, !0), V(e, "disabled", this.disabled), e));
992
+ return gt((V(e = {}, this.position, !0), V(e, "disabled", this.disabled), e));
989
993
  } },
990
994
  emits: [
991
995
  "leave",
@@ -994,7 +998,7 @@ var pt = U("vue-line-wrapper"), mt = {
994
998
  "drag-end"
995
999
  ]
996
1000
  };
997
- mt.render = function(e, t, n, s, c, l) {
1001
+ _t.render = function(e, t, n, s, c, l) {
998
1002
  var u = a("DraggableElement");
999
1003
  return o(), w(u, {
1000
1004
  class: l.classname,
@@ -1022,18 +1026,18 @@ var K = [
1022
1026
  "right",
1023
1027
  "top",
1024
1028
  "bottom"
1025
- ], ht = ["left", "right"], gt = ["top", "bottom"], _t = ["left", "top"], vt = [
1029
+ ], vt = ["left", "right"], yt = ["top", "bottom"], bt = ["left", "top"], xt = [
1026
1030
  "fill-area",
1027
1031
  "fit-area",
1028
1032
  "stencil",
1029
1033
  "none"
1030
- ], yt = {
1034
+ ], St = {
1031
1035
  left: 0,
1032
1036
  top: 0,
1033
1037
  width: 0,
1034
1038
  height: 0
1035
1039
  };
1036
- function bt(e, t, n) {
1040
+ function Ct(e, t, n) {
1037
1041
  return !(n ||= [
1038
1042
  "width",
1039
1043
  "height",
@@ -1051,7 +1055,7 @@ function q(e) {
1051
1055
  bottom: e.top + e.height
1052
1056
  };
1053
1057
  }
1054
- function xt(e, t) {
1058
+ function wt(e, t) {
1055
1059
  return {
1056
1060
  left: e.left - t.left,
1057
1061
  top: e.top - t.top
@@ -1063,7 +1067,7 @@ function J(e) {
1063
1067
  top: e.top + e.height / 2
1064
1068
  };
1065
1069
  }
1066
- function St(e, t) {
1070
+ function Tt(e, t) {
1067
1071
  var n = {
1068
1072
  left: 0,
1069
1073
  top: 0,
@@ -1083,7 +1087,7 @@ function Y(e, t) {
1083
1087
  height: e.height + t.top + t.bottom
1084
1088
  };
1085
1089
  }
1086
- function Ct(e) {
1090
+ function Et(e) {
1087
1091
  return {
1088
1092
  left: -e.left,
1089
1093
  top: -e.top
@@ -1118,21 +1122,21 @@ function Z(e, t, n, r) {
1118
1122
  function Q(e) {
1119
1123
  return e.width / e.height;
1120
1124
  }
1121
- function wt(e, t) {
1125
+ function Dt(e, t) {
1122
1126
  return Math.min(t.right !== void 0 && t.left !== void 0 ? (t.right - t.left) / e.width : 1 / 0, t.bottom !== void 0 && t.top !== void 0 ? (t.bottom - t.top) / e.height : 1 / 0);
1123
1127
  }
1124
- function Tt(e, t) {
1128
+ function Ot(e, t) {
1125
1129
  var n = {
1126
1130
  left: 0,
1127
1131
  top: 0
1128
- }, r = St(e, t);
1132
+ }, r = Tt(e, t);
1129
1133
  return r.left && r.left > 0 ? n.left = r.left : r.right && r.right > 0 && (n.left = -r.right), r.top && r.top > 0 ? n.top = r.top : r.bottom && r.bottom > 0 && (n.top = -r.bottom), n;
1130
1134
  }
1131
- function Et(e, t) {
1135
+ function kt(e, t) {
1132
1136
  var n;
1133
1137
  return t.minimum && e < t.minimum ? n = t.minimum : t.maximum && e > t.maximum && (n = t.maximum), n;
1134
1138
  }
1135
- function Dt(e, t) {
1139
+ function At(e, t) {
1136
1140
  var n = Q(e), r = Q(t);
1137
1141
  return t.width < 1 / 0 && t.height < 1 / 0 ? n > r ? {
1138
1142
  width: t.width,
@@ -1148,36 +1152,36 @@ function Dt(e, t) {
1148
1152
  height: t.height
1149
1153
  } : e;
1150
1154
  }
1151
- function Ot(e, t) {
1155
+ function jt(e, t) {
1152
1156
  var n = t * Math.PI / 180;
1153
1157
  return {
1154
1158
  width: Math.abs(e.width * Math.cos(n)) + Math.abs(e.height * Math.sin(n)),
1155
1159
  height: Math.abs(e.width * Math.sin(n)) + Math.abs(e.height * Math.cos(n))
1156
1160
  };
1157
1161
  }
1158
- function kt(e, t) {
1162
+ function Mt(e, t) {
1159
1163
  var n = t * Math.PI / 180;
1160
1164
  return {
1161
1165
  left: e.left * Math.cos(n) - e.top * Math.sin(n),
1162
1166
  top: e.left * Math.sin(n) + e.top * Math.cos(n)
1163
1167
  };
1164
1168
  }
1165
- function At(e, t) {
1166
- var n = St($(e, t), t);
1167
- return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, wt(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, wt(e, t)) : 1;
1169
+ function Nt(e, t) {
1170
+ var n = Tt($(e, t), t);
1171
+ return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, Dt(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, Dt(e, t)) : 1;
1168
1172
  }
1169
1173
  function $(e, t, n) {
1170
1174
  n === void 0 && (n = !1);
1171
- var r = Tt(e, t);
1172
- return X(e, n ? Ct(r) : r);
1175
+ var r = Ot(e, t);
1176
+ return X(e, n ? Et(r) : r);
1173
1177
  }
1174
- function jt(e) {
1178
+ function Pt(e) {
1175
1179
  return {
1176
1180
  width: e.right !== void 0 && e.left !== void 0 ? e.right - e.left : 1 / 0,
1177
1181
  height: e.bottom !== void 0 && e.top !== void 0 ? e.bottom - e.top : 1 / 0
1178
1182
  };
1179
1183
  }
1180
- function Mt(e, t) {
1184
+ function Ft(e, t) {
1181
1185
  return W(W({}, e), {
1182
1186
  minWidth: Math.min(t.width, e.minWidth),
1183
1187
  minHeight: Math.min(t.height, e.minHeight),
@@ -1185,7 +1189,7 @@ function Mt(e, t) {
1185
1189
  maxHeight: Math.min(t.height, e.maxHeight)
1186
1190
  });
1187
1191
  }
1188
- function Nt(e, t, n) {
1192
+ function It(e, t, n) {
1189
1193
  n === void 0 && (n = !0);
1190
1194
  var r = {};
1191
1195
  return K.forEach((function(i) {
@@ -1193,17 +1197,17 @@ function Nt(e, t, n) {
1193
1197
  a !== void 0 && o !== void 0 ? r[i] = i === "left" || i === "top" ? n ? Math.max(a, o) : Math.min(a, o) : n ? Math.min(a, o) : Math.max(a, o) : o === void 0 ? a !== void 0 && (r[i] = a) : r[i] = o;
1194
1198
  })), r;
1195
1199
  }
1196
- function Pt(e, t) {
1197
- return Nt(e, t, !0);
1200
+ function Lt(e, t) {
1201
+ return It(e, t, !0);
1198
1202
  }
1199
- function Ft(e) {
1203
+ function Rt(e) {
1200
1204
  var t = e.size, n = e.aspectRatio, r = e.ignoreMinimum, i = e.sizeRestrictions;
1201
1205
  return !!((t.correctRatio || Q(t) >= n.minimum && Q(t) <= n.maximum) && t.height <= i.maxHeight && t.width <= i.maxWidth && t.width && t.height && (r || t.height >= i.minHeight && t.width >= i.minWidth));
1202
1206
  }
1203
- function It(e, t) {
1207
+ function zt(e, t) {
1204
1208
  return (e.width - t.width) ** 2 + (e.height - t.height) ** 2;
1205
1209
  }
1206
- function Lt(e) {
1210
+ function Bt(e) {
1207
1211
  var t = e.width, n = e.height, r = e.sizeRestrictions, i = {
1208
1212
  minimum: e.aspectRatio && e.aspectRatio.minimum || 0,
1209
1213
  maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0
@@ -1213,15 +1217,15 @@ function Lt(e) {
1213
1217
  };
1214
1218
  function o(e, a) {
1215
1219
  return a === void 0 && (a = !1), e.reduce((function(e, o) {
1216
- return Ft({
1220
+ return Rt({
1217
1221
  size: o,
1218
1222
  aspectRatio: i,
1219
1223
  sizeRestrictions: r,
1220
1224
  ignoreMinimum: a
1221
- }) && (!e || It(o, {
1225
+ }) && (!e || zt(o, {
1222
1226
  width: t,
1223
1227
  height: n
1224
- }) < It(e, {
1228
+ }) < zt(e, {
1225
1229
  width: t,
1226
1230
  height: n
1227
1231
  })) ? o : e;
@@ -1238,7 +1242,7 @@ function Lt(e) {
1238
1242
  height: a.height,
1239
1243
  correctRatio: !0
1240
1244
  });
1241
- })), Ft({
1245
+ })), Rt({
1242
1246
  size: a,
1243
1247
  aspectRatio: i,
1244
1248
  sizeRestrictions: r
@@ -1249,16 +1253,16 @@ function Lt(e) {
1249
1253
  height: c.height
1250
1254
  };
1251
1255
  }
1252
- function Rt(e) {
1256
+ function Vt(e) {
1253
1257
  var t = e.event, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = X(n, t.directions);
1254
- return X(a, Tt(a, i));
1258
+ return X(a, Ot(a, i));
1255
1259
  }
1256
- function zt(e) {
1260
+ function Ht(e) {
1257
1261
  var t = e.coordinates, n = e.transform, r = e.imageSize, i = e.sizeRestrictions, a = e.positionRestrictions, o = e.aspectRatio, s = e.visibleArea, c = function(e, t) {
1258
- return Rt({
1262
+ return Vt({
1259
1263
  coordinates: e,
1260
1264
  positionRestrictions: a,
1261
- event: new ct({
1265
+ event: new dt({
1262
1266
  left: t.left - e.left,
1263
1267
  top: t.top - e.top
1264
1268
  })
@@ -1271,7 +1275,7 @@ function zt(e) {
1271
1275
  imageSize: r,
1272
1276
  visibleArea: s
1273
1277
  }) : e).width) && G(t.height) || (l = function(e, t) {
1274
- return c(W(W(W({}, e), Lt({
1278
+ return c(W(W(W({}, e), Bt({
1275
1279
  width: t.width,
1276
1280
  height: t.height,
1277
1281
  sizeRestrictions: i,
@@ -1286,9 +1290,9 @@ function zt(e) {
1286
1290
  }(l, W(W({}, l), t))), G(t.left) && G(t.top) || (l = c(l, W(W({}, l), t)));
1287
1291
  })), l;
1288
1292
  }
1289
- function Bt(e) {
1293
+ function Ut(e) {
1290
1294
  var t = e.getAreaRestrictions, n = e.boundaries, r = e.coordinates, i = e.visibleArea, a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions, c, l, u, d = W({}, r), f = W({}, i), p = W({}, a);
1291
- c = Q(p), l = Q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = W(W({}, d), Lt({
1295
+ c = Q(p), l = Q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = W(W({}, d), Bt({
1292
1296
  sizeRestrictions: o,
1293
1297
  width: d.width,
1294
1298
  height: d.height,
@@ -1297,19 +1301,19 @@ function Bt(e) {
1297
1301
  maximum: Q(p)
1298
1302
  }
1299
1303
  })));
1300
- var m = At(f = Z(f, d.width * n.width / (f.width * p.width)), t({
1304
+ var m = Nt(f = Z(f, d.width * n.width / (f.width * p.width)), t({
1301
1305
  visibleArea: f,
1302
1306
  type: "resize"
1303
1307
  }));
1304
- return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, xt(J(d), J(f))), t({
1308
+ return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, wt(J(d), J(f))), t({
1305
1309
  visibleArea: f,
1306
1310
  type: "move"
1307
1311
  })), {
1308
- coordinates: d = $(d, Pt(q(f), s)),
1312
+ coordinates: d = $(d, Lt(q(f), s)),
1309
1313
  visibleArea: f
1310
1314
  };
1311
1315
  }
1312
- function Vt(e) {
1316
+ function Wt(e) {
1313
1317
  var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea, o = e.positionRestrictions, s = W({}, i), c = W({}, a);
1314
1318
  if (i && a && t.type !== "manipulateImage") {
1315
1319
  var l = {
@@ -1317,31 +1321,31 @@ function Vt(e) {
1317
1321
  height: 0
1318
1322
  };
1319
1323
  Q(r) > Q(s) ? (l.height = .8 * r.height, l.width = l.height * Q(s)) : (l.width = .8 * r.width, l.height = l.width * Q(s));
1320
- var u = At(c = Z(c, s.width * r.width / (c.width * l.width)), n({
1324
+ var u = Nt(c = Z(c, s.width * r.width / (c.width * l.width)), n({
1321
1325
  visibleArea: c,
1322
1326
  type: "resize"
1323
1327
  }));
1324
- c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, xt(J(s), J(c))), n({
1328
+ c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, wt(J(s), J(c))), n({
1325
1329
  visibleArea: c,
1326
1330
  type: "move"
1327
- })), s = $(s, Pt(q(c), o));
1331
+ })), s = $(s, Lt(q(c), o));
1328
1332
  }
1329
1333
  return {
1330
1334
  coordinates: s,
1331
1335
  visibleArea: c
1332
1336
  };
1333
1337
  }
1334
- function Ht(e) {
1338
+ function Gt(e) {
1335
1339
  var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = W({}, r), o = W({}, n);
1336
1340
  if (t.type === "setCoordinates") {
1337
1341
  var s = Math.max(0, o.width - a.width), c = Math.max(0, o.height - a.height);
1338
- s > c ? a = Z(a, Math.min(o.width / a.width, wt(a, i({
1342
+ s > c ? a = Z(a, Math.min(o.width / a.width, Dt(a, i({
1339
1343
  visibleArea: a,
1340
1344
  type: "resize"
1341
- })))) : c > s && (a = Z(a, Math.min(o.height / a.height, wt(a, i({
1345
+ })))) : c > s && (a = Z(a, Math.min(o.height / a.height, Dt(a, i({
1342
1346
  visibleArea: a,
1343
1347
  type: "resize"
1344
- }))))), a = $(a = X(a, Ct(Tt(o, q(a)))), i({
1348
+ }))))), a = $(a = X(a, Et(Ot(o, q(a)))), i({
1345
1349
  visibleArea: a,
1346
1350
  type: "move"
1347
1351
  }));
@@ -1351,14 +1355,14 @@ function Ht(e) {
1351
1355
  coordinates: o
1352
1356
  };
1353
1357
  }
1354
- function Ut(e) {
1358
+ function Kt(e) {
1355
1359
  var t = e.imageSize, n = e.visibleArea, r = e.coordinates, i = n || t;
1356
1360
  return {
1357
1361
  left: (n ? n.left : 0) + i.width / 2 - r.width / 2,
1358
1362
  top: (n ? n.top : 0) + i.height / 2 - r.height / 2
1359
1363
  };
1360
1364
  }
1361
- function Wt(e) {
1365
+ function qt(e) {
1362
1366
  var t = e.imageSize, n = e.visibleArea, r = e.aspectRatio, i = e.sizeRestrictions, a = n || t, o = Math.min(r.maximum || 1 / 0, Math.max(r.minimum || 0, Q(a))), s = a.width < a.height ? {
1363
1367
  width: .8 * a.width,
1364
1368
  height: .8 * a.width / o
@@ -1366,35 +1370,35 @@ function Wt(e) {
1366
1370
  height: .8 * a.height,
1367
1371
  width: .8 * a.height * o
1368
1372
  };
1369
- return Lt(W(W({}, s), {
1373
+ return Bt(W(W({}, s), {
1370
1374
  aspectRatio: r,
1371
1375
  sizeRestrictions: i
1372
1376
  }));
1373
1377
  }
1374
- function Gt(e) {
1378
+ function Jt(e) {
1375
1379
  var t, n, r = e.imageSize, i = e.visibleArea, a = e.boundaries, o = e.aspectRatio, s = e.sizeRestrictions, c = e.stencilSize, l = i || r;
1376
- return Q(l) > Q(a) ? n = (t = c.height * l.height / a.height) * Q(c) : t = (n = c.width * l.width / a.width) / Q(c), Lt({
1380
+ return Q(l) > Q(a) ? n = (t = c.height * l.height / a.height) * Q(c) : t = (n = c.width * l.width / a.width) / Q(c), Bt({
1377
1381
  width: n,
1378
1382
  height: t,
1379
1383
  aspectRatio: o,
1380
1384
  sizeRestrictions: s
1381
1385
  });
1382
1386
  }
1383
- function Kt(e) {
1387
+ function Yt(e) {
1384
1388
  var t = e.getAreaRestrictions, n = e.coordinates, r = e.imageSize, i = Q(e.boundaries);
1385
1389
  if (n) {
1386
1390
  var a = {
1387
1391
  height: Math.max(n.height, r.height),
1388
1392
  width: Math.max(n.width, r.width)
1389
- }, o = Dt({
1393
+ }, o = At({
1390
1394
  width: Q(a) > i ? a.width : a.height * i,
1391
1395
  height: Q(a) > i ? a.width / i : a.height
1392
- }, jt(t())), s = {
1396
+ }, Pt(t())), s = {
1393
1397
  left: n.left + n.width / 2 - o.width / 2,
1394
1398
  top: n.top + n.height / 2 - o.height / 2,
1395
1399
  width: o.width,
1396
1400
  height: o.height
1397
- }, c = St(n, q(W({
1401
+ }, c = Tt(n, q(W({
1398
1402
  left: 0,
1399
1403
  top: 0
1400
1404
  }, r))), l = {};
@@ -1411,10 +1415,10 @@ function Kt(e) {
1411
1415
  height: o.height
1412
1416
  };
1413
1417
  }
1414
- function qt(e, t) {
1415
- return Nt(e, q(t));
1418
+ function Xt(e, t) {
1419
+ return It(e, q(t));
1416
1420
  }
1417
- function Jt(e) {
1421
+ function Zt(e) {
1418
1422
  var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u = W({}, r), d = W({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
1419
1423
  u = X(u, {
1420
1424
  left: l.left || 0,
@@ -1423,16 +1427,16 @@ function Jt(e) {
1423
1427
  var h = {
1424
1428
  stencil: {
1425
1429
  minimum: Math.max(i.minWidth ? i.minWidth / d.width : 0, i.minHeight ? i.minHeight / d.height : 0),
1426
- maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : 1 / 0, i.maxHeight ? i.maxHeight / d.height : 1 / 0, wt(d, o))
1430
+ maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : 1 / 0, i.maxHeight ? i.maxHeight / d.height : 1 / 0, Dt(d, o))
1427
1431
  },
1428
- area: { maximum: wt(u, a({
1432
+ area: { maximum: Dt(u, a({
1429
1433
  visibleArea: u,
1430
1434
  type: "resize"
1431
1435
  })) }
1432
1436
  };
1433
1437
  c.factor && m && (c.factor < 1 ? (p = Math.max(c.factor, h.stencil.minimum)) > 1 && (p = 1) : c.factor > 1 && (p = Math.min(c.factor, Math.min(h.area.maximum, h.stencil.maximum))) < 1 && (p = 1)), p && (u = Z(u, p, c.center));
1434
1438
  var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top, y = r.height + r.top - (n.height + n.top);
1435
- return u = $(u = X(u, Tt(u, {
1439
+ return u = $(u = X(u, Ot(u, {
1436
1440
  left: o.left === void 0 ? void 0 : o.left - g * p,
1437
1441
  top: o.top === void 0 ? void 0 : o.top - v * p,
1438
1442
  bottom: o.bottom === void 0 ? void 0 : o.bottom + y * p,
@@ -1440,46 +1444,46 @@ function Jt(e) {
1440
1444
  })), a({
1441
1445
  visibleArea: u,
1442
1446
  type: "move"
1443
- })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Pt(q(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = X(u = $(u = Z(u, f, c.factor > 1 ? c.center : J(d)), a({
1447
+ })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Lt(q(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = X(u = $(u = Z(u, f, c.factor > 1 ? c.center : J(d)), a({
1444
1448
  visibleArea: u,
1445
1449
  type: "move"
1446
- })), Ct(Tt(d, q(u)))))), {
1450
+ })), Et(Ot(d, q(u)))))), {
1447
1451
  coordinates: d,
1448
1452
  visibleArea: u
1449
1453
  };
1450
1454
  }
1451
- function Yt(e) {
1452
- var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = W({}, r), d = W({}, i), f = kt(J(W({
1455
+ function Qt(e) {
1456
+ var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = W({}, r), d = W({}, i), f = Mt(J(W({
1453
1457
  left: 0,
1454
1458
  top: 0
1455
1459
  }, c)), l);
1456
- return (u = W(W({}, Lt({
1460
+ return (u = W(W({}, Bt({
1457
1461
  sizeRestrictions: a,
1458
1462
  aspectRatio: t,
1459
1463
  width: u.width,
1460
1464
  height: u.height
1461
- })), kt(J(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = Z(d, At(d, n({
1465
+ })), Mt(J(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = Z(d, Nt(d, n({
1462
1466
  visibleArea: d,
1463
1467
  type: "resize"
1464
1468
  }))), {
1465
1469
  coordinates: u = $(u, o),
1466
- visibleArea: d = $(d = X(d, xt(J(u), J(r))), n({
1470
+ visibleArea: d = $(d = X(d, wt(J(u), J(r))), n({
1467
1471
  visibleArea: d,
1468
1472
  type: "move"
1469
1473
  }))
1470
1474
  };
1471
1475
  }
1472
- function Xt(e) {
1476
+ function $t(e) {
1473
1477
  var t = e.flip, n = e.previousFlip, r = e.rotate, i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = W({}, a), l = W({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
1474
1478
  if (u || d) {
1475
- var f = kt({
1479
+ var f = Mt({
1476
1480
  left: s.width / 2,
1477
1481
  top: s.height / 2
1478
- }, -r), p = kt(J(c), -r), m = kt({
1482
+ }, -r), p = Mt(J(c), -r), m = Mt({
1479
1483
  left: u ? f.left - (p.left - f.left) : p.left,
1480
1484
  top: d ? f.top - (p.top - f.top) : p.top
1481
1485
  }, r);
1482
- c = X(c, xt(m, J(c))), p = kt(J(l), -r), l = $(l = X(l, xt(m = kt({
1486
+ c = X(c, wt(m, J(c))), p = Mt(J(l), -r), l = $(l = X(l, wt(m = Mt({
1483
1487
  left: u ? f.left - (p.left - f.left) : p.left,
1484
1488
  top: d ? f.top - (p.top - f.top) : p.top
1485
1489
  }, r), J(l))), i({
@@ -1492,11 +1496,11 @@ function Xt(e) {
1492
1496
  visibleArea: l
1493
1497
  };
1494
1498
  }
1495
- function Zt(e) {
1499
+ function en(e) {
1496
1500
  var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c = W({}, t), l = Y(n, c).width, u = Y(n, c).height;
1497
1501
  l < 0 && (c.left < 0 && c.right < 0 ? (c.left = -(n.width - a.minWidth) / (c.left / c.right), c.right = -(n.width - a.minWidth) / (c.right / c.left)) : c.left < 0 ? c.left = -(n.width - a.minWidth) : c.right < 0 && (c.right = -(n.width - a.minWidth))), u < 0 && (c.top < 0 && c.bottom < 0 ? (c.top = -(n.height - a.minHeight) / (c.top / c.bottom), c.bottom = -(n.height - a.minHeight) / (c.bottom / c.top)) : c.top < 0 ? c.top = -(n.height - a.minHeight) : c.bottom < 0 && (c.bottom = -(n.height - a.minHeight)));
1498
- var d = St(Y(n, c), i);
1499
- s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = St(Y(n, c), i));
1502
+ var d = Tt(Y(n, c), i);
1503
+ s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = Tt(Y(n, c), i));
1500
1504
  var f = {
1501
1505
  width: 1 / 0,
1502
1506
  height: 1 / 0,
@@ -1523,19 +1527,19 @@ function Zt(e) {
1523
1527
  m !== 1 / 0 && K.forEach((function(e) {
1524
1528
  c[e] *= m;
1525
1529
  }));
1526
- } else f.width !== 1 / 0 && ht.forEach((function(e) {
1530
+ } else f.width !== 1 / 0 && vt.forEach((function(e) {
1527
1531
  c[e] *= f.width;
1528
- })), f.height !== 1 / 0 && gt.forEach((function(e) {
1532
+ })), f.height !== 1 / 0 && yt.forEach((function(e) {
1529
1533
  c[e] *= f.height;
1530
1534
  }));
1531
1535
  return c;
1532
1536
  }
1533
- function Qt(e, t, n) {
1537
+ function tn(e, t, n) {
1534
1538
  return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
1535
1539
  }
1536
- var $t = U("vue-simple-handler"), en = U("vue-simple-handler-wrapper"), tn = {
1540
+ var nn = U("vue-simple-handler"), rn = U("vue-simple-handler-wrapper"), an = {
1537
1541
  name: "SimpleHandler",
1538
- components: { HandlerWrapper: ft },
1542
+ components: { HandlerWrapper: ht },
1539
1543
  props: {
1540
1544
  defaultClass: { type: String },
1541
1545
  hoverClass: { type: String },
@@ -1553,8 +1557,8 @@ var $t = U("vue-simple-handler"), en = U("vue-simple-handler-wrapper"), tn = {
1553
1557
  computed: { classes: function() {
1554
1558
  var e, t = (V(e = {}, this.horizontalPosition, !!this.horizontalPosition), V(e, this.verticalPosition, !!this.verticalPosition), V(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), V(e, "hover", this.hover), e);
1555
1559
  return {
1556
- default: H($t(t), this.defaultClass, this.hover && this.hoverClass),
1557
- wrapper: H(en(t), this.wrapperClass)
1560
+ default: H(nn(t), this.defaultClass, this.hover && this.hoverClass),
1561
+ wrapper: H(rn(t), this.wrapperClass)
1558
1562
  };
1559
1563
  } },
1560
1564
  methods: {
@@ -1573,7 +1577,7 @@ var $t = U("vue-simple-handler"), en = U("vue-simple-handler-wrapper"), tn = {
1573
1577
  },
1574
1578
  emits: ["drag", "drag-end"]
1575
1579
  };
1576
- tn.render = function(e, t, n, i, s, c) {
1580
+ an.render = function(e, t, n, i, s, c) {
1577
1581
  var l = a("HandlerWrapper");
1578
1582
  return o(), w(l, {
1579
1583
  class: c.classes.wrapper,
@@ -1600,9 +1604,9 @@ tn.render = function(e, t, n, i, s, c) {
1600
1604
  "onLeave"
1601
1605
  ]);
1602
1606
  };
1603
- var nn = U("vue-simple-line"), rn = U("vue-simple-line-wrapper"), an = {
1607
+ var on = U("vue-simple-line"), sn = U("vue-simple-line-wrapper"), cn = {
1604
1608
  name: "SimpleLine",
1605
- components: { LineWrapper: mt },
1609
+ components: { LineWrapper: _t },
1606
1610
  props: {
1607
1611
  defaultClass: { type: String },
1608
1612
  hoverClass: { type: String },
@@ -1618,8 +1622,8 @@ var nn = U("vue-simple-line"), rn = U("vue-simple-line-wrapper"), an = {
1618
1622
  },
1619
1623
  computed: { classes: function() {
1620
1624
  return {
1621
- root: H(nn(V({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1622
- wrapper: H(rn(V({}, this.position, !0)), this.wrapperClass)
1625
+ root: H(on(V({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1626
+ wrapper: H(sn(V({}, this.position, !0)), this.wrapperClass)
1623
1627
  };
1624
1628
  } },
1625
1629
  methods: {
@@ -1638,7 +1642,7 @@ var nn = U("vue-simple-line"), rn = U("vue-simple-line-wrapper"), an = {
1638
1642
  },
1639
1643
  emits: ["drag", "drag-end"]
1640
1644
  };
1641
- an.render = function(e, t, n, i, s, c) {
1645
+ cn.render = function(e, t, n, i, s, c) {
1642
1646
  var l = a("LineWrapper");
1643
1647
  return o(), w(l, {
1644
1648
  class: c.classes.wrapper,
@@ -1663,15 +1667,15 @@ an.render = function(e, t, n, i, s, c) {
1663
1667
  "onLeave"
1664
1668
  ]);
1665
1669
  };
1666
- var on = U("vue-bounding-box"), sn = [
1670
+ var ln = U("vue-bounding-box"), un = [
1667
1671
  "east",
1668
1672
  "west",
1669
1673
  null
1670
- ], cn = [
1674
+ ], dn = [
1671
1675
  "south",
1672
1676
  "north",
1673
1677
  null
1674
- ], ln = {
1678
+ ], fn = {
1675
1679
  name: "BoundingBox",
1676
1680
  props: {
1677
1681
  width: { type: Number },
@@ -1695,7 +1699,7 @@ var on = U("vue-bounding-box"), sn = [
1695
1699
  handlersComponent: {
1696
1700
  type: [Object, String],
1697
1701
  default: function() {
1698
- return tn;
1702
+ return an;
1699
1703
  }
1700
1704
  },
1701
1705
  handlersClasses: {
@@ -1724,7 +1728,7 @@ var on = U("vue-bounding-box"), sn = [
1724
1728
  linesComponent: {
1725
1729
  type: [Object, String],
1726
1730
  default: function() {
1727
- return an;
1731
+ return cn;
1728
1732
  }
1729
1733
  },
1730
1734
  linesClasses: {
@@ -1746,10 +1750,10 @@ var on = U("vue-bounding-box"), sn = [
1746
1750
  },
1747
1751
  data: function() {
1748
1752
  var e = [];
1749
- return sn.forEach((function(t) {
1750
- cn.forEach((function(n) {
1753
+ return un.forEach((function(t) {
1754
+ dn.forEach((function(n) {
1751
1755
  if (t !== n) {
1752
- var r = Xe(t, n);
1756
+ var r = $e(t, n);
1753
1757
  e.push({
1754
1758
  name: r.name,
1755
1759
  classname: r.classname,
@@ -1768,7 +1772,7 @@ var on = U("vue-bounding-box"), sn = [
1768
1772
  classes: function() {
1769
1773
  var e = this.handlersClasses, t = this.handlersWrappersClasses, n = this.linesClasses, r = this.linesWrappersClasses;
1770
1774
  return {
1771
- root: on(),
1775
+ root: ln(),
1772
1776
  handlers: e,
1773
1777
  handlersWrappers: t,
1774
1778
  lines: n,
@@ -1806,8 +1810,8 @@ var on = U("vue-bounding-box"), sn = [
1806
1810
  };
1807
1811
  if (n && r) {
1808
1812
  var o = i.horizontalDirection, s = i.verticalDirection, c = o === "east" ? n : o === "west" ? 0 : n / 2, l = s === "south" ? r : s === "north" ? 0 : r / 2;
1809
- a.wrapperClass = on("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
1810
- } else a.wrapperClass = on("handler", V({}, i.classname, !0));
1813
+ a.wrapperClass = ln("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
1814
+ } else a.wrapperClass = ln("handler", V({}, i.classname, !0));
1811
1815
  t.push(a);
1812
1816
  }
1813
1817
  })), t;
@@ -1833,7 +1837,7 @@ var on = U("vue-bounding-box"), sn = [
1833
1837
  top: 0,
1834
1838
  bottom: 0
1835
1839
  };
1836
- t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new st(s, {
1840
+ t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new ut(s, {
1837
1841
  allowedDirections: {
1838
1842
  left: t === "west" || !t,
1839
1843
  right: t === "east" || !t,
@@ -1847,7 +1851,7 @@ var on = U("vue-bounding-box"), sn = [
1847
1851
  },
1848
1852
  emits: ["resize", "resize-end"]
1849
1853
  };
1850
- ln.render = function(e, t, r, a, s, c) {
1854
+ fn.render = function(e, t, r, a, s, c) {
1851
1855
  return o(), w("div", {
1852
1856
  ref: "box",
1853
1857
  class: c.classes.root,
@@ -1907,7 +1911,7 @@ ln.render = function(e, t, r, a, s, c) {
1907
1911
  })), 128))
1908
1912
  ], 6);
1909
1913
  };
1910
- var un = U("vue-draggable-area"), dn = {
1914
+ var pn = U("vue-draggable-area"), mn = {
1911
1915
  name: "DraggableArea",
1912
1916
  props: {
1913
1917
  movable: {
@@ -1920,7 +1924,7 @@ var un = U("vue-draggable-area"), dn = {
1920
1924
  }
1921
1925
  },
1922
1926
  computed: { classnames: function() {
1923
- return { default: un() };
1927
+ return { default: pn() };
1924
1928
  } },
1925
1929
  beforeMount: function() {
1926
1930
  window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
@@ -1935,14 +1939,14 @@ var un = U("vue-draggable-area"), dn = {
1935
1939
  onTouchStart: function(e) {
1936
1940
  if (e.cancelable) {
1937
1941
  var t = this.movable && e.touches.length === 1;
1938
- t && (this.touches = Ue(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
1942
+ t && (this.touches = Ke(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
1939
1943
  }
1940
1944
  },
1941
1945
  onTouchEnd: function() {
1942
1946
  this.touchStarted = !1, this.processEnd();
1943
1947
  },
1944
1948
  onTouchMove: function(e) {
1945
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : at({
1949
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : ct({
1946
1950
  x: this.touches[0].clientX,
1947
1951
  y: this.touches[0].clientY
1948
1952
  }, {
@@ -1981,10 +1985,10 @@ var un = U("vue-draggable-area"), dn = {
1981
1985
  };
1982
1986
  },
1983
1987
  processMove: function(e, t) {
1984
- var n = Ue(t);
1988
+ var n = Ke(t);
1985
1989
  if (this.touches.length) {
1986
1990
  var r = this.$refs.container.getBoundingClientRect(), i = r.left, a = r.top;
1987
- this.touches.length === 1 && n.length === 1 && this.$emit("move", new ct({
1991
+ this.touches.length === 1 && n.length === 1 && this.$emit("move", new dt({
1988
1992
  left: n[0].clientX - (i + this.anchor.x),
1989
1993
  top: n[0].clientY - (a + this.anchor.y)
1990
1994
  }));
@@ -1996,7 +2000,7 @@ var un = U("vue-draggable-area"), dn = {
1996
2000
  },
1997
2001
  emits: ["move", "move-end"]
1998
2002
  };
1999
- dn.render = function(e, t, n, r, a, s) {
2003
+ mn.render = function(e, t, n, r, a, s) {
2000
2004
  return o(), w("div", {
2001
2005
  ref: "container",
2002
2006
  onTouchstart: t[1] ||= function() {
@@ -2007,7 +2011,7 @@ dn.render = function(e, t, n, r, a, s) {
2007
2011
  }
2008
2012
  }, [i(e.$slots, "default")], 544);
2009
2013
  };
2010
- function fn(e) {
2014
+ function hn(e) {
2011
2015
  return {
2012
2016
  rotate: e.rotate || 0,
2013
2017
  flip: {
@@ -2016,7 +2020,7 @@ function fn(e) {
2016
2020
  }
2017
2021
  };
2018
2022
  }
2019
- function pn(e) {
2023
+ function gn(e) {
2020
2024
  return new Promise((function(t, n) {
2021
2025
  try {
2022
2026
  if (e) {
@@ -2049,11 +2053,11 @@ function pn(e) {
2049
2053
  var a, o, s;
2050
2054
  }));
2051
2055
  }
2052
- function mn(e) {
2056
+ function _n(e) {
2053
2057
  var t = e.rotate, n = e.flip, r = e.scaleX, i = e.scaleY, a = "";
2054
2058
  return a += " rotate(" + t + "deg) ", a += " scaleX(" + r * (n.horizontal ? -1 : 1) + ") ", a += " scaleY(" + i * (n.vertical ? -1 : 1) + ") ";
2055
2059
  }
2056
- function hn(e) {
2060
+ function vn(e) {
2057
2061
  try {
2058
2062
  var t, n = new DataView(e), r = void 0, i = void 0, a = void 0, o = void 0;
2059
2063
  if (n.getUint8(0) === 255 && n.getUint8(1) === 216) for (var s = n.byteLength, c = 2; c + 1 < s;) {
@@ -2085,7 +2089,7 @@ function hn(e) {
2085
2089
  return null;
2086
2090
  }
2087
2091
  }
2088
- function gn(e, t) {
2092
+ function yn(e, t) {
2089
2093
  var n = t.getBoundingClientRect(), r = n.left, i = n.top, a = {
2090
2094
  left: 0,
2091
2095
  top: 0
@@ -2093,7 +2097,7 @@ function gn(e, t) {
2093
2097
  return e.forEach((function(t) {
2094
2098
  a.left += (t.clientX - r) / e.length, a.top += (t.clientY - i) / e.length;
2095
2099
  })), e.forEach((function(e) {
2096
- o += at({
2100
+ o += ct({
2097
2101
  x: a.left,
2098
2102
  y: a.top
2099
2103
  }, {
@@ -2106,7 +2110,7 @@ function gn(e, t) {
2106
2110
  count: e.length
2107
2111
  };
2108
2112
  }
2109
- var _n = {
2113
+ var bn = {
2110
2114
  props: {
2111
2115
  touchMove: {
2112
2116
  type: Boolean,
@@ -2136,18 +2140,18 @@ var _n = {
2136
2140
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
2137
2141
  },
2138
2142
  created: function() {
2139
- this.transforming = !1, this.debouncedProcessEnd = Ye(this.processEnd), this.touches = [];
2143
+ this.transforming = !1, this.debouncedProcessEnd = Qe(this.processEnd), this.touches = [];
2140
2144
  },
2141
2145
  methods: {
2142
2146
  processMove: function(e, t) {
2143
2147
  if (this.touches.length) {
2144
- if (this.touches.length === 1 && t.length === 1) this.$emit("move", new ot({
2148
+ if (this.touches.length === 1 && t.length === 1) this.$emit("move", new lt({
2145
2149
  left: this.touches[0].clientX - t[0].clientX,
2146
2150
  top: this.touches[0].clientY - t[0].clientY
2147
2151
  }));
2148
2152
  else if (this.touches.length > 1 && this.touchResize) {
2149
- var n = gn(t, this.$refs.container), r = this.oldGeometricProperties;
2150
- r.count === n.count && r.count > 1 && this.$emit("resize", new ot({
2153
+ var n = yn(t, this.$refs.container), r = this.oldGeometricProperties;
2154
+ r.count === n.count && r.count > 1 && this.$emit("resize", new lt({
2151
2155
  left: r.centerMass.left - n.centerMass.left,
2152
2156
  top: r.centerMass.top - n.centerMass.top
2153
2157
  }, {
@@ -2170,9 +2174,9 @@ var _n = {
2170
2174
  onTouchStart: function(e) {
2171
2175
  if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
2172
2176
  var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
2173
- this.touches = Ue(e.touches).filter((function(e) {
2177
+ this.touches = Ke(e.touches).filter((function(e) {
2174
2178
  return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
2175
- })), this.oldGeometricProperties = gn(this.touches, t);
2179
+ })), this.oldGeometricProperties = yn(this.touches, t);
2176
2180
  }
2177
2181
  },
2178
2182
  onTouchEnd: function(e) {
@@ -2181,7 +2185,7 @@ var _n = {
2181
2185
  onTouchMove: function(e) {
2182
2186
  var t = this;
2183
2187
  if (this.touches.length) {
2184
- var n = Ue(e.touches).filter((function(e) {
2188
+ var n = Ke(e.touches).filter((function(e) {
2185
2189
  return !e.identifier || t.touches.find((function(t) {
2186
2190
  return t.identifier === e.identifier;
2187
2191
  }));
@@ -2210,11 +2214,11 @@ var _n = {
2210
2214
  },
2211
2215
  onWheel: function(e) {
2212
2216
  if (this.wheelResize && this.processEvent(e)) {
2213
- var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || it(s) ? s : s > 0 ? 1 : -1), a = {
2217
+ var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || st(s) ? s : s > 0 ? 1 : -1), a = {
2214
2218
  left: e.clientX - n,
2215
2219
  top: e.clientY - r
2216
2220
  };
2217
- this.$emit("resize", new ot({}, {
2221
+ this.$emit("resize", new lt({}, {
2218
2222
  factor: i,
2219
2223
  center: a
2220
2224
  })), this.touches.length || this.debouncedProcessEnd();
@@ -2228,7 +2232,7 @@ var _n = {
2228
2232
  "transform-end"
2229
2233
  ]
2230
2234
  };
2231
- _n.render = function(e, t, n, r, a, s) {
2235
+ bn.render = function(e, t, n, r, a, s) {
2232
2236
  return o(), w("div", {
2233
2237
  ref: "container",
2234
2238
  onTouchstart: t[1] ||= function() {
@@ -2242,8 +2246,8 @@ _n.render = function(e, t, n, r, a, s) {
2242
2246
  }
2243
2247
  }, [i(e.$slots, "default")], 544);
2244
2248
  };
2245
- var vn = {
2246
- components: { TransformableImage: _n },
2249
+ var xn = {
2250
+ components: { TransformableImage: bn },
2247
2251
  props: {
2248
2252
  touchMove: {
2249
2253
  type: Boolean,
@@ -2264,7 +2268,7 @@ var vn = {
2264
2268
  },
2265
2269
  emits: ["resize", "move"]
2266
2270
  };
2267
- vn.render = function(e, t, n, s, c, l) {
2271
+ xn.render = function(e, t, n, s, c, l) {
2268
2272
  var u = a("transformable-image");
2269
2273
  return o(), w(u, {
2270
2274
  "touch-move": n.touchMove,
@@ -2289,7 +2293,7 @@ vn.render = function(e, t, n, s, c, l) {
2289
2293
  "wheel-resize"
2290
2294
  ]);
2291
2295
  };
2292
- var yn = U("vue-preview"), bn = {
2296
+ var Sn = U("vue-preview"), Cn = {
2293
2297
  props: {
2294
2298
  coordinates: { type: Object },
2295
2299
  transitions: { type: Object },
@@ -2319,10 +2323,10 @@ var yn = U("vue-preview"), bn = {
2319
2323
  computed: {
2320
2324
  classes: function() {
2321
2325
  return {
2322
- root: yn({ fill: this.fill }),
2323
- wrapper: yn("wrapper"),
2324
- imageWrapper: yn("image-wrapper"),
2325
- image: H(yn("image"), this.imageClass)
2326
+ root: Sn({ fill: this.fill }),
2327
+ wrapper: Sn("wrapper"),
2328
+ imageWrapper: Sn("image-wrapper"),
2329
+ image: H(Sn("image"), this.imageClass)
2326
2330
  };
2327
2331
  },
2328
2332
  style: function() {
@@ -2350,7 +2354,7 @@ var yn = U("vue-preview"), bn = {
2350
2354
  }, this.image.transforms), {}, {
2351
2355
  scaleX: 1 / e,
2352
2356
  scaleY: 1 / e
2353
- }), n = this.imageSize.width, r = this.imageSize.height, i = Ot({
2357
+ }), n = this.imageSize.width, r = this.imageSize.height, i = jt({
2354
2358
  width: n,
2355
2359
  height: r
2356
2360
  }, t.rotate), a = {
@@ -2369,7 +2373,7 @@ var yn = U("vue-preview"), bn = {
2369
2373
  }
2370
2374
  };
2371
2375
  return a.transform = `translate(
2372
- ${-this.coordinates.left / e - o.rotate.left - o.scale.left}px,${-this.coordinates.top / e - o.rotate.top - o.scale.top}px) ` + mn(t), this.transitions && this.transitions.enabled && (a.transition = `${this.transitions.time}ms ${this.transitions.timingFunction}`), a;
2376
+ ${-this.coordinates.left / e - o.rotate.left - o.scale.left}px,${-this.coordinates.top / e - o.rotate.top - o.scale.top}px) ` + _n(t), this.transitions && this.transitions.enabled && (a.transition = `${this.transitions.time}ms ${this.transitions.timingFunction}`), a;
2373
2377
  }
2374
2378
  return {};
2375
2379
  },
@@ -2413,7 +2417,7 @@ var yn = U("vue-preview"), bn = {
2413
2417
  }
2414
2418
  }
2415
2419
  };
2416
- bn.render = function(e, t, n, r, i, a) {
2420
+ Cn.render = function(e, t, n, r, i, a) {
2417
2421
  return o(), w("div", {
2418
2422
  ref: "root",
2419
2423
  class: a.classes.root,
@@ -2429,20 +2433,20 @@ bn.render = function(e, t, n, r, i, a) {
2429
2433
  style: a.imageStyle
2430
2434
  }, null, 14, ["src"]), [[j, n.image && n.image.src]])], 6)], 6);
2431
2435
  };
2432
- var xn = {
2433
- components: { Preview: bn },
2436
+ var wn = {
2437
+ components: { Preview: Cn },
2434
2438
  inheritAttrs: !1
2435
2439
  };
2436
- xn.render = function(e, t, n, r, i, c) {
2440
+ wn.render = function(e, t, n, r, i, c) {
2437
2441
  var l = a("preview");
2438
2442
  return o(), w(l, s(e.$attrs, { fill: !0 }), null, 16);
2439
2443
  };
2440
- var Sn = U("vue-rectangle-stencil"), Cn = {
2444
+ var Tn = U("vue-rectangle-stencil"), En = {
2441
2445
  name: "RectangleStencil",
2442
2446
  components: {
2443
- StencilPreview: xn,
2444
- BoundingBox: ln,
2445
- DraggableArea: dn
2447
+ StencilPreview: wn,
2448
+ BoundingBox: fn,
2449
+ DraggableArea: mn
2446
2450
  },
2447
2451
  props: {
2448
2452
  image: { type: Object },
@@ -2452,14 +2456,14 @@ var Sn = U("vue-rectangle-stencil"), Cn = {
2452
2456
  handlersComponent: {
2453
2457
  type: [Object, String],
2454
2458
  default: function() {
2455
- return tn;
2459
+ return an;
2456
2460
  }
2457
2461
  },
2458
2462
  lines: { type: Object },
2459
2463
  linesComponent: {
2460
2464
  type: [Object, String],
2461
2465
  default: function() {
2462
- return an;
2466
+ return cn;
2463
2467
  }
2464
2468
  },
2465
2469
  aspectRatio: { type: [Number, String] },
@@ -2512,13 +2516,13 @@ var Sn = U("vue-rectangle-stencil"), Cn = {
2512
2516
  computed: {
2513
2517
  classes: function() {
2514
2518
  return {
2515
- stencil: H(Sn({
2519
+ stencil: H(Tn({
2516
2520
  movable: this.movable,
2517
2521
  moving: this.moving,
2518
2522
  resizing: this.resizing
2519
2523
  }), this.moving && this.movingClass, this.resizing && this.resizingClass),
2520
- preview: H(Sn("preview"), this.previewClass),
2521
- boundingBox: H(Sn("bounding-box"), this.boundingBoxClass)
2524
+ preview: H(Tn("preview"), this.previewClass),
2525
+ boundingBox: H(Tn("bounding-box"), this.boundingBoxClass)
2522
2526
  };
2523
2527
  },
2524
2528
  style: function() {
@@ -2557,7 +2561,7 @@ var Sn = U("vue-rectangle-stencil"), Cn = {
2557
2561
  "move-end"
2558
2562
  ]
2559
2563
  };
2560
- Cn.render = function(e, t, n, i, s, c) {
2564
+ En.render = function(e, t, n, i, s, c) {
2561
2565
  var l = a("stencil-preview"), u = a("draggable-area"), d = a("bounding-box");
2562
2566
  return o(), w("div", {
2563
2567
  class: c.classes.stencil,
@@ -2628,9 +2632,9 @@ Cn.render = function(e, t, n, i, s, c) {
2628
2632
  "onResizeEnd"
2629
2633
  ])], 6);
2630
2634
  };
2631
- var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2635
+ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2632
2636
  name: "Cropper",
2633
- components: { BackgroundWrapper: vn },
2637
+ components: { BackgroundWrapper: xn },
2634
2638
  props: {
2635
2639
  src: {
2636
2640
  type: String,
@@ -2639,13 +2643,13 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2639
2643
  stencilComponent: {
2640
2644
  type: [Object, String],
2641
2645
  default: function() {
2642
- return Cn;
2646
+ return En;
2643
2647
  }
2644
2648
  },
2645
2649
  backgroundWrapperComponent: {
2646
2650
  type: [Object, String],
2647
2651
  default: function() {
2648
- return vn;
2652
+ return xn;
2649
2653
  }
2650
2654
  },
2651
2655
  stencilProps: {
@@ -2694,7 +2698,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2694
2698
  type: String,
2695
2699
  default: "fit-area",
2696
2700
  validator: function(e) {
2697
- return vt.indexOf(e) !== -1;
2701
+ return xt.indexOf(e) !== -1;
2698
2702
  }
2699
2703
  },
2700
2704
  roundResult: {
@@ -2740,28 +2744,28 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2740
2744
  a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), K.forEach((function(e) {
2741
2745
  l[e] || (c[e] = 0);
2742
2746
  }));
2743
- var u = Y(o, c = Zt({
2747
+ var u = Y(o, c = en({
2744
2748
  coordinates: o,
2745
2749
  directions: c,
2746
2750
  sizeRestrictions: a,
2747
2751
  positionRestrictions: i
2748
- })).width, d = Y(o, c).height, f = s.preserveRatio ? Q(o) : Et(u / d, r);
2752
+ })).width, d = Y(o, c).height, f = s.preserveRatio ? Q(o) : kt(u / d, r);
2749
2753
  if (f) {
2750
2754
  var p = s.respectDirection;
2751
2755
  if (p ||= o.width >= o.height || f === 1 ? "width" : "height", p === "width") {
2752
2756
  var m = u / f - o.height;
2753
2757
  if (l.top && l.bottom) {
2754
2758
  var h = c.top, g = c.bottom;
2755
- c.bottom = Qt(m, g, h), c.top = Qt(m, h, g);
2759
+ c.bottom = tn(m, g, h), c.top = tn(m, h, g);
2756
2760
  } else l.bottom ? c.bottom = m : l.top ? c.top = m : l.right ? c.right = 0 : l.left && (c.left = 0);
2757
2761
  } else if (p === "height") {
2758
2762
  var _ = o.width - d * f;
2759
2763
  if (l.left && l.right) {
2760
2764
  var v = c.left, y = c.right;
2761
- c.left = -Qt(_, v, y), c.right = -Qt(_, y, v);
2765
+ c.left = -tn(_, v, y), c.right = -tn(_, y, v);
2762
2766
  } else l.left ? c.left = -_ : l.right ? c.right = -_ : l.top ? c.top = 0 : l.bottom && (c.bottom = 0);
2763
2767
  }
2764
- c = Zt({
2768
+ c = en({
2765
2769
  directions: c,
2766
2770
  coordinates: o,
2767
2771
  sizeRestrictions: a,
@@ -2770,10 +2774,10 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2770
2774
  compensate: s.compensate
2771
2775
  });
2772
2776
  }
2773
- return u = Y(o, c).width, d = Y(o, c).height, (f = s.preserveRatio ? Q(o) : Et(u / d, r)) && Math.abs(f - u / d) > .001 && K.forEach((function(e) {
2777
+ return u = Y(o, c).width, d = Y(o, c).height, (f = s.preserveRatio ? Q(o) : kt(u / d, r)) && Math.abs(f - u / d) > .001 && K.forEach((function(e) {
2774
2778
  l[e] || (c[e] = 0);
2775
- })), Rt({
2776
- event: new ct({
2779
+ })), Vt({
2780
+ event: new dt({
2777
2781
  left: -c.left,
2778
2782
  top: -c.top
2779
2783
  }),
@@ -2789,7 +2793,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2789
2793
  },
2790
2794
  moveAlgorithm: {
2791
2795
  type: Function,
2792
- default: Rt
2796
+ default: Vt
2793
2797
  },
2794
2798
  initStretcher: {
2795
2799
  type: Function,
@@ -2801,7 +2805,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2801
2805
  fitCoordinates: {
2802
2806
  type: Function,
2803
2807
  default: function(e) {
2804
- var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = W(W({}, n), Lt({
2808
+ var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = W(W({}, n), Bt({
2805
2809
  width: n.width,
2806
2810
  height: n.height,
2807
2811
  aspectRatio: r,
@@ -2812,7 +2816,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2812
2816
  minWidth: Math.min(t.width, i.minWidth)
2813
2817
  }
2814
2818
  }));
2815
- return o = $(o = X(o, xt(J(n), J(o))), Pt(q(t), a));
2819
+ return o = $(o = X(o, wt(J(n), J(o))), Lt(q(t), a));
2816
2820
  }
2817
2821
  },
2818
2822
  fitVisibleArea: {
@@ -2820,7 +2824,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2820
2824
  default: function(e) {
2821
2825
  var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = W({}, t);
2822
2826
  a.height = a.width / Q(n), a.top += (t.height - a.height) / 2, (i.height - a.height > 0 || i.width - a.width > 0) && (a = Z(a, Math.max(i.height / a.height, i.width / a.width)));
2823
- var o = Ct(Tt(i, q(a = Z(a, At(a, r({
2827
+ var o = Et(Ot(i, q(a = Z(a, Nt(a, r({
2824
2828
  visibleArea: a,
2825
2829
  type: "resize"
2826
2830
  }))))));
@@ -2901,7 +2905,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2901
2905
  height: 0
2902
2906
  },
2903
2907
  visibleArea: null,
2904
- coordinates: B({}, yt)
2908
+ coordinates: B({}, St)
2905
2909
  };
2906
2910
  },
2907
2911
  computed: {
@@ -2939,7 +2943,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2939
2943
  return !!(this.visibleArea && this.imageLoaded);
2940
2944
  },
2941
2945
  settings: function() {
2942
- var e = tt(this.resizeImage, {
2946
+ var e = it(this.resizeImage, {
2943
2947
  touch: !0,
2944
2948
  wheel: { ratio: .1 },
2945
2949
  adjustStencil: !0
@@ -2949,7 +2953,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2949
2953
  adjustStencil: !1
2950
2954
  });
2951
2955
  return {
2952
- moveImage: tt(this.moveImage, {
2956
+ moveImage: it(this.moveImage, {
2953
2957
  touch: !0,
2954
2958
  mouse: !0
2955
2959
  }, {
@@ -2980,10 +2984,10 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2980
2984
  if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
2981
2985
  var e = this.sizeRestrictionsAlgorithm({
2982
2986
  imageSize: this.imageSize,
2983
- minWidth: G(this.minWidth) ? 0 : nt(this.minWidth),
2984
- minHeight: G(this.minHeight) ? 0 : nt(this.minHeight),
2985
- maxWidth: G(this.maxWidth) ? 1 / 0 : nt(this.maxWidth),
2986
- maxHeight: G(this.maxHeight) ? 1 / 0 : nt(this.maxHeight)
2987
+ minWidth: G(this.minWidth) ? 0 : at(this.minWidth),
2988
+ minHeight: G(this.minHeight) ? 0 : at(this.minHeight),
2989
+ maxWidth: G(this.maxWidth) ? 1 / 0 : at(this.maxWidth),
2990
+ maxHeight: G(this.maxHeight) ? 1 / 0 : at(this.maxHeight)
2987
2991
  });
2988
2992
  if (e = function(e) {
2989
2993
  var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = W(W({}, n), {
@@ -2993,7 +2997,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
2993
2997
  maxHeight: n.maxHeight === void 0 ? 1 / 0 : n.maxHeight
2994
2998
  });
2995
2999
  i.left !== void 0 && i.right !== void 0 && (a.maxWidth = Math.min(a.maxWidth, i.right - i.left)), i.bottom !== void 0 && i.top !== void 0 && (a.maxHeight = Math.min(a.maxHeight, i.bottom - i.top));
2996
- var o = jt(t), s = Dt(r, o);
3000
+ var o = Pt(t), s = At(r, o);
2997
3001
  return o.width < 1 / 0 && (!a.maxWidth || a.maxWidth > s.width) && (a.maxWidth = Math.min(a.maxWidth, s.width)), o.height < 1 / 0 && (!a.maxHeight || a.maxHeight > s.height) && (a.maxHeight = Math.min(a.maxHeight, s.height)), a.minWidth > a.maxWidth && (a.minWidth = a.maxWidth, a.widthFrozen = !0), a.minHeight > a.maxHeight && (a.minHeight = a.maxHeight, a.heightFrozen = !0), a;
2998
3002
  }({
2999
3003
  sizeRestrictions: e,
@@ -3008,7 +3012,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3008
3012
  visibleArea: this.visibleArea,
3009
3013
  stencilSize: this.getStencilSize()
3010
3014
  }), this.visibleArea && this.stencilSize) {
3011
- var t = this.getStencilSize(), n = jt(this.getAreaRestrictions({
3015
+ var t = this.getStencilSize(), n = Pt(this.getAreaRestrictions({
3012
3016
  visibleArea: this.visibleArea,
3013
3017
  type: "resize"
3014
3018
  }));
@@ -3031,15 +3035,15 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3031
3035
  },
3032
3036
  classes: function() {
3033
3037
  return {
3034
- cropper: Tn(),
3035
- image: H(Tn("image"), this.imageClass),
3036
- stencil: Tn("stencil"),
3037
- boundaries: H(Tn("boundaries"), this.boundariesClass),
3038
- stretcher: H(Tn("stretcher")),
3039
- background: H(Tn("background"), this.backgroundClass),
3040
- foreground: H(Tn("foreground"), this.foregroundClass),
3041
- imageWrapper: H(Tn("image-wrapper")),
3042
- cropperWrapper: H(Tn("cropper-wrapper"))
3038
+ cropper: On(),
3039
+ image: H(On("image"), this.imageClass),
3040
+ stencil: On("stencil"),
3041
+ boundaries: H(On("boundaries"), this.boundariesClass),
3042
+ stretcher: H(On("stretcher")),
3043
+ background: H(On("background"), this.backgroundClass),
3044
+ foreground: H(On("foreground"), this.foregroundClass),
3045
+ imageWrapper: H(On("image-wrapper")),
3046
+ cropperWrapper: H(On("cropper-wrapper"))
3043
3047
  };
3044
3048
  },
3045
3049
  stencilCoordinates: function() {
@@ -3084,7 +3088,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3084
3088
  height: `${e.height}px`,
3085
3089
  left: "0px",
3086
3090
  top: "0px",
3087
- transform: `translate(${-t.left - n.left - this.imageTransforms.translateX}px, ${-t.top - n.top - this.imageTransforms.translateY}px)` + mn(r)
3091
+ transform: `translate(${-t.left - n.left - this.imageTransforms.translateX}px, ${-t.top - n.top - this.imageTransforms.translateY}px)` + _n(r)
3088
3092
  };
3089
3093
  return this.transitionsOptions.enabled && (i.transition = `${this.transitionsOptions.time}ms ${this.transitionsOptions.timingFunction}`), i;
3090
3094
  }
@@ -3125,7 +3129,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3125
3129
  }
3126
3130
  },
3127
3131
  created: function() {
3128
- this.debouncedUpdate = Ye(this.update, this.debounce), this.debouncedDisableTransitions = Ye(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3132
+ this.debouncedUpdate = Qe(this.update, this.debounce), this.debouncedDisableTransitions = Qe(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3129
3133
  },
3130
3134
  mounted: function() {
3131
3135
  this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
@@ -3161,7 +3165,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3161
3165
  },
3162
3166
  zoom: function(e, t) {
3163
3167
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3164
- this.onManipulateImage(new ot({}, {
3168
+ this.onManipulateImage(new lt({}, {
3165
3169
  factor: 1 / e,
3166
3170
  center: t
3167
3171
  }), {
@@ -3171,7 +3175,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3171
3175
  },
3172
3176
  move: function(e, t) {
3173
3177
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3174
- this.onManipulateImage(new ot({
3178
+ this.onManipulateImage(new lt({
3175
3179
  left: e || 0,
3176
3180
  top: t || 0
3177
3181
  }), {
@@ -3215,13 +3219,13 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3215
3219
  };
3216
3220
  return i.width > n.maxWidth ? i.width = Math.floor(t.width) : i.width < n.minWidth && (i.width = Math.ceil(t.width)), i.height > n.maxHeight ? i.height = Math.floor(t.height) : i.height < n.minHeight && (i.height = Math.ceil(t.height)), $(i, r);
3217
3221
  }(B(B({}, this.getPublicProperties()), {}, {
3218
- positionRestrictions: qt(this.positionRestrictions, this.visibleArea),
3222
+ positionRestrictions: Xt(this.positionRestrictions, this.visibleArea),
3219
3223
  coordinates: e
3220
3224
  })) : e;
3221
3225
  },
3222
3226
  processAutoZoom: function(e, t, n, r) {
3223
3227
  var i = this.autoZoomAlgorithm;
3224
- i ||= this.stencilSize ? Bt : this.autoZoom ? Vt : Ht;
3228
+ i ||= this.stencilSize ? Ut : this.autoZoom ? Wt : Gt;
3225
3229
  var a = i({
3226
3230
  event: {
3227
3231
  type: e,
@@ -3236,10 +3240,10 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3236
3240
  sizeRestrictions: this.sizeRestrictions,
3237
3241
  stencilSize: this.getStencilSize()
3238
3242
  });
3239
- return B(B({}, a), {}, { changed: !bt(a.visibleArea, t) || !bt(a.coordinates, n) });
3243
+ return B(B({}, a), {}, { changed: !Ct(a.visibleArea, t) || !Ct(a.coordinates, n) });
3240
3244
  },
3241
3245
  runAutoZoom: function(e) {
3242
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = He(t, wn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3246
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Ge(t, Dn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3243
3247
  r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
3244
3248
  },
3245
3249
  normalizeEvent: function(e) {
@@ -3266,7 +3270,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3266
3270
  }
3267
3271
  if (t.type === "move") {
3268
3272
  var a = W(W({}, t), { directions: W({}, t.directions) });
3269
- return _t.forEach((function(e) {
3273
+ return bt.forEach((function(e) {
3270
3274
  a.directions[e] *= r;
3271
3275
  })), a;
3272
3276
  }
@@ -3279,9 +3283,9 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3279
3283
  var r = n.rotate, i = n.flip, a = {
3280
3284
  width: t.naturalWidth,
3281
3285
  height: t.naturalHeight
3282
- }, o = Ot(a, r), s = e.getContext("2d");
3286
+ }, o = jt(a, r), s = e.getContext("2d");
3283
3287
  e.height = o.height, e.width = o.width, s.save();
3284
- var c = kt(J(W({
3288
+ var c = Mt(J(W({
3285
3289
  left: 0,
3286
3290
  top: 0
3287
3291
  }, a)), r);
@@ -3300,7 +3304,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3300
3304
  return t = e, !Number.isNaN(parseFloat(t)) && isFinite(t);
3301
3305
  var t;
3302
3306
  }));
3303
- }, a = Lt({
3307
+ }, a = Bt({
3304
3308
  sizeRestrictions: {
3305
3309
  minWidth: i([r.width, r.minWidth]) || 0,
3306
3310
  minHeight: i([r.height, r.minHeight]) || 0,
@@ -3334,8 +3338,8 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3334
3338
  this.$emit("change", this.getResult());
3335
3339
  },
3336
3340
  applyTransform: function(e) {
3337
- var t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = this.visibleArea && t ? Mt(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, r = this.visibleArea && t ? qt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
3338
- return zt({
3341
+ var t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = this.visibleArea && t ? Ft(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, r = this.visibleArea && t ? Xt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
3342
+ return Ht({
3339
3343
  transform: e,
3340
3344
  coordinates: this.coordinates,
3341
3345
  imageSize: this.imageSize,
@@ -3350,23 +3354,23 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3350
3354
  if (this.$refs.image) {
3351
3355
  this.$refs.cropper, this.$refs.image;
3352
3356
  var t = this.defaultSize;
3353
- t ||= this.stencilSize ? Gt : Wt, this.sizeRestrictions;
3354
- var n = $e(t) ? t({
3357
+ t ||= this.stencilSize ? Jt : qt, this.sizeRestrictions;
3358
+ var n = nt(t) ? t({
3355
3359
  boundaries: this.boundaries,
3356
3360
  imageSize: this.imageSize,
3357
3361
  aspectRatio: this.getAspectRatio(),
3358
3362
  sizeRestrictions: this.sizeRestrictions,
3359
3363
  stencilSize: this.getStencilSize(),
3360
3364
  visibleArea: this.visibleArea
3361
- }) : t, r = this.defaultPosition || Ut, i = [n, function(t) {
3365
+ }) : t, r = this.defaultPosition || Kt, i = [n, function(t) {
3362
3366
  var n = t.coordinates;
3363
- return B({}, $e(r) ? r({
3367
+ return B({}, nt(r) ? r({
3364
3368
  coordinates: n,
3365
3369
  imageSize: e.imageSize,
3366
3370
  visibleArea: e.visibleArea
3367
3371
  }) : e.defaultPosition);
3368
3372
  }];
3369
- this.delayedTransforms && i.push.apply(i, Ue(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3373
+ this.delayedTransforms && i.push.apply(i, Ke(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3370
3374
  }
3371
3375
  },
3372
3376
  clearImage: function() {
@@ -3396,7 +3400,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3396
3400
  cropper: n,
3397
3401
  imageSize: e.imageSize
3398
3402
  };
3399
- if (e.boundaries = $e(e.defaultBoundaries) ? e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? function(e) {
3403
+ if (e.boundaries = nt(e.defaultBoundaries) ? e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? function(e) {
3400
3404
  var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
3401
3405
  return o > i && (o = i, a = n.height * i / n.width), {
3402
3406
  width: o,
@@ -3415,8 +3419,8 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3415
3419
  var e = this;
3416
3420
  return this.appliedImageTransforms = B(B({}, this.defaultImageTransforms), {}, { flip: B({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
3417
3421
  e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
3418
- var t, n, r, i, a, o, s = e.defaultVisibleArea || Kt;
3419
- e.visibleArea = $e(s) ? s({
3422
+ var t, n, r, i, a, o, s = e.defaultVisibleArea || Yt;
3423
+ e.visibleArea = nt(s) ? s({
3420
3424
  imageSize: e.imageSize,
3421
3425
  boundaries: e.boundaries,
3422
3426
  coordinates: e.priority === "visible-area" ? null : e.coordinates,
@@ -3467,7 +3471,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3467
3471
  var e, t = this;
3468
3472
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
3469
3473
  if (function(e) {
3470
- if (Qe(e)) return !1;
3474
+ if (tt(e)) return !1;
3471
3475
  var t = window.location, n = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e) || [], r = {
3472
3476
  protocol: n[1] || "",
3473
3477
  host: n[2] || "",
@@ -3482,8 +3486,8 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3482
3486
  }
3483
3487
  if (this.checkOrientation) {
3484
3488
  var r = (e = this.src, new Promise((function(t) {
3485
- pn(e).then((function(n) {
3486
- var r = hn(n);
3489
+ gn(e).then((function(n) {
3490
+ var r = vn(n);
3487
3491
  t(n ? {
3488
3492
  source: e,
3489
3493
  arrayBuffer: n,
@@ -3520,14 +3524,14 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3520
3524
  },
3521
3525
  onParseImage: function(e) {
3522
3526
  var t = this, n = e.source, r = e.arrayBuffer, i = e.orientation;
3523
- this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? Ze(n) || !Qe(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
3527
+ this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? et(n) || !tt(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
3524
3528
  for (var t = [], n = new Uint8Array(e); n.length > 0;) {
3525
3529
  var r = n.subarray(0, 8192);
3526
3530
  t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
3527
3531
  }
3528
3532
  return "data:image/jpeg;base64," + btoa(t.join(""));
3529
- }(r) : this.imageAttributes.src = n, this.appliedImageTransforms = $e(this.defaultTransforms) ? fn(this.defaultTransforms()) : et(this.defaultTransforms) ? fn(this.defaultTransforms) : function(e) {
3530
- var t = fn({});
3533
+ }(r) : this.imageAttributes.src = n, this.appliedImageTransforms = nt(this.defaultTransforms) ? hn(this.defaultTransforms()) : rt(this.defaultTransforms) ? hn(this.defaultTransforms) : function(e) {
3534
+ var t = hn({});
3531
3535
  if (e) switch (e) {
3532
3536
  case 2:
3533
3537
  t.flip.horizontal = !0;
@@ -3567,7 +3571,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3567
3571
  var t = this;
3568
3572
  this.transitionsOptions.enabled || this.awaitRender((function() {
3569
3573
  t.coordinates = t.moveAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3570
- positionRestrictions: qt(t.positionRestrictions, t.visibleArea),
3574
+ positionRestrictions: Xt(t.positionRestrictions, t.visibleArea),
3571
3575
  coordinates: t.coordinates,
3572
3576
  event: t.normalizeEvent(e)
3573
3577
  })), t.onChange();
@@ -3578,7 +3582,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3578
3582
  this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender((function() {
3579
3583
  var n = t.sizeRestrictions, r = Math.min(t.coordinates.width, t.coordinates.height, 20 * t.coefficient);
3580
3584
  t.coordinates = t.resizeAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3581
- positionRestrictions: qt(t.positionRestrictions, t.visibleArea),
3585
+ positionRestrictions: Xt(t.positionRestrictions, t.visibleArea),
3582
3586
  sizeRestrictions: {
3583
3587
  maxWidth: Math.min(n.maxWidth, t.visibleArea.width),
3584
3588
  maxHeight: Math.min(n.maxHeight, t.visibleArea.height),
@@ -3594,7 +3598,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3594
3598
  if (!this.transitionsOptions.enabled) {
3595
3599
  var n = t.transitions, r = n !== void 0 && n, i = t.normalize, a = i === void 0 || i;
3596
3600
  r && this.enableTransitions();
3597
- var o = Jt(B(B({}, this.getPublicProperties()), {}, {
3601
+ var o = Zt(B(B({}, this.getPublicProperties()), {}, {
3598
3602
  event: a ? this.normalizeEvent(e) : e,
3599
3603
  getAreaRestrictions: this.getAreaRestrictions,
3600
3604
  imageRestriction: this.imageRestriction,
@@ -3624,7 +3628,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3624
3628
  }
3625
3629
  if (G(t) && (t = G(i) ? a : i), G(n) && (n = G(i) ? o : i), !e && (G(t) || G(n))) {
3626
3630
  var c = this.getStencilSize(), l = c ? Q(c) : null;
3627
- G(t) && (t = rt(l) ? l : void 0), G(n) && (n = rt(l) ? l : void 0);
3631
+ G(t) && (t = ot(l) ? l : void 0), G(n) && (n = ot(l) ? l : void 0);
3628
3632
  }
3629
3633
  return {
3630
3634
  minimum: t,
@@ -3642,10 +3646,10 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3642
3646
  coefficient: this.coefficient,
3643
3647
  coordinates: this.coordinates,
3644
3648
  aspectRatio: this.getAspectRatio(!0)
3645
- }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, Et(Q(i = $e(n) ? n({
3649
+ }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, kt(Q(i = nt(n) ? n({
3646
3650
  boundaries: t,
3647
3651
  aspectRatio: r
3648
- }) : n), r) && (i = Lt({
3652
+ }) : n), r) && (i = Bt({
3649
3653
  sizeRestrictions: {
3650
3654
  maxWidth: t.width,
3651
3655
  maxHeight: t.height,
@@ -3658,7 +3662,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3658
3662
  minimum: r.minimum,
3659
3663
  maximum: r.maximum
3660
3664
  }
3661
- })), (i.width > t.width || i.height > t.height) && (i = Lt({
3665
+ })), (i.width > t.width || i.height > t.height) && (i = Bt({
3662
3666
  sizeRestrictions: {
3663
3667
  maxWidth: t.width,
3664
3668
  maxHeight: t.height,
@@ -3687,13 +3691,13 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3687
3691
  };
3688
3692
  },
3689
3693
  defaultCoordinates: function() {
3690
- return B({}, yt);
3694
+ return B({}, St);
3691
3695
  },
3692
3696
  flip: function(e, t) {
3693
3697
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3694
3698
  if (!this.transitionsActive) {
3695
3699
  r && this.enableTransitions();
3696
- var i = B({}, this.imageTransforms.flip), a = Xt({
3700
+ var i = B({}, this.imageTransforms.flip), a = $t({
3697
3701
  flip: {
3698
3702
  horizontal: e ? !i.horizontal : i.horizontal,
3699
3703
  vertical: t ? !i.vertical : i.vertical
@@ -3717,7 +3721,7 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3717
3721
  n && this.enableTransitions();
3718
3722
  var r = B({}, this.imageSize);
3719
3723
  this.appliedImageTransforms.rotate += e;
3720
- var i = Yt({
3724
+ var i = Qt({
3721
3725
  visibleArea: this.visibleArea,
3722
3726
  coordinates: this.coordinates,
3723
3727
  previousImageSize: r,
@@ -3737,16 +3741,16 @@ var wn = ["transitions"], Tn = U("vue-advanced-cropper"), En = {
3737
3741
  "error",
3738
3742
  "ready"
3739
3743
  ]
3740
- }, Dn = {
3744
+ }, An = {
3741
3745
  key: 0,
3742
3746
  ref: "canvas",
3743
3747
  style: { display: "none" }
3744
- }, On = {
3748
+ }, jn = {
3745
3749
  key: 1,
3746
3750
  ref: "sourceCanvas",
3747
3751
  style: { display: "none" }
3748
3752
  };
3749
- En.render = function(e, t, n, i, a, c) {
3753
+ kn.render = function(e, t, n, i, a, c) {
3750
3754
  return o(), w("div", {
3751
3755
  ref: "cropper",
3752
3756
  class: c.classes.cropper
@@ -3804,8 +3808,8 @@ En.render = function(e, t, n, i, a, c) {
3804
3808
  "onMove",
3805
3809
  "onMoveEnd"
3806
3810
  ])), [[j, a.imageLoaded]]),
3807
- n.canvas ? (o(), w("canvas", Dn, null, 512)) : b("", !0),
3808
- n.canvas ? (o(), w("canvas", On, null, 512)) : b("", !0)
3811
+ n.canvas ? (o(), w("canvas", An, null, 512)) : b("", !0),
3812
+ n.canvas ? (o(), w("canvas", jn, null, 512)) : b("", !0)
3809
3813
  ];
3810
3814
  })),
3811
3815
  _: 1
@@ -3821,57 +3825,57 @@ En.render = function(e, t, n, i, a, c) {
3821
3825
  };
3822
3826
  //#endregion
3823
3827
  //#region ../media-library/src/components/media/MediaEditModal.vue?vue&type=script&setup=true&lang.ts
3824
- var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn = {
3828
+ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn = {
3825
3829
  class: "tpl:text-sm tpl:font-semibold",
3826
3830
  style: { color: "var(--tpl-text)" }
3827
- }, Mn = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:px-5" }, Nn = {
3831
+ }, Fn = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:px-5" }, In = {
3828
3832
  key: 0,
3829
3833
  class: "tpl:mb-4"
3830
- }, Pn = {
3834
+ }, Ln = {
3831
3835
  class: "tpl:relative tpl:mb-3 tpl:overflow-hidden tpl:rounded-md tpl:border",
3832
3836
  style: {
3833
3837
  "border-color": "var(--tpl-border)",
3834
3838
  height: "300px",
3835
3839
  "background-color": "var(--tpl-bg)"
3836
3840
  }
3837
- }, Fn = { class: "tpl:space-y-3" }, In = {
3841
+ }, Rn = { class: "tpl:space-y-3" }, zn = {
3838
3842
  class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium",
3839
3843
  style: { color: "var(--tpl-text-muted)" }
3840
- }, Ln = { class: "tpl:flex tpl:flex-wrap tpl:gap-1.5" }, Rn = ["onClick"], zn = { class: "tpl:flex tpl:gap-3" }, Bn = { class: "tpl:flex-1" }, Vn = {
3844
+ }, Bn = { class: "tpl:flex tpl:flex-wrap tpl:gap-1.5" }, Vn = ["onClick"], Hn = { class: "tpl:flex tpl:gap-3" }, Un = { class: "tpl:flex-1" }, Wn = {
3841
3845
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
3842
3846
  style: { color: "var(--tpl-text-muted)" }
3843
- }, Hn = {
3847
+ }, Gn = {
3844
3848
  class: "tpl:font-normal",
3845
3849
  style: { color: "var(--tpl-text-dim)" }
3846
- }, Un = { class: "tpl:relative" }, Wn = ["value", "placeholder"], Gn = {
3850
+ }, Kn = { class: "tpl:relative" }, qn = ["value", "placeholder"], Jn = {
3847
3851
  class: "tpl:absolute tpl:top-1/2 tpl:right-2.5 tpl:-translate-y-1/2 tpl:text-xs",
3848
3852
  style: { color: "var(--tpl-text-dim)" }
3849
- }, Kn = { class: "tpl:flex-1" }, qn = {
3853
+ }, Yn = { class: "tpl:flex-1" }, Xn = {
3850
3854
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
3851
3855
  style: { color: "var(--tpl-text-muted)" }
3852
- }, Jn = {
3856
+ }, Zn = {
3853
3857
  class: "tpl:font-normal",
3854
3858
  style: { color: "var(--tpl-text-dim)" }
3855
- }, Yn = { class: "tpl:relative" }, Xn = ["value", "placeholder"], Zn = {
3859
+ }, Qn = { class: "tpl:relative" }, $n = ["value", "placeholder"], er = {
3856
3860
  class: "tpl:absolute tpl:top-1/2 tpl:right-2.5 tpl:-translate-y-1/2 tpl:text-xs",
3857
3861
  style: { color: "var(--tpl-text-dim)" }
3858
- }, Qn = {
3862
+ }, tr = {
3859
3863
  key: 0,
3860
3864
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
3861
3865
  style: { color: "var(--tpl-text-muted)" }
3862
- }, $n = {
3866
+ }, nr = {
3863
3867
  class: "tpl:font-medium",
3864
3868
  style: { color: "var(--tpl-text)" }
3865
- }, er = { class: "tpl:mb-3" }, tr = {
3869
+ }, rr = { class: "tpl:mb-3" }, ir = {
3866
3870
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
3867
3871
  style: { color: "var(--tpl-text-muted)" }
3868
- }, nr = ["autofocus"], rr = {
3872
+ }, ar = ["autofocus"], or = {
3869
3873
  key: 1,
3870
3874
  class: "tpl:mb-4"
3871
- }, ir = {
3875
+ }, sr = {
3872
3876
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
3873
3877
  style: { color: "var(--tpl-text-muted)" }
3874
- }, ar = ["placeholder"], or = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, sr = ["disabled"], cr = /*#__PURE__*/ we(/* @__PURE__ */ d({
3878
+ }, cr = ["placeholder"], lr = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ur = ["disabled"], dr = /*#__PURE__*/ we(/* @__PURE__ */ d({
3875
3879
  __name: "MediaEditModal",
3876
3880
  props: {
3877
3881
  visible: { type: Boolean },
@@ -3879,12 +3883,12 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
3879
3883
  },
3880
3884
  emits: ["save", "close"],
3881
3885
  setup(i, { emit: a }) {
3882
- let s = i, c = a, { t: u } = z(), d = t("tplUiTheme"), h = t(Pe, l(null)), x = u.mediaLibrary, { isImageMimeType: E } = Fe(), k = l(""), A = l(""), j = l(null), P = l("free"), ee = l(void 0), te = l(void 0), ne = l(""), re = l(""), ie = l(void 0), I = l(null), ae = l(!1), oe = l(!1), se = l(!1), ce = v(() => s.item ? [
3886
+ let s = i, c = a, { t: u } = z(), d = t(Ne, null), h = t(je, l(null)), x = u.mediaLibrary, { isImageMimeType: E } = Re(), k = l(""), A = l(""), j = l(null), P = l("free"), ee = l(void 0), te = l(void 0), ne = l(""), re = l(""), ie = l(void 0), I = l(null), ae = l(!1), oe = l(!1), se = l(!1), ce = v(() => s.item ? [
3883
3887
  "image/jpeg",
3884
3888
  "image/png",
3885
3889
  "image/webp",
3886
3890
  "image/gif"
3887
- ].includes(s.item.mime_type) : !1), le = v(() => P.value === "original" ? ie.value : Ie[P.value]), ue = v(() => I.value ? Be(I.value.width, I.value.height, ee.value, te.value) : null);
3891
+ ].includes(s.item.mime_type) : !1), le = v(() => P.value === "original" ? ie.value : ze[P.value]), ue = v(() => I.value ? Ue(I.value.width, I.value.height, ee.value, te.value) : null);
3888
3892
  e(() => s.visible, (e) => {
3889
3893
  e && s.item && (k.value = s.item.filename, A.value = s.item.alt_text || "", P.value = "free", ee.value = void 0, te.value = void 0, ne.value = "", re.value = "", ie.value = void 0, I.value = null, ae.value = !1, se.value = !1, s.item.width && s.item.height && (ie.value = s.item.width / s.item.height));
3890
3894
  });
@@ -3914,8 +3918,8 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
3914
3918
  try {
3915
3919
  let { canvas: e } = j.value.getResult();
3916
3920
  if (e) {
3917
- let t = Re(e, ee.value, te.value), r = Le(s.item.mime_type);
3918
- n = { file: await ze(t, s.item.filename, r) };
3921
+ let t = Ve(e, ee.value, te.value), r = Be(s.item.mime_type);
3922
+ n = { file: await He(t, s.item.filename, r) };
3919
3923
  }
3920
3924
  } catch {
3921
3925
  oe.value = !1;
@@ -3947,9 +3951,9 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
3947
3951
  class: g(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", ce.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
3948
3952
  style: { "background-color": "var(--tpl-bg-elevated)" }
3949
3953
  }, [
3950
- O("div", An, [O("h3", jn, N(p(u).mediaLibrary.editFile), 1)]),
3951
- O("div", Mn, [
3952
- ce.value ? (o(), y("div", Nn, [O("div", Pn, [m(p(En), {
3954
+ O("div", Nn, [O("h3", Pn, N(p(u).mediaLibrary.editFile), 1)]),
3955
+ O("div", Fn, [
3956
+ ce.value ? (o(), y("div", In, [O("div", Ln, [m(p(kn), {
3953
3957
  ref_key: "cropperRef",
3954
3958
  ref: j,
3955
3959
  src: i.item.url,
@@ -3958,8 +3962,8 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
3958
3962
  "background-class": "tpl-cropper-background",
3959
3963
  onChange: de,
3960
3964
  onReady: fe
3961
- }, null, 8, ["src", "stencil-props"])]), O("div", Fn, [
3962
- O("div", null, [O("label", In, N(p(u).mediaLibrary.cropAspectRatio), 1), O("div", Ln, [(o(), y(M, null, n([
3965
+ }, null, 8, ["src", "stencil-props"])]), O("div", Rn, [
3966
+ O("div", null, [O("label", zn, N(p(u).mediaLibrary.cropAspectRatio), 1), O("div", Bn, [(o(), y(M, null, n([
3963
3967
  "free",
3964
3968
  "square",
3965
3969
  "landscape43",
@@ -3975,8 +3979,8 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
3975
3979
  color: P.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
3976
3980
  }),
3977
3981
  onClick: (t) => P.value = e
3978
- }, N(p(x)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Rn)), 64))])]),
3979
- O("div", zn, [O("div", Bn, [O("label", Vn, [F(N(p(u).mediaLibrary.cropMaxWidth) + " ", 1), O("span", Hn, N(p(u).mediaLibrary.cropOptional), 1)]), O("div", Un, [O("input", {
3982
+ }, N(p(x)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Vn)), 64))])]),
3983
+ O("div", Hn, [O("div", Un, [O("label", Wn, [F(N(p(u).mediaLibrary.cropMaxWidth) + " ", 1), O("span", Gn, N(p(u).mediaLibrary.cropOptional), 1)]), O("div", Kn, [O("input", {
3980
3984
  value: ne.value,
3981
3985
  type: "number",
3982
3986
  min: "1",
@@ -3988,7 +3992,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
3988
3992
  },
3989
3993
  placeholder: I.value?.width?.toString() || "",
3990
3994
  onInput: pe
3991
- }, null, 40, Wn), O("span", Gn, N(p(u).mediaLibrary.cropPixels), 1)])]), O("div", Kn, [O("label", qn, [F(N(p(u).mediaLibrary.cropMaxHeight) + " ", 1), O("span", Jn, N(p(u).mediaLibrary.cropOptional), 1)]), O("div", Yn, [O("input", {
3995
+ }, null, 40, qn), O("span", Jn, N(p(u).mediaLibrary.cropPixels), 1)])]), O("div", Yn, [O("label", Xn, [F(N(p(u).mediaLibrary.cropMaxHeight) + " ", 1), O("span", Zn, N(p(u).mediaLibrary.cropOptional), 1)]), O("div", Qn, [O("input", {
3992
3996
  value: re.value,
3993
3997
  type: "number",
3994
3998
  min: "1",
@@ -4000,10 +4004,10 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4000
4004
  },
4001
4005
  placeholder: I.value?.height?.toString() || "",
4002
4006
  onInput: me
4003
- }, null, 40, Xn), O("span", Zn, N(p(u).mediaLibrary.cropPixels), 1)])])]),
4004
- ue.value ? (o(), y("div", Qn, [O("span", null, N(p(u).mediaLibrary.cropOutputSize) + ": ", 1), O("span", $n, N(ue.value.width) + " x " + N(ue.value.height) + " " + N(p(u).mediaLibrary.cropPixels), 1)])) : b("", !0)
4007
+ }, null, 40, $n), O("span", er, N(p(u).mediaLibrary.cropPixels), 1)])])]),
4008
+ ue.value ? (o(), y("div", tr, [O("span", null, N(p(u).mediaLibrary.cropOutputSize) + ": ", 1), O("span", nr, N(ue.value.width) + " x " + N(ue.value.height) + " " + N(p(u).mediaLibrary.cropPixels), 1)])) : b("", !0)
4005
4009
  ])])) : b("", !0),
4006
- O("div", er, [O("label", tr, N(p(u).mediaLibrary.fileName), 1), f(O("input", {
4010
+ O("div", rr, [O("label", ir, N(p(u).mediaLibrary.fileName), 1), f(O("input", {
4007
4011
  "onUpdate:modelValue": t[0] ||= (e) => k.value = e,
4008
4012
  type: "text",
4009
4013
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
@@ -4013,8 +4017,8 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4013
4017
  color: "var(--tpl-text)"
4014
4018
  },
4015
4019
  autofocus: !ce.value
4016
- }, null, 8, nr), [[D, k.value]])]),
4017
- p(E)(i.item.mime_type) ? (o(), y("div", rr, [O("label", ir, N(p(u).mediaLibrary.altText), 1), f(O("input", {
4020
+ }, null, 8, ar), [[D, k.value]])]),
4021
+ p(E)(i.item.mime_type) ? (o(), y("div", or, [O("label", sr, N(p(u).mediaLibrary.altText), 1), f(O("input", {
4018
4022
  "onUpdate:modelValue": t[1] ||= (e) => A.value = e,
4019
4023
  type: "text",
4020
4024
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
@@ -4024,9 +4028,9 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4024
4028
  color: "var(--tpl-text)"
4025
4029
  },
4026
4030
  placeholder: p(u).mediaLibrary.altTextPlaceholder
4027
- }, null, 8, ar), [[D, A.value]])])) : b("", !0)
4031
+ }, null, 8, cr), [[D, A.value]])])) : b("", !0)
4028
4032
  ]),
4029
- O("div", or, [O("button", {
4033
+ O("div", lr, [O("button", {
4030
4034
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
4031
4035
  style: {
4032
4036
  "border-color": "var(--tpl-border)",
@@ -4039,21 +4043,21 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4039
4043
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4040
4044
  disabled: oe.value,
4041
4045
  onClick: he
4042
- }, N(oe.value ? p(u).mediaLibrary.saving : p(u).mediaLibrary.saveChanges), 9, sr)])
4043
- ], 2)], 40, kn)) : b("", !0)]),
4046
+ }, N(oe.value ? p(u).mediaLibrary.saving : p(u).mediaLibrary.saveChanges), 9, ur)])
4047
+ ], 2)], 40, Mn)) : b("", !0)]),
4044
4048
  _: 1
4045
4049
  })], 8, ["to"]));
4046
4050
  }
4047
- }), [["__scopeId", "data-v-1d42dd39"]]), lr = {
4051
+ }), [["__scopeId", "data-v-267faa45"]]), fr = {
4048
4052
  key: 1,
4049
4053
  class: "tpl:size-4 tpl:shrink-0"
4050
- }, ur = {
4054
+ }, pr = {
4051
4055
  key: 0,
4052
4056
  class: "tpl:truncate"
4053
- }, dr = {
4057
+ }, mr = {
4054
4058
  key: 3,
4055
4059
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:opacity-0 tpl:transition-opacity tpl:group-hover:opacity-100"
4056
- }, fr = ["title"], pr = ["title"], mr = { key: 0 }, hr = ["placeholder"], gr = /* @__PURE__ */ d({
4060
+ }, hr = ["title"], gr = ["title"], _r = { key: 0 }, vr = ["placeholder"], yr = /* @__PURE__ */ d({
4057
4061
  __name: "MediaFolderTreeNode",
4058
4062
  props: {
4059
4063
  folder: {},
@@ -4112,7 +4116,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4112
4116
  class: g(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": j.value }]),
4113
4117
  size: 10,
4114
4118
  "stroke-width": 2
4115
- }, null, 8, ["class"])])) : (o(), y("span", lr)),
4119
+ }, null, 8, ["class"])])) : (o(), y("span", fr)),
4116
4120
  O("button", {
4117
4121
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
4118
4122
  onClick: r[0] ||= (t) => i("navigate", e.folder.id)
@@ -4120,7 +4124,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4120
4124
  class: "tpl:shrink-0",
4121
4125
  size: 14,
4122
4126
  "stroke-width": 1.5
4123
- }), u.value ? b("", !0) : (o(), y("span", ur, N(e.folder.name), 1))]),
4127
+ }), u.value ? b("", !0) : (o(), y("span", pr, N(e.folder.name), 1))]),
4124
4128
  u.value ? f((o(), y("input", {
4125
4129
  key: 2,
4126
4130
  "onUpdate:modelValue": r[1] ||= (e) => d.value = e,
@@ -4136,7 +4140,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4136
4140
  onBlur: te,
4137
4141
  onClick: r[2] ||= S(() => {}, ["stop"])
4138
4142
  }, null, 544)), [[D, d.value]]) : b("", !0),
4139
- u.value ? b("", !0) : (o(), y("span", dr, [
4143
+ u.value ? b("", !0) : (o(), y("span", mr, [
4140
4144
  E.value ? (o(), y("button", {
4141
4145
  key: 0,
4142
4146
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
@@ -4145,7 +4149,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4145
4149
  }, [m(p(pe), {
4146
4150
  size: 12,
4147
4151
  "stroke-width": 2
4148
- })], 8, fr)) : b("", !0),
4152
+ })], 8, hr)) : b("", !0),
4149
4153
  O("button", {
4150
4154
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4151
4155
  title: p(s).mediaLibrary.renameFolder,
@@ -4153,7 +4157,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4153
4157
  }, [m(p(le), {
4154
4158
  size: 12,
4155
4159
  "stroke-width": 2
4156
- })], 8, pr),
4160
+ })], 8, gr),
4157
4161
  O("button", {
4158
4162
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4159
4163
  onClick: r[3] ||= S((t) => i("deleteFolder", e.folder.id), ["stop"])
@@ -4163,7 +4167,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4163
4167
  style: { color: "var(--tpl-danger)" }
4164
4168
  })])
4165
4169
  ]))
4166
- ], 4), j.value ? (o(), y("div", mr, [(o(!0), y(M, null, n(e.folder.children, (t) => (o(), w(c, {
4170
+ ], 4), j.value ? (o(), y("div", _r, [(o(!0), y(M, null, n(e.folder.children, (t) => (o(), w(c, {
4167
4171
  key: t.id,
4168
4172
  folder: t,
4169
4173
  "current-folder-id": e.currentFolderId,
@@ -4193,13 +4197,13 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4193
4197
  autofocus: "",
4194
4198
  onKeydown: [h(ie, ["enter"]), h(I, ["escape"])],
4195
4199
  onBlur: ie
4196
- }, null, 40, hr), [[D, x.value]])], 4)) : b("", !0)])) : b("", !0)]);
4200
+ }, null, 40, vr), [[D, x.value]])], 4)) : b("", !0)])) : b("", !0)]);
4197
4201
  };
4198
4202
  }
4199
- }), _r = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, vr = {
4203
+ }), br = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, xr = {
4200
4204
  key: 0,
4201
4205
  class: "tpl:px-3 tpl:py-2"
4202
- }, yr = ["placeholder"], br = /* @__PURE__ */ d({
4206
+ }, Sr = ["placeholder"], Cr = /* @__PURE__ */ d({
4203
4207
  __name: "MediaFolderTree",
4204
4208
  props: {
4205
4209
  folders: {},
@@ -4225,7 +4229,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4225
4229
  function d() {
4226
4230
  a.value = !1, s.value = "";
4227
4231
  }
4228
- return (t, l) => (o(), y("div", _r, [
4232
+ return (t, l) => (o(), y("div", br, [
4229
4233
  O("button", {
4230
4234
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
4231
4235
  style: C({
@@ -4237,7 +4241,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4237
4241
  size: 14,
4238
4242
  "stroke-width": 1.5
4239
4243
  }), F(" " + N(p(i).mediaLibrary.allFiles), 1)], 4),
4240
- (o(!0), y(M, null, n(e.folders, (t) => (o(), w(gr, {
4244
+ (o(!0), y(M, null, n(e.folders, (t) => (o(), w(yr, {
4241
4245
  key: t.id,
4242
4246
  folder: t,
4243
4247
  "current-folder-id": e.currentFolderId,
@@ -4247,7 +4251,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4247
4251
  onRenameFolder: l[3] ||= (e, t) => r("renameFolder", e, t),
4248
4252
  onDeleteFolder: l[4] ||= (e) => r("deleteFolder", e)
4249
4253
  }, null, 8, ["folder", "current-folder-id"]))), 128)),
4250
- a.value ? (o(), y("div", vr, [f(O("input", {
4254
+ a.value ? (o(), y("div", xr, [f(O("input", {
4251
4255
  "onUpdate:modelValue": l[5] ||= (e) => s.value = e,
4252
4256
  type: "text",
4253
4257
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
@@ -4260,7 +4264,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4260
4264
  autofocus: "",
4261
4265
  onKeydown: [h(u, ["enter"]), h(d, ["escape"])],
4262
4266
  onBlur: u
4263
- }, null, 40, yr), [[D, s.value]])])) : b("", !0),
4267
+ }, null, 40, Sr), [[D, s.value]])])) : b("", !0),
4264
4268
  a.value ? b("", !0) : (o(), y("button", {
4265
4269
  key: 1,
4266
4270
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
@@ -4286,7 +4290,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4286
4290
  }), F(" " + N(p(i).mediaLibrary.frequentlyUsed), 1)], 4)) : b("", !0)
4287
4291
  ]));
4288
4292
  }
4289
- }), xr = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, Sr = /* @__PURE__ */ d({
4293
+ }), wr = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, Tr = /* @__PURE__ */ d({
4290
4294
  __name: "MediaFileIcon",
4291
4295
  props: { mimeType: {} },
4292
4296
  setup(e) {
@@ -4387,7 +4391,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4387
4391
  bgColor: "#f9fafb",
4388
4392
  icon: "document"
4389
4393
  }, i = v(() => n[t.mimeType] ?? r);
4390
- return (e, t) => (o(), y("div", xr, [i.value.icon === "document" ? (o(), y("svg", {
4394
+ return (e, t) => (o(), y("div", wr, [i.value.icon === "document" ? (o(), y("svg", {
4391
4395
  key: 0,
4392
4396
  width: "60",
4393
4397
  height: "60",
@@ -4456,48 +4460,48 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4456
4460
  style: C({ color: i.value.color })
4457
4461
  }, N(i.value.label), 5)]));
4458
4462
  }
4459
- }), Cr = { class: "tpl:p-4" }, wr = {
4463
+ }), Er = { class: "tpl:p-4" }, Dr = {
4460
4464
  key: 1,
4461
4465
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
4462
- }, Tr = {
4466
+ }, Or = {
4463
4467
  class: "tpl:text-xs",
4464
4468
  style: { color: "var(--tpl-text-muted)" }
4465
- }, Er = {
4469
+ }, kr = {
4466
4470
  key: 2,
4467
4471
  class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
4468
- }, Dr = ["onClick"], Or = { class: "tpl:aspect-square" }, kr = ["src", "alt"], Ar = { class: "tpl:px-2 tpl:py-1.5" }, jr = {
4472
+ }, Ar = ["onClick"], jr = { class: "tpl:aspect-square" }, Mr = ["src", "alt"], Nr = { class: "tpl:px-2 tpl:py-1.5" }, Pr = {
4469
4473
  class: "tpl:truncate tpl:text-[10px] tpl:font-medium",
4470
4474
  style: { color: "var(--tpl-text)" }
4471
- }, Mr = {
4475
+ }, Fr = {
4472
4476
  class: "tpl:flex tpl:justify-between tpl:text-[9px]",
4473
4477
  style: { color: "var(--tpl-text-muted)" }
4474
- }, Nr = { key: 0 }, Pr = { class: "tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, Fr = ["title", "onClick"], Ir = ["title", "onClick"], Lr = {
4478
+ }, Ir = { key: 0 }, Lr = { class: "tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, Rr = ["title", "onClick"], zr = ["title", "onClick"], Br = {
4475
4479
  key: 0,
4476
4480
  class: "tpl:absolute tpl:top-1.5 tpl:right-1.5 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4477
4481
  style: { "background-color": "var(--tpl-primary)" }
4478
- }, Rr = {
4482
+ }, Vr = {
4479
4483
  key: 3,
4480
4484
  class: "tpl:flex tpl:flex-col tpl:gap-1"
4481
- }, zr = ["onClick"], Br = {
4485
+ }, Hr = ["onClick"], Ur = {
4482
4486
  class: "tpl:size-10 tpl:shrink-0 tpl:overflow-hidden tpl:rounded",
4483
4487
  style: { "background-color": "var(--tpl-bg-hover)" }
4484
- }, Vr = ["src", "alt"], Hr = {
4488
+ }, Wr = ["src", "alt"], Gr = {
4485
4489
  key: 1,
4486
4490
  class: "tpl-list-icon tpl:size-full"
4487
- }, Ur = { class: "tpl:min-w-0 tpl:flex-1" }, Wr = {
4491
+ }, Kr = { class: "tpl:min-w-0 tpl:flex-1" }, qr = {
4488
4492
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
4489
4493
  style: { color: "var(--tpl-text)" }
4490
- }, Gr = {
4494
+ }, Jr = {
4491
4495
  class: "tpl:text-[10px]",
4492
4496
  style: { color: "var(--tpl-text-muted)" }
4493
- }, Kr = { class: "tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, qr = ["title", "onClick"], Jr = ["title", "onClick"], Yr = {
4497
+ }, Yr = { class: "tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, Xr = ["title", "onClick"], Zr = ["title", "onClick"], Qr = {
4494
4498
  key: 0,
4495
4499
  class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4496
4500
  style: { "background-color": "var(--tpl-primary)" }
4497
- }, Xr = {
4501
+ }, $r = {
4498
4502
  key: 4,
4499
4503
  class: "tpl:flex tpl:justify-center tpl:py-4"
4500
- }, Zr = /*#__PURE__*/ we(/* @__PURE__ */ d({
4504
+ }, ei = /*#__PURE__*/ we(/* @__PURE__ */ d({
4501
4505
  __name: "MediaGrid",
4502
4506
  props: {
4503
4507
  items: {},
@@ -4515,7 +4519,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4515
4519
  "replace"
4516
4520
  ],
4517
4521
  setup(e, { emit: t }) {
4518
- let r = e, i = t, { isAcceptedMimeType: a, isImageMimeType: s } = Fe();
4522
+ let r = e, i = t, { isAcceptedMimeType: a, isImageMimeType: s } = Re();
4519
4523
  function c(e) {
4520
4524
  return !r.accept || r.accept.length === 0 || a(e.mime_type, r.accept);
4521
4525
  }
@@ -4536,7 +4540,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4536
4540
  day: "numeric"
4537
4541
  });
4538
4542
  }
4539
- return (t, r) => (o(), y("div", Cr, [
4543
+ return (t, r) => (o(), y("div", Er, [
4540
4544
  e.isLoading && e.items.length === 0 ? (o(), y("div", {
4541
4545
  key: 0,
4542
4546
  class: g(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
@@ -4544,26 +4548,26 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4544
4548
  key: t,
4545
4549
  class: g(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4546
4550
  style: { "background-color": "var(--tpl-bg-hover)" }
4547
- }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), y("div", wr, [m(p(he), {
4551
+ }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), y("div", Dr, [m(p(he), {
4548
4552
  class: "tpl:mb-3",
4549
4553
  size: 40,
4550
4554
  "stroke-width": 1,
4551
4555
  style: { color: "var(--tpl-text-dim)" }
4552
- }), O("p", Tr, N(p(d).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), y("div", Rr, [(o(!0), y(M, null, n(e.items, (t) => (o(), y("div", {
4556
+ }), O("p", Or, N(p(d).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), y("div", Vr, [(o(!0), y(M, null, n(e.items, (t) => (o(), y("div", {
4553
4557
  key: t.id,
4554
4558
  class: g(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!c(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
4555
4559
  style: C({ backgroundColor: e.selectedIds.has(t.id) ? "var(--tpl-bg-hover)" : "transparent" }),
4556
4560
  onClick: (e) => u(t)
4557
4561
  }, [
4558
- O("div", Br, [p(s)(t.mime_type) ? (o(), y("img", {
4562
+ O("div", Ur, [p(s)(t.mime_type) ? (o(), y("img", {
4559
4563
  key: 0,
4560
4564
  src: t.small_url || t.url,
4561
4565
  alt: t.filename,
4562
4566
  class: "tpl:size-full tpl:object-cover",
4563
4567
  loading: "lazy"
4564
- }, null, 8, Vr)) : (o(), y("div", Hr, [m(Sr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4565
- O("div", Ur, [O("p", Wr, N(t.filename), 1), O("p", Gr, [F(N(h(t.size)) + " · " + N(_(t.created_at)) + " ", 1), p(s)(t.mime_type) && t.width && t.height ? (o(), y(M, { key: 0 }, [F(" · " + N(t.width) + "×" + N(t.height), 1)], 64)) : b("", !0)])]),
4566
- O("div", Kr, [O("button", {
4568
+ }, null, 8, Wr)) : (o(), y("div", Gr, [m(Tr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4569
+ O("div", Kr, [O("p", qr, N(t.filename), 1), O("p", Jr, [F(N(h(t.size)) + " · " + N(_(t.created_at)) + " ", 1), p(s)(t.mime_type) && t.width && t.height ? (o(), y(M, { key: 0 }, [F(" · " + N(t.width) + "×" + N(t.height), 1)], 64)) : b("", !0)])]),
4570
+ O("div", Yr, [O("button", {
4567
4571
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
4568
4572
  style: { color: "var(--tpl-text-muted)" },
4569
4573
  title: p(d).mediaLibrary.editFile,
@@ -4571,7 +4575,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4571
4575
  }, [m(p(le), {
4572
4576
  size: 12,
4573
4577
  "stroke-width": 2
4574
- })], 8, qr), O("button", {
4578
+ })], 8, Xr), O("button", {
4575
4579
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
4576
4580
  style: { color: "var(--tpl-text-muted)" },
4577
4581
  title: p(d).mediaLibrary.replaceFile,
@@ -4579,12 +4583,12 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4579
4583
  }, [m(p(Ce), {
4580
4584
  size: 12,
4581
4585
  "stroke-width": 2
4582
- })], 8, Jr)]),
4583
- e.selectedIds.has(t.id) ? (o(), y("div", Yr, [m(p(ue), {
4586
+ })], 8, Zr)]),
4587
+ e.selectedIds.has(t.id) ? (o(), y("div", Qr, [m(p(ue), {
4584
4588
  size: 12,
4585
4589
  "stroke-width": 3
4586
4590
  })])) : b("", !0)
4587
- ], 14, zr))), 128))])) : (o(), y("div", Er, [(o(!0), y(M, null, n(e.items, (t) => (o(), y("div", {
4591
+ ], 14, Hr))), 128))])) : (o(), y("div", kr, [(o(!0), y(M, null, n(e.items, (t) => (o(), y("div", {
4588
4592
  key: t.id,
4589
4593
  class: g(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
4590
4594
  "tpl:cursor-pointer",
@@ -4597,18 +4601,18 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4597
4601
  }),
4598
4602
  onClick: (e) => u(t)
4599
4603
  }, [
4600
- O("div", Or, [p(s)(t.mime_type) ? (o(), y("img", {
4604
+ O("div", jr, [p(s)(t.mime_type) ? (o(), y("img", {
4601
4605
  key: 0,
4602
4606
  src: t.small_url || t.url,
4603
4607
  alt: t.filename,
4604
4608
  class: "tpl:size-full tpl:object-cover",
4605
4609
  loading: "lazy"
4606
- }, null, 8, kr)) : (o(), w(Sr, {
4610
+ }, null, 8, Mr)) : (o(), w(Tr, {
4607
4611
  key: 1,
4608
4612
  "mime-type": t.mime_type
4609
4613
  }, null, 8, ["mime-type"]))]),
4610
- O("div", Ar, [O("p", jr, N(t.filename), 1), O("p", Mr, [O("span", null, N(h(t.size)), 1), p(s)(t.mime_type) && t.width && t.height ? (o(), y("span", Nr, N(t.width) + "×" + N(t.height), 1)) : b("", !0)])]),
4611
- O("div", Pr, [O("button", {
4614
+ O("div", Nr, [O("p", Pr, N(t.filename), 1), O("p", Fr, [O("span", null, N(h(t.size)), 1), p(s)(t.mime_type) && t.width && t.height ? (o(), y("span", Ir, N(t.width) + "×" + N(t.height), 1)) : b("", !0)])]),
4615
+ O("div", Lr, [O("button", {
4612
4616
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4613
4617
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4614
4618
  title: p(d).mediaLibrary.editFile,
@@ -4616,7 +4620,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4616
4620
  }, [m(p(le), {
4617
4621
  size: 11,
4618
4622
  "stroke-width": 2
4619
- })], 8, Fr), O("button", {
4623
+ })], 8, Rr), O("button", {
4620
4624
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4621
4625
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4622
4626
  title: p(d).mediaLibrary.replaceFile,
@@ -4624,18 +4628,18 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4624
4628
  }, [m(p(Ce), {
4625
4629
  size: 11,
4626
4630
  "stroke-width": 2
4627
- })], 8, Ir)]),
4628
- e.selectedIds.has(t.id) ? (o(), y("div", Lr, [m(p(ue), {
4631
+ })], 8, zr)]),
4632
+ e.selectedIds.has(t.id) ? (o(), y("div", Br, [m(p(ue), {
4629
4633
  size: 12,
4630
4634
  "stroke-width": 3
4631
4635
  })])) : b("", !0)
4632
- ], 14, Dr))), 128))])),
4636
+ ], 14, Ar))), 128))])),
4633
4637
  O("div", {
4634
4638
  ref_key: "sentinelRef",
4635
4639
  ref: f,
4636
4640
  class: "tpl:h-4"
4637
4641
  }, null, 512),
4638
- e.isLoading && e.items.length > 0 ? (o(), y("div", Xr, [m(p(ye), {
4642
+ e.isLoading && e.items.length > 0 ? (o(), y("div", $r, [m(p(ye), {
4639
4643
  class: "tpl-spinner",
4640
4644
  size: 20,
4641
4645
  "stroke-width": 2,
@@ -4643,20 +4647,20 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4643
4647
  })])) : b("", !0)
4644
4648
  ]));
4645
4649
  }
4646
- }), [["__scopeId", "data-v-78d7ed75"]]), Qr = ["data-tpl-theme"], $r = {
4650
+ }), [["__scopeId", "data-v-78d7ed75"]]), ti = ["data-tpl-theme"], ni = {
4647
4651
  class: "tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
4648
4652
  style: { "background-color": "var(--tpl-bg-elevated)" }
4649
- }, ei = {
4653
+ }, ri = {
4650
4654
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold",
4651
4655
  style: { color: "var(--tpl-text)" }
4652
- }, ti = { class: "tpl:mb-3" }, ni = ["placeholder", "disabled"], ri = {
4656
+ }, ii = { class: "tpl:mb-3" }, ai = ["placeholder", "disabled"], oi = {
4653
4657
  key: 0,
4654
4658
  class: "tpl:mb-3 tpl:text-xs",
4655
4659
  style: { color: "var(--tpl-danger)" }
4656
- }, ii = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ai = ["disabled"], oi = ["disabled"], si = {
4660
+ }, si = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ci = ["disabled"], li = ["disabled"], ui = {
4657
4661
  key: 0,
4658
4662
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
4659
- }, ci = { key: 1 }, li = /* @__PURE__ */ d({
4663
+ }, di = { key: 1 }, fi = /* @__PURE__ */ d({
4660
4664
  __name: "MediaImportUrlModal",
4661
4665
  props: {
4662
4666
  visible: { type: Boolean },
@@ -4665,7 +4669,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4665
4669
  },
4666
4670
  emits: ["import", "close"],
4667
4671
  setup(n, { emit: i }) {
4668
- let a = n, s = i, { t: c } = z(), u = t("tplUiTheme"), d = t(Pe, l(null)), h = l("");
4672
+ let a = n, s = i, { t: c } = z(), u = t(Ne, null), d = t(je, l(null)), h = l("");
4669
4673
  e(() => a.visible, (e) => {
4670
4674
  e && (h.value = "");
4671
4675
  });
@@ -4694,9 +4698,9 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4694
4698
  style: { "background-color": "var(--tpl-overlay)" },
4695
4699
  onClick: S(x, ["self"]),
4696
4700
  onKeydown: C
4697
- }, [O("div", $r, [
4698
- O("h3", ei, N(p(c).mediaLibrary.importFromUrl), 1),
4699
- O("div", ti, [f(O("input", {
4701
+ }, [O("div", ni, [
4702
+ O("h3", ri, N(p(c).mediaLibrary.importFromUrl), 1),
4703
+ O("div", ii, [f(O("input", {
4700
4704
  "onUpdate:modelValue": t[0] ||= (e) => h.value = e,
4701
4705
  type: "url",
4702
4706
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
@@ -4708,9 +4712,9 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4708
4712
  placeholder: p(c).mediaLibrary.importUrlPlaceholder,
4709
4713
  disabled: n.isImporting,
4710
4714
  autofocus: ""
4711
- }, null, 8, ni), [[D, h.value]])]),
4712
- n.error ? (o(), y("p", ri, N(n.error), 1)) : b("", !0),
4713
- O("div", ii, [O("button", {
4715
+ }, null, 8, ai), [[D, h.value]])]),
4716
+ n.error ? (o(), y("p", oi, N(n.error), 1)) : b("", !0),
4717
+ O("div", si, [O("button", {
4714
4718
  class: g(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": n.isImporting }]),
4715
4719
  style: {
4716
4720
  "border-color": "var(--tpl-border)",
@@ -4719,25 +4723,25 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4719
4723
  },
4720
4724
  disabled: n.isImporting,
4721
4725
  onClick: x
4722
- }, N(p(c).mediaLibrary.cancel), 11, ai), O("button", {
4726
+ }, N(p(c).mediaLibrary.cancel), 11, ci), O("button", {
4723
4727
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
4724
4728
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4725
4729
  disabled: !h.value.trim() || n.isImporting,
4726
4730
  onClick: v
4727
- }, [n.isImporting ? (o(), y("span", si, [m(p(ye), {
4731
+ }, [n.isImporting ? (o(), y("span", ui, [m(p(ye), {
4728
4732
  class: "tpl:animate-spin",
4729
4733
  size: 12,
4730
4734
  "stroke-width": 2
4731
- }), F(" " + N(p(c).mediaLibrary.importing), 1)])) : (o(), y("span", ci, N(p(c).mediaLibrary.import), 1))], 8, oi)])
4732
- ])], 40, Qr)) : b("", !0)]),
4735
+ }), F(" " + N(p(c).mediaLibrary.importing), 1)])) : (o(), y("span", di, N(p(c).mediaLibrary.import), 1))], 8, li)])
4736
+ ])], 40, ti)) : b("", !0)]),
4733
4737
  _: 1
4734
4738
  })], 8, ["to"]));
4735
4739
  }
4736
- }), ui = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, di = ["disabled", "onClick"], fi = { class: "tpl:truncate" }, pi = {
4740
+ }), pi = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, mi = ["disabled", "onClick"], hi = { class: "tpl:truncate" }, gi = {
4737
4741
  key: 0,
4738
4742
  class: "tpl:shrink-0",
4739
4743
  style: { color: "var(--tpl-text-dim)" }
4740
- }, mi = /* @__PURE__ */ d({
4744
+ }, _i = /* @__PURE__ */ d({
4741
4745
  __name: "MediaMovePicker",
4742
4746
  props: {
4743
4747
  folders: {},
@@ -4765,7 +4769,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4765
4769
  "border-color": "var(--tpl-border)",
4766
4770
  "background-color": "var(--tpl-bg-elevated)"
4767
4771
  }
4768
- }, [O("div", ui, [e.currentFolderId === null ? b("", !0) : (o(), y("button", {
4772
+ }, [O("div", pi, [e.currentFolderId === null ? b("", !0) : (o(), y("button", {
4769
4773
  key: 0,
4770
4774
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
4771
4775
  style: { color: "var(--tpl-text)" },
@@ -4790,27 +4794,27 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4790
4794
  size: 14,
4791
4795
  "stroke-width": 1.5
4792
4796
  }),
4793
- O("span", fi, N(t.name), 1),
4794
- t.id === e.currentFolderId ? (o(), y("span", pi, N(p(i).mediaLibrary.currentFolder), 1)) : b("", !0)
4795
- ], 12, di))), 128))])], 512));
4797
+ O("span", hi, N(t.name), 1),
4798
+ t.id === e.currentFolderId ? (o(), y("span", gi, N(p(i).mediaLibrary.currentFolder), 1)) : b("", !0)
4799
+ ], 12, mi))), 128))])], 512));
4796
4800
  }
4797
- }), hi = { class: "tpl:flex tpl:items-center tpl:gap-3" }, gi = ["src", "alt"], _i = {
4801
+ }), vi = { class: "tpl:flex tpl:items-center tpl:gap-3" }, yi = ["src", "alt"], bi = {
4798
4802
  key: 1,
4799
4803
  class: "tpl:flex tpl:size-10 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded",
4800
4804
  style: { border: "1px solid var(--tpl-border)" }
4801
- }, vi = { class: "tpl:min-w-0 tpl:flex-1" }, yi = {
4805
+ }, xi = { class: "tpl:min-w-0 tpl:flex-1" }, Si = {
4802
4806
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
4803
4807
  style: { color: "var(--tpl-text)" }
4804
- }, bi = {
4808
+ }, Ci = {
4805
4809
  class: "tpl:mt-0.5 tpl:text-[10px]",
4806
4810
  style: { color: "var(--tpl-text-muted)" }
4807
- }, xi = {
4811
+ }, wi = {
4808
4812
  key: 2,
4809
4813
  class: "tpl:shrink-0"
4810
- }, Si = {
4814
+ }, Ti = {
4811
4815
  class: "tpl:block tpl:text-[10px]",
4812
4816
  style: { color: "var(--tpl-text-muted)" }
4813
- }, Ci = ["value"], wi = ["value"], Ti = /*#__PURE__*/ we(/* @__PURE__ */ d({
4817
+ }, Ei = ["value"], Di = ["value"], Oi = /*#__PURE__*/ we(/* @__PURE__ */ d({
4814
4818
  __name: "MediaPreviewPanel",
4815
4819
  props: {
4816
4820
  item: {},
@@ -4819,7 +4823,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4819
4823
  },
4820
4824
  emits: ["update:selectedConversion"],
4821
4825
  setup(e, { emit: t }) {
4822
- let r = e, i = t, { t: a } = z(), { isImageMimeType: s } = Fe(), c = v(() => {
4826
+ let r = e, i = t, { t: a } = z(), { isImageMimeType: s } = Re(), c = v(() => {
4823
4827
  if (!_.value || !r.item.conversions_generated) return [];
4824
4828
  let e = [];
4825
4829
  return r.item.small_url && e.push({
@@ -4878,20 +4882,20 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4878
4882
  day: "numeric"
4879
4883
  });
4880
4884
  }
4881
- return (t, r) => (o(), y("div", hi, [
4885
+ return (t, r) => (o(), y("div", vi, [
4882
4886
  _.value ? (o(), y("img", {
4883
4887
  key: 0,
4884
4888
  src: u.value ?? void 0,
4885
4889
  alt: e.item.alt_text || e.item.filename,
4886
4890
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
4887
4891
  style: { border: "1px solid var(--tpl-border)" }
4888
- }, null, 8, gi)) : (o(), y("div", _i, [m(Sr, {
4892
+ }, null, 8, yi)) : (o(), y("div", bi, [m(Tr, {
4889
4893
  "mime-type": e.item.mime_type,
4890
4894
  class: "tpl-preview-icon"
4891
4895
  }, null, 8, ["mime-type"])])),
4892
- O("div", vi, [
4893
- O("p", yi, N(e.item.filename), 1),
4894
- O("p", bi, [
4896
+ O("div", xi, [
4897
+ O("p", Si, N(e.item.filename), 1),
4898
+ O("p", Ci, [
4895
4899
  F(N(x(e.item.size)) + " · " + N(S(e.item.created_at)) + " ", 1),
4896
4900
  _.value && e.item.width && e.item.height ? (o(), y(M, { key: 0 }, [F(" · " + N(e.item.width) + "×" + N(e.item.height) + "px ", 1)], 64)) : b("", !0),
4897
4901
  h.value ? (o(), y(M, { key: 1 }, [
@@ -4910,7 +4914,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4910
4914
  style: { color: "var(--tpl-text-dim)" }
4911
4915
  }, N(e.item.alt_text || "\xA0"), 3)) : b("", !0)
4912
4916
  ]),
4913
- l.value ? (o(), y("div", xi, [O("label", Si, N(p(a).mediaLibrary.conversionLabel), 1), O("select", {
4917
+ l.value ? (o(), y("div", wi, [O("label", Ti, N(p(a).mediaLibrary.conversionLabel), 1), O("select", {
4914
4918
  class: "tpl:mt-0.5 tpl:rounded-md tpl:border tpl:py-1 tpl:pr-6 tpl:pl-2 tpl:text-xs tpl:outline-none",
4915
4919
  style: {
4916
4920
  "border-color": "var(--tpl-border)",
@@ -4922,36 +4926,36 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4922
4926
  }, [(o(!0), y(M, null, n(c.value, (e) => (o(), y("option", {
4923
4927
  key: e.value,
4924
4928
  value: e.value
4925
- }, N(e.label), 9, wi))), 128))], 40, Ci)])) : b("", !0)
4929
+ }, N(e.label), 9, Di))), 128))], 40, Ei)])) : b("", !0)
4926
4930
  ]));
4927
4931
  }
4928
- }), [["__scopeId", "data-v-56be5670"]]), Ei = ["data-tpl-theme"], Di = {
4932
+ }), [["__scopeId", "data-v-56be5670"]]), ki = ["data-tpl-theme"], Ai = {
4929
4933
  class: "tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
4930
4934
  style: { "background-color": "var(--tpl-bg-elevated)" }
4931
- }, Oi = {
4935
+ }, ji = {
4932
4936
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
4933
4937
  style: { color: "var(--tpl-text)" }
4934
- }, ki = {
4938
+ }, Mi = {
4935
4939
  class: "tpl:mb-2 tpl:text-xs",
4936
4940
  style: { color: "var(--tpl-text-muted)" }
4937
- }, Ai = {
4941
+ }, Ni = {
4938
4942
  key: 0,
4939
4943
  class: "tpl:mb-3 tpl:text-xs",
4940
4944
  style: { color: "var(--tpl-warning)" }
4941
- }, ji = {
4945
+ }, Pi = {
4942
4946
  class: "tpl:mb-3 tpl:rounded tpl:border tpl:p-2",
4943
4947
  style: { "border-color": "var(--tpl-border)" }
4944
- }, Mi = {
4948
+ }, Fi = {
4945
4949
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
4946
4950
  style: { color: "var(--tpl-text)" }
4947
- }, Ni = { class: "tpl:mb-4" }, Pi = {
4951
+ }, Ii = { class: "tpl:mb-4" }, Li = {
4948
4952
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
4949
4953
  style: { color: "var(--tpl-text-muted)" }
4950
- }, Fi = ["accept"], Ii = {
4954
+ }, Ri = ["accept"], zi = {
4951
4955
  key: 1,
4952
4956
  class: "tpl:mb-3 tpl:text-xs",
4953
4957
  style: { color: "var(--tpl-danger)" }
4954
- }, Li = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Ri = ["disabled"], zi = ["disabled"], Bi = /* @__PURE__ */ d({
4958
+ }, Bi = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Vi = ["disabled"], Hi = ["disabled"], Ui = /* @__PURE__ */ d({
4955
4959
  __name: "MediaReplaceModal",
4956
4960
  props: {
4957
4961
  visible: { type: Boolean },
@@ -4962,7 +4966,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4962
4966
  },
4963
4967
  emits: ["replace", "close"],
4964
4968
  setup(n, { emit: i }) {
4965
- let a = n, s = i, { t: c } = z(), u = t("tplUiTheme"), d = t(Pe, l(null)), f = l(null), h = l(null), g = v(() => {
4969
+ let a = n, s = i, { t: c } = z(), u = t(Ne, null), d = t(je, l(null)), f = l(null), h = l(null), g = v(() => {
4966
4970
  if (!a.item) return "";
4967
4971
  let e = a.item.filename.split(".");
4968
4972
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
@@ -4995,12 +4999,12 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
4995
4999
  style: { "background-color": "var(--tpl-overlay)" },
4996
5000
  onClick: t[1] ||= S((e) => s("close"), ["self"]),
4997
5001
  onKeydown: k
4998
- }, [O("div", Di, [
4999
- O("h3", Oi, N(p(c).mediaLibrary.replaceWarningTitle), 1),
5000
- O("p", ki, N(p(c).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${g.value}`)), 1),
5001
- C.value ? (o(), y("p", Ai, N(p(c).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.template_count.toString())), 1)) : b("", !0),
5002
- O("div", ji, [O("p", Mi, N(n.item.filename), 1)]),
5003
- O("div", Ni, [O("label", Pi, N(p(c).mediaLibrary.replaceSelectFile), 1), O("input", {
5002
+ }, [O("div", Ai, [
5003
+ O("h3", ji, N(p(c).mediaLibrary.replaceWarningTitle), 1),
5004
+ O("p", Mi, N(p(c).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${g.value}`)), 1),
5005
+ C.value ? (o(), y("p", Ni, N(p(c).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.template_count.toString())), 1)) : b("", !0),
5006
+ O("div", Pi, [O("p", Fi, N(n.item.filename), 1)]),
5007
+ O("div", Ii, [O("label", Li, N(p(c).mediaLibrary.replaceSelectFile), 1), O("input", {
5004
5008
  ref_key: "fileInputRef",
5005
5009
  ref: f,
5006
5010
  type: "file",
@@ -5012,9 +5016,9 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5012
5016
  color: "var(--tpl-text)"
5013
5017
  },
5014
5018
  onChange: E
5015
- }, null, 40, Fi)]),
5016
- n.error ? (o(), y("p", Ii, N(n.error), 1)) : b("", !0),
5017
- O("div", Li, [O("button", {
5019
+ }, null, 40, Ri)]),
5020
+ n.error ? (o(), y("p", zi, N(n.error), 1)) : b("", !0),
5021
+ O("div", Bi, [O("button", {
5018
5022
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5019
5023
  style: {
5020
5024
  "border-color": "var(--tpl-border)",
@@ -5023,29 +5027,29 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5023
5027
  },
5024
5028
  disabled: n.isReplacing,
5025
5029
  onClick: t[0] ||= (e) => s("close")
5026
- }, N(p(c).mediaLibrary.cancel), 9, Ri), O("button", {
5030
+ }, N(p(c).mediaLibrary.cancel), 9, Vi), O("button", {
5027
5031
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
5028
5032
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
5029
5033
  disabled: !h.value || n.isReplacing,
5030
5034
  onClick: D
5031
- }, N(n.isReplacing ? p(c).mediaLibrary.replacing : p(c).mediaLibrary.replace), 9, zi)])
5032
- ])], 40, Ei)) : b("", !0)]),
5035
+ }, N(n.isReplacing ? p(c).mediaLibrary.replacing : p(c).mediaLibrary.replace), 9, Hi)])
5036
+ ])], 40, ki)) : b("", !0)]),
5033
5037
  _: 1
5034
5038
  })], 8, ["to"]));
5035
5039
  }
5036
- }), Vi = {
5040
+ }), Wi = {
5037
5041
  key: 0,
5038
5042
  class: "tpl:flex tpl:items-center tpl:gap-2"
5039
- }, Hi = {
5043
+ }, Gi = {
5040
5044
  class: "tpl:text-xs",
5041
5045
  style: { color: "var(--tpl-text-muted)" }
5042
- }, Ui = {
5046
+ }, Ki = {
5043
5047
  class: "tpl:text-xs",
5044
5048
  style: { color: "var(--tpl-text-muted)" }
5045
- }, Wi = {
5049
+ }, qi = {
5046
5050
  class: "tpl:mt-1 tpl:text-[10px]",
5047
5051
  style: { color: "var(--tpl-text-dim)" }
5048
- }, Gi = /* @__PURE__ */ d({
5052
+ }, Ji = /* @__PURE__ */ d({
5049
5053
  __name: "MediaUploadZone",
5050
5054
  props: {
5051
5055
  isUploading: { type: Boolean },
@@ -5053,7 +5057,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5053
5057
  },
5054
5058
  emits: ["upload"],
5055
5059
  setup(e, { emit: t }) {
5056
- let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = Fe(), u = l();
5060
+ let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = Re(), u = l();
5057
5061
  function d(e) {
5058
5062
  let t = [];
5059
5063
  for (let n of Array.from(e)) a.value.includes(n.type) && n.size <= c.value && t.push(n);
@@ -5080,12 +5084,12 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5080
5084
  "background-color": "var(--tpl-bg)"
5081
5085
  },
5082
5086
  onClick: n[0] ||= (e) => p(_)()
5083
- }, [e.isUploading ? (o(), y("div", Vi, [m(p(ye), {
5087
+ }, [e.isUploading ? (o(), y("div", Wi, [m(p(ye), {
5084
5088
  class: "tpl-spinner",
5085
5089
  size: 20,
5086
5090
  "stroke-width": 2,
5087
5091
  style: { color: "var(--tpl-primary)" }
5088
- }), O("span", Hi, N(e.uploadProgress && e.uploadProgress.total > 1 ? p(i)(p(r).mediaLibrary.uploadingProgress, {
5092
+ }), O("span", Gi, N(e.uploadProgress && e.uploadProgress.total > 1 ? p(i)(p(r).mediaLibrary.uploadingProgress, {
5089
5093
  current: e.uploadProgress.current,
5090
5094
  total: e.uploadProgress.total
5091
5095
  }) : p(r).mediaLibrary.uploading), 1)])) : (o(), y(M, { key: 1 }, [
@@ -5095,20 +5099,20 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5095
5099
  "stroke-width": 1.5,
5096
5100
  style: { color: "var(--tpl-text-dim)" }
5097
5101
  }),
5098
- O("p", Ui, N(p(r).mediaLibrary.dropOrClick), 1),
5099
- O("p", Wi, N(p(r).mediaLibrary.acceptedFormats), 1)
5102
+ O("p", Ki, N(p(r).mediaLibrary.dropOrClick), 1),
5103
+ O("p", qi, N(p(r).mediaLibrary.acceptedFormats), 1)
5100
5104
  ], 64))], 2));
5101
5105
  }
5102
- }), Ki = [
5106
+ }), Yi = [
5103
5107
  "width",
5104
5108
  "height",
5105
5109
  "viewBox"
5106
- ], qi = [
5110
+ ], Xi = [
5107
5111
  "cx",
5108
5112
  "cy",
5109
5113
  "r",
5110
5114
  "stroke-width"
5111
- ], Ji = [
5115
+ ], Zi = [
5112
5116
  "cx",
5113
5117
  "cy",
5114
5118
  "r",
@@ -5116,14 +5120,14 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5116
5120
  "stroke",
5117
5121
  "stroke-dasharray",
5118
5122
  "stroke-dashoffset"
5119
- ], Yi = {
5123
+ ], Qi = {
5120
5124
  key: 0,
5121
5125
  class: "tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:-translate-x-1/2 tpl:rounded-md tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:whitespace-nowrap tpl:shadow-lg",
5122
5126
  style: {
5123
5127
  "background-color": "var(--tpl-text)",
5124
5128
  color: "var(--tpl-bg-elevated)"
5125
5129
  }
5126
- }, Xi = /* @__PURE__ */ d({
5130
+ }, $i = /* @__PURE__ */ d({
5127
5131
  __name: "StorageProgressRing",
5128
5132
  props: {
5129
5133
  usedBytes: {},
@@ -5163,7 +5167,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5163
5167
  fill: "none",
5164
5168
  "stroke-width": c.value,
5165
5169
  style: { stroke: "var(--tpl-border)" }
5166
- }, null, 8, qi), O("circle", {
5170
+ }, null, 8, Xi), O("circle", {
5167
5171
  cx: s.value / 2,
5168
5172
  cy: s.value / 2,
5169
5173
  r: u.value,
@@ -5174,7 +5178,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5174
5178
  "stroke-dasharray": d.value,
5175
5179
  "stroke-dashoffset": p.value,
5176
5180
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
5177
- }, null, 8, Ji)], 8, Ki)), m(T, {
5181
+ }, null, 8, Zi)], 8, Yi)), m(T, {
5178
5182
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5179
5183
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
5180
5184
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -5182,7 +5186,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5182
5186
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
5183
5187
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
5184
5188
  }, {
5185
- default: r(() => [a.value ? (o(), y("div", Yi, [F(N(w.value) + " ", 1), t[2] ||= O("div", {
5189
+ default: r(() => [a.value ? (o(), y("div", Qi, [F(N(w.value) + " ", 1), t[2] ||= O("div", {
5186
5190
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
5187
5191
  style: { "background-color": "var(--tpl-text)" }
5188
5192
  }, null, -1)])) : b("", !0)]),
@@ -5192,7 +5196,7 @@ var kn = ["data-tpl-theme"], An = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, jn
5192
5196
  });
5193
5197
  //#endregion
5194
5198
  //#region ../media-library/src/composables/useMediaLibraryUI.ts
5195
- function Zi(t) {
5199
+ function ea(t) {
5196
5200
  let { library: n, translations: r } = t;
5197
5201
  function i() {
5198
5202
  return "value" in r && typeof r.value == "object" ? r.value : r;
@@ -5301,8 +5305,40 @@ function Zi(t) {
5301
5305
  };
5302
5306
  }
5303
5307
  //#endregion
5308
+ //#region ../media-library/src/i18n/index.ts
5309
+ var ta = /* #__PURE__ */ Object.assign({
5310
+ "./locales/ca.ts": () => import("./ca-CNRWAMHI.js"),
5311
+ "./locales/de.ts": () => import("./de-DFYCT4QU.js"),
5312
+ "./locales/en.ts": () => import("./en-BCgVx9zM.js").then((e) => e.n),
5313
+ "./locales/es.ts": () => import("./es-OgkdMZGX.js"),
5314
+ "./locales/fr.ts": () => import("./fr-Dswns199.js"),
5315
+ "./locales/nl.ts": () => import("./nl-CbcPJlrL.js"),
5316
+ "./locales/pt-BR.ts": () => import("./pt-BR-BibOQm-o.js")
5317
+ });
5318
+ function na(e) {
5319
+ return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
5320
+ }
5321
+ var ra = na(ta);
5322
+ function ia(e) {
5323
+ return e.trim().replace(/_/g, "-").toLowerCase();
5324
+ }
5325
+ function aa(e) {
5326
+ let t = ia(e);
5327
+ return ra.find((e) => ia(e) === t);
5328
+ }
5329
+ function oa(e) {
5330
+ return ia(e).split("-")[0];
5331
+ }
5332
+ function sa(e) {
5333
+ return aa(e) ?? aa(oa(e)) ?? "en";
5334
+ }
5335
+ async function ca(e) {
5336
+ let t = ta[`./locales/${sa(e)}.ts`];
5337
+ return (await t()).default;
5338
+ }
5339
+ //#endregion
5304
5340
  //#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
5305
- var Qi = ["data-tpl-theme"], $i = {
5341
+ var la = ["data-tpl-theme"], ua = {
5306
5342
  class: "tpl-media-modal tpl-scale-in tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
5307
5343
  style: {
5308
5344
  width: "900px",
@@ -5313,59 +5349,59 @@ var Qi = ["data-tpl-theme"], $i = {
5313
5349
  border: "1px solid var(--tpl-border)",
5314
5350
  "box-shadow": "var(--tpl-shadow-xl)"
5315
5351
  }
5316
- }, ea = {
5352
+ }, da = {
5317
5353
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
5318
5354
  style: { "border-color": "var(--tpl-border)" }
5319
- }, ta = {
5355
+ }, fa = {
5320
5356
  class: "tpl:text-sm tpl:font-semibold",
5321
5357
  style: { color: "var(--tpl-text)" }
5322
- }, na = { class: "tpl:flex tpl:items-center tpl:gap-3" }, ra = { class: "tpl:relative" }, ia = ["value", "placeholder"], aa = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, oa = {
5358
+ }, pa = { class: "tpl:flex tpl:items-center tpl:gap-3" }, ma = { class: "tpl:relative" }, ha = ["value", "placeholder"], ga = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, _a = {
5323
5359
  key: 0,
5324
5360
  class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
5325
5361
  style: {
5326
5362
  "border-color": "var(--tpl-border)",
5327
5363
  "background-color": "var(--tpl-bg)"
5328
5364
  }
5329
- }, sa = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, ca = {
5365
+ }, va = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, ya = {
5330
5366
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
5331
5367
  style: { "border-color": "var(--tpl-border)" }
5332
- }, la = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ua = ["title"], da = {
5368
+ }, ba = { class: "tpl:flex tpl:items-center tpl:gap-2" }, xa = ["title"], Sa = {
5333
5369
  key: 0,
5334
5370
  class: "tpl:text-xs tpl:font-medium",
5335
5371
  style: { color: "var(--tpl-text)" }
5336
- }, fa = {
5372
+ }, Ca = {
5337
5373
  class: "tpl:flex tpl:rounded-md tpl:p-0.5",
5338
5374
  style: {
5339
5375
  border: "1px solid var(--tpl-border)",
5340
5376
  "background-color": "var(--tpl-bg)"
5341
5377
  }
5342
- }, pa = ["title"], ma = ["title"], ha = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ga = ["value"], _a = { value: "" }, va = ["value"], ya = ["value"], ba = { value: "newest" }, xa = { value: "oldest" }, Sa = { value: "name_asc" }, Ca = { value: "name_desc" }, wa = { value: "size_asc" }, Ta = { value: "size_desc" }, Ea = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Da = {
5378
+ }, wa = ["title"], Ta = ["title"], Ea = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Da = ["value"], Oa = { value: "" }, ka = ["value"], Aa = ["value"], ja = { value: "newest" }, Ma = { value: "oldest" }, Na = { value: "name_asc" }, Pa = { value: "name_desc" }, Fa = { value: "size_asc" }, Ia = { value: "size_desc" }, La = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ra = {
5343
5379
  key: 0,
5344
5380
  class: "tpl:px-4 tpl:pt-3"
5345
- }, Oa = {
5381
+ }, za = {
5346
5382
  class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
5347
5383
  style: {
5348
5384
  "background-color": "var(--tpl-bg-elevated)",
5349
5385
  "box-shadow": "var(--tpl-shadow-xl)"
5350
5386
  }
5351
- }, ka = {
5387
+ }, Ba = {
5352
5388
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
5353
5389
  style: { color: "var(--tpl-text)" }
5354
- }, Aa = {
5390
+ }, Va = {
5355
5391
  key: 0,
5356
5392
  class: "tpl:mb-4 tpl:text-xs",
5357
5393
  style: { color: "var(--tpl-text-muted)" }
5358
- }, ja = {
5394
+ }, Ha = {
5359
5395
  key: 1,
5360
5396
  class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
5361
5397
  style: { "border-color": "var(--tpl-border)" }
5362
- }, Ma = { class: "tpl:font-medium" }, Na = { style: { color: "var(--tpl-text-muted)" } }, Pa = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Fa = {
5398
+ }, Ua = { class: "tpl:font-medium" }, Wa = { style: { color: "var(--tpl-text-muted)" } }, Ga = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Ka = {
5363
5399
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
5364
5400
  style: { "border-color": "var(--tpl-border)" }
5365
- }, Ia = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, La = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Ra = {
5401
+ }, qa = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Ja = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Ya = {
5366
5402
  key: 0,
5367
5403
  class: "tpl:flex tpl:items-center tpl:gap-2"
5368
- }, za = { class: "tpl:relative" }, Ba = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Va = ["disabled"], Ha = /* @__PURE__ */ d({
5404
+ }, Xa = { class: "tpl:relative" }, Za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Qa = ["disabled"], $a = /* @__PURE__ */ d({
5369
5405
  __name: "MediaLibraryModal",
5370
5406
  props: {
5371
5407
  visible: { type: Boolean },
@@ -5373,39 +5409,47 @@ var Qi = ["data-tpl-theme"], $i = {
5373
5409
  authManager: {},
5374
5410
  projectId: {},
5375
5411
  planConfig: {},
5376
- popoverTarget: {}
5412
+ popoverTarget: {},
5413
+ locale: {},
5414
+ uiTheme: {}
5377
5415
  },
5378
5416
  emits: ["close", "select"],
5379
- setup(i, { emit: a }) {
5380
- let s = i, l = a, { t: u } = z(), d = t("tplUiTheme"), f = E(() => s.popoverTarget ?? null);
5381
- c(Pe, f), c(Ne, s.planConfig);
5382
- let h = v(() => s.planConfig.config.value?.storage.used_bytes ?? 0), x = v(() => s.planConfig.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: D, availableCategories: k } = Fe(), A = Oe({
5383
- projectId: s.projectId,
5384
- authManager: s.authManager
5385
- }), j = Zi({
5386
- library: A,
5387
- translations: u
5417
+ setup(t, { emit: i }) {
5418
+ let a = t, s = i, u = l(null);
5419
+ e(() => a.locale, async (e) => {
5420
+ u.value = await ca(e ?? "en");
5421
+ }, { immediate: !0 }), c(Me, u);
5422
+ let d = v(() => u.value), f = v(() => a.uiTheme);
5423
+ c(Ne, f);
5424
+ let h = E(() => a.popoverTarget ?? null);
5425
+ c(je, h), c(Ae, a.planConfig);
5426
+ let x = v(() => a.planConfig.config.value?.storage.used_bytes ?? 0), D = v(() => a.planConfig.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: k, availableCategories: A } = Re(a.planConfig), j = ke({
5427
+ projectId: a.projectId,
5428
+ authManager: a.authManager
5429
+ }), P = ea({
5430
+ library: j,
5431
+ translations: d
5388
5432
  });
5389
- e(() => s.visible, (e) => {
5390
- e ? (A.loadItems(), A.loadFrequentlyUsed()) : j.resetUI();
5433
+ e(() => a.visible, (e) => {
5434
+ e ? (j.loadItems(), j.loadFrequentlyUsed()) : P.resetUI();
5391
5435
  });
5392
- function P(e) {
5393
- e.key === "Escape" && l("close");
5394
- }
5395
- te(document, "keydown", P);
5396
- function ee() {
5397
- return A.previewItem.value ? !s.accept?.length || D(A.previewItem.value.mime_type, s.accept) : !1;
5436
+ function ee(e) {
5437
+ e.key === "Escape" && s("close");
5398
5438
  }
5439
+ te(document, "keydown", ee);
5399
5440
  function ne() {
5400
- if (ee()) {
5401
- let e = A.previewItem.value;
5402
- l("select", {
5441
+ return j.previewItem.value ? !a.accept?.length || k(j.previewItem.value.mime_type, a.accept) : !1;
5442
+ }
5443
+ function re() {
5444
+ if (ne()) {
5445
+ let e = j.previewItem.value;
5446
+ s("select", {
5403
5447
  ...e,
5404
- url: j.selectedUrl.value || e.url
5405
- }), l("close");
5448
+ url: P.selectedUrl.value || e.url
5449
+ }), s("close");
5406
5450
  }
5407
5451
  }
5408
- return (e, t) => (o(), w(_, { to: i.popoverTarget || "body" }, [m(T, {
5452
+ return (e, i) => (o(), w(_, { to: t.popoverTarget || "body" }, [m(T, {
5409
5453
  "enter-active-class": "tpl:transition tpl:duration-200",
5410
5454
  "enter-from-class": "tpl:opacity-0",
5411
5455
  "enter-to-class": "tpl:opacity-100",
@@ -5413,20 +5457,20 @@ var Qi = ["data-tpl-theme"], $i = {
5413
5457
  "leave-from-class": "tpl:opacity-100",
5414
5458
  "leave-to-class": "tpl:opacity-0"
5415
5459
  }, {
5416
- default: r(() => [i.visible ? (o(), y("div", {
5460
+ default: r(() => [t.visible && u.value ? (o(), y("div", {
5417
5461
  key: 0,
5418
- "data-tpl-theme": p(d),
5462
+ "data-tpl-theme": f.value,
5419
5463
  class: "tpl tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-[9999]",
5420
- onClick: t[18] ||= S((e) => l("close"), ["self"])
5421
- }, [O("div", $i, [
5422
- O("div", ea, [O("h2", ta, N(p(u).mediaLibrary.title), 1), O("div", na, [
5423
- m(Xi, {
5424
- "used-bytes": h.value,
5425
- "limit-bytes": x.value,
5464
+ onClick: i[18] ||= S((e) => s("close"), ["self"])
5465
+ }, [O("div", ua, [
5466
+ O("div", da, [O("h2", fa, N(d.value.mediaLibrary.title), 1), O("div", pa, [
5467
+ m($i, {
5468
+ "used-bytes": x.value,
5469
+ "limit-bytes": D.value,
5426
5470
  size: 22
5427
5471
  }, null, 8, ["used-bytes", "limit-bytes"]),
5428
- O("div", ra, [O("input", {
5429
- value: p(j).searchInput.value,
5472
+ O("div", ma, [O("input", {
5473
+ value: p(P).searchInput.value,
5430
5474
  type: "text",
5431
5475
  class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)]",
5432
5476
  style: {
@@ -5434,9 +5478,9 @@ var Qi = ["data-tpl-theme"], $i = {
5434
5478
  "background-color": "var(--tpl-bg)",
5435
5479
  color: "var(--tpl-text)"
5436
5480
  },
5437
- placeholder: p(u).mediaLibrary.searchPlaceholder,
5438
- onInput: t[0] ||= (e) => p(j).handleSearchInput(e.target.value)
5439
- }, null, 40, ia), m(p(de), {
5481
+ placeholder: d.value.mediaLibrary.searchPlaceholder,
5482
+ onInput: i[0] ||= (e) => p(P).handleSearchInput(e.target.value)
5483
+ }, null, 40, ha), m(p(de), {
5440
5484
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5441
5485
  size: 13,
5442
5486
  "stroke-width": 2,
@@ -5445,13 +5489,13 @@ var Qi = ["data-tpl-theme"], $i = {
5445
5489
  O("button", {
5446
5490
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5447
5491
  style: { color: "var(--tpl-text-muted)" },
5448
- onClick: t[1] ||= (e) => l("close")
5492
+ onClick: i[1] ||= (e) => s("close")
5449
5493
  }, [m(p(be), {
5450
5494
  size: 18,
5451
5495
  "stroke-width": 2
5452
5496
  })])
5453
5497
  ])]),
5454
- O("div", aa, [m(T, {
5498
+ O("div", ga, [m(T, {
5455
5499
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
5456
5500
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
5457
5501
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -5459,16 +5503,16 @@ var Qi = ["data-tpl-theme"], $i = {
5459
5503
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
5460
5504
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
5461
5505
  }, {
5462
- default: r(() => [p(j).showSidebar.value ? (o(), y("div", oa, [m(br, {
5463
- folders: p(A).folders.value,
5464
- "current-folder-id": p(A).currentFolderId.value,
5465
- "view-mode": p(A).viewMode.value,
5466
- "has-frequently-used": p(j).hasFrequentlyUsed.value,
5467
- onNavigate: p(A).navigateToFolder,
5468
- onCreateFolder: p(j).handleCreateFolder,
5469
- onRenameFolder: p(j).handleRenameFolder,
5470
- onDeleteFolder: p(j).handleDeleteFolder,
5471
- onShowFrequentlyUsed: p(A).showFrequentlyUsed
5506
+ default: r(() => [p(P).showSidebar.value ? (o(), y("div", _a, [m(Cr, {
5507
+ folders: p(j).folders.value,
5508
+ "current-folder-id": p(j).currentFolderId.value,
5509
+ "view-mode": p(j).viewMode.value,
5510
+ "has-frequently-used": p(P).hasFrequentlyUsed.value,
5511
+ onNavigate: p(j).navigateToFolder,
5512
+ onCreateFolder: p(P).handleCreateFolder,
5513
+ onRenameFolder: p(P).handleRenameFolder,
5514
+ onDeleteFolder: p(P).handleDeleteFolder,
5515
+ onShowFrequentlyUsed: p(j).showFrequentlyUsed
5472
5516
  }, null, 8, [
5473
5517
  "folders",
5474
5518
  "current-folder-id",
@@ -5481,54 +5525,54 @@ var Qi = ["data-tpl-theme"], $i = {
5481
5525
  "onShowFrequentlyUsed"
5482
5526
  ])])) : b("", !0)]),
5483
5527
  _: 1
5484
- }), O("div", sa, [O("div", ca, [O("div", la, [
5528
+ }), O("div", va, [O("div", ya, [O("div", ba, [
5485
5529
  O("button", {
5486
5530
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5487
5531
  style: C({
5488
- color: p(j).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5489
- backgroundColor: p(j).showSidebar.value ? "var(--tpl-bg)" : "transparent",
5490
- border: p(j).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
5532
+ color: p(P).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5533
+ backgroundColor: p(P).showSidebar.value ? "var(--tpl-bg)" : "transparent",
5534
+ border: p(P).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
5491
5535
  }),
5492
- title: p(j).showSidebar.value ? p(u).mediaLibrary.hideFolders : p(u).mediaLibrary.showFolders,
5493
- onClick: t[2] ||= (e) => p(j).showSidebar.value = !p(j).showSidebar.value
5536
+ title: p(P).showSidebar.value ? d.value.mediaLibrary.hideFolders : d.value.mediaLibrary.showFolders,
5537
+ onClick: i[2] ||= (e) => p(P).showSidebar.value = !p(P).showSidebar.value
5494
5538
  }, [m(p(ce), {
5495
5539
  size: 16,
5496
5540
  "stroke-width": 2
5497
- })], 12, ua),
5498
- p(A).viewMode.value === "frequently-used" ? (o(), y("span", da, N(p(u).mediaLibrary.frequentlyUsed), 1)) : (o(), w(Me, {
5541
+ })], 12, xa),
5542
+ p(j).viewMode.value === "frequently-used" ? (o(), y("span", Sa, N(d.value.mediaLibrary.frequentlyUsed), 1)) : (o(), w(Le, {
5499
5543
  key: 1,
5500
- folders: p(A).folders.value,
5501
- "current-folder-id": p(A).currentFolderId.value,
5502
- onNavigate: p(A).navigateToFolder
5544
+ folders: p(j).folders.value,
5545
+ "current-folder-id": p(j).currentFolderId.value,
5546
+ onNavigate: p(j).navigateToFolder
5503
5547
  }, null, 8, [
5504
5548
  "folders",
5505
5549
  "current-folder-id",
5506
5550
  "onNavigate"
5507
5551
  ])),
5508
- O("div", fa, [O("button", {
5552
+ O("div", Ca, [O("button", {
5509
5553
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5510
5554
  style: C({
5511
- color: p(j).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5512
- backgroundColor: p(j).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
5555
+ color: p(P).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5556
+ backgroundColor: p(P).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
5513
5557
  }),
5514
- title: p(u).mediaLibrary.viewGrid,
5515
- onClick: t[3] ||= (e) => p(j).layoutMode.value = "grid"
5558
+ title: d.value.mediaLibrary.viewGrid,
5559
+ onClick: i[3] ||= (e) => p(P).layoutMode.value = "grid"
5516
5560
  }, [m(p(ve), {
5517
5561
  size: 14,
5518
5562
  "stroke-width": 2
5519
- })], 12, pa), O("button", {
5563
+ })], 12, wa), O("button", {
5520
5564
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5521
5565
  style: C({
5522
- color: p(j).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5523
- backgroundColor: p(j).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
5566
+ color: p(P).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5567
+ backgroundColor: p(P).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
5524
5568
  }),
5525
- title: p(u).mediaLibrary.viewList,
5526
- onClick: t[4] ||= (e) => p(j).layoutMode.value = "list"
5569
+ title: d.value.mediaLibrary.viewList,
5570
+ onClick: i[4] ||= (e) => p(P).layoutMode.value = "list"
5527
5571
  }, [m(p(me), {
5528
5572
  size: 14,
5529
5573
  "stroke-width": 2
5530
- })], 12, ma)])
5531
- ]), O("div", ha, [p(k).length > 1 ? (o(), y("select", {
5574
+ })], 12, Ta)])
5575
+ ]), O("div", Ea, [p(A).length > 1 ? (o(), y("select", {
5532
5576
  key: 0,
5533
5577
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
5534
5578
  style: {
@@ -5536,31 +5580,31 @@ var Qi = ["data-tpl-theme"], $i = {
5536
5580
  "background-color": "var(--tpl-bg)",
5537
5581
  color: "var(--tpl-text)"
5538
5582
  },
5539
- value: p(A).categoryFilter.value ?? "",
5540
- onChange: t[5] ||= (e) => p(A).filterByCategory(e.target.value || null)
5541
- }, [O("option", _a, N(p(u).mediaLibrary.filterAll), 1), (o(!0), y(M, null, n(p(k), (e) => (o(), y("option", {
5583
+ value: p(j).categoryFilter.value ?? "",
5584
+ onChange: i[5] ||= (e) => p(j).filterByCategory(e.target.value || null)
5585
+ }, [O("option", Oa, N(d.value.mediaLibrary.filterAll), 1), (o(!0), y(M, null, n(p(A), (e) => (o(), y("option", {
5542
5586
  key: e,
5543
5587
  value: e
5544
- }, N(p(j).getCategoryLabel(e)), 9, va))), 128))], 40, ga)) : b("", !0), O("select", {
5588
+ }, N(p(P).getCategoryLabel(e)), 9, ka))), 128))], 40, Da)) : b("", !0), O("select", {
5545
5589
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
5546
5590
  style: {
5547
5591
  "border-color": "var(--tpl-border)",
5548
5592
  "background-color": "var(--tpl-bg)",
5549
5593
  color: "var(--tpl-text)"
5550
5594
  },
5551
- value: p(A).sortOption.value,
5552
- onChange: t[6] ||= (e) => p(A).sortBy(e.target.value)
5595
+ value: p(j).sortOption.value,
5596
+ onChange: i[6] ||= (e) => p(j).sortBy(e.target.value)
5553
5597
  }, [
5554
- O("option", ba, N(p(u).mediaLibrary.sortNewest), 1),
5555
- O("option", xa, N(p(u).mediaLibrary.sortOldest), 1),
5556
- O("option", Sa, N(p(u).mediaLibrary.sortNameAsc), 1),
5557
- O("option", Ca, N(p(u).mediaLibrary.sortNameDesc), 1),
5558
- O("option", wa, N(p(u).mediaLibrary.sortSizeAsc), 1),
5559
- O("option", Ta, N(p(u).mediaLibrary.sortSizeDesc), 1)
5560
- ], 40, ya)])]), O("div", Ea, [p(A).viewMode.value === "files" ? (o(), y("div", Da, [m(Gi, {
5561
- "is-uploading": p(A).isUploading.value,
5562
- "upload-progress": p(A).uploadProgress.value,
5563
- onUpload: p(j).handleUpload
5598
+ O("option", ja, N(d.value.mediaLibrary.sortNewest), 1),
5599
+ O("option", Ma, N(d.value.mediaLibrary.sortOldest), 1),
5600
+ O("option", Na, N(d.value.mediaLibrary.sortNameAsc), 1),
5601
+ O("option", Pa, N(d.value.mediaLibrary.sortNameDesc), 1),
5602
+ O("option", Fa, N(d.value.mediaLibrary.sortSizeAsc), 1),
5603
+ O("option", Ia, N(d.value.mediaLibrary.sortSizeDesc), 1)
5604
+ ], 40, Aa)])]), O("div", La, [p(j).viewMode.value === "files" ? (o(), y("div", Ra, [m(Ji, {
5605
+ "is-uploading": p(j).isUploading.value,
5606
+ "upload-progress": p(j).uploadProgress.value,
5607
+ onUpload: p(P).handleUpload
5564
5608
  }, null, 8, [
5565
5609
  "is-uploading",
5566
5610
  "upload-progress",
@@ -5572,22 +5616,22 @@ var Qi = ["data-tpl-theme"], $i = {
5572
5616
  color: "var(--tpl-text-muted)",
5573
5617
  "background-color": "var(--tpl-bg)"
5574
5618
  },
5575
- onClick: t[7] ||= (e) => p(j).showImportUrlModal.value = !0
5619
+ onClick: i[7] ||= (e) => p(P).showImportUrlModal.value = !0
5576
5620
  }, [m(p(ge), {
5577
5621
  size: 14,
5578
5622
  "stroke-width": 2
5579
- }), F(" " + N(p(u).mediaLibrary.importFromUrl), 1)])])) : b("", !0), m(Zr, {
5580
- items: p(j).displayItems.value,
5581
- "selected-ids": p(A).selectedItems.value,
5582
- "is-loading": p(A).isLoading.value,
5583
- "has-more": p(A).viewMode.value === "files" && p(A).hasMore.value,
5584
- accept: i.accept,
5585
- layout: p(j).layoutMode.value,
5586
- onSelect: p(j).handleSelect,
5587
- onToggle: p(A).toggleSelection,
5588
- onLoadMore: p(A).loadMore,
5589
- onEdit: p(j).handleEditItem,
5590
- onReplace: p(j).handleReplaceItem
5623
+ }), F(" " + N(d.value.mediaLibrary.importFromUrl), 1)])])) : b("", !0), m(ei, {
5624
+ items: p(P).displayItems.value,
5625
+ "selected-ids": p(j).selectedItems.value,
5626
+ "is-loading": p(j).isLoading.value,
5627
+ "has-more": p(j).viewMode.value === "files" && p(j).hasMore.value,
5628
+ accept: t.accept,
5629
+ layout: p(P).layoutMode.value,
5630
+ onSelect: p(P).handleSelect,
5631
+ onToggle: p(j).toggleSelection,
5632
+ onLoadMore: p(j).loadMore,
5633
+ onEdit: p(P).handleEditItem,
5634
+ onReplace: p(P).handleReplaceItem
5591
5635
  }, null, 8, [
5592
5636
  "items",
5593
5637
  "selected-ids",
@@ -5601,36 +5645,36 @@ var Qi = ["data-tpl-theme"], $i = {
5601
5645
  "onEdit",
5602
5646
  "onReplace"
5603
5647
  ])])])]),
5604
- m(li, {
5605
- visible: p(j).showImportUrlModal.value,
5606
- "is-importing": p(A).isImportingFromUrl.value,
5607
- error: p(A).importFromUrlError.value,
5608
- onImport: p(j).handleImportFromUrl,
5609
- onClose: t[8] ||= (e) => p(j).showImportUrlModal.value = !1
5648
+ m(fi, {
5649
+ visible: p(P).showImportUrlModal.value,
5650
+ "is-importing": p(j).isImportingFromUrl.value,
5651
+ error: p(j).importFromUrlError.value,
5652
+ onImport: p(P).handleImportFromUrl,
5653
+ onClose: i[8] ||= (e) => p(P).showImportUrlModal.value = !1
5610
5654
  }, null, 8, [
5611
5655
  "visible",
5612
5656
  "is-importing",
5613
5657
  "error",
5614
5658
  "onImport"
5615
5659
  ]),
5616
- m(cr, {
5617
- visible: !!p(j).editingItem.value,
5618
- item: p(j).editingItem.value,
5619
- onSave: p(j).handleEditSave,
5620
- onClose: t[9] ||= (e) => p(j).editingItem.value = null
5660
+ m(dr, {
5661
+ visible: !!p(P).editingItem.value,
5662
+ item: p(P).editingItem.value,
5663
+ onSave: p(P).handleEditSave,
5664
+ onClose: i[9] ||= (e) => p(P).editingItem.value = null
5621
5665
  }, null, 8, [
5622
5666
  "visible",
5623
5667
  "item",
5624
5668
  "onSave"
5625
5669
  ]),
5626
- m(Bi, {
5627
- visible: p(A).showReplaceWarning.value,
5628
- item: p(A).pendingReplaceItem.value,
5629
- "usage-info": p(A).replaceUsageInfo.value,
5630
- "is-replacing": p(A).isReplacing.value,
5631
- error: p(A).replaceError.value,
5632
- onReplace: p(j).handleReplaceFile,
5633
- onClose: p(A).cancelReplace
5670
+ m(Ui, {
5671
+ visible: p(j).showReplaceWarning.value,
5672
+ item: p(j).pendingReplaceItem.value,
5673
+ "usage-info": p(j).replaceUsageInfo.value,
5674
+ "is-replacing": p(j).isReplacing.value,
5675
+ error: p(j).replaceError.value,
5676
+ onReplace: p(P).handleReplaceFile,
5677
+ onClose: p(j).cancelReplace
5634
5678
  }, null, 8, [
5635
5679
  "visible",
5636
5680
  "item",
@@ -5648,7 +5692,7 @@ var Qi = ["data-tpl-theme"], $i = {
5648
5692
  "leave-from-class": "tpl:opacity-100",
5649
5693
  "leave-to-class": "tpl:opacity-0"
5650
5694
  }, {
5651
- default: r(() => [p(A).showDeleteWarning.value ? (o(), y("div", {
5695
+ default: r(() => [p(j).showDeleteWarning.value ? (o(), y("div", {
5652
5696
  key: 0,
5653
5697
  class: "tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-lg)]",
5654
5698
  style: {
@@ -5656,59 +5700,59 @@ var Qi = ["data-tpl-theme"], $i = {
5656
5700
  "backdrop-filter": "blur(8px)",
5657
5701
  "-webkit-backdrop-filter": "blur(8px)"
5658
5702
  },
5659
- onClick: t[12] ||= S((...e) => p(A).cancelDelete && p(A).cancelDelete(...e), ["self"])
5660
- }, [O("div", Oa, [
5661
- O("h3", ka, N(p(u).mediaLibrary.deleteWarningTitle), 1),
5703
+ onClick: i[12] ||= S((...e) => p(j).cancelDelete && p(j).cancelDelete(...e), ["self"])
5704
+ }, [O("div", za, [
5705
+ O("h3", Ba, N(d.value.mediaLibrary.deleteWarningTitle), 1),
5662
5706
  O("p", {
5663
- class: g(["tpl:text-xs", p(j).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5707
+ class: g(["tpl:text-xs", p(P).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5664
5708
  style: { color: "var(--tpl-text-muted)" }
5665
- }, N(p(u).mediaLibrary.deleteWarningMessage), 3),
5666
- p(j).hasUsedFiles.value ? (o(), y("p", Aa, N(p(u).mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
5667
- p(j).hasUsedFiles.value ? (o(), y("div", ja, [(o(!0), y(M, null, n(p(A).deleteUsageInfo.value, (e, t) => (o(), y("div", {
5709
+ }, N(d.value.mediaLibrary.deleteWarningMessage), 3),
5710
+ p(P).hasUsedFiles.value ? (o(), y("p", Va, N(d.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
5711
+ p(P).hasUsedFiles.value ? (o(), y("div", Ha, [(o(!0), y(M, null, n(p(j).deleteUsageInfo.value, (e, t) => (o(), y("div", {
5668
5712
  key: t,
5669
5713
  class: "tpl:text-xs",
5670
5714
  style: { color: "var(--tpl-text)" }
5671
- }, [e.template_count > 0 ? (o(), y(M, { key: 0 }, [O("span", Ma, N(p(j).displayItems.value.find((e) => e.id === t)?.filename || t), 1), O("span", Na, " - " + N(p(u).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
5672
- O("div", Pa, [O("button", {
5715
+ }, [e.template_count > 0 ? (o(), y(M, { key: 0 }, [O("span", Ua, N(p(P).displayItems.value.find((e) => e.id === t)?.filename || t), 1), O("span", Wa, " - " + N(d.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
5716
+ O("div", Ga, [O("button", {
5673
5717
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5674
5718
  style: {
5675
5719
  "border-color": "var(--tpl-border)",
5676
5720
  color: "var(--tpl-text)",
5677
5721
  "background-color": "var(--tpl-bg)"
5678
5722
  },
5679
- onClick: t[10] ||= (...e) => p(A).cancelDelete && p(A).cancelDelete(...e)
5680
- }, N(p(u).mediaLibrary.cancel), 1), O("button", {
5723
+ onClick: i[10] ||= (...e) => p(j).cancelDelete && p(j).cancelDelete(...e)
5724
+ }, N(d.value.mediaLibrary.cancel), 1), O("button", {
5681
5725
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5682
5726
  style: {
5683
5727
  "border-color": "var(--tpl-danger)",
5684
5728
  color: "var(--tpl-danger)",
5685
5729
  "background-color": "var(--tpl-danger-light)"
5686
5730
  },
5687
- onClick: t[11] ||= (...e) => p(A).confirmDelete && p(A).confirmDelete(...e)
5688
- }, N(p(j).hasUsedFiles.value ? p(u).mediaLibrary.deleteAnyway : p(u).mediaLibrary.confirmDelete), 1)])
5731
+ onClick: i[11] ||= (...e) => p(j).confirmDelete && p(j).confirmDelete(...e)
5732
+ }, N(p(P).hasUsedFiles.value ? d.value.mediaLibrary.deleteAnyway : d.value.mediaLibrary.confirmDelete), 1)])
5689
5733
  ])])) : b("", !0)]),
5690
5734
  _: 1
5691
5735
  }),
5692
- O("div", Fa, [O("div", Ia, [p(A).previewItem.value ? (o(), w(Ti, {
5736
+ O("div", Ka, [O("div", qa, [p(j).previewItem.value ? (o(), w(Oi, {
5693
5737
  key: 0,
5694
- "selected-conversion": p(j).selectedConversion.value,
5695
- "onUpdate:selectedConversion": t[13] ||= (e) => p(j).selectedConversion.value = e,
5696
- item: p(A).previewItem.value,
5697
- folders: p(A).folders.value
5738
+ "selected-conversion": p(P).selectedConversion.value,
5739
+ "onUpdate:selectedConversion": i[13] ||= (e) => p(P).selectedConversion.value = e,
5740
+ item: p(j).previewItem.value,
5741
+ folders: p(j).folders.value
5698
5742
  }, null, 8, [
5699
5743
  "selected-conversion",
5700
5744
  "item",
5701
5745
  "folders"
5702
- ])) : b("", !0)]), O("div", La, [p(A).selectedItems.value.size > 0 ? (o(), y("div", Ra, [p(A).previewItem.value ? (o(), y("button", {
5746
+ ])) : b("", !0)]), O("div", Ja, [p(j).selectedItems.value.size > 0 ? (o(), y("div", Ya, [p(j).previewItem.value ? (o(), y("button", {
5703
5747
  key: 0,
5704
5748
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5705
5749
  style: C({
5706
- borderColor: p(j).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
5707
- color: p(j).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
5750
+ borderColor: p(P).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
5751
+ color: p(P).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
5708
5752
  backgroundColor: "var(--tpl-bg)"
5709
5753
  }),
5710
- onClick: t[14] ||= (e) => p(j).copy(p(j).selectedUrl.value)
5711
- }, [p(j).copied.value ? (o(), w(p(ue), {
5754
+ onClick: i[14] ||= (e) => p(P).copy(p(P).selectedUrl.value)
5755
+ }, [p(P).copied.value ? (o(), w(p(ue), {
5712
5756
  key: 1,
5713
5757
  size: 12,
5714
5758
  "stroke-width": 2
@@ -5716,25 +5760,25 @@ var Qi = ["data-tpl-theme"], $i = {
5716
5760
  key: 0,
5717
5761
  size: 12,
5718
5762
  "stroke-width": 2
5719
- })), F(" " + N(p(j).copied.value ? p(u).mediaLibrary.copied : p(u).mediaLibrary.copyUrl), 1)], 4)) : b("", !0), O("div", za, [O("button", {
5763
+ })), F(" " + N(p(P).copied.value ? d.value.mediaLibrary.copied : d.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), O("div", Xa, [O("button", {
5720
5764
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5721
5765
  style: {
5722
5766
  "border-color": "var(--tpl-border)",
5723
5767
  color: "var(--tpl-text)",
5724
5768
  "background-color": "var(--tpl-bg)"
5725
5769
  },
5726
- onClick: t[15] ||= (e) => p(j).showMovePicker.value = !p(j).showMovePicker.value
5727
- }, N(p(u).mediaLibrary.moveSelected), 1), p(j).showMovePicker.value ? (o(), w(mi, {
5770
+ onClick: i[15] ||= (e) => p(P).showMovePicker.value = !p(P).showMovePicker.value
5771
+ }, N(d.value.mediaLibrary.moveSelected), 1), p(P).showMovePicker.value ? (o(), w(_i, {
5728
5772
  key: 0,
5729
- folders: p(A).folders.value,
5730
- "current-folder-id": p(A).currentFolderId.value,
5731
- onSelect: p(j).handleMoveToFolder,
5732
- onClose: t[16] ||= (e) => p(j).showMovePicker.value = !1
5773
+ folders: p(j).folders.value,
5774
+ "current-folder-id": p(j).currentFolderId.value,
5775
+ onSelect: p(P).handleMoveToFolder,
5776
+ onClose: i[16] ||= (e) => p(P).showMovePicker.value = !1
5733
5777
  }, null, 8, [
5734
5778
  "folders",
5735
5779
  "current-folder-id",
5736
5780
  "onSelect"
5737
- ])) : b("", !0)])])) : b("", !0), O("div", Ba, [p(A).selectedItems.value.size > 0 ? (o(), y("button", {
5781
+ ])) : b("", !0)])])) : b("", !0), O("div", Za, [p(j).selectedItems.value.size > 0 ? (o(), y("button", {
5738
5782
  key: 0,
5739
5783
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5740
5784
  style: {
@@ -5742,21 +5786,21 @@ var Qi = ["data-tpl-theme"], $i = {
5742
5786
  color: "var(--tpl-danger)",
5743
5787
  "background-color": "var(--tpl-danger-light)"
5744
5788
  },
5745
- onClick: t[17] ||= (...e) => p(j).handleDeleteClick && p(j).handleDeleteClick(...e)
5746
- }, N(p(u).mediaLibrary.deleteSelected), 1)) : b("", !0), O("button", {
5789
+ onClick: i[17] ||= (...e) => p(P).handleDeleteClick && p(P).handleDeleteClick(...e)
5790
+ }, N(d.value.mediaLibrary.deleteSelected), 1)) : b("", !0), O("button", {
5747
5791
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
5748
5792
  style: {
5749
5793
  "background-color": "var(--tpl-primary)",
5750
5794
  color: "var(--tpl-bg)"
5751
5795
  },
5752
- disabled: !ee(),
5753
- onClick: ne
5754
- }, N(i.accept?.length ? p(u).mediaLibrary.selectImage : p(u).mediaLibrary.selectFile), 9, Va)])])])
5755
- ])], 8, Qi)) : b("", !0)]),
5796
+ disabled: !ne(),
5797
+ onClick: re
5798
+ }, N(t.accept?.length ? d.value.mediaLibrary.selectImage : d.value.mediaLibrary.selectFile), 9, Qa)])])])
5799
+ ])], 8, la)) : b("", !0)]),
5756
5800
  _: 1
5757
5801
  })], 8, ["to"]));
5758
5802
  }
5759
- }), Ua = {
5803
+ }), eo = {
5760
5804
  class: "tpl tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
5761
5805
  style: {
5762
5806
  width: "100%",
@@ -5764,59 +5808,59 @@ var Qi = ["data-tpl-theme"], $i = {
5764
5808
  "background-color": "var(--tpl-bg-elevated)",
5765
5809
  border: "1px solid var(--tpl-border)"
5766
5810
  }
5767
- }, Wa = {
5811
+ }, to = {
5768
5812
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
5769
5813
  style: { "border-color": "var(--tpl-border)" }
5770
- }, Ga = {
5814
+ }, no = {
5771
5815
  class: "tpl:text-sm tpl:font-semibold",
5772
5816
  style: { color: "var(--tpl-text)" }
5773
- }, Ka = { class: "tpl:flex tpl:items-center tpl:gap-3" }, qa = { class: "tpl:relative" }, Ja = ["value", "placeholder"], Ya = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Xa = {
5817
+ }, ro = { class: "tpl:flex tpl:items-center tpl:gap-3" }, io = { class: "tpl:relative" }, ao = ["value", "placeholder"], oo = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, so = {
5774
5818
  key: 0,
5775
5819
  class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
5776
5820
  style: {
5777
5821
  "border-color": "var(--tpl-border)",
5778
5822
  "background-color": "var(--tpl-bg)"
5779
5823
  }
5780
- }, Za = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, Qa = {
5824
+ }, co = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, lo = {
5781
5825
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
5782
5826
  style: { "border-color": "var(--tpl-border)" }
5783
- }, $a = { class: "tpl:flex tpl:items-center tpl:gap-2" }, eo = ["title"], to = {
5827
+ }, uo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, fo = ["title"], po = {
5784
5828
  key: 0,
5785
5829
  class: "tpl:text-xs tpl:font-medium",
5786
5830
  style: { color: "var(--tpl-text)" }
5787
- }, no = {
5831
+ }, mo = {
5788
5832
  class: "tpl:flex tpl:rounded-md tpl:p-0.5",
5789
5833
  style: {
5790
5834
  border: "1px solid var(--tpl-border)",
5791
5835
  "background-color": "var(--tpl-bg)"
5792
5836
  }
5793
- }, ro = ["title"], io = ["title"], ao = { class: "tpl:flex tpl:items-center tpl:gap-2" }, oo = ["value"], so = { value: "" }, co = ["value"], lo = ["value"], uo = { value: "newest" }, fo = { value: "oldest" }, po = { value: "name_asc" }, mo = { value: "name_desc" }, ho = { value: "size_asc" }, go = { value: "size_desc" }, _o = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, vo = {
5837
+ }, ho = ["title"], go = ["title"], _o = { class: "tpl:flex tpl:items-center tpl:gap-2" }, vo = ["value"], yo = { value: "" }, bo = ["value"], xo = ["value"], So = { value: "newest" }, Co = { value: "oldest" }, wo = { value: "name_asc" }, To = { value: "name_desc" }, Eo = { value: "size_asc" }, Do = { value: "size_desc" }, Oo = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, ko = {
5794
5838
  key: 0,
5795
5839
  class: "tpl:px-4 tpl:pt-3"
5796
- }, yo = {
5840
+ }, Ao = {
5797
5841
  class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
5798
5842
  style: {
5799
5843
  "background-color": "var(--tpl-bg-elevated)",
5800
5844
  "box-shadow": "var(--tpl-shadow-xl)"
5801
5845
  }
5802
- }, bo = {
5846
+ }, jo = {
5803
5847
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
5804
5848
  style: { color: "var(--tpl-text)" }
5805
- }, xo = {
5849
+ }, Mo = {
5806
5850
  key: 0,
5807
5851
  class: "tpl:mb-4 tpl:text-xs",
5808
5852
  style: { color: "var(--tpl-text-muted)" }
5809
- }, So = {
5853
+ }, No = {
5810
5854
  key: 1,
5811
5855
  class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
5812
5856
  style: { "border-color": "var(--tpl-border)" }
5813
- }, Co = { class: "tpl:font-medium" }, wo = { style: { color: "var(--tpl-text-muted)" } }, To = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Eo = {
5857
+ }, Po = { class: "tpl:font-medium" }, Fo = { style: { color: "var(--tpl-text-muted)" } }, Io = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Lo = {
5814
5858
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
5815
5859
  style: { "border-color": "var(--tpl-border)" }
5816
- }, Do = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Oo = { class: "tpl:flex tpl:items-center tpl:gap-5" }, ko = {
5860
+ }, Ro = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, zo = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Bo = {
5817
5861
  key: 0,
5818
5862
  class: "tpl:flex tpl:items-center tpl:gap-2"
5819
- }, Ao = { class: "tpl:relative" }, jo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Mo = ["disabled"], No = /* @__PURE__ */ d({
5863
+ }, Vo = { class: "tpl:relative" }, Ho = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Uo = ["disabled"], Wo = /* @__PURE__ */ d({
5820
5864
  __name: "MediaLibrary",
5821
5865
  props: {
5822
5866
  authManager: {},
@@ -5829,20 +5873,20 @@ var Qi = ["data-tpl-theme"], $i = {
5829
5873
  emits: ["ready"],
5830
5874
  setup(e, { emit: t }) {
5831
5875
  let i = e, a = t, s = v(() => i.translations);
5832
- c("translations", i.translations);
5833
- let u = l(i.planConfig);
5834
- c(Ne, {
5835
- config: u,
5876
+ c(Me, l(i.translations));
5877
+ let u = {
5878
+ config: l(i.planConfig),
5836
5879
  isLoading: l(!1),
5837
5880
  hasFeature: (e) => i.planConfig.features[e] ?? !1,
5838
5881
  features: v(() => i.planConfig.features),
5839
5882
  fetchConfig: async () => {}
5840
- });
5841
- let d = v(() => i.planConfig.storage.used_bytes ?? 0), f = v(() => i.planConfig.storage.limit_bytes ?? 0), { availableCategories: h } = Fe(), _ = Oe({
5883
+ };
5884
+ c(Ae, u);
5885
+ let d = v(() => i.planConfig.storage.used_bytes ?? 0), f = v(() => i.planConfig.storage.limit_bytes ?? 0), { availableCategories: h } = Re(u), _ = ke({
5842
5886
  projectId: i.projectId,
5843
5887
  authManager: i.authManager,
5844
5888
  onError: i.onError
5845
- }), E = Zi({
5889
+ }), E = ea({
5846
5890
  library: _,
5847
5891
  translations: s
5848
5892
  });
@@ -5856,12 +5900,12 @@ var Qi = ["data-tpl-theme"], $i = {
5856
5900
  }
5857
5901
  return x(() => {
5858
5902
  _.loadItems(), _.loadFrequentlyUsed(), a("ready");
5859
- }), (t, i) => (o(), y("div", Ua, [
5860
- O("div", Wa, [O("h2", Ga, N(s.value.mediaLibrary.title), 1), O("div", Ka, [m(Xi, {
5903
+ }), (t, i) => (o(), y("div", eo, [
5904
+ O("div", to, [O("h2", no, N(s.value.mediaLibrary.title), 1), O("div", ro, [m($i, {
5861
5905
  "used-bytes": d.value,
5862
5906
  "limit-bytes": f.value,
5863
5907
  size: 22
5864
- }, null, 8, ["used-bytes", "limit-bytes"]), O("div", qa, [O("input", {
5908
+ }, null, 8, ["used-bytes", "limit-bytes"]), O("div", io, [O("input", {
5865
5909
  value: p(E).searchInput.value,
5866
5910
  type: "text",
5867
5911
  class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)]",
@@ -5872,13 +5916,13 @@ var Qi = ["data-tpl-theme"], $i = {
5872
5916
  },
5873
5917
  placeholder: s.value.mediaLibrary.searchPlaceholder,
5874
5918
  onInput: i[0] ||= (e) => p(E).handleSearchInput(e.target.value)
5875
- }, null, 40, Ja), m(p(de), {
5919
+ }, null, 40, ao), m(p(de), {
5876
5920
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5877
5921
  size: 13,
5878
5922
  "stroke-width": 2,
5879
5923
  style: { color: "var(--tpl-text-dim)" }
5880
5924
  })])])]),
5881
- O("div", Ya, [m(T, {
5925
+ O("div", oo, [m(T, {
5882
5926
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
5883
5927
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
5884
5928
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -5886,7 +5930,7 @@ var Qi = ["data-tpl-theme"], $i = {
5886
5930
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
5887
5931
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
5888
5932
  }, {
5889
- default: r(() => [p(E).showSidebar.value ? (o(), y("div", Xa, [m(br, {
5933
+ default: r(() => [p(E).showSidebar.value ? (o(), y("div", so, [m(Cr, {
5890
5934
  folders: p(_).folders.value,
5891
5935
  "current-folder-id": p(_).currentFolderId.value,
5892
5936
  "view-mode": p(_).viewMode.value,
@@ -5908,7 +5952,7 @@ var Qi = ["data-tpl-theme"], $i = {
5908
5952
  "onShowFrequentlyUsed"
5909
5953
  ])])) : b("", !0)]),
5910
5954
  _: 1
5911
- }), O("div", Za, [O("div", Qa, [O("div", $a, [
5955
+ }), O("div", co, [O("div", lo, [O("div", uo, [
5912
5956
  O("button", {
5913
5957
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5914
5958
  style: C({
@@ -5921,8 +5965,8 @@ var Qi = ["data-tpl-theme"], $i = {
5921
5965
  }, [m(p(ce), {
5922
5966
  size: 16,
5923
5967
  "stroke-width": 2
5924
- })], 12, eo),
5925
- p(_).viewMode.value === "frequently-used" ? (o(), y("span", to, N(s.value.mediaLibrary.frequentlyUsed), 1)) : (o(), w(Me, {
5968
+ })], 12, fo),
5969
+ p(_).viewMode.value === "frequently-used" ? (o(), y("span", po, N(s.value.mediaLibrary.frequentlyUsed), 1)) : (o(), w(Le, {
5926
5970
  key: 1,
5927
5971
  folders: p(_).folders.value,
5928
5972
  "current-folder-id": p(_).currentFolderId.value,
@@ -5932,7 +5976,7 @@ var Qi = ["data-tpl-theme"], $i = {
5932
5976
  "current-folder-id",
5933
5977
  "onNavigate"
5934
5978
  ])),
5935
- O("div", no, [O("button", {
5979
+ O("div", mo, [O("button", {
5936
5980
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5937
5981
  style: C({
5938
5982
  color: p(E).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
@@ -5943,7 +5987,7 @@ var Qi = ["data-tpl-theme"], $i = {
5943
5987
  }, [m(p(ve), {
5944
5988
  size: 14,
5945
5989
  "stroke-width": 2
5946
- })], 12, ro), O("button", {
5990
+ })], 12, ho), O("button", {
5947
5991
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5948
5992
  style: C({
5949
5993
  color: p(E).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
@@ -5954,8 +5998,8 @@ var Qi = ["data-tpl-theme"], $i = {
5954
5998
  }, [m(p(me), {
5955
5999
  size: 14,
5956
6000
  "stroke-width": 2
5957
- })], 12, io)])
5958
- ]), O("div", ao, [p(h).length > 1 ? (o(), y("select", {
6001
+ })], 12, go)])
6002
+ ]), O("div", _o, [p(h).length > 1 ? (o(), y("select", {
5959
6003
  key: 0,
5960
6004
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
5961
6005
  style: {
@@ -5965,10 +6009,10 @@ var Qi = ["data-tpl-theme"], $i = {
5965
6009
  },
5966
6010
  value: p(_).categoryFilter.value ?? "",
5967
6011
  onChange: i[4] ||= (e) => p(_).filterByCategory(e.target.value || null)
5968
- }, [O("option", so, N(s.value.mediaLibrary.filterAll), 1), (o(!0), y(M, null, n(p(h), (e) => (o(), y("option", {
6012
+ }, [O("option", yo, N(s.value.mediaLibrary.filterAll), 1), (o(!0), y(M, null, n(p(h), (e) => (o(), y("option", {
5969
6013
  key: e,
5970
6014
  value: e
5971
- }, N(p(E).getCategoryLabel(e)), 9, co))), 128))], 40, oo)) : b("", !0), O("select", {
6015
+ }, N(p(E).getCategoryLabel(e)), 9, bo))), 128))], 40, vo)) : b("", !0), O("select", {
5972
6016
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
5973
6017
  style: {
5974
6018
  "border-color": "var(--tpl-border)",
@@ -5978,13 +6022,13 @@ var Qi = ["data-tpl-theme"], $i = {
5978
6022
  value: p(_).sortOption.value,
5979
6023
  onChange: i[5] ||= (e) => p(_).sortBy(e.target.value)
5980
6024
  }, [
5981
- O("option", uo, N(s.value.mediaLibrary.sortNewest), 1),
5982
- O("option", fo, N(s.value.mediaLibrary.sortOldest), 1),
5983
- O("option", po, N(s.value.mediaLibrary.sortNameAsc), 1),
5984
- O("option", mo, N(s.value.mediaLibrary.sortNameDesc), 1),
5985
- O("option", ho, N(s.value.mediaLibrary.sortSizeAsc), 1),
5986
- O("option", go, N(s.value.mediaLibrary.sortSizeDesc), 1)
5987
- ], 40, lo)])]), O("div", _o, [p(_).viewMode.value === "files" ? (o(), y("div", vo, [m(Gi, {
6025
+ O("option", So, N(s.value.mediaLibrary.sortNewest), 1),
6026
+ O("option", Co, N(s.value.mediaLibrary.sortOldest), 1),
6027
+ O("option", wo, N(s.value.mediaLibrary.sortNameAsc), 1),
6028
+ O("option", To, N(s.value.mediaLibrary.sortNameDesc), 1),
6029
+ O("option", Eo, N(s.value.mediaLibrary.sortSizeAsc), 1),
6030
+ O("option", Do, N(s.value.mediaLibrary.sortSizeDesc), 1)
6031
+ ], 40, xo)])]), O("div", Oo, [p(_).viewMode.value === "files" ? (o(), y("div", ko, [m(Ji, {
5988
6032
  "is-uploading": p(_).isUploading.value,
5989
6033
  "upload-progress": p(_).uploadProgress.value,
5990
6034
  onUpload: p(E).handleUpload
@@ -6003,7 +6047,7 @@ var Qi = ["data-tpl-theme"], $i = {
6003
6047
  }, [m(p(ge), {
6004
6048
  size: 14,
6005
6049
  "stroke-width": 2
6006
- }), F(" " + N(s.value.mediaLibrary.importFromUrl), 1)])])) : b("", !0), m(Zr, {
6050
+ }), F(" " + N(s.value.mediaLibrary.importFromUrl), 1)])])) : b("", !0), m(ei, {
6007
6051
  items: p(E).displayItems.value,
6008
6052
  "selected-ids": p(_).selectedItems.value,
6009
6053
  "is-loading": p(_).isLoading.value,
@@ -6026,7 +6070,7 @@ var Qi = ["data-tpl-theme"], $i = {
6026
6070
  "onEdit",
6027
6071
  "onReplace"
6028
6072
  ])])])]),
6029
- m(li, {
6073
+ m(fi, {
6030
6074
  visible: p(E).showImportUrlModal.value,
6031
6075
  "is-importing": p(_).isImportingFromUrl.value,
6032
6076
  error: p(_).importFromUrlError.value,
@@ -6038,7 +6082,7 @@ var Qi = ["data-tpl-theme"], $i = {
6038
6082
  "error",
6039
6083
  "onImport"
6040
6084
  ]),
6041
- m(cr, {
6085
+ m(dr, {
6042
6086
  visible: !!p(E).editingItem.value,
6043
6087
  item: p(E).editingItem.value,
6044
6088
  onSave: p(E).handleEditSave,
@@ -6048,7 +6092,7 @@ var Qi = ["data-tpl-theme"], $i = {
6048
6092
  "item",
6049
6093
  "onSave"
6050
6094
  ]),
6051
- m(Bi, {
6095
+ m(Ui, {
6052
6096
  visible: p(_).showReplaceWarning.value,
6053
6097
  item: p(_).pendingReplaceItem.value,
6054
6098
  "usage-info": p(_).replaceUsageInfo.value,
@@ -6082,19 +6126,19 @@ var Qi = ["data-tpl-theme"], $i = {
6082
6126
  "-webkit-backdrop-filter": "blur(8px)"
6083
6127
  },
6084
6128
  onClick: i[11] ||= S((...e) => p(_).cancelDelete && p(_).cancelDelete(...e), ["self"])
6085
- }, [O("div", yo, [
6086
- O("h3", bo, N(s.value.mediaLibrary.deleteWarningTitle), 1),
6129
+ }, [O("div", Ao, [
6130
+ O("h3", jo, N(s.value.mediaLibrary.deleteWarningTitle), 1),
6087
6131
  O("p", {
6088
6132
  class: g(["tpl:text-xs", p(E).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
6089
6133
  style: { color: "var(--tpl-text-muted)" }
6090
6134
  }, N(s.value.mediaLibrary.deleteWarningMessage), 3),
6091
- p(E).hasUsedFiles.value ? (o(), y("p", xo, N(s.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
6092
- p(E).hasUsedFiles.value ? (o(), y("div", So, [(o(!0), y(M, null, n(p(_).deleteUsageInfo.value, (e, t) => (o(), y("div", {
6135
+ p(E).hasUsedFiles.value ? (o(), y("p", Mo, N(s.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
6136
+ p(E).hasUsedFiles.value ? (o(), y("div", No, [(o(!0), y(M, null, n(p(_).deleteUsageInfo.value, (e, t) => (o(), y("div", {
6093
6137
  key: t,
6094
6138
  class: "tpl:text-xs",
6095
6139
  style: { color: "var(--tpl-text)" }
6096
- }, [e.template_count > 0 ? (o(), y(M, { key: 0 }, [O("span", Co, N(p(E).displayItems.value.find((e) => e.id === t)?.filename || t), 1), O("span", wo, " - " + N(s.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
6097
- O("div", To, [O("button", {
6140
+ }, [e.template_count > 0 ? (o(), y(M, { key: 0 }, [O("span", Po, N(p(E).displayItems.value.find((e) => e.id === t)?.filename || t), 1), O("span", Fo, " - " + N(s.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
6141
+ O("div", Io, [O("button", {
6098
6142
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
6099
6143
  style: {
6100
6144
  "border-color": "var(--tpl-border)",
@@ -6114,7 +6158,7 @@ var Qi = ["data-tpl-theme"], $i = {
6114
6158
  ])])) : b("", !0)]),
6115
6159
  _: 1
6116
6160
  }),
6117
- O("div", Eo, [O("div", Do, [p(_).previewItem.value ? (o(), w(Ti, {
6161
+ O("div", Lo, [O("div", Ro, [p(_).previewItem.value ? (o(), w(Oi, {
6118
6162
  key: 0,
6119
6163
  "selected-conversion": p(E).selectedConversion.value,
6120
6164
  "onUpdate:selectedConversion": i[12] ||= (e) => p(E).selectedConversion.value = e,
@@ -6124,7 +6168,7 @@ var Qi = ["data-tpl-theme"], $i = {
6124
6168
  "selected-conversion",
6125
6169
  "item",
6126
6170
  "folders"
6127
- ])) : b("", !0)]), O("div", Oo, [p(_).selectedItems.value.size > 0 ? (o(), y("div", ko, [p(_).previewItem.value ? (o(), y("button", {
6171
+ ])) : b("", !0)]), O("div", zo, [p(_).selectedItems.value.size > 0 ? (o(), y("div", Bo, [p(_).previewItem.value ? (o(), y("button", {
6128
6172
  key: 0,
6129
6173
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
6130
6174
  style: C({
@@ -6141,7 +6185,7 @@ var Qi = ["data-tpl-theme"], $i = {
6141
6185
  key: 0,
6142
6186
  size: 12,
6143
6187
  "stroke-width": 2
6144
- })), F(" " + N(p(E).copied.value ? s.value.mediaLibrary.copied : s.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), O("div", Ao, [O("button", {
6188
+ })), F(" " + N(p(E).copied.value ? s.value.mediaLibrary.copied : s.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), O("div", Vo, [O("button", {
6145
6189
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
6146
6190
  style: {
6147
6191
  "border-color": "var(--tpl-border)",
@@ -6149,7 +6193,7 @@ var Qi = ["data-tpl-theme"], $i = {
6149
6193
  "background-color": "var(--tpl-bg)"
6150
6194
  },
6151
6195
  onClick: i[14] ||= (e) => p(E).showMovePicker.value = !p(E).showMovePicker.value
6152
- }, N(s.value.mediaLibrary.moveSelected), 1), p(E).showMovePicker.value ? (o(), w(mi, {
6196
+ }, N(s.value.mediaLibrary.moveSelected), 1), p(E).showMovePicker.value ? (o(), w(_i, {
6153
6197
  key: 0,
6154
6198
  folders: p(_).folders.value,
6155
6199
  "current-folder-id": p(_).currentFolderId.value,
@@ -6159,7 +6203,7 @@ var Qi = ["data-tpl-theme"], $i = {
6159
6203
  "folders",
6160
6204
  "current-folder-id",
6161
6205
  "onSelect"
6162
- ])) : b("", !0)])])) : b("", !0), O("div", jo, [p(_).selectedItems.value.size > 0 ? (o(), y("button", {
6206
+ ])) : b("", !0)])])) : b("", !0), O("div", Ho, [p(_).selectedItems.value.size > 0 ? (o(), y("button", {
6163
6207
  key: 0,
6164
6208
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
6165
6209
  style: {
@@ -6177,84 +6221,52 @@ var Qi = ["data-tpl-theme"], $i = {
6177
6221
  },
6178
6222
  disabled: !p(_).previewItem.value,
6179
6223
  onClick: D
6180
- }, N(s.value.mediaLibrary.selectFile), 9, Mo)) : b("", !0)])])])
6224
+ }, N(s.value.mediaLibrary.selectFile), 9, Uo)) : b("", !0)])])])
6181
6225
  ]));
6182
6226
  }
6183
- }), Po = /* #__PURE__ */ Object.assign({
6184
- "./locales/ca.ts": () => import("./ca-CNRWAMHI.js"),
6185
- "./locales/de.ts": () => import("./de-DFYCT4QU.js"),
6186
- "./locales/en.ts": () => import("./en-DE_y1YWU.js"),
6187
- "./locales/es.ts": () => import("./es-OgkdMZGX.js"),
6188
- "./locales/fr.ts": () => import("./fr-Dswns199.js"),
6189
- "./locales/nl.ts": () => import("./nl-CbcPJlrL.js"),
6190
- "./locales/pt-BR.ts": () => import("./pt-BR-BibOQm-o.js")
6191
- });
6192
- function Fo(e) {
6193
- return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
6194
- }
6195
- var Io = Fo(Po);
6196
- function Lo(e) {
6197
- return e.trim().replace(/_/g, "-").toLowerCase();
6198
- }
6199
- function Ro(e) {
6200
- let t = Lo(e);
6201
- return Io.find((e) => Lo(e) === t);
6202
- }
6203
- function zo(e) {
6204
- return Lo(e).split("-")[0];
6205
- }
6206
- function Bo(e) {
6207
- return Ro(e) ?? Ro(zo(e)) ?? "en";
6208
- }
6209
- async function Vo(e) {
6210
- let t = Po[`./locales/${Bo(e)}.ts`];
6211
- return (await t()).default;
6212
- }
6213
- //#endregion
6214
- //#region ../media-library/src/standalone/visual.ts
6215
- var Ho = null, Uo = l(null);
6216
- async function Wo(e) {
6227
+ }), Go = null, Ko = l(null);
6228
+ async function qo(e) {
6217
6229
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
6218
6230
  if (!t) throw Error(`Container element not found: ${e.container}`);
6219
6231
  let n = Te(e.auth, e.onError);
6220
6232
  await n.initialize();
6221
- let r = await new Ee(n).fetchConfig(), i = await Vo(e.locale ?? "en");
6222
- return Ko(t, e.theme), Ho && Go(), new Promise((a, o) => {
6233
+ let r = await new Ee(n).fetchConfig(), i = await ca(e.locale ?? "en");
6234
+ return Yo(t, e.theme), Go && Jo(), new Promise((a, o) => {
6223
6235
  try {
6224
- Ho = A({ setup() {
6236
+ Go = A({ setup() {
6225
6237
  let o = () => {
6226
6238
  a({
6227
- setTheme: (e) => Ko(t, e),
6228
- unmount: Go
6239
+ setTheme: (e) => Yo(t, e),
6240
+ unmount: Jo
6229
6241
  });
6230
6242
  };
6231
- return () => P(No, {
6243
+ return () => P(Wo, {
6232
6244
  authManager: n,
6233
6245
  projectId: n.projectId,
6234
6246
  planConfig: r,
6235
6247
  translations: i,
6236
6248
  onSelect: e.onSelect,
6237
6249
  onError: e.onError,
6238
- ref: Uo,
6250
+ ref: Ko,
6239
6251
  onReady: o
6240
6252
  });
6241
- } }), Ho.mount(t);
6253
+ } }), Go.mount(t);
6242
6254
  } catch (e) {
6243
6255
  o(e);
6244
6256
  }
6245
6257
  });
6246
6258
  }
6247
- function Go() {
6248
- Ho && (Ho.unmount(), Ho = null, Uo.value = null);
6259
+ function Jo() {
6260
+ Go && (Go.unmount(), Go = null, Ko.value = null);
6249
6261
  }
6250
- function Ko(e, t) {
6262
+ function Yo(e, t) {
6251
6263
  t && (t.primaryColor && e.style.setProperty("--tpl-primary", t.primaryColor), t.borderRadius !== void 0 && (e.style.setProperty("--tpl-radius", `${t.borderRadius}px`), e.style.setProperty("--tpl-radius-sm", `${Math.max(0, t.borderRadius - 3)}px`), e.style.setProperty("--tpl-radius-lg", `${t.borderRadius + 4}px`)));
6252
6264
  }
6253
6265
  typeof window < "u" && (window.TemplaticalMedia = {
6254
- init: Wo,
6255
- unmount: Go
6266
+ init: qo,
6267
+ unmount: Jo
6256
6268
  });
6257
6269
  //#endregion
6258
- export { De as MediaApiClient, Ha as MediaLibraryModal };
6270
+ export { Oe as MediaApiClient, $a as MediaLibraryModal };
6259
6271
 
6260
- //# sourceMappingURL=src-Dq3fgSIx.js.map
6272
+ //# sourceMappingURL=src-CoHDh8Ua.js.map