@veevarts/design-system 1.0.0-alpha.6 → 1.0.0-alpha.8

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.

Potentially problematic release.


This version of @veevarts/design-system might be problematic. Click here for more details.

package/dist/index.js CHANGED
@@ -1,22 +1,33 @@
1
1
  import { jsx as h, jsxs as k, Fragment as ue } from "react/jsx-runtime";
2
- import { HeroUIProvider as as, Button as _, cn as Z, Select as Kn, SelectItem as Jn, Divider as Hr, Tooltip as ut, Dropdown as $r, DropdownTrigger as Vr, DropdownMenu as Kr, DropdownItem as Jr, Input as cs, Popover as us, PopoverTrigger as fs, PopoverContent as ds, ButtonGroup as hs, useInput as ps, NumberInput as ms, Card as gs, CardBody as ys, Alert as qr } from "@heroui/react";
2
+ import { HeroUIProvider as ls, Button as _, cn as Z, Select as Vn, SelectItem as Kn, Divider as Hr, Tooltip as ct, Dropdown as $r, DropdownTrigger as Vr, DropdownMenu as Kr, DropdownItem as Jr, Input as as, Popover as cs, PopoverTrigger as us, PopoverContent as fs, ButtonGroup as ds, useInput as hs, NumberInput as ps, Card as ms, CardBody as gs, Alert as qr } from "@heroui/react";
3
3
  export * from "@heroui/react";
4
- import G, { forwardRef as Et, useState as re, useEffect as Te, createElement as nn, useRef as gt, useReducer as bs, useCallback as Q, useMemo as xs } from "react";
5
- import { Globe as qn, User as Un, Heading as Ur, Check as Wr, ListTodo as jr, ListOrdered as _r, List as Cn, AlignJustify as ks, AlignRight as Ss, AlignCenter as Cs, AlignLeft as Gr, CornerDownLeft as As, Redo2 as Ts, Undo2 as vs, Eraser as Wn, Minus as Ms, Quote as ws, CodeSquare as Es, FileText as Ns, Link2 as Is, Highlighter as Zr, Palette as Xr, Code as Os, Underline as Ds, Strikethrough as Ls, Italic as Ps, Bold as Rs, X as Fs, ZoomOut as zs, ZoomIn as Bs, Clock as jn, CheckCircle as Hs, AlertCircle as $s } from "lucide-react";
6
- import { LazyMotion as Vs, domAnimation as Ks, m as rn } from "framer-motion";
7
- import { EditorProvider as Js, useCurrentEditor as Qr } from "@tiptap/react";
8
- import { Mark as et, markPasteRule as Re, markInputRule as Fe, mergeAttributes as V, Node as Y, textblockTypeInputRule as sn, wrappingInputRule as We, nodeInputRule as qs, canInsertNode as Us, isNodeSelection as Ws, Extension as An, callOrReturn as js, getExtensionField as _s } from "@tiptap/core";
9
- import { Underline as Gs } from "@tiptap/extension-underline";
10
- import { Color as Zs } from "@tiptap/extension-color";
11
- import { Highlight as Xs } from "@tiptap/extension-highlight";
12
- import { Link as Qs } from "@tiptap/extension-link";
13
- import { TaskList as Ys } from "@tiptap/extension-task-list";
14
- import { TaskItem as eo } from "@tiptap/extension-task-item";
15
- import { TextAlign as to } from "@tiptap/extension-text-align";
16
- const st = {
4
+ import G, { forwardRef as wt, useState as re, useEffect as Te, createElement as tn, useRef as mt, useReducer as ys, useCallback as Q, useMemo as bs } from "react";
5
+ import { Globe as Jn, User as qn, Heading as Ur, Check as Wr, ListTodo as jr, ListOrdered as _r, List as Cn, AlignJustify as xs, AlignRight as ks, AlignCenter as Cs, AlignLeft as Gr, CornerDownLeft as Ss, Redo2 as As, Undo2 as Ts, Eraser as Un, Minus as vs, Quote as Ms, CodeSquare as ws, FileText as Es, Link2 as Ns, Highlighter as Zr, Palette as Xr, Code as Is, Underline as Os, Strikethrough as Ds, Italic as Ls, Bold as Ps, X as Rs, ZoomOut as Fs, ZoomIn as zs, Clock as Wn, CheckCircle as Bs, AlertCircle as Hs } from "lucide-react";
6
+ import { LazyMotion as $s, domAnimation as Vs, m as nn } from "framer-motion";
7
+ import { EditorProvider as Ks, useCurrentEditor as Qr } from "@tiptap/react";
8
+ import { Mark as et, markPasteRule as Re, markInputRule as Fe, mergeAttributes as V, Node as Y, textblockTypeInputRule as rn, wrappingInputRule as We, nodeInputRule as Js, canInsertNode as qs, isNodeSelection as Us, Extension as Sn, callOrReturn as Ws, getExtensionField as js } from "@tiptap/core";
9
+ import { Underline as _s } from "@tiptap/extension-underline";
10
+ import { Color as Gs } from "@tiptap/extension-color";
11
+ import { Highlight as Zs } from "@tiptap/extension-highlight";
12
+ import { Link as Xs } from "@tiptap/extension-link";
13
+ import { TaskList as Qs } from "@tiptap/extension-task-list";
14
+ import { TaskItem as Ys } from "@tiptap/extension-task-item";
15
+ import { TextAlign as eo } from "@tiptap/extension-text-align";
16
+ const jn = {
17
17
  brand: {
18
- primary: "#C14615",
19
- secondary: "#000000"
18
+ primary: {
19
+ 50: "#fef5f1",
20
+ 100: "#fde8e0",
21
+ 200: "#fbd5c7",
22
+ 300: "#f7b79f",
23
+ 400: "#f18d68",
24
+ 500: "#C14615",
25
+ 600: "#a83b11",
26
+ 700: "#8b2f0e",
27
+ 800: "#73260d",
28
+ 900: "#5f210c",
29
+ DEFAULT: "#C14615"
30
+ }
20
31
  },
21
32
  semantic: {
22
33
  secondary: "#000000",
@@ -40,6 +51,21 @@ const st = {
40
51
  800: "#1F2937",
41
52
  900: "#111827"
42
53
  }
54
+ },
55
+ palettes: {
56
+ secondary: {
57
+ 50: "#f9fafb",
58
+ 100: "#f3f4f6",
59
+ 200: "#e5e7eb",
60
+ 300: "#d1d5db",
61
+ 400: "#9ca3af",
62
+ 500: "#000000",
63
+ 600: "#000000",
64
+ 700: "#000000",
65
+ 800: "#000000",
66
+ 900: "#000000",
67
+ DEFAULT: "#000000"
68
+ }
43
69
  }
44
70
  }, iu = {
45
71
  xs: "0.25rem",
@@ -109,13 +135,13 @@ const st = {
109
135
  200: "#fbd5c7",
110
136
  300: "#f7b79f",
111
137
  400: "#f18d68",
112
- 500: st.brand.primary,
138
+ 500: jn.brand.primary,
113
139
  // #C14615
114
140
  600: "#a83b11",
115
141
  700: "#8b2f0e",
116
142
  800: "#73260d",
117
143
  900: "#5f210c",
118
- DEFAULT: st.brand.primary
144
+ DEFAULT: jn.brand.primary
119
145
  },
120
146
  secondary: {
121
147
  50: "#f9fafb",
@@ -123,23 +149,22 @@ const st = {
123
149
  200: "#e5e7eb",
124
150
  300: "#d1d5db",
125
151
  400: "#9ca3af",
126
- 500: st.brand.secondary,
127
- // #000000
152
+ 500: "#000000",
128
153
  600: "#000000",
129
154
  700: "#000000",
130
155
  800: "#000000",
131
156
  900: "#000000",
132
- DEFAULT: st.brand.secondary
157
+ DEFAULT: "#000000"
133
158
  }
134
159
  }
135
160
  };
136
161
  function lu({ children: n }) {
137
- return /* @__PURE__ */ h(as, { children: n });
162
+ return /* @__PURE__ */ h(ls, { children: n });
138
163
  }
139
164
  function au({ color: n = "primary", radius: e = "full", ...t }) {
140
165
  return /* @__PURE__ */ h(_, { color: n, radius: e, ...t });
141
166
  }
142
- function no(n, e) {
167
+ function to(n, e) {
143
168
  const t = n.icons, r = n.aliases || /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null);
144
169
  function s(o) {
145
170
  if (t[o]) return i[o] = [];
@@ -157,30 +182,30 @@ const Yr = Object.freeze({
157
182
  top: 0,
158
183
  width: 16,
159
184
  height: 16
160
- }), yt = Object.freeze({
185
+ }), gt = Object.freeze({
161
186
  rotate: 0,
162
187
  vFlip: !1,
163
188
  hFlip: !1
164
- }), Tn = Object.freeze({
189
+ }), An = Object.freeze({
165
190
  ...Yr,
166
- ...yt
167
- }), on = Object.freeze({
168
- ...Tn,
191
+ ...gt
192
+ }), sn = Object.freeze({
193
+ ...An,
169
194
  body: "",
170
195
  hidden: !1
171
196
  });
172
- function ro(n, e) {
197
+ function no(n, e) {
173
198
  const t = {};
174
199
  !n.hFlip != !e.hFlip && (t.hFlip = !0), !n.vFlip != !e.vFlip && (t.vFlip = !0);
175
200
  const r = ((n.rotate || 0) + (e.rotate || 0)) % 4;
176
201
  return r && (t.rotate = r), t;
177
202
  }
178
203
  function _n(n, e) {
179
- const t = ro(n, e);
180
- for (const r in on) r in yt ? r in n && !(r in t) && (t[r] = yt[r]) : r in e ? t[r] = e[r] : r in n && (t[r] = n[r]);
204
+ const t = no(n, e);
205
+ for (const r in sn) r in gt ? r in n && !(r in t) && (t[r] = gt[r]) : r in e ? t[r] = e[r] : r in n && (t[r] = n[r]);
181
206
  return t;
182
207
  }
183
- function io(n, e, t) {
208
+ function ro(n, e, t) {
184
209
  const r = n.icons, i = n.aliases || /* @__PURE__ */ Object.create(null);
185
210
  let s = {};
186
211
  function o(l) {
@@ -194,41 +219,41 @@ function ei(n, e) {
194
219
  n.not_found instanceof Array && n.not_found.forEach((i) => {
195
220
  e(i, null), t.push(i);
196
221
  });
197
- const r = no(n);
222
+ const r = to(n);
198
223
  for (const i in r) {
199
224
  const s = r[i];
200
- s && (e(i, io(n, i, s)), t.push(i));
225
+ s && (e(i, ro(n, i, s)), t.push(i));
201
226
  }
202
227
  return t;
203
228
  }
204
- const so = {
229
+ const io = {
205
230
  provider: "",
206
231
  aliases: {},
207
232
  not_found: {},
208
233
  ...Yr
209
234
  };
210
- function $t(n, e) {
235
+ function Ht(n, e) {
211
236
  for (const t in e) if (t in n && typeof n[t] != typeof e[t]) return !1;
212
237
  return !0;
213
238
  }
214
239
  function ti(n) {
215
240
  if (typeof n != "object" || n === null) return null;
216
241
  const e = n;
217
- if (typeof e.prefix != "string" || !n.icons || typeof n.icons != "object" || !$t(n, so)) return null;
242
+ if (typeof e.prefix != "string" || !n.icons || typeof n.icons != "object" || !Ht(n, io)) return null;
218
243
  const t = e.icons;
219
244
  for (const i in t) {
220
245
  const s = t[i];
221
- if (!i || typeof s.body != "string" || !$t(s, on)) return null;
246
+ if (!i || typeof s.body != "string" || !Ht(s, sn)) return null;
222
247
  }
223
248
  const r = e.aliases || /* @__PURE__ */ Object.create(null);
224
249
  for (const i in r) {
225
250
  const s = r[i], o = s.parent;
226
- if (!i || typeof o != "string" || !t[o] && !r[o] || !$t(s, on)) return null;
251
+ if (!i || typeof o != "string" || !t[o] && !r[o] || !Ht(s, sn)) return null;
227
252
  }
228
253
  return e;
229
254
  }
230
255
  const Gn = /* @__PURE__ */ Object.create(null);
231
- function oo(n, e) {
256
+ function so(n, e) {
232
257
  return {
233
258
  provider: n,
234
259
  prefix: e,
@@ -238,14 +263,14 @@ function oo(n, e) {
238
263
  }
239
264
  function ze(n, e) {
240
265
  const t = Gn[n] || (Gn[n] = /* @__PURE__ */ Object.create(null));
241
- return t[e] || (t[e] = oo(n, e));
266
+ return t[e] || (t[e] = so(n, e));
242
267
  }
243
268
  function ni(n, e) {
244
269
  return ti(e) ? ei(e, (t, r) => {
245
270
  r ? n.icons[t] = r : n.missing.add(t);
246
271
  }) : [];
247
272
  }
248
- function lo(n, e, t) {
273
+ function oo(n, e, t) {
249
274
  try {
250
275
  if (typeof t.body == "string")
251
276
  return n.icons[e] = { ...t }, !0;
@@ -253,7 +278,7 @@ function lo(n, e, t) {
253
278
  }
254
279
  return !1;
255
280
  }
256
- const ri = /^[a-z0-9]+(-[a-z0-9]+)*$/, Nt = (n, e, t, r = "") => {
281
+ const ri = /^[a-z0-9]+(-[a-z0-9]+)*$/, Et = (n, e, t, r = "") => {
257
282
  const i = n.split(":");
258
283
  if (n.slice(0, 1) === "@") {
259
284
  if (i.length < 2 || i.length > 3) return null;
@@ -266,7 +291,7 @@ const ri = /^[a-z0-9]+(-[a-z0-9]+)*$/, Nt = (n, e, t, r = "") => {
266
291
  prefix: a,
267
292
  name: l
268
293
  };
269
- return e && !ft(c) ? null : c;
294
+ return e && !ut(c) ? null : c;
270
295
  }
271
296
  const s = i[0], o = s.split("-");
272
297
  if (o.length > 1) {
@@ -275,7 +300,7 @@ const ri = /^[a-z0-9]+(-[a-z0-9]+)*$/, Nt = (n, e, t, r = "") => {
275
300
  prefix: o.shift(),
276
301
  name: o.join("-")
277
302
  };
278
- return e && !ft(l) ? null : l;
303
+ return e && !ut(l) ? null : l;
279
304
  }
280
305
  if (t && r === "") {
281
306
  const l = {
@@ -283,37 +308,37 @@ const ri = /^[a-z0-9]+(-[a-z0-9]+)*$/, Nt = (n, e, t, r = "") => {
283
308
  prefix: "",
284
309
  name: s
285
310
  };
286
- return e && !ft(l, t) ? null : l;
311
+ return e && !ut(l, t) ? null : l;
287
312
  }
288
313
  return null;
289
- }, ft = (n, e) => n ? !!((e && n.prefix === "" || n.prefix) && n.name) : !1;
314
+ }, ut = (n, e) => n ? !!((e && n.prefix === "" || n.prefix) && n.name) : !1;
290
315
  let je = !1;
291
316
  function ii(n) {
292
317
  return typeof n == "boolean" && (je = n), je;
293
318
  }
294
319
  function Zn(n) {
295
- const e = typeof n == "string" ? Nt(n, !0, je) : n;
320
+ const e = typeof n == "string" ? Et(n, !0, je) : n;
296
321
  if (e) {
297
322
  const t = ze(e.provider, e.prefix), r = e.name;
298
323
  return t.icons[r] || (t.missing.has(r) ? null : void 0);
299
324
  }
300
325
  }
301
- function ao(n, e) {
302
- const t = Nt(n, !0, je);
326
+ function lo(n, e) {
327
+ const t = Et(n, !0, je);
303
328
  if (!t) return !1;
304
329
  const r = ze(t.provider, t.prefix);
305
- return e ? lo(r, t.name, e) : (r.missing.add(t.name), !0);
330
+ return e ? oo(r, t.name, e) : (r.missing.add(t.name), !0);
306
331
  }
307
- function co(n, e) {
332
+ function ao(n, e) {
308
333
  if (typeof n != "object") return !1;
309
334
  if (typeof e != "string" && (e = n.provider || ""), je && !e && !n.prefix) {
310
335
  let i = !1;
311
336
  return ti(n) && (n.prefix = "", ei(n, (s, o) => {
312
- ao(s, o) && (i = !0);
337
+ lo(s, o) && (i = !0);
313
338
  })), i;
314
339
  }
315
340
  const t = n.prefix;
316
- if (!ft({
341
+ if (!ut({
317
342
  prefix: t,
318
343
  name: "a"
319
344
  })) return !1;
@@ -325,16 +350,16 @@ const si = Object.freeze({
325
350
  height: null
326
351
  }), oi = Object.freeze({
327
352
  ...si,
328
- ...yt
329
- }), uo = /(-?[0-9.]*[0-9]+[0-9.]*)/g, fo = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
353
+ ...gt
354
+ }), co = /(-?[0-9.]*[0-9]+[0-9.]*)/g, uo = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
330
355
  function Xn(n, e, t) {
331
356
  if (e === 1) return n;
332
357
  if (t = t || 100, typeof n == "number") return Math.ceil(n * e * t) / t;
333
358
  if (typeof n != "string") return n;
334
- const r = n.split(uo);
359
+ const r = n.split(co);
335
360
  if (r === null || !r.length) return n;
336
361
  const i = [];
337
- let s = r.shift(), o = fo.test(s);
362
+ let s = r.shift(), o = uo.test(s);
338
363
  for (; ; ) {
339
364
  if (o) {
340
365
  const l = parseFloat(s);
@@ -344,7 +369,7 @@ function Xn(n, e, t) {
344
369
  o = !o;
345
370
  }
346
371
  }
347
- function ho(n, e = "defs") {
372
+ function fo(n, e = "defs") {
348
373
  let t = "";
349
374
  const r = n.indexOf("<" + e);
350
375
  for (; r >= 0; ) {
@@ -359,17 +384,17 @@ function ho(n, e = "defs") {
359
384
  content: n
360
385
  };
361
386
  }
362
- function po(n, e) {
387
+ function ho(n, e) {
363
388
  return n ? "<defs>" + n + "</defs>" + e : e;
364
389
  }
365
- function mo(n, e, t) {
366
- const r = ho(n);
367
- return po(r.defs, e + r.content + t);
390
+ function po(n, e, t) {
391
+ const r = fo(n);
392
+ return ho(r.defs, e + r.content + t);
368
393
  }
369
- const go = (n) => n === "unset" || n === "undefined" || n === "none";
370
- function yo(n, e) {
394
+ const mo = (n) => n === "unset" || n === "undefined" || n === "none";
395
+ function go(n, e) {
371
396
  const t = {
372
- ...Tn,
397
+ ...An,
373
398
  ...n
374
399
  }, r = {
375
400
  ...oi,
@@ -397,13 +422,13 @@ function yo(n, e) {
397
422
  E = i.width / 2 + i.left, g.unshift("rotate(-90 " + E.toString() + " " + E.toString() + ")");
398
423
  break;
399
424
  }
400
- M % 2 === 1 && (i.left !== i.top && (E = i.left, i.left = i.top, i.top = E), i.width !== i.height && (E = i.width, i.width = i.height, i.height = E)), g.length && (s = mo(s, '<g transform="' + g.join(" ") + '">', "</g>"));
425
+ M % 2 === 1 && (i.left !== i.top && (E = i.left, i.left = i.top, i.top = E), i.width !== i.height && (E = i.width, i.width = i.height, i.height = E)), g.length && (s = po(s, '<g transform="' + g.join(" ") + '">', "</g>"));
401
426
  });
402
427
  const o = r.width, l = r.height, a = i.width, c = i.height;
403
428
  let u, f;
404
429
  o === null ? (f = l === null ? "1em" : l === "auto" ? c : l, u = Xn(f, a / c)) : (u = o === "auto" ? a : o, f = l === null ? Xn(u, c / a) : l === "auto" ? c : l);
405
430
  const d = {}, p = (m, g) => {
406
- go(g) || (d[m] = g.toString());
431
+ mo(g) || (d[m] = g.toString());
407
432
  };
408
433
  p("width", u), p("height", f);
409
434
  const y = [
@@ -418,27 +443,27 @@ function yo(n, e) {
418
443
  body: s
419
444
  };
420
445
  }
421
- const bo = /\sid="(\S+)"/g, xo = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
422
- let ko = 0;
423
- function So(n, e = xo) {
446
+ const yo = /\sid="(\S+)"/g, bo = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
447
+ let xo = 0;
448
+ function ko(n, e = bo) {
424
449
  const t = [];
425
450
  let r;
426
- for (; r = bo.exec(n); ) t.push(r[1]);
451
+ for (; r = yo.exec(n); ) t.push(r[1]);
427
452
  if (!t.length) return n;
428
453
  const i = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
429
454
  return t.forEach((s) => {
430
- const o = typeof e == "function" ? e(s) : e + (ko++).toString(), l = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
455
+ const o = typeof e == "function" ? e(s) : e + (xo++).toString(), l = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
431
456
  n = n.replace(new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"), "$1" + o + i + "$3");
432
457
  }), n = n.replace(new RegExp(i, "g"), ""), n;
433
458
  }
434
- const ln = /* @__PURE__ */ Object.create(null);
459
+ const on = /* @__PURE__ */ Object.create(null);
435
460
  function Co(n, e) {
436
- ln[n] = e;
461
+ on[n] = e;
437
462
  }
438
- function an(n) {
439
- return ln[n] || ln[""];
463
+ function ln(n) {
464
+ return on[n] || on[""];
440
465
  }
441
- function vn(n) {
466
+ function Tn(n) {
442
467
  let e;
443
468
  if (typeof n.resources == "string") e = [n.resources];
444
469
  else if (e = n.resources, !(e instanceof Array) || !e.length) return null;
@@ -453,26 +478,26 @@ function vn(n) {
453
478
  dataAfterTimeout: n.dataAfterTimeout !== !1
454
479
  };
455
480
  }
456
- const Mn = /* @__PURE__ */ Object.create(null), Be = ["https://api.simplesvg.com", "https://api.unisvg.com"], dt = [];
457
- for (; Be.length > 0; ) Be.length === 1 || Math.random() > 0.5 ? dt.push(Be.shift()) : dt.push(Be.pop());
458
- Mn[""] = vn({ resources: ["https://api.iconify.design"].concat(dt) });
459
- function Ao(n, e) {
460
- const t = vn(e);
461
- return t === null ? !1 : (Mn[n] = t, !0);
481
+ const vn = /* @__PURE__ */ Object.create(null), Be = ["https://api.simplesvg.com", "https://api.unisvg.com"], ft = [];
482
+ for (; Be.length > 0; ) Be.length === 1 || Math.random() > 0.5 ? ft.push(Be.shift()) : ft.push(Be.pop());
483
+ vn[""] = Tn({ resources: ["https://api.iconify.design"].concat(ft) });
484
+ function So(n, e) {
485
+ const t = Tn(e);
486
+ return t === null ? !1 : (vn[n] = t, !0);
462
487
  }
463
- function wn(n) {
464
- return Mn[n];
488
+ function Mn(n) {
489
+ return vn[n];
465
490
  }
466
- const To = () => {
491
+ const Ao = () => {
467
492
  let n;
468
493
  try {
469
494
  if (n = fetch, typeof n == "function") return n;
470
495
  } catch {
471
496
  }
472
497
  };
473
- let Qn = To();
474
- function vo(n, e) {
475
- const t = wn(n);
498
+ let Qn = Ao();
499
+ function To(n, e) {
500
+ const t = Mn(n);
476
501
  if (!t) return 0;
477
502
  let r;
478
503
  if (!t.maxURL) r = 0;
@@ -486,11 +511,11 @@ function vo(n, e) {
486
511
  }
487
512
  return r;
488
513
  }
489
- function Mo(n) {
514
+ function vo(n) {
490
515
  return n === 404;
491
516
  }
492
- const wo = (n, e, t) => {
493
- const r = [], i = vo(n, e), s = "icons";
517
+ const Mo = (n, e, t) => {
518
+ const r = [], i = To(n, e), s = "icons";
494
519
  let o = {
495
520
  type: s,
496
521
  provider: n,
@@ -506,19 +531,19 @@ const wo = (n, e, t) => {
506
531
  }, l = a.length), o.icons.push(a);
507
532
  }), r.push(o), r;
508
533
  };
509
- function Eo(n) {
534
+ function wo(n) {
510
535
  if (typeof n == "string") {
511
- const e = wn(n);
536
+ const e = Mn(n);
512
537
  if (e) return e.path;
513
538
  }
514
539
  return "/";
515
540
  }
516
- const No = (n, e, t) => {
541
+ const Eo = (n, e, t) => {
517
542
  if (!Qn) {
518
543
  t("abort", 424);
519
544
  return;
520
545
  }
521
- let r = Eo(e.provider);
546
+ let r = wo(e.provider);
522
547
  switch (e.type) {
523
548
  case "icons": {
524
549
  const s = e.prefix, l = e.icons.join(","), a = new URLSearchParams({ icons: l });
@@ -539,7 +564,7 @@ const No = (n, e, t) => {
539
564
  const o = s.status;
540
565
  if (o !== 200) {
541
566
  setTimeout(() => {
542
- t(Mo(o) ? "abort" : "next", o);
567
+ t(vo(o) ? "abort" : "next", o);
543
568
  });
544
569
  return;
545
570
  }
@@ -557,9 +582,9 @@ const No = (n, e, t) => {
557
582
  }).catch(() => {
558
583
  t("next", i);
559
584
  });
560
- }, Io = {
561
- prepare: wo,
562
- send: No
585
+ }, No = {
586
+ prepare: Mo,
587
+ send: Eo
563
588
  };
564
589
  function li(n, e) {
565
590
  n.forEach((t) => {
@@ -567,7 +592,7 @@ function li(n, e) {
567
592
  r && (t.loaderCallbacks = r.filter((i) => i.id !== e));
568
593
  });
569
594
  }
570
- function Oo(n) {
595
+ function Io(n) {
571
596
  n.pendingCallbacksFlag || (n.pendingCallbacksFlag = !0, setTimeout(() => {
572
597
  n.pendingCallbacksFlag = !1;
573
598
  const e = n.loaderCallbacks ? n.loaderCallbacks.slice(0) : [];
@@ -596,9 +621,9 @@ function Oo(n) {
596
621
  });
597
622
  }));
598
623
  }
599
- let Do = 0;
600
- function Lo(n, e, t) {
601
- const r = Do++, i = li.bind(null, t, r);
624
+ let Oo = 0;
625
+ function Do(n, e, t) {
626
+ const r = Oo++, i = li.bind(null, t, r);
602
627
  if (!e.pending.length) return i;
603
628
  const s = {
604
629
  id: r,
@@ -610,7 +635,7 @@ function Lo(n, e, t) {
610
635
  (o.loaderCallbacks || (o.loaderCallbacks = [])).push(s);
611
636
  }), i;
612
637
  }
613
- function Po(n) {
638
+ function Lo(n) {
614
639
  const e = {
615
640
  loaded: [],
616
641
  missing: [],
@@ -636,14 +661,14 @@ function Po(n) {
636
661
  u.push(f);
637
662
  }), e;
638
663
  }
639
- function Ro(n, e = !0, t = !1) {
664
+ function Po(n, e = !0, t = !1) {
640
665
  const r = [];
641
666
  return n.forEach((i) => {
642
- const s = typeof i == "string" ? Nt(i, e, t) : i;
667
+ const s = typeof i == "string" ? Et(i, e, t) : i;
643
668
  s && r.push(s);
644
669
  }), r;
645
670
  }
646
- const Fo = {
671
+ const Ro = {
647
672
  resources: [],
648
673
  index: 0,
649
674
  timeout: 2e3,
@@ -651,7 +676,7 @@ const Fo = {
651
676
  random: !1,
652
677
  dataAfterTimeout: !1
653
678
  };
654
- function zo(n, e, t, r) {
679
+ function Fo(n, e, t, r) {
655
680
  const i = n.resources.length, s = n.random ? Math.floor(Math.random() * i) : n.index;
656
681
  let o;
657
682
  if (n.random) {
@@ -751,7 +776,7 @@ function zo(n, e, t, r) {
751
776
  }
752
777
  function ai(n) {
753
778
  const e = {
754
- ...Fo,
779
+ ...Ro,
755
780
  ...n
756
781
  };
757
782
  let t = [];
@@ -759,7 +784,7 @@ function ai(n) {
759
784
  t = t.filter((l) => l().status === "pending");
760
785
  }
761
786
  function i(l, a, c) {
762
- const u = zo(e, l, a, (f, d) => {
787
+ const u = Fo(e, l, a, (f, d) => {
763
788
  r(), c && c(f, d);
764
789
  });
765
790
  return t.push(u), u;
@@ -779,33 +804,33 @@ function ai(n) {
779
804
  }
780
805
  function Yn() {
781
806
  }
782
- const Vt = /* @__PURE__ */ Object.create(null);
783
- function Bo(n) {
784
- if (!Vt[n]) {
785
- const e = wn(n);
807
+ const $t = /* @__PURE__ */ Object.create(null);
808
+ function zo(n) {
809
+ if (!$t[n]) {
810
+ const e = Mn(n);
786
811
  if (!e) return;
787
812
  const t = ai(e), r = {
788
813
  config: e,
789
814
  redundancy: t
790
815
  };
791
- Vt[n] = r;
816
+ $t[n] = r;
792
817
  }
793
- return Vt[n];
818
+ return $t[n];
794
819
  }
795
- function Ho(n, e, t) {
820
+ function Bo(n, e, t) {
796
821
  let r, i;
797
822
  if (typeof n == "string") {
798
- const s = an(n);
823
+ const s = ln(n);
799
824
  if (!s)
800
825
  return t(void 0, 424), Yn;
801
826
  i = s.send;
802
- const o = Bo(n);
827
+ const o = zo(n);
803
828
  o && (r = o.redundancy);
804
829
  } else {
805
- const s = vn(n);
830
+ const s = Tn(n);
806
831
  if (s) {
807
832
  r = ai(s);
808
- const o = n.resources ? n.resources[0] : "", l = an(o);
833
+ const o = n.resources ? n.resources[0] : "", l = ln(o);
809
834
  l && (i = l.send);
810
835
  }
811
836
  }
@@ -813,12 +838,12 @@ function Ho(n, e, t) {
813
838
  }
814
839
  function er() {
815
840
  }
816
- function $o(n) {
841
+ function Ho(n) {
817
842
  n.iconsLoaderFlag || (n.iconsLoaderFlag = !0, setTimeout(() => {
818
- n.iconsLoaderFlag = !1, Oo(n);
843
+ n.iconsLoaderFlag = !1, Io(n);
819
844
  }));
820
845
  }
821
- function Vo(n) {
846
+ function $o(n) {
822
847
  const e = [], t = [];
823
848
  return n.forEach((r) => {
824
849
  (r.match(ri) ? e : t).push(r);
@@ -842,7 +867,7 @@ function He(n, e, t) {
842
867
  } catch (i) {
843
868
  console.error(i);
844
869
  }
845
- r(), $o(n);
870
+ r(), Ho(n);
846
871
  }
847
872
  function tr(n, e) {
848
873
  n instanceof Promise ? n.then((t) => {
@@ -851,7 +876,7 @@ function tr(n, e) {
851
876
  e(null);
852
877
  }) : e(n);
853
878
  }
854
- function Ko(n, e) {
879
+ function Vo(n, e) {
855
880
  n.iconsToLoad ? n.iconsToLoad = n.iconsToLoad.concat(e).sort() : n.iconsToLoad = e, n.iconsQueueFlag || (n.iconsQueueFlag = !0, setTimeout(() => {
856
881
  n.iconsQueueFlag = !1;
857
882
  const { provider: t, prefix: r } = n, i = n.iconsToLoad;
@@ -876,22 +901,22 @@ function Ko(n, e) {
876
901
  });
877
902
  return;
878
903
  }
879
- const { valid: o, invalid: l } = Vo(i);
904
+ const { valid: o, invalid: l } = $o(i);
880
905
  if (l.length && He(n, l, null), !o.length) return;
881
- const a = r.match(ri) ? an(t) : null;
906
+ const a = r.match(ri) ? ln(t) : null;
882
907
  if (!a) {
883
908
  He(n, o, null);
884
909
  return;
885
910
  }
886
911
  a.prepare(t, r, o).forEach((u) => {
887
- Ho(t, u, (f) => {
912
+ Bo(t, u, (f) => {
888
913
  He(n, u.icons, f);
889
914
  });
890
915
  });
891
916
  }));
892
917
  }
893
- const Jo = (n, e) => {
894
- const t = Ro(n, !0, ii()), r = Po(t);
918
+ const Ko = (n, e) => {
919
+ const t = Po(n, !0, ii()), r = Lo(t);
895
920
  if (!r.pending.length) {
896
921
  let a = !0;
897
922
  return e && setTimeout(() => {
@@ -913,10 +938,10 @@ const Jo = (n, e) => {
913
938
  p.has(f) || (p.add(f), i[c][u].push(f));
914
939
  }), s.forEach((a) => {
915
940
  const c = i[a.provider][a.prefix];
916
- c.length && Ko(a, c);
917
- }), e ? Lo(e, r, s) : er;
941
+ c.length && Vo(a, c);
942
+ }), e ? Do(e, r, s) : er;
918
943
  };
919
- function qo(n, e) {
944
+ function Jo(n, e) {
920
945
  const t = { ...n };
921
946
  for (const r in e) {
922
947
  const i = e[r], s = typeof i;
@@ -924,9 +949,9 @@ function qo(n, e) {
924
949
  }
925
950
  return t;
926
951
  }
927
- const Uo = /[\s,]+/;
928
- function Wo(n, e) {
929
- e.split(Uo).forEach((t) => {
952
+ const qo = /[\s,]+/;
953
+ function Uo(n, e) {
954
+ e.split(qo).forEach((t) => {
930
955
  switch (t.trim()) {
931
956
  case "horizontal":
932
957
  n.hFlip = !0;
@@ -937,7 +962,7 @@ function Wo(n, e) {
937
962
  }
938
963
  });
939
964
  }
940
- function jo(n, e = 0) {
965
+ function Wo(n, e = 0) {
941
966
  const t = n.replace(/^-?[0-9.]*/, "");
942
967
  function r(i) {
943
968
  for (; i < 0; ) i += 4;
@@ -962,42 +987,42 @@ function jo(n, e = 0) {
962
987
  }
963
988
  return e;
964
989
  }
965
- function _o(n, e) {
990
+ function jo(n, e) {
966
991
  let t = n.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
967
992
  for (const r in e) t += " " + r + '="' + e[r] + '"';
968
993
  return '<svg xmlns="http://www.w3.org/2000/svg"' + t + ">" + n + "</svg>";
969
994
  }
970
- function Go(n) {
995
+ function _o(n) {
971
996
  return n.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
972
997
  }
973
- function Zo(n) {
974
- return "data:image/svg+xml," + Go(n);
998
+ function Go(n) {
999
+ return "data:image/svg+xml," + _o(n);
975
1000
  }
976
- function Xo(n) {
977
- return 'url("' + Zo(n) + '")';
1001
+ function Zo(n) {
1002
+ return 'url("' + Go(n) + '")';
978
1003
  }
979
1004
  let Ke;
980
- function Qo() {
1005
+ function Xo() {
981
1006
  try {
982
1007
  Ke = window.trustedTypes.createPolicy("iconify", { createHTML: (n) => n });
983
1008
  } catch {
984
1009
  Ke = null;
985
1010
  }
986
1011
  }
987
- function Yo(n) {
988
- return Ke === void 0 && Qo(), Ke ? Ke.createHTML(n) : n;
1012
+ function Qo(n) {
1013
+ return Ke === void 0 && Xo(), Ke ? Ke.createHTML(n) : n;
989
1014
  }
990
1015
  const ci = {
991
1016
  ...oi,
992
1017
  inline: !1
993
- }, el = {
1018
+ }, Yo = {
994
1019
  xmlns: "http://www.w3.org/2000/svg",
995
1020
  xmlnsXlink: "http://www.w3.org/1999/xlink",
996
1021
  "aria-hidden": !0,
997
1022
  role: "img"
998
- }, tl = {
1023
+ }, el = {
999
1024
  display: "inline-block"
1000
- }, cn = {
1025
+ }, an = {
1001
1026
  backgroundColor: "currentColor"
1002
1027
  }, ui = {
1003
1028
  backgroundColor: "transparent"
@@ -1006,8 +1031,8 @@ const ci = {
1006
1031
  Repeat: "no-repeat",
1007
1032
  Size: "100% 100%"
1008
1033
  }, rr = {
1009
- WebkitMask: cn,
1010
- mask: cn,
1034
+ WebkitMask: an,
1035
+ mask: an,
1011
1036
  background: ui
1012
1037
  };
1013
1038
  for (const n in rr) {
@@ -1015,19 +1040,19 @@ for (const n in rr) {
1015
1040
  for (const t in nr)
1016
1041
  e[n + t] = nr[t];
1017
1042
  }
1018
- const nl = {
1043
+ const tl = {
1019
1044
  ...ci,
1020
1045
  inline: !0
1021
1046
  };
1022
1047
  function ir(n) {
1023
1048
  return n + (n.match(/^[-0-9.]+$/) ? "px" : "");
1024
1049
  }
1025
- const rl = (n, e, t) => {
1026
- const r = e.inline ? nl : ci, i = qo(r, e), s = e.mode || "svg", o = {}, l = e.style || {}, a = {
1027
- ...s === "svg" ? el : {}
1050
+ const nl = (n, e, t) => {
1051
+ const r = e.inline ? tl : ci, i = Jo(r, e), s = e.mode || "svg", o = {}, l = e.style || {}, a = {
1052
+ ...s === "svg" ? Yo : {}
1028
1053
  };
1029
1054
  if (t) {
1030
- const g = Nt(t, !1, !0);
1055
+ const g = Et(t, !1, !0);
1031
1056
  if (g) {
1032
1057
  const b = ["iconify"], v = [
1033
1058
  "provider",
@@ -1067,7 +1092,7 @@ const rl = (n, e, t) => {
1067
1092
  break;
1068
1093
  // Flip as string: 'horizontal,vertical'
1069
1094
  case "flip":
1070
- typeof b == "string" && Wo(i, b);
1095
+ typeof b == "string" && Uo(i, b);
1071
1096
  break;
1072
1097
  // Color: copy to style
1073
1098
  case "color":
@@ -1075,7 +1100,7 @@ const rl = (n, e, t) => {
1075
1100
  break;
1076
1101
  // Rotation as string
1077
1102
  case "rotate":
1078
- typeof b == "string" ? i[g] = jo(b) : typeof b == "number" && (i[g] = b);
1103
+ typeof b == "string" ? i[g] = Wo(b) : typeof b == "number" && (i[g] = b);
1079
1104
  break;
1080
1105
  // Remove aria-hidden
1081
1106
  case "ariaHidden":
@@ -1087,7 +1112,7 @@ const rl = (n, e, t) => {
1087
1112
  r[g] === void 0 && (a[g] = b);
1088
1113
  }
1089
1114
  }
1090
- const c = yo(n, i), u = c.attributes;
1115
+ const c = go(n, i), u = c.attributes;
1091
1116
  if (i.inline && (o.verticalAlign = "-0.125em"), s === "svg") {
1092
1117
  a.style = {
1093
1118
  ...o,
@@ -1095,26 +1120,26 @@ const rl = (n, e, t) => {
1095
1120
  }, Object.assign(a, u);
1096
1121
  let g = 0, b = e.id;
1097
1122
  return typeof b == "string" && (b = b.replace(/-/g, "_")), a.dangerouslySetInnerHTML = {
1098
- __html: Yo(So(c.body, b ? () => b + "ID" + g++ : "iconifyReact"))
1099
- }, nn("svg", a);
1123
+ __html: Qo(ko(c.body, b ? () => b + "ID" + g++ : "iconifyReact"))
1124
+ }, tn("svg", a);
1100
1125
  }
1101
- const { body: f, width: d, height: p } = n, y = s === "mask" || (s === "bg" ? !1 : f.indexOf("currentColor") !== -1), m = _o(f, {
1126
+ const { body: f, width: d, height: p } = n, y = s === "mask" || (s === "bg" ? !1 : f.indexOf("currentColor") !== -1), m = jo(f, {
1102
1127
  ...u,
1103
1128
  width: d + "",
1104
1129
  height: p + ""
1105
1130
  });
1106
1131
  return a.style = {
1107
1132
  ...o,
1108
- "--svg": Xo(m),
1133
+ "--svg": Zo(m),
1109
1134
  width: ir(u.width),
1110
1135
  height: ir(u.height),
1111
- ...tl,
1112
- ...y ? cn : ui,
1136
+ ...el,
1137
+ ...y ? an : ui,
1113
1138
  ...l
1114
- }, nn("span", a);
1139
+ }, tn("span", a);
1115
1140
  };
1116
1141
  ii(!0);
1117
- Co("", Io);
1142
+ Co("", No);
1118
1143
  if (typeof document < "u" && typeof window < "u") {
1119
1144
  const n = window;
1120
1145
  if (n.IconifyPreload !== void 0) {
@@ -1124,7 +1149,7 @@ if (typeof document < "u" && typeof window < "u") {
1124
1149
  // Check if item is an object and not null/array
1125
1150
  (typeof r != "object" || r === null || r instanceof Array || // Check for 'icons' and 'prefix'
1126
1151
  typeof r.icons != "object" || typeof r.prefix != "string" || // Add icon set
1127
- !co(r)) && console.error(t);
1152
+ !ao(r)) && console.error(t);
1128
1153
  } catch {
1129
1154
  console.error(t);
1130
1155
  }
@@ -1139,7 +1164,7 @@ if (typeof document < "u" && typeof window < "u") {
1139
1164
  const i = e[t];
1140
1165
  if (typeof i != "object" || !i || i.resources === void 0)
1141
1166
  continue;
1142
- Ao(t, i) || console.error(r);
1167
+ So(t, i) || console.error(r);
1143
1168
  } catch {
1144
1169
  console.error(r);
1145
1170
  }
@@ -1192,7 +1217,7 @@ function fi(n) {
1192
1217
  data: m
1193
1218
  }))
1194
1219
  if (m === void 0) {
1195
- const g = Jo([y], u);
1220
+ const g = Ko([y], u);
1196
1221
  i({
1197
1222
  callback: g
1198
1223
  });
@@ -1202,35 +1227,35 @@ function fi(n) {
1202
1227
  e && u();
1203
1228
  }, [n.icon, e]);
1204
1229
  const { name: f, data: d } = o;
1205
- return d ? rl({
1206
- ...Tn,
1230
+ return d ? nl({
1231
+ ...An,
1207
1232
  ...d
1208
- }, n, f) : n.children ? n.children : n.fallback ? n.fallback : nn("span", {});
1233
+ }, n, f) : n.children ? n.children : n.fallback ? n.fallback : tn("span", {});
1209
1234
  }
1210
- Et((n, e) => fi({
1235
+ wt((n, e) => fi({
1211
1236
  ...n,
1212
1237
  _ref: e
1213
1238
  }));
1214
- Et((n, e) => fi({
1239
+ wt((n, e) => fi({
1215
1240
  inline: !0,
1216
1241
  ...n,
1217
1242
  _ref: e
1218
1243
  }));
1219
- const il = {
1244
+ const rl = {
1220
1245
  login: "Login",
1221
1246
  logout: "Logout",
1222
1247
  selectLanguage: "Select your language"
1223
1248
  };
1224
- function sl({
1249
+ function il({
1225
1250
  languages: n,
1226
1251
  selectedLanguage: e,
1227
1252
  onLanguageChange: t,
1228
1253
  label: r
1229
1254
  }) {
1230
1255
  return /* @__PURE__ */ h("div", { className: "flex items-center", children: /* @__PURE__ */ k("div", { className: "relative flex items-center", children: [
1231
- /* @__PURE__ */ h(qn, { className: "absolute left-3 w-5 h-5 pointer-events-none text-black" }),
1256
+ /* @__PURE__ */ h(Jn, { className: "absolute left-3 w-5 h-5 pointer-events-none text-black" }),
1232
1257
  /* @__PURE__ */ h(
1233
- Kn,
1258
+ Vn,
1234
1259
  {
1235
1260
  "data-testid": "language-select-desktop",
1236
1261
  "aria-label": r,
@@ -1242,12 +1267,20 @@ function sl({
1242
1267
  className: "min-w-40 hidden md:inline-flex",
1243
1268
  isDisabled: n.length === 0,
1244
1269
  placeholder: r,
1245
- startContent: /* @__PURE__ */ h(qn, { className: "w-5 h-5 text-black" }),
1246
- children: n.map((i) => /* @__PURE__ */ h(Jn, { textValue: i.label, "data-testid": `language-select-option-${i.code}`, children: i.label }, i.code))
1270
+ startContent: /* @__PURE__ */ h(Jn, { className: "w-5 h-5 text-black" }),
1271
+ children: n.map((i) => /* @__PURE__ */ h(
1272
+ Kn,
1273
+ {
1274
+ textValue: i.label,
1275
+ "data-testid": `language-select-option-${i.code}`,
1276
+ children: i.label
1277
+ },
1278
+ i.code
1279
+ ))
1247
1280
  }
1248
1281
  ),
1249
1282
  /* @__PURE__ */ h(
1250
- Kn,
1283
+ Vn,
1251
1284
  {
1252
1285
  "aria-label": r,
1253
1286
  "data-testid": "language-select-mobile",
@@ -1259,12 +1292,21 @@ function sl({
1259
1292
  className: "min-w-20 inline-flex md:hidden",
1260
1293
  isDisabled: n.length === 0,
1261
1294
  placeholder: e || "Language",
1262
- children: n.map((i) => /* @__PURE__ */ h(Jn, { className: "min-w-4", textValue: i.code.toUpperCase(), "data-testid": `language-select-option-mobile-${i.code}`, children: i.code.toUpperCase() }, i.code))
1295
+ children: n.map((i) => /* @__PURE__ */ h(
1296
+ Kn,
1297
+ {
1298
+ className: "min-w-4",
1299
+ textValue: i.code.toUpperCase(),
1300
+ "data-testid": `language-select-option-mobile-${i.code}`,
1301
+ children: i.code.toUpperCase()
1302
+ },
1303
+ i.code
1304
+ ))
1263
1305
  }
1264
1306
  )
1265
1307
  ] }) });
1266
1308
  }
1267
- function ol({
1309
+ function sl({
1268
1310
  isLoggedIn: n,
1269
1311
  onLogin: e,
1270
1312
  onLogout: t,
@@ -1277,7 +1319,7 @@ function ol({
1277
1319
  className: "px-2 py-1 w-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",
1278
1320
  onPress: t,
1279
1321
  children: [
1280
- /* @__PURE__ */ h(Un, { className: "inline w-5 h-5" }),
1322
+ /* @__PURE__ */ h(qn, { className: "inline w-5 h-5" }),
1281
1323
  /* @__PURE__ */ h("span", { className: "hidden md:inline", children: r.logout })
1282
1324
  ]
1283
1325
  }
@@ -1288,7 +1330,7 @@ function ol({
1288
1330
  className: "px-2 py-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",
1289
1331
  onPress: e,
1290
1332
  children: [
1291
- /* @__PURE__ */ h(Un, { className: "inline w-5 h-5" }),
1333
+ /* @__PURE__ */ h(qn, { className: "inline w-5 h-5" }),
1292
1334
  /* @__PURE__ */ h("span", { className: "hidden md:inline", children: r.login })
1293
1335
  ]
1294
1336
  }
@@ -1307,36 +1349,38 @@ function cu({
1307
1349
  labels: c = {},
1308
1350
  className: u
1309
1351
  }) {
1310
- const f = { ...il, ...c };
1311
- return /* @__PURE__ */ k("nav", { "data-testid": "navbar", className: Z("w-full px-4 md:px-8 py-4 bg-white border-b border-zinc-100 flex items-center justify-between", u), children: [
1312
- /* @__PURE__ */ h("div", { className: "flex items-center min-w-10", children: n && /* @__PURE__ */ h("a", { href: "/", className: "block", children: /* @__PURE__ */ h("img", { "data-testid": "navbar-logo", src: n, alt: "Logo", className: "h-8 max-w-28 md:max-w-40" }) }) }),
1313
- /* @__PURE__ */ k("div", { className: "flex items-center gap-2 md:gap-4", children: [
1314
- (l || e.length > 0) && /* @__PURE__ */ h(
1315
- sl,
1316
- {
1317
- languages: e,
1318
- selectedLanguage: t,
1319
- onLanguageChange: r,
1320
- label: f.selectLanguage
1321
- }
1352
+ const f = { ...rl, ...c };
1353
+ return /* @__PURE__ */ k(
1354
+ "nav",
1355
+ {
1356
+ "data-testid": "navbar",
1357
+ className: Z(
1358
+ "w-full px-4 md:px-8 py-4 bg-white border-b border-zinc-100 flex items-center justify-between",
1359
+ u
1322
1360
  ),
1323
- a && /* @__PURE__ */ h(
1324
- ol,
1325
- {
1326
- isLoggedIn: i,
1327
- onLogin: s,
1328
- onLogout: o,
1329
- labels: f
1330
- }
1331
- )
1332
- ] })
1333
- ] });
1361
+ children: [
1362
+ /* @__PURE__ */ h("div", { className: "flex items-center min-w-10", children: n && /* @__PURE__ */ h("a", { href: "/", className: "block", children: /* @__PURE__ */ h("img", { "data-testid": "navbar-logo", src: n, alt: "Logo", className: "h-8 max-w-28 md:max-w-40" }) }) }),
1363
+ /* @__PURE__ */ k("div", { className: "flex items-center gap-2 md:gap-4", children: [
1364
+ (l || e.length > 0) && /* @__PURE__ */ h(
1365
+ il,
1366
+ {
1367
+ languages: e,
1368
+ selectedLanguage: t,
1369
+ onLanguageChange: r,
1370
+ label: f.selectLanguage
1371
+ }
1372
+ ),
1373
+ a && /* @__PURE__ */ h(sl, { isLoggedIn: i, onLogin: s, onLogout: o, labels: f })
1374
+ ] })
1375
+ ]
1376
+ }
1377
+ );
1334
1378
  }
1335
- var Kt;
1336
- const ll = typeof document < "u" ? (Kt = G.useInsertionEffect) !== null && Kt !== void 0 ? Kt : G.useLayoutEffect : () => {
1379
+ var Vt;
1380
+ const ol = typeof document < "u" ? (Vt = G.useInsertionEffect) !== null && Vt !== void 0 ? Vt : G.useLayoutEffect : () => {
1337
1381
  };
1338
- function En(n, e, t) {
1339
- let [r, i] = re(n || e), s = gt(r), o = gt(n !== void 0), l = n !== void 0;
1382
+ function wn(n, e, t) {
1383
+ let [r, i] = re(n || e), s = mt(r), o = mt(n !== void 0), l = n !== void 0;
1340
1384
  Te(() => {
1341
1385
  let f = o.current;
1342
1386
  f !== l && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${f ? "controlled" : "uncontrolled"} to ${l ? "controlled" : "uncontrolled"}.`), o.current = l;
@@ -1344,10 +1388,10 @@ function En(n, e, t) {
1344
1388
  l
1345
1389
  ]);
1346
1390
  let a = l ? n : r;
1347
- ll(() => {
1391
+ ol(() => {
1348
1392
  s.current = a;
1349
1393
  });
1350
- let [, c] = bs(() => ({}), {}), u = Q((f, ...d) => {
1394
+ let [, c] = ys(() => ({}), {}), u = Q((f, ...d) => {
1351
1395
  let p = typeof f == "function" ? f(s.current) : f;
1352
1396
  Object.is(s.current, p) || (s.current = p, i(p), c(), t?.(p, ...d));
1353
1397
  }, [
@@ -1358,9 +1402,9 @@ function En(n, e, t) {
1358
1402
  u
1359
1403
  ];
1360
1404
  }
1361
- function al(n) {
1405
+ function ll(n) {
1362
1406
  return /* @__PURE__ */ h("svg", { ...n, fill: "none", stroke: "currentColor", strokeWidth: 2, viewBox: "0 0 24 24", children: /* @__PURE__ */ h(
1363
- rn.path,
1407
+ nn.path,
1364
1408
  {
1365
1409
  animate: { pathLength: 1 },
1366
1410
  d: "M5 13l4 4L19 7",
@@ -1376,7 +1420,7 @@ function al(n) {
1376
1420
  }
1377
1421
  ) });
1378
1422
  }
1379
- const cl = G.forwardRef(
1423
+ const al = G.forwardRef(
1380
1424
  ({
1381
1425
  color: n = "primary",
1382
1426
  stepsCount: e = 3,
@@ -1389,7 +1433,7 @@ const cl = G.forwardRef(
1389
1433
  className: a,
1390
1434
  ...c
1391
1435
  }, u) => {
1392
- const [f, d] = En(s, t, i), p = G.useMemo(() => {
1436
+ const [f, d] = wn(s, t, i), p = G.useMemo(() => {
1393
1437
  let y, m;
1394
1438
  const g = [
1395
1439
  "[--active-fg-color:hsl(var(--step-fg-color))]",
@@ -1434,92 +1478,120 @@ const cl = G.forwardRef(
1434
1478
  "data-testid": "stepper-root",
1435
1479
  ...c,
1436
1480
  children: [
1437
- r && /* @__PURE__ */ h("label", { className: "text-small text-default-foreground lg:text-medium font-light w-full me-3", "data-testid": "stepper-label", children: r }),
1481
+ r && /* @__PURE__ */ h(
1482
+ "label",
1483
+ {
1484
+ className: "text-small text-default-foreground lg:text-medium font-light w-full me-3",
1485
+ "data-testid": "stepper-label",
1486
+ children: r
1487
+ }
1488
+ ),
1438
1489
  /* @__PURE__ */ h("ol", { className: Z("flex flex-row flex-nowrap gap-x-3", p, a), "data-testid": "stepper-list", children: Array.from({ length: e })?.map((y, m) => {
1439
1490
  const g = f === m ? "active" : f < m ? "inactive" : "complete";
1440
- return /* @__PURE__ */ h("li", { className: "relative flex w-full items-center pr-12", "data-testid": `stepper-step-${m}`, children: /* @__PURE__ */ k(
1441
- "button",
1491
+ return /* @__PURE__ */ h(
1492
+ "li",
1442
1493
  {
1443
- "aria-current": g === "active" ? "step" : void 0,
1444
- className: Z(
1445
- "group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",
1446
- l
1447
- ),
1448
- onClick: () => d(m),
1449
- "data-testid": `stepper-step-btn-${m}`,
1450
- children: [
1451
- /* @__PURE__ */ h("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ h(Vs, { features: Ks, children: /* @__PURE__ */ h(rn.div, { animate: g, className: "relative", children: /* @__PURE__ */ h(
1452
- rn.div,
1453
- {
1454
- animate: g,
1455
- className: Z(
1456
- "border-medium text-large text-default-foreground relative flex h-[26px] w-[26px] items-center justify-center rounded-full font-semibold",
1494
+ className: "relative flex w-full items-center pr-12",
1495
+ "data-testid": `stepper-step-${m}`,
1496
+ children: /* @__PURE__ */ k(
1497
+ "button",
1498
+ {
1499
+ "aria-current": g === "active" ? "step" : void 0,
1500
+ className: Z(
1501
+ "group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",
1502
+ l
1503
+ ),
1504
+ onClick: () => d(m),
1505
+ "data-testid": `stepper-step-btn-${m}`,
1506
+ children: [
1507
+ /* @__PURE__ */ h("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ h($s, { features: Vs, children: /* @__PURE__ */ h(nn.div, { animate: g, className: "relative", children: /* @__PURE__ */ h(
1508
+ nn.div,
1457
1509
  {
1458
- "shadow-lg": g === "complete"
1459
- }
1460
- ),
1461
- initial: !1,
1462
- transition: { duration: 0.25 },
1463
- variants: {
1464
- inactive: {
1465
- backgroundColor: "transparent",
1466
- borderColor: "var(--inactive-border-color)",
1467
- color: "var(--inactive-color)"
1468
- },
1469
- active: {
1470
- backgroundColor: "transparent",
1471
- borderColor: "var(--active-border-color)",
1472
- color: "var(--active-color)"
1473
- },
1474
- complete: {
1475
- backgroundColor: "var(--complete-background-color)",
1476
- borderColor: "var(--complete-border-color)",
1477
- color: "var(--active-fg-color)"
1510
+ animate: g,
1511
+ className: Z(
1512
+ "border-medium text-large text-default-foreground relative flex h-[26px] w-[26px] items-center justify-center rounded-full font-semibold",
1513
+ {
1514
+ "shadow-lg": g === "complete"
1515
+ }
1516
+ ),
1517
+ initial: !1,
1518
+ transition: { duration: 0.25 },
1519
+ variants: {
1520
+ inactive: {
1521
+ backgroundColor: "transparent",
1522
+ borderColor: "var(--inactive-border-color)",
1523
+ color: "var(--inactive-color)"
1524
+ },
1525
+ active: {
1526
+ backgroundColor: "transparent",
1527
+ borderColor: "var(--active-border-color)",
1528
+ color: "var(--active-color)"
1529
+ },
1530
+ complete: {
1531
+ backgroundColor: "var(--complete-background-color)",
1532
+ borderColor: "var(--complete-border-color)",
1533
+ color: "var(--active-fg-color)"
1534
+ }
1535
+ },
1536
+ children: /* @__PURE__ */ h("div", { className: "flex items-center justify-center", children: g === "complete" ? /* @__PURE__ */ h(
1537
+ ll,
1538
+ {
1539
+ className: "h-5 w-5 text-(--active-fg-color)",
1540
+ "data-testid": `stepper-step-check-${m}`
1541
+ }
1542
+ ) : /* @__PURE__ */ h("span", {}) })
1478
1543
  }
1479
- },
1480
- children: /* @__PURE__ */ h("div", { className: "flex items-center justify-center", children: g === "complete" ? /* @__PURE__ */ h(al, { className: "h-5 w-5 text-(--active-fg-color)", "data-testid": `stepper-step-check-${m}` }) : /* @__PURE__ */ h("span", {}) })
1481
- }
1482
- ) }) }) }),
1483
- m < e - 1 && !o && /* @__PURE__ */ h(
1484
- "div",
1485
- {
1486
- "aria-hidden": "true",
1487
- className: "pointer-events-none absolute inset-x-0 left-[26px] w-[calc(100%-13px)] flex-none items-center",
1488
- style: {
1489
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1490
- // @ts-expect-error
1491
- "--idx": m
1492
- },
1493
- children: /* @__PURE__ */ h(
1544
+ ) }) }) }),
1545
+ m < e - 1 && !o && /* @__PURE__ */ h(
1494
1546
  "div",
1495
1547
  {
1496
- className: Z(
1497
- "bg-default-200 relative h-0.5 w-full transition-colors duration-300",
1498
- "after:absolute after:block after:h-full after:w-0 after:bg-(--active-border-color) after:transition-[width] after:duration-300 after:content-['']",
1548
+ "aria-hidden": "true",
1549
+ className: "pointer-events-none absolute inset-x-0 left-[26px] w-[calc(100%-13px)] flex-none items-center",
1550
+ style: {
1551
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1552
+ // @ts-expect-error
1553
+ "--idx": m
1554
+ },
1555
+ children: /* @__PURE__ */ h(
1556
+ "div",
1499
1557
  {
1500
- "after:w-full": m < f
1558
+ className: Z(
1559
+ "bg-default-200 relative h-0.5 w-full transition-colors duration-300",
1560
+ "after:absolute after:block after:h-full after:w-0 after:bg-(--active-border-color) after:transition-[width] after:duration-300 after:content-['']",
1561
+ {
1562
+ "after:w-full": m < f
1563
+ }
1564
+ )
1501
1565
  }
1502
1566
  )
1503
1567
  }
1504
1568
  )
1505
- }
1506
- )
1507
- ]
1569
+ ]
1570
+ },
1571
+ m
1572
+ )
1508
1573
  },
1509
1574
  m
1510
- ) }, m);
1575
+ );
1511
1576
  }) })
1512
1577
  ]
1513
1578
  }
1514
1579
  );
1515
1580
  }
1516
1581
  );
1517
- cl.displayName = "Stepper";
1582
+ al.displayName = "Stepper";
1518
1583
  function uu() {
1519
- return /* @__PURE__ */ k("footer", { "data-testid": "footer", className: "fixed left-0 bottom-0 w-full text-left p-4 bg-white font-inter font-light text-base text-zinc-500", children: [
1520
- "Powered by Veevart ® ",
1521
- (/* @__PURE__ */ new Date()).getFullYear()
1522
- ] });
1584
+ return /* @__PURE__ */ k(
1585
+ "footer",
1586
+ {
1587
+ "data-testid": "footer",
1588
+ className: "fixed left-0 bottom-0 w-full text-left p-4 bg-white font-inter font-light text-base text-zinc-500",
1589
+ children: [
1590
+ "Powered by Veevart ® ",
1591
+ (/* @__PURE__ */ new Date()).getFullYear()
1592
+ ]
1593
+ }
1594
+ );
1523
1595
  }
1524
1596
  function _e(n) {
1525
1597
  return typeof n == "string" ? n : n.type;
@@ -1538,7 +1610,7 @@ function fe({
1538
1610
  className: l
1539
1611
  }) {
1540
1612
  const a = s ? `${e} (${s})` : e;
1541
- return /* @__PURE__ */ h(ut, { content: a, children: /* @__PURE__ */ h(
1613
+ return /* @__PURE__ */ h(ct, { content: a, children: /* @__PURE__ */ h(
1542
1614
  _,
1543
1615
  {
1544
1616
  size: "sm",
@@ -1732,7 +1804,7 @@ const ae = {
1732
1804
  shortcut: "Mod-Shift-z",
1733
1805
  label: "Redo"
1734
1806
  }
1735
- }, ul = {
1807
+ }, cl = {
1736
1808
  1: "Heading 1",
1737
1809
  2: "Heading 2",
1738
1810
  3: "Heading 3",
@@ -1740,7 +1812,7 @@ const ae = {
1740
1812
  5: "Heading 5",
1741
1813
  6: "Heading 6"
1742
1814
  };
1743
- function fl({ editor: n, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: t = !1 }) {
1815
+ function ul({ editor: n, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: t = !1 }) {
1744
1816
  const [, r] = G.useState(0);
1745
1817
  G.useEffect(() => {
1746
1818
  const o = () => r((l) => l + 1);
@@ -1780,7 +1852,7 @@ function fl({ editor: n, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: t = !1 }) {
1780
1852
  Jr,
1781
1853
  {
1782
1854
  startContent: n.isActive("heading", { level: o }) ? /* @__PURE__ */ h(Wr, { size: 16 }) : /* @__PURE__ */ h("div", { className: "w-4" }),
1783
- children: ul[o]
1855
+ children: cl[o]
1784
1856
  },
1785
1857
  o
1786
1858
  ))
@@ -1788,7 +1860,7 @@ function fl({ editor: n, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: t = !1 }) {
1788
1860
  )
1789
1861
  ] });
1790
1862
  }
1791
- const Jt = {
1863
+ const Kt = {
1792
1864
  bulletList: {
1793
1865
  label: "Bullet List",
1794
1866
  icon: Cn
@@ -1802,7 +1874,7 @@ const Jt = {
1802
1874
  icon: jr
1803
1875
  }
1804
1876
  };
1805
- function dl({
1877
+ function fl({
1806
1878
  editor: n,
1807
1879
  types: e = ["bulletList", "orderedList", "taskList"],
1808
1880
  isDisabled: t = !1
@@ -1814,7 +1886,7 @@ function dl({
1814
1886
  n.off("selectionUpdate", l), n.off("transaction", l);
1815
1887
  };
1816
1888
  }, [n]);
1817
- const i = e.find((l) => n.isActive(l)), s = i ? Jt[i].icon : Cn;
1889
+ const i = e.find((l) => n.isActive(l)), s = i ? Kt[i].icon : Cn;
1818
1890
  return /* @__PURE__ */ k($r, { children: [
1819
1891
  /* @__PURE__ */ h(Vr, { children: /* @__PURE__ */ h(
1820
1892
  _,
@@ -1840,12 +1912,12 @@ function dl({
1840
1912
  c && c.execute({ editor: n });
1841
1913
  },
1842
1914
  children: e.map((l) => {
1843
- const a = Jt[l].icon;
1915
+ const a = Kt[l].icon;
1844
1916
  return /* @__PURE__ */ h(
1845
1917
  Jr,
1846
1918
  {
1847
1919
  startContent: /* @__PURE__ */ h(a, { size: 16 }),
1848
- children: Jt[l].label
1920
+ children: Kt[l].label
1849
1921
  },
1850
1922
  l
1851
1923
  );
@@ -1854,7 +1926,7 @@ function dl({
1854
1926
  )
1855
1927
  ] });
1856
1928
  }
1857
- function hl({ colors: n, selectedColor: e, onColorSelect: t, columns: r = 4 }) {
1929
+ function dl({ colors: n, selectedColor: e, onColorSelect: t, columns: r = 4 }) {
1858
1930
  return /* @__PURE__ */ h(
1859
1931
  "div",
1860
1932
  {
@@ -1883,7 +1955,7 @@ function hl({ colors: n, selectedColor: e, onColorSelect: t, columns: r = 4 }) {
1883
1955
  }
1884
1956
  );
1885
1957
  }
1886
- const pl = [
1958
+ const hl = [
1887
1959
  "#000000",
1888
1960
  // Black
1889
1961
  "#374151",
@@ -1908,7 +1980,7 @@ const pl = [
1908
1980
  // Orange 500
1909
1981
  "#A855F7"
1910
1982
  // Violet 500
1911
- ], ml = [
1983
+ ], pl = [
1912
1984
  "#FEF3C7",
1913
1985
  // Yellow light
1914
1986
  "#DBEAFE",
@@ -1934,7 +2006,7 @@ const pl = [
1934
2006
  "#BFDBFE"
1935
2007
  // Sky light
1936
2008
  ];
1937
- function qt(n) {
2009
+ function Jt(n) {
1938
2010
  return /^#([0-9A-F]{3}){1,2}$/i.test(n);
1939
2011
  }
1940
2012
  const z = {
@@ -1947,43 +2019,43 @@ const z = {
1947
2019
  // px per row
1948
2020
  toolbarHeight: 60
1949
2021
  // approximate toolbar height
1950
- }, gl = {
2022
+ }, ml = {
1951
2023
  // Inline marks
1952
- bold: Rs,
1953
- italic: Ps,
1954
- strike: Ls,
1955
- underline: Ds,
1956
- code: Os,
2024
+ bold: Ps,
2025
+ italic: Ls,
2026
+ strike: Ds,
2027
+ underline: Os,
2028
+ code: Is,
1957
2029
  textColor: Xr,
1958
2030
  highlight: Zr,
1959
- link: Is,
2031
+ link: Ns,
1960
2032
  // Block nodes
1961
- paragraph: Ns,
2033
+ paragraph: Es,
1962
2034
  heading: Ur,
1963
2035
  bulletList: Cn,
1964
2036
  orderedList: _r,
1965
2037
  taskList: jr,
1966
- codeBlock: Es,
1967
- blockquote: ws,
1968
- horizontalRule: Ms,
2038
+ codeBlock: ws,
2039
+ blockquote: Ms,
2040
+ horizontalRule: vs,
1969
2041
  // Utilities
1970
- clearMarks: Wn,
1971
- clearNodes: Wn,
1972
- undo: vs,
1973
- redo: Ts,
1974
- hardBreak: As,
2042
+ clearMarks: Un,
2043
+ clearNodes: Un,
2044
+ undo: Ts,
2045
+ redo: As,
2046
+ hardBreak: Ss,
1975
2047
  textAlign: Gr
1976
2048
  // Default, will be overridden in component
1977
- }, yl = {
2049
+ }, gl = {
1978
2050
  left: Gr,
1979
2051
  center: Cs,
1980
- right: Ss,
1981
- justify: ks
2052
+ right: ks,
2053
+ justify: xs
1982
2054
  };
1983
2055
  function xe(n) {
1984
- return gl[n];
2056
+ return ml[n];
1985
2057
  }
1986
- function bl({ value: n, onChange: e, onApply: t, placeholder: r = "#000000" }) {
2058
+ function yl({ value: n, onChange: e, onApply: t, placeholder: r = "#000000" }) {
1987
2059
  const [i, s] = re(""), o = (c) => {
1988
2060
  const u = c.target.value;
1989
2061
  e(u), i && s("");
@@ -1992,7 +2064,7 @@ function bl({ value: n, onChange: e, onApply: t, placeholder: r = "#000000" }) {
1992
2064
  s("Please enter a color");
1993
2065
  return;
1994
2066
  }
1995
- if (!qt(n)) {
2067
+ if (!Jt(n)) {
1996
2068
  s("Invalid hex color (e.g., #FF0000)");
1997
2069
  return;
1998
2070
  }
@@ -2001,7 +2073,7 @@ function bl({ value: n, onChange: e, onApply: t, placeholder: r = "#000000" }) {
2001
2073
  return /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2002
2074
  /* @__PURE__ */ k("div", { className: "flex gap-2", children: [
2003
2075
  /* @__PURE__ */ h(
2004
- cs,
2076
+ as,
2005
2077
  {
2006
2078
  type: "text",
2007
2079
  value: n,
@@ -2019,7 +2091,7 @@ function bl({ value: n, onChange: e, onApply: t, placeholder: r = "#000000" }) {
2019
2091
  "div",
2020
2092
  {
2021
2093
  className: "w-4 h-4 rounded border border-divider",
2022
- style: { backgroundColor: qt(n) ? n : "transparent" }
2094
+ style: { backgroundColor: Jt(n) ? n : "transparent" }
2023
2095
  }
2024
2096
  )
2025
2097
  }
@@ -2033,7 +2105,7 @@ function bl({ value: n, onChange: e, onApply: t, placeholder: r = "#000000" }) {
2033
2105
  isIconOnly: !0,
2034
2106
  onPress: l,
2035
2107
  "aria-label": "Apply custom color",
2036
- isDisabled: !n || !qt(n),
2108
+ isDisabled: !n || !Jt(n),
2037
2109
  children: /* @__PURE__ */ h(Wr, { size: 16 })
2038
2110
  }
2039
2111
  )
@@ -2042,7 +2114,7 @@ function bl({ value: n, onChange: e, onApply: t, placeholder: r = "#000000" }) {
2042
2114
  ] });
2043
2115
  }
2044
2116
  function or({ editor: n, type: e, allowCustomColor: t = !0, label: r, isDisabled: i = !1 }) {
2045
- const [s, o] = re(!1), [l, a] = re(""), c = e === "textColor" ? pl : ml, u = (m) => {
2117
+ const [s, o] = re(!1), [l, a] = re(""), c = e === "textColor" ? hl : pl, u = (m) => {
2046
2118
  const g = ae[e];
2047
2119
  g && g.execute({
2048
2120
  editor: n,
@@ -2057,8 +2129,8 @@ function or({ editor: n, type: e, allowCustomColor: t = !0, label: r, isDisabled
2057
2129
  config: { type: e, color: "" }
2058
2130
  }), o(!1);
2059
2131
  }, p = e === "textColor" ? n.isActive("textStyle") : n.isActive("highlight");
2060
- return /* @__PURE__ */ k(us, { isOpen: s, onOpenChange: o, placement: "bottom", showArrow: !0, children: [
2061
- /* @__PURE__ */ h(fs, { children: /* @__PURE__ */ h(
2132
+ return /* @__PURE__ */ k(cs, { isOpen: s, onOpenChange: o, placement: "bottom", showArrow: !0, children: [
2133
+ /* @__PURE__ */ h(us, { children: /* @__PURE__ */ h(
2062
2134
  _,
2063
2135
  {
2064
2136
  size: "sm",
@@ -2071,7 +2143,7 @@ function or({ editor: n, type: e, allowCustomColor: t = !0, label: r, isDisabled
2071
2143
  children: /* @__PURE__ */ h(e === "textColor" ? Xr : Zr, { size: 16 })
2072
2144
  }
2073
2145
  ) }),
2074
- /* @__PURE__ */ h(ds, { className: "w-64", children: /* @__PURE__ */ k("div", { className: "px-2 py-3 space-y-3", children: [
2146
+ /* @__PURE__ */ h(fs, { className: "w-64", children: /* @__PURE__ */ k("div", { className: "px-2 py-3 space-y-3", children: [
2075
2147
  /* @__PURE__ */ k("div", { className: "flex items-center justify-between", children: [
2076
2148
  /* @__PURE__ */ h("span", { className: "text-sm font-semibold", children: r }),
2077
2149
  /* @__PURE__ */ h(
@@ -2082,17 +2154,17 @@ function or({ editor: n, type: e, allowCustomColor: t = !0, label: r, isDisabled
2082
2154
  isIconOnly: !0,
2083
2155
  onPress: d,
2084
2156
  "aria-label": "Clear color",
2085
- children: /* @__PURE__ */ h(Fs, { size: 16 })
2157
+ children: /* @__PURE__ */ h(Rs, { size: 16 })
2086
2158
  }
2087
2159
  )
2088
2160
  ] }),
2089
- /* @__PURE__ */ h(hl, { colors: c, onColorSelect: u }),
2161
+ /* @__PURE__ */ h(dl, { colors: c, onColorSelect: u }),
2090
2162
  t && /* @__PURE__ */ k(ue, { children: [
2091
2163
  /* @__PURE__ */ h(Hr, {}),
2092
2164
  /* @__PURE__ */ k("div", { children: [
2093
2165
  /* @__PURE__ */ h("p", { className: "text-xs font-semibold mb-2 text-default-700", children: "Custom Color" }),
2094
2166
  /* @__PURE__ */ h(
2095
- bl,
2167
+ yl,
2096
2168
  {
2097
2169
  value: l,
2098
2170
  onChange: a,
@@ -2104,7 +2176,7 @@ function or({ editor: n, type: e, allowCustomColor: t = !0, label: r, isDisabled
2104
2176
  ] }) })
2105
2177
  ] });
2106
2178
  }
2107
- function xl({
2179
+ function bl({
2108
2180
  zoom: n,
2109
2181
  onZoomChange: e,
2110
2182
  min: t = z.min,
@@ -2121,7 +2193,7 @@ function xl({
2121
2193
  e(z.default);
2122
2194
  }, a = n <= t, c = n >= r, u = n === z.default;
2123
2195
  return /* @__PURE__ */ k("div", { className: "flex items-center gap-1", children: [
2124
- /* @__PURE__ */ h(ut, { content: "Zoom out", children: /* @__PURE__ */ h(
2196
+ /* @__PURE__ */ h(ct, { content: "Zoom out", children: /* @__PURE__ */ h(
2125
2197
  _,
2126
2198
  {
2127
2199
  size: "sm",
@@ -2132,10 +2204,10 @@ function xl({
2132
2204
  isDisabled: a,
2133
2205
  onPress: s,
2134
2206
  "aria-label": "Zoom out",
2135
- children: /* @__PURE__ */ h(zs, { size: 16 })
2207
+ children: /* @__PURE__ */ h(Fs, { size: 16 })
2136
2208
  }
2137
2209
  ) }),
2138
- /* @__PURE__ */ h(ut, { content: u ? "Zoom percentage" : "Click to reset zoom", children: /* @__PURE__ */ k(
2210
+ /* @__PURE__ */ h(ct, { content: u ? "Zoom percentage" : "Click to reset zoom", children: /* @__PURE__ */ k(
2139
2211
  "button",
2140
2212
  {
2141
2213
  type: "button",
@@ -2152,7 +2224,7 @@ function xl({
2152
2224
  ]
2153
2225
  }
2154
2226
  ) }),
2155
- /* @__PURE__ */ h(ut, { content: "Zoom in", children: /* @__PURE__ */ h(
2227
+ /* @__PURE__ */ h(ct, { content: "Zoom in", children: /* @__PURE__ */ h(
2156
2228
  _,
2157
2229
  {
2158
2230
  size: "sm",
@@ -2163,16 +2235,16 @@ function xl({
2163
2235
  isDisabled: c,
2164
2236
  onPress: o,
2165
2237
  "aria-label": "Zoom in",
2166
- children: /* @__PURE__ */ h(Bs, { size: 16 })
2238
+ children: /* @__PURE__ */ h(zs, { size: 16 })
2167
2239
  }
2168
2240
  ) })
2169
2241
  ] });
2170
2242
  }
2171
- function kl({ children: n, id: e, label: t, className: r, useButtonGroup: i = !0 }) {
2172
- return i ? /* @__PURE__ */ h(hs, { size: "sm", id: e, "aria-label": t, className: r, children: n }) : /* @__PURE__ */ h("div", { id: e, role: "group", "aria-label": t, className: `flex items-center gap-2 ${r || ""}`, children: n });
2243
+ function xl({ children: n, id: e, label: t, className: r, useButtonGroup: i = !0 }) {
2244
+ return i ? /* @__PURE__ */ h(ds, { size: "sm", id: e, "aria-label": t, className: r, children: n }) : /* @__PURE__ */ h("div", { id: e, role: "group", "aria-label": t, className: `flex items-center gap-2 ${r || ""}`, children: n });
2173
2245
  }
2174
2246
  function di(n, e) {
2175
- const t = xs(() => {
2247
+ const t = bs(() => {
2176
2248
  if (!n)
2177
2249
  return {};
2178
2250
  const s = {};
@@ -2272,7 +2344,7 @@ function hi(n, e) {
2272
2344
  isActive: s
2273
2345
  };
2274
2346
  }
2275
- function Sl(n = z.default) {
2347
+ function kl(n = z.default) {
2276
2348
  const [e, t] = re(n), r = Q((l = z.step) => {
2277
2349
  t((a) => Math.min(z.max, a + l));
2278
2350
  }, []), i = Q((l = z.step) => {
@@ -2295,7 +2367,7 @@ function Sl(n = z.default) {
2295
2367
  };
2296
2368
  }
2297
2369
  const Cl = ["bold", "italic", "strike", "underline", "code"];
2298
- function Al({ editor: n, modifiers: e, onToolbarAction: t }) {
2370
+ function Sl({ editor: n, modifiers: e, onToolbarAction: t }) {
2299
2371
  const r = di(n, e), { toggleModifier: i } = hi(n, t);
2300
2372
  if (!n) return null;
2301
2373
  const s = e.map((o) => _e(o)).filter(
@@ -2304,7 +2376,7 @@ function Al({ editor: n, modifiers: e, onToolbarAction: t }) {
2304
2376
  Cl.includes(o)
2305
2377
  )
2306
2378
  );
2307
- return s.length === 0 ? null : /* @__PURE__ */ h(kl, { id: "text-formatting", label: "Text formatting", children: s.map((o) => {
2379
+ return s.length === 0 ? null : /* @__PURE__ */ h(xl, { id: "text-formatting", label: "Text formatting", children: s.map((o) => {
2308
2380
  const l = r[o], a = xe(o);
2309
2381
  return /* @__PURE__ */ h(
2310
2382
  fe,
@@ -2319,7 +2391,7 @@ function Al({ editor: n, modifiers: e, onToolbarAction: t }) {
2319
2391
  );
2320
2392
  }) });
2321
2393
  }
2322
- function Tl({
2394
+ function Al({
2323
2395
  editor: n,
2324
2396
  modifiers: e,
2325
2397
  zoom: t = 100,
@@ -2334,7 +2406,7 @@ function Tl({
2334
2406
  return /* @__PURE__ */ h("div", { className: `w-full p-2 bg-background border-b border-divider ${i ? "sticky top-0 z-10" : ""} ${s || ""}`, children: /* @__PURE__ */ k("div", { className: "flex flex-row flex-wrap gap-2 w-full items-center", children: [
2335
2407
  f && /* @__PURE__ */ k(ue, { children: [
2336
2408
  /* @__PURE__ */ h(
2337
- Al,
2409
+ Sl,
2338
2410
  {
2339
2411
  editor: n,
2340
2412
  modifiers: e,
@@ -2367,12 +2439,12 @@ function Tl({
2367
2439
  (p || y || m || g || b || v || M || E || D) && /* @__PURE__ */ h(be, {})
2368
2440
  ] }),
2369
2441
  p && /* @__PURE__ */ k(ue, { children: [
2370
- /* @__PURE__ */ h(fl, { editor: n }),
2442
+ /* @__PURE__ */ h(ul, { editor: n }),
2371
2443
  (y || m || g || b || v || M || E || D) && /* @__PURE__ */ h(be, {})
2372
2444
  ] }),
2373
2445
  y && /* @__PURE__ */ k(ue, { children: [
2374
2446
  /* @__PURE__ */ h("div", { className: "flex items-center gap-1", children: ["left", "center", "right", "justify"].map((x) => {
2375
- const H = yl[x], q = n.isActive({ textAlign: x });
2447
+ const H = gl[x], q = n.isActive({ textAlign: x });
2376
2448
  return /* @__PURE__ */ h(
2377
2449
  fe,
2378
2450
  {
@@ -2392,7 +2464,7 @@ function Tl({
2392
2464
  ] }),
2393
2465
  m && /* @__PURE__ */ k(ue, { children: [
2394
2466
  /* @__PURE__ */ h(
2395
- dl,
2467
+ fl,
2396
2468
  {
2397
2469
  editor: n,
2398
2470
  types: u.filter(
@@ -2472,7 +2544,7 @@ function Tl({
2472
2544
  D && /* @__PURE__ */ h(be, {})
2473
2545
  ] }),
2474
2546
  D && /* @__PURE__ */ h(
2475
- xl,
2547
+ bl,
2476
2548
  {
2477
2549
  zoom: t,
2478
2550
  onZoomChange: (x) => {
@@ -2482,7 +2554,7 @@ function Tl({
2482
2554
  )
2483
2555
  ] }) });
2484
2556
  }
2485
- const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, wl = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, El = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Nl = et.create({
2557
+ const Tl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Ml = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, wl = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, El = et.create({
2486
2558
  name: "bold",
2487
2559
  addOptions() {
2488
2560
  return {
@@ -2527,11 +2599,11 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2527
2599
  addInputRules() {
2528
2600
  return [
2529
2601
  Fe({
2530
- find: vl,
2602
+ find: Tl,
2531
2603
  type: this.type
2532
2604
  }),
2533
2605
  Fe({
2534
- find: wl,
2606
+ find: Ml,
2535
2607
  type: this.type
2536
2608
  })
2537
2609
  ];
@@ -2539,16 +2611,16 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2539
2611
  addPasteRules() {
2540
2612
  return [
2541
2613
  Re({
2542
- find: Ml,
2614
+ find: vl,
2543
2615
  type: this.type
2544
2616
  }),
2545
2617
  Re({
2546
- find: El,
2618
+ find: wl,
2547
2619
  type: this.type
2548
2620
  })
2549
2621
  ];
2550
2622
  }
2551
- }), Il = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Ol = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Dl = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Ll = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Pl = et.create({
2623
+ }), Nl = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Il = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Ol = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Dl = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Ll = et.create({
2552
2624
  name: "italic",
2553
2625
  addOptions() {
2554
2626
  return {
@@ -2592,11 +2664,11 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2592
2664
  addInputRules() {
2593
2665
  return [
2594
2666
  Fe({
2595
- find: Il,
2667
+ find: Nl,
2596
2668
  type: this.type
2597
2669
  }),
2598
2670
  Fe({
2599
- find: Dl,
2671
+ find: Ol,
2600
2672
  type: this.type
2601
2673
  })
2602
2674
  ];
@@ -2604,16 +2676,16 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2604
2676
  addPasteRules() {
2605
2677
  return [
2606
2678
  Re({
2607
- find: Ol,
2679
+ find: Il,
2608
2680
  type: this.type
2609
2681
  }),
2610
2682
  Re({
2611
- find: Ll,
2683
+ find: Dl,
2612
2684
  type: this.type
2613
2685
  })
2614
2686
  ];
2615
2687
  }
2616
- }), Rl = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, Fl = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, zl = et.create({
2688
+ }), Pl = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, Rl = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, Fl = et.create({
2617
2689
  name: "strike",
2618
2690
  addOptions() {
2619
2691
  return {
@@ -2656,7 +2728,7 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2656
2728
  addInputRules() {
2657
2729
  return [
2658
2730
  Fe({
2659
- find: Rl,
2731
+ find: Pl,
2660
2732
  type: this.type
2661
2733
  })
2662
2734
  ];
@@ -2664,12 +2736,12 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2664
2736
  addPasteRules() {
2665
2737
  return [
2666
2738
  Re({
2667
- find: Fl,
2739
+ find: Rl,
2668
2740
  type: this.type
2669
2741
  })
2670
2742
  ];
2671
2743
  }
2672
- }), Bl = /(^|[^`])`([^`]+)`(?!`)/, Hl = /(^|[^`])`([^`]+)`(?!`)/g, $l = et.create({
2744
+ }), zl = /(^|[^`])`([^`]+)`(?!`)/, Bl = /(^|[^`])`([^`]+)`(?!`)/g, Hl = et.create({
2673
2745
  name: "code",
2674
2746
  addOptions() {
2675
2747
  return {
@@ -2702,7 +2774,7 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2702
2774
  addInputRules() {
2703
2775
  return [
2704
2776
  Fe({
2705
- find: Bl,
2777
+ find: zl,
2706
2778
  type: this.type
2707
2779
  })
2708
2780
  ];
@@ -2710,12 +2782,12 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2710
2782
  addPasteRules() {
2711
2783
  return [
2712
2784
  Re({
2713
- find: Hl,
2785
+ find: Bl,
2714
2786
  type: this.type
2715
2787
  })
2716
2788
  ];
2717
2789
  }
2718
- }), Vl = (n) => {
2790
+ }), $l = (n) => {
2719
2791
  if (!n.children.length)
2720
2792
  return;
2721
2793
  const e = n.querySelectorAll("span");
@@ -2724,7 +2796,7 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2724
2796
  const s = t.getAttribute("style"), o = (i = (r = t.parentElement) === null || r === void 0 ? void 0 : r.closest("span")) === null || i === void 0 ? void 0 : i.getAttribute("style");
2725
2797
  t.setAttribute("style", `${o};${s}`);
2726
2798
  });
2727
- }, Kl = et.create({
2799
+ }, Vl = et.create({
2728
2800
  name: "textStyle",
2729
2801
  priority: 101,
2730
2802
  addOptions() {
@@ -2737,7 +2809,7 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2737
2809
  return [
2738
2810
  {
2739
2811
  tag: "span",
2740
- getAttrs: (n) => n.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && Vl(n), {}) : !1
2812
+ getAttrs: (n) => n.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && $l(n), {}) : !1
2741
2813
  }
2742
2814
  ];
2743
2815
  },
@@ -2756,7 +2828,7 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2756
2828
  }
2757
2829
  };
2758
2830
  }
2759
- }), Jl = Y.create({
2831
+ }), Kl = Y.create({
2760
2832
  name: "heading",
2761
2833
  addOptions() {
2762
2834
  return {
@@ -2797,7 +2869,7 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2797
2869
  }), {});
2798
2870
  },
2799
2871
  addInputRules() {
2800
- return this.options.levels.map((n) => sn({
2872
+ return this.options.levels.map((n) => rn({
2801
2873
  find: new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),
2802
2874
  type: this.type,
2803
2875
  getAttributes: {
@@ -2805,7 +2877,7 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2805
2877
  }
2806
2878
  }));
2807
2879
  }
2808
- }), pi = Y.create({
2880
+ }), Jl = Y.create({
2809
2881
  name: "paragraph",
2810
2882
  priority: 1e3,
2811
2883
  addOptions() {
@@ -2976,7 +3048,7 @@ const vl = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ml = /(?:^|\s
2976
3048
  };
2977
3049
  }
2978
3050
  });
2979
- function mi(n, e, t) {
3051
+ function pi(n, e, t) {
2980
3052
  for (let r = 0; ; r++) {
2981
3053
  if (r == n.childCount || r == e.childCount)
2982
3054
  return n.childCount == e.childCount ? null : t;
@@ -2993,14 +3065,14 @@ function mi(n, e, t) {
2993
3065
  return t;
2994
3066
  }
2995
3067
  if (i.content.size || s.content.size) {
2996
- let o = mi(i.content, s.content, t + 1);
3068
+ let o = pi(i.content, s.content, t + 1);
2997
3069
  if (o != null)
2998
3070
  return o;
2999
3071
  }
3000
3072
  t += i.nodeSize;
3001
3073
  }
3002
3074
  }
3003
- function gi(n, e, t, r) {
3075
+ function mi(n, e, t, r) {
3004
3076
  for (let i = n.childCount, s = e.childCount; ; ) {
3005
3077
  if (i == 0 || s == 0)
3006
3078
  return i == s ? null : { a: t, b: r };
@@ -3018,14 +3090,14 @@ function gi(n, e, t, r) {
3018
3090
  return { a: t, b: r };
3019
3091
  }
3020
3092
  if (o.content.size || l.content.size) {
3021
- let c = gi(o.content, l.content, t - 1, r - 1);
3093
+ let c = mi(o.content, l.content, t - 1, r - 1);
3022
3094
  if (c)
3023
3095
  return c;
3024
3096
  }
3025
3097
  t -= a, r -= a;
3026
3098
  }
3027
3099
  }
3028
- class S {
3100
+ class C {
3029
3101
  /**
3030
3102
  @internal
3031
3103
  */
@@ -3080,7 +3152,7 @@ class S {
3080
3152
  let t = this.lastChild, r = e.firstChild, i = this.content.slice(), s = 0;
3081
3153
  for (t.isText && t.sameMarkup(r) && (i[i.length - 1] = t.withText(t.text + r.text), s = 1); s < e.content.length; s++)
3082
3154
  i.push(e.content[s]);
3083
- return new S(i, this.size + e.size);
3155
+ return new C(i, this.size + e.size);
3084
3156
  }
3085
3157
  /**
3086
3158
  Cut out the sub-fragment between the two given positions.
@@ -3094,13 +3166,13 @@ class S {
3094
3166
  let l = this.content[s], a = o + l.nodeSize;
3095
3167
  a > e && ((o < e || a > t) && (l.isText ? l = l.cut(Math.max(0, e - o), Math.min(l.text.length, t - o)) : l = l.cut(Math.max(0, e - o - 1), Math.min(l.content.size, t - o - 1))), r.push(l), i += l.nodeSize), o = a;
3096
3168
  }
3097
- return new S(r, i);
3169
+ return new C(r, i);
3098
3170
  }
3099
3171
  /**
3100
3172
  @internal
3101
3173
  */
3102
3174
  cutByIndex(e, t) {
3103
- return e == t ? S.empty : e == 0 && t == this.content.length ? this : new S(this.content.slice(e, t));
3175
+ return e == t ? C.empty : e == 0 && t == this.content.length ? this : new C(this.content.slice(e, t));
3104
3176
  }
3105
3177
  /**
3106
3178
  Create a new fragment in which the node at the given index is
@@ -3111,21 +3183,21 @@ class S {
3111
3183
  if (r == t)
3112
3184
  return this;
3113
3185
  let i = this.content.slice(), s = this.size + t.nodeSize - r.nodeSize;
3114
- return i[e] = t, new S(i, s);
3186
+ return i[e] = t, new C(i, s);
3115
3187
  }
3116
3188
  /**
3117
3189
  Create a new fragment by prepending the given node to this
3118
3190
  fragment.
3119
3191
  */
3120
3192
  addToStart(e) {
3121
- return new S([e].concat(this.content), this.size + e.nodeSize);
3193
+ return new C([e].concat(this.content), this.size + e.nodeSize);
3122
3194
  }
3123
3195
  /**
3124
3196
  Create a new fragment by appending the given node to this
3125
3197
  fragment.
3126
3198
  */
3127
3199
  addToEnd(e) {
3128
- return new S(this.content.concat(e), this.size + e.nodeSize);
3200
+ return new C(this.content.concat(e), this.size + e.nodeSize);
3129
3201
  }
3130
3202
  /**
3131
3203
  Compare this fragment to another one.
@@ -3187,7 +3259,7 @@ class S {
3187
3259
  fragment differ, or `null` if they are the same.
3188
3260
  */
3189
3261
  findDiffStart(e, t = 0) {
3190
- return mi(this, e, t);
3262
+ return pi(this, e, t);
3191
3263
  }
3192
3264
  /**
3193
3265
  Find the first position, searching from the end, at which this
@@ -3196,7 +3268,7 @@ class S {
3196
3268
  nodes, an object with two separate positions is returned.
3197
3269
  */
3198
3270
  findDiffEnd(e, t = this.size, r = e.size) {
3199
- return gi(this, e, t, r);
3271
+ return mi(this, e, t, r);
3200
3272
  }
3201
3273
  /**
3202
3274
  Find the index and inner offset corresponding to a given relative
@@ -3205,15 +3277,15 @@ class S {
3205
3277
  */
3206
3278
  findIndex(e) {
3207
3279
  if (e == 0)
3208
- return ot(0, e);
3280
+ return st(0, e);
3209
3281
  if (e == this.size)
3210
- return ot(this.content.length, e);
3282
+ return st(this.content.length, e);
3211
3283
  if (e > this.size || e < 0)
3212
3284
  throw new RangeError(`Position ${e} outside of fragment (${this})`);
3213
3285
  for (let t = 0, r = 0; ; t++) {
3214
3286
  let i = this.child(t), s = r + i.nodeSize;
3215
3287
  if (s >= e)
3216
- return s == e ? ot(t + 1, s) : ot(t, r);
3288
+ return s == e ? st(t + 1, s) : st(t, r);
3217
3289
  r = s;
3218
3290
  }
3219
3291
  }
@@ -3240,10 +3312,10 @@ class S {
3240
3312
  */
3241
3313
  static fromJSON(e, t) {
3242
3314
  if (!t)
3243
- return S.empty;
3315
+ return C.empty;
3244
3316
  if (!Array.isArray(t))
3245
3317
  throw new RangeError("Invalid input for Fragment.fromJSON");
3246
- return new S(t.map(e.nodeFromJSON));
3318
+ return new C(t.map(e.nodeFromJSON));
3247
3319
  }
3248
3320
  /**
3249
3321
  Build a fragment from an array of nodes. Ensures that adjacent
@@ -3251,13 +3323,13 @@ class S {
3251
3323
  */
3252
3324
  static fromArray(e) {
3253
3325
  if (!e.length)
3254
- return S.empty;
3326
+ return C.empty;
3255
3327
  let t, r = 0;
3256
3328
  for (let i = 0; i < e.length; i++) {
3257
3329
  let s = e[i];
3258
3330
  r += s.nodeSize, i && s.isText && e[i - 1].sameMarkup(s) ? (t || (t = e.slice(0, i)), t[t.length - 1] = s.withText(t[t.length - 1].text + s.text)) : t && t.push(s);
3259
3331
  }
3260
- return new S(t || e, r);
3332
+ return new C(t || e, r);
3261
3333
  }
3262
3334
  /**
3263
3335
  Create a fragment from something that can be interpreted as a
@@ -3267,22 +3339,22 @@ class S {
3267
3339
  */
3268
3340
  static from(e) {
3269
3341
  if (!e)
3270
- return S.empty;
3271
- if (e instanceof S)
3342
+ return C.empty;
3343
+ if (e instanceof C)
3272
3344
  return e;
3273
3345
  if (Array.isArray(e))
3274
3346
  return this.fromArray(e);
3275
3347
  if (e.attrs)
3276
- return new S([e], e.nodeSize);
3348
+ return new C([e], e.nodeSize);
3277
3349
  throw new RangeError("Can not convert " + e + " to a Fragment" + (e.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
3278
3350
  }
3279
3351
  }
3280
- S.empty = new S([], 0);
3281
- const Ut = { index: 0, offset: 0 };
3282
- function ot(n, e) {
3283
- return Ut.index = n, Ut.offset = e, Ut;
3352
+ C.empty = new C([], 0);
3353
+ const qt = { index: 0, offset: 0 };
3354
+ function st(n, e) {
3355
+ return qt.index = n, qt.offset = e, qt;
3284
3356
  }
3285
- function un(n, e) {
3357
+ function cn(n, e) {
3286
3358
  if (n === e)
3287
3359
  return !0;
3288
3360
  if (!(n && typeof n == "object") || !(e && typeof e == "object"))
@@ -3294,11 +3366,11 @@ function un(n, e) {
3294
3366
  if (n.length != e.length)
3295
3367
  return !1;
3296
3368
  for (let r = 0; r < n.length; r++)
3297
- if (!un(n[r], e[r]))
3369
+ if (!cn(n[r], e[r]))
3298
3370
  return !1;
3299
3371
  } else {
3300
3372
  for (let r in n)
3301
- if (!(r in e) || !un(n[r], e[r]))
3373
+ if (!(r in e) || !cn(n[r], e[r]))
3302
3374
  return !1;
3303
3375
  for (let r in e)
3304
3376
  if (!(r in n))
@@ -3360,7 +3432,7 @@ class j {
3360
3432
  another mark.
3361
3433
  */
3362
3434
  eq(e) {
3363
- return this == e || this.type == e.type && un(this.attrs, e.attrs);
3435
+ return this == e || this.type == e.type && cn(this.attrs, e.attrs);
3364
3436
  }
3365
3437
  /**
3366
3438
  Convert this mark to a JSON-serializeable representation.
@@ -3414,7 +3486,7 @@ class j {
3414
3486
  j.none = [];
3415
3487
  class Gl extends Error {
3416
3488
  }
3417
- class C {
3489
+ class S {
3418
3490
  /**
3419
3491
  Create a slice. When specifying a non-zero open depth, you must
3420
3492
  make sure that there are nodes of at least that depth at the
@@ -3440,14 +3512,14 @@ class C {
3440
3512
  @internal
3441
3513
  */
3442
3514
  insertAt(e, t) {
3443
- let r = bi(this.content, e + this.openStart, t);
3444
- return r && new C(r, this.openStart, this.openEnd);
3515
+ let r = yi(this.content, e + this.openStart, t);
3516
+ return r && new S(r, this.openStart, this.openEnd);
3445
3517
  }
3446
3518
  /**
3447
3519
  @internal
3448
3520
  */
3449
3521
  removeBetween(e, t) {
3450
- return new C(yi(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
3522
+ return new S(gi(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
3451
3523
  }
3452
3524
  /**
3453
3525
  Tests whether this slice is equal to another slice.
@@ -3475,11 +3547,11 @@ class C {
3475
3547
  */
3476
3548
  static fromJSON(e, t) {
3477
3549
  if (!t)
3478
- return C.empty;
3550
+ return S.empty;
3479
3551
  let r = t.openStart || 0, i = t.openEnd || 0;
3480
3552
  if (typeof r != "number" || typeof i != "number")
3481
3553
  throw new RangeError("Invalid input for Slice.fromJSON");
3482
- return new C(S.fromJSON(e, t.content), r, i);
3554
+ return new S(C.fromJSON(e, t.content), r, i);
3483
3555
  }
3484
3556
  /**
3485
3557
  Create a slice from a fragment by taking the maximum possible
@@ -3491,11 +3563,11 @@ class C {
3491
3563
  r++;
3492
3564
  for (let s = e.lastChild; s && !s.isLeaf && (t || !s.type.spec.isolating); s = s.lastChild)
3493
3565
  i++;
3494
- return new C(e, r, i);
3566
+ return new S(e, r, i);
3495
3567
  }
3496
3568
  }
3497
- C.empty = new C(S.empty, 0, 0);
3498
- function yi(n, e, t) {
3569
+ S.empty = new S(C.empty, 0, 0);
3570
+ function gi(n, e, t) {
3499
3571
  let { index: r, offset: i } = n.findIndex(e), s = n.maybeChild(r), { index: o, offset: l } = n.findIndex(t);
3500
3572
  if (i == e || s.isText) {
3501
3573
  if (l != t && !n.child(o).isText)
@@ -3504,13 +3576,13 @@ function yi(n, e, t) {
3504
3576
  }
3505
3577
  if (r != o)
3506
3578
  throw new RangeError("Removing non-flat range");
3507
- return n.replaceChild(r, s.copy(yi(s.content, e - i - 1, t - i - 1)));
3579
+ return n.replaceChild(r, s.copy(gi(s.content, e - i - 1, t - i - 1)));
3508
3580
  }
3509
- function bi(n, e, t, r) {
3581
+ function yi(n, e, t, r) {
3510
3582
  let { index: i, offset: s } = n.findIndex(e), o = n.maybeChild(i);
3511
3583
  if (s == e || o.isText)
3512
3584
  return r && !r.canReplace(i, i, t) ? null : n.cut(0, e).append(t).append(n.cut(e));
3513
- let l = bi(o.content, e - s - 1, t, o);
3585
+ let l = yi(o.content, e - s - 1, t, o);
3514
3586
  return l && n.replaceChild(i, o.copy(l));
3515
3587
  }
3516
3588
  function Zl(n) {
@@ -3519,7 +3591,7 @@ function Zl(n) {
3519
3591
  function Xl(n) {
3520
3592
  return n.style != null;
3521
3593
  }
3522
- class bt {
3594
+ class yt {
3523
3595
  /**
3524
3596
  Create a parser that targets the given schema, using the given
3525
3597
  parsing rules.
@@ -3558,7 +3630,7 @@ class bt {
3558
3630
  */
3559
3631
  parseSlice(e, t = {}) {
3560
3632
  let r = new dr(this, t, !0);
3561
- return r.addAll(e, j.none, t.from, t.to), C.maxOpen(r.finish());
3633
+ return r.addAll(e, j.none, t.from, t.to), S.maxOpen(r.finish());
3562
3634
  }
3563
3635
  /**
3564
3636
  @internal
@@ -3631,10 +3703,10 @@ class bt {
3631
3703
  [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).
3632
3704
  */
3633
3705
  static fromSchema(e) {
3634
- return e.cached.domParser || (e.cached.domParser = new bt(e, bt.schemaRules(e)));
3706
+ return e.cached.domParser || (e.cached.domParser = new yt(e, yt.schemaRules(e)));
3635
3707
  }
3636
3708
  }
3637
- const xi = {
3709
+ const bi = {
3638
3710
  address: !0,
3639
3711
  article: !0,
3640
3712
  aside: !0,
@@ -3674,11 +3746,11 @@ const xi = {
3674
3746
  script: !0,
3675
3747
  style: !0,
3676
3748
  title: !0
3677
- }, ki = { ol: !0, ul: !0 }, Ge = 1, fn = 2, Je = 4;
3749
+ }, xi = { ol: !0, ul: !0 }, Ge = 1, un = 2, Je = 4;
3678
3750
  function fr(n, e, t) {
3679
- return e != null ? (e ? Ge : 0) | (e === "full" ? fn : 0) : n && n.whitespace == "pre" ? Ge | fn : t & ~Je;
3751
+ return e != null ? (e ? Ge : 0) | (e === "full" ? un : 0) : n && n.whitespace == "pre" ? Ge | un : t & ~Je;
3680
3752
  }
3681
- class lt {
3753
+ class ot {
3682
3754
  constructor(e, t, r, i, s, o) {
3683
3755
  this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = j.none, this.match = s || (o & Je ? null : e.contentMatch);
3684
3756
  }
@@ -3686,7 +3758,7 @@ class lt {
3686
3758
  if (!this.match) {
3687
3759
  if (!this.type)
3688
3760
  return [];
3689
- let t = this.type.contentMatch.fillBefore(S.from(e));
3761
+ let t = this.type.contentMatch.fillBefore(C.from(e));
3690
3762
  if (t)
3691
3763
  this.match = this.type.contentMatch.matchFragment(t);
3692
3764
  else {
@@ -3704,18 +3776,18 @@ class lt {
3704
3776
  r.text.length == i[0].length ? this.content.pop() : this.content[this.content.length - 1] = s.withText(s.text.slice(0, s.text.length - i[0].length));
3705
3777
  }
3706
3778
  }
3707
- let t = S.from(this.content);
3708
- return !e && this.match && (t = t.append(this.match.fillBefore(S.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
3779
+ let t = C.from(this.content);
3780
+ return !e && this.match && (t = t.append(this.match.fillBefore(C.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
3709
3781
  }
3710
3782
  inlineContext(e) {
3711
- return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !xi.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
3783
+ return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !bi.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
3712
3784
  }
3713
3785
  }
3714
3786
  class dr {
3715
3787
  constructor(e, t, r) {
3716
3788
  this.parser = e, this.options = t, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
3717
3789
  let i = t.topNode, s, o = fr(null, t.preserveWhitespace, 0) | (r ? Je : 0);
3718
- i ? s = new lt(i.type, i.attrs, j.none, !0, t.topMatch || i.type.contentMatch, o) : r ? s = new lt(null, null, j.none, !0, null, o) : s = new lt(e.schema.topNodeType, null, j.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
3790
+ i ? s = new ot(i.type, i.attrs, j.none, !0, t.topMatch || i.type.contentMatch, o) : r ? s = new ot(null, null, j.none, !0, null, o) : s = new ot(e.schema.topNodeType, null, j.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
3719
3791
  }
3720
3792
  get top() {
3721
3793
  return this.nodes[this.open];
@@ -3727,7 +3799,7 @@ class dr {
3727
3799
  e.nodeType == 3 ? this.addTextNode(e, t) : e.nodeType == 1 && this.addElement(e, t);
3728
3800
  }
3729
3801
  addTextNode(e, t) {
3730
- let r = e.nodeValue, i = this.top, s = i.options & fn ? "full" : this.localPreserveWS || (i.options & Ge) > 0, { schema: o } = this.parser;
3802
+ let r = e.nodeValue, i = this.top, s = i.options & un ? "full" : this.localPreserveWS || (i.options & Ge) > 0, { schema: o } = this.parser;
3731
3803
  if (s === "full" || i.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
3732
3804
  if (s)
3733
3805
  if (s === "full")
@@ -3754,14 +3826,14 @@ class dr {
3754
3826
  let i = this.localPreserveWS, s = this.top;
3755
3827
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
3756
3828
  let o = e.nodeName.toLowerCase(), l;
3757
- ki.hasOwnProperty(o) && this.parser.normalizeLists && Yl(e);
3829
+ xi.hasOwnProperty(o) && this.parser.normalizeLists && Yl(e);
3758
3830
  let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
3759
3831
  e: if (a ? a.ignore : Ql.hasOwnProperty(o))
3760
3832
  this.findInside(e), this.ignoreFallback(e, t);
3761
3833
  else if (!a || a.skip || a.closeParent) {
3762
3834
  a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
3763
3835
  let c, u = this.needsBlock;
3764
- if (xi.hasOwnProperty(o))
3836
+ if (bi.hasOwnProperty(o))
3765
3837
  s.content.length && s.content[0].isInline && this.open && (this.open--, s = this.top), c = !0, s.type || (this.needsBlock = !0);
3766
3838
  else if (!e.firstChild) {
3767
3839
  this.leafFallback(e, t);
@@ -3899,7 +3971,7 @@ class dr {
3899
3971
  let l = fr(e, s, o.options);
3900
3972
  o.options & Je && o.content.length == 0 && (l |= Je);
3901
3973
  let a = j.none;
3902
- return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : pr(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new lt(e, t, a, i, null, l)), this.open++, r;
3974
+ return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : pr(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new ot(e, t, a, i, null, l)), this.open++, r;
3903
3975
  }
3904
3976
  // Make sure all nodes above this.open are finished and added to
3905
3977
  // their parents
@@ -3996,7 +4068,7 @@ class dr {
3996
4068
  function Yl(n) {
3997
4069
  for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
3998
4070
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
3999
- r && ki.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
4071
+ r && xi.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
4000
4072
  }
4001
4073
  }
4002
4074
  function ea(n, e) {
@@ -4026,7 +4098,7 @@ function pr(n, e) {
4026
4098
  return !0;
4027
4099
  }
4028
4100
  }
4029
- class It {
4101
+ class Nt {
4030
4102
  /**
4031
4103
  Create a serializer. `nodes` should map node names to functions
4032
4104
  that take a node and return a description of the corresponding
@@ -4046,7 +4118,7 @@ class It {
4046
4118
  nodes.
4047
4119
  */
4048
4120
  serializeFragment(e, t = {}, r) {
4049
- r || (r = Wt(t).createDocumentFragment());
4121
+ r || (r = Ut(t).createDocumentFragment());
4050
4122
  let i = r, s = [];
4051
4123
  return e.forEach((o) => {
4052
4124
  if (s.length || o.marks.length) {
@@ -4075,7 +4147,7 @@ class It {
4075
4147
  @internal
4076
4148
  */
4077
4149
  serializeNodeInner(e, t) {
4078
- let { dom: r, contentDOM: i } = ht(Wt(t), this.nodes[e.type.name](e), null, e.attrs);
4150
+ let { dom: r, contentDOM: i } = dt(Ut(t), this.nodes[e.type.name](e), null, e.attrs);
4079
4151
  if (i) {
4080
4152
  if (e.isLeaf)
4081
4153
  throw new RangeError("Content hole not allowed in a leaf node spec");
@@ -4103,17 +4175,17 @@ class It {
4103
4175
  */
4104
4176
  serializeMark(e, t, r = {}) {
4105
4177
  let i = this.marks[e.type.name];
4106
- return i && ht(Wt(r), i(e, t), null, e.attrs);
4178
+ return i && dt(Ut(r), i(e, t), null, e.attrs);
4107
4179
  }
4108
4180
  static renderSpec(e, t, r = null, i) {
4109
- return ht(e, t, r, i);
4181
+ return dt(e, t, r, i);
4110
4182
  }
4111
4183
  /**
4112
4184
  Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
4113
4185
  properties in a schema's node and mark specs.
4114
4186
  */
4115
4187
  static fromSchema(e) {
4116
- return e.cached.domSerializer || (e.cached.domSerializer = new It(this.nodesFromSchema(e), this.marksFromSchema(e)));
4188
+ return e.cached.domSerializer || (e.cached.domSerializer = new Nt(this.nodesFromSchema(e), this.marksFromSchema(e)));
4117
4189
  }
4118
4190
  /**
4119
4191
  Gather the serializers in a schema's node specs into an object.
@@ -4138,7 +4210,7 @@ function mr(n) {
4138
4210
  }
4139
4211
  return e;
4140
4212
  }
4141
- function Wt(n) {
4213
+ function Ut(n) {
4142
4214
  return n.document || window.document;
4143
4215
  }
4144
4216
  const gr = /* @__PURE__ */ new WeakMap();
@@ -4162,7 +4234,7 @@ function na(n) {
4162
4234
  }
4163
4235
  return t(n), e;
4164
4236
  }
4165
- function ht(n, e, t, r) {
4237
+ function dt(n, e, t, r) {
4166
4238
  if (typeof e == "string")
4167
4239
  return { dom: n.createTextNode(e) };
4168
4240
  if (e.nodeType != null)
@@ -4192,7 +4264,7 @@ function ht(n, e, t, r) {
4192
4264
  throw new RangeError("Content hole must be the only child of its parent node");
4193
4265
  return { dom: a, contentDOM: a };
4194
4266
  } else {
4195
- let { dom: p, contentDOM: y } = ht(n, d, t, r);
4267
+ let { dom: p, contentDOM: y } = dt(n, d, t, r);
4196
4268
  if (a.appendChild(p), y) {
4197
4269
  if (l)
4198
4270
  throw new RangeError("Multiple content holes");
@@ -4202,18 +4274,18 @@ function ht(n, e, t, r) {
4202
4274
  }
4203
4275
  return { dom: a, contentDOM: l };
4204
4276
  }
4205
- const Si = 65535, Ci = Math.pow(2, 16);
4277
+ const ki = 65535, Ci = Math.pow(2, 16);
4206
4278
  function ra(n, e) {
4207
4279
  return n + e * Ci;
4208
4280
  }
4209
4281
  function yr(n) {
4210
- return n & Si;
4282
+ return n & ki;
4211
4283
  }
4212
4284
  function ia(n) {
4213
- return (n - (n & Si)) / Ci;
4285
+ return (n - (n & ki)) / Ci;
4214
4286
  }
4215
- const Ai = 1, Ti = 2, pt = 4, vi = 8;
4216
- class dn {
4287
+ const Si = 1, Ai = 2, ht = 4, Ti = 8;
4288
+ class fn {
4217
4289
  /**
4218
4290
  @internal
4219
4291
  */
@@ -4226,19 +4298,19 @@ class dn {
4226
4298
  argument from the document.
4227
4299
  */
4228
4300
  get deleted() {
4229
- return (this.delInfo & vi) > 0;
4301
+ return (this.delInfo & Ti) > 0;
4230
4302
  }
4231
4303
  /**
4232
4304
  Tells you whether the token before the mapped position was deleted.
4233
4305
  */
4234
4306
  get deletedBefore() {
4235
- return (this.delInfo & (Ai | pt)) > 0;
4307
+ return (this.delInfo & (Si | ht)) > 0;
4236
4308
  }
4237
4309
  /**
4238
4310
  True when the token after the mapped position was deleted.
4239
4311
  */
4240
4312
  get deletedAfter() {
4241
- return (this.delInfo & (Ti | pt)) > 0;
4313
+ return (this.delInfo & (Ai | ht)) > 0;
4242
4314
  }
4243
4315
  /**
4244
4316
  Tells whether any of the steps mapped through deletes across the
@@ -4246,7 +4318,7 @@ class dn {
4246
4318
  position).
4247
4319
  */
4248
4320
  get deletedAcross() {
4249
- return (this.delInfo & pt) > 0;
4321
+ return (this.delInfo & ht) > 0;
4250
4322
  }
4251
4323
  }
4252
4324
  class K {
@@ -4289,12 +4361,12 @@ class K {
4289
4361
  let d = c ? e == a ? -1 : e == f ? 1 : t : t, p = a + i + (d < 0 ? 0 : u);
4290
4362
  if (r)
4291
4363
  return p;
4292
- let y = e == (t < 0 ? a : f) ? null : ra(l / 3, e - a), m = e == a ? Ti : e == f ? Ai : pt;
4293
- return (t < 0 ? e != a : e != f) && (m |= vi), new dn(p, m, y);
4364
+ let y = e == (t < 0 ? a : f) ? null : ra(l / 3, e - a), m = e == a ? Ai : e == f ? Si : ht;
4365
+ return (t < 0 ? e != a : e != f) && (m |= Ti), new fn(p, m, y);
4294
4366
  }
4295
4367
  i += u - c;
4296
4368
  }
4297
- return r ? e + i : new dn(e + i, 0, null);
4369
+ return r ? e + i : new fn(e + i, 0, null);
4298
4370
  }
4299
4371
  /**
4300
4372
  @internal
@@ -4346,7 +4418,7 @@ class K {
4346
4418
  }
4347
4419
  }
4348
4420
  K.empty = new K([]);
4349
- class xt {
4421
+ class bt {
4350
4422
  /**
4351
4423
  Create a new mapping with the given position maps.
4352
4424
  */
@@ -4363,7 +4435,7 @@ class xt {
4363
4435
  Create a mapping that maps only through a part of this one.
4364
4436
  */
4365
4437
  slice(e = 0, t = this.maps.length) {
4366
- return new xt(this._maps, this.mirror, e, t);
4438
+ return new bt(this._maps, this.mirror, e, t);
4367
4439
  }
4368
4440
  /**
4369
4441
  Add a step map to the end of this mapping. If `mirrors` is
@@ -4414,7 +4486,7 @@ class xt {
4414
4486
  Create an inverted version of this mapping.
4415
4487
  */
4416
4488
  invert() {
4417
- let e = new xt();
4489
+ let e = new bt();
4418
4490
  return e.appendMappingInverted(this), e;
4419
4491
  }
4420
4492
  /**
@@ -4450,10 +4522,10 @@ class xt {
4450
4522
  }
4451
4523
  i |= l.delInfo, e = l.pos;
4452
4524
  }
4453
- return r ? e : new dn(e, i, null);
4525
+ return r ? e : new fn(e, i, null);
4454
4526
  }
4455
4527
  }
4456
- const jt = /* @__PURE__ */ Object.create(null);
4528
+ const Wt = /* @__PURE__ */ Object.create(null);
4457
4529
  class B {
4458
4530
  /**
4459
4531
  Get the step map that represents the changes made by this step,
@@ -4478,7 +4550,7 @@ class B {
4478
4550
  static fromJSON(e, t) {
4479
4551
  if (!t || !t.stepType)
4480
4552
  throw new RangeError("Invalid input for Step.fromJSON");
4481
- let r = jt[t.stepType];
4553
+ let r = Wt[t.stepType];
4482
4554
  if (!r)
4483
4555
  throw new RangeError(`No step type ${t.stepType} defined`);
4484
4556
  return r.fromJSON(e, t);
@@ -4490,9 +4562,9 @@ class B {
4490
4562
  that's unlikely to clash with steps from other modules.
4491
4563
  */
4492
4564
  static jsonID(e, t) {
4493
- if (e in jt)
4565
+ if (e in Wt)
4494
4566
  throw new RangeError("Duplicate use of step JSON ID " + e);
4495
- return jt[e] = t, t.prototype.jsonID = e, t;
4567
+ return Wt[e] = t, t.prototype.jsonID = e, t;
4496
4568
  }
4497
4569
  }
4498
4570
  class O {
@@ -4529,15 +4601,15 @@ class O {
4529
4601
  }
4530
4602
  }
4531
4603
  }
4532
- function Nn(n, e, t) {
4604
+ function En(n, e, t) {
4533
4605
  let r = [];
4534
4606
  for (let i = 0; i < n.childCount; i++) {
4535
4607
  let s = n.child(i);
4536
- s.content.size && (s = s.copy(Nn(s.content, e, s))), s.isInline && (s = e(s, t, i)), r.push(s);
4608
+ s.content.size && (s = s.copy(En(s.content, e, s))), s.isInline && (s = e(s, t, i)), r.push(s);
4537
4609
  }
4538
- return S.fromArray(r);
4610
+ return C.fromArray(r);
4539
4611
  }
4540
- class Se extends B {
4612
+ class Ce extends B {
4541
4613
  /**
4542
4614
  Create a mark step.
4543
4615
  */
@@ -4545,18 +4617,18 @@ class Se extends B {
4545
4617
  super(), this.from = e, this.to = t, this.mark = r;
4546
4618
  }
4547
4619
  apply(e) {
4548
- let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new C(Nn(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
4620
+ let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new S(En(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
4549
4621
  return O.fromReplace(e, this.from, this.to, s);
4550
4622
  }
4551
4623
  invert() {
4552
- return new Ce(this.from, this.to, this.mark);
4624
+ return new Se(this.from, this.to, this.mark);
4553
4625
  }
4554
4626
  map(e) {
4555
4627
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
4556
- return t.deleted && r.deleted || t.pos >= r.pos ? null : new Se(t.pos, r.pos, this.mark);
4628
+ return t.deleted && r.deleted || t.pos >= r.pos ? null : new Ce(t.pos, r.pos, this.mark);
4557
4629
  }
4558
4630
  merge(e) {
4559
- return e instanceof Se && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Se(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
4631
+ return e instanceof Ce && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Ce(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
4560
4632
  }
4561
4633
  toJSON() {
4562
4634
  return {
@@ -4572,11 +4644,11 @@ class Se extends B {
4572
4644
  static fromJSON(e, t) {
4573
4645
  if (typeof t.from != "number" || typeof t.to != "number")
4574
4646
  throw new RangeError("Invalid input for AddMarkStep.fromJSON");
4575
- return new Se(t.from, t.to, e.markFromJSON(t.mark));
4647
+ return new Ce(t.from, t.to, e.markFromJSON(t.mark));
4576
4648
  }
4577
4649
  }
4578
- B.jsonID("addMark", Se);
4579
- class Ce extends B {
4650
+ B.jsonID("addMark", Ce);
4651
+ class Se extends B {
4580
4652
  /**
4581
4653
  Create a mark-removing step.
4582
4654
  */
@@ -4584,18 +4656,18 @@ class Ce extends B {
4584
4656
  super(), this.from = e, this.to = t, this.mark = r;
4585
4657
  }
4586
4658
  apply(e) {
4587
- let t = e.slice(this.from, this.to), r = new C(Nn(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
4659
+ let t = e.slice(this.from, this.to), r = new S(En(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
4588
4660
  return O.fromReplace(e, this.from, this.to, r);
4589
4661
  }
4590
4662
  invert() {
4591
- return new Se(this.from, this.to, this.mark);
4663
+ return new Ce(this.from, this.to, this.mark);
4592
4664
  }
4593
4665
  map(e) {
4594
4666
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
4595
- return t.deleted && r.deleted || t.pos >= r.pos ? null : new Ce(t.pos, r.pos, this.mark);
4667
+ return t.deleted && r.deleted || t.pos >= r.pos ? null : new Se(t.pos, r.pos, this.mark);
4596
4668
  }
4597
4669
  merge(e) {
4598
- return e instanceof Ce && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Ce(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
4670
+ return e instanceof Se && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Se(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
4599
4671
  }
4600
4672
  toJSON() {
4601
4673
  return {
@@ -4611,10 +4683,10 @@ class Ce extends B {
4611
4683
  static fromJSON(e, t) {
4612
4684
  if (typeof t.from != "number" || typeof t.to != "number")
4613
4685
  throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
4614
- return new Ce(t.from, t.to, e.markFromJSON(t.mark));
4686
+ return new Se(t.from, t.to, e.markFromJSON(t.mark));
4615
4687
  }
4616
4688
  }
4617
- B.jsonID("removeMark", Ce);
4689
+ B.jsonID("removeMark", Se);
4618
4690
  class Ae extends B {
4619
4691
  /**
4620
4692
  Create a node mark step.
@@ -4627,7 +4699,7 @@ class Ae extends B {
4627
4699
  if (!t)
4628
4700
  return O.fail("No node at mark step's position");
4629
4701
  let r = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
4630
- return O.fromReplace(e, this.pos, this.pos + 1, new C(S.from(r), 0, t.isLeaf ? 0 : 1));
4702
+ return O.fromReplace(e, this.pos, this.pos + 1, new S(C.from(r), 0, t.isLeaf ? 0 : 1));
4631
4703
  }
4632
4704
  invert(e) {
4633
4705
  let t = e.nodeAt(this.pos);
@@ -4671,7 +4743,7 @@ class Ze extends B {
4671
4743
  if (!t)
4672
4744
  return O.fail("No node at mark step's position");
4673
4745
  let r = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
4674
- return O.fromReplace(e, this.pos, this.pos + 1, new C(S.from(r), 0, t.isLeaf ? 0 : 1));
4746
+ return O.fromReplace(e, this.pos, this.pos + 1, new S(C.from(r), 0, t.isLeaf ? 0 : 1));
4675
4747
  }
4676
4748
  invert(e) {
4677
4749
  let t = e.nodeAt(this.pos);
@@ -4708,7 +4780,7 @@ class le extends B {
4708
4780
  super(), this.from = e, this.to = t, this.slice = r, this.structure = i;
4709
4781
  }
4710
4782
  apply(e) {
4711
- return this.structure && hn(e, this.from, this.to) ? O.fail("Structure replace would overwrite content") : O.fromReplace(e, this.from, this.to, this.slice);
4783
+ return this.structure && dn(e, this.from, this.to) ? O.fail("Structure replace would overwrite content") : O.fromReplace(e, this.from, this.to, this.slice);
4712
4784
  }
4713
4785
  getMap() {
4714
4786
  return new K([this.from, this.to - this.from, this.slice.size]);
@@ -4724,10 +4796,10 @@ class le extends B {
4724
4796
  if (!(e instanceof le) || e.structure || this.structure)
4725
4797
  return null;
4726
4798
  if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
4727
- let t = this.slice.size + e.slice.size == 0 ? C.empty : new C(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
4799
+ let t = this.slice.size + e.slice.size == 0 ? S.empty : new S(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
4728
4800
  return new le(this.from, this.to + (e.to - e.from), t, this.structure);
4729
4801
  } else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
4730
- let t = this.slice.size + e.slice.size == 0 ? C.empty : new C(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
4802
+ let t = this.slice.size + e.slice.size == 0 ? S.empty : new S(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
4731
4803
  return new le(e.from, this.to, t, this.structure);
4732
4804
  } else
4733
4805
  return null;
@@ -4742,7 +4814,7 @@ class le extends B {
4742
4814
  static fromJSON(e, t) {
4743
4815
  if (typeof t.from != "number" || typeof t.to != "number")
4744
4816
  throw new RangeError("Invalid input for ReplaceStep.fromJSON");
4745
- return new le(t.from, t.to, C.fromJSON(e, t.slice), !!t.structure);
4817
+ return new le(t.from, t.to, S.fromJSON(e, t.slice), !!t.structure);
4746
4818
  }
4747
4819
  }
4748
4820
  B.jsonID("replace", le);
@@ -4757,7 +4829,7 @@ class Le extends B {
4757
4829
  super(), this.from = e, this.to = t, this.gapFrom = r, this.gapTo = i, this.slice = s, this.insert = o, this.structure = l;
4758
4830
  }
4759
4831
  apply(e) {
4760
- if (this.structure && (hn(e, this.from, this.gapFrom) || hn(e, this.gapTo, this.to)))
4832
+ if (this.structure && (dn(e, this.from, this.gapFrom) || dn(e, this.gapTo, this.to)))
4761
4833
  return O.fail("Structure gap-replace would overwrite content");
4762
4834
  let t = e.slice(this.gapFrom, this.gapTo);
4763
4835
  if (t.openStart || t.openEnd)
@@ -4800,11 +4872,11 @@ class Le extends B {
4800
4872
  static fromJSON(e, t) {
4801
4873
  if (typeof t.from != "number" || typeof t.to != "number" || typeof t.gapFrom != "number" || typeof t.gapTo != "number" || typeof t.insert != "number")
4802
4874
  throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
4803
- return new Le(t.from, t.to, t.gapFrom, t.gapTo, C.fromJSON(e, t.slice), t.insert, !!t.structure);
4875
+ return new Le(t.from, t.to, t.gapFrom, t.gapTo, S.fromJSON(e, t.slice), t.insert, !!t.structure);
4804
4876
  }
4805
4877
  }
4806
4878
  B.jsonID("replaceAround", Le);
4807
- function hn(n, e, t) {
4879
+ function dn(n, e, t) {
4808
4880
  let r = n.resolve(e), i = t - e, s = r.depth;
4809
4881
  for (; i > 0 && s > 0 && r.indexAfter(s) == r.node(s).childCount; )
4810
4882
  s--, i--;
@@ -4818,7 +4890,7 @@ function hn(n, e, t) {
4818
4890
  }
4819
4891
  return !1;
4820
4892
  }
4821
- function Mi(n, e, t) {
4893
+ function vi(n, e, t) {
4822
4894
  let r = n.resolve(e);
4823
4895
  if (!t.content.size)
4824
4896
  return e;
@@ -4855,7 +4927,7 @@ class qe extends B {
4855
4927
  r[s] = t.attrs[s];
4856
4928
  r[this.attr] = this.value;
4857
4929
  let i = t.type.create(r, null, t.marks);
4858
- return O.fromReplace(e, this.pos, this.pos + 1, new C(S.from(i), 0, t.isLeaf ? 0 : 1));
4930
+ return O.fromReplace(e, this.pos, this.pos + 1, new S(C.from(i), 0, t.isLeaf ? 0 : 1));
4859
4931
  }
4860
4932
  getMap() {
4861
4933
  return K.empty;
@@ -4877,7 +4949,7 @@ class qe extends B {
4877
4949
  }
4878
4950
  }
4879
4951
  B.jsonID("attr", qe);
4880
- class kt extends B {
4952
+ class xt extends B {
4881
4953
  /**
4882
4954
  Construct an attribute step.
4883
4955
  */
@@ -4896,7 +4968,7 @@ class kt extends B {
4896
4968
  return K.empty;
4897
4969
  }
4898
4970
  invert(e) {
4899
- return new kt(this.attr, e.attrs[this.attr]);
4971
+ return new xt(this.attr, e.attrs[this.attr]);
4900
4972
  }
4901
4973
  map(e) {
4902
4974
  return this;
@@ -4907,10 +4979,10 @@ class kt extends B {
4907
4979
  static fromJSON(e, t) {
4908
4980
  if (typeof t.attr != "string")
4909
4981
  throw new RangeError("Invalid input for DocAttrStep.fromJSON");
4910
- return new kt(t.attr, t.value);
4982
+ return new xt(t.attr, t.value);
4911
4983
  }
4912
4984
  }
4913
- B.jsonID("docAttr", kt);
4985
+ B.jsonID("docAttr", xt);
4914
4986
  let Xe = class extends Error {
4915
4987
  };
4916
4988
  Xe = function n(e) {
@@ -4920,7 +4992,7 @@ Xe = function n(e) {
4920
4992
  Xe.prototype = Object.create(Error.prototype);
4921
4993
  Xe.prototype.constructor = Xe;
4922
4994
  Xe.prototype.name = "TransformError";
4923
- const _t = /* @__PURE__ */ Object.create(null);
4995
+ const jt = /* @__PURE__ */ Object.create(null);
4924
4996
  class N {
4925
4997
  /**
4926
4998
  Initialize a selection with the head and anchor and ranges. If no
@@ -4986,14 +5058,14 @@ class N {
4986
5058
  Replace the selection with a slice or, if no slice is given,
4987
5059
  delete the selection. Will append to the given transaction.
4988
5060
  */
4989
- replace(e, t = C.empty) {
5061
+ replace(e, t = S.empty) {
4990
5062
  let r = t.content.lastChild, i = null;
4991
5063
  for (let l = 0; l < t.openEnd; l++)
4992
5064
  i = r, r = r.lastChild;
4993
5065
  let s = e.steps.length, o = this.ranges;
4994
5066
  for (let l = 0; l < o.length; l++) {
4995
5067
  let { $from: a, $to: c } = o[l], u = e.mapping.slice(s);
4996
- e.replaceRange(u.map(a.pos), u.map(c.pos), l ? C.empty : t), l == 0 && kr(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
5068
+ e.replaceRange(u.map(a.pos), u.map(c.pos), l ? S.empty : t), l == 0 && kr(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
4997
5069
  }
4998
5070
  }
4999
5071
  /**
@@ -5056,7 +5128,7 @@ class N {
5056
5128
  static fromJSON(e, t) {
5057
5129
  if (!t || !t.type)
5058
5130
  throw new RangeError("Invalid input for Selection.fromJSON");
5059
- let r = _t[t.type];
5131
+ let r = jt[t.type];
5060
5132
  if (!r)
5061
5133
  throw new RangeError(`No selection type ${t.type} defined`);
5062
5134
  return r.fromJSON(e, t);
@@ -5068,9 +5140,9 @@ class N {
5068
5140
  clash with classes from other modules.
5069
5141
  */
5070
5142
  static jsonID(e, t) {
5071
- if (e in _t)
5143
+ if (e in jt)
5072
5144
  throw new RangeError("Duplicate use of selection JSON ID " + e);
5073
- return _t[e] = t, t.prototype.jsonID = e, t;
5145
+ return jt[e] = t, t.prototype.jsonID = e, t;
5074
5146
  }
5075
5147
  /**
5076
5148
  Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
@@ -5119,8 +5191,8 @@ class w extends N {
5119
5191
  let i = e.resolve(t.map(this.anchor));
5120
5192
  return new w(i.parent.inlineContent ? i : r, r);
5121
5193
  }
5122
- replace(e, t = C.empty) {
5123
- if (super.replace(e, t), t == C.empty) {
5194
+ replace(e, t = S.empty) {
5195
+ if (super.replace(e, t), t == S.empty) {
5124
5196
  let r = this.$from.marksAcross(this.$to);
5125
5197
  r && e.ensureMarks(r);
5126
5198
  }
@@ -5129,7 +5201,7 @@ class w extends N {
5129
5201
  return e instanceof w && e.anchor == this.anchor && e.head == this.head;
5130
5202
  }
5131
5203
  getBookmark() {
5132
- return new Ot(this.anchor, this.head);
5204
+ return new It(this.anchor, this.head);
5133
5205
  }
5134
5206
  toJSON() {
5135
5207
  return { type: "text", anchor: this.anchor, head: this.head };
@@ -5170,12 +5242,12 @@ class w extends N {
5170
5242
  }
5171
5243
  }
5172
5244
  N.jsonID("text", w);
5173
- class Ot {
5245
+ class It {
5174
5246
  constructor(e, t) {
5175
5247
  this.anchor = e, this.head = t;
5176
5248
  }
5177
5249
  map(e) {
5178
- return new Ot(e.map(this.anchor), e.map(this.head));
5250
+ return new It(e.map(this.anchor), e.map(this.head));
5179
5251
  }
5180
5252
  resolve(e) {
5181
5253
  return w.between(e.resolve(this.anchor), e.resolve(this.head));
@@ -5195,7 +5267,7 @@ class T extends N {
5195
5267
  return r ? N.near(s) : new T(s);
5196
5268
  }
5197
5269
  content() {
5198
- return new C(S.from(this.node), 0, 0);
5270
+ return new S(C.from(this.node), 0, 0);
5199
5271
  }
5200
5272
  eq(e) {
5201
5273
  return e instanceof T && e.anchor == this.anchor;
@@ -5204,7 +5276,7 @@ class T extends N {
5204
5276
  return { type: "node", anchor: this.anchor };
5205
5277
  }
5206
5278
  getBookmark() {
5207
- return new In(this.anchor);
5279
+ return new Nn(this.anchor);
5208
5280
  }
5209
5281
  /**
5210
5282
  @internal
@@ -5230,13 +5302,13 @@ class T extends N {
5230
5302
  }
5231
5303
  T.prototype.visible = !1;
5232
5304
  N.jsonID("node", T);
5233
- class In {
5305
+ class Nn {
5234
5306
  constructor(e) {
5235
5307
  this.anchor = e;
5236
5308
  }
5237
5309
  map(e) {
5238
5310
  let { deleted: t, pos: r } = e.mapResult(this.anchor);
5239
- return t ? new Ot(r, r) : new In(r);
5311
+ return t ? new It(r, r) : new Nn(r);
5240
5312
  }
5241
5313
  resolve(e) {
5242
5314
  let t = e.resolve(this.anchor), r = t.nodeAfter;
@@ -5250,8 +5322,8 @@ class ie extends N {
5250
5322
  constructor(e) {
5251
5323
  super(e.resolve(0), e.resolve(e.content.size));
5252
5324
  }
5253
- replace(e, t = C.empty) {
5254
- if (t == C.empty) {
5325
+ replace(e, t = S.empty) {
5326
+ if (t == S.empty) {
5255
5327
  e.delete(0, e.doc.content.size);
5256
5328
  let r = N.atStart(e.doc);
5257
5329
  r.eq(e.selection) || e.setSelection(r);
@@ -5315,36 +5387,36 @@ function kr(n, e, t) {
5315
5387
  o == null && (o = u);
5316
5388
  }), n.setSelection(N.near(n.doc.resolve(o), t));
5317
5389
  }
5318
- function Sr(n, e) {
5390
+ function Cr(n, e) {
5319
5391
  return !e || !n ? n : n.bind(e);
5320
5392
  }
5321
- class at {
5393
+ class lt {
5322
5394
  constructor(e, t, r) {
5323
- this.name = e, this.init = Sr(t.init, r), this.apply = Sr(t.apply, r);
5395
+ this.name = e, this.init = Cr(t.init, r), this.apply = Cr(t.apply, r);
5324
5396
  }
5325
5397
  }
5326
- new at("doc", {
5398
+ new lt("doc", {
5327
5399
  init(n) {
5328
5400
  return n.doc || n.schema.topNodeType.createAndFill();
5329
5401
  },
5330
5402
  apply(n) {
5331
5403
  return n.doc;
5332
5404
  }
5333
- }), new at("selection", {
5405
+ }), new lt("selection", {
5334
5406
  init(n, e) {
5335
5407
  return n.selection || N.atStart(e.doc);
5336
5408
  },
5337
5409
  apply(n) {
5338
5410
  return n.selection;
5339
5411
  }
5340
- }), new at("storedMarks", {
5412
+ }), new lt("storedMarks", {
5341
5413
  init(n) {
5342
5414
  return n.storedMarks || null;
5343
5415
  },
5344
5416
  apply(n, e, t, r) {
5345
5417
  return r.selection.$cursor ? n.storedMarks : null;
5346
5418
  }
5347
- }), new at("scrollToSelection", {
5419
+ }), new lt("scrollToSelection", {
5348
5420
  init() {
5349
5421
  return 0;
5350
5422
  },
@@ -5352,19 +5424,19 @@ new at("doc", {
5352
5424
  return n.scrolledIntoView ? e + 1 : e;
5353
5425
  }
5354
5426
  });
5355
- function wi(n, e, t) {
5427
+ function Mi(n, e, t) {
5356
5428
  for (let r in n) {
5357
5429
  let i = n[r];
5358
- i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = wi(i, e, {})), t[r] = i;
5430
+ i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = Mi(i, e, {})), t[r] = i;
5359
5431
  }
5360
5432
  return t;
5361
5433
  }
5362
- class Dt {
5434
+ class Ot {
5363
5435
  /**
5364
5436
  Create a plugin.
5365
5437
  */
5366
5438
  constructor(e) {
5367
- this.spec = e, this.props = {}, e.props && wi(e.props, this, this.props), this.key = e.key ? e.key.key : Ei("plugin");
5439
+ this.spec = e, this.props = {}, e.props && Mi(e.props, this, this.props), this.key = e.key ? e.key.key : wi("plugin");
5368
5440
  }
5369
5441
  /**
5370
5442
  Extract the plugin's state field from an editor state.
@@ -5373,16 +5445,16 @@ class Dt {
5373
5445
  return e[this.key];
5374
5446
  }
5375
5447
  }
5376
- const Gt = /* @__PURE__ */ Object.create(null);
5377
- function Ei(n) {
5378
- return n in Gt ? n + "$" + ++Gt[n] : (Gt[n] = 0, n + "$");
5448
+ const _t = /* @__PURE__ */ Object.create(null);
5449
+ function wi(n) {
5450
+ return n in _t ? n + "$" + ++_t[n] : (_t[n] = 0, n + "$");
5379
5451
  }
5380
- class On {
5452
+ class In {
5381
5453
  /**
5382
5454
  Create a plugin key.
5383
5455
  */
5384
5456
  constructor(e = "key") {
5385
- this.key = Ei(e);
5457
+ this.key = wi(e);
5386
5458
  }
5387
5459
  /**
5388
5460
  Get the active plugin with this key, if any, from an editor
@@ -5488,14 +5560,14 @@ const la = /^```([a-z]+)?[\s\n]$/, aa = /^~~~([a-z]+)?[\s\n]$/, ca = Y.create({
5488
5560
  },
5489
5561
  addInputRules() {
5490
5562
  return [
5491
- sn({
5563
+ rn({
5492
5564
  find: la,
5493
5565
  type: this.type,
5494
5566
  getAttributes: (n) => ({
5495
5567
  language: n[1]
5496
5568
  })
5497
5569
  }),
5498
- sn({
5570
+ rn({
5499
5571
  find: aa,
5500
5572
  type: this.type,
5501
5573
  getAttributes: (n) => ({
@@ -5508,8 +5580,8 @@ const la = /^```([a-z]+)?[\s\n]$/, aa = /^~~~([a-z]+)?[\s\n]$/, ca = Y.create({
5508
5580
  return [
5509
5581
  // this plugin creates a code block for pasted content from VS Code
5510
5582
  // we can also detect the copied code language
5511
- new Dt({
5512
- key: new On("codeBlockVSCodeHandler"),
5583
+ new Ot({
5584
+ key: new In("codeBlockVSCodeHandler"),
5513
5585
  props: {
5514
5586
  handlePaste: (n, e) => {
5515
5587
  if (!e.clipboardData || this.editor.isActive(this.type.name))
@@ -5580,7 +5652,7 @@ const la = /^```([a-z]+)?[\s\n]$/, aa = /^~~~([a-z]+)?[\s\n]$/, ca = Y.create({
5580
5652
  addCommands() {
5581
5653
  return {
5582
5654
  setHorizontalRule: () => ({ chain: n, state: e }) => {
5583
- if (!Us(e, e.schema.nodes[this.name]))
5655
+ if (!qs(e, e.schema.nodes[this.name]))
5584
5656
  return !1;
5585
5657
  const { selection: t } = e, { $from: r, $to: i } = t, s = n();
5586
5658
  return r.parentOffset === 0 ? s.insertContentAt({
@@ -5588,7 +5660,7 @@ const la = /^```([a-z]+)?[\s\n]$/, aa = /^~~~([a-z]+)?[\s\n]$/, ca = Y.create({
5588
5660
  to: i.pos
5589
5661
  }, {
5590
5662
  type: this.name
5591
- }) : Ws(t) ? s.insertContentAt(i.pos, {
5663
+ }) : Us(t) ? s.insertContentAt(i.pos, {
5592
5664
  type: this.name
5593
5665
  }) : s.insertContent({ type: this.name }), s.command(({ tr: o, dispatch: l }) => {
5594
5666
  var a;
@@ -5609,7 +5681,7 @@ const la = /^```([a-z]+)?[\s\n]$/, aa = /^~~~([a-z]+)?[\s\n]$/, ca = Y.create({
5609
5681
  },
5610
5682
  addInputRules() {
5611
5683
  return [
5612
- qs({
5684
+ Js({
5613
5685
  find: /^(?:---|—-|___\s|\*\*\*\s)$/,
5614
5686
  type: this.type
5615
5687
  })
@@ -5666,10 +5738,10 @@ const la = /^```([a-z]+)?[\s\n]$/, aa = /^~~~([a-z]+)?[\s\n]$/, ca = Y.create({
5666
5738
  };
5667
5739
  }
5668
5740
  });
5669
- var St = 200, P = function() {
5741
+ var kt = 200, P = function() {
5670
5742
  };
5671
5743
  P.prototype.append = function(e) {
5672
- return e.length ? (e = P.from(e), !this.length && e || e.length < St && this.leafAppend(e) || this.length < St && e.leafPrepend(this) || this.appendInner(e)) : this;
5744
+ return e.length ? (e = P.from(e), !this.length && e || e.length < kt && this.leafAppend(e) || this.length < kt && e.leafPrepend(this) || this.appendInner(e)) : this;
5673
5745
  };
5674
5746
  P.prototype.prepend = function(e) {
5675
5747
  return e.length ? P.from(e).append(this) : this;
@@ -5695,9 +5767,9 @@ P.prototype.map = function(e, t, r) {
5695
5767
  }, t, r), i;
5696
5768
  };
5697
5769
  P.from = function(e) {
5698
- return e instanceof P ? e : e && e.length ? new Ni(e) : P.empty;
5770
+ return e instanceof P ? e : e && e.length ? new Ei(e) : P.empty;
5699
5771
  };
5700
- var Ni = /* @__PURE__ */ (function(n) {
5772
+ var Ei = /* @__PURE__ */ (function(n) {
5701
5773
  function e(r) {
5702
5774
  n.call(this), this.values = r;
5703
5775
  }
@@ -5718,10 +5790,10 @@ var Ni = /* @__PURE__ */ (function(n) {
5718
5790
  if (i(this.values[a], l + a) === !1)
5719
5791
  return !1;
5720
5792
  }, e.prototype.leafAppend = function(i) {
5721
- if (this.length + i.length <= St)
5793
+ if (this.length + i.length <= kt)
5722
5794
  return new e(this.values.concat(i.flatten()));
5723
5795
  }, e.prototype.leafPrepend = function(i) {
5724
- if (this.length + i.length <= St)
5796
+ if (this.length + i.length <= kt)
5725
5797
  return new e(i.flatten().concat(this.values));
5726
5798
  }, t.length.get = function() {
5727
5799
  return this.values.length;
@@ -5729,7 +5801,7 @@ var Ni = /* @__PURE__ */ (function(n) {
5729
5801
  return 0;
5730
5802
  }, Object.defineProperties(e.prototype, t), e;
5731
5803
  })(P);
5732
- P.empty = new Ni([]);
5804
+ P.empty = new Ei([]);
5733
5805
  var pa = /* @__PURE__ */ (function(n) {
5734
5806
  function e(t, r) {
5735
5807
  n.call(this), this.left = t, this.right = r, this.length = t.length + r.length, this.depth = Math.max(t.depth, r.depth) + 1;
@@ -5808,7 +5880,7 @@ class X {
5808
5880
  return c > ya && (l = ga(l, c), o -= c), new X(l.append(s), o);
5809
5881
  }
5810
5882
  remapping(e, t) {
5811
- let r = new xt();
5883
+ let r = new bt();
5812
5884
  return this.items.forEach((i, s) => {
5813
5885
  let o = i.mirrorOffset != null && s - i.mirrorOffset >= e ? r.maps.length - i.mirrorOffset : void 0;
5814
5886
  r.appendMap(i.map, o);
@@ -5906,16 +5978,16 @@ function ba(n, e, t, r) {
5906
5978
  let i = t.getMeta(ve), s;
5907
5979
  if (i)
5908
5980
  return i.historyState;
5909
- t.getMeta(Sa) && (n = new de(n.done, n.undone, null, 0, -1));
5981
+ t.getMeta(Ca) && (n = new de(n.done, n.undone, null, 0, -1));
5910
5982
  let o = t.getMeta("appendedTransaction");
5911
5983
  if (t.steps.length == 0)
5912
5984
  return n;
5913
5985
  if (o && o.getMeta(ve))
5914
- return o.getMeta(ve).redo ? new de(n.done.addTransform(t, void 0, r, mt(e)), n.undone, Cr(t.mapping.maps), n.prevTime, n.prevComposition) : new de(n.done, n.undone.addTransform(t, void 0, r, mt(e)), null, n.prevTime, n.prevComposition);
5986
+ return o.getMeta(ve).redo ? new de(n.done.addTransform(t, void 0, r, pt(e)), n.undone, Sr(t.mapping.maps), n.prevTime, n.prevComposition) : new de(n.done, n.undone.addTransform(t, void 0, r, pt(e)), null, n.prevTime, n.prevComposition);
5915
5987
  if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
5916
- let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !xa(t, n.prevRanges)), c = o ? Zt(n.prevRanges, t.mapping) : Cr(t.mapping.maps);
5917
- return new de(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, mt(e)), X.empty, c, t.time, l ?? n.prevComposition);
5918
- } else return (s = t.getMeta("rebased")) ? new de(n.done.rebased(t, s), n.undone.rebased(t, s), Zt(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new de(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), Zt(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
5988
+ let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !xa(t, n.prevRanges)), c = o ? Gt(n.prevRanges, t.mapping) : Sr(t.mapping.maps);
5989
+ return new de(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, pt(e)), X.empty, c, t.time, l ?? n.prevComposition);
5990
+ } else return (s = t.getMeta("rebased")) ? new de(n.done.rebased(t, s), n.undone.rebased(t, s), Gt(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new de(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), Gt(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
5919
5991
  }
5920
5992
  function xa(n, e) {
5921
5993
  if (!e)
@@ -5928,13 +6000,13 @@ function xa(n, e) {
5928
6000
  r <= e[s + 1] && i >= e[s] && (t = !0);
5929
6001
  }), t;
5930
6002
  }
5931
- function Cr(n) {
6003
+ function Sr(n) {
5932
6004
  let e = [];
5933
6005
  for (let t = n.length - 1; t >= 0 && e.length == 0; t--)
5934
6006
  n[t].forEach((r, i, s, o) => e.push(s, o));
5935
6007
  return e;
5936
6008
  }
5937
- function Zt(n, e) {
6009
+ function Gt(n, e) {
5938
6010
  if (!n)
5939
6011
  return null;
5940
6012
  let t = [];
@@ -5945,31 +6017,31 @@ function Zt(n, e) {
5945
6017
  return t;
5946
6018
  }
5947
6019
  function ka(n, e, t) {
5948
- let r = mt(e), i = ve.get(e).spec.config, s = (t ? n.undone : n.done).popEvent(e, r);
6020
+ let r = pt(e), i = ve.get(e).spec.config, s = (t ? n.undone : n.done).popEvent(e, r);
5949
6021
  if (!s)
5950
6022
  return null;
5951
6023
  let o = s.selection.resolve(s.transform.doc), l = (t ? n.done : n.undone).addTransform(s.transform, e.selection.getBookmark(), i, r), a = new de(t ? l : s.remaining, t ? s.remaining : l, null, 0, -1);
5952
6024
  return s.transform.setSelection(o).setMeta(ve, { redo: t, historyState: a });
5953
6025
  }
5954
- let Xt = !1, Ar = null;
5955
- function mt(n) {
6026
+ let Zt = !1, Ar = null;
6027
+ function pt(n) {
5956
6028
  let e = n.plugins;
5957
6029
  if (Ar != e) {
5958
- Xt = !1, Ar = e;
6030
+ Zt = !1, Ar = e;
5959
6031
  for (let t = 0; t < e.length; t++)
5960
6032
  if (e[t].spec.historyPreserveItems) {
5961
- Xt = !0;
6033
+ Zt = !0;
5962
6034
  break;
5963
6035
  }
5964
6036
  }
5965
- return Xt;
6037
+ return Zt;
5966
6038
  }
5967
- const ve = new On("history"), Sa = new On("closeHistory");
5968
- function Ca(n = {}) {
6039
+ const ve = new In("history"), Ca = new In("closeHistory");
6040
+ function Sa(n = {}) {
5969
6041
  return n = {
5970
6042
  depth: n.depth || 100,
5971
6043
  newGroupDelay: n.newGroupDelay || 500
5972
- }, new Dt({
6044
+ }, new Ot({
5973
6045
  key: ve,
5974
6046
  state: {
5975
6047
  init() {
@@ -5983,14 +6055,14 @@ function Ca(n = {}) {
5983
6055
  props: {
5984
6056
  handleDOMEvents: {
5985
6057
  beforeinput(e, t) {
5986
- let r = t.inputType, i = r == "historyUndo" ? Oi : r == "historyRedo" ? Di : null;
6058
+ let r = t.inputType, i = r == "historyUndo" ? Ii : r == "historyRedo" ? Oi : null;
5987
6059
  return !i || !e.editable ? !1 : (t.preventDefault(), i(e.state, e.dispatch));
5988
6060
  }
5989
6061
  }
5990
6062
  }
5991
6063
  });
5992
6064
  }
5993
- function Ii(n, e) {
6065
+ function Ni(n, e) {
5994
6066
  return (t, r) => {
5995
6067
  let i = ve.getState(t);
5996
6068
  if (!i || (n ? i.undone : i.done).eventCount == 0)
@@ -6002,7 +6074,7 @@ function Ii(n, e) {
6002
6074
  return !0;
6003
6075
  };
6004
6076
  }
6005
- const Oi = Ii(!1, !0), Di = Ii(!0, !0), Ve = An.create({
6077
+ const Ii = Ni(!1, !0), Oi = Ni(!0, !0), Ve = Sn.create({
6006
6078
  name: "history",
6007
6079
  addOptions() {
6008
6080
  return {
@@ -6012,13 +6084,13 @@ const Oi = Ii(!1, !0), Di = Ii(!0, !0), Ve = An.create({
6012
6084
  },
6013
6085
  addCommands() {
6014
6086
  return {
6015
- undo: () => ({ state: n, dispatch: e }) => Oi(n, e),
6016
- redo: () => ({ state: n, dispatch: e }) => Di(n, e)
6087
+ undo: () => ({ state: n, dispatch: e }) => Ii(n, e),
6088
+ redo: () => ({ state: n, dispatch: e }) => Oi(n, e)
6017
6089
  };
6018
6090
  },
6019
6091
  addProseMirrorPlugins() {
6020
6092
  return [
6021
- Ca(this.options)
6093
+ Sa(this.options)
6022
6094
  ];
6023
6095
  },
6024
6096
  addKeyboardShortcuts() {
@@ -6040,7 +6112,7 @@ const Oi = Ii(!1, !0), Di = Ii(!0, !0), Ve = An.create({
6040
6112
  group: "inline"
6041
6113
  });
6042
6114
  function va(n = {}) {
6043
- return new Dt({
6115
+ return new Ot({
6044
6116
  view(e) {
6045
6117
  return new Ma(e, n);
6046
6118
  }
@@ -6104,7 +6176,7 @@ class Ma {
6104
6176
  if (t && !s) {
6105
6177
  let o = t.pos;
6106
6178
  if (this.editorView.dragging && this.editorView.dragging.slice) {
6107
- let l = Mi(this.editorView.state.doc, o, this.editorView.dragging.slice);
6179
+ let l = vi(this.editorView.state.doc, o, this.editorView.dragging.slice);
6108
6180
  l != null && (o = l);
6109
6181
  }
6110
6182
  this.setCursor(o), this.scheduleRemoval(5e3);
@@ -6120,7 +6192,7 @@ class Ma {
6120
6192
  this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
6121
6193
  }
6122
6194
  }
6123
- const wa = An.create({
6195
+ const wa = Sn.create({
6124
6196
  name: "dropCursor",
6125
6197
  addOptions() {
6126
6198
  return {
@@ -6218,7 +6290,7 @@ for (var F = 0; F < 10; F++) ge[48 + F] = ge[96 + F] = String(F);
6218
6290
  for (var F = 1; F <= 24; F++) ge[F + 111] = "F" + F;
6219
6291
  for (var F = 65; F <= 90; F++)
6220
6292
  ge[F] = String.fromCharCode(F + 32), Ct[F] = String.fromCharCode(F);
6221
- for (var Qt in ge) Ct.hasOwnProperty(Qt) || (Ct[Qt] = ge[Qt]);
6293
+ for (var Xt in ge) Ct.hasOwnProperty(Xt) || (Ct[Xt] = ge[Xt]);
6222
6294
  function Ia(n) {
6223
6295
  var e = Ea && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Na && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Ct : ge)[n.keyCode] || n.key || "Unidentified";
6224
6296
  return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
@@ -6251,24 +6323,24 @@ function Pa(n) {
6251
6323
  e[La(t)] = n[t];
6252
6324
  return e;
6253
6325
  }
6254
- function Yt(n, e, t = !0) {
6326
+ function Qt(n, e, t = !0) {
6255
6327
  return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
6256
6328
  }
6257
6329
  function Ra(n) {
6258
6330
  let e = Pa(n);
6259
6331
  return function(t, r) {
6260
- let i = Ia(r), s, o = e[Yt(i, r)];
6332
+ let i = Ia(r), s, o = e[Qt(i, r)];
6261
6333
  if (o && o(t.state, t.dispatch, t))
6262
6334
  return !0;
6263
6335
  if (i.length == 1 && i != " ") {
6264
6336
  if (r.shiftKey) {
6265
- let l = e[Yt(i, r, !1)];
6337
+ let l = e[Qt(i, r, !1)];
6266
6338
  if (l && l(t.state, t.dispatch, t))
6267
6339
  return !0;
6268
6340
  }
6269
6341
  if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
6270
6342
  !(Da && r.ctrlKey && r.altKey) && (s = ge[r.keyCode]) && s != i) {
6271
- let l = e[Yt(s, r)];
6343
+ let l = e[Qt(s, r)];
6272
6344
  if (l && l(t.state, t.dispatch, t))
6273
6345
  return !0;
6274
6346
  }
@@ -6280,16 +6352,16 @@ const Ee = function(n) {
6280
6352
  for (var e = 0; ; e++)
6281
6353
  if (n = n.previousSibling, !n)
6282
6354
  return e;
6283
- }, Li = function(n, e, t, r) {
6355
+ }, Di = function(n, e, t, r) {
6284
6356
  return t && (Tr(n, e, t, r, -1) || Tr(n, e, t, r, 1));
6285
6357
  }, Fa = /^(img|br|input|textarea|hr)$/i;
6286
6358
  function Tr(n, e, t, r, i) {
6287
6359
  for (var s; ; ) {
6288
6360
  if (n == t && e == r)
6289
6361
  return !0;
6290
- if (e == (i < 0 ? 0 : At(n))) {
6362
+ if (e == (i < 0 ? 0 : St(n))) {
6291
6363
  let o = n.parentNode;
6292
- if (!o || o.nodeType != 1 || Dn(n) || Fa.test(n.nodeName) || n.contentEditable == "false")
6364
+ if (!o || o.nodeType != 1 || On(n) || Fa.test(n.nodeName) || n.contentEditable == "false")
6293
6365
  return !1;
6294
6366
  e = Ee(n) + (i < 0 ? 0 : 1), n = o;
6295
6367
  } else if (n.nodeType == 1) {
@@ -6300,40 +6372,40 @@ function Tr(n, e, t, r, i) {
6300
6372
  else
6301
6373
  return !1;
6302
6374
  else
6303
- n = o, e = i < 0 ? At(n) : 0;
6375
+ n = o, e = i < 0 ? St(n) : 0;
6304
6376
  } else
6305
6377
  return !1;
6306
6378
  }
6307
6379
  }
6308
- function At(n) {
6380
+ function St(n) {
6309
6381
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
6310
6382
  }
6311
6383
  function za(n, e, t) {
6312
- for (let r = e == 0, i = e == At(n); r || i; ) {
6384
+ for (let r = e == 0, i = e == St(n); r || i; ) {
6313
6385
  if (n == t)
6314
6386
  return !0;
6315
6387
  let s = Ee(n);
6316
6388
  if (n = n.parentNode, !n)
6317
6389
  return !1;
6318
- r = r && s == 0, i = i && s == At(n);
6390
+ r = r && s == 0, i = i && s == St(n);
6319
6391
  }
6320
6392
  }
6321
- function Dn(n) {
6393
+ function On(n) {
6322
6394
  let e;
6323
6395
  for (let t = n; t && !(e = t.pmViewDesc); t = t.parentNode)
6324
6396
  ;
6325
6397
  return e && e.node && e.node.isBlock && (e.dom == n || e.contentDOM == n);
6326
6398
  }
6327
- const Pi = function(n) {
6328
- return n.focusNode && Li(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
6399
+ const Li = function(n) {
6400
+ return n.focusNode && Di(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
6329
6401
  };
6330
- function Ri(n, e) {
6402
+ function Pi(n, e) {
6331
6403
  let t = document.createEvent("Event");
6332
6404
  return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
6333
6405
  }
6334
- const se = typeof navigator < "u" ? navigator : null, vr = typeof document < "u" ? document : null, ye = se && se.userAgent || "", pn = /Edge\/(\d+)/.exec(ye), Fi = /MSIE \d/.exec(ye), mn = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ye), tt = !!(Fi || mn || pn), zi = Fi ? document.documentMode : mn ? +mn[1] : pn ? +pn[1] : 0, Lt = !tt && /gecko\/(\d+)/i.test(ye);
6335
- Lt && +(/Firefox\/(\d+)/.exec(ye) || [0, 0])[1];
6336
- const gn = !tt && /Chrome\/(\d+)/.exec(ye), ce = !!gn, Bi = gn ? +gn[1] : 0, Ne = !tt && !!se && /Apple Computer/.test(se.vendor), Ln = Ne && (/Mobile\/\w+/.test(ye) || !!se && se.maxTouchPoints > 2), W = Ln || (se ? /Mac/.test(se.platform) : !1), Hi = se ? /Win/.test(se.platform) : !1, nt = /Android \d/.test(ye), Pn = !!vr && "webkitFontSmoothing" in vr.documentElement.style, Ba = Pn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6406
+ const se = typeof navigator < "u" ? navigator : null, vr = typeof document < "u" ? document : null, ye = se && se.userAgent || "", hn = /Edge\/(\d+)/.exec(ye), Ri = /MSIE \d/.exec(ye), pn = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ye), tt = !!(Ri || pn || hn), Fi = Ri ? document.documentMode : pn ? +pn[1] : hn ? +hn[1] : 0, Dt = !tt && /gecko\/(\d+)/i.test(ye);
6407
+ Dt && +(/Firefox\/(\d+)/.exec(ye) || [0, 0])[1];
6408
+ const mn = !tt && /Chrome\/(\d+)/.exec(ye), ce = !!mn, zi = mn ? +mn[1] : 0, Ne = !tt && !!se && /Apple Computer/.test(se.vendor), Dn = Ne && (/Mobile\/\w+/.test(ye) || !!se && se.maxTouchPoints > 2), W = Dn || (se ? /Mac/.test(se.platform) : !1), Bi = se ? /Win/.test(se.platform) : !1, nt = /Android \d/.test(ye), Ln = !!vr && "webkitFontSmoothing" in vr.documentElement.style, Ba = Ln ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6337
6409
  function Ha(n, e = null) {
6338
6410
  let t = n.domSelectionRange(), r = n.state.doc;
6339
6411
  if (!t.focusNode)
@@ -6342,7 +6414,7 @@ function Ha(n, e = null) {
6342
6414
  if (o < 0)
6343
6415
  return null;
6344
6416
  let l = r.resolve(o), a, c;
6345
- if (Pi(t)) {
6417
+ if (Li(t)) {
6346
6418
  for (a = o; i && !i.node; )
6347
6419
  i = i.parent;
6348
6420
  let f = i.node;
@@ -6368,19 +6440,19 @@ function Ha(n, e = null) {
6368
6440
  let u = r.resolve(a);
6369
6441
  if (!c) {
6370
6442
  let f = e == "pointer" || n.state.selection.head < l.pos && !s ? 1 : -1;
6371
- c = Vi(n, u, l, f);
6443
+ c = $i(n, u, l, f);
6372
6444
  }
6373
6445
  return c;
6374
6446
  }
6375
- function $i(n) {
6447
+ function Hi(n) {
6376
6448
  return n.editable ? n.hasFocus() : Ja(n) && document.activeElement && document.activeElement.contains(n.dom);
6377
6449
  }
6378
- function Rn(n, e = !1) {
6450
+ function Pn(n, e = !1) {
6379
6451
  let t = n.state.selection;
6380
- if (Ka(n, t), !!$i(n)) {
6452
+ if (Ka(n, t), !!Hi(n)) {
6381
6453
  if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && ce) {
6382
6454
  let r = n.domSelectionRange(), i = n.domObserver.currentSelection;
6383
- if (r.anchorNode && i.anchorNode && Li(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
6455
+ if (r.anchorNode && i.anchorNode && Di(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
6384
6456
  n.input.mouseDown.delayedSelectionSync = !0, n.domObserver.setCurSelection();
6385
6457
  return;
6386
6458
  }
@@ -6394,19 +6466,19 @@ function Rn(n, e = !1) {
6394
6466
  n.domObserver.setCurSelection(), n.domObserver.connectSelection();
6395
6467
  }
6396
6468
  }
6397
- const Mr = Ne || ce && Bi < 63;
6469
+ const Mr = Ne || ce && zi < 63;
6398
6470
  function wr(n, e) {
6399
6471
  let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
6400
6472
  if (Ne && i && i.contentEditable == "false")
6401
- return en(i);
6473
+ return Yt(i);
6402
6474
  if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
6403
6475
  if (i)
6404
- return en(i);
6476
+ return Yt(i);
6405
6477
  if (s)
6406
- return en(s);
6478
+ return Yt(s);
6407
6479
  }
6408
6480
  }
6409
- function en(n) {
6481
+ function Yt(n) {
6410
6482
  return n.contentEditable = "true", Ne && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
6411
6483
  }
6412
6484
  function Er(n) {
@@ -6418,7 +6490,7 @@ function $a(n) {
6418
6490
  let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
6419
6491
  e.addEventListener("selectionchange", n.input.hideSelectionGuard = () => {
6420
6492
  (t.anchorNode != r || t.anchorOffset != i) && (e.removeEventListener("selectionchange", n.input.hideSelectionGuard), setTimeout(() => {
6421
- (!$i(n) || n.state.selection.visible) && n.dom.classList.remove("ProseMirror-hideselection");
6493
+ (!Hi(n) || n.state.selection.visible) && n.dom.classList.remove("ProseMirror-hideselection");
6422
6494
  }, 20));
6423
6495
  });
6424
6496
  }
@@ -6427,7 +6499,7 @@ function Va(n) {
6427
6499
  if (!e)
6428
6500
  return;
6429
6501
  let t = n.cursorWrapper.dom, r = t.nodeName == "IMG";
6430
- r ? e.collapse(t.parentNode, Ee(t) + 1) : e.collapse(t, 0), !r && !n.state.selection.visible && tt && zi <= 11 && (t.disabled = !0, t.disabled = !1);
6502
+ r ? e.collapse(t.parentNode, Ee(t) + 1) : e.collapse(t, 0), !r && !n.state.selection.visible && tt && Fi <= 11 && (t.disabled = !0, t.disabled = !1);
6431
6503
  }
6432
6504
  function Ka(n, e) {
6433
6505
  if (e instanceof T) {
@@ -6439,7 +6511,7 @@ function Ka(n, e) {
6439
6511
  function Nr(n) {
6440
6512
  n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
6441
6513
  }
6442
- function Vi(n, e, t, r) {
6514
+ function $i(n, e, t, r) {
6443
6515
  return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || w.between(e, t, r);
6444
6516
  }
6445
6517
  function Ja(n) {
@@ -6452,7 +6524,7 @@ function Ja(n) {
6452
6524
  return !1;
6453
6525
  }
6454
6526
  }
6455
- function yn(n, e) {
6527
+ function gn(n, e) {
6456
6528
  let { $anchor: t, $head: r } = n.selection, i = e > 0 ? t.max(r) : t.min(r), s = i.parent.inlineContent ? i.depth ? n.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
6457
6529
  return s && N.findFrom(s, e);
6458
6530
  }
@@ -6470,26 +6542,26 @@ function Ir(n, e, t) {
6470
6542
  return he(n, new w(r.$anchor, o));
6471
6543
  } else if (r.empty) {
6472
6544
  if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
6473
- let i = yn(n.state, e);
6545
+ let i = gn(n.state, e);
6474
6546
  return i && i instanceof T ? he(n, i) : !1;
6475
6547
  } else if (!(W && t.indexOf("m") > -1)) {
6476
6548
  let i = r.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, o;
6477
6549
  if (!s || s.isText)
6478
6550
  return !1;
6479
6551
  let l = e < 0 ? i.pos - s.nodeSize : i.pos;
6480
- return s.isAtom || (o = n.docView.descAt(l)) && !o.contentDOM ? T.isSelectable(s) ? he(n, new T(e < 0 ? n.state.doc.resolve(i.pos - s.nodeSize) : i)) : Pn ? he(n, new w(n.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
6552
+ return s.isAtom || (o = n.docView.descAt(l)) && !o.contentDOM ? T.isSelectable(s) ? he(n, new T(e < 0 ? n.state.doc.resolve(i.pos - s.nodeSize) : i)) : Ln ? he(n, new w(n.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
6481
6553
  }
6482
6554
  } else return !1;
6483
6555
  else {
6484
6556
  if (r instanceof T && r.node.isInline)
6485
6557
  return he(n, new w(e > 0 ? r.$to : r.$from));
6486
6558
  {
6487
- let i = yn(n.state, e);
6559
+ let i = gn(n.state, e);
6488
6560
  return i ? he(n, i) : !1;
6489
6561
  }
6490
6562
  }
6491
6563
  }
6492
- function Tt(n) {
6564
+ function At(n) {
6493
6565
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
6494
6566
  }
6495
6567
  function Ue(n, e) {
@@ -6504,7 +6576,7 @@ function qa(n) {
6504
6576
  if (!t)
6505
6577
  return;
6506
6578
  let i, s, o = !1;
6507
- for (Lt && t.nodeType == 1 && r < Tt(t) && Ue(t.childNodes[r], -1) && (o = !0); ; )
6579
+ for (Dt && t.nodeType == 1 && r < At(t) && Ue(t.childNodes[r], -1) && (o = !0); ; )
6508
6580
  if (r > 0) {
6509
6581
  if (t.nodeType != 1)
6510
6582
  break;
@@ -6518,14 +6590,14 @@ function qa(n) {
6518
6590
  break;
6519
6591
  }
6520
6592
  } else {
6521
- if (Ki(t))
6593
+ if (Vi(t))
6522
6594
  break;
6523
6595
  {
6524
6596
  let l = t.previousSibling;
6525
6597
  for (; l && Ue(l, -1); )
6526
6598
  i = t.parentNode, s = Ee(l), l = l.previousSibling;
6527
6599
  if (l)
6528
- t = l, r = Tt(t);
6600
+ t = l, r = At(t);
6529
6601
  else {
6530
6602
  if (t = t.parentNode, t == n.dom)
6531
6603
  break;
@@ -6533,13 +6605,13 @@ function qa(n) {
6533
6605
  }
6534
6606
  }
6535
6607
  }
6536
- o ? bn(n, t, r) : i && bn(n, i, s);
6608
+ o ? yn(n, t, r) : i && yn(n, i, s);
6537
6609
  }
6538
6610
  function Ua(n) {
6539
6611
  let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
6540
6612
  if (!t)
6541
6613
  return;
6542
- let i = Tt(t), s, o;
6614
+ let i = At(t), s, o;
6543
6615
  for (; ; )
6544
6616
  if (r < i) {
6545
6617
  if (t.nodeType != 1)
@@ -6550,14 +6622,14 @@ function Ua(n) {
6550
6622
  else
6551
6623
  break;
6552
6624
  } else {
6553
- if (Ki(t))
6625
+ if (Vi(t))
6554
6626
  break;
6555
6627
  {
6556
6628
  let l = t.nextSibling;
6557
6629
  for (; l && Ue(l, 1); )
6558
6630
  s = l.parentNode, o = Ee(l) + 1, l = l.nextSibling;
6559
6631
  if (l)
6560
- t = l, r = 0, i = Tt(t);
6632
+ t = l, r = 0, i = At(t);
6561
6633
  else {
6562
6634
  if (t = t.parentNode, t == n.dom)
6563
6635
  break;
@@ -6565,14 +6637,14 @@ function Ua(n) {
6565
6637
  }
6566
6638
  }
6567
6639
  }
6568
- s && bn(n, s, o);
6640
+ s && yn(n, s, o);
6569
6641
  }
6570
- function Ki(n) {
6642
+ function Vi(n) {
6571
6643
  let e = n.pmViewDesc;
6572
6644
  return e && e.node && e.node.isBlock;
6573
6645
  }
6574
6646
  function Wa(n, e) {
6575
- for (; n && e == n.childNodes.length && !Dn(n); )
6647
+ for (; n && e == n.childNodes.length && !On(n); )
6576
6648
  e = Ee(n) + 1, n = n.parentNode;
6577
6649
  for (; n && e < n.childNodes.length; ) {
6578
6650
  let t = n.childNodes[e];
@@ -6584,7 +6656,7 @@ function Wa(n, e) {
6584
6656
  }
6585
6657
  }
6586
6658
  function ja(n, e) {
6587
- for (; n && !e && !Dn(n); )
6659
+ for (; n && !e && !On(n); )
6588
6660
  e = Ee(n), n = n.parentNode;
6589
6661
  for (; n && e; ) {
6590
6662
  let t = n.childNodes[e - 1];
@@ -6595,7 +6667,7 @@ function ja(n, e) {
6595
6667
  n = t, e = n.childNodes.length;
6596
6668
  }
6597
6669
  }
6598
- function bn(n, e, t) {
6670
+ function yn(n, e, t) {
6599
6671
  if (e.nodeType != 3) {
6600
6672
  let s, o;
6601
6673
  (o = Wa(e, t)) ? (e = o, t = 0) : (s = ja(e, t)) && (e = s, t = s.nodeValue.length);
@@ -6603,19 +6675,19 @@ function bn(n, e, t) {
6603
6675
  let r = n.domSelection();
6604
6676
  if (!r)
6605
6677
  return;
6606
- if (Pi(r)) {
6678
+ if (Li(r)) {
6607
6679
  let s = document.createRange();
6608
6680
  s.setEnd(e, t), s.setStart(e, t), r.removeAllRanges(), r.addRange(s);
6609
6681
  } else r.extend && r.extend(e, t);
6610
6682
  n.domObserver.setCurSelection();
6611
6683
  let { state: i } = n;
6612
6684
  setTimeout(() => {
6613
- n.state == i && Rn(n);
6685
+ n.state == i && Pn(n);
6614
6686
  }, 50);
6615
6687
  }
6616
6688
  function Or(n, e) {
6617
6689
  let t = n.state.doc.resolve(e);
6618
- if (!(ce || Hi) && t.parent.inlineContent) {
6690
+ if (!(ce || Bi) && t.parent.inlineContent) {
6619
6691
  let i = n.coordsAtPos(e);
6620
6692
  if (e > t.start()) {
6621
6693
  let s = n.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
@@ -6636,7 +6708,7 @@ function Dr(n, e, t) {
6636
6708
  return !1;
6637
6709
  let { $from: i, $to: s } = r;
6638
6710
  if (!i.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
6639
- let o = yn(n.state, e);
6711
+ let o = gn(n.state, e);
6640
6712
  if (o && o instanceof T)
6641
6713
  return he(n, o);
6642
6714
  }
@@ -6704,7 +6776,7 @@ function Za(n, e) {
6704
6776
  }
6705
6777
  return !1;
6706
6778
  }
6707
- function Ji(n, e) {
6779
+ function Ki(n, e) {
6708
6780
  n.someProp("transformCopied", (p) => {
6709
6781
  e = p(e, n);
6710
6782
  });
@@ -6714,10 +6786,10 @@ function Ji(n, e) {
6714
6786
  let p = r.firstChild;
6715
6787
  t.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null), r = p.content;
6716
6788
  }
6717
- let o = n.someProp("clipboardSerializer") || It.fromSchema(n.state.schema), l = Gi(), a = l.createElement("div");
6789
+ let o = n.someProp("clipboardSerializer") || Nt.fromSchema(n.state.schema), l = _i(), a = l.createElement("div");
6718
6790
  a.appendChild(o.serializeFragment(r, { document: l }));
6719
6791
  let c = a.firstChild, u, f = 0;
6720
- for (; c && c.nodeType == 1 && (u = _i[c.nodeName.toLowerCase()]); ) {
6792
+ for (; c && c.nodeType == 1 && (u = ji[c.nodeName.toLowerCase()]); ) {
6721
6793
  for (let p = u.length - 1; p >= 0; p--) {
6722
6794
  let y = l.createElement(u[p]);
6723
6795
  for (; a.firstChild; )
@@ -6732,7 +6804,7 @@ function Ji(n, e) {
6732
6804
  `);
6733
6805
  return { dom: a, text: d, slice: e };
6734
6806
  }
6735
- function qi(n, e, t, r, i) {
6807
+ function Ji(n, e, t, r, i) {
6736
6808
  let s = i.parent.type.spec.code, o, l;
6737
6809
  if (!t && !e)
6738
6810
  return null;
@@ -6741,7 +6813,7 @@ function qi(n, e, t, r, i) {
6741
6813
  if (n.someProp("transformPastedText", (d) => {
6742
6814
  e = d(e, s || r, n);
6743
6815
  }), s)
6744
- return l = new C(S.from(n.state.schema.text(e.replace(/\r\n?/g, `
6816
+ return l = new S(C.from(n.state.schema.text(e.replace(/\r\n?/g, `
6745
6817
  `))), 0, 0), n.someProp("transformPasted", (d) => {
6746
6818
  l = d(l, n, !0);
6747
6819
  }), l;
@@ -6749,7 +6821,7 @@ function qi(n, e, t, r, i) {
6749
6821
  if (f)
6750
6822
  l = f;
6751
6823
  else {
6752
- let d = i.marks(), { schema: p } = n.state, y = It.fromSchema(p);
6824
+ let d = i.marks(), { schema: p } = n.state, y = Nt.fromSchema(p);
6753
6825
  o = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
6754
6826
  let g = o.appendChild(document.createElement("p"));
6755
6827
  m && g.appendChild(y.serializeNode(p.text(m, d)));
@@ -6758,7 +6830,7 @@ function qi(n, e, t, r, i) {
6758
6830
  } else
6759
6831
  n.someProp("transformPastedHTML", (f) => {
6760
6832
  t = f(t, n);
6761
- }), o = ec(t), Pn && tc(o);
6833
+ }), o = ec(t), Ln && tc(o);
6762
6834
  let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
6763
6835
  if (u && u[3])
6764
6836
  for (let f = +u[3]; f > 0; f--) {
@@ -6769,7 +6841,7 @@ function qi(n, e, t, r, i) {
6769
6841
  break;
6770
6842
  o = d;
6771
6843
  }
6772
- if (l || (l = (n.someProp("clipboardParser") || n.someProp("domParser") || bt.fromSchema(n.state.schema)).parseSlice(o, {
6844
+ if (l || (l = (n.someProp("clipboardParser") || n.someProp("domParser") || yt.fromSchema(n.state.schema)).parseSlice(o, {
6773
6845
  preserveWhitespace: !!(a || u),
6774
6846
  context: i,
6775
6847
  ruleFromNode(d) {
@@ -6777,7 +6849,7 @@ function qi(n, e, t, r, i) {
6777
6849
  }
6778
6850
  })), u)
6779
6851
  l = nc(Rr(l, +u[1], +u[2]), u[4]);
6780
- else if (l = C.maxOpen(Qa(l.content, i), !0), l.openStart || l.openEnd) {
6852
+ else if (l = S.maxOpen(Qa(l.content, i), !0), l.openStart || l.openEnd) {
6781
6853
  let f = 0, d = 0;
6782
6854
  for (let p = l.content.firstChild; f < l.openStart && !p.type.spec.isolating; f++, p = p.firstChild)
6783
6855
  ;
@@ -6801,46 +6873,46 @@ function Qa(n, e) {
6801
6873
  let a = i.findWrapping(l.type), c;
6802
6874
  if (!a)
6803
6875
  return o = null;
6804
- if (c = o.length && s.length && Wi(a, s, l, o[o.length - 1], 0))
6876
+ if (c = o.length && s.length && Ui(a, s, l, o[o.length - 1], 0))
6805
6877
  o[o.length - 1] = c;
6806
6878
  else {
6807
- o.length && (o[o.length - 1] = ji(o[o.length - 1], s.length));
6808
- let u = Ui(l, a);
6879
+ o.length && (o[o.length - 1] = Wi(o[o.length - 1], s.length));
6880
+ let u = qi(l, a);
6809
6881
  o.push(u), i = i.matchType(u.type), s = a;
6810
6882
  }
6811
6883
  }), o)
6812
- return S.from(o);
6884
+ return C.from(o);
6813
6885
  }
6814
6886
  return n;
6815
6887
  }
6816
- function Ui(n, e, t = 0) {
6888
+ function qi(n, e, t = 0) {
6817
6889
  for (let r = e.length - 1; r >= t; r--)
6818
- n = e[r].create(null, S.from(n));
6890
+ n = e[r].create(null, C.from(n));
6819
6891
  return n;
6820
6892
  }
6821
- function Wi(n, e, t, r, i) {
6893
+ function Ui(n, e, t, r, i) {
6822
6894
  if (i < n.length && i < e.length && n[i] == e[i]) {
6823
- let s = Wi(n, e, t, r.lastChild, i + 1);
6895
+ let s = Ui(n, e, t, r.lastChild, i + 1);
6824
6896
  if (s)
6825
6897
  return r.copy(r.content.replaceChild(r.childCount - 1, s));
6826
6898
  if (r.contentMatchAt(r.childCount).matchType(i == n.length - 1 ? t.type : n[i + 1]))
6827
- return r.copy(r.content.append(S.from(Ui(t, n, i + 1))));
6899
+ return r.copy(r.content.append(C.from(qi(t, n, i + 1))));
6828
6900
  }
6829
6901
  }
6830
- function ji(n, e) {
6902
+ function Wi(n, e) {
6831
6903
  if (e == 0)
6832
6904
  return n;
6833
- let t = n.content.replaceChild(n.childCount - 1, ji(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(S.empty, !0);
6905
+ let t = n.content.replaceChild(n.childCount - 1, Wi(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(C.empty, !0);
6834
6906
  return n.copy(t.append(r));
6835
6907
  }
6836
- function xn(n, e, t, r, i, s) {
6908
+ function bn(n, e, t, r, i, s) {
6837
6909
  let o = e < 0 ? n.firstChild : n.lastChild, l = o.content;
6838
- return n.childCount > 1 && (s = 0), i < r - 1 && (l = xn(l, e, t, r, i + 1, s)), i >= t && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(S.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(l));
6910
+ return n.childCount > 1 && (s = 0), i < r - 1 && (l = bn(l, e, t, r, i + 1, s)), i >= t && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(C.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(l));
6839
6911
  }
6840
6912
  function Rr(n, e, t) {
6841
- return e < n.openStart && (n = new C(xn(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new C(xn(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
6913
+ return e < n.openStart && (n = new S(bn(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new S(bn(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
6842
6914
  }
6843
- const _i = {
6915
+ const ji = {
6844
6916
  thead: ["table"],
6845
6917
  tbody: ["table"],
6846
6918
  tfoot: ["table"],
@@ -6852,19 +6924,19 @@ const _i = {
6852
6924
  th: ["table", "tbody", "tr"]
6853
6925
  };
6854
6926
  let Fr = null;
6855
- function Gi() {
6927
+ function _i() {
6856
6928
  return Fr || (Fr = document.implementation.createHTMLDocument("title"));
6857
6929
  }
6858
- let tn = null;
6930
+ let en = null;
6859
6931
  function Ya(n) {
6860
6932
  let e = window.trustedTypes;
6861
- return e ? (tn || (tn = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), tn.createHTML(n)) : n;
6933
+ return e ? (en || (en = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), en.createHTML(n)) : n;
6862
6934
  }
6863
6935
  function ec(n) {
6864
6936
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
6865
6937
  e && (n = n.slice(e[0].length));
6866
- let t = Gi().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
6867
- if ((i = r && _i[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = Ya(n), i)
6938
+ let t = _i().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
6939
+ if ((i = r && ji[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = Ya(n), i)
6868
6940
  for (let s = 0; s < i.length; s++)
6869
6941
  t = t.querySelector(i[s]) || t;
6870
6942
  return t;
@@ -6890,9 +6962,9 @@ function nc(n, e) {
6890
6962
  let a = t.nodes[r[l]];
6891
6963
  if (!a || a.hasRequiredAttrs())
6892
6964
  break;
6893
- i = S.from(a.create(r[l + 1], i)), s++, o++;
6965
+ i = C.from(a.create(r[l + 1], i)), s++, o++;
6894
6966
  }
6895
- return new C(i, s, o);
6967
+ return new S(i, s, o);
6896
6968
  }
6897
6969
  const ee = {}, J = {};
6898
6970
  function pe(n, e) {
@@ -6900,11 +6972,11 @@ function pe(n, e) {
6900
6972
  }
6901
6973
  J.keydown = (n, e) => {
6902
6974
  let t = e;
6903
- if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Xi(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(nt && ce && t.keyCode == 13)))
6904
- if (t.keyCode != 229 && n.domObserver.forceFlush(), Ln && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
6975
+ if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Zi(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(nt && ce && t.keyCode == 13)))
6976
+ if (t.keyCode != 229 && n.domObserver.forceFlush(), Dn && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
6905
6977
  let r = Date.now();
6906
6978
  n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
6907
- n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, Ri(13, "Enter"))), n.input.lastIOSEnter = 0);
6979
+ n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, Pi(13, "Enter"))), n.input.lastIOSEnter = 0);
6908
6980
  }, 200);
6909
6981
  } else n.someProp("handleKeyDown", (r) => r(n, t)) || Za(n, t) ? t.preventDefault() : pe(n, "key");
6910
6982
  };
@@ -6913,7 +6985,7 @@ J.keyup = (n, e) => {
6913
6985
  };
6914
6986
  J.keypress = (n, e) => {
6915
6987
  let t = e;
6916
- if (Xi(n, t) || !t.charCode || t.ctrlKey && !t.altKey || W && t.metaKey)
6988
+ if (Zi(n, t) || !t.charCode || t.ctrlKey && !t.altKey || W && t.metaKey)
6917
6989
  return;
6918
6990
  if (n.someProp("handleKeyPress", (i) => i(n, t))) {
6919
6991
  t.preventDefault();
@@ -6925,14 +6997,14 @@ J.keypress = (n, e) => {
6925
6997
  !/[\r\n]/.test(i) && !n.someProp("handleTextInput", (o) => o(n, r.$from.pos, r.$to.pos, i, s)) && n.dispatch(s()), t.preventDefault();
6926
6998
  }
6927
6999
  };
6928
- function Pt(n) {
7000
+ function Lt(n) {
6929
7001
  return { left: n.clientX, top: n.clientY };
6930
7002
  }
6931
7003
  function rc(n, e) {
6932
7004
  let t = e.x - n.clientX, r = e.y - n.clientY;
6933
7005
  return t * t + r * r < 100;
6934
7006
  }
6935
- function Fn(n, e, t, r, i) {
7007
+ function Rn(n, e, t, r, i) {
6936
7008
  if (r == -1)
6937
7009
  return !1;
6938
7010
  let s = n.state.doc.resolve(r);
@@ -6969,13 +7041,13 @@ function sc(n, e) {
6969
7041
  return i != null ? (Pe(n, T.create(n.state.doc, i)), !0) : !1;
6970
7042
  }
6971
7043
  function oc(n, e, t, r, i) {
6972
- return Fn(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? sc(n, t) : ic(n, t));
7044
+ return Rn(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? sc(n, t) : ic(n, t));
6973
7045
  }
6974
7046
  function lc(n, e, t, r) {
6975
- return Fn(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
7047
+ return Rn(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
6976
7048
  }
6977
7049
  function ac(n, e, t, r) {
6978
- return Fn(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || cc(n, t, r);
7050
+ return Rn(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || cc(n, t, r);
6979
7051
  }
6980
7052
  function cc(n, e, t) {
6981
7053
  if (t.button != 0)
@@ -6995,21 +7067,21 @@ function cc(n, e, t) {
6995
7067
  return !0;
6996
7068
  }
6997
7069
  }
6998
- function zn(n) {
6999
- return vt(n);
7070
+ function Fn(n) {
7071
+ return Tt(n);
7000
7072
  }
7001
- const Zi = W ? "metaKey" : "ctrlKey";
7073
+ const Gi = W ? "metaKey" : "ctrlKey";
7002
7074
  ee.mousedown = (n, e) => {
7003
7075
  let t = e;
7004
7076
  n.input.shiftKey = t.shiftKey;
7005
- let r = zn(n), i = Date.now(), s = "singleClick";
7006
- i - n.input.lastClick.time < 500 && rc(t, n.input.lastClick) && !t[Zi] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
7007
- let o = n.posAtCoords(Pt(t));
7077
+ let r = Fn(n), i = Date.now(), s = "singleClick";
7078
+ i - n.input.lastClick.time < 500 && rc(t, n.input.lastClick) && !t[Gi] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
7079
+ let o = n.posAtCoords(Lt(t));
7008
7080
  o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new uc(n, o, t, !!r)) : (s == "doubleClick" ? lc : ac)(n, o.pos, o.inside, t) ? t.preventDefault() : pe(n, "pointer"));
7009
7081
  };
7010
7082
  class uc {
7011
7083
  constructor(e, t, r, i) {
7012
- this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Zi], this.allowDefault = r.shiftKey;
7084
+ this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Gi], this.allowDefault = r.shiftKey;
7013
7085
  let s, o;
7014
7086
  if (t.inside > -1)
7015
7087
  s = e.state.doc.nodeAt(t.inside), o = t.inside;
@@ -7024,19 +7096,19 @@ class uc {
7024
7096
  node: s,
7025
7097
  pos: o,
7026
7098
  addAttr: !!(this.target && !this.target.draggable),
7027
- setUneditable: !!(this.target && Lt && !this.target.hasAttribute("contentEditable"))
7099
+ setUneditable: !!(this.target && Dt && !this.target.hasAttribute("contentEditable"))
7028
7100
  }), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
7029
7101
  this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
7030
7102
  }, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), pe(e, "pointer");
7031
7103
  }
7032
7104
  done() {
7033
- this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => Rn(this.view)), this.view.input.mouseDown = null;
7105
+ this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => Pn(this.view)), this.view.input.mouseDown = null;
7034
7106
  }
7035
7107
  up(e) {
7036
7108
  if (this.done(), !this.view.dom.contains(e.target))
7037
7109
  return;
7038
7110
  let t = this.pos;
7039
- this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Pt(e))), this.updateAllowDefault(e), this.allowDefault || !t ? pe(this.view, "pointer") : oc(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
7111
+ this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Lt(e))), this.updateAllowDefault(e), this.allowDefault || !t ? pe(this.view, "pointer") : oc(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
7040
7112
  Ne && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
7041
7113
  // cursor, but still report that the node is selected
7042
7114
  // when asked through getSelection. You'll then get a
@@ -7054,13 +7126,13 @@ class uc {
7054
7126
  }
7055
7127
  }
7056
7128
  ee.touchstart = (n) => {
7057
- n.input.lastTouch = Date.now(), zn(n), pe(n, "pointer");
7129
+ n.input.lastTouch = Date.now(), Fn(n), pe(n, "pointer");
7058
7130
  };
7059
7131
  ee.touchmove = (n) => {
7060
7132
  n.input.lastTouch = Date.now(), pe(n, "pointer");
7061
7133
  };
7062
- ee.contextmenu = (n) => zn(n);
7063
- function Xi(n, e) {
7134
+ ee.contextmenu = (n) => Fn(n);
7135
+ function Zi(n, e) {
7064
7136
  return n.composing ? !0 : Ne && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
7065
7137
  }
7066
7138
  const fc = nt ? 5e3 : -1;
@@ -7068,9 +7140,9 @@ J.compositionstart = J.compositionupdate = (n) => {
7068
7140
  if (!n.composing) {
7069
7141
  n.domObserver.flush();
7070
7142
  let { state: e } = n, t = e.selection.$to;
7071
- if (e.selection instanceof w && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || ce && Hi && dc(n)))
7072
- n.markCursor = n.state.storedMarks || t.marks(), vt(n, !0), n.markCursor = null;
7073
- else if (vt(n, !e.selection.empty), Lt && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
7143
+ if (e.selection instanceof w && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || ce && Bi && dc(n)))
7144
+ n.markCursor = n.state.storedMarks || t.marks(), Tt(n, !0), n.markCursor = null;
7145
+ else if (Tt(n, !e.selection.empty), Dt && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
7074
7146
  let r = n.domSelectionRange();
7075
7147
  for (let i = r.focusNode, s = r.focusOffset; i && i.nodeType == 1 && s != 0; ) {
7076
7148
  let o = s < 0 ? i.lastChild : i.childNodes[s - 1];
@@ -7086,7 +7158,7 @@ J.compositionstart = J.compositionupdate = (n) => {
7086
7158
  }
7087
7159
  n.input.composing = !0;
7088
7160
  }
7089
- Qi(n, fc);
7161
+ Xi(n, fc);
7090
7162
  };
7091
7163
  function dc(n) {
7092
7164
  let { focusNode: e, focusOffset: t } = n.domSelectionRange();
@@ -7096,10 +7168,10 @@ function dc(n) {
7096
7168
  return r.nodeType == 1 && r.contentEditable == "false";
7097
7169
  }
7098
7170
  J.compositionend = (n, e) => {
7099
- n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.badSafariComposition ? n.domObserver.forceFlush() : n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, Qi(n, 20));
7171
+ n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.badSafariComposition ? n.domObserver.forceFlush() : n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, Xi(n, 20));
7100
7172
  };
7101
- function Qi(n, e) {
7102
- clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => vt(n), e));
7173
+ function Xi(n, e) {
7174
+ clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => Tt(n), e));
7103
7175
  }
7104
7176
  function hc(n) {
7105
7177
  for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = pc()); n.input.compositionNodes.length > 0; )
@@ -7109,7 +7181,7 @@ function pc() {
7109
7181
  let n = document.createEvent("Event");
7110
7182
  return n.initEvent("event", !0, !0), n.timeStamp;
7111
7183
  }
7112
- function vt(n, e = !1) {
7184
+ function Tt(n, e = !1) {
7113
7185
  if (!(nt && n.domObserver.flushingSoon >= 0)) {
7114
7186
  if (n.domObserver.forceFlush(), hc(n), e || n.docView && n.docView.dirty) {
7115
7187
  let t = Ha(n), r = n.state.selection;
@@ -7128,12 +7200,12 @@ function mc(n, e) {
7128
7200
  t.parentNode && t.parentNode.removeChild(t), n.focus();
7129
7201
  }, 50);
7130
7202
  }
7131
- const Qe = tt && zi < 15 || Ln && Ba < 604;
7203
+ const Qe = tt && Fi < 15 || Dn && Ba < 604;
7132
7204
  ee.copy = J.cut = (n, e) => {
7133
7205
  let t = e, r = n.state.selection, i = t.type == "cut";
7134
7206
  if (r.empty)
7135
7207
  return;
7136
- let s = Qe ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = Ji(n, o);
7208
+ let s = Qe ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = Ki(n, o);
7137
7209
  s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : mc(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
7138
7210
  };
7139
7211
  function gc(n) {
@@ -7146,19 +7218,19 @@ function yc(n, e) {
7146
7218
  t || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
7147
7219
  let i = n.input.shiftKey && n.input.lastKeyCode != 45;
7148
7220
  setTimeout(() => {
7149
- n.focus(), r.parentNode && r.parentNode.removeChild(r), t ? kn(n, r.value, null, i, e) : kn(n, r.textContent, r.innerHTML, i, e);
7221
+ n.focus(), r.parentNode && r.parentNode.removeChild(r), t ? xn(n, r.value, null, i, e) : xn(n, r.textContent, r.innerHTML, i, e);
7150
7222
  }, 50);
7151
7223
  }
7152
- function kn(n, e, t, r, i) {
7153
- let s = qi(n, e, t, r, n.state.selection.$from);
7154
- if (n.someProp("handlePaste", (a) => a(n, i, s || C.empty)))
7224
+ function xn(n, e, t, r, i) {
7225
+ let s = Ji(n, e, t, r, n.state.selection.$from);
7226
+ if (n.someProp("handlePaste", (a) => a(n, i, s || S.empty)))
7155
7227
  return !0;
7156
7228
  if (!s)
7157
7229
  return !1;
7158
7230
  let o = gc(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
7159
7231
  return n.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
7160
7232
  }
7161
- function Yi(n) {
7233
+ function Qi(n) {
7162
7234
  let e = n.getData("text/plain") || n.getData("Text");
7163
7235
  if (e)
7164
7236
  return e;
@@ -7170,7 +7242,7 @@ J.paste = (n, e) => {
7170
7242
  if (n.composing && !nt)
7171
7243
  return;
7172
7244
  let r = Qe ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
7173
- r && kn(n, Yi(r), r.getData("text/html"), i, t) ? t.preventDefault() : yc(n, t);
7245
+ r && xn(n, Qi(r), r.getData("text/html"), i, t) ? t.preventDefault() : yc(n, t);
7174
7246
  };
7175
7247
  class bc {
7176
7248
  constructor(e, t, r) {
@@ -7178,7 +7250,7 @@ class bc {
7178
7250
  }
7179
7251
  }
7180
7252
  const xc = W ? "altKey" : "ctrlKey";
7181
- function es(n, e) {
7253
+ function Yi(n, e) {
7182
7254
  let t = n.someProp("dragCopies", (r) => !r(e));
7183
7255
  return t ?? !e[xc];
7184
7256
  }
@@ -7186,7 +7258,7 @@ ee.dragstart = (n, e) => {
7186
7258
  let t = e, r = n.input.mouseDown;
7187
7259
  if (r && r.done(), !t.dataTransfer)
7188
7260
  return;
7189
- let i = n.state.selection, s = i.empty ? null : n.posAtCoords(Pt(t)), o;
7261
+ let i = n.state.selection, s = i.empty ? null : n.posAtCoords(Lt(t)), o;
7190
7262
  if (!(s && s.pos >= i.from && s.pos <= (i instanceof T ? i.to - 1 : i.to))) {
7191
7263
  if (r && r.mightDrag)
7192
7264
  o = T.create(n.state.doc, r.mightDrag.pos);
@@ -7195,8 +7267,8 @@ ee.dragstart = (n, e) => {
7195
7267
  f && f.node.type.spec.draggable && f != n.docView && (o = T.create(n.state.doc, f.posBefore));
7196
7268
  }
7197
7269
  }
7198
- let l = (o || n.state.selection).content(), { dom: a, text: c, slice: u } = Ji(n, l);
7199
- (!t.dataTransfer.files.length || !ce || Bi > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Qe ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Qe || t.dataTransfer.setData("text/plain", c), n.dragging = new bc(u, es(n, t), o);
7270
+ let l = (o || n.state.selection).content(), { dom: a, text: c, slice: u } = Ki(n, l);
7271
+ (!t.dataTransfer.files.length || !ce || zi > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Qe ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Qe || t.dataTransfer.setData("text/plain", c), n.dragging = new bc(u, Yi(n, t), o);
7200
7272
  };
7201
7273
  ee.dragend = (n) => {
7202
7274
  let e = n.dragging;
@@ -7215,22 +7287,22 @@ J.drop = (n, e) => {
7215
7287
  function kc(n, e, t) {
7216
7288
  if (!e.dataTransfer)
7217
7289
  return;
7218
- let r = n.posAtCoords(Pt(e));
7290
+ let r = n.posAtCoords(Lt(e));
7219
7291
  if (!r)
7220
7292
  return;
7221
7293
  let i = n.state.doc.resolve(r.pos), s = t && t.slice;
7222
7294
  s ? n.someProp("transformPasted", (p) => {
7223
7295
  s = p(s, n, !1);
7224
- }) : s = qi(n, Yi(e.dataTransfer), Qe ? null : e.dataTransfer.getData("text/html"), !1, i);
7225
- let o = !!(t && es(n, e));
7226
- if (n.someProp("handleDrop", (p) => p(n, e, s || C.empty, o))) {
7296
+ }) : s = Ji(n, Qi(e.dataTransfer), Qe ? null : e.dataTransfer.getData("text/html"), !1, i);
7297
+ let o = !!(t && Yi(n, e));
7298
+ if (n.someProp("handleDrop", (p) => p(n, e, s || S.empty, o))) {
7227
7299
  e.preventDefault();
7228
7300
  return;
7229
7301
  }
7230
7302
  if (!s)
7231
7303
  return;
7232
7304
  e.preventDefault();
7233
- let l = s ? Mi(n.state.doc, i.pos, s) : i.pos;
7305
+ let l = s ? vi(n.state.doc, i.pos, s) : i.pos;
7234
7306
  l == null && (l = i.pos);
7235
7307
  let a = n.state.tr;
7236
7308
  if (o) {
@@ -7245,13 +7317,13 @@ function kc(n, e, t) {
7245
7317
  a.setSelection(new T(d));
7246
7318
  else {
7247
7319
  let p = a.mapping.map(l);
7248
- a.mapping.maps[a.mapping.maps.length - 1].forEach((y, m, g, b) => p = b), a.setSelection(Vi(n, d, a.doc.resolve(p)));
7320
+ a.mapping.maps[a.mapping.maps.length - 1].forEach((y, m, g, b) => p = b), a.setSelection($i(n, d, a.doc.resolve(p)));
7249
7321
  }
7250
7322
  n.focus(), n.dispatch(a.setMeta("uiEvent", "drop"));
7251
7323
  }
7252
7324
  ee.focus = (n) => {
7253
7325
  n.input.lastFocus = Date.now(), n.focused || (n.domObserver.stop(), n.dom.classList.add("ProseMirror-focused"), n.domObserver.start(), n.focused = !0, setTimeout(() => {
7254
- n.docView && n.hasFocus() && !n.domObserver.currentSelection.eq(n.domSelectionRange()) && Rn(n);
7326
+ n.docView && n.hasFocus() && !n.domObserver.currentSelection.eq(n.domSelectionRange()) && Pn(n);
7255
7327
  }, 20));
7256
7328
  };
7257
7329
  ee.blur = (n, e) => {
@@ -7263,7 +7335,7 @@ ee.beforeinput = (n, e) => {
7263
7335
  n.domObserver.flushSoon();
7264
7336
  let { domChangeCount: r } = n.input;
7265
7337
  setTimeout(() => {
7266
- if (n.input.domChangeCount != r || (n.dom.blur(), n.focus(), n.someProp("handleKeyDown", (s) => s(n, Ri(8, "Backspace")))))
7338
+ if (n.input.domChangeCount != r || (n.dom.blur(), n.focus(), n.someProp("handleKeyDown", (s) => s(n, Pi(8, "Backspace")))))
7267
7339
  return;
7268
7340
  let { $cursor: i } = n.state.selection;
7269
7341
  i && i.pos > 0 && n.dispatch(n.state.tr.delete(i.pos - 1, i.pos).scrollIntoView());
@@ -7283,7 +7355,7 @@ function Ye(n, e) {
7283
7355
  return !1;
7284
7356
  return !0;
7285
7357
  }
7286
- class Mt {
7358
+ class vt {
7287
7359
  constructor(e, t) {
7288
7360
  this.toDOM = e, this.spec = t || Me, this.side = this.spec.side || 0;
7289
7361
  }
@@ -7295,7 +7367,7 @@ class Mt {
7295
7367
  return !0;
7296
7368
  }
7297
7369
  eq(e) {
7298
- return this == e || e instanceof Mt && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Ye(this.spec, e.spec));
7370
+ return this == e || e instanceof vt && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Ye(this.spec, e.spec));
7299
7371
  }
7300
7372
  destroy(e) {
7301
7373
  this.spec.destroy && this.spec.destroy(e);
@@ -7321,7 +7393,7 @@ class me {
7321
7393
  destroy() {
7322
7394
  }
7323
7395
  }
7324
- class Bn {
7396
+ class zn {
7325
7397
  constructor(e, t) {
7326
7398
  this.attrs = e, this.spec = t || Me;
7327
7399
  }
@@ -7337,7 +7409,7 @@ class Bn {
7337
7409
  return i == t.from && !(s = e.child(r)).isText && i + s.nodeSize == t.to;
7338
7410
  }
7339
7411
  eq(e) {
7340
- return this == e || e instanceof Bn && Ye(this.attrs, e.attrs) && Ye(this.spec, e.spec);
7412
+ return this == e || e instanceof zn && Ye(this.attrs, e.attrs) && Ye(this.spec, e.spec);
7341
7413
  }
7342
7414
  destroy() {
7343
7415
  }
@@ -7376,7 +7448,7 @@ class ne {
7376
7448
  widget's current document position.
7377
7449
  */
7378
7450
  static widget(e, t, r) {
7379
- return new ne(e, e, new Mt(t, r));
7451
+ return new ne(e, e, new vt(t, r));
7380
7452
  }
7381
7453
  /**
7382
7454
  Creates an inline decoration, which adds the given attributes to
@@ -7391,7 +7463,7 @@ class ne {
7391
7463
  node, will receive the given attributes.
7392
7464
  */
7393
7465
  static node(e, t, r, i) {
7394
- return new ne(e, t, new Bn(r, i));
7466
+ return new ne(e, t, new zn(r, i));
7395
7467
  }
7396
7468
  /**
7397
7469
  The spec provided when creating this decoration. Can be useful
@@ -7410,7 +7482,7 @@ class ne {
7410
7482
  @internal
7411
7483
  */
7412
7484
  get widget() {
7413
- return this.type instanceof Mt;
7485
+ return this.type instanceof vt;
7414
7486
  }
7415
7487
  }
7416
7488
  const De = [], Me = {};
@@ -7427,7 +7499,7 @@ class L {
7427
7499
  you must make a copy if you want need to preserve that.
7428
7500
  */
7429
7501
  static create(e, t) {
7430
- return t.length ? wt(t, e, 0, Me) : $;
7502
+ return t.length ? Mt(t, e, 0, Me) : $;
7431
7503
  }
7432
7504
  /**
7433
7505
  Find all decorations in this set which touch the given range
@@ -7468,7 +7540,7 @@ class L {
7468
7540
  let a = this.local[l].map(e, r, i);
7469
7541
  a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
7470
7542
  }
7471
- return this.children.length ? Sc(this.children, o || [], e, t, r, i, s) : o ? new L(o.sort(we), De) : $;
7543
+ return this.children.length ? Cc(this.children, o || [], e, t, r, i, s) : o ? new L(o.sort(we), De) : $;
7472
7544
  }
7473
7545
  /**
7474
7546
  Add the given array of decorations to the ones in the set,
@@ -7483,13 +7555,13 @@ class L {
7483
7555
  let i, s = 0;
7484
7556
  e.forEach((l, a) => {
7485
7557
  let c = a + r, u;
7486
- if (u = ns(t, l, c)) {
7558
+ if (u = ts(t, l, c)) {
7487
7559
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
7488
7560
  s += 3;
7489
- i[s] == a ? i[s + 2] = i[s + 2].addInner(l, u, c + 1) : i.splice(s, 0, a, a + l.nodeSize, wt(u, l, c + 1, Me)), s += 3;
7561
+ i[s] == a ? i[s + 2] = i[s + 2].addInner(l, u, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Mt(u, l, c + 1, Me)), s += 3;
7490
7562
  }
7491
7563
  });
7492
- let o = ts(s ? rs(t) : t, -r);
7564
+ let o = es(s ? ns(t) : t, -r);
7493
7565
  for (let l = 0; l < o.length; l++)
7494
7566
  o[l].type.valid(e, o[l]) || o.splice(l--, 1);
7495
7567
  return new L(o.length ? this.local.concat(o).sort(we) : this.local, i || this.children);
@@ -7566,7 +7638,7 @@ class L {
7566
7638
  @internal
7567
7639
  */
7568
7640
  locals(e) {
7569
- return Hn(this.localsInner(e));
7641
+ return Bn(this.localsInner(e));
7570
7642
  }
7571
7643
  /**
7572
7644
  @internal
@@ -7586,7 +7658,7 @@ class L {
7586
7658
  }
7587
7659
  }
7588
7660
  L.empty = new L([], []);
7589
- L.removeOverlap = Hn;
7661
+ L.removeOverlap = Bn;
7590
7662
  const $ = L.empty;
7591
7663
  class ke {
7592
7664
  constructor(e) {
@@ -7627,7 +7699,7 @@ class ke {
7627
7699
  t.push(s[o]);
7628
7700
  }
7629
7701
  }
7630
- return t ? Hn(r ? t : t.sort(we)) : De;
7702
+ return t ? Bn(r ? t : t.sort(we)) : De;
7631
7703
  }
7632
7704
  // Create a group for the given array of decoration sets, or return
7633
7705
  // a single set when possible.
@@ -7646,7 +7718,7 @@ class ke {
7646
7718
  this.members[t].forEachSet(e);
7647
7719
  }
7648
7720
  }
7649
- function Sc(n, e, t, r, i, s, o) {
7721
+ function Cc(n, e, t, r, i, s, o) {
7650
7722
  let l = n.slice();
7651
7723
  for (let c = 0, u = s; c < t.maps.length; c++) {
7652
7724
  let f = 0;
@@ -7682,7 +7754,7 @@ function Sc(n, e, t, r, i, s, o) {
7682
7754
  a = !0;
7683
7755
  }
7684
7756
  if (a) {
7685
- let c = Cc(l, n, e, t, i, s, o), u = wt(c, r, 0, o);
7757
+ let c = Sc(l, n, e, t, i, s, o), u = Mt(c, r, 0, o);
7686
7758
  e = u.local;
7687
7759
  for (let f = 0; f < l.length; f += 3)
7688
7760
  l[f + 1] < 0 && (l.splice(f, 3), f -= 3);
@@ -7695,7 +7767,7 @@ function Sc(n, e, t, r, i, s, o) {
7695
7767
  }
7696
7768
  return new L(e.sort(we), l);
7697
7769
  }
7698
- function ts(n, e) {
7770
+ function es(n, e) {
7699
7771
  if (!e || !n.length)
7700
7772
  return n;
7701
7773
  let t = [];
@@ -7705,7 +7777,7 @@ function ts(n, e) {
7705
7777
  }
7706
7778
  return t;
7707
7779
  }
7708
- function Cc(n, e, t, r, i, s, o) {
7780
+ function Sc(n, e, t, r, i, s, o) {
7709
7781
  function l(a, c) {
7710
7782
  for (let u = 0; u < a.local.length; u++) {
7711
7783
  let f = a.local[u].map(r, i, c);
@@ -7718,7 +7790,7 @@ function Cc(n, e, t, r, i, s, o) {
7718
7790
  n[a + 1] == -1 && l(n[a + 2], e[a] + s + 1);
7719
7791
  return t;
7720
7792
  }
7721
- function ns(n, e, t) {
7793
+ function ts(n, e, t) {
7722
7794
  if (e.isLeaf)
7723
7795
  return null;
7724
7796
  let r = t + e.nodeSize, i = null;
@@ -7726,23 +7798,23 @@ function ns(n, e, t) {
7726
7798
  (o = n[s]) && o.from > t && o.to < r && ((i || (i = [])).push(o), n[s] = null);
7727
7799
  return i;
7728
7800
  }
7729
- function rs(n) {
7801
+ function ns(n) {
7730
7802
  let e = [];
7731
7803
  for (let t = 0; t < n.length; t++)
7732
7804
  n[t] != null && e.push(n[t]);
7733
7805
  return e;
7734
7806
  }
7735
- function wt(n, e, t, r) {
7807
+ function Mt(n, e, t, r) {
7736
7808
  let i = [], s = !1;
7737
7809
  e.forEach((l, a) => {
7738
- let c = ns(n, l, a + t);
7810
+ let c = ts(n, l, a + t);
7739
7811
  if (c) {
7740
7812
  s = !0;
7741
- let u = wt(c, l, t + a + 1, r);
7813
+ let u = Mt(c, l, t + a + 1, r);
7742
7814
  u != $ && i.push(a, a + l.nodeSize, u);
7743
7815
  }
7744
7816
  });
7745
- let o = ts(s ? rs(n) : n, -t).sort(we);
7817
+ let o = es(s ? ns(n) : n, -t).sort(we);
7746
7818
  for (let l = 0; l < o.length; l++)
7747
7819
  o[l].type.valid(e, o[l]) || (r.onRemove && r.onRemove(o[l].spec), o.splice(l--, 1));
7748
7820
  return o.length || i.length ? new L(o, i) : $;
@@ -7750,7 +7822,7 @@ function wt(n, e, t, r) {
7750
7822
  function we(n, e) {
7751
7823
  return n.from - e.from || n.to - e.to;
7752
7824
  }
7753
- function Hn(n) {
7825
+ function Bn(n) {
7754
7826
  let e = n;
7755
7827
  for (let t = 0; t < e.length - 1; t++) {
7756
7828
  let r = e[t];
@@ -7785,7 +7857,7 @@ class I extends N {
7785
7857
  return I.valid(r) ? new I(r) : N.near(r);
7786
7858
  }
7787
7859
  content() {
7788
- return C.empty;
7860
+ return S.empty;
7789
7861
  }
7790
7862
  eq(e) {
7791
7863
  return e instanceof I && e.head == this.head;
@@ -7805,7 +7877,7 @@ class I extends N {
7805
7877
  @internal
7806
7878
  */
7807
7879
  getBookmark() {
7808
- return new $n(this.anchor);
7880
+ return new Hn(this.anchor);
7809
7881
  }
7810
7882
  /**
7811
7883
  @internal
@@ -7861,19 +7933,19 @@ class I extends N {
7861
7933
  I.prototype.visible = !1;
7862
7934
  I.findFrom = I.findGapCursorFrom;
7863
7935
  N.jsonID("gapcursor", I);
7864
- class $n {
7936
+ class Hn {
7865
7937
  constructor(e) {
7866
7938
  this.pos = e;
7867
7939
  }
7868
7940
  map(e) {
7869
- return new $n(e.map(this.pos));
7941
+ return new Hn(e.map(this.pos));
7870
7942
  }
7871
7943
  resolve(e) {
7872
7944
  let t = e.resolve(this.pos);
7873
7945
  return I.valid(t) ? new I(t) : N.near(t);
7874
7946
  }
7875
7947
  }
7876
- function is(n) {
7948
+ function rs(n) {
7877
7949
  return n.isAtom || n.spec.isolating || n.spec.createGapCursor;
7878
7950
  }
7879
7951
  function Ac(n) {
@@ -7885,7 +7957,7 @@ function Ac(n) {
7885
7957
  continue;
7886
7958
  }
7887
7959
  for (let i = r.child(t - 1); ; i = i.lastChild) {
7888
- if (i.childCount == 0 && !i.inlineContent || is(i.type))
7960
+ if (i.childCount == 0 && !i.inlineContent || rs(i.type))
7889
7961
  return !0;
7890
7962
  if (i.inlineContent)
7891
7963
  return !1;
@@ -7902,7 +7974,7 @@ function Tc(n) {
7902
7974
  continue;
7903
7975
  }
7904
7976
  for (let i = r.child(t); ; i = i.firstChild) {
7905
- if (i.childCount == 0 && !i.inlineContent || is(i.type))
7977
+ if (i.childCount == 0 && !i.inlineContent || rs(i.type))
7906
7978
  return !0;
7907
7979
  if (i.inlineContent)
7908
7980
  return !1;
@@ -7911,7 +7983,7 @@ function Tc(n) {
7911
7983
  return !0;
7912
7984
  }
7913
7985
  function vc() {
7914
- return new Dt({
7986
+ return new Ot({
7915
7987
  props: {
7916
7988
  decorations: Nc,
7917
7989
  createSelectionBetween(n, e, t) {
@@ -7924,12 +7996,12 @@ function vc() {
7924
7996
  });
7925
7997
  }
7926
7998
  const Mc = Ra({
7927
- ArrowLeft: ct("horiz", -1),
7928
- ArrowRight: ct("horiz", 1),
7929
- ArrowUp: ct("vert", -1),
7930
- ArrowDown: ct("vert", 1)
7999
+ ArrowLeft: at("horiz", -1),
8000
+ ArrowRight: at("horiz", 1),
8001
+ ArrowUp: at("vert", -1),
8002
+ ArrowDown: at("vert", 1)
7931
8003
  });
7932
- function ct(n, e) {
8004
+ function at(n, e) {
7933
8005
  const t = n == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
7934
8006
  return function(r, i, s) {
7935
8007
  let o = r.selection, l = e > 0 ? o.$to : o.$from, a = o.empty;
@@ -7957,10 +8029,10 @@ function Ec(n, e) {
7957
8029
  let { $from: t } = n.state.selection, r = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
7958
8030
  if (!r)
7959
8031
  return !1;
7960
- let i = S.empty;
8032
+ let i = C.empty;
7961
8033
  for (let o = r.length - 1; o >= 0; o--)
7962
- i = S.from(r[o].createAndFill(null, i));
7963
- let s = n.state.tr.replace(t.pos, t.pos, new C(i, 0, 0));
8034
+ i = C.from(r[o].createAndFill(null, i));
8035
+ let s = n.state.tr.replace(t.pos, t.pos, new S(i, 0, 0));
7964
8036
  return s.setSelection(w.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
7965
8037
  }
7966
8038
  function Nc(n) {
@@ -7969,7 +8041,7 @@ function Nc(n) {
7969
8041
  let e = document.createElement("div");
7970
8042
  return e.className = "ProseMirror-gapcursor", L.create(n.doc, [ne.widget(n.selection.head, e, { key: "gapcursor" })]);
7971
8043
  }
7972
- const Ic = An.create({
8044
+ const Ic = Sn.create({
7973
8045
  name: "gapCursor",
7974
8046
  addProseMirrorPlugins() {
7975
8047
  return [
@@ -7984,7 +8056,7 @@ const Ic = An.create({
7984
8056
  storage: n.storage
7985
8057
  };
7986
8058
  return {
7987
- allowGapCursor: (e = js(_s(n, "allowGapCursor", t))) !== null && e !== void 0 ? e : null
8059
+ allowGapCursor: (e = Ws(js(n, "allowGapCursor", t))) !== null && e !== void 0 ? e : null
7988
8060
  };
7989
8061
  }
7990
8062
  }), $e = {
@@ -7993,32 +8065,32 @@ const Ic = An.create({
7993
8065
  // ============================================================
7994
8066
  bold: {
7995
8067
  category: "mark",
7996
- extension: Nl,
8068
+ extension: El,
7997
8069
  priority: 100
7998
8070
  },
7999
8071
  italic: {
8000
8072
  category: "mark",
8001
- extension: Pl,
8073
+ extension: Ll,
8002
8074
  priority: 100
8003
8075
  },
8004
8076
  strike: {
8005
8077
  category: "mark",
8006
- extension: zl,
8078
+ extension: Fl,
8007
8079
  priority: 100
8008
8080
  },
8009
8081
  underline: {
8010
8082
  category: "mark",
8011
- extension: Gs,
8083
+ extension: _s,
8012
8084
  priority: 100
8013
8085
  },
8014
8086
  code: {
8015
8087
  category: "mark",
8016
- extension: $l,
8088
+ extension: Hl,
8017
8089
  priority: 100
8018
8090
  },
8019
8091
  textColor: {
8020
8092
  category: "mark",
8021
- extension: Zs,
8093
+ extension: Gs,
8022
8094
  // Note: TextStyle is already in helperExtensions
8023
8095
  defaultOptions: {
8024
8096
  types: ["textStyle"]
@@ -8027,7 +8099,7 @@ const Ic = An.create({
8027
8099
  },
8028
8100
  highlight: {
8029
8101
  category: "mark",
8030
- extension: Xs,
8102
+ extension: Zs,
8031
8103
  defaultOptions: {
8032
8104
  multicolor: !0
8033
8105
  },
@@ -8035,7 +8107,7 @@ const Ic = An.create({
8035
8107
  },
8036
8108
  link: {
8037
8109
  category: "mark",
8038
- extension: Qs,
8110
+ extension: Xs,
8039
8111
  defaultOptions: {
8040
8112
  openOnClick: !1,
8041
8113
  HTMLAttributes: {
@@ -8047,14 +8119,9 @@ const Ic = An.create({
8047
8119
  // ============================================================
8048
8120
  // BLOCK NODES (Nodos)
8049
8121
  // ============================================================
8050
- paragraph: {
8051
- category: "node",
8052
- extension: pi,
8053
- priority: 100
8054
- },
8055
8122
  heading: {
8056
8123
  category: "node",
8057
- extension: Jl,
8124
+ extension: Kl,
8058
8125
  defaultOptions: {
8059
8126
  levels: [1, 2, 3, 4, 5, 6]
8060
8127
  },
@@ -8084,7 +8151,7 @@ const Ic = An.create({
8084
8151
  },
8085
8152
  taskList: {
8086
8153
  category: "node",
8087
- extension: Ys,
8154
+ extension: Qs,
8088
8155
  // Note: TaskItem is already in helperExtensions
8089
8156
  defaultOptions: {
8090
8157
  HTMLAttributes: {
@@ -8129,7 +8196,7 @@ const Ic = An.create({
8129
8196
  },
8130
8197
  textAlign: {
8131
8198
  category: "extension",
8132
- extension: to,
8199
+ extension: eo,
8133
8200
  defaultOptions: {
8134
8201
  types: ["heading", "paragraph", "listItem"],
8135
8202
  alignments: ["left", "center", "right", "justify"],
@@ -8152,11 +8219,11 @@ const Ic = An.create({
8152
8219
  }, Oc = [
8153
8220
  Aa,
8154
8221
  Ta,
8155
- pi,
8222
+ Jl,
8156
8223
  // Required: default block node
8157
- Kl,
8224
+ Vl,
8158
8225
  _l,
8159
- eo,
8226
+ Ys,
8160
8227
  // Required for task lists
8161
8228
  Ve,
8162
8229
  // Required: undo/redo functionality
@@ -8231,7 +8298,6 @@ const Lc = {
8231
8298
  "underline",
8232
8299
  "code",
8233
8300
  "clearMarks",
8234
- "paragraph",
8235
8301
  { type: "heading", level: 1 },
8236
8302
  { type: "heading", level: 2 },
8237
8303
  { type: "heading", level: 3 },
@@ -8274,7 +8340,6 @@ const Lc = {
8274
8340
  "underline",
8275
8341
  "code",
8276
8342
  "clearMarks",
8277
- "paragraph",
8278
8343
  { type: "heading", level: 1 },
8279
8344
  { type: "heading", level: 2 },
8280
8345
  { type: "heading", level: 3 },
@@ -8303,7 +8368,7 @@ const Lc = {
8303
8368
  }) => {
8304
8369
  const { editor: i } = Qr();
8305
8370
  return /* @__PURE__ */ h(
8306
- Tl,
8371
+ Al,
8307
8372
  {
8308
8373
  editor: i,
8309
8374
  modifiers: n,
@@ -8330,7 +8395,7 @@ const Lc = {
8330
8395
  " words"
8331
8396
  ] })
8332
8397
  ] });
8333
- }, Sn = Et((n, e) => {
8398
+ }, kn = wt((n, e) => {
8334
8399
  const {
8335
8400
  minRows: t = 10,
8336
8401
  maxRows: r = 30,
@@ -8348,32 +8413,32 @@ const Lc = {
8348
8413
  isReadOnly: m = !1,
8349
8414
  isDisabled: g = !1,
8350
8415
  ...b
8351
- } = n, { zoom: v, setZoom: M } = Sl(), E = sr.lineHeight, D = t * E, A = i ? void 0 : r * E, x = G.useMemo(() => Dc(a), [a]), { Component: H, label: q, shouldLabelBeOutside: U, getBaseProps: Rt, getLabelProps: Ft, getInputWrapperProps: rt } = ps({
8416
+ } = n, { zoom: v, setZoom: M } = kl(), E = sr.lineHeight, D = t * E, A = i ? void 0 : r * E, x = G.useMemo(() => Dc(a), [a]), { Component: H, label: q, shouldLabelBeOutside: U, getBaseProps: Pt, getLabelProps: Rt, getInputWrapperProps: rt } = hs({
8352
8417
  ...b,
8353
8418
  variant: c,
8354
8419
  // Explicitly pass variant to ensure bordered styling
8355
8420
  ref: e,
8356
8421
  isMultiline: !0
8357
- }), it = q ? /* @__PURE__ */ h("label", { ...Ft(), children: q }) : null, R = G.useCallback(
8422
+ }), it = q ? /* @__PURE__ */ h("label", { ...Rt(), children: q }) : null, R = G.useCallback(
8358
8423
  ({ editor: oe }) => {
8359
- const zt = oe.getHTML(), ss = oe.getJSON(), Bt = oe.getText(), os = Bt.length, ls = Bt.split(/\s+/).filter((Ht) => Ht.length > 0).length, Vn = {
8360
- html: zt,
8361
- json: ss,
8362
- text: Bt,
8363
- characters: os,
8364
- words: ls
8424
+ const Ft = oe.getHTML(), is = oe.getJSON(), zt = oe.getText(), ss = zt.length, os = zt.split(/\s+/).filter((Bt) => Bt.length > 0).length, $n = {
8425
+ html: Ft,
8426
+ json: is,
8427
+ text: zt,
8428
+ characters: ss,
8429
+ words: os
8365
8430
  };
8366
- if (d?.(Vn), p?.(Vn), "onChange" in b && typeof b.onChange == "function") {
8367
- const Ht = {
8368
- target: { value: zt },
8369
- currentTarget: { value: zt }
8431
+ if (d?.($n), p?.($n), "onChange" in b && typeof b.onChange == "function") {
8432
+ const Bt = {
8433
+ target: { value: Ft },
8434
+ currentTarget: { value: Ft }
8370
8435
  };
8371
- b.onChange(Ht);
8436
+ b.onChange(Bt);
8372
8437
  }
8373
8438
  },
8374
8439
  [d, p, b]
8375
8440
  );
8376
- return /* @__PURE__ */ k(H, { ...Rt(), children: [
8441
+ return /* @__PURE__ */ k(H, { ...Pt(), children: [
8377
8442
  U ? it : null,
8378
8443
  /* @__PURE__ */ h(
8379
8444
  "div",
@@ -8385,7 +8450,7 @@ const Lc = {
8385
8450
  overflow: A ? "auto" : void 0
8386
8451
  },
8387
8452
  children: /* @__PURE__ */ h(
8388
- Js,
8453
+ Ks,
8389
8454
  {
8390
8455
  editable: !m && !g,
8391
8456
  slotBefore: l ? /* @__PURE__ */ h(
@@ -8421,10 +8486,10 @@ const Lc = {
8421
8486
  )
8422
8487
  ] });
8423
8488
  });
8424
- Sn.displayName = "TipTapEditor";
8425
- const Fc = Et((n, e) => {
8489
+ kn.displayName = "TipTapEditor";
8490
+ const Fc = wt((n, e) => {
8426
8491
  const { adapter: t = "tiptap", variant: r = "bordered", ...i } = n;
8427
- return t === "tiptap" ? /* @__PURE__ */ h(Sn, { ...i, variant: r, ref: e }) : (console.warn(`Adapter "${t}" is not supported. Using TipTap.`), /* @__PURE__ */ h(Sn, { ...i, variant: r, ref: e }));
8492
+ return t === "tiptap" ? /* @__PURE__ */ h(kn, { ...i, variant: r, ref: e }) : (console.warn(`Adapter "${t}" is not supported. Using TipTap.`), /* @__PURE__ */ h(kn, { ...i, variant: r, ref: e }));
8428
8493
  });
8429
8494
  Fc.displayName = "RichTextArea";
8430
8495
  function zc(n, e = "en-US", t = "USD") {
@@ -8477,11 +8542,11 @@ const Br = [
8477
8542
  4: "sm:grid-cols-4",
8478
8543
  5: "sm:grid-cols-5",
8479
8544
  6: "sm:grid-cols-6"
8480
- }, A = `${E[u]} ${D[f]}`, [x, H] = En(
8545
+ }, A = `${E[u]} ${D[f]}`, [x, H] = wn(
8481
8546
  e,
8482
8547
  t,
8483
8548
  r
8484
- ), [q, U] = re(""), Rt = Q(
8549
+ ), [q, U] = re(""), Pt = Q(
8485
8550
  (R) => {
8486
8551
  if (d) return;
8487
8552
  const oe = {
@@ -8492,7 +8557,7 @@ const Br = [
8492
8557
  H(oe), U("");
8493
8558
  },
8494
8559
  [d, H]
8495
- ), Ft = Q(
8560
+ ), Rt = Q(
8496
8561
  (R) => {
8497
8562
  if (d) return;
8498
8563
  if (U(R !== void 0 ? String(R) : ""), R === void 0 || isNaN(R)) {
@@ -8524,7 +8589,7 @@ const Br = [
8524
8589
  color: oe ? "primary" : y,
8525
8590
  variant: oe ? "solid" : p,
8526
8591
  className: "w-full",
8527
- onPress: () => Rt(R),
8592
+ onPress: () => Pt(R),
8528
8593
  isDisabled: d,
8529
8594
  "data-testid": `donation-amounts-preset-${R.id}`,
8530
8595
  children: R.label || zc(R.amount, s, i)
@@ -8533,7 +8598,7 @@ const Br = [
8533
8598
  );
8534
8599
  }) }),
8535
8600
  o && /* @__PURE__ */ h(
8536
- ms,
8601
+ ps,
8537
8602
  {
8538
8603
  placeholder: v.customAmountPlaceholder,
8539
8604
  "aria-label": v.customAmountAriaLabel,
@@ -8544,14 +8609,14 @@ const Br = [
8544
8609
  step: 0.01,
8545
8610
  formatOptions: rt,
8546
8611
  value: q !== "" ? parseFloat(q) : void 0,
8547
- onValueChange: Ft,
8612
+ onValueChange: Rt,
8548
8613
  isDisabled: d,
8549
8614
  "data-testid": "donation-amounts-custom-input"
8550
8615
  },
8551
8616
  x?.isCustom === !1 ? x.presetId : "custom"
8552
8617
  )
8553
8618
  ] });
8554
- return b ? /* @__PURE__ */ h(gs, { className: Z("w-full", g), "data-testid": "donation-amounts-card", children: /* @__PURE__ */ h(ys, { children: it }) }) : /* @__PURE__ */ h("div", { className: Z("w-full", g), "data-testid": "donation-amounts-plain", children: it });
8619
+ return b ? /* @__PURE__ */ h(ms, { className: Z("w-full", g), "data-testid": "donation-amounts-card", children: /* @__PURE__ */ h(gs, { children: it }) }) : /* @__PURE__ */ h("div", { className: Z("w-full", g), "data-testid": "donation-amounts-plain", children: it });
8555
8620
  };
8556
8621
  Hc.displayName = "DonationAmounts";
8557
8622
  const $c = (n) => {
@@ -8560,13 +8625,13 @@ const $c = (n) => {
8560
8625
  }, Vc = (n) => {
8561
8626
  switch (n) {
8562
8627
  case "warning":
8563
- return jn;
8628
+ return Wn;
8564
8629
  case "error":
8565
- return $s;
8566
- case "success":
8567
8630
  return Hs;
8631
+ case "success":
8632
+ return Bs;
8568
8633
  default:
8569
- return jn;
8634
+ return Wn;
8570
8635
  }
8571
8636
  }, Kc = (n) => {
8572
8637
  switch (n) {
@@ -8603,11 +8668,11 @@ const $c = (n) => {
8603
8668
  className: d,
8604
8669
  ...p
8605
8670
  }, y) => {
8606
- const [m, g] = En(
8671
+ const [m, g] = wn(
8607
8672
  n !== void 0 ? Math.max(0, n) : void 0,
8608
8673
  Math.max(0, e),
8609
8674
  t
8610
- ), b = gt(null), v = gt(!1);
8675
+ ), b = mt(null), v = mt(!1);
8611
8676
  Te(() => () => {
8612
8677
  b.current && clearInterval(b.current);
8613
8678
  }, []), Te(() => {
@@ -8639,25 +8704,39 @@ const $c = (n) => {
8639
8704
  className: Z("w-full text-white z-50", E, D[c], d),
8640
8705
  ...p,
8641
8706
  children: /* @__PURE__ */ h("div", { className: "container mx-auto px-4 py-3 sm:py-2.5", "data-testid": "expire-cart-timer-container", children: /* @__PURE__ */ k("div", { className: "flex items-center justify-between gap-3 sm:gap-4", children: [
8642
- /* @__PURE__ */ k("div", { className: "flex items-center gap-3 sm:gap-2.5 flex-1 min-w-0", "data-testid": "expire-cart-timer-left", children: [
8643
- l && /* @__PURE__ */ h(
8644
- "div",
8645
- {
8646
- className: "flex-shrink-0 w-[0.875rem] h-[0.875rem] sm:w-4 sm:h-4 rounded-full bg-white flex items-center justify-center overflow-hidden",
8647
- "data-testid": "expire-cart-timer-icon-wrapper",
8648
- children: /* @__PURE__ */ h(
8649
- M,
8707
+ /* @__PURE__ */ k(
8708
+ "div",
8709
+ {
8710
+ className: "flex items-center gap-3 sm:gap-2.5 flex-1 min-w-0",
8711
+ "data-testid": "expire-cart-timer-left",
8712
+ children: [
8713
+ l && /* @__PURE__ */ h(
8714
+ "div",
8650
8715
  {
8651
- className: "text-primary-500 sm:text-primary-600",
8652
- "aria-hidden": "true",
8653
- size: 14,
8654
- "data-testid": "expire-cart-timer-icon"
8716
+ className: "flex-shrink-0 w-[0.875rem] h-[0.875rem] sm:w-4 sm:h-4 rounded-full bg-white flex items-center justify-center overflow-hidden",
8717
+ "data-testid": "expire-cart-timer-icon-wrapper",
8718
+ children: /* @__PURE__ */ h(
8719
+ M,
8720
+ {
8721
+ className: "text-primary-500 sm:text-primary-600",
8722
+ "aria-hidden": "true",
8723
+ size: 14,
8724
+ "data-testid": "expire-cart-timer-icon"
8725
+ }
8726
+ )
8727
+ }
8728
+ ),
8729
+ /* @__PURE__ */ h(
8730
+ "p",
8731
+ {
8732
+ className: "text-sm sm:text-base font-medium text-white",
8733
+ "data-testid": "expire-cart-timer-message",
8734
+ children: o
8655
8735
  }
8656
8736
  )
8657
- }
8658
- ),
8659
- /* @__PURE__ */ h("p", { className: "text-sm sm:text-base font-medium text-white", "data-testid": "expire-cart-timer-message", children: o })
8660
- ] }),
8737
+ ]
8738
+ }
8739
+ ),
8661
8740
  /* @__PURE__ */ h("div", { className: "flex-shrink-0", "data-testid": "expire-cart-timer-right", children: /* @__PURE__ */ h(
8662
8741
  "span",
8663
8742
  {
@@ -8705,8 +8784,8 @@ export {
8705
8784
  cu as Navbar,
8706
8785
  Lc as RICH_TEXT_PRESETS,
8707
8786
  Fc as RichTextArea,
8708
- cl as Stepper,
8709
- st as colors,
8787
+ al as Stepper,
8788
+ jn as colors,
8710
8789
  iu as spacing,
8711
8790
  ou as theme,
8712
8791
  su as typography