zt-react-milkdown 0.1.28 → 0.1.30

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.mjs CHANGED
@@ -23659,7 +23659,7 @@ var FN = [
23659
23659
  });
23660
23660
  }, zN = (e, t = {}) => {
23661
23661
  let n = [], r = t.includeRuntime ?? !0;
23662
- return RN(n, "listener", e.listener), RN(n, "commonmark", e.commonmark), RN(n, "task-list-transform-keymap", e.taskListTransformKeymap), RN(n, "inline-code-boundary-navigation", e.inlineCodeBoundaryNavigation), RN(n, "gfm", e.gfm), RN(n, "history", e.history), RN(n, "editor-search", e.editorSearch), RN(n, "code-block-prism", e.codeBlockPrism), RN(n, "code-block-language-picker", e.codeBlockLanguagePicker), r && (RN(n, "clipboard", e.clipboard), RN(n, "indent", e.indent)), RN(n, "image-delete-selection", e.imageDeleteSelection), RN(n, "image-paste", e.imagePaste), RN(n, "table-arrow-entry", e.tableArrowEntry), RN(n, "block-boundary-navigation", e.blockBoundaryNavigation), RN(n, "heading-backspace-empty-paragraph", e.headingBackspaceEmptyParagraph), RN(n, "math-backspace-entry", e.mathBackspaceEntry), RN(n, "blockquote-backspace-lift", e.blockquoteBackspaceLift), RN(n, "table-focus-actions", e.tableFocusActions), RN(n, "selection-tooltip", e.selectionTooltip), RN(n, "gap-cursor", e.gapCursor), RN(n, "drop-cursor", e.dropCursor), RN(n, "math", e.math), RN(n, "math-inline-edit", e.mathInlineEdit), RN(n, "math-inline-arrow-navigation", e.mathInlineArrowNavigation), RN(n, "task-list-toggle", e.taskListToggle), RN(n, "tab-space-indent", e.tabSpaceIndent), RN(n, "code-block-mod-a-select", e.codeBlockModASelect), e.slash && RN(n, "slash", e.slash), n;
23662
+ return RN(n, "listener", e.listener), RN(n, "commonmark", e.commonmark), RN(n, "task-list-transform-keymap", e.taskListTransformKeymap), RN(n, "inline-code-boundary-navigation", e.inlineCodeBoundaryNavigation), RN(n, "gfm", e.gfm), RN(n, "history", e.history), RN(n, "editor-search", e.editorSearch), RN(n, "code-block-prism", e.codeBlockPrism), RN(n, "code-block-language-picker", e.codeBlockLanguagePicker), r && (RN(n, "clipboard", e.clipboard), RN(n, "indent", e.indent)), RN(n, "image-delete-selection", e.imageDeleteSelection), RN(n, "image-paste", e.imagePaste), RN(n, "table-arrow-entry", e.tableArrowEntry), RN(n, "block-boundary-navigation", e.blockBoundaryNavigation), RN(n, "heading-backspace-empty-paragraph", e.headingBackspaceEmptyParagraph), RN(n, "heading-focus-indicator", e.headingFocusIndicator), RN(n, "math-backspace-entry", e.mathBackspaceEntry), RN(n, "blockquote-backspace-lift", e.blockquoteBackspaceLift), RN(n, "table-focus-actions", e.tableFocusActions), RN(n, "selection-tooltip", e.selectionTooltip), RN(n, "gap-cursor", e.gapCursor), RN(n, "drop-cursor", e.dropCursor), RN(n, "math", e.math), RN(n, "math-inline-edit", e.mathInlineEdit), RN(n, "math-inline-arrow-navigation", e.mathInlineArrowNavigation), RN(n, "task-list-toggle", e.taskListToggle), RN(n, "tab-space-indent", e.tabSpaceIndent), RN(n, "code-block-mod-a-select", e.codeBlockModASelect), e.slash && RN(n, "slash", e.slash), n;
23663
23663
  };
23664
23664
  //#endregion
23665
23665
  //#region node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js
@@ -49002,23 +49002,38 @@ var uW = "math_inline", dW = "math_block", fW = /(?:\$)([^$]+)(?:\$)$/, pW = /^\
49002
49002
  }, PW = Pw(() => new Xu({
49003
49003
  key: new $u("zt-md-heading-backspace-empty-paragraph"),
49004
49004
  props: { handleKeyDown: (e, t) => NW(e, t) }
49005
- })), FW = "text", IW = {
49005
+ })), FW = "heading", IW = "zt-md-heading-focused", LW = "zt-md-heading-focus-indicator", RW = (e) => {
49006
+ let t = e.selection.$from;
49007
+ for (let n = t.depth; n > 0; --n) {
49008
+ let r = t.node(n);
49009
+ if (r.type.name !== FW) continue;
49010
+ let i = t.before(n), a = Number(r.attrs.level), o = xS.node(i, i + r.nodeSize, {
49011
+ class: IW,
49012
+ "data-heading-level": `H${a}`
49013
+ });
49014
+ return wS.create(e.doc, [o]);
49015
+ }
49016
+ return wS.empty;
49017
+ }, zW = Pw(() => new Xu({
49018
+ key: new $u(LW),
49019
+ props: { decorations: RW }
49020
+ })), BW = "text", VW = {
49006
49021
  svg: "svg",
49007
49022
  html: "html"
49008
- }, LW = {
49023
+ }, HW = {
49009
49024
  html: !0,
49010
49025
  svg: !0
49011
- }, RW = (e) => {
49026
+ }, UW = (e) => {
49012
49027
  let t = e.trim().toLowerCase();
49013
- return t ? t.startsWith("canvas-") ? Object.entries(IW).find(([e]) => t.includes(e))?.[1] ?? t : t : FW;
49014
- }, zW = (e) => (t) => {
49028
+ return t ? t.startsWith("canvas-") ? Object.entries(VW).find(([e]) => t.includes(e))?.[1] ?? t : t : BW;
49029
+ }, WW = (e) => (t) => {
49015
49030
  let n = e(t);
49016
49031
  return {
49017
49032
  ...n,
49018
49033
  attrs: {
49019
49034
  ...n.attrs,
49020
49035
  language: {
49021
- default: FW,
49036
+ default: BW,
49022
49037
  validate: "string"
49023
49038
  }
49024
49039
  },
@@ -49027,7 +49042,7 @@ var uW = "math_inline", dW = "math_block", fW = /(?:\$)([^$]+)(?:\$)$/, pW = /^\
49027
49042
  runner: (e, t, r) => {
49028
49043
  let i = {
49029
49044
  ...t,
49030
- lang: RW(String(t.lang ?? ""))
49045
+ lang: UW(String(t.lang ?? ""))
49031
49046
  };
49032
49047
  n.parseMarkdown.runner(e, i, r);
49033
49048
  }
@@ -49035,15 +49050,15 @@ var uW = "math_inline", dW = "math_block", fW = /(?:\$)([^$]+)(?:\$)$/, pW = /^\
49035
49050
  toMarkdown: {
49036
49051
  ...n.toMarkdown,
49037
49052
  runner: (e, t) => {
49038
- let n = RW(String(t.attrs.language ?? ""));
49053
+ let n = UW(String(t.attrs.language ?? ""));
49039
49054
  e.addNode("code", void 0, t.content.firstChild?.text || "", { lang: n });
49040
49055
  }
49041
49056
  }
49042
49057
  };
49043
- }, BW = (e) => {
49058
+ }, GW = (e) => {
49044
49059
  let t = e.get(gD.key);
49045
- e.set(gD.key, zW(t));
49046
- }, VW = (e) => LW[RW(e)] === !0, HW = "code_block", UW = 1200, WW = "html", GW = "ZT_MD_CODE_BLOCK_PREVIEW_LAYOUT", KW = [
49060
+ e.set(gD.key, WW(t));
49061
+ }, KW = (e) => HW[UW(e)] === !0, qW = "code_block", JW = 1200, YW = "html", XW = "ZT_MD_CODE_BLOCK_PREVIEW_LAYOUT", ZW = [
49047
49062
  "default-src 'none'",
49048
49063
  "style-src 'unsafe-inline'",
49049
49064
  "img-src data: blob:",
@@ -49054,16 +49069,16 @@ var uW = "math_inline", dW = "math_block", fW = /(?:\$)([^$]+)(?:\$)$/, pW = /^\
49054
49069
  "object-src 'none'",
49055
49070
  "form-action 'none'",
49056
49071
  "base-uri 'none'"
49057
- ], qW = (e) => y(i(e, {
49072
+ ], QW = (e) => y(i(e, {
49058
49073
  size: 14,
49059
49074
  strokeWidth: 2,
49060
49075
  "aria-hidden": "true"
49061
- })), JW = qW(Oe), YW = qW(be), XW = qW(rt), ZW = qW(Ae), QW = qW(Ee), $W = (e, t) => `<!doctype html>
49076
+ })), $W = QW(Oe), eG = QW(be), tG = QW(rt), nG = QW(Ae), rG = QW(Ee), iG = (e, t) => `<!doctype html>
49062
49077
  <html>
49063
49078
  <head>
49064
49079
  <meta charset="UTF-8" />
49065
49080
  <meta name="viewport" content="width=device-width, initial-scale=1" />
49066
- <meta http-equiv="Content-Security-Policy" content="${[...KW, ...t ? ["script-src 'unsafe-inline'"] : []].join("; ")}" />
49081
+ <meta http-equiv="Content-Security-Policy" content="${[...ZW, ...t ? ["script-src 'unsafe-inline'"] : []].join("; ")}" />
49067
49082
  <style>
49068
49083
  *, *::before, *::after { box-sizing: border-box; }
49069
49084
  html, body { min-height: 100%; margin: 0; }
@@ -49072,7 +49087,7 @@ var uW = "math_inline", dW = "math_block", fW = /(?:\$)([^$]+)(?:\$)$/, pW = /^\
49072
49087
  </style>
49073
49088
  </head>
49074
49089
  <body>${e}</body>
49075
- </html>`, eG = (e) => typeof e == "function" ? e() : null, tG = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, nG = class {
49090
+ </html>`, aG = (e) => typeof e == "function" ? e() : null, oG = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, sG = class {
49076
49091
  syncLanguageAttribute(e) {
49077
49092
  let t = typeof e.attrs.language == "string" ? e.attrs.language.trim() : "";
49078
49093
  if (!t) {
@@ -49083,25 +49098,25 @@ var uW = "math_inline", dW = "math_block", fW = /(?:\$)([^$]+)(?:\$)$/, pW = /^\
49083
49098
  }
49084
49099
  constructor(e, t, n, r) {
49085
49100
  this.previewFrame = null, this.isPreviewAvailable = !1, this.isPreviewMode = !1, this.renderedPreviewKey = null, this.copyFeedbackTimer = null, this.handlePreviewClick = (e) => {
49086
- e.preventDefault(), e.stopPropagation(), this.isPreviewAvailable && (this.isPreviewMode = !this.isPreviewMode, this.syncPreviewState(), this.view.dispatch(this.view.state.tr.setMeta(GW, !0)));
49101
+ e.preventDefault(), e.stopPropagation(), this.isPreviewAvailable && (this.isPreviewMode = !this.isPreviewMode, this.syncPreviewState(), this.view.dispatch(this.view.state.tr.setMeta(XW, !0)));
49087
49102
  }, this.handlePreviewKeyDown = (e) => {
49088
49103
  if (e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
49089
- let t = eG(this.getPos);
49104
+ let t = aG(this.getPos);
49090
49105
  t !== null && _P(this.view, t, this.node, e.key) && e.preventDefault();
49091
49106
  }, this.handleCopyClick = (e) => {
49092
- if (e.preventDefault(), e.stopPropagation(), !tG(this.view)) return;
49107
+ if (e.preventDefault(), e.stopPropagation(), !oG(this.view)) return;
49093
49108
  let t = this.node.textContent;
49094
49109
  (typeof navigator < "u" && navigator.clipboard?.writeText ? navigator.clipboard.writeText(t) : Promise.resolve()).then(() => {
49095
- this.copyButton.innerHTML = YW, this.copyButton.dataset.copied = "true", this.copyFeedbackTimer !== null && clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = setTimeout(() => {
49096
- this.copyButton.innerHTML = JW, delete this.copyButton.dataset.copied, this.copyFeedbackTimer = null;
49097
- }, UW);
49110
+ this.copyButton.innerHTML = eG, this.copyButton.dataset.copied = "true", this.copyFeedbackTimer !== null && clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = setTimeout(() => {
49111
+ this.copyButton.innerHTML = $W, delete this.copyButton.dataset.copied, this.copyFeedbackTimer = null;
49112
+ }, JW);
49098
49113
  }).catch(() => {});
49099
49114
  }, this.handleDeleteClick = (e) => {
49100
- e.preventDefault(), e.stopPropagation(), tG(this.view) && this.deleteCurrentCodeBlock();
49101
- }, this.node = e, this.view = t, this.getPos = n, this.messages = r, this.dom = document.createElement("div"), this.dom.className = "zt-md-code-block", this.dom.dataset.type = HW, this.contentDOM = document.createElement("pre"), this.previewContainer = document.createElement("div"), this.previewContainer.className = "zt-md-code-block-preview", this.previewContainer.contentEditable = "false", this.previewContainer.hidden = !0, this.previewContainer.tabIndex = -1, this.previewContainer.setAttribute("role", "region"), this.previewContainer.setAttribute("aria-label", r.codeBlockPreviewAriaLabel), this.actionsContainer = document.createElement("span"), this.actionsContainer.className = "zt-md-code-block-actions", this.actionsContainer.contentEditable = "false", this.previewButton = document.createElement("button"), this.previewButton.type = "button", this.previewButton.className = "zt-md-code-block-action-button", this.previewButton.hidden = !0, this.previewButton.innerHTML = ZW, this.copyButton = document.createElement("button"), this.copyButton.type = "button", this.copyButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action", this.copyButton.setAttribute("aria-label", r.codeBlockCopyAriaLabel), this.copyButton.innerHTML = JW, this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action zt-md-code-block-action-button-danger", this.deleteButton.setAttribute("aria-label", r.codeBlockDeleteAriaLabel), this.deleteButton.innerHTML = XW, this.actionsContainer.append(this.previewButton, this.copyButton, this.deleteButton), this.dom.append(this.contentDOM, this.previewContainer, this.actionsContainer), this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), this.previewButton.addEventListener("click", this.handlePreviewClick), this.copyButton.addEventListener("click", this.handleCopyClick), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.previewContainer.addEventListener("keydown", this.handlePreviewKeyDown);
49115
+ e.preventDefault(), e.stopPropagation(), oG(this.view) && this.deleteCurrentCodeBlock();
49116
+ }, this.node = e, this.view = t, this.getPos = n, this.messages = r, this.dom = document.createElement("div"), this.dom.className = "zt-md-code-block", this.dom.dataset.type = qW, this.contentDOM = document.createElement("pre"), this.previewContainer = document.createElement("div"), this.previewContainer.className = "zt-md-code-block-preview", this.previewContainer.contentEditable = "false", this.previewContainer.hidden = !0, this.previewContainer.tabIndex = -1, this.previewContainer.setAttribute("role", "region"), this.previewContainer.setAttribute("aria-label", r.codeBlockPreviewAriaLabel), this.actionsContainer = document.createElement("span"), this.actionsContainer.className = "zt-md-code-block-actions", this.actionsContainer.contentEditable = "false", this.previewButton = document.createElement("button"), this.previewButton.type = "button", this.previewButton.className = "zt-md-code-block-action-button", this.previewButton.hidden = !0, this.previewButton.innerHTML = nG, this.copyButton = document.createElement("button"), this.copyButton.type = "button", this.copyButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action", this.copyButton.setAttribute("aria-label", r.codeBlockCopyAriaLabel), this.copyButton.innerHTML = $W, this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action zt-md-code-block-action-button-danger", this.deleteButton.setAttribute("aria-label", r.codeBlockDeleteAriaLabel), this.deleteButton.innerHTML = tG, this.actionsContainer.append(this.previewButton, this.copyButton, this.deleteButton), this.dom.append(this.contentDOM, this.previewContainer, this.actionsContainer), this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), this.previewButton.addEventListener("click", this.handlePreviewClick), this.copyButton.addEventListener("click", this.handleCopyClick), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.previewContainer.addEventListener("keydown", this.handlePreviewKeyDown);
49102
49117
  }
49103
49118
  deleteCurrentCodeBlock() {
49104
- let e = eG(this.getPos);
49119
+ let e = aG(this.getPos);
49105
49120
  if (e === null) return;
49106
49121
  let t = this.view.state.tr.delete(e, e + this.node.nodeSize), n = Math.min(e, t.doc.content.size);
49107
49122
  t.setSelection(N.near(t.doc.resolve(n), -1)).scrollIntoView(), this.view.dispatch(t), requestAnimationFrame(() => {
@@ -49109,36 +49124,36 @@ var uW = "math_inline", dW = "math_block", fW = /(?:\$)([^$]+)(?:\$)$/, pW = /^\
49109
49124
  });
49110
49125
  }
49111
49126
  updateEditableState() {
49112
- this.dom.dataset.editable = tG(this.view) ? "true" : "false";
49127
+ this.dom.dataset.editable = oG(this.view) ? "true" : "false";
49113
49128
  }
49114
49129
  syncPreviewAvailability(e) {
49115
49130
  let t = typeof e.attrs.language == "string" ? e.attrs.language : "";
49116
- this.isPreviewAvailable = VW(t), this.isPreviewAvailable || (this.isPreviewMode = !1), this.previewButton.hidden = !this.isPreviewAvailable, this.syncPreviewState(), this.syncActionsVisibility();
49131
+ this.isPreviewAvailable = KW(t), this.isPreviewAvailable || (this.isPreviewMode = !1), this.previewButton.hidden = !this.isPreviewAvailable, this.syncPreviewState(), this.syncActionsVisibility();
49117
49132
  }
49118
49133
  syncPreviewState() {
49119
49134
  let e = this.isPreviewAvailable && this.isPreviewMode, t = e ? this.messages.codeBlockSourceAriaLabel : this.messages.codeBlockPreviewAriaLabel;
49120
- if (this.dom.dataset.viewMode = e ? "preview" : "source", this.previewContainer.hidden = !e, this.previewContainer.tabIndex = e ? 0 : -1, this.previewButton.dataset.active = e ? "true" : "false", this.previewButton.setAttribute("aria-pressed", e ? "true" : "false"), this.previewButton.setAttribute("aria-label", t), this.previewButton.title = t, this.previewButton.innerHTML = e ? QW : ZW, e) {
49135
+ if (this.dom.dataset.viewMode = e ? "preview" : "source", this.previewContainer.hidden = !e, this.previewContainer.tabIndex = e ? 0 : -1, this.previewButton.dataset.active = e ? "true" : "false", this.previewButton.setAttribute("aria-pressed", e ? "true" : "false"), this.previewButton.setAttribute("aria-label", t), this.previewButton.title = t, this.previewButton.innerHTML = e ? rG : nG, e) {
49121
49136
  this.contentDOM.setAttribute("aria-hidden", "true"), this.renderPreview();
49122
49137
  return;
49123
49138
  }
49124
49139
  this.contentDOM.removeAttribute("aria-hidden"), this.clearPreview();
49125
49140
  }
49126
49141
  syncActionsVisibility() {
49127
- let e = tG(this.view) || this.isPreviewAvailable;
49142
+ let e = oG(this.view) || this.isPreviewAvailable;
49128
49143
  this.actionsContainer.dataset.visible = e ? "true" : "false";
49129
49144
  }
49130
49145
  renderPreview() {
49131
- let e = this.node.textContent, t = RW(String(this.node.attrs.language ?? "")), n = t === WW, r = `${t}\u0000${e}`;
49146
+ let e = this.node.textContent, t = UW(String(this.node.attrs.language ?? "")), n = t === YW, r = `${t}\u0000${e}`;
49132
49147
  if (this.renderedPreviewKey === r) return;
49133
49148
  this.renderedPreviewKey = r;
49134
49149
  let i = document.createElement("iframe");
49135
- i.className = "zt-md-code-block-preview-frame", i.title = this.messages.codeBlockPreviewAriaLabel, i.tabIndex = -1, i.referrerPolicy = "no-referrer", i.setAttribute("sandbox", n ? "allow-scripts" : ""), i.srcdoc = $W(e, n), this.previewContainer.replaceChildren(i), this.previewFrame = i;
49150
+ i.className = "zt-md-code-block-preview-frame", i.title = this.messages.codeBlockPreviewAriaLabel, i.tabIndex = -1, i.referrerPolicy = "no-referrer", i.setAttribute("sandbox", n ? "allow-scripts" : ""), i.srcdoc = iG(e, n), this.previewContainer.replaceChildren(i), this.previewFrame = i;
49136
49151
  }
49137
49152
  clearPreview() {
49138
49153
  this.renderedPreviewKey = null, this.previewFrame?.remove(), this.previewFrame = null;
49139
49154
  }
49140
49155
  update(e) {
49141
- return e.type.name === HW ? (this.node = e, this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), !0) : !1;
49156
+ return e.type.name === qW ? (this.node = e, this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), !0) : !1;
49142
49157
  }
49143
49158
  stopEvent(e) {
49144
49159
  let t = e.target;
@@ -49148,14 +49163,14 @@ var uW = "math_inline", dW = "math_block", fW = /(?:\$)([^$]+)(?:\$)$/, pW = /^\
49148
49163
  return e.type === "selection" ? !1 : e.type === "attributes" && (e.target === this.dom && e.attributeName === "data-view-mode" || e.target === this.contentDOM && e.attributeName === "aria-hidden") ? !0 : this.actionsContainer.contains(e.target) || this.previewContainer.contains(e.target);
49149
49164
  }
49150
49165
  destroy() {
49151
- this.previewButton.removeEventListener("click", this.handlePreviewClick), this.copyButton.removeEventListener("click", this.handleCopyClick), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.previewContainer.removeEventListener("keydown", this.handlePreviewKeyDown), this.copyFeedbackTimer !== null && (clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = null), this.copyButton.innerHTML = JW, delete this.copyButton.dataset.copied, this.clearPreview();
49166
+ this.previewButton.removeEventListener("click", this.handlePreviewClick), this.copyButton.removeEventListener("click", this.handleCopyClick), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.previewContainer.removeEventListener("keydown", this.handlePreviewKeyDown), this.copyFeedbackTimer !== null && (clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = null), this.copyButton.innerHTML = $W, delete this.copyButton.dataset.copied, this.clearPreview();
49152
49167
  }
49153
- }, rG = (e = SF()) => (t, n, r) => new nG(t, n, typeof r == "function" ? () => {
49168
+ }, cG = (e = SF()) => (t, n, r) => new sG(t, n, typeof r == "function" ? () => {
49154
49169
  let e = r();
49155
49170
  return typeof e == "number" ? e : 0;
49156
49171
  } : !1, e);
49157
- iG.displayName = "clike", iG.aliases = [];
49158
- function iG(e) {
49172
+ lG.displayName = "clike", lG.aliases = [];
49173
+ function lG(e) {
49159
49174
  e.languages.clike = {
49160
49175
  comment: [{
49161
49176
  pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
@@ -49183,9 +49198,9 @@ function iG(e) {
49183
49198
  punctuation: /[{}[\];(),.:]/
49184
49199
  };
49185
49200
  }
49186
- aG.displayName = "c", aG.aliases = [];
49187
- function aG(e) {
49188
- e.register(iG), e.languages.c = e.languages.extend("clike", {
49201
+ uG.displayName = "c", uG.aliases = [];
49202
+ function uG(e) {
49203
+ e.register(lG), e.languages.c = e.languages.extend("clike", {
49189
49204
  comment: {
49190
49205
  pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
49191
49206
  greedy: !0
@@ -49239,9 +49254,9 @@ function aG(e) {
49239
49254
  }
49240
49255
  } }), e.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete e.languages.c.boolean;
49241
49256
  }
49242
- oG.displayName = "cpp", oG.aliases = [];
49243
- function oG(e) {
49244
- e.register(aG), (function(e) {
49257
+ dG.displayName = "cpp", dG.aliases = [];
49258
+ function dG(e) {
49259
+ e.register(uG), (function(e) {
49245
49260
  var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, n = "\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(/<keyword>/g, function() {
49246
49261
  return t.source;
49247
49262
  });
@@ -49303,16 +49318,16 @@ function oG(e) {
49303
49318
  } }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
49304
49319
  })(e);
49305
49320
  }
49306
- sG.displayName = "arduino", sG.aliases = ["ino"];
49307
- function sG(e) {
49308
- e.register(oG), e.languages.arduino = e.languages.extend("cpp", {
49321
+ fG.displayName = "arduino", fG.aliases = ["ino"];
49322
+ function fG(e) {
49323
+ e.register(dG), e.languages.arduino = e.languages.extend("cpp", {
49309
49324
  keyword: /\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,
49310
49325
  constant: /\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,
49311
49326
  builtin: /\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/
49312
49327
  }), e.languages.ino = e.languages.arduino;
49313
49328
  }
49314
- cG.displayName = "bash", cG.aliases = ["sh", "shell"];
49315
- function cG(e) {
49329
+ pG.displayName = "bash", pG.aliases = ["sh", "shell"];
49330
+ function pG(e) {
49316
49331
  (function(e) {
49317
49332
  var t = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n = {
49318
49333
  pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
@@ -49487,9 +49502,9 @@ function cG(e) {
49487
49502
  e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
49488
49503
  })(e);
49489
49504
  }
49490
- lG.displayName = "csharp", lG.aliases = ["cs", "dotnet"];
49491
- function lG(e) {
49492
- e.register(iG), (function(e) {
49505
+ mG.displayName = "csharp", mG.aliases = ["cs", "dotnet"];
49506
+ function mG(e) {
49507
+ e.register(lG), (function(e) {
49493
49508
  function t(e, t) {
49494
49509
  return e.replace(/<<(\d+)>>/g, function(e, n) {
49495
49510
  return "(?:" + t[+n] + ")";
@@ -49724,7 +49739,7 @@ function lG(e) {
49724
49739
  }), e.languages.dotnet = e.languages.cs = e.languages.csharp;
49725
49740
  })(e);
49726
49741
  }
49727
- uG.displayName = "markup", uG.aliases = [
49742
+ hG.displayName = "markup", hG.aliases = [
49728
49743
  "atom",
49729
49744
  "html",
49730
49745
  "mathml",
@@ -49733,7 +49748,7 @@ uG.displayName = "markup", uG.aliases = [
49733
49748
  "svg",
49734
49749
  "xml"
49735
49750
  ];
49736
- function uG(e) {
49751
+ function hG(e) {
49737
49752
  e.languages.markup = {
49738
49753
  comment: {
49739
49754
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
@@ -49850,8 +49865,8 @@ function uG(e) {
49850
49865
  });
49851
49866
  } }), e.languages.html = e.languages.markup, e.languages.mathml = e.languages.markup, e.languages.svg = e.languages.markup, e.languages.xml = e.languages.extend("markup", {}), e.languages.ssml = e.languages.xml, e.languages.atom = e.languages.xml, e.languages.rss = e.languages.xml;
49852
49867
  }
49853
- dG.displayName = "css", dG.aliases = [];
49854
- function dG(e) {
49868
+ gG.displayName = "css", gG.aliases = [];
49869
+ function gG(e) {
49855
49870
  (function(e) {
49856
49871
  var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
49857
49872
  e.languages.css = {
@@ -49906,8 +49921,8 @@ function dG(e) {
49906
49921
  n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
49907
49922
  })(e);
49908
49923
  }
49909
- fG.displayName = "diff", fG.aliases = [];
49910
- function fG(e) {
49924
+ _G.displayName = "diff", _G.aliases = [];
49925
+ function _G(e) {
49911
49926
  (function(e) {
49912
49927
  e.languages.diff = { coord: [
49913
49928
  /^(?:\*{3}|-{3}|\+{3}).*$/m,
@@ -49941,9 +49956,9 @@ function fG(e) {
49941
49956
  }), Object.defineProperty(e.languages.diff, "PREFIXES", { value: t });
49942
49957
  })(e);
49943
49958
  }
49944
- pG.displayName = "go", pG.aliases = [];
49945
- function pG(e) {
49946
- e.register(iG), e.languages.go = e.languages.extend("clike", {
49959
+ vG.displayName = "go", vG.aliases = [];
49960
+ function vG(e) {
49961
+ e.register(lG), e.languages.go = e.languages.extend("clike", {
49947
49962
  string: {
49948
49963
  pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
49949
49964
  lookbehind: !0,
@@ -49963,8 +49978,8 @@ function pG(e) {
49963
49978
  greedy: !0
49964
49979
  } }), delete e.languages.go["class-name"];
49965
49980
  }
49966
- mG.displayName = "ini", mG.aliases = [];
49967
- function mG(e) {
49981
+ yG.displayName = "ini", yG.aliases = [];
49982
+ function yG(e) {
49968
49983
  e.languages.ini = {
49969
49984
  comment: {
49970
49985
  pattern: /(^[ \f\t\v]*)[#;][^\n\r]*/m,
@@ -49999,9 +50014,9 @@ function mG(e) {
49999
50014
  punctuation: /=/
50000
50015
  };
50001
50016
  }
50002
- hG.displayName = "java", hG.aliases = [];
50003
- function hG(e) {
50004
- e.register(iG), (function(e) {
50017
+ bG.displayName = "java", bG.aliases = [];
50018
+ function bG(e) {
50019
+ e.register(lG), (function(e) {
50005
50020
  var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n = "(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*", r = {
50006
50021
  pattern: RegExp("(^|[^\\w.])" + n + "[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),
50007
50022
  lookbehind: !0,
@@ -50099,8 +50114,8 @@ function hG(e) {
50099
50114
  });
50100
50115
  })(e);
50101
50116
  }
50102
- gG.displayName = "regex", gG.aliases = [];
50103
- function gG(e) {
50117
+ xG.displayName = "regex", xG.aliases = [];
50118
+ function xG(e) {
50104
50119
  (function(e) {
50105
50120
  var t = {
50106
50121
  pattern: /\\[\\(){}[\]^$+*?|.]/,
@@ -50179,9 +50194,9 @@ function gG(e) {
50179
50194
  };
50180
50195
  })(e);
50181
50196
  }
50182
- _G.displayName = "javascript", _G.aliases = ["js"];
50183
- function _G(e) {
50184
- e.register(iG), e.languages.javascript = e.languages.extend("clike", {
50197
+ SG.displayName = "javascript", SG.aliases = ["js"];
50198
+ function SG(e) {
50199
+ e.register(lG), e.languages.javascript = e.languages.extend("clike", {
50185
50200
  "class-name": [e.languages.clike["class-name"], {
50186
50201
  pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
50187
50202
  lookbehind: !0
@@ -50282,8 +50297,8 @@ function _G(e) {
50282
50297
  alias: "property"
50283
50298
  } }), e.languages.markup && (e.languages.markup.tag.addInlined("script", "javascript"), e.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), e.languages.js = e.languages.javascript;
50284
50299
  }
50285
- vG.displayName = "json", vG.aliases = ["webmanifest"];
50286
- function vG(e) {
50300
+ CG.displayName = "json", CG.aliases = ["webmanifest"];
50301
+ function CG(e) {
50287
50302
  e.languages.json = {
50288
50303
  property: {
50289
50304
  pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
@@ -50309,9 +50324,9 @@ function vG(e) {
50309
50324
  }
50310
50325
  }, e.languages.webmanifest = e.languages.json;
50311
50326
  }
50312
- yG.displayName = "kotlin", yG.aliases = ["kt", "kts"];
50313
- function yG(e) {
50314
- e.register(iG), (function(e) {
50327
+ wG.displayName = "kotlin", wG.aliases = ["kt", "kts"];
50328
+ function wG(e) {
50329
+ e.register(lG), (function(e) {
50315
50330
  e.languages.kotlin = e.languages.extend("clike", {
50316
50331
  keyword: {
50317
50332
  pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
@@ -50374,9 +50389,9 @@ function yG(e) {
50374
50389
  } }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
50375
50390
  })(e);
50376
50391
  }
50377
- bG.displayName = "less", bG.aliases = [];
50378
- function bG(e) {
50379
- e.register(dG), e.languages.less = e.languages.extend("css", {
50392
+ TG.displayName = "less", TG.aliases = [];
50393
+ function TG(e) {
50394
+ e.register(gG), e.languages.less = e.languages.extend("css", {
50380
50395
  comment: [/\/\*[\s\S]*?\*\//, {
50381
50396
  pattern: /(^|[^\\])\/\/.*/,
50382
50397
  lookbehind: !0
@@ -50403,8 +50418,8 @@ function bG(e) {
50403
50418
  }
50404
50419
  });
50405
50420
  }
50406
- xG.displayName = "lua", xG.aliases = [];
50407
- function xG(e) {
50421
+ EG.displayName = "lua", EG.aliases = [];
50422
+ function EG(e) {
50408
50423
  e.languages.lua = {
50409
50424
  comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
50410
50425
  string: {
@@ -50421,8 +50436,8 @@ function xG(e) {
50421
50436
  punctuation: /[\[\](){},;]|\.+|:+/
50422
50437
  };
50423
50438
  }
50424
- SG.displayName = "makefile", SG.aliases = [];
50425
- function SG(e) {
50439
+ DG.displayName = "makefile", DG.aliases = [];
50440
+ function DG(e) {
50426
50441
  e.languages.makefile = {
50427
50442
  comment: {
50428
50443
  pattern: /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,
@@ -50451,8 +50466,8 @@ function SG(e) {
50451
50466
  punctuation: /[:;(){}]/
50452
50467
  };
50453
50468
  }
50454
- CG.displayName = "yaml", CG.aliases = ["yml"];
50455
- function CG(e) {
50469
+ OG.displayName = "yaml", OG.aliases = ["yml"];
50470
+ function OG(e) {
50456
50471
  (function(e) {
50457
50472
  var t = /[*&][^\s[\]{},]+/, n = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, r = "(?:" + n.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + n.source + ")?)", i = "(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(/<PLAIN>/g, function() {
50458
50473
  return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]";
@@ -50520,9 +50535,9 @@ function CG(e) {
50520
50535
  }, e.languages.yml = e.languages.yaml;
50521
50536
  })(e);
50522
50537
  }
50523
- wG.displayName = "markdown", wG.aliases = ["md"];
50524
- function wG(e) {
50525
- e.register(uG), (function(e) {
50538
+ kG.displayName = "markdown", kG.aliases = ["md"];
50539
+ function kG(e) {
50540
+ e.register(hG), (function(e) {
50526
50541
  var t = "(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))";
50527
50542
  function n(e) {
50528
50543
  return e = e.replace(/<inner>/g, function() {
@@ -50759,9 +50774,9 @@ function wG(e) {
50759
50774
  }), RegExp(e.languages.markup.tag.pattern.source, "gi"), String.fromCodePoint || String.fromCharCode, e.languages.md = e.languages.markdown;
50760
50775
  })(e);
50761
50776
  }
50762
- TG.displayName = "objectivec", TG.aliases = ["objc"];
50763
- function TG(e) {
50764
- e.register(aG), e.languages.objectivec = e.languages.extend("c", {
50777
+ AG.displayName = "objectivec", AG.aliases = ["objc"];
50778
+ function AG(e) {
50779
+ e.register(uG), e.languages.objectivec = e.languages.extend("c", {
50765
50780
  string: {
50766
50781
  pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
50767
50782
  greedy: !0
@@ -50770,8 +50785,8 @@ function TG(e) {
50770
50785
  operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
50771
50786
  }), delete e.languages.objectivec["class-name"], e.languages.objc = e.languages.objectivec;
50772
50787
  }
50773
- EG.displayName = "perl", EG.aliases = [];
50774
- function EG(e) {
50788
+ jG.displayName = "perl", jG.aliases = [];
50789
+ function jG(e) {
50775
50790
  (function(e) {
50776
50791
  var t = "(?:\\((?:[^()\\\\]|\\\\[\\s\\S])*\\)|\\{(?:[^{}\\\\]|\\\\[\\s\\S])*\\}|\\[(?:[^[\\]\\\\]|\\\\[\\s\\S])*\\]|<(?:[^<>\\\\]|\\\\[\\s\\S])*>)";
50777
50792
  e.languages.perl = {
@@ -50852,9 +50867,9 @@ function EG(e) {
50852
50867
  };
50853
50868
  })(e);
50854
50869
  }
50855
- DG.displayName = "markup-templating", DG.aliases = [];
50856
- function DG(e) {
50857
- e.register(uG), (function(e) {
50870
+ MG.displayName = "markup-templating", MG.aliases = [];
50871
+ function MG(e) {
50872
+ e.register(hG), (function(e) {
50858
50873
  function t(e, t) {
50859
50874
  return "___" + e.toUpperCase() + t + "___";
50860
50875
  }
@@ -50892,9 +50907,9 @@ function DG(e) {
50892
50907
  });
50893
50908
  })(e);
50894
50909
  }
50895
- OG.displayName = "php", OG.aliases = [];
50896
- function OG(e) {
50897
- e.register(DG), (function(e) {
50910
+ NG.displayName = "php", NG.aliases = [];
50911
+ function NG(e) {
50912
+ e.register(MG), (function(e) {
50898
50913
  var t = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, n = [
50899
50914
  {
50900
50915
  pattern: /\b(?:false|true)\b/i,
@@ -51170,8 +51185,8 @@ function OG(e) {
51170
51185
  });
51171
51186
  })(e);
51172
51187
  }
51173
- kG.displayName = "python", kG.aliases = ["py"];
51174
- function kG(e) {
51188
+ PG.displayName = "python", PG.aliases = ["py"];
51189
+ function PG(e) {
51175
51190
  e.languages.python = {
51176
51191
  comment: {
51177
51192
  pattern: /(^|[^\\])#.*/,
@@ -51231,8 +51246,8 @@ function kG(e) {
51231
51246
  punctuation: /[{}[\];(),.:]/
51232
51247
  }, e.languages.python["string-interpolation"].inside.interpolation.inside.rest = e.languages.python, e.languages.py = e.languages.python;
51233
51248
  }
51234
- AG.displayName = "r", AG.aliases = [];
51235
- function AG(e) {
51249
+ FG.displayName = "r", FG.aliases = [];
51250
+ function FG(e) {
51236
51251
  e.languages.r = {
51237
51252
  comment: /#.*/,
51238
51253
  string: {
@@ -51251,9 +51266,9 @@ function AG(e) {
51251
51266
  punctuation: /[(){}\[\],;]/
51252
51267
  };
51253
51268
  }
51254
- jG.displayName = "ruby", jG.aliases = ["rb"];
51255
- function jG(e) {
51256
- e.register(iG), (function(e) {
51269
+ IG.displayName = "ruby", IG.aliases = ["rb"];
51270
+ function IG(e) {
51271
+ e.register(lG), (function(e) {
51257
51272
  e.languages.ruby = e.languages.extend("clike", {
51258
51273
  comment: {
51259
51274
  pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
@@ -51408,8 +51423,8 @@ function jG(e) {
51408
51423
  }), e.languages.rb = e.languages.ruby;
51409
51424
  })(e);
51410
51425
  }
51411
- MG.displayName = "rust", MG.aliases = [];
51412
- function MG(e) {
51426
+ LG.displayName = "rust", LG.aliases = [];
51427
+ function LG(e) {
51413
51428
  (function(e) {
51414
51429
  for (var t = "\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/", n = 0; n < 2; n++) t = t.replace(/<self>/g, function() {
51415
51430
  return t;
@@ -51501,9 +51516,9 @@ function MG(e) {
51501
51516
  }, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
51502
51517
  })(e);
51503
51518
  }
51504
- NG.displayName = "sass", NG.aliases = [];
51505
- function NG(e) {
51506
- e.register(dG), (function(e) {
51519
+ RG.displayName = "sass", RG.aliases = [];
51520
+ function RG(e) {
51521
+ e.register(gG), (function(e) {
51507
51522
  e.languages.sass = e.languages.extend("css", { comment: {
51508
51523
  pattern: /^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,
51509
51524
  lookbehind: !0,
@@ -51548,9 +51563,9 @@ function NG(e) {
51548
51563
  } });
51549
51564
  })(e);
51550
51565
  }
51551
- PG.displayName = "scss", PG.aliases = [];
51552
- function PG(e) {
51553
- e.register(dG), e.languages.scss = e.languages.extend("css", {
51566
+ zG.displayName = "scss", zG.aliases = [];
51567
+ function zG(e) {
51568
+ e.register(gG), e.languages.scss = e.languages.extend("css", {
51554
51569
  comment: {
51555
51570
  pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
51556
51571
  lookbehind: !0
@@ -51602,8 +51617,8 @@ function PG(e) {
51602
51617
  }
51603
51618
  }), e.languages.scss.atrule.inside.rest = e.languages.scss;
51604
51619
  }
51605
- FG.displayName = "sql", FG.aliases = [];
51606
- function FG(e) {
51620
+ BG.displayName = "sql", BG.aliases = [];
51621
+ function BG(e) {
51607
51622
  e.languages.sql = {
51608
51623
  comment: {
51609
51624
  pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
@@ -51632,8 +51647,8 @@ function FG(e) {
51632
51647
  punctuation: /[;[\]()`,.]/
51633
51648
  };
51634
51649
  }
51635
- IG.displayName = "swift", IG.aliases = [];
51636
- function IG(e) {
51650
+ VG.displayName = "swift", VG.aliases = [];
51651
+ function VG(e) {
51637
51652
  e.languages.swift = {
51638
51653
  comment: {
51639
51654
  pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
@@ -51728,9 +51743,9 @@ function IG(e) {
51728
51743
  t.inside.interpolation.inside = e.languages.swift;
51729
51744
  });
51730
51745
  }
51731
- LG.displayName = "typescript", LG.aliases = ["ts"];
51732
- function LG(e) {
51733
- e.register(_G), (function(e) {
51746
+ HG.displayName = "typescript", HG.aliases = ["ts"];
51747
+ function HG(e) {
51748
+ e.register(SG), (function(e) {
51734
51749
  e.languages.typescript = e.languages.extend("javascript", {
51735
51750
  "class-name": {
51736
51751
  pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
@@ -51767,8 +51782,8 @@ function LG(e) {
51767
51782
  }), e.languages.ts = e.languages.typescript;
51768
51783
  })(e);
51769
51784
  }
51770
- RG.displayName = "basic", RG.aliases = [];
51771
- function RG(e) {
51785
+ UG.displayName = "basic", UG.aliases = [];
51786
+ function UG(e) {
51772
51787
  e.languages.basic = {
51773
51788
  comment: {
51774
51789
  pattern: /(?:!|REM\b).+/i,
@@ -51785,9 +51800,9 @@ function RG(e) {
51785
51800
  punctuation: /[,;:()]/
51786
51801
  };
51787
51802
  }
51788
- zG.displayName = "vbnet", zG.aliases = [];
51789
- function zG(e) {
51790
- e.register(RG), e.languages.vbnet = e.languages.extend("basic", {
51803
+ WG.displayName = "vbnet", WG.aliases = [];
51804
+ function WG(e) {
51805
+ e.register(UG), e.languages.vbnet = e.languages.extend("basic", {
51791
51806
  comment: [{
51792
51807
  pattern: /(?:!|REM\b).+/i,
51793
51808
  inside: { keyword: /^REM/i }
@@ -51807,117 +51822,117 @@ function zG(e) {
51807
51822
  }
51808
51823
  //#endregion
51809
51824
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js
51810
- var BG = class {
51825
+ var GG = class {
51811
51826
  constructor(e, t, n) {
51812
51827
  this.normal = t, this.property = e, n && (this.space = n);
51813
51828
  }
51814
51829
  };
51815
- BG.prototype.normal = {}, BG.prototype.property = {}, BG.prototype.space = void 0;
51830
+ GG.prototype.normal = {}, GG.prototype.property = {}, GG.prototype.space = void 0;
51816
51831
  //#endregion
51817
51832
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js
51818
- function VG(e, t) {
51833
+ function KG(e, t) {
51819
51834
  let n = {}, r = {};
51820
51835
  for (let t of e) Object.assign(n, t.property), Object.assign(r, t.normal);
51821
- return new BG(n, r, t);
51836
+ return new GG(n, r, t);
51822
51837
  }
51823
51838
  //#endregion
51824
51839
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js
51825
- function HG(e) {
51840
+ function qG(e) {
51826
51841
  return e.toLowerCase();
51827
51842
  }
51828
51843
  //#endregion
51829
51844
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js
51830
- var UG = class {
51845
+ var JG = class {
51831
51846
  constructor(e, t) {
51832
51847
  this.attribute = t, this.property = e;
51833
51848
  }
51834
51849
  };
51835
- UG.prototype.attribute = "", UG.prototype.booleanish = !1, UG.prototype.boolean = !1, UG.prototype.commaOrSpaceSeparated = !1, UG.prototype.commaSeparated = !1, UG.prototype.defined = !1, UG.prototype.mustUseProperty = !1, UG.prototype.number = !1, UG.prototype.overloadedBoolean = !1, UG.prototype.property = "", UG.prototype.spaceSeparated = !1, UG.prototype.space = void 0;
51850
+ JG.prototype.attribute = "", JG.prototype.booleanish = !1, JG.prototype.boolean = !1, JG.prototype.commaOrSpaceSeparated = !1, JG.prototype.commaSeparated = !1, JG.prototype.defined = !1, JG.prototype.mustUseProperty = !1, JG.prototype.number = !1, JG.prototype.overloadedBoolean = !1, JG.prototype.property = "", JG.prototype.spaceSeparated = !1, JG.prototype.space = void 0;
51836
51851
  //#endregion
51837
51852
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js
51838
- var WG = /* @__PURE__ */ te({
51839
- boolean: () => KG,
51840
- booleanish: () => qG,
51841
- commaOrSpaceSeparated: () => ZG,
51842
- commaSeparated: () => XG,
51853
+ var YG = /* @__PURE__ */ te({
51854
+ boolean: () => ZG,
51855
+ booleanish: () => QG,
51856
+ commaOrSpaceSeparated: () => nK,
51857
+ commaSeparated: () => tK,
51843
51858
  number: () => Q,
51844
- overloadedBoolean: () => JG,
51845
- spaceSeparated: () => YG
51846
- }), GG = 0, KG = QG(), qG = QG(), JG = QG(), Q = QG(), YG = QG(), XG = QG(), ZG = QG();
51847
- function QG() {
51848
- return 2 ** ++GG;
51859
+ overloadedBoolean: () => $G,
51860
+ spaceSeparated: () => eK
51861
+ }), XG = 0, ZG = rK(), QG = rK(), $G = rK(), Q = rK(), eK = rK(), tK = rK(), nK = rK();
51862
+ function rK() {
51863
+ return 2 ** ++XG;
51849
51864
  }
51850
51865
  //#endregion
51851
51866
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js
51852
- var $G = Object.keys(WG), eK = class extends UG {
51867
+ var iK = Object.keys(YG), aK = class extends JG {
51853
51868
  constructor(e, t, n, r) {
51854
51869
  let i = -1;
51855
- if (super(e, t), tK(this, "space", r), typeof n == "number") for (; ++i < $G.length;) {
51856
- let e = $G[i];
51857
- tK(this, $G[i], (n & WG[e]) === WG[e]);
51870
+ if (super(e, t), oK(this, "space", r), typeof n == "number") for (; ++i < iK.length;) {
51871
+ let e = iK[i];
51872
+ oK(this, iK[i], (n & YG[e]) === YG[e]);
51858
51873
  }
51859
51874
  }
51860
51875
  };
51861
- eK.prototype.defined = !0;
51862
- function tK(e, t, n) {
51876
+ aK.prototype.defined = !0;
51877
+ function oK(e, t, n) {
51863
51878
  n && (e[t] = n);
51864
51879
  }
51865
51880
  //#endregion
51866
51881
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js
51867
- function nK(e) {
51882
+ function sK(e) {
51868
51883
  let t = {}, n = {};
51869
51884
  for (let [r, i] of Object.entries(e.properties)) {
51870
- let a = new eK(r, e.transform(e.attributes || {}, r), i, e.space);
51871
- e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[HG(r)] = r, n[HG(a.attribute)] = r;
51885
+ let a = new aK(r, e.transform(e.attributes || {}, r), i, e.space);
51886
+ e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[qG(r)] = r, n[qG(a.attribute)] = r;
51872
51887
  }
51873
- return new BG(t, n, e.space);
51888
+ return new GG(t, n, e.space);
51874
51889
  }
51875
51890
  //#endregion
51876
51891
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js
51877
- var rK = nK({
51892
+ var cK = sK({
51878
51893
  properties: {
51879
51894
  ariaActiveDescendant: null,
51880
- ariaAtomic: qG,
51895
+ ariaAtomic: QG,
51881
51896
  ariaAutoComplete: null,
51882
- ariaBusy: qG,
51883
- ariaChecked: qG,
51897
+ ariaBusy: QG,
51898
+ ariaChecked: QG,
51884
51899
  ariaColCount: Q,
51885
51900
  ariaColIndex: Q,
51886
51901
  ariaColSpan: Q,
51887
- ariaControls: YG,
51902
+ ariaControls: eK,
51888
51903
  ariaCurrent: null,
51889
- ariaDescribedBy: YG,
51904
+ ariaDescribedBy: eK,
51890
51905
  ariaDetails: null,
51891
- ariaDisabled: qG,
51892
- ariaDropEffect: YG,
51906
+ ariaDisabled: QG,
51907
+ ariaDropEffect: eK,
51893
51908
  ariaErrorMessage: null,
51894
- ariaExpanded: qG,
51895
- ariaFlowTo: YG,
51896
- ariaGrabbed: qG,
51909
+ ariaExpanded: QG,
51910
+ ariaFlowTo: eK,
51911
+ ariaGrabbed: QG,
51897
51912
  ariaHasPopup: null,
51898
- ariaHidden: qG,
51913
+ ariaHidden: QG,
51899
51914
  ariaInvalid: null,
51900
51915
  ariaKeyShortcuts: null,
51901
51916
  ariaLabel: null,
51902
- ariaLabelledBy: YG,
51917
+ ariaLabelledBy: eK,
51903
51918
  ariaLevel: Q,
51904
51919
  ariaLive: null,
51905
- ariaModal: qG,
51906
- ariaMultiLine: qG,
51907
- ariaMultiSelectable: qG,
51920
+ ariaModal: QG,
51921
+ ariaMultiLine: QG,
51922
+ ariaMultiSelectable: QG,
51908
51923
  ariaOrientation: null,
51909
- ariaOwns: YG,
51924
+ ariaOwns: eK,
51910
51925
  ariaPlaceholder: null,
51911
51926
  ariaPosInSet: Q,
51912
- ariaPressed: qG,
51913
- ariaReadOnly: qG,
51927
+ ariaPressed: QG,
51928
+ ariaReadOnly: QG,
51914
51929
  ariaRelevant: null,
51915
- ariaRequired: qG,
51916
- ariaRoleDescription: YG,
51930
+ ariaRequired: QG,
51931
+ ariaRoleDescription: eK,
51917
51932
  ariaRowCount: Q,
51918
51933
  ariaRowIndex: Q,
51919
51934
  ariaRowSpan: Q,
51920
- ariaSelected: qG,
51935
+ ariaSelected: QG,
51921
51936
  ariaSetSize: Q,
51922
51937
  ariaSort: null,
51923
51938
  ariaValueMax: Q,
@@ -51932,17 +51947,17 @@ var rK = nK({
51932
51947
  });
51933
51948
  //#endregion
51934
51949
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js
51935
- function iK(e, t) {
51950
+ function lK(e, t) {
51936
51951
  return t in e ? e[t] : t;
51937
51952
  }
51938
51953
  //#endregion
51939
51954
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js
51940
- function aK(e, t) {
51941
- return iK(e, t.toLowerCase());
51955
+ function uK(e, t) {
51956
+ return lK(e, t.toLowerCase());
51942
51957
  }
51943
51958
  //#endregion
51944
51959
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js
51945
- var oK = nK({
51960
+ var dK = sK({
51946
51961
  attributes: {
51947
51962
  acceptcharset: "accept-charset",
51948
51963
  classname: "class",
@@ -51957,45 +51972,45 @@ var oK = nK({
51957
51972
  ],
51958
51973
  properties: {
51959
51974
  abbr: null,
51960
- accept: XG,
51961
- acceptCharset: YG,
51962
- accessKey: YG,
51975
+ accept: tK,
51976
+ acceptCharset: eK,
51977
+ accessKey: eK,
51963
51978
  action: null,
51964
51979
  allow: null,
51965
- allowFullScreen: KG,
51966
- allowPaymentRequest: KG,
51967
- allowUserMedia: KG,
51980
+ allowFullScreen: ZG,
51981
+ allowPaymentRequest: ZG,
51982
+ allowUserMedia: ZG,
51968
51983
  alt: null,
51969
51984
  as: null,
51970
- async: KG,
51985
+ async: ZG,
51971
51986
  autoCapitalize: null,
51972
- autoComplete: YG,
51973
- autoFocus: KG,
51974
- autoPlay: KG,
51975
- blocking: YG,
51987
+ autoComplete: eK,
51988
+ autoFocus: ZG,
51989
+ autoPlay: ZG,
51990
+ blocking: eK,
51976
51991
  capture: null,
51977
51992
  charSet: null,
51978
- checked: KG,
51993
+ checked: ZG,
51979
51994
  cite: null,
51980
- className: YG,
51995
+ className: eK,
51981
51996
  cols: Q,
51982
51997
  colSpan: null,
51983
51998
  content: null,
51984
- contentEditable: qG,
51985
- controls: KG,
51986
- controlsList: YG,
51987
- coords: Q | XG,
51999
+ contentEditable: QG,
52000
+ controls: ZG,
52001
+ controlsList: eK,
52002
+ coords: Q | tK,
51988
52003
  crossOrigin: null,
51989
52004
  data: null,
51990
52005
  dateTime: null,
51991
52006
  decoding: null,
51992
- default: KG,
51993
- defer: KG,
52007
+ default: ZG,
52008
+ defer: ZG,
51994
52009
  dir: null,
51995
52010
  dirName: null,
51996
- disabled: KG,
51997
- download: JG,
51998
- draggable: qG,
52011
+ disabled: ZG,
52012
+ download: $G,
52013
+ draggable: QG,
51999
52014
  encType: null,
52000
52015
  enterKeyHint: null,
52001
52016
  fetchPriority: null,
@@ -52003,36 +52018,36 @@ var oK = nK({
52003
52018
  formAction: null,
52004
52019
  formEncType: null,
52005
52020
  formMethod: null,
52006
- formNoValidate: KG,
52021
+ formNoValidate: ZG,
52007
52022
  formTarget: null,
52008
- headers: YG,
52023
+ headers: eK,
52009
52024
  height: Q,
52010
- hidden: JG,
52025
+ hidden: $G,
52011
52026
  high: Q,
52012
52027
  href: null,
52013
52028
  hrefLang: null,
52014
- htmlFor: YG,
52015
- httpEquiv: YG,
52029
+ htmlFor: eK,
52030
+ httpEquiv: eK,
52016
52031
  id: null,
52017
52032
  imageSizes: null,
52018
52033
  imageSrcSet: null,
52019
- inert: KG,
52034
+ inert: ZG,
52020
52035
  inputMode: null,
52021
52036
  integrity: null,
52022
52037
  is: null,
52023
- isMap: KG,
52038
+ isMap: ZG,
52024
52039
  itemId: null,
52025
- itemProp: YG,
52026
- itemRef: YG,
52027
- itemScope: KG,
52028
- itemType: YG,
52040
+ itemProp: eK,
52041
+ itemRef: eK,
52042
+ itemScope: ZG,
52043
+ itemType: eK,
52029
52044
  kind: null,
52030
52045
  label: null,
52031
52046
  lang: null,
52032
52047
  language: null,
52033
52048
  list: null,
52034
52049
  loading: null,
52035
- loop: KG,
52050
+ loop: ZG,
52036
52051
  low: Q,
52037
52052
  manifest: null,
52038
52053
  max: null,
@@ -52041,12 +52056,12 @@ var oK = nK({
52041
52056
  method: null,
52042
52057
  min: null,
52043
52058
  minLength: Q,
52044
- multiple: KG,
52045
- muted: KG,
52059
+ multiple: ZG,
52060
+ muted: ZG,
52046
52061
  name: null,
52047
52062
  nonce: null,
52048
- noModule: KG,
52049
- noValidate: KG,
52063
+ noModule: ZG,
52064
+ noValidate: ZG,
52050
52065
  onAbort: null,
52051
52066
  onAfterPrint: null,
52052
52067
  onAuxClick: null,
@@ -52135,38 +52150,38 @@ var oK = nK({
52135
52150
  onVolumeChange: null,
52136
52151
  onWaiting: null,
52137
52152
  onWheel: null,
52138
- open: KG,
52153
+ open: ZG,
52139
52154
  optimum: Q,
52140
52155
  pattern: null,
52141
- ping: YG,
52156
+ ping: eK,
52142
52157
  placeholder: null,
52143
- playsInline: KG,
52158
+ playsInline: ZG,
52144
52159
  popover: null,
52145
52160
  popoverTarget: null,
52146
52161
  popoverTargetAction: null,
52147
52162
  poster: null,
52148
52163
  preload: null,
52149
- readOnly: KG,
52164
+ readOnly: ZG,
52150
52165
  referrerPolicy: null,
52151
- rel: YG,
52152
- required: KG,
52153
- reversed: KG,
52166
+ rel: eK,
52167
+ required: ZG,
52168
+ reversed: ZG,
52154
52169
  rows: Q,
52155
52170
  rowSpan: Q,
52156
- sandbox: YG,
52171
+ sandbox: eK,
52157
52172
  scope: null,
52158
- scoped: KG,
52159
- seamless: KG,
52160
- selected: KG,
52161
- shadowRootClonable: KG,
52162
- shadowRootDelegatesFocus: KG,
52173
+ scoped: ZG,
52174
+ seamless: ZG,
52175
+ selected: ZG,
52176
+ shadowRootClonable: ZG,
52177
+ shadowRootDelegatesFocus: ZG,
52163
52178
  shadowRootMode: null,
52164
52179
  shape: null,
52165
52180
  size: Q,
52166
52181
  sizes: null,
52167
52182
  slot: null,
52168
52183
  span: Q,
52169
- spellCheck: qG,
52184
+ spellCheck: QG,
52170
52185
  src: null,
52171
52186
  srcDoc: null,
52172
52187
  srcLang: null,
@@ -52179,15 +52194,15 @@ var oK = nK({
52179
52194
  title: null,
52180
52195
  translate: null,
52181
52196
  type: null,
52182
- typeMustMatch: KG,
52197
+ typeMustMatch: ZG,
52183
52198
  useMap: null,
52184
- value: qG,
52199
+ value: QG,
52185
52200
  width: Q,
52186
52201
  wrap: null,
52187
52202
  writingSuggestions: null,
52188
52203
  align: null,
52189
52204
  aLink: null,
52190
- archive: YG,
52205
+ archive: eK,
52191
52206
  axis: null,
52192
52207
  background: null,
52193
52208
  bgColor: null,
@@ -52204,8 +52219,8 @@ var oK = nK({
52204
52219
  codeBase: null,
52205
52220
  codeType: null,
52206
52221
  color: null,
52207
- compact: KG,
52208
- declare: KG,
52222
+ compact: ZG,
52223
+ declare: ZG,
52209
52224
  event: null,
52210
52225
  face: null,
52211
52226
  frame: null,
@@ -52217,10 +52232,10 @@ var oK = nK({
52217
52232
  lowSrc: null,
52218
52233
  marginHeight: Q,
52219
52234
  marginWidth: Q,
52220
- noResize: KG,
52221
- noHref: KG,
52222
- noShade: KG,
52223
- noWrap: KG,
52235
+ noResize: ZG,
52236
+ noHref: ZG,
52237
+ noShade: ZG,
52238
+ noWrap: ZG,
52224
52239
  object: null,
52225
52240
  profile: null,
52226
52241
  prompt: null,
@@ -52228,7 +52243,7 @@ var oK = nK({
52228
52243
  rightMargin: Q,
52229
52244
  rules: null,
52230
52245
  scheme: null,
52231
- scrolling: qG,
52246
+ scrolling: QG,
52232
52247
  standby: null,
52233
52248
  summary: null,
52234
52249
  text: null,
@@ -52241,8 +52256,8 @@ var oK = nK({
52241
52256
  allowTransparency: null,
52242
52257
  autoCorrect: null,
52243
52258
  autoSave: null,
52244
- disablePictureInPicture: KG,
52245
- disableRemotePlayback: KG,
52259
+ disablePictureInPicture: ZG,
52260
+ disableRemotePlayback: ZG,
52246
52261
  prefix: null,
52247
52262
  property: null,
52248
52263
  results: Q,
@@ -52250,8 +52265,8 @@ var oK = nK({
52250
52265
  unselectable: null
52251
52266
  },
52252
52267
  space: "html",
52253
- transform: aK
52254
- }), sK = nK({
52268
+ transform: uK
52269
+ }), fK = sK({
52255
52270
  attributes: {
52256
52271
  accentHeight: "accent-height",
52257
52272
  alignmentBaseline: "alignment-baseline",
@@ -52427,7 +52442,7 @@ var oK = nK({
52427
52442
  timelineBegin: "timelinebegin"
52428
52443
  },
52429
52444
  properties: {
52430
- about: ZG,
52445
+ about: nK,
52431
52446
  accentHeight: Q,
52432
52447
  accumulate: null,
52433
52448
  additive: null,
@@ -52449,7 +52464,7 @@ var oK = nK({
52449
52464
  by: null,
52450
52465
  calcMode: null,
52451
52466
  capHeight: Q,
52452
- className: YG,
52467
+ className: eK,
52453
52468
  clip: null,
52454
52469
  clipPath: null,
52455
52470
  clipPathUnits: null,
@@ -52476,7 +52491,7 @@ var oK = nK({
52476
52491
  dur: null,
52477
52492
  divisor: Q,
52478
52493
  dominantBaseline: null,
52479
- download: KG,
52494
+ download: ZG,
52480
52495
  dx: null,
52481
52496
  dy: null,
52482
52497
  edgeMode: null,
@@ -52509,9 +52524,9 @@ var oK = nK({
52509
52524
  from: null,
52510
52525
  fx: null,
52511
52526
  fy: null,
52512
- g1: XG,
52513
- g2: XG,
52514
- glyphName: XG,
52527
+ g1: tK,
52528
+ g2: tK,
52529
+ glyphName: tK,
52515
52530
  glyphOrientationHorizontal: null,
52516
52531
  glyphOrientationVertical: null,
52517
52532
  glyphRef: null,
@@ -52539,7 +52554,7 @@ var oK = nK({
52539
52554
  k2: Q,
52540
52555
  k3: Q,
52541
52556
  k4: Q,
52542
- kernelMatrix: ZG,
52557
+ kernelMatrix: nK,
52543
52558
  kernelUnitLength: null,
52544
52559
  keyPoints: null,
52545
52560
  keySplines: null,
@@ -52681,7 +52696,7 @@ var oK = nK({
52681
52696
  patternTransform: null,
52682
52697
  patternUnits: null,
52683
52698
  phase: null,
52684
- ping: YG,
52699
+ ping: eK,
52685
52700
  pitch: null,
52686
52701
  playbackOrder: null,
52687
52702
  pointerEvents: null,
@@ -52693,21 +52708,21 @@ var oK = nK({
52693
52708
  preserveAspectRatio: null,
52694
52709
  primitiveUnits: null,
52695
52710
  propagate: null,
52696
- property: ZG,
52711
+ property: nK,
52697
52712
  r: null,
52698
52713
  radius: null,
52699
52714
  referrerPolicy: null,
52700
52715
  refX: null,
52701
52716
  refY: null,
52702
- rel: ZG,
52703
- rev: ZG,
52717
+ rel: nK,
52718
+ rev: nK,
52704
52719
  renderingIntent: null,
52705
52720
  repeatCount: null,
52706
52721
  repeatDur: null,
52707
- requiredExtensions: ZG,
52708
- requiredFeatures: ZG,
52709
- requiredFonts: ZG,
52710
- requiredFormats: ZG,
52722
+ requiredExtensions: nK,
52723
+ requiredFeatures: nK,
52724
+ requiredFonts: nK,
52725
+ requiredFormats: nK,
52711
52726
  resource: null,
52712
52727
  restart: null,
52713
52728
  result: null,
@@ -52735,7 +52750,7 @@ var oK = nK({
52735
52750
  strikethroughThickness: Q,
52736
52751
  string: null,
52737
52752
  stroke: null,
52738
- strokeDashArray: ZG,
52753
+ strokeDashArray: nK,
52739
52754
  strokeDashOffset: null,
52740
52755
  strokeLineCap: null,
52741
52756
  strokeLineJoin: null,
@@ -52749,7 +52764,7 @@ var oK = nK({
52749
52764
  syncMaster: null,
52750
52765
  syncTolerance: null,
52751
52766
  syncToleranceDefault: null,
52752
- systemLanguage: ZG,
52767
+ systemLanguage: nK,
52753
52768
  tabIndex: Q,
52754
52769
  tableValues: null,
52755
52770
  target: null,
@@ -52763,7 +52778,7 @@ var oK = nK({
52763
52778
  title: null,
52764
52779
  transformBehavior: null,
52765
52780
  type: null,
52766
- typeOf: ZG,
52781
+ typeOf: nK,
52767
52782
  to: null,
52768
52783
  transform: null,
52769
52784
  transformOrigin: null,
@@ -52805,8 +52820,8 @@ var oK = nK({
52805
52820
  zoomAndPan: null
52806
52821
  },
52807
52822
  space: "svg",
52808
- transform: iK
52809
- }), cK = nK({
52823
+ transform: lK
52824
+ }), pK = sK({
52810
52825
  properties: {
52811
52826
  xLinkActuate: null,
52812
52827
  xLinkArcRole: null,
@@ -52820,15 +52835,15 @@ var oK = nK({
52820
52835
  transform(e, t) {
52821
52836
  return "xlink:" + t.slice(5).toLowerCase();
52822
52837
  }
52823
- }), lK = nK({
52838
+ }), mK = sK({
52824
52839
  attributes: { xmlnsxlink: "xmlns:xlink" },
52825
52840
  properties: {
52826
52841
  xmlnsXLink: null,
52827
52842
  xmlns: null
52828
52843
  },
52829
52844
  space: "xmlns",
52830
- transform: aK
52831
- }), uK = nK({
52845
+ transform: uK
52846
+ }), hK = sK({
52832
52847
  properties: {
52833
52848
  xmlBase: null,
52834
52849
  xmlLang: null,
@@ -52838,49 +52853,49 @@ var oK = nK({
52838
52853
  transform(e, t) {
52839
52854
  return "xml:" + t.slice(3).toLowerCase();
52840
52855
  }
52841
- }), dK = /[A-Z]/g, fK = /-[a-z]/g, pK = /^data[-\w.:]+$/i;
52842
- function mK(e, t) {
52843
- let n = HG(t), r = t, i = UG;
52856
+ }), gK = /[A-Z]/g, _K = /-[a-z]/g, vK = /^data[-\w.:]+$/i;
52857
+ function yK(e, t) {
52858
+ let n = qG(t), r = t, i = JG;
52844
52859
  if (n in e.normal) return e.property[e.normal[n]];
52845
- if (n.length > 4 && n.slice(0, 4) === "data" && pK.test(t)) {
52860
+ if (n.length > 4 && n.slice(0, 4) === "data" && vK.test(t)) {
52846
52861
  if (t.charAt(4) === "-") {
52847
- let e = t.slice(5).replace(fK, gK);
52862
+ let e = t.slice(5).replace(_K, xK);
52848
52863
  r = "data" + e.charAt(0).toUpperCase() + e.slice(1);
52849
52864
  } else {
52850
52865
  let e = t.slice(4);
52851
- if (!fK.test(e)) {
52852
- let n = e.replace(dK, hK);
52866
+ if (!_K.test(e)) {
52867
+ let n = e.replace(gK, bK);
52853
52868
  n.charAt(0) !== "-" && (n = "-" + n), t = "data" + n;
52854
52869
  }
52855
52870
  }
52856
- i = eK;
52871
+ i = aK;
52857
52872
  }
52858
52873
  return new i(r, t);
52859
52874
  }
52860
- function hK(e) {
52875
+ function bK(e) {
52861
52876
  return "-" + e.toLowerCase();
52862
52877
  }
52863
- function gK(e) {
52878
+ function xK(e) {
52864
52879
  return e.charAt(1).toUpperCase();
52865
52880
  }
52866
52881
  //#endregion
52867
52882
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js
52868
- var _K = VG([
52869
- rK,
52870
- oK,
52883
+ var SK = KG([
52871
52884
  cK,
52872
- lK,
52873
- uK
52874
- ], "html"), vK = VG([
52875
- rK,
52876
- sK,
52885
+ dK,
52886
+ pK,
52887
+ mK,
52888
+ hK
52889
+ ], "html"), CK = KG([
52877
52890
  cK,
52878
- lK,
52879
- uK
52891
+ fK,
52892
+ pK,
52893
+ mK,
52894
+ hK
52880
52895
  ], "svg");
52881
52896
  //#endregion
52882
52897
  //#region node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js
52883
- function yK(e) {
52898
+ function wK(e) {
52884
52899
  let t = [], n = String(e || ""), r = n.indexOf(","), i = 0, a = !1;
52885
52900
  for (; !a;) {
52886
52901
  r === -1 && (r = n.length, a = !0);
@@ -52891,12 +52906,12 @@ function yK(e) {
52891
52906
  }
52892
52907
  //#endregion
52893
52908
  //#region node_modules/.pnpm/hast-util-parse-selector@4.0.0/node_modules/hast-util-parse-selector/lib/index.js
52894
- var bK = /[#.]/g;
52895
- function xK(e, t) {
52909
+ var TK = /[#.]/g;
52910
+ function EK(e, t) {
52896
52911
  let n = e || "", r = {}, i = 0, a, o;
52897
52912
  for (; i < n.length;) {
52898
- bK.lastIndex = i;
52899
- let e = bK.exec(n), t = n.slice(i, e ? e.index : n.length);
52913
+ TK.lastIndex = i;
52914
+ let e = TK.exec(n), t = n.slice(i, e ? e.index : n.length);
52900
52915
  t && (a ? a === "#" ? r.id = t : Array.isArray(r.className) ? r.className.push(t) : r.className = [t] : o = t, i += t.length), e && (a = e[0], i++);
52901
52916
  }
52902
52917
  return {
@@ -52908,14 +52923,14 @@ function xK(e, t) {
52908
52923
  }
52909
52924
  //#endregion
52910
52925
  //#region node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js
52911
- function SK(e) {
52926
+ function DK(e) {
52912
52927
  let t = String(e || "").trim();
52913
52928
  return t ? t.split(/[ \t\n\r\f]+/g) : [];
52914
52929
  }
52915
52930
  //#endregion
52916
52931
  //#region node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/create-h.js
52917
- function CK(e, t, n) {
52918
- let r = n ? kK(n) : void 0;
52932
+ function OK(e, t, n) {
52933
+ let r = n ? PK(n) : void 0;
52919
52934
  function i(n, i, ...a) {
52920
52935
  let o;
52921
52936
  if (n == null) {
@@ -52926,12 +52941,12 @@ function CK(e, t, n) {
52926
52941
  let e = i;
52927
52942
  a.unshift(e);
52928
52943
  } else {
52929
- o = xK(n, t);
52944
+ o = EK(n, t);
52930
52945
  let s = o.tagName.toLowerCase(), c = r ? r.get(s) : void 0;
52931
- if (o.tagName = c || s, wK(i)) a.unshift(i);
52932
- else for (let [t, n] of Object.entries(i)) TK(e, o.properties, t, n);
52946
+ if (o.tagName = c || s, kK(i)) a.unshift(i);
52947
+ else for (let [t, n] of Object.entries(i)) AK(e, o.properties, t, n);
52933
52948
  }
52934
- for (let e of a) EK(o.children, e);
52949
+ for (let e of a) jK(o.children, e);
52935
52950
  return o.type === "element" && o.tagName === "template" && (o.content = {
52936
52951
  type: "root",
52937
52952
  children: o.children
@@ -52939,7 +52954,7 @@ function CK(e, t, n) {
52939
52954
  }
52940
52955
  return i;
52941
52956
  }
52942
- function wK(e) {
52957
+ function kK(e) {
52943
52958
  if (typeof e != "object" || !e || Array.isArray(e)) return !0;
52944
52959
  if (typeof e.type != "string") return !1;
52945
52960
  let t = e, n = Object.keys(e);
@@ -52953,54 +52968,54 @@ function wK(e) {
52953
52968
  }
52954
52969
  return !!("children" in e && Array.isArray(e.children));
52955
52970
  }
52956
- function TK(e, t, n, r) {
52957
- let i = mK(e, n), a;
52971
+ function AK(e, t, n, r) {
52972
+ let i = yK(e, n), a;
52958
52973
  if (r != null) {
52959
52974
  if (typeof r == "number") {
52960
52975
  if (Number.isNaN(r)) return;
52961
52976
  a = r;
52962
- } else a = typeof r == "boolean" ? r : typeof r == "string" ? i.spaceSeparated ? SK(r) : i.commaSeparated ? yK(r) : i.commaOrSpaceSeparated ? SK(yK(r).join(" ")) : DK(i, i.property, r) : Array.isArray(r) ? [...r] : i.property === "style" ? OK(r) : String(r);
52977
+ } else a = typeof r == "boolean" ? r : typeof r == "string" ? i.spaceSeparated ? DK(r) : i.commaSeparated ? wK(r) : i.commaOrSpaceSeparated ? DK(wK(r).join(" ")) : MK(i, i.property, r) : Array.isArray(r) ? [...r] : i.property === "style" ? NK(r) : String(r);
52963
52978
  if (Array.isArray(a)) {
52964
52979
  let e = [];
52965
- for (let t of a) e.push(DK(i, i.property, t));
52980
+ for (let t of a) e.push(MK(i, i.property, t));
52966
52981
  a = e;
52967
52982
  }
52968
52983
  i.property === "className" && Array.isArray(t.className) && (a = t.className.concat(a)), t[i.property] = a;
52969
52984
  }
52970
52985
  }
52971
- function EK(e, t) {
52986
+ function jK(e, t) {
52972
52987
  if (t != null) if (typeof t == "number" || typeof t == "string") e.push({
52973
52988
  type: "text",
52974
52989
  value: String(t)
52975
52990
  });
52976
- else if (Array.isArray(t)) for (let n of t) EK(e, n);
52977
- else if (typeof t == "object" && "type" in t) t.type === "root" ? EK(e, t.children) : e.push(t);
52991
+ else if (Array.isArray(t)) for (let n of t) jK(e, n);
52992
+ else if (typeof t == "object" && "type" in t) t.type === "root" ? jK(e, t.children) : e.push(t);
52978
52993
  else throw Error("Expected node, nodes, or string, got `" + t + "`");
52979
52994
  }
52980
- function DK(e, t, n) {
52995
+ function MK(e, t, n) {
52981
52996
  if (typeof n == "string") {
52982
52997
  if (e.number && n && !Number.isNaN(Number(n))) return Number(n);
52983
- if ((e.boolean || e.overloadedBoolean) && (n === "" || HG(n) === HG(t))) return !0;
52998
+ if ((e.boolean || e.overloadedBoolean) && (n === "" || qG(n) === qG(t))) return !0;
52984
52999
  }
52985
53000
  return n;
52986
53001
  }
52987
- function OK(e) {
53002
+ function NK(e) {
52988
53003
  let t = [];
52989
53004
  for (let [n, r] of Object.entries(e)) t.push([n, r].join(": "));
52990
53005
  return t.join("; ");
52991
53006
  }
52992
- function kK(e) {
53007
+ function PK(e) {
52993
53008
  let t = /* @__PURE__ */ new Map();
52994
53009
  for (let n of e) t.set(n.toLowerCase(), n);
52995
53010
  return t;
52996
53011
  }
52997
53012
  //#endregion
52998
53013
  //#region node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js
52999
- var AK = /* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath".split("."), jK = CK(_K, "div");
53000
- CK(vK, "g", AK);
53014
+ var FK = /* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath".split("."), IK = OK(SK, "div");
53015
+ OK(CK, "g", FK);
53001
53016
  //#endregion
53002
53017
  //#region node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js
53003
- var MK = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), NK = {
53018
+ var LK = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), RK = {
53004
53019
  0: "�",
53005
53020
  128: "€",
53006
53021
  130: "‚",
@@ -53032,30 +53047,30 @@ var MK = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.C
53032
53047
  };
53033
53048
  //#endregion
53034
53049
  //#region node_modules/.pnpm/is-decimal@2.0.1/node_modules/is-decimal/index.js
53035
- function PK(e) {
53050
+ function zK(e) {
53036
53051
  let t = typeof e == "string" ? e.charCodeAt(0) : e;
53037
53052
  return t >= 48 && t <= 57;
53038
53053
  }
53039
53054
  //#endregion
53040
53055
  //#region node_modules/.pnpm/is-hexadecimal@2.0.1/node_modules/is-hexadecimal/index.js
53041
- function FK(e) {
53056
+ function BK(e) {
53042
53057
  let t = typeof e == "string" ? e.charCodeAt(0) : e;
53043
53058
  return t >= 97 && t <= 102 || t >= 65 && t <= 70 || t >= 48 && t <= 57;
53044
53059
  }
53045
53060
  //#endregion
53046
53061
  //#region node_modules/.pnpm/is-alphabetical@2.0.1/node_modules/is-alphabetical/index.js
53047
- function IK(e) {
53062
+ function VK(e) {
53048
53063
  let t = typeof e == "string" ? e.charCodeAt(0) : e;
53049
53064
  return t >= 97 && t <= 122 || t >= 65 && t <= 90;
53050
53065
  }
53051
53066
  //#endregion
53052
53067
  //#region node_modules/.pnpm/is-alphanumerical@2.0.1/node_modules/is-alphanumerical/index.js
53053
- function LK(e) {
53054
- return IK(e) || PK(e);
53068
+ function HK(e) {
53069
+ return VK(e) || zK(e);
53055
53070
  }
53056
53071
  //#endregion
53057
53072
  //#region node_modules/.pnpm/parse-entities@4.0.2/node_modules/parse-entities/lib/index.js
53058
- var RK = [
53073
+ var UK = [
53059
53074
  "",
53060
53075
  "Named character references must be terminated by a semicolon",
53061
53076
  "Numeric character references must be terminated by a semicolon",
@@ -53065,7 +53080,7 @@ var RK = [
53065
53080
  "Numeric character references cannot be disallowed",
53066
53081
  "Numeric character references cannot be outside the permissible Unicode range"
53067
53082
  ];
53068
- function zK(e, t) {
53083
+ function WK(e, t) {
53069
53084
  let n = t || {}, r = typeof n.additional == "string" ? n.additional.charCodeAt(0) : n.additional, i = [], a = 0, o = -1, s = "", c, l;
53070
53085
  n.position && ("start" in n.position || "indent" in n.position ? (l = n.position.indent, c = n.position.start) : c = n.position);
53071
53086
  let u = (c ? c.line : 0) || 1, d = (c ? c.column : 0) || 1, f = m(), p;
@@ -53081,11 +53096,11 @@ function zK(e, t) {
53081
53096
  let t = e.charCodeAt(l);
53082
53097
  t === 88 || t === 120 ? (u = "hexadecimal", l = ++c) : u = "decimal";
53083
53098
  } else u = "named";
53084
- let _ = "", v = "", y = "", b = u === "named" ? LK : u === "decimal" ? PK : FK;
53099
+ let _ = "", v = "", y = "", b = u === "named" ? HK : u === "decimal" ? zK : BK;
53085
53100
  for (l--; ++l <= e.length;) {
53086
53101
  let t = e.charCodeAt(l);
53087
53102
  if (!b(t)) break;
53088
- y += String.fromCharCode(t), u === "named" && MK.includes(y) && (_ = y, v = Nd(y));
53103
+ y += String.fromCharCode(t), u === "named" && LK.includes(y) && (_ = y, v = Nd(y));
53089
53104
  }
53090
53105
  let x = e.charCodeAt(l) === 59;
53091
53106
  if (x) {
@@ -53101,18 +53116,18 @@ function zK(e, t) {
53101
53116
  let t = _ ? 1 : 3;
53102
53117
  if (n.attribute) {
53103
53118
  let n = e.charCodeAt(l);
53104
- n === 61 ? (h(t, S), v = "") : LK(n) ? v = "" : h(t, S);
53119
+ n === 61 ? (h(t, S), v = "") : HK(n) ? v = "" : h(t, S);
53105
53120
  } else h(t, S);
53106
53121
  }
53107
53122
  C = v;
53108
53123
  } else {
53109
53124
  x || h(2, S);
53110
53125
  let e = Number.parseInt(y, u === "hexadecimal" ? 16 : 10);
53111
- if (BK(e)) h(7, S), C = "�";
53112
- else if (e in NK) h(6, S), C = NK[e];
53126
+ if (GK(e)) h(7, S), C = "�";
53127
+ else if (e in RK) h(6, S), C = RK[e];
53113
53128
  else {
53114
53129
  let t = "";
53115
- VK(e) && h(6, S), e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 | 55296), e = 56320 | e & 1023), C = t + String.fromCharCode(e);
53130
+ KK(e) && h(6, S), e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 | 55296), e = 56320 | e & 1023), C = t + String.fromCharCode(e);
53116
53131
  }
53117
53132
  }
53118
53133
  if (C) {
@@ -53134,7 +53149,7 @@ function zK(e, t) {
53134
53149
  }
53135
53150
  function h(e, t) {
53136
53151
  let r;
53137
- n.warning && (r = m(), r.column += t, r.offset += t, n.warning.call(n.warningContext || void 0, RK[e], r, e));
53152
+ n.warning && (r = m(), r.column += t, r.offset += t, n.warning.call(n.warningContext || void 0, UK[e], r, e));
53138
53153
  }
53139
53154
  function g() {
53140
53155
  s &&= (i.push(s), n.text && n.text.call(n.textContext || void 0, s, {
@@ -53143,31 +53158,31 @@ function zK(e, t) {
53143
53158
  }), "");
53144
53159
  }
53145
53160
  }
53146
- function BK(e) {
53161
+ function GK(e) {
53147
53162
  return e >= 55296 && e <= 57343 || e > 1114111;
53148
53163
  }
53149
- function VK(e) {
53164
+ function KK(e) {
53150
53165
  return e >= 1 && e <= 8 || e === 11 || e >= 13 && e <= 31 || e >= 127 && e <= 159 || e >= 64976 && e <= 65007 || (e & 65535) == 65535 || (e & 65535) == 65534;
53151
53166
  }
53152
53167
  //#endregion
53153
53168
  //#region node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lib/prism-core.js
53154
- var HK = 0, UK = {}, WK = {
53169
+ var qK = 0, JK = {}, YK = {
53155
53170
  util: {
53156
53171
  type: function(e) {
53157
53172
  return Object.prototype.toString.call(e).slice(8, -1);
53158
53173
  },
53159
53174
  objId: function(e) {
53160
- return e.__id || Object.defineProperty(e, "__id", { value: ++HK }), e.__id;
53175
+ return e.__id || Object.defineProperty(e, "__id", { value: ++qK }), e.__id;
53161
53176
  },
53162
53177
  clone: function e(t, n) {
53163
53178
  n ||= {};
53164
53179
  var r, i;
53165
- switch (WK.util.type(t)) {
53180
+ switch (YK.util.type(t)) {
53166
53181
  case "Object":
53167
- if (i = WK.util.objId(t), n[i]) return n[i];
53182
+ if (i = YK.util.objId(t), n[i]) return n[i];
53168
53183
  for (var a in r = {}, n[i] = r, t) t.hasOwnProperty(a) && (r[a] = e(t[a], n));
53169
53184
  return r;
53170
- case "Array": return i = WK.util.objId(t), n[i] ? n[i] : (r = [], n[i] = r, t.forEach(function(t, i) {
53185
+ case "Array": return i = YK.util.objId(t), n[i] ? n[i] : (r = [], n[i] = r, t.forEach(function(t, i) {
53171
53186
  r[i] = e(t, n);
53172
53187
  }), r);
53173
53188
  default: return t;
@@ -53175,33 +53190,33 @@ var HK = 0, UK = {}, WK = {
53175
53190
  }
53176
53191
  },
53177
53192
  languages: {
53178
- plain: UK,
53179
- plaintext: UK,
53180
- text: UK,
53181
- txt: UK,
53193
+ plain: JK,
53194
+ plaintext: JK,
53195
+ text: JK,
53196
+ txt: JK,
53182
53197
  extend: function(e, t) {
53183
- var n = WK.util.clone(WK.languages[e]);
53198
+ var n = YK.util.clone(YK.languages[e]);
53184
53199
  for (var r in t) n[r] = t[r];
53185
53200
  return n;
53186
53201
  },
53187
53202
  insertBefore: function(e, t, n, r) {
53188
- r ||= WK.languages;
53203
+ r ||= YK.languages;
53189
53204
  var i = r[e], a = {};
53190
53205
  for (var o in i) if (i.hasOwnProperty(o)) {
53191
53206
  if (o == t) for (var s in n) n.hasOwnProperty(s) && (a[s] = n[s]);
53192
53207
  n.hasOwnProperty(o) || (a[o] = i[o]);
53193
53208
  }
53194
53209
  var c = r[e];
53195
- return r[e] = a, WK.languages.DFS(WK.languages, function(t, n) {
53210
+ return r[e] = a, YK.languages.DFS(YK.languages, function(t, n) {
53196
53211
  n === c && t != e && (this[t] = a);
53197
53212
  }), a;
53198
53213
  },
53199
53214
  DFS: function e(t, n, r, i) {
53200
53215
  i ||= {};
53201
- var a = WK.util.objId;
53216
+ var a = YK.util.objId;
53202
53217
  for (var o in t) if (t.hasOwnProperty(o)) {
53203
53218
  n.call(t, o, t[o], r || o);
53204
- var s = t[o], c = WK.util.type(s);
53219
+ var s = t[o], c = YK.util.type(s);
53205
53220
  c === "Object" && !i[a(s)] ? (i[a(s)] = !0, e(s, n, null, i)) : c === "Array" && !i[a(s)] && (i[a(s)] = !0, e(s, n, o, i));
53206
53221
  }
53207
53222
  }
@@ -53213,8 +53228,8 @@ var HK = 0, UK = {}, WK = {
53213
53228
  grammar: t,
53214
53229
  language: n
53215
53230
  };
53216
- if (WK.hooks.run("before-tokenize", r), !r.grammar) throw Error("The language \"" + r.language + "\" has no grammar.");
53217
- return r.tokens = WK.tokenize(r.code, r.grammar), WK.hooks.run("after-tokenize", r), GK.stringify(WK.util.encode(r.tokens), r.language);
53231
+ if (YK.hooks.run("before-tokenize", r), !r.grammar) throw Error("The language \"" + r.language + "\" has no grammar.");
53232
+ return r.tokens = YK.tokenize(r.code, r.grammar), YK.hooks.run("after-tokenize", r), XK.stringify(YK.util.encode(r.tokens), r.language);
53218
53233
  },
53219
53234
  tokenize: function(e, t) {
53220
53235
  var n = t.rest;
@@ -53222,26 +53237,26 @@ var HK = 0, UK = {}, WK = {
53222
53237
  for (var r in n) t[r] = n[r];
53223
53238
  delete t.rest;
53224
53239
  }
53225
- var i = new JK();
53226
- return YK(i, i.head, e), qK(e, i, t, i.head, 0), ZK(i);
53240
+ var i = new $K();
53241
+ return eq(i, i.head, e), QK(e, i, t, i.head, 0), nq(i);
53227
53242
  },
53228
53243
  hooks: {
53229
53244
  all: {},
53230
53245
  add: function(e, t) {
53231
- var n = WK.hooks.all;
53246
+ var n = YK.hooks.all;
53232
53247
  n[e] = n[e] || [], n[e].push(t);
53233
53248
  },
53234
53249
  run: function(e, t) {
53235
- var n = WK.hooks.all[e];
53250
+ var n = YK.hooks.all[e];
53236
53251
  if (!(!n || !n.length)) for (var r = 0, i; i = n[r++];) i(t);
53237
53252
  }
53238
53253
  },
53239
- Token: GK
53254
+ Token: XK
53240
53255
  };
53241
- function GK(e, t, n, r) {
53256
+ function XK(e, t, n, r) {
53242
53257
  this.type = e, this.content = t, this.alias = n, this.length = (r || "").length | 0;
53243
53258
  }
53244
- function KK(e, t, n, r) {
53259
+ function ZK(e, t, n, r) {
53245
53260
  e.lastIndex = t;
53246
53261
  var i = e.exec(n);
53247
53262
  if (i && r && i[1]) {
@@ -53250,7 +53265,7 @@ function KK(e, t, n, r) {
53250
53265
  }
53251
53266
  return i;
53252
53267
  }
53253
- function qK(e, t, n, r, i, a) {
53268
+ function QK(e, t, n, r, i, a) {
53254
53269
  for (var o in n) if (!(!n.hasOwnProperty(o) || !n[o])) {
53255
53270
  var s = n[o];
53256
53271
  s = Array.isArray(s) ? s : [s];
@@ -53264,34 +53279,34 @@ function qK(e, t, n, r, i, a) {
53264
53279
  for (var h = l.pattern || l, g = r.next, _ = i; g !== t.tail && !(a && _ >= a.reach); _ += g.value.length, g = g.next) {
53265
53280
  var v = g.value;
53266
53281
  if (t.length > e.length) return;
53267
- if (!(v instanceof GK)) {
53282
+ if (!(v instanceof XK)) {
53268
53283
  var y = 1, b;
53269
53284
  if (f) {
53270
- if (b = KK(h, _, e, d), !b || b.index >= e.length) break;
53285
+ if (b = ZK(h, _, e, d), !b || b.index >= e.length) break;
53271
53286
  var x = b.index, S = b.index + b[0].length, C = _;
53272
53287
  for (C += g.value.length; x >= C;) g = g.next, C += g.value.length;
53273
- if (C -= g.value.length, _ = C, g.value instanceof GK) continue;
53288
+ if (C -= g.value.length, _ = C, g.value instanceof XK) continue;
53274
53289
  for (var w = g; w !== t.tail && (C < S || typeof w.value == "string"); w = w.next) y++, C += w.value.length;
53275
53290
  y--, v = e.slice(_, C), b.index -= _;
53276
- } else if (b = KK(h, 0, v, d), !b) continue;
53291
+ } else if (b = ZK(h, 0, v, d), !b) continue;
53277
53292
  var x = b.index, T = b[0], E = v.slice(0, x), ee = v.slice(x + T.length), te = _ + v.length;
53278
53293
  a && te > a.reach && (a.reach = te);
53279
53294
  var ne = g.prev;
53280
- E && (ne = YK(t, ne, E), _ += E.length), XK(t, ne, y);
53281
- var re = new GK(o, u ? WK.tokenize(T, u) : T, p, T);
53282
- if (g = YK(t, ne, re), ee && YK(t, g, ee), y > 1) {
53295
+ E && (ne = eq(t, ne, E), _ += E.length), tq(t, ne, y);
53296
+ var re = new XK(o, u ? YK.tokenize(T, u) : T, p, T);
53297
+ if (g = eq(t, ne, re), ee && eq(t, g, ee), y > 1) {
53283
53298
  var ie = {
53284
53299
  cause: o + "," + c,
53285
53300
  reach: te
53286
53301
  };
53287
- qK(e, t, n, g.prev, _, ie), a && ie.reach > a.reach && (a.reach = ie.reach);
53302
+ QK(e, t, n, g.prev, _, ie), a && ie.reach > a.reach && (a.reach = ie.reach);
53288
53303
  }
53289
53304
  }
53290
53305
  }
53291
53306
  }
53292
53307
  }
53293
53308
  }
53294
- function JK() {
53309
+ function $K() {
53295
53310
  var e = {
53296
53311
  value: null,
53297
53312
  prev: null,
@@ -53303,7 +53318,7 @@ function JK() {
53303
53318
  };
53304
53319
  e.next = t, this.head = e, this.tail = t, this.length = 0;
53305
53320
  }
53306
- function YK(e, t, n) {
53321
+ function eq(e, t, n) {
53307
53322
  var r = t.next, i = {
53308
53323
  value: n,
53309
53324
  prev: t,
@@ -53311,22 +53326,22 @@ function YK(e, t, n) {
53311
53326
  };
53312
53327
  return t.next = i, r.prev = i, e.length++, i;
53313
53328
  }
53314
- function XK(e, t, n) {
53329
+ function tq(e, t, n) {
53315
53330
  for (var r = t.next, i = 0; i < n && r !== e.tail; i++) r = r.next;
53316
53331
  t.next = r, r.prev = t, e.length -= i;
53317
53332
  }
53318
- function ZK(e) {
53333
+ function nq(e) {
53319
53334
  for (var t = [], n = e.head.next; n !== e.tail;) t.push(n.value), n = n.next;
53320
53335
  return t;
53321
53336
  }
53322
- var QK = WK;
53337
+ var rq = YK;
53323
53338
  //#endregion
53324
53339
  //#region node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lib/core.js
53325
- function $K() {}
53326
- $K.prototype = QK;
53327
- var $ = new $K();
53328
- $.highlight = eq, $.register = tq, $.alias = nq, $.registered = rq, $.listLanguages = iq, $.util.encode = oq, $.Token.stringify = aq;
53329
- function eq(e, t) {
53340
+ function iq() {}
53341
+ iq.prototype = rq;
53342
+ var $ = new iq();
53343
+ $.highlight = aq, $.register = oq, $.alias = sq, $.registered = cq, $.listLanguages = lq, $.util.encode = dq, $.Token.stringify = uq;
53344
+ function aq(e, t) {
53330
53345
  if (typeof e != "string") throw TypeError("Expected `string` for `value`, got `" + e + "`");
53331
53346
  let n, r;
53332
53347
  /* c8 ignore next 2 */
@@ -53338,14 +53353,14 @@ function eq(e, t) {
53338
53353
  }
53339
53354
  return {
53340
53355
  type: "root",
53341
- children: QK.highlight.call($, e, n, r)
53356
+ children: rq.highlight.call($, e, n, r)
53342
53357
  };
53343
53358
  }
53344
- function tq(e) {
53359
+ function oq(e) {
53345
53360
  if (typeof e != "function" || !e.displayName) throw Error("Expected `function` for `syntax`, got `" + e + "`");
53346
53361
  Object.hasOwn($.languages, e.displayName) || e($);
53347
53362
  }
53348
- function nq(e, t) {
53363
+ function sq(e, t) {
53349
53364
  let n = $.languages, r = {};
53350
53365
  typeof e == "string" ? t && (r[e] = t) : r = e;
53351
53366
  let i;
@@ -53354,65 +53369,65 @@ function nq(e, t) {
53354
53369
  for (; ++a < t.length;) n[t[a]] = n[i];
53355
53370
  }
53356
53371
  }
53357
- function rq(e) {
53372
+ function cq(e) {
53358
53373
  if (typeof e != "string") throw TypeError("Expected `string` for `aliasOrLanguage`, got `" + e + "`");
53359
53374
  return Object.hasOwn($.languages, e);
53360
53375
  }
53361
- function iq() {
53376
+ function lq() {
53362
53377
  let e = $.languages, t = [], n;
53363
53378
  for (n in e) Object.hasOwn(e, n) && typeof e[n] == "object" && t.push(n);
53364
53379
  return t;
53365
53380
  }
53366
- function aq(e, t) {
53381
+ function uq(e, t) {
53367
53382
  if (typeof e == "string") return {
53368
53383
  type: "text",
53369
53384
  value: e
53370
53385
  };
53371
53386
  if (Array.isArray(e)) {
53372
53387
  let n = [], r = -1;
53373
- for (; ++r < e.length;) e[r] !== null && e[r] !== void 0 && e[r] !== "" && n.push(aq(e[r], t));
53388
+ for (; ++r < e.length;) e[r] !== null && e[r] !== void 0 && e[r] !== "" && n.push(uq(e[r], t));
53374
53389
  return n;
53375
53390
  }
53376
53391
  let n = {
53377
53392
  attributes: {},
53378
53393
  classes: ["token", e.type],
53379
- content: aq(e.content, t),
53394
+ content: uq(e.content, t),
53380
53395
  language: t,
53381
53396
  tag: "span",
53382
53397
  type: e.type
53383
53398
  };
53384
- return e.alias && n.classes.push(...typeof e.alias == "string" ? [e.alias] : e.alias), $.hooks.run("wrap", n), jK(n.tag + "." + n.classes.join("."), sq(n.attributes), n.content);
53399
+ return e.alias && n.classes.push(...typeof e.alias == "string" ? [e.alias] : e.alias), $.hooks.run("wrap", n), IK(n.tag + "." + n.classes.join("."), fq(n.attributes), n.content);
53385
53400
  }
53386
- function oq(e) {
53401
+ function dq(e) {
53387
53402
  return e;
53388
53403
  }
53389
- function sq(e) {
53404
+ function fq(e) {
53390
53405
  let t;
53391
- for (t in e) Object.hasOwn(e, t) && (e[t] = zK(e[t]));
53406
+ for (t in e) Object.hasOwn(e, t) && (e[t] = WK(e[t]));
53392
53407
  return e;
53393
53408
  }
53394
- $.register(iG), $.register(aG), $.register(oG), $.register(sG), $.register(cG), $.register(lG), $.register(uG), $.register(dG), $.register(fG), $.register(pG), $.register(mG), $.register(hG), $.register(gG), $.register(_G), $.register(vG), $.register(yG), $.register(bG), $.register(xG), $.register(SG), $.register(CG), $.register(wG), $.register(TG), $.register(EG), $.register(DG), $.register(OG), $.register(kG), $.register(AG), $.register(jG), $.register(MG), $.register(NG), $.register(PG), $.register(FG), $.register(IG), $.register(LG), $.register(RG), $.register(zG);
53409
+ $.register(lG), $.register(uG), $.register(dG), $.register(fG), $.register(pG), $.register(mG), $.register(hG), $.register(gG), $.register(_G), $.register(vG), $.register(yG), $.register(bG), $.register(xG), $.register(SG), $.register(CG), $.register(wG), $.register(TG), $.register(EG), $.register(DG), $.register(OG), $.register(kG), $.register(AG), $.register(jG), $.register(MG), $.register(NG), $.register(PG), $.register(FG), $.register(IG), $.register(LG), $.register(RG), $.register(zG), $.register(BG), $.register(VG), $.register(HG), $.register(UG), $.register(WG);
53395
53410
  //#endregion
53396
53411
  //#region src/lib/global-scroll-listener.ts
53397
- var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", dq = (e) => {
53398
- Array.from(cq).forEach((t) => t(e));
53399
- }, fq = () => {
53400
- lq || !uq() || (document.addEventListener("scroll", dq, {
53412
+ var pq = /* @__PURE__ */ new Set(), mq = !1, hq = () => typeof document < "u", gq = (e) => {
53413
+ Array.from(pq).forEach((t) => t(e));
53414
+ }, _q = () => {
53415
+ mq || !hq() || (document.addEventListener("scroll", gq, {
53401
53416
  capture: !0,
53402
53417
  passive: !0
53403
- }), lq = !0);
53404
- }, pq = () => {
53405
- !lq || !uq() || (document.removeEventListener("scroll", dq, !0), lq = !1);
53406
- }, mq = (e) => {
53407
- if (!uq()) return () => void 0;
53418
+ }), mq = !0);
53419
+ }, vq = () => {
53420
+ !mq || !hq() || (document.removeEventListener("scroll", gq, !0), mq = !1);
53421
+ }, yq = (e) => {
53422
+ if (!hq()) return () => void 0;
53408
53423
  let t = !0;
53409
- return cq.add(e), fq(), () => {
53410
- t && (t = !1, cq.delete(e), cq.size === 0 && pq());
53424
+ return pq.add(e), _q(), () => {
53425
+ t && (t = !1, pq.delete(e), pq.size === 0 && vq());
53411
53426
  };
53412
- }, hq = (e) => e ? e.closest(".zt-md-editor") ?? e : null, gq = (e, t, n) => {
53427
+ }, bq = (e) => e ? e.closest(".zt-md-editor") ?? e : null, xq = (e, t, n) => {
53413
53428
  let r = typeof window > "u" ? e.bottom : window.innerHeight, i = n?.top ?? 0, a = n?.bottom ?? r, o = e.top - i, s = a - e.bottom;
53414
53429
  return s < t && o > s ? "top" : "bottom";
53415
- }, _q = (e, t) => {
53430
+ }, Sq = (e, t) => {
53416
53431
  let n = t.getBoundingClientRect();
53417
53432
  return {
53418
53433
  anchorTopInContent: e.top - n.top + t.scrollTop,
@@ -53420,28 +53435,28 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53420
53435
  anchorLeftInContent: e.left - n.left + t.scrollLeft,
53421
53436
  anchorRightInContent: e.right - n.left + t.scrollLeft
53422
53437
  };
53423
- }, vq = (e) => {
53438
+ }, Cq = (e) => {
53424
53439
  let { anchor: t, overlaySize: n, horizontalAlign: r = "start" } = e, i = t.anchorRightInContent ?? t.anchorLeftInContent;
53425
53440
  return r === "end" ? i - n.width : r === "center" ? t.anchorLeftInContent + (i - t.anchorLeftInContent - n.width) / 2 : t.anchorLeftInContent;
53426
- }, yq = (e) => {
53427
- let { wrapper: t, anchor: n, overlaySize: r, placement: i, offsetY: a, boundaryInset: o } = e, s = t.getBoundingClientRect(), c = t.scrollLeft + o, l = t.scrollLeft + t.clientWidth - r.width - o, u = vq(e), d = Math.min(Math.max(u, c), Math.max(c, l)), f = i === "top" ? n.anchorTopInContent - (r.height ?? 0) - a : n.anchorBottomInContent + a;
53441
+ }, wq = (e) => {
53442
+ let { wrapper: t, anchor: n, overlaySize: r, placement: i, offsetY: a, boundaryInset: o } = e, s = t.getBoundingClientRect(), c = t.scrollLeft + o, l = t.scrollLeft + t.clientWidth - r.width - o, u = Cq(e), d = Math.min(Math.max(u, c), Math.max(c, l)), f = i === "top" ? n.anchorTopInContent - (r.height ?? 0) - a : n.anchorBottomInContent + a;
53428
53443
  return {
53429
53444
  left: s.left + d - t.scrollLeft,
53430
53445
  top: s.top + f - t.scrollTop
53431
53446
  };
53432
- }, bq = (e, t) => {
53433
- let n = yq(e), r = t.getBoundingClientRect();
53447
+ }, Tq = (e, t) => {
53448
+ let n = wq(e), r = t.getBoundingClientRect();
53434
53449
  return {
53435
53450
  left: n.left - r.left,
53436
53451
  top: n.top - r.top
53437
53452
  };
53438
- }, xq = (e) => {
53453
+ }, Eq = (e) => {
53439
53454
  let t = 0, n = null, r = null, i = () => {
53440
53455
  typeof window > "u" || (t && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
53441
53456
  t = 0, e();
53442
53457
  }));
53443
53458
  }, a = () => {
53444
- window.addEventListener("resize", i), r ||= mq(i);
53459
+ window.addEventListener("resize", i), r ||= yq(i);
53445
53460
  }, o = () => {
53446
53461
  window.removeEventListener("resize", i), r?.(), r = null;
53447
53462
  }, s = (e) => {
@@ -53456,16 +53471,16 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53456
53471
  typeof window < "u" && t && (window.cancelAnimationFrame(t), t = 0), o(), s(null);
53457
53472
  }
53458
53473
  };
53459
- }, Sq = (e, t, n, r) => {
53474
+ }, Dq = (e, t, n, r) => {
53460
53475
  let i = t.top - r.top, a = r.bottom - t.bottom;
53461
53476
  return e === "top" ? i < n && a > i ? "bottom" : "top" : a < n && i > a ? "top" : "bottom";
53462
- }, Cq = ({ open: e, portalContainer: t, editorWrapper: n, defaultPlacement: r = "bottom", horizontalAlign: i = "start", offsetY: a = 8, boundaryInset: s = 2, fallbackWidth: u, fallbackHeight: f, onOutside: p }) => {
53477
+ }, Oq = ({ open: e, portalContainer: t, editorWrapper: n, defaultPlacement: r = "bottom", horizontalAlign: i = "start", offsetY: a = 8, boundaryInset: s = 2, fallbackWidth: u, fallbackHeight: f, onOutside: p }) => {
53463
53478
  let m = d(null), h = d(null), g = d(e), _ = o(() => {
53464
53479
  let e = m.current, o = h.current;
53465
53480
  if (!g.current || !e || !o || !t || !n) return;
53466
- let c = e.getBoundingClientRect(), l = n.getBoundingClientRect(), d = o.offsetWidth || u, p = o.offsetHeight || f, _ = Sq(r, c, p, l), v = bq({
53481
+ let c = e.getBoundingClientRect(), l = n.getBoundingClientRect(), d = o.offsetWidth || u, p = o.offsetHeight || f, _ = Dq(r, c, p, l), v = Tq({
53467
53482
  wrapper: n,
53468
- anchor: _q(c, n),
53483
+ anchor: Sq(c, n),
53469
53484
  overlaySize: {
53470
53485
  width: d,
53471
53486
  height: p
@@ -53496,7 +53511,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53496
53511
  _();
53497
53512
  }, [e, _]), c(() => {
53498
53513
  if (!e) return;
53499
- let t = xq(_);
53514
+ let t = Eq(_);
53500
53515
  return t.bindGlobal(), t.bindWrapper(n ?? null), t.schedule(), () => {
53501
53516
  t.destroy();
53502
53517
  };
@@ -53519,7 +53534,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53519
53534
  panelRef: v,
53520
53535
  updatePosition: _
53521
53536
  };
53522
- }, wq = ({ panel: e, portalContainer: t, className: n, role: r, onMouseDown: a, children: o }) => !e.open || !t ? null : h(i("div", {
53537
+ }, kq = ({ panel: e, portalContainer: t, className: n, role: r, onMouseDown: a, children: o }) => !e.open || !t ? null : h(i("div", {
53523
53538
  ref: e.panelRef,
53524
53539
  role: r,
53525
53540
  className: n,
@@ -53528,7 +53543,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53528
53543
  visibility: "hidden"
53529
53544
  },
53530
53545
  onMouseDown: a
53531
- }, o), t), Tq = "code_block", Eq = "ZT_MD_CODE_BLOCK_LANGUAGE_PICKER", Dq = 8, Oq = 96, kq = 26, Aq = 224, jq = 220, Mq = {
53546
+ }, o), t), Aq = "code_block", jq = "ZT_MD_CODE_BLOCK_LANGUAGE_PICKER", Mq = 8, Nq = 96, Pq = 26, Fq = 224, Iq = 220, Lq = {
53532
53547
  javascript: "JavaScript",
53533
53548
  typescript: "TypeScript",
53534
53549
  jsx: "JSX",
@@ -53545,46 +53560,46 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53545
53560
  yml: "YAML",
53546
53561
  sql: "SQL",
53547
53562
  xml: "XML"
53548
- }, Nq = (e) => {
53549
- let t = RW(e);
53550
- return Mq[t] ?? t;
53551
- }, Pq = (e) => {
53552
- let t = $.listLanguages(), n = [...new Set(t.map((e) => RW(e)).filter((e) => e !== FW))].sort((e, t) => e.localeCompare(t));
53563
+ }, Rq = (e) => {
53564
+ let t = UW(e);
53565
+ return Lq[t] ?? t;
53566
+ }, zq = (e) => {
53567
+ let t = $.listLanguages(), n = [...new Set(t.map((e) => UW(e)).filter((e) => e !== BW))].sort((e, t) => e.localeCompare(t));
53553
53568
  return [{
53554
- value: FW,
53569
+ value: BW,
53555
53570
  label: e.codeBlockLanguagePlainText
53556
53571
  }, ...n.map((e) => ({
53557
53572
  value: e,
53558
- label: Nq(e)
53573
+ label: Rq(e)
53559
53574
  }))];
53560
- }, Fq = (e) => {
53575
+ }, Bq = (e) => {
53561
53576
  let t = e.state.selection.$from;
53562
53577
  for (let e = t.depth; e >= 0; --e) {
53563
53578
  let n = t.node(e);
53564
- if (n.type.name === Tq) return {
53579
+ if (n.type.name === Aq) return {
53565
53580
  position: e === 0 ? 0 : t.before(e),
53566
53581
  node: n
53567
53582
  };
53568
53583
  }
53569
53584
  return null;
53570
- }, Iq = (e, t) => {
53585
+ }, Vq = (e, t) => {
53571
53586
  let n = e.nodeDOM(t);
53572
53587
  return n instanceof HTMLPreElement ? n : n instanceof HTMLElement ? n.querySelector("pre") : null;
53573
- }, Lq = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, Rq = (e) => {
53574
- let [t, r] = f(!1), [a, o] = f(""), [s, p] = f(0), m = d(null), h = d(null), g = RW(e.currentLanguage), _ = Nq(g), v = u(() => Pq(e.messages), [e.messages]), y = u(() => {
53588
+ }, Hq = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, Uq = (e) => {
53589
+ let [t, r] = f(!1), [a, o] = f(""), [s, p] = f(0), m = d(null), h = d(null), g = UW(e.currentLanguage), _ = Rq(g), v = u(() => zq(e.messages), [e.messages]), y = u(() => {
53575
53590
  let e = a.trim().toLowerCase();
53576
53591
  return e ? v.filter((t) => {
53577
53592
  let n = t.label.toLowerCase(), r = t.value.toLowerCase();
53578
53593
  return n.includes(e) || r.includes(e);
53579
53594
  }) : v;
53580
- }, [a, v]), b = Cq({
53595
+ }, [a, v]), b = Oq({
53581
53596
  open: t,
53582
53597
  portalContainer: e.portalContainer,
53583
53598
  editorWrapper: e.collisionBoundary,
53584
53599
  horizontalAlign: "end",
53585
53600
  offsetY: 6,
53586
- fallbackWidth: Aq,
53587
- fallbackHeight: jq,
53601
+ fallbackWidth: Fq,
53602
+ fallbackHeight: Iq,
53588
53603
  onOutside: () => r(!1)
53589
53604
  }), x = (e) => e instanceof HTMLElement ? e.closest("input, textarea, [contenteditable]:not([contenteditable=\"false\"])") !== null : !1, S = (e) => {
53590
53605
  x(e.target) || e.preventDefault();
@@ -53633,7 +53648,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53633
53648
  size: 14,
53634
53649
  strokeWidth: 2,
53635
53650
  "aria-hidden": "true"
53636
- }))), i(wq, {
53651
+ }))), i(kq, {
53637
53652
  panel: b,
53638
53653
  portalContainer: e.portalContainer,
53639
53654
  className: "zt-md-code-language-picker-panel",
@@ -53676,19 +53691,19 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53676
53691
  strokeWidth: 2,
53677
53692
  "aria-hidden": "true"
53678
53693
  }) : null)) : i("div", { className: "zt-md-code-language-picker-empty" }, "-"))));
53679
- }, zq = class {
53694
+ }, Wq = class {
53680
53695
  constructor(e, t, n) {
53681
- this.currentCodeBlockPosition = null, this.currentPreElement = null, this.currentActionsContainer = null, this.currentRenderedLanguage = null, this.hasPositionContext = !1, this.repositionScheduler = xq(() => {
53696
+ this.currentCodeBlockPosition = null, this.currentPreElement = null, this.currentActionsContainer = null, this.currentRenderedLanguage = null, this.hasPositionContext = !1, this.repositionScheduler = Eq(() => {
53682
53697
  this.hasPositionContext && this.updateOverlayPosition();
53683
53698
  }), this.handlePickerLayoutChange = () => {
53684
53699
  this.hasPositionContext && this.updateOverlayPosition();
53685
- }, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = hq(e.dom), this.host = document.createElement("span"), this.host.className = "zt-md-code-language-picker-host", this.hostRoot = b(this.host), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
53700
+ }, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = bq(e.dom), this.host = document.createElement("span"), this.host.className = "zt-md-code-language-picker-host", this.hostRoot = b(this.host), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
53686
53701
  }
53687
53702
  applyLanguage(e) {
53688
53703
  if (this.currentCodeBlockPosition === null) return;
53689
53704
  let t = this.view.state.doc.nodeAt(this.currentCodeBlockPosition);
53690
- if (!t || t.type.name !== Tq) return;
53691
- let n = RW(e), r = {
53705
+ if (!t || t.type.name !== Aq) return;
53706
+ let n = UW(e), r = {
53692
53707
  ...t.attrs,
53693
53708
  language: n
53694
53709
  };
@@ -53697,7 +53712,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53697
53712
  this.view.dispatch(i), this.view.focus();
53698
53713
  }
53699
53714
  render(e) {
53700
- this.currentRenderedLanguage !== null && this.currentRenderedLanguage === e || (this.hostRoot.render(i(Rq, {
53715
+ this.currentRenderedLanguage !== null && this.currentRenderedLanguage === e || (this.hostRoot.render(i(Uq, {
53701
53716
  currentLanguage: e,
53702
53717
  messages: this.messages,
53703
53718
  portalContainer: this.portalContainer,
@@ -53714,14 +53729,14 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53714
53729
  }
53715
53730
  updateOverlayPosition() {
53716
53731
  if (!this.editorWrapper || !this.currentPreElement || this.host.parentElement !== this.portalContainer) return;
53717
- let e = this.currentPreElement.getBoundingClientRect(), t = _q(e, this.editorWrapper), n = t.anchorRightInContent ?? t.anchorLeftInContent + e.width, r = Math.max(0, Math.min(e.width, this.editorWrapper.clientWidth) - Dq * 2);
53732
+ let e = this.currentPreElement.getBoundingClientRect(), t = Sq(e, this.editorWrapper), n = t.anchorRightInContent ?? t.anchorLeftInContent + e.width, r = Math.max(0, Math.min(e.width, this.editorWrapper.clientWidth) - Mq * 2);
53718
53733
  this.host.style.setProperty("--zt-md-code-language-picker-max-width", `${r}px`);
53719
- let i = this.host.offsetWidth || Math.min(Oq, r), a = this.host.offsetHeight || kq, o = bq({
53734
+ let i = this.host.offsetWidth || Math.min(Nq, r), a = this.host.offsetHeight || Pq, o = Tq({
53720
53735
  wrapper: this.editorWrapper,
53721
53736
  anchor: {
53722
- anchorLeftInContent: n - i - Dq,
53723
- anchorTopInContent: t.anchorTopInContent + e.height - a - Dq,
53724
- anchorBottomInContent: t.anchorTopInContent + e.height - a - Dq
53737
+ anchorLeftInContent: n - i - Mq,
53738
+ anchorTopInContent: t.anchorTopInContent + e.height - a - Mq,
53739
+ anchorBottomInContent: t.anchorTopInContent + e.height - a - Mq
53725
53740
  },
53726
53741
  overlaySize: { width: i },
53727
53742
  placement: "top",
@@ -53731,35 +53746,35 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53731
53746
  this.host.style.left = `${o.left}px`, this.host.style.top = `${o.top}px`;
53732
53747
  }
53733
53748
  update(e) {
53734
- if (this.view = e, !Lq(e) || !this.editorWrapper) {
53749
+ if (this.view = e, !Hq(e) || !this.editorWrapper) {
53735
53750
  this.detach();
53736
53751
  return;
53737
53752
  }
53738
- let t = Fq(e);
53753
+ let t = Bq(e);
53739
53754
  if (!t) {
53740
53755
  this.detach();
53741
53756
  return;
53742
53757
  }
53743
- let n = Iq(e, t.position);
53758
+ let n = Vq(e, t.position);
53744
53759
  if (!n) {
53745
53760
  this.detach();
53746
53761
  return;
53747
53762
  }
53748
53763
  let r = n.parentElement?.querySelector(":scope > .zt-md-code-block-actions") ?? null;
53749
53764
  this.syncFocusedActionsContainer(r), this.host.parentElement !== this.portalContainer && this.portalContainer.append(this.host);
53750
- let i = RW(String(t.node.attrs.language ?? "")), a = this.currentCodeBlockPosition === t.position && this.currentPreElement === n && this.currentRenderedLanguage !== null && this.currentRenderedLanguage === i;
53765
+ let i = UW(String(t.node.attrs.language ?? "")), a = this.currentCodeBlockPosition === t.position && this.currentPreElement === n && this.currentRenderedLanguage !== null && this.currentRenderedLanguage === i;
53751
53766
  this.currentCodeBlockPosition = t.position, this.currentPreElement = n, this.hasPositionContext = !0, this.updateOverlayPosition(), a || this.render(i), this.repositionScheduler.schedule();
53752
53767
  }
53753
53768
  destroy() {
53754
53769
  this.detach(), this.repositionScheduler.destroy(), this.hostRoot.unmount();
53755
53770
  }
53756
- }, Bq = (e, t) => Pw(() => new Xu({
53757
- key: new $u(Eq),
53758
- view: (n) => new zq(n, e, t)
53759
- })), Vq = "code_block", Hq = "a", Uq = "zt-md-code-block-mod-a-select", Wq = (e) => e.key.toLowerCase() !== Hq || e.defaultPrevented || e.altKey || e.shiftKey || !e.ctrlKey && !e.metaKey, Gq = (e) => {
53771
+ }, Gq = (e, t) => Pw(() => new Xu({
53772
+ key: new $u(jq),
53773
+ view: (n) => new Wq(n, e, t)
53774
+ })), Kq = "code_block", qq = "a", Jq = "zt-md-code-block-mod-a-select", Yq = (e) => e.key.toLowerCase() !== qq || e.defaultPrevented || e.altKey || e.shiftKey || !e.ctrlKey && !e.metaKey, Xq = (e) => {
53760
53775
  for (let t = e.depth; t >= 0; --t) {
53761
53776
  let n = e.node(t);
53762
- if (n.type.name !== Vq) continue;
53777
+ if (n.type.name !== Kq) continue;
53763
53778
  let r = t === 0 ? 0 : e.before(t);
53764
53779
  return {
53765
53780
  codeBlockStart: r + 1,
@@ -53767,47 +53782,47 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53767
53782
  };
53768
53783
  }
53769
53784
  return null;
53770
- }, Kq = (e, t) => {
53771
- let n = e.state.selection.$from, r = Gq(n);
53785
+ }, Zq = (e, t) => {
53786
+ let n = e.state.selection.$from, r = Xq(n);
53772
53787
  if (!r) return !1;
53773
53788
  let i = e.state.tr.setSelection(N.create(e.state.doc, r.codeBlockStart, r.codeBlockEnd));
53774
53789
  return t.preventDefault(), e.dispatch(i), !0;
53775
- }, qq = Pw(() => new Xu({
53776
- key: new $u(Uq),
53777
- props: { handleKeyDown: (e, t) => Wq(t) ? !1 : Kq(e, t) }
53778
- })), Jq = "code_block", Yq = "ZT_MD_CODE_BLOCK_PRISM", Xq = (e, t = []) => e.flatMap((e) => {
53790
+ }, Qq = Pw(() => new Xu({
53791
+ key: new $u(Jq),
53792
+ props: { handleKeyDown: (e, t) => Yq(t) ? !1 : Zq(e, t) }
53793
+ })), $q = "code_block", eJ = "ZT_MD_CODE_BLOCK_PRISM", tJ = (e, t = []) => e.flatMap((e) => {
53779
53794
  if (e.type === "element") {
53780
53795
  let n = [...t, ...e.properties?.className ?? []];
53781
- return Xq(e.children ?? [], n);
53796
+ return tJ(e.children ?? [], n);
53782
53797
  }
53783
53798
  return [{
53784
53799
  text: e.value ?? "",
53785
53800
  className: t
53786
53801
  }];
53787
- }), Zq = (e, t) => t.listLanguages().includes(e), Qq = (e, t) => {
53802
+ }), nJ = (e, t) => t.listLanguages().includes(e), rJ = (e, t) => {
53788
53803
  let n = [];
53789
- return hv((e) => e.type.name === Jq)(e).forEach((e) => {
53804
+ return hv((e) => e.type.name === $q)(e).forEach((e) => {
53790
53805
  let r = String(e.node.attrs.language ?? "");
53791
- if (!r || !Zq(r, t)) return;
53806
+ if (!r || !nJ(r, t)) return;
53792
53807
  let i = e.pos + 1;
53793
- Xq(t.highlight(e.node.textContent, r).children).forEach((e) => {
53808
+ tJ(t.highlight(e.node.textContent, r).children).forEach((e) => {
53794
53809
  let t = i + e.text.length;
53795
53810
  e.className.length > 0 && n.push(xS.inline(i, t, { class: e.className.join(" ") })), i = t;
53796
53811
  });
53797
53812
  }), wS.create(e, n);
53798
- }, $q = Pw(() => {
53813
+ }, iJ = Pw(() => {
53799
53814
  let e = $;
53800
53815
  return new Xu({
53801
- key: new $u(Yq),
53816
+ key: new $u(eJ),
53802
53817
  state: {
53803
- init: (t, n) => Qq(n.doc, e),
53804
- apply: (t, n) => t.docChanged ? Qq(t.doc, e) : n.map(t.mapping, t.doc)
53818
+ init: (t, n) => rJ(n.doc, e),
53819
+ apply: (t, n) => t.docChanged ? rJ(t.doc, e) : n.map(t.mapping, t.doc)
53805
53820
  },
53806
53821
  props: { decorations(e) {
53807
53822
  return this.getState(e);
53808
53823
  } }
53809
53824
  });
53810
- }), eJ = class {
53825
+ }), aJ = class {
53811
53826
  #e;
53812
53827
  #t;
53813
53828
  #n;
@@ -53872,7 +53887,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53872
53887
  #d;
53873
53888
  #f;
53874
53889
  #p;
53875
- }, tJ = (e, t) => e(t.state, t.dispatch, t), nJ = (e, t) => {
53890
+ }, oJ = (e, t) => e(t.state, t.dispatch, t), sJ = (e, t) => {
53876
53891
  let n = e?.state?.selection?.$from;
53877
53892
  if (!n || !e?.dispatch) return !1;
53878
53893
  for (let r = n.depth; r > 0; --r) {
@@ -53886,17 +53901,17 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53886
53901
  })), !0;
53887
53902
  }
53888
53903
  return !1;
53889
- }, rJ = {
53904
+ }, cJ = {
53890
53905
  heading1: 1,
53891
53906
  heading2: 2,
53892
53907
  heading3: 3,
53893
53908
  heading4: 4,
53894
53909
  heading5: 5,
53895
53910
  heading6: 6
53896
- }, iJ = {
53911
+ }, lJ = {
53897
53912
  bulletList: "bullet_list",
53898
53913
  orderedList: "ordered_list"
53899
- }, aJ = [
53914
+ }, uJ = [
53900
53915
  "codeBlock",
53901
53916
  "heading1",
53902
53917
  "heading2",
@@ -53909,35 +53924,35 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53909
53924
  "bulletList",
53910
53925
  "blockquote",
53911
53926
  "paragraph"
53912
- ], oJ = (e, t) => {
53927
+ ], dJ = (e, t) => {
53913
53928
  if (!e?.state || !e?.dispatch) return !1;
53914
53929
  let n = e.state.schema.nodes;
53915
53930
  if (t === "paragraph") {
53916
53931
  let t = n.paragraph;
53917
- return t ? tJ(T_(t), e) : !1;
53932
+ return t ? oJ(T_(t), e) : !1;
53918
53933
  }
53919
- if (t in rJ) {
53920
- let r = n.heading, i = rJ[t];
53921
- return !r || typeof i != "number" ? !1 : tJ(T_(r, { level: i }), e);
53934
+ if (t in cJ) {
53935
+ let r = n.heading, i = cJ[t];
53936
+ return !r || typeof i != "number" ? !1 : oJ(T_(r, { level: i }), e);
53922
53937
  }
53923
53938
  if (t === "blockquote") {
53924
53939
  let t = n.blockquote;
53925
- return t ? tJ(w_(t), e) : !1;
53940
+ return t ? oJ(w_(t), e) : !1;
53926
53941
  }
53927
53942
  if (t === "taskList") {
53928
53943
  let t = n.bullet_list;
53929
- return !t || !tJ(hE(t), e) ? !1 : nJ(e, !1);
53944
+ return !t || !oJ(hE(t), e) ? !1 : sJ(e, !1);
53930
53945
  }
53931
53946
  if (t === "codeBlock") {
53932
53947
  let t = n.code_block;
53933
- return t ? tJ(T_(t, { language: "text" }), e) : !1;
53948
+ return t ? oJ(T_(t, { language: "text" }), e) : !1;
53934
53949
  }
53935
- if (t in iJ) {
53936
- let r = n[iJ[t]];
53937
- return r ? tJ(hE(r), e) : !1;
53950
+ if (t in lJ) {
53951
+ let r = n[lJ[t]];
53952
+ return r ? oJ(hE(r), e) : !1;
53938
53953
  }
53939
53954
  return !1;
53940
- }, sJ = (e) => {
53955
+ }, fJ = (e) => {
53941
53956
  let t = e.state.selection.$from, n = /* @__PURE__ */ new Set();
53942
53957
  for (let e = t.depth; e > 0; --e) {
53943
53958
  let r = t.node(e), i = r.type.name;
@@ -53976,13 +53991,17 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
53976
53991
  i === "paragraph" && n.add("paragraph");
53977
53992
  }
53978
53993
  return n.has("taskList") && n.delete("bulletList"), n.size === 0 && n.add("paragraph"), n;
53979
- }, cJ = (e) => {
53980
- let t = sJ(e);
53981
- return aJ.find((e) => t.has(e)) || "paragraph";
53982
- }, lJ = /Mac|iPhone|iPad|iPod/, uJ = {
53994
+ }, pJ = (e) => {
53995
+ let t = fJ(e);
53996
+ return uJ.find((e) => t.has(e)) || "paragraph";
53997
+ }, mJ = /Mac|iPhone|iPad|iPod/, hJ = {
53983
53998
  paragraph: {
53984
53999
  key: "p",
53985
- code: "KeyP"
54000
+ code: "KeyP",
54001
+ modeOverrides: { modAlt: {
54002
+ key: "0",
54003
+ code: "Digit0"
54004
+ } }
53986
54005
  },
53987
54006
  heading1: {
53988
54007
  key: "1",
@@ -54048,25 +54067,25 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54048
54067
  key: "i",
54049
54068
  code: "KeyI"
54050
54069
  }
54051
- }, dJ = {
54070
+ }, gJ = (e) => Object.fromEntries(Object.entries(hJ).map(([t, n]) => [t, n.modeOverrides?.[e] ?? n])), _J = {
54052
54071
  Mod: "Ctrl",
54053
54072
  Alt: "Alt",
54054
54073
  Shift: "Shift"
54055
- }, fJ = {
54074
+ }, vJ = {
54056
54075
  Mod: "⌘",
54057
54076
  Alt: "⌥",
54058
54077
  Shift: "⇧"
54059
- }, pJ = () => typeof navigator < "u" && lJ.test(navigator.platform), mJ = (e) => {
54060
- let t = e === "modAlt" ? "Mod-Alt" : "Mod-Shift";
54061
- return Object.fromEntries(Object.entries(uJ).map(([e, n]) => [e, `${t}-${n.key}`]));
54062
- }, hJ = (e) => {
54063
- let t = pJ(), n = t ? fJ : dJ;
54078
+ }, yJ = () => typeof navigator < "u" && mJ.test(navigator.platform), bJ = (e) => {
54079
+ let t = e === "modAlt" ? "Mod-Alt" : "Mod-Shift", n = gJ(e);
54080
+ return Object.fromEntries(Object.entries(n).map(([e, n]) => [e, `${t}-${n.key}`]));
54081
+ }, xJ = (e) => {
54082
+ let t = yJ(), n = t ? vJ : _J;
54064
54083
  return e.split("-").map((e) => n[e] ?? e.toUpperCase()).join(t ? "" : "+");
54065
- }, gJ = (e) => {
54066
- let t = mJ(e);
54067
- return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, hJ(t)]));
54068
- }, _J = (e) => {
54069
- let t = gJ(e);
54084
+ }, SJ = (e) => {
54085
+ let t = bJ(e);
54086
+ return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, xJ(t)]));
54087
+ }, CJ = (e) => {
54088
+ let t = SJ(e);
54070
54089
  return {
54071
54090
  paragraph: t.paragraph,
54072
54091
  heading1: t.heading1,
@@ -54081,8 +54100,8 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54081
54100
  blockquote: t.blockquote,
54082
54101
  codeBlock: t.codeBlock
54083
54102
  };
54084
- }, vJ = (e, t) => {
54085
- let n = mJ(t);
54103
+ }, wJ = (e, t) => {
54104
+ let n = bJ(t);
54086
54105
  e.update(eD.key, (e) => ({
54087
54106
  ...e,
54088
54107
  TurnIntoText: {
@@ -54146,13 +54165,13 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54146
54165
  shortcuts: n.inlineCode
54147
54166
  }
54148
54167
  }));
54149
- }, yJ = (e) => {
54150
- let t = mJ(e).taskList;
54168
+ }, TJ = (e) => {
54169
+ let t = bJ(e).taskList;
54151
54170
  return zw("taskListTransform", { WrapInTaskList: {
54152
54171
  shortcuts: t,
54153
- command: () => (e, t, n) => n ? oJ(n, "taskList") : !1
54172
+ command: () => (e, t, n) => n ? dJ(n, "taskList") : !1
54154
54173
  } });
54155
- }, bJ = "zt-md-selection-tooltip", xJ = (e) => [
54174
+ }, EJ = "zt-md-selection-tooltip", DJ = (e) => [
54156
54175
  {
54157
54176
  command: "strong",
54158
54177
  icon: ye,
@@ -54183,7 +54202,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54183
54202
  title: e.selectionTooltipLinkTitle,
54184
54203
  markNames: ["link"]
54185
54204
  }
54186
- ], SJ = {
54205
+ ], OJ = {
54187
54206
  paragraph: it,
54188
54207
  heading1: je,
54189
54208
  heading2: Me,
@@ -54196,107 +54215,107 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54196
54215
  taskList: He,
54197
54216
  blockquote: nt,
54198
54217
  codeBlock: Ee
54199
- }, CJ = (e, t) => {
54200
- let n = _J(t);
54218
+ }, kJ = (e, t) => {
54219
+ let n = CJ(t);
54201
54220
  return [
54202
54221
  {
54203
54222
  command: "paragraph",
54204
- icon: SJ.paragraph,
54223
+ icon: OJ.paragraph,
54205
54224
  label: e.selectionTooltipTransformParagraphLabel,
54206
54225
  shortcut: n.paragraph
54207
54226
  },
54208
54227
  {
54209
54228
  command: "heading1",
54210
- icon: SJ.heading1,
54229
+ icon: OJ.heading1,
54211
54230
  label: e.selectionTooltipTransformHeading1Label,
54212
54231
  shortcut: n.heading1
54213
54232
  },
54214
54233
  {
54215
54234
  command: "heading2",
54216
- icon: SJ.heading2,
54235
+ icon: OJ.heading2,
54217
54236
  label: e.selectionTooltipTransformHeading2Label,
54218
54237
  shortcut: n.heading2
54219
54238
  },
54220
54239
  {
54221
54240
  command: "heading3",
54222
- icon: SJ.heading3,
54241
+ icon: OJ.heading3,
54223
54242
  label: e.selectionTooltipTransformHeading3Label,
54224
54243
  shortcut: n.heading3
54225
54244
  },
54226
54245
  {
54227
54246
  command: "heading4",
54228
- icon: SJ.heading4,
54247
+ icon: OJ.heading4,
54229
54248
  label: e.selectionTooltipTransformHeading4Label,
54230
54249
  shortcut: n.heading4
54231
54250
  },
54232
54251
  {
54233
54252
  command: "heading5",
54234
- icon: SJ.heading5,
54253
+ icon: OJ.heading5,
54235
54254
  label: e.selectionTooltipTransformHeading5Label,
54236
54255
  shortcut: n.heading5
54237
54256
  },
54238
54257
  {
54239
54258
  command: "heading6",
54240
- icon: SJ.heading6,
54259
+ icon: OJ.heading6,
54241
54260
  label: e.selectionTooltipTransformHeading6Label,
54242
54261
  shortcut: n.heading6
54243
54262
  },
54244
54263
  {
54245
54264
  command: "bulletList",
54246
- icon: SJ.bulletList,
54265
+ icon: OJ.bulletList,
54247
54266
  label: e.selectionTooltipTransformBulletListLabel,
54248
54267
  shortcut: n.bulletList
54249
54268
  },
54250
54269
  {
54251
54270
  command: "orderedList",
54252
- icon: SJ.orderedList,
54271
+ icon: OJ.orderedList,
54253
54272
  label: e.selectionTooltipTransformOrderedListLabel,
54254
54273
  shortcut: n.orderedList
54255
54274
  },
54256
54275
  {
54257
54276
  command: "taskList",
54258
- icon: SJ.taskList,
54277
+ icon: OJ.taskList,
54259
54278
  label: e.selectionTooltipTransformTaskListLabel,
54260
54279
  shortcut: n.taskList
54261
54280
  },
54262
54281
  {
54263
54282
  command: "blockquote",
54264
- icon: SJ.blockquote,
54283
+ icon: OJ.blockquote,
54265
54284
  label: e.selectionTooltipTransformBlockquoteLabel,
54266
54285
  shortcut: n.blockquote
54267
54286
  },
54268
54287
  {
54269
54288
  command: "codeBlock",
54270
- icon: SJ.codeBlock,
54289
+ icon: OJ.codeBlock,
54271
54290
  label: e.selectionTooltipTransformCodeBlockLabel,
54272
54291
  shortcut: n.codeBlock
54273
54292
  }
54274
54293
  ];
54275
- }, wJ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, TJ = (e, t) => {
54294
+ }, AJ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, jJ = (e, t) => {
54276
54295
  let n = e.state.schema.marks, r = t.find((e) => n[e]);
54277
54296
  return r ? n[r] ?? null : null;
54278
- }, EJ = (e, t) => {
54297
+ }, MJ = (e, t) => {
54279
54298
  let { from: n, to: r } = e.selection;
54280
54299
  return e.doc.rangeHasMark(n, r, t);
54281
- }, DJ = (e, t) => {
54300
+ }, NJ = (e, t) => {
54282
54301
  let { from: n, to: r } = e.selection, i = "";
54283
54302
  return e.doc.nodesBetween(n, r, (e) => {
54284
54303
  let n = e.marks.find((e) => e.type === t);
54285
54304
  return n ? (i = typeof n.attrs.href == "string" ? n.attrs.href : "", !1) : !0;
54286
54305
  }), i;
54287
- }, OJ = (e) => {
54306
+ }, PJ = (e) => {
54288
54307
  O_(e.markType)(e.view.state, e.view.dispatch, e.view), e.view.focus();
54289
- }, kJ = (e) => {
54308
+ }, FJ = (e) => {
54290
54309
  e.toggleLinkPopover(e.view);
54291
- }, AJ = (e, t) => {
54310
+ }, IJ = (e, t) => {
54292
54311
  ({
54293
- strong: OJ,
54294
- em: OJ,
54295
- strike: OJ,
54296
- inlineCode: OJ,
54297
- link: kJ
54312
+ strong: PJ,
54313
+ em: PJ,
54314
+ strike: PJ,
54315
+ inlineCode: PJ,
54316
+ link: FJ
54298
54317
  })[e](t);
54299
- }, jJ = (e, t, n, r, a) => {
54318
+ }, LJ = (e, t, n, r, a) => {
54300
54319
  let o = document.createElement("button");
54301
54320
  o.type = "button", o.className = "zt-md-selection-tooltip-button", o.dataset.command = e.command, o.title = e.title, o.setAttribute("aria-label", e.title);
54302
54321
  let s = document.createElement("span");
@@ -54310,20 +54329,20 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54310
54329
  }), o.addEventListener("click", (i) => {
54311
54330
  i.preventDefault();
54312
54331
  let a = n();
54313
- !a || a.state.selection.empty || AJ(e.command, {
54332
+ !a || a.state.selection.empty || IJ(e.command, {
54314
54333
  view: a,
54315
54334
  markType: t,
54316
54335
  toggleLinkPopover: r
54317
54336
  });
54318
54337
  }), o;
54319
- }, MJ = (e, t, n, r, i, a) => {
54338
+ }, RJ = (e, t, n, r, i, a) => {
54320
54339
  let o = document.createElement("div");
54321
54340
  return o.className = "zt-md-selection-tooltip", o.append(i), t.forEach((t) => {
54322
- let i = TJ(e, t.markNames);
54323
- i && t.command !== "link" && o.append(jJ(t, i, n, r, a));
54341
+ let i = jJ(e, t.markNames);
54342
+ i && t.command !== "link" && o.append(LJ(t, i, n, r, a));
54324
54343
  }), o;
54325
- }, NJ = (e) => {
54326
- let t = Cq({
54344
+ }, zJ = (e) => {
54345
+ let t = Oq({
54327
54346
  open: e.open,
54328
54347
  portalContainer: e.portalContainer,
54329
54348
  editorWrapper: e.collisionBoundary,
@@ -54339,7 +54358,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54339
54358
  e.onOpenChange(!1);
54340
54359
  return;
54341
54360
  }
54342
- oJ(n, t), e.onOpenChange(!1), n.focus();
54361
+ dJ(n, t), e.onOpenChange(!1), n.focus();
54343
54362
  };
54344
54363
  return i(n, null, i("button", {
54345
54364
  ref: t.triggerRef,
@@ -54360,7 +54379,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54360
54379
  size: e.iconSize,
54361
54380
  strokeWidth: e.iconStrokeWidth,
54362
54381
  "aria-hidden": "true"
54363
- })), i(wq, {
54382
+ })), i(kq, {
54364
54383
  panel: t,
54365
54384
  portalContainer: e.portalContainer,
54366
54385
  className: "zt-md-selection-transform-popover !w-[224px] p-1",
@@ -54381,7 +54400,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54381
54400
  "aria-hidden": "true"
54382
54401
  }), i("span", { className: "zt-md-selection-transform-item-label" }, t.label), i("kbd", { className: "zt-md-selection-transform-item-shortcut" }, t.shortcut));
54383
54402
  }))));
54384
- }, PJ = (e) => {
54403
+ }, BJ = (e) => {
54385
54404
  let [t, r] = f(""), a = d(null), o = (e) => {
54386
54405
  e.preventDefault();
54387
54406
  }, s = (t) => {
@@ -54390,7 +54409,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54390
54409
  e.onOpenChange(!1);
54391
54410
  return;
54392
54411
  }
54393
- let r = TJ(n, ["link"]);
54412
+ let r = jJ(n, ["link"]);
54394
54413
  if (!r) {
54395
54414
  e.onOpenChange(!1);
54396
54415
  return;
@@ -54402,13 +54421,13 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54402
54421
  e.onOpenChange(!1);
54403
54422
  return;
54404
54423
  }
54405
- let n = e.getCurrentView(), i = n ? TJ(n, ["link"]) : null;
54424
+ let n = e.getCurrentView(), i = n ? jJ(n, ["link"]) : null;
54406
54425
  if (!n || !i || n.state.selection.empty) {
54407
54426
  e.onOpenChange(!1);
54408
54427
  return;
54409
54428
  }
54410
- r(AF(DJ(n.state, i))), e.onOpenChange(!0);
54411
- }, u = Cq({
54429
+ r(AF(NJ(n.state, i))), e.onOpenChange(!0);
54430
+ }, u = Oq({
54412
54431
  open: e.open,
54413
54432
  portalContainer: e.portalContainer,
54414
54433
  editorWrapper: e.collisionBoundary,
@@ -54420,7 +54439,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54420
54439
  });
54421
54440
  return c(() => {
54422
54441
  if (!e.open) return;
54423
- let t = e.getCurrentView(), n = t ? TJ(t, ["link"]) : null;
54442
+ let t = e.getCurrentView(), n = t ? jJ(t, ["link"]) : null;
54424
54443
  (!t || !n || t.state.selection.empty) && e.onOpenChange(!1);
54425
54444
  }, [
54426
54445
  e.open,
@@ -54449,7 +54468,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54449
54468
  }, i("span", { className: "zt-md-selection-tooltip-button-icon" }, i(Ve, {
54450
54469
  size: e.iconSize,
54451
54470
  strokeWidth: e.iconStrokeWidth
54452
- }))), i(wq, {
54471
+ }))), i(kq, {
54453
54472
  panel: u,
54454
54473
  portalContainer: e.portalContainer,
54455
54474
  className: "zt-md-selection-link-popover w-fit min-w-0 gap-0 p-2"
@@ -54482,29 +54501,29 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54482
54501
  size: e.iconSize,
54483
54502
  strokeWidth: e.iconStrokeWidth
54484
54503
  })))));
54485
- }, FJ = (e, t, n) => {
54504
+ }, VJ = (e, t, n) => {
54486
54505
  n.forEach((n) => {
54487
- let r = TJ(t, n.markNames);
54506
+ let r = jJ(t, n.markNames);
54488
54507
  if (!r) return;
54489
54508
  let i = e.querySelector(`[data-command="${n.command}"]`);
54490
- i instanceof HTMLButtonElement && (i.dataset.active = EJ(t.state, r) ? "true" : "false");
54509
+ i instanceof HTMLButtonElement && (i.dataset.active = MJ(t.state, r) ? "true" : "false");
54491
54510
  });
54492
- }, IJ = (e) => {
54511
+ }, HJ = (e) => {
54493
54512
  let { from: t, to: n } = e.state.selection, r = !1;
54494
54513
  return e.state.doc.nodesBetween(t, n, (e) => e.type.name === "code_block" ? (r = !0, !1) : !0), r;
54495
- }, LJ = (e, t, n) => (r) => {
54514
+ }, UJ = (e, t, n) => (r) => {
54496
54515
  let { selection: i, doc: a } = r.state, o = e.contains(document.activeElement);
54497
- return !wJ(r) || i.empty || !(i instanceof N) || !r.hasFocus() && !o && !t() && !n() || IJ(r) ? !1 : e.childElementCount > 0 && a.textBetween(i.from, i.to).trim().length > 0;
54498
- }, RJ = (e, t, n, r) => {
54499
- let a = xJ(n), o = CJ(n, r), s = e, c = !1, l = !1, u = !1, d = [], f = document.createElement("span"), p = b(f), m = document.createElement("span"), h = null, g = b(m), _ = t.closest(".zt-md-editor"), v = (e) => {
54516
+ return !AJ(r) || i.empty || !(i instanceof N) || !r.hasFocus() && !o && !t() && !n() || HJ(r) ? !1 : e.childElementCount > 0 && a.textBetween(i.from, i.to).trim().length > 0;
54517
+ }, WJ = (e, t, n, r) => {
54518
+ let a = DJ(n), o = kJ(n, r), s = e, c = !1, l = !1, u = !1, d = [], f = document.createElement("span"), p = b(f), m = document.createElement("span"), h = null, g = b(m), _ = t.closest(".zt-md-editor"), v = (e) => {
54500
54519
  c !== e && (c = e, C());
54501
54520
  }, y = (e) => {
54502
54521
  l !== e && (l = e, S());
54503
54522
  }, x = (e) => {
54504
54523
  e.state.selection.empty || v(!c);
54505
54524
  }, S = () => {
54506
- let e = s ? sJ(s) : new Set(["paragraph"]), r = s ? cJ(s) : "paragraph", a = o.find((e) => e.command === r) ?? o[0];
54507
- p.render(i(NJ, {
54525
+ let e = s ? fJ(s) : new Set(["paragraph"]), r = s ? pJ(s) : "paragraph", a = o.find((e) => e.command === r) ?? o[0];
54526
+ p.render(i(zJ, {
54508
54527
  getCurrentView: () => s,
54509
54528
  portalContainer: t,
54510
54529
  collisionBoundary: _,
@@ -54518,7 +54537,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54518
54537
  activeCommands: e
54519
54538
  }));
54520
54539
  }, C = () => {
54521
- g.render(i(PJ, {
54540
+ g.render(i(BJ, {
54522
54541
  getCurrentView: () => s,
54523
54542
  portalContainer: t,
54524
54543
  collisionBoundary: _,
@@ -54531,9 +54550,9 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54531
54550
  onOpenChange: v,
54532
54551
  messages: n
54533
54552
  }));
54534
- }, w = MJ(e, a, () => s, x, f, d);
54535
- S(), TJ(e, ["link"]) && (w.append(m), C());
54536
- let T = LJ(w, () => c, () => l), E = new eJ({
54553
+ }, w = RJ(e, a, () => s, x, f, d);
54554
+ S(), jJ(e, ["link"]) && (w.append(m), C());
54555
+ let T = UJ(w, () => c, () => l), E = new aJ({
54537
54556
  content: w,
54538
54557
  debounce: 80,
54539
54558
  offset: 8,
@@ -54557,9 +54576,9 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54557
54576
  };
54558
54577
  return e.dom.addEventListener("blur", ie), document.addEventListener("mousedown", ae, !0), {
54559
54578
  update: (e, t) => {
54560
- if (s = e, s.state.selection.empty && (v(!1), y(!1)), FJ(w, s, a), S(), h) {
54561
- let e = TJ(s, ["link"]);
54562
- h.dataset.active = e && EJ(s.state, e) ? "true" : "false";
54579
+ if (s = e, s.state.selection.empty && (v(!1), y(!1)), VJ(w, s, a), S(), h) {
54580
+ let e = jJ(s, ["link"]);
54581
+ h.dataset.active = e && MJ(s.state, e) ? "true" : "false";
54563
54582
  }
54564
54583
  if (!T(s)) {
54565
54584
  E.hide(), te();
@@ -54573,21 +54592,21 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54573
54592
  }), E.destroy(), w.remove();
54574
54593
  }
54575
54594
  };
54576
- }, zJ = (e, t, n) => Pw(() => new Xu({
54577
- key: new $u(bJ),
54578
- view: (r) => RJ(r, e, t, n)
54579
- })), BJ = (e, t) => e(t.state, t.dispatch, t), VJ = (e) => {
54595
+ }, GJ = (e, t, n) => Pw(() => new Xu({
54596
+ key: new $u(EJ),
54597
+ view: (r) => WJ(r, e, t, n)
54598
+ })), KJ = (e, t) => e(t.state, t.dispatch, t), qJ = (e) => {
54580
54599
  let t = e?.state?.selection?.$from;
54581
54600
  if (!t) return !1;
54582
54601
  for (let e = t.depth; e > 0; --e) if (t.node(e)?.type?.name === "table") return !0;
54583
54602
  return !1;
54584
- }, HJ = (e, t) => {
54603
+ }, JJ = (e, t) => {
54585
54604
  let n = e?.state?.doc;
54586
54605
  if (!n || typeof t != "number") return -1;
54587
54606
  let r = Math.min(Math.max(t, 0), n.content.size), i = n.resolve(r);
54588
54607
  for (let e = i.depth; e > 0; --e) if (i.node(e)?.type?.name === "table") return i.before(e);
54589
54608
  return -1;
54590
- }, UJ = (e, t, n, r) => {
54609
+ }, YJ = (e, t, n, r) => {
54591
54610
  let i = e?.state?.schema?.nodes;
54592
54611
  if (!i) return null;
54593
54612
  let a = i.table, o = i.table_header_row, s = i.table_row, c = i.table_header, l = i.table_cell;
@@ -54597,21 +54616,21 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54597
54616
  return i.create(null, u);
54598
54617
  });
54599
54618
  return a.create(null, f);
54600
- }, WJ = (e) => {
54601
- if (!e?.state || !e?.dispatch || VJ(e)) return !1;
54602
- let t = e.state.selection.from, n = UJ(e, 3, 3, !0);
54619
+ }, XJ = (e) => {
54620
+ if (!e?.state || !e?.dispatch || qJ(e)) return !1;
54621
+ let t = e.state.selection.from, n = YJ(e, 3, 3, !0);
54603
54622
  if (!n) return !1;
54604
54623
  e.dispatch(e.state.tr.replaceSelectionWith(n).scrollIntoView());
54605
- let r = HJ(e, t);
54606
- if (r < 0 && t > 0 && (r = HJ(e, t - 1)), r < 0) return !0;
54624
+ let r = JJ(e, t);
54625
+ if (r < 0 && t > 0 && (r = JJ(e, t - 1)), r < 0) return !0;
54607
54626
  let i = r + 2;
54608
54627
  if (i > e.state.doc.content.size) return !0;
54609
54628
  let a = N.near(e.state.doc.resolve(i), 1);
54610
54629
  return e.dispatch(e.state.tr.setSelection(a).scrollIntoView()), e.focus(), !0;
54611
- }, GJ = (e, t) => {
54630
+ }, ZJ = (e, t) => {
54612
54631
  let n = e?.state?.schema?.marks ?? {}, r = t.find((e) => n[e]);
54613
54632
  return r ? n[r] ?? null : null;
54614
- }, KJ = new Set([
54633
+ }, QJ = new Set([
54615
54634
  "paragraph",
54616
54635
  "heading1",
54617
54636
  "heading2",
@@ -54624,10 +54643,10 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54624
54643
  "taskList",
54625
54644
  "blockquote",
54626
54645
  "codeBlock"
54627
- ]), qJ = (e) => KJ.has(e), JJ = {
54646
+ ]), $J = (e) => QJ.has(e), eY = {
54628
54647
  inlineCode: (e) => {
54629
- let t = GJ(e, ["inlineCode", "code_inline"]);
54630
- return t ? BJ(O_(t), e) : !1;
54648
+ let t = ZJ(e, ["inlineCode", "code_inline"]);
54649
+ return t ? KJ(O_(t), e) : !1;
54631
54650
  },
54632
54651
  inlineMath: (e) => {
54633
54652
  let t = e?.state?.schema?.nodes?.math_inline;
@@ -54640,7 +54659,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54640
54659
  },
54641
54660
  mathBlock: (e) => {
54642
54661
  let t = e.state.schema.nodes?.math_block;
54643
- if (!t || !BJ(T_(t), e)) return !1;
54662
+ if (!t || !KJ(T_(t), e)) return !1;
54644
54663
  let n = e.state.selection?.$from;
54645
54664
  if (!n) return !0;
54646
54665
  let r = null;
@@ -54652,8 +54671,8 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54652
54671
  let i = P.create(e.state.doc, r);
54653
54672
  return e.dispatch(e.state.tr.setSelection(i).scrollIntoView()), !0;
54654
54673
  },
54655
- table: WJ
54656
- }, YJ = (e, t) => !e?.state || !e?.dispatch ? !1 : qJ(t) ? oJ(e, t) : t === "image" ? !1 : JJ[t](e), XJ = (e) => typeof e?.props?.editable == "function" ? e.props.editable(e.state) : !!e?.editable, ZJ = [
54674
+ table: XJ
54675
+ }, tY = (e, t) => !e?.state || !e?.dispatch ? !1 : $J(t) ? dJ(e, t) : t === "image" ? !1 : eY[t](e), nY = (e) => typeof e?.props?.editable == "function" ? e.props.editable(e.state) : !!e?.editable, rY = [
54657
54676
  {
54658
54677
  id: "paragraph",
54659
54678
  label: "普通文本",
@@ -54773,7 +54792,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54773
54792
  icon: "Image",
54774
54793
  command: "image"
54775
54794
  }
54776
- ], QJ = [
54795
+ ], iY = [
54777
54796
  {
54778
54797
  id: "paragraph",
54779
54798
  label: "Paragraph",
@@ -54893,7 +54912,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54893
54912
  icon: "Image",
54894
54913
  command: "image"
54895
54914
  }
54896
- ], $J = (e, t = "zh-CN") => e?.items && e.items.length > 0 ? e.items : t === "en-US" ? QJ : ZJ, eY = (e) => {
54915
+ ], aY = (e, t = "zh-CN") => e?.items && e.items.length > 0 ? e.items : t === "en-US" ? iY : rY, oY = (e) => {
54897
54916
  let t = e?.state?.selection?.$from;
54898
54917
  if (!t) return !1;
54899
54918
  let n = String(t.parent?.type?.name ?? "");
@@ -54903,17 +54922,17 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54903
54922
  if (n === "table" || n === "table_cell" || n === "table_header") return !0;
54904
54923
  }
54905
54924
  return !1;
54906
- }, tY = (e) => {
54925
+ }, sY = (e) => {
54907
54926
  let t = e?.state, n = t?.selection?.$from;
54908
54927
  if (!t || !n) return "";
54909
54928
  let r = n.start(), i = n.pos;
54910
54929
  return t.doc.textBetween(r, i, "\n", "\n");
54911
- }, nY = (e) => {
54912
- let t = tY(e), n = t.lastIndexOf("/");
54930
+ }, cY = (e) => {
54931
+ let t = sY(e), n = t.lastIndexOf("/");
54913
54932
  if (n < 0) return null;
54914
54933
  let r = t.slice(n + 1);
54915
54934
  return /\s/.test(r) ? null : r;
54916
- }, rY = (e, t) => {
54935
+ }, lY = (e, t) => {
54917
54936
  if (t === null || t.length === 0) return e;
54918
54937
  let n = t.toLowerCase();
54919
54938
  return e.filter((e) => [
@@ -54922,24 +54941,24 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54922
54941
  e.command,
54923
54942
  e.id
54924
54943
  ].some((e) => String(e).toLowerCase().startsWith(n)));
54925
- }, iY = (e, t) => {
54926
- if (!XJ(e)) return {
54944
+ }, uY = (e, t) => {
54945
+ if (!nY(e)) return {
54927
54946
  visibleItems: [],
54928
54947
  shouldShow: !1
54929
54948
  };
54930
- let n = nY(e), r = rY(t, n);
54949
+ let n = cY(e), r = lY(t, n);
54931
54950
  return {
54932
54951
  visibleItems: r,
54933
- shouldShow: !eY(e) && n !== null && r.length > 0
54952
+ shouldShow: !oY(e) && n !== null && r.length > 0
54934
54953
  };
54935
- }, aY = (e) => {
54954
+ }, dY = (e) => {
54936
54955
  let t = e?.state, n = t?.selection?.$from;
54937
54956
  if (!t || !n || !e?.dispatch) return !1;
54938
54957
  let r = n.start(), i = n.pos, a = t.doc.textBetween(r, i, "\n", "\n").lastIndexOf("/");
54939
54958
  if (a < 0) return !1;
54940
54959
  let o = r + a, s = t.tr.delete(o, i);
54941
54960
  return e.dispatch(s.scrollIntoView()), !0;
54942
- }, oY = {
54961
+ }, fY = {
54943
54962
  Type: it,
54944
54963
  Heading1: je,
54945
54964
  Heading2: Me,
@@ -54957,7 +54976,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54957
54976
  TextQuote: nt,
54958
54977
  Sigma: Je,
54959
54978
  Table: Qe
54960
- }, sY = Te, cY = (e, t, n, r, a) => {
54979
+ }, pY = Te, mY = (e, t, n, r, a) => {
54961
54980
  r.splice(0).forEach((e) => {
54962
54981
  e.unmount();
54963
54982
  }), e.innerHTML = "";
@@ -54971,7 +54990,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54971
54990
  c.className = "slash-menu-item", c.dataset.command = t.command, c.dataset.selected = s === n ? "true" : "false";
54972
54991
  let l = document.createElement("span");
54973
54992
  l.className = "slash-menu-item-icon";
54974
- let u = t.icon ? oY[t.icon] ?? sY : null;
54993
+ let u = t.icon ? fY[t.icon] ?? pY : null;
54975
54994
  if (u) {
54976
54995
  let e = b(l);
54977
54996
  e.render(i(u, {
@@ -54984,12 +55003,12 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54984
55003
  let f = a[t.command], p = f ? document.createElement("kbd") : null;
54985
55004
  p && (p.className = "slash-menu-item-shortcut", p.textContent = f), c.appendChild(l), c.appendChild(d), p && c.appendChild(p), e.appendChild(c);
54986
55005
  });
54987
- }, lY = (e, t) => {
55006
+ }, hY = (e, t) => {
54988
55007
  let n = document.createElement("div");
54989
55008
  n.className = "slash-menu", n.style.display = "none", e.appendChild(n);
54990
- let r = !1, i = "", a = !1, o = null, s = [], c = gJ(t), l = () => {
55009
+ let r = !1, i = "", a = !1, o = null, s = [], c = SJ(t), l = () => {
54991
55010
  if (!r || !o) return;
54992
- let { editorWrapper: t, anchorTopInContent: i, anchorBottomInContent: a, anchorLeftInContent: s, placement: c, offsetY: l } = o, u = bq({
55011
+ let { editorWrapper: t, anchorTopInContent: i, anchorBottomInContent: a, anchorLeftInContent: s, placement: c, offsetY: l } = o, u = Tq({
54993
55012
  wrapper: t,
54994
55013
  anchor: {
54995
55014
  anchorTopInContent: i,
@@ -55002,7 +55021,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
55002
55021
  boundaryInset: 4
55003
55022
  }, e);
55004
55023
  n.style.left = `${u.left}px`, n.style.top = `${u.top}px`, n.dataset.placement = c;
55005
- }, u = xq(() => {
55024
+ }, u = Eq(() => {
55006
55025
  r && l();
55007
55026
  }), d = () => {
55008
55027
  n.style.top = "", n.style.left = "", n.style.transform = "", delete n.dataset.placement;
@@ -55021,7 +55040,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
55021
55040
  },
55022
55041
  renderIfNeeded: (e, t) => {
55023
55042
  let r = `${e.map((e) => e.command).join("|")}::${t}`;
55024
- i !== r && (cY(n, e, t, s, c), i = r);
55043
+ i !== r && (mY(n, e, t, s, c), i = r);
55025
55044
  },
55026
55045
  scrollActiveItemIntoView: (e) => {
55027
55046
  let t = n.querySelector(".slash-menu-item[data-selected=\"true\"]");
@@ -55043,7 +55062,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
55043
55062
  };
55044
55063
  //#endregion
55045
55064
  //#region node_modules/.pnpm/@milkdown+plugin-slash@7.21.1/node_modules/@milkdown/plugin-slash/lib/index.js
55046
- function uY(e) {
55065
+ function gY(e) {
55047
55066
  let t = Iw({}, `${e}_SLASH_SPEC`), n = Pw((n) => {
55048
55067
  let r = n.get(t.key);
55049
55068
  return new Xu({
@@ -55061,29 +55080,29 @@ function uY(e) {
55061
55080
  }
55062
55081
  //#endregion
55063
55082
  //#region src/plugins/custom/slash-menu/slash-menu.ts
55064
- var dY = (e, t) => {
55083
+ var _Y = (e, t) => {
55065
55084
  if (!(!e || typeof e != "object")) return e[t];
55066
- }, fY = () => {
55067
- if (typeof uY != "function") return console.error("[zt-md/slash] slashFactory not found"), null;
55068
- let e = uY("zt-md-slash"), t = Array.isArray(e) ? e[0] : void 0, n = Array.isArray(e) ? e[1] : e, r = Array.isArray(e) ? e[2] : void 0;
55085
+ }, vY = () => {
55086
+ if (typeof gY != "function") return console.error("[zt-md/slash] slashFactory not found"), null;
55087
+ let e = gY("zt-md-slash"), t = Array.isArray(e) ? e[0] : void 0, n = Array.isArray(e) ? e[1] : e, r = Array.isArray(e) ? e[2] : void 0;
55069
55088
  if (!n) return null;
55070
- let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a = dY(t, "key") ?? dY(n, "key") ?? dY(r, "key") ?? dY(e, "key");
55089
+ let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a = _Y(t, "key") ?? _Y(n, "key") ?? _Y(r, "key") ?? _Y(e, "key");
55071
55090
  return i.length === 0 || a === void 0 ? null : {
55072
55091
  plugins: i,
55073
55092
  key: a
55074
55093
  };
55075
- }, pY = (e, t, n, r, i = "zh-CN", a = "modShift") => {
55094
+ }, yY = (e, t, n, r, i = "zh-CN", a = "modShift") => {
55076
55095
  if (t?.enabled === !1) return {
55077
55096
  plugins: [],
55078
55097
  config: null
55079
55098
  };
55080
55099
  try {
55081
- let o = fY();
55100
+ let o = vY();
55082
55101
  if (!o) return {
55083
55102
  plugins: [],
55084
55103
  config: null
55085
55104
  };
55086
- let s = $J(t, i), c = lY(e, a), l = 0, u = null, d = s, f = !1, p = new Set([
55105
+ let s = aY(t, i), c = hY(e, a), l = 0, u = null, d = s, f = !1, p = new Set([
55087
55106
  "ArrowDown",
55088
55107
  "ArrowUp",
55089
55108
  "Enter",
@@ -55098,18 +55117,18 @@ var dY = (e, t) => {
55098
55117
  let n = e?.coordsAtPos?.(t);
55099
55118
  return n ? new DOMRect(n.left, n.top, Math.max(n.right - n.left, 1), n.bottom - n.top) : null;
55100
55119
  }, g = (e) => {
55101
- if (!XJ(e)) {
55120
+ if (!nY(e)) {
55102
55121
  d = [], f = !1, c.updatePositionContext(null), c.setVisible(!1);
55103
55122
  return;
55104
55123
  }
55105
- let t = iY(e, s);
55124
+ let t = uY(e, s);
55106
55125
  if (d = t.visibleItems, f = t.shouldShow, t.shouldShow && l >= d.length && (l = 0), t.shouldShow && !c.isVisible() && (l = 0), !t.shouldShow) {
55107
55126
  c.updatePositionContext(null), c.setVisible(!1);
55108
55127
  return;
55109
55128
  }
55110
- let n = h(e), r = hq(e?.dom);
55129
+ let n = h(e), r = bq(e?.dom);
55111
55130
  if (n && r) {
55112
- let e = gq(n, 320), t = _q(n, r);
55131
+ let e = xq(n, 320), t = Sq(n, r);
55113
55132
  c.updatePositionContext({
55114
55133
  editorWrapper: r,
55115
55134
  anchorTopInContent: t.anchorTopInContent,
@@ -55123,13 +55142,13 @@ var dY = (e, t) => {
55123
55142
  c.updatePosition();
55124
55143
  });
55125
55144
  }, _ = () => {
55126
- if (!XJ(u)) {
55145
+ if (!nY(u)) {
55127
55146
  f = !1, c.updatePositionContext(null), c.setVisible(!1);
55128
55147
  return;
55129
55148
  }
55130
55149
  if (!u || l < 0 || l >= d.length) return;
55131
55150
  let t = d[l];
55132
- if (aY(u)) {
55151
+ if (dY(u)) {
55133
55152
  if (t.command === "image") {
55134
55153
  c.setVisible(!1), n && YI({
55135
55154
  portalContainer: e,
@@ -55139,7 +55158,7 @@ var dY = (e, t) => {
55139
55158
  });
55140
55159
  return;
55141
55160
  }
55142
- YJ(u, t.command) && (c.setVisible(!1), t.command === "mathBlock" && queueMicrotask(() => {
55161
+ tY(u, t.command) && (c.setVisible(!1), t.command === "mathBlock" && queueMicrotask(() => {
55143
55162
  let e = u?.dom?.querySelector?.(".zt-md-math-block-editing .zt-md-math-block-textarea");
55144
55163
  !e || document.activeElement === e || e.focus();
55145
55164
  }));
@@ -55173,33 +55192,36 @@ var dY = (e, t) => {
55173
55192
  config: null
55174
55193
  };
55175
55194
  }
55176
- }, mY = /Mac|iPhone|iPad|iPod/, hY = Object.fromEntries(Object.entries(uJ).map(([e, t]) => [t.code, e])), gY = (e, t) => (typeof navigator < "u" && mY.test(navigator.platform) ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey) ? t === "modAlt" ? e.altKey && !e.shiftKey : e.shiftKey && !e.altKey : !1, _Y = (e, t, n, r) => (YI({
55195
+ }, bY = /Mac|iPhone|iPad|iPod/, xY = (e, t) => (typeof navigator < "u" && bY.test(navigator.platform) ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey) ? t === "modAlt" ? e.altKey && !e.shiftKey : e.shiftKey && !e.altKey : !1, SY = (e, t, n, r) => (YI({
55177
55196
  portalContainer: t,
55178
55197
  view: e,
55179
55198
  messages: n,
55180
55199
  imageUpload: r
55181
- }), !0), vY = (e, t, n, r) => (i, a) => {
55182
- if (a.isComposing || !gY(a, n) || !XJ(i)) return !1;
55183
- let o = hY[a.code];
55184
- if (!o) return !1;
55185
- let s = o === "image" ? _Y(i, e, t, r) : YJ(i, o);
55186
- return s && a.preventDefault(), s;
55187
- }, yY = "table", bY = "ArrowUp", xY = (e) => e.key !== bY || e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey, SY = (e, t) => {
55200
+ }), !0), CY = (e, t, n, r) => {
55201
+ let i = gJ(n), a = Object.fromEntries(Object.entries(i).map(([e, t]) => [t.code, e]));
55202
+ return (i, o) => {
55203
+ if (o.isComposing || !xY(o, n) || !nY(i)) return !1;
55204
+ let s = a[o.code];
55205
+ if (!s) return !1;
55206
+ let c = s === "image" ? SY(i, e, t, r) : tY(i, s);
55207
+ return c && o.preventDefault(), c;
55208
+ };
55209
+ }, wY = "table", TY = "ArrowUp", EY = (e) => e.key !== TY || e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey, DY = (e, t) => {
55188
55210
  let n = t.nodeBefore;
55189
- return !n || n.type.name !== yY ? null : {
55211
+ return !n || n.type.name !== wY ? null : {
55190
55212
  tableNode: n,
55191
55213
  tableStart: e - n.nodeSize
55192
55214
  };
55193
- }, CY = (e) => {
55215
+ }, OY = (e) => {
55194
55216
  if (e.parent.type.name !== "paragraph" || e.parentOffset !== 0 || e.parent.childCount > 0 || e.depth < 1) return null;
55195
55217
  let t = e.index(e.depth - 1);
55196
55218
  if (t <= 0) return null;
55197
55219
  let n = e.node(e.depth - 1).child(t - 1);
55198
- return n.type.name === yY ? {
55220
+ return n.type.name === wY ? {
55199
55221
  tableNode: n,
55200
55222
  tableStart: e.before(e.depth) - n.nodeSize
55201
55223
  } : null;
55202
- }, wY = (e, t) => {
55224
+ }, kY = (e, t) => {
55203
55225
  if (e.childCount === 0) return null;
55204
55226
  let n = e.childCount - 1, r = e.child(n);
55205
55227
  if (r.childCount === 0) return null;
@@ -55208,21 +55230,21 @@ var dY = (e, t) => {
55208
55230
  let a = r.childCount - 1, o = r.child(a), s = 0;
55209
55231
  for (let e = 0; e < a; e += 1) s += r.child(e).nodeSize;
55210
55232
  return t + 1 + i + 1 + s + o.nodeSize - 1;
55211
- }, TY = (e) => {
55233
+ }, AY = (e) => {
55212
55234
  let { selection: t } = e.state, n = t.$from, r = null;
55213
- if (t instanceof GN ? r = SY(t.from, n) : t.empty && (r = CY(n)), !r) return !1;
55214
- let i = wY(r.tableNode, r.tableStart);
55235
+ if (t instanceof GN ? r = DY(t.from, n) : t.empty && (r = OY(n)), !r) return !1;
55236
+ let i = kY(r.tableNode, r.tableStart);
55215
55237
  if (i === null) return !1;
55216
55238
  let a = e.state.tr.setSelection(N.near(e.state.doc.resolve(i), -1)).scrollIntoView();
55217
55239
  return e.dispatch(a), e.focus(), !0;
55218
- }, EY = Pw(() => new Xu({
55240
+ }, jY = Pw(() => new Xu({
55219
55241
  key: new $u("zt-md-table-arrow-entry"),
55220
- props: { handleKeyDown: (e, t) => xY(t) ? !1 : TY(e) }
55221
- })), DY = "table", OY = "table_header_row", kY = "table_row", AY = "table_header", jY = "table_cell", MY = (e) => {
55242
+ props: { handleKeyDown: (e, t) => EY(t) ? !1 : AY(e) }
55243
+ })), MY = "table", NY = "table_header_row", PY = "table_row", FY = "table_header", IY = "table_cell", LY = (e) => {
55222
55244
  let t = e.selection.$from, n = -1, r = -1;
55223
55245
  for (let e = t.depth; e >= 0; --e) {
55224
55246
  let i = t.node(e);
55225
- if (r < 0 && (i.type.name === jY || i.type.name === AY) && (r = t.index(e - 1)), n < 0 && (i.type.name === kY || i.type.name === OY) && (n = t.index(e - 1)), i.type.name === DY) return {
55247
+ if (r < 0 && (i.type.name === IY || i.type.name === FY) && (r = t.index(e - 1)), n < 0 && (i.type.name === PY || i.type.name === NY) && (n = t.index(e - 1)), i.type.name === MY) return {
55226
55248
  tableNode: i,
55227
55249
  tableStart: e === 0 ? 0 : t.before(e),
55228
55250
  tableNodeSize: i.nodeSize,
@@ -55231,7 +55253,7 @@ var dY = (e, t) => {
55231
55253
  };
55232
55254
  }
55233
55255
  return null;
55234
- }, NY = (e, t, n, r) => {
55256
+ }, RY = (e, t, n, r) => {
55235
55257
  if (n < 0 || n >= e.childCount) return null;
55236
55258
  let i = 0;
55237
55259
  for (let t = 0; t < n; t += 1) i += e.child(t).nodeSize;
@@ -55240,16 +55262,16 @@ var dY = (e, t) => {
55240
55262
  let o = 0;
55241
55263
  for (let e = 0; e < r; e += 1) o += a.child(e).nodeSize;
55242
55264
  return t + 1 + i + 1 + o + 1 + 1;
55243
- }, PY = (e) => {
55265
+ }, zY = (e) => {
55244
55266
  if (e.columnIndex < 0 || e.tableNode.childCount === 0) return !1;
55245
55267
  let t = e.tableNode.child(0);
55246
55268
  return e.columnIndex < t.childCount;
55247
- }, FY = (e, t, n, r) => {
55248
- let i = NY(t.tableNode, t.tableStart, n, r);
55269
+ }, BY = (e, t, n, r) => {
55270
+ let i = RY(t.tableNode, t.tableStart, n, r);
55249
55271
  if (i === null) return !1;
55250
55272
  let a = e.state.tr.setSelection(N.near(e.state.tr.doc.resolve(i), 1));
55251
55273
  return e.dispatch(a), !0;
55252
- }, IY = (e, t) => t(e.state, e.dispatch, e) ? (e.dispatch(e.state.tr.scrollIntoView()), e.focus(), !0) : !1, LY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !FY(e, t, t.rowIndex, t.columnIndex) ? !1 : IY(e, n === "above" ? Sk : Ck), RY = (e, t) => t.rowIndex <= 0 || t.columnIndex < 0 || !FY(e, t, t.rowIndex, t.columnIndex) ? !1 : IY(e, Tk), zY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !FY(e, t, t.rowIndex, t.columnIndex) ? !1 : IY(e, n === "left" ? gk : _k), BY = (e, t) => t.rowIndex < 0 || t.columnIndex < 0 || (t.tableNode.childCount > 0 ? t.tableNode.child(0).childCount : 0) <= 1 || !FY(e, t, t.rowIndex, t.columnIndex) ? !1 : IY(e, yk), VY = (e, t, n) => {
55274
+ }, VY = (e, t) => t(e.state, e.dispatch, e) ? (e.dispatch(e.state.tr.scrollIntoView()), e.focus(), !0) : !1, HY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !BY(e, t, t.rowIndex, t.columnIndex) ? !1 : VY(e, n === "above" ? Sk : Ck), UY = (e, t) => t.rowIndex <= 0 || t.columnIndex < 0 || !BY(e, t, t.rowIndex, t.columnIndex) ? !1 : VY(e, Tk), WY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !BY(e, t, t.rowIndex, t.columnIndex) ? !1 : VY(e, n === "left" ? gk : _k), GY = (e, t) => t.rowIndex < 0 || t.columnIndex < 0 || (t.tableNode.childCount > 0 ? t.tableNode.child(0).childCount : 0) <= 1 || !BY(e, t, t.rowIndex, t.columnIndex) ? !1 : VY(e, yk), KY = (e, t, n) => {
55253
55275
  if (t.columnIndex < 0) return !1;
55254
55276
  let r = SO.get(t.tableNode), i = t.tableStart + 1, a = t.columnIndex, o = e.state.tr;
55255
55277
  for (let e = 0; e < r.height; e += 1) {
@@ -55264,14 +55286,14 @@ var dY = (e, t) => {
55264
55286
  o.setNodeMarkup(c, l.type, u, l.marks);
55265
55287
  }
55266
55288
  return o.docChanged ? (o.scrollIntoView(), e.dispatch(o), e.focus(), !0) : !1;
55267
- }, HY = (e) => {
55268
- let t = MY(e.state);
55269
- !t || t.rowIndex <= 0 || RY(e, t);
55270
- }, UY = (e) => {
55271
- let t = MY(e.state);
55272
- !t || t.rowIndex < 0 || t.columnIndex < 0 || BY(e, t);
55273
- }, WY = (e) => {
55274
- let [t, r] = f(!1), a = Cq({
55289
+ }, qY = (e) => {
55290
+ let t = LY(e.state);
55291
+ !t || t.rowIndex <= 0 || UY(e, t);
55292
+ }, JY = (e) => {
55293
+ let t = LY(e.state);
55294
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || GY(e, t);
55295
+ }, YY = (e) => {
55296
+ let [t, r] = f(!1), a = Oq({
55275
55297
  open: t,
55276
55298
  portalContainer: e.portalContainer,
55277
55299
  editorWrapper: e.collisionBoundary,
@@ -55303,7 +55325,7 @@ var dY = (e, t) => {
55303
55325
  size: 14,
55304
55326
  strokeWidth: 2,
55305
55327
  "aria-hidden": "true"
55306
- })), i(wq, {
55328
+ })), i(kq, {
55307
55329
  panel: a,
55308
55330
  portalContainer: e.portalContainer,
55309
55331
  className: "zt-md-table-action-popover",
@@ -55371,13 +55393,13 @@ var dY = (e, t) => {
55371
55393
  e.onDeleteColumn(), r(!1);
55372
55394
  }
55373
55395
  }, e.messages.tableDeleteColumnLabel))));
55374
- }, GY = "zt-md-table-focus-actions", KY = 0, qY = 24, JY = 4, YY = 4, XY = "top", ZY = "left", QY = (e) => y(i(e, {
55396
+ }, XY = "zt-md-table-focus-actions", ZY = 0, QY = 24, $Y = 4, eX = 4, tX = "top", nX = "left", rX = (e) => y(i(e, {
55375
55397
  size: 14,
55376
55398
  strokeWidth: 2,
55377
55399
  "aria-hidden": "true"
55378
- })), $Y = QY(rt), eX = QY(tt), tX = QY(et), nX = QY($e), rX = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, iX = class {
55400
+ })), iX = rX(rt), aX = rX(tt), oX = rX(et), sX = rX($e), cX = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, lX = class {
55379
55401
  constructor(e, t, n) {
55380
- this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = ZY, this.currentTableElement = null, this.hasPositionContext = !1, this.repositionScheduler = xq(() => {
55402
+ this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = nX, this.currentTableElement = null, this.hasPositionContext = !1, this.repositionScheduler = Eq(() => {
55381
55403
  this.hasPositionContext && this.updateOverlayPosition();
55382
55404
  }), this.handleActionsMouseDown = (e) => {
55383
55405
  e.preventDefault();
@@ -55392,41 +55414,41 @@ var dY = (e, t) => {
55392
55414
  }, this.handleAlignRightClick = () => {
55393
55415
  this.applyColumnAlignment("right");
55394
55416
  }, this.handleInsertRowBelow = () => {
55395
- let e = MY(this.view.state);
55396
- !e || e.rowIndex < 0 || LY(this.view, e, "below");
55417
+ let e = LY(this.view.state);
55418
+ !e || e.rowIndex < 0 || HY(this.view, e, "below");
55397
55419
  }, this.handleInsertRowAbove = () => {
55398
- let e = MY(this.view.state);
55399
- !e || e.rowIndex <= 0 || LY(this.view, e, "above");
55420
+ let e = LY(this.view.state);
55421
+ !e || e.rowIndex <= 0 || HY(this.view, e, "above");
55400
55422
  }, this.handleInsertColumnLeft = () => {
55401
55423
  this.insertColumn("left");
55402
55424
  }, this.handleInsertColumnRight = () => {
55403
55425
  this.insertColumn("right");
55404
55426
  }, this.handleDeleteRow = () => {
55405
- HY(this.view);
55427
+ qY(this.view);
55406
55428
  }, this.handleDeleteColumn = () => {
55407
- UY(this.view);
55408
- }, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = hq(e.dom), this.actionsContainer = document.createElement("div"), this.actionsContainer.className = "zt-md-table-actions-overlay", this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-table-action-button zt-md-table-action-button-danger", this.deleteButton.style.display = "inline-flex", this.deleteButton.setAttribute("aria-label", t.tableDeleteAriaLabel), this.deleteButton.innerHTML = $Y, this.alignLeftButton = this.createColumnAlignmentButton(t.tableAlignLeftAriaLabel, eX), this.alignCenterButton = this.createColumnAlignmentButton(t.tableAlignCenterAriaLabel, tX), this.alignRightButton = this.createColumnAlignmentButton(t.tableAlignRightAriaLabel, nX), this.moreActionsMount = document.createElement("span"), this.moreActionsMount.className = "zt-md-table-more-actions-mount", this.moreActionsRoot = b(this.moreActionsMount), this.actionsContainer.append(this.moreActionsMount, this.alignLeftButton, this.alignCenterButton, this.alignRightButton, this.deleteButton), this.actionsContainer.addEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.alignLeftButton.addEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.addEventListener("click", this.handleAlignCenterClick), this.alignRightButton.addEventListener("click", this.handleAlignRightClick), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
55429
+ JY(this.view);
55430
+ }, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = bq(e.dom), this.actionsContainer = document.createElement("div"), this.actionsContainer.className = "zt-md-table-actions-overlay", this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-table-action-button zt-md-table-action-button-danger", this.deleteButton.style.display = "inline-flex", this.deleteButton.setAttribute("aria-label", t.tableDeleteAriaLabel), this.deleteButton.innerHTML = iX, this.alignLeftButton = this.createColumnAlignmentButton(t.tableAlignLeftAriaLabel, aX), this.alignCenterButton = this.createColumnAlignmentButton(t.tableAlignCenterAriaLabel, oX), this.alignRightButton = this.createColumnAlignmentButton(t.tableAlignRightAriaLabel, sX), this.moreActionsMount = document.createElement("span"), this.moreActionsMount.className = "zt-md-table-more-actions-mount", this.moreActionsRoot = b(this.moreActionsMount), this.actionsContainer.append(this.moreActionsMount, this.alignLeftButton, this.alignCenterButton, this.alignRightButton, this.deleteButton), this.actionsContainer.addEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.alignLeftButton.addEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.addEventListener("click", this.handleAlignCenterClick), this.alignRightButton.addEventListener("click", this.handleAlignRightClick), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
55409
55431
  }
55410
55432
  createColumnAlignmentButton(e, t) {
55411
55433
  let n = document.createElement("button");
55412
55434
  return n.type = "button", n.className = "zt-md-table-action-button", n.style.display = "inline-flex", n.setAttribute("aria-label", e), n.innerHTML = t, n;
55413
55435
  }
55414
55436
  resolveColumnAlignment(e) {
55415
- return e === "center" || e === "right" ? e : ZY;
55437
+ return e === "center" || e === "right" ? e : nX;
55416
55438
  }
55417
55439
  updateAlignmentButtonsState(e) {
55418
55440
  this.alignLeftButton.disabled = !e, this.alignCenterButton.disabled = !e, this.alignRightButton.disabled = !e, this.alignLeftButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "left"), this.alignCenterButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "center"), this.alignRightButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "right");
55419
55441
  }
55420
55442
  applyColumnAlignment(e) {
55421
- let t = MY(this.view.state);
55422
- !t || t.rowIndex < 0 || t.columnIndex < 0 || VY(this.view, t, e);
55443
+ let t = LY(this.view.state);
55444
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || KY(this.view, t, e);
55423
55445
  }
55424
55446
  insertColumn(e) {
55425
- let t = MY(this.view.state);
55426
- !t || t.rowIndex < 0 || t.columnIndex < 0 || zY(this.view, t, e);
55447
+ let t = LY(this.view.state);
55448
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || WY(this.view, t, e);
55427
55449
  }
55428
55450
  renderMoreActions(e, t, n, r) {
55429
- this.moreActionsRoot.render(i(WY, {
55451
+ this.moreActionsRoot.render(i(YY, {
55430
55452
  messages: this.messages,
55431
55453
  portalContainer: this.portalContainer,
55432
55454
  collisionBoundary: this.editorWrapper,
@@ -55449,7 +55471,7 @@ var dY = (e, t) => {
55449
55471
  }
55450
55472
  resolveTableAnchor(e, t) {
55451
55473
  if (!this.editorWrapper) return null;
55452
- let n = e.getBoundingClientRect(), r = _q(n, this.editorWrapper), i = n.width, a = r.anchorLeftInContent + i - t - KY, o = r.anchorTopInContent - qY + JY;
55474
+ let n = e.getBoundingClientRect(), r = Sq(n, this.editorWrapper), i = n.width, a = r.anchorLeftInContent + i - t - ZY, o = r.anchorTopInContent - QY + $Y;
55453
55475
  return {
55454
55476
  anchorLeftInContent: a,
55455
55477
  anchorTopInContent: o,
@@ -55466,22 +55488,22 @@ var dY = (e, t) => {
55466
55488
  if (e === null) return;
55467
55489
  let t = this.resolveTableAnchor(this.currentTableElement, e);
55468
55490
  if (!t) return;
55469
- let n = bq({
55491
+ let n = Tq({
55470
55492
  wrapper: this.editorWrapper,
55471
55493
  anchor: t,
55472
55494
  overlaySize: { width: e },
55473
- placement: XY,
55495
+ placement: tX,
55474
55496
  offsetY: 0,
55475
- boundaryInset: YY
55497
+ boundaryInset: eX
55476
55498
  }, this.portalContainer);
55477
55499
  this.actionsContainer.style.left = `${n.left}px`, this.actionsContainer.style.top = `${n.top}px`;
55478
55500
  }
55479
55501
  update(e) {
55480
- if (this.view = e, !this.editorWrapper || !rX(e)) {
55502
+ if (this.view = e, !this.editorWrapper || !cX(e)) {
55481
55503
  this.detach();
55482
55504
  return;
55483
55505
  }
55484
- let t = MY(e.state);
55506
+ let t = LY(e.state);
55485
55507
  if (!t) {
55486
55508
  this.detach();
55487
55509
  return;
@@ -55497,102 +55519,102 @@ var dY = (e, t) => {
55497
55519
  return;
55498
55520
  }
55499
55521
  this.actionsContainer.parentElement !== this.portalContainer && this.portalContainer.append(this.actionsContainer);
55500
- let i = PY(t), a = i && t.tableNode.child(0).childCount > 1, o = t.rowIndex > 0, s = t.rowIndex > 0, c = t.tableNode.childCount > 0 ? t.tableNode.child(0) : null;
55522
+ let i = zY(t), a = i && t.tableNode.child(0).childCount > 1, o = t.rowIndex > 0, s = t.rowIndex > 0, c = t.tableNode.childCount > 0 ? t.tableNode.child(0) : null;
55501
55523
  this.currentColumnIndex = i ? t.columnIndex : null, this.currentColumnAlignment = this.resolveColumnAlignment(this.currentColumnIndex === null ? null : c?.maybeChild(this.currentColumnIndex)?.attrs?.alignment), this.updateAlignmentButtonsState(i), this.renderMoreActions(o, i, s, a), this.currentTableElement = r, this.currentTableStart = t.tableStart, this.currentTableNodeSize = t.tableNodeSize, this.hasPositionContext = !0, this.updateOverlayPosition(), this.repositionScheduler.schedule();
55502
55524
  }
55503
55525
  detach() {
55504
- this.moreActionsRoot.render(null), this.actionsContainer.remove(), this.currentTableElement = null, this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = ZY, this.updateAlignmentButtonsState(!1), this.hasPositionContext = !1;
55526
+ this.moreActionsRoot.render(null), this.actionsContainer.remove(), this.currentTableElement = null, this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = nX, this.updateAlignmentButtonsState(!1), this.hasPositionContext = !1;
55505
55527
  }
55506
55528
  destroy() {
55507
55529
  this.detach(), this.repositionScheduler.destroy(), this.moreActionsRoot.unmount(), this.actionsContainer.removeEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.alignLeftButton.removeEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.removeEventListener("click", this.handleAlignCenterClick), this.alignRightButton.removeEventListener("click", this.handleAlignRightClick);
55508
55530
  }
55509
- }, aX = (e, t) => {
55531
+ }, uX = (e, t) => {
55510
55532
  let n = SF(void 0, t);
55511
55533
  return Pw(() => new Xu({
55512
- key: new $u(GY),
55513
- view: (t) => new iX(t, n, e)
55534
+ key: new $u(XY),
55535
+ view: (t) => new lX(t, n, e)
55514
55536
  }));
55515
- }, oX = "list_item", sX = "li[data-item-type=\"task\"]", cX = 24, lX = (e, t) => {
55537
+ }, dX = "list_item", fX = "li[data-item-type=\"task\"]", pX = 24, mX = (e, t) => {
55516
55538
  let n = t.getBoundingClientRect();
55517
- return e.clientX >= n.left && e.clientX <= n.left + cX && e.clientY >= n.top && e.clientY <= n.top + cX;
55518
- }, uX = (e) => {
55539
+ return e.clientX >= n.left && e.clientX <= n.left + pX && e.clientY >= n.top && e.clientY <= n.top + pX;
55540
+ }, hX = (e) => {
55519
55541
  if (!(e instanceof Element)) return null;
55520
- let t = e.closest(sX);
55542
+ let t = e.closest(fX);
55521
55543
  return t instanceof HTMLElement ? t : null;
55522
- }, dX = (e, t) => {
55544
+ }, gX = (e, t) => {
55523
55545
  if (!e.editable) return !1;
55524
- let n = uX(t.target);
55525
- return !n || !lX(t, n) ? !1 : (t.preventDefault(), !0);
55526
- }, fX = (e, t) => {
55546
+ let n = hX(t.target);
55547
+ return !n || !mX(t, n) ? !1 : (t.preventDefault(), !0);
55548
+ }, _X = (e, t) => {
55527
55549
  let n = e.posAtDOM(t, 0) - 1, r = e.state.doc.nodeAt(n);
55528
- return !r || r.type.name !== oX || r.attrs.checked == null ? !1 : (e.dispatch(e.state.tr.setNodeMarkup(n, void 0, {
55550
+ return !r || r.type.name !== dX || r.attrs.checked == null ? !1 : (e.dispatch(e.state.tr.setNodeMarkup(n, void 0, {
55529
55551
  ...r.attrs,
55530
55552
  checked: !r.attrs.checked
55531
55553
  })), !0);
55532
- }, pX = Pw(() => new Xu({ props: { handleDOMEvents: {
55533
- mousedown: (e, t) => dX(e, t),
55534
- dblclick: (e, t) => dX(e, t),
55554
+ }, vX = Pw(() => new Xu({ props: { handleDOMEvents: {
55555
+ mousedown: (e, t) => gX(e, t),
55556
+ dblclick: (e, t) => gX(e, t),
55535
55557
  click: (e, t) => {
55536
55558
  if (!e.editable) return !1;
55537
- let n = uX(t.target);
55538
- return !n || !lX(t, n) || !fX(e, n) ? !1 : (t.preventDefault(), !0);
55559
+ let n = hX(t.target);
55560
+ return !n || !mX(t, n) || !_X(e, n) ? !1 : (t.preventDefault(), !0);
55539
55561
  }
55540
- } } })), mX = "Tab", hX = 4, gX = /^ */, _X = "list_item", vX = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, yX = (e) => {
55562
+ } } })), yX = "Tab", bX = 4, xX = /^ */, SX = "list_item", CX = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, wX = (e) => {
55541
55563
  let { $from: t } = e.selection;
55542
55564
  for (let e = t.depth; e >= 0; --e) {
55543
55565
  let n = t.node(e);
55544
- if (n.type.name === _X) return n.type;
55566
+ if (n.type.name === SX) return n.type;
55545
55567
  }
55546
55568
  return null;
55547
- }, bX = (e) => {
55569
+ }, TX = (e) => {
55548
55570
  let { selection: t, doc: n } = e;
55549
55571
  if (t.empty) return [t.$from.start()];
55550
55572
  let r = /* @__PURE__ */ new Set();
55551
55573
  return n.nodesBetween(t.from, t.to, (e, t) => {
55552
55574
  e.isTextblock && r.add(t + 1);
55553
55575
  }), Array.from(r);
55554
- }, xX = (e, t) => {
55555
- let { state: n } = e, r = " ".repeat(hX), i = bX(n).sort((e, t) => t - e), a = n.tr;
55576
+ }, EX = (e, t) => {
55577
+ let { state: n } = e, r = " ".repeat(bX), i = TX(n).sort((e, t) => t - e), a = n.tr;
55556
55578
  return n.selection.empty ? a.insertText(r, n.selection.to) : i.forEach((e) => {
55557
55579
  a.insertText(r, e);
55558
55580
  }), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
55559
- }, SX = (e, t) => {
55581
+ }, DX = (e, t) => {
55560
55582
  let { state: n } = e, { selection: r } = n;
55561
55583
  if (!(r instanceof N)) return !1;
55562
- let i = bX(n).sort((e, t) => t - e), a = n.tr;
55584
+ let i = TX(n).sort((e, t) => t - e), a = n.tr;
55563
55585
  return i.forEach((e) => {
55564
- let t = n.doc.resolve(e).parent.textContent.match(gX)?.[0].length ?? 0, r = Math.min(t, hX);
55586
+ let t = n.doc.resolve(e).parent.textContent.match(xX)?.[0].length ?? 0, r = Math.min(t, bX);
55565
55587
  r <= 0 || a.delete(e, e + r);
55566
55588
  }), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
55567
- }, CX = Pw(() => new Xu({
55589
+ }, OX = Pw(() => new Xu({
55568
55590
  key: new $u("zt-md-tab-space-indent"),
55569
55591
  props: { handleKeyDown: (e, t) => {
55570
55592
  let n = e;
55571
- if (!vX(n) || t.defaultPrevented || t.key !== mX || t.altKey || t.ctrlKey || t.metaKey) return !1;
55572
- let r = yX(n.state);
55593
+ if (!CX(n) || t.defaultPrevented || t.key !== yX || t.altKey || t.ctrlKey || t.metaKey) return !1;
55594
+ let r = wX(n.state);
55573
55595
  if (r) {
55574
55596
  let e = (t.shiftKey ? yE(r) : SE(r))(n.state, n.dispatch);
55575
55597
  return t.preventDefault(), e || !0;
55576
55598
  }
55577
- return t.shiftKey ? SX(n, t) : xX(n, t);
55599
+ return t.shiftKey ? DX(n, t) : EX(n, t);
55578
55600
  } }
55579
- })), wX = (e) => {
55601
+ })), kX = (e) => {
55580
55602
  let t = (e instanceof Element ? e : e.parentElement)?.closest("code");
55581
55603
  return t instanceof HTMLElement && !t.closest("pre") ? t : null;
55582
- }, TX = (e, t, n) => wX(e.domAtPos(t, n).node), EX = (e) => {
55604
+ }, AX = (e, t, n) => kX(e.domAtPos(t, n).node), jX = (e) => {
55583
55605
  let t = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT), n = t.nextNode(), r = null;
55584
55606
  for (; n;) n.data.length > 0 && (r = n), n = t.nextNode();
55585
55607
  return r;
55586
- }, DX = (e, t, n) => {
55608
+ }, MX = (e, t, n) => {
55587
55609
  let r = e.domAtPos(t, n);
55588
55610
  e.dom.ownerDocument.getSelection()?.collapse(r.node, r.offset);
55589
- }, OX = (e, t) => {
55590
- let n = e.domAtPos(t, -1), r = wX(n.node), i = e.dom.ownerDocument.getSelection();
55611
+ }, NX = (e, t) => {
55612
+ let n = e.domAtPos(t, -1), r = kX(n.node), i = e.dom.ownerDocument.getSelection();
55591
55613
  if (!r) {
55592
55614
  i?.collapse(n.node, n.offset);
55593
55615
  return;
55594
55616
  }
55595
- let a = EX(r);
55617
+ let a = jX(r);
55596
55618
  if (!a) {
55597
55619
  let e = r.childNodes.length;
55598
55620
  i?.collapse(r, e);
@@ -55600,7 +55622,7 @@ var dY = (e, t) => {
55600
55622
  }
55601
55623
  let o = a.data.length;
55602
55624
  i?.collapse(a, o);
55603
- }, kX = {
55625
+ }, PX = {
55604
55626
  left: {
55605
55627
  inwardKey: "ArrowRight",
55606
55628
  outwardKey: "ArrowLeft"
@@ -55609,13 +55631,13 @@ var dY = (e, t) => {
55609
55631
  inwardKey: "ArrowLeft",
55610
55632
  outwardKey: "ArrowRight"
55611
55633
  }
55612
- }, AX = {
55634
+ }, FX = {
55613
55635
  left: "nodeAfter",
55614
55636
  right: "nodeBefore"
55615
- }, jX = (e, t) => {
55637
+ }, IX = (e, t) => {
55616
55638
  e.dispatch(e.state.tr.setMeta(t, null));
55617
- }, MX = (e, t, n, r, i) => {
55618
- if (t.key === "ArrowRight") return jX(e, i), !1;
55639
+ }, LX = (e, t, n, r, i) => {
55640
+ if (t.key === "ArrowRight") return IX(e, i), !1;
55619
55641
  if (t.key !== "ArrowLeft") return !1;
55620
55642
  t.preventDefault();
55621
55643
  let a = (e.state.storedMarks ?? e.state.selection.$from.marks()).filter((e) => e.type !== n);
@@ -55623,35 +55645,35 @@ var dY = (e, t) => {
55623
55645
  ...r,
55624
55646
  placement: "outside"
55625
55647
  })), !0;
55626
- }, NX = (e, t, n, r, i) => {
55627
- if (r.placement === "inside") return MX(e, t, n, r, i);
55628
- let a = kX[r.side];
55629
- if (t.key === a.outwardKey) return jX(e, i), !1;
55648
+ }, RX = (e, t, n, r, i) => {
55649
+ if (r.placement === "inside") return LX(e, t, n, r, i);
55650
+ let a = PX[r.side];
55651
+ if (t.key === a.outwardKey) return IX(e, i), !1;
55630
55652
  if (t.key !== a.inwardKey) return !1;
55631
- let o = AX[r.side], s = e.state.selection.$from[o], c = s ? n.isInSet(s.marks) : null;
55632
- if (!c) return jX(e, i), !1;
55653
+ let o = FX[r.side], s = e.state.selection.$from[o], c = s ? n.isInSet(s.marks) : null;
55654
+ if (!c) return IX(e, i), !1;
55633
55655
  t.preventDefault();
55634
55656
  let l = e.state.storedMarks ?? e.state.selection.$from.marks(), u = c.addToSet(l);
55635
55657
  return e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r.position)).setStoredMarks(u).setMeta(i, r.side === "left" ? {
55636
55658
  ...r,
55637
55659
  placement: "inside"
55638
- } : null)), r.side === "right" && OX(e, r.position), !0;
55639
- }, PX = (e, t) => !!t.isInSet(e), FX = (e, t, n) => {
55660
+ } : null)), r.side === "right" && NX(e, r.position), !0;
55661
+ }, zX = (e, t) => !!t.isInSet(e), BX = (e, t, n) => {
55640
55662
  let r = e.state.doc.resolve(t), i = r.nodeBefore, a = r.nodeAfter;
55641
- return !a || PX(i?.marks ?? [], n) || !PX(a.marks, n) ? null : n.isInSet(a.marks);
55642
- }, IX = (e, t, n) => {
55663
+ return !a || zX(i?.marks ?? [], n) || !zX(a.marks, n) ? null : n.isInSet(a.marks);
55664
+ }, VX = (e, t, n) => {
55643
55665
  let r = e.state.doc.resolve(t), i = r.nodeBefore, a = r.nodeAfter;
55644
- return !i || !PX(i.marks, n) || PX(a?.marks ?? [], n) ? null : n.isInSet(i.marks);
55645
- }, LX = new $u("zt-md-inline-code-boundary-navigation"), RX = "inlineCode", zX = 2, BX = (e, t, n, r) => {
55666
+ return !i || !zX(i.marks, n) || zX(a?.marks ?? [], n) ? null : n.isInSet(i.marks);
55667
+ }, HX = new $u("zt-md-inline-code-boundary-navigation"), UX = "inlineCode", WX = 2, GX = (e, t, n, r) => {
55646
55668
  let i = t > 0 ? [t, t - 1] : [t];
55647
55669
  for (let [t, a] of i.entries()) {
55648
- let i = IX(e, a, r);
55670
+ let i = VX(e, a, r);
55649
55671
  if (!i) continue;
55650
55672
  let o = e.state.doc.resolve(a).nodeAfter;
55651
55673
  if (o !== null && !o.isText) continue;
55652
- let s = TX(e, a, -1);
55674
+ let s = AX(e, a, -1);
55653
55675
  if (!s) continue;
55654
- let c = n <= s.getBoundingClientRect().right + zX;
55676
+ let c = n <= s.getBoundingClientRect().right + WX;
55655
55677
  if (!(t > 0 && !c)) return {
55656
55678
  boundaryPosition: a,
55657
55679
  inlineCodeMark: i,
@@ -55660,203 +55682,203 @@ var dY = (e, t) => {
55660
55682
  };
55661
55683
  }
55662
55684
  return null;
55663
- }, VX = (e, t) => {
55685
+ }, KX = (e, t) => {
55664
55686
  if (t.button !== 0 || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !e.editable) return !1;
55665
55687
  let n = e.posAtCoords({
55666
55688
  left: t.clientX,
55667
55689
  top: t.clientY
55668
- }), r = e.state.schema.marks[RX];
55690
+ }), r = e.state.schema.marks[UX];
55669
55691
  if (!n || !r) return !1;
55670
- let i = n.pos, a = e.state.doc.resolve(i), o = FX(e, i, r), s = a.nodeBefore;
55692
+ let i = n.pos, a = e.state.doc.resolve(i), o = BX(e, i, r), s = a.nodeBefore;
55671
55693
  if (o && (!s || s.isText)) {
55672
- let n = TX(e, i, 1);
55694
+ let n = AX(e, i, 1);
55673
55695
  if (!n) return !1;
55674
55696
  let c = n.getBoundingClientRect(), l = t.clientX >= c.left, u = (s?.marks ?? a.marks()).filter((e) => e.type !== r), d = l ? o.addToSet(a.marks()) : u, f = l ? {
55675
55697
  position: i,
55676
55698
  side: "left",
55677
55699
  placement: "inside"
55678
55700
  } : null;
55679
- return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, i)).setStoredMarks(d).setMeta(LX, f)), e.focus(), l || DX(e, i, -1), !0;
55701
+ return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, i)).setStoredMarks(d).setMeta(HX, f)), e.focus(), l || MX(e, i, -1), !0;
55680
55702
  }
55681
- let c = BX(e, i, t.clientX, r);
55703
+ let c = GX(e, i, t.clientX, r);
55682
55704
  if (!c) return !1;
55683
55705
  let l = c.boundaryPosition, u = e.state.doc.resolve(l), d = c.codeElement.getBoundingClientRect(), f = t.clientX >= d.right, p = (c.rightPlainTextNode?.marks ?? u.marks()).filter((e) => e.type !== r), m = f ? p : c.inlineCodeMark.addToSet(u.marks()), h = f ? {
55684
55706
  position: l,
55685
55707
  side: "right",
55686
55708
  placement: "outside"
55687
55709
  } : null;
55688
- return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, l)).setStoredMarks(m).setMeta(LX, h)), e.focus(), f || OX(e, l), !0;
55689
- }, HX = "inlineCode", UX = "zt-md-inline-code-boundary-indicator", WX = "zt-md-inline-code-boundary-indicator-widget", GX = "zt-md-inline-code-boundary-active", KX = {
55710
+ return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, l)).setStoredMarks(m).setMeta(HX, h)), e.focus(), f || NX(e, l), !0;
55711
+ }, qX = "inlineCode", JX = "zt-md-inline-code-boundary-indicator", YX = "zt-md-inline-code-boundary-indicator-widget", XX = "zt-md-inline-code-boundary-active", ZX = {
55690
55712
  left: -1,
55691
55713
  right: 1
55692
- }, qX = {
55714
+ }, QX = {
55693
55715
  left: 1,
55694
55716
  right: -1
55695
- }, JX = (e) => {
55717
+ }, $X = (e) => {
55696
55718
  let t = document.createElement("span");
55697
- return t.className = UX, t.dataset.side = e.side, t.dataset.placement = e.placement, t.contentEditable = "false", t.setAttribute("aria-hidden", "true"), t;
55698
- }, YX = (e, t) => {
55719
+ return t.className = JX, t.dataset.side = e.side, t.dataset.placement = e.placement, t.contentEditable = "false", t.setAttribute("aria-hidden", "true"), t;
55720
+ }, eZ = (e, t) => {
55699
55721
  if (t.placement === "outside") return [];
55700
- let n = e.schema.marks[HX], r = e.doc.resolve(t.position).nodeAfter, i = r && n ? n.isInSet(r.marks) : null;
55722
+ let n = e.schema.marks[qX], r = e.doc.resolve(t.position).nodeAfter, i = r && n ? n.isInSet(r.marks) : null;
55701
55723
  return i ? [i] : null;
55702
- }, XX = (e) => {
55703
- let t = LX.getState(e);
55724
+ }, tZ = (e) => {
55725
+ let t = HX.getState(e);
55704
55726
  if (!t) return wS.empty;
55705
- let n = YX(e, t);
55727
+ let n = eZ(e, t);
55706
55728
  if (!n) return wS.empty;
55707
- let r = t.placement === "inside" ? 1 : KX[t.side], i = JX(t), a = xS.widget(t.position, i, {
55729
+ let r = t.placement === "inside" ? 1 : ZX[t.side], i = $X(t), a = xS.widget(t.position, i, {
55708
55730
  side: r,
55709
55731
  marks: n,
55710
- key: `${WX}-${t.side}-${t.placement}`,
55732
+ key: `${YX}-${t.side}-${t.placement}`,
55711
55733
  ignoreSelection: !0,
55712
55734
  relaxedSide: !0
55713
55735
  });
55714
55736
  return wS.create(e.doc, [a]);
55715
- }, ZX = (e, t) => {
55737
+ }, nZ = (e, t) => {
55716
55738
  if (t?.placement !== "outside") return;
55717
- let n = e.dom.querySelector(`.${UX}[data-side='${t.side}'][data-placement='outside']`), r = qX[t.side], i = TX(e, t.position, r);
55739
+ let n = e.dom.querySelector(`.${JX}[data-side='${t.side}'][data-placement='outside']`), r = QX[t.side], i = AX(e, t.position, r);
55718
55740
  if (!n || !i) return;
55719
55741
  let a = n.getBoundingClientRect().left, o = i.getBoundingClientRect(), s = t.side === "left" ? o.left - 1 : o.right + 1, c = Math.round(s - a);
55720
55742
  n.style.setProperty("--zt-md-inline-code-boundary-offset-x", `${c}px`);
55721
- }, QX = "inlineCode", $X = (e, t) => {
55743
+ }, rZ = "inlineCode", iZ = (e, t) => {
55722
55744
  let { selection: n } = e.state;
55723
55745
  if (!n.empty) return !1;
55724
55746
  let r = n.$from.nodeBefore, i = n.$from.nodeAfter;
55725
- return !!(r && PX(r.marks, t) && (!i || !PX(i.marks, t)));
55726
- }, eZ = (e, t) => {
55747
+ return !!(r && zX(r.marks, t) && (!i || !zX(i.marks, t)));
55748
+ }, aZ = (e, t) => {
55727
55749
  let { selection: n } = e.state;
55728
55750
  if (!n.empty) return !1;
55729
55751
  let r = n.$from.nodeBefore, i = n.$from.nodeAfter;
55730
- return !!(i && PX(i.marks, t) && (!r || !PX(r.marks, t)));
55731
- }, tZ = (e, t, n) => {
55732
- let r = FX(e, t, n);
55752
+ return !!(i && zX(i.marks, t) && (!r || !zX(r.marks, t)));
55753
+ }, oZ = (e, t, n) => {
55754
+ let r = BX(e, t, n);
55733
55755
  if (!r) return !1;
55734
55756
  let i = e.state.storedMarks ?? e.state.doc.resolve(t).marks(), a = r.addToSet(i);
55735
- return e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, t)).setStoredMarks(a).setMeta(LX, {
55757
+ return e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, t)).setStoredMarks(a).setMeta(HX, {
55736
55758
  position: t,
55737
55759
  side: "left",
55738
55760
  placement: "inside"
55739
55761
  })), !0;
55740
- }, nZ = (e, t) => t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !e.editable, rZ = (e, t) => {
55762
+ }, sZ = (e, t) => t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !e.editable, cZ = (e, t) => {
55741
55763
  let { selection: n } = e.state;
55742
55764
  if (!n.empty) return null;
55743
55765
  let r = n.$from.nodeBefore;
55744
- return !r || !PX(r.marks, t) ? null : Array.from(r.textContent).length === 1 ? n.from - r.nodeSize : null;
55745
- }, iZ = (e, t, n) => {
55766
+ return !r || !zX(r.marks, t) ? null : Array.from(r.textContent).length === 1 ? n.from - r.nodeSize : null;
55767
+ }, lZ = (e, t, n) => {
55746
55768
  if (t.key !== "ArrowLeft") return !1;
55747
- let r = rZ(e, n);
55769
+ let r = cZ(e, n);
55748
55770
  if (r === null) return !1;
55749
55771
  let i = e.state.storedMarks ?? e.state.selection.$from.marks();
55750
- return PX(i, n) ? (t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(LX, {
55772
+ return zX(i, n) ? (t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(HX, {
55751
55773
  position: r,
55752
55774
  side: "left",
55753
55775
  placement: "inside"
55754
55776
  })), !0) : !1;
55755
- }, aZ = (e, t, n) => {
55756
- if (!eZ(e, n)) return !1;
55777
+ }, uZ = (e, t, n) => {
55778
+ if (!aZ(e, n)) return !1;
55757
55779
  let r = e.state.storedMarks ?? e.state.selection.$from.marks();
55758
- if (!PX(r, n)) return fZ(e), !1;
55780
+ if (!zX(r, n)) return _Z(e), !1;
55759
55781
  t.preventDefault();
55760
55782
  let i = r.filter((e) => e.type !== n);
55761
- return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(LX, {
55783
+ return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(HX, {
55762
55784
  position: e.state.selection.from,
55763
55785
  side: "left",
55764
55786
  placement: "outside"
55765
- })), DX(e, e.state.selection.from, -1), !0;
55766
- }, oZ = (e, t, n) => {
55767
- if (t.key !== "ArrowLeft" || !$X(e, n)) return !1;
55787
+ })), MX(e, e.state.selection.from, -1), !0;
55788
+ }, dZ = (e, t, n) => {
55789
+ if (t.key !== "ArrowLeft" || !iZ(e, n)) return !1;
55768
55790
  let r = e.state.storedMarks ?? e.state.selection.$from.marks();
55769
- return PX(r, n) ? !1 : (t.preventDefault(), e.dispatch(e.state.tr.setStoredMarks(r).setMeta(LX, {
55791
+ return zX(r, n) ? !1 : (t.preventDefault(), e.dispatch(e.state.tr.setStoredMarks(r).setMeta(HX, {
55770
55792
  position: e.state.selection.from,
55771
55793
  side: "right",
55772
55794
  placement: "outside"
55773
- })), DX(e, e.state.selection.from, 1), !0);
55774
- }, sZ = (e, t) => {
55795
+ })), MX(e, e.state.selection.from, 1), !0);
55796
+ }, fZ = (e, t) => {
55775
55797
  let { selection: n } = e.state;
55776
55798
  if (!n.empty) return null;
55777
55799
  let r = n.$from.nodeBefore;
55778
- if (!r?.isText || PX(r.marks, t) || Array.from(r.textContent).length !== 1) return null;
55800
+ if (!r?.isText || zX(r.marks, t) || Array.from(r.textContent).length !== 1) return null;
55779
55801
  let i = n.from - r.nodeSize;
55780
- return IX(e, i, t) ? i : null;
55781
- }, cZ = (e, t, n) => {
55802
+ return VX(e, i, t) ? i : null;
55803
+ }, pZ = (e, t, n) => {
55782
55804
  if (t.key !== "ArrowLeft") return !1;
55783
- let r = sZ(e, n);
55805
+ let r = fZ(e, n);
55784
55806
  if (r === null) return !1;
55785
55807
  let i = (e.state.selection.$from.nodeBefore?.marks ?? []).filter((e) => e.type !== n);
55786
- return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(LX, {
55808
+ return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(HX, {
55787
55809
  position: r,
55788
55810
  side: "right",
55789
55811
  placement: "outside"
55790
- })), DX(e, r, 1), !0;
55791
- }, lZ = (e, t, n) => cZ(e, t, n) || oZ(e, t, n) || iZ(e, t, n) || aZ(e, t, n), uZ = () => null, dZ = (e, t) => {
55792
- let n = e.getMeta(LX);
55812
+ })), MX(e, r, 1), !0;
55813
+ }, mZ = (e, t, n) => pZ(e, t, n) || dZ(e, t, n) || lZ(e, t, n) || uZ(e, t, n), hZ = () => null, gZ = (e, t) => {
55814
+ let n = e.getMeta(HX);
55793
55815
  return n === void 0 ? e.docChanged || e.selectionSet || e.storedMarksSet ? null : t : n;
55794
- }, fZ = (e) => {
55795
- LX.getState(e.state) != null && e.dispatch(e.state.tr.setMeta(LX, null));
55796
- }, pZ = (e) => (fZ(e), !1), mZ = class {
55816
+ }, _Z = (e) => {
55817
+ HX.getState(e.state) != null && e.dispatch(e.state.tr.setMeta(HX, null));
55818
+ }, vZ = (e) => (_Z(e), !1), yZ = class {
55797
55819
  constructor(e) {
55798
55820
  this.editorDom = e.dom, this.update(e);
55799
55821
  }
55800
55822
  update(e) {
55801
- let t = LX.getState(e.state), n = t != null;
55802
- this.editorDom.classList.toggle(GX, n), ZX(e, t);
55823
+ let t = HX.getState(e.state), n = t != null;
55824
+ this.editorDom.classList.toggle(XX, n), nZ(e, t);
55803
55825
  }
55804
55826
  destroy() {
55805
- this.editorDom.classList.remove(GX);
55827
+ this.editorDom.classList.remove(XX);
55806
55828
  }
55807
- }, hZ = (e) => new mZ(e), gZ = (e) => {
55829
+ }, bZ = (e) => new yZ(e), xZ = (e) => {
55808
55830
  if (!(e instanceof Element)) return !1;
55809
55831
  let t = e.closest("code");
55810
55832
  return !!(t && !t.closest("pre"));
55811
- }, _Z = (e, t, n) => {
55833
+ }, SZ = (e, t, n) => {
55812
55834
  if (!e.state.selection.empty) return !1;
55813
- if (VX(e, n)) return !0;
55814
- let r = gZ(n.target), i = e.state.schema.marks[QX];
55815
- if (i && r && tZ(e, t, i)) return n.preventDefault(), !0;
55816
- let a = LX.getState(e.state);
55835
+ if (KX(e, n)) return !0;
55836
+ let r = xZ(n.target), i = e.state.schema.marks[rZ];
55837
+ if (i && r && oZ(e, t, i)) return n.preventDefault(), !0;
55838
+ let a = HX.getState(e.state);
55817
55839
  if (!r || !a) return !1;
55818
- let o = e.state.storedMarks, s = e.state.tr.setMeta(LX, null);
55819
- return o !== null && i && !PX(o, i) && s.setStoredMarks(null), e.dispatch(s), !1;
55820
- }, vZ = (e, t, n) => t.key !== "ArrowRight" || !eZ(e, n) || PX(e.state.storedMarks ?? e.state.selection.$from.marks(), n) || !tZ(e, e.state.selection.from, n) ? !1 : (t.preventDefault(), !0), yZ = {
55821
- ArrowLeft: lZ,
55840
+ let o = e.state.storedMarks, s = e.state.tr.setMeta(HX, null);
55841
+ return o !== null && i && !zX(o, i) && s.setStoredMarks(null), e.dispatch(s), !1;
55842
+ }, CZ = (e, t, n) => t.key !== "ArrowRight" || !aZ(e, n) || zX(e.state.storedMarks ?? e.state.selection.$from.marks(), n) || !oZ(e, e.state.selection.from, n) ? !1 : (t.preventDefault(), !0), wZ = {
55843
+ ArrowLeft: mZ,
55822
55844
  ArrowRight: (e, t, n) => {
55823
55845
  if (t.key !== "ArrowRight") return !1;
55824
- if (vZ(e, t, n)) return !0;
55825
- if (!$X(e, n)) return !1;
55846
+ if (CZ(e, t, n)) return !0;
55847
+ if (!iZ(e, n)) return !1;
55826
55848
  let r = e.state.storedMarks ?? e.state.selection.$from.marks();
55827
- if (!PX(r, n)) return fZ(e), !1;
55849
+ if (!zX(r, n)) return _Z(e), !1;
55828
55850
  t.preventDefault();
55829
55851
  let i = r.filter((e) => e.type !== n);
55830
- return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(LX, {
55852
+ return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(HX, {
55831
55853
  position: e.state.selection.from,
55832
55854
  side: "right",
55833
55855
  placement: "outside"
55834
- })), DX(e, e.state.selection.from, 1), !0;
55856
+ })), MX(e, e.state.selection.from, 1), !0;
55835
55857
  }
55836
- }, bZ = (e, t) => {
55837
- if (nZ(e, t)) return !1;
55838
- let n = yZ[t.key];
55858
+ }, TZ = (e, t) => {
55859
+ if (sZ(e, t)) return !1;
55860
+ let n = wZ[t.key];
55839
55861
  if (!n) return !1;
55840
- let r = e.state.schema.marks[QX];
55862
+ let r = e.state.schema.marks[rZ];
55841
55863
  if (!r) return !1;
55842
- let i = LX.getState(e.state);
55843
- return i ? NX(e, t, r, i, LX) : n(e, t, r);
55844
- }, xZ = Pw(() => new Xu({
55845
- key: LX,
55846
- view: hZ,
55864
+ let i = HX.getState(e.state);
55865
+ return i ? RX(e, t, r, i, HX) : n(e, t, r);
55866
+ }, EZ = Pw(() => new Xu({
55867
+ key: HX,
55868
+ view: bZ,
55847
55869
  state: {
55848
- init: uZ,
55849
- apply: dZ
55870
+ init: hZ,
55871
+ apply: gZ
55850
55872
  },
55851
55873
  props: {
55852
- handleKeyDown: bZ,
55853
- handleClick: _Z,
55854
- decorations: XX,
55855
- handleDOMEvents: { blur: pZ }
55874
+ handleKeyDown: TZ,
55875
+ handleClick: SZ,
55876
+ decorations: tZ,
55877
+ handleDOMEvents: { blur: vZ }
55856
55878
  }
55857
- })), SZ = class {
55879
+ })), DZ = class {
55858
55880
  constructor(e) {
55859
- this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && !(this.regexp && !kZ(this.search)), this.wholeWord = !!e.wholeWord, this.filter = e.filter || null, this.impl = this.valid ? this.regexp ? new EZ(this) : new wZ(this) : CZ;
55881
+ this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && !(this.regexp && !PZ(this.search)), this.wholeWord = !!e.wholeWord, this.filter = e.filter || null, this.impl = this.valid ? this.regexp ? new jZ(this) : new kZ(this) : OZ;
55860
55882
  }
55861
55883
  eq(e) {
55862
55884
  return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
@@ -55878,13 +55900,13 @@ var dY = (e, t) => {
55878
55900
  }
55879
55901
  }
55880
55902
  checkResult(e, t) {
55881
- return (!this.wholeWord || NZ(e, t.from) && NZ(e, t.to)) && (!this.filter || this.filter(e, t));
55903
+ return (!this.wholeWord || RZ(e, t.from) && RZ(e, t.to)) && (!this.filter || this.filter(e, t));
55882
55904
  }
55883
55905
  unquote(e) {
55884
55906
  return this.literal ? e : e.replace(/\\([nrt\\])/g, (e, t) => t == "n" ? "\n" : t == "r" ? "\r" : t == "t" ? " " : "\\");
55885
55907
  }
55886
55908
  getReplacements(e, t) {
55887
- let n = e.doc.resolve(t.from).marksAcross(e.doc.resolve(t.to)), r = [], i = j.empty, a = t.from, { match: o } = t, s = o ? DZ(o) : [[0, t.to - t.from]], c = OZ(this.unquote(this.replace)), l;
55909
+ let n = e.doc.resolve(t.from).marksAcross(e.doc.resolve(t.to)), r = [], i = j.empty, a = t.from, { match: o } = t, s = o ? MZ(o) : [[0, t.to - t.from]], c = NZ(this.unquote(this.replace)), l;
55888
55910
  for (let o of c) if (typeof o == "string") i = i.addToEnd(e.schema.text(o, n));
55889
55911
  else if (l = s[o.group]) {
55890
55912
  let n = t.matchStart + l[0], s = t.matchStart + l[1];
@@ -55900,22 +55922,22 @@ var dY = (e, t) => {
55900
55922
  insert: new M(i, 0, 0)
55901
55923
  }), r;
55902
55924
  }
55903
- }, CZ = new class {
55925
+ }, OZ = new class {
55904
55926
  findNext() {
55905
55927
  return null;
55906
55928
  }
55907
55929
  findPrev() {
55908
55930
  return null;
55909
55931
  }
55910
- }(), wZ = class {
55932
+ }(), kZ = class {
55911
55933
  constructor(e) {
55912
55934
  this.query = e;
55913
55935
  let t = e.unquote(e.search);
55914
55936
  e.caseSensitive || (t = t.toLowerCase()), this.string = t;
55915
55937
  }
55916
55938
  findNext(e, t, n) {
55917
- return MZ(e.doc, t, n, (e, r) => {
55918
- let i = Math.max(t, r), a = jZ(e).slice(i - r, Math.min(e.content.size, n - r)), o = (this.query.caseSensitive ? a : a.toLowerCase()).indexOf(this.string);
55939
+ return LZ(e.doc, t, n, (e, r) => {
55940
+ let i = Math.max(t, r), a = IZ(e).slice(i - r, Math.min(e.content.size, n - r)), o = (this.query.caseSensitive ? a : a.toLowerCase()).indexOf(this.string);
55919
55941
  return o < 0 ? null : {
55920
55942
  from: i + o,
55921
55943
  to: i + o + this.string.length,
@@ -55925,8 +55947,8 @@ var dY = (e, t) => {
55925
55947
  });
55926
55948
  }
55927
55949
  findPrev(e, t, n) {
55928
- return MZ(e.doc, t, n, (e, r) => {
55929
- let i = Math.max(r, n), a = jZ(e).slice(i - r, Math.min(e.content.size, t - r));
55950
+ return LZ(e.doc, t, n, (e, r) => {
55951
+ let i = Math.max(r, n), a = IZ(e).slice(i - r, Math.min(e.content.size, t - r));
55930
55952
  this.query.caseSensitive || (a = a.toLowerCase());
55931
55953
  let o = a.lastIndexOf(this.string);
55932
55954
  return o < 0 ? null : {
@@ -55937,13 +55959,13 @@ var dY = (e, t) => {
55937
55959
  };
55938
55960
  });
55939
55961
  }
55940
- }, TZ = "g" + (/x/.unicode == null ? "" : "u") + (/x/.hasIndices == null ? "" : "d"), EZ = class {
55962
+ }, AZ = "g" + (/x/.unicode == null ? "" : "u") + (/x/.hasIndices == null ? "" : "d"), jZ = class {
55941
55963
  constructor(e) {
55942
- this.query = e, this.regexp = new RegExp(e.search, TZ + (e.caseSensitive ? "" : "i"));
55964
+ this.query = e, this.regexp = new RegExp(e.search, AZ + (e.caseSensitive ? "" : "i"));
55943
55965
  }
55944
55966
  findNext(e, t, n) {
55945
- return MZ(e.doc, t, n, (e, r) => {
55946
- let i = jZ(e).slice(0, Math.min(e.content.size, n - r));
55967
+ return LZ(e.doc, t, n, (e, r) => {
55968
+ let i = IZ(e).slice(0, Math.min(e.content.size, n - r));
55947
55969
  this.regexp.lastIndex = t - r;
55948
55970
  let a = this.regexp.exec(i);
55949
55971
  return a ? {
@@ -55955,8 +55977,8 @@ var dY = (e, t) => {
55955
55977
  });
55956
55978
  }
55957
55979
  findPrev(e, t, n) {
55958
- return MZ(e.doc, t, n, (e, n) => {
55959
- let r = jZ(e).slice(0, Math.min(e.content.size, t - n)), i;
55980
+ return LZ(e.doc, t, n, (e, n) => {
55981
+ let r = IZ(e).slice(0, Math.min(e.content.size, t - n)), i;
55960
55982
  for (let e = 0;;) {
55961
55983
  this.regexp.lastIndex = e;
55962
55984
  let t = this.regexp.exec(r);
@@ -55972,7 +55994,7 @@ var dY = (e, t) => {
55972
55994
  });
55973
55995
  }
55974
55996
  };
55975
- function DZ(e) {
55997
+ function MZ(e) {
55976
55998
  if (e.indices) return e.indices;
55977
55999
  let t = [[0, e[0].length]];
55978
56000
  for (let n = 1, r = 0; n < e.length; n++) {
@@ -55981,7 +56003,7 @@ function DZ(e) {
55981
56003
  }
55982
56004
  return t;
55983
56005
  }
55984
- function OZ(e) {
56006
+ function NZ(e) {
55985
56007
  let t = [], n = -1;
55986
56008
  function r(e) {
55987
56009
  let n = t.length - 1;
@@ -56004,52 +56026,52 @@ function OZ(e) {
56004
56026
  }
56005
56027
  return t;
56006
56028
  }
56007
- function kZ(e) {
56029
+ function PZ(e) {
56008
56030
  try {
56009
- return new RegExp(e, TZ), !0;
56031
+ return new RegExp(e, AZ), !0;
56010
56032
  } catch {
56011
56033
  return !1;
56012
56034
  }
56013
56035
  }
56014
- var AZ = /* @__PURE__ */ new WeakMap();
56015
- function jZ(e) {
56016
- let t = AZ.get(e);
56036
+ var FZ = /* @__PURE__ */ new WeakMap();
56037
+ function IZ(e) {
56038
+ let t = FZ.get(e);
56017
56039
  if (t) return t;
56018
56040
  let n = "";
56019
56041
  for (let t = 0; t < e.childCount; t++) {
56020
56042
  let r = e.child(t);
56021
- r.isText ? n += r.text : r.isLeaf ? n += "" : n += " " + jZ(r) + " ";
56043
+ r.isText ? n += r.text : r.isLeaf ? n += "" : n += " " + IZ(r) + " ";
56022
56044
  }
56023
- return AZ.set(e, n), n;
56045
+ return FZ.set(e, n), n;
56024
56046
  }
56025
- function MZ(e, t, n, r, i = 0) {
56047
+ function LZ(e, t, n, r, i = 0) {
56026
56048
  if (e.inlineContent) return r(e, i);
56027
56049
  if (!e.isLeaf) if (t > n) for (let a = e.childCount - 1, o = i + e.content.size; a >= 0 && o > n; a--) {
56028
56050
  let i = e.child(a);
56029
56051
  if (o -= i.nodeSize, o < t) {
56030
- let e = MZ(i, t, n, r, o + 1);
56052
+ let e = LZ(i, t, n, r, o + 1);
56031
56053
  if (e != null) return e;
56032
56054
  }
56033
56055
  }
56034
56056
  else for (let a = 0, o = i; a < e.childCount && o < n; a++) {
56035
56057
  let i = e.child(a), s = o;
56036
56058
  if (o += i.nodeSize, o > t) {
56037
- let e = MZ(i, t, n, r, s + 1);
56059
+ let e = LZ(i, t, n, r, s + 1);
56038
56060
  if (e != null) return e;
56039
56061
  }
56040
56062
  }
56041
56063
  return null;
56042
56064
  }
56043
- function NZ(e, t) {
56065
+ function RZ(e, t) {
56044
56066
  let n = e.doc.resolve(t), r = n.nodeBefore, i = n.nodeAfter;
56045
56067
  return !r || !i || !r.isText || !i.isText ? !0 : !/\p{L}$/u.test(r.text) || !/^\p{L}/u.test(i.text);
56046
56068
  }
56047
- var PZ = class {
56069
+ var zZ = class {
56048
56070
  constructor(e, t, n) {
56049
56071
  this.query = e, this.range = t, this.deco = n;
56050
56072
  }
56051
56073
  };
56052
- function FZ(e, t, n) {
56074
+ function BZ(e, t, n) {
56053
56075
  if (!t.valid) return wS.empty;
56054
56076
  let r = [], i = e.selection;
56055
56077
  for (let a = n ? n.from : 0, o = n ? n.to : e.doc.content.size;;) {
@@ -56060,18 +56082,18 @@ function FZ(e, t, n) {
56060
56082
  }
56061
56083
  return wS.create(e.doc, r);
56062
56084
  }
56063
- var IZ = new $u("search");
56064
- function LZ(e = {}) {
56085
+ var VZ = new $u("search");
56086
+ function HZ(e = {}) {
56065
56087
  return new Xu({
56066
- key: IZ,
56088
+ key: VZ,
56067
56089
  state: {
56068
56090
  init(t, n) {
56069
- let r = e.initialQuery || new SZ({ search: "" }), i = e.initialRange || null;
56070
- return new PZ(r, i, FZ(n, r, i));
56091
+ let r = e.initialQuery || new DZ({ search: "" }), i = e.initialRange || null;
56092
+ return new zZ(r, i, BZ(n, r, i));
56071
56093
  },
56072
56094
  apply(e, t, n, r) {
56073
- let i = e.getMeta(IZ);
56074
- if (i) return new PZ(i.query, i.range, FZ(r, i.query, i.range));
56095
+ let i = e.getMeta(VZ);
56096
+ if (i) return new zZ(i.query, i.range, BZ(r, i.query, i.range));
56075
56097
  if (e.docChanged || e.selectionSet) {
56076
56098
  let n = t.range;
56077
56099
  if (n) {
@@ -56081,53 +56103,53 @@ function LZ(e = {}) {
56081
56103
  to: r
56082
56104
  } : null;
56083
56105
  }
56084
- t = new PZ(t.query, n, FZ(r, t.query, n));
56106
+ t = new zZ(t.query, n, BZ(r, t.query, n));
56085
56107
  }
56086
56108
  return t;
56087
56109
  }
56088
56110
  },
56089
- props: { decorations: (e) => IZ.getState(e).deco }
56111
+ props: { decorations: (e) => VZ.getState(e).deco }
56090
56112
  });
56091
56113
  }
56092
- function RZ(e) {
56093
- return IZ.getState(e);
56114
+ function UZ(e) {
56115
+ return VZ.getState(e);
56094
56116
  }
56095
- function zZ(e, t, n = null) {
56096
- return e.setMeta(IZ, {
56117
+ function WZ(e, t, n = null) {
56118
+ return e.setMeta(VZ, {
56097
56119
  query: t,
56098
56120
  range: n
56099
56121
  });
56100
56122
  }
56101
- function BZ(e, t, n, r, i) {
56123
+ function GZ(e, t, n, r, i) {
56102
56124
  let a = e.range || {
56103
56125
  from: 0,
56104
56126
  to: t.doc.content.size
56105
56127
  }, o = e.query.findNext(t, Math.max(i, a.from), a.to);
56106
56128
  return !o && n && (o = e.query.findNext(t, a.from, Math.min(r, a.to))), o;
56107
56129
  }
56108
- function VZ(e, t, n, r, i) {
56130
+ function KZ(e, t, n, r, i) {
56109
56131
  let a = e.range || {
56110
56132
  from: 0,
56111
56133
  to: t.doc.content.size
56112
56134
  }, o = e.query.findPrev(t, Math.min(r, a.to), a.from);
56113
56135
  return !o && n && (o = e.query.findPrev(t, a.to, Math.max(i, a.from))), o;
56114
56136
  }
56115
- function HZ(e, t) {
56137
+ function qZ(e, t) {
56116
56138
  return (n, r) => {
56117
- let i = IZ.getState(n);
56139
+ let i = VZ.getState(n);
56118
56140
  if (!i || !i.query.valid) return !1;
56119
- let { from: a, to: o } = n.selection, s = t > 0 ? BZ(i, n, e, a, o) : VZ(i, n, e, a, o);
56141
+ let { from: a, to: o } = n.selection, s = t > 0 ? GZ(i, n, e, a, o) : KZ(i, n, e, a, o);
56120
56142
  if (!s) return !1;
56121
56143
  let c = N.create(n.doc, s.from, s.to);
56122
56144
  return r && r(n.tr.setSelection(c).scrollIntoView()), !0;
56123
56145
  };
56124
56146
  }
56125
- var UZ = HZ(!0, 1), WZ = HZ(!0, -1);
56126
- function GZ(e, t) {
56147
+ var JZ = qZ(!0, 1), YZ = qZ(!0, -1);
56148
+ function XZ(e, t) {
56127
56149
  return (n, r) => {
56128
- let i = IZ.getState(n);
56150
+ let i = VZ.getState(n);
56129
56151
  if (!i || !i.query.valid) return !1;
56130
- let { from: a } = n.selection, o = BZ(i, n, e, a, a);
56152
+ let { from: a } = n.selection, o = GZ(i, n, e, a, a);
56131
56153
  if (!o) return !1;
56132
56154
  if (!r) return !0;
56133
56155
  if (n.selection.from == o.from && n.selection.to == o.to) {
@@ -56136,15 +56158,15 @@ function GZ(e, t) {
56136
56158
  let { from: t, to: n, insert: r } = s[e];
56137
56159
  a.replace(t, n, r);
56138
56160
  }
56139
- let c = t && BZ(i, n, e, o.from, o.to);
56161
+ let c = t && GZ(i, n, e, o.from, o.to);
56140
56162
  c ? a.setSelection(N.create(a.doc, a.mapping.map(c.from, 1), a.mapping.map(c.to, -1))) : a.setSelection(N.create(a.doc, o.from, a.mapping.map(o.to, 1))), r(a.scrollIntoView());
56141
56163
  } else if (t) r(n.tr.setSelection(N.create(n.doc, o.from, o.to)).scrollIntoView());
56142
56164
  else return !1;
56143
56165
  return !0;
56144
56166
  };
56145
56167
  }
56146
- var KZ = GZ(!0, !0), qZ = (e, t) => {
56147
- let n = IZ.getState(e);
56168
+ var ZZ = XZ(!0, !0), QZ = (e, t) => {
56169
+ let n = VZ.getState(e);
56148
56170
  if (!n) return !1;
56149
56171
  let r = [], i = n.range || {
56150
56172
  from: 0,
@@ -56167,18 +56189,18 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56167
56189
  t(i);
56168
56190
  }
56169
56191
  return !0;
56170
- }, JZ = ".zt-md-code-block-action-button[data-active='true']", YZ = ".zt-md-search-panel", XZ = 8, ZZ = {
56192
+ }, $Z = ".zt-md-code-block-action-button[data-active='true']", eQ = ".zt-md-search-panel", tQ = 8, nQ = {
56171
56193
  current: 0,
56172
56194
  total: 0,
56173
56195
  isInvalidExpression: !1
56174
- }, QZ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, $Z = (e) => new SZ({
56196
+ }, rQ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, iQ = (e) => new DZ({
56175
56197
  search: e.search,
56176
56198
  replace: e.replace,
56177
56199
  caseSensitive: e.caseSensitive,
56178
56200
  wholeWord: e.wholeWord,
56179
56201
  regexp: e.regexp,
56180
56202
  literal: !0
56181
- }), eQ = (e, t) => {
56203
+ }), aQ = (e, t) => {
56182
56204
  if (!t.valid) return [];
56183
56205
  let n = [], r = 0, i = e.doc.content.size;
56184
56206
  for (; r < i;) {
@@ -56187,133 +56209,134 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56187
56209
  n.push(a), r = Math.max(a.to, r + 1);
56188
56210
  }
56189
56211
  return n;
56190
- }, tQ = (e) => {
56191
- let t = RZ(e);
56192
- if (!t) return ZZ;
56193
- let n = t.query, r = n.regexp && n.search.length > 0 && !n.valid, i = eQ(e, n), a = i.findIndex((t) => t.from === e.selection.from && t.to === e.selection.to);
56212
+ }, oQ = (e) => {
56213
+ let t = UZ(e);
56214
+ if (!t) return nQ;
56215
+ let n = t.query, r = n.regexp && n.search.length > 0 && !n.valid, i = aQ(e, n), a = i.findIndex((t) => t.from === e.selection.from && t.to === e.selection.to);
56194
56216
  return {
56195
56217
  current: a < 0 ? 0 : a + 1,
56196
56218
  total: i.length,
56197
56219
  isInvalidExpression: r
56198
56220
  };
56199
- }, nQ = (e, t) => e.current === t.current && e.total === t.total && e.isInvalidExpression === t.isInvalidExpression, rQ = (e) => {
56221
+ }, sQ = (e, t) => e.current === t.current && e.total === t.total && e.isInvalidExpression === t.isInvalidExpression, cQ = (e) => {
56200
56222
  if (e.state.selection.empty) return;
56201
- let t = hq(e.dom);
56223
+ let t = bq(e.dom);
56202
56224
  if (!t) return;
56203
- let n = e.coordsAtPos(e.state.selection.from), r = e.coordsAtPos(e.state.selection.to), i = Math.min(n.top, r.top), a = Math.max(n.bottom, r.bottom), o = t.getBoundingClientRect(), s = (t.closest(".zt-md")?.querySelector(YZ))?.getBoundingClientRect(), c = Math.max(o.top + XZ, (s?.bottom ?? o.top) + XZ), l = o.bottom - XZ;
56225
+ let n = e.coordsAtPos(e.state.selection.from), r = e.coordsAtPos(e.state.selection.to), i = Math.min(n.top, r.top), a = Math.max(n.bottom, r.bottom), o = t.getBoundingClientRect(), s = (t.closest(".zt-md")?.querySelector(eQ))?.getBoundingClientRect(), c = Math.max(o.top + tQ, (s?.bottom ?? o.top) + tQ), l = o.bottom - tQ;
56204
56226
  if (i < c) {
56205
56227
  t.scrollTop += i - c;
56206
56228
  return;
56207
56229
  }
56208
56230
  a > l && (t.scrollTop += a - l);
56209
- }, iQ = (e) => {
56231
+ }, lQ = (e) => {
56210
56232
  if (e.state.selection.empty) return;
56211
56233
  let t = e.domAtPos(e.state.selection.from), n = (t.node instanceof Element ? t.node : t.node.parentElement)?.closest(".zt-md-code-block");
56212
56234
  if (n?.dataset.viewMode !== "preview") {
56213
- rQ(e);
56235
+ cQ(e);
56214
56236
  return;
56215
56237
  }
56216
- n.querySelector(JZ)?.click(), window.requestAnimationFrame(() => {
56217
- rQ(e);
56238
+ n.querySelector($Z)?.click(), window.requestAnimationFrame(() => {
56239
+ cQ(e);
56218
56240
  });
56219
- }, aQ = class {
56241
+ }, uQ = class {
56220
56242
  constructor(e, t) {
56221
- this.onSnapshotChange = t, this.snapshot = ZZ, this.emitSnapshot(e.state);
56243
+ this.onSnapshotChange = t, this.snapshot = nQ, this.emitSnapshot(e.state);
56222
56244
  }
56223
56245
  update(e) {
56224
56246
  this.emitSnapshot(e.state);
56225
56247
  }
56226
56248
  destroy() {
56227
- this.onSnapshotChange(ZZ);
56249
+ this.onSnapshotChange(nQ);
56228
56250
  }
56229
56251
  emitSnapshot(e) {
56230
- let t = tQ(e);
56231
- nQ(this.snapshot, t) || (this.snapshot = t, this.onSnapshotChange(t));
56252
+ let t = oQ(e);
56253
+ sQ(this.snapshot, t) || (this.snapshot = t, this.onSnapshotChange(t));
56232
56254
  }
56233
- }, oQ = (e) => [Pw(() => LZ()), Pw(() => new Xu({ view: (t) => new aQ(t, e) }))], sQ = (e) => {
56255
+ }, dQ = (e) => [Pw(() => HZ()), Pw(() => new Xu({ view: (t) => new uQ(t, e) }))], fQ = (e) => {
56234
56256
  let t = (t) => {
56235
56257
  e((e) => {
56236
- let n = $Z(t), r = zZ(e.state.tr, n);
56258
+ let n = iQ(t), r = WZ(e.state.tr, n);
56237
56259
  if (n.valid) {
56238
56260
  let t = n.findNext(e.state, e.state.selection.from) ?? n.findNext(e.state, 0, e.state.selection.from);
56239
56261
  t && r.setSelection(N.create(r.doc, t.from, t.to)).scrollIntoView();
56240
56262
  }
56241
- e.dispatch(r), iQ(e);
56263
+ e.dispatch(r), lQ(e);
56242
56264
  });
56243
56265
  }, n = (e, t) => {
56244
56266
  e(t.state, (e) => {
56245
56267
  t.dispatch(e.scrollIntoView());
56246
- }) && iQ(t);
56268
+ }) && lQ(t);
56247
56269
  };
56248
56270
  return {
56249
56271
  updateQuery: t,
56250
56272
  findPrevious: () => {
56251
56273
  e((e) => {
56252
- n(WZ, e);
56274
+ n(YZ, e);
56253
56275
  });
56254
56276
  },
56255
56277
  findNext: () => {
56256
56278
  e((e) => {
56257
- n(UZ, e);
56279
+ n(JZ, e);
56258
56280
  });
56259
56281
  },
56260
56282
  replaceCurrent: () => {
56261
56283
  e((e) => {
56262
- QZ(e) && n(KZ, e);
56284
+ rQ(e) && n(ZZ, e);
56263
56285
  });
56264
56286
  },
56265
56287
  replaceAll: () => {
56266
56288
  e((e) => {
56267
- if (!QZ(e)) return;
56268
- let t = RZ(e.state);
56269
- !t || eQ(e.state, t.query).length === 0 || qZ(e.state, (t) => {
56289
+ if (!rQ(e)) return;
56290
+ let t = UZ(e.state);
56291
+ !t || aQ(e.state, t.query).length === 0 || QZ(e.state, (t) => {
56270
56292
  e.dispatch(t);
56271
56293
  });
56272
56294
  });
56273
56295
  },
56274
56296
  clear: () => {
56275
56297
  e((e) => {
56276
- let t = new SZ({
56298
+ let t = new DZ({
56277
56299
  search: "",
56278
56300
  literal: !0
56279
56301
  });
56280
- e.dispatch(zZ(e.state.tr, t));
56302
+ e.dispatch(WZ(e.state.tr, t));
56281
56303
  });
56282
56304
  },
56283
56305
  focusCurrent: () => {
56284
56306
  e((e) => {
56285
- e.dispatch(e.state.tr.scrollIntoView()), rQ(e), e.focus();
56307
+ e.dispatch(e.state.tr.scrollIntoView()), cQ(e), e.focus();
56286
56308
  });
56287
56309
  }
56288
56310
  };
56289
- }, cQ = (e) => {
56311
+ }, pQ = (e) => {
56290
56312
  let t = e.target;
56291
56313
  if (!(t instanceof Element)) return null;
56292
56314
  let n = t.closest("a[href]");
56293
56315
  return n instanceof HTMLAnchorElement ? n : null;
56294
- }, lQ = (e) => e?.type.name === "image", uQ = (e, t) => {
56295
- let n = cQ(e);
56316
+ }, mQ = (e) => e?.type.name === "image", hQ = (e, t) => {
56317
+ let n = pQ(e);
56296
56318
  if (!n) return !1;
56297
56319
  let r = AF(n.getAttribute("href"));
56298
56320
  return !r || t || !e.ctrlKey ? !1 : (e.preventDefault(), e.stopPropagation(), window.open(r, "_blank", "noopener,noreferrer"), !0);
56299
- }, dQ = (e, t) => !t || !cQ(e) ? !1 : (e.preventDefault(), e.stopPropagation(), !0), fQ = (e) => {
56300
- let t = e.messages ?? SF(), n = aX(e.contentPortalContainer, t), r = zJ(e.contentPortalContainer, t, e.shortcutMode), i = Bq(t, e.contentPortalContainer), a = kU(t, e.contentPortalContainer), o = II(e.imageUpload, t), s = oQ(e.onSearchSnapshotChange), c = pY(e.portalContainer, e.slashMenu, t, e.imageUpload, e.locale, e.shortcutMode), l = c.plugins, u = vY(e.portalContainer, t, e.shortcutMode, e.imageUpload), d = {
56321
+ }, gQ = (e, t) => !t || !pQ(e) ? !1 : (e.preventDefault(), e.stopPropagation(), !0), _Q = (e) => {
56322
+ let t = e.messages ?? SF(), n = uX(e.contentPortalContainer, t), r = GJ(e.contentPortalContainer, t, e.shortcutMode), i = Gq(t, e.contentPortalContainer), a = kU(t, e.contentPortalContainer), o = II(e.imageUpload, t), s = dQ(e.onSearchSnapshotChange), c = yY(e.portalContainer, e.slashMenu, t, e.imageUpload, e.locale, e.shortcutMode), l = c.plugins, u = CY(e.portalContainer, t, e.shortcutMode, e.imageUpload), d = {
56301
56323
  listener: mE,
56302
56324
  commonmark: yO,
56303
- taskListTransformKeymap: yJ(e.shortcutMode),
56304
- inlineCodeBoundaryNavigation: xZ,
56325
+ taskListTransformKeymap: TJ(e.shortcutMode),
56326
+ inlineCodeBoundaryNavigation: EZ,
56305
56327
  gfm: IN,
56306
56328
  history: wT,
56307
56329
  editorSearch: s,
56308
- codeBlockPrism: $q,
56330
+ codeBlockPrism: iJ,
56309
56331
  codeBlockLanguagePicker: i,
56310
56332
  clipboard: qw,
56311
56333
  indent: OT,
56312
56334
  imageDeleteSelection: pI,
56313
56335
  imagePaste: o,
56314
- tableArrowEntry: EY,
56336
+ tableArrowEntry: jY,
56315
56337
  blockBoundaryNavigation: vP,
56316
56338
  headingBackspaceEmptyParagraph: PW,
56339
+ headingFocusIndicator: zW,
56317
56340
  mathBackspaceEntry: tL,
56318
56341
  blockquoteBackspaceLift: EW,
56319
56342
  tableFocusActions: n,
@@ -56323,21 +56346,21 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56323
56346
  math: yW,
56324
56347
  mathInlineEdit: a,
56325
56348
  mathInlineArrowNavigation: ZU,
56326
- taskListToggle: pX,
56327
- tabSpaceIndent: CX,
56328
- codeBlockModASelect: qq,
56349
+ taskListToggle: vX,
56350
+ tabSpaceIndent: OX,
56351
+ codeBlockModASelect: Qq,
56329
56352
  slash: l.length > 0 ? l : null
56330
56353
  }, f = zN(d, { includeRuntime: !1 }), p = zN(d, { includeRuntime: !0 }).filter((e) => e.name === "clipboard" || e.name === "indent"), m = Ew.make();
56331
56354
  m.config((n) => {
56332
- vJ(n, e.shortcutMode), BW(n), UF(n, e.imageUpload?.allowedProtocols), n.set(vw, e.root), n.set(iw, e.markdown), n.set(_w, {
56355
+ wJ(n, e.shortcutMode), GW(n), UF(n, e.imageUpload?.allowedProtocols), n.set(vw, e.root), n.set(iw, e.markdown), n.set(_w, {
56333
56356
  editable: () => !e.readOnly,
56334
56357
  handleKeyDown: u,
56335
56358
  handleDOMEvents: {
56336
- mousedown: (t, n) => n instanceof MouseEvent ? dQ(n, e.readOnly) : !1,
56337
- click: (t, n) => n instanceof MouseEvent ? dQ(n, e.readOnly) : !1
56359
+ mousedown: (t, n) => n instanceof MouseEvent ? gQ(n, e.readOnly) : !1,
56360
+ click: (t, n) => n instanceof MouseEvent ? gQ(n, e.readOnly) : !1
56338
56361
  },
56339
- handleClick: (t, n, r) => uQ(r, e.readOnly),
56340
- handleClickOn: (t, n, r, i, a, o) => uQ(a, e.readOnly) ? !0 : e.readOnly && o && lQ(r) ? (a.preventDefault(), !0) : !1
56362
+ handleClick: (t, n, r) => hQ(r, e.readOnly),
56363
+ handleClickOn: (t, n, r, i, a, o) => hQ(a, e.readOnly) ? !0 : e.readOnly && o && mQ(r) ? (a.preventDefault(), !0) : !1
56341
56364
  });
56342
56365
  let r = n.get(xC) ?? [];
56343
56366
  n.set(xC, [
@@ -56345,14 +56368,14 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56345
56368
  ["image", eI(t)],
56346
56369
  ["math_block", xU(t)],
56347
56370
  ["math_inline", FU(t)],
56348
- ["code_block", rG(t)]
56371
+ ["code_block", cG(t)]
56349
56372
  ]), n.get(fE).markdownUpdated((t, n) => {
56350
56373
  e.onChange(n);
56351
56374
  }), c.config && c.config(n);
56352
56375
  }), f.forEach((e) => {
56353
56376
  m.use(e.plugin);
56354
56377
  });
56355
- let h = sQ((e) => {
56378
+ let h = fQ((e) => {
56356
56379
  m.action((t) => {
56357
56380
  e(t.get(mC));
56358
56381
  });
@@ -56393,7 +56416,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56393
56416
  _(e);
56394
56417
  }
56395
56418
  };
56396
- }, pQ = (e, t, n, r) => {
56419
+ }, vQ = (e, t, n, r) => {
56397
56420
  let i = e, a = i.create.bind(e);
56398
56421
  return i.create = async () => {
56399
56422
  try {
@@ -56403,10 +56426,10 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56403
56426
  throw console.error("Milkdown init failed:", e), r(e), e;
56404
56427
  }
56405
56428
  }, i;
56406
- }, mQ = (e) => {
56429
+ }, yQ = (e) => {
56407
56430
  let t = d(null), n = d(e.markdown), r = d(e.onMarkdownChange), i = d(e.onInitError), a = d(e.onInitReady), o = d(e.onSearchSnapshotChange), s = d(null), l = ce((r) => {
56408
56431
  t.current = null, e.focusEditorRef && (e.focusEditorRef.current = null), e.searchControllerRef && (e.searchControllerRef.current = null), n.current = e.markdown;
56409
- let c = fQ({
56432
+ let c = _Q({
56410
56433
  root: r,
56411
56434
  portalContainer: e.portalContainer,
56412
56435
  contentPortalContainer: e.contentPortalContainer,
@@ -56424,7 +56447,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56424
56447
  o.current?.(e);
56425
56448
  }
56426
56449
  });
56427
- return pQ(c.editor, c.installRuntimePlugins, () => {
56450
+ return vQ(c.editor, c.installRuntimePlugins, () => {
56428
56451
  t.current = c, e.focusEditorRef && (e.focusEditorRef.current = c.focusEditor), e.searchControllerRef && (e.searchControllerRef.current = c.searchController), a.current?.();
56429
56452
  }, (e) => {
56430
56453
  i.current?.(e);
@@ -56464,20 +56487,20 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56464
56487
  let r = t.current;
56465
56488
  !r || l.loading || e.markdown !== n.current && (n.current = e.markdown, r.setMarkdown(e.markdown));
56466
56489
  }, [l.loading, e.markdown]);
56467
- }, hQ = 160, gQ = {
56490
+ }, bQ = 160, xQ = {
56468
56491
  search: "",
56469
56492
  replace: "",
56470
56493
  caseSensitive: !1,
56471
56494
  wholeWord: !1,
56472
56495
  regexp: !1
56473
- }, _Q = {
56496
+ }, SQ = {
56474
56497
  current: 0,
56475
56498
  total: 0,
56476
56499
  isInvalidExpression: !1
56477
- }, vQ = {
56500
+ }, CQ = {
56478
56501
  "zh-CN": "只读",
56479
56502
  "en-US": "Read only"
56480
- }, yQ = (e) => e.length === 0 ? "\"\"" : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\r\n|\r|\n/g, "\\A ")}"`, bQ = (e) => (mQ({
56503
+ }, wQ = (e) => e.length === 0 ? "\"\"" : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\r\n|\r|\n/g, "\\A ")}"`, TQ = (e) => (yQ({
56481
56504
  markdown: e.markdown,
56482
56505
  portalContainer: e.portalContainer,
56483
56506
  contentPortalContainer: e.contentPortalContainer,
@@ -56494,13 +56517,13 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56494
56517
  onInitReady: e.onInitReady,
56495
56518
  onInitError: e.onInitError,
56496
56519
  onSearchSnapshotChange: e.onSearchSnapshotChange
56497
- }), /* @__PURE__ */ _(oe, {})), xQ = (e) => {
56498
- let [t, n] = f(""), [r, i] = f(null), [a, s] = f(null), [c, l] = f(!1), [p, m] = f(!1), [h, g] = f(gQ), [y, b] = f(_Q), x = d(null), S = d(null), C = d(null), w = e.theme ?? "light", T = e.readOnly ?? !1, E = vQ[e.locale ?? "zh-CN"], ee = e.debounceMs ?? hQ, te = e.shortcutMode ?? "modShift", { markdown: ne, setMarkdown: re } = qs(e.value, e.defaultValue, e.onChange), ie = u(() => SF(e.locale, e.messages, e.placeholder), [
56520
+ }), /* @__PURE__ */ _(oe, {})), EQ = (e) => {
56521
+ let [t, n] = f(""), [r, i] = f(null), [a, s] = f(null), [c, l] = f(!1), [p, m] = f(!1), [h, g] = f(xQ), [y, b] = f(SQ), x = d(null), S = d(null), C = d(null), w = e.theme ?? "light", T = e.readOnly ?? !1, E = CQ[e.locale ?? "zh-CN"], ee = e.debounceMs ?? bQ, te = e.shortcutMode ?? "modShift", { markdown: ne, setMarkdown: re } = qs(e.value, e.defaultValue, e.onChange), ie = u(() => SF(e.locale, e.messages, e.placeholder), [
56499
56522
  e.locale,
56500
56523
  e.messages,
56501
56524
  e.placeholder
56502
56525
  ]), ae = {
56503
- "--zt-gap-placeholder-content": yQ(ie.placeholder),
56526
+ "--zt-gap-placeholder-content": wQ(ie.placeholder),
56504
56527
  ...e.maxHeight === void 0 ? {} : {
56505
56528
  maxHeight: e.maxHeight,
56506
56529
  overflowY: "auto"
@@ -56530,7 +56553,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56530
56553
  l(!0), S.current?.updateQuery(h), requestAnimationFrame(pe);
56531
56554
  }, he = () => {
56532
56555
  let e = S.current;
56533
- e?.clear(), b(_Q), l(!1), m(!1), e && requestAnimationFrame(e.focusCurrent);
56556
+ e?.clear(), b(SQ), l(!1), m(!1), e && requestAnimationFrame(e.focusCurrent);
56534
56557
  }, ge = (e) => {
56535
56558
  g(e), S.current?.updateQuery(e);
56536
56559
  }, _e = (e) => {
@@ -56617,7 +56640,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56617
56640
  "aria-readonly": T,
56618
56641
  onMouseDown: ue,
56619
56642
  style: ae,
56620
- children: [r && a ? /* @__PURE__ */ _(se, { children: /* @__PURE__ */ _(bQ, {
56643
+ children: [r && a ? /* @__PURE__ */ _(se, { children: /* @__PURE__ */ _(TQ, {
56621
56644
  markdown: ne,
56622
56645
  locale: e.locale,
56623
56646
  portalContainer: r,
@@ -56650,4 +56673,4 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56650
56673
  });
56651
56674
  };
56652
56675
  //#endregion
56653
- export { xQ as MilkdownEditor };
56676
+ export { EQ as MilkdownEditor };