zt-react-milkdown 0.1.28 → 0.1.29

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,13 @@ 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
- key: "p",
53985
- code: "KeyP"
53999
+ key: "0",
54000
+ code: "Digit0"
53986
54001
  },
53987
54002
  heading1: {
53988
54003
  key: "1",
@@ -54048,25 +54063,25 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54048
54063
  key: "i",
54049
54064
  code: "KeyI"
54050
54065
  }
54051
- }, dJ = {
54066
+ }, gJ = {
54052
54067
  Mod: "Ctrl",
54053
54068
  Alt: "Alt",
54054
54069
  Shift: "Shift"
54055
- }, fJ = {
54070
+ }, _J = {
54056
54071
  Mod: "⌘",
54057
54072
  Alt: "⌥",
54058
54073
  Shift: "⇧"
54059
- }, pJ = () => typeof navigator < "u" && lJ.test(navigator.platform), mJ = (e) => {
54074
+ }, vJ = () => typeof navigator < "u" && mJ.test(navigator.platform), yJ = (e) => {
54060
54075
  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;
54076
+ return Object.fromEntries(Object.entries(hJ).map(([e, n]) => [e, `${t}-${n.key}`]));
54077
+ }, bJ = (e) => {
54078
+ let t = vJ(), n = t ? _J : gJ;
54064
54079
  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);
54080
+ }, xJ = (e) => {
54081
+ let t = yJ(e);
54082
+ return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, bJ(t)]));
54083
+ }, SJ = (e) => {
54084
+ let t = xJ(e);
54070
54085
  return {
54071
54086
  paragraph: t.paragraph,
54072
54087
  heading1: t.heading1,
@@ -54081,8 +54096,8 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54081
54096
  blockquote: t.blockquote,
54082
54097
  codeBlock: t.codeBlock
54083
54098
  };
54084
- }, vJ = (e, t) => {
54085
- let n = mJ(t);
54099
+ }, CJ = (e, t) => {
54100
+ let n = yJ(t);
54086
54101
  e.update(eD.key, (e) => ({
54087
54102
  ...e,
54088
54103
  TurnIntoText: {
@@ -54146,13 +54161,13 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54146
54161
  shortcuts: n.inlineCode
54147
54162
  }
54148
54163
  }));
54149
- }, yJ = (e) => {
54150
- let t = mJ(e).taskList;
54164
+ }, wJ = (e) => {
54165
+ let t = yJ(e).taskList;
54151
54166
  return zw("taskListTransform", { WrapInTaskList: {
54152
54167
  shortcuts: t,
54153
- command: () => (e, t, n) => n ? oJ(n, "taskList") : !1
54168
+ command: () => (e, t, n) => n ? dJ(n, "taskList") : !1
54154
54169
  } });
54155
- }, bJ = "zt-md-selection-tooltip", xJ = (e) => [
54170
+ }, TJ = "zt-md-selection-tooltip", EJ = (e) => [
54156
54171
  {
54157
54172
  command: "strong",
54158
54173
  icon: ye,
@@ -54183,7 +54198,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54183
54198
  title: e.selectionTooltipLinkTitle,
54184
54199
  markNames: ["link"]
54185
54200
  }
54186
- ], SJ = {
54201
+ ], DJ = {
54187
54202
  paragraph: it,
54188
54203
  heading1: je,
54189
54204
  heading2: Me,
@@ -54196,107 +54211,107 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54196
54211
  taskList: He,
54197
54212
  blockquote: nt,
54198
54213
  codeBlock: Ee
54199
- }, CJ = (e, t) => {
54200
- let n = _J(t);
54214
+ }, OJ = (e, t) => {
54215
+ let n = SJ(t);
54201
54216
  return [
54202
54217
  {
54203
54218
  command: "paragraph",
54204
- icon: SJ.paragraph,
54219
+ icon: DJ.paragraph,
54205
54220
  label: e.selectionTooltipTransformParagraphLabel,
54206
54221
  shortcut: n.paragraph
54207
54222
  },
54208
54223
  {
54209
54224
  command: "heading1",
54210
- icon: SJ.heading1,
54225
+ icon: DJ.heading1,
54211
54226
  label: e.selectionTooltipTransformHeading1Label,
54212
54227
  shortcut: n.heading1
54213
54228
  },
54214
54229
  {
54215
54230
  command: "heading2",
54216
- icon: SJ.heading2,
54231
+ icon: DJ.heading2,
54217
54232
  label: e.selectionTooltipTransformHeading2Label,
54218
54233
  shortcut: n.heading2
54219
54234
  },
54220
54235
  {
54221
54236
  command: "heading3",
54222
- icon: SJ.heading3,
54237
+ icon: DJ.heading3,
54223
54238
  label: e.selectionTooltipTransformHeading3Label,
54224
54239
  shortcut: n.heading3
54225
54240
  },
54226
54241
  {
54227
54242
  command: "heading4",
54228
- icon: SJ.heading4,
54243
+ icon: DJ.heading4,
54229
54244
  label: e.selectionTooltipTransformHeading4Label,
54230
54245
  shortcut: n.heading4
54231
54246
  },
54232
54247
  {
54233
54248
  command: "heading5",
54234
- icon: SJ.heading5,
54249
+ icon: DJ.heading5,
54235
54250
  label: e.selectionTooltipTransformHeading5Label,
54236
54251
  shortcut: n.heading5
54237
54252
  },
54238
54253
  {
54239
54254
  command: "heading6",
54240
- icon: SJ.heading6,
54255
+ icon: DJ.heading6,
54241
54256
  label: e.selectionTooltipTransformHeading6Label,
54242
54257
  shortcut: n.heading6
54243
54258
  },
54244
54259
  {
54245
54260
  command: "bulletList",
54246
- icon: SJ.bulletList,
54261
+ icon: DJ.bulletList,
54247
54262
  label: e.selectionTooltipTransformBulletListLabel,
54248
54263
  shortcut: n.bulletList
54249
54264
  },
54250
54265
  {
54251
54266
  command: "orderedList",
54252
- icon: SJ.orderedList,
54267
+ icon: DJ.orderedList,
54253
54268
  label: e.selectionTooltipTransformOrderedListLabel,
54254
54269
  shortcut: n.orderedList
54255
54270
  },
54256
54271
  {
54257
54272
  command: "taskList",
54258
- icon: SJ.taskList,
54273
+ icon: DJ.taskList,
54259
54274
  label: e.selectionTooltipTransformTaskListLabel,
54260
54275
  shortcut: n.taskList
54261
54276
  },
54262
54277
  {
54263
54278
  command: "blockquote",
54264
- icon: SJ.blockquote,
54279
+ icon: DJ.blockquote,
54265
54280
  label: e.selectionTooltipTransformBlockquoteLabel,
54266
54281
  shortcut: n.blockquote
54267
54282
  },
54268
54283
  {
54269
54284
  command: "codeBlock",
54270
- icon: SJ.codeBlock,
54285
+ icon: DJ.codeBlock,
54271
54286
  label: e.selectionTooltipTransformCodeBlockLabel,
54272
54287
  shortcut: n.codeBlock
54273
54288
  }
54274
54289
  ];
54275
- }, wJ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, TJ = (e, t) => {
54290
+ }, kJ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, AJ = (e, t) => {
54276
54291
  let n = e.state.schema.marks, r = t.find((e) => n[e]);
54277
54292
  return r ? n[r] ?? null : null;
54278
- }, EJ = (e, t) => {
54293
+ }, jJ = (e, t) => {
54279
54294
  let { from: n, to: r } = e.selection;
54280
54295
  return e.doc.rangeHasMark(n, r, t);
54281
- }, DJ = (e, t) => {
54296
+ }, MJ = (e, t) => {
54282
54297
  let { from: n, to: r } = e.selection, i = "";
54283
54298
  return e.doc.nodesBetween(n, r, (e) => {
54284
54299
  let n = e.marks.find((e) => e.type === t);
54285
54300
  return n ? (i = typeof n.attrs.href == "string" ? n.attrs.href : "", !1) : !0;
54286
54301
  }), i;
54287
- }, OJ = (e) => {
54302
+ }, NJ = (e) => {
54288
54303
  O_(e.markType)(e.view.state, e.view.dispatch, e.view), e.view.focus();
54289
- }, kJ = (e) => {
54304
+ }, PJ = (e) => {
54290
54305
  e.toggleLinkPopover(e.view);
54291
- }, AJ = (e, t) => {
54306
+ }, FJ = (e, t) => {
54292
54307
  ({
54293
- strong: OJ,
54294
- em: OJ,
54295
- strike: OJ,
54296
- inlineCode: OJ,
54297
- link: kJ
54308
+ strong: NJ,
54309
+ em: NJ,
54310
+ strike: NJ,
54311
+ inlineCode: NJ,
54312
+ link: PJ
54298
54313
  })[e](t);
54299
- }, jJ = (e, t, n, r, a) => {
54314
+ }, IJ = (e, t, n, r, a) => {
54300
54315
  let o = document.createElement("button");
54301
54316
  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
54317
  let s = document.createElement("span");
@@ -54310,20 +54325,20 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54310
54325
  }), o.addEventListener("click", (i) => {
54311
54326
  i.preventDefault();
54312
54327
  let a = n();
54313
- !a || a.state.selection.empty || AJ(e.command, {
54328
+ !a || a.state.selection.empty || FJ(e.command, {
54314
54329
  view: a,
54315
54330
  markType: t,
54316
54331
  toggleLinkPopover: r
54317
54332
  });
54318
54333
  }), o;
54319
- }, MJ = (e, t, n, r, i, a) => {
54334
+ }, LJ = (e, t, n, r, i, a) => {
54320
54335
  let o = document.createElement("div");
54321
54336
  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));
54337
+ let i = AJ(e, t.markNames);
54338
+ i && t.command !== "link" && o.append(IJ(t, i, n, r, a));
54324
54339
  }), o;
54325
- }, NJ = (e) => {
54326
- let t = Cq({
54340
+ }, RJ = (e) => {
54341
+ let t = Oq({
54327
54342
  open: e.open,
54328
54343
  portalContainer: e.portalContainer,
54329
54344
  editorWrapper: e.collisionBoundary,
@@ -54339,7 +54354,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54339
54354
  e.onOpenChange(!1);
54340
54355
  return;
54341
54356
  }
54342
- oJ(n, t), e.onOpenChange(!1), n.focus();
54357
+ dJ(n, t), e.onOpenChange(!1), n.focus();
54343
54358
  };
54344
54359
  return i(n, null, i("button", {
54345
54360
  ref: t.triggerRef,
@@ -54360,7 +54375,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54360
54375
  size: e.iconSize,
54361
54376
  strokeWidth: e.iconStrokeWidth,
54362
54377
  "aria-hidden": "true"
54363
- })), i(wq, {
54378
+ })), i(kq, {
54364
54379
  panel: t,
54365
54380
  portalContainer: e.portalContainer,
54366
54381
  className: "zt-md-selection-transform-popover !w-[224px] p-1",
@@ -54381,7 +54396,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54381
54396
  "aria-hidden": "true"
54382
54397
  }), i("span", { className: "zt-md-selection-transform-item-label" }, t.label), i("kbd", { className: "zt-md-selection-transform-item-shortcut" }, t.shortcut));
54383
54398
  }))));
54384
- }, PJ = (e) => {
54399
+ }, zJ = (e) => {
54385
54400
  let [t, r] = f(""), a = d(null), o = (e) => {
54386
54401
  e.preventDefault();
54387
54402
  }, s = (t) => {
@@ -54390,7 +54405,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54390
54405
  e.onOpenChange(!1);
54391
54406
  return;
54392
54407
  }
54393
- let r = TJ(n, ["link"]);
54408
+ let r = AJ(n, ["link"]);
54394
54409
  if (!r) {
54395
54410
  e.onOpenChange(!1);
54396
54411
  return;
@@ -54402,13 +54417,13 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54402
54417
  e.onOpenChange(!1);
54403
54418
  return;
54404
54419
  }
54405
- let n = e.getCurrentView(), i = n ? TJ(n, ["link"]) : null;
54420
+ let n = e.getCurrentView(), i = n ? AJ(n, ["link"]) : null;
54406
54421
  if (!n || !i || n.state.selection.empty) {
54407
54422
  e.onOpenChange(!1);
54408
54423
  return;
54409
54424
  }
54410
- r(AF(DJ(n.state, i))), e.onOpenChange(!0);
54411
- }, u = Cq({
54425
+ r(AF(MJ(n.state, i))), e.onOpenChange(!0);
54426
+ }, u = Oq({
54412
54427
  open: e.open,
54413
54428
  portalContainer: e.portalContainer,
54414
54429
  editorWrapper: e.collisionBoundary,
@@ -54420,7 +54435,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54420
54435
  });
54421
54436
  return c(() => {
54422
54437
  if (!e.open) return;
54423
- let t = e.getCurrentView(), n = t ? TJ(t, ["link"]) : null;
54438
+ let t = e.getCurrentView(), n = t ? AJ(t, ["link"]) : null;
54424
54439
  (!t || !n || t.state.selection.empty) && e.onOpenChange(!1);
54425
54440
  }, [
54426
54441
  e.open,
@@ -54449,7 +54464,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54449
54464
  }, i("span", { className: "zt-md-selection-tooltip-button-icon" }, i(Ve, {
54450
54465
  size: e.iconSize,
54451
54466
  strokeWidth: e.iconStrokeWidth
54452
- }))), i(wq, {
54467
+ }))), i(kq, {
54453
54468
  panel: u,
54454
54469
  portalContainer: e.portalContainer,
54455
54470
  className: "zt-md-selection-link-popover w-fit min-w-0 gap-0 p-2"
@@ -54482,29 +54497,29 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54482
54497
  size: e.iconSize,
54483
54498
  strokeWidth: e.iconStrokeWidth
54484
54499
  })))));
54485
- }, FJ = (e, t, n) => {
54500
+ }, BJ = (e, t, n) => {
54486
54501
  n.forEach((n) => {
54487
- let r = TJ(t, n.markNames);
54502
+ let r = AJ(t, n.markNames);
54488
54503
  if (!r) return;
54489
54504
  let i = e.querySelector(`[data-command="${n.command}"]`);
54490
- i instanceof HTMLButtonElement && (i.dataset.active = EJ(t.state, r) ? "true" : "false");
54505
+ i instanceof HTMLButtonElement && (i.dataset.active = jJ(t.state, r) ? "true" : "false");
54491
54506
  });
54492
- }, IJ = (e) => {
54507
+ }, VJ = (e) => {
54493
54508
  let { from: t, to: n } = e.state.selection, r = !1;
54494
54509
  return e.state.doc.nodesBetween(t, n, (e) => e.type.name === "code_block" ? (r = !0, !1) : !0), r;
54495
- }, LJ = (e, t, n) => (r) => {
54510
+ }, HJ = (e, t, n) => (r) => {
54496
54511
  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) => {
54512
+ return !kJ(r) || i.empty || !(i instanceof N) || !r.hasFocus() && !o && !t() && !n() || VJ(r) ? !1 : e.childElementCount > 0 && a.textBetween(i.from, i.to).trim().length > 0;
54513
+ }, UJ = (e, t, n, r) => {
54514
+ let a = EJ(n), o = OJ(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
54515
  c !== e && (c = e, C());
54501
54516
  }, y = (e) => {
54502
54517
  l !== e && (l = e, S());
54503
54518
  }, x = (e) => {
54504
54519
  e.state.selection.empty || v(!c);
54505
54520
  }, 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, {
54521
+ let e = s ? fJ(s) : new Set(["paragraph"]), r = s ? pJ(s) : "paragraph", a = o.find((e) => e.command === r) ?? o[0];
54522
+ p.render(i(RJ, {
54508
54523
  getCurrentView: () => s,
54509
54524
  portalContainer: t,
54510
54525
  collisionBoundary: _,
@@ -54518,7 +54533,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54518
54533
  activeCommands: e
54519
54534
  }));
54520
54535
  }, C = () => {
54521
- g.render(i(PJ, {
54536
+ g.render(i(zJ, {
54522
54537
  getCurrentView: () => s,
54523
54538
  portalContainer: t,
54524
54539
  collisionBoundary: _,
@@ -54531,9 +54546,9 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54531
54546
  onOpenChange: v,
54532
54547
  messages: n
54533
54548
  }));
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({
54549
+ }, w = LJ(e, a, () => s, x, f, d);
54550
+ S(), AJ(e, ["link"]) && (w.append(m), C());
54551
+ let T = HJ(w, () => c, () => l), E = new aJ({
54537
54552
  content: w,
54538
54553
  debounce: 80,
54539
54554
  offset: 8,
@@ -54557,9 +54572,9 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54557
54572
  };
54558
54573
  return e.dom.addEventListener("blur", ie), document.addEventListener("mousedown", ae, !0), {
54559
54574
  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";
54575
+ if (s = e, s.state.selection.empty && (v(!1), y(!1)), BJ(w, s, a), S(), h) {
54576
+ let e = AJ(s, ["link"]);
54577
+ h.dataset.active = e && jJ(s.state, e) ? "true" : "false";
54563
54578
  }
54564
54579
  if (!T(s)) {
54565
54580
  E.hide(), te();
@@ -54573,21 +54588,21 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54573
54588
  }), E.destroy(), w.remove();
54574
54589
  }
54575
54590
  };
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) => {
54591
+ }, WJ = (e, t, n) => Pw(() => new Xu({
54592
+ key: new $u(TJ),
54593
+ view: (r) => UJ(r, e, t, n)
54594
+ })), GJ = (e, t) => e(t.state, t.dispatch, t), KJ = (e) => {
54580
54595
  let t = e?.state?.selection?.$from;
54581
54596
  if (!t) return !1;
54582
54597
  for (let e = t.depth; e > 0; --e) if (t.node(e)?.type?.name === "table") return !0;
54583
54598
  return !1;
54584
- }, HJ = (e, t) => {
54599
+ }, qJ = (e, t) => {
54585
54600
  let n = e?.state?.doc;
54586
54601
  if (!n || typeof t != "number") return -1;
54587
54602
  let r = Math.min(Math.max(t, 0), n.content.size), i = n.resolve(r);
54588
54603
  for (let e = i.depth; e > 0; --e) if (i.node(e)?.type?.name === "table") return i.before(e);
54589
54604
  return -1;
54590
- }, UJ = (e, t, n, r) => {
54605
+ }, JJ = (e, t, n, r) => {
54591
54606
  let i = e?.state?.schema?.nodes;
54592
54607
  if (!i) return null;
54593
54608
  let a = i.table, o = i.table_header_row, s = i.table_row, c = i.table_header, l = i.table_cell;
@@ -54597,21 +54612,21 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54597
54612
  return i.create(null, u);
54598
54613
  });
54599
54614
  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);
54615
+ }, YJ = (e) => {
54616
+ if (!e?.state || !e?.dispatch || KJ(e)) return !1;
54617
+ let t = e.state.selection.from, n = JJ(e, 3, 3, !0);
54603
54618
  if (!n) return !1;
54604
54619
  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;
54620
+ let r = qJ(e, t);
54621
+ if (r < 0 && t > 0 && (r = qJ(e, t - 1)), r < 0) return !0;
54607
54622
  let i = r + 2;
54608
54623
  if (i > e.state.doc.content.size) return !0;
54609
54624
  let a = N.near(e.state.doc.resolve(i), 1);
54610
54625
  return e.dispatch(e.state.tr.setSelection(a).scrollIntoView()), e.focus(), !0;
54611
- }, GJ = (e, t) => {
54626
+ }, XJ = (e, t) => {
54612
54627
  let n = e?.state?.schema?.marks ?? {}, r = t.find((e) => n[e]);
54613
54628
  return r ? n[r] ?? null : null;
54614
- }, KJ = new Set([
54629
+ }, ZJ = new Set([
54615
54630
  "paragraph",
54616
54631
  "heading1",
54617
54632
  "heading2",
@@ -54624,10 +54639,10 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54624
54639
  "taskList",
54625
54640
  "blockquote",
54626
54641
  "codeBlock"
54627
- ]), qJ = (e) => KJ.has(e), JJ = {
54642
+ ]), QJ = (e) => ZJ.has(e), $J = {
54628
54643
  inlineCode: (e) => {
54629
- let t = GJ(e, ["inlineCode", "code_inline"]);
54630
- return t ? BJ(O_(t), e) : !1;
54644
+ let t = XJ(e, ["inlineCode", "code_inline"]);
54645
+ return t ? GJ(O_(t), e) : !1;
54631
54646
  },
54632
54647
  inlineMath: (e) => {
54633
54648
  let t = e?.state?.schema?.nodes?.math_inline;
@@ -54640,7 +54655,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54640
54655
  },
54641
54656
  mathBlock: (e) => {
54642
54657
  let t = e.state.schema.nodes?.math_block;
54643
- if (!t || !BJ(T_(t), e)) return !1;
54658
+ if (!t || !GJ(T_(t), e)) return !1;
54644
54659
  let n = e.state.selection?.$from;
54645
54660
  if (!n) return !0;
54646
54661
  let r = null;
@@ -54652,8 +54667,8 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54652
54667
  let i = P.create(e.state.doc, r);
54653
54668
  return e.dispatch(e.state.tr.setSelection(i).scrollIntoView()), !0;
54654
54669
  },
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 = [
54670
+ table: YJ
54671
+ }, eY = (e, t) => !e?.state || !e?.dispatch ? !1 : QJ(t) ? dJ(e, t) : t === "image" ? !1 : $J[t](e), tY = (e) => typeof e?.props?.editable == "function" ? e.props.editable(e.state) : !!e?.editable, nY = [
54657
54672
  {
54658
54673
  id: "paragraph",
54659
54674
  label: "普通文本",
@@ -54773,7 +54788,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54773
54788
  icon: "Image",
54774
54789
  command: "image"
54775
54790
  }
54776
- ], QJ = [
54791
+ ], rY = [
54777
54792
  {
54778
54793
  id: "paragraph",
54779
54794
  label: "Paragraph",
@@ -54893,7 +54908,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54893
54908
  icon: "Image",
54894
54909
  command: "image"
54895
54910
  }
54896
- ], $J = (e, t = "zh-CN") => e?.items && e.items.length > 0 ? e.items : t === "en-US" ? QJ : ZJ, eY = (e) => {
54911
+ ], iY = (e, t = "zh-CN") => e?.items && e.items.length > 0 ? e.items : t === "en-US" ? rY : nY, aY = (e) => {
54897
54912
  let t = e?.state?.selection?.$from;
54898
54913
  if (!t) return !1;
54899
54914
  let n = String(t.parent?.type?.name ?? "");
@@ -54903,17 +54918,17 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54903
54918
  if (n === "table" || n === "table_cell" || n === "table_header") return !0;
54904
54919
  }
54905
54920
  return !1;
54906
- }, tY = (e) => {
54921
+ }, oY = (e) => {
54907
54922
  let t = e?.state, n = t?.selection?.$from;
54908
54923
  if (!t || !n) return "";
54909
54924
  let r = n.start(), i = n.pos;
54910
54925
  return t.doc.textBetween(r, i, "\n", "\n");
54911
- }, nY = (e) => {
54912
- let t = tY(e), n = t.lastIndexOf("/");
54926
+ }, sY = (e) => {
54927
+ let t = oY(e), n = t.lastIndexOf("/");
54913
54928
  if (n < 0) return null;
54914
54929
  let r = t.slice(n + 1);
54915
54930
  return /\s/.test(r) ? null : r;
54916
- }, rY = (e, t) => {
54931
+ }, cY = (e, t) => {
54917
54932
  if (t === null || t.length === 0) return e;
54918
54933
  let n = t.toLowerCase();
54919
54934
  return e.filter((e) => [
@@ -54922,24 +54937,24 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54922
54937
  e.command,
54923
54938
  e.id
54924
54939
  ].some((e) => String(e).toLowerCase().startsWith(n)));
54925
- }, iY = (e, t) => {
54926
- if (!XJ(e)) return {
54940
+ }, lY = (e, t) => {
54941
+ if (!tY(e)) return {
54927
54942
  visibleItems: [],
54928
54943
  shouldShow: !1
54929
54944
  };
54930
- let n = nY(e), r = rY(t, n);
54945
+ let n = sY(e), r = cY(t, n);
54931
54946
  return {
54932
54947
  visibleItems: r,
54933
- shouldShow: !eY(e) && n !== null && r.length > 0
54948
+ shouldShow: !aY(e) && n !== null && r.length > 0
54934
54949
  };
54935
- }, aY = (e) => {
54950
+ }, uY = (e) => {
54936
54951
  let t = e?.state, n = t?.selection?.$from;
54937
54952
  if (!t || !n || !e?.dispatch) return !1;
54938
54953
  let r = n.start(), i = n.pos, a = t.doc.textBetween(r, i, "\n", "\n").lastIndexOf("/");
54939
54954
  if (a < 0) return !1;
54940
54955
  let o = r + a, s = t.tr.delete(o, i);
54941
54956
  return e.dispatch(s.scrollIntoView()), !0;
54942
- }, oY = {
54957
+ }, dY = {
54943
54958
  Type: it,
54944
54959
  Heading1: je,
54945
54960
  Heading2: Me,
@@ -54957,7 +54972,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54957
54972
  TextQuote: nt,
54958
54973
  Sigma: Je,
54959
54974
  Table: Qe
54960
- }, sY = Te, cY = (e, t, n, r, a) => {
54975
+ }, fY = Te, pY = (e, t, n, r, a) => {
54961
54976
  r.splice(0).forEach((e) => {
54962
54977
  e.unmount();
54963
54978
  }), e.innerHTML = "";
@@ -54971,7 +54986,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54971
54986
  c.className = "slash-menu-item", c.dataset.command = t.command, c.dataset.selected = s === n ? "true" : "false";
54972
54987
  let l = document.createElement("span");
54973
54988
  l.className = "slash-menu-item-icon";
54974
- let u = t.icon ? oY[t.icon] ?? sY : null;
54989
+ let u = t.icon ? dY[t.icon] ?? fY : null;
54975
54990
  if (u) {
54976
54991
  let e = b(l);
54977
54992
  e.render(i(u, {
@@ -54984,12 +54999,12 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
54984
54999
  let f = a[t.command], p = f ? document.createElement("kbd") : null;
54985
55000
  p && (p.className = "slash-menu-item-shortcut", p.textContent = f), c.appendChild(l), c.appendChild(d), p && c.appendChild(p), e.appendChild(c);
54986
55001
  });
54987
- }, lY = (e, t) => {
55002
+ }, mY = (e, t) => {
54988
55003
  let n = document.createElement("div");
54989
55004
  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 = () => {
55005
+ let r = !1, i = "", a = !1, o = null, s = [], c = xJ(t), l = () => {
54991
55006
  if (!r || !o) return;
54992
- let { editorWrapper: t, anchorTopInContent: i, anchorBottomInContent: a, anchorLeftInContent: s, placement: c, offsetY: l } = o, u = bq({
55007
+ let { editorWrapper: t, anchorTopInContent: i, anchorBottomInContent: a, anchorLeftInContent: s, placement: c, offsetY: l } = o, u = Tq({
54993
55008
  wrapper: t,
54994
55009
  anchor: {
54995
55010
  anchorTopInContent: i,
@@ -55002,7 +55017,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
55002
55017
  boundaryInset: 4
55003
55018
  }, e);
55004
55019
  n.style.left = `${u.left}px`, n.style.top = `${u.top}px`, n.dataset.placement = c;
55005
- }, u = xq(() => {
55020
+ }, u = Eq(() => {
55006
55021
  r && l();
55007
55022
  }), d = () => {
55008
55023
  n.style.top = "", n.style.left = "", n.style.transform = "", delete n.dataset.placement;
@@ -55021,7 +55036,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
55021
55036
  },
55022
55037
  renderIfNeeded: (e, t) => {
55023
55038
  let r = `${e.map((e) => e.command).join("|")}::${t}`;
55024
- i !== r && (cY(n, e, t, s, c), i = r);
55039
+ i !== r && (pY(n, e, t, s, c), i = r);
55025
55040
  },
55026
55041
  scrollActiveItemIntoView: (e) => {
55027
55042
  let t = n.querySelector(".slash-menu-item[data-selected=\"true\"]");
@@ -55043,7 +55058,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
55043
55058
  };
55044
55059
  //#endregion
55045
55060
  //#region node_modules/.pnpm/@milkdown+plugin-slash@7.21.1/node_modules/@milkdown/plugin-slash/lib/index.js
55046
- function uY(e) {
55061
+ function hY(e) {
55047
55062
  let t = Iw({}, `${e}_SLASH_SPEC`), n = Pw((n) => {
55048
55063
  let r = n.get(t.key);
55049
55064
  return new Xu({
@@ -55061,29 +55076,29 @@ function uY(e) {
55061
55076
  }
55062
55077
  //#endregion
55063
55078
  //#region src/plugins/custom/slash-menu/slash-menu.ts
55064
- var dY = (e, t) => {
55079
+ var gY = (e, t) => {
55065
55080
  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;
55081
+ }, _Y = () => {
55082
+ if (typeof hY != "function") return console.error("[zt-md/slash] slashFactory not found"), null;
55083
+ let e = hY("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
55084
  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");
55085
+ let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a = gY(t, "key") ?? gY(n, "key") ?? gY(r, "key") ?? gY(e, "key");
55071
55086
  return i.length === 0 || a === void 0 ? null : {
55072
55087
  plugins: i,
55073
55088
  key: a
55074
55089
  };
55075
- }, pY = (e, t, n, r, i = "zh-CN", a = "modShift") => {
55090
+ }, vY = (e, t, n, r, i = "zh-CN", a = "modShift") => {
55076
55091
  if (t?.enabled === !1) return {
55077
55092
  plugins: [],
55078
55093
  config: null
55079
55094
  };
55080
55095
  try {
55081
- let o = fY();
55096
+ let o = _Y();
55082
55097
  if (!o) return {
55083
55098
  plugins: [],
55084
55099
  config: null
55085
55100
  };
55086
- let s = $J(t, i), c = lY(e, a), l = 0, u = null, d = s, f = !1, p = new Set([
55101
+ let s = iY(t, i), c = mY(e, a), l = 0, u = null, d = s, f = !1, p = new Set([
55087
55102
  "ArrowDown",
55088
55103
  "ArrowUp",
55089
55104
  "Enter",
@@ -55098,18 +55113,18 @@ var dY = (e, t) => {
55098
55113
  let n = e?.coordsAtPos?.(t);
55099
55114
  return n ? new DOMRect(n.left, n.top, Math.max(n.right - n.left, 1), n.bottom - n.top) : null;
55100
55115
  }, g = (e) => {
55101
- if (!XJ(e)) {
55116
+ if (!tY(e)) {
55102
55117
  d = [], f = !1, c.updatePositionContext(null), c.setVisible(!1);
55103
55118
  return;
55104
55119
  }
55105
- let t = iY(e, s);
55120
+ let t = lY(e, s);
55106
55121
  if (d = t.visibleItems, f = t.shouldShow, t.shouldShow && l >= d.length && (l = 0), t.shouldShow && !c.isVisible() && (l = 0), !t.shouldShow) {
55107
55122
  c.updatePositionContext(null), c.setVisible(!1);
55108
55123
  return;
55109
55124
  }
55110
- let n = h(e), r = hq(e?.dom);
55125
+ let n = h(e), r = bq(e?.dom);
55111
55126
  if (n && r) {
55112
- let e = gq(n, 320), t = _q(n, r);
55127
+ let e = xq(n, 320), t = Sq(n, r);
55113
55128
  c.updatePositionContext({
55114
55129
  editorWrapper: r,
55115
55130
  anchorTopInContent: t.anchorTopInContent,
@@ -55123,13 +55138,13 @@ var dY = (e, t) => {
55123
55138
  c.updatePosition();
55124
55139
  });
55125
55140
  }, _ = () => {
55126
- if (!XJ(u)) {
55141
+ if (!tY(u)) {
55127
55142
  f = !1, c.updatePositionContext(null), c.setVisible(!1);
55128
55143
  return;
55129
55144
  }
55130
55145
  if (!u || l < 0 || l >= d.length) return;
55131
55146
  let t = d[l];
55132
- if (aY(u)) {
55147
+ if (uY(u)) {
55133
55148
  if (t.command === "image") {
55134
55149
  c.setVisible(!1), n && YI({
55135
55150
  portalContainer: e,
@@ -55139,7 +55154,7 @@ var dY = (e, t) => {
55139
55154
  });
55140
55155
  return;
55141
55156
  }
55142
- YJ(u, t.command) && (c.setVisible(!1), t.command === "mathBlock" && queueMicrotask(() => {
55157
+ eY(u, t.command) && (c.setVisible(!1), t.command === "mathBlock" && queueMicrotask(() => {
55143
55158
  let e = u?.dom?.querySelector?.(".zt-md-math-block-editing .zt-md-math-block-textarea");
55144
55159
  !e || document.activeElement === e || e.focus();
55145
55160
  }));
@@ -55173,33 +55188,33 @@ var dY = (e, t) => {
55173
55188
  config: null
55174
55189
  };
55175
55190
  }
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({
55191
+ }, yY = /Mac|iPhone|iPad|iPod/, bY = Object.fromEntries(Object.entries(hJ).map(([e, t]) => [t.code, e])), xY = (e, t) => (typeof navigator < "u" && yY.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
55192
  portalContainer: t,
55178
55193
  view: e,
55179
55194
  messages: n,
55180
55195
  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];
55196
+ }), !0), CY = (e, t, n, r) => (i, a) => {
55197
+ if (a.isComposing || !xY(a, n) || !tY(i)) return !1;
55198
+ let o = bY[a.code];
55184
55199
  if (!o) return !1;
55185
- let s = o === "image" ? _Y(i, e, t, r) : YJ(i, o);
55200
+ let s = o === "image" ? SY(i, e, t, r) : eY(i, o);
55186
55201
  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) => {
55202
+ }, wY = "table", TY = "ArrowUp", EY = (e) => e.key !== TY || e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey, DY = (e, t) => {
55188
55203
  let n = t.nodeBefore;
55189
- return !n || n.type.name !== yY ? null : {
55204
+ return !n || n.type.name !== wY ? null : {
55190
55205
  tableNode: n,
55191
55206
  tableStart: e - n.nodeSize
55192
55207
  };
55193
- }, CY = (e) => {
55208
+ }, OY = (e) => {
55194
55209
  if (e.parent.type.name !== "paragraph" || e.parentOffset !== 0 || e.parent.childCount > 0 || e.depth < 1) return null;
55195
55210
  let t = e.index(e.depth - 1);
55196
55211
  if (t <= 0) return null;
55197
55212
  let n = e.node(e.depth - 1).child(t - 1);
55198
- return n.type.name === yY ? {
55213
+ return n.type.name === wY ? {
55199
55214
  tableNode: n,
55200
55215
  tableStart: e.before(e.depth) - n.nodeSize
55201
55216
  } : null;
55202
- }, wY = (e, t) => {
55217
+ }, kY = (e, t) => {
55203
55218
  if (e.childCount === 0) return null;
55204
55219
  let n = e.childCount - 1, r = e.child(n);
55205
55220
  if (r.childCount === 0) return null;
@@ -55208,21 +55223,21 @@ var dY = (e, t) => {
55208
55223
  let a = r.childCount - 1, o = r.child(a), s = 0;
55209
55224
  for (let e = 0; e < a; e += 1) s += r.child(e).nodeSize;
55210
55225
  return t + 1 + i + 1 + s + o.nodeSize - 1;
55211
- }, TY = (e) => {
55226
+ }, AY = (e) => {
55212
55227
  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);
55228
+ if (t instanceof GN ? r = DY(t.from, n) : t.empty && (r = OY(n)), !r) return !1;
55229
+ let i = kY(r.tableNode, r.tableStart);
55215
55230
  if (i === null) return !1;
55216
55231
  let a = e.state.tr.setSelection(N.near(e.state.doc.resolve(i), -1)).scrollIntoView();
55217
55232
  return e.dispatch(a), e.focus(), !0;
55218
- }, EY = Pw(() => new Xu({
55233
+ }, jY = Pw(() => new Xu({
55219
55234
  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) => {
55235
+ props: { handleKeyDown: (e, t) => EY(t) ? !1 : AY(e) }
55236
+ })), MY = "table", NY = "table_header_row", PY = "table_row", FY = "table_header", IY = "table_cell", LY = (e) => {
55222
55237
  let t = e.selection.$from, n = -1, r = -1;
55223
55238
  for (let e = t.depth; e >= 0; --e) {
55224
55239
  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 {
55240
+ 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
55241
  tableNode: i,
55227
55242
  tableStart: e === 0 ? 0 : t.before(e),
55228
55243
  tableNodeSize: i.nodeSize,
@@ -55231,7 +55246,7 @@ var dY = (e, t) => {
55231
55246
  };
55232
55247
  }
55233
55248
  return null;
55234
- }, NY = (e, t, n, r) => {
55249
+ }, RY = (e, t, n, r) => {
55235
55250
  if (n < 0 || n >= e.childCount) return null;
55236
55251
  let i = 0;
55237
55252
  for (let t = 0; t < n; t += 1) i += e.child(t).nodeSize;
@@ -55240,16 +55255,16 @@ var dY = (e, t) => {
55240
55255
  let o = 0;
55241
55256
  for (let e = 0; e < r; e += 1) o += a.child(e).nodeSize;
55242
55257
  return t + 1 + i + 1 + o + 1 + 1;
55243
- }, PY = (e) => {
55258
+ }, zY = (e) => {
55244
55259
  if (e.columnIndex < 0 || e.tableNode.childCount === 0) return !1;
55245
55260
  let t = e.tableNode.child(0);
55246
55261
  return e.columnIndex < t.childCount;
55247
- }, FY = (e, t, n, r) => {
55248
- let i = NY(t.tableNode, t.tableStart, n, r);
55262
+ }, BY = (e, t, n, r) => {
55263
+ let i = RY(t.tableNode, t.tableStart, n, r);
55249
55264
  if (i === null) return !1;
55250
55265
  let a = e.state.tr.setSelection(N.near(e.state.tr.doc.resolve(i), 1));
55251
55266
  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) => {
55267
+ }, 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
55268
  if (t.columnIndex < 0) return !1;
55254
55269
  let r = SO.get(t.tableNode), i = t.tableStart + 1, a = t.columnIndex, o = e.state.tr;
55255
55270
  for (let e = 0; e < r.height; e += 1) {
@@ -55264,14 +55279,14 @@ var dY = (e, t) => {
55264
55279
  o.setNodeMarkup(c, l.type, u, l.marks);
55265
55280
  }
55266
55281
  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({
55282
+ }, qY = (e) => {
55283
+ let t = LY(e.state);
55284
+ !t || t.rowIndex <= 0 || UY(e, t);
55285
+ }, JY = (e) => {
55286
+ let t = LY(e.state);
55287
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || GY(e, t);
55288
+ }, YY = (e) => {
55289
+ let [t, r] = f(!1), a = Oq({
55275
55290
  open: t,
55276
55291
  portalContainer: e.portalContainer,
55277
55292
  editorWrapper: e.collisionBoundary,
@@ -55303,7 +55318,7 @@ var dY = (e, t) => {
55303
55318
  size: 14,
55304
55319
  strokeWidth: 2,
55305
55320
  "aria-hidden": "true"
55306
- })), i(wq, {
55321
+ })), i(kq, {
55307
55322
  panel: a,
55308
55323
  portalContainer: e.portalContainer,
55309
55324
  className: "zt-md-table-action-popover",
@@ -55371,13 +55386,13 @@ var dY = (e, t) => {
55371
55386
  e.onDeleteColumn(), r(!1);
55372
55387
  }
55373
55388
  }, 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, {
55389
+ }, XY = "zt-md-table-focus-actions", ZY = 0, QY = 24, $Y = 4, eX = 4, tX = "top", nX = "left", rX = (e) => y(i(e, {
55375
55390
  size: 14,
55376
55391
  strokeWidth: 2,
55377
55392
  "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 {
55393
+ })), 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
55394
  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(() => {
55395
+ this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = nX, this.currentTableElement = null, this.hasPositionContext = !1, this.repositionScheduler = Eq(() => {
55381
55396
  this.hasPositionContext && this.updateOverlayPosition();
55382
55397
  }), this.handleActionsMouseDown = (e) => {
55383
55398
  e.preventDefault();
@@ -55392,41 +55407,41 @@ var dY = (e, t) => {
55392
55407
  }, this.handleAlignRightClick = () => {
55393
55408
  this.applyColumnAlignment("right");
55394
55409
  }, this.handleInsertRowBelow = () => {
55395
- let e = MY(this.view.state);
55396
- !e || e.rowIndex < 0 || LY(this.view, e, "below");
55410
+ let e = LY(this.view.state);
55411
+ !e || e.rowIndex < 0 || HY(this.view, e, "below");
55397
55412
  }, this.handleInsertRowAbove = () => {
55398
- let e = MY(this.view.state);
55399
- !e || e.rowIndex <= 0 || LY(this.view, e, "above");
55413
+ let e = LY(this.view.state);
55414
+ !e || e.rowIndex <= 0 || HY(this.view, e, "above");
55400
55415
  }, this.handleInsertColumnLeft = () => {
55401
55416
  this.insertColumn("left");
55402
55417
  }, this.handleInsertColumnRight = () => {
55403
55418
  this.insertColumn("right");
55404
55419
  }, this.handleDeleteRow = () => {
55405
- HY(this.view);
55420
+ qY(this.view);
55406
55421
  }, 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);
55422
+ JY(this.view);
55423
+ }, 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
55424
  }
55410
55425
  createColumnAlignmentButton(e, t) {
55411
55426
  let n = document.createElement("button");
55412
55427
  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
55428
  }
55414
55429
  resolveColumnAlignment(e) {
55415
- return e === "center" || e === "right" ? e : ZY;
55430
+ return e === "center" || e === "right" ? e : nX;
55416
55431
  }
55417
55432
  updateAlignmentButtonsState(e) {
55418
55433
  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
55434
  }
55420
55435
  applyColumnAlignment(e) {
55421
- let t = MY(this.view.state);
55422
- !t || t.rowIndex < 0 || t.columnIndex < 0 || VY(this.view, t, e);
55436
+ let t = LY(this.view.state);
55437
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || KY(this.view, t, e);
55423
55438
  }
55424
55439
  insertColumn(e) {
55425
- let t = MY(this.view.state);
55426
- !t || t.rowIndex < 0 || t.columnIndex < 0 || zY(this.view, t, e);
55440
+ let t = LY(this.view.state);
55441
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || WY(this.view, t, e);
55427
55442
  }
55428
55443
  renderMoreActions(e, t, n, r) {
55429
- this.moreActionsRoot.render(i(WY, {
55444
+ this.moreActionsRoot.render(i(YY, {
55430
55445
  messages: this.messages,
55431
55446
  portalContainer: this.portalContainer,
55432
55447
  collisionBoundary: this.editorWrapper,
@@ -55449,7 +55464,7 @@ var dY = (e, t) => {
55449
55464
  }
55450
55465
  resolveTableAnchor(e, t) {
55451
55466
  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;
55467
+ let n = e.getBoundingClientRect(), r = Sq(n, this.editorWrapper), i = n.width, a = r.anchorLeftInContent + i - t - ZY, o = r.anchorTopInContent - QY + $Y;
55453
55468
  return {
55454
55469
  anchorLeftInContent: a,
55455
55470
  anchorTopInContent: o,
@@ -55466,22 +55481,22 @@ var dY = (e, t) => {
55466
55481
  if (e === null) return;
55467
55482
  let t = this.resolveTableAnchor(this.currentTableElement, e);
55468
55483
  if (!t) return;
55469
- let n = bq({
55484
+ let n = Tq({
55470
55485
  wrapper: this.editorWrapper,
55471
55486
  anchor: t,
55472
55487
  overlaySize: { width: e },
55473
- placement: XY,
55488
+ placement: tX,
55474
55489
  offsetY: 0,
55475
- boundaryInset: YY
55490
+ boundaryInset: eX
55476
55491
  }, this.portalContainer);
55477
55492
  this.actionsContainer.style.left = `${n.left}px`, this.actionsContainer.style.top = `${n.top}px`;
55478
55493
  }
55479
55494
  update(e) {
55480
- if (this.view = e, !this.editorWrapper || !rX(e)) {
55495
+ if (this.view = e, !this.editorWrapper || !cX(e)) {
55481
55496
  this.detach();
55482
55497
  return;
55483
55498
  }
55484
- let t = MY(e.state);
55499
+ let t = LY(e.state);
55485
55500
  if (!t) {
55486
55501
  this.detach();
55487
55502
  return;
@@ -55497,102 +55512,102 @@ var dY = (e, t) => {
55497
55512
  return;
55498
55513
  }
55499
55514
  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;
55515
+ 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
55516
  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
55517
  }
55503
55518
  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;
55519
+ 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
55520
  }
55506
55521
  destroy() {
55507
55522
  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
55523
  }
55509
- }, aX = (e, t) => {
55524
+ }, uX = (e, t) => {
55510
55525
  let n = SF(void 0, t);
55511
55526
  return Pw(() => new Xu({
55512
- key: new $u(GY),
55513
- view: (t) => new iX(t, n, e)
55527
+ key: new $u(XY),
55528
+ view: (t) => new lX(t, n, e)
55514
55529
  }));
55515
- }, oX = "list_item", sX = "li[data-item-type=\"task\"]", cX = 24, lX = (e, t) => {
55530
+ }, dX = "list_item", fX = "li[data-item-type=\"task\"]", pX = 24, mX = (e, t) => {
55516
55531
  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) => {
55532
+ return e.clientX >= n.left && e.clientX <= n.left + pX && e.clientY >= n.top && e.clientY <= n.top + pX;
55533
+ }, hX = (e) => {
55519
55534
  if (!(e instanceof Element)) return null;
55520
- let t = e.closest(sX);
55535
+ let t = e.closest(fX);
55521
55536
  return t instanceof HTMLElement ? t : null;
55522
- }, dX = (e, t) => {
55537
+ }, gX = (e, t) => {
55523
55538
  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) => {
55539
+ let n = hX(t.target);
55540
+ return !n || !mX(t, n) ? !1 : (t.preventDefault(), !0);
55541
+ }, _X = (e, t) => {
55527
55542
  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, {
55543
+ return !r || r.type.name !== dX || r.attrs.checked == null ? !1 : (e.dispatch(e.state.tr.setNodeMarkup(n, void 0, {
55529
55544
  ...r.attrs,
55530
55545
  checked: !r.attrs.checked
55531
55546
  })), !0);
55532
- }, pX = Pw(() => new Xu({ props: { handleDOMEvents: {
55533
- mousedown: (e, t) => dX(e, t),
55534
- dblclick: (e, t) => dX(e, t),
55547
+ }, vX = Pw(() => new Xu({ props: { handleDOMEvents: {
55548
+ mousedown: (e, t) => gX(e, t),
55549
+ dblclick: (e, t) => gX(e, t),
55535
55550
  click: (e, t) => {
55536
55551
  if (!e.editable) return !1;
55537
- let n = uX(t.target);
55538
- return !n || !lX(t, n) || !fX(e, n) ? !1 : (t.preventDefault(), !0);
55552
+ let n = hX(t.target);
55553
+ return !n || !mX(t, n) || !_X(e, n) ? !1 : (t.preventDefault(), !0);
55539
55554
  }
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) => {
55555
+ } } })), 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
55556
  let { $from: t } = e.selection;
55542
55557
  for (let e = t.depth; e >= 0; --e) {
55543
55558
  let n = t.node(e);
55544
- if (n.type.name === _X) return n.type;
55559
+ if (n.type.name === SX) return n.type;
55545
55560
  }
55546
55561
  return null;
55547
- }, bX = (e) => {
55562
+ }, TX = (e) => {
55548
55563
  let { selection: t, doc: n } = e;
55549
55564
  if (t.empty) return [t.$from.start()];
55550
55565
  let r = /* @__PURE__ */ new Set();
55551
55566
  return n.nodesBetween(t.from, t.to, (e, t) => {
55552
55567
  e.isTextblock && r.add(t + 1);
55553
55568
  }), 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;
55569
+ }, EX = (e, t) => {
55570
+ let { state: n } = e, r = " ".repeat(bX), i = TX(n).sort((e, t) => t - e), a = n.tr;
55556
55571
  return n.selection.empty ? a.insertText(r, n.selection.to) : i.forEach((e) => {
55557
55572
  a.insertText(r, e);
55558
55573
  }), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
55559
- }, SX = (e, t) => {
55574
+ }, DX = (e, t) => {
55560
55575
  let { state: n } = e, { selection: r } = n;
55561
55576
  if (!(r instanceof N)) return !1;
55562
- let i = bX(n).sort((e, t) => t - e), a = n.tr;
55577
+ let i = TX(n).sort((e, t) => t - e), a = n.tr;
55563
55578
  return i.forEach((e) => {
55564
- let t = n.doc.resolve(e).parent.textContent.match(gX)?.[0].length ?? 0, r = Math.min(t, hX);
55579
+ let t = n.doc.resolve(e).parent.textContent.match(xX)?.[0].length ?? 0, r = Math.min(t, bX);
55565
55580
  r <= 0 || a.delete(e, e + r);
55566
55581
  }), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
55567
- }, CX = Pw(() => new Xu({
55582
+ }, OX = Pw(() => new Xu({
55568
55583
  key: new $u("zt-md-tab-space-indent"),
55569
55584
  props: { handleKeyDown: (e, t) => {
55570
55585
  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);
55586
+ if (!CX(n) || t.defaultPrevented || t.key !== yX || t.altKey || t.ctrlKey || t.metaKey) return !1;
55587
+ let r = wX(n.state);
55573
55588
  if (r) {
55574
55589
  let e = (t.shiftKey ? yE(r) : SE(r))(n.state, n.dispatch);
55575
55590
  return t.preventDefault(), e || !0;
55576
55591
  }
55577
- return t.shiftKey ? SX(n, t) : xX(n, t);
55592
+ return t.shiftKey ? DX(n, t) : EX(n, t);
55578
55593
  } }
55579
- })), wX = (e) => {
55594
+ })), kX = (e) => {
55580
55595
  let t = (e instanceof Element ? e : e.parentElement)?.closest("code");
55581
55596
  return t instanceof HTMLElement && !t.closest("pre") ? t : null;
55582
- }, TX = (e, t, n) => wX(e.domAtPos(t, n).node), EX = (e) => {
55597
+ }, AX = (e, t, n) => kX(e.domAtPos(t, n).node), jX = (e) => {
55583
55598
  let t = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT), n = t.nextNode(), r = null;
55584
55599
  for (; n;) n.data.length > 0 && (r = n), n = t.nextNode();
55585
55600
  return r;
55586
- }, DX = (e, t, n) => {
55601
+ }, MX = (e, t, n) => {
55587
55602
  let r = e.domAtPos(t, n);
55588
55603
  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();
55604
+ }, NX = (e, t) => {
55605
+ let n = e.domAtPos(t, -1), r = kX(n.node), i = e.dom.ownerDocument.getSelection();
55591
55606
  if (!r) {
55592
55607
  i?.collapse(n.node, n.offset);
55593
55608
  return;
55594
55609
  }
55595
- let a = EX(r);
55610
+ let a = jX(r);
55596
55611
  if (!a) {
55597
55612
  let e = r.childNodes.length;
55598
55613
  i?.collapse(r, e);
@@ -55600,7 +55615,7 @@ var dY = (e, t) => {
55600
55615
  }
55601
55616
  let o = a.data.length;
55602
55617
  i?.collapse(a, o);
55603
- }, kX = {
55618
+ }, PX = {
55604
55619
  left: {
55605
55620
  inwardKey: "ArrowRight",
55606
55621
  outwardKey: "ArrowLeft"
@@ -55609,13 +55624,13 @@ var dY = (e, t) => {
55609
55624
  inwardKey: "ArrowLeft",
55610
55625
  outwardKey: "ArrowRight"
55611
55626
  }
55612
- }, AX = {
55627
+ }, FX = {
55613
55628
  left: "nodeAfter",
55614
55629
  right: "nodeBefore"
55615
- }, jX = (e, t) => {
55630
+ }, IX = (e, t) => {
55616
55631
  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;
55632
+ }, LX = (e, t, n, r, i) => {
55633
+ if (t.key === "ArrowRight") return IX(e, i), !1;
55619
55634
  if (t.key !== "ArrowLeft") return !1;
55620
55635
  t.preventDefault();
55621
55636
  let a = (e.state.storedMarks ?? e.state.selection.$from.marks()).filter((e) => e.type !== n);
@@ -55623,35 +55638,35 @@ var dY = (e, t) => {
55623
55638
  ...r,
55624
55639
  placement: "outside"
55625
55640
  })), !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;
55641
+ }, RX = (e, t, n, r, i) => {
55642
+ if (r.placement === "inside") return LX(e, t, n, r, i);
55643
+ let a = PX[r.side];
55644
+ if (t.key === a.outwardKey) return IX(e, i), !1;
55630
55645
  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;
55646
+ let o = FX[r.side], s = e.state.selection.$from[o], c = s ? n.isInSet(s.marks) : null;
55647
+ if (!c) return IX(e, i), !1;
55633
55648
  t.preventDefault();
55634
55649
  let l = e.state.storedMarks ?? e.state.selection.$from.marks(), u = c.addToSet(l);
55635
55650
  return e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r.position)).setStoredMarks(u).setMeta(i, r.side === "left" ? {
55636
55651
  ...r,
55637
55652
  placement: "inside"
55638
- } : null)), r.side === "right" && OX(e, r.position), !0;
55639
- }, PX = (e, t) => !!t.isInSet(e), FX = (e, t, n) => {
55653
+ } : null)), r.side === "right" && NX(e, r.position), !0;
55654
+ }, zX = (e, t) => !!t.isInSet(e), BX = (e, t, n) => {
55640
55655
  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) => {
55656
+ return !a || zX(i?.marks ?? [], n) || !zX(a.marks, n) ? null : n.isInSet(a.marks);
55657
+ }, VX = (e, t, n) => {
55643
55658
  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) => {
55659
+ return !i || !zX(i.marks, n) || zX(a?.marks ?? [], n) ? null : n.isInSet(i.marks);
55660
+ }, HX = new $u("zt-md-inline-code-boundary-navigation"), UX = "inlineCode", WX = 2, GX = (e, t, n, r) => {
55646
55661
  let i = t > 0 ? [t, t - 1] : [t];
55647
55662
  for (let [t, a] of i.entries()) {
55648
- let i = IX(e, a, r);
55663
+ let i = VX(e, a, r);
55649
55664
  if (!i) continue;
55650
55665
  let o = e.state.doc.resolve(a).nodeAfter;
55651
55666
  if (o !== null && !o.isText) continue;
55652
- let s = TX(e, a, -1);
55667
+ let s = AX(e, a, -1);
55653
55668
  if (!s) continue;
55654
- let c = n <= s.getBoundingClientRect().right + zX;
55669
+ let c = n <= s.getBoundingClientRect().right + WX;
55655
55670
  if (!(t > 0 && !c)) return {
55656
55671
  boundaryPosition: a,
55657
55672
  inlineCodeMark: i,
@@ -55660,203 +55675,203 @@ var dY = (e, t) => {
55660
55675
  };
55661
55676
  }
55662
55677
  return null;
55663
- }, VX = (e, t) => {
55678
+ }, KX = (e, t) => {
55664
55679
  if (t.button !== 0 || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !e.editable) return !1;
55665
55680
  let n = e.posAtCoords({
55666
55681
  left: t.clientX,
55667
55682
  top: t.clientY
55668
- }), r = e.state.schema.marks[RX];
55683
+ }), r = e.state.schema.marks[UX];
55669
55684
  if (!n || !r) return !1;
55670
- let i = n.pos, a = e.state.doc.resolve(i), o = FX(e, i, r), s = a.nodeBefore;
55685
+ let i = n.pos, a = e.state.doc.resolve(i), o = BX(e, i, r), s = a.nodeBefore;
55671
55686
  if (o && (!s || s.isText)) {
55672
- let n = TX(e, i, 1);
55687
+ let n = AX(e, i, 1);
55673
55688
  if (!n) return !1;
55674
55689
  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
55690
  position: i,
55676
55691
  side: "left",
55677
55692
  placement: "inside"
55678
55693
  } : 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;
55694
+ 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
55695
  }
55681
- let c = BX(e, i, t.clientX, r);
55696
+ let c = GX(e, i, t.clientX, r);
55682
55697
  if (!c) return !1;
55683
55698
  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
55699
  position: l,
55685
55700
  side: "right",
55686
55701
  placement: "outside"
55687
55702
  } : 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 = {
55703
+ 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;
55704
+ }, 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
55705
  left: -1,
55691
55706
  right: 1
55692
- }, qX = {
55707
+ }, QX = {
55693
55708
  left: 1,
55694
55709
  right: -1
55695
- }, JX = (e) => {
55710
+ }, $X = (e) => {
55696
55711
  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) => {
55712
+ return t.className = JX, t.dataset.side = e.side, t.dataset.placement = e.placement, t.contentEditable = "false", t.setAttribute("aria-hidden", "true"), t;
55713
+ }, eZ = (e, t) => {
55699
55714
  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;
55715
+ let n = e.schema.marks[qX], r = e.doc.resolve(t.position).nodeAfter, i = r && n ? n.isInSet(r.marks) : null;
55701
55716
  return i ? [i] : null;
55702
- }, XX = (e) => {
55703
- let t = LX.getState(e);
55717
+ }, tZ = (e) => {
55718
+ let t = HX.getState(e);
55704
55719
  if (!t) return wS.empty;
55705
- let n = YX(e, t);
55720
+ let n = eZ(e, t);
55706
55721
  if (!n) return wS.empty;
55707
- let r = t.placement === "inside" ? 1 : KX[t.side], i = JX(t), a = xS.widget(t.position, i, {
55722
+ let r = t.placement === "inside" ? 1 : ZX[t.side], i = $X(t), a = xS.widget(t.position, i, {
55708
55723
  side: r,
55709
55724
  marks: n,
55710
- key: `${WX}-${t.side}-${t.placement}`,
55725
+ key: `${YX}-${t.side}-${t.placement}`,
55711
55726
  ignoreSelection: !0,
55712
55727
  relaxedSide: !0
55713
55728
  });
55714
55729
  return wS.create(e.doc, [a]);
55715
- }, ZX = (e, t) => {
55730
+ }, nZ = (e, t) => {
55716
55731
  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);
55732
+ let n = e.dom.querySelector(`.${JX}[data-side='${t.side}'][data-placement='outside']`), r = QX[t.side], i = AX(e, t.position, r);
55718
55733
  if (!n || !i) return;
55719
55734
  let a = n.getBoundingClientRect().left, o = i.getBoundingClientRect(), s = t.side === "left" ? o.left - 1 : o.right + 1, c = Math.round(s - a);
55720
55735
  n.style.setProperty("--zt-md-inline-code-boundary-offset-x", `${c}px`);
55721
- }, QX = "inlineCode", $X = (e, t) => {
55736
+ }, rZ = "inlineCode", iZ = (e, t) => {
55722
55737
  let { selection: n } = e.state;
55723
55738
  if (!n.empty) return !1;
55724
55739
  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) => {
55740
+ return !!(r && zX(r.marks, t) && (!i || !zX(i.marks, t)));
55741
+ }, aZ = (e, t) => {
55727
55742
  let { selection: n } = e.state;
55728
55743
  if (!n.empty) return !1;
55729
55744
  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);
55745
+ return !!(i && zX(i.marks, t) && (!r || !zX(r.marks, t)));
55746
+ }, oZ = (e, t, n) => {
55747
+ let r = BX(e, t, n);
55733
55748
  if (!r) return !1;
55734
55749
  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, {
55750
+ return e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, t)).setStoredMarks(a).setMeta(HX, {
55736
55751
  position: t,
55737
55752
  side: "left",
55738
55753
  placement: "inside"
55739
55754
  })), !0;
55740
- }, nZ = (e, t) => t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !e.editable, rZ = (e, t) => {
55755
+ }, sZ = (e, t) => t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !e.editable, cZ = (e, t) => {
55741
55756
  let { selection: n } = e.state;
55742
55757
  if (!n.empty) return null;
55743
55758
  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) => {
55759
+ return !r || !zX(r.marks, t) ? null : Array.from(r.textContent).length === 1 ? n.from - r.nodeSize : null;
55760
+ }, lZ = (e, t, n) => {
55746
55761
  if (t.key !== "ArrowLeft") return !1;
55747
- let r = rZ(e, n);
55762
+ let r = cZ(e, n);
55748
55763
  if (r === null) return !1;
55749
55764
  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, {
55765
+ return zX(i, n) ? (t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(HX, {
55751
55766
  position: r,
55752
55767
  side: "left",
55753
55768
  placement: "inside"
55754
55769
  })), !0) : !1;
55755
- }, aZ = (e, t, n) => {
55756
- if (!eZ(e, n)) return !1;
55770
+ }, uZ = (e, t, n) => {
55771
+ if (!aZ(e, n)) return !1;
55757
55772
  let r = e.state.storedMarks ?? e.state.selection.$from.marks();
55758
- if (!PX(r, n)) return fZ(e), !1;
55773
+ if (!zX(r, n)) return _Z(e), !1;
55759
55774
  t.preventDefault();
55760
55775
  let i = r.filter((e) => e.type !== n);
55761
- return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(LX, {
55776
+ return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(HX, {
55762
55777
  position: e.state.selection.from,
55763
55778
  side: "left",
55764
55779
  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;
55780
+ })), MX(e, e.state.selection.from, -1), !0;
55781
+ }, dZ = (e, t, n) => {
55782
+ if (t.key !== "ArrowLeft" || !iZ(e, n)) return !1;
55768
55783
  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, {
55784
+ return zX(r, n) ? !1 : (t.preventDefault(), e.dispatch(e.state.tr.setStoredMarks(r).setMeta(HX, {
55770
55785
  position: e.state.selection.from,
55771
55786
  side: "right",
55772
55787
  placement: "outside"
55773
- })), DX(e, e.state.selection.from, 1), !0);
55774
- }, sZ = (e, t) => {
55788
+ })), MX(e, e.state.selection.from, 1), !0);
55789
+ }, fZ = (e, t) => {
55775
55790
  let { selection: n } = e.state;
55776
55791
  if (!n.empty) return null;
55777
55792
  let r = n.$from.nodeBefore;
55778
- if (!r?.isText || PX(r.marks, t) || Array.from(r.textContent).length !== 1) return null;
55793
+ if (!r?.isText || zX(r.marks, t) || Array.from(r.textContent).length !== 1) return null;
55779
55794
  let i = n.from - r.nodeSize;
55780
- return IX(e, i, t) ? i : null;
55781
- }, cZ = (e, t, n) => {
55795
+ return VX(e, i, t) ? i : null;
55796
+ }, pZ = (e, t, n) => {
55782
55797
  if (t.key !== "ArrowLeft") return !1;
55783
- let r = sZ(e, n);
55798
+ let r = fZ(e, n);
55784
55799
  if (r === null) return !1;
55785
55800
  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, {
55801
+ return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(HX, {
55787
55802
  position: r,
55788
55803
  side: "right",
55789
55804
  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);
55805
+ })), MX(e, r, 1), !0;
55806
+ }, 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) => {
55807
+ let n = e.getMeta(HX);
55793
55808
  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 {
55809
+ }, _Z = (e) => {
55810
+ HX.getState(e.state) != null && e.dispatch(e.state.tr.setMeta(HX, null));
55811
+ }, vZ = (e) => (_Z(e), !1), yZ = class {
55797
55812
  constructor(e) {
55798
55813
  this.editorDom = e.dom, this.update(e);
55799
55814
  }
55800
55815
  update(e) {
55801
- let t = LX.getState(e.state), n = t != null;
55802
- this.editorDom.classList.toggle(GX, n), ZX(e, t);
55816
+ let t = HX.getState(e.state), n = t != null;
55817
+ this.editorDom.classList.toggle(XX, n), nZ(e, t);
55803
55818
  }
55804
55819
  destroy() {
55805
- this.editorDom.classList.remove(GX);
55820
+ this.editorDom.classList.remove(XX);
55806
55821
  }
55807
- }, hZ = (e) => new mZ(e), gZ = (e) => {
55822
+ }, bZ = (e) => new yZ(e), xZ = (e) => {
55808
55823
  if (!(e instanceof Element)) return !1;
55809
55824
  let t = e.closest("code");
55810
55825
  return !!(t && !t.closest("pre"));
55811
- }, _Z = (e, t, n) => {
55826
+ }, SZ = (e, t, n) => {
55812
55827
  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);
55828
+ if (KX(e, n)) return !0;
55829
+ let r = xZ(n.target), i = e.state.schema.marks[rZ];
55830
+ if (i && r && oZ(e, t, i)) return n.preventDefault(), !0;
55831
+ let a = HX.getState(e.state);
55817
55832
  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,
55833
+ let o = e.state.storedMarks, s = e.state.tr.setMeta(HX, null);
55834
+ return o !== null && i && !zX(o, i) && s.setStoredMarks(null), e.dispatch(s), !1;
55835
+ }, 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 = {
55836
+ ArrowLeft: mZ,
55822
55837
  ArrowRight: (e, t, n) => {
55823
55838
  if (t.key !== "ArrowRight") return !1;
55824
- if (vZ(e, t, n)) return !0;
55825
- if (!$X(e, n)) return !1;
55839
+ if (CZ(e, t, n)) return !0;
55840
+ if (!iZ(e, n)) return !1;
55826
55841
  let r = e.state.storedMarks ?? e.state.selection.$from.marks();
55827
- if (!PX(r, n)) return fZ(e), !1;
55842
+ if (!zX(r, n)) return _Z(e), !1;
55828
55843
  t.preventDefault();
55829
55844
  let i = r.filter((e) => e.type !== n);
55830
- return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(LX, {
55845
+ return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(HX, {
55831
55846
  position: e.state.selection.from,
55832
55847
  side: "right",
55833
55848
  placement: "outside"
55834
- })), DX(e, e.state.selection.from, 1), !0;
55849
+ })), MX(e, e.state.selection.from, 1), !0;
55835
55850
  }
55836
- }, bZ = (e, t) => {
55837
- if (nZ(e, t)) return !1;
55838
- let n = yZ[t.key];
55851
+ }, TZ = (e, t) => {
55852
+ if (sZ(e, t)) return !1;
55853
+ let n = wZ[t.key];
55839
55854
  if (!n) return !1;
55840
- let r = e.state.schema.marks[QX];
55855
+ let r = e.state.schema.marks[rZ];
55841
55856
  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,
55857
+ let i = HX.getState(e.state);
55858
+ return i ? RX(e, t, r, i, HX) : n(e, t, r);
55859
+ }, EZ = Pw(() => new Xu({
55860
+ key: HX,
55861
+ view: bZ,
55847
55862
  state: {
55848
- init: uZ,
55849
- apply: dZ
55863
+ init: hZ,
55864
+ apply: gZ
55850
55865
  },
55851
55866
  props: {
55852
- handleKeyDown: bZ,
55853
- handleClick: _Z,
55854
- decorations: XX,
55855
- handleDOMEvents: { blur: pZ }
55867
+ handleKeyDown: TZ,
55868
+ handleClick: SZ,
55869
+ decorations: tZ,
55870
+ handleDOMEvents: { blur: vZ }
55856
55871
  }
55857
- })), SZ = class {
55872
+ })), DZ = class {
55858
55873
  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;
55874
+ 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
55875
  }
55861
55876
  eq(e) {
55862
55877
  return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
@@ -55878,13 +55893,13 @@ var dY = (e, t) => {
55878
55893
  }
55879
55894
  }
55880
55895
  checkResult(e, t) {
55881
- return (!this.wholeWord || NZ(e, t.from) && NZ(e, t.to)) && (!this.filter || this.filter(e, t));
55896
+ return (!this.wholeWord || RZ(e, t.from) && RZ(e, t.to)) && (!this.filter || this.filter(e, t));
55882
55897
  }
55883
55898
  unquote(e) {
55884
55899
  return this.literal ? e : e.replace(/\\([nrt\\])/g, (e, t) => t == "n" ? "\n" : t == "r" ? "\r" : t == "t" ? " " : "\\");
55885
55900
  }
55886
55901
  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;
55902
+ 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
55903
  for (let o of c) if (typeof o == "string") i = i.addToEnd(e.schema.text(o, n));
55889
55904
  else if (l = s[o.group]) {
55890
55905
  let n = t.matchStart + l[0], s = t.matchStart + l[1];
@@ -55900,22 +55915,22 @@ var dY = (e, t) => {
55900
55915
  insert: new M(i, 0, 0)
55901
55916
  }), r;
55902
55917
  }
55903
- }, CZ = new class {
55918
+ }, OZ = new class {
55904
55919
  findNext() {
55905
55920
  return null;
55906
55921
  }
55907
55922
  findPrev() {
55908
55923
  return null;
55909
55924
  }
55910
- }(), wZ = class {
55925
+ }(), kZ = class {
55911
55926
  constructor(e) {
55912
55927
  this.query = e;
55913
55928
  let t = e.unquote(e.search);
55914
55929
  e.caseSensitive || (t = t.toLowerCase()), this.string = t;
55915
55930
  }
55916
55931
  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);
55932
+ return LZ(e.doc, t, n, (e, r) => {
55933
+ 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
55934
  return o < 0 ? null : {
55920
55935
  from: i + o,
55921
55936
  to: i + o + this.string.length,
@@ -55925,8 +55940,8 @@ var dY = (e, t) => {
55925
55940
  });
55926
55941
  }
55927
55942
  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));
55943
+ return LZ(e.doc, t, n, (e, r) => {
55944
+ let i = Math.max(r, n), a = IZ(e).slice(i - r, Math.min(e.content.size, t - r));
55930
55945
  this.query.caseSensitive || (a = a.toLowerCase());
55931
55946
  let o = a.lastIndexOf(this.string);
55932
55947
  return o < 0 ? null : {
@@ -55937,13 +55952,13 @@ var dY = (e, t) => {
55937
55952
  };
55938
55953
  });
55939
55954
  }
55940
- }, TZ = "g" + (/x/.unicode == null ? "" : "u") + (/x/.hasIndices == null ? "" : "d"), EZ = class {
55955
+ }, AZ = "g" + (/x/.unicode == null ? "" : "u") + (/x/.hasIndices == null ? "" : "d"), jZ = class {
55941
55956
  constructor(e) {
55942
- this.query = e, this.regexp = new RegExp(e.search, TZ + (e.caseSensitive ? "" : "i"));
55957
+ this.query = e, this.regexp = new RegExp(e.search, AZ + (e.caseSensitive ? "" : "i"));
55943
55958
  }
55944
55959
  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));
55960
+ return LZ(e.doc, t, n, (e, r) => {
55961
+ let i = IZ(e).slice(0, Math.min(e.content.size, n - r));
55947
55962
  this.regexp.lastIndex = t - r;
55948
55963
  let a = this.regexp.exec(i);
55949
55964
  return a ? {
@@ -55955,8 +55970,8 @@ var dY = (e, t) => {
55955
55970
  });
55956
55971
  }
55957
55972
  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;
55973
+ return LZ(e.doc, t, n, (e, n) => {
55974
+ let r = IZ(e).slice(0, Math.min(e.content.size, t - n)), i;
55960
55975
  for (let e = 0;;) {
55961
55976
  this.regexp.lastIndex = e;
55962
55977
  let t = this.regexp.exec(r);
@@ -55972,7 +55987,7 @@ var dY = (e, t) => {
55972
55987
  });
55973
55988
  }
55974
55989
  };
55975
- function DZ(e) {
55990
+ function MZ(e) {
55976
55991
  if (e.indices) return e.indices;
55977
55992
  let t = [[0, e[0].length]];
55978
55993
  for (let n = 1, r = 0; n < e.length; n++) {
@@ -55981,7 +55996,7 @@ function DZ(e) {
55981
55996
  }
55982
55997
  return t;
55983
55998
  }
55984
- function OZ(e) {
55999
+ function NZ(e) {
55985
56000
  let t = [], n = -1;
55986
56001
  function r(e) {
55987
56002
  let n = t.length - 1;
@@ -56004,52 +56019,52 @@ function OZ(e) {
56004
56019
  }
56005
56020
  return t;
56006
56021
  }
56007
- function kZ(e) {
56022
+ function PZ(e) {
56008
56023
  try {
56009
- return new RegExp(e, TZ), !0;
56024
+ return new RegExp(e, AZ), !0;
56010
56025
  } catch {
56011
56026
  return !1;
56012
56027
  }
56013
56028
  }
56014
- var AZ = /* @__PURE__ */ new WeakMap();
56015
- function jZ(e) {
56016
- let t = AZ.get(e);
56029
+ var FZ = /* @__PURE__ */ new WeakMap();
56030
+ function IZ(e) {
56031
+ let t = FZ.get(e);
56017
56032
  if (t) return t;
56018
56033
  let n = "";
56019
56034
  for (let t = 0; t < e.childCount; t++) {
56020
56035
  let r = e.child(t);
56021
- r.isText ? n += r.text : r.isLeaf ? n += "" : n += " " + jZ(r) + " ";
56036
+ r.isText ? n += r.text : r.isLeaf ? n += "" : n += " " + IZ(r) + " ";
56022
56037
  }
56023
- return AZ.set(e, n), n;
56038
+ return FZ.set(e, n), n;
56024
56039
  }
56025
- function MZ(e, t, n, r, i = 0) {
56040
+ function LZ(e, t, n, r, i = 0) {
56026
56041
  if (e.inlineContent) return r(e, i);
56027
56042
  if (!e.isLeaf) if (t > n) for (let a = e.childCount - 1, o = i + e.content.size; a >= 0 && o > n; a--) {
56028
56043
  let i = e.child(a);
56029
56044
  if (o -= i.nodeSize, o < t) {
56030
- let e = MZ(i, t, n, r, o + 1);
56045
+ let e = LZ(i, t, n, r, o + 1);
56031
56046
  if (e != null) return e;
56032
56047
  }
56033
56048
  }
56034
56049
  else for (let a = 0, o = i; a < e.childCount && o < n; a++) {
56035
56050
  let i = e.child(a), s = o;
56036
56051
  if (o += i.nodeSize, o > t) {
56037
- let e = MZ(i, t, n, r, s + 1);
56052
+ let e = LZ(i, t, n, r, s + 1);
56038
56053
  if (e != null) return e;
56039
56054
  }
56040
56055
  }
56041
56056
  return null;
56042
56057
  }
56043
- function NZ(e, t) {
56058
+ function RZ(e, t) {
56044
56059
  let n = e.doc.resolve(t), r = n.nodeBefore, i = n.nodeAfter;
56045
56060
  return !r || !i || !r.isText || !i.isText ? !0 : !/\p{L}$/u.test(r.text) || !/^\p{L}/u.test(i.text);
56046
56061
  }
56047
- var PZ = class {
56062
+ var zZ = class {
56048
56063
  constructor(e, t, n) {
56049
56064
  this.query = e, this.range = t, this.deco = n;
56050
56065
  }
56051
56066
  };
56052
- function FZ(e, t, n) {
56067
+ function BZ(e, t, n) {
56053
56068
  if (!t.valid) return wS.empty;
56054
56069
  let r = [], i = e.selection;
56055
56070
  for (let a = n ? n.from : 0, o = n ? n.to : e.doc.content.size;;) {
@@ -56060,18 +56075,18 @@ function FZ(e, t, n) {
56060
56075
  }
56061
56076
  return wS.create(e.doc, r);
56062
56077
  }
56063
- var IZ = new $u("search");
56064
- function LZ(e = {}) {
56078
+ var VZ = new $u("search");
56079
+ function HZ(e = {}) {
56065
56080
  return new Xu({
56066
- key: IZ,
56081
+ key: VZ,
56067
56082
  state: {
56068
56083
  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));
56084
+ let r = e.initialQuery || new DZ({ search: "" }), i = e.initialRange || null;
56085
+ return new zZ(r, i, BZ(n, r, i));
56071
56086
  },
56072
56087
  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));
56088
+ let i = e.getMeta(VZ);
56089
+ if (i) return new zZ(i.query, i.range, BZ(r, i.query, i.range));
56075
56090
  if (e.docChanged || e.selectionSet) {
56076
56091
  let n = t.range;
56077
56092
  if (n) {
@@ -56081,53 +56096,53 @@ function LZ(e = {}) {
56081
56096
  to: r
56082
56097
  } : null;
56083
56098
  }
56084
- t = new PZ(t.query, n, FZ(r, t.query, n));
56099
+ t = new zZ(t.query, n, BZ(r, t.query, n));
56085
56100
  }
56086
56101
  return t;
56087
56102
  }
56088
56103
  },
56089
- props: { decorations: (e) => IZ.getState(e).deco }
56104
+ props: { decorations: (e) => VZ.getState(e).deco }
56090
56105
  });
56091
56106
  }
56092
- function RZ(e) {
56093
- return IZ.getState(e);
56107
+ function UZ(e) {
56108
+ return VZ.getState(e);
56094
56109
  }
56095
- function zZ(e, t, n = null) {
56096
- return e.setMeta(IZ, {
56110
+ function WZ(e, t, n = null) {
56111
+ return e.setMeta(VZ, {
56097
56112
  query: t,
56098
56113
  range: n
56099
56114
  });
56100
56115
  }
56101
- function BZ(e, t, n, r, i) {
56116
+ function GZ(e, t, n, r, i) {
56102
56117
  let a = e.range || {
56103
56118
  from: 0,
56104
56119
  to: t.doc.content.size
56105
56120
  }, o = e.query.findNext(t, Math.max(i, a.from), a.to);
56106
56121
  return !o && n && (o = e.query.findNext(t, a.from, Math.min(r, a.to))), o;
56107
56122
  }
56108
- function VZ(e, t, n, r, i) {
56123
+ function KZ(e, t, n, r, i) {
56109
56124
  let a = e.range || {
56110
56125
  from: 0,
56111
56126
  to: t.doc.content.size
56112
56127
  }, o = e.query.findPrev(t, Math.min(r, a.to), a.from);
56113
56128
  return !o && n && (o = e.query.findPrev(t, a.to, Math.max(i, a.from))), o;
56114
56129
  }
56115
- function HZ(e, t) {
56130
+ function qZ(e, t) {
56116
56131
  return (n, r) => {
56117
- let i = IZ.getState(n);
56132
+ let i = VZ.getState(n);
56118
56133
  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);
56134
+ let { from: a, to: o } = n.selection, s = t > 0 ? GZ(i, n, e, a, o) : KZ(i, n, e, a, o);
56120
56135
  if (!s) return !1;
56121
56136
  let c = N.create(n.doc, s.from, s.to);
56122
56137
  return r && r(n.tr.setSelection(c).scrollIntoView()), !0;
56123
56138
  };
56124
56139
  }
56125
- var UZ = HZ(!0, 1), WZ = HZ(!0, -1);
56126
- function GZ(e, t) {
56140
+ var JZ = qZ(!0, 1), YZ = qZ(!0, -1);
56141
+ function XZ(e, t) {
56127
56142
  return (n, r) => {
56128
- let i = IZ.getState(n);
56143
+ let i = VZ.getState(n);
56129
56144
  if (!i || !i.query.valid) return !1;
56130
- let { from: a } = n.selection, o = BZ(i, n, e, a, a);
56145
+ let { from: a } = n.selection, o = GZ(i, n, e, a, a);
56131
56146
  if (!o) return !1;
56132
56147
  if (!r) return !0;
56133
56148
  if (n.selection.from == o.from && n.selection.to == o.to) {
@@ -56136,15 +56151,15 @@ function GZ(e, t) {
56136
56151
  let { from: t, to: n, insert: r } = s[e];
56137
56152
  a.replace(t, n, r);
56138
56153
  }
56139
- let c = t && BZ(i, n, e, o.from, o.to);
56154
+ let c = t && GZ(i, n, e, o.from, o.to);
56140
56155
  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
56156
  } else if (t) r(n.tr.setSelection(N.create(n.doc, o.from, o.to)).scrollIntoView());
56142
56157
  else return !1;
56143
56158
  return !0;
56144
56159
  };
56145
56160
  }
56146
- var KZ = GZ(!0, !0), qZ = (e, t) => {
56147
- let n = IZ.getState(e);
56161
+ var ZZ = XZ(!0, !0), QZ = (e, t) => {
56162
+ let n = VZ.getState(e);
56148
56163
  if (!n) return !1;
56149
56164
  let r = [], i = n.range || {
56150
56165
  from: 0,
@@ -56167,18 +56182,18 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56167
56182
  t(i);
56168
56183
  }
56169
56184
  return !0;
56170
- }, JZ = ".zt-md-code-block-action-button[data-active='true']", YZ = ".zt-md-search-panel", XZ = 8, ZZ = {
56185
+ }, $Z = ".zt-md-code-block-action-button[data-active='true']", eQ = ".zt-md-search-panel", tQ = 8, nQ = {
56171
56186
  current: 0,
56172
56187
  total: 0,
56173
56188
  isInvalidExpression: !1
56174
- }, QZ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, $Z = (e) => new SZ({
56189
+ }, rQ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, iQ = (e) => new DZ({
56175
56190
  search: e.search,
56176
56191
  replace: e.replace,
56177
56192
  caseSensitive: e.caseSensitive,
56178
56193
  wholeWord: e.wholeWord,
56179
56194
  regexp: e.regexp,
56180
56195
  literal: !0
56181
- }), eQ = (e, t) => {
56196
+ }), aQ = (e, t) => {
56182
56197
  if (!t.valid) return [];
56183
56198
  let n = [], r = 0, i = e.doc.content.size;
56184
56199
  for (; r < i;) {
@@ -56187,133 +56202,134 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56187
56202
  n.push(a), r = Math.max(a.to, r + 1);
56188
56203
  }
56189
56204
  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);
56205
+ }, oQ = (e) => {
56206
+ let t = UZ(e);
56207
+ if (!t) return nQ;
56208
+ 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
56209
  return {
56195
56210
  current: a < 0 ? 0 : a + 1,
56196
56211
  total: i.length,
56197
56212
  isInvalidExpression: r
56198
56213
  };
56199
- }, nQ = (e, t) => e.current === t.current && e.total === t.total && e.isInvalidExpression === t.isInvalidExpression, rQ = (e) => {
56214
+ }, sQ = (e, t) => e.current === t.current && e.total === t.total && e.isInvalidExpression === t.isInvalidExpression, cQ = (e) => {
56200
56215
  if (e.state.selection.empty) return;
56201
- let t = hq(e.dom);
56216
+ let t = bq(e.dom);
56202
56217
  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;
56218
+ 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
56219
  if (i < c) {
56205
56220
  t.scrollTop += i - c;
56206
56221
  return;
56207
56222
  }
56208
56223
  a > l && (t.scrollTop += a - l);
56209
- }, iQ = (e) => {
56224
+ }, lQ = (e) => {
56210
56225
  if (e.state.selection.empty) return;
56211
56226
  let t = e.domAtPos(e.state.selection.from), n = (t.node instanceof Element ? t.node : t.node.parentElement)?.closest(".zt-md-code-block");
56212
56227
  if (n?.dataset.viewMode !== "preview") {
56213
- rQ(e);
56228
+ cQ(e);
56214
56229
  return;
56215
56230
  }
56216
- n.querySelector(JZ)?.click(), window.requestAnimationFrame(() => {
56217
- rQ(e);
56231
+ n.querySelector($Z)?.click(), window.requestAnimationFrame(() => {
56232
+ cQ(e);
56218
56233
  });
56219
- }, aQ = class {
56234
+ }, uQ = class {
56220
56235
  constructor(e, t) {
56221
- this.onSnapshotChange = t, this.snapshot = ZZ, this.emitSnapshot(e.state);
56236
+ this.onSnapshotChange = t, this.snapshot = nQ, this.emitSnapshot(e.state);
56222
56237
  }
56223
56238
  update(e) {
56224
56239
  this.emitSnapshot(e.state);
56225
56240
  }
56226
56241
  destroy() {
56227
- this.onSnapshotChange(ZZ);
56242
+ this.onSnapshotChange(nQ);
56228
56243
  }
56229
56244
  emitSnapshot(e) {
56230
- let t = tQ(e);
56231
- nQ(this.snapshot, t) || (this.snapshot = t, this.onSnapshotChange(t));
56245
+ let t = oQ(e);
56246
+ sQ(this.snapshot, t) || (this.snapshot = t, this.onSnapshotChange(t));
56232
56247
  }
56233
- }, oQ = (e) => [Pw(() => LZ()), Pw(() => new Xu({ view: (t) => new aQ(t, e) }))], sQ = (e) => {
56248
+ }, dQ = (e) => [Pw(() => HZ()), Pw(() => new Xu({ view: (t) => new uQ(t, e) }))], fQ = (e) => {
56234
56249
  let t = (t) => {
56235
56250
  e((e) => {
56236
- let n = $Z(t), r = zZ(e.state.tr, n);
56251
+ let n = iQ(t), r = WZ(e.state.tr, n);
56237
56252
  if (n.valid) {
56238
56253
  let t = n.findNext(e.state, e.state.selection.from) ?? n.findNext(e.state, 0, e.state.selection.from);
56239
56254
  t && r.setSelection(N.create(r.doc, t.from, t.to)).scrollIntoView();
56240
56255
  }
56241
- e.dispatch(r), iQ(e);
56256
+ e.dispatch(r), lQ(e);
56242
56257
  });
56243
56258
  }, n = (e, t) => {
56244
56259
  e(t.state, (e) => {
56245
56260
  t.dispatch(e.scrollIntoView());
56246
- }) && iQ(t);
56261
+ }) && lQ(t);
56247
56262
  };
56248
56263
  return {
56249
56264
  updateQuery: t,
56250
56265
  findPrevious: () => {
56251
56266
  e((e) => {
56252
- n(WZ, e);
56267
+ n(YZ, e);
56253
56268
  });
56254
56269
  },
56255
56270
  findNext: () => {
56256
56271
  e((e) => {
56257
- n(UZ, e);
56272
+ n(JZ, e);
56258
56273
  });
56259
56274
  },
56260
56275
  replaceCurrent: () => {
56261
56276
  e((e) => {
56262
- QZ(e) && n(KZ, e);
56277
+ rQ(e) && n(ZZ, e);
56263
56278
  });
56264
56279
  },
56265
56280
  replaceAll: () => {
56266
56281
  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) => {
56282
+ if (!rQ(e)) return;
56283
+ let t = UZ(e.state);
56284
+ !t || aQ(e.state, t.query).length === 0 || QZ(e.state, (t) => {
56270
56285
  e.dispatch(t);
56271
56286
  });
56272
56287
  });
56273
56288
  },
56274
56289
  clear: () => {
56275
56290
  e((e) => {
56276
- let t = new SZ({
56291
+ let t = new DZ({
56277
56292
  search: "",
56278
56293
  literal: !0
56279
56294
  });
56280
- e.dispatch(zZ(e.state.tr, t));
56295
+ e.dispatch(WZ(e.state.tr, t));
56281
56296
  });
56282
56297
  },
56283
56298
  focusCurrent: () => {
56284
56299
  e((e) => {
56285
- e.dispatch(e.state.tr.scrollIntoView()), rQ(e), e.focus();
56300
+ e.dispatch(e.state.tr.scrollIntoView()), cQ(e), e.focus();
56286
56301
  });
56287
56302
  }
56288
56303
  };
56289
- }, cQ = (e) => {
56304
+ }, pQ = (e) => {
56290
56305
  let t = e.target;
56291
56306
  if (!(t instanceof Element)) return null;
56292
56307
  let n = t.closest("a[href]");
56293
56308
  return n instanceof HTMLAnchorElement ? n : null;
56294
- }, lQ = (e) => e?.type.name === "image", uQ = (e, t) => {
56295
- let n = cQ(e);
56309
+ }, mQ = (e) => e?.type.name === "image", hQ = (e, t) => {
56310
+ let n = pQ(e);
56296
56311
  if (!n) return !1;
56297
56312
  let r = AF(n.getAttribute("href"));
56298
56313
  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 = {
56314
+ }, gQ = (e, t) => !t || !pQ(e) ? !1 : (e.preventDefault(), e.stopPropagation(), !0), _Q = (e) => {
56315
+ let t = e.messages ?? SF(), n = uX(e.contentPortalContainer, t), r = WJ(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 = vY(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
56316
  listener: mE,
56302
56317
  commonmark: yO,
56303
- taskListTransformKeymap: yJ(e.shortcutMode),
56304
- inlineCodeBoundaryNavigation: xZ,
56318
+ taskListTransformKeymap: wJ(e.shortcutMode),
56319
+ inlineCodeBoundaryNavigation: EZ,
56305
56320
  gfm: IN,
56306
56321
  history: wT,
56307
56322
  editorSearch: s,
56308
- codeBlockPrism: $q,
56323
+ codeBlockPrism: iJ,
56309
56324
  codeBlockLanguagePicker: i,
56310
56325
  clipboard: qw,
56311
56326
  indent: OT,
56312
56327
  imageDeleteSelection: pI,
56313
56328
  imagePaste: o,
56314
- tableArrowEntry: EY,
56329
+ tableArrowEntry: jY,
56315
56330
  blockBoundaryNavigation: vP,
56316
56331
  headingBackspaceEmptyParagraph: PW,
56332
+ headingFocusIndicator: zW,
56317
56333
  mathBackspaceEntry: tL,
56318
56334
  blockquoteBackspaceLift: EW,
56319
56335
  tableFocusActions: n,
@@ -56323,21 +56339,21 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56323
56339
  math: yW,
56324
56340
  mathInlineEdit: a,
56325
56341
  mathInlineArrowNavigation: ZU,
56326
- taskListToggle: pX,
56327
- tabSpaceIndent: CX,
56328
- codeBlockModASelect: qq,
56342
+ taskListToggle: vX,
56343
+ tabSpaceIndent: OX,
56344
+ codeBlockModASelect: Qq,
56329
56345
  slash: l.length > 0 ? l : null
56330
56346
  }, f = zN(d, { includeRuntime: !1 }), p = zN(d, { includeRuntime: !0 }).filter((e) => e.name === "clipboard" || e.name === "indent"), m = Ew.make();
56331
56347
  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, {
56348
+ CJ(n, e.shortcutMode), GW(n), UF(n, e.imageUpload?.allowedProtocols), n.set(vw, e.root), n.set(iw, e.markdown), n.set(_w, {
56333
56349
  editable: () => !e.readOnly,
56334
56350
  handleKeyDown: u,
56335
56351
  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
56352
+ mousedown: (t, n) => n instanceof MouseEvent ? gQ(n, e.readOnly) : !1,
56353
+ click: (t, n) => n instanceof MouseEvent ? gQ(n, e.readOnly) : !1
56338
56354
  },
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
56355
+ handleClick: (t, n, r) => hQ(r, e.readOnly),
56356
+ handleClickOn: (t, n, r, i, a, o) => hQ(a, e.readOnly) ? !0 : e.readOnly && o && mQ(r) ? (a.preventDefault(), !0) : !1
56341
56357
  });
56342
56358
  let r = n.get(xC) ?? [];
56343
56359
  n.set(xC, [
@@ -56345,14 +56361,14 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56345
56361
  ["image", eI(t)],
56346
56362
  ["math_block", xU(t)],
56347
56363
  ["math_inline", FU(t)],
56348
- ["code_block", rG(t)]
56364
+ ["code_block", cG(t)]
56349
56365
  ]), n.get(fE).markdownUpdated((t, n) => {
56350
56366
  e.onChange(n);
56351
56367
  }), c.config && c.config(n);
56352
56368
  }), f.forEach((e) => {
56353
56369
  m.use(e.plugin);
56354
56370
  });
56355
- let h = sQ((e) => {
56371
+ let h = fQ((e) => {
56356
56372
  m.action((t) => {
56357
56373
  e(t.get(mC));
56358
56374
  });
@@ -56393,7 +56409,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56393
56409
  _(e);
56394
56410
  }
56395
56411
  };
56396
- }, pQ = (e, t, n, r) => {
56412
+ }, vQ = (e, t, n, r) => {
56397
56413
  let i = e, a = i.create.bind(e);
56398
56414
  return i.create = async () => {
56399
56415
  try {
@@ -56403,10 +56419,10 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56403
56419
  throw console.error("Milkdown init failed:", e), r(e), e;
56404
56420
  }
56405
56421
  }, i;
56406
- }, mQ = (e) => {
56422
+ }, yQ = (e) => {
56407
56423
  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
56424
  t.current = null, e.focusEditorRef && (e.focusEditorRef.current = null), e.searchControllerRef && (e.searchControllerRef.current = null), n.current = e.markdown;
56409
- let c = fQ({
56425
+ let c = _Q({
56410
56426
  root: r,
56411
56427
  portalContainer: e.portalContainer,
56412
56428
  contentPortalContainer: e.contentPortalContainer,
@@ -56424,7 +56440,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56424
56440
  o.current?.(e);
56425
56441
  }
56426
56442
  });
56427
- return pQ(c.editor, c.installRuntimePlugins, () => {
56443
+ return vQ(c.editor, c.installRuntimePlugins, () => {
56428
56444
  t.current = c, e.focusEditorRef && (e.focusEditorRef.current = c.focusEditor), e.searchControllerRef && (e.searchControllerRef.current = c.searchController), a.current?.();
56429
56445
  }, (e) => {
56430
56446
  i.current?.(e);
@@ -56464,20 +56480,20 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56464
56480
  let r = t.current;
56465
56481
  !r || l.loading || e.markdown !== n.current && (n.current = e.markdown, r.setMarkdown(e.markdown));
56466
56482
  }, [l.loading, e.markdown]);
56467
- }, hQ = 160, gQ = {
56483
+ }, bQ = 160, xQ = {
56468
56484
  search: "",
56469
56485
  replace: "",
56470
56486
  caseSensitive: !1,
56471
56487
  wholeWord: !1,
56472
56488
  regexp: !1
56473
- }, _Q = {
56489
+ }, SQ = {
56474
56490
  current: 0,
56475
56491
  total: 0,
56476
56492
  isInvalidExpression: !1
56477
- }, vQ = {
56493
+ }, CQ = {
56478
56494
  "zh-CN": "只读",
56479
56495
  "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({
56496
+ }, wQ = (e) => e.length === 0 ? "\"\"" : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\r\n|\r|\n/g, "\\A ")}"`, TQ = (e) => (yQ({
56481
56497
  markdown: e.markdown,
56482
56498
  portalContainer: e.portalContainer,
56483
56499
  contentPortalContainer: e.contentPortalContainer,
@@ -56494,13 +56510,13 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56494
56510
  onInitReady: e.onInitReady,
56495
56511
  onInitError: e.onInitError,
56496
56512
  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), [
56513
+ }), /* @__PURE__ */ _(oe, {})), EQ = (e) => {
56514
+ 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
56515
  e.locale,
56500
56516
  e.messages,
56501
56517
  e.placeholder
56502
56518
  ]), ae = {
56503
- "--zt-gap-placeholder-content": yQ(ie.placeholder),
56519
+ "--zt-gap-placeholder-content": wQ(ie.placeholder),
56504
56520
  ...e.maxHeight === void 0 ? {} : {
56505
56521
  maxHeight: e.maxHeight,
56506
56522
  overflowY: "auto"
@@ -56530,7 +56546,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56530
56546
  l(!0), S.current?.updateQuery(h), requestAnimationFrame(pe);
56531
56547
  }, he = () => {
56532
56548
  let e = S.current;
56533
- e?.clear(), b(_Q), l(!1), m(!1), e && requestAnimationFrame(e.focusCurrent);
56549
+ e?.clear(), b(SQ), l(!1), m(!1), e && requestAnimationFrame(e.focusCurrent);
56534
56550
  }, ge = (e) => {
56535
56551
  g(e), S.current?.updateQuery(e);
56536
56552
  }, _e = (e) => {
@@ -56617,7 +56633,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56617
56633
  "aria-readonly": T,
56618
56634
  onMouseDown: ue,
56619
56635
  style: ae,
56620
- children: [r && a ? /* @__PURE__ */ _(se, { children: /* @__PURE__ */ _(bQ, {
56636
+ children: [r && a ? /* @__PURE__ */ _(se, { children: /* @__PURE__ */ _(TQ, {
56621
56637
  markdown: ne,
56622
56638
  locale: e.locale,
56623
56639
  portalContainer: r,
@@ -56650,4 +56666,4 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
56650
56666
  });
56651
56667
  };
56652
56668
  //#endregion
56653
- export { xQ as MilkdownEditor };
56669
+ export { EQ as MilkdownEditor };