zt-react-milkdown 0.1.28 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs +8 -8
- package/dist/index.mjs +957 -934
- package/dist/src/core/createEditor.d.ts.map +1 -1
- package/dist/src/plugins/custom/block-transform/block-transform-shortcuts.d.ts +13 -2
- package/dist/src/plugins/custom/block-transform/block-transform-shortcuts.d.ts.map +1 -1
- package/dist/src/plugins/custom/heading/heading-focus-indicator.d.ts +3 -0
- package/dist/src/plugins/custom/heading/heading-focus-indicator.d.ts.map +1 -0
- package/dist/src/plugins/custom/heading/index.d.ts +2 -0
- package/dist/src/plugins/custom/heading/index.d.ts.map +1 -1
- package/dist/src/plugins/custom/slash-menu/slash-menu-shortcuts.d.ts.map +1 -1
- package/dist/src/plugins/preset-common.d.ts +2 -0
- package/dist/src/plugins/preset-common.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
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 = "
|
|
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
|
-
},
|
|
49023
|
+
}, HW = {
|
|
49009
49024
|
html: !0,
|
|
49010
49025
|
svg: !0
|
|
49011
|
-
},
|
|
49026
|
+
}, UW = (e) => {
|
|
49012
49027
|
let t = e.trim().toLowerCase();
|
|
49013
|
-
return t ? t.startsWith("canvas-") ? Object.entries(
|
|
49014
|
-
},
|
|
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:
|
|
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:
|
|
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 =
|
|
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
|
-
},
|
|
49058
|
+
}, GW = (e) => {
|
|
49044
49059
|
let t = e.get(gD.key);
|
|
49045
|
-
e.set(gD.key,
|
|
49046
|
-
},
|
|
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
|
-
],
|
|
49072
|
+
], QW = (e) => y(i(e, {
|
|
49058
49073
|
size: 14,
|
|
49059
49074
|
strokeWidth: 2,
|
|
49060
49075
|
"aria-hidden": "true"
|
|
49061
|
-
})),
|
|
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="${[...
|
|
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>`,
|
|
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(
|
|
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 =
|
|
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(), !
|
|
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 =
|
|
49096
|
-
this.copyButton.innerHTML =
|
|
49097
|
-
},
|
|
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(),
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 ?
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 ===
|
|
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 =
|
|
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
|
-
},
|
|
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
|
-
|
|
49158
|
-
function
|
|
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
|
-
|
|
49187
|
-
function
|
|
49188
|
-
e.register(
|
|
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
|
-
|
|
49243
|
-
function
|
|
49244
|
-
e.register(
|
|
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
|
-
|
|
49307
|
-
function
|
|
49308
|
-
e.register(
|
|
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
|
-
|
|
49315
|
-
function
|
|
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
|
-
|
|
49491
|
-
function
|
|
49492
|
-
e.register(
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
49854
|
-
function
|
|
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
|
-
|
|
49910
|
-
function
|
|
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
|
-
|
|
49945
|
-
function
|
|
49946
|
-
e.register(
|
|
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
|
-
|
|
49967
|
-
function
|
|
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
|
-
|
|
50003
|
-
function
|
|
50004
|
-
e.register(
|
|
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
|
-
|
|
50103
|
-
function
|
|
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
|
-
|
|
50183
|
-
function
|
|
50184
|
-
e.register(
|
|
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
|
-
|
|
50286
|
-
function
|
|
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
|
-
|
|
50313
|
-
function
|
|
50314
|
-
e.register(
|
|
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
|
-
|
|
50378
|
-
function
|
|
50379
|
-
e.register(
|
|
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
|
-
|
|
50407
|
-
function
|
|
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
|
-
|
|
50425
|
-
function
|
|
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
|
-
|
|
50455
|
-
function
|
|
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
|
-
|
|
50524
|
-
function
|
|
50525
|
-
e.register(
|
|
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
|
-
|
|
50763
|
-
function
|
|
50764
|
-
e.register(
|
|
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
|
-
|
|
50774
|
-
function
|
|
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
|
-
|
|
50856
|
-
function
|
|
50857
|
-
e.register(
|
|
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
|
-
|
|
50896
|
-
function
|
|
50897
|
-
e.register(
|
|
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
|
-
|
|
51174
|
-
function
|
|
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
|
-
|
|
51235
|
-
function
|
|
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
|
-
|
|
51255
|
-
function
|
|
51256
|
-
e.register(
|
|
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
|
-
|
|
51412
|
-
function
|
|
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
|
-
|
|
51505
|
-
function
|
|
51506
|
-
e.register(
|
|
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
|
-
|
|
51552
|
-
function
|
|
51553
|
-
e.register(
|
|
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
|
-
|
|
51606
|
-
function
|
|
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
|
-
|
|
51636
|
-
function
|
|
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
|
-
|
|
51732
|
-
function
|
|
51733
|
-
e.register(
|
|
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
|
-
|
|
51771
|
-
function
|
|
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
|
-
|
|
51789
|
-
function
|
|
51790
|
-
e.register(
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
51845
|
+
var JG = class {
|
|
51831
51846
|
constructor(e, t) {
|
|
51832
51847
|
this.attribute = t, this.property = e;
|
|
51833
51848
|
}
|
|
51834
51849
|
};
|
|
51835
|
-
|
|
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
|
|
51839
|
-
boolean: () =>
|
|
51840
|
-
booleanish: () =>
|
|
51841
|
-
commaOrSpaceSeparated: () =>
|
|
51842
|
-
commaSeparated: () =>
|
|
51853
|
+
var YG = /* @__PURE__ */ te({
|
|
51854
|
+
boolean: () => ZG,
|
|
51855
|
+
booleanish: () => QG,
|
|
51856
|
+
commaOrSpaceSeparated: () => nK,
|
|
51857
|
+
commaSeparated: () => tK,
|
|
51843
51858
|
number: () => Q,
|
|
51844
|
-
overloadedBoolean: () =>
|
|
51845
|
-
spaceSeparated: () =>
|
|
51846
|
-
}),
|
|
51847
|
-
function
|
|
51848
|
-
return 2 ** ++
|
|
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
|
|
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),
|
|
51856
|
-
let e =
|
|
51857
|
-
|
|
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
|
-
|
|
51862
|
-
function
|
|
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
|
|
51882
|
+
function sK(e) {
|
|
51868
51883
|
let t = {}, n = {};
|
|
51869
51884
|
for (let [r, i] of Object.entries(e.properties)) {
|
|
51870
|
-
let a = new
|
|
51871
|
-
e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[
|
|
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
|
|
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
|
|
51892
|
+
var cK = sK({
|
|
51878
51893
|
properties: {
|
|
51879
51894
|
ariaActiveDescendant: null,
|
|
51880
|
-
ariaAtomic:
|
|
51895
|
+
ariaAtomic: QG,
|
|
51881
51896
|
ariaAutoComplete: null,
|
|
51882
|
-
ariaBusy:
|
|
51883
|
-
ariaChecked:
|
|
51897
|
+
ariaBusy: QG,
|
|
51898
|
+
ariaChecked: QG,
|
|
51884
51899
|
ariaColCount: Q,
|
|
51885
51900
|
ariaColIndex: Q,
|
|
51886
51901
|
ariaColSpan: Q,
|
|
51887
|
-
ariaControls:
|
|
51902
|
+
ariaControls: eK,
|
|
51888
51903
|
ariaCurrent: null,
|
|
51889
|
-
ariaDescribedBy:
|
|
51904
|
+
ariaDescribedBy: eK,
|
|
51890
51905
|
ariaDetails: null,
|
|
51891
|
-
ariaDisabled:
|
|
51892
|
-
ariaDropEffect:
|
|
51906
|
+
ariaDisabled: QG,
|
|
51907
|
+
ariaDropEffect: eK,
|
|
51893
51908
|
ariaErrorMessage: null,
|
|
51894
|
-
ariaExpanded:
|
|
51895
|
-
ariaFlowTo:
|
|
51896
|
-
ariaGrabbed:
|
|
51909
|
+
ariaExpanded: QG,
|
|
51910
|
+
ariaFlowTo: eK,
|
|
51911
|
+
ariaGrabbed: QG,
|
|
51897
51912
|
ariaHasPopup: null,
|
|
51898
|
-
ariaHidden:
|
|
51913
|
+
ariaHidden: QG,
|
|
51899
51914
|
ariaInvalid: null,
|
|
51900
51915
|
ariaKeyShortcuts: null,
|
|
51901
51916
|
ariaLabel: null,
|
|
51902
|
-
ariaLabelledBy:
|
|
51917
|
+
ariaLabelledBy: eK,
|
|
51903
51918
|
ariaLevel: Q,
|
|
51904
51919
|
ariaLive: null,
|
|
51905
|
-
ariaModal:
|
|
51906
|
-
ariaMultiLine:
|
|
51907
|
-
ariaMultiSelectable:
|
|
51920
|
+
ariaModal: QG,
|
|
51921
|
+
ariaMultiLine: QG,
|
|
51922
|
+
ariaMultiSelectable: QG,
|
|
51908
51923
|
ariaOrientation: null,
|
|
51909
|
-
ariaOwns:
|
|
51924
|
+
ariaOwns: eK,
|
|
51910
51925
|
ariaPlaceholder: null,
|
|
51911
51926
|
ariaPosInSet: Q,
|
|
51912
|
-
ariaPressed:
|
|
51913
|
-
ariaReadOnly:
|
|
51927
|
+
ariaPressed: QG,
|
|
51928
|
+
ariaReadOnly: QG,
|
|
51914
51929
|
ariaRelevant: null,
|
|
51915
|
-
ariaRequired:
|
|
51916
|
-
ariaRoleDescription:
|
|
51930
|
+
ariaRequired: QG,
|
|
51931
|
+
ariaRoleDescription: eK,
|
|
51917
51932
|
ariaRowCount: Q,
|
|
51918
51933
|
ariaRowIndex: Q,
|
|
51919
51934
|
ariaRowSpan: Q,
|
|
51920
|
-
ariaSelected:
|
|
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
|
|
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
|
|
51941
|
-
return
|
|
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
|
|
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:
|
|
51961
|
-
acceptCharset:
|
|
51962
|
-
accessKey:
|
|
51975
|
+
accept: tK,
|
|
51976
|
+
acceptCharset: eK,
|
|
51977
|
+
accessKey: eK,
|
|
51963
51978
|
action: null,
|
|
51964
51979
|
allow: null,
|
|
51965
|
-
allowFullScreen:
|
|
51966
|
-
allowPaymentRequest:
|
|
51967
|
-
allowUserMedia:
|
|
51980
|
+
allowFullScreen: ZG,
|
|
51981
|
+
allowPaymentRequest: ZG,
|
|
51982
|
+
allowUserMedia: ZG,
|
|
51968
51983
|
alt: null,
|
|
51969
51984
|
as: null,
|
|
51970
|
-
async:
|
|
51985
|
+
async: ZG,
|
|
51971
51986
|
autoCapitalize: null,
|
|
51972
|
-
autoComplete:
|
|
51973
|
-
autoFocus:
|
|
51974
|
-
autoPlay:
|
|
51975
|
-
blocking:
|
|
51987
|
+
autoComplete: eK,
|
|
51988
|
+
autoFocus: ZG,
|
|
51989
|
+
autoPlay: ZG,
|
|
51990
|
+
blocking: eK,
|
|
51976
51991
|
capture: null,
|
|
51977
51992
|
charSet: null,
|
|
51978
|
-
checked:
|
|
51993
|
+
checked: ZG,
|
|
51979
51994
|
cite: null,
|
|
51980
|
-
className:
|
|
51995
|
+
className: eK,
|
|
51981
51996
|
cols: Q,
|
|
51982
51997
|
colSpan: null,
|
|
51983
51998
|
content: null,
|
|
51984
|
-
contentEditable:
|
|
51985
|
-
controls:
|
|
51986
|
-
controlsList:
|
|
51987
|
-
coords: Q |
|
|
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:
|
|
51993
|
-
defer:
|
|
52007
|
+
default: ZG,
|
|
52008
|
+
defer: ZG,
|
|
51994
52009
|
dir: null,
|
|
51995
52010
|
dirName: null,
|
|
51996
|
-
disabled:
|
|
51997
|
-
download:
|
|
51998
|
-
draggable:
|
|
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:
|
|
52021
|
+
formNoValidate: ZG,
|
|
52007
52022
|
formTarget: null,
|
|
52008
|
-
headers:
|
|
52023
|
+
headers: eK,
|
|
52009
52024
|
height: Q,
|
|
52010
|
-
hidden:
|
|
52025
|
+
hidden: $G,
|
|
52011
52026
|
high: Q,
|
|
52012
52027
|
href: null,
|
|
52013
52028
|
hrefLang: null,
|
|
52014
|
-
htmlFor:
|
|
52015
|
-
httpEquiv:
|
|
52029
|
+
htmlFor: eK,
|
|
52030
|
+
httpEquiv: eK,
|
|
52016
52031
|
id: null,
|
|
52017
52032
|
imageSizes: null,
|
|
52018
52033
|
imageSrcSet: null,
|
|
52019
|
-
inert:
|
|
52034
|
+
inert: ZG,
|
|
52020
52035
|
inputMode: null,
|
|
52021
52036
|
integrity: null,
|
|
52022
52037
|
is: null,
|
|
52023
|
-
isMap:
|
|
52038
|
+
isMap: ZG,
|
|
52024
52039
|
itemId: null,
|
|
52025
|
-
itemProp:
|
|
52026
|
-
itemRef:
|
|
52027
|
-
itemScope:
|
|
52028
|
-
itemType:
|
|
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:
|
|
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:
|
|
52045
|
-
muted:
|
|
52059
|
+
multiple: ZG,
|
|
52060
|
+
muted: ZG,
|
|
52046
52061
|
name: null,
|
|
52047
52062
|
nonce: null,
|
|
52048
|
-
noModule:
|
|
52049
|
-
noValidate:
|
|
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:
|
|
52153
|
+
open: ZG,
|
|
52139
52154
|
optimum: Q,
|
|
52140
52155
|
pattern: null,
|
|
52141
|
-
ping:
|
|
52156
|
+
ping: eK,
|
|
52142
52157
|
placeholder: null,
|
|
52143
|
-
playsInline:
|
|
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:
|
|
52164
|
+
readOnly: ZG,
|
|
52150
52165
|
referrerPolicy: null,
|
|
52151
|
-
rel:
|
|
52152
|
-
required:
|
|
52153
|
-
reversed:
|
|
52166
|
+
rel: eK,
|
|
52167
|
+
required: ZG,
|
|
52168
|
+
reversed: ZG,
|
|
52154
52169
|
rows: Q,
|
|
52155
52170
|
rowSpan: Q,
|
|
52156
|
-
sandbox:
|
|
52171
|
+
sandbox: eK,
|
|
52157
52172
|
scope: null,
|
|
52158
|
-
scoped:
|
|
52159
|
-
seamless:
|
|
52160
|
-
selected:
|
|
52161
|
-
shadowRootClonable:
|
|
52162
|
-
shadowRootDelegatesFocus:
|
|
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:
|
|
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:
|
|
52197
|
+
typeMustMatch: ZG,
|
|
52183
52198
|
useMap: null,
|
|
52184
|
-
value:
|
|
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:
|
|
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:
|
|
52208
|
-
declare:
|
|
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:
|
|
52221
|
-
noHref:
|
|
52222
|
-
noShade:
|
|
52223
|
-
noWrap:
|
|
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:
|
|
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:
|
|
52245
|
-
disableRemotePlayback:
|
|
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:
|
|
52254
|
-
}),
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
52513
|
-
g2:
|
|
52514
|
-
glyphName:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
52703
|
-
rev:
|
|
52717
|
+
rel: nK,
|
|
52718
|
+
rev: nK,
|
|
52704
52719
|
renderingIntent: null,
|
|
52705
52720
|
repeatCount: null,
|
|
52706
52721
|
repeatDur: null,
|
|
52707
|
-
requiredExtensions:
|
|
52708
|
-
requiredFeatures:
|
|
52709
|
-
requiredFonts:
|
|
52710
|
-
requiredFormats:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
52809
|
-
}),
|
|
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
|
-
}),
|
|
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:
|
|
52831
|
-
}),
|
|
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
|
-
}),
|
|
52842
|
-
function
|
|
52843
|
-
let n =
|
|
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" &&
|
|
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(
|
|
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 (!
|
|
52852
|
-
let n = e.replace(
|
|
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 =
|
|
52871
|
+
i = aK;
|
|
52857
52872
|
}
|
|
52858
52873
|
return new i(r, t);
|
|
52859
52874
|
}
|
|
52860
|
-
function
|
|
52875
|
+
function bK(e) {
|
|
52861
52876
|
return "-" + e.toLowerCase();
|
|
52862
52877
|
}
|
|
52863
|
-
function
|
|
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
|
|
52869
|
-
rK,
|
|
52870
|
-
oK,
|
|
52883
|
+
var SK = KG([
|
|
52871
52884
|
cK,
|
|
52872
|
-
|
|
52873
|
-
|
|
52874
|
-
|
|
52875
|
-
|
|
52876
|
-
|
|
52885
|
+
dK,
|
|
52886
|
+
pK,
|
|
52887
|
+
mK,
|
|
52888
|
+
hK
|
|
52889
|
+
], "html"), CK = KG([
|
|
52877
52890
|
cK,
|
|
52878
|
-
|
|
52879
|
-
|
|
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
|
|
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
|
|
52895
|
-
function
|
|
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
|
-
|
|
52899
|
-
let e =
|
|
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
|
|
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
|
|
52918
|
-
let r = n ?
|
|
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 =
|
|
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,
|
|
52932
|
-
else for (let [t, n] of Object.entries(i))
|
|
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)
|
|
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
|
|
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
|
|
52957
|
-
let i =
|
|
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 ?
|
|
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(
|
|
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
|
|
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)
|
|
52977
|
-
else if (typeof t == "object" && "type" in t) t.type === "root" ?
|
|
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
|
|
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 === "" ||
|
|
52998
|
+
if ((e.boolean || e.overloadedBoolean) && (n === "" || qG(n) === qG(t))) return !0;
|
|
52984
52999
|
}
|
|
52985
53000
|
return n;
|
|
52986
53001
|
}
|
|
52987
|
-
function
|
|
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
|
|
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
|
|
53000
|
-
CK
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
53054
|
-
return
|
|
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
|
|
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
|
|
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" ?
|
|
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" &&
|
|
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 = "") :
|
|
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 (
|
|
53112
|
-
else if (e in
|
|
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
|
-
|
|
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,
|
|
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
|
|
53161
|
+
function GK(e) {
|
|
53147
53162
|
return e >= 55296 && e <= 57343 || e > 1114111;
|
|
53148
53163
|
}
|
|
53149
|
-
function
|
|
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
|
|
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: ++
|
|
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 (
|
|
53180
|
+
switch (YK.util.type(t)) {
|
|
53166
53181
|
case "Object":
|
|
53167
|
-
if (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 =
|
|
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:
|
|
53179
|
-
plaintext:
|
|
53180
|
-
text:
|
|
53181
|
-
txt:
|
|
53193
|
+
plain: JK,
|
|
53194
|
+
plaintext: JK,
|
|
53195
|
+
text: JK,
|
|
53196
|
+
txt: JK,
|
|
53182
53197
|
extend: function(e, t) {
|
|
53183
|
-
var n =
|
|
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 ||=
|
|
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,
|
|
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 =
|
|
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 =
|
|
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 (
|
|
53217
|
-
return r.tokens =
|
|
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
|
|
53226
|
-
return
|
|
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 =
|
|
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 =
|
|
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:
|
|
53254
|
+
Token: XK
|
|
53240
53255
|
};
|
|
53241
|
-
function
|
|
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
|
|
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
|
|
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
|
|
53282
|
+
if (!(v instanceof XK)) {
|
|
53268
53283
|
var y = 1, b;
|
|
53269
53284
|
if (f) {
|
|
53270
|
-
if (b =
|
|
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
|
|
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 =
|
|
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 =
|
|
53281
|
-
var re = new
|
|
53282
|
-
if (g =
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
53326
|
-
|
|
53327
|
-
var $ = new
|
|
53328
|
-
$.highlight =
|
|
53329
|
-
function
|
|
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:
|
|
53356
|
+
children: rq.highlight.call($, e, n, r)
|
|
53342
53357
|
};
|
|
53343
53358
|
}
|
|
53344
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
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:
|
|
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),
|
|
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
|
|
53401
|
+
function dq(e) {
|
|
53387
53402
|
return e;
|
|
53388
53403
|
}
|
|
53389
|
-
function
|
|
53404
|
+
function fq(e) {
|
|
53390
53405
|
let t;
|
|
53391
|
-
for (t in e) Object.hasOwn(e, t) && (e[t] =
|
|
53406
|
+
for (t in e) Object.hasOwn(e, t) && (e[t] = WK(e[t]));
|
|
53392
53407
|
return e;
|
|
53393
53408
|
}
|
|
53394
|
-
$.register(
|
|
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
|
|
53398
|
-
Array.from(
|
|
53399
|
-
},
|
|
53400
|
-
|
|
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
|
-
}),
|
|
53404
|
-
},
|
|
53405
|
-
!
|
|
53406
|
-
},
|
|
53407
|
-
if (!
|
|
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
|
|
53410
|
-
t && (t = !1,
|
|
53424
|
+
return pq.add(e), _q(), () => {
|
|
53425
|
+
t && (t = !1, pq.delete(e), pq.size === 0 && vq());
|
|
53411
53426
|
};
|
|
53412
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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 =
|
|
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
|
-
},
|
|
53433
|
-
let n =
|
|
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
|
-
},
|
|
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 ||=
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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, _ =
|
|
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:
|
|
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 =
|
|
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
|
-
},
|
|
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),
|
|
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
|
-
},
|
|
53549
|
-
let t =
|
|
53550
|
-
return
|
|
53551
|
-
},
|
|
53552
|
-
let t = $.listLanguages(), n = [...new Set(t.map((e) =>
|
|
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:
|
|
53569
|
+
value: BW,
|
|
53555
53570
|
label: e.codeBlockLanguagePlainText
|
|
53556
53571
|
}, ...n.map((e) => ({
|
|
53557
53572
|
value: e,
|
|
53558
|
-
label:
|
|
53573
|
+
label: Rq(e)
|
|
53559
53574
|
}))];
|
|
53560
|
-
},
|
|
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 ===
|
|
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
|
-
},
|
|
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
|
-
},
|
|
53574
|
-
let [t, r] = f(!1), [a, o] = f(""), [s, p] = f(0), m = d(null), h = d(null), g =
|
|
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 =
|
|
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:
|
|
53587
|
-
fallbackHeight:
|
|
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(
|
|
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
|
-
},
|
|
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 =
|
|
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 =
|
|
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 !==
|
|
53691
|
-
let n =
|
|
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(
|
|
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 =
|
|
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(
|
|
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 -
|
|
53723
|
-
anchorTopInContent: t.anchorTopInContent + e.height - a -
|
|
53724
|
-
anchorBottomInContent: t.anchorTopInContent + e.height - a -
|
|
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, !
|
|
53749
|
+
if (this.view = e, !Hq(e) || !this.editorWrapper) {
|
|
53735
53750
|
this.detach();
|
|
53736
53751
|
return;
|
|
53737
53752
|
}
|
|
53738
|
-
let t =
|
|
53753
|
+
let t = Bq(e);
|
|
53739
53754
|
if (!t) {
|
|
53740
53755
|
this.detach();
|
|
53741
53756
|
return;
|
|
53742
53757
|
}
|
|
53743
|
-
let n =
|
|
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 =
|
|
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
|
-
},
|
|
53757
|
-
key: new $u(
|
|
53758
|
-
view: (n) => new
|
|
53759
|
-
})),
|
|
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 !==
|
|
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
|
-
},
|
|
53771
|
-
let n = e.state.selection.$from, r =
|
|
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
|
-
},
|
|
53776
|
-
key: new $u(
|
|
53777
|
-
props: { handleKeyDown: (e, t) =>
|
|
53778
|
-
})),
|
|
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
|
|
53796
|
+
return tJ(e.children ?? [], n);
|
|
53782
53797
|
}
|
|
53783
53798
|
return [{
|
|
53784
53799
|
text: e.value ?? "",
|
|
53785
53800
|
className: t
|
|
53786
53801
|
}];
|
|
53787
|
-
}),
|
|
53802
|
+
}), nJ = (e, t) => t.listLanguages().includes(e), rJ = (e, t) => {
|
|
53788
53803
|
let n = [];
|
|
53789
|
-
return hv((e) => e.type.name ===
|
|
53804
|
+
return hv((e) => e.type.name === $q)(e).forEach((e) => {
|
|
53790
53805
|
let r = String(e.node.attrs.language ?? "");
|
|
53791
|
-
if (!r || !
|
|
53806
|
+
if (!r || !nJ(r, t)) return;
|
|
53792
53807
|
let i = e.pos + 1;
|
|
53793
|
-
|
|
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
|
-
},
|
|
53813
|
+
}, iJ = Pw(() => {
|
|
53799
53814
|
let e = $;
|
|
53800
53815
|
return new Xu({
|
|
53801
|
-
key: new $u(
|
|
53816
|
+
key: new $u(eJ),
|
|
53802
53817
|
state: {
|
|
53803
|
-
init: (t, n) =>
|
|
53804
|
-
apply: (t, n) => t.docChanged ?
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
53911
|
+
}, lJ = {
|
|
53897
53912
|
bulletList: "bullet_list",
|
|
53898
53913
|
orderedList: "ordered_list"
|
|
53899
|
-
},
|
|
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
|
-
],
|
|
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 ?
|
|
53932
|
+
return t ? oJ(T_(t), e) : !1;
|
|
53918
53933
|
}
|
|
53919
|
-
if (t in
|
|
53920
|
-
let r = n.heading, i =
|
|
53921
|
-
return !r || typeof i != "number" ? !1 :
|
|
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 ?
|
|
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 || !
|
|
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 ?
|
|
53948
|
+
return t ? oJ(T_(t, { language: "text" }), e) : !1;
|
|
53934
53949
|
}
|
|
53935
|
-
if (t in
|
|
53936
|
-
let r = n[
|
|
53937
|
-
return r ?
|
|
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
|
-
},
|
|
53955
|
+
}, fJ = (e) => {
|
|
53941
53956
|
let t = e.state.selection.$from, n = /* @__PURE__ */ new Set();
|
|
53942
53957
|
for (let e = t.depth; e > 0; --e) {
|
|
53943
53958
|
let r = t.node(e), i = r.type.name;
|
|
@@ -53976,13 +53991,17 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
53976
53991
|
i === "paragraph" && n.add("paragraph");
|
|
53977
53992
|
}
|
|
53978
53993
|
return n.has("taskList") && n.delete("bulletList"), n.size === 0 && n.add("paragraph"), n;
|
|
53979
|
-
},
|
|
53980
|
-
let t =
|
|
53981
|
-
return
|
|
53982
|
-
},
|
|
53994
|
+
}, pJ = (e) => {
|
|
53995
|
+
let t = fJ(e);
|
|
53996
|
+
return uJ.find((e) => t.has(e)) || "paragraph";
|
|
53997
|
+
}, mJ = /Mac|iPhone|iPad|iPod/, hJ = {
|
|
53983
53998
|
paragraph: {
|
|
53984
53999
|
key: "p",
|
|
53985
|
-
code: "KeyP"
|
|
54000
|
+
code: "KeyP",
|
|
54001
|
+
modeOverrides: { modAlt: {
|
|
54002
|
+
key: "0",
|
|
54003
|
+
code: "Digit0"
|
|
54004
|
+
} }
|
|
53986
54005
|
},
|
|
53987
54006
|
heading1: {
|
|
53988
54007
|
key: "1",
|
|
@@ -54048,25 +54067,25 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54048
54067
|
key: "i",
|
|
54049
54068
|
code: "KeyI"
|
|
54050
54069
|
}
|
|
54051
|
-
},
|
|
54070
|
+
}, gJ = (e) => Object.fromEntries(Object.entries(hJ).map(([t, n]) => [t, n.modeOverrides?.[e] ?? n])), _J = {
|
|
54052
54071
|
Mod: "Ctrl",
|
|
54053
54072
|
Alt: "Alt",
|
|
54054
54073
|
Shift: "Shift"
|
|
54055
|
-
},
|
|
54074
|
+
}, vJ = {
|
|
54056
54075
|
Mod: "⌘",
|
|
54057
54076
|
Alt: "⌥",
|
|
54058
54077
|
Shift: "⇧"
|
|
54059
|
-
},
|
|
54060
|
-
let t = e === "modAlt" ? "Mod-Alt" : "Mod-Shift";
|
|
54061
|
-
return Object.fromEntries(Object.entries(
|
|
54062
|
-
},
|
|
54063
|
-
let t =
|
|
54078
|
+
}, yJ = () => typeof navigator < "u" && mJ.test(navigator.platform), bJ = (e) => {
|
|
54079
|
+
let t = e === "modAlt" ? "Mod-Alt" : "Mod-Shift", n = gJ(e);
|
|
54080
|
+
return Object.fromEntries(Object.entries(n).map(([e, n]) => [e, `${t}-${n.key}`]));
|
|
54081
|
+
}, xJ = (e) => {
|
|
54082
|
+
let t = yJ(), n = t ? vJ : _J;
|
|
54064
54083
|
return e.split("-").map((e) => n[e] ?? e.toUpperCase()).join(t ? "" : "+");
|
|
54065
|
-
},
|
|
54066
|
-
let t =
|
|
54067
|
-
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e,
|
|
54068
|
-
},
|
|
54069
|
-
let t =
|
|
54084
|
+
}, SJ = (e) => {
|
|
54085
|
+
let t = bJ(e);
|
|
54086
|
+
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, xJ(t)]));
|
|
54087
|
+
}, CJ = (e) => {
|
|
54088
|
+
let t = SJ(e);
|
|
54070
54089
|
return {
|
|
54071
54090
|
paragraph: t.paragraph,
|
|
54072
54091
|
heading1: t.heading1,
|
|
@@ -54081,8 +54100,8 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54081
54100
|
blockquote: t.blockquote,
|
|
54082
54101
|
codeBlock: t.codeBlock
|
|
54083
54102
|
};
|
|
54084
|
-
},
|
|
54085
|
-
let n =
|
|
54103
|
+
}, wJ = (e, t) => {
|
|
54104
|
+
let n = bJ(t);
|
|
54086
54105
|
e.update(eD.key, (e) => ({
|
|
54087
54106
|
...e,
|
|
54088
54107
|
TurnIntoText: {
|
|
@@ -54146,13 +54165,13 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54146
54165
|
shortcuts: n.inlineCode
|
|
54147
54166
|
}
|
|
54148
54167
|
}));
|
|
54149
|
-
},
|
|
54150
|
-
let t =
|
|
54168
|
+
}, TJ = (e) => {
|
|
54169
|
+
let t = bJ(e).taskList;
|
|
54151
54170
|
return zw("taskListTransform", { WrapInTaskList: {
|
|
54152
54171
|
shortcuts: t,
|
|
54153
|
-
command: () => (e, t, n) => n ?
|
|
54172
|
+
command: () => (e, t, n) => n ? dJ(n, "taskList") : !1
|
|
54154
54173
|
} });
|
|
54155
|
-
},
|
|
54174
|
+
}, EJ = "zt-md-selection-tooltip", DJ = (e) => [
|
|
54156
54175
|
{
|
|
54157
54176
|
command: "strong",
|
|
54158
54177
|
icon: ye,
|
|
@@ -54183,7 +54202,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54183
54202
|
title: e.selectionTooltipLinkTitle,
|
|
54184
54203
|
markNames: ["link"]
|
|
54185
54204
|
}
|
|
54186
|
-
],
|
|
54205
|
+
], OJ = {
|
|
54187
54206
|
paragraph: it,
|
|
54188
54207
|
heading1: je,
|
|
54189
54208
|
heading2: Me,
|
|
@@ -54196,107 +54215,107 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54196
54215
|
taskList: He,
|
|
54197
54216
|
blockquote: nt,
|
|
54198
54217
|
codeBlock: Ee
|
|
54199
|
-
},
|
|
54200
|
-
let n =
|
|
54218
|
+
}, kJ = (e, t) => {
|
|
54219
|
+
let n = CJ(t);
|
|
54201
54220
|
return [
|
|
54202
54221
|
{
|
|
54203
54222
|
command: "paragraph",
|
|
54204
|
-
icon:
|
|
54223
|
+
icon: OJ.paragraph,
|
|
54205
54224
|
label: e.selectionTooltipTransformParagraphLabel,
|
|
54206
54225
|
shortcut: n.paragraph
|
|
54207
54226
|
},
|
|
54208
54227
|
{
|
|
54209
54228
|
command: "heading1",
|
|
54210
|
-
icon:
|
|
54229
|
+
icon: OJ.heading1,
|
|
54211
54230
|
label: e.selectionTooltipTransformHeading1Label,
|
|
54212
54231
|
shortcut: n.heading1
|
|
54213
54232
|
},
|
|
54214
54233
|
{
|
|
54215
54234
|
command: "heading2",
|
|
54216
|
-
icon:
|
|
54235
|
+
icon: OJ.heading2,
|
|
54217
54236
|
label: e.selectionTooltipTransformHeading2Label,
|
|
54218
54237
|
shortcut: n.heading2
|
|
54219
54238
|
},
|
|
54220
54239
|
{
|
|
54221
54240
|
command: "heading3",
|
|
54222
|
-
icon:
|
|
54241
|
+
icon: OJ.heading3,
|
|
54223
54242
|
label: e.selectionTooltipTransformHeading3Label,
|
|
54224
54243
|
shortcut: n.heading3
|
|
54225
54244
|
},
|
|
54226
54245
|
{
|
|
54227
54246
|
command: "heading4",
|
|
54228
|
-
icon:
|
|
54247
|
+
icon: OJ.heading4,
|
|
54229
54248
|
label: e.selectionTooltipTransformHeading4Label,
|
|
54230
54249
|
shortcut: n.heading4
|
|
54231
54250
|
},
|
|
54232
54251
|
{
|
|
54233
54252
|
command: "heading5",
|
|
54234
|
-
icon:
|
|
54253
|
+
icon: OJ.heading5,
|
|
54235
54254
|
label: e.selectionTooltipTransformHeading5Label,
|
|
54236
54255
|
shortcut: n.heading5
|
|
54237
54256
|
},
|
|
54238
54257
|
{
|
|
54239
54258
|
command: "heading6",
|
|
54240
|
-
icon:
|
|
54259
|
+
icon: OJ.heading6,
|
|
54241
54260
|
label: e.selectionTooltipTransformHeading6Label,
|
|
54242
54261
|
shortcut: n.heading6
|
|
54243
54262
|
},
|
|
54244
54263
|
{
|
|
54245
54264
|
command: "bulletList",
|
|
54246
|
-
icon:
|
|
54265
|
+
icon: OJ.bulletList,
|
|
54247
54266
|
label: e.selectionTooltipTransformBulletListLabel,
|
|
54248
54267
|
shortcut: n.bulletList
|
|
54249
54268
|
},
|
|
54250
54269
|
{
|
|
54251
54270
|
command: "orderedList",
|
|
54252
|
-
icon:
|
|
54271
|
+
icon: OJ.orderedList,
|
|
54253
54272
|
label: e.selectionTooltipTransformOrderedListLabel,
|
|
54254
54273
|
shortcut: n.orderedList
|
|
54255
54274
|
},
|
|
54256
54275
|
{
|
|
54257
54276
|
command: "taskList",
|
|
54258
|
-
icon:
|
|
54277
|
+
icon: OJ.taskList,
|
|
54259
54278
|
label: e.selectionTooltipTransformTaskListLabel,
|
|
54260
54279
|
shortcut: n.taskList
|
|
54261
54280
|
},
|
|
54262
54281
|
{
|
|
54263
54282
|
command: "blockquote",
|
|
54264
|
-
icon:
|
|
54283
|
+
icon: OJ.blockquote,
|
|
54265
54284
|
label: e.selectionTooltipTransformBlockquoteLabel,
|
|
54266
54285
|
shortcut: n.blockquote
|
|
54267
54286
|
},
|
|
54268
54287
|
{
|
|
54269
54288
|
command: "codeBlock",
|
|
54270
|
-
icon:
|
|
54289
|
+
icon: OJ.codeBlock,
|
|
54271
54290
|
label: e.selectionTooltipTransformCodeBlockLabel,
|
|
54272
54291
|
shortcut: n.codeBlock
|
|
54273
54292
|
}
|
|
54274
54293
|
];
|
|
54275
|
-
},
|
|
54294
|
+
}, AJ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, jJ = (e, t) => {
|
|
54276
54295
|
let n = e.state.schema.marks, r = t.find((e) => n[e]);
|
|
54277
54296
|
return r ? n[r] ?? null : null;
|
|
54278
|
-
},
|
|
54297
|
+
}, MJ = (e, t) => {
|
|
54279
54298
|
let { from: n, to: r } = e.selection;
|
|
54280
54299
|
return e.doc.rangeHasMark(n, r, t);
|
|
54281
|
-
},
|
|
54300
|
+
}, NJ = (e, t) => {
|
|
54282
54301
|
let { from: n, to: r } = e.selection, i = "";
|
|
54283
54302
|
return e.doc.nodesBetween(n, r, (e) => {
|
|
54284
54303
|
let n = e.marks.find((e) => e.type === t);
|
|
54285
54304
|
return n ? (i = typeof n.attrs.href == "string" ? n.attrs.href : "", !1) : !0;
|
|
54286
54305
|
}), i;
|
|
54287
|
-
},
|
|
54306
|
+
}, PJ = (e) => {
|
|
54288
54307
|
O_(e.markType)(e.view.state, e.view.dispatch, e.view), e.view.focus();
|
|
54289
|
-
},
|
|
54308
|
+
}, FJ = (e) => {
|
|
54290
54309
|
e.toggleLinkPopover(e.view);
|
|
54291
|
-
},
|
|
54310
|
+
}, IJ = (e, t) => {
|
|
54292
54311
|
({
|
|
54293
|
-
strong:
|
|
54294
|
-
em:
|
|
54295
|
-
strike:
|
|
54296
|
-
inlineCode:
|
|
54297
|
-
link:
|
|
54312
|
+
strong: PJ,
|
|
54313
|
+
em: PJ,
|
|
54314
|
+
strike: PJ,
|
|
54315
|
+
inlineCode: PJ,
|
|
54316
|
+
link: FJ
|
|
54298
54317
|
})[e](t);
|
|
54299
|
-
},
|
|
54318
|
+
}, LJ = (e, t, n, r, a) => {
|
|
54300
54319
|
let o = document.createElement("button");
|
|
54301
54320
|
o.type = "button", o.className = "zt-md-selection-tooltip-button", o.dataset.command = e.command, o.title = e.title, o.setAttribute("aria-label", e.title);
|
|
54302
54321
|
let s = document.createElement("span");
|
|
@@ -54310,20 +54329,20 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54310
54329
|
}), o.addEventListener("click", (i) => {
|
|
54311
54330
|
i.preventDefault();
|
|
54312
54331
|
let a = n();
|
|
54313
|
-
!a || a.state.selection.empty ||
|
|
54332
|
+
!a || a.state.selection.empty || IJ(e.command, {
|
|
54314
54333
|
view: a,
|
|
54315
54334
|
markType: t,
|
|
54316
54335
|
toggleLinkPopover: r
|
|
54317
54336
|
});
|
|
54318
54337
|
}), o;
|
|
54319
|
-
},
|
|
54338
|
+
}, RJ = (e, t, n, r, i, a) => {
|
|
54320
54339
|
let o = document.createElement("div");
|
|
54321
54340
|
return o.className = "zt-md-selection-tooltip", o.append(i), t.forEach((t) => {
|
|
54322
|
-
let i =
|
|
54323
|
-
i && t.command !== "link" && o.append(
|
|
54341
|
+
let i = jJ(e, t.markNames);
|
|
54342
|
+
i && t.command !== "link" && o.append(LJ(t, i, n, r, a));
|
|
54324
54343
|
}), o;
|
|
54325
|
-
},
|
|
54326
|
-
let t =
|
|
54344
|
+
}, zJ = (e) => {
|
|
54345
|
+
let t = Oq({
|
|
54327
54346
|
open: e.open,
|
|
54328
54347
|
portalContainer: e.portalContainer,
|
|
54329
54348
|
editorWrapper: e.collisionBoundary,
|
|
@@ -54339,7 +54358,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54339
54358
|
e.onOpenChange(!1);
|
|
54340
54359
|
return;
|
|
54341
54360
|
}
|
|
54342
|
-
|
|
54361
|
+
dJ(n, t), e.onOpenChange(!1), n.focus();
|
|
54343
54362
|
};
|
|
54344
54363
|
return i(n, null, i("button", {
|
|
54345
54364
|
ref: t.triggerRef,
|
|
@@ -54360,7 +54379,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54360
54379
|
size: e.iconSize,
|
|
54361
54380
|
strokeWidth: e.iconStrokeWidth,
|
|
54362
54381
|
"aria-hidden": "true"
|
|
54363
|
-
})), i(
|
|
54382
|
+
})), i(kq, {
|
|
54364
54383
|
panel: t,
|
|
54365
54384
|
portalContainer: e.portalContainer,
|
|
54366
54385
|
className: "zt-md-selection-transform-popover !w-[224px] p-1",
|
|
@@ -54381,7 +54400,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54381
54400
|
"aria-hidden": "true"
|
|
54382
54401
|
}), i("span", { className: "zt-md-selection-transform-item-label" }, t.label), i("kbd", { className: "zt-md-selection-transform-item-shortcut" }, t.shortcut));
|
|
54383
54402
|
}))));
|
|
54384
|
-
},
|
|
54403
|
+
}, BJ = (e) => {
|
|
54385
54404
|
let [t, r] = f(""), a = d(null), o = (e) => {
|
|
54386
54405
|
e.preventDefault();
|
|
54387
54406
|
}, s = (t) => {
|
|
@@ -54390,7 +54409,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54390
54409
|
e.onOpenChange(!1);
|
|
54391
54410
|
return;
|
|
54392
54411
|
}
|
|
54393
|
-
let r =
|
|
54412
|
+
let r = jJ(n, ["link"]);
|
|
54394
54413
|
if (!r) {
|
|
54395
54414
|
e.onOpenChange(!1);
|
|
54396
54415
|
return;
|
|
@@ -54402,13 +54421,13 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54402
54421
|
e.onOpenChange(!1);
|
|
54403
54422
|
return;
|
|
54404
54423
|
}
|
|
54405
|
-
let n = e.getCurrentView(), i = n ?
|
|
54424
|
+
let n = e.getCurrentView(), i = n ? jJ(n, ["link"]) : null;
|
|
54406
54425
|
if (!n || !i || n.state.selection.empty) {
|
|
54407
54426
|
e.onOpenChange(!1);
|
|
54408
54427
|
return;
|
|
54409
54428
|
}
|
|
54410
|
-
r(AF(
|
|
54411
|
-
}, u =
|
|
54429
|
+
r(AF(NJ(n.state, i))), e.onOpenChange(!0);
|
|
54430
|
+
}, u = Oq({
|
|
54412
54431
|
open: e.open,
|
|
54413
54432
|
portalContainer: e.portalContainer,
|
|
54414
54433
|
editorWrapper: e.collisionBoundary,
|
|
@@ -54420,7 +54439,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54420
54439
|
});
|
|
54421
54440
|
return c(() => {
|
|
54422
54441
|
if (!e.open) return;
|
|
54423
|
-
let t = e.getCurrentView(), n = t ?
|
|
54442
|
+
let t = e.getCurrentView(), n = t ? jJ(t, ["link"]) : null;
|
|
54424
54443
|
(!t || !n || t.state.selection.empty) && e.onOpenChange(!1);
|
|
54425
54444
|
}, [
|
|
54426
54445
|
e.open,
|
|
@@ -54449,7 +54468,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54449
54468
|
}, i("span", { className: "zt-md-selection-tooltip-button-icon" }, i(Ve, {
|
|
54450
54469
|
size: e.iconSize,
|
|
54451
54470
|
strokeWidth: e.iconStrokeWidth
|
|
54452
|
-
}))), i(
|
|
54471
|
+
}))), i(kq, {
|
|
54453
54472
|
panel: u,
|
|
54454
54473
|
portalContainer: e.portalContainer,
|
|
54455
54474
|
className: "zt-md-selection-link-popover w-fit min-w-0 gap-0 p-2"
|
|
@@ -54482,29 +54501,29 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54482
54501
|
size: e.iconSize,
|
|
54483
54502
|
strokeWidth: e.iconStrokeWidth
|
|
54484
54503
|
})))));
|
|
54485
|
-
},
|
|
54504
|
+
}, VJ = (e, t, n) => {
|
|
54486
54505
|
n.forEach((n) => {
|
|
54487
|
-
let r =
|
|
54506
|
+
let r = jJ(t, n.markNames);
|
|
54488
54507
|
if (!r) return;
|
|
54489
54508
|
let i = e.querySelector(`[data-command="${n.command}"]`);
|
|
54490
|
-
i instanceof HTMLButtonElement && (i.dataset.active =
|
|
54509
|
+
i instanceof HTMLButtonElement && (i.dataset.active = MJ(t.state, r) ? "true" : "false");
|
|
54491
54510
|
});
|
|
54492
|
-
},
|
|
54511
|
+
}, HJ = (e) => {
|
|
54493
54512
|
let { from: t, to: n } = e.state.selection, r = !1;
|
|
54494
54513
|
return e.state.doc.nodesBetween(t, n, (e) => e.type.name === "code_block" ? (r = !0, !1) : !0), r;
|
|
54495
|
-
},
|
|
54514
|
+
}, UJ = (e, t, n) => (r) => {
|
|
54496
54515
|
let { selection: i, doc: a } = r.state, o = e.contains(document.activeElement);
|
|
54497
|
-
return !
|
|
54498
|
-
},
|
|
54499
|
-
let a =
|
|
54516
|
+
return !AJ(r) || i.empty || !(i instanceof N) || !r.hasFocus() && !o && !t() && !n() || HJ(r) ? !1 : e.childElementCount > 0 && a.textBetween(i.from, i.to).trim().length > 0;
|
|
54517
|
+
}, WJ = (e, t, n, r) => {
|
|
54518
|
+
let a = DJ(n), o = kJ(n, r), s = e, c = !1, l = !1, u = !1, d = [], f = document.createElement("span"), p = b(f), m = document.createElement("span"), h = null, g = b(m), _ = t.closest(".zt-md-editor"), v = (e) => {
|
|
54500
54519
|
c !== e && (c = e, C());
|
|
54501
54520
|
}, y = (e) => {
|
|
54502
54521
|
l !== e && (l = e, S());
|
|
54503
54522
|
}, x = (e) => {
|
|
54504
54523
|
e.state.selection.empty || v(!c);
|
|
54505
54524
|
}, S = () => {
|
|
54506
|
-
let e = s ?
|
|
54507
|
-
p.render(i(
|
|
54525
|
+
let e = s ? fJ(s) : new Set(["paragraph"]), r = s ? pJ(s) : "paragraph", a = o.find((e) => e.command === r) ?? o[0];
|
|
54526
|
+
p.render(i(zJ, {
|
|
54508
54527
|
getCurrentView: () => s,
|
|
54509
54528
|
portalContainer: t,
|
|
54510
54529
|
collisionBoundary: _,
|
|
@@ -54518,7 +54537,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54518
54537
|
activeCommands: e
|
|
54519
54538
|
}));
|
|
54520
54539
|
}, C = () => {
|
|
54521
|
-
g.render(i(
|
|
54540
|
+
g.render(i(BJ, {
|
|
54522
54541
|
getCurrentView: () => s,
|
|
54523
54542
|
portalContainer: t,
|
|
54524
54543
|
collisionBoundary: _,
|
|
@@ -54531,9 +54550,9 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54531
54550
|
onOpenChange: v,
|
|
54532
54551
|
messages: n
|
|
54533
54552
|
}));
|
|
54534
|
-
}, w =
|
|
54535
|
-
S(),
|
|
54536
|
-
let T =
|
|
54553
|
+
}, w = RJ(e, a, () => s, x, f, d);
|
|
54554
|
+
S(), jJ(e, ["link"]) && (w.append(m), C());
|
|
54555
|
+
let T = UJ(w, () => c, () => l), E = new aJ({
|
|
54537
54556
|
content: w,
|
|
54538
54557
|
debounce: 80,
|
|
54539
54558
|
offset: 8,
|
|
@@ -54557,9 +54576,9 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54557
54576
|
};
|
|
54558
54577
|
return e.dom.addEventListener("blur", ie), document.addEventListener("mousedown", ae, !0), {
|
|
54559
54578
|
update: (e, t) => {
|
|
54560
|
-
if (s = e, s.state.selection.empty && (v(!1), y(!1)),
|
|
54561
|
-
let e =
|
|
54562
|
-
h.dataset.active = e &&
|
|
54579
|
+
if (s = e, s.state.selection.empty && (v(!1), y(!1)), VJ(w, s, a), S(), h) {
|
|
54580
|
+
let e = jJ(s, ["link"]);
|
|
54581
|
+
h.dataset.active = e && MJ(s.state, e) ? "true" : "false";
|
|
54563
54582
|
}
|
|
54564
54583
|
if (!T(s)) {
|
|
54565
54584
|
E.hide(), te();
|
|
@@ -54573,21 +54592,21 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54573
54592
|
}), E.destroy(), w.remove();
|
|
54574
54593
|
}
|
|
54575
54594
|
};
|
|
54576
|
-
},
|
|
54577
|
-
key: new $u(
|
|
54578
|
-
view: (r) =>
|
|
54579
|
-
})),
|
|
54595
|
+
}, GJ = (e, t, n) => Pw(() => new Xu({
|
|
54596
|
+
key: new $u(EJ),
|
|
54597
|
+
view: (r) => WJ(r, e, t, n)
|
|
54598
|
+
})), KJ = (e, t) => e(t.state, t.dispatch, t), qJ = (e) => {
|
|
54580
54599
|
let t = e?.state?.selection?.$from;
|
|
54581
54600
|
if (!t) return !1;
|
|
54582
54601
|
for (let e = t.depth; e > 0; --e) if (t.node(e)?.type?.name === "table") return !0;
|
|
54583
54602
|
return !1;
|
|
54584
|
-
},
|
|
54603
|
+
}, JJ = (e, t) => {
|
|
54585
54604
|
let n = e?.state?.doc;
|
|
54586
54605
|
if (!n || typeof t != "number") return -1;
|
|
54587
54606
|
let r = Math.min(Math.max(t, 0), n.content.size), i = n.resolve(r);
|
|
54588
54607
|
for (let e = i.depth; e > 0; --e) if (i.node(e)?.type?.name === "table") return i.before(e);
|
|
54589
54608
|
return -1;
|
|
54590
|
-
},
|
|
54609
|
+
}, YJ = (e, t, n, r) => {
|
|
54591
54610
|
let i = e?.state?.schema?.nodes;
|
|
54592
54611
|
if (!i) return null;
|
|
54593
54612
|
let a = i.table, o = i.table_header_row, s = i.table_row, c = i.table_header, l = i.table_cell;
|
|
@@ -54597,21 +54616,21 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54597
54616
|
return i.create(null, u);
|
|
54598
54617
|
});
|
|
54599
54618
|
return a.create(null, f);
|
|
54600
|
-
},
|
|
54601
|
-
if (!e?.state || !e?.dispatch ||
|
|
54602
|
-
let t = e.state.selection.from, n =
|
|
54619
|
+
}, XJ = (e) => {
|
|
54620
|
+
if (!e?.state || !e?.dispatch || qJ(e)) return !1;
|
|
54621
|
+
let t = e.state.selection.from, n = YJ(e, 3, 3, !0);
|
|
54603
54622
|
if (!n) return !1;
|
|
54604
54623
|
e.dispatch(e.state.tr.replaceSelectionWith(n).scrollIntoView());
|
|
54605
|
-
let r =
|
|
54606
|
-
if (r < 0 && t > 0 && (r =
|
|
54624
|
+
let r = JJ(e, t);
|
|
54625
|
+
if (r < 0 && t > 0 && (r = JJ(e, t - 1)), r < 0) return !0;
|
|
54607
54626
|
let i = r + 2;
|
|
54608
54627
|
if (i > e.state.doc.content.size) return !0;
|
|
54609
54628
|
let a = N.near(e.state.doc.resolve(i), 1);
|
|
54610
54629
|
return e.dispatch(e.state.tr.setSelection(a).scrollIntoView()), e.focus(), !0;
|
|
54611
|
-
},
|
|
54630
|
+
}, ZJ = (e, t) => {
|
|
54612
54631
|
let n = e?.state?.schema?.marks ?? {}, r = t.find((e) => n[e]);
|
|
54613
54632
|
return r ? n[r] ?? null : null;
|
|
54614
|
-
},
|
|
54633
|
+
}, QJ = new Set([
|
|
54615
54634
|
"paragraph",
|
|
54616
54635
|
"heading1",
|
|
54617
54636
|
"heading2",
|
|
@@ -54624,10 +54643,10 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54624
54643
|
"taskList",
|
|
54625
54644
|
"blockquote",
|
|
54626
54645
|
"codeBlock"
|
|
54627
|
-
]),
|
|
54646
|
+
]), $J = (e) => QJ.has(e), eY = {
|
|
54628
54647
|
inlineCode: (e) => {
|
|
54629
|
-
let t =
|
|
54630
|
-
return t ?
|
|
54648
|
+
let t = ZJ(e, ["inlineCode", "code_inline"]);
|
|
54649
|
+
return t ? KJ(O_(t), e) : !1;
|
|
54631
54650
|
},
|
|
54632
54651
|
inlineMath: (e) => {
|
|
54633
54652
|
let t = e?.state?.schema?.nodes?.math_inline;
|
|
@@ -54640,7 +54659,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54640
54659
|
},
|
|
54641
54660
|
mathBlock: (e) => {
|
|
54642
54661
|
let t = e.state.schema.nodes?.math_block;
|
|
54643
|
-
if (!t || !
|
|
54662
|
+
if (!t || !KJ(T_(t), e)) return !1;
|
|
54644
54663
|
let n = e.state.selection?.$from;
|
|
54645
54664
|
if (!n) return !0;
|
|
54646
54665
|
let r = null;
|
|
@@ -54652,8 +54671,8 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54652
54671
|
let i = P.create(e.state.doc, r);
|
|
54653
54672
|
return e.dispatch(e.state.tr.setSelection(i).scrollIntoView()), !0;
|
|
54654
54673
|
},
|
|
54655
|
-
table:
|
|
54656
|
-
},
|
|
54674
|
+
table: XJ
|
|
54675
|
+
}, tY = (e, t) => !e?.state || !e?.dispatch ? !1 : $J(t) ? dJ(e, t) : t === "image" ? !1 : eY[t](e), nY = (e) => typeof e?.props?.editable == "function" ? e.props.editable(e.state) : !!e?.editable, rY = [
|
|
54657
54676
|
{
|
|
54658
54677
|
id: "paragraph",
|
|
54659
54678
|
label: "普通文本",
|
|
@@ -54773,7 +54792,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54773
54792
|
icon: "Image",
|
|
54774
54793
|
command: "image"
|
|
54775
54794
|
}
|
|
54776
|
-
],
|
|
54795
|
+
], iY = [
|
|
54777
54796
|
{
|
|
54778
54797
|
id: "paragraph",
|
|
54779
54798
|
label: "Paragraph",
|
|
@@ -54893,7 +54912,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54893
54912
|
icon: "Image",
|
|
54894
54913
|
command: "image"
|
|
54895
54914
|
}
|
|
54896
|
-
],
|
|
54915
|
+
], aY = (e, t = "zh-CN") => e?.items && e.items.length > 0 ? e.items : t === "en-US" ? iY : rY, oY = (e) => {
|
|
54897
54916
|
let t = e?.state?.selection?.$from;
|
|
54898
54917
|
if (!t) return !1;
|
|
54899
54918
|
let n = String(t.parent?.type?.name ?? "");
|
|
@@ -54903,17 +54922,17 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54903
54922
|
if (n === "table" || n === "table_cell" || n === "table_header") return !0;
|
|
54904
54923
|
}
|
|
54905
54924
|
return !1;
|
|
54906
|
-
},
|
|
54925
|
+
}, sY = (e) => {
|
|
54907
54926
|
let t = e?.state, n = t?.selection?.$from;
|
|
54908
54927
|
if (!t || !n) return "";
|
|
54909
54928
|
let r = n.start(), i = n.pos;
|
|
54910
54929
|
return t.doc.textBetween(r, i, "\n", "\n");
|
|
54911
|
-
},
|
|
54912
|
-
let t =
|
|
54930
|
+
}, cY = (e) => {
|
|
54931
|
+
let t = sY(e), n = t.lastIndexOf("/");
|
|
54913
54932
|
if (n < 0) return null;
|
|
54914
54933
|
let r = t.slice(n + 1);
|
|
54915
54934
|
return /\s/.test(r) ? null : r;
|
|
54916
|
-
},
|
|
54935
|
+
}, lY = (e, t) => {
|
|
54917
54936
|
if (t === null || t.length === 0) return e;
|
|
54918
54937
|
let n = t.toLowerCase();
|
|
54919
54938
|
return e.filter((e) => [
|
|
@@ -54922,24 +54941,24 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54922
54941
|
e.command,
|
|
54923
54942
|
e.id
|
|
54924
54943
|
].some((e) => String(e).toLowerCase().startsWith(n)));
|
|
54925
|
-
},
|
|
54926
|
-
if (!
|
|
54944
|
+
}, uY = (e, t) => {
|
|
54945
|
+
if (!nY(e)) return {
|
|
54927
54946
|
visibleItems: [],
|
|
54928
54947
|
shouldShow: !1
|
|
54929
54948
|
};
|
|
54930
|
-
let n =
|
|
54949
|
+
let n = cY(e), r = lY(t, n);
|
|
54931
54950
|
return {
|
|
54932
54951
|
visibleItems: r,
|
|
54933
|
-
shouldShow: !
|
|
54952
|
+
shouldShow: !oY(e) && n !== null && r.length > 0
|
|
54934
54953
|
};
|
|
54935
|
-
},
|
|
54954
|
+
}, dY = (e) => {
|
|
54936
54955
|
let t = e?.state, n = t?.selection?.$from;
|
|
54937
54956
|
if (!t || !n || !e?.dispatch) return !1;
|
|
54938
54957
|
let r = n.start(), i = n.pos, a = t.doc.textBetween(r, i, "\n", "\n").lastIndexOf("/");
|
|
54939
54958
|
if (a < 0) return !1;
|
|
54940
54959
|
let o = r + a, s = t.tr.delete(o, i);
|
|
54941
54960
|
return e.dispatch(s.scrollIntoView()), !0;
|
|
54942
|
-
},
|
|
54961
|
+
}, fY = {
|
|
54943
54962
|
Type: it,
|
|
54944
54963
|
Heading1: je,
|
|
54945
54964
|
Heading2: Me,
|
|
@@ -54957,7 +54976,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54957
54976
|
TextQuote: nt,
|
|
54958
54977
|
Sigma: Je,
|
|
54959
54978
|
Table: Qe
|
|
54960
|
-
},
|
|
54979
|
+
}, pY = Te, mY = (e, t, n, r, a) => {
|
|
54961
54980
|
r.splice(0).forEach((e) => {
|
|
54962
54981
|
e.unmount();
|
|
54963
54982
|
}), e.innerHTML = "";
|
|
@@ -54971,7 +54990,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54971
54990
|
c.className = "slash-menu-item", c.dataset.command = t.command, c.dataset.selected = s === n ? "true" : "false";
|
|
54972
54991
|
let l = document.createElement("span");
|
|
54973
54992
|
l.className = "slash-menu-item-icon";
|
|
54974
|
-
let u = t.icon ?
|
|
54993
|
+
let u = t.icon ? fY[t.icon] ?? pY : null;
|
|
54975
54994
|
if (u) {
|
|
54976
54995
|
let e = b(l);
|
|
54977
54996
|
e.render(i(u, {
|
|
@@ -54984,12 +55003,12 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
54984
55003
|
let f = a[t.command], p = f ? document.createElement("kbd") : null;
|
|
54985
55004
|
p && (p.className = "slash-menu-item-shortcut", p.textContent = f), c.appendChild(l), c.appendChild(d), p && c.appendChild(p), e.appendChild(c);
|
|
54986
55005
|
});
|
|
54987
|
-
},
|
|
55006
|
+
}, hY = (e, t) => {
|
|
54988
55007
|
let n = document.createElement("div");
|
|
54989
55008
|
n.className = "slash-menu", n.style.display = "none", e.appendChild(n);
|
|
54990
|
-
let r = !1, i = "", a = !1, o = null, s = [], c =
|
|
55009
|
+
let r = !1, i = "", a = !1, o = null, s = [], c = SJ(t), l = () => {
|
|
54991
55010
|
if (!r || !o) return;
|
|
54992
|
-
let { editorWrapper: t, anchorTopInContent: i, anchorBottomInContent: a, anchorLeftInContent: s, placement: c, offsetY: l } = o, u =
|
|
55011
|
+
let { editorWrapper: t, anchorTopInContent: i, anchorBottomInContent: a, anchorLeftInContent: s, placement: c, offsetY: l } = o, u = Tq({
|
|
54993
55012
|
wrapper: t,
|
|
54994
55013
|
anchor: {
|
|
54995
55014
|
anchorTopInContent: i,
|
|
@@ -55002,7 +55021,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
55002
55021
|
boundaryInset: 4
|
|
55003
55022
|
}, e);
|
|
55004
55023
|
n.style.left = `${u.left}px`, n.style.top = `${u.top}px`, n.dataset.placement = c;
|
|
55005
|
-
}, u =
|
|
55024
|
+
}, u = Eq(() => {
|
|
55006
55025
|
r && l();
|
|
55007
55026
|
}), d = () => {
|
|
55008
55027
|
n.style.top = "", n.style.left = "", n.style.transform = "", delete n.dataset.placement;
|
|
@@ -55021,7 +55040,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
55021
55040
|
},
|
|
55022
55041
|
renderIfNeeded: (e, t) => {
|
|
55023
55042
|
let r = `${e.map((e) => e.command).join("|")}::${t}`;
|
|
55024
|
-
i !== r && (
|
|
55043
|
+
i !== r && (mY(n, e, t, s, c), i = r);
|
|
55025
55044
|
},
|
|
55026
55045
|
scrollActiveItemIntoView: (e) => {
|
|
55027
55046
|
let t = n.querySelector(".slash-menu-item[data-selected=\"true\"]");
|
|
@@ -55043,7 +55062,7 @@ var cq = /* @__PURE__ */ new Set(), lq = !1, uq = () => typeof document < "u", d
|
|
|
55043
55062
|
};
|
|
55044
55063
|
//#endregion
|
|
55045
55064
|
//#region node_modules/.pnpm/@milkdown+plugin-slash@7.21.1/node_modules/@milkdown/plugin-slash/lib/index.js
|
|
55046
|
-
function
|
|
55065
|
+
function gY(e) {
|
|
55047
55066
|
let t = Iw({}, `${e}_SLASH_SPEC`), n = Pw((n) => {
|
|
55048
55067
|
let r = n.get(t.key);
|
|
55049
55068
|
return new Xu({
|
|
@@ -55061,29 +55080,29 @@ function uY(e) {
|
|
|
55061
55080
|
}
|
|
55062
55081
|
//#endregion
|
|
55063
55082
|
//#region src/plugins/custom/slash-menu/slash-menu.ts
|
|
55064
|
-
var
|
|
55083
|
+
var _Y = (e, t) => {
|
|
55065
55084
|
if (!(!e || typeof e != "object")) return e[t];
|
|
55066
|
-
},
|
|
55067
|
-
if (typeof
|
|
55068
|
-
let e =
|
|
55085
|
+
}, vY = () => {
|
|
55086
|
+
if (typeof gY != "function") return console.error("[zt-md/slash] slashFactory not found"), null;
|
|
55087
|
+
let e = gY("zt-md-slash"), t = Array.isArray(e) ? e[0] : void 0, n = Array.isArray(e) ? e[1] : e, r = Array.isArray(e) ? e[2] : void 0;
|
|
55069
55088
|
if (!n) return null;
|
|
55070
|
-
let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a =
|
|
55089
|
+
let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a = _Y(t, "key") ?? _Y(n, "key") ?? _Y(r, "key") ?? _Y(e, "key");
|
|
55071
55090
|
return i.length === 0 || a === void 0 ? null : {
|
|
55072
55091
|
plugins: i,
|
|
55073
55092
|
key: a
|
|
55074
55093
|
};
|
|
55075
|
-
},
|
|
55094
|
+
}, yY = (e, t, n, r, i = "zh-CN", a = "modShift") => {
|
|
55076
55095
|
if (t?.enabled === !1) return {
|
|
55077
55096
|
plugins: [],
|
|
55078
55097
|
config: null
|
|
55079
55098
|
};
|
|
55080
55099
|
try {
|
|
55081
|
-
let o =
|
|
55100
|
+
let o = vY();
|
|
55082
55101
|
if (!o) return {
|
|
55083
55102
|
plugins: [],
|
|
55084
55103
|
config: null
|
|
55085
55104
|
};
|
|
55086
|
-
let s =
|
|
55105
|
+
let s = aY(t, i), c = hY(e, a), l = 0, u = null, d = s, f = !1, p = new Set([
|
|
55087
55106
|
"ArrowDown",
|
|
55088
55107
|
"ArrowUp",
|
|
55089
55108
|
"Enter",
|
|
@@ -55098,18 +55117,18 @@ var dY = (e, t) => {
|
|
|
55098
55117
|
let n = e?.coordsAtPos?.(t);
|
|
55099
55118
|
return n ? new DOMRect(n.left, n.top, Math.max(n.right - n.left, 1), n.bottom - n.top) : null;
|
|
55100
55119
|
}, g = (e) => {
|
|
55101
|
-
if (!
|
|
55120
|
+
if (!nY(e)) {
|
|
55102
55121
|
d = [], f = !1, c.updatePositionContext(null), c.setVisible(!1);
|
|
55103
55122
|
return;
|
|
55104
55123
|
}
|
|
55105
|
-
let t =
|
|
55124
|
+
let t = uY(e, s);
|
|
55106
55125
|
if (d = t.visibleItems, f = t.shouldShow, t.shouldShow && l >= d.length && (l = 0), t.shouldShow && !c.isVisible() && (l = 0), !t.shouldShow) {
|
|
55107
55126
|
c.updatePositionContext(null), c.setVisible(!1);
|
|
55108
55127
|
return;
|
|
55109
55128
|
}
|
|
55110
|
-
let n = h(e), r =
|
|
55129
|
+
let n = h(e), r = bq(e?.dom);
|
|
55111
55130
|
if (n && r) {
|
|
55112
|
-
let e =
|
|
55131
|
+
let e = xq(n, 320), t = Sq(n, r);
|
|
55113
55132
|
c.updatePositionContext({
|
|
55114
55133
|
editorWrapper: r,
|
|
55115
55134
|
anchorTopInContent: t.anchorTopInContent,
|
|
@@ -55123,13 +55142,13 @@ var dY = (e, t) => {
|
|
|
55123
55142
|
c.updatePosition();
|
|
55124
55143
|
});
|
|
55125
55144
|
}, _ = () => {
|
|
55126
|
-
if (!
|
|
55145
|
+
if (!nY(u)) {
|
|
55127
55146
|
f = !1, c.updatePositionContext(null), c.setVisible(!1);
|
|
55128
55147
|
return;
|
|
55129
55148
|
}
|
|
55130
55149
|
if (!u || l < 0 || l >= d.length) return;
|
|
55131
55150
|
let t = d[l];
|
|
55132
|
-
if (
|
|
55151
|
+
if (dY(u)) {
|
|
55133
55152
|
if (t.command === "image") {
|
|
55134
55153
|
c.setVisible(!1), n && YI({
|
|
55135
55154
|
portalContainer: e,
|
|
@@ -55139,7 +55158,7 @@ var dY = (e, t) => {
|
|
|
55139
55158
|
});
|
|
55140
55159
|
return;
|
|
55141
55160
|
}
|
|
55142
|
-
|
|
55161
|
+
tY(u, t.command) && (c.setVisible(!1), t.command === "mathBlock" && queueMicrotask(() => {
|
|
55143
55162
|
let e = u?.dom?.querySelector?.(".zt-md-math-block-editing .zt-md-math-block-textarea");
|
|
55144
55163
|
!e || document.activeElement === e || e.focus();
|
|
55145
55164
|
}));
|
|
@@ -55173,33 +55192,36 @@ var dY = (e, t) => {
|
|
|
55173
55192
|
config: null
|
|
55174
55193
|
};
|
|
55175
55194
|
}
|
|
55176
|
-
},
|
|
55195
|
+
}, bY = /Mac|iPhone|iPad|iPod/, xY = (e, t) => (typeof navigator < "u" && bY.test(navigator.platform) ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey) ? t === "modAlt" ? e.altKey && !e.shiftKey : e.shiftKey && !e.altKey : !1, SY = (e, t, n, r) => (YI({
|
|
55177
55196
|
portalContainer: t,
|
|
55178
55197
|
view: e,
|
|
55179
55198
|
messages: n,
|
|
55180
55199
|
imageUpload: r
|
|
55181
|
-
}), !0),
|
|
55182
|
-
|
|
55183
|
-
|
|
55184
|
-
|
|
55185
|
-
|
|
55186
|
-
|
|
55187
|
-
|
|
55200
|
+
}), !0), CY = (e, t, n, r) => {
|
|
55201
|
+
let i = gJ(n), a = Object.fromEntries(Object.entries(i).map(([e, t]) => [t.code, e]));
|
|
55202
|
+
return (i, o) => {
|
|
55203
|
+
if (o.isComposing || !xY(o, n) || !nY(i)) return !1;
|
|
55204
|
+
let s = a[o.code];
|
|
55205
|
+
if (!s) return !1;
|
|
55206
|
+
let c = s === "image" ? SY(i, e, t, r) : tY(i, s);
|
|
55207
|
+
return c && o.preventDefault(), c;
|
|
55208
|
+
};
|
|
55209
|
+
}, wY = "table", TY = "ArrowUp", EY = (e) => e.key !== TY || e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey, DY = (e, t) => {
|
|
55188
55210
|
let n = t.nodeBefore;
|
|
55189
|
-
return !n || n.type.name !==
|
|
55211
|
+
return !n || n.type.name !== wY ? null : {
|
|
55190
55212
|
tableNode: n,
|
|
55191
55213
|
tableStart: e - n.nodeSize
|
|
55192
55214
|
};
|
|
55193
|
-
},
|
|
55215
|
+
}, OY = (e) => {
|
|
55194
55216
|
if (e.parent.type.name !== "paragraph" || e.parentOffset !== 0 || e.parent.childCount > 0 || e.depth < 1) return null;
|
|
55195
55217
|
let t = e.index(e.depth - 1);
|
|
55196
55218
|
if (t <= 0) return null;
|
|
55197
55219
|
let n = e.node(e.depth - 1).child(t - 1);
|
|
55198
|
-
return n.type.name ===
|
|
55220
|
+
return n.type.name === wY ? {
|
|
55199
55221
|
tableNode: n,
|
|
55200
55222
|
tableStart: e.before(e.depth) - n.nodeSize
|
|
55201
55223
|
} : null;
|
|
55202
|
-
},
|
|
55224
|
+
}, kY = (e, t) => {
|
|
55203
55225
|
if (e.childCount === 0) return null;
|
|
55204
55226
|
let n = e.childCount - 1, r = e.child(n);
|
|
55205
55227
|
if (r.childCount === 0) return null;
|
|
@@ -55208,21 +55230,21 @@ var dY = (e, t) => {
|
|
|
55208
55230
|
let a = r.childCount - 1, o = r.child(a), s = 0;
|
|
55209
55231
|
for (let e = 0; e < a; e += 1) s += r.child(e).nodeSize;
|
|
55210
55232
|
return t + 1 + i + 1 + s + o.nodeSize - 1;
|
|
55211
|
-
},
|
|
55233
|
+
}, AY = (e) => {
|
|
55212
55234
|
let { selection: t } = e.state, n = t.$from, r = null;
|
|
55213
|
-
if (t instanceof GN ? r =
|
|
55214
|
-
let i =
|
|
55235
|
+
if (t instanceof GN ? r = DY(t.from, n) : t.empty && (r = OY(n)), !r) return !1;
|
|
55236
|
+
let i = kY(r.tableNode, r.tableStart);
|
|
55215
55237
|
if (i === null) return !1;
|
|
55216
55238
|
let a = e.state.tr.setSelection(N.near(e.state.doc.resolve(i), -1)).scrollIntoView();
|
|
55217
55239
|
return e.dispatch(a), e.focus(), !0;
|
|
55218
|
-
},
|
|
55240
|
+
}, jY = Pw(() => new Xu({
|
|
55219
55241
|
key: new $u("zt-md-table-arrow-entry"),
|
|
55220
|
-
props: { handleKeyDown: (e, t) =>
|
|
55221
|
-
})),
|
|
55242
|
+
props: { handleKeyDown: (e, t) => EY(t) ? !1 : AY(e) }
|
|
55243
|
+
})), MY = "table", NY = "table_header_row", PY = "table_row", FY = "table_header", IY = "table_cell", LY = (e) => {
|
|
55222
55244
|
let t = e.selection.$from, n = -1, r = -1;
|
|
55223
55245
|
for (let e = t.depth; e >= 0; --e) {
|
|
55224
55246
|
let i = t.node(e);
|
|
55225
|
-
if (r < 0 && (i.type.name ===
|
|
55247
|
+
if (r < 0 && (i.type.name === IY || i.type.name === FY) && (r = t.index(e - 1)), n < 0 && (i.type.name === PY || i.type.name === NY) && (n = t.index(e - 1)), i.type.name === MY) return {
|
|
55226
55248
|
tableNode: i,
|
|
55227
55249
|
tableStart: e === 0 ? 0 : t.before(e),
|
|
55228
55250
|
tableNodeSize: i.nodeSize,
|
|
@@ -55231,7 +55253,7 @@ var dY = (e, t) => {
|
|
|
55231
55253
|
};
|
|
55232
55254
|
}
|
|
55233
55255
|
return null;
|
|
55234
|
-
},
|
|
55256
|
+
}, RY = (e, t, n, r) => {
|
|
55235
55257
|
if (n < 0 || n >= e.childCount) return null;
|
|
55236
55258
|
let i = 0;
|
|
55237
55259
|
for (let t = 0; t < n; t += 1) i += e.child(t).nodeSize;
|
|
@@ -55240,16 +55262,16 @@ var dY = (e, t) => {
|
|
|
55240
55262
|
let o = 0;
|
|
55241
55263
|
for (let e = 0; e < r; e += 1) o += a.child(e).nodeSize;
|
|
55242
55264
|
return t + 1 + i + 1 + o + 1 + 1;
|
|
55243
|
-
},
|
|
55265
|
+
}, zY = (e) => {
|
|
55244
55266
|
if (e.columnIndex < 0 || e.tableNode.childCount === 0) return !1;
|
|
55245
55267
|
let t = e.tableNode.child(0);
|
|
55246
55268
|
return e.columnIndex < t.childCount;
|
|
55247
|
-
},
|
|
55248
|
-
let i =
|
|
55269
|
+
}, BY = (e, t, n, r) => {
|
|
55270
|
+
let i = RY(t.tableNode, t.tableStart, n, r);
|
|
55249
55271
|
if (i === null) return !1;
|
|
55250
55272
|
let a = e.state.tr.setSelection(N.near(e.state.tr.doc.resolve(i), 1));
|
|
55251
55273
|
return e.dispatch(a), !0;
|
|
55252
|
-
},
|
|
55274
|
+
}, VY = (e, t) => t(e.state, e.dispatch, e) ? (e.dispatch(e.state.tr.scrollIntoView()), e.focus(), !0) : !1, HY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !BY(e, t, t.rowIndex, t.columnIndex) ? !1 : VY(e, n === "above" ? Sk : Ck), UY = (e, t) => t.rowIndex <= 0 || t.columnIndex < 0 || !BY(e, t, t.rowIndex, t.columnIndex) ? !1 : VY(e, Tk), WY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !BY(e, t, t.rowIndex, t.columnIndex) ? !1 : VY(e, n === "left" ? gk : _k), GY = (e, t) => t.rowIndex < 0 || t.columnIndex < 0 || (t.tableNode.childCount > 0 ? t.tableNode.child(0).childCount : 0) <= 1 || !BY(e, t, t.rowIndex, t.columnIndex) ? !1 : VY(e, yk), KY = (e, t, n) => {
|
|
55253
55275
|
if (t.columnIndex < 0) return !1;
|
|
55254
55276
|
let r = SO.get(t.tableNode), i = t.tableStart + 1, a = t.columnIndex, o = e.state.tr;
|
|
55255
55277
|
for (let e = 0; e < r.height; e += 1) {
|
|
@@ -55264,14 +55286,14 @@ var dY = (e, t) => {
|
|
|
55264
55286
|
o.setNodeMarkup(c, l.type, u, l.marks);
|
|
55265
55287
|
}
|
|
55266
55288
|
return o.docChanged ? (o.scrollIntoView(), e.dispatch(o), e.focus(), !0) : !1;
|
|
55267
|
-
},
|
|
55268
|
-
let t =
|
|
55269
|
-
!t || t.rowIndex <= 0 ||
|
|
55270
|
-
},
|
|
55271
|
-
let t =
|
|
55272
|
-
!t || t.rowIndex < 0 || t.columnIndex < 0 ||
|
|
55273
|
-
},
|
|
55274
|
-
let [t, r] = f(!1), a =
|
|
55289
|
+
}, qY = (e) => {
|
|
55290
|
+
let t = LY(e.state);
|
|
55291
|
+
!t || t.rowIndex <= 0 || UY(e, t);
|
|
55292
|
+
}, JY = (e) => {
|
|
55293
|
+
let t = LY(e.state);
|
|
55294
|
+
!t || t.rowIndex < 0 || t.columnIndex < 0 || GY(e, t);
|
|
55295
|
+
}, YY = (e) => {
|
|
55296
|
+
let [t, r] = f(!1), a = Oq({
|
|
55275
55297
|
open: t,
|
|
55276
55298
|
portalContainer: e.portalContainer,
|
|
55277
55299
|
editorWrapper: e.collisionBoundary,
|
|
@@ -55303,7 +55325,7 @@ var dY = (e, t) => {
|
|
|
55303
55325
|
size: 14,
|
|
55304
55326
|
strokeWidth: 2,
|
|
55305
55327
|
"aria-hidden": "true"
|
|
55306
|
-
})), i(
|
|
55328
|
+
})), i(kq, {
|
|
55307
55329
|
panel: a,
|
|
55308
55330
|
portalContainer: e.portalContainer,
|
|
55309
55331
|
className: "zt-md-table-action-popover",
|
|
@@ -55371,13 +55393,13 @@ var dY = (e, t) => {
|
|
|
55371
55393
|
e.onDeleteColumn(), r(!1);
|
|
55372
55394
|
}
|
|
55373
55395
|
}, e.messages.tableDeleteColumnLabel))));
|
|
55374
|
-
},
|
|
55396
|
+
}, XY = "zt-md-table-focus-actions", ZY = 0, QY = 24, $Y = 4, eX = 4, tX = "top", nX = "left", rX = (e) => y(i(e, {
|
|
55375
55397
|
size: 14,
|
|
55376
55398
|
strokeWidth: 2,
|
|
55377
55399
|
"aria-hidden": "true"
|
|
55378
|
-
})),
|
|
55400
|
+
})), iX = rX(rt), aX = rX(tt), oX = rX(et), sX = rX($e), cX = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, lX = class {
|
|
55379
55401
|
constructor(e, t, n) {
|
|
55380
|
-
this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment =
|
|
55402
|
+
this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = nX, this.currentTableElement = null, this.hasPositionContext = !1, this.repositionScheduler = Eq(() => {
|
|
55381
55403
|
this.hasPositionContext && this.updateOverlayPosition();
|
|
55382
55404
|
}), this.handleActionsMouseDown = (e) => {
|
|
55383
55405
|
e.preventDefault();
|
|
@@ -55392,41 +55414,41 @@ var dY = (e, t) => {
|
|
|
55392
55414
|
}, this.handleAlignRightClick = () => {
|
|
55393
55415
|
this.applyColumnAlignment("right");
|
|
55394
55416
|
}, this.handleInsertRowBelow = () => {
|
|
55395
|
-
let e =
|
|
55396
|
-
!e || e.rowIndex < 0 ||
|
|
55417
|
+
let e = LY(this.view.state);
|
|
55418
|
+
!e || e.rowIndex < 0 || HY(this.view, e, "below");
|
|
55397
55419
|
}, this.handleInsertRowAbove = () => {
|
|
55398
|
-
let e =
|
|
55399
|
-
!e || e.rowIndex <= 0 ||
|
|
55420
|
+
let e = LY(this.view.state);
|
|
55421
|
+
!e || e.rowIndex <= 0 || HY(this.view, e, "above");
|
|
55400
55422
|
}, this.handleInsertColumnLeft = () => {
|
|
55401
55423
|
this.insertColumn("left");
|
|
55402
55424
|
}, this.handleInsertColumnRight = () => {
|
|
55403
55425
|
this.insertColumn("right");
|
|
55404
55426
|
}, this.handleDeleteRow = () => {
|
|
55405
|
-
|
|
55427
|
+
qY(this.view);
|
|
55406
55428
|
}, this.handleDeleteColumn = () => {
|
|
55407
|
-
|
|
55408
|
-
}, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper =
|
|
55429
|
+
JY(this.view);
|
|
55430
|
+
}, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = bq(e.dom), this.actionsContainer = document.createElement("div"), this.actionsContainer.className = "zt-md-table-actions-overlay", this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-table-action-button zt-md-table-action-button-danger", this.deleteButton.style.display = "inline-flex", this.deleteButton.setAttribute("aria-label", t.tableDeleteAriaLabel), this.deleteButton.innerHTML = iX, this.alignLeftButton = this.createColumnAlignmentButton(t.tableAlignLeftAriaLabel, aX), this.alignCenterButton = this.createColumnAlignmentButton(t.tableAlignCenterAriaLabel, oX), this.alignRightButton = this.createColumnAlignmentButton(t.tableAlignRightAriaLabel, sX), this.moreActionsMount = document.createElement("span"), this.moreActionsMount.className = "zt-md-table-more-actions-mount", this.moreActionsRoot = b(this.moreActionsMount), this.actionsContainer.append(this.moreActionsMount, this.alignLeftButton, this.alignCenterButton, this.alignRightButton, this.deleteButton), this.actionsContainer.addEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.alignLeftButton.addEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.addEventListener("click", this.handleAlignCenterClick), this.alignRightButton.addEventListener("click", this.handleAlignRightClick), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
|
|
55409
55431
|
}
|
|
55410
55432
|
createColumnAlignmentButton(e, t) {
|
|
55411
55433
|
let n = document.createElement("button");
|
|
55412
55434
|
return n.type = "button", n.className = "zt-md-table-action-button", n.style.display = "inline-flex", n.setAttribute("aria-label", e), n.innerHTML = t, n;
|
|
55413
55435
|
}
|
|
55414
55436
|
resolveColumnAlignment(e) {
|
|
55415
|
-
return e === "center" || e === "right" ? e :
|
|
55437
|
+
return e === "center" || e === "right" ? e : nX;
|
|
55416
55438
|
}
|
|
55417
55439
|
updateAlignmentButtonsState(e) {
|
|
55418
55440
|
this.alignLeftButton.disabled = !e, this.alignCenterButton.disabled = !e, this.alignRightButton.disabled = !e, this.alignLeftButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "left"), this.alignCenterButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "center"), this.alignRightButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "right");
|
|
55419
55441
|
}
|
|
55420
55442
|
applyColumnAlignment(e) {
|
|
55421
|
-
let t =
|
|
55422
|
-
!t || t.rowIndex < 0 || t.columnIndex < 0 ||
|
|
55443
|
+
let t = LY(this.view.state);
|
|
55444
|
+
!t || t.rowIndex < 0 || t.columnIndex < 0 || KY(this.view, t, e);
|
|
55423
55445
|
}
|
|
55424
55446
|
insertColumn(e) {
|
|
55425
|
-
let t =
|
|
55426
|
-
!t || t.rowIndex < 0 || t.columnIndex < 0 ||
|
|
55447
|
+
let t = LY(this.view.state);
|
|
55448
|
+
!t || t.rowIndex < 0 || t.columnIndex < 0 || WY(this.view, t, e);
|
|
55427
55449
|
}
|
|
55428
55450
|
renderMoreActions(e, t, n, r) {
|
|
55429
|
-
this.moreActionsRoot.render(i(
|
|
55451
|
+
this.moreActionsRoot.render(i(YY, {
|
|
55430
55452
|
messages: this.messages,
|
|
55431
55453
|
portalContainer: this.portalContainer,
|
|
55432
55454
|
collisionBoundary: this.editorWrapper,
|
|
@@ -55449,7 +55471,7 @@ var dY = (e, t) => {
|
|
|
55449
55471
|
}
|
|
55450
55472
|
resolveTableAnchor(e, t) {
|
|
55451
55473
|
if (!this.editorWrapper) return null;
|
|
55452
|
-
let n = e.getBoundingClientRect(), r =
|
|
55474
|
+
let n = e.getBoundingClientRect(), r = Sq(n, this.editorWrapper), i = n.width, a = r.anchorLeftInContent + i - t - ZY, o = r.anchorTopInContent - QY + $Y;
|
|
55453
55475
|
return {
|
|
55454
55476
|
anchorLeftInContent: a,
|
|
55455
55477
|
anchorTopInContent: o,
|
|
@@ -55466,22 +55488,22 @@ var dY = (e, t) => {
|
|
|
55466
55488
|
if (e === null) return;
|
|
55467
55489
|
let t = this.resolveTableAnchor(this.currentTableElement, e);
|
|
55468
55490
|
if (!t) return;
|
|
55469
|
-
let n =
|
|
55491
|
+
let n = Tq({
|
|
55470
55492
|
wrapper: this.editorWrapper,
|
|
55471
55493
|
anchor: t,
|
|
55472
55494
|
overlaySize: { width: e },
|
|
55473
|
-
placement:
|
|
55495
|
+
placement: tX,
|
|
55474
55496
|
offsetY: 0,
|
|
55475
|
-
boundaryInset:
|
|
55497
|
+
boundaryInset: eX
|
|
55476
55498
|
}, this.portalContainer);
|
|
55477
55499
|
this.actionsContainer.style.left = `${n.left}px`, this.actionsContainer.style.top = `${n.top}px`;
|
|
55478
55500
|
}
|
|
55479
55501
|
update(e) {
|
|
55480
|
-
if (this.view = e, !this.editorWrapper || !
|
|
55502
|
+
if (this.view = e, !this.editorWrapper || !cX(e)) {
|
|
55481
55503
|
this.detach();
|
|
55482
55504
|
return;
|
|
55483
55505
|
}
|
|
55484
|
-
let t =
|
|
55506
|
+
let t = LY(e.state);
|
|
55485
55507
|
if (!t) {
|
|
55486
55508
|
this.detach();
|
|
55487
55509
|
return;
|
|
@@ -55497,102 +55519,102 @@ var dY = (e, t) => {
|
|
|
55497
55519
|
return;
|
|
55498
55520
|
}
|
|
55499
55521
|
this.actionsContainer.parentElement !== this.portalContainer && this.portalContainer.append(this.actionsContainer);
|
|
55500
|
-
let i =
|
|
55522
|
+
let i = zY(t), a = i && t.tableNode.child(0).childCount > 1, o = t.rowIndex > 0, s = t.rowIndex > 0, c = t.tableNode.childCount > 0 ? t.tableNode.child(0) : null;
|
|
55501
55523
|
this.currentColumnIndex = i ? t.columnIndex : null, this.currentColumnAlignment = this.resolveColumnAlignment(this.currentColumnIndex === null ? null : c?.maybeChild(this.currentColumnIndex)?.attrs?.alignment), this.updateAlignmentButtonsState(i), this.renderMoreActions(o, i, s, a), this.currentTableElement = r, this.currentTableStart = t.tableStart, this.currentTableNodeSize = t.tableNodeSize, this.hasPositionContext = !0, this.updateOverlayPosition(), this.repositionScheduler.schedule();
|
|
55502
55524
|
}
|
|
55503
55525
|
detach() {
|
|
55504
|
-
this.moreActionsRoot.render(null), this.actionsContainer.remove(), this.currentTableElement = null, this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment =
|
|
55526
|
+
this.moreActionsRoot.render(null), this.actionsContainer.remove(), this.currentTableElement = null, this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = nX, this.updateAlignmentButtonsState(!1), this.hasPositionContext = !1;
|
|
55505
55527
|
}
|
|
55506
55528
|
destroy() {
|
|
55507
55529
|
this.detach(), this.repositionScheduler.destroy(), this.moreActionsRoot.unmount(), this.actionsContainer.removeEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.alignLeftButton.removeEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.removeEventListener("click", this.handleAlignCenterClick), this.alignRightButton.removeEventListener("click", this.handleAlignRightClick);
|
|
55508
55530
|
}
|
|
55509
|
-
},
|
|
55531
|
+
}, uX = (e, t) => {
|
|
55510
55532
|
let n = SF(void 0, t);
|
|
55511
55533
|
return Pw(() => new Xu({
|
|
55512
|
-
key: new $u(
|
|
55513
|
-
view: (t) => new
|
|
55534
|
+
key: new $u(XY),
|
|
55535
|
+
view: (t) => new lX(t, n, e)
|
|
55514
55536
|
}));
|
|
55515
|
-
},
|
|
55537
|
+
}, dX = "list_item", fX = "li[data-item-type=\"task\"]", pX = 24, mX = (e, t) => {
|
|
55516
55538
|
let n = t.getBoundingClientRect();
|
|
55517
|
-
return e.clientX >= n.left && e.clientX <= n.left +
|
|
55518
|
-
},
|
|
55539
|
+
return e.clientX >= n.left && e.clientX <= n.left + pX && e.clientY >= n.top && e.clientY <= n.top + pX;
|
|
55540
|
+
}, hX = (e) => {
|
|
55519
55541
|
if (!(e instanceof Element)) return null;
|
|
55520
|
-
let t = e.closest(
|
|
55542
|
+
let t = e.closest(fX);
|
|
55521
55543
|
return t instanceof HTMLElement ? t : null;
|
|
55522
|
-
},
|
|
55544
|
+
}, gX = (e, t) => {
|
|
55523
55545
|
if (!e.editable) return !1;
|
|
55524
|
-
let n =
|
|
55525
|
-
return !n || !
|
|
55526
|
-
},
|
|
55546
|
+
let n = hX(t.target);
|
|
55547
|
+
return !n || !mX(t, n) ? !1 : (t.preventDefault(), !0);
|
|
55548
|
+
}, _X = (e, t) => {
|
|
55527
55549
|
let n = e.posAtDOM(t, 0) - 1, r = e.state.doc.nodeAt(n);
|
|
55528
|
-
return !r || r.type.name !==
|
|
55550
|
+
return !r || r.type.name !== dX || r.attrs.checked == null ? !1 : (e.dispatch(e.state.tr.setNodeMarkup(n, void 0, {
|
|
55529
55551
|
...r.attrs,
|
|
55530
55552
|
checked: !r.attrs.checked
|
|
55531
55553
|
})), !0);
|
|
55532
|
-
},
|
|
55533
|
-
mousedown: (e, t) =>
|
|
55534
|
-
dblclick: (e, t) =>
|
|
55554
|
+
}, vX = Pw(() => new Xu({ props: { handleDOMEvents: {
|
|
55555
|
+
mousedown: (e, t) => gX(e, t),
|
|
55556
|
+
dblclick: (e, t) => gX(e, t),
|
|
55535
55557
|
click: (e, t) => {
|
|
55536
55558
|
if (!e.editable) return !1;
|
|
55537
|
-
let n =
|
|
55538
|
-
return !n || !
|
|
55559
|
+
let n = hX(t.target);
|
|
55560
|
+
return !n || !mX(t, n) || !_X(e, n) ? !1 : (t.preventDefault(), !0);
|
|
55539
55561
|
}
|
|
55540
|
-
} } })),
|
|
55562
|
+
} } })), yX = "Tab", bX = 4, xX = /^ */, SX = "list_item", CX = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, wX = (e) => {
|
|
55541
55563
|
let { $from: t } = e.selection;
|
|
55542
55564
|
for (let e = t.depth; e >= 0; --e) {
|
|
55543
55565
|
let n = t.node(e);
|
|
55544
|
-
if (n.type.name ===
|
|
55566
|
+
if (n.type.name === SX) return n.type;
|
|
55545
55567
|
}
|
|
55546
55568
|
return null;
|
|
55547
|
-
},
|
|
55569
|
+
}, TX = (e) => {
|
|
55548
55570
|
let { selection: t, doc: n } = e;
|
|
55549
55571
|
if (t.empty) return [t.$from.start()];
|
|
55550
55572
|
let r = /* @__PURE__ */ new Set();
|
|
55551
55573
|
return n.nodesBetween(t.from, t.to, (e, t) => {
|
|
55552
55574
|
e.isTextblock && r.add(t + 1);
|
|
55553
55575
|
}), Array.from(r);
|
|
55554
|
-
},
|
|
55555
|
-
let { state: n } = e, r = " ".repeat(
|
|
55576
|
+
}, EX = (e, t) => {
|
|
55577
|
+
let { state: n } = e, r = " ".repeat(bX), i = TX(n).sort((e, t) => t - e), a = n.tr;
|
|
55556
55578
|
return n.selection.empty ? a.insertText(r, n.selection.to) : i.forEach((e) => {
|
|
55557
55579
|
a.insertText(r, e);
|
|
55558
55580
|
}), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
|
|
55559
|
-
},
|
|
55581
|
+
}, DX = (e, t) => {
|
|
55560
55582
|
let { state: n } = e, { selection: r } = n;
|
|
55561
55583
|
if (!(r instanceof N)) return !1;
|
|
55562
|
-
let i =
|
|
55584
|
+
let i = TX(n).sort((e, t) => t - e), a = n.tr;
|
|
55563
55585
|
return i.forEach((e) => {
|
|
55564
|
-
let t = n.doc.resolve(e).parent.textContent.match(
|
|
55586
|
+
let t = n.doc.resolve(e).parent.textContent.match(xX)?.[0].length ?? 0, r = Math.min(t, bX);
|
|
55565
55587
|
r <= 0 || a.delete(e, e + r);
|
|
55566
55588
|
}), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
|
|
55567
|
-
},
|
|
55589
|
+
}, OX = Pw(() => new Xu({
|
|
55568
55590
|
key: new $u("zt-md-tab-space-indent"),
|
|
55569
55591
|
props: { handleKeyDown: (e, t) => {
|
|
55570
55592
|
let n = e;
|
|
55571
|
-
if (!
|
|
55572
|
-
let r =
|
|
55593
|
+
if (!CX(n) || t.defaultPrevented || t.key !== yX || t.altKey || t.ctrlKey || t.metaKey) return !1;
|
|
55594
|
+
let r = wX(n.state);
|
|
55573
55595
|
if (r) {
|
|
55574
55596
|
let e = (t.shiftKey ? yE(r) : SE(r))(n.state, n.dispatch);
|
|
55575
55597
|
return t.preventDefault(), e || !0;
|
|
55576
55598
|
}
|
|
55577
|
-
return t.shiftKey ?
|
|
55599
|
+
return t.shiftKey ? DX(n, t) : EX(n, t);
|
|
55578
55600
|
} }
|
|
55579
|
-
})),
|
|
55601
|
+
})), kX = (e) => {
|
|
55580
55602
|
let t = (e instanceof Element ? e : e.parentElement)?.closest("code");
|
|
55581
55603
|
return t instanceof HTMLElement && !t.closest("pre") ? t : null;
|
|
55582
|
-
},
|
|
55604
|
+
}, AX = (e, t, n) => kX(e.domAtPos(t, n).node), jX = (e) => {
|
|
55583
55605
|
let t = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT), n = t.nextNode(), r = null;
|
|
55584
55606
|
for (; n;) n.data.length > 0 && (r = n), n = t.nextNode();
|
|
55585
55607
|
return r;
|
|
55586
|
-
},
|
|
55608
|
+
}, MX = (e, t, n) => {
|
|
55587
55609
|
let r = e.domAtPos(t, n);
|
|
55588
55610
|
e.dom.ownerDocument.getSelection()?.collapse(r.node, r.offset);
|
|
55589
|
-
},
|
|
55590
|
-
let n = e.domAtPos(t, -1), r =
|
|
55611
|
+
}, NX = (e, t) => {
|
|
55612
|
+
let n = e.domAtPos(t, -1), r = kX(n.node), i = e.dom.ownerDocument.getSelection();
|
|
55591
55613
|
if (!r) {
|
|
55592
55614
|
i?.collapse(n.node, n.offset);
|
|
55593
55615
|
return;
|
|
55594
55616
|
}
|
|
55595
|
-
let a =
|
|
55617
|
+
let a = jX(r);
|
|
55596
55618
|
if (!a) {
|
|
55597
55619
|
let e = r.childNodes.length;
|
|
55598
55620
|
i?.collapse(r, e);
|
|
@@ -55600,7 +55622,7 @@ var dY = (e, t) => {
|
|
|
55600
55622
|
}
|
|
55601
55623
|
let o = a.data.length;
|
|
55602
55624
|
i?.collapse(a, o);
|
|
55603
|
-
},
|
|
55625
|
+
}, PX = {
|
|
55604
55626
|
left: {
|
|
55605
55627
|
inwardKey: "ArrowRight",
|
|
55606
55628
|
outwardKey: "ArrowLeft"
|
|
@@ -55609,13 +55631,13 @@ var dY = (e, t) => {
|
|
|
55609
55631
|
inwardKey: "ArrowLeft",
|
|
55610
55632
|
outwardKey: "ArrowRight"
|
|
55611
55633
|
}
|
|
55612
|
-
},
|
|
55634
|
+
}, FX = {
|
|
55613
55635
|
left: "nodeAfter",
|
|
55614
55636
|
right: "nodeBefore"
|
|
55615
|
-
},
|
|
55637
|
+
}, IX = (e, t) => {
|
|
55616
55638
|
e.dispatch(e.state.tr.setMeta(t, null));
|
|
55617
|
-
},
|
|
55618
|
-
if (t.key === "ArrowRight") return
|
|
55639
|
+
}, LX = (e, t, n, r, i) => {
|
|
55640
|
+
if (t.key === "ArrowRight") return IX(e, i), !1;
|
|
55619
55641
|
if (t.key !== "ArrowLeft") return !1;
|
|
55620
55642
|
t.preventDefault();
|
|
55621
55643
|
let a = (e.state.storedMarks ?? e.state.selection.$from.marks()).filter((e) => e.type !== n);
|
|
@@ -55623,35 +55645,35 @@ var dY = (e, t) => {
|
|
|
55623
55645
|
...r,
|
|
55624
55646
|
placement: "outside"
|
|
55625
55647
|
})), !0;
|
|
55626
|
-
},
|
|
55627
|
-
if (r.placement === "inside") return
|
|
55628
|
-
let a =
|
|
55629
|
-
if (t.key === a.outwardKey) return
|
|
55648
|
+
}, RX = (e, t, n, r, i) => {
|
|
55649
|
+
if (r.placement === "inside") return LX(e, t, n, r, i);
|
|
55650
|
+
let a = PX[r.side];
|
|
55651
|
+
if (t.key === a.outwardKey) return IX(e, i), !1;
|
|
55630
55652
|
if (t.key !== a.inwardKey) return !1;
|
|
55631
|
-
let o =
|
|
55632
|
-
if (!c) return
|
|
55653
|
+
let o = FX[r.side], s = e.state.selection.$from[o], c = s ? n.isInSet(s.marks) : null;
|
|
55654
|
+
if (!c) return IX(e, i), !1;
|
|
55633
55655
|
t.preventDefault();
|
|
55634
55656
|
let l = e.state.storedMarks ?? e.state.selection.$from.marks(), u = c.addToSet(l);
|
|
55635
55657
|
return e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r.position)).setStoredMarks(u).setMeta(i, r.side === "left" ? {
|
|
55636
55658
|
...r,
|
|
55637
55659
|
placement: "inside"
|
|
55638
|
-
} : null)), r.side === "right" &&
|
|
55639
|
-
},
|
|
55660
|
+
} : null)), r.side === "right" && NX(e, r.position), !0;
|
|
55661
|
+
}, zX = (e, t) => !!t.isInSet(e), BX = (e, t, n) => {
|
|
55640
55662
|
let r = e.state.doc.resolve(t), i = r.nodeBefore, a = r.nodeAfter;
|
|
55641
|
-
return !a ||
|
|
55642
|
-
},
|
|
55663
|
+
return !a || zX(i?.marks ?? [], n) || !zX(a.marks, n) ? null : n.isInSet(a.marks);
|
|
55664
|
+
}, VX = (e, t, n) => {
|
|
55643
55665
|
let r = e.state.doc.resolve(t), i = r.nodeBefore, a = r.nodeAfter;
|
|
55644
|
-
return !i || !
|
|
55645
|
-
},
|
|
55666
|
+
return !i || !zX(i.marks, n) || zX(a?.marks ?? [], n) ? null : n.isInSet(i.marks);
|
|
55667
|
+
}, HX = new $u("zt-md-inline-code-boundary-navigation"), UX = "inlineCode", WX = 2, GX = (e, t, n, r) => {
|
|
55646
55668
|
let i = t > 0 ? [t, t - 1] : [t];
|
|
55647
55669
|
for (let [t, a] of i.entries()) {
|
|
55648
|
-
let i =
|
|
55670
|
+
let i = VX(e, a, r);
|
|
55649
55671
|
if (!i) continue;
|
|
55650
55672
|
let o = e.state.doc.resolve(a).nodeAfter;
|
|
55651
55673
|
if (o !== null && !o.isText) continue;
|
|
55652
|
-
let s =
|
|
55674
|
+
let s = AX(e, a, -1);
|
|
55653
55675
|
if (!s) continue;
|
|
55654
|
-
let c = n <= s.getBoundingClientRect().right +
|
|
55676
|
+
let c = n <= s.getBoundingClientRect().right + WX;
|
|
55655
55677
|
if (!(t > 0 && !c)) return {
|
|
55656
55678
|
boundaryPosition: a,
|
|
55657
55679
|
inlineCodeMark: i,
|
|
@@ -55660,203 +55682,203 @@ var dY = (e, t) => {
|
|
|
55660
55682
|
};
|
|
55661
55683
|
}
|
|
55662
55684
|
return null;
|
|
55663
|
-
},
|
|
55685
|
+
}, KX = (e, t) => {
|
|
55664
55686
|
if (t.button !== 0 || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !e.editable) return !1;
|
|
55665
55687
|
let n = e.posAtCoords({
|
|
55666
55688
|
left: t.clientX,
|
|
55667
55689
|
top: t.clientY
|
|
55668
|
-
}), r = e.state.schema.marks[
|
|
55690
|
+
}), r = e.state.schema.marks[UX];
|
|
55669
55691
|
if (!n || !r) return !1;
|
|
55670
|
-
let i = n.pos, a = e.state.doc.resolve(i), o =
|
|
55692
|
+
let i = n.pos, a = e.state.doc.resolve(i), o = BX(e, i, r), s = a.nodeBefore;
|
|
55671
55693
|
if (o && (!s || s.isText)) {
|
|
55672
|
-
let n =
|
|
55694
|
+
let n = AX(e, i, 1);
|
|
55673
55695
|
if (!n) return !1;
|
|
55674
55696
|
let c = n.getBoundingClientRect(), l = t.clientX >= c.left, u = (s?.marks ?? a.marks()).filter((e) => e.type !== r), d = l ? o.addToSet(a.marks()) : u, f = l ? {
|
|
55675
55697
|
position: i,
|
|
55676
55698
|
side: "left",
|
|
55677
55699
|
placement: "inside"
|
|
55678
55700
|
} : null;
|
|
55679
|
-
return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, i)).setStoredMarks(d).setMeta(
|
|
55701
|
+
return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, i)).setStoredMarks(d).setMeta(HX, f)), e.focus(), l || MX(e, i, -1), !0;
|
|
55680
55702
|
}
|
|
55681
|
-
let c =
|
|
55703
|
+
let c = GX(e, i, t.clientX, r);
|
|
55682
55704
|
if (!c) return !1;
|
|
55683
55705
|
let l = c.boundaryPosition, u = e.state.doc.resolve(l), d = c.codeElement.getBoundingClientRect(), f = t.clientX >= d.right, p = (c.rightPlainTextNode?.marks ?? u.marks()).filter((e) => e.type !== r), m = f ? p : c.inlineCodeMark.addToSet(u.marks()), h = f ? {
|
|
55684
55706
|
position: l,
|
|
55685
55707
|
side: "right",
|
|
55686
55708
|
placement: "outside"
|
|
55687
55709
|
} : null;
|
|
55688
|
-
return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, l)).setStoredMarks(m).setMeta(
|
|
55689
|
-
},
|
|
55710
|
+
return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, l)).setStoredMarks(m).setMeta(HX, h)), e.focus(), f || NX(e, l), !0;
|
|
55711
|
+
}, qX = "inlineCode", JX = "zt-md-inline-code-boundary-indicator", YX = "zt-md-inline-code-boundary-indicator-widget", XX = "zt-md-inline-code-boundary-active", ZX = {
|
|
55690
55712
|
left: -1,
|
|
55691
55713
|
right: 1
|
|
55692
|
-
},
|
|
55714
|
+
}, QX = {
|
|
55693
55715
|
left: 1,
|
|
55694
55716
|
right: -1
|
|
55695
|
-
},
|
|
55717
|
+
}, $X = (e) => {
|
|
55696
55718
|
let t = document.createElement("span");
|
|
55697
|
-
return t.className =
|
|
55698
|
-
},
|
|
55719
|
+
return t.className = JX, t.dataset.side = e.side, t.dataset.placement = e.placement, t.contentEditable = "false", t.setAttribute("aria-hidden", "true"), t;
|
|
55720
|
+
}, eZ = (e, t) => {
|
|
55699
55721
|
if (t.placement === "outside") return [];
|
|
55700
|
-
let n = e.schema.marks[
|
|
55722
|
+
let n = e.schema.marks[qX], r = e.doc.resolve(t.position).nodeAfter, i = r && n ? n.isInSet(r.marks) : null;
|
|
55701
55723
|
return i ? [i] : null;
|
|
55702
|
-
},
|
|
55703
|
-
let t =
|
|
55724
|
+
}, tZ = (e) => {
|
|
55725
|
+
let t = HX.getState(e);
|
|
55704
55726
|
if (!t) return wS.empty;
|
|
55705
|
-
let n =
|
|
55727
|
+
let n = eZ(e, t);
|
|
55706
55728
|
if (!n) return wS.empty;
|
|
55707
|
-
let r = t.placement === "inside" ? 1 :
|
|
55729
|
+
let r = t.placement === "inside" ? 1 : ZX[t.side], i = $X(t), a = xS.widget(t.position, i, {
|
|
55708
55730
|
side: r,
|
|
55709
55731
|
marks: n,
|
|
55710
|
-
key: `${
|
|
55732
|
+
key: `${YX}-${t.side}-${t.placement}`,
|
|
55711
55733
|
ignoreSelection: !0,
|
|
55712
55734
|
relaxedSide: !0
|
|
55713
55735
|
});
|
|
55714
55736
|
return wS.create(e.doc, [a]);
|
|
55715
|
-
},
|
|
55737
|
+
}, nZ = (e, t) => {
|
|
55716
55738
|
if (t?.placement !== "outside") return;
|
|
55717
|
-
let n = e.dom.querySelector(`.${
|
|
55739
|
+
let n = e.dom.querySelector(`.${JX}[data-side='${t.side}'][data-placement='outside']`), r = QX[t.side], i = AX(e, t.position, r);
|
|
55718
55740
|
if (!n || !i) return;
|
|
55719
55741
|
let a = n.getBoundingClientRect().left, o = i.getBoundingClientRect(), s = t.side === "left" ? o.left - 1 : o.right + 1, c = Math.round(s - a);
|
|
55720
55742
|
n.style.setProperty("--zt-md-inline-code-boundary-offset-x", `${c}px`);
|
|
55721
|
-
},
|
|
55743
|
+
}, rZ = "inlineCode", iZ = (e, t) => {
|
|
55722
55744
|
let { selection: n } = e.state;
|
|
55723
55745
|
if (!n.empty) return !1;
|
|
55724
55746
|
let r = n.$from.nodeBefore, i = n.$from.nodeAfter;
|
|
55725
|
-
return !!(r &&
|
|
55726
|
-
},
|
|
55747
|
+
return !!(r && zX(r.marks, t) && (!i || !zX(i.marks, t)));
|
|
55748
|
+
}, aZ = (e, t) => {
|
|
55727
55749
|
let { selection: n } = e.state;
|
|
55728
55750
|
if (!n.empty) return !1;
|
|
55729
55751
|
let r = n.$from.nodeBefore, i = n.$from.nodeAfter;
|
|
55730
|
-
return !!(i &&
|
|
55731
|
-
},
|
|
55732
|
-
let r =
|
|
55752
|
+
return !!(i && zX(i.marks, t) && (!r || !zX(r.marks, t)));
|
|
55753
|
+
}, oZ = (e, t, n) => {
|
|
55754
|
+
let r = BX(e, t, n);
|
|
55733
55755
|
if (!r) return !1;
|
|
55734
55756
|
let i = e.state.storedMarks ?? e.state.doc.resolve(t).marks(), a = r.addToSet(i);
|
|
55735
|
-
return e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, t)).setStoredMarks(a).setMeta(
|
|
55757
|
+
return e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, t)).setStoredMarks(a).setMeta(HX, {
|
|
55736
55758
|
position: t,
|
|
55737
55759
|
side: "left",
|
|
55738
55760
|
placement: "inside"
|
|
55739
55761
|
})), !0;
|
|
55740
|
-
},
|
|
55762
|
+
}, sZ = (e, t) => t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !e.editable, cZ = (e, t) => {
|
|
55741
55763
|
let { selection: n } = e.state;
|
|
55742
55764
|
if (!n.empty) return null;
|
|
55743
55765
|
let r = n.$from.nodeBefore;
|
|
55744
|
-
return !r || !
|
|
55745
|
-
},
|
|
55766
|
+
return !r || !zX(r.marks, t) ? null : Array.from(r.textContent).length === 1 ? n.from - r.nodeSize : null;
|
|
55767
|
+
}, lZ = (e, t, n) => {
|
|
55746
55768
|
if (t.key !== "ArrowLeft") return !1;
|
|
55747
|
-
let r =
|
|
55769
|
+
let r = cZ(e, n);
|
|
55748
55770
|
if (r === null) return !1;
|
|
55749
55771
|
let i = e.state.storedMarks ?? e.state.selection.$from.marks();
|
|
55750
|
-
return
|
|
55772
|
+
return zX(i, n) ? (t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(HX, {
|
|
55751
55773
|
position: r,
|
|
55752
55774
|
side: "left",
|
|
55753
55775
|
placement: "inside"
|
|
55754
55776
|
})), !0) : !1;
|
|
55755
|
-
},
|
|
55756
|
-
if (!
|
|
55777
|
+
}, uZ = (e, t, n) => {
|
|
55778
|
+
if (!aZ(e, n)) return !1;
|
|
55757
55779
|
let r = e.state.storedMarks ?? e.state.selection.$from.marks();
|
|
55758
|
-
if (!
|
|
55780
|
+
if (!zX(r, n)) return _Z(e), !1;
|
|
55759
55781
|
t.preventDefault();
|
|
55760
55782
|
let i = r.filter((e) => e.type !== n);
|
|
55761
|
-
return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(
|
|
55783
|
+
return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(HX, {
|
|
55762
55784
|
position: e.state.selection.from,
|
|
55763
55785
|
side: "left",
|
|
55764
55786
|
placement: "outside"
|
|
55765
|
-
})),
|
|
55766
|
-
},
|
|
55767
|
-
if (t.key !== "ArrowLeft" ||
|
|
55787
|
+
})), MX(e, e.state.selection.from, -1), !0;
|
|
55788
|
+
}, dZ = (e, t, n) => {
|
|
55789
|
+
if (t.key !== "ArrowLeft" || !iZ(e, n)) return !1;
|
|
55768
55790
|
let r = e.state.storedMarks ?? e.state.selection.$from.marks();
|
|
55769
|
-
return
|
|
55791
|
+
return zX(r, n) ? !1 : (t.preventDefault(), e.dispatch(e.state.tr.setStoredMarks(r).setMeta(HX, {
|
|
55770
55792
|
position: e.state.selection.from,
|
|
55771
55793
|
side: "right",
|
|
55772
55794
|
placement: "outside"
|
|
55773
|
-
})),
|
|
55774
|
-
},
|
|
55795
|
+
})), MX(e, e.state.selection.from, 1), !0);
|
|
55796
|
+
}, fZ = (e, t) => {
|
|
55775
55797
|
let { selection: n } = e.state;
|
|
55776
55798
|
if (!n.empty) return null;
|
|
55777
55799
|
let r = n.$from.nodeBefore;
|
|
55778
|
-
if (!r?.isText ||
|
|
55800
|
+
if (!r?.isText || zX(r.marks, t) || Array.from(r.textContent).length !== 1) return null;
|
|
55779
55801
|
let i = n.from - r.nodeSize;
|
|
55780
|
-
return
|
|
55781
|
-
},
|
|
55802
|
+
return VX(e, i, t) ? i : null;
|
|
55803
|
+
}, pZ = (e, t, n) => {
|
|
55782
55804
|
if (t.key !== "ArrowLeft") return !1;
|
|
55783
|
-
let r =
|
|
55805
|
+
let r = fZ(e, n);
|
|
55784
55806
|
if (r === null) return !1;
|
|
55785
55807
|
let i = (e.state.selection.$from.nodeBefore?.marks ?? []).filter((e) => e.type !== n);
|
|
55786
|
-
return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(
|
|
55808
|
+
return t.preventDefault(), e.dispatch(e.state.tr.setSelection(N.create(e.state.doc, r)).setStoredMarks(i).setMeta(HX, {
|
|
55787
55809
|
position: r,
|
|
55788
55810
|
side: "right",
|
|
55789
55811
|
placement: "outside"
|
|
55790
|
-
})),
|
|
55791
|
-
},
|
|
55792
|
-
let n = e.getMeta(
|
|
55812
|
+
})), MX(e, r, 1), !0;
|
|
55813
|
+
}, mZ = (e, t, n) => pZ(e, t, n) || dZ(e, t, n) || lZ(e, t, n) || uZ(e, t, n), hZ = () => null, gZ = (e, t) => {
|
|
55814
|
+
let n = e.getMeta(HX);
|
|
55793
55815
|
return n === void 0 ? e.docChanged || e.selectionSet || e.storedMarksSet ? null : t : n;
|
|
55794
|
-
},
|
|
55795
|
-
|
|
55796
|
-
},
|
|
55816
|
+
}, _Z = (e) => {
|
|
55817
|
+
HX.getState(e.state) != null && e.dispatch(e.state.tr.setMeta(HX, null));
|
|
55818
|
+
}, vZ = (e) => (_Z(e), !1), yZ = class {
|
|
55797
55819
|
constructor(e) {
|
|
55798
55820
|
this.editorDom = e.dom, this.update(e);
|
|
55799
55821
|
}
|
|
55800
55822
|
update(e) {
|
|
55801
|
-
let t =
|
|
55802
|
-
this.editorDom.classList.toggle(
|
|
55823
|
+
let t = HX.getState(e.state), n = t != null;
|
|
55824
|
+
this.editorDom.classList.toggle(XX, n), nZ(e, t);
|
|
55803
55825
|
}
|
|
55804
55826
|
destroy() {
|
|
55805
|
-
this.editorDom.classList.remove(
|
|
55827
|
+
this.editorDom.classList.remove(XX);
|
|
55806
55828
|
}
|
|
55807
|
-
},
|
|
55829
|
+
}, bZ = (e) => new yZ(e), xZ = (e) => {
|
|
55808
55830
|
if (!(e instanceof Element)) return !1;
|
|
55809
55831
|
let t = e.closest("code");
|
|
55810
55832
|
return !!(t && !t.closest("pre"));
|
|
55811
|
-
},
|
|
55833
|
+
}, SZ = (e, t, n) => {
|
|
55812
55834
|
if (!e.state.selection.empty) return !1;
|
|
55813
|
-
if (
|
|
55814
|
-
let r =
|
|
55815
|
-
if (i && r &&
|
|
55816
|
-
let a =
|
|
55835
|
+
if (KX(e, n)) return !0;
|
|
55836
|
+
let r = xZ(n.target), i = e.state.schema.marks[rZ];
|
|
55837
|
+
if (i && r && oZ(e, t, i)) return n.preventDefault(), !0;
|
|
55838
|
+
let a = HX.getState(e.state);
|
|
55817
55839
|
if (!r || !a) return !1;
|
|
55818
|
-
let o = e.state.storedMarks, s = e.state.tr.setMeta(
|
|
55819
|
-
return o !== null && i && !
|
|
55820
|
-
},
|
|
55821
|
-
ArrowLeft:
|
|
55840
|
+
let o = e.state.storedMarks, s = e.state.tr.setMeta(HX, null);
|
|
55841
|
+
return o !== null && i && !zX(o, i) && s.setStoredMarks(null), e.dispatch(s), !1;
|
|
55842
|
+
}, CZ = (e, t, n) => t.key !== "ArrowRight" || !aZ(e, n) || zX(e.state.storedMarks ?? e.state.selection.$from.marks(), n) || !oZ(e, e.state.selection.from, n) ? !1 : (t.preventDefault(), !0), wZ = {
|
|
55843
|
+
ArrowLeft: mZ,
|
|
55822
55844
|
ArrowRight: (e, t, n) => {
|
|
55823
55845
|
if (t.key !== "ArrowRight") return !1;
|
|
55824
|
-
if (
|
|
55825
|
-
if (
|
|
55846
|
+
if (CZ(e, t, n)) return !0;
|
|
55847
|
+
if (!iZ(e, n)) return !1;
|
|
55826
55848
|
let r = e.state.storedMarks ?? e.state.selection.$from.marks();
|
|
55827
|
-
if (!
|
|
55849
|
+
if (!zX(r, n)) return _Z(e), !1;
|
|
55828
55850
|
t.preventDefault();
|
|
55829
55851
|
let i = r.filter((e) => e.type !== n);
|
|
55830
|
-
return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(
|
|
55852
|
+
return e.dispatch(e.state.tr.setStoredMarks(i).setMeta(HX, {
|
|
55831
55853
|
position: e.state.selection.from,
|
|
55832
55854
|
side: "right",
|
|
55833
55855
|
placement: "outside"
|
|
55834
|
-
})),
|
|
55856
|
+
})), MX(e, e.state.selection.from, 1), !0;
|
|
55835
55857
|
}
|
|
55836
|
-
},
|
|
55837
|
-
if (
|
|
55838
|
-
let n =
|
|
55858
|
+
}, TZ = (e, t) => {
|
|
55859
|
+
if (sZ(e, t)) return !1;
|
|
55860
|
+
let n = wZ[t.key];
|
|
55839
55861
|
if (!n) return !1;
|
|
55840
|
-
let r = e.state.schema.marks[
|
|
55862
|
+
let r = e.state.schema.marks[rZ];
|
|
55841
55863
|
if (!r) return !1;
|
|
55842
|
-
let i =
|
|
55843
|
-
return i ?
|
|
55844
|
-
},
|
|
55845
|
-
key:
|
|
55846
|
-
view:
|
|
55864
|
+
let i = HX.getState(e.state);
|
|
55865
|
+
return i ? RX(e, t, r, i, HX) : n(e, t, r);
|
|
55866
|
+
}, EZ = Pw(() => new Xu({
|
|
55867
|
+
key: HX,
|
|
55868
|
+
view: bZ,
|
|
55847
55869
|
state: {
|
|
55848
|
-
init:
|
|
55849
|
-
apply:
|
|
55870
|
+
init: hZ,
|
|
55871
|
+
apply: gZ
|
|
55850
55872
|
},
|
|
55851
55873
|
props: {
|
|
55852
|
-
handleKeyDown:
|
|
55853
|
-
handleClick:
|
|
55854
|
-
decorations:
|
|
55855
|
-
handleDOMEvents: { blur:
|
|
55874
|
+
handleKeyDown: TZ,
|
|
55875
|
+
handleClick: SZ,
|
|
55876
|
+
decorations: tZ,
|
|
55877
|
+
handleDOMEvents: { blur: vZ }
|
|
55856
55878
|
}
|
|
55857
|
-
})),
|
|
55879
|
+
})), DZ = class {
|
|
55858
55880
|
constructor(e) {
|
|
55859
|
-
this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && !(this.regexp && !
|
|
55881
|
+
this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && !(this.regexp && !PZ(this.search)), this.wholeWord = !!e.wholeWord, this.filter = e.filter || null, this.impl = this.valid ? this.regexp ? new jZ(this) : new kZ(this) : OZ;
|
|
55860
55882
|
}
|
|
55861
55883
|
eq(e) {
|
|
55862
55884
|
return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
|
|
@@ -55878,13 +55900,13 @@ var dY = (e, t) => {
|
|
|
55878
55900
|
}
|
|
55879
55901
|
}
|
|
55880
55902
|
checkResult(e, t) {
|
|
55881
|
-
return (!this.wholeWord ||
|
|
55903
|
+
return (!this.wholeWord || RZ(e, t.from) && RZ(e, t.to)) && (!this.filter || this.filter(e, t));
|
|
55882
55904
|
}
|
|
55883
55905
|
unquote(e) {
|
|
55884
55906
|
return this.literal ? e : e.replace(/\\([nrt\\])/g, (e, t) => t == "n" ? "\n" : t == "r" ? "\r" : t == "t" ? " " : "\\");
|
|
55885
55907
|
}
|
|
55886
55908
|
getReplacements(e, t) {
|
|
55887
|
-
let n = e.doc.resolve(t.from).marksAcross(e.doc.resolve(t.to)), r = [], i = j.empty, a = t.from, { match: o } = t, s = o ?
|
|
55909
|
+
let n = e.doc.resolve(t.from).marksAcross(e.doc.resolve(t.to)), r = [], i = j.empty, a = t.from, { match: o } = t, s = o ? MZ(o) : [[0, t.to - t.from]], c = NZ(this.unquote(this.replace)), l;
|
|
55888
55910
|
for (let o of c) if (typeof o == "string") i = i.addToEnd(e.schema.text(o, n));
|
|
55889
55911
|
else if (l = s[o.group]) {
|
|
55890
55912
|
let n = t.matchStart + l[0], s = t.matchStart + l[1];
|
|
@@ -55900,22 +55922,22 @@ var dY = (e, t) => {
|
|
|
55900
55922
|
insert: new M(i, 0, 0)
|
|
55901
55923
|
}), r;
|
|
55902
55924
|
}
|
|
55903
|
-
},
|
|
55925
|
+
}, OZ = new class {
|
|
55904
55926
|
findNext() {
|
|
55905
55927
|
return null;
|
|
55906
55928
|
}
|
|
55907
55929
|
findPrev() {
|
|
55908
55930
|
return null;
|
|
55909
55931
|
}
|
|
55910
|
-
}(),
|
|
55932
|
+
}(), kZ = class {
|
|
55911
55933
|
constructor(e) {
|
|
55912
55934
|
this.query = e;
|
|
55913
55935
|
let t = e.unquote(e.search);
|
|
55914
55936
|
e.caseSensitive || (t = t.toLowerCase()), this.string = t;
|
|
55915
55937
|
}
|
|
55916
55938
|
findNext(e, t, n) {
|
|
55917
|
-
return
|
|
55918
|
-
let i = Math.max(t, r), a =
|
|
55939
|
+
return LZ(e.doc, t, n, (e, r) => {
|
|
55940
|
+
let i = Math.max(t, r), a = IZ(e).slice(i - r, Math.min(e.content.size, n - r)), o = (this.query.caseSensitive ? a : a.toLowerCase()).indexOf(this.string);
|
|
55919
55941
|
return o < 0 ? null : {
|
|
55920
55942
|
from: i + o,
|
|
55921
55943
|
to: i + o + this.string.length,
|
|
@@ -55925,8 +55947,8 @@ var dY = (e, t) => {
|
|
|
55925
55947
|
});
|
|
55926
55948
|
}
|
|
55927
55949
|
findPrev(e, t, n) {
|
|
55928
|
-
return
|
|
55929
|
-
let i = Math.max(r, n), a =
|
|
55950
|
+
return LZ(e.doc, t, n, (e, r) => {
|
|
55951
|
+
let i = Math.max(r, n), a = IZ(e).slice(i - r, Math.min(e.content.size, t - r));
|
|
55930
55952
|
this.query.caseSensitive || (a = a.toLowerCase());
|
|
55931
55953
|
let o = a.lastIndexOf(this.string);
|
|
55932
55954
|
return o < 0 ? null : {
|
|
@@ -55937,13 +55959,13 @@ var dY = (e, t) => {
|
|
|
55937
55959
|
};
|
|
55938
55960
|
});
|
|
55939
55961
|
}
|
|
55940
|
-
},
|
|
55962
|
+
}, AZ = "g" + (/x/.unicode == null ? "" : "u") + (/x/.hasIndices == null ? "" : "d"), jZ = class {
|
|
55941
55963
|
constructor(e) {
|
|
55942
|
-
this.query = e, this.regexp = new RegExp(e.search,
|
|
55964
|
+
this.query = e, this.regexp = new RegExp(e.search, AZ + (e.caseSensitive ? "" : "i"));
|
|
55943
55965
|
}
|
|
55944
55966
|
findNext(e, t, n) {
|
|
55945
|
-
return
|
|
55946
|
-
let i =
|
|
55967
|
+
return LZ(e.doc, t, n, (e, r) => {
|
|
55968
|
+
let i = IZ(e).slice(0, Math.min(e.content.size, n - r));
|
|
55947
55969
|
this.regexp.lastIndex = t - r;
|
|
55948
55970
|
let a = this.regexp.exec(i);
|
|
55949
55971
|
return a ? {
|
|
@@ -55955,8 +55977,8 @@ var dY = (e, t) => {
|
|
|
55955
55977
|
});
|
|
55956
55978
|
}
|
|
55957
55979
|
findPrev(e, t, n) {
|
|
55958
|
-
return
|
|
55959
|
-
let r =
|
|
55980
|
+
return LZ(e.doc, t, n, (e, n) => {
|
|
55981
|
+
let r = IZ(e).slice(0, Math.min(e.content.size, t - n)), i;
|
|
55960
55982
|
for (let e = 0;;) {
|
|
55961
55983
|
this.regexp.lastIndex = e;
|
|
55962
55984
|
let t = this.regexp.exec(r);
|
|
@@ -55972,7 +55994,7 @@ var dY = (e, t) => {
|
|
|
55972
55994
|
});
|
|
55973
55995
|
}
|
|
55974
55996
|
};
|
|
55975
|
-
function
|
|
55997
|
+
function MZ(e) {
|
|
55976
55998
|
if (e.indices) return e.indices;
|
|
55977
55999
|
let t = [[0, e[0].length]];
|
|
55978
56000
|
for (let n = 1, r = 0; n < e.length; n++) {
|
|
@@ -55981,7 +56003,7 @@ function DZ(e) {
|
|
|
55981
56003
|
}
|
|
55982
56004
|
return t;
|
|
55983
56005
|
}
|
|
55984
|
-
function
|
|
56006
|
+
function NZ(e) {
|
|
55985
56007
|
let t = [], n = -1;
|
|
55986
56008
|
function r(e) {
|
|
55987
56009
|
let n = t.length - 1;
|
|
@@ -56004,52 +56026,52 @@ function OZ(e) {
|
|
|
56004
56026
|
}
|
|
56005
56027
|
return t;
|
|
56006
56028
|
}
|
|
56007
|
-
function
|
|
56029
|
+
function PZ(e) {
|
|
56008
56030
|
try {
|
|
56009
|
-
return new RegExp(e,
|
|
56031
|
+
return new RegExp(e, AZ), !0;
|
|
56010
56032
|
} catch {
|
|
56011
56033
|
return !1;
|
|
56012
56034
|
}
|
|
56013
56035
|
}
|
|
56014
|
-
var
|
|
56015
|
-
function
|
|
56016
|
-
let t =
|
|
56036
|
+
var FZ = /* @__PURE__ */ new WeakMap();
|
|
56037
|
+
function IZ(e) {
|
|
56038
|
+
let t = FZ.get(e);
|
|
56017
56039
|
if (t) return t;
|
|
56018
56040
|
let n = "";
|
|
56019
56041
|
for (let t = 0; t < e.childCount; t++) {
|
|
56020
56042
|
let r = e.child(t);
|
|
56021
|
-
r.isText ? n += r.text : r.isLeaf ? n += "" : n += " " +
|
|
56043
|
+
r.isText ? n += r.text : r.isLeaf ? n += "" : n += " " + IZ(r) + " ";
|
|
56022
56044
|
}
|
|
56023
|
-
return
|
|
56045
|
+
return FZ.set(e, n), n;
|
|
56024
56046
|
}
|
|
56025
|
-
function
|
|
56047
|
+
function LZ(e, t, n, r, i = 0) {
|
|
56026
56048
|
if (e.inlineContent) return r(e, i);
|
|
56027
56049
|
if (!e.isLeaf) if (t > n) for (let a = e.childCount - 1, o = i + e.content.size; a >= 0 && o > n; a--) {
|
|
56028
56050
|
let i = e.child(a);
|
|
56029
56051
|
if (o -= i.nodeSize, o < t) {
|
|
56030
|
-
let e =
|
|
56052
|
+
let e = LZ(i, t, n, r, o + 1);
|
|
56031
56053
|
if (e != null) return e;
|
|
56032
56054
|
}
|
|
56033
56055
|
}
|
|
56034
56056
|
else for (let a = 0, o = i; a < e.childCount && o < n; a++) {
|
|
56035
56057
|
let i = e.child(a), s = o;
|
|
56036
56058
|
if (o += i.nodeSize, o > t) {
|
|
56037
|
-
let e =
|
|
56059
|
+
let e = LZ(i, t, n, r, s + 1);
|
|
56038
56060
|
if (e != null) return e;
|
|
56039
56061
|
}
|
|
56040
56062
|
}
|
|
56041
56063
|
return null;
|
|
56042
56064
|
}
|
|
56043
|
-
function
|
|
56065
|
+
function RZ(e, t) {
|
|
56044
56066
|
let n = e.doc.resolve(t), r = n.nodeBefore, i = n.nodeAfter;
|
|
56045
56067
|
return !r || !i || !r.isText || !i.isText ? !0 : !/\p{L}$/u.test(r.text) || !/^\p{L}/u.test(i.text);
|
|
56046
56068
|
}
|
|
56047
|
-
var
|
|
56069
|
+
var zZ = class {
|
|
56048
56070
|
constructor(e, t, n) {
|
|
56049
56071
|
this.query = e, this.range = t, this.deco = n;
|
|
56050
56072
|
}
|
|
56051
56073
|
};
|
|
56052
|
-
function
|
|
56074
|
+
function BZ(e, t, n) {
|
|
56053
56075
|
if (!t.valid) return wS.empty;
|
|
56054
56076
|
let r = [], i = e.selection;
|
|
56055
56077
|
for (let a = n ? n.from : 0, o = n ? n.to : e.doc.content.size;;) {
|
|
@@ -56060,18 +56082,18 @@ function FZ(e, t, n) {
|
|
|
56060
56082
|
}
|
|
56061
56083
|
return wS.create(e.doc, r);
|
|
56062
56084
|
}
|
|
56063
|
-
var
|
|
56064
|
-
function
|
|
56085
|
+
var VZ = new $u("search");
|
|
56086
|
+
function HZ(e = {}) {
|
|
56065
56087
|
return new Xu({
|
|
56066
|
-
key:
|
|
56088
|
+
key: VZ,
|
|
56067
56089
|
state: {
|
|
56068
56090
|
init(t, n) {
|
|
56069
|
-
let r = e.initialQuery || new
|
|
56070
|
-
return new
|
|
56091
|
+
let r = e.initialQuery || new DZ({ search: "" }), i = e.initialRange || null;
|
|
56092
|
+
return new zZ(r, i, BZ(n, r, i));
|
|
56071
56093
|
},
|
|
56072
56094
|
apply(e, t, n, r) {
|
|
56073
|
-
let i = e.getMeta(
|
|
56074
|
-
if (i) return new
|
|
56095
|
+
let i = e.getMeta(VZ);
|
|
56096
|
+
if (i) return new zZ(i.query, i.range, BZ(r, i.query, i.range));
|
|
56075
56097
|
if (e.docChanged || e.selectionSet) {
|
|
56076
56098
|
let n = t.range;
|
|
56077
56099
|
if (n) {
|
|
@@ -56081,53 +56103,53 @@ function LZ(e = {}) {
|
|
|
56081
56103
|
to: r
|
|
56082
56104
|
} : null;
|
|
56083
56105
|
}
|
|
56084
|
-
t = new
|
|
56106
|
+
t = new zZ(t.query, n, BZ(r, t.query, n));
|
|
56085
56107
|
}
|
|
56086
56108
|
return t;
|
|
56087
56109
|
}
|
|
56088
56110
|
},
|
|
56089
|
-
props: { decorations: (e) =>
|
|
56111
|
+
props: { decorations: (e) => VZ.getState(e).deco }
|
|
56090
56112
|
});
|
|
56091
56113
|
}
|
|
56092
|
-
function
|
|
56093
|
-
return
|
|
56114
|
+
function UZ(e) {
|
|
56115
|
+
return VZ.getState(e);
|
|
56094
56116
|
}
|
|
56095
|
-
function
|
|
56096
|
-
return e.setMeta(
|
|
56117
|
+
function WZ(e, t, n = null) {
|
|
56118
|
+
return e.setMeta(VZ, {
|
|
56097
56119
|
query: t,
|
|
56098
56120
|
range: n
|
|
56099
56121
|
});
|
|
56100
56122
|
}
|
|
56101
|
-
function
|
|
56123
|
+
function GZ(e, t, n, r, i) {
|
|
56102
56124
|
let a = e.range || {
|
|
56103
56125
|
from: 0,
|
|
56104
56126
|
to: t.doc.content.size
|
|
56105
56127
|
}, o = e.query.findNext(t, Math.max(i, a.from), a.to);
|
|
56106
56128
|
return !o && n && (o = e.query.findNext(t, a.from, Math.min(r, a.to))), o;
|
|
56107
56129
|
}
|
|
56108
|
-
function
|
|
56130
|
+
function KZ(e, t, n, r, i) {
|
|
56109
56131
|
let a = e.range || {
|
|
56110
56132
|
from: 0,
|
|
56111
56133
|
to: t.doc.content.size
|
|
56112
56134
|
}, o = e.query.findPrev(t, Math.min(r, a.to), a.from);
|
|
56113
56135
|
return !o && n && (o = e.query.findPrev(t, a.to, Math.max(i, a.from))), o;
|
|
56114
56136
|
}
|
|
56115
|
-
function
|
|
56137
|
+
function qZ(e, t) {
|
|
56116
56138
|
return (n, r) => {
|
|
56117
|
-
let i =
|
|
56139
|
+
let i = VZ.getState(n);
|
|
56118
56140
|
if (!i || !i.query.valid) return !1;
|
|
56119
|
-
let { from: a, to: o } = n.selection, s = t > 0 ?
|
|
56141
|
+
let { from: a, to: o } = n.selection, s = t > 0 ? GZ(i, n, e, a, o) : KZ(i, n, e, a, o);
|
|
56120
56142
|
if (!s) return !1;
|
|
56121
56143
|
let c = N.create(n.doc, s.from, s.to);
|
|
56122
56144
|
return r && r(n.tr.setSelection(c).scrollIntoView()), !0;
|
|
56123
56145
|
};
|
|
56124
56146
|
}
|
|
56125
|
-
var
|
|
56126
|
-
function
|
|
56147
|
+
var JZ = qZ(!0, 1), YZ = qZ(!0, -1);
|
|
56148
|
+
function XZ(e, t) {
|
|
56127
56149
|
return (n, r) => {
|
|
56128
|
-
let i =
|
|
56150
|
+
let i = VZ.getState(n);
|
|
56129
56151
|
if (!i || !i.query.valid) return !1;
|
|
56130
|
-
let { from: a } = n.selection, o =
|
|
56152
|
+
let { from: a } = n.selection, o = GZ(i, n, e, a, a);
|
|
56131
56153
|
if (!o) return !1;
|
|
56132
56154
|
if (!r) return !0;
|
|
56133
56155
|
if (n.selection.from == o.from && n.selection.to == o.to) {
|
|
@@ -56136,15 +56158,15 @@ function GZ(e, t) {
|
|
|
56136
56158
|
let { from: t, to: n, insert: r } = s[e];
|
|
56137
56159
|
a.replace(t, n, r);
|
|
56138
56160
|
}
|
|
56139
|
-
let c = t &&
|
|
56161
|
+
let c = t && GZ(i, n, e, o.from, o.to);
|
|
56140
56162
|
c ? a.setSelection(N.create(a.doc, a.mapping.map(c.from, 1), a.mapping.map(c.to, -1))) : a.setSelection(N.create(a.doc, o.from, a.mapping.map(o.to, 1))), r(a.scrollIntoView());
|
|
56141
56163
|
} else if (t) r(n.tr.setSelection(N.create(n.doc, o.from, o.to)).scrollIntoView());
|
|
56142
56164
|
else return !1;
|
|
56143
56165
|
return !0;
|
|
56144
56166
|
};
|
|
56145
56167
|
}
|
|
56146
|
-
var
|
|
56147
|
-
let n =
|
|
56168
|
+
var ZZ = XZ(!0, !0), QZ = (e, t) => {
|
|
56169
|
+
let n = VZ.getState(e);
|
|
56148
56170
|
if (!n) return !1;
|
|
56149
56171
|
let r = [], i = n.range || {
|
|
56150
56172
|
from: 0,
|
|
@@ -56167,18 +56189,18 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56167
56189
|
t(i);
|
|
56168
56190
|
}
|
|
56169
56191
|
return !0;
|
|
56170
|
-
},
|
|
56192
|
+
}, $Z = ".zt-md-code-block-action-button[data-active='true']", eQ = ".zt-md-search-panel", tQ = 8, nQ = {
|
|
56171
56193
|
current: 0,
|
|
56172
56194
|
total: 0,
|
|
56173
56195
|
isInvalidExpression: !1
|
|
56174
|
-
},
|
|
56196
|
+
}, rQ = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, iQ = (e) => new DZ({
|
|
56175
56197
|
search: e.search,
|
|
56176
56198
|
replace: e.replace,
|
|
56177
56199
|
caseSensitive: e.caseSensitive,
|
|
56178
56200
|
wholeWord: e.wholeWord,
|
|
56179
56201
|
regexp: e.regexp,
|
|
56180
56202
|
literal: !0
|
|
56181
|
-
}),
|
|
56203
|
+
}), aQ = (e, t) => {
|
|
56182
56204
|
if (!t.valid) return [];
|
|
56183
56205
|
let n = [], r = 0, i = e.doc.content.size;
|
|
56184
56206
|
for (; r < i;) {
|
|
@@ -56187,133 +56209,134 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56187
56209
|
n.push(a), r = Math.max(a.to, r + 1);
|
|
56188
56210
|
}
|
|
56189
56211
|
return n;
|
|
56190
|
-
},
|
|
56191
|
-
let t =
|
|
56192
|
-
if (!t) return
|
|
56193
|
-
let n = t.query, r = n.regexp && n.search.length > 0 && !n.valid, i =
|
|
56212
|
+
}, oQ = (e) => {
|
|
56213
|
+
let t = UZ(e);
|
|
56214
|
+
if (!t) return nQ;
|
|
56215
|
+
let n = t.query, r = n.regexp && n.search.length > 0 && !n.valid, i = aQ(e, n), a = i.findIndex((t) => t.from === e.selection.from && t.to === e.selection.to);
|
|
56194
56216
|
return {
|
|
56195
56217
|
current: a < 0 ? 0 : a + 1,
|
|
56196
56218
|
total: i.length,
|
|
56197
56219
|
isInvalidExpression: r
|
|
56198
56220
|
};
|
|
56199
|
-
},
|
|
56221
|
+
}, sQ = (e, t) => e.current === t.current && e.total === t.total && e.isInvalidExpression === t.isInvalidExpression, cQ = (e) => {
|
|
56200
56222
|
if (e.state.selection.empty) return;
|
|
56201
|
-
let t =
|
|
56223
|
+
let t = bq(e.dom);
|
|
56202
56224
|
if (!t) return;
|
|
56203
|
-
let n = e.coordsAtPos(e.state.selection.from), r = e.coordsAtPos(e.state.selection.to), i = Math.min(n.top, r.top), a = Math.max(n.bottom, r.bottom), o = t.getBoundingClientRect(), s = (t.closest(".zt-md")?.querySelector(
|
|
56225
|
+
let n = e.coordsAtPos(e.state.selection.from), r = e.coordsAtPos(e.state.selection.to), i = Math.min(n.top, r.top), a = Math.max(n.bottom, r.bottom), o = t.getBoundingClientRect(), s = (t.closest(".zt-md")?.querySelector(eQ))?.getBoundingClientRect(), c = Math.max(o.top + tQ, (s?.bottom ?? o.top) + tQ), l = o.bottom - tQ;
|
|
56204
56226
|
if (i < c) {
|
|
56205
56227
|
t.scrollTop += i - c;
|
|
56206
56228
|
return;
|
|
56207
56229
|
}
|
|
56208
56230
|
a > l && (t.scrollTop += a - l);
|
|
56209
|
-
},
|
|
56231
|
+
}, lQ = (e) => {
|
|
56210
56232
|
if (e.state.selection.empty) return;
|
|
56211
56233
|
let t = e.domAtPos(e.state.selection.from), n = (t.node instanceof Element ? t.node : t.node.parentElement)?.closest(".zt-md-code-block");
|
|
56212
56234
|
if (n?.dataset.viewMode !== "preview") {
|
|
56213
|
-
|
|
56235
|
+
cQ(e);
|
|
56214
56236
|
return;
|
|
56215
56237
|
}
|
|
56216
|
-
n.querySelector(
|
|
56217
|
-
|
|
56238
|
+
n.querySelector($Z)?.click(), window.requestAnimationFrame(() => {
|
|
56239
|
+
cQ(e);
|
|
56218
56240
|
});
|
|
56219
|
-
},
|
|
56241
|
+
}, uQ = class {
|
|
56220
56242
|
constructor(e, t) {
|
|
56221
|
-
this.onSnapshotChange = t, this.snapshot =
|
|
56243
|
+
this.onSnapshotChange = t, this.snapshot = nQ, this.emitSnapshot(e.state);
|
|
56222
56244
|
}
|
|
56223
56245
|
update(e) {
|
|
56224
56246
|
this.emitSnapshot(e.state);
|
|
56225
56247
|
}
|
|
56226
56248
|
destroy() {
|
|
56227
|
-
this.onSnapshotChange(
|
|
56249
|
+
this.onSnapshotChange(nQ);
|
|
56228
56250
|
}
|
|
56229
56251
|
emitSnapshot(e) {
|
|
56230
|
-
let t =
|
|
56231
|
-
|
|
56252
|
+
let t = oQ(e);
|
|
56253
|
+
sQ(this.snapshot, t) || (this.snapshot = t, this.onSnapshotChange(t));
|
|
56232
56254
|
}
|
|
56233
|
-
},
|
|
56255
|
+
}, dQ = (e) => [Pw(() => HZ()), Pw(() => new Xu({ view: (t) => new uQ(t, e) }))], fQ = (e) => {
|
|
56234
56256
|
let t = (t) => {
|
|
56235
56257
|
e((e) => {
|
|
56236
|
-
let n =
|
|
56258
|
+
let n = iQ(t), r = WZ(e.state.tr, n);
|
|
56237
56259
|
if (n.valid) {
|
|
56238
56260
|
let t = n.findNext(e.state, e.state.selection.from) ?? n.findNext(e.state, 0, e.state.selection.from);
|
|
56239
56261
|
t && r.setSelection(N.create(r.doc, t.from, t.to)).scrollIntoView();
|
|
56240
56262
|
}
|
|
56241
|
-
e.dispatch(r),
|
|
56263
|
+
e.dispatch(r), lQ(e);
|
|
56242
56264
|
});
|
|
56243
56265
|
}, n = (e, t) => {
|
|
56244
56266
|
e(t.state, (e) => {
|
|
56245
56267
|
t.dispatch(e.scrollIntoView());
|
|
56246
|
-
}) &&
|
|
56268
|
+
}) && lQ(t);
|
|
56247
56269
|
};
|
|
56248
56270
|
return {
|
|
56249
56271
|
updateQuery: t,
|
|
56250
56272
|
findPrevious: () => {
|
|
56251
56273
|
e((e) => {
|
|
56252
|
-
n(
|
|
56274
|
+
n(YZ, e);
|
|
56253
56275
|
});
|
|
56254
56276
|
},
|
|
56255
56277
|
findNext: () => {
|
|
56256
56278
|
e((e) => {
|
|
56257
|
-
n(
|
|
56279
|
+
n(JZ, e);
|
|
56258
56280
|
});
|
|
56259
56281
|
},
|
|
56260
56282
|
replaceCurrent: () => {
|
|
56261
56283
|
e((e) => {
|
|
56262
|
-
|
|
56284
|
+
rQ(e) && n(ZZ, e);
|
|
56263
56285
|
});
|
|
56264
56286
|
},
|
|
56265
56287
|
replaceAll: () => {
|
|
56266
56288
|
e((e) => {
|
|
56267
|
-
if (!
|
|
56268
|
-
let t =
|
|
56269
|
-
!t ||
|
|
56289
|
+
if (!rQ(e)) return;
|
|
56290
|
+
let t = UZ(e.state);
|
|
56291
|
+
!t || aQ(e.state, t.query).length === 0 || QZ(e.state, (t) => {
|
|
56270
56292
|
e.dispatch(t);
|
|
56271
56293
|
});
|
|
56272
56294
|
});
|
|
56273
56295
|
},
|
|
56274
56296
|
clear: () => {
|
|
56275
56297
|
e((e) => {
|
|
56276
|
-
let t = new
|
|
56298
|
+
let t = new DZ({
|
|
56277
56299
|
search: "",
|
|
56278
56300
|
literal: !0
|
|
56279
56301
|
});
|
|
56280
|
-
e.dispatch(
|
|
56302
|
+
e.dispatch(WZ(e.state.tr, t));
|
|
56281
56303
|
});
|
|
56282
56304
|
},
|
|
56283
56305
|
focusCurrent: () => {
|
|
56284
56306
|
e((e) => {
|
|
56285
|
-
e.dispatch(e.state.tr.scrollIntoView()),
|
|
56307
|
+
e.dispatch(e.state.tr.scrollIntoView()), cQ(e), e.focus();
|
|
56286
56308
|
});
|
|
56287
56309
|
}
|
|
56288
56310
|
};
|
|
56289
|
-
},
|
|
56311
|
+
}, pQ = (e) => {
|
|
56290
56312
|
let t = e.target;
|
|
56291
56313
|
if (!(t instanceof Element)) return null;
|
|
56292
56314
|
let n = t.closest("a[href]");
|
|
56293
56315
|
return n instanceof HTMLAnchorElement ? n : null;
|
|
56294
|
-
},
|
|
56295
|
-
let n =
|
|
56316
|
+
}, mQ = (e) => e?.type.name === "image", hQ = (e, t) => {
|
|
56317
|
+
let n = pQ(e);
|
|
56296
56318
|
if (!n) return !1;
|
|
56297
56319
|
let r = AF(n.getAttribute("href"));
|
|
56298
56320
|
return !r || t || !e.ctrlKey ? !1 : (e.preventDefault(), e.stopPropagation(), window.open(r, "_blank", "noopener,noreferrer"), !0);
|
|
56299
|
-
},
|
|
56300
|
-
let t = e.messages ?? SF(), n =
|
|
56321
|
+
}, gQ = (e, t) => !t || !pQ(e) ? !1 : (e.preventDefault(), e.stopPropagation(), !0), _Q = (e) => {
|
|
56322
|
+
let t = e.messages ?? SF(), n = uX(e.contentPortalContainer, t), r = GJ(e.contentPortalContainer, t, e.shortcutMode), i = Gq(t, e.contentPortalContainer), a = kU(t, e.contentPortalContainer), o = II(e.imageUpload, t), s = dQ(e.onSearchSnapshotChange), c = yY(e.portalContainer, e.slashMenu, t, e.imageUpload, e.locale, e.shortcutMode), l = c.plugins, u = CY(e.portalContainer, t, e.shortcutMode, e.imageUpload), d = {
|
|
56301
56323
|
listener: mE,
|
|
56302
56324
|
commonmark: yO,
|
|
56303
|
-
taskListTransformKeymap:
|
|
56304
|
-
inlineCodeBoundaryNavigation:
|
|
56325
|
+
taskListTransformKeymap: TJ(e.shortcutMode),
|
|
56326
|
+
inlineCodeBoundaryNavigation: EZ,
|
|
56305
56327
|
gfm: IN,
|
|
56306
56328
|
history: wT,
|
|
56307
56329
|
editorSearch: s,
|
|
56308
|
-
codeBlockPrism:
|
|
56330
|
+
codeBlockPrism: iJ,
|
|
56309
56331
|
codeBlockLanguagePicker: i,
|
|
56310
56332
|
clipboard: qw,
|
|
56311
56333
|
indent: OT,
|
|
56312
56334
|
imageDeleteSelection: pI,
|
|
56313
56335
|
imagePaste: o,
|
|
56314
|
-
tableArrowEntry:
|
|
56336
|
+
tableArrowEntry: jY,
|
|
56315
56337
|
blockBoundaryNavigation: vP,
|
|
56316
56338
|
headingBackspaceEmptyParagraph: PW,
|
|
56339
|
+
headingFocusIndicator: zW,
|
|
56317
56340
|
mathBackspaceEntry: tL,
|
|
56318
56341
|
blockquoteBackspaceLift: EW,
|
|
56319
56342
|
tableFocusActions: n,
|
|
@@ -56323,21 +56346,21 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56323
56346
|
math: yW,
|
|
56324
56347
|
mathInlineEdit: a,
|
|
56325
56348
|
mathInlineArrowNavigation: ZU,
|
|
56326
|
-
taskListToggle:
|
|
56327
|
-
tabSpaceIndent:
|
|
56328
|
-
codeBlockModASelect:
|
|
56349
|
+
taskListToggle: vX,
|
|
56350
|
+
tabSpaceIndent: OX,
|
|
56351
|
+
codeBlockModASelect: Qq,
|
|
56329
56352
|
slash: l.length > 0 ? l : null
|
|
56330
56353
|
}, f = zN(d, { includeRuntime: !1 }), p = zN(d, { includeRuntime: !0 }).filter((e) => e.name === "clipboard" || e.name === "indent"), m = Ew.make();
|
|
56331
56354
|
m.config((n) => {
|
|
56332
|
-
|
|
56355
|
+
wJ(n, e.shortcutMode), GW(n), UF(n, e.imageUpload?.allowedProtocols), n.set(vw, e.root), n.set(iw, e.markdown), n.set(_w, {
|
|
56333
56356
|
editable: () => !e.readOnly,
|
|
56334
56357
|
handleKeyDown: u,
|
|
56335
56358
|
handleDOMEvents: {
|
|
56336
|
-
mousedown: (t, n) => n instanceof MouseEvent ?
|
|
56337
|
-
click: (t, n) => n instanceof MouseEvent ?
|
|
56359
|
+
mousedown: (t, n) => n instanceof MouseEvent ? gQ(n, e.readOnly) : !1,
|
|
56360
|
+
click: (t, n) => n instanceof MouseEvent ? gQ(n, e.readOnly) : !1
|
|
56338
56361
|
},
|
|
56339
|
-
handleClick: (t, n, r) =>
|
|
56340
|
-
handleClickOn: (t, n, r, i, a, o) =>
|
|
56362
|
+
handleClick: (t, n, r) => hQ(r, e.readOnly),
|
|
56363
|
+
handleClickOn: (t, n, r, i, a, o) => hQ(a, e.readOnly) ? !0 : e.readOnly && o && mQ(r) ? (a.preventDefault(), !0) : !1
|
|
56341
56364
|
});
|
|
56342
56365
|
let r = n.get(xC) ?? [];
|
|
56343
56366
|
n.set(xC, [
|
|
@@ -56345,14 +56368,14 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56345
56368
|
["image", eI(t)],
|
|
56346
56369
|
["math_block", xU(t)],
|
|
56347
56370
|
["math_inline", FU(t)],
|
|
56348
|
-
["code_block",
|
|
56371
|
+
["code_block", cG(t)]
|
|
56349
56372
|
]), n.get(fE).markdownUpdated((t, n) => {
|
|
56350
56373
|
e.onChange(n);
|
|
56351
56374
|
}), c.config && c.config(n);
|
|
56352
56375
|
}), f.forEach((e) => {
|
|
56353
56376
|
m.use(e.plugin);
|
|
56354
56377
|
});
|
|
56355
|
-
let h =
|
|
56378
|
+
let h = fQ((e) => {
|
|
56356
56379
|
m.action((t) => {
|
|
56357
56380
|
e(t.get(mC));
|
|
56358
56381
|
});
|
|
@@ -56393,7 +56416,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56393
56416
|
_(e);
|
|
56394
56417
|
}
|
|
56395
56418
|
};
|
|
56396
|
-
},
|
|
56419
|
+
}, vQ = (e, t, n, r) => {
|
|
56397
56420
|
let i = e, a = i.create.bind(e);
|
|
56398
56421
|
return i.create = async () => {
|
|
56399
56422
|
try {
|
|
@@ -56403,10 +56426,10 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56403
56426
|
throw console.error("Milkdown init failed:", e), r(e), e;
|
|
56404
56427
|
}
|
|
56405
56428
|
}, i;
|
|
56406
|
-
},
|
|
56429
|
+
}, yQ = (e) => {
|
|
56407
56430
|
let t = d(null), n = d(e.markdown), r = d(e.onMarkdownChange), i = d(e.onInitError), a = d(e.onInitReady), o = d(e.onSearchSnapshotChange), s = d(null), l = ce((r) => {
|
|
56408
56431
|
t.current = null, e.focusEditorRef && (e.focusEditorRef.current = null), e.searchControllerRef && (e.searchControllerRef.current = null), n.current = e.markdown;
|
|
56409
|
-
let c =
|
|
56432
|
+
let c = _Q({
|
|
56410
56433
|
root: r,
|
|
56411
56434
|
portalContainer: e.portalContainer,
|
|
56412
56435
|
contentPortalContainer: e.contentPortalContainer,
|
|
@@ -56424,7 +56447,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56424
56447
|
o.current?.(e);
|
|
56425
56448
|
}
|
|
56426
56449
|
});
|
|
56427
|
-
return
|
|
56450
|
+
return vQ(c.editor, c.installRuntimePlugins, () => {
|
|
56428
56451
|
t.current = c, e.focusEditorRef && (e.focusEditorRef.current = c.focusEditor), e.searchControllerRef && (e.searchControllerRef.current = c.searchController), a.current?.();
|
|
56429
56452
|
}, (e) => {
|
|
56430
56453
|
i.current?.(e);
|
|
@@ -56464,20 +56487,20 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56464
56487
|
let r = t.current;
|
|
56465
56488
|
!r || l.loading || e.markdown !== n.current && (n.current = e.markdown, r.setMarkdown(e.markdown));
|
|
56466
56489
|
}, [l.loading, e.markdown]);
|
|
56467
|
-
},
|
|
56490
|
+
}, bQ = 160, xQ = {
|
|
56468
56491
|
search: "",
|
|
56469
56492
|
replace: "",
|
|
56470
56493
|
caseSensitive: !1,
|
|
56471
56494
|
wholeWord: !1,
|
|
56472
56495
|
regexp: !1
|
|
56473
|
-
},
|
|
56496
|
+
}, SQ = {
|
|
56474
56497
|
current: 0,
|
|
56475
56498
|
total: 0,
|
|
56476
56499
|
isInvalidExpression: !1
|
|
56477
|
-
},
|
|
56500
|
+
}, CQ = {
|
|
56478
56501
|
"zh-CN": "只读",
|
|
56479
56502
|
"en-US": "Read only"
|
|
56480
|
-
},
|
|
56503
|
+
}, wQ = (e) => e.length === 0 ? "\"\"" : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\r\n|\r|\n/g, "\\A ")}"`, TQ = (e) => (yQ({
|
|
56481
56504
|
markdown: e.markdown,
|
|
56482
56505
|
portalContainer: e.portalContainer,
|
|
56483
56506
|
contentPortalContainer: e.contentPortalContainer,
|
|
@@ -56494,13 +56517,13 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56494
56517
|
onInitReady: e.onInitReady,
|
|
56495
56518
|
onInitError: e.onInitError,
|
|
56496
56519
|
onSearchSnapshotChange: e.onSearchSnapshotChange
|
|
56497
|
-
}), /* @__PURE__ */ _(oe, {})),
|
|
56498
|
-
let [t, n] = f(""), [r, i] = f(null), [a, s] = f(null), [c, l] = f(!1), [p, m] = f(!1), [h, g] = f(
|
|
56520
|
+
}), /* @__PURE__ */ _(oe, {})), EQ = (e) => {
|
|
56521
|
+
let [t, n] = f(""), [r, i] = f(null), [a, s] = f(null), [c, l] = f(!1), [p, m] = f(!1), [h, g] = f(xQ), [y, b] = f(SQ), x = d(null), S = d(null), C = d(null), w = e.theme ?? "light", T = e.readOnly ?? !1, E = CQ[e.locale ?? "zh-CN"], ee = e.debounceMs ?? bQ, te = e.shortcutMode ?? "modShift", { markdown: ne, setMarkdown: re } = qs(e.value, e.defaultValue, e.onChange), ie = u(() => SF(e.locale, e.messages, e.placeholder), [
|
|
56499
56522
|
e.locale,
|
|
56500
56523
|
e.messages,
|
|
56501
56524
|
e.placeholder
|
|
56502
56525
|
]), ae = {
|
|
56503
|
-
"--zt-gap-placeholder-content":
|
|
56526
|
+
"--zt-gap-placeholder-content": wQ(ie.placeholder),
|
|
56504
56527
|
...e.maxHeight === void 0 ? {} : {
|
|
56505
56528
|
maxHeight: e.maxHeight,
|
|
56506
56529
|
overflowY: "auto"
|
|
@@ -56530,7 +56553,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56530
56553
|
l(!0), S.current?.updateQuery(h), requestAnimationFrame(pe);
|
|
56531
56554
|
}, he = () => {
|
|
56532
56555
|
let e = S.current;
|
|
56533
|
-
e?.clear(), b(
|
|
56556
|
+
e?.clear(), b(SQ), l(!1), m(!1), e && requestAnimationFrame(e.focusCurrent);
|
|
56534
56557
|
}, ge = (e) => {
|
|
56535
56558
|
g(e), S.current?.updateQuery(e);
|
|
56536
56559
|
}, _e = (e) => {
|
|
@@ -56617,7 +56640,7 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56617
56640
|
"aria-readonly": T,
|
|
56618
56641
|
onMouseDown: ue,
|
|
56619
56642
|
style: ae,
|
|
56620
|
-
children: [r && a ? /* @__PURE__ */ _(se, { children: /* @__PURE__ */ _(
|
|
56643
|
+
children: [r && a ? /* @__PURE__ */ _(se, { children: /* @__PURE__ */ _(TQ, {
|
|
56621
56644
|
markdown: ne,
|
|
56622
56645
|
locale: e.locale,
|
|
56623
56646
|
portalContainer: r,
|
|
@@ -56650,4 +56673,4 @@ var KZ = GZ(!0, !0), qZ = (e, t) => {
|
|
|
56650
56673
|
});
|
|
56651
56674
|
};
|
|
56652
56675
|
//#endregion
|
|
56653
|
-
export {
|
|
56676
|
+
export { EQ as MilkdownEditor };
|