forge-edit 0.1.0-beta.13 → 0.1.0-beta.14

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 (2) hide show
  1. package/dist/index.js +357 -259
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -762,23 +762,62 @@ function We(e, t) {
762
762
  return null;
763
763
  }
764
764
  }
765
- var Ge = (e, t, n) => {
765
+ function Ge(e) {
766
+ let t = e.startContainer, n = e.startOffset, r = t.nodeType === 3 ? t.parentNode : t;
767
+ if (!r || r.nodeType !== 1 || r.tagName !== "SPAN" || !r.style || !r.style.fontFamily) return null;
768
+ let i = r, a = !1, o = !1, s = null;
769
+ return t.nodeType === 3 ? (s = t, a = n === 0 && t === i.firstChild, o = n === t.textContent.length && t === i.lastChild) : t === i && (a = n === 0, o = n === i.childNodes.length), {
770
+ fontSpan: i,
771
+ textNode: s,
772
+ offset: n,
773
+ atStart: a,
774
+ atEnd: o
775
+ };
776
+ }
777
+ function Ke(e) {
778
+ let t = document.createElement("span");
779
+ return t.style.fontFamily = e, t.appendChild(document.createTextNode("​")), t;
780
+ }
781
+ function qe(e, t) {
782
+ let n = document.createRange();
783
+ n.setStart(e.firstChild, 1), n.collapse(!0), t.removeAllRanges(), t.addRange(n);
784
+ }
785
+ function Je(e, t, n) {
786
+ let r = Ge(e);
787
+ if (r) {
788
+ let { fontSpan: e, textNode: i, offset: a, atStart: o, atEnd: s } = r;
789
+ if (o) {
790
+ let r = Ke(n);
791
+ e.parentNode.insertBefore(r, e), qe(r, t);
792
+ return;
793
+ }
794
+ if (s) {
795
+ let r = Ke(n);
796
+ e.nextSibling ? e.parentNode.insertBefore(r, e.nextSibling) : e.parentNode.appendChild(r), qe(r, t);
797
+ return;
798
+ }
799
+ if (i) {
800
+ let r = i.splitText(a), o = Ke(n);
801
+ e.insertBefore(o, r), qe(o, t);
802
+ return;
803
+ }
804
+ }
805
+ let i = Ke(n);
806
+ e.insertNode(i), qe(i, t);
807
+ }
808
+ var Ye = (e, t, n) => {
766
809
  let r = n || "Arial";
767
- if (!e || !t) return;
768
- if (!e.collapsed) {
769
- let n = We(e, r);
770
- if (!n) return;
771
- let i = document.createRange();
772
- i.selectNodeContents(n), t.removeAllRanges(), t.addRange(i);
773
- return;
810
+ if (!(!e || !t)) {
811
+ if (!e.collapsed) {
812
+ let n = We(e, r);
813
+ if (!n) return;
814
+ let i = document.createRange();
815
+ i.selectNodeContents(n), t.removeAllRanges(), t.addRange(i);
816
+ return;
817
+ }
818
+ Je(e, t, r);
774
819
  }
775
- let i = document.createElement("span");
776
- i.style.fontFamily = r;
777
- let a = document.createTextNode("​");
778
- i.appendChild(a), e.insertNode(i);
779
- let o = document.createRange();
780
- o.setStart(i.firstChild, 1), o.collapse(!0), t.removeAllRanges(), t.addRange(o);
781
- }, Ke = (e) => {
820
+ }, Xe = (e) => {
782
821
  let t = window.getSelection();
783
822
  if (!t || t.rangeCount === 0) return null;
784
823
  let n = t.anchorNode;
@@ -794,7 +833,7 @@ var Ge = (e, t, n) => {
794
833
  };
795
834
  //#endregion
796
835
  //#region src/components/shared/toolbar/FontName/Hooks/fontNameLogic.jsx
797
- function qe(e) {
836
+ function Ze(e) {
798
837
  let [t, n] = G("Arial"), r = q("Arial"), i = q(null), a = () => {
799
838
  let t = window.getSelection();
800
839
  if (t && t.rangeCount > 0) {
@@ -804,7 +843,7 @@ function qe(e) {
804
843
  }, o = () => {
805
844
  let t = e?.current;
806
845
  if (!t) return;
807
- let i = Ke(t);
846
+ let i = Xe(t);
808
847
  i && (n(i), r.current = i);
809
848
  };
810
849
  return K(() => {
@@ -840,17 +879,21 @@ function qe(e) {
840
879
  if (!s) return;
841
880
  s.focus();
842
881
  let c = window.getSelection(), l = null;
843
- if (i.current ? (c.removeAllRanges(), c.addRange(i.current), l = i.current) : c.rangeCount > 0 && (l = c.getRangeAt(0)), !l) {
882
+ if (c && c.rangeCount > 0) {
883
+ let e = c.getRangeAt(0);
884
+ s.contains(e.commonAncestorContainer) && (l = e);
885
+ }
886
+ if (!l && i.current && (c.removeAllRanges(), c.addRange(i.current), l = i.current), !l) {
844
887
  let e = document.createRange();
845
888
  e.selectNodeContents(s), e.collapse(!1), c.removeAllRanges(), c.addRange(e), l = e;
846
889
  }
847
- Ge(l, c, o), a();
890
+ Ye(l, c, o), a();
848
891
  }
849
892
  };
850
893
  }
851
894
  //#endregion
852
895
  //#region src/components/shared/toolbar/Hooks/dropdown.js
853
- function Je(e, t) {
896
+ function Qe(e, t) {
854
897
  function n() {
855
898
  t.classList.remove("is-open"), e.classList.remove("is-active"), document.removeEventListener("click", r);
856
899
  }
@@ -872,7 +915,7 @@ function Je(e, t) {
872
915
  }
873
916
  //#endregion
874
917
  //#region src/components/shared/toolbar/FontName/Components/FontNameToolbar.jsx
875
- var Ye = [
918
+ var $e = [
876
919
  "Arial",
877
920
  "Arial Black",
878
921
  "Comic Sans MS",
@@ -884,11 +927,11 @@ var Ye = [
884
927
  "Verdana",
885
928
  "Nunito Sans",
886
929
  "Segoe UI"
887
- ], Xe = 32;
888
- function Ze({ currentFont: e, applyFont: t }) {
930
+ ], Y = 32;
931
+ function et({ currentFont: e, applyFont: t }) {
889
932
  let n = q(null), r = q(null);
890
933
  K(() => {
891
- if (n.current && r.current) return Je(n.current, r.current);
934
+ if (n.current && r.current) return Qe(n.current, r.current);
892
935
  }, []);
893
936
  let i = (e) => {
894
937
  t(e), r.current && r.current.classList.remove("is-open"), n.current && n.current.classList.remove("is-active");
@@ -935,12 +978,12 @@ function Ze({ currentFont: e, applyFont: t }) {
935
978
  ref: r,
936
979
  className: "forge-toolbar-dropdown forge-dropdown-fontname absolute left-0 top-full z-20 hidden mt-1 min-w-[150px] overflow-y-auto rounded border border-[#ccc] bg-white p-1 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
937
980
  style: { maxHeight: "128px" },
938
- children: Ye.map((e) => /* @__PURE__ */ R("button", {
981
+ children: $e.map((e) => /* @__PURE__ */ R("button", {
939
982
  type: "button",
940
983
  className: "forge-dropdown-item flex w-full cursor-pointer items-center whitespace-nowrap rounded-sm px-2 text-left text-xs text-[#333] hover:bg-[#f0f0f0]",
941
984
  style: {
942
985
  fontFamily: e,
943
- height: `${Xe}px`
986
+ height: `${Y}px`
944
987
  },
945
988
  onMouseDown: (e) => e.preventDefault(),
946
989
  onClick: () => i(e),
@@ -951,16 +994,16 @@ function Ze({ currentFont: e, applyFont: t }) {
951
994
  }
952
995
  //#endregion
953
996
  //#region src/components/shared/toolbar/FontName/Components/index.jsx
954
- function Qe({ editorRef: e }) {
955
- let { currentFont: t, applyFont: n } = qe(e);
956
- return /* @__PURE__ */ R(Ze, {
997
+ function tt({ editorRef: e }) {
998
+ let { currentFont: t, applyFont: n } = Ze(e);
999
+ return /* @__PURE__ */ R(et, {
957
1000
  currentFont: t,
958
1001
  applyFont: n
959
1002
  });
960
1003
  }
961
1004
  //#endregion
962
1005
  //#region src/components/shared/toolbar/Color/Components/colorPalette.jsx
963
- var $e = [
1006
+ var nt = [
964
1007
  [
965
1008
  "#000000",
966
1009
  "#424242",
@@ -1042,10 +1085,10 @@ var $e = [
1042
1085
  "#4A1031"
1043
1086
  ]
1044
1087
  ];
1045
- function Y({ event: e, onApply: t, currentColor: n }) {
1088
+ function rt({ event: e, onApply: t, currentColor: n }) {
1046
1089
  return /* @__PURE__ */ R("div", {
1047
1090
  className: "forge-color-palette flex flex-col gap-1",
1048
- children: $e.map((r, i) => /* @__PURE__ */ R("div", {
1091
+ children: nt.map((r, i) => /* @__PURE__ */ R("div", {
1049
1092
  className: "forge-color-row flex gap-1 justify-between",
1050
1093
  children: r.map((r) => {
1051
1094
  let i = n?.toLowerCase() === r.toLowerCase();
@@ -1065,12 +1108,12 @@ function Y({ event: e, onApply: t, currentColor: n }) {
1065
1108
  }
1066
1109
  //#endregion
1067
1110
  //#region src/components/shared/toolbar/Color/Components/ColorToolbar.jsx
1068
- function et({ logic: e }) {
1111
+ function it({ logic: e }) {
1069
1112
  let { applyColor: t, applyRecentColor: n, resetColor: r, recentForeColor: i, recentBackColor: a } = e, o = q(null), s = q(null), c = q(null), l = q(null);
1070
1113
  K(() => {
1071
- if (o.current && s.current) return Je(o.current, s.current);
1114
+ if (o.current && s.current) return Qe(o.current, s.current);
1072
1115
  }, []), K(() => {
1073
- if (c.current && l.current) return Je(c.current, l.current);
1116
+ if (c.current && l.current) return Qe(c.current, l.current);
1074
1117
  }, []);
1075
1118
  let u = (e, n) => {
1076
1119
  t(e, n), s.current && s.current.classList.remove("is-open"), o.current && o.current.classList.remove("is-active");
@@ -1139,7 +1182,7 @@ function et({ logic: e }) {
1139
1182
  onClick: f,
1140
1183
  children: "Reset"
1141
1184
  })]
1142
- }), /* @__PURE__ */ R(Y, {
1185
+ }), /* @__PURE__ */ R(rt, {
1143
1186
  event: "foreColor",
1144
1187
  onApply: u
1145
1188
  })]
@@ -1196,7 +1239,7 @@ function et({ logic: e }) {
1196
1239
  onClick: p,
1197
1240
  children: "White"
1198
1241
  })]
1199
- }), /* @__PURE__ */ R(Y, {
1242
+ }), /* @__PURE__ */ R(rt, {
1200
1243
  event: "backColor",
1201
1244
  onApply: d
1202
1245
  })]
@@ -1207,23 +1250,23 @@ function et({ logic: e }) {
1207
1250
  }
1208
1251
  //#endregion
1209
1252
  //#region src/components/shared/toolbar/Color/Hooks/colorUtils.jsx
1210
- function tt(e) {
1253
+ function at(e) {
1211
1254
  let t = document.createElement("span");
1212
1255
  t.style.color = e, document.body.appendChild(t);
1213
1256
  let n = window.getComputedStyle(t).color;
1214
1257
  return document.body.removeChild(t), n;
1215
1258
  }
1216
- function nt(e, t) {
1259
+ function ot(e, t) {
1217
1260
  let n = e;
1218
1261
  for (; n && n !== document.body;) {
1219
- if (n.nodeType === Node.ELEMENT_NODE && n.tagName === "SPAN" && n.style.color && tt(n.style.color) === t) return n;
1262
+ if (n.nodeType === Node.ELEMENT_NODE && n.tagName === "SPAN" && n.style.color && at(n.style.color) === t) return n;
1220
1263
  n = n.parentElement;
1221
1264
  }
1222
1265
  return null;
1223
1266
  }
1224
1267
  //#endregion
1225
1268
  //#region src/components/shared/toolbar/Color/Hooks/usePenMode.jsx
1226
- function rt(e, t) {
1269
+ function st(e, t) {
1227
1270
  K(() => {
1228
1271
  function n(n) {
1229
1272
  if (n.inputType !== "insertText" || !n.data || !e.current) return;
@@ -1233,9 +1276,9 @@ function rt(e, t) {
1233
1276
  if (!i || !i.rangeCount) return;
1234
1277
  let a = i.getRangeAt(0);
1235
1278
  if (!a.collapsed) return;
1236
- let o = tt(e.current), s = a.startContainer;
1279
+ let o = at(e.current), s = a.startContainer;
1237
1280
  s.nodeType === Node.TEXT_NODE && (s = s.parentElement);
1238
- let c = nt(s, o);
1281
+ let c = ot(s, o);
1239
1282
  if (n.preventDefault(), c) {
1240
1283
  let e = document.createTextNode(n.data);
1241
1284
  a.insertNode(e), a.setStartAfter(e), a.collapse(!0), i.removeAllRanges(), i.addRange(a);
@@ -1251,7 +1294,7 @@ function rt(e, t) {
1251
1294
  }
1252
1295
  //#endregion
1253
1296
  //#region src/components/shared/toolbar/Color/Hooks/foreColorHandler.jsx
1254
- var it = (e, t, n) => {
1297
+ var ct = (e, t, n) => {
1255
1298
  let r = n || "#000000";
1256
1299
  if (!e) return;
1257
1300
  if (!e.collapsed) {
@@ -1268,12 +1311,12 @@ var it = (e, t, n) => {
1268
1311
  };
1269
1312
  //#endregion
1270
1313
  //#region src/components/shared/toolbar/Color/Hooks/useForeColor.jsx
1271
- function at(e = "forge-editor__content") {
1314
+ function lt(e = "forge-editor__content") {
1272
1315
  let [t, n] = G("#000000"), r = q(null);
1273
- rt(r, e);
1316
+ st(r, e);
1274
1317
  let i = (e) => {
1275
1318
  let t = e || "#000000", i = window.getSelection();
1276
- i && i.rangeCount > 0 && it(i.getRangeAt(0), i, t), r.current = t, n(t);
1319
+ i && i.rangeCount > 0 && ct(i.getRangeAt(0), i, t), r.current = t, n(t);
1277
1320
  };
1278
1321
  return {
1279
1322
  recentForeColor: t,
@@ -1288,7 +1331,7 @@ function at(e = "forge-editor__content") {
1288
1331
  }
1289
1332
  //#endregion
1290
1333
  //#region src/components/shared/toolbar/Color/Hooks/usePenModeBack.jsx
1291
- function ot(e, t) {
1334
+ function ut(e, t) {
1292
1335
  K(() => {
1293
1336
  let n = (n) => {
1294
1337
  if (!e.current || n.inputType !== "insertText" || !n.data) return;
@@ -1309,7 +1352,7 @@ function ot(e, t) {
1309
1352
  }
1310
1353
  //#endregion
1311
1354
  //#region src/components/shared/toolbar/Color/Hooks/backColorHandler.jsx
1312
- var st = (e, t, n) => {
1355
+ var dt = (e, t, n) => {
1313
1356
  let r = n || "#FFFFFF";
1314
1357
  if (!e) return;
1315
1358
  if (!e.collapsed) {
@@ -1326,12 +1369,12 @@ var st = (e, t, n) => {
1326
1369
  };
1327
1370
  //#endregion
1328
1371
  //#region src/components/shared/toolbar/Color/Hooks/useBackColor.jsx
1329
- function ct(e = "forge-editor__content") {
1372
+ function ft(e = "forge-editor__content") {
1330
1373
  let [t, n] = G("#FFFFFF"), r = q(null);
1331
- ot(r, e);
1374
+ ut(r, e);
1332
1375
  let i = (e) => {
1333
1376
  let t = e || "#FFFFFF", i = window.getSelection();
1334
- i && i.rangeCount > 0 && st(i.getRangeAt(0), i, t), r.current = t, n(t);
1377
+ i && i.rangeCount > 0 && dt(i.getRangeAt(0), i, t), r.current = t, n(t);
1335
1378
  };
1336
1379
  return {
1337
1380
  recentBackColor: t,
@@ -1346,8 +1389,8 @@ function ct(e = "forge-editor__content") {
1346
1389
  }
1347
1390
  //#endregion
1348
1391
  //#region src/components/shared/toolbar/Color/Hooks/colorLogic.jsx
1349
- function lt() {
1350
- let e = at(), t = ct();
1392
+ function pt() {
1393
+ let e = lt(), t = ft();
1351
1394
  return {
1352
1395
  applyColor: (n, r) => {
1353
1396
  n === "foreColor" ? e.applyForeColor(r) : n === "backColor" && t.applyBackColor(r);
@@ -1364,12 +1407,12 @@ function lt() {
1364
1407
  }
1365
1408
  //#endregion
1366
1409
  //#region src/components/shared/toolbar/Color/Components/index.jsx
1367
- function ut() {
1368
- return /* @__PURE__ */ R(et, { logic: lt() });
1410
+ function mt() {
1411
+ return /* @__PURE__ */ R(it, { logic: pt() });
1369
1412
  }
1370
1413
  //#endregion
1371
1414
  //#region src/components/shared/toolbar/Paragraph/Components/ParagraphToolbar.jsx
1372
- function dt({ logic: e = {} }) {
1415
+ function ht({ logic: e = {} }) {
1373
1416
  let { saveSelectionRange: t, toggleUnorderedList: n, toggleOrderedList: r, setAlignment: i, outdent: a, indent: o } = e, [s, c] = G(!1), l = q(null);
1374
1417
  K(() => {
1375
1418
  let e = (e) => {
@@ -1852,23 +1895,26 @@ function dt({ logic: e = {} }) {
1852
1895
  }
1853
1896
  //#endregion
1854
1897
  //#region src/components/shared/toolbar/Paragraph/Hooks/paragraphLogic.jsx
1855
- function ft() {
1898
+ function gt() {
1856
1899
  let e = window.getSelection();
1857
1900
  return e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null;
1858
1901
  }
1859
- function pt(e) {
1902
+ function _t(e) {
1860
1903
  if (!e) return;
1861
1904
  let t = window.getSelection();
1862
1905
  t && (t.removeAllRanges(), t.addRange(e));
1863
1906
  }
1864
1907
  function X(e) {
1865
1908
  if (!e) return;
1866
- let t = document.createRange();
1867
- t.selectNodeContents(e), t.collapse(!1);
1868
- let n = window.getSelection();
1869
- n && (n.removeAllRanges(), n.addRange(t));
1909
+ e.lastChild && e.lastChild.nodeName === "BR" && e.childNodes.length > 1 && e.removeChild(e.lastChild);
1910
+ let t = e;
1911
+ for (; t.lastChild && t.lastChild.nodeName !== "BR";) t = t.lastChild;
1912
+ let n = document.createRange();
1913
+ t.nodeType === 3 ? (n.setStart(t, t.textContent.length), n.collapse(!0)) : t.lastChild && t.lastChild.nodeName === "BR" ? (n.setStart(t, t.childNodes.length - 1), n.collapse(!0)) : (n.selectNodeContents(t), n.collapse(!1));
1914
+ let r = window.getSelection();
1915
+ r && (r.removeAllRanges(), r.addRange(n));
1870
1916
  }
1871
- function mt(e) {
1917
+ function vt(e) {
1872
1918
  if (!e || e.nodeType !== 1) return !1;
1873
1919
  let t = e.tagName.toLowerCase();
1874
1920
  return [
@@ -1885,69 +1931,69 @@ function mt(e) {
1885
1931
  "pre"
1886
1932
  ].includes(t);
1887
1933
  }
1888
- function ht(e) {
1934
+ function yt(e) {
1889
1935
  if (!e) return null;
1890
1936
  let t = e.nodeType === 3 ? e.parentNode : e;
1891
- for (; t && t !== document.body && !mt(t);) t = t.parentNode;
1892
- return t && mt(t) ? t : null;
1937
+ for (; t && t !== document.body && !vt(t);) t = t.parentNode;
1938
+ return t && vt(t) ? t : null;
1893
1939
  }
1894
- function gt(e) {
1940
+ function bt(e) {
1895
1941
  if (!e) return null;
1896
1942
  let t = e.nodeType === 3 ? e.parentNode : e;
1897
1943
  for (; t && t !== document.body && t.tagName !== "LI";) t = t.parentNode;
1898
1944
  return t && t.tagName === "LI" ? t : null;
1899
1945
  }
1900
- function _t(e) {
1946
+ function xt(e) {
1901
1947
  let t = document.createElement(e);
1902
1948
  return t.className = e === "ul" ? "list-disc pl-5 my-2" : "list-decimal pl-5 my-2", t;
1903
1949
  }
1904
- function vt(e, t) {
1905
- let n = _t(t), r = document.createElement("li");
1950
+ function St(e, t) {
1951
+ let n = xt(t), r = document.createElement("li");
1906
1952
  return r.innerHTML = e.innerHTML, n.appendChild(r), e.parentNode.replaceChild(n, e), r;
1907
1953
  }
1908
- function yt(e) {
1954
+ function Ct(e) {
1909
1955
  let t = e.parentNode, n = document.createDocumentFragment(), r = Array.from(e.children), i = null;
1910
1956
  return r.forEach((e) => {
1911
1957
  let t = document.createElement("div");
1912
1958
  t.innerHTML = e.innerHTML, n.appendChild(t), i = t;
1913
1959
  }), t.replaceChild(n, e), i;
1914
1960
  }
1915
- function bt(e, t) {
1916
- let n = _t(t);
1961
+ function wt(e, t) {
1962
+ let n = xt(t);
1917
1963
  return n.innerHTML = e.innerHTML, e.parentNode.replaceChild(n, e), n;
1918
1964
  }
1919
- function xt() {
1965
+ function Tt() {
1920
1966
  let e = q(null), t = () => {
1921
- e.current = ft();
1967
+ e.current = gt();
1922
1968
  }, n = (t) => {
1923
- pt(e.current);
1969
+ _t(e.current);
1924
1970
  let n = window.getSelection();
1925
1971
  if (!n || !n.rangeCount) return;
1926
1972
  let r = n.anchorNode;
1927
1973
  if (!r) return;
1928
1974
  r.nodeType === 3 && (r = r.parentNode);
1929
- let i = gt(r);
1975
+ let i = bt(r);
1930
1976
  if (i) {
1931
1977
  let n = i.parentNode;
1932
1978
  if (n && (n.tagName === "UL" || n.tagName === "OL")) {
1933
1979
  if (n.tagName.toLowerCase() === t) {
1934
- let e = yt(n);
1980
+ let e = Ct(n);
1935
1981
  e && X(e);
1936
1982
  } else {
1937
- let e = bt(n, t).lastElementChild;
1983
+ let e = wt(n, t).lastElementChild;
1938
1984
  e && X(e);
1939
1985
  }
1940
- e.current = ft();
1986
+ e.current = gt();
1941
1987
  return;
1942
1988
  }
1943
1989
  }
1944
- let a = ht(r);
1990
+ let a = yt(r);
1945
1991
  if (a) {
1946
1992
  if (a.getAttribute && a.getAttribute("contenteditable") === "true") {
1947
1993
  let e = document.createElement("div");
1948
- e.innerHTML = a.innerHTML, a.innerHTML = "", a.appendChild(e), X(vt(e, t));
1949
- } else X(vt(a, t));
1950
- e.current = ft();
1994
+ e.innerHTML = a.innerHTML, a.innerHTML = "", a.appendChild(e), X(St(e, t));
1995
+ } else X(St(a, t));
1996
+ e.current = gt();
1951
1997
  }
1952
1998
  };
1953
1999
  return {
@@ -1955,46 +2001,46 @@ function xt() {
1955
2001
  toggleUnorderedList: () => n("ul"),
1956
2002
  toggleOrderedList: () => n("ol"),
1957
2003
  setAlignment: (t) => {
1958
- pt(e.current);
2004
+ _t(e.current);
1959
2005
  let n = window.getSelection();
1960
2006
  if (!n || !n.rangeCount) return;
1961
2007
  let r = n.anchorNode;
1962
2008
  if (!r) return;
1963
2009
  r.nodeType === 3 && (r = r.parentNode);
1964
2010
  let i = r.closest("p, div, h1, h2, h3, h4, h5, h6, li, blockquote, pre");
1965
- i && (i.style.textAlign = t), e.current = ft();
2011
+ i && (i.style.textAlign = t), e.current = gt();
1966
2012
  },
1967
2013
  indent: () => {
1968
- pt(e.current);
2014
+ _t(e.current);
1969
2015
  let t = window.getSelection();
1970
2016
  if (!t || !t.rangeCount) return;
1971
2017
  let n = t.anchorNode;
1972
2018
  if (!n) return;
1973
2019
  n.nodeType === 3 && (n = n.parentNode);
1974
- let r = gt(n);
2020
+ let r = bt(n);
1975
2021
  if (r) {
1976
2022
  let e = r.parentNode;
1977
2023
  if (!e || e.tagName !== "UL" && e.tagName !== "OL") return;
1978
2024
  let t = r.previousElementSibling;
1979
2025
  if (!t || t.tagName !== "LI") return;
1980
2026
  let n = t.querySelector(":scope > ul, :scope > ol");
1981
- n || (n = _t(e.tagName.toLowerCase()), t.appendChild(n)), n.appendChild(r), X(r);
2027
+ n || (n = xt(e.tagName.toLowerCase()), t.appendChild(n)), n.appendChild(r), X(r);
1982
2028
  } else {
1983
- let e = ht(n);
2029
+ let e = yt(n);
1984
2030
  if (!e) return;
1985
2031
  let t = parseInt(e.style.marginLeft) || 0;
1986
2032
  e.style.marginLeft = t + 20 + "px";
1987
2033
  }
1988
- e.current = ft();
2034
+ e.current = gt();
1989
2035
  },
1990
2036
  outdent: () => {
1991
- pt(e.current);
2037
+ _t(e.current);
1992
2038
  let t = window.getSelection();
1993
2039
  if (!t || !t.rangeCount) return;
1994
2040
  let n = t.anchorNode;
1995
2041
  if (!n) return;
1996
2042
  n.nodeType === 3 && (n = n.parentNode);
1997
- let r = gt(n);
2043
+ let r = bt(n);
1998
2044
  if (r) {
1999
2045
  let e = r.parentNode;
2000
2046
  if (!e || e.tagName !== "UL" && e.tagName !== "OL") return;
@@ -2007,24 +2053,24 @@ function xt() {
2007
2053
  e.children.length === 1 ? n.replaceChild(t, e) : (n.insertBefore(t, e.nextSibling), e.removeChild(r)), X(t);
2008
2054
  }
2009
2055
  } else {
2010
- let e = ht(n);
2056
+ let e = yt(n);
2011
2057
  if (!e) return;
2012
2058
  let t = parseInt(e.style.marginLeft) || 0;
2013
2059
  e.style.marginLeft = Math.max(0, t - 20) + "px";
2014
2060
  }
2015
- e.current = ft();
2061
+ e.current = gt();
2016
2062
  }
2017
2063
  };
2018
2064
  }
2019
2065
  //#endregion
2020
2066
  //#region src/components/shared/toolbar/Paragraph/Components/index.jsx
2021
- function St() {
2022
- return /* @__PURE__ */ R(dt, { logic: xt() });
2067
+ function Et() {
2068
+ return /* @__PURE__ */ R(ht, { logic: Tt() });
2023
2069
  }
2024
2070
  //#endregion
2025
2071
  //#region src/components/shared/toolbar/Table/Components/TableToolbar.jsx
2026
- var Ct = 10;
2027
- function wt({ logic: e }) {
2072
+ var Dt = 10;
2073
+ function Ot({ logic: e }) {
2028
2074
  let { insertTable: t } = e, [n, r] = G(1), [i, a] = G(1), [o, s] = G(!1), c = q(null), l = q(null), u = q(null);
2029
2075
  K(() => {
2030
2076
  if (!o) return;
@@ -2035,13 +2081,13 @@ function wt({ logic: e }) {
2035
2081
  }, [o]);
2036
2082
  let d = (e) => {
2037
2083
  if (!u.current) return;
2038
- let t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = e.clientY - t.top, o = t.width / Ct, s = Math.min(Math.floor(n / o) + 1, Ct), c = Math.min(Math.floor(i / o) + 1, Ct);
2084
+ let t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = e.clientY - t.top, o = t.width / Dt, s = Math.min(Math.floor(n / o) + 1, Dt), c = Math.min(Math.floor(i / o) + 1, Dt);
2039
2085
  a(s), r(c);
2040
2086
  }, f = () => {
2041
2087
  r(1), a(1);
2042
2088
  }, p = () => {
2043
2089
  t(n, i), s(!1), r(1), a(1);
2044
- }, m = i / Ct * 100, h = n / Ct * 100;
2090
+ }, m = i / Dt * 100, h = n / Dt * 100;
2045
2091
  return /* @__PURE__ */ R("div", {
2046
2092
  className: "forge-toolbar-group forge-toolbar-table relative flex items-center gap-0.5",
2047
2093
  children: [/* @__PURE__ */ R("button", {
@@ -2094,7 +2140,7 @@ function wt({ logic: e }) {
2094
2140
  }
2095
2141
  //#endregion
2096
2142
  //#region src/components/shared/toolbar/Table/Hooks/tableLogic.jsx
2097
- function Tt() {
2143
+ function kt() {
2098
2144
  let e = document.querySelector(".forge-editor__content");
2099
2145
  if (e) {
2100
2146
  e.focus();
@@ -2105,10 +2151,10 @@ function Tt() {
2105
2151
  }
2106
2152
  }
2107
2153
  }
2108
- function Et(e) {
2154
+ function At(e) {
2109
2155
  let t = window.getSelection();
2110
2156
  if (!t || !t.rangeCount) {
2111
- Tt(), setTimeout(() => Et(e), 50);
2157
+ kt(), setTimeout(() => At(e), 50);
2112
2158
  return;
2113
2159
  }
2114
2160
  let n = t.getRangeAt(0);
@@ -2116,7 +2162,7 @@ function Et(e) {
2116
2162
  let r = n.createContextualFragment(e), i = r.lastChild;
2117
2163
  n.insertNode(r), i ? (n.setStartAfter(i), n.collapse(!0)) : n.collapse(!1), t.removeAllRanges(), t.addRange(n);
2118
2164
  }
2119
- function Dt() {
2165
+ function jt() {
2120
2166
  return { insertTable: (e, t) => {
2121
2167
  let n = (100 / t).toFixed(2) + "%", r = "<table style=\"width:100%;table-layout:fixed;border-collapse:collapse;border:1px solid #ddd;\">";
2122
2168
  for (let i = 0; i < e; i++) {
@@ -2124,17 +2170,17 @@ function Dt() {
2124
2170
  for (let e = 0; e < t; e++) r += `<td style="border:1px solid #ddd;padding:8px;width:${n};text-align:center;vertical-align:middle;overflow:hidden;word-break:break-word;"><br></td>`;
2125
2171
  r += "</tr>";
2126
2172
  }
2127
- r += "</table><br>", Tt(), Et(r);
2173
+ r += "</table><br>", kt(), At(r);
2128
2174
  } };
2129
2175
  }
2130
2176
  //#endregion
2131
2177
  //#region src/components/shared/toolbar/Table/Components/index.jsx
2132
- function Ot() {
2133
- return /* @__PURE__ */ R(wt, { logic: Dt() });
2178
+ function Mt() {
2179
+ return /* @__PURE__ */ R(Ot, { logic: jt() });
2134
2180
  }
2135
2181
  //#endregion
2136
2182
  //#region src/components/shared/toolbar/Insert/Components/InsertToolbar.jsx
2137
- function kt({ logic: e }) {
2183
+ function Nt({ logic: e }) {
2138
2184
  let { insertLink: t, insertImage: n, insertVideo: r } = e, i = "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center gap-0.5 rounded-[2px] border border-[#ccc] bg-white px-[7px] py-1 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px", a = "forge-toolbar-icon inline-block min-w-4 text-center text-sm font-medium leading-none", o = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
2139
2185
  return /* @__PURE__ */ R("div", {
2140
2186
  className: "forge-toolbar-group forge-toolbar-insert flex items-center gap-0.5",
@@ -2186,7 +2232,7 @@ function kt({ logic: e }) {
2186
2232
  }
2187
2233
  //#endregion
2188
2234
  //#region src/components/shared/Hooks/sweetAlert.jsx
2189
- var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2235
+ var Pt = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2190
2236
  (function(n, r) {
2191
2237
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self, n.Sweetalert2 = r());
2192
2238
  })(e, (function() {
@@ -2668,24 +2714,24 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2668
2714
  }
2669
2715
  z(n, ""), n.setAttribute("src", t.imageUrl), n.setAttribute("alt", t.imageAlt || ""), ve(n, "width", t.imageWidth), ve(n, "height", t.imageHeight), n.className = l.image, F(n, t, "image");
2670
2716
  }
2671
- }, ut = !1, dt = 0, ft = 0, pt = 0, X = 0, mt = (e) => {
2672
- e.addEventListener("mousedown", gt), document.body.addEventListener("mousemove", _t), e.addEventListener("mouseup", vt), e.addEventListener("touchstart", gt), document.body.addEventListener("touchmove", _t), e.addEventListener("touchend", vt);
2673
- }, ht = (e) => {
2674
- e.removeEventListener("mousedown", gt), document.body.removeEventListener("mousemove", _t), e.removeEventListener("mouseup", vt), e.removeEventListener("touchstart", gt), document.body.removeEventListener("touchmove", _t), e.removeEventListener("touchend", vt);
2717
+ }, ut = !1, dt = 0, ft = 0, pt = 0, mt = 0, ht = (e) => {
2718
+ e.addEventListener("mousedown", _t), document.body.addEventListener("mousemove", X), e.addEventListener("mouseup", vt), e.addEventListener("touchstart", _t), document.body.addEventListener("touchmove", X), e.addEventListener("touchend", vt);
2675
2719
  }, gt = (e) => {
2720
+ e.removeEventListener("mousedown", _t), document.body.removeEventListener("mousemove", X), e.removeEventListener("mouseup", vt), e.removeEventListener("touchstart", _t), document.body.removeEventListener("touchmove", X), e.removeEventListener("touchend", vt);
2721
+ }, _t = (e) => {
2676
2722
  let t = E();
2677
2723
  if (!t) return;
2678
2724
  let n = D();
2679
2725
  if (e.target === t || n && n.contains(e.target)) {
2680
2726
  ut = !0;
2681
2727
  let n = yt(e);
2682
- dt = n.clientX, ft = n.clientY, pt = parseInt(t.style.insetInlineStart) || 0, X = parseInt(t.style.insetBlockStart) || 0, I(t, "swal2-dragging");
2728
+ dt = n.clientX, ft = n.clientY, pt = parseInt(t.style.insetInlineStart) || 0, mt = parseInt(t.style.insetBlockStart) || 0, I(t, "swal2-dragging");
2683
2729
  }
2684
- }, _t = (e) => {
2730
+ }, X = (e) => {
2685
2731
  let t = E();
2686
2732
  if (t && ut) {
2687
2733
  let { clientX: n, clientY: r } = yt(e), i = n - dt;
2688
- t.style.insetInlineStart = `${pt + (a.isRTL ? -i : i)}px`, t.style.insetBlockStart = `${X + (r - ft)}px`;
2734
+ t.style.insetInlineStart = `${pt + (a.isRTL ? -i : i)}px`, t.style.insetBlockStart = `${mt + (r - ft)}px`;
2689
2735
  }
2690
2736
  }, vt = () => {
2691
2737
  let e = E();
@@ -2704,7 +2750,7 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2704
2750
  let e = M();
2705
2751
  e && r.insertBefore(e, D());
2706
2752
  } else ve(r, "width", t.width);
2707
- ve(r, "padding", t.padding), t.color && (r.style.color = t.color), t.background && (r.style.background = t.background), B(re()), xt(r, t), t.draggable && !t.toast ? (I(r, l.draggable), mt(r)) : (L(r, l.draggable), ht(r));
2753
+ ve(r, "padding", t.padding), t.color && (r.style.color = t.color), t.background && (r.style.background = t.background), B(re()), xt(r, t), t.draggable && !t.toast ? (I(r, l.draggable), ht(r)) : (L(r, l.draggable), gt(r));
2708
2754
  }
2709
2755
  }, xt = (e, t) => {
2710
2756
  let n = t.showClass || {};
@@ -2738,20 +2784,20 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2738
2784
  bt(e, t), Be(e, t), St(e, t), nt(e, t), lt(e, t), Tt(e, t), ze(e, t), et(e, t), Pe(e, t), tt(e, t);
2739
2785
  let r = E();
2740
2786
  typeof t.didRender == "function" && r && t.didRender(r), (n = a.eventEmitter) == null || n.emit("didRender", r);
2741
- }, Dt = () => H(E()), Ot = () => A()?.click(), kt = () => j()?.click(), At = () => ie()?.click(), Z = Object.freeze({
2787
+ }, Dt = () => H(E()), Ot = () => A()?.click(), kt = () => j()?.click(), At = () => ie()?.click(), jt = Object.freeze({
2742
2788
  cancel: "cancel",
2743
2789
  backdrop: "backdrop",
2744
2790
  close: "close",
2745
2791
  esc: "esc",
2746
2792
  timer: "timer"
2747
- }), jt = (e) => {
2793
+ }), Mt = (e) => {
2748
2794
  if (e.keydownTarget && e.keydownHandlerAdded && e.keydownHandler) {
2749
2795
  let t = e.keydownHandler;
2750
2796
  e.keydownTarget.removeEventListener("keydown", t, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !1;
2751
2797
  }
2752
- }, Mt = (e, t, n) => {
2753
- if (jt(e), !t.toast) {
2754
- let r = (e) => It(t, e, n);
2798
+ }, Nt = (e, t, n) => {
2799
+ if (Mt(e), !t.toast) {
2800
+ let r = (e) => Lt(t, e, n);
2755
2801
  e.keydownHandler = r;
2756
2802
  let i = t.keydownListenerCapture ? window : E();
2757
2803
  if (i) {
@@ -2760,13 +2806,13 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2760
2806
  e.keydownTarget.addEventListener("keydown", n, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !0;
2761
2807
  }
2762
2808
  }
2763
- }, Nt = (e, t) => {
2809
+ }, Pt = (e, t) => {
2764
2810
  var n;
2765
2811
  let r = ue();
2766
2812
  return r.length ? (e += t, e === -2 && (e = r.length - 1), e === r.length ? e = 0 : e === -1 && (e = r.length - 1), r[e].focus(), !(S() && r[e] instanceof HTMLIFrameElement)) : ((n = E()) == null || n.focus(), !0);
2767
- }, Pt = ["ArrowRight", "ArrowDown"], Ft = ["ArrowLeft", "ArrowUp"], It = (e, t, n) => {
2768
- e && (t.isComposing || t.keyCode === 229 || (e.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ? Lt(t, e) : t.key === "Tab" ? Rt(t) : [...Pt, ...Ft].includes(t.key) ? zt(t.key) : t.key === "Escape" && Bt(t, e, n)));
2769
- }, Lt = (e, t) => {
2813
+ }, Ft = ["ArrowRight", "ArrowDown"], It = ["ArrowLeft", "ArrowUp"], Lt = (e, t, n) => {
2814
+ e && (t.isComposing || t.keyCode === 229 || (e.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ? Rt(t, e) : t.key === "Tab" ? zt(t) : [...Ft, ...It].includes(t.key) ? Bt(t.key) : t.key === "Escape" && Vt(t, e, n)));
2815
+ }, Rt = (e, t) => {
2770
2816
  if (!v(t.allowEnterKey)) return;
2771
2817
  let n = E();
2772
2818
  if (!n || !t.input) return;
@@ -2775,10 +2821,10 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2775
2821
  if (["textarea", "file"].includes(t.input)) return;
2776
2822
  Ot(), e.preventDefault();
2777
2823
  }
2778
- }, Rt = (e) => {
2779
- let t = e.target, n = ue().findIndex((e) => e === t), r = !0;
2780
- r = e.shiftKey ? Nt(n, -1) : Nt(n, 1), e.stopPropagation(), r && e.preventDefault();
2781
2824
  }, zt = (e) => {
2825
+ let t = e.target, n = ue().findIndex((e) => e === t), r = !0;
2826
+ r = e.shiftKey ? Pt(n, -1) : Pt(n, 1), e.stopPropagation(), r && e.preventDefault();
2827
+ }, Bt = (e) => {
2782
2828
  let t = oe(), n = A(), r = j(), i = ie();
2783
2829
  if (!t || !n || !r || !i) return;
2784
2830
  let a = [
@@ -2787,7 +2833,7 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2787
2833
  i
2788
2834
  ];
2789
2835
  if (document.activeElement instanceof HTMLElement && !a.includes(document.activeElement)) return;
2790
- let o = Pt.includes(e) ? "nextElementSibling" : "previousElementSibling", s = document.activeElement;
2836
+ let o = Ft.includes(e) ? "nextElementSibling" : "previousElementSibling", s = document.activeElement;
2791
2837
  if (s) {
2792
2838
  for (let e = 0; e < t.children.length; e++) {
2793
2839
  if (s = s[o], !s) return;
@@ -2795,58 +2841,58 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2795
2841
  }
2796
2842
  s instanceof HTMLButtonElement && s.focus();
2797
2843
  }
2798
- }, Bt = (e, t, n) => {
2799
- e.preventDefault(), v(t.allowEscapeKey) && n(Z.esc);
2844
+ }, Vt = (e, t, n) => {
2845
+ e.preventDefault(), v(t.allowEscapeKey) && n(jt.esc);
2800
2846
  };
2801
- var Vt = {
2847
+ var Ht = {
2802
2848
  swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
2803
2849
  swalPromiseReject: /* @__PURE__ */ new WeakMap()
2804
2850
  };
2805
- let Ht = () => {
2851
+ let Ut = () => {
2806
2852
  let e = C();
2807
2853
  Array.from(document.body.children).forEach((t) => {
2808
2854
  t.contains(e) || (t.hasAttribute("aria-hidden") && t.setAttribute("data-previous-aria-hidden", t.getAttribute("aria-hidden") || ""), t.setAttribute("aria-hidden", "true"));
2809
2855
  });
2810
- }, Ut = () => {
2856
+ }, Wt = () => {
2811
2857
  Array.from(document.body.children).forEach((e) => {
2812
2858
  e.hasAttribute("data-previous-aria-hidden") ? (e.setAttribute("aria-hidden", e.getAttribute("data-previous-aria-hidden") || ""), e.removeAttribute("data-previous-aria-hidden")) : e.removeAttribute("aria-hidden");
2813
2859
  });
2814
- }, Wt = typeof window < "u" && !!window.GestureEvent, Gt = Wt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Kt = () => {
2815
- if (Wt && !P(document.body, l.iosfix)) {
2860
+ }, Gt = typeof window < "u" && !!window.GestureEvent, Kt = Gt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, qt = () => {
2861
+ if (Gt && !P(document.body, l.iosfix)) {
2816
2862
  let e = document.body.scrollTop;
2817
- document.body.style.top = `${e * -1}px`, I(document.body, l.iosfix), qt();
2863
+ document.body.style.top = `${e * -1}px`, I(document.body, l.iosfix), Jt();
2818
2864
  }
2819
- }, qt = () => {
2865
+ }, Jt = () => {
2820
2866
  let e = C();
2821
2867
  if (!e) return;
2822
2868
  let t;
2823
2869
  e.ontouchstart = (e) => {
2824
- t = Jt(e);
2870
+ t = Yt(e);
2825
2871
  }, e.ontouchmove = (e) => {
2826
2872
  t && (e.preventDefault(), e.stopPropagation());
2827
2873
  };
2828
- }, Jt = (e) => {
2874
+ }, Yt = (e) => {
2829
2875
  let t = e.target, n = C(), r = te();
2830
- return !n || !r || Yt(e) || Xt(e) ? !1 : t === n || !Se(n) && t instanceof HTMLElement && !U(t, r) && t.tagName !== "INPUT" && t.tagName !== "TEXTAREA" && !(Se(r) && r.contains(t));
2831
- }, Yt = (e) => !!(e.touches && e.touches.length && e.touches[0].touchType === "stylus"), Xt = (e) => e.touches && e.touches.length > 1, Zt = () => {
2876
+ return !n || !r || Xt(e) || Zt(e) ? !1 : t === n || !Se(n) && t instanceof HTMLElement && !U(t, r) && t.tagName !== "INPUT" && t.tagName !== "TEXTAREA" && !(Se(r) && r.contains(t));
2877
+ }, Xt = (e) => !!(e.touches && e.touches.length && e.touches[0].touchType === "stylus"), Zt = (e) => e.touches && e.touches.length > 1, Qt = () => {
2832
2878
  if (P(document.body, l.iosfix)) {
2833
2879
  let e = parseInt(document.body.style.top, 10);
2834
2880
  L(document.body, l.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
2835
2881
  }
2836
- }, Qt = () => {
2882
+ }, $t = () => {
2837
2883
  let e = document.createElement("div");
2838
2884
  e.className = l["scrollbar-measure"], document.body.appendChild(e);
2839
2885
  let t = e.getBoundingClientRect().width - e.clientWidth;
2840
2886
  return document.body.removeChild(e), t;
2841
- }, $t = null, en = (e) => {
2842
- $t === null && (document.body.scrollHeight > window.innerHeight || e === "scroll") && ($t = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${$t + Qt()}px`);
2843
- }, tn = () => {
2844
- $t !== null && (document.body.style.paddingRight = `${$t}px`, $t = null);
2887
+ }, en = null, tn = (e) => {
2888
+ en === null && (document.body.scrollHeight > window.innerHeight || e === "scroll") && (en = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${en + $t()}px`);
2889
+ }, nn = () => {
2890
+ en !== null && (document.body.style.paddingRight = `${en}px`, en = null);
2845
2891
  };
2846
- function nn(e, t, n, r) {
2847
- fe() ? fn(e, r) : (s(n).then(() => fn(e, r)), jt(a)), Wt ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), de() && (tn(), Zt(), Ut()), rn();
2892
+ function rn(e, t, n, r) {
2893
+ fe() ? fn(e, r) : (s(n).then(() => fn(e, r)), Mt(a)), Gt ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), de() && (nn(), Qt(), Wt()), an();
2848
2894
  }
2849
- function rn() {
2895
+ function an() {
2850
2896
  L([document.documentElement, document.body], [
2851
2897
  l.shown,
2852
2898
  l["height-auto"],
@@ -2854,9 +2900,9 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2854
2900
  l["toast-shown"]
2855
2901
  ]);
2856
2902
  }
2857
- function an(e) {
2903
+ function Z(e) {
2858
2904
  e = ln(e);
2859
- let t = Vt.swalPromiseResolve.get(this), n = on(this);
2905
+ let t = Ht.swalPromiseResolve.get(this), n = on(this);
2860
2906
  this.isAwaitingPromise ? e.isDismissed || (cn(this), t(e)) : n && t(e);
2861
2907
  }
2862
2908
  let on = (e) => {
@@ -2869,7 +2915,7 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2869
2915
  return L(r, n.showClass.backdrop), I(r, n.hideClass.backdrop), un(e, t, n), !0;
2870
2916
  };
2871
2917
  function sn(e) {
2872
- let t = Vt.swalPromiseReject.get(this);
2918
+ let t = Ht.swalPromiseReject.get(this);
2873
2919
  cn(this), t && t(e);
2874
2920
  }
2875
2921
  let cn = (e) => {
@@ -2885,9 +2931,9 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2885
2931
  }, e), un = (e, t, n) => {
2886
2932
  var r;
2887
2933
  let i = C(), o = Ce(t);
2888
- typeof n.willClose == "function" && n.willClose(t), (r = a.eventEmitter) == null || r.emit("willClose", t), o && i ? dn(e, t, i, !!n.returnFocus, n.didClose) : i && nn(e, i, !!n.returnFocus, n.didClose);
2934
+ typeof n.willClose == "function" && n.willClose(t), (r = a.eventEmitter) == null || r.emit("willClose", t), o && i ? dn(e, t, i, !!n.returnFocus, n.didClose) : i && rn(e, i, !!n.returnFocus, n.didClose);
2889
2935
  }, dn = (e, t, n, r, i) => {
2890
- a.swalCloseEventFinishedCallback = nn.bind(null, e, n, r, i);
2936
+ a.swalCloseEventFinishedCallback = rn.bind(null, e, n, r, i);
2891
2937
  let o = function(e) {
2892
2938
  if (e.target === t) {
2893
2939
  var n;
@@ -2976,7 +3022,7 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2976
3022
  let t = J.innerParams.get(e);
2977
3023
  e.disableButtons(), t.returnInputValueOnDeny ? kn(e, "deny") : jn(e, !1);
2978
3024
  }, On = (e, t) => {
2979
- e.disableButtons(), t(Z.cancel);
3025
+ e.disableButtons(), t(jt.cancel);
2980
3026
  }, kn = (e, t) => {
2981
3027
  let n = J.innerParams.get(e);
2982
3028
  if (!n.input) {
@@ -3239,17 +3285,17 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3239
3285
  let or = (e) => {
3240
3286
  sr(e), delete e.params, delete a.keydownHandler, delete a.keydownTarget, delete a.currentInstance;
3241
3287
  }, sr = (e) => {
3242
- e.isAwaitingPromise ? (cr(J, e), e.isAwaitingPromise = !0) : (cr(Vt, e), cr(J, e), delete e.isAwaitingPromise, delete e.disableButtons, delete e.enableButtons, delete e.getInput, delete e.disableInput, delete e.enableInput, delete e.hideLoading, delete e.disableLoading, delete e.showValidationMessage, delete e.resetValidationMessage, delete e.close, delete e.closePopup, delete e.closeModal, delete e.closeToast, delete e.rejectPromise, delete e.update, delete e._destroy);
3288
+ e.isAwaitingPromise ? (cr(J, e), e.isAwaitingPromise = !0) : (cr(Ht, e), cr(J, e), delete e.isAwaitingPromise, delete e.disableButtons, delete e.enableButtons, delete e.getInput, delete e.disableInput, delete e.enableInput, delete e.hideLoading, delete e.disableLoading, delete e.showValidationMessage, delete e.resetValidationMessage, delete e.close, delete e.closePopup, delete e.closeModal, delete e.closeToast, delete e.rejectPromise, delete e.update, delete e._destroy);
3243
3289
  }, cr = (e, t) => {
3244
3290
  for (let n in e) e[n].delete(t);
3245
3291
  };
3246
3292
  var lr = /*#__PURE__*/ Object.freeze({
3247
3293
  __proto__: null,
3248
3294
  _destroy: ar,
3249
- close: an,
3250
- closeModal: an,
3251
- closePopup: an,
3252
- closeToast: an,
3295
+ close: Z,
3296
+ closeModal: Z,
3297
+ closePopup: Z,
3298
+ closeToast: Z,
3253
3299
  disableButtons: Vn,
3254
3300
  disableInput: Un,
3255
3301
  disableLoading: Fn,
@@ -3267,7 +3313,7 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3267
3313
  e.toast ? dr(e, t, n) : (mr(t), hr(t), gr(e, t, n));
3268
3314
  }, dr = (e, t, n) => {
3269
3315
  t.popup.onclick = () => {
3270
- e && (fr(e) || e.timer || e.input) || n(Z.close);
3316
+ e && (fr(e) || e.timer || e.input) || n(jt.close);
3271
3317
  };
3272
3318
  }, fr = (e) => !!(e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton), pr = !1, mr = (e) => {
3273
3319
  e.popup.onmousedown = () => {
@@ -3287,7 +3333,7 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3287
3333
  pr = !1;
3288
3334
  return;
3289
3335
  }
3290
- r.target === t.container && v(e.allowOutsideClick) && n(Z.backdrop);
3336
+ r.target === t.container && v(e.allowOutsideClick) && n(jt.backdrop);
3291
3337
  };
3292
3338
  }, _r = (e) => typeof e == "object" && !!e && "jquery" in e, vr = (e) => e instanceof Element || _r(e), yr = (e) => {
3293
3339
  let t = {};
@@ -3568,7 +3614,7 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3568
3614
  let o = window.getComputedStyle(document.body).overflowY;
3569
3615
  if (Xr(r, i, e), setTimeout(() => {
3570
3616
  Jr(r, i);
3571
- }, 10), de() && (Yr(r, e.scrollbarPadding !== void 0 && e.scrollbarPadding, o), Ht()), Gt && e.backdrop === !1 && i.scrollHeight > r.clientHeight && (r.style.pointerEvents = "auto"), !fe() && !a.previousActiveElement && (a.previousActiveElement = document.activeElement), typeof e.didOpen == "function") {
3617
+ }, 10), de() && (Yr(r, e.scrollbarPadding !== void 0 && e.scrollbarPadding, o), Ut()), Kt && e.backdrop === !1 && i.scrollHeight > r.clientHeight && (r.style.pointerEvents = "auto"), !fe() && !a.previousActiveElement && (a.previousActiveElement = document.activeElement), typeof e.didOpen == "function") {
3572
3618
  let t = e.didOpen;
3573
3619
  setTimeout(() => t(i));
3574
3620
  }
@@ -3581,7 +3627,7 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3581
3627
  }, Jr = (e, t) => {
3582
3628
  Ce(t) ? (e.style.overflowY = "hidden", t.addEventListener("animationend", qr), t.addEventListener("transitionend", qr)) : e.style.overflowY = "auto";
3583
3629
  }, Yr = (e, t, n) => {
3584
- Kt(), t && n !== "hidden" && en(n), setTimeout(() => {
3630
+ qt(), t && n !== "hidden" && tn(n), setTimeout(() => {
3585
3631
  e.scrollTop = 0;
3586
3632
  });
3587
3633
  }, Xr = (e, t, n) => {
@@ -3619,8 +3665,8 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3619
3665
  }
3620
3666
  _main(e, t = {}) {
3621
3667
  if (nr(Object.assign({}, t, e)), a.currentInstance) {
3622
- let e = Vt.swalPromiseResolve.get(a.currentInstance), { isAwaitingPromise: t } = a.currentInstance;
3623
- a.currentInstance._destroy(), t || e({ isDismissed: !0 }), de() && Ut();
3668
+ let e = Ht.swalPromiseResolve.get(a.currentInstance), { isAwaitingPromise: t } = a.currentInstance;
3669
+ a.currentInstance._destroy(), t || e({ isDismissed: !0 }), de() && Wt();
3624
3670
  }
3625
3671
  a.currentInstance = Q;
3626
3672
  let n = ri(e, t);
@@ -3644,15 +3690,15 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3644
3690
  isDenied: !1
3645
3691
  });
3646
3692
  };
3647
- Vt.swalPromiseResolve.set(e, r), Vt.swalPromiseReject.set(e, i), t.confirmButton.onclick = () => {
3693
+ Ht.swalPromiseResolve.set(e, r), Ht.swalPromiseReject.set(e, i), t.confirmButton.onclick = () => {
3648
3694
  En(e);
3649
3695
  }, t.denyButton.onclick = () => {
3650
3696
  Dn(e);
3651
3697
  }, t.cancelButton.onclick = () => {
3652
3698
  On(e, o);
3653
3699
  }, t.closeButton.onclick = () => {
3654
- o(Z.close);
3655
- }, ur(n, t, o), Mt(a, n, o), hn(e, n), Kr(n), ai(a, n, o), oi(t, n), setTimeout(() => {
3700
+ o(jt.close);
3701
+ }, ur(n, t, o), Nt(a, n, o), hn(e, n), Kr(n), ai(a, n, o), oi(t, n), setTimeout(() => {
3656
3702
  t.container.scrollTop = 0;
3657
3703
  });
3658
3704
  }), ri = (e, t) => {
@@ -3685,18 +3731,18 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3685
3731
  _("allowEnterKey", "preConfirm: () => false"), e.popup.focus();
3686
3732
  return;
3687
3733
  }
3688
- si(e) || ci(e, t) || Nt(-1, 1);
3734
+ si(e) || ci(e, t) || Pt(-1, 1);
3689
3735
  }
3690
3736
  }, si = (e) => {
3691
3737
  let t = Array.from(e.popup.querySelectorAll("[autofocus]"));
3692
3738
  for (let e of t) if (e instanceof HTMLElement && H(e)) return e.focus(), !0;
3693
3739
  return !1;
3694
3740
  }, ci = (e, t) => t.focusDeny && H(e.denyButton) ? (e.denyButton.focus(), !0) : t.focusCancel && H(e.cancelButton) ? (e.cancelButton.focus(), !0) : t.focusConfirm && H(e.confirmButton) ? (e.confirmButton.focus(), !0) : !1;
3695
- $.prototype.disableButtons = Vn, $.prototype.enableButtons = Bn, $.prototype.getInput = Ln, $.prototype.disableInput = Un, $.prototype.enableInput = Hn, $.prototype.hideLoading = Fn, $.prototype.disableLoading = Fn, $.prototype.showValidationMessage = Wn, $.prototype.resetValidationMessage = Gn, $.prototype.close = an, $.prototype.closePopup = an, $.prototype.closeModal = an, $.prototype.closeToast = an, $.prototype.rejectPromise = sn, $.prototype.update = rr, $.prototype._destroy = ar, Object.assign($, Nr), Object.keys(lr).forEach((e) => {
3741
+ $.prototype.disableButtons = Vn, $.prototype.enableButtons = Bn, $.prototype.getInput = Ln, $.prototype.disableInput = Un, $.prototype.enableInput = Hn, $.prototype.hideLoading = Fn, $.prototype.disableLoading = Fn, $.prototype.showValidationMessage = Wn, $.prototype.resetValidationMessage = Gn, $.prototype.close = Z, $.prototype.closePopup = Z, $.prototype.closeModal = Z, $.prototype.closeToast = Z, $.prototype.rejectPromise = sn, $.prototype.update = rr, $.prototype._destroy = ar, Object.assign($, Nr), Object.keys(lr).forEach((e) => {
3696
3742
  $[e] = function(...t) {
3697
3743
  if (Q && Q[e]) return Q[e](...t);
3698
3744
  };
3699
- }), $.DismissReason = Z, $.version = "11.26.25";
3745
+ }), $.DismissReason = jt, $.version = "11.26.25";
3700
3746
  let li = $;
3701
3747
  return li.default = li, li;
3702
3748
  })), e !== void 0 && e.Sweetalert2 && (e.swal = e.sweetAlert = e.Swal = e.SweetAlert = e.Sweetalert2), typeof document < "u" && function(e, t) {
@@ -3709,9 +3755,9 @@ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3709
3755
  }
3710
3756
  }(document, ":root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}");
3711
3757
  })))(), 1);
3712
- function Z({ title: e, inputs: t, confirmText: n, cancelText: r }) {
3758
+ function Ft({ title: e, inputs: t, confirmText: n, cancelText: r }) {
3713
3759
  let i = t.map((e, t) => `<input id="${`swal-input-${t}`}" class="swal2-input" placeholder="${e.placeholder || ""}" value="${e.value || ""}">`).join("");
3714
- return At.default.fire({
3760
+ return Pt.default.fire({
3715
3761
  title: e,
3716
3762
  html: i,
3717
3763
  focusConfirm: !1,
@@ -3720,7 +3766,7 @@ function Z({ title: e, inputs: t, confirmText: n, cancelText: r }) {
3720
3766
  let n = `swal-input-${t}`, r = document.getElementById(n);
3721
3767
  if (!r) return null;
3722
3768
  let i = r.value;
3723
- return e.required && !i ? (At.default.showValidationMessage(e.requiredMessage || "This field is required"), !1) : i;
3769
+ return e.required && !i ? (Pt.default.showValidationMessage(e.requiredMessage || "This field is required"), !1) : i;
3724
3770
  });
3725
3771
  return !e.includes(!1) && e;
3726
3772
  },
@@ -3731,16 +3777,16 @@ function Z({ title: e, inputs: t, confirmText: n, cancelText: r }) {
3731
3777
  }
3732
3778
  //#endregion
3733
3779
  //#region src/components/shared/toolbar/Insert/Hooks/insertLogic.jsx
3734
- function jt() {
3780
+ function It() {
3735
3781
  let e = window.getSelection();
3736
3782
  return e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null;
3737
3783
  }
3738
- function Mt(e) {
3784
+ function Lt(e) {
3739
3785
  if (!e) return;
3740
3786
  let t = window.getSelection();
3741
3787
  t && (t.removeAllRanges(), t.addRange(e));
3742
3788
  }
3743
- function Nt() {
3789
+ function Rt() {
3744
3790
  let e = document.querySelector(".forge-editor__content");
3745
3791
  if (e) {
3746
3792
  e.focus();
@@ -3751,10 +3797,10 @@ function Nt() {
3751
3797
  }
3752
3798
  }
3753
3799
  }
3754
- function Pt(e) {
3800
+ function zt(e) {
3755
3801
  let t = window.getSelection();
3756
3802
  if (!t || !t.rangeCount) {
3757
- Nt(), setTimeout(() => Pt(e), 50);
3803
+ Rt(), setTimeout(() => zt(e), 50);
3758
3804
  return;
3759
3805
  }
3760
3806
  let n = t.getRangeAt(0);
@@ -3762,10 +3808,10 @@ function Pt(e) {
3762
3808
  let r = n.createContextualFragment(e), i = r.lastChild;
3763
3809
  n.insertNode(r), i ? (n.setStartAfter(i), n.collapse(!0)) : n.collapse(!1), t.removeAllRanges(), t.addRange(n);
3764
3810
  }
3765
- function Ft() {
3811
+ function Bt() {
3766
3812
  return {
3767
3813
  insertLink: async () => {
3768
- let e = jt(), t = await Z({
3814
+ let e = It(), t = await Ft({
3769
3815
  title: "Insert Link",
3770
3816
  inputs: [{
3771
3817
  placeholder: "URL",
@@ -3777,13 +3823,13 @@ function Ft() {
3777
3823
  cancelText: "Cancel"
3778
3824
  });
3779
3825
  if (t.isConfirmed && t.value) {
3780
- Mt(e);
3826
+ Lt(e);
3781
3827
  let [n, r] = t.value;
3782
- Pt(r ? `<a href="${n}" target="_blank" rel="noopener">${r}</a>` : `<a href="${n}" target="_blank" rel="noopener">${n}</a>`);
3828
+ zt(r ? `<a href="${n}" target="_blank" rel="noopener">${r}</a>` : `<a href="${n}" target="_blank" rel="noopener">${n}</a>`);
3783
3829
  }
3784
3830
  },
3785
3831
  insertImage: async () => {
3786
- let e = jt(), t = await Z({
3832
+ let e = It(), t = await Ft({
3787
3833
  title: "Insert Image",
3788
3834
  inputs: [{
3789
3835
  placeholder: "Image URL",
@@ -3798,13 +3844,13 @@ function Ft() {
3798
3844
  cancelText: "Cancel"
3799
3845
  });
3800
3846
  if (t.isConfirmed && t.value) {
3801
- Mt(e);
3847
+ Lt(e);
3802
3848
  let [n, r] = t.value;
3803
- Pt(`<img src="${n}" alt="${r}" style="max-width: 100%;">`);
3849
+ zt(`<img src="${n}" alt="${r}" style="max-width: 100%;">`);
3804
3850
  }
3805
3851
  },
3806
3852
  insertVideo: async () => {
3807
- let e = jt(), t = await Z({
3853
+ let e = It(), t = await Ft({
3808
3854
  title: "Insert Video",
3809
3855
  inputs: [{
3810
3856
  placeholder: "Video URL (YouTube/Vimeo)",
@@ -3816,21 +3862,21 @@ function Ft() {
3816
3862
  cancelText: "Cancel"
3817
3863
  });
3818
3864
  if (t.isConfirmed && t.value) {
3819
- Mt(e);
3865
+ Lt(e);
3820
3866
  let [n] = t.value, r;
3821
- r = n.includes("youtube.com") || n.includes("youtu.be") ? `<iframe width="560" height="315" src="${n.replace("watch?v=", "embed/").replace("youtu.be/", "youtube.com/embed/")}" frameborder="0" allowfullscreen></iframe>` : `<video controls src="${n}" style="max-width: 100%;"></video>`, Pt(r);
3867
+ r = n.includes("youtube.com") || n.includes("youtu.be") ? `<iframe width="560" height="315" src="${n.replace("watch?v=", "embed/").replace("youtu.be/", "youtube.com/embed/")}" frameborder="0" allowfullscreen></iframe>` : `<video controls src="${n}" style="max-width: 100%;"></video>`, zt(r);
3822
3868
  }
3823
3869
  }
3824
3870
  };
3825
3871
  }
3826
3872
  //#endregion
3827
3873
  //#region src/components/shared/toolbar/Insert/Components/index.jsx
3828
- function It() {
3829
- return /* @__PURE__ */ R(kt, { logic: Ft() });
3874
+ function Vt() {
3875
+ return /* @__PURE__ */ R(Nt, { logic: Bt() });
3830
3876
  }
3831
3877
  //#endregion
3832
3878
  //#region src/components/shared/toolbar/View/Components/ViewToolbar.jsx
3833
- function Lt({ logic: e }) {
3879
+ function Ht({ logic: e }) {
3834
3880
  let { toggleFullscreen: t, toggleCodeView: n, showHelp: r } = e, i = "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px", a = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
3835
3881
  return /* @__PURE__ */ R("div", {
3836
3882
  className: "forge-toolbar-group forge-toolbar-view flex items-center gap-0.5",
@@ -3865,23 +3911,75 @@ function Lt({ logic: e }) {
3865
3911
  }
3866
3912
  //#endregion
3867
3913
  //#region src/components/shared/toolbar/View/Hooks/viewLogic.jsx
3868
- function Rt(e) {
3869
- let t = "", n = 0;
3870
- return e.replace(/></g, ">\n<").split("\n").forEach((e) => {
3871
- let r = e.trim();
3872
- if (!r) return;
3873
- let i = /^<\/\w/.test(r), a = /\/>$/.test(r) || /^<(br|hr|img|input|meta|link)\b[^>]*>$/i.test(r), o = /^<\w[^>]*>$/.test(r) && !i && !a, s = /^<(\w+)[^>]*>.*<\/\1>$/.test(r);
3874
- i && !s && (n = Math.max(0, n - 1)), t += " ".repeat(n) + r + "\n", o && !s && (n += 1);
3875
- }), t.trim();
3914
+ var Ut = /* @__PURE__ */ new Set([
3915
+ "br",
3916
+ "hr",
3917
+ "img",
3918
+ "input",
3919
+ "meta",
3920
+ "link",
3921
+ "area",
3922
+ "base",
3923
+ "col",
3924
+ "embed",
3925
+ "source",
3926
+ "track",
3927
+ "wbr"
3928
+ ]);
3929
+ function Wt(e) {
3930
+ return Array.from(e.attributes).map((e) => ` ${e.name}="${e.value.replace(/"/g, "&quot;")}"`).join("");
3876
3931
  }
3877
- function zt(e) {
3932
+ function Gt(e) {
3933
+ return e.replace(/\u200B/g, "").trim();
3934
+ }
3935
+ function Kt(e, t, n) {
3936
+ let r = " ".repeat(t);
3937
+ if (e.nodeType === 3) {
3938
+ let t = Gt(e.textContent);
3939
+ if (!t) return;
3940
+ n.push(r + t);
3941
+ return;
3942
+ }
3943
+ if (e.nodeType !== 1) return;
3944
+ let i = e.tagName.toLowerCase(), a = Wt(e);
3945
+ if (Ut.has(i)) {
3946
+ n.push(`${r}<${i}${a}>`);
3947
+ return;
3948
+ }
3949
+ let o = Array.from(e.childNodes).filter((e) => e.nodeType === 3 ? Gt(e.textContent) !== "" : e.nodeType === 1);
3950
+ if (o.length === 0) {
3951
+ n.push(`${r}<${i}${a}></${i}>`);
3952
+ return;
3953
+ }
3954
+ if (o.length === 1 && o[0].nodeType === 3) {
3955
+ n.push(`${r}<${i}${a}>${Gt(o[0].textContent)}</${i}>`);
3956
+ return;
3957
+ }
3958
+ n.push(`${r}<${i}${a}>`), o.forEach((e) => Kt(e, t + 1, n)), n.push(`${r}</${i}>`);
3959
+ }
3960
+ function qt(e) {
3961
+ let t = document.createElement("template");
3962
+ t.innerHTML = e;
3963
+ let n = [];
3964
+ return Array.from(t.content.childNodes).forEach((e) => Kt(e, 0, n)), n.join("\n");
3965
+ }
3966
+ function Jt(e) {
3967
+ Array.from(e.childNodes).forEach((t) => {
3968
+ t.nodeType === 3 ? /^\s*$/.test(t.textContent) ? e.removeChild(t) : t.textContent = t.textContent.trim() : t.nodeType === 1 && Jt(t);
3969
+ });
3970
+ }
3971
+ function Yt(e) {
3972
+ let t = document.createElement("template");
3973
+ return t.innerHTML = e, Jt(t.content), t.content;
3974
+ }
3975
+ function Xt(e) {
3878
3976
  e.focus();
3879
3977
  let t = document.createRange();
3880
3978
  t.selectNodeContents(e), t.collapse(!1);
3881
3979
  let n = window.getSelection();
3882
3980
  n && (n.removeAllRanges(), n.addRange(t));
3883
3981
  }
3884
- function Bt() {
3982
+ function Zt() {
3885
3983
  return {
3886
3984
  toggleFullscreen: () => {
3887
3985
  let e = document.querySelector(".forge-editor");
@@ -3891,11 +3989,11 @@ function Bt() {
3891
3989
  let e = document.querySelector(".forge-editor__content");
3892
3990
  if (e) {
3893
3991
  if (e.getAttribute("data-code-view") !== "true") {
3894
- let t = e.innerHTML, n = Rt(t);
3992
+ let t = e.innerHTML, n = qt(t);
3895
3993
  e.setAttribute("data-code-view", "true"), e.contentEditable = "false", e.style.whiteSpace = "pre", e.style.fontFamily = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace", e.style.fontSize = "13px", e.style.lineHeight = "1.6", e.style.tabSize = "2", e.textContent = n;
3896
3994
  } else {
3897
- let t = e.textContent;
3898
- e.removeAttribute("data-code-view"), e.style.whiteSpace = "", e.style.fontFamily = "", e.style.fontSize = "", e.style.lineHeight = "", e.style.tabSize = "", e.innerHTML = t, e.contentEditable = "true", zt(e);
3995
+ let t = e.textContent, n = Yt(t);
3996
+ e.removeAttribute("data-code-view"), e.style.whiteSpace = "", e.style.fontFamily = "", e.style.fontSize = "", e.style.lineHeight = "", e.style.tabSize = "", e.innerHTML = "", e.appendChild(n), e.contentEditable = "true", Xt(e);
3899
3997
  }
3900
3998
  }
3901
3999
  },
@@ -3917,30 +4015,30 @@ function Bt() {
3917
4015
  }
3918
4016
  //#endregion
3919
4017
  //#region src/components/shared/toolbar/View/Components/index.jsx
3920
- function Vt() {
3921
- return /* @__PURE__ */ R(Lt, { logic: Bt() });
4018
+ function Qt() {
4019
+ return /* @__PURE__ */ R(Ht, { logic: Zt() });
3922
4020
  }
3923
4021
  //#endregion
3924
4022
  //#region src/components/shared/toolbar/Index/index.jsx
3925
- function Ht({ editorRef: e }) {
4023
+ function $t({ editorRef: e }) {
3926
4024
  return /* @__PURE__ */ R("div", {
3927
4025
  className: "forge-editor__toolbar sticky top-0 z-10 m-0 flex flex-shrink-0 flex-wrap items-center justify-between gap-[4px] rounded-t-[3px] border-b border-[#ddd] bg-[#f5f5f5] p-[5px] text-[#333]",
3928
4026
  role: "toolbar",
3929
4027
  children: [
3930
4028
  /* @__PURE__ */ R(z, {}),
3931
4029
  /* @__PURE__ */ R(J, {}),
3932
- /* @__PURE__ */ R(Qe, { editorRef: e }),
3933
- /* @__PURE__ */ R(ut, {}),
3934
- /* @__PURE__ */ R(St, {}),
3935
- /* @__PURE__ */ R(Ot, {}),
3936
- /* @__PURE__ */ R(It, {}),
3937
- /* @__PURE__ */ R(Vt, {})
4030
+ /* @__PURE__ */ R(tt, { editorRef: e }),
4031
+ /* @__PURE__ */ R(mt, {}),
4032
+ /* @__PURE__ */ R(Et, {}),
4033
+ /* @__PURE__ */ R(Mt, {}),
4034
+ /* @__PURE__ */ R(Vt, {}),
4035
+ /* @__PURE__ */ R(Qt, {})
3938
4036
  ]
3939
4037
  });
3940
4038
  }
3941
4039
  //#endregion
3942
4040
  //#region src/components/shared/statusbar/Components/index.jsx
3943
- function Ut() {
4041
+ function en() {
3944
4042
  return /* @__PURE__ */ R("div", {
3945
4043
  className: "forge-statusbar box-border flex h-2.5 w-full flex-shrink-0 cursor-s-resize items-center justify-center rounded-b-[3px] border-t border-[#ccc] bg-[#f0f0f0]",
3946
4044
  role: "status",
@@ -3957,10 +4055,10 @@ function Ut() {
3957
4055
  }
3958
4056
  //#endregion
3959
4057
  //#region src/components/shared/statusbar/Hooks/resize.js
3960
- var Wt = 100;
3961
- function Gt(e, t, n = {}) {
4058
+ var tn = 100;
4059
+ function nn(e, t, n = {}) {
3962
4060
  if (!e || !t) return () => {};
3963
- let r = n.minHeight ?? Wt, i = n.maxHeight ?? Infinity, a = 0, o = 0;
4061
+ let r = n.minHeight ?? tn, i = n.maxHeight ?? Infinity, a = 0, o = 0;
3964
4062
  function s(e) {
3965
4063
  let n = e.clientY - a, s = o + n;
3966
4064
  s = Math.min(Math.max(s, r), i), t.style.height = `${s}px`;
@@ -3977,7 +4075,7 @@ function Gt(e, t, n = {}) {
3977
4075
  }
3978
4076
  //#endregion
3979
4077
  //#region src/components/shared/toolbar/Style/Hooks/styleLogic.jsx
3980
- function Kt(e) {
4078
+ function rn(e) {
3981
4079
  let t = window.getSelection();
3982
4080
  if (!t || !t.rangeCount) return;
3983
4081
  let n = t.getRangeAt(0).commonAncestorContainer;
@@ -3991,20 +4089,20 @@ function Kt(e) {
3991
4089
  i.selectNodeContents(n), i.collapse(!1), t.removeAllRanges(), t.addRange(i);
3992
4090
  }
3993
4091
  }
3994
- function qt(e) {
4092
+ function an(e) {
3995
4093
  if (!e) return;
3996
4094
  let t = e.querySelector("[data-command='style']"), n = e.querySelector(".forge-dropdown-style");
3997
- !t || !n || (Je(t, n), n.querySelectorAll(".forge-dropdown-item").forEach((e) => {
4095
+ !t || !n || (Qe(t, n), n.querySelectorAll(".forge-dropdown-item").forEach((e) => {
3998
4096
  e.addEventListener("mousedown", (r) => {
3999
4097
  r.preventDefault(), r.stopPropagation();
4000
4098
  let i = e.dataset.value || e.getAttribute("data-value");
4001
- i && Kt(i), n.classList.remove("is-open"), t.classList.remove("is-active");
4099
+ i && rn(i), n.classList.remove("is-open"), t.classList.remove("is-active");
4002
4100
  });
4003
4101
  }));
4004
4102
  }
4005
4103
  //#endregion
4006
4104
  //#region src/components/shared/i18n/index.js
4007
- var Jt = {
4105
+ var Z = {
4008
4106
  en: {
4009
4107
  style: "Style",
4010
4108
  normal: "Normal",
@@ -4077,20 +4175,20 @@ var Jt = {
4077
4175
  codeview: "عرض الكود",
4078
4176
  help: "مساعدة"
4079
4177
  }
4080
- }, Yt = "en";
4081
- function Xt(e, t) {
4082
- return (Jt[e] || Jt[Yt])[t] || Jt[Yt][t] || t;
4178
+ }, on = "en";
4179
+ function sn(e, t) {
4180
+ return (Z[e] || Z[on])[t] || Z[on][t] || t;
4083
4181
  }
4084
4182
  //#endregion
4085
4183
  //#region src/components/shared/i18n/apply.js
4086
- function Zt(e, t) {
4184
+ function cn(e, t) {
4087
4185
  e.querySelectorAll("[data-i18n]").forEach((e) => {
4088
- e.textContent = Xt(t, e.getAttribute("data-i18n"));
4186
+ e.textContent = sn(t, e.getAttribute("data-i18n"));
4089
4187
  });
4090
4188
  }
4091
4189
  //#endregion
4092
4190
  //#region src/components/shared/toolbar/Style/Utils/ensureParagraph.jsx
4093
- function Qt(e) {
4191
+ function ln(e) {
4094
4192
  if (e && !(e.children.length > 0 || e.textContent.trim().length > 0)) {
4095
4193
  let t = document.createElement("p");
4096
4194
  t.innerHTML = "<br>", e.appendChild(t);
@@ -4098,7 +4196,7 @@ function Qt(e) {
4098
4196
  }
4099
4197
  //#endregion
4100
4198
  //#region src/components/shared/toolbar/Hooks/contentClick.js
4101
- function $t(e) {
4199
+ function un(e) {
4102
4200
  e.addEventListener("click", (t) => {
4103
4201
  if (t.target === e) {
4104
4202
  let t = window.getSelection();
@@ -4115,7 +4213,7 @@ function $t(e) {
4115
4213
  }
4116
4214
  //#endregion
4117
4215
  //#region src/components/shared/toolbar/ImagePopover/Components/ImagePopover.jsx
4118
- function en({ target: e, onClose: t, onResize: n, onFloat: r, onRemove: i }) {
4216
+ function dn({ target: e, onClose: t, onResize: n, onFloat: r, onRemove: i }) {
4119
4217
  let a = q(null);
4120
4218
  if (!e) return null;
4121
4219
  let o = e.getBoundingClientRect(), s = {
@@ -4250,7 +4348,7 @@ function en({ target: e, onClose: t, onResize: n, onFloat: r, onRemove: i }) {
4250
4348
  }
4251
4349
  //#endregion
4252
4350
  //#region src/components/shared/toolbar/ImagePopover/Hooks/useImagePopover.jsx
4253
- function tn() {
4351
+ function fn() {
4254
4352
  let [e, t] = G(null), [n, r] = G(!1);
4255
4353
  return K(() => {
4256
4354
  let e = (e) => {
@@ -4285,12 +4383,12 @@ function tn() {
4285
4383
  }
4286
4384
  //#endregion
4287
4385
  //#region src/components/shared/toolbar/ImagePopover/Components/index.jsx
4288
- function nn() {
4289
- return /* @__PURE__ */ R(en, { ...tn() });
4386
+ function pn() {
4387
+ return /* @__PURE__ */ R(dn, { ...fn() });
4290
4388
  }
4291
4389
  //#endregion
4292
4390
  //#region src/components/light/index.jsx
4293
- function rn(e) {
4391
+ function mn(e) {
4294
4392
  return {
4295
4393
  getHTML() {
4296
4394
  return e.innerHTML;
@@ -4307,41 +4405,41 @@ function rn(e) {
4307
4405
  }
4308
4406
  };
4309
4407
  }
4310
- function an(e) {
4408
+ function hn(e) {
4311
4409
  let t = e.lang || "en", n = e.dir || "ltr", r = { current: null }, i = /* @__PURE__ */ R("div", {
4312
4410
  className: "forge-editor forge-editor--light flex flex-col w-full rounded-[3px] border border-[#ddd] bg-white box-border align-top min-h-[120px]",
4313
4411
  lang: t,
4314
4412
  dir: n,
4315
4413
  children: [
4316
- /* @__PURE__ */ R(Ht, { editorRef: r }),
4414
+ /* @__PURE__ */ R($t, { editorRef: r }),
4317
4415
  /* @__PURE__ */ R("div", {
4318
4416
  className: "forge-editor__content flex-1 min-h-[60px] overflow-auto p-[10px] pb-12 outline-none box-border [&_blockquote]:my-2 [&_blockquote]:border-l-4 [&_blockquote]:border-[#ccc] [&_blockquote]:pl-4 [&_blockquote]:italic [&_pre]:bg-[#f4f4f4] [&_pre]:p-2 [&_pre]:rounded [&_h1]:text-2xl [&_h1]:font-bold [&_h2]:text-xl [&_h2]:font-bold [&_h3]:text-lg [&_h3]:font-bold",
4319
4417
  contentEditable: "true",
4320
4418
  "data-placeholder": e.placeholder || ""
4321
4419
  }),
4322
- /* @__PURE__ */ R(Ut, {}),
4323
- /* @__PURE__ */ R(nn, {})
4420
+ /* @__PURE__ */ R(en, {}),
4421
+ /* @__PURE__ */ R(pn, {})
4324
4422
  ]
4325
4423
  }), a = document.createElement("div");
4326
4424
  I(i, a);
4327
4425
  let o = a.firstElementChild, s = o.querySelector(".forge-editor__content");
4328
- r.current = s, Qt(s), $t(s);
4426
+ r.current = s, ln(s), un(s);
4329
4427
  let c = o.querySelector(".forge-toolbar-style");
4330
- c && qt(c);
4428
+ c && an(c);
4331
4429
  let l = o.querySelector(".forge-editor__toolbar");
4332
- l && Zt(l, t);
4430
+ l && cn(l, t);
4333
4431
  let u = o.querySelector(".forge-statusbar");
4334
- return u && Gt(u, o, { minHeight: 120 }), {
4432
+ return u && nn(u, o, { minHeight: 120 }), {
4335
4433
  element: o,
4336
- ...rn(s)
4434
+ ...mn(s)
4337
4435
  };
4338
4436
  }
4339
4437
  //#endregion
4340
4438
  //#region src/main/index.jsx
4341
- function on(e) {
4439
+ function gn(e) {
4342
4440
  let t = l(e);
4343
4441
  if (t.type === "light") {
4344
- let { element: n, getHTML: r, setHTML: i, getText: a, getSelection: o } = an(t);
4442
+ let { element: n, getHTML: r, setHTML: i, getText: a, getSelection: o } = hn(t);
4345
4443
  return e.innerHTML = "", e.appendChild(n), n.style.width = t.width, n.style.height = t.height, {
4346
4444
  element: n,
4347
4445
  getHTML: r,
@@ -4354,13 +4452,13 @@ function on(e) {
4354
4452
  }
4355
4453
  //#endregion
4356
4454
  //#region src/main/main.jsx
4357
- var sn = document.querySelectorAll("forge-editor"), cn = [];
4358
- sn.forEach((e) => {
4359
- let t = on(e);
4360
- t && cn.push(t);
4361
- }), window.forgeEditors = cn;
4362
- var ln = document.getElementById("get-html-btn"), un = document.getElementById("html-output");
4363
- ln && un && cn[0] && ln.addEventListener("click", () => {
4364
- un.value = cn[0].getHTML();
4455
+ var _n = document.querySelectorAll("forge-editor"), vn = [];
4456
+ _n.forEach((e) => {
4457
+ let t = gn(e);
4458
+ t && vn.push(t);
4459
+ }), window.forgeEditors = vn;
4460
+ var yn = document.getElementById("get-html-btn"), bn = document.getElementById("html-output");
4461
+ yn && bn && vn[0] && yn.addEventListener("click", () => {
4462
+ bn.value = vn[0].getHTML();
4365
4463
  });
4366
4464
  //#endregion