@layers-app/editor 2.2.41 → 2.2.42

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 (211) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/{layers.-prUTMEe.js → layers.-ju7gx16.js} +1 -1
  4. package/dist/{layers.BeW-l4JL.js → layers.-lWbvG61.js} +1 -1
  5. package/dist/{layers.Bfmz9os1.js → layers.0y-kmAVw.js} +1 -1
  6. package/dist/{layers.DHtvA3UR.js → layers.1LxuOQJN.js} +1 -1
  7. package/dist/{layers.DmYKMAk5.js → layers.2FxpdJNJ.js} +1 -1
  8. package/dist/{layers.CdJ_RdT6.js → layers.2VKdA5L8.js} +8 -8
  9. package/dist/{layers.BPmFneBG.js → layers.3NvonLEq.js} +25 -25
  10. package/dist/{layers.Bh0e5oBt.js → layers.3OW-7kTT.js} +1 -1
  11. package/dist/{layers.DlzAUFQk.js → layers.4HZIjqYX.js} +1 -1
  12. package/dist/{layers.BhQd8YgR.js → layers.5MSYp6bY.js} +1 -1
  13. package/dist/{layers.DnX82iOF.js → layers.8G3URL9h.js} +1 -1
  14. package/dist/{layers.CuEH1y5V.js → layers.8PsdhJr_.js} +1 -1
  15. package/dist/{layers.ZimVFJsj.js → layers.8lGj-GYn.js} +1 -1
  16. package/dist/{layers.BH74WarV.js → layers.9izsxn6m.js} +1 -1
  17. package/dist/{layers.B5FmUA8d.js → layers.AoyuuPNv.js} +1 -1
  18. package/dist/{layers.DhowXOlR.js → layers.B-7Utm8u.js} +1 -1
  19. package/dist/{layers.BHUxeY-o.js → layers.B-Gq744C.js} +1 -1
  20. package/dist/{layers.C3czrXaI.js → layers.B0FBFZmZ.js} +1 -1
  21. package/dist/{layers.DC4WjaI4.js → layers.B0eCSf4g.js} +1 -1
  22. package/dist/{layers.DoP-WMDr.js → layers.B1ZqapyL.js} +3 -3
  23. package/dist/{layers.C2V2Fqd8.js → layers.B1bwH-QM.js} +2 -2
  24. package/dist/{layers.nQDKnlwp.js → layers.B1riWlup.js} +1 -1
  25. package/dist/{layers.rvGjGGX-.js → layers.B2J3gqbX.js} +1 -1
  26. package/dist/layers.B2xZr_Qb.js +6 -0
  27. package/dist/{layers.B2Y3SOyx.js → layers.B4ODDrXe.js} +1 -1
  28. package/dist/{layers.tgfKdwxk.js → layers.B5HL7Xgu.js} +1 -1
  29. package/dist/{layers.CB6Gb2PR.js → layers.B5mV1X7_.js} +4 -4
  30. package/dist/{layers.DHCkeaBj.js → layers.B5wP95v5.js} +2 -2
  31. package/dist/{layers.DqbSBCTg.js → layers.B6ppQCpX.js} +1 -1
  32. package/dist/{layers.C0P8qV9q.js → layers.BAZJ_QW2.js} +1 -1
  33. package/dist/{layers.R4j_04y7.js → layers.BAb6lW00.js} +1 -1
  34. package/dist/{layers.D0sTzHvk.js → layers.BEKhTeC7.js} +1 -1
  35. package/dist/{layers.DwxdvxV6.js → layers.BFCtF16Q.js} +1 -1
  36. package/dist/{layers.BTUD8Ga6.js → layers.BGRwNWNe.js} +1 -1
  37. package/dist/{layers.CxnKa1SZ.js → layers.BI4_cIL3.js} +1 -1
  38. package/dist/{layers.DDM4b59r.js → layers.BIN6x-T7.js} +1 -1
  39. package/dist/{layers.BtEhde9Y.js → layers.BJX3Xmr1.js} +3 -3
  40. package/dist/{layers.DSs7H9TY.js → layers.BK4uJeQs.js} +1 -1
  41. package/dist/{layers.AZFDTfYD.js → layers.BMNz_Q3r.js} +4 -4
  42. package/dist/{layers.BTC0a-iu.js → layers.BMelfabQ.js} +1 -1
  43. package/dist/{layers.DqqiMEmK.js → layers.BNk94eBs.js} +1 -1
  44. package/dist/{layers.DJlXUaLG.js → layers.BOKoyCba.js} +2 -2
  45. package/dist/{layers.Bf6zaNoL.js → layers.BPVJ3lO7.js} +1 -1
  46. package/dist/{layers.xbktakT7.js → layers.BQ6oy-pR.js} +3 -3
  47. package/dist/{layers.Bf0vTbsV.js → layers.BRxZwSOd.js} +4 -4
  48. package/dist/{layers.DU-5gyIL.js → layers.BUK2tI9F.js} +1 -1
  49. package/dist/{layers.-pogHjPZ.js → layers.BUn7PajZ.js} +1 -1
  50. package/dist/{layers.6NJGN7LR.js → layers.BUo--Bs7.js} +1 -1
  51. package/dist/{layers.CqsMZzo3.js → layers.BVUC3gyi.js} +1 -1
  52. package/dist/{layers.BjiKlA5A.js → layers.BWlwaF_p.js} +1 -1
  53. package/dist/{layers.CoKmxI39.js → layers.BZQfXHhW.js} +1 -1
  54. package/dist/layers.BZcwfAyr.js +1 -0
  55. package/dist/{layers.DVwRkt1k.js → layers.BaCCzKX7.js} +2 -2
  56. package/dist/{layers.DK_8k30I.js → layers.BadYBGOU.js} +1 -1
  57. package/dist/{layers.BZNymU7f.js → layers.BagYg5_M.js} +1 -1
  58. package/dist/{layers.CVvm2cN5.js → layers.BalCY_dc.js} +1 -1
  59. package/dist/{layers.DqLY2bj6.js → layers.BbPWb_1m.js} +1 -1
  60. package/dist/{layers.9S8DSgzy.js → layers.BbXqqa2k.js} +7 -7
  61. package/dist/{layers.C0nd9_au.js → layers.BcQ1kMl1.js} +1 -1
  62. package/dist/{layers.BYnRL5fg.js → layers.BgtSsAyW.js} +1 -1
  63. package/dist/{layers.KIMFA6cd.js → layers.BhAJ6OOY.js} +1 -1
  64. package/dist/{layers.0REwXLJa.js → layers.Bj2-sMHc.js} +1 -1
  65. package/dist/{layers.CKNafy8Z.js → layers.BkLWcq3H.js} +1 -1
  66. package/dist/{layers.CZ-ghciP.js → layers.BlehOZWo.js} +1 -1
  67. package/dist/{layers.B20QYwrg.js → layers.BnaqmWv7.js} +1 -1
  68. package/dist/{layers.9RpqwIgn.js → layers.BpfBdFIq.js} +1 -1
  69. package/dist/{layers.nkBs2J_Y.js → layers.Bpz3db4s.js} +1 -1
  70. package/dist/{layers.D0vgKk7k.js → layers.BrrQS_To.js} +5 -5
  71. package/dist/{layers.CezhTfqb.js → layers.BrvXOTnQ.js} +1 -1
  72. package/dist/{layers.CBZ6rdkQ.js → layers.BstcEXkq.js} +1 -1
  73. package/dist/{layers.CqOpB2pv.js → layers.BuCNtu_x.js} +1 -1
  74. package/dist/{layers.D1aHIuph.js → layers.BuPYl1zn.js} +1 -1
  75. package/dist/{layers.BB5zhvW_.js → layers.BwDXQByz.js} +1 -1
  76. package/dist/{layers.D8aKn7_I.js → layers.Bwhr4KSk.js} +1 -1
  77. package/dist/{layers.C6AQnU4v.js → layers.BxHQuXfB.js} +1 -1
  78. package/dist/{layers.K9sbiHeh.js → layers.BxevgFep.js} +1 -1
  79. package/dist/{layers.CdSOkW0t.js → layers.BzjTlsuS.js} +1 -1
  80. package/dist/{layers.D4aJmX4D.js → layers.C-DNpoMP.js} +1 -1
  81. package/dist/{layers.CM1RY50-.js → layers.C-kj3R5W.js} +3 -3
  82. package/dist/{layers.DQwjT1Ef.js → layers.C3ZTJw5y.js} +1 -1
  83. package/dist/{layers.H-s_kgpp.js → layers.C3dMe__G.js} +1 -1
  84. package/dist/{layers.DAvNRddm.js → layers.C4opoFoN.js} +1 -1
  85. package/dist/{layers.BQn0SMyS.js → layers.C6gBGZRI.js} +1 -1
  86. package/dist/{layers.B4pgQDx9.js → layers.C6qBEls5.js} +1 -1
  87. package/dist/{layers.azQKEmBP.js → layers.C7JWqsly.js} +5 -5
  88. package/dist/{layers.DZT3fhDF.js → layers.C8Ui2tfR.js} +1 -1
  89. package/dist/{layers.CNGUViM-.js → layers.C9VjKLJz.js} +1 -1
  90. package/dist/layers.C9lQwkMT.js +1 -0
  91. package/dist/{layers.BKV_Sn-p.js → layers.C9oeho5s.js} +1 -1
  92. package/dist/{layers.DxiI7oFV.js → layers.C9z5acJ1.js} +5 -5
  93. package/dist/{layers.DvTE7LyS.js → layers.CA7_AZSw.js} +1 -1
  94. package/dist/{layers.s8O26TRm.js → layers.CAzXuKad.js} +1 -1
  95. package/dist/{layers.pz4hKIUL.js → layers.CCvPJmBs.js} +1 -1
  96. package/dist/{layers.pSfFlbuv.js → layers.CDDYSTV_.js} +1 -1
  97. package/dist/{layers.D_2VYVAz.js → layers.CDQSxMxh.js} +1 -1
  98. package/dist/{layers.CI2dxkVZ.js → layers.CIy-CBKt.js} +1 -1
  99. package/dist/{layers.BWEwrUfZ.js → layers.CJsBqp7q.js} +1 -1
  100. package/dist/{layers.BNc3uVU5.js → layers.CKplKAGd.js} +1 -1
  101. package/dist/{layers.m_ulwRpf.js → layers.CLt1lOdh.js} +1 -1
  102. package/dist/{layers.C7CAhgE9.js → layers.CRe13l0l.js} +1 -1
  103. package/dist/{layers.CCkpZbNU.js → layers.CV-0KbJB.js} +1 -1
  104. package/dist/{layers.DA9xtoYs.js → layers.CX50nmzf.js} +4 -4
  105. package/dist/{layers.DUtZsAUN.js → layers.CZPR3sOU.js} +1 -1
  106. package/dist/{layers.DNZeWizh.js → layers.C_dKp51p.js} +3 -3
  107. package/dist/{layers.BKCo0vbX.js → layers.CaIMnQjx.js} +4 -4
  108. package/dist/{layers.DZIuSvWH.js → layers.CbtaJD5X.js} +1 -1
  109. package/dist/{layers.CX2hJt1r.js → layers.CbzJxFV8.js} +1 -1
  110. package/dist/{layers.D5Ydj3ww.js → layers.ClM8rQ7y.js} +1 -1
  111. package/dist/{layers.z8kAk_Sg.js → layers.CmTZUf2p.js} +1 -1
  112. package/dist/{layers.DdogDSyL.js → layers.Co-LTnhB.js} +1 -1
  113. package/dist/{layers.BEBGt1Dt.js → layers.Cq8R8om8.js} +1 -1
  114. package/dist/{layers.Cz4C01_N.js → layers.CqLC3MAT.js} +1 -1
  115. package/dist/{layers.DaWCCzXz.js → layers.CqjHpZPx.js} +1 -1
  116. package/dist/{layers.DHWU1y10.js → layers.CqpiEwZY.js} +1 -1
  117. package/dist/{layers.BWiShM4D.js → layers.CsR_o0I9.js} +3 -3
  118. package/dist/{layers.BUUbg20U.js → layers.Cx5c5eym.js} +1 -1
  119. package/dist/{layers.CntF-9iu.js → layers.CxQW8Fe5.js} +1 -1
  120. package/dist/{layers.BtqiE2Zw.js → layers.CxTp3fVS.js} +1 -1
  121. package/dist/{layers.B1-2ER2o.js → layers.CxZWzFjf.js} +1 -1
  122. package/dist/{layers.CZ6iGqZQ.js → layers.D4nQTLQ5.js} +1 -1
  123. package/dist/{layers.vqHuEAO-.js → layers.D66FS0DJ.js} +1 -1
  124. package/dist/{layers.DweZXvH2.js → layers.D8ukxayM.js} +2 -2
  125. package/dist/{layers.DH8K9r9O.js → layers.D9blD47B.js} +1 -1
  126. package/dist/layers.DA8K1lr6.js +1 -0
  127. package/dist/{layers.BBlgFkaX.js → layers.DASOIOHg.js} +1 -1
  128. package/dist/{layers.lnCuj7Q6.js → layers.DCeGFEI8.js} +1 -1
  129. package/dist/{layers.Bjl3-TZ6.js → layers.DDdtjC0i.js} +1 -1
  130. package/dist/{layers.CCV8nVyL.js → layers.DEnv6tje.js} +272 -270
  131. package/dist/{layers.BuC8mggQ.js → layers.DGLOIH3X.js} +1 -1
  132. package/dist/{layers.BPG9BJyp.js → layers.DIbawAb9.js} +1 -1
  133. package/dist/{layers.q3IjirYU.js → layers.DKBXcRnY.js} +1 -1
  134. package/dist/{layers.DaDNIac_.js → layers.DKFcr53Q.js} +1 -1
  135. package/dist/{layers.BeIaZJU-.js → layers.DKneR75F.js} +1 -1
  136. package/dist/layers.DMvDtceD.js +7 -0
  137. package/dist/{layers.Ce6JuM4T.js → layers.DNo9l6_0.js} +3 -3
  138. package/dist/{layers.va1nURVd.js → layers.DXpRdEJb.js} +6 -6
  139. package/dist/{layers.DvprN6bf.js → layers.DXvTFzh9.js} +1 -1
  140. package/dist/{layers.B_Zw6UfK.js → layers.DZMtXIgo.js} +1 -1
  141. package/dist/{layers.BNgccTqa.js → layers.D_G_yN8x.js} +3 -3
  142. package/dist/{layers.BvdltVTe.js → layers.DapuU0KG.js} +1 -1
  143. package/dist/{layers.B44bGQl8.js → layers.Db9YZra7.js} +1 -1
  144. package/dist/{layers.7iqMYe1Z.js → layers.Dbom-nDm.js} +1 -1
  145. package/dist/{layers.3-KHMN8-.js → layers.DcZ6n4g7.js} +1 -1
  146. package/dist/{layers.o6WBaOLa.js → layers.DgK1GSIr.js} +1 -1
  147. package/dist/{layers.FUlqL-BW.js → layers.DgSWuxXH.js} +1 -1
  148. package/dist/{layers.BsiV_mYn.js → layers.DhOoVmLi.js} +1 -1
  149. package/dist/{layers.BJEB2n7C.js → layers.Dj6dKbkY.js} +1 -1
  150. package/dist/{layers.BfBwi9kx.js → layers.Dj9XjFcz.js} +4 -4
  151. package/dist/{layers.BsEdQLFP.js → layers.Dlm_YrEu.js} +1 -1
  152. package/dist/{layers.uO2ixaGs.js → layers.DmErEsm4.js} +1 -1
  153. package/dist/{layers.kPF1pBqD.js → layers.DmpOGm35.js} +1 -1
  154. package/dist/{layers.jhkokT-m.js → layers.DpI_1b3F.js} +1 -1
  155. package/dist/{layers.DH8HnxJY.js → layers.DqWJoelP.js} +2 -2
  156. package/dist/{layers.Ca_FfHTH.js → layers.DqzWMLD7.js} +4 -4
  157. package/dist/{layers.DZr9ja6S.js → layers.DrP_szmi.js} +1 -1
  158. package/dist/{layers.CuJjDl5I.js → layers.DtKBFm_W.js} +1 -1
  159. package/dist/{layers.Bck1nyDf.js → layers.Du5Kw0lv.js} +1 -1
  160. package/dist/{layers.Bnns4b8C.js → layers.DuwiO77s.js} +1 -1
  161. package/dist/{layers.C1_VHbtk.js → layers.DvVNW7Dv.js} +1 -1
  162. package/dist/{layers.DwZRGekE.js → layers.Dwab3CXB.js} +1 -1
  163. package/dist/{layers.CZ6EIVkr.js → layers.Dx-CTZW1.js} +1 -1
  164. package/dist/{layers.Bk3BD2LO.js → layers.DyBzvt5Z.js} +1 -1
  165. package/dist/{layers.CiRsNynK.js → layers.Dyrdw0nq.js} +1 -1
  166. package/dist/layers.EnPHWkJ_.js +8 -0
  167. package/dist/{layers.DXAGo5cY.js → layers.Fj9T6hYj.js} +1 -1
  168. package/dist/{layers.BIzPxN5I.js → layers.Fvne9rpD.js} +3 -3
  169. package/dist/{layers.CwzcRNpd.js → layers.NCzGgZgn.js} +1 -1
  170. package/dist/{layers.eUUVnf56.js → layers.OpOAYuMR.js} +1 -1
  171. package/dist/{layers.C_Ur-9Yr.js → layers.P62ZJW6E.js} +1 -1
  172. package/dist/{layers.D2yTz-So.js → layers.Q3ufNO5n.js} +1 -1
  173. package/dist/{layers.oJ2sQ4Hw.js → layers.QMyAgzrv.js} +1 -1
  174. package/dist/{layers.DFsWppan.js → layers.TRNn3vJS.js} +7 -7
  175. package/dist/{layers.D-Ie2JQV.js → layers.U-n1WT4t.js} +1 -1
  176. package/dist/{layers.C_hkkoz8.js → layers.WEumG3HP.js} +1 -1
  177. package/dist/{layers.pI_GV11S.js → layers.WpQERc9Q.js} +3 -3
  178. package/dist/{layers.C9_GwOsc.js → layers.X9eT4tKQ.js} +1 -1
  179. package/dist/{layers.DRwGEKDY.js → layers.Y6_WR9xb.js} +4 -4
  180. package/dist/{layers.DDm6VVYR.js → layers.Yr2VZBmQ.js} +1 -1
  181. package/dist/{layers.BFOV9gyP.js → layers.ZeymhrNs.js} +1 -1
  182. package/dist/{layers.ChX7eMI0.js → layers._dOKpw-_.js} +4 -4
  183. package/dist/{layers.CvxHQb8U.js → layers.afOClBbH.js} +1 -1
  184. package/dist/{layers.C3TfSp3b.js → layers.bgBWDeIT.js} +1 -1
  185. package/dist/{layers.DxoCSH4r.js → layers.ce4kfKHf.js} +1 -1
  186. package/dist/{layers.DJNq6slZ.js → layers.cooC1lo-.js} +4 -4
  187. package/dist/{layers.DSA8lkEg.js → layers.gK8xSegA.js} +1 -1
  188. package/dist/{layers.D1x7GR3O.js → layers.gysZsHSy.js} +4 -4
  189. package/dist/{layers.iQB27rXc.js → layers.h88EgD7e.js} +1 -1
  190. package/dist/{layers.B6e4LO7M.js → layers.hh4D1Fip.js} +1 -1
  191. package/dist/{layers.CZeKVeuD.js → layers.iXfVMZ0v.js} +1 -1
  192. package/dist/{layers.Bbx5_76Z.js → layers.joneqHx_.js} +1 -1
  193. package/dist/{layers.DdVFlLYB.js → layers.k6ZdPuHR.js} +1 -1
  194. package/dist/{layers.BSUqNKh-.js → layers.mD4zfQJm.js} +1 -1
  195. package/dist/{layers.D87cBIKf.js → layers.nZZ7shb4.js} +1 -1
  196. package/dist/{layers.CimFPCJA.js → layers.nsnjrxZs.js} +1 -1
  197. package/dist/{layers.BkfLSpc7.js → layers.obOGK1bO.js} +1 -1
  198. package/dist/{layers.BeEGapP8.js → layers.pKbdoZxb.js} +1 -1
  199. package/dist/{layers.CtgJUNhm.js → layers.piUu5-9J.js} +1 -1
  200. package/dist/{layers.BprGkykI.js → layers.q4K1JOUr.js} +1 -1
  201. package/dist/{layers.iMpiFcJq.js → layers.q6KUarMd.js} +1 -1
  202. package/dist/{layers.CaYqx9TB.js → layers.qCM4_T1x.js} +1 -1
  203. package/dist/{layers.CiU5xtTu.js → layers.z1UnV_Zw.js} +1 -1
  204. package/dist/{layers.Dt4hTKjU.js → layers.zC9WahYF.js} +1 -1
  205. package/package.json +80 -80
  206. package/dist/layers.C-a7ykRd.js +0 -7
  207. package/dist/layers.CYf-jzmA.js +0 -8
  208. package/dist/layers.DwkrCSjE.js +0 -6
  209. package/dist/layers.LUWx2Na_.js +0 -1
  210. package/dist/layers.V_aDpQCH.js +0 -1
  211. package/dist/layers.ZbZryeHO.js +0 -1
@@ -1,13 +1,13 @@
1
- import { jsxs as I, jsx as n, Fragment as G } from "react/jsx-runtime";
2
- import { useMemo as X, useState as b, useCallback as k, useContext as he, useRef as Ee, useEffect as M } from "react";
3
- import { useTranslation as R } from "react-i18next";
4
- import { useLexicalComposerContext as z } from "@lexical/react/LexicalComposerContext";
5
- import { Menu as A, Flex as de, Stack as Te, Button as $, Box as Re, LoadingOverlay as ze } from "@mantine/core";
6
- import { $getNodeByKey as L, COMMAND_PRIORITY_LOW as Ue, $setSelection as je } from "lexical";
7
- import { y as _e, k as q, m as Fe, H as O, z as ge, D as fe, B as D, N as we, F as He, G as $e, q as Be, C as be, J as Ve, K as Ge, L as B, Q as Xe, S as qe, T as Je, U as Qe, V as Ye, W as Ze, R as Ke, O as et, r as ce, j as ue, X as pe, o as tt } from "./layers.9S8DSgzy.js";
8
- import { AttachmentsGalleryModal as Ce, showErrorNotification as ot } from "@layers-app/shared";
9
- import { useLexicalEditable as nt } from "@lexical/react/useLexicalEditable";
10
- import { useDisclosure as V } from "@mantine/hooks";
1
+ import { jsxs as y, jsx as n, Fragment as R } from "react/jsx-runtime";
2
+ import { useMemo as X, useState as w, useCallback as k, useContext as ge, useRef as Te, useEffect as A } from "react";
3
+ import { useTranslation as z } from "react-i18next";
4
+ import { useLexicalComposerContext as U } from "@lexical/react/LexicalComposerContext";
5
+ import { Menu as O, Flex as ce, Stack as Re, Button as B, Box as ze, LoadingOverlay as Ue } from "@mantine/core";
6
+ import { $getNodeByKey as v, COMMAND_PRIORITY_LOW as je, $setSelection as _e } from "lexical";
7
+ import { y as Fe, k as q, m as He, H as x, z as fe, D as we, B as L, N as be, F as $e, G as Be, q as Ve, C as Ce, J as Ge, K as Xe, L as V, Q as qe, S as Je, T as Qe, U as Ye, V as Ze, W as Ke, R as et, O as tt, r as ue, j as pe, X as me, o as ot } from "./layers.BbXqqa2k.js";
8
+ import { AttachmentsGalleryModal as ye, showErrorNotification as nt } from "@layers-app/shared";
9
+ import { useLexicalEditable as J } from "@lexical/react/useLexicalEditable";
10
+ import { useDisclosure as G } from "@mantine/hooks";
11
11
  import "@lexical/react/LexicalDecoratorBlockNode";
12
12
  import "@lexical/utils";
13
13
  import "@lexical/mark";
@@ -17,7 +17,7 @@ import "react-dom";
17
17
  import "@lexical/react/LexicalErrorBoundary";
18
18
  import "@lexical/react/LexicalBlockWithAlignableContents";
19
19
  import "@mantine/notifications";
20
- const ye = [
20
+ const ke = [
21
21
  ["path", { d: "M8.00001 3.09779C8.00001 3.09779 4.03375 2.74194 3.38784 3.38785C2.74192 4.03375 3.09784 8 3.09784 8", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "0" }],
22
22
  ["path", { d: "M8.00001 20.9022C8.00001 20.9022 4.03375 21.2581 3.38784 20.6122C2.74192 19.9662 3.09784 16 3.09784 16", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "1" }],
23
23
  ["path", { d: "M16 3.09779C16 3.09779 19.9663 2.74194 20.6122 3.38785C21.2581 4.03375 20.9022 8 20.9022 8", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "2" }],
@@ -31,7 +31,7 @@ function it(e, i) {
31
31
  const o = document.createElement("a");
32
32
  o.href = e, o.download = i, o.rel = "noopener", document.body.appendChild(o), o.click(), o.remove();
33
33
  }
34
- function J(e) {
34
+ function Q(e) {
35
35
  try {
36
36
  const o = new URL(e, window.location.origin).pathname.split("/").pop() || "image";
37
37
  return o.includes(".") ? o : `${o}.png`;
@@ -39,50 +39,50 @@ function J(e) {
39
39
  return "image";
40
40
  }
41
41
  }
42
- async function Q(e, i) {
42
+ async function Y(e, i) {
43
43
  const o = await fetch(e);
44
44
  if (!o.ok)
45
45
  throw new Error("fetch failed");
46
- const r = await o.blob(), s = URL.createObjectURL(r);
46
+ const r = await o.blob(), l = URL.createObjectURL(r);
47
47
  try {
48
- it(s, i);
48
+ it(l, i);
49
49
  } finally {
50
- setTimeout(() => URL.revokeObjectURL(s), 0);
50
+ setTimeout(() => URL.revokeObjectURL(l), 0);
51
51
  }
52
52
  }
53
- function ke({
53
+ function Ie({
54
54
  opened: e,
55
55
  onOpenChange: i,
56
56
  t: o,
57
57
  onDownload: r,
58
- onDelete: s
58
+ onDelete: l
59
59
  }) {
60
- return /* @__PURE__ */ I(
61
- A,
60
+ return /* @__PURE__ */ y(
61
+ O,
62
62
  {
63
63
  opened: e,
64
64
  onChange: i,
65
- transitionProps: _e,
65
+ transitionProps: Fe,
66
66
  shadow: "md",
67
67
  position: "bottom-start",
68
68
  offset: 4,
69
69
  withinPortal: !0,
70
70
  closeOnItemClick: !0,
71
71
  children: [
72
- /* @__PURE__ */ n(A.Target, { children: /* @__PURE__ */ n(
72
+ /* @__PURE__ */ n(O.Target, { children: /* @__PURE__ */ n(
73
73
  q,
74
74
  {
75
75
  label: o("editor.toolbar.more"),
76
- icon: Fe,
76
+ icon: He,
77
77
  iconColor: "var(--mantine-color-gray-text)",
78
78
  "aria-label": o("editor.toolbar.more")
79
79
  }
80
80
  ) }),
81
- /* @__PURE__ */ I(A.Dropdown, { p: 4, w: 164, onMouseDown: (a) => a.preventDefault(), children: [
81
+ /* @__PURE__ */ y(O.Dropdown, { p: 4, w: 164, onMouseDown: (a) => a.preventDefault(), children: [
82
82
  /* @__PURE__ */ n(
83
- A.Item,
83
+ O.Item,
84
84
  {
85
- leftSection: /* @__PURE__ */ n(de, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(O, { icon: ge, size: 16 }) }),
85
+ leftSection: /* @__PURE__ */ n(ce, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(x, { icon: fe, size: 16 }) }),
86
86
  onClick: (a) => {
87
87
  a.stopPropagation(), r();
88
88
  },
@@ -90,12 +90,12 @@ function ke({
90
90
  }
91
91
  ),
92
92
  /* @__PURE__ */ n(
93
- A.Item,
93
+ O.Item,
94
94
  {
95
95
  color: "red",
96
- leftSection: /* @__PURE__ */ n(de, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(O, { icon: fe, size: 16 }) }),
96
+ leftSection: /* @__PURE__ */ n(ce, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(x, { icon: we, size: 16 }) }),
97
97
  onClick: (a) => {
98
- a.stopPropagation(), s();
98
+ a.stopPropagation(), l();
99
99
  },
100
100
  children: o("editor.contextMenu.delete")
101
101
  }
@@ -105,13 +105,13 @@ function ke({
105
105
  }
106
106
  );
107
107
  }
108
- const Ie = ({
108
+ const ve = ({
109
109
  t: e,
110
110
  src: i,
111
111
  setShown: o,
112
112
  id: r
113
113
  }) => {
114
- const [s, { open: a, close: p }] = V(!1), c = X(() => [
114
+ const [l, { open: a, close: p }] = G(!1), m = X(() => [
115
115
  {
116
116
  id: !r || r === "0" ? "" : r,
117
117
  Url: i ?? "",
@@ -131,22 +131,22 @@ const Ie = ({
131
131
  deletedAt: /* @__PURE__ */ new Date()
132
132
  }
133
133
  ], [i, r]);
134
- return /* @__PURE__ */ I(G, { children: [
134
+ return /* @__PURE__ */ y(R, { children: [
135
135
  /* @__PURE__ */ n(
136
- Ce,
136
+ ye,
137
137
  {
138
- opened: s,
138
+ opened: l,
139
139
  onOpenChange: (h) => {
140
140
  h ? a() : p();
141
141
  },
142
- attachments: c
142
+ attachments: m
143
143
  }
144
144
  ),
145
145
  /* @__PURE__ */ n(
146
146
  q,
147
147
  {
148
148
  label: e("editor.image.preview"),
149
- icon: ye,
149
+ icon: ke,
150
150
  iconColor: "var(--mantine-color-gray-text)",
151
151
  "aria-label": e("editor.image.preview"),
152
152
  onClick: () => {
@@ -159,32 +159,32 @@ const Ie = ({
159
159
  nodeKey: e,
160
160
  src: i
161
161
  }) => {
162
- const [o] = z(), r = nt(), [s, a] = b(!1), [p, c] = b(!1), { t: m } = R(), h = k(() => {
162
+ const [o] = U(), r = J(), [l, a] = w(!1), [p, m] = w(!1), { t: u } = z(), h = k(() => {
163
163
  o.update(() => {
164
- const f = L(e);
165
- D(f) && f.remove();
164
+ const I = v(e);
165
+ L(I) && I.remove();
166
166
  });
167
- }, [o, e]), C = k(async () => {
167
+ }, [o, e]), f = k(async () => {
168
168
  if (i)
169
169
  try {
170
- await Q(i, J(i));
170
+ await Y(i, Q(i));
171
171
  } catch {
172
172
  }
173
173
  }, [i]);
174
- return /* @__PURE__ */ I(
174
+ return /* @__PURE__ */ y(
175
175
  "div",
176
176
  {
177
177
  className: `media-actions ${r ? "" : "media-actions--readonly"}`,
178
178
  children: [
179
- /* @__PURE__ */ n(Ie, { t: m, src: i, setShown: () => {
179
+ /* @__PURE__ */ n(ve, { t: u, src: i, setShown: () => {
180
180
  } }),
181
- r && /* @__PURE__ */ I(G, { children: [
181
+ r && /* @__PURE__ */ y(R, { children: [
182
182
  /* @__PURE__ */ n(
183
- we,
183
+ be,
184
184
  {
185
- opened: s,
185
+ opened: l,
186
186
  setOpened: a,
187
- t: m,
187
+ t: u,
188
188
  editor: o,
189
189
  nodeKey: e,
190
190
  setShown: () => {
@@ -192,12 +192,12 @@ const Ie = ({
192
192
  }
193
193
  ),
194
194
  /* @__PURE__ */ n(
195
- ke,
195
+ Ie,
196
196
  {
197
197
  opened: p,
198
- onOpenChange: c,
199
- t: m,
200
- onDownload: () => void C(),
198
+ onOpenChange: m,
199
+ t: u,
200
+ onDownload: () => void f(),
201
201
  onDelete: h
202
202
  }
203
203
  )
@@ -208,21 +208,21 @@ const Ie = ({
208
208
  }, at = () => {
209
209
  };
210
210
  function st({ nodeKey: e, src: i, id: o }) {
211
- const { t: r } = R(), [s] = z(), [a, p] = b(!1), [c, m] = b(!1), h = k(() => {
212
- m(!1), s.update(() => {
213
- const f = L(e);
214
- if (!D(f)) return;
215
- const v = f.getParent();
216
- He(v) ? v.remove() : f.remove();
211
+ const { t: r } = z(), [l] = U(), a = J(), [p, m] = w(!1), [u, h] = w(!1), f = k(() => {
212
+ h(!1), l.update(() => {
213
+ const b = v(e);
214
+ if (!L(b)) return;
215
+ const D = b.getParent();
216
+ $e(D) ? D.remove() : b.remove();
217
217
  });
218
- }, [s, e]), C = k(async () => {
218
+ }, [l, e]), I = k(async () => {
219
219
  if (i)
220
220
  try {
221
- await Q(i, J(i));
221
+ await Y(i, Q(i));
222
222
  } catch {
223
223
  }
224
224
  }, [i]);
225
- return /* @__PURE__ */ I(
225
+ return /* @__PURE__ */ y(
226
226
  "div",
227
227
  {
228
228
  className: "media-actions visible",
@@ -235,35 +235,37 @@ function st({ nodeKey: e, src: i, id: o }) {
235
235
  display: "flex",
236
236
  gap: 4
237
237
  },
238
- onClick: (f) => f.stopPropagation(),
238
+ onClick: (b) => b.stopPropagation(),
239
239
  children: [
240
- /* @__PURE__ */ n(Ie, { t: r, src: i, setShown: at, id: o }),
241
- /* @__PURE__ */ n(
242
- we,
243
- {
244
- opened: a,
245
- setOpened: p,
246
- t: r,
247
- editor: s,
248
- nodeKey: e
249
- }
250
- ),
251
- /* @__PURE__ */ n(
252
- ke,
253
- {
254
- opened: c,
255
- onOpenChange: m,
256
- t: r,
257
- onDownload: () => void C(),
258
- onDelete: h
259
- }
260
- )
240
+ /* @__PURE__ */ n(ve, { t: r, src: i, setShown: at, id: o }),
241
+ a && /* @__PURE__ */ y(R, { children: [
242
+ /* @__PURE__ */ n(
243
+ be,
244
+ {
245
+ opened: p,
246
+ setOpened: m,
247
+ t: r,
248
+ editor: l,
249
+ nodeKey: e
250
+ }
251
+ ),
252
+ /* @__PURE__ */ n(
253
+ Ie,
254
+ {
255
+ opened: u,
256
+ onOpenChange: h,
257
+ t: r,
258
+ onDownload: () => void I(),
259
+ onDelete: f
260
+ }
261
+ )
262
+ ] })
261
263
  ]
262
264
  }
263
265
  );
264
266
  }
265
267
  function lt({ nodeKey: e, src: i, id: o }) {
266
- const { t: r } = R(), [s] = z(), [a, { open: p, close: c }] = V(!1), [m, { open: h, close: C }] = V(!1), f = X(
268
+ const { t: r } = z(), [l] = U(), a = J(), [p, { open: m, close: u }] = G(!1), [h, { open: f, close: I }] = G(!1), b = X(
267
269
  () => [
268
270
  {
269
271
  id: !o || o === "0" ? "" : o,
@@ -285,21 +287,21 @@ function lt({ nodeKey: e, src: i, id: o }) {
285
287
  }
286
288
  ],
287
289
  [i, o]
288
- ), v = () => {
289
- c(), h();
290
- }, x = k(async () => {
291
- if (c(), !!i)
290
+ ), D = () => {
291
+ u(), f();
292
+ }, S = k(async () => {
293
+ if (u(), !!i)
292
294
  try {
293
- await Q(i, J(i));
295
+ await Y(i, Q(i));
294
296
  } catch {
295
297
  }
296
- }, [i, c]), S = k(() => {
297
- c(), s.update(() => {
298
- const w = L(e);
299
- D(w) && w.remove();
298
+ }, [i, u]), N = k(() => {
299
+ u(), l.update(() => {
300
+ const s = v(e);
301
+ L(s) && s.remove();
300
302
  });
301
- }, [s, e, c]);
302
- return /* @__PURE__ */ I(G, { children: [
303
+ }, [l, e, u]);
304
+ return /* @__PURE__ */ y(R, { children: [
303
305
  /* @__PURE__ */ n(
304
306
  "div",
305
307
  {
@@ -311,36 +313,36 @@ function lt({ nodeKey: e, src: i, id: o }) {
311
313
  zIndex: 10,
312
314
  pointerEvents: "auto"
313
315
  },
314
- onClick: (w) => w.stopPropagation(),
316
+ onClick: (s) => s.stopPropagation(),
315
317
  children: /* @__PURE__ */ n(
316
318
  q,
317
319
  {
318
320
  label: r("editor.toolbar.more"),
319
- icon: $e,
321
+ icon: Be,
320
322
  iconColor: "var(--mantine-color-gray-text)",
321
323
  "aria-label": r("editor.toolbar.more"),
322
- onClick: p
324
+ onClick: m
323
325
  }
324
326
  )
325
327
  }
326
328
  ),
327
329
  /* @__PURE__ */ n(
328
- Ce,
330
+ ye,
329
331
  {
330
- opened: m,
331
- onOpenChange: (w) => w ? h() : C(),
332
- attachments: f
332
+ opened: h,
333
+ onOpenChange: (s) => s ? f() : I(),
334
+ attachments: b
333
335
  }
334
336
  ),
335
337
  /* @__PURE__ */ n(
336
- Be,
338
+ Ve,
337
339
  {
338
- opened: a,
339
- onClose: c,
340
+ opened: p,
341
+ onClose: u,
340
342
  title: r("editor.image.mobileActions"),
341
- children: /* @__PURE__ */ I(Te, { gap: 4, p: 0, children: [
343
+ children: /* @__PURE__ */ y(Re, { gap: 4, p: 0, children: [
342
344
  /* @__PURE__ */ n(
343
- $,
345
+ B,
344
346
  {
345
347
  type: "button",
346
348
  variant: "subtle",
@@ -348,11 +350,11 @@ function lt({ nodeKey: e, src: i, id: o }) {
348
350
  fullWidth: !0,
349
351
  justify: "flex-start",
350
352
  bg: "var(--editor-action-bg)",
351
- onClick: v,
353
+ onClick: D,
352
354
  leftSection: /* @__PURE__ */ n(
353
- O,
355
+ x,
354
356
  {
355
- icon: ye,
357
+ icon: ke,
356
358
  size: 16,
357
359
  color: "var(--mantine-color-dimmed)"
358
360
  }
@@ -361,7 +363,7 @@ function lt({ nodeKey: e, src: i, id: o }) {
361
363
  }
362
364
  ),
363
365
  /* @__PURE__ */ n(
364
- $,
366
+ B,
365
367
  {
366
368
  type: "button",
367
369
  variant: "subtle",
@@ -369,11 +371,11 @@ function lt({ nodeKey: e, src: i, id: o }) {
369
371
  fullWidth: !0,
370
372
  justify: "flex-start",
371
373
  bg: "var(--editor-action-bg)",
372
- onClick: () => void x(),
374
+ onClick: () => void S(),
373
375
  leftSection: /* @__PURE__ */ n(
374
- O,
376
+ x,
375
377
  {
376
- icon: ge,
378
+ icon: fe,
377
379
  size: 16,
378
380
  color: "var(--mantine-color-dimmed)"
379
381
  }
@@ -381,8 +383,8 @@ function lt({ nodeKey: e, src: i, id: o }) {
381
383
  children: r("editor.gallery.download")
382
384
  }
383
385
  ),
384
- /* @__PURE__ */ n(
385
- $,
386
+ a && /* @__PURE__ */ n(
387
+ B,
386
388
  {
387
389
  type: "button",
388
390
  variant: "subtle",
@@ -390,11 +392,11 @@ function lt({ nodeKey: e, src: i, id: o }) {
390
392
  fullWidth: !0,
391
393
  justify: "flex-start",
392
394
  bg: "var(--editor-action-bg)",
393
- onClick: S,
395
+ onClick: N,
394
396
  leftSection: /* @__PURE__ */ n(
395
- O,
397
+ x,
396
398
  {
397
- icon: fe,
399
+ icon: we,
398
400
  size: 16,
399
401
  color: "var(--mantine-color-red-6)"
400
402
  }
@@ -407,34 +409,34 @@ function lt({ nodeKey: e, src: i, id: o }) {
407
409
  )
408
410
  ] });
409
411
  }
410
- const me = (e) => {
412
+ const he = (e) => {
411
413
  const {
412
414
  width: i,
413
415
  height: o,
414
416
  isLoading: r,
415
- isError: s,
417
+ isError: l,
416
418
  src: a,
417
419
  id: p,
418
- altText: c,
419
- imageRef: m,
420
+ altText: m,
421
+ imageRef: u,
420
422
  maxWidth: h,
421
- aspectRatio: C
423
+ aspectRatio: f
422
424
  } = e;
423
- return /* @__PURE__ */ I(
425
+ return /* @__PURE__ */ y(
424
426
  "div",
425
427
  {
426
428
  className: "media-wrapper",
427
- "data-reserved-box": C ? "" : void 0,
429
+ "data-reserved-box": f ? "" : void 0,
428
430
  style: {
429
431
  width: i,
430
- height: C ? "auto" : o,
431
- aspectRatio: C || void 0,
432
+ height: f ? "auto" : o,
433
+ aspectRatio: f || void 0,
432
434
  display: "inline-flex",
433
435
  position: "relative"
434
436
  },
435
437
  children: [
436
438
  /* @__PURE__ */ n(
437
- ze,
439
+ Ue,
438
440
  {
439
441
  visible: r,
440
442
  zIndex: 1e3,
@@ -447,17 +449,17 @@ const me = (e) => {
447
449
  {
448
450
  className: null,
449
451
  src: a,
450
- altText: c,
451
- imageRef: m,
452
+ altText: m,
453
+ imageRef: u,
452
454
  width: "inherit",
453
455
  height: "inherit",
454
456
  maxWidth: h || "auto",
455
457
  id: p
456
458
  }
457
459
  ),
458
- ue && /* @__PURE__ */ n(lt, { nodeKey: e.nodeKey, src: a, id: p }),
459
- pe && /* @__PURE__ */ n(st, { nodeKey: e.nodeKey, src: a, id: p }),
460
- tt && !ue && !pe && /* @__PURE__ */ n(rt, { nodeKey: e.nodeKey, src: a })
460
+ pe && /* @__PURE__ */ n(lt, { nodeKey: e.nodeKey, src: a, id: p }),
461
+ me && /* @__PURE__ */ n(st, { nodeKey: e.nodeKey, src: a, id: p }),
462
+ ot && !pe && !me && /* @__PURE__ */ n(rt, { nodeKey: e.nodeKey, src: a })
461
463
  ]
462
464
  }
463
465
  );
@@ -467,23 +469,23 @@ function dt({
467
469
  className: i,
468
470
  imageRef: o,
469
471
  src: r,
470
- width: s,
472
+ width: l,
471
473
  height: a,
472
474
  maxWidth: p,
473
- id: c
475
+ id: m
474
476
  }) {
475
- const [m, h] = b(!1);
477
+ const [u, h] = w(!1);
476
478
  return /* @__PURE__ */ n(
477
479
  "img",
478
480
  {
479
- className: `${i || void 0} ${m ? "" : "loading"}`,
481
+ className: `${i || void 0} ${u ? "" : "loading"}`,
480
482
  src: r,
481
483
  alt: e,
482
484
  ref: o,
483
485
  style: {
484
486
  height: a,
485
487
  maxWidth: p,
486
- width: s
488
+ width: l
487
489
  },
488
490
  onLoad: () => {
489
491
  r.includes("splash") ? setTimeout(() => {
@@ -491,49 +493,49 @@ function dt({
491
493
  }, 100) : h(!0);
492
494
  },
493
495
  draggable: "false",
494
- "data-id": c
496
+ "data-id": m
495
497
  }
496
498
  );
497
499
  }
498
- function Pt(e) {
499
- const { disable: i } = he(be);
500
- return i && Ve.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(ct, { ...e });
500
+ function Et(e) {
501
+ const { disable: i } = ge(Ce);
502
+ return i && Ge.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(ct, { ...e });
501
503
  }
502
504
  function ct({
503
505
  src: e,
504
506
  altText: i,
505
507
  nodeKey: o,
506
508
  width: r,
507
- height: s,
509
+ height: l,
508
510
  maxWidth: a,
509
511
  showCaption: p,
510
- caption: c,
511
- id: m,
512
+ caption: m,
513
+ id: u,
512
514
  create: h,
513
- alignment: C,
514
- imagePickerTab: f,
515
- aspectRatio: v
515
+ alignment: f,
516
+ imagePickerTab: I,
517
+ aspectRatio: b
516
518
  }) {
517
- var se, le;
518
- const x = Ee(null), [S, w] = b(!0), [u] = z(), [N, U] = b(!0), [y, j] = b({
519
+ var le, de;
520
+ const D = Te(null), [S, N] = w(!0), [s] = U(), [M, j] = w(!0), [C, _] = w({
519
521
  width: 0,
520
522
  height: 0
521
- }), { start: Y } = Ge(), [ut, _] = b(0), {
523
+ }), { start: Z } = Xe(), [ut, F] = w(0), {
522
524
  fetchUploadMedia: W,
523
- fetchDeleteMedia: Z,
525
+ fetchDeleteMedia: K,
524
526
  maxFileSize: pt,
525
- imperativeHandleRef: P,
526
- disable: ve
527
- } = he(be), E = B.has(e) && (((se = B.get(e)) == null ? void 0 : se.mediaNodeKeys.length) === 0 || ((le = B.get(e)) == null ? void 0 : le.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: T } = R(), K = (t) => {
527
+ imperativeHandleRef: E,
528
+ disable: Le
529
+ } = ge(Ce), P = V.has(e) && (((le = V.get(e)) == null ? void 0 : le.mediaNodeKeys.length) === 0 || ((de = V.get(e)) == null ? void 0 : de.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: T } = z(), ee = (t) => {
528
530
  if (typeof t == "number") return t > 0 ? t : null;
529
531
  if (typeof t == "string" && !t.includes("%")) {
530
- const l = parseFloat(t);
531
- return Number.isFinite(l) && l > 0 ? l : null;
532
+ const d = parseFloat(t);
533
+ return Number.isFinite(d) && d > 0 ? d : null;
532
534
  }
533
535
  return null;
534
- }, ee = K(r), te = K(s), oe = ee && te ? ee / te : void 0, [Le, De] = b(
536
+ }, te = ee(r), oe = ee(l), ne = te && oe ? te / oe : void 0, [De, Ne] = w(
535
537
  void 0
536
- ), ne = X(() => {
538
+ ), ie = X(() => {
537
539
  try {
538
540
  const t = parseFloat(
539
541
  localStorage.getItem("layers-img-ratio:" + e) || ""
@@ -542,207 +544,207 @@ function ct({
542
544
  } catch {
543
545
  return;
544
546
  }
545
- }, [e]), Ne = oe ?? v ?? ne ?? Le, [Me, ie] = b(!1), Ae = !Me && !oe && (v ?? ne) != null, [mt, Oe] = b(0);
546
- M(() => u.registerDecoratorListener(() => {
547
- Oe((t) => t + 1);
548
- }), [E]), M(() => {
549
- const t = u.getElementByKey(o);
547
+ }, [e]), Me = ne ?? b ?? ie ?? De, [Ae, re] = w(!1), Oe = !Ae && !ne && (b ?? ie) != null, [mt, xe] = w(0);
548
+ A(() => s.registerDecoratorListener(() => {
549
+ xe((t) => t + 1);
550
+ }), [P]), A(() => {
551
+ const t = s.getElementByKey(o);
550
552
  t && (t.style.removeProperty("aspect-ratio"), t.style.removeProperty("width"));
551
- }, [u, o]), M(() => {
553
+ }, [s, o]), A(() => {
552
554
  if (!e || e.startsWith("data:image/") || !e.trim()) {
553
- w(!1);
555
+ N(!1);
554
556
  return;
555
557
  }
556
558
  const t = new Image();
557
559
  t.src = e, t.onload = () => {
558
- if (w(!1), t.naturalWidth) {
559
- const l = t.naturalWidth / t.naturalHeight;
560
- if (De(l), t.naturalWidth >= 100)
560
+ if (N(!1), t.naturalWidth) {
561
+ const d = t.naturalWidth / t.naturalHeight;
562
+ if (Ne(d), t.naturalWidth >= 100)
561
563
  try {
562
- localStorage.setItem("layers-img-ratio:" + e, String(l));
564
+ localStorage.setItem("layers-img-ratio:" + e, String(d));
563
565
  } catch {
564
566
  }
565
- !v && t.naturalWidth >= 100 && u.update(
567
+ !b && t.naturalWidth >= 100 && s.update(
566
568
  () => {
567
- const d = L(o);
568
- D(d) && d.getAspectRatio() == null && d.setAspectRatio(l);
569
+ const c = v(o);
570
+ L(c) && c.getAspectRatio() == null && c.setAspectRatio(d);
569
571
  },
570
572
  { tag: "history-merge" }
571
573
  );
572
574
  }
573
575
  }, t.onerror = () => {
574
- w(!1);
576
+ N(!1);
575
577
  };
576
- }, [e, E]);
577
- const xe = (t, l) => {
578
- u.update(() => {
579
- je(null);
580
- const d = L(o);
581
- D(d) && d.setWidthAndHeight(t, l);
578
+ }, [e, P]);
579
+ const Se = (t, d) => {
580
+ s.update(() => {
581
+ _e(null);
582
+ const c = v(o);
583
+ L(c) && c.setWidthAndHeight(t, d);
582
584
  });
583
- }, { historyState: re } = Xe(), {
584
- settings: { showNestedEditorTreeView: ae }
585
- } = qe();
586
- function Se(t) {
585
+ }, { historyState: ae } = qe(), {
586
+ settings: { showNestedEditorTreeView: se }
587
+ } = Je();
588
+ function We(t) {
587
589
  return t.endsWith(".svg") || t.includes("image/svg+xml");
588
590
  }
589
- function We(t) {
590
- return new Promise((l, d) => {
591
- if (Se(t)) {
592
- l(0);
591
+ function Ee(t) {
592
+ return new Promise((d, c) => {
593
+ if (We(t)) {
594
+ d(0);
593
595
  return;
594
596
  }
595
597
  const g = new Image();
596
598
  g.src = t, g.onload = () => {
597
- l(g.width);
599
+ d(g.width);
598
600
  }, g.onerror = () => {
599
- d(new Error("Failed to load image"));
601
+ c(new Error("Failed to load image"));
600
602
  };
601
603
  });
602
604
  }
603
- M(() => {
604
- let t = r, l = s, d = 100;
605
- (e.includes("unsplash") ? e.trim() : !E && e.trim() || e.includes("upload-src-editor")) && e !== "upload" && We(e).then((g) => {
606
- typeof t == "number" && t < d && g < d ? (U(!0), j({
605
+ A(() => {
606
+ let t = r, d = l, c = 100;
607
+ (e.includes("unsplash") ? e.trim() : !P && e.trim() || e.includes("upload-src-editor")) && e !== "upload" && Ee(e).then((g) => {
608
+ typeof t == "number" && t < c && g < c ? (j(!0), _({
607
609
  width: t,
608
- height: l
609
- })) : g < d ? (U(!0), j({
610
+ height: d
611
+ })) : g < c ? (j(!0), _({
610
612
  width: "auto",
611
613
  height: "auto"
612
- })) : (j({
614
+ })) : (_({
613
615
  width: g,
614
616
  height: g
615
- }), U(!1)), ie(!0);
617
+ }), j(!1)), re(!0);
616
618
  }).catch((g) => {
617
- ie(!0), console.warn("Ошибка при загрузке изображения:", g.message);
619
+ re(!0), console.warn("Ошибка при загрузке изображения:", g.message);
618
620
  });
619
- }, [e, E]), M(() => {
620
- y.width && y.height && N && u.update(() => {
621
- const t = L(o);
622
- D(t) && t.setWidthAndHeight(y.width, y.height);
621
+ }, [e, P]), A(() => {
622
+ C.width && C.height && M && s.update(() => {
623
+ const t = v(o);
624
+ L(t) && t.setWidthAndHeight(C.width, C.height);
623
625
  });
624
- }, [y.width, y.height, N]);
626
+ }, [C.width, C.height, M]);
625
627
  const Pe = k(
626
- (t) => Je(u, o, t),
627
- [u, o]
628
- ), F = k(
629
- (t, l) => {
630
- w(!1), u.update(() => {
631
- const d = L(o);
632
- D(d) && (d.setSrc(t), d.setId(l));
628
+ (t) => Qe(s, o, t),
629
+ [s, o]
630
+ ), H = k(
631
+ (t, d) => {
632
+ N(!1), s.update(() => {
633
+ const c = v(o);
634
+ L(c) && (c.setSrc(t), c.setId(d));
633
635
  });
634
636
  },
635
- [u, o]
636
- ), H = k(
637
+ [s, o]
638
+ ), $ = k(
637
639
  (t) => {
638
- w(!0);
639
- const l = Y();
640
+ N(!0);
641
+ const d = Z();
640
642
  W && W(
641
643
  t[0],
642
- (d, g) => {
643
- F(d, g), _(0);
644
+ (c, g) => {
645
+ H(c, g), F(0);
644
646
  },
645
- (d) => {
646
- d && ot({
647
+ (c) => {
648
+ c && nt({
647
649
  message: T("editor.gallery.errorFile")
648
- }), _(0), F(e.startsWith("blob:") ? "upload" : "", "");
650
+ }), F(0), H(e.startsWith("blob:") ? "upload" : "", "");
649
651
  },
650
- l,
651
- (d) => {
652
- _(d);
652
+ d,
653
+ (c) => {
654
+ F(c);
653
655
  }
654
656
  );
655
657
  },
656
- [W, Y, T, F, e]
658
+ [W, Z, T, H, e]
657
659
  );
658
- return M(() => u.registerCommand(
659
- Qe,
660
- (t) => !e.startsWith("blob:") && e !== "upload" || t.targetNodeKey !== o ? !1 : (H(t.files), !0),
661
- Ue
662
- ), [u, H, o, e]), !e || e === "upload" ? /* @__PURE__ */ n(Re, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
660
+ return A(() => s.registerCommand(
663
661
  Ye,
662
+ (t) => !e.startsWith("blob:") && e !== "upload" || t.targetNodeKey !== o ? !1 : ($(t.files), !0),
663
+ je
664
+ ), [s, $, o, e]), !e || e === "upload" ? /* @__PURE__ */ n(ze, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
665
+ Ze,
664
666
  {
665
667
  inline: !0,
666
668
  nodeKey: o,
667
- defaultTabValue: f,
669
+ defaultTabValue: I,
668
670
  onWriteTabToNode: Pe,
669
671
  uploading: !1,
670
672
  onUpload: (t) => {
671
- !W || !t.length || H(t);
673
+ !W || !t.length || $(t);
672
674
  },
673
675
  popoverProps: {
674
676
  opened: !0,
675
677
  position: "bottom",
676
- zIndex: Ze
678
+ zIndex: Ke
677
679
  },
678
680
  onChange: (t) => {
679
- u.update(() => {
680
- const l = L(o);
681
- D(l) && l.setSrc(t);
681
+ s.update(() => {
682
+ const d = v(o);
683
+ L(d) && d.setSrc(t);
682
684
  });
683
685
  }
684
686
  }
685
- ) }) : N && !Ae ? /* @__PURE__ */ n(
686
- me,
687
+ ) }) : M && !Oe ? /* @__PURE__ */ n(
688
+ he,
687
689
  {
688
- width: y.width,
689
- height: y.height,
690
+ width: C.width,
691
+ height: C.height,
690
692
  isLoading: S,
691
693
  isError: !1,
692
- isIcon: N,
694
+ isIcon: M,
693
695
  src: e,
694
- id: m,
695
- editor: u,
696
+ id: u,
697
+ editor: s,
696
698
  nodeKey: o,
697
- fetchDeleteMedia: Z,
699
+ fetchDeleteMedia: K,
698
700
  altText: i,
699
- imageRef: x,
701
+ imageRef: D,
700
702
  maxWidth: a,
701
703
  showCaption: p,
702
- caption: c,
704
+ caption: m,
703
705
  isCollabActive: !1,
704
- historyState: re,
705
- showNestedEditorTreeView: ae,
706
+ historyState: ae,
707
+ showNestedEditorTreeView: se,
706
708
  t: T
707
709
  }
708
710
  ) : /* @__PURE__ */ n(
709
- Ke,
711
+ et,
710
712
  {
711
- editor: u,
712
- isIcon: N,
713
- width: ce(r),
714
- height: ce(s),
715
- initialWidth: y.width || "",
716
- initialHeight: y.height || "",
717
- onResizeEnd: xe,
718
- alignment: C,
719
- disable: ve,
713
+ editor: s,
714
+ isIcon: M,
715
+ width: ue(r),
716
+ height: ue(l),
717
+ initialWidth: C.width || "",
718
+ initialHeight: C.height || "",
719
+ onResizeEnd: Se,
720
+ alignment: f,
721
+ disable: Le,
720
722
  onRegisterDecoratorEnter: (t) => {
721
- P != null && P.current && (P.current.decoratorEnterAction = t);
723
+ E != null && E.current && (E.current.decoratorEnterAction = t);
722
724
  },
723
- onActivate: () => u.dispatchCommand(et, "show_menu"),
725
+ onActivate: () => s.dispatchCommand(tt, "show_menu"),
724
726
  children: /* @__PURE__ */ n(
725
- me,
727
+ he,
726
728
  {
727
729
  width: "inherit",
728
730
  height: "inherit",
729
- aspectRatio: Ne,
731
+ aspectRatio: Me,
730
732
  isLoading: S,
731
733
  isError: !1,
732
- isIcon: N,
734
+ isIcon: M,
733
735
  src: e,
734
- id: m,
735
- editor: u,
736
+ id: u,
737
+ editor: s,
736
738
  nodeKey: o,
737
- fetchDeleteMedia: Z,
739
+ fetchDeleteMedia: K,
738
740
  altText: i,
739
- imageRef: x,
741
+ imageRef: D,
740
742
  maxWidth: a,
741
743
  showCaption: p,
742
- caption: c,
744
+ caption: m,
743
745
  isCollabActive: !1,
744
- historyState: re,
745
- showNestedEditorTreeView: ae,
746
+ historyState: ae,
747
+ showNestedEditorTreeView: se,
746
748
  t: T
747
749
  }
748
750
  )
@@ -750,5 +752,5 @@ function ct({
750
752
  );
751
753
  }
752
754
  export {
753
- Pt as default
755
+ Et as default
754
756
  };