@pubwave/editor 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -49,9 +49,9 @@ function xr({
49
49
  onCancel: n,
50
50
  locale: o
51
51
  }) {
52
- var T, b, L, A, H, U, j, V, F;
53
- const [r, a] = W(e.type), [i, l] = W(((L = (b = (T = e.options) == null ? void 0 : T.plugins) == null ? void 0 : b.title) == null ? void 0 : L.text) ?? ""), [s, d] = W(((U = (H = (A = e.options) == null ? void 0 : A.plugins) == null ? void 0 : H.legend) == null ? void 0 : U.display) ?? !0), [p, g] = W(
54
- ((F = (V = (j = e.options) == null ? void 0 : j.plugins) == null ? void 0 : V.legend) == null ? void 0 : F.position) ?? "bottom"
52
+ var T, b, L, B, H, z, U, V, F;
53
+ const [r, a] = W(e.type), [i, l] = W(((L = (b = (T = e.options) == null ? void 0 : T.plugins) == null ? void 0 : b.title) == null ? void 0 : L.text) ?? ""), [s, d] = W(((z = (H = (B = e.options) == null ? void 0 : B.plugins) == null ? void 0 : H.legend) == null ? void 0 : z.display) ?? !0), [p, g] = W(
54
+ ((F = (V = (U = e.options) == null ? void 0 : U.plugins) == null ? void 0 : V.legend) == null ? void 0 : F.position) ?? "bottom"
55
55
  ), [h, v] = W(e.data.labels), [f, m] = W(e.data.datasets), C = G(null), k = (o == null ? void 0 : o.chart) || {
56
56
  modal: {
57
57
  title: "Edit Chart",
@@ -93,48 +93,48 @@ function xr({
93
93
  }
94
94
  };
95
95
  Y(() => {
96
- const R = ($) => {
96
+ const O = ($) => {
97
97
  $.key === "Escape" && n();
98
98
  };
99
- return document.addEventListener("keydown", R), () => document.removeEventListener("keydown", R);
99
+ return document.addEventListener("keydown", O), () => document.removeEventListener("keydown", O);
100
100
  }, [n]), Y(() => {
101
- const R = (X) => {
102
- C.current && C.current.contains(X.target);
101
+ const O = (K) => {
102
+ C.current && C.current.contains(K.target);
103
103
  }, $ = setTimeout(() => {
104
- document.addEventListener("mousedown", R);
104
+ document.addEventListener("mousedown", O);
105
105
  }, 100);
106
106
  return () => {
107
- clearTimeout($), document.removeEventListener("mousedown", R);
107
+ clearTimeout($), document.removeEventListener("mousedown", O);
108
108
  };
109
109
  }, []);
110
- const P = N((R, $) => {
110
+ const P = N((O, $) => {
111
111
  m(
112
- (X) => X.map((K, ne) => ne === R ? { ...K, label: $ } : K)
112
+ (K) => K.map((X, Q) => Q === O ? { ...X, label: $ } : X)
113
113
  );
114
- }, []), x = N((R, $) => {
114
+ }, []), x = N((O, $) => {
115
115
  m(
116
- (X) => X.map(
117
- (K, ne) => ne === R ? { ...K, data: $.split(",").map((J) => parseFloat(J.trim()) || 0) } : K
116
+ (K) => K.map(
117
+ (X, Q) => Q === O ? { ...X, data: $.split(",").map((ne) => parseFloat(ne.trim()) || 0) } : X
118
118
  )
119
119
  );
120
120
  }, []), c = N(() => {
121
- const R = kr(f.length);
121
+ const O = kr(f.length);
122
122
  m(($) => [
123
123
  ...$,
124
124
  {
125
125
  label: `${k.modal.fields.datasets.title} ${$.length + 1}`,
126
126
  data: h.map(() => Math.floor(Math.random() * 100)),
127
- backgroundColor: R.backgroundColor,
128
- borderColor: R.borderColor,
127
+ backgroundColor: O.backgroundColor,
128
+ borderColor: O.borderColor,
129
129
  borderWidth: 2
130
130
  }
131
131
  ]);
132
- }, [f.length, h, k]), M = N((R) => {
133
- m(($) => $.filter((X, K) => K !== R));
134
- }, []), w = N((R) => {
135
- v(R.split(",").map(($) => $.trim()).filter(Boolean));
136
- }, []), B = N(() => {
137
- const R = {
132
+ }, [f.length, h, k]), A = N((O) => {
133
+ m(($) => $.filter((K, X) => X !== O));
134
+ }, []), w = N((O) => {
135
+ v(O.split(",").map(($) => $.trim()).filter(Boolean));
136
+ }, []), M = N(() => {
137
+ const O = {
138
138
  type: r,
139
139
  data: {
140
140
  labels: h,
@@ -161,10 +161,10 @@ function xr({
161
161
  }
162
162
  }
163
163
  };
164
- t(R);
165
- }, [r, i, s, p, h, f, e.options, t]), S = N((R) => {
166
- R.target === R.currentTarget && n();
167
- }, [n]), O = /* @__PURE__ */ u("div", { className: "pubwave-modal__overlay", onClick: S, children: /* @__PURE__ */ I("div", { ref: C, className: "pubwave-modal__container", role: "dialog", "aria-modal": "true", "aria-labelledby": "chart-modal-title", children: [
164
+ t(O);
165
+ }, [r, i, s, p, h, f, e.options, t]), S = N((O) => {
166
+ O.target === O.currentTarget && n();
167
+ }, [n]), R = /* @__PURE__ */ u("div", { className: "pubwave-modal__overlay", onClick: S, children: /* @__PURE__ */ I("div", { ref: C, className: "pubwave-modal__container", role: "dialog", "aria-modal": "true", "aria-labelledby": "chart-modal-title", children: [
168
168
  /* @__PURE__ */ I("div", { className: "pubwave-modal__header", children: [
169
169
  /* @__PURE__ */ u("h2", { id: "chart-modal-title", className: "pubwave-modal__title", children: k.modal.title }),
170
170
  /* @__PURE__ */ u(
@@ -190,8 +190,8 @@ function xr({
190
190
  id: "chart-type",
191
191
  className: "pubwave-form__select",
192
192
  value: r,
193
- onChange: (R) => a(R.target.value),
194
- children: wr.map((R) => /* @__PURE__ */ u("option", { value: R.value, children: k.chartTypes[R.value] }, R.value))
193
+ onChange: (O) => a(O.target.value),
194
+ children: wr.map((O) => /* @__PURE__ */ u("option", { value: O.value, children: k.chartTypes[O.value] }, O.value))
195
195
  }
196
196
  )
197
197
  ] }),
@@ -204,7 +204,7 @@ function xr({
204
204
  type: "text",
205
205
  className: "pubwave-form__input",
206
206
  value: i,
207
- onChange: (R) => l(R.target.value),
207
+ onChange: (O) => l(O.target.value),
208
208
  placeholder: k.modal.fields.titlePlaceholder
209
209
  }
210
210
  )
@@ -217,7 +217,7 @@ function xr({
217
217
  type: "checkbox",
218
218
  className: "pubwave-form__checkbox",
219
219
  checked: s,
220
- onChange: (R) => d(R.target.checked)
220
+ onChange: (O) => d(O.target.checked)
221
221
  }
222
222
  ),
223
223
  k.modal.fields.showLegend
@@ -230,7 +230,7 @@ function xr({
230
230
  id: "legend-position",
231
231
  className: "pubwave-form__select",
232
232
  value: p,
233
- onChange: (R) => g(R.target.value),
233
+ onChange: (O) => g(O.target.value),
234
234
  children: [
235
235
  /* @__PURE__ */ u("option", { value: "top", children: k.modal.fields.position.top }),
236
236
  /* @__PURE__ */ u("option", { value: "bottom", children: k.modal.fields.position.bottom }),
@@ -250,7 +250,7 @@ function xr({
250
250
  type: "text",
251
251
  className: "pubwave-form__input",
252
252
  value: h.join(", "),
253
- onChange: (R) => w(R.target.value),
253
+ onChange: (O) => w(O.target.value),
254
254
  placeholder: k.modal.fields.labelsPlaceholder
255
255
  }
256
256
  )
@@ -268,7 +268,7 @@ function xr({
268
268
  }
269
269
  )
270
270
  ] }),
271
- f.map((R, $) => /* @__PURE__ */ I("div", { className: "pubwave-form__dataset", children: [
271
+ f.map((O, $) => /* @__PURE__ */ I("div", { className: "pubwave-form__dataset", children: [
272
272
  /* @__PURE__ */ I("div", { className: "pubwave-form__dataset-header", children: [
273
273
  /* @__PURE__ */ I("span", { className: "pubwave-form__dataset-title", children: [
274
274
  k.modal.fields.datasets.datasetLabel,
@@ -280,7 +280,7 @@ function xr({
280
280
  {
281
281
  type: "button",
282
282
  className: "pubwave-button pubwave-button--danger pubwave-button--small",
283
- onClick: () => M($),
283
+ onClick: () => A($),
284
284
  "aria-label": `${k.modal.fields.datasets.remove} ${$ + 1}`,
285
285
  children: k.modal.fields.datasets.remove
286
286
  }
@@ -294,8 +294,8 @@ function xr({
294
294
  id: `dataset-label-${$}`,
295
295
  type: "text",
296
296
  className: "pubwave-form__input",
297
- value: R.label ?? "",
298
- onChange: (X) => P($, X.target.value),
297
+ value: O.label ?? "",
298
+ onChange: (K) => P($, K.target.value),
299
299
  placeholder: k.modal.fields.datasets.datasetLabelPlaceholder
300
300
  }
301
301
  )
@@ -308,8 +308,8 @@ function xr({
308
308
  id: `dataset-data-${$}`,
309
309
  type: "text",
310
310
  className: "pubwave-form__input",
311
- value: R.data.join(", "),
312
- onChange: (X) => x($, X.target.value),
311
+ value: O.data.join(", "),
312
+ onChange: (K) => x($, K.target.value),
313
313
  placeholder: k.modal.fields.datasets.dataPlaceholder
314
314
  }
315
315
  )
@@ -332,13 +332,13 @@ function xr({
332
332
  {
333
333
  type: "button",
334
334
  className: "pubwave-button pubwave-button--primary",
335
- onClick: B,
335
+ onClick: M,
336
336
  children: k.modal.save
337
337
  }
338
338
  )
339
339
  ] })
340
340
  ] }) });
341
- return pr(O, document.body);
341
+ return pr(R, document.body);
342
342
  }
343
343
  const Cr = { groups: { basic: "Basic", list: "Lists", media: "Media", advanced: "Advanced", layout: "Layout" }, commands: { paragraph: { title: "Text", description: "Plain text block" }, heading1: { title: "Heading 1", description: "Large section heading" }, heading2: { title: "Heading 2", description: "Medium section heading" }, heading3: { title: "Heading 3", description: "Small section heading" }, bulletList: { title: "Bullet List", description: "Create a bulleted list" }, orderedList: { title: "Numbered List", description: "Create a numbered list" }, taskList: { title: "To-do list", description: "Create a todo list with checkboxes" }, image: { title: "Image", description: "Upload or paste an image" }, blockquote: { title: "Blockquote", description: "Create a quote block" }, codeBlock: { title: "Code", description: "Create a code snippet" }, horizontalRule: { title: "Divider", description: "Create a horizontal line" }, layoutTwoColumn: { title: "Two Column Layout", description: "Split content into two side-by-side columns" }, layoutThreeColumn: { title: "Three Column Layout", description: "Split content into three side-by-side columns" } } }, Lr = { bold: "Bold", italic: "Italic", underline: "Underline", strike: "Strikethrough", code: "Inline Code", link: "Link", turnInto: "Turn Into", colorPicker: "Text and background color", textColor: "Text color", backgroundColor: "Background color", recentlyUsed: "Recently used", openLink: "Open link", removeLink: "Remove link", confirmLink: "Confirm link", clearLink: "Clear link", blockTypes: { text: "Text", heading1: "Heading 1", heading2: "Heading 2", heading3: "Heading 3", bulletedList: "Bulleted list", numberedList: "Numbered list" } }, Tr = { editor: "Rich text editor", editorContent: "Editor content area", toolbar: "Text formatting toolbar", boldButton: "Toggle bold formatting", italicButton: "Toggle italic formatting", underlineButton: "Toggle underline formatting", strikeButton: "Toggle strikethrough formatting", codeButton: "Toggle inline code formatting", linkButton: "Add or edit link", turnIntoButton: "Turn into", colorPickerButton: "Text and background color", headingButton: "Set heading level", paragraphButton: "Convert to paragraph", dragHandle: "Drag to reorder block", dropIndicator: "Drop here to move block", blockMenu: "Block options menu", addBlock: "Add new block", deleteBlock: "Delete this block", linkDialog: "Link editor dialog", linkUrlInput: "Link URL input", linkSaveButton: "Save link", linkRemoveButton: "Remove link", linkCancelButton: "Cancel link editing", addBlockBelow: "Add block below", dragToMove: "Drag to reorder block", openLinkInNewTab: "Open link in new tab", linkConfirmButton: "Confirm link", linkOpenButton: "Open link in new tab", linkClearButton: "Clear link input" }, Br = 'Write, type "/" for commands...', Ar = "Paste a link...", Mr = { modal: { title: "Edit Chart", close: "Close", save: "Save", cancel: "Cancel", fields: { chartType: "Chart Type", title: "Title", titlePlaceholder: "Chart title...", showLegend: "Show Legend", legendPosition: "Position", position: { top: "Top", bottom: "Bottom", left: "Left", right: "Right" }, labels: "Labels (comma-separated)", labelsPlaceholder: "Jan, Feb, Mar, Apr...", datasets: { title: "Datasets", add: "+ Add Dataset", remove: "Remove", datasetLabel: "Dataset", datasetLabelPlaceholder: "Dataset label...", data: "Data (comma-separated numbers)", dataPlaceholder: "10, 20, 30, 40..." } } }, chartTypes: { bar: "Bar Chart", line: "Line Chart", pie: "Pie Chart", doughnut: "Doughnut Chart", radar: "Radar Chart", polarArea: "Polar Area Chart" } }, Kn = {
344
344
  slashMenu: Cr,
@@ -422,7 +422,7 @@ function At(e) {
422
422
  const Xn = lr({
423
423
  locale: Gt
424
424
  }), vn = Xn.Provider;
425
- function Ee() {
425
+ function _e() {
426
426
  return cr(Xn).locale;
427
427
  }
428
428
  const Ia = async () => import("./auto-h8n00k8H.js");
@@ -431,78 +431,97 @@ function je(e, t, n) {
431
431
  return o.getPropertyValue(r).trim() || n;
432
432
  }
433
433
  function Oa(e) {
434
- var w;
435
- const { node: t, updateAttributes: n, editor: o, selected: r } = e, a = t.attrs.data, [i, l] = W(!1), [s, d] = W(!1), [p, g] = W(null), h = G(null), v = G(null), f = G(null), m = Ee(), C = ((w = o == null ? void 0 : o.options) == null ? void 0 : w.editable) ?? !0, k = N(() => {
434
+ var M;
435
+ const { node: t, updateAttributes: n, editor: o, selected: r } = e, a = t.attrs.data, [i, l] = W(!1), [s, d] = W(!1), [p, g] = W(null), h = G(null), v = G(null), f = G(
436
+ null
437
+ ), m = _e(), C = ((M = o == null ? void 0 : o.options) == null ? void 0 : M.editable) ?? !0, k = C ? r : !1, P = N(() => {
436
438
  if (!p || !f.current || !v.current)
437
439
  return;
438
- const B = v.current, S = je(B, "--pubwave-text", "#37352f"), O = je(B, "--pubwave-text-muted", "#9b9a97"), T = je(B, "--pubwave-border", "#e3e2e0"), b = p.options.plugins || {}, L = p.options.scales;
439
- if (b.legend) {
440
- const A = b.legend;
441
- A.labels ? A.labels.color = S : b.legend.labels = { color: S }, A.onHover = () => {
442
- const H = h.current;
443
- H && (H.style.cursor = "pointer");
444
- }, A.onLeave = () => {
445
- const H = h.current;
446
- H && (H.style.cursor = "default");
440
+ const S = v.current, R = je(
441
+ S,
442
+ "--pubwave-text",
443
+ "#37352f"
444
+ ), T = je(
445
+ S,
446
+ "--pubwave-text-muted",
447
+ "#9b9a97"
448
+ ), b = je(
449
+ S,
450
+ "--pubwave-border",
451
+ "#e3e2e0"
452
+ ), L = p.options.plugins || {}, B = p.options.scales;
453
+ if (L.legend) {
454
+ const H = L.legend;
455
+ H.labels ? H.labels.color = R : L.legend.labels = { color: R }, H.onHover = () => {
456
+ const z = h.current;
457
+ z && (z.style.cursor = "pointer");
458
+ }, H.onLeave = () => {
459
+ const z = h.current;
460
+ z && (z.style.cursor = "default");
447
461
  };
448
462
  }
449
- b.title && (b.title.color = S), L && (L.x && (L.x.ticks && (L.x.ticks.color = O), L.x.grid && (L.x.grid.color = T)), L.y && (L.y.ticks && (L.y.ticks.color = O), L.y.grid && (L.y.grid.color = T))), p.update("none");
463
+ L.title && (L.title.color = R), B && (B.x && (B.x.ticks && (B.x.ticks.color = T), B.x.grid && (B.x.grid.color = b)), B.y && (B.y.ticks && (B.y.ticks.color = T), B.y.grid && (B.y.grid.color = b))), p.update("none");
450
464
  }, [p]);
451
- Y(() => !h.current || !a || !C ? void 0 : ((async () => {
452
- var S, O, T, b, L, A, H, U, j, V, F, R, $;
465
+ Y(() => !h.current || !a ? void 0 : ((async () => {
466
+ var R, T, b, L, B, H, z, U, V, F, O, $, K;
453
467
  try {
454
- const K = (await Ia()).default;
455
- if (f.current = K, h.current) {
456
- const Z = K.getChart(h.current);
457
- Z && Z.destroy();
468
+ const Q = (await Ia()).default;
469
+ if (f.current = Q, h.current) {
470
+ const ee = Q.getChart(h.current);
471
+ ee && ee.destroy();
458
472
  }
459
473
  p && p.destroy();
460
- const ne = (S = h.current) == null ? void 0 : S.getContext("2d");
474
+ const ne = (R = h.current) == null ? void 0 : R.getContext("2d");
461
475
  if (!ne) {
462
476
  console.warn("Failed to get 2D context for chart");
463
477
  return;
464
478
  }
465
- const J = v.current, ee = J ? je(J, "--pubwave-text", "#37352f") : "#37352f", le = J ? je(J, "--pubwave-text-muted", "#9b9a97") : "#9b9a97", ge = J ? je(J, "--pubwave-border", "#e3e2e0") : "#e3e2e0", fe = {
479
+ const J = v.current, ie = J ? je(J, "--pubwave-text", "#37352f") : "#37352f", ye = J ? je(J, "--pubwave-text-muted", "#9b9a97") : "#9b9a97", ce = J ? je(J, "--pubwave-border", "#e3e2e0") : "#e3e2e0", Le = {
466
480
  ...a.options,
467
481
  responsive: !0,
468
482
  maintainAspectRatio: !1,
469
483
  plugins: {
470
- ...(O = a.options) == null ? void 0 : O.plugins,
484
+ ...(T = a.options) == null ? void 0 : T.plugins,
471
485
  legend: {
472
- display: ((L = (b = (T = a.options) == null ? void 0 : T.plugins) == null ? void 0 : b.legend) == null ? void 0 : L.display) ?? !0,
473
- position: ((U = (H = (A = a.options) == null ? void 0 : A.plugins) == null ? void 0 : H.legend) == null ? void 0 : U.position) ?? "top",
474
- ...(F = (V = (j = a.options) == null ? void 0 : j.plugins) == null ? void 0 : V.legend) != null && F.labels ? { labels: { ...a.options.plugins.legend.labels, color: ee } } : { labels: { color: ee } },
486
+ display: ((B = (L = (b = a.options) == null ? void 0 : b.plugins) == null ? void 0 : L.legend) == null ? void 0 : B.display) ?? !0,
487
+ position: ((U = (z = (H = a.options) == null ? void 0 : H.plugins) == null ? void 0 : z.legend) == null ? void 0 : U.position) ?? "top",
488
+ ...(O = (F = (V = a.options) == null ? void 0 : V.plugins) == null ? void 0 : F.legend) != null && O.labels ? {
489
+ labels: {
490
+ ...a.options.plugins.legend.labels,
491
+ color: ie
492
+ }
493
+ } : { labels: { color: ie } },
475
494
  onHover: () => {
476
- const Z = h.current;
477
- Z && (Z.style.cursor = "pointer");
495
+ const ee = h.current;
496
+ ee && (ee.style.cursor = "pointer");
478
497
  },
479
498
  onLeave: () => {
480
- const Z = h.current;
481
- Z && (Z.style.cursor = "default");
499
+ const ee = h.current;
500
+ ee && (ee.style.cursor = "default");
482
501
  }
483
502
  },
484
- title: ($ = (R = a.options) == null ? void 0 : R.plugins) != null && $.title ? {
503
+ title: (K = ($ = a.options) == null ? void 0 : $.plugins) != null && K.title ? {
485
504
  ...a.options.plugins.title,
486
- color: ee,
505
+ color: ie,
487
506
  ...a.options.plugins.title.font ? { font: { ...a.options.plugins.title.font } } : {}
488
507
  } : void 0
489
508
  },
490
- scales: P(a.type) ? {
509
+ scales: x(a.type) ? {
491
510
  x: {
492
- ticks: { color: le },
493
- grid: { color: ge }
511
+ ticks: { color: ye },
512
+ grid: { color: ce }
494
513
  },
495
514
  y: {
496
- ticks: { color: le },
497
- grid: { color: ge }
515
+ ticks: { color: ye },
516
+ grid: { color: ce }
498
517
  }
499
518
  } : void 0
500
- }, Ce = new K(ne, {
519
+ }, he = new Q(ne, {
501
520
  type: a.type,
502
521
  data: a.data,
503
- options: fe
522
+ options: Le
504
523
  });
505
- g(Ce);
524
+ g(he);
506
525
  } catch (X) {
507
526
  console.error("Failed to load Chart.js:", X);
508
527
  }
@@ -511,33 +530,36 @@ function Oa(e) {
511
530
  }), [a, C]), Y(() => {
512
531
  if (!p || !v.current)
513
532
  return;
514
- const B = () => {
533
+ const S = () => {
515
534
  setTimeout(() => {
516
- k();
535
+ P();
517
536
  }, 0);
518
- }, S = new MutationObserver((T) => {
519
- T.forEach((b) => {
520
- (b.attributeName === "style" || b.attributeName === "class") && B();
537
+ }, R = new MutationObserver((b) => {
538
+ b.forEach((L) => {
539
+ (L.attributeName === "style" || L.attributeName === "class") && S();
521
540
  });
522
541
  });
523
- let O = v.current;
524
- for (; O && (S.observe(O, { attributes: !0 }), !(O.classList.contains("pubwave-editor") || O === document.body)); )
525
- O = O.parentElement;
526
- return S.observe(document.body, { attributes: !0, attributeFilter: ["class"] }), () => {
527
- S.disconnect();
542
+ let T = v.current;
543
+ for (; T && (R.observe(T, { attributes: !0 }), !(T.classList.contains("pubwave-editor") || T === document.body)); )
544
+ T = T.parentElement;
545
+ return R.observe(document.body, {
546
+ attributes: !0,
547
+ attributeFilter: ["class"]
548
+ }), () => {
549
+ R.disconnect();
528
550
  };
529
- }, [p, k]);
530
- function P(B) {
531
- return ["bar", "line", "radar"].includes(B);
551
+ }, [p, P]);
552
+ function x(S) {
553
+ return ["bar", "line", "radar"].includes(S);
532
554
  }
533
- const x = N(
534
- (B) => {
535
- n({ data: B }), l(!1);
555
+ const c = N(
556
+ (S) => {
557
+ n({ data: S }), l(!1);
536
558
  },
537
559
  [n]
538
- ), c = N(() => {
560
+ ), A = N(() => {
539
561
  l(!1);
540
- }, []), M = N(() => {
562
+ }, []), w = N(() => {
541
563
  l(!0);
542
564
  }, []);
543
565
  return a ? /* @__PURE__ */ I(
@@ -545,7 +567,7 @@ function Oa(e) {
545
567
  {
546
568
  ref: v,
547
569
  className: "pubwave-editor__chart",
548
- "data-selected": r,
570
+ "data-selected": k,
549
571
  "data-chart-type": a.type,
550
572
  children: [
551
573
  /* @__PURE__ */ I(
@@ -556,12 +578,12 @@ function Oa(e) {
556
578
  onMouseLeave: () => d(!1),
557
579
  children: [
558
580
  /* @__PURE__ */ u("div", { className: "pubwave-chart__canvas-wrapper", children: /* @__PURE__ */ u("canvas", { ref: h, className: "pubwave-chart__canvas" }) }),
559
- C && (s || r) && /* @__PURE__ */ u(
581
+ C && (s || k) && /* @__PURE__ */ u(
560
582
  "button",
561
583
  {
562
584
  type: "button",
563
585
  className: "pubwave-chart__edit-button",
564
- onClick: M,
586
+ onClick: w,
565
587
  "aria-label": "Edit chart",
566
588
  title: "Edit chart",
567
589
  children: /* @__PURE__ */ I(
@@ -590,8 +612,8 @@ function Oa(e) {
590
612
  xr,
591
613
  {
592
614
  initialData: a,
593
- onSave: x,
594
- onCancel: c,
615
+ onSave: c,
616
+ onCancel: A,
595
617
  locale: m
596
618
  }
597
619
  )
@@ -1163,7 +1185,7 @@ const Fa = {
1163
1185
  color: "var(--pubwave-text, #1a1a1a)"
1164
1186
  }, dc = typeof window > "u", on = typeof window < "u" && typeof window.document < "u" && // eslint-disable-next-line @typescript-eslint/no-deprecated
1165
1187
  typeof window.document.createElement == "function";
1166
- function Q(e) {
1188
+ function Z(e) {
1167
1189
  return on ? window.requestAnimationFrame(e) : 0;
1168
1190
  }
1169
1191
  function Et() {
@@ -1648,7 +1670,7 @@ function oo(e, t) {
1648
1670
  aliases: ["hr", "divider", "line", "---"],
1649
1671
  group: "advanced",
1650
1672
  action: (s) => {
1651
- s.chain().focus().setHorizontalRule().run(), Q(() => {
1673
+ s.chain().focus().setHorizontalRule().run(), Z(() => {
1652
1674
  const { state: d } = s.view, { $from: p } = d.selection;
1653
1675
  let g = -1;
1654
1676
  const h = p.pos;
@@ -1699,15 +1721,15 @@ function bi(e, t) {
1699
1721
  return a || i;
1700
1722
  });
1701
1723
  }
1702
- var re = "top", de = "bottom", pe = "right", ae = "left", rn = "auto", dt = [re, de, pe, ae], Fe = "start", it = "end", mi = "clippingParents", ro = "viewport", et = "popper", gi = "reference", mn = /* @__PURE__ */ dt.reduce(function(e, t) {
1724
+ var re = "top", pe = "bottom", fe = "right", ae = "left", rn = "auto", dt = [re, pe, fe, ae], Fe = "start", it = "end", mi = "clippingParents", ro = "viewport", et = "popper", gi = "reference", mn = /* @__PURE__ */ dt.reduce(function(e, t) {
1703
1725
  return e.concat([t + "-" + Fe, t + "-" + it]);
1704
1726
  }, []), ao = /* @__PURE__ */ [].concat(dt, [rn]).reduce(function(e, t) {
1705
1727
  return e.concat([t, t + "-" + Fe, t + "-" + it]);
1706
1728
  }, []), yi = "beforeRead", wi = "read", ki = "afterRead", xi = "beforeMain", Ci = "main", Li = "afterMain", Ti = "beforeWrite", Bi = "write", Ai = "afterWrite", Mi = [yi, wi, ki, xi, Ci, Li, Ti, Bi, Ai];
1707
- function be(e) {
1729
+ function me(e) {
1708
1730
  return e ? (e.nodeName || "").toLowerCase() : null;
1709
1731
  }
1710
- function se(e) {
1732
+ function le(e) {
1711
1733
  if (e == null)
1712
1734
  return window;
1713
1735
  if (e.toString() !== "[object Window]") {
@@ -1716,25 +1738,25 @@ function se(e) {
1716
1738
  }
1717
1739
  return e;
1718
1740
  }
1719
- function Re(e) {
1720
- var t = se(e).Element;
1741
+ function Ee(e) {
1742
+ var t = le(e).Element;
1721
1743
  return e instanceof t || e instanceof Element;
1722
1744
  }
1723
- function ue(e) {
1724
- var t = se(e).HTMLElement;
1745
+ function de(e) {
1746
+ var t = le(e).HTMLElement;
1725
1747
  return e instanceof t || e instanceof HTMLElement;
1726
1748
  }
1727
1749
  function an(e) {
1728
1750
  if (typeof ShadowRoot > "u")
1729
1751
  return !1;
1730
- var t = se(e).ShadowRoot;
1752
+ var t = le(e).ShadowRoot;
1731
1753
  return e instanceof t || e instanceof ShadowRoot;
1732
1754
  }
1733
1755
  function Pi(e) {
1734
1756
  var t = e.state;
1735
1757
  Object.keys(t.elements).forEach(function(n) {
1736
1758
  var o = t.styles[n] || {}, r = t.attributes[n] || {}, a = t.elements[n];
1737
- !ue(a) || !be(a) || (Object.assign(a.style, o), Object.keys(r).forEach(function(i) {
1759
+ !de(a) || !me(a) || (Object.assign(a.style, o), Object.keys(r).forEach(function(i) {
1738
1760
  var l = r[i];
1739
1761
  l === !1 ? a.removeAttribute(i) : a.setAttribute(i, l === !0 ? "" : l);
1740
1762
  }));
@@ -1758,7 +1780,7 @@ function Si(e) {
1758
1780
  var r = t.elements[o], a = t.attributes[o] || {}, i = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), l = i.reduce(function(s, d) {
1759
1781
  return s[d] = "", s;
1760
1782
  }, {});
1761
- !ue(r) || !be(r) || (Object.assign(r.style, l), Object.keys(a).forEach(function(s) {
1783
+ !de(r) || !me(r) || (Object.assign(r.style, l), Object.keys(a).forEach(function(s) {
1762
1784
  r.removeAttribute(s);
1763
1785
  }));
1764
1786
  });
@@ -1772,10 +1794,10 @@ const io = {
1772
1794
  effect: Si,
1773
1795
  requires: ["computeStyles"]
1774
1796
  };
1775
- function ve(e) {
1797
+ function be(e) {
1776
1798
  return e.split("-")[0];
1777
1799
  }
1778
- var Oe = Math.max, St = Math.min, We = Math.round;
1800
+ var Re = Math.max, St = Math.min, We = Math.round;
1779
1801
  function Kt() {
1780
1802
  var e = navigator.userAgentData;
1781
1803
  return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
@@ -1788,8 +1810,8 @@ function so() {
1788
1810
  function Ve(e, t, n) {
1789
1811
  t === void 0 && (t = !1), n === void 0 && (n = !1);
1790
1812
  var o = e.getBoundingClientRect(), r = 1, a = 1;
1791
- t && ue(e) && (r = e.offsetWidth > 0 && We(o.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && We(o.height) / e.offsetHeight || 1);
1792
- var i = Re(e) ? se(e) : window, l = i.visualViewport, s = !so() && n, d = (o.left + (s && l ? l.offsetLeft : 0)) / r, p = (o.top + (s && l ? l.offsetTop : 0)) / a, g = o.width / r, h = o.height / a;
1813
+ t && de(e) && (r = e.offsetWidth > 0 && We(o.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && We(o.height) / e.offsetHeight || 1);
1814
+ var i = Ee(e) ? le(e) : window, l = i.visualViewport, s = !so() && n, d = (o.left + (s && l ? l.offsetLeft : 0)) / r, p = (o.top + (s && l ? l.offsetTop : 0)) / a, g = o.width / r, h = o.height / a;
1793
1815
  return {
1794
1816
  width: g,
1795
1817
  height: h,
@@ -1824,20 +1846,20 @@ function lo(e, t) {
1824
1846
  }
1825
1847
  return !1;
1826
1848
  }
1827
- function xe(e) {
1828
- return se(e).getComputedStyle(e);
1849
+ function Ce(e) {
1850
+ return le(e).getComputedStyle(e);
1829
1851
  }
1830
1852
  function Di(e) {
1831
- return ["table", "td", "th"].indexOf(be(e)) >= 0;
1853
+ return ["table", "td", "th"].indexOf(me(e)) >= 0;
1832
1854
  }
1833
- function Be(e) {
1834
- return ((Re(e) ? e.ownerDocument : (
1855
+ function Ae(e) {
1856
+ return ((Ee(e) ? e.ownerDocument : (
1835
1857
  // $FlowFixMe[prop-missing]
1836
1858
  e.document
1837
1859
  )) || window.document).documentElement;
1838
1860
  }
1839
1861
  function _t(e) {
1840
- return be(e) === "html" ? e : (
1862
+ return me(e) === "html" ? e : (
1841
1863
  // this is a quicker (but less type safe) way to save quite some bytes from the bundle
1842
1864
  // $FlowFixMe[incompatible-return]
1843
1865
  // $FlowFixMe[prop-missing]
@@ -1845,23 +1867,23 @@ function _t(e) {
1845
1867
  e.parentNode || // DOM Element detected
1846
1868
  (an(e) ? e.host : null) || // ShadowRoot detected
1847
1869
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
1848
- Be(e)
1870
+ Ae(e)
1849
1871
  );
1850
1872
  }
1851
1873
  function gn(e) {
1852
- return !ue(e) || // https://github.com/popperjs/popper-core/issues/837
1853
- xe(e).position === "fixed" ? null : e.offsetParent;
1874
+ return !de(e) || // https://github.com/popperjs/popper-core/issues/837
1875
+ Ce(e).position === "fixed" ? null : e.offsetParent;
1854
1876
  }
1855
1877
  function Ii(e) {
1856
1878
  var t = /firefox/i.test(Kt()), n = /Trident/i.test(Kt());
1857
- if (n && ue(e)) {
1858
- var o = xe(e);
1879
+ if (n && de(e)) {
1880
+ var o = Ce(e);
1859
1881
  if (o.position === "fixed")
1860
1882
  return null;
1861
1883
  }
1862
1884
  var r = _t(e);
1863
- for (an(r) && (r = r.host); ue(r) && ["html", "body"].indexOf(be(r)) < 0; ) {
1864
- var a = xe(r);
1885
+ for (an(r) && (r = r.host); de(r) && ["html", "body"].indexOf(me(r)) < 0; ) {
1886
+ var a = Ce(r);
1865
1887
  if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none")
1866
1888
  return r;
1867
1889
  r = r.parentNode;
@@ -1869,15 +1891,15 @@ function Ii(e) {
1869
1891
  return null;
1870
1892
  }
1871
1893
  function pt(e) {
1872
- for (var t = se(e), n = gn(e); n && Di(n) && xe(n).position === "static"; )
1894
+ for (var t = le(e), n = gn(e); n && Di(n) && Ce(n).position === "static"; )
1873
1895
  n = gn(n);
1874
- return n && (be(n) === "html" || be(n) === "body" && xe(n).position === "static") ? t : n || Ii(e) || t;
1896
+ return n && (me(n) === "html" || me(n) === "body" && Ce(n).position === "static") ? t : n || Ii(e) || t;
1875
1897
  }
1876
1898
  function ln(e) {
1877
1899
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
1878
1900
  }
1879
1901
  function ot(e, t, n) {
1880
- return Oe(e, St(t, n));
1902
+ return Re(e, St(t, n));
1881
1903
  }
1882
1904
  function Oi(e, t, n) {
1883
1905
  var o = ot(e, t, n);
@@ -1905,10 +1927,10 @@ var Ri = function(t, n) {
1905
1927
  })) : t, uo(typeof t != "number" ? t : po(t, dt));
1906
1928
  };
1907
1929
  function Ei(e) {
1908
- var t, n = e.state, o = e.name, r = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, l = ve(n.placement), s = ln(l), d = [ae, pe].indexOf(l) >= 0, p = d ? "height" : "width";
1930
+ var t, n = e.state, o = e.name, r = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, l = be(n.placement), s = ln(l), d = [ae, fe].indexOf(l) >= 0, p = d ? "height" : "width";
1909
1931
  if (!(!a || !i)) {
1910
- var g = Ri(r.padding, n), h = sn(a), v = s === "y" ? re : ae, f = s === "y" ? de : pe, m = n.rects.reference[p] + n.rects.reference[s] - i[s] - n.rects.popper[p], C = i[s] - n.rects.reference[s], k = pt(a), P = k ? s === "y" ? k.clientHeight || 0 : k.clientWidth || 0 : 0, x = m / 2 - C / 2, c = g[v], M = P - h[p] - g[f], w = P / 2 - h[p] / 2 + x, B = ot(c, w, M), S = s;
1911
- n.modifiersData[o] = (t = {}, t[S] = B, t.centerOffset = B - w, t);
1932
+ var g = Ri(r.padding, n), h = sn(a), v = s === "y" ? re : ae, f = s === "y" ? pe : fe, m = n.rects.reference[p] + n.rects.reference[s] - i[s] - n.rects.popper[p], C = i[s] - n.rects.reference[s], k = pt(a), P = k ? s === "y" ? k.clientHeight || 0 : k.clientWidth || 0 : 0, x = m / 2 - C / 2, c = g[v], A = P - h[p] - g[f], w = P / 2 - h[p] / 2 + x, M = ot(c, w, A), S = s;
1933
+ n.modifiersData[o] = (t = {}, t[S] = M, t.centerOffset = M - w, t);
1912
1934
  }
1913
1935
  }
1914
1936
  function _i(e) {
@@ -1949,20 +1971,20 @@ function yn(e) {
1949
1971
  y: m
1950
1972
  };
1951
1973
  v = C.x, m = C.y;
1952
- var k = i.hasOwnProperty("x"), P = i.hasOwnProperty("y"), x = ae, c = re, M = window;
1974
+ var k = i.hasOwnProperty("x"), P = i.hasOwnProperty("y"), x = ae, c = re, A = window;
1953
1975
  if (d) {
1954
- var w = pt(n), B = "clientHeight", S = "clientWidth";
1955
- if (w === se(n) && (w = Be(n), xe(w).position !== "static" && l === "absolute" && (B = "scrollHeight", S = "scrollWidth")), w = w, r === re || (r === ae || r === pe) && a === it) {
1956
- c = de;
1957
- var O = g && w === M && M.visualViewport ? M.visualViewport.height : (
1976
+ var w = pt(n), M = "clientHeight", S = "clientWidth";
1977
+ if (w === le(n) && (w = Ae(n), Ce(w).position !== "static" && l === "absolute" && (M = "scrollHeight", S = "scrollWidth")), w = w, r === re || (r === ae || r === fe) && a === it) {
1978
+ c = pe;
1979
+ var R = g && w === A && A.visualViewport ? A.visualViewport.height : (
1958
1980
  // $FlowFixMe[prop-missing]
1959
- w[B]
1981
+ w[M]
1960
1982
  );
1961
- m -= O - o.height, m *= s ? 1 : -1;
1983
+ m -= R - o.height, m *= s ? 1 : -1;
1962
1984
  }
1963
- if (r === ae || (r === re || r === de) && a === it) {
1964
- x = pe;
1965
- var T = g && w === M && M.visualViewport ? M.visualViewport.width : (
1985
+ if (r === ae || (r === re || r === pe) && a === it) {
1986
+ x = fe;
1987
+ var T = g && w === A && A.visualViewport ? A.visualViewport.width : (
1966
1988
  // $FlowFixMe[prop-missing]
1967
1989
  w[S]
1968
1990
  );
@@ -1974,19 +1996,19 @@ function yn(e) {
1974
1996
  }, d && Hi), L = p === !0 ? $i({
1975
1997
  x: v,
1976
1998
  y: m
1977
- }, se(n)) : {
1999
+ }, le(n)) : {
1978
2000
  x: v,
1979
2001
  y: m
1980
2002
  };
1981
2003
  if (v = L.x, m = L.y, s) {
1982
- var A;
1983
- return Object.assign({}, b, (A = {}, A[c] = P ? "0" : "", A[x] = k ? "0" : "", A.transform = (M.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + m + "px)" : "translate3d(" + v + "px, " + m + "px, 0)", A));
2004
+ var B;
2005
+ return Object.assign({}, b, (B = {}, B[c] = P ? "0" : "", B[x] = k ? "0" : "", B.transform = (A.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + m + "px)" : "translate3d(" + v + "px, " + m + "px, 0)", B));
1984
2006
  }
1985
2007
  return Object.assign({}, b, (t = {}, t[c] = P ? m + "px" : "", t[x] = k ? v + "px" : "", t.transform = "", t));
1986
2008
  }
1987
2009
  function zi(e) {
1988
2010
  var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, a = n.adaptive, i = a === void 0 ? !0 : a, l = n.roundOffsets, s = l === void 0 ? !0 : l, d = {
1989
- placement: ve(t.placement),
2011
+ placement: be(t.placement),
1990
2012
  variation: Ge(t.placement),
1991
2013
  popper: t.elements.popper,
1992
2014
  popperRect: t.rects.popper,
@@ -2018,7 +2040,7 @@ var Lt = {
2018
2040
  passive: !0
2019
2041
  };
2020
2042
  function Ui(e) {
2021
- var t = e.state, n = e.instance, o = e.options, r = o.scroll, a = r === void 0 ? !0 : r, i = o.resize, l = i === void 0 ? !0 : i, s = se(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
2043
+ var t = e.state, n = e.instance, o = e.options, r = o.scroll, a = r === void 0 ? !0 : r, i = o.resize, l = i === void 0 ? !0 : i, s = le(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
2022
2044
  return a && d.forEach(function(p) {
2023
2045
  p.addEventListener("scroll", n.update, Lt);
2024
2046
  }), l && s.addEventListener("resize", n.update, Lt), function() {
@@ -2057,17 +2079,17 @@ function wn(e) {
2057
2079
  });
2058
2080
  }
2059
2081
  function cn(e) {
2060
- var t = se(e), n = t.pageXOffset, o = t.pageYOffset;
2082
+ var t = le(e), n = t.pageXOffset, o = t.pageYOffset;
2061
2083
  return {
2062
2084
  scrollLeft: n,
2063
2085
  scrollTop: o
2064
2086
  };
2065
2087
  }
2066
2088
  function un(e) {
2067
- return Ve(Be(e)).left + cn(e).scrollLeft;
2089
+ return Ve(Ae(e)).left + cn(e).scrollLeft;
2068
2090
  }
2069
2091
  function Vi(e, t) {
2070
- var n = se(e), o = Be(e), r = n.visualViewport, a = o.clientWidth, i = o.clientHeight, l = 0, s = 0;
2092
+ var n = le(e), o = Ae(e), r = n.visualViewport, a = o.clientWidth, i = o.clientHeight, l = 0, s = 0;
2071
2093
  if (r) {
2072
2094
  a = r.width, i = r.height;
2073
2095
  var d = so();
@@ -2081,8 +2103,8 @@ function Vi(e, t) {
2081
2103
  };
2082
2104
  }
2083
2105
  function Gi(e) {
2084
- var t, n = Be(e), o = cn(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, a = Oe(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), i = Oe(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), l = -o.scrollLeft + un(e), s = -o.scrollTop;
2085
- return xe(r || n).direction === "rtl" && (l += Oe(n.clientWidth, r ? r.clientWidth : 0) - a), {
2106
+ var t, n = Ae(e), o = cn(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, a = Re(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), i = Re(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), l = -o.scrollLeft + un(e), s = -o.scrollTop;
2107
+ return Ce(r || n).direction === "rtl" && (l += Re(n.clientWidth, r ? r.clientWidth : 0) - a), {
2086
2108
  width: a,
2087
2109
  height: i,
2088
2110
  x: l,
@@ -2090,16 +2112,16 @@ function Gi(e) {
2090
2112
  };
2091
2113
  }
2092
2114
  function dn(e) {
2093
- var t = xe(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
2115
+ var t = Ce(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
2094
2116
  return /auto|scroll|overlay|hidden/.test(n + r + o);
2095
2117
  }
2096
2118
  function fo(e) {
2097
- return ["html", "body", "#document"].indexOf(be(e)) >= 0 ? e.ownerDocument.body : ue(e) && dn(e) ? e : fo(_t(e));
2119
+ return ["html", "body", "#document"].indexOf(me(e)) >= 0 ? e.ownerDocument.body : de(e) && dn(e) ? e : fo(_t(e));
2098
2120
  }
2099
2121
  function rt(e, t) {
2100
2122
  var n;
2101
2123
  t === void 0 && (t = []);
2102
- var o = fo(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = se(o), i = r ? [a].concat(a.visualViewport || [], dn(o) ? o : []) : o, l = t.concat(i);
2124
+ var o = fo(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = le(o), i = r ? [a].concat(a.visualViewport || [], dn(o) ? o : []) : o, l = t.concat(i);
2103
2125
  return r ? l : (
2104
2126
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
2105
2127
  l.concat(rt(_t(i)))
@@ -2118,23 +2140,23 @@ function Yi(e, t) {
2118
2140
  return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
2119
2141
  }
2120
2142
  function kn(e, t, n) {
2121
- return t === ro ? Xt(Vi(e, n)) : Re(t) ? Yi(t, n) : Xt(Gi(Be(e)));
2143
+ return t === ro ? Xt(Vi(e, n)) : Ee(t) ? Yi(t, n) : Xt(Gi(Ae(e)));
2122
2144
  }
2123
2145
  function Ki(e) {
2124
- var t = rt(_t(e)), n = ["absolute", "fixed"].indexOf(xe(e).position) >= 0, o = n && ue(e) ? pt(e) : e;
2125
- return Re(o) ? t.filter(function(r) {
2126
- return Re(r) && lo(r, o) && be(r) !== "body";
2146
+ var t = rt(_t(e)), n = ["absolute", "fixed"].indexOf(Ce(e).position) >= 0, o = n && de(e) ? pt(e) : e;
2147
+ return Ee(o) ? t.filter(function(r) {
2148
+ return Ee(r) && lo(r, o) && me(r) !== "body";
2127
2149
  }) : [];
2128
2150
  }
2129
2151
  function Xi(e, t, n, o) {
2130
2152
  var r = t === "clippingParents" ? Ki(e) : [].concat(t), a = [].concat(r, [n]), i = a[0], l = a.reduce(function(s, d) {
2131
2153
  var p = kn(e, d, o);
2132
- return s.top = Oe(p.top, s.top), s.right = St(p.right, s.right), s.bottom = St(p.bottom, s.bottom), s.left = Oe(p.left, s.left), s;
2154
+ return s.top = Re(p.top, s.top), s.right = St(p.right, s.right), s.bottom = St(p.bottom, s.bottom), s.left = Re(p.left, s.left), s;
2133
2155
  }, kn(e, i, o));
2134
2156
  return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
2135
2157
  }
2136
2158
  function ho(e) {
2137
- var t = e.reference, n = e.element, o = e.placement, r = o ? ve(o) : null, a = o ? Ge(o) : null, i = t.x + t.width / 2 - n.width / 2, l = t.y + t.height / 2 - n.height / 2, s;
2159
+ var t = e.reference, n = e.element, o = e.placement, r = o ? be(o) : null, a = o ? Ge(o) : null, i = t.x + t.width / 2 - n.width / 2, l = t.y + t.height / 2 - n.height / 2, s;
2138
2160
  switch (r) {
2139
2161
  case re:
2140
2162
  s = {
@@ -2142,13 +2164,13 @@ function ho(e) {
2142
2164
  y: t.y - n.height
2143
2165
  };
2144
2166
  break;
2145
- case de:
2167
+ case pe:
2146
2168
  s = {
2147
2169
  x: i,
2148
2170
  y: t.y + t.height
2149
2171
  };
2150
2172
  break;
2151
- case pe:
2173
+ case fe:
2152
2174
  s = {
2153
2175
  x: t.x + t.width,
2154
2176
  y: l
@@ -2182,21 +2204,21 @@ function ho(e) {
2182
2204
  }
2183
2205
  function st(e, t) {
2184
2206
  t === void 0 && (t = {});
2185
- var n = t, o = n.placement, r = o === void 0 ? e.placement : o, a = n.strategy, i = a === void 0 ? e.strategy : a, l = n.boundary, s = l === void 0 ? mi : l, d = n.rootBoundary, p = d === void 0 ? ro : d, g = n.elementContext, h = g === void 0 ? et : g, v = n.altBoundary, f = v === void 0 ? !1 : v, m = n.padding, C = m === void 0 ? 0 : m, k = uo(typeof C != "number" ? C : po(C, dt)), P = h === et ? gi : et, x = e.rects.popper, c = e.elements[f ? P : h], M = Xi(Re(c) ? c : c.contextElement || Be(e.elements.popper), s, p, i), w = Ve(e.elements.reference), B = ho({
2207
+ var n = t, o = n.placement, r = o === void 0 ? e.placement : o, a = n.strategy, i = a === void 0 ? e.strategy : a, l = n.boundary, s = l === void 0 ? mi : l, d = n.rootBoundary, p = d === void 0 ? ro : d, g = n.elementContext, h = g === void 0 ? et : g, v = n.altBoundary, f = v === void 0 ? !1 : v, m = n.padding, C = m === void 0 ? 0 : m, k = uo(typeof C != "number" ? C : po(C, dt)), P = h === et ? gi : et, x = e.rects.popper, c = e.elements[f ? P : h], A = Xi(Ee(c) ? c : c.contextElement || Ae(e.elements.popper), s, p, i), w = Ve(e.elements.reference), M = ho({
2186
2208
  reference: w,
2187
2209
  element: x,
2188
2210
  placement: r
2189
- }), S = Xt(Object.assign({}, x, B)), O = h === et ? S : w, T = {
2190
- top: M.top - O.top + k.top,
2191
- bottom: O.bottom - M.bottom + k.bottom,
2192
- left: M.left - O.left + k.left,
2193
- right: O.right - M.right + k.right
2211
+ }), S = Xt(Object.assign({}, x, M)), R = h === et ? S : w, T = {
2212
+ top: A.top - R.top + k.top,
2213
+ bottom: R.bottom - A.bottom + k.bottom,
2214
+ left: A.left - R.left + k.left,
2215
+ right: R.right - A.right + k.right
2194
2216
  }, b = e.modifiersData.offset;
2195
2217
  if (h === et && b) {
2196
2218
  var L = b[r];
2197
- Object.keys(T).forEach(function(A) {
2198
- var H = [pe, de].indexOf(A) >= 0 ? 1 : -1, U = [re, de].indexOf(A) >= 0 ? "y" : "x";
2199
- T[A] += L[U] * H;
2219
+ Object.keys(T).forEach(function(B) {
2220
+ var H = [fe, pe].indexOf(B) >= 0 ? 1 : -1, z = [re, pe].indexOf(B) >= 0 ? "y" : "x";
2221
+ T[B] += L[z] * H;
2200
2222
  });
2201
2223
  }
2202
2224
  return T;
@@ -2215,14 +2237,14 @@ function Ji(e, t) {
2215
2237
  boundary: r,
2216
2238
  rootBoundary: a,
2217
2239
  padding: i
2218
- })[ve(m)], f;
2240
+ })[be(m)], f;
2219
2241
  }, {});
2220
2242
  return Object.keys(v).sort(function(f, m) {
2221
2243
  return v[f] - v[m];
2222
2244
  });
2223
2245
  }
2224
2246
  function Zi(e) {
2225
- if (ve(e) === rn)
2247
+ if (be(e) === rn)
2226
2248
  return [];
2227
2249
  var t = Mt(e);
2228
2250
  return [wn(e), t, wn(t)];
@@ -2230,49 +2252,49 @@ function Zi(e) {
2230
2252
  function Qi(e) {
2231
2253
  var t = e.state, n = e.options, o = e.name;
2232
2254
  if (!t.modifiersData[o]._skip) {
2233
- for (var r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, l = i === void 0 ? !0 : i, s = n.fallbackPlacements, d = n.padding, p = n.boundary, g = n.rootBoundary, h = n.altBoundary, v = n.flipVariations, f = v === void 0 ? !0 : v, m = n.allowedAutoPlacements, C = t.options.placement, k = ve(C), P = k === C, x = s || (P || !f ? [Mt(C)] : Zi(C)), c = [C].concat(x).reduce(function(J, ee) {
2234
- return J.concat(ve(ee) === rn ? Ji(t, {
2235
- placement: ee,
2255
+ for (var r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, l = i === void 0 ? !0 : i, s = n.fallbackPlacements, d = n.padding, p = n.boundary, g = n.rootBoundary, h = n.altBoundary, v = n.flipVariations, f = v === void 0 ? !0 : v, m = n.allowedAutoPlacements, C = t.options.placement, k = be(C), P = k === C, x = s || (P || !f ? [Mt(C)] : Zi(C)), c = [C].concat(x).reduce(function(ne, J) {
2256
+ return ne.concat(be(J) === rn ? Ji(t, {
2257
+ placement: J,
2236
2258
  boundary: p,
2237
2259
  rootBoundary: g,
2238
2260
  padding: d,
2239
2261
  flipVariations: f,
2240
2262
  allowedAutoPlacements: m
2241
- }) : ee);
2242
- }, []), M = t.rects.reference, w = t.rects.popper, B = /* @__PURE__ */ new Map(), S = !0, O = c[0], T = 0; T < c.length; T++) {
2243
- var b = c[T], L = ve(b), A = Ge(b) === Fe, H = [re, de].indexOf(L) >= 0, U = H ? "width" : "height", j = st(t, {
2263
+ }) : J);
2264
+ }, []), A = t.rects.reference, w = t.rects.popper, M = /* @__PURE__ */ new Map(), S = !0, R = c[0], T = 0; T < c.length; T++) {
2265
+ var b = c[T], L = be(b), B = Ge(b) === Fe, H = [re, pe].indexOf(L) >= 0, z = H ? "width" : "height", U = st(t, {
2244
2266
  placement: b,
2245
2267
  boundary: p,
2246
2268
  rootBoundary: g,
2247
2269
  altBoundary: h,
2248
2270
  padding: d
2249
- }), V = H ? A ? pe : ae : A ? de : re;
2250
- M[U] > w[U] && (V = Mt(V));
2251
- var F = Mt(V), R = [];
2252
- if (a && R.push(j[L] <= 0), l && R.push(j[V] <= 0, j[F] <= 0), R.every(function(J) {
2253
- return J;
2271
+ }), V = H ? B ? fe : ae : B ? pe : re;
2272
+ A[z] > w[z] && (V = Mt(V));
2273
+ var F = Mt(V), O = [];
2274
+ if (a && O.push(U[L] <= 0), l && O.push(U[V] <= 0, U[F] <= 0), O.every(function(ne) {
2275
+ return ne;
2254
2276
  })) {
2255
- O = b, S = !1;
2277
+ R = b, S = !1;
2256
2278
  break;
2257
2279
  }
2258
- B.set(b, R);
2280
+ M.set(b, O);
2259
2281
  }
2260
2282
  if (S)
2261
- for (var $ = f ? 3 : 1, X = function(ee) {
2262
- var le = c.find(function(ge) {
2263
- var fe = B.get(ge);
2264
- if (fe)
2265
- return fe.slice(0, ee).every(function(Ce) {
2266
- return Ce;
2283
+ for (var $ = f ? 3 : 1, K = function(J) {
2284
+ var ie = c.find(function(ye) {
2285
+ var ce = M.get(ye);
2286
+ if (ce)
2287
+ return ce.slice(0, J).every(function(Le) {
2288
+ return Le;
2267
2289
  });
2268
2290
  });
2269
- if (le)
2270
- return O = le, "break";
2271
- }, K = $; K > 0; K--) {
2272
- var ne = X(K);
2273
- if (ne === "break") break;
2291
+ if (ie)
2292
+ return R = ie, "break";
2293
+ }, X = $; X > 0; X--) {
2294
+ var Q = K(X);
2295
+ if (Q === "break") break;
2274
2296
  }
2275
- t.placement !== O && (t.modifiersData[o]._skip = !0, t.placement = O, t.reset = !0);
2297
+ t.placement !== R && (t.modifiersData[o]._skip = !0, t.placement = R, t.reset = !0);
2276
2298
  }
2277
2299
  }
2278
2300
  const es = {
@@ -2297,7 +2319,7 @@ function xn(e, t, n) {
2297
2319
  };
2298
2320
  }
2299
2321
  function Cn(e) {
2300
- return [re, pe, de, ae].some(function(t) {
2322
+ return [re, fe, pe, ae].some(function(t) {
2301
2323
  return e[t] >= 0;
2302
2324
  });
2303
2325
  }
@@ -2325,10 +2347,10 @@ const ns = {
2325
2347
  fn: ts
2326
2348
  };
2327
2349
  function os(e, t, n) {
2328
- var o = ve(e), r = [ae, re].indexOf(o) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, {
2350
+ var o = be(e), r = [ae, re].indexOf(o) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, {
2329
2351
  placement: e
2330
2352
  })) : n, i = a[0], l = a[1];
2331
- return i = i || 0, l = (l || 0) * r, [ae, pe].indexOf(o) >= 0 ? {
2353
+ return i = i || 0, l = (l || 0) * r, [ae, fe].indexOf(o) >= 0 ? {
2332
2354
  x: l,
2333
2355
  y: i
2334
2356
  } : {
@@ -2373,29 +2395,29 @@ function cs(e) {
2373
2395
  rootBoundary: d,
2374
2396
  padding: g,
2375
2397
  altBoundary: p
2376
- }), k = ve(t.placement), P = Ge(t.placement), x = !P, c = ln(k), M = ls(c), w = t.modifiersData.popperOffsets, B = t.rects.reference, S = t.rects.popper, O = typeof m == "function" ? m(Object.assign({}, t.rects, {
2398
+ }), k = be(t.placement), P = Ge(t.placement), x = !P, c = ln(k), A = ls(c), w = t.modifiersData.popperOffsets, M = t.rects.reference, S = t.rects.popper, R = typeof m == "function" ? m(Object.assign({}, t.rects, {
2377
2399
  placement: t.placement
2378
- })) : m, T = typeof O == "number" ? {
2379
- mainAxis: O,
2380
- altAxis: O
2400
+ })) : m, T = typeof R == "number" ? {
2401
+ mainAxis: R,
2402
+ altAxis: R
2381
2403
  } : Object.assign({
2382
2404
  mainAxis: 0,
2383
2405
  altAxis: 0
2384
- }, O), b = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, L = {
2406
+ }, R), b = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, L = {
2385
2407
  x: 0,
2386
2408
  y: 0
2387
2409
  };
2388
2410
  if (w) {
2389
2411
  if (a) {
2390
- var A, H = c === "y" ? re : ae, U = c === "y" ? de : pe, j = c === "y" ? "height" : "width", V = w[c], F = V + C[H], R = V - C[U], $ = v ? -S[j] / 2 : 0, X = P === Fe ? B[j] : S[j], K = P === Fe ? -S[j] : -B[j], ne = t.elements.arrow, J = v && ne ? sn(ne) : {
2412
+ var B, H = c === "y" ? re : ae, z = c === "y" ? pe : fe, U = c === "y" ? "height" : "width", V = w[c], F = V + C[H], O = V - C[z], $ = v ? -S[U] / 2 : 0, K = P === Fe ? M[U] : S[U], X = P === Fe ? -S[U] : -M[U], Q = t.elements.arrow, ne = v && Q ? sn(Q) : {
2391
2413
  width: 0,
2392
2414
  height: 0
2393
- }, ee = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : co(), le = ee[H], ge = ee[U], fe = ot(0, B[j], J[j]), Ce = x ? B[j] / 2 - $ - fe - le - T.mainAxis : X - fe - le - T.mainAxis, Z = x ? -B[j] / 2 + $ + fe + ge + T.mainAxis : K + fe + ge + T.mainAxis, He = t.elements.arrow && pt(t.elements.arrow), ft = He ? c === "y" ? He.clientTop || 0 : He.clientLeft || 0 : 0, Ke = (A = b == null ? void 0 : b[c]) != null ? A : 0, ht = V + Ce - Ke - ft, vt = V + Z - Ke, Xe = ot(v ? St(F, ht) : F, V, v ? Oe(R, vt) : R);
2415
+ }, J = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : co(), ie = J[H], ye = J[z], ce = ot(0, M[U], ne[U]), Le = x ? M[U] / 2 - $ - ce - ie - T.mainAxis : K - ce - ie - T.mainAxis, he = x ? -M[U] / 2 + $ + ce + ye + T.mainAxis : X + ce + ye + T.mainAxis, ee = t.elements.arrow && pt(t.elements.arrow), ft = ee ? c === "y" ? ee.clientTop || 0 : ee.clientLeft || 0 : 0, Ke = (B = b == null ? void 0 : b[c]) != null ? B : 0, ht = V + Le - Ke - ft, vt = V + he - Ke, Xe = ot(v ? St(F, ht) : F, V, v ? Re(O, vt) : O);
2394
2416
  w[c] = Xe, L[c] = Xe - V;
2395
2417
  }
2396
2418
  if (l) {
2397
- var Je, bt = c === "x" ? re : ae, mt = c === "x" ? de : pe, ye = w[M], Le = M === "y" ? "height" : "width", Ze = ye + C[bt], Me = ye - C[mt], Qe = [re, ae].indexOf(k) !== -1, gt = (Je = b == null ? void 0 : b[M]) != null ? Je : 0, yt = Qe ? Ze : ye - B[Le] - S[Le] - gt + T.altAxis, wt = Qe ? ye + B[Le] + S[Le] - gt - T.altAxis : Me, kt = v && Qe ? Oi(yt, ye, wt) : ot(v ? yt : Ze, ye, v ? wt : Me);
2398
- w[M] = kt, L[M] = kt - ye;
2419
+ var Je, bt = c === "x" ? re : ae, mt = c === "x" ? pe : fe, we = w[A], Te = A === "y" ? "height" : "width", Ze = we + C[bt], Pe = we - C[mt], Qe = [re, ae].indexOf(k) !== -1, gt = (Je = b == null ? void 0 : b[A]) != null ? Je : 0, yt = Qe ? Ze : we - M[Te] - S[Te] - gt + T.altAxis, wt = Qe ? we + M[Te] + S[Te] - gt - T.altAxis : Pe, kt = v && Qe ? Oi(yt, we, wt) : ot(v ? yt : Ze, we, v ? wt : Pe);
2420
+ w[A] = kt, L[A] = kt - we;
2399
2421
  }
2400
2422
  t.modifiersData[o] = L;
2401
2423
  }
@@ -2414,7 +2436,7 @@ function ds(e) {
2414
2436
  };
2415
2437
  }
2416
2438
  function ps(e) {
2417
- return e === se(e) || !ue(e) ? cn(e) : ds(e);
2439
+ return e === le(e) || !de(e) ? cn(e) : ds(e);
2418
2440
  }
2419
2441
  function fs(e) {
2420
2442
  var t = e.getBoundingClientRect(), n = We(t.width) / e.offsetWidth || 1, o = We(t.height) / e.offsetHeight || 1;
@@ -2422,15 +2444,15 @@ function fs(e) {
2422
2444
  }
2423
2445
  function hs(e, t, n) {
2424
2446
  n === void 0 && (n = !1);
2425
- var o = ue(t), r = ue(t) && fs(t), a = Be(t), i = Ve(e, r, n), l = {
2447
+ var o = de(t), r = de(t) && fs(t), a = Ae(t), i = Ve(e, r, n), l = {
2426
2448
  scrollLeft: 0,
2427
2449
  scrollTop: 0
2428
2450
  }, s = {
2429
2451
  x: 0,
2430
2452
  y: 0
2431
2453
  };
2432
- return (o || !o && !n) && ((be(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2433
- dn(a)) && (l = ps(t)), ue(t) ? (s = Ve(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : a && (s.x = un(a))), {
2454
+ return (o || !o && !n) && ((me(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2455
+ dn(a)) && (l = ps(t)), de(t) ? (s = Ve(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : a && (s.x = un(a))), {
2434
2456
  x: i.left + l.scrollLeft - s.x,
2435
2457
  y: i.top + l.scrollTop - s.y,
2436
2458
  width: i.width,
@@ -2519,7 +2541,7 @@ function ys(e) {
2519
2541
  setOptions: function(k) {
2520
2542
  var P = typeof k == "function" ? k(p.options) : k;
2521
2543
  m(), p.options = Object.assign({}, a, p.options, P), p.scrollParents = {
2522
- reference: Re(l) ? rt(l) : l.contextElement ? rt(l.contextElement) : [],
2544
+ reference: Ee(l) ? rt(l) : l.contextElement ? rt(l.contextElement) : [],
2523
2545
  popper: rt(s)
2524
2546
  };
2525
2547
  var x = bs(gs([].concat(o, p.options.modifiers)));
@@ -2547,11 +2569,11 @@ function ys(e) {
2547
2569
  p.reset = !1, c = -1;
2548
2570
  continue;
2549
2571
  }
2550
- var M = p.orderedModifiers[c], w = M.fn, B = M.options, S = B === void 0 ? {} : B, O = M.name;
2572
+ var A = p.orderedModifiers[c], w = A.fn, M = A.options, S = M === void 0 ? {} : M, R = A.name;
2551
2573
  typeof w == "function" && (p = w({
2552
2574
  state: p,
2553
2575
  options: S,
2554
- name: O,
2576
+ name: R,
2555
2577
  instance: v
2556
2578
  }) || p);
2557
2579
  }
@@ -2578,14 +2600,14 @@ function ys(e) {
2578
2600
  p.orderedModifiers.forEach(function(C) {
2579
2601
  var k = C.name, P = C.options, x = P === void 0 ? {} : P, c = C.effect;
2580
2602
  if (typeof c == "function") {
2581
- var M = c({
2603
+ var A = c({
2582
2604
  state: p,
2583
2605
  name: k,
2584
2606
  instance: v,
2585
2607
  options: x
2586
2608
  }), w = function() {
2587
2609
  };
2588
- g.push(M || w);
2610
+ g.push(A || w);
2589
2611
  }
2590
2612
  });
2591
2613
  }
@@ -2599,7 +2621,7 @@ function ys(e) {
2599
2621
  }
2600
2622
  var ws = [qi, ss, ji, io, as, es, us, Ni, ns], ks = /* @__PURE__ */ ys({
2601
2623
  defaultModifiers: ws
2602
- }), xs = "tippy-box", vo = "tippy-content", Cs = "tippy-backdrop", bo = "tippy-arrow", mo = "tippy-svg-arrow", De = {
2624
+ }), xs = "tippy-box", vo = "tippy-content", Cs = "tippy-backdrop", bo = "tippy-arrow", mo = "tippy-svg-arrow", Ie = {
2603
2625
  passive: !0,
2604
2626
  capture: !0
2605
2627
  }, go = function() {
@@ -2722,15 +2744,15 @@ function Sn(e, t) {
2722
2744
  }
2723
2745
  return !1;
2724
2746
  }
2725
- var he = {
2747
+ var ve = {
2726
2748
  isTouch: !1
2727
2749
  }, Dn = 0;
2728
2750
  function Es() {
2729
- he.isTouch || (he.isTouch = !0, window.performance && document.addEventListener("mousemove", wo));
2751
+ ve.isTouch || (ve.isTouch = !0, window.performance && document.addEventListener("mousemove", wo));
2730
2752
  }
2731
2753
  function wo() {
2732
2754
  var e = performance.now();
2733
- e - Dn < 20 && (he.isTouch = !1, document.removeEventListener("mousemove", wo)), Dn = e;
2755
+ e - Dn < 20 && (ve.isTouch = !1, document.removeEventListener("mousemove", wo)), Dn = e;
2734
2756
  }
2735
2757
  function _s() {
2736
2758
  var e = document.activeElement;
@@ -2740,7 +2762,7 @@ function _s() {
2740
2762
  }
2741
2763
  }
2742
2764
  function Ns() {
2743
- document.addEventListener("touchstart", Es, De), window.addEventListener("blur", _s);
2765
+ document.addEventListener("touchstart", Es, Ie), window.addEventListener("blur", _s);
2744
2766
  }
2745
2767
  var Hs = typeof window < "u" && typeof document < "u", $s = Hs ? (
2746
2768
  // @ts-ignore
@@ -2779,7 +2801,7 @@ process.env.NODE_ENV !== "production" && js();
2779
2801
  function js() {
2780
2802
  ct = /* @__PURE__ */ new Set();
2781
2803
  }
2782
- function we(e, t) {
2804
+ function ke(e, t) {
2783
2805
  if (e && !ct.has(t)) {
2784
2806
  var n;
2785
2807
  ct.add(t), (n = console).warn.apply(n, ko(t));
@@ -2810,7 +2832,7 @@ var xo = {
2810
2832
  role: "tooltip",
2811
2833
  theme: "",
2812
2834
  zIndex: 9999
2813
- }, ie = Object.assign({
2835
+ }, se = Object.assign({
2814
2836
  appendTo: go,
2815
2837
  aria: {
2816
2838
  content: "auto",
@@ -2858,11 +2880,11 @@ var xo = {
2858
2880
  touch: !0,
2859
2881
  trigger: "mouseenter focus",
2860
2882
  triggerTarget: null
2861
- }, xo, qs), Fs = Object.keys(ie), Ws = function(t) {
2883
+ }, xo, qs), Fs = Object.keys(se), Ws = function(t) {
2862
2884
  process.env.NODE_ENV !== "production" && Lo(t, []);
2863
2885
  var n = Object.keys(t);
2864
2886
  n.forEach(function(o) {
2865
- ie[o] = t[o];
2887
+ se[o] = t[o];
2866
2888
  });
2867
2889
  };
2868
2890
  function Co(e) {
@@ -2870,14 +2892,14 @@ function Co(e) {
2870
2892
  var a = r.name, i = r.defaultValue;
2871
2893
  if (a) {
2872
2894
  var l;
2873
- o[a] = e[a] !== void 0 ? e[a] : (l = ie[a]) != null ? l : i;
2895
+ o[a] = e[a] !== void 0 ? e[a] : (l = se[a]) != null ? l : i;
2874
2896
  }
2875
2897
  return o;
2876
2898
  }, {});
2877
2899
  return Object.assign({}, e, n);
2878
2900
  }
2879
2901
  function Vs(e, t) {
2880
- var n = t ? Object.keys(Co(Object.assign({}, ie, {
2902
+ var n = t ? Object.keys(Co(Object.assign({}, se, {
2881
2903
  plugins: t
2882
2904
  }))) : Fs, o = n.reduce(function(r, a) {
2883
2905
  var i = (e.getAttribute("data-tippy-" + a) || "").trim();
@@ -2899,7 +2921,7 @@ function On(e, t) {
2899
2921
  var n = Object.assign({}, t, {
2900
2922
  content: yo(t.content, [e])
2901
2923
  }, t.ignoreAttributes ? {} : Vs(e, t.plugins));
2902
- return n.aria = Object.assign({}, ie.aria, n.aria), n.aria = {
2924
+ return n.aria = Object.assign({}, se.aria, n.aria), n.aria = {
2903
2925
  expanded: n.aria.expanded === "auto" ? t.interactive : n.aria.expanded,
2904
2926
  content: n.aria.content === "auto" ? t.interactive ? null : "describedby" : n.aria.content
2905
2927
  }, n;
@@ -2908,10 +2930,10 @@ function Lo(e, t) {
2908
2930
  e === void 0 && (e = {}), t === void 0 && (t = []);
2909
2931
  var n = Object.keys(e);
2910
2932
  n.forEach(function(o) {
2911
- var r = Ts(ie, Object.keys(xo)), a = !Ls(r, o);
2933
+ var r = Ts(se, Object.keys(xo)), a = !Ls(r, o);
2912
2934
  a && (a = t.filter(function(i) {
2913
2935
  return i.name === o;
2914
- }).length === 0), we(a, ["`" + o + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
2936
+ }).length === 0), ke(a, ["`" + o + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
2915
2937
 
2916
2938
  `, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
2917
2939
  `, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
@@ -2962,7 +2984,7 @@ function To(e) {
2962
2984
  To.$$tippy = !0;
2963
2985
  var Ys = 1, Tt = [], qt = [];
2964
2986
  function Ks(e, t) {
2965
- var n = On(e, Object.assign({}, ie, Co(Mn(t)))), o, r, a, i = !1, l = !1, s = !1, d = !1, p, g, h, v = [], f = Bn(ht, n.interactiveDebounce), m, C = Ys++, k = null, P = As(n.plugins), x = {
2987
+ var n = On(e, Object.assign({}, se, Co(Mn(t)))), o, r, a, i = !1, l = !1, s = !1, d = !1, p, g, h, v = [], f = Bn(ht, n.interactiveDebounce), m, C = Ys++, k = null, P = As(n.plugins), x = {
2966
2988
  // Is the instance currently enabled?
2967
2989
  isEnabled: !0,
2968
2990
  // Is the tippy currently showing and not transitioning out?
@@ -2996,12 +3018,12 @@ function Ks(e, t) {
2996
3018
  };
2997
3019
  if (!n.render)
2998
3020
  return process.env.NODE_ENV !== "production" && Jt(!0, "render() function has not been supplied."), c;
2999
- var M = n.render(c), w = M.popper, B = M.onUpdate;
3021
+ var A = n.render(c), w = A.popper, M = A.onUpdate;
3000
3022
  w.setAttribute("data-tippy-root", ""), w.id = "tippy-" + c.id, c.popper = w, e._tippy = c, w._tippy = c;
3001
3023
  var S = P.map(function(y) {
3002
3024
  return y.fn(c);
3003
- }), O = e.hasAttribute("aria-expanded");
3004
- return He(), $(), V(), F("onCreate", [c]), n.showOnCreate && Ze(), w.addEventListener("mouseenter", function() {
3025
+ }), R = e.hasAttribute("aria-expanded");
3026
+ return ee(), $(), V(), F("onCreate", [c]), n.showOnCreate && Ze(), w.addEventListener("mouseenter", function() {
3005
3027
  c.props.interactive && c.state.isVisible && c.clearDelayTimeouts();
3006
3028
  }), w.addEventListener("mouseleave", function() {
3007
3029
  c.props.interactive && c.props.trigger.indexOf("mouseenter") >= 0 && H().addEventListener("mousemove", f);
@@ -3017,165 +3039,165 @@ function Ks(e, t) {
3017
3039
  var y;
3018
3040
  return !!((y = c.props.render) != null && y.$$tippy);
3019
3041
  }
3020
- function A() {
3042
+ function B() {
3021
3043
  return m || e;
3022
3044
  }
3023
3045
  function H() {
3024
- var y = A().parentNode;
3046
+ var y = B().parentNode;
3025
3047
  return y ? Os(y) : document;
3026
3048
  }
3027
- function U() {
3049
+ function z() {
3028
3050
  return Qt(w);
3029
3051
  }
3030
- function j(y) {
3031
- return c.state.isMounted && !c.state.isVisible || he.isTouch || p && p.type === "focus" ? 0 : zt(c.props.delay, y ? 0 : 1, ie.delay);
3052
+ function U(y) {
3053
+ return c.state.isMounted && !c.state.isVisible || ve.isTouch || p && p.type === "focus" ? 0 : zt(c.props.delay, y ? 0 : 1, se.delay);
3032
3054
  }
3033
3055
  function V(y) {
3034
3056
  y === void 0 && (y = !1), w.style.pointerEvents = c.props.interactive && !y ? "" : "none", w.style.zIndex = "" + c.props.zIndex;
3035
3057
  }
3036
3058
  function F(y, D, E) {
3037
- if (E === void 0 && (E = !0), S.forEach(function(z) {
3038
- z[y] && z[y].apply(z, D);
3059
+ if (E === void 0 && (E = !0), S.forEach(function(j) {
3060
+ j[y] && j[y].apply(j, D);
3039
3061
  }), E) {
3040
3062
  var q;
3041
3063
  (q = c.props)[y].apply(q, D);
3042
3064
  }
3043
3065
  }
3044
- function R() {
3066
+ function O() {
3045
3067
  var y = c.props.aria;
3046
3068
  if (y.content) {
3047
3069
  var D = "aria-" + y.content, E = w.id, q = qe(c.props.triggerTarget || e);
3048
- q.forEach(function(z) {
3049
- var te = z.getAttribute(D);
3070
+ q.forEach(function(j) {
3071
+ var te = j.getAttribute(D);
3050
3072
  if (c.state.isVisible)
3051
- z.setAttribute(D, te ? te + " " + E : E);
3073
+ j.setAttribute(D, te ? te + " " + E : E);
3052
3074
  else {
3053
- var ce = te && te.replace(E, "").trim();
3054
- ce ? z.setAttribute(D, ce) : z.removeAttribute(D);
3075
+ var ue = te && te.replace(E, "").trim();
3076
+ ue ? j.setAttribute(D, ue) : j.removeAttribute(D);
3055
3077
  }
3056
3078
  });
3057
3079
  }
3058
3080
  }
3059
3081
  function $() {
3060
- if (!(O || !c.props.aria.expanded)) {
3082
+ if (!(R || !c.props.aria.expanded)) {
3061
3083
  var y = qe(c.props.triggerTarget || e);
3062
3084
  y.forEach(function(D) {
3063
- c.props.interactive ? D.setAttribute("aria-expanded", c.state.isVisible && D === A() ? "true" : "false") : D.removeAttribute("aria-expanded");
3085
+ c.props.interactive ? D.setAttribute("aria-expanded", c.state.isVisible && D === B() ? "true" : "false") : D.removeAttribute("aria-expanded");
3064
3086
  });
3065
3087
  }
3066
3088
  }
3067
- function X() {
3089
+ function K() {
3068
3090
  H().removeEventListener("mousemove", f), Tt = Tt.filter(function(y) {
3069
3091
  return y !== f;
3070
3092
  });
3071
3093
  }
3072
- function K(y) {
3073
- if (!(he.isTouch && (s || y.type === "mousedown"))) {
3094
+ function X(y) {
3095
+ if (!(ve.isTouch && (s || y.type === "mousedown"))) {
3074
3096
  var D = y.composedPath && y.composedPath()[0] || y.target;
3075
3097
  if (!(c.props.interactive && Sn(w, D))) {
3076
3098
  if (qe(c.props.triggerTarget || e).some(function(E) {
3077
3099
  return Sn(E, D);
3078
3100
  })) {
3079
- if (he.isTouch || c.state.isVisible && c.props.trigger.indexOf("click") >= 0)
3101
+ if (ve.isTouch || c.state.isVisible && c.props.trigger.indexOf("click") >= 0)
3080
3102
  return;
3081
3103
  } else
3082
3104
  F("onClickOutside", [c, y]);
3083
3105
  c.props.hideOnClick === !0 && (c.clearDelayTimeouts(), c.hide(), l = !0, setTimeout(function() {
3084
3106
  l = !1;
3085
- }), c.state.isMounted || le());
3107
+ }), c.state.isMounted || ie());
3086
3108
  }
3087
3109
  }
3088
3110
  }
3089
- function ne() {
3111
+ function Q() {
3090
3112
  s = !0;
3091
3113
  }
3092
- function J() {
3114
+ function ne() {
3093
3115
  s = !1;
3094
3116
  }
3095
- function ee() {
3117
+ function J() {
3096
3118
  var y = H();
3097
- y.addEventListener("mousedown", K, !0), y.addEventListener("touchend", K, De), y.addEventListener("touchstart", J, De), y.addEventListener("touchmove", ne, De);
3119
+ y.addEventListener("mousedown", X, !0), y.addEventListener("touchend", X, Ie), y.addEventListener("touchstart", ne, Ie), y.addEventListener("touchmove", Q, Ie);
3098
3120
  }
3099
- function le() {
3121
+ function ie() {
3100
3122
  var y = H();
3101
- y.removeEventListener("mousedown", K, !0), y.removeEventListener("touchend", K, De), y.removeEventListener("touchstart", J, De), y.removeEventListener("touchmove", ne, De);
3123
+ y.removeEventListener("mousedown", X, !0), y.removeEventListener("touchend", X, Ie), y.removeEventListener("touchstart", ne, Ie), y.removeEventListener("touchmove", Q, Ie);
3102
3124
  }
3103
- function ge(y, D) {
3104
- Ce(y, function() {
3125
+ function ye(y, D) {
3126
+ Le(y, function() {
3105
3127
  !c.state.isVisible && w.parentNode && w.parentNode.contains(w) && D();
3106
3128
  });
3107
3129
  }
3108
- function fe(y, D) {
3109
- Ce(y, D);
3130
+ function ce(y, D) {
3131
+ Le(y, D);
3110
3132
  }
3111
- function Ce(y, D) {
3112
- var E = U().box;
3113
- function q(z) {
3114
- z.target === E && (Ut(E, "remove", q), D());
3133
+ function Le(y, D) {
3134
+ var E = z().box;
3135
+ function q(j) {
3136
+ j.target === E && (Ut(E, "remove", q), D());
3115
3137
  }
3116
3138
  if (y === 0)
3117
3139
  return D();
3118
3140
  Ut(E, "remove", g), Ut(E, "add", q), g = q;
3119
3141
  }
3120
- function Z(y, D, E) {
3142
+ function he(y, D, E) {
3121
3143
  E === void 0 && (E = !1);
3122
3144
  var q = qe(c.props.triggerTarget || e);
3123
- q.forEach(function(z) {
3124
- z.addEventListener(y, D, E), v.push({
3125
- node: z,
3145
+ q.forEach(function(j) {
3146
+ j.addEventListener(y, D, E), v.push({
3147
+ node: j,
3126
3148
  eventType: y,
3127
3149
  handler: D,
3128
3150
  options: E
3129
3151
  });
3130
3152
  });
3131
3153
  }
3132
- function He() {
3133
- b() && (Z("touchstart", Ke, {
3154
+ function ee() {
3155
+ b() && (he("touchstart", Ke, {
3134
3156
  passive: !0
3135
- }), Z("touchend", vt, {
3157
+ }), he("touchend", vt, {
3136
3158
  passive: !0
3137
3159
  })), Bs(c.props.trigger).forEach(function(y) {
3138
3160
  if (y !== "manual")
3139
- switch (Z(y, Ke), y) {
3161
+ switch (he(y, Ke), y) {
3140
3162
  case "mouseenter":
3141
- Z("mouseleave", vt);
3163
+ he("mouseleave", vt);
3142
3164
  break;
3143
3165
  case "focus":
3144
- Z($s ? "focusout" : "blur", Xe);
3166
+ he($s ? "focusout" : "blur", Xe);
3145
3167
  break;
3146
3168
  case "focusin":
3147
- Z("focusout", Xe);
3169
+ he("focusout", Xe);
3148
3170
  break;
3149
3171
  }
3150
3172
  });
3151
3173
  }
3152
3174
  function ft() {
3153
3175
  v.forEach(function(y) {
3154
- var D = y.node, E = y.eventType, q = y.handler, z = y.options;
3155
- D.removeEventListener(E, q, z);
3176
+ var D = y.node, E = y.eventType, q = y.handler, j = y.options;
3177
+ D.removeEventListener(E, q, j);
3156
3178
  }), v = [];
3157
3179
  }
3158
3180
  function Ke(y) {
3159
3181
  var D, E = !1;
3160
3182
  if (!(!c.state.isEnabled || Je(y) || l)) {
3161
3183
  var q = ((D = p) == null ? void 0 : D.type) === "focus";
3162
- p = y, m = y.currentTarget, $(), !c.state.isVisible && Ss(y) && Tt.forEach(function(z) {
3163
- return z(y);
3164
- }), y.type === "click" && (c.props.trigger.indexOf("mouseenter") < 0 || i) && c.props.hideOnClick !== !1 && c.state.isVisible ? E = !0 : Ze(y), y.type === "click" && (i = !E), E && !q && Me(y);
3184
+ p = y, m = y.currentTarget, $(), !c.state.isVisible && Ss(y) && Tt.forEach(function(j) {
3185
+ return j(y);
3186
+ }), y.type === "click" && (c.props.trigger.indexOf("mouseenter") < 0 || i) && c.props.hideOnClick !== !1 && c.state.isVisible ? E = !0 : Ze(y), y.type === "click" && (i = !E), E && !q && Pe(y);
3165
3187
  }
3166
3188
  }
3167
3189
  function ht(y) {
3168
- var D = y.target, E = A().contains(D) || w.contains(D);
3190
+ var D = y.target, E = B().contains(D) || w.contains(D);
3169
3191
  if (!(y.type === "mousemove" && E)) {
3170
- var q = Le().concat(w).map(function(z) {
3171
- var te, ce = z._tippy, $e = (te = ce.popperInstance) == null ? void 0 : te.state;
3192
+ var q = Te().concat(w).map(function(j) {
3193
+ var te, ue = j._tippy, $e = (te = ue.popperInstance) == null ? void 0 : te.state;
3172
3194
  return $e ? {
3173
- popperRect: z.getBoundingClientRect(),
3195
+ popperRect: j.getBoundingClientRect(),
3174
3196
  popperState: $e,
3175
3197
  props: n
3176
3198
  } : null;
3177
3199
  }).filter(Boolean);
3178
- Rs(q, y) && (X(), Me(y));
3200
+ Rs(q, y) && (K(), Pe(y));
3179
3201
  }
3180
3202
  }
3181
3203
  function vt(y) {
@@ -3185,20 +3207,20 @@ function Ks(e, t) {
3185
3207
  c.hideWithInteractivity(y);
3186
3208
  return;
3187
3209
  }
3188
- Me(y);
3210
+ Pe(y);
3189
3211
  }
3190
3212
  }
3191
3213
  function Xe(y) {
3192
- c.props.trigger.indexOf("focusin") < 0 && y.target !== A() || c.props.interactive && y.relatedTarget && w.contains(y.relatedTarget) || Me(y);
3214
+ c.props.trigger.indexOf("focusin") < 0 && y.target !== B() || c.props.interactive && y.relatedTarget && w.contains(y.relatedTarget) || Pe(y);
3193
3215
  }
3194
3216
  function Je(y) {
3195
- return he.isTouch ? b() !== y.type.indexOf("touch") >= 0 : !1;
3217
+ return ve.isTouch ? b() !== y.type.indexOf("touch") >= 0 : !1;
3196
3218
  }
3197
3219
  function bt() {
3198
3220
  mt();
3199
- var y = c.props, D = y.popperOptions, E = y.placement, q = y.offset, z = y.getReferenceClientRect, te = y.moveTransition, ce = L() ? Qt(w).arrow : null, $e = z ? {
3200
- getBoundingClientRect: z,
3201
- contextElement: z.contextElement || A()
3221
+ var y = c.props, D = y.popperOptions, E = y.placement, q = y.offset, j = y.getReferenceClientRect, te = y.moveTransition, ue = L() ? Qt(w).arrow : null, $e = j ? {
3222
+ getBoundingClientRect: j,
3223
+ contextElement: j.contextElement || B()
3202
3224
  } : e, hn = {
3203
3225
  name: "$$tippy",
3204
3226
  enabled: !0,
@@ -3207,13 +3229,13 @@ function Ks(e, t) {
3207
3229
  fn: function(xt) {
3208
3230
  var ze = xt.state;
3209
3231
  if (L()) {
3210
- var No = U(), $t = No.box;
3232
+ var No = z(), $t = No.box;
3211
3233
  ["placement", "reference-hidden", "escaped"].forEach(function(Ct) {
3212
3234
  Ct === "placement" ? $t.setAttribute("data-placement", ze.placement) : ze.attributes.popper["data-popper-" + Ct] ? $t.setAttribute("data-" + Ct, "") : $t.removeAttribute("data-" + Ct);
3213
3235
  }), ze.attributes.popper = {};
3214
3236
  }
3215
3237
  }
3216
- }, Pe = [{
3238
+ }, Se = [{
3217
3239
  name: "offset",
3218
3240
  options: {
3219
3241
  offset: q
@@ -3239,24 +3261,24 @@ function Ks(e, t) {
3239
3261
  adaptive: !te
3240
3262
  }
3241
3263
  }, hn];
3242
- L() && ce && Pe.push({
3264
+ L() && ue && Se.push({
3243
3265
  name: "arrow",
3244
3266
  options: {
3245
- element: ce,
3267
+ element: ue,
3246
3268
  padding: 3
3247
3269
  }
3248
- }), Pe.push.apply(Pe, (D == null ? void 0 : D.modifiers) || []), c.popperInstance = ks($e, w, Object.assign({}, D, {
3270
+ }), Se.push.apply(Se, (D == null ? void 0 : D.modifiers) || []), c.popperInstance = ks($e, w, Object.assign({}, D, {
3249
3271
  placement: E,
3250
3272
  onFirstUpdate: h,
3251
- modifiers: Pe
3273
+ modifiers: Se
3252
3274
  }));
3253
3275
  }
3254
3276
  function mt() {
3255
3277
  c.popperInstance && (c.popperInstance.destroy(), c.popperInstance = null);
3256
3278
  }
3257
- function ye() {
3258
- var y = c.props.appendTo, D, E = A();
3259
- c.props.interactive && y === go || y === "parent" ? D = E.parentNode : D = yo(y, [E]), D.contains(w) || D.appendChild(w), c.state.isMounted = !0, bt(), process.env.NODE_ENV !== "production" && we(c.props.interactive && y === ie.appendTo && E.nextElementSibling !== w, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
3279
+ function we() {
3280
+ var y = c.props.appendTo, D, E = B();
3281
+ c.props.interactive && y === go || y === "parent" ? D = E.parentNode : D = yo(y, [E]), D.contains(w) || D.appendChild(w), c.state.isMounted = !0, bt(), process.env.NODE_ENV !== "production" && ke(c.props.interactive && y === se.appendTo && E.nextElementSibling !== w, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
3260
3282
 
3261
3283
  `, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
3262
3284
 
@@ -3264,23 +3286,23 @@ function Ks(e, t) {
3264
3286
 
3265
3287
  `, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
3266
3288
  }
3267
- function Le() {
3289
+ function Te() {
3268
3290
  return Dt(w.querySelectorAll("[data-tippy-root]"));
3269
3291
  }
3270
3292
  function Ze(y) {
3271
- c.clearDelayTimeouts(), y && F("onTrigger", [c, y]), ee();
3272
- var D = j(!0), E = T(), q = E[0], z = E[1];
3273
- he.isTouch && q === "hold" && z && (D = z), D ? o = setTimeout(function() {
3293
+ c.clearDelayTimeouts(), y && F("onTrigger", [c, y]), J();
3294
+ var D = U(!0), E = T(), q = E[0], j = E[1];
3295
+ ve.isTouch && q === "hold" && j && (D = j), D ? o = setTimeout(function() {
3274
3296
  c.show();
3275
3297
  }, D) : c.show();
3276
3298
  }
3277
- function Me(y) {
3299
+ function Pe(y) {
3278
3300
  if (c.clearDelayTimeouts(), F("onUntrigger", [c, y]), !c.state.isVisible) {
3279
- le();
3301
+ ie();
3280
3302
  return;
3281
3303
  }
3282
3304
  if (!(c.props.trigger.indexOf("mouseenter") >= 0 && c.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(y.type) >= 0 && i)) {
3283
- var D = j(!1);
3305
+ var D = U(!1);
3284
3306
  D ? r = setTimeout(function() {
3285
3307
  c.state.isVisible && c.hide();
3286
3308
  }, D) : a = requestAnimationFrame(function() {
@@ -3298,14 +3320,14 @@ function Ks(e, t) {
3298
3320
  clearTimeout(o), clearTimeout(r), cancelAnimationFrame(a);
3299
3321
  }
3300
3322
  function wt(y) {
3301
- if (process.env.NODE_ENV !== "production" && we(c.state.isDestroyed, Ue("setProps")), !c.state.isDestroyed) {
3323
+ if (process.env.NODE_ENV !== "production" && ke(c.state.isDestroyed, Ue("setProps")), !c.state.isDestroyed) {
3302
3324
  F("onBeforeUpdate", [c, y]), ft();
3303
3325
  var D = c.props, E = On(e, Object.assign({}, D, Mn(y), {
3304
3326
  ignoreAttributes: !0
3305
3327
  }));
3306
- c.props = E, He(), D.interactiveDebounce !== E.interactiveDebounce && (X(), f = Bn(ht, E.interactiveDebounce)), D.triggerTarget && !E.triggerTarget ? qe(D.triggerTarget).forEach(function(q) {
3328
+ c.props = E, ee(), D.interactiveDebounce !== E.interactiveDebounce && (K(), f = Bn(ht, E.interactiveDebounce)), D.triggerTarget && !E.triggerTarget ? qe(D.triggerTarget).forEach(function(q) {
3307
3329
  q.removeAttribute("aria-expanded");
3308
- }) : E.triggerTarget && e.removeAttribute("aria-expanded"), $(), V(), B && B(D, E), c.popperInstance && (bt(), Le().forEach(function(q) {
3330
+ }) : E.triggerTarget && e.removeAttribute("aria-expanded"), $(), V(), M && M(D, E), c.popperInstance && (bt(), Te().forEach(function(q) {
3309
3331
  requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
3310
3332
  })), F("onAfterUpdate", [c, y]);
3311
3333
  }
@@ -3316,62 +3338,62 @@ function Ks(e, t) {
3316
3338
  });
3317
3339
  }
3318
3340
  function Io() {
3319
- process.env.NODE_ENV !== "production" && we(c.state.isDestroyed, Ue("show"));
3320
- var y = c.state.isVisible, D = c.state.isDestroyed, E = !c.state.isEnabled, q = he.isTouch && !c.props.touch, z = zt(c.props.duration, 0, ie.duration);
3321
- if (!(y || D || E || q) && !A().hasAttribute("disabled") && (F("onShow", [c], !1), c.props.onShow(c) !== !1)) {
3322
- if (c.state.isVisible = !0, L() && (w.style.visibility = "visible"), V(), ee(), c.state.isMounted || (w.style.transition = "none"), L()) {
3323
- var te = U(), ce = te.box, $e = te.content;
3324
- jt([ce, $e], 0);
3341
+ process.env.NODE_ENV !== "production" && ke(c.state.isDestroyed, Ue("show"));
3342
+ var y = c.state.isVisible, D = c.state.isDestroyed, E = !c.state.isEnabled, q = ve.isTouch && !c.props.touch, j = zt(c.props.duration, 0, se.duration);
3343
+ if (!(y || D || E || q) && !B().hasAttribute("disabled") && (F("onShow", [c], !1), c.props.onShow(c) !== !1)) {
3344
+ if (c.state.isVisible = !0, L() && (w.style.visibility = "visible"), V(), J(), c.state.isMounted || (w.style.transition = "none"), L()) {
3345
+ var te = z(), ue = te.box, $e = te.content;
3346
+ jt([ue, $e], 0);
3325
3347
  }
3326
3348
  h = function() {
3327
- var Pe;
3349
+ var Se;
3328
3350
  if (!(!c.state.isVisible || d)) {
3329
3351
  if (d = !0, w.offsetHeight, w.style.transition = c.props.moveTransition, L() && c.props.animation) {
3330
- var Ht = U(), xt = Ht.box, ze = Ht.content;
3331
- jt([xt, ze], z), Pn([xt, ze], "visible");
3352
+ var Ht = z(), xt = Ht.box, ze = Ht.content;
3353
+ jt([xt, ze], j), Pn([xt, ze], "visible");
3332
3354
  }
3333
- R(), $(), An(qt, c), (Pe = c.popperInstance) == null || Pe.forceUpdate(), F("onMount", [c]), c.props.animation && L() && fe(z, function() {
3355
+ O(), $(), An(qt, c), (Se = c.popperInstance) == null || Se.forceUpdate(), F("onMount", [c]), c.props.animation && L() && ce(j, function() {
3334
3356
  c.state.isShown = !0, F("onShown", [c]);
3335
3357
  });
3336
3358
  }
3337
- }, ye();
3359
+ }, we();
3338
3360
  }
3339
3361
  }
3340
3362
  function Oo() {
3341
- process.env.NODE_ENV !== "production" && we(c.state.isDestroyed, Ue("hide"));
3342
- var y = !c.state.isVisible, D = c.state.isDestroyed, E = !c.state.isEnabled, q = zt(c.props.duration, 1, ie.duration);
3363
+ process.env.NODE_ENV !== "production" && ke(c.state.isDestroyed, Ue("hide"));
3364
+ var y = !c.state.isVisible, D = c.state.isDestroyed, E = !c.state.isEnabled, q = zt(c.props.duration, 1, se.duration);
3343
3365
  if (!(y || D || E) && (F("onHide", [c], !1), c.props.onHide(c) !== !1)) {
3344
- if (c.state.isVisible = !1, c.state.isShown = !1, d = !1, i = !1, L() && (w.style.visibility = "hidden"), X(), le(), V(!0), L()) {
3345
- var z = U(), te = z.box, ce = z.content;
3346
- c.props.animation && (jt([te, ce], q), Pn([te, ce], "hidden"));
3366
+ if (c.state.isVisible = !1, c.state.isShown = !1, d = !1, i = !1, L() && (w.style.visibility = "hidden"), K(), ie(), V(!0), L()) {
3367
+ var j = z(), te = j.box, ue = j.content;
3368
+ c.props.animation && (jt([te, ue], q), Pn([te, ue], "hidden"));
3347
3369
  }
3348
- R(), $(), c.props.animation ? L() && ge(q, c.unmount) : c.unmount();
3370
+ O(), $(), c.props.animation ? L() && ye(q, c.unmount) : c.unmount();
3349
3371
  }
3350
3372
  }
3351
3373
  function Ro(y) {
3352
- process.env.NODE_ENV !== "production" && we(c.state.isDestroyed, Ue("hideWithInteractivity")), H().addEventListener("mousemove", f), An(Tt, f), f(y);
3374
+ process.env.NODE_ENV !== "production" && ke(c.state.isDestroyed, Ue("hideWithInteractivity")), H().addEventListener("mousemove", f), An(Tt, f), f(y);
3353
3375
  }
3354
3376
  function Eo() {
3355
- process.env.NODE_ENV !== "production" && we(c.state.isDestroyed, Ue("unmount")), c.state.isVisible && c.hide(), c.state.isMounted && (mt(), Le().forEach(function(y) {
3377
+ process.env.NODE_ENV !== "production" && ke(c.state.isDestroyed, Ue("unmount")), c.state.isVisible && c.hide(), c.state.isMounted && (mt(), Te().forEach(function(y) {
3356
3378
  y._tippy.unmount();
3357
3379
  }), w.parentNode && w.parentNode.removeChild(w), qt = qt.filter(function(y) {
3358
3380
  return y !== c;
3359
3381
  }), c.state.isMounted = !1, F("onHidden", [c]));
3360
3382
  }
3361
3383
  function _o() {
3362
- process.env.NODE_ENV !== "production" && we(c.state.isDestroyed, Ue("destroy")), !c.state.isDestroyed && (c.clearDelayTimeouts(), c.unmount(), ft(), delete e._tippy, c.state.isDestroyed = !0, F("onDestroy", [c]));
3384
+ process.env.NODE_ENV !== "production" && ke(c.state.isDestroyed, Ue("destroy")), !c.state.isDestroyed && (c.clearDelayTimeouts(), c.unmount(), ft(), delete e._tippy, c.state.isDestroyed = !0, F("onDestroy", [c]));
3363
3385
  }
3364
3386
  }
3365
- function Ae(e, t) {
3387
+ function Me(e, t) {
3366
3388
  t === void 0 && (t = {});
3367
- var n = ie.plugins.concat(t.plugins || []);
3389
+ var n = se.plugins.concat(t.plugins || []);
3368
3390
  process.env.NODE_ENV !== "production" && (Us(e), Lo(t, n)), Ns();
3369
3391
  var o = Object.assign({}, t, {
3370
3392
  plugins: n
3371
3393
  }), r = Is(e);
3372
3394
  if (process.env.NODE_ENV !== "production") {
3373
3395
  var a = lt(o.content), i = r.length > 1;
3374
- we(a && i, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
3396
+ ke(a && i, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
3375
3397
 
3376
3398
  `, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
3377
3399
 
@@ -3384,9 +3406,9 @@ function Ae(e, t) {
3384
3406
  }, []);
3385
3407
  return lt(e) ? l[0] : l;
3386
3408
  }
3387
- Ae.defaultProps = ie;
3388
- Ae.setDefaultProps = Ws;
3389
- Ae.currentInput = he;
3409
+ Me.defaultProps = se;
3410
+ Me.setDefaultProps = Ws;
3411
+ Me.currentInput = ve;
3390
3412
  Object.assign({}, io, {
3391
3413
  effect: function(t) {
3392
3414
  var n = t.state, o = {
@@ -3404,7 +3426,7 @@ Object.assign({}, io, {
3404
3426
  Object.assign(n.elements.popper.style, o.popper), n.styles = o, n.elements.arrow && Object.assign(n.elements.arrow.style, o.arrow);
3405
3427
  }
3406
3428
  });
3407
- Ae.setDefaultProps({
3429
+ Me.setDefaultProps({
3408
3430
  render: To
3409
3431
  });
3410
3432
  const _ = {
@@ -3639,7 +3661,7 @@ function Js(e = Yt, t, n) {
3639
3661
  groupLabels: r
3640
3662
  },
3641
3663
  editor: this.editor
3642
- }), d.clientRect && (s = Ae("body", {
3664
+ }), d.clientRect && (s = Me("body", {
3643
3665
  getReferenceClientRect: d.clientRect,
3644
3666
  appendTo: () => document.body,
3645
3667
  content: l.element,
@@ -3784,7 +3806,7 @@ const Zs = Vt.forwardRef(function({ items: t, command: n, query: o = "", groupLa
3784
3806
  dropPosition: null,
3785
3807
  cancelled: !1
3786
3808
  };
3787
- function Ie(e, t) {
3809
+ function Oe(e, t) {
3788
3810
  switch (t.type) {
3789
3811
  case "START_DRAG":
3790
3812
  return {
@@ -3934,7 +3956,7 @@ function el(e) {
3934
3956
  },
3935
3957
  props: {
3936
3958
  handleKeyDown(n, o) {
3937
- return o.key === "Escape" && t.draggingBlockId ? (t = Ie(t, { type: "CANCEL_DRAG" }), n.dispatch(n.state.tr.setMeta(oe, t)), !0) : !1;
3959
+ return o.key === "Escape" && t.draggingBlockId ? (t = Oe(t, { type: "CANCEL_DRAG" }), n.dispatch(n.state.tr.setMeta(oe, t)), !0) : !1;
3938
3960
  },
3939
3961
  handleDOMEvents: {
3940
3962
  dragover(n, o) {
@@ -3943,11 +3965,11 @@ function el(e) {
3943
3965
  return !1;
3944
3966
  o.preventDefault(), o.dataTransfer.dropEffect = "move", t = oe.getState(n.state) ?? t;
3945
3967
  const a = _n(n, o);
3946
- return a ? (t = Ie(t, {
3968
+ return a ? (t = Oe(t, {
3947
3969
  type: "UPDATE_DROP_TARGET",
3948
3970
  pos: a.pos,
3949
3971
  position: a.position
3950
- }), n.dispatch(n.state.tr.setMeta(oe, t))) : t.dropTargetPos !== null && (t = Ie(t, {
3972
+ }), n.dispatch(n.state.tr.setMeta(oe, t))) : t.dropTargetPos !== null && (t = Oe(t, {
3951
3973
  type: "UPDATE_DROP_TARGET",
3952
3974
  pos: null,
3953
3975
  position: null
@@ -3973,11 +3995,11 @@ function el(e) {
3973
3995
  if (d === l || !e)
3974
3996
  return !1;
3975
3997
  const g = Qs(e, l, d, p);
3976
- return t = Ie(t, { type: "COMPLETE_DRAG" }), n.dispatch(n.state.tr.setMeta(oe, t)), g;
3998
+ return t = Oe(t, { type: "COMPLETE_DRAG" }), n.dispatch(n.state.tr.setMeta(oe, t)), g;
3977
3999
  },
3978
4000
  dragleave(n, o) {
3979
4001
  const r = o.relatedTarget;
3980
- return r != null && r.closest(".pubwave-editor") || (t = Ie(t, {
4002
+ return r != null && r.closest(".pubwave-editor") || (t = Oe(t, {
3981
4003
  type: "UPDATE_DROP_TARGET",
3982
4004
  pos: null,
3983
4005
  position: null
@@ -3991,11 +4013,11 @@ function Bo(e) {
3991
4013
  return oe.getState(e.state) ?? It;
3992
4014
  }
3993
4015
  function tl(e, t, n) {
3994
- const { view: o } = e, r = { type: "START_DRAG", blockId: t, pos: n }, a = Ie(Bo(e), r);
4016
+ const { view: o } = e, r = { type: "START_DRAG", blockId: t, pos: n }, a = Oe(Bo(e), r);
3995
4017
  o.dispatch(o.state.tr.setMeta(oe, a));
3996
4018
  }
3997
4019
  function fc(e) {
3998
- const { view: t } = e, n = { type: "CANCEL_DRAG" }, o = Ie(Bo(e), n);
4020
+ const { view: t } = e, n = { type: "CANCEL_DRAG" }, o = Oe(Bo(e), n);
3999
4021
  t.dispatch(t.state.tr.setMeta(oe, o));
4000
4022
  }
4001
4023
  const hc = [
@@ -4246,10 +4268,10 @@ const Rt = {
4246
4268
  strike: "Cmd+Shift+X",
4247
4269
  code: "Cmd+E"
4248
4270
  };
4249
- function Te(e, t) {
4271
+ function Be(e, t) {
4250
4272
  return t ? `${e} (${t})` : e;
4251
4273
  }
4252
- const ke = Vt.forwardRef(
4274
+ const xe = Vt.forwardRef(
4253
4275
  ({ active: e = !1, disabled: t = !1, onClick: n, "data-tooltip": o, "data-testid": r, "aria-label": a, children: i, style: l }, s) => /* @__PURE__ */ u(
4254
4276
  "button",
4255
4277
  {
@@ -4292,7 +4314,7 @@ const ke = Vt.forwardRef(
4292
4314
  }
4293
4315
  )
4294
4316
  );
4295
- ke.displayName = "ToolbarButton";
4317
+ xe.displayName = "ToolbarButton";
4296
4318
  function Nn() {
4297
4319
  return /* @__PURE__ */ u(
4298
4320
  "div",
@@ -4352,8 +4374,8 @@ function fn({
4352
4374
  if (!e || !t.current) return;
4353
4375
  const C = () => {
4354
4376
  if (!f.current || !t.current) return;
4355
- const P = t.current.getBoundingClientRect(), x = f.current.offsetHeight || 300, c = f.current.offsetWidth || 240, M = rl(P, x, i);
4356
- g(M);
4377
+ const P = t.current.getBoundingClientRect(), x = f.current.offsetHeight || 300, c = f.current.offsetWidth || 240, A = rl(P, x, i);
4378
+ g(A);
4357
4379
  let w = t.current.parentElement;
4358
4380
  for (; w; ) {
4359
4381
  const S = window.getComputedStyle(w);
@@ -4361,17 +4383,17 @@ function fn({
4361
4383
  break;
4362
4384
  w = w.parentElement;
4363
4385
  }
4364
- const B = al(
4386
+ const M = al(
4365
4387
  P,
4366
4388
  c,
4367
4389
  a,
4368
4390
  i
4369
4391
  );
4370
4392
  if (w) {
4371
- const S = w.getBoundingClientRect(), O = B.left - S.left;
4372
- v({ align: B.align, left: O });
4393
+ const S = w.getBoundingClientRect(), R = M.left - S.left;
4394
+ v({ align: M.align, left: R });
4373
4395
  } else
4374
- v(B);
4396
+ v(M);
4375
4397
  };
4376
4398
  C();
4377
4399
  const k = requestAnimationFrame(() => {
@@ -4435,7 +4457,7 @@ function fn({
4435
4457
  );
4436
4458
  }
4437
4459
  function il({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4438
- const r = Ee(), a = G(null), i = N(() => e.isActive("heading", { level: 1 }) ? "heading1" : e.isActive("heading", { level: 2 }) ? "heading2" : e.isActive("heading", { level: 3 }) ? "heading3" : e.isActive("bulletList") ? "bulletList" : e.isActive("orderedList") ? "orderedList" : e.isActive("taskList") ? "taskList" : e.isActive("blockquote") ? "blockquote" : e.isActive("codeBlock") ? "codeBlock" : "paragraph", [e]), l = nn(
4460
+ const r = _e(), a = G(null), i = N(() => e.isActive("heading", { level: 1 }) ? "heading1" : e.isActive("heading", { level: 2 }) ? "heading2" : e.isActive("heading", { level: 3 }) ? "heading3" : e.isActive("bulletList") ? "bulletList" : e.isActive("orderedList") ? "orderedList" : e.isActive("taskList") ? "taskList" : e.isActive("blockquote") ? "blockquote" : e.isActive("codeBlock") ? "codeBlock" : "paragraph", [e]), l = nn(
4439
4461
  () => [
4440
4462
  {
4441
4463
  id: "paragraph",
@@ -4491,12 +4513,12 @@ function il({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4491
4513
  ), g = (h) => h === r.toolbar.blockTypes.heading1 ? r.toolbar.blockTypes.heading1 : h === r.toolbar.blockTypes.heading2 ? r.toolbar.blockTypes.heading2 : h === r.toolbar.blockTypes.heading3 ? r.toolbar.blockTypes.heading3 : h === r.toolbar.blockTypes.bulletedList ? r.toolbar.blockTypes.bulletedList : h === r.toolbar.blockTypes.numberedList ? r.toolbar.blockTypes.numberedList : r.toolbar.blockTypes.text;
4492
4514
  return /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
4493
4515
  /* @__PURE__ */ u(
4494
- ke,
4516
+ xe,
4495
4517
  {
4496
4518
  ref: a,
4497
4519
  active: t,
4498
4520
  onClick: n,
4499
- "data-tooltip": Te(r.toolbar.turnInto),
4521
+ "data-tooltip": Be(r.toolbar.turnInto),
4500
4522
  "data-testid": "toolbar-turnInto",
4501
4523
  "aria-label": r.aria.turnIntoButton,
4502
4524
  style: { width: "auto", minWidth: "auto", padding: "0 8px", height: "var(--pubwave-button-height, 28px)" },
@@ -4578,12 +4600,12 @@ function il({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4578
4600
  )
4579
4601
  ] });
4580
4602
  }
4581
- function me(e) {
4603
+ function ge(e) {
4582
4604
  return !!(e && !e.isDestroyed);
4583
4605
  }
4584
4606
  function jc(e, t) {
4585
- me(e) && Q(() => {
4586
- if (me(e))
4607
+ ge(e) && Z(() => {
4608
+ if (ge(e))
4587
4609
  switch (t) {
4588
4610
  case "start":
4589
4611
  e.commands.focus("start");
@@ -4599,18 +4621,18 @@ function jc(e, t) {
4599
4621
  }
4600
4622
  });
4601
4623
  }
4602
- function _e(e) {
4603
- me(e) && Q(() => {
4604
- me(e) && (e.isFocused || e.commands.focus());
4624
+ function Ne(e) {
4625
+ ge(e) && Z(() => {
4626
+ ge(e) && (e.isFocused || e.commands.focus());
4605
4627
  });
4606
4628
  }
4607
4629
  function Uc(e, t) {
4608
- me(e) && (t.preventDefault(), Q(() => {
4609
- me(e) && e.commands.focus();
4630
+ ge(e) && (t.preventDefault(), Z(() => {
4631
+ ge(e) && e.commands.focus();
4610
4632
  }));
4611
4633
  }
4612
4634
  function qc(e) {
4613
- if (!me(e))
4635
+ if (!ge(e))
4614
4636
  return function() {
4615
4637
  };
4616
4638
  const t = (o) => {
@@ -4627,17 +4649,17 @@ function qc(e) {
4627
4649
  };
4628
4650
  }
4629
4651
  function sl(e) {
4630
- if (!me(e)) return null;
4652
+ if (!ge(e)) return null;
4631
4653
  const { from: t, to: n, empty: o } = e.state.selection;
4632
4654
  return { from: t, to: n, empty: o };
4633
4655
  }
4634
4656
  function Bt(e, t) {
4635
- if (!me(e) || !t) return;
4657
+ if (!ge(e) || !t) return;
4636
4658
  const { from: n, to: o } = t, r = e.state.doc.content.size, a = Math.min(n, r), i = Math.min(o, r);
4637
4659
  e.commands.setTextSelection({ from: a, to: i });
4638
4660
  }
4639
4661
  function Fc(e) {
4640
- if (!me(e)) return;
4662
+ if (!ge(e)) return;
4641
4663
  const { selection: t } = e.state;
4642
4664
  if (t.$anchor.pos > 0) {
4643
4665
  e.commands.focus();
@@ -4661,7 +4683,7 @@ function Wc(e) {
4661
4683
  };
4662
4684
  }
4663
4685
  function ll({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }) {
4664
- const a = Ee(), i = G(null), l = G(null), s = G(null), d = G([]), p = G(null), [g, h] = W(""), v = (r == null ? void 0 : r.hasLink) ?? !1, f = (r == null ? void 0 : r.linkHref) ?? null;
4686
+ const a = _e(), i = G(null), l = G(null), s = G(null), d = G([]), p = G(null), [g, h] = W(""), v = (r == null ? void 0 : r.hasLink) ?? !1, f = (r == null ? void 0 : r.linkHref) ?? null;
4665
4687
  Y(() => {
4666
4688
  t ? (p.current = sl(e), h(f || ""), setTimeout(() => {
4667
4689
  var x, c;
@@ -4673,14 +4695,14 @@ function ll({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
4673
4695
  d.current.forEach((x) => x.destroy()), d.current = [];
4674
4696
  return;
4675
4697
  }
4676
- return d.current.forEach((x) => x.destroy()), d.current = [], Q(() => {
4677
- Q(() => {
4698
+ return d.current.forEach((x) => x.destroy()), d.current = [], Z(() => {
4699
+ Z(() => {
4678
4700
  if (!s.current) return;
4679
4701
  s.current.querySelectorAll("[data-tooltip]").forEach((c) => {
4680
- const M = c.getAttribute("data-tooltip");
4681
- if (M) {
4682
- const w = Ae(c, {
4683
- content: M,
4702
+ const A = c.getAttribute("data-tooltip");
4703
+ if (A) {
4704
+ const w = Me(c, {
4705
+ content: A,
4684
4706
  placement: "top",
4685
4707
  delay: [300, 0],
4686
4708
  duration: [200, 150],
@@ -4697,16 +4719,16 @@ function ll({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
4697
4719
  }, [t, a, g, f]);
4698
4720
  const m = N((x) => {
4699
4721
  if (x == null || x.preventDefault(), !g.trim()) {
4700
- p.current && Bt(e, p.current), e.chain().focus().unsetLink().run(), p.current && Q(() => {
4701
- Q(() => {
4722
+ p.current && Bt(e, p.current), e.chain().focus().unsetLink().run(), p.current && Z(() => {
4723
+ Z(() => {
4702
4724
  Bt(e, p.current);
4703
4725
  });
4704
4726
  }), o();
4705
4727
  return;
4706
4728
  }
4707
4729
  let c = g.trim();
4708
- !/^https?:\/\//i.test(c) && !c.startsWith("/") && !c.startsWith("#") && (c = `https://${c}`), p.current && Bt(e, p.current), e.chain().focus().setLink({ href: c }).run(), p.current && Q(() => {
4709
- Q(() => {
4730
+ !/^https?:\/\//i.test(c) && !c.startsWith("/") && !c.startsWith("#") && (c = `https://${c}`), p.current && Bt(e, p.current), e.chain().focus().setLink({ href: c }).run(), p.current && Z(() => {
4731
+ Z(() => {
4710
4732
  Bt(e, p.current);
4711
4733
  });
4712
4734
  }), o();
@@ -4724,12 +4746,12 @@ function ll({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
4724
4746
  }, [m, o, e]);
4725
4747
  return /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
4726
4748
  /* @__PURE__ */ u(
4727
- ke,
4749
+ xe,
4728
4750
  {
4729
4751
  ref: i,
4730
4752
  active: v,
4731
4753
  onClick: n,
4732
- "data-tooltip": Te(a.toolbar.link),
4754
+ "data-tooltip": Be(a.toolbar.link),
4733
4755
  "data-testid": "toolbar-link",
4734
4756
  "aria-label": a.aria.linkButton,
4735
4757
  children: /* @__PURE__ */ u(ni, {})
@@ -4920,7 +4942,7 @@ function $n(e) {
4920
4942
  }
4921
4943
  }
4922
4944
  function pl({ editor: e, onClose: t, buttonRef: n }) {
4923
- const o = Ee(), [r, a] = W([]), i = G(null), l = G([]);
4945
+ const o = _e(), [r, a] = W([]), i = G(null), l = G([]);
4924
4946
  Y(() => {
4925
4947
  const f = dl();
4926
4948
  f.length > 0 && a(f);
@@ -4957,7 +4979,7 @@ function pl({ editor: e, onClose: t, buttonRef: n }) {
4957
4979
  i.current.querySelectorAll("[data-tooltip]").forEach((m) => {
4958
4980
  const C = m.getAttribute("data-tooltip");
4959
4981
  if (C) {
4960
- const k = Ae(m, {
4982
+ const k = Me(m, {
4961
4983
  content: C,
4962
4984
  placement: "top",
4963
4985
  delay: [300, 0],
@@ -5128,7 +5150,7 @@ function pl({ editor: e, onClose: t, buttonRef: n }) {
5128
5150
  );
5129
5151
  }
5130
5152
  function fl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
5131
- const r = Ee(), a = G(null), i = () => {
5153
+ const r = _e(), a = G(null), i = () => {
5132
5154
  try {
5133
5155
  const f = e.getAttributes("textColor");
5134
5156
  return (f == null ? void 0 : f.color) || null;
@@ -5151,12 +5173,12 @@ function fl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
5151
5173
  })(), v = d;
5152
5174
  return /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
5153
5175
  /* @__PURE__ */ u(
5154
- ke,
5176
+ xe,
5155
5177
  {
5156
5178
  ref: a,
5157
5179
  active: !!p,
5158
5180
  onClick: n,
5159
- "data-tooltip": Te(r.toolbar.textColor),
5181
+ "data-tooltip": Be(r.toolbar.textColor),
5160
5182
  "data-testid": "toolbar-colorPicker",
5161
5183
  "aria-label": r.aria.colorPickerButton,
5162
5184
  children: /* @__PURE__ */ u(ii, { textColor: h, backgroundColor: v })
@@ -5176,7 +5198,7 @@ function hl({
5176
5198
  editor: e,
5177
5199
  selectionState: t
5178
5200
  }) {
5179
- const n = Ee(), [o, r] = W(null), a = N(() => {
5201
+ const n = _e(), [o, r] = W(null), a = N(() => {
5180
5202
  r(null), e.chain().focus().toggleBold().run();
5181
5203
  }, [e]), i = N(() => {
5182
5204
  r(null), e.chain().focus().toggleItalic().run();
@@ -5205,55 +5227,55 @@ function hl({
5205
5227
  ),
5206
5228
  /* @__PURE__ */ u(Nn, {}),
5207
5229
  /* @__PURE__ */ u(
5208
- ke,
5230
+ xe,
5209
5231
  {
5210
5232
  active: v,
5211
5233
  onClick: a,
5212
- "data-tooltip": Te(n.toolbar.bold, tt.bold),
5234
+ "data-tooltip": Be(n.toolbar.bold, tt.bold),
5213
5235
  "data-testid": "toolbar-bold",
5214
5236
  "aria-label": n.aria.boldButton,
5215
5237
  children: /* @__PURE__ */ u(Ja, {})
5216
5238
  }
5217
5239
  ),
5218
5240
  /* @__PURE__ */ u(
5219
- ke,
5241
+ xe,
5220
5242
  {
5221
5243
  active: f,
5222
5244
  onClick: i,
5223
- "data-tooltip": Te(n.toolbar.italic, tt.italic),
5245
+ "data-tooltip": Be(n.toolbar.italic, tt.italic),
5224
5246
  "data-testid": "toolbar-italic",
5225
5247
  "aria-label": n.aria.italicButton,
5226
5248
  children: /* @__PURE__ */ u(Za, {})
5227
5249
  }
5228
5250
  ),
5229
5251
  /* @__PURE__ */ u(
5230
- ke,
5252
+ xe,
5231
5253
  {
5232
5254
  active: m,
5233
5255
  onClick: l,
5234
- "data-tooltip": Te(n.toolbar.underline, tt.underline),
5256
+ "data-tooltip": Be(n.toolbar.underline, tt.underline),
5235
5257
  "data-testid": "toolbar-underline",
5236
5258
  "aria-label": n.aria.underlineButton,
5237
5259
  children: /* @__PURE__ */ u(Qa, {})
5238
5260
  }
5239
5261
  ),
5240
5262
  /* @__PURE__ */ u(
5241
- ke,
5263
+ xe,
5242
5264
  {
5243
5265
  active: C,
5244
5266
  onClick: s,
5245
- "data-tooltip": Te(n.toolbar.strike, tt.strike),
5267
+ "data-tooltip": Be(n.toolbar.strike, tt.strike),
5246
5268
  "data-testid": "toolbar-strike",
5247
5269
  "aria-label": n.aria.strikeButton,
5248
5270
  children: /* @__PURE__ */ u(ei, {})
5249
5271
  }
5250
5272
  ),
5251
5273
  /* @__PURE__ */ u(
5252
- ke,
5274
+ xe,
5253
5275
  {
5254
5276
  active: k,
5255
5277
  onClick: d,
5256
- "data-tooltip": Te(n.toolbar.code, tt.code),
5278
+ "data-tooltip": Be(n.toolbar.code, tt.code),
5257
5279
  "data-testid": "toolbar-code",
5258
5280
  "aria-label": n.aria.codeButton,
5259
5281
  children: /* @__PURE__ */ u(ti, {})
@@ -5282,7 +5304,7 @@ function hl({
5282
5304
  ] });
5283
5305
  }
5284
5306
  const nt = 8;
5285
- function Se(e) {
5307
+ function De(e) {
5286
5308
  return !e.isDestroyed;
5287
5309
  }
5288
5310
  function vl(e, t) {
@@ -5303,8 +5325,8 @@ function vl(e, t) {
5303
5325
  "center",
5304
5326
  // Default to center alignment
5305
5327
  nt
5306
- ).left, P = window.innerWidth, x = window.innerHeight, c = nt, M = Math.max(c, Math.min(k, P - g - c));
5307
- return { top: Math.max(c, Math.min(m, x - h - c)), left: M, visible: !0 };
5328
+ ).left, P = window.innerWidth, x = window.innerHeight, c = nt, A = Math.max(c, Math.min(k, P - g - c));
5329
+ return { top: Math.max(c, Math.min(m, x - h - c)), left: A, visible: !0 };
5308
5330
  }
5309
5331
  function bl({
5310
5332
  editor: e,
@@ -5318,8 +5340,8 @@ function bl({
5318
5340
  visible: !1
5319
5341
  }), [p, g] = W(
5320
5342
  null
5321
- ), [h, v] = W(!1), f = G([]), m = nn(() => !Se(e) || a.current || !h ? !1 : Ft(e), [e, p, h]), C = N(() => {
5322
- if (!Se(e)) return;
5343
+ ), [h, v] = W(!1), f = G([]), m = nn(() => !De(e) || a.current || !h ? !1 : Ft(e), [e, p, h]), C = N(() => {
5344
+ if (!De(e)) return;
5323
5345
  const x = Mo(e);
5324
5346
  g(x);
5325
5347
  }, [e]), k = N(() => {
@@ -5327,25 +5349,25 @@ function bl({
5327
5349
  d((x) => ({ ...x, visible: !1 }));
5328
5350
  return;
5329
5351
  }
5330
- Q(() => {
5331
- if (!Se(e)) return;
5352
+ Z(() => {
5353
+ if (!De(e)) return;
5332
5354
  const x = vl(e, r.current);
5333
5355
  d(x);
5334
5356
  });
5335
5357
  }, [e, m]);
5336
5358
  Y(() => {
5337
- if (!Se(e)) return;
5338
- const c = e.view.dom.closest(".pubwave-editor"), M = (B) => {
5339
- const S = B.target, O = r.current;
5340
- if (O && S && O.contains(S)) {
5359
+ if (!De(e)) return;
5360
+ const c = e.view.dom.closest(".pubwave-editor"), A = (M) => {
5361
+ const S = M.target, R = r.current;
5362
+ if (R && S && R.contains(S)) {
5341
5363
  a.current = !1;
5342
5364
  return;
5343
5365
  }
5344
5366
  c && S && c.contains(S) ? l.current = !0 : l.current = !1, a.current = !0, v(!1);
5345
- }, w = (B) => {
5367
+ }, w = (M) => {
5346
5368
  const S = Date.now(), T = S - i.current < 300;
5347
5369
  i.current = S;
5348
- const b = B.target, L = r.current;
5370
+ const b = M.target, L = r.current;
5349
5371
  if (L && b && L.contains(b)) {
5350
5372
  a.current = !1;
5351
5373
  return;
@@ -5355,31 +5377,31 @@ function bl({
5355
5377
  return;
5356
5378
  }
5357
5379
  setTimeout(() => {
5358
- Se(e) && (Ft(e) ? (C(), v(!0), Q(() => {
5380
+ De(e) && (Ft(e) ? (C(), v(!0), Z(() => {
5359
5381
  k();
5360
5382
  })) : (v(!1), d((H) => ({ ...H, visible: !1 }))));
5361
5383
  }, T ? 100 : 10);
5362
5384
  };
5363
- return document.addEventListener("mousedown", M), document.addEventListener("mouseup", w), () => {
5364
- document.removeEventListener("mousedown", M), document.removeEventListener("mouseup", w);
5385
+ return document.addEventListener("mousedown", A), document.addEventListener("mouseup", w), () => {
5386
+ document.removeEventListener("mousedown", A), document.removeEventListener("mouseup", w);
5365
5387
  };
5366
5388
  }, [e, C, k]), Y(() => {
5367
- if (!Se(e)) return;
5389
+ if (!De(e)) return;
5368
5390
  C();
5369
5391
  const x = () => {
5370
5392
  !a.current && h && C();
5371
5393
  }, c = () => {
5372
- a.current || (C(), Ft(e) ? v(!0) : v(!1), Q(() => {
5394
+ a.current || (C(), Ft(e) ? v(!0) : v(!1), Z(() => {
5373
5395
  k();
5374
5396
  }));
5375
- }, M = () => {
5397
+ }, A = () => {
5376
5398
  setTimeout(() => {
5377
- const w = document.activeElement, B = r.current;
5378
- B && w && B.contains(w) || (v(!1), x());
5399
+ const w = document.activeElement, M = r.current;
5400
+ M && w && M.contains(w) || (v(!1), x());
5379
5401
  }, 0);
5380
5402
  };
5381
- return e.on("update", x), e.on("selectionUpdate", c), e.on("focus", c), e.on("blur", M), () => {
5382
- e.off("update", x), e.off("selectionUpdate", c), e.off("focus", c), e.off("blur", M);
5403
+ return e.on("update", x), e.on("selectionUpdate", c), e.on("focus", c), e.on("blur", A), () => {
5404
+ e.off("update", x), e.off("selectionUpdate", c), e.off("focus", c), e.off("blur", A);
5383
5405
  };
5384
5406
  }, [e, C, k, h]), Y(() => {
5385
5407
  k(), o == null || o(m);
@@ -5392,20 +5414,20 @@ function bl({
5392
5414
  window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
5393
5415
  };
5394
5416
  }, [m, k]);
5395
- const P = Ee();
5417
+ const P = _e();
5396
5418
  return Y(() => {
5397
5419
  if (!Et()) {
5398
5420
  if (!m || !s.visible || !r.current) {
5399
5421
  f.current.forEach((x) => x.destroy()), f.current = [];
5400
5422
  return;
5401
5423
  }
5402
- return f.current.forEach((x) => x.destroy()), f.current = [], Q(() => {
5424
+ return f.current.forEach((x) => x.destroy()), f.current = [], Z(() => {
5403
5425
  if (!r.current) return;
5404
5426
  r.current.querySelectorAll("[data-tooltip]").forEach((c) => {
5405
- const M = c.getAttribute("data-tooltip");
5406
- if (M) {
5407
- const w = Ae(c, {
5408
- content: M,
5427
+ const A = c.getAttribute("data-tooltip");
5428
+ if (A) {
5429
+ const w = Me(c, {
5430
+ content: A,
5409
5431
  placement: "top",
5410
5432
  delay: [300, 0],
5411
5433
  duration: [200, 150],
@@ -5418,7 +5440,7 @@ function bl({
5418
5440
  f.current.forEach((x) => x.destroy()), f.current = [];
5419
5441
  };
5420
5442
  }
5421
- }, [m, s.visible, P]), Se(e) ? /* @__PURE__ */ u(
5443
+ }, [m, s.visible, P]), De(e) ? /* @__PURE__ */ u(
5422
5444
  "div",
5423
5445
  {
5424
5446
  ref: r,
@@ -5510,28 +5532,28 @@ function yl({ editor: e }) {
5510
5532
  };
5511
5533
  }, []);
5512
5534
  const m = N(() => {
5513
- const w = t.current, B = n.current;
5514
- if (!w || !B) return;
5535
+ const w = t.current, M = n.current;
5536
+ if (!w || !M) return;
5515
5537
  const S = w.closest(".pubwave-editor");
5516
5538
  if (!S) return;
5517
5539
  S.offsetHeight;
5518
- const O = S.getBoundingClientRect();
5519
- let T = 14, b = B;
5520
- ["UL", "OL", "BLOCKQUOTE"].includes(B.tagName) && B.firstElementChild instanceof HTMLElement && (b = B.firstElementChild), b.offsetHeight;
5540
+ const R = S.getBoundingClientRect();
5541
+ let T = 14, b = M;
5542
+ ["UL", "OL", "BLOCKQUOTE"].includes(M.tagName) && M.firstElementChild instanceof HTMLElement && (b = M.firstElementChild), b.offsetHeight;
5521
5543
  const L = b.getBoundingClientRect();
5522
5544
  try {
5523
- const H = window.getComputedStyle(b), U = H.lineHeight;
5524
- if (U && U !== "normal") {
5525
- const j = parseFloat(U);
5526
- isNaN(j) || (T = j / 2);
5545
+ const H = window.getComputedStyle(b), z = H.lineHeight;
5546
+ if (z && z !== "normal") {
5547
+ const U = parseFloat(z);
5548
+ isNaN(U) || (T = U / 2);
5527
5549
  } else {
5528
- const j = parseFloat(H.fontSize);
5529
- isNaN(j) || (T = j * 1.5 / 2);
5550
+ const U = parseFloat(H.fontSize);
5551
+ isNaN(U) || (T = U * 1.5 / 2);
5530
5552
  }
5531
5553
  } catch {
5532
5554
  }
5533
- const A = L.top - O.top + T;
5534
- !isNaN(A) && isFinite(A) && A >= 0 && p({ top: A });
5555
+ const B = L.top - R.top + T;
5556
+ !isNaN(B) && isFinite(B) && B >= 0 && p({ top: B });
5535
5557
  }, []), C = N((w) => {
5536
5558
  n.current = w, i(!0), requestAnimationFrame(() => {
5537
5559
  requestAnimationFrame(() => {
@@ -5544,25 +5566,25 @@ function yl({ editor: e }) {
5544
5566
  r.current && (clearTimeout(r.current), r.current = null);
5545
5567
  }, []);
5546
5568
  Y(() => {
5547
- const w = e.view.dom, B = w.closest(".pubwave-editor");
5548
- if (!B) return;
5569
+ const w = e.view.dom, M = w.closest(".pubwave-editor");
5570
+ if (!M) return;
5549
5571
  const S = (L) => {
5550
5572
  if (o.current) return;
5551
- const A = L.target;
5552
- if (!A || (P(), A.closest(".pubwave-block-handle")) || !w.contains(A))
5573
+ const B = L.target;
5574
+ if (!B || (P(), B.closest(".pubwave-block-handle")) || !w.contains(B))
5553
5575
  return;
5554
- const H = gl(A, w, e);
5576
+ const H = gl(B, w, e);
5555
5577
  H && (H !== n.current ? C(H) : i(!0));
5556
- }, O = (L) => {
5578
+ }, R = (L) => {
5557
5579
  if (o.current) return;
5558
- const A = L.relatedTarget;
5559
- if (!A) {
5580
+ const B = L.relatedTarget;
5581
+ if (!B) {
5560
5582
  P(), r.current = setTimeout(() => {
5561
5583
  k();
5562
5584
  }, 150);
5563
5585
  return;
5564
5586
  }
5565
- A.closest(".pubwave-block-handle") || w.contains(A) || A.closest(".pubwave-editor") || (P(), r.current = setTimeout(() => {
5587
+ B.closest(".pubwave-block-handle") || w.contains(B) || B.closest(".pubwave-editor") || (P(), r.current = setTimeout(() => {
5566
5588
  k();
5567
5589
  }, 150));
5568
5590
  }, T = () => {
@@ -5570,12 +5592,12 @@ function yl({ editor: e }) {
5570
5592
  k();
5571
5593
  }, 150));
5572
5594
  };
5573
- w.addEventListener("mouseover", S), w.addEventListener("mouseout", O), B.addEventListener("mouseleave", T);
5595
+ w.addEventListener("mouseover", S), w.addEventListener("mouseout", R), M.addEventListener("mouseleave", T);
5574
5596
  const b = ({ transaction: L }) => {
5575
5597
  L.docChanged && !o.current && k();
5576
5598
  };
5577
5599
  return e.on("transaction", b), () => {
5578
- w.removeEventListener("mouseover", S), w.removeEventListener("mouseout", O), B.removeEventListener("mouseleave", T), e.off("transaction", b), P();
5600
+ w.removeEventListener("mouseover", S), w.removeEventListener("mouseout", R), M.removeEventListener("mouseleave", T), e.off("transaction", b), P();
5579
5601
  };
5580
5602
  }, [e, C, k, P]), Y(() => {
5581
5603
  a && n.current && requestAnimationFrame(() => {
@@ -5594,50 +5616,50 @@ function yl({ editor: e }) {
5594
5616
  const w = n.current;
5595
5617
  if (w)
5596
5618
  try {
5597
- const B = e.view.posAtDOM(w, 0), S = e.state.doc.resolve(B);
5598
- let O = B;
5619
+ const M = e.view.posAtDOM(w, 0), S = e.state.doc.resolve(M);
5620
+ let R = M;
5599
5621
  for (let L = S.depth; L > 0; L--)
5600
5622
  if (S.node(L).isBlock) {
5601
- O = S.start(L);
5623
+ R = S.start(L);
5602
5624
  break;
5603
5625
  }
5604
- const b = e.state.doc.resolve(O).after(1);
5626
+ const b = e.state.doc.resolve(R).after(1);
5605
5627
  e.chain().focus().insertContentAt(b, { type: "paragraph" }).setTextSelection(b + 1).run(), setTimeout(() => {
5606
5628
  e.commands.insertContent("/");
5607
5629
  }, 10);
5608
- } catch (B) {
5609
- console.error("Failed to add block:", B);
5630
+ } catch (M) {
5631
+ console.error("Failed to add block:", M);
5610
5632
  }
5611
5633
  }, [e]), c = N((w) => {
5612
- const B = n.current;
5613
- if (!B) return;
5634
+ const M = n.current;
5635
+ if (!M) return;
5614
5636
  o.current = !0, requestAnimationFrame(() => {
5615
5637
  s(!0);
5616
5638
  });
5617
- const S = e.view.posAtDOM(B, 0), O = Ot(e.state.doc, S);
5618
- if (!O)
5639
+ const S = e.view.posAtDOM(M, 0), R = Ot(e.state.doc, S);
5640
+ if (!R)
5619
5641
  return;
5620
- const T = O.pos, b = `block-${T}`;
5621
- tl(e, b, T), w.dataTransfer.effectAllowed = "move", w.dataTransfer.setData("application/x-pubwave-block", b), B.classList.add("pubwave-block--dragging");
5622
- const L = B.cloneNode(!0);
5642
+ const T = R.pos, b = `block-${T}`;
5643
+ tl(e, b, T), w.dataTransfer.effectAllowed = "move", w.dataTransfer.setData("application/x-pubwave-block", b), M.classList.add("pubwave-block--dragging");
5644
+ const L = M.cloneNode(!0);
5623
5645
  L.classList.add("pubwave-block--drag-preview"), L.style.opacity = "1";
5624
- const A = (F) => {
5625
- F.style.setProperty("color", "#9b9a97", "important"), F.style.setProperty("border-color", "#9b9a97", "important"), F.style.setProperty("--pubwave-text", "#9b9a97", "important"), Array.from(F.children).forEach((R) => {
5626
- R instanceof HTMLElement && A(R);
5646
+ const B = (F) => {
5647
+ F.style.setProperty("color", "#9b9a97", "important"), F.style.setProperty("border-color", "#9b9a97", "important"), F.style.setProperty("--pubwave-text", "#9b9a97", "important"), Array.from(F.children).forEach((O) => {
5648
+ O instanceof HTMLElement && B(O);
5627
5649
  });
5628
5650
  };
5629
- A(L);
5630
- const H = B.getBoundingClientRect();
5651
+ B(L);
5652
+ const H = M.getBoundingClientRect();
5631
5653
  L.style.width = `${H.width}px`, L.style.position = "static", L.style.transform = "none";
5654
+ const z = document.createElement("div");
5655
+ z.className = "pubwave-editor";
5632
5656
  const U = document.createElement("div");
5633
- U.className = "pubwave-editor";
5634
- const j = document.createElement("div");
5635
- j.className = "pubwave-editor__content";
5657
+ U.className = "pubwave-editor__content";
5636
5658
  const V = document.createElement("div");
5637
- V.className = "ProseMirror", V.appendChild(L), j.appendChild(V), U.appendChild(j), U.style.position = "absolute", U.style.top = "-9999px", U.style.left = "-9999px", document.body.appendChild(U), w.dataTransfer.setDragImage(L, 0, 0), setTimeout(() => {
5638
- document.body.removeChild(U);
5659
+ V.className = "ProseMirror", V.appendChild(L), U.appendChild(V), z.appendChild(U), z.style.position = "absolute", z.style.top = "-9999px", z.style.left = "-9999px", document.body.appendChild(z), w.dataTransfer.setDragImage(L, 0, 0), setTimeout(() => {
5660
+ document.body.removeChild(z);
5639
5661
  }, 0);
5640
- }, [e]), M = N(() => {
5662
+ }, [e]), A = N(() => {
5641
5663
  o.current = !1, s(!1), n.current && n.current.classList.remove("pubwave-block--dragging"), i(!1);
5642
5664
  }, []);
5643
5665
  return g || v || !a ? null : /* @__PURE__ */ I(
@@ -5664,8 +5686,8 @@ function yl({ editor: e }) {
5664
5686
  },
5665
5687
  onMouseLeave: (w) => {
5666
5688
  w.stopPropagation();
5667
- const B = w.relatedTarget;
5668
- B != null && B.closest(".pubwave-editor") || (r.current && clearTimeout(r.current), r.current = setTimeout(() => {
5689
+ const M = w.relatedTarget;
5690
+ M != null && M.closest(".pubwave-editor") || (r.current && clearTimeout(r.current), r.current = setTimeout(() => {
5669
5691
  k();
5670
5692
  }, 150));
5671
5693
  },
@@ -5701,7 +5723,7 @@ function yl({ editor: e }) {
5701
5723
  className: "pubwave-block-handle__drag",
5702
5724
  draggable: !0,
5703
5725
  onDragStart: c,
5704
- onDragEnd: M,
5726
+ onDragEnd: A,
5705
5727
  "data-testid": "drag-handle",
5706
5728
  style: {
5707
5729
  // Hit area (minimum 44px for accessibility)
@@ -5882,7 +5904,7 @@ const Vc = ur(
5882
5904
  height: C,
5883
5905
  minHeight: k,
5884
5906
  "data-testid": P = "pubwave-editor"
5885
- } = t, x = At(i == null ? void 0 : i.locale), c = a ?? x.placeholder ?? 'Write,type "/" for commands...', M = ar({
5907
+ } = t, x = At(i == null ? void 0 : i.locale), c = a ?? x.placeholder ?? 'Write,type "/" for commands...', A = ar({
5886
5908
  extensions: Ao({
5887
5909
  placeholder: c,
5888
5910
  headingLevels: [1, 2, 3],
@@ -5963,23 +5985,23 @@ const Vc = ur(
5963
5985
  );
5964
5986
  dr(
5965
5987
  n,
5966
- () => M ? w(M) : null,
5967
- [M, w]
5988
+ () => A ? w(A) : null,
5989
+ [A, w]
5968
5990
  );
5969
- const [B, S] = W(!1);
5991
+ const [M, S] = W(!1);
5970
5992
  Y(() => {
5971
5993
  S(!0);
5972
5994
  }, []), Y(() => {
5973
5995
  var L;
5974
- if (!((L = M == null ? void 0 : M.view) != null && L.dom)) return;
5975
- const b = M.view.dom;
5996
+ if (!((L = A == null ? void 0 : A.view) != null && L.dom)) return;
5997
+ const b = A.view.dom;
5976
5998
  b && b.setAttribute("data-placeholder", c);
5977
- }, [M, c, i == null ? void 0 : i.locale]);
5978
- const O = [
5999
+ }, [A, c, i == null ? void 0 : i.locale]);
6000
+ const R = [
5979
6001
  "pubwave-editor",
5980
6002
  (i == null ? void 0 : i.classNamePrefix) ?? "",
5981
6003
  (i == null ? void 0 : i.containerClassName) ?? "",
5982
- M ? ol(M) : "",
6004
+ A ? ol(A) : "",
5983
6005
  // Add class when height is constrained
5984
6006
  C || k ? "pubwave-editor--fixed-height" : "",
5985
6007
  f
@@ -5994,17 +6016,17 @@ const Vc = ur(
5994
6016
  } : {}
5995
6017
  };
5996
6018
  if (m && (T["--pubwave-container-width"] = m, T.width = m, T["--pubwave-container-max-width"] = m, T.maxWidth = m), C && (T["--pubwave-container-height"] = C, T.height = C), k && (T["--pubwave-container-min-height"] = k, T.minHeight = k), i != null && i.colors) {
5997
- const { colors: b } = i, A = (b.text || "#1f2937").toLowerCase().trim(), H = A.startsWith("#f") || A.startsWith("#e") || A.includes("f1") || A.includes("f3") || A.includes("f0") || A.includes("fdf") || A.includes("ffb") || A.includes("ffc") || A.includes("ffd") || A.includes("ffe") || A.includes("fff") || A.includes("e0") || A.includes("e5") || A.includes("ecf") || A.includes("eef");
6019
+ const { colors: b } = i, B = (b.text || "#1f2937").toLowerCase().trim(), H = B.startsWith("#f") || B.startsWith("#e") || B.includes("f1") || B.includes("f3") || B.includes("f0") || B.includes("fdf") || B.includes("ffb") || B.includes("ffc") || B.includes("ffd") || B.includes("ffe") || B.includes("fff") || B.includes("e0") || B.includes("e5") || B.includes("ecf") || B.includes("eef");
5998
6020
  b.background && (b.background.includes("gradient") ? (T.background = b.background, H ? (T["--pubwave-surface"] = "rgba(38, 38, 38, 0.95)", T["--pubwave-bg"] = "#1a1a1a") : (T["--pubwave-surface"] = "rgba(255, 255, 255, 0.95)", T["--pubwave-bg"] = "#ffffff")) : (T["--pubwave-bg"] = b.background, T["--pubwave-surface"] = b.background)), b.text && (T["--pubwave-text"] = b.text), b.textMuted && (T["--pubwave-text-muted"] = b.textMuted), b.border && (T["--pubwave-border"] = b.border), b.primary && (T["--pubwave-primary"] = b.primary), b.linkColor && (T["--pubwave-link-color"] = b.linkColor), H ? T["--pubwave-hover"] = "rgba(255, 255, 255, 0.1)" : T["--pubwave-hover"] = "rgba(0, 0, 0, 0.05)";
5999
6021
  }
6000
6022
  if (i != null && i.backgroundImage) {
6001
6023
  const b = i.backgroundImage, L = i.backgroundImageOptions || {};
6002
6024
  b.startsWith("url(") || b.includes("gradient") || b.includes("linear-gradient") || b.includes("radial-gradient") ? T.backgroundImage = b : T.backgroundImage = `url(${b})`, L.repeat !== void 0 ? T.backgroundRepeat = L.repeat : T.backgroundRepeat = "no-repeat", L.position !== void 0 ? T.backgroundPosition = L.position : T.backgroundPosition = "center", L.size !== void 0 ? T.backgroundSize = L.size : T.backgroundSize = "cover", L.attachment !== void 0 ? T.backgroundAttachment = L.attachment : T.backgroundAttachment = "scroll";
6003
6025
  }
6004
- return !B || !M ? /* @__PURE__ */ u(vn, { value: { locale: x }, children: /* @__PURE__ */ u(
6026
+ return !M || !A ? /* @__PURE__ */ u(vn, { value: { locale: x }, children: /* @__PURE__ */ u(
6005
6027
  "div",
6006
6028
  {
6007
- className: O,
6029
+ className: R,
6008
6030
  "data-testid": P,
6009
6031
  role: "application",
6010
6032
  "aria-label": Rt.editor,
@@ -6013,77 +6035,77 @@ const Vc = ur(
6013
6035
  ) }) : /* @__PURE__ */ u(vn, { value: { locale: x }, children: /* @__PURE__ */ I(
6014
6036
  "div",
6015
6037
  {
6016
- className: O,
6038
+ className: R,
6017
6039
  "data-testid": P,
6018
6040
  role: "application",
6019
6041
  "aria-label": Rt.editor,
6020
6042
  style: T,
6021
6043
  children: [
6022
- /* @__PURE__ */ u(ir, { editor: M }),
6023
- r && /* @__PURE__ */ u(bl, { editor: M }),
6024
- r && /* @__PURE__ */ u(yl, { editor: M }),
6025
- r && /* @__PURE__ */ u(Cl, { editor: M })
6044
+ /* @__PURE__ */ u(ir, { editor: A }),
6045
+ r && /* @__PURE__ */ u(bl, { editor: A }),
6046
+ r && /* @__PURE__ */ u(yl, { editor: A }),
6047
+ r && /* @__PURE__ */ u(Cl, { editor: A })
6026
6048
  ]
6027
6049
  }
6028
6050
  ) });
6029
6051
  }
6030
6052
  );
6031
- function Ne(e) {
6053
+ function He(e) {
6032
6054
  return !e.isDestroyed;
6033
6055
  }
6034
6056
  function Ll(e) {
6035
- if (!Ne(e))
6057
+ if (!He(e))
6036
6058
  return { success: !1, message: "Editor not available" };
6037
6059
  const t = e.chain().focus().toggleBold().run();
6038
- return _e(e), {
6060
+ return Ne(e), {
6039
6061
  success: t,
6040
6062
  message: t ? "Bold toggled" : "Could not toggle bold"
6041
6063
  };
6042
6064
  }
6043
6065
  function Tl(e) {
6044
- if (!Ne(e))
6066
+ if (!He(e))
6045
6067
  return { success: !1, message: "Editor not available" };
6046
6068
  const t = e.chain().focus().toggleItalic().run();
6047
- return _e(e), {
6069
+ return Ne(e), {
6048
6070
  success: t,
6049
6071
  message: t ? "Italic toggled" : "Could not toggle italic"
6050
6072
  };
6051
6073
  }
6052
6074
  function Bl(e, t) {
6053
- if (!Ne(e))
6075
+ if (!He(e))
6054
6076
  return { success: !1, message: "Editor not available" };
6055
6077
  if (!t.trim())
6056
6078
  return { success: !1, message: "URL is required" };
6057
6079
  let n = t.trim();
6058
6080
  !/^https?:\/\//i.test(n) && !n.startsWith("/") && (n = `https://${n}`);
6059
6081
  const o = e.chain().focus().setLink({ href: n }).run();
6060
- return _e(e), {
6082
+ return Ne(e), {
6061
6083
  success: o,
6062
6084
  message: o ? "Link added" : "Could not add link"
6063
6085
  };
6064
6086
  }
6065
6087
  function Al(e) {
6066
- if (!Ne(e))
6088
+ if (!He(e))
6067
6089
  return { success: !1, message: "Editor not available" };
6068
6090
  const t = e.chain().focus().unsetLink().run();
6069
- return _e(e), {
6091
+ return Ne(e), {
6070
6092
  success: t,
6071
6093
  message: t ? "Link removed" : "Could not remove link"
6072
6094
  };
6073
6095
  }
6074
6096
  function Ml(e, t = window.prompt.bind(window)) {
6075
- if (!Ne(e))
6097
+ if (!He(e))
6076
6098
  return { success: !1, message: "Editor not available" };
6077
6099
  if (e.isActive("link"))
6078
6100
  return Al(e);
6079
6101
  const o = t("Enter URL:");
6080
- return o ? Bl(e, o) : (_e(e), { success: !1, message: "Link cancelled" });
6102
+ return o ? Bl(e, o) : (Ne(e), { success: !1, message: "Link cancelled" });
6081
6103
  }
6082
6104
  function Gc(e, t) {
6083
- if (!Ne(e))
6105
+ if (!He(e))
6084
6106
  return { success: !1, message: "Editor not available" };
6085
6107
  const n = e.chain().focus().setHeading({ level: t }).run();
6086
- _e(e);
6108
+ Ne(e);
6087
6109
  const o = String(t);
6088
6110
  return {
6089
6111
  success: n,
@@ -6091,10 +6113,10 @@ function Gc(e, t) {
6091
6113
  };
6092
6114
  }
6093
6115
  function Yc(e) {
6094
- if (!Ne(e))
6116
+ if (!He(e))
6095
6117
  return { success: !1, message: "Editor not available" };
6096
6118
  const t = e.chain().focus().setParagraph().run();
6097
- return _e(e), {
6119
+ return Ne(e), {
6098
6120
  success: t,
6099
6121
  message: t ? "Paragraph applied" : "Could not set paragraph"
6100
6122
  };
@@ -6264,7 +6286,7 @@ function Dl(e) {
6264
6286
  if (!t.isActive || t.direction === null)
6265
6287
  return;
6266
6288
  const a = n(), i = t.direction === "up" ? -t.speed : t.speed;
6267
- a === window ? window.scrollBy(0, i) : a instanceof HTMLElement && (a.scrollTop += i), t.animationId = Q(r);
6289
+ a === window ? window.scrollBy(0, i) : a instanceof HTMLElement && (a.scrollTop += i), t.animationId = Z(r);
6268
6290
  };
6269
6291
  return {
6270
6292
  /**
@@ -6279,7 +6301,7 @@ function Dl(e) {
6279
6301
  update(a) {
6280
6302
  if (!t.isActive) return;
6281
6303
  const i = o(), l = a - i.top, s = i.bottom - a;
6282
- l < en ? (t.direction = "up", t.speed = qn(l)) : s < en ? (t.direction = "down", t.speed = qn(s)) : (t.direction = null, t.speed = 0), t.direction !== null && t.animationId === null ? t.animationId = Q(r) : t.direction === null && t.animationId !== null && (cancelAnimationFrame(t.animationId), t.animationId = null);
6304
+ l < en ? (t.direction = "up", t.speed = qn(l)) : s < en ? (t.direction = "down", t.speed = qn(s)) : (t.direction = null, t.speed = 0), t.direction !== null && t.animationId === null ? t.animationId = Z(r) : t.direction === null && t.animationId !== null && (cancelAnimationFrame(t.animationId), t.animationId = null);
6283
6305
  },
6284
6306
  /**
6285
6307
  * Stop auto-scroll
@@ -6470,7 +6492,7 @@ export {
6470
6492
  qc as maintainFocus,
6471
6493
  Qs as moveBlock,
6472
6494
  Pc as redo,
6473
- _e as restoreFocus,
6495
+ Ne as restoreFocus,
6474
6496
  Bt as restoreSelection,
6475
6497
  sl as saveSelection,
6476
6498
  Dc as selectAll,