@ylzcc/editor 0.7.16 → 0.7.17
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.
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import "./index.less";
|
|
3
3
|
type ActiveSelectProps = {
|
|
4
4
|
onClick?: () => void;
|
|
5
|
-
onFromLibraryClick?: (
|
|
5
|
+
onFromLibraryClick?: () => void;
|
|
6
6
|
};
|
|
7
7
|
declare const ActiveSelect: React.FC<ActiveSelectProps>;
|
|
8
8
|
export default ActiveSelect;
|
package/dist/editor.es.js
CHANGED
|
@@ -21,7 +21,7 @@ var FEe = (Ff, kh, x_, B_) => ({
|
|
|
21
21
|
import * as React from "react";
|
|
22
22
|
import React__default, { forwardRef, createContext, useRef, useState, useEffect, useContext, Fragment as Fragment$2, useReducer, useImperativeHandle, useCallback, useMemo, useLayoutEffect, memo } from "react";
|
|
23
23
|
import ReactDOM, { flushSync } from "react-dom";
|
|
24
|
-
import { Input, Space, Dropdown, Tooltip, Select, Checkbox, Button, message,
|
|
24
|
+
import { Input, Space, Dropdown, Tooltip, Select, Checkbox, Button, message, Radio, Modal } from "antd";
|
|
25
25
|
function _mergeNamespaces(Ff, kh) {
|
|
26
26
|
for (var x_ = 0; x_ < kh.length; x_++) {
|
|
27
27
|
const B_ = kh[x_];
|
|
@@ -30949,7 +30949,7 @@ const CodeBlockView = ({ editor: Ff, node: kh, updateAttributes: x_, extension:
|
|
|
30949
30949
|
"div",
|
|
30950
30950
|
{
|
|
30951
30951
|
className: B_ ? "" : "unavailable",
|
|
30952
|
-
onClick:
|
|
30952
|
+
onClick: x_,
|
|
30953
30953
|
children: "从题库添加"
|
|
30954
30954
|
}
|
|
30955
30955
|
)
|
|
@@ -32933,17 +32933,12 @@ const Menu = (Ff) => {
|
|
|
32933
32933
|
pos: tme
|
|
32934
32934
|
}
|
|
32935
32935
|
}), x_ == null || x_.commands.hideTip();
|
|
32936
|
-
}, ume = (Ome
|
|
32937
|
-
|
|
32936
|
+
}, ume = (Ome) => {
|
|
32937
|
+
window.postMessage({
|
|
32938
32938
|
type: "AddActiveFromLibrary",
|
|
32939
32939
|
value: {
|
|
32940
32940
|
type: Ome
|
|
32941
32941
|
}
|
|
32942
|
-
}) : Modal.warning({
|
|
32943
|
-
title: "暂无权限",
|
|
32944
|
-
content: "暂无创建课程考试权限,如需开通该模块,请联系平台超管(微信:396800448)",
|
|
32945
|
-
centered: !0,
|
|
32946
|
-
okText: "我知道了"
|
|
32947
32942
|
}), x_ == null || x_.commands.hideTip();
|
|
32948
32943
|
}, dme = () => {
|
|
32949
32944
|
mme();
|
|
@@ -33109,8 +33104,8 @@ const Menu = (Ff) => {
|
|
|
33109
33104
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "选择题" }),
|
|
33110
33105
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: _me, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActiveSelect, { onClick: () => {
|
|
33111
33106
|
lme("choiceQuestion");
|
|
33112
|
-
}, onFromLibraryClick: (
|
|
33113
|
-
ume("choiceQuestion"
|
|
33107
|
+
}, onFromLibraryClick: () => {
|
|
33108
|
+
ume("choiceQuestion");
|
|
33114
33109
|
} }) })
|
|
33115
33110
|
] }),
|
|
33116
33111
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "tiptap-menu-item-list-item", children: [
|
|
@@ -33122,8 +33117,8 @@ const Menu = (Ff) => {
|
|
|
33122
33117
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "编码测验" }),
|
|
33123
33118
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: vme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActiveSelect, { onClick: () => {
|
|
33124
33119
|
lme("codingTest");
|
|
33125
|
-
}, onFromLibraryClick: (
|
|
33126
|
-
ume("codingTest"
|
|
33120
|
+
}, onFromLibraryClick: () => {
|
|
33121
|
+
ume("codingTest");
|
|
33127
33122
|
} }) })
|
|
33128
33123
|
] })
|
|
33129
33124
|
] })
|
|
@@ -33659,17 +33654,12 @@ const SlashMenu = (Ff) => {
|
|
|
33659
33654
|
pos: (Pme = tme == null ? void 0 : tme.range) == null ? void 0 : Pme.from
|
|
33660
33655
|
}
|
|
33661
33656
|
});
|
|
33662
|
-
}, pme = (Lme
|
|
33663
|
-
x_ == null || x_.chain().focus(ime).deleteRange(tme.range).hideMenu().run(),
|
|
33657
|
+
}, pme = (Lme) => {
|
|
33658
|
+
x_ == null || x_.chain().focus(ime).deleteRange(tme.range).hideMenu().run(), window.postMessage({
|
|
33664
33659
|
type: "AddActiveFromLibrary",
|
|
33665
33660
|
value: {
|
|
33666
33661
|
type: Lme
|
|
33667
33662
|
}
|
|
33668
|
-
}) : Modal.warning({
|
|
33669
|
-
title: "暂无权限",
|
|
33670
|
-
content: "暂无创建课程考试权限,如需开通该模块,请联系平台超管(微信:396800448)",
|
|
33671
|
-
centered: !0,
|
|
33672
|
-
okText: "我知道了"
|
|
33673
33663
|
});
|
|
33674
33664
|
}, hme = () => {
|
|
33675
33665
|
mme();
|
|
@@ -33829,8 +33819,8 @@ const SlashMenu = (Ff) => {
|
|
|
33829
33819
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "选择题" }),
|
|
33830
33820
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: Tme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActiveSelect, { onClick: () => {
|
|
33831
33821
|
fme("choiceQuestion");
|
|
33832
|
-
}, onFromLibraryClick: (
|
|
33833
|
-
pme("choiceQuestion"
|
|
33822
|
+
}, onFromLibraryClick: () => {
|
|
33823
|
+
pme("choiceQuestion");
|
|
33834
33824
|
} }) })
|
|
33835
33825
|
] }),
|
|
33836
33826
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "tiptap-menu-item-list-item", children: [
|
|
@@ -33842,8 +33832,8 @@ const SlashMenu = (Ff) => {
|
|
|
33842
33832
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "编码测验" }),
|
|
33843
33833
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: Ame, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActiveSelect, { onClick: () => {
|
|
33844
33834
|
fme("codingTest");
|
|
33845
|
-
}, onFromLibraryClick: (
|
|
33846
|
-
pme("codingTest"
|
|
33835
|
+
}, onFromLibraryClick: () => {
|
|
33836
|
+
pme("codingTest");
|
|
33847
33837
|
} }) })
|
|
33848
33838
|
] })
|
|
33849
33839
|
] })
|
package/dist/editor.umd.js
CHANGED
|
@@ -139,12 +139,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Rme=Pme,Vme=Dme),kme==
|
|
|
139
139
|
|
|
140
140
|
`);return!$P||!zP?!1:Ff.chain().command(({tr:eme})=>(eme.delete(B_.pos-2,B_.pos),!0)).exitCode().run()},ArrowDown:({editor:Ff})=>{if(!this.options.exitOnArrowDown)return!1;const{state:kh}=Ff,{selection:x_,doc:B_}=kh,{$from:$_,empty:$P}=x_;if(!$P||$_.parent.type!==this.type||!($_.parentOffset===$_.parent.nodeSize-2))return!1;const eme=$_.after();return eme===void 0||B_.nodeAt(eme)?!1:Ff.commands.exitCode()}}},addInputRules(){return[textblockTypeInputRule({find:backtickInputRegex$1,type:this.type,getAttributes:Ff=>({language:Ff[1]})}),textblockTypeInputRule({find:tildeInputRegex,type:this.type,getAttributes:Ff=>({language:Ff[1]})})]},addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:(Ff,kh)=>{if(!kh.clipboardData||this.editor.isActive(this.type.name))return!1;const x_=kh.clipboardData.getData("text/plain"),B_=kh.clipboardData.getData("vscode-editor-data"),$_=B_?JSON.parse(B_):void 0,$P=$_==null?void 0:$_.mode;if(!x_||!$P)return!1;const{tr:zP}=Ff.state;return zP.replaceSelectionWith(this.type.create({language:$P})),zP.setSelection(TextSelection.near(zP.doc.resolve(Math.max(0,zP.selection.from-1)))),zP.insertText(x_.replace(/\r\n?/g,`
|
|
141
141
|
`)),zP.setMeta("paste",!0),Ff.dispatch(zP),!0}}})]}});function deepFreeze(Ff){return Ff instanceof Map?Ff.clear=Ff.delete=Ff.set=function(){throw new Error("map is read-only")}:Ff instanceof Set&&(Ff.add=Ff.clear=Ff.delete=function(){throw new Error("set is read-only")}),Object.freeze(Ff),Object.getOwnPropertyNames(Ff).forEach(kh=>{const x_=Ff[kh],B_=typeof x_;(B_==="object"||B_==="function")&&!Object.isFrozen(x_)&&deepFreeze(x_)}),Ff}let Response$1=class{constructor(kh){kh.data===void 0&&(kh.data={}),this.data=kh.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function escapeHTML(Ff){return Ff.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function inherit$1(Ff,...kh){const x_=Object.create(null);for(const B_ in Ff)x_[B_]=Ff[B_];return kh.forEach(function(B_){for(const $_ in B_)x_[$_]=B_[$_]}),x_}const SPAN_CLOSE="</span>",emitsWrappingTags=Ff=>!!Ff.scope,scopeToCSSClass=(Ff,{prefix:kh})=>{if(Ff.startsWith("language:"))return Ff.replace("language:","language-");if(Ff.includes(".")){const x_=Ff.split(".");return[`${kh}${x_.shift()}`,...x_.map((B_,$_)=>`${B_}${"_".repeat($_+1)}`)].join(" ")}return`${kh}${Ff}`};class HTMLRenderer{constructor(kh,x_){this.buffer="",this.classPrefix=x_.classPrefix,kh.walk(this)}addText(kh){this.buffer+=escapeHTML(kh)}openNode(kh){if(!emitsWrappingTags(kh))return;const x_=scopeToCSSClass(kh.scope,{prefix:this.classPrefix});this.span(x_)}closeNode(kh){emitsWrappingTags(kh)&&(this.buffer+=SPAN_CLOSE)}value(){return this.buffer}span(kh){this.buffer+=`<span class="${kh}">`}}const newNode=(Ff={})=>{const kh={children:[]};return Object.assign(kh,Ff),kh};class TokenTree{constructor(){this.rootNode=newNode(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(kh){this.top.children.push(kh)}openNode(kh){const x_=newNode({scope:kh});this.add(x_),this.stack.push(x_)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(kh){return this.constructor._walk(kh,this.rootNode)}static _walk(kh,x_){return typeof x_=="string"?kh.addText(x_):x_.children&&(kh.openNode(x_),x_.children.forEach(B_=>this._walk(kh,B_)),kh.closeNode(x_)),kh}static _collapse(kh){typeof kh!="string"&&kh.children&&(kh.children.every(x_=>typeof x_=="string")?kh.children=[kh.children.join("")]:kh.children.forEach(x_=>{TokenTree._collapse(x_)}))}}class TokenTreeEmitter extends TokenTree{constructor(kh){super(),this.options=kh}addText(kh){kh!==""&&this.add(kh)}startScope(kh){this.openNode(kh)}endScope(){this.closeNode()}__addSublanguage(kh,x_){const B_=kh.root;x_&&(B_.scope=`language:${x_}`),this.add(B_)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function source(Ff){return Ff?typeof Ff=="string"?Ff:Ff.source:null}function lookahead(Ff){return concat("(?=",Ff,")")}function anyNumberOfTimes(Ff){return concat("(?:",Ff,")*")}function optional(Ff){return concat("(?:",Ff,")?")}function concat(...Ff){return Ff.map(x_=>source(x_)).join("")}function stripOptionsFromArgs(Ff){const kh=Ff[Ff.length-1];return typeof kh=="object"&&kh.constructor===Object?(Ff.splice(Ff.length-1,1),kh):{}}function either(...Ff){return"("+(stripOptionsFromArgs(Ff).capture?"":"?:")+Ff.map(B_=>source(B_)).join("|")+")"}function countMatchGroups(Ff){return new RegExp(Ff.toString()+"|").exec("").length-1}function startsWith(Ff,kh){const x_=Ff&&Ff.exec(kh);return x_&&x_.index===0}const BACKREF_RE=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _rewriteBackreferences(Ff,{joinWith:kh}){let x_=0;return Ff.map(B_=>{x_+=1;const $_=x_;let $P=source(B_),zP="";for(;$P.length>0;){const eme=BACKREF_RE.exec($P);if(!eme){zP+=$P;break}zP+=$P.substring(0,eme.index),$P=$P.substring(eme.index+eme[0].length),eme[0][0]==="\\"&&eme[1]?zP+="\\"+String(Number(eme[1])+$_):(zP+=eme[0],eme[0]==="("&&x_++)}return zP}).map(B_=>`(${B_})`).join(kh)}const MATCH_NOTHING_RE=/\b\B/,IDENT_RE="[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",NUMBER_RE="\\b\\d+(\\.\\d+)?",C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",BINARY_NUMBER_RE="\\b(0b[01]+)",RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG=(Ff={})=>{const kh=/^#![ ]*\//;return Ff.binary&&(Ff.begin=concat(kh,/.*\b/,Ff.binary,/\b.*/)),inherit$1({scope:"meta",begin:kh,end:/$/,relevance:0,"on:begin":(x_,B_)=>{x_.index!==0&&B_.ignoreMatch()}},Ff)},BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},APOS_STRING_MODE={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[BACKSLASH_ESCAPE]},QUOTE_STRING_MODE={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[BACKSLASH_ESCAPE]},PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT=function(Ff,kh,x_={}){const B_=inherit$1({scope:"comment",begin:Ff,end:kh,contains:[]},x_);B_.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const $_=either("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return B_.contains.push({begin:concat(/[ ]+/,"(",$_,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),B_},C_LINE_COMMENT_MODE=COMMENT("//","$"),C_BLOCK_COMMENT_MODE=COMMENT("/\\*","\\*/"),HASH_COMMENT_MODE=COMMENT("#","$"),NUMBER_MODE={scope:"number",begin:NUMBER_RE,relevance:0},C_NUMBER_MODE={scope:"number",begin:C_NUMBER_RE,relevance:0},BINARY_NUMBER_MODE={scope:"number",begin:BINARY_NUMBER_RE,relevance:0},REGEXP_MODE={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[BACKSLASH_ESCAPE]}]}]},TITLE_MODE={scope:"title",begin:IDENT_RE,relevance:0},UNDERSCORE_TITLE_MODE={scope:"title",begin:UNDERSCORE_IDENT_RE,relevance:0},METHOD_GUARD={begin:"\\.\\s*"+UNDERSCORE_IDENT_RE,relevance:0},END_SAME_AS_BEGIN=function(Ff){return Object.assign(Ff,{"on:begin":(kh,x_)=>{x_.data._beginMatch=kh[1]},"on:end":(kh,x_)=>{x_.data._beginMatch!==kh[1]&&x_.ignoreMatch()}})};var MODES=Object.freeze({__proto__:null,MATCH_NOTHING_RE,IDENT_RE,UNDERSCORE_IDENT_RE,NUMBER_RE,C_NUMBER_RE,BINARY_NUMBER_RE,RE_STARTERS_RE,SHEBANG,BACKSLASH_ESCAPE,APOS_STRING_MODE,QUOTE_STRING_MODE,PHRASAL_WORDS_MODE,COMMENT,C_LINE_COMMENT_MODE,C_BLOCK_COMMENT_MODE,HASH_COMMENT_MODE,NUMBER_MODE,C_NUMBER_MODE,BINARY_NUMBER_MODE,REGEXP_MODE,TITLE_MODE,UNDERSCORE_TITLE_MODE,METHOD_GUARD,END_SAME_AS_BEGIN});function skipIfHasPrecedingDot(Ff,kh){Ff.input[Ff.index-1]==="."&&kh.ignoreMatch()}function scopeClassName(Ff,kh){Ff.className!==void 0&&(Ff.scope=Ff.className,delete Ff.className)}function beginKeywords(Ff,kh){kh&&Ff.beginKeywords&&(Ff.begin="\\b("+Ff.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Ff.__beforeBegin=skipIfHasPrecedingDot,Ff.keywords=Ff.keywords||Ff.beginKeywords,delete Ff.beginKeywords,Ff.relevance===void 0&&(Ff.relevance=0))}function compileIllegal(Ff,kh){Array.isArray(Ff.illegal)&&(Ff.illegal=either(...Ff.illegal))}function compileMatch(Ff,kh){if(Ff.match){if(Ff.begin||Ff.end)throw new Error("begin & end are not supported with match");Ff.begin=Ff.match,delete Ff.match}}function compileRelevance(Ff,kh){Ff.relevance===void 0&&(Ff.relevance=1)}const beforeMatchExt=(Ff,kh)=>{if(!Ff.beforeMatch)return;if(Ff.starts)throw new Error("beforeMatch cannot be used with starts");const x_=Object.assign({},Ff);Object.keys(Ff).forEach(B_=>{delete Ff[B_]}),Ff.keywords=x_.keywords,Ff.begin=concat(x_.beforeMatch,lookahead(x_.begin)),Ff.starts={relevance:0,contains:[Object.assign(x_,{endsParent:!0})]},Ff.relevance=0,delete x_.beforeMatch},COMMON_KEYWORDS=["of","and","for","in","not","or","if","then","parent","list","value"],DEFAULT_KEYWORD_SCOPE="keyword";function compileKeywords(Ff,kh,x_=DEFAULT_KEYWORD_SCOPE){const B_=Object.create(null);return typeof Ff=="string"?$_(x_,Ff.split(" ")):Array.isArray(Ff)?$_(x_,Ff):Object.keys(Ff).forEach(function($P){Object.assign(B_,compileKeywords(Ff[$P],kh,$P))}),B_;function $_($P,zP){kh&&(zP=zP.map(eme=>eme.toLowerCase())),zP.forEach(function(eme){const tme=eme.split("|");B_[tme[0]]=[$P,scoreForKeyword(tme[0],tme[1])]})}}function scoreForKeyword(Ff,kh){return kh?Number(kh):commonKeyword(Ff)?0:1}function commonKeyword(Ff){return COMMON_KEYWORDS.includes(Ff.toLowerCase())}const seenDeprecations={},error$1=Ff=>{console.error(Ff)},warn$1=(Ff,...kh)=>{console.log(`WARN: ${Ff}`,...kh)},deprecated=(Ff,kh)=>{seenDeprecations[`${Ff}/${kh}`]||(console.log(`Deprecated as of ${Ff}. ${kh}`),seenDeprecations[`${Ff}/${kh}`]=!0)},MultiClassError=new Error;function remapScopeNames(Ff,kh,{key:x_}){let B_=0;const $_=Ff[x_],$P={},zP={};for(let eme=1;eme<=kh.length;eme++)zP[eme+B_]=$_[eme],$P[eme+B_]=!0,B_+=countMatchGroups(kh[eme-1]);Ff[x_]=zP,Ff[x_]._emit=$P,Ff[x_]._multi=!0}function beginMultiClass(Ff){if(Array.isArray(Ff.begin)){if(Ff.skip||Ff.excludeBegin||Ff.returnBegin)throw error$1("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),MultiClassError;if(typeof Ff.beginScope!="object"||Ff.beginScope===null)throw error$1("beginScope must be object"),MultiClassError;remapScopeNames(Ff,Ff.begin,{key:"beginScope"}),Ff.begin=_rewriteBackreferences(Ff.begin,{joinWith:""})}}function endMultiClass(Ff){if(Array.isArray(Ff.end)){if(Ff.skip||Ff.excludeEnd||Ff.returnEnd)throw error$1("skip, excludeEnd, returnEnd not compatible with endScope: {}"),MultiClassError;if(typeof Ff.endScope!="object"||Ff.endScope===null)throw error$1("endScope must be object"),MultiClassError;remapScopeNames(Ff,Ff.end,{key:"endScope"}),Ff.end=_rewriteBackreferences(Ff.end,{joinWith:""})}}function scopeSugar(Ff){Ff.scope&&typeof Ff.scope=="object"&&Ff.scope!==null&&(Ff.beginScope=Ff.scope,delete Ff.scope)}function MultiClass(Ff){scopeSugar(Ff),typeof Ff.beginScope=="string"&&(Ff.beginScope={_wrap:Ff.beginScope}),typeof Ff.endScope=="string"&&(Ff.endScope={_wrap:Ff.endScope}),beginMultiClass(Ff),endMultiClass(Ff)}function compileLanguage(Ff){function kh(zP,eme){return new RegExp(source(zP),"m"+(Ff.case_insensitive?"i":"")+(Ff.unicodeRegex?"u":"")+(eme?"g":""))}class x_{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(eme,tme){tme.position=this.position++,this.matchIndexes[this.matchAt]=tme,this.regexes.push([tme,eme]),this.matchAt+=countMatchGroups(eme)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const eme=this.regexes.map(tme=>tme[1]);this.matcherRe=kh(_rewriteBackreferences(eme,{joinWith:"|"}),!0),this.lastIndex=0}exec(eme){this.matcherRe.lastIndex=this.lastIndex;const tme=this.matcherRe.exec(eme);if(!tme)return null;const nme=tme.findIndex((ime,ame)=>ame>0&&ime!==void 0),rme=this.matchIndexes[nme];return tme.splice(0,nme),Object.assign(tme,rme)}}class B_{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(eme){if(this.multiRegexes[eme])return this.multiRegexes[eme];const tme=new x_;return this.rules.slice(eme).forEach(([nme,rme])=>tme.addRule(nme,rme)),tme.compile(),this.multiRegexes[eme]=tme,tme}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(eme,tme){this.rules.push([eme,tme]),tme.type==="begin"&&this.count++}exec(eme){const tme=this.getMatcher(this.regexIndex);tme.lastIndex=this.lastIndex;let nme=tme.exec(eme);if(this.resumingScanAtSamePosition()&&!(nme&&nme.index===this.lastIndex)){const rme=this.getMatcher(0);rme.lastIndex=this.lastIndex+1,nme=rme.exec(eme)}return nme&&(this.regexIndex+=nme.position+1,this.regexIndex===this.count&&this.considerAll()),nme}}function $_(zP){const eme=new B_;return zP.contains.forEach(tme=>eme.addRule(tme.begin,{rule:tme,type:"begin"})),zP.terminatorEnd&&eme.addRule(zP.terminatorEnd,{type:"end"}),zP.illegal&&eme.addRule(zP.illegal,{type:"illegal"}),eme}function $P(zP,eme){const tme=zP;if(zP.isCompiled)return tme;[scopeClassName,compileMatch,MultiClass,beforeMatchExt].forEach(rme=>rme(zP,eme)),Ff.compilerExtensions.forEach(rme=>rme(zP,eme)),zP.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach(rme=>rme(zP,eme)),zP.isCompiled=!0;let nme=null;return typeof zP.keywords=="object"&&zP.keywords.$pattern&&(zP.keywords=Object.assign({},zP.keywords),nme=zP.keywords.$pattern,delete zP.keywords.$pattern),nme=nme||/\w+/,zP.keywords&&(zP.keywords=compileKeywords(zP.keywords,Ff.case_insensitive)),tme.keywordPatternRe=kh(nme,!0),eme&&(zP.begin||(zP.begin=/\B|\b/),tme.beginRe=kh(tme.begin),!zP.end&&!zP.endsWithParent&&(zP.end=/\B|\b/),zP.end&&(tme.endRe=kh(tme.end)),tme.terminatorEnd=source(tme.end)||"",zP.endsWithParent&&eme.terminatorEnd&&(tme.terminatorEnd+=(zP.end?"|":"")+eme.terminatorEnd)),zP.illegal&&(tme.illegalRe=kh(zP.illegal)),zP.contains||(zP.contains=[]),zP.contains=[].concat(...zP.contains.map(function(rme){return expandOrCloneMode(rme==="self"?zP:rme)})),zP.contains.forEach(function(rme){$P(rme,tme)}),zP.starts&&$P(zP.starts,eme),tme.matcher=$_(tme),tme}if(Ff.compilerExtensions||(Ff.compilerExtensions=[]),Ff.contains&&Ff.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Ff.classNameAliases=inherit$1(Ff.classNameAliases||{}),$P(Ff)}function dependencyOnParent(Ff){return Ff?Ff.endsWithParent||dependencyOnParent(Ff.starts):!1}function expandOrCloneMode(Ff){return Ff.variants&&!Ff.cachedVariants&&(Ff.cachedVariants=Ff.variants.map(function(kh){return inherit$1(Ff,{variants:null},kh)})),Ff.cachedVariants?Ff.cachedVariants:dependencyOnParent(Ff)?inherit$1(Ff,{starts:Ff.starts?inherit$1(Ff.starts):null}):Object.isFrozen(Ff)?inherit$1(Ff):Ff}var version="11.8.0";class HTMLInjectionError extends Error{constructor(kh,x_){super(kh),this.name="HTMLInjectionError",this.html=x_}}const escape$1=escapeHTML,inherit=inherit$1,NO_MATCH=Symbol("nomatch"),MAX_KEYWORD_HITS=7,HLJS=function(Ff){const kh=Object.create(null),x_=Object.create(null),B_=[];let $_=!0;const $P="Could not find the language '{}', did you forget to load/include a language module?",zP={disableAutodetect:!0,name:"Plain text",contains:[]};let eme={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:TokenTreeEmitter};function tme(Dme){return eme.noHighlightRe.test(Dme)}function nme(Dme){let kme=Dme.className+" ";kme+=Dme.parentNode?Dme.parentNode.className:"";const Vme=eme.languageDetectRe.exec(kme);if(Vme){const Rme=_me(Vme[1]);return Rme||(warn$1($P.replace("{}",Vme[1])),warn$1("Falling back to no-highlight mode for this block.",Dme)),Rme?Vme[1]:"no-highlight"}return kme.split(/\s+/).find(Rme=>tme(Rme)||_me(Rme))}function rme(Dme,kme,Vme){let Rme="",Fme="";typeof kme=="object"?(Rme=Dme,Vme=kme.ignoreIllegals,Fme=kme.language):(deprecated("10.7.0","highlight(lang, code, ...args) has been deprecated."),deprecated("10.7.0",`Please use highlight(code, options) instead.
|
|
142
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Fme=Dme,Rme=kme),Vme===void 0&&(Vme=!0);const Bme={code:Rme,language:Fme};Lme("before:highlight",Bme);const bme=Bme.result?Bme.result:ime(Bme.language,Bme.code,Vme);return bme.code=Bme.code,Lme("after:highlight",bme),bme}function ime(Dme,kme,Vme,Rme){const Fme=Object.create(null);function Bme(jme,Jme){return jme.keywords[Jme]}function bme(){if(!S_e.keywords){x_e.addText(r_e);return}let jme=0;S_e.keywordPatternRe.lastIndex=0;let Jme=S_e.keywordPatternRe.exec(r_e),h_e="";for(;Jme;){h_e+=r_e.substring(jme,Jme.index);const O_e=y_e.case_insensitive?Jme[0].toLowerCase():Jme[0],I_e=Bme(S_e,O_e);if(I_e){const[B_e,L_e]=I_e;if(x_e.addText(h_e),h_e="",Fme[O_e]=(Fme[O_e]||0)+1,Fme[O_e]<=MAX_KEYWORD_HITS&&(t_e+=L_e),B_e.startsWith("_"))h_e+=Jme[0];else{const m_e=y_e.classNameAliases[B_e]||B_e;yme(Jme[0],m_e)}}else h_e+=Jme[0];jme=S_e.keywordPatternRe.lastIndex,Jme=S_e.keywordPatternRe.exec(r_e)}h_e+=r_e.substring(jme),x_e.addText(h_e)}function Sme(){if(r_e==="")return;let jme=null;if(typeof S_e.subLanguage=="string"){if(!kh[S_e.subLanguage]){x_e.addText(r_e);return}jme=ime(S_e.subLanguage,r_e,!0,R_e[S_e.subLanguage]),R_e[S_e.subLanguage]=jme._top}else jme=ome(r_e,S_e.subLanguage.length?S_e.subLanguage:null);S_e.relevance>0&&(t_e+=jme.relevance),x_e.__addSublanguage(jme._emitter,jme.language)}function Cme(){S_e.subLanguage!=null?Sme():bme(),r_e=""}function yme(jme,Jme){jme!==""&&(x_e.startScope(Jme),x_e.addText(jme),x_e.endScope())}function Nme(jme,Jme){let h_e=1;const O_e=Jme.length-1;for(;h_e<=O_e;){if(!jme._emit[h_e]){h_e++;continue}const I_e=y_e.classNameAliases[jme[h_e]]||jme[h_e],B_e=Jme[h_e];I_e?yme(B_e,I_e):(r_e=B_e,bme(),r_e=""),h_e++}}function Ime(jme,Jme){return jme.scope&&typeof jme.scope=="string"&&x_e.openNode(y_e.classNameAliases[jme.scope]||jme.scope),jme.beginScope&&(jme.beginScope._wrap?(yme(r_e,y_e.classNameAliases[jme.beginScope._wrap]||jme.beginScope._wrap),r_e=""):jme.beginScope._multi&&(Nme(jme.beginScope,Jme),r_e="")),S_e=Object.create(jme,{parent:{value:S_e}}),S_e}function Ume(jme,Jme,h_e){let O_e=startsWith(jme.endRe,h_e);if(O_e){if(jme["on:end"]){const I_e=new Response$1(jme);jme["on:end"](Jme,I_e),I_e.isMatchIgnored&&(O_e=!1)}if(O_e){for(;jme.endsParent&&jme.parent;)jme=jme.parent;return jme}}if(jme.endsWithParent)return Ume(jme.parent,Jme,h_e)}function Gme(jme){return S_e.matcher.regexIndex===0?(r_e+=jme[0],1):(f_e=!0,0)}function Hme(jme){const Jme=jme[0],h_e=jme.rule,O_e=new Response$1(h_e),I_e=[h_e.__beforeBegin,h_e["on:begin"]];for(const B_e of I_e)if(B_e&&(B_e(jme,O_e),O_e.isMatchIgnored))return Gme(Jme);return h_e.skip?r_e+=Jme:(h_e.excludeBegin&&(r_e+=Jme),Cme(),!h_e.returnBegin&&!h_e.excludeBegin&&(r_e=Jme)),Ime(h_e,jme),h_e.returnBegin?0:Jme.length}function zme(jme){const Jme=jme[0],h_e=kme.substring(jme.index),O_e=Ume(S_e,jme,h_e);if(!O_e)return NO_MATCH;const I_e=S_e;S_e.endScope&&S_e.endScope._wrap?(Cme(),yme(Jme,S_e.endScope._wrap)):S_e.endScope&&S_e.endScope._multi?(Cme(),Nme(S_e.endScope,jme)):I_e.skip?r_e+=Jme:(I_e.returnEnd||I_e.excludeEnd||(r_e+=Jme),Cme(),I_e.excludeEnd&&(r_e=Jme));do S_e.scope&&x_e.closeNode(),!S_e.skip&&!S_e.subLanguage&&(t_e+=S_e.relevance),S_e=S_e.parent;while(S_e!==O_e.parent);return O_e.starts&&Ime(O_e.starts,jme),I_e.returnEnd?0:Jme.length}function Xme(){const jme=[];for(let Jme=S_e;Jme!==y_e;Jme=Jme.parent)Jme.scope&&jme.unshift(Jme.scope);jme.forEach(Jme=>x_e.openNode(Jme))}let Wme={};function u_e(jme,Jme){const h_e=Jme&&Jme[0];if(r_e+=jme,h_e==null)return Cme(),0;if(Wme.type==="begin"&&Jme.type==="end"&&Wme.index===Jme.index&&h_e===""){if(r_e+=kme.slice(Jme.index,Jme.index+1),!$_){const O_e=new Error(`0 width match regex (${Dme})`);throw O_e.languageName=Dme,O_e.badRule=Wme.rule,O_e}return 1}if(Wme=Jme,Jme.type==="begin")return Hme(Jme);if(Jme.type==="illegal"&&!Vme){const O_e=new Error('Illegal lexeme "'+h_e+'" for mode "'+(S_e.scope||"<unnamed>")+'"');throw O_e.mode=S_e,O_e}else if(Jme.type==="end"){const O_e=zme(Jme);if(O_e!==NO_MATCH)return O_e}if(Jme.type==="illegal"&&h_e==="")return 1;if(n_e>1e5&&n_e>Jme.index*3)throw new Error("potential infinite loop, way more iterations than matches");return r_e+=h_e,h_e.length}const y_e=_me(Dme);if(!y_e)throw error$1($P.replace("{}",Dme)),new Error('Unknown language: "'+Dme+'"');const o_e=compileLanguage(y_e);let D_e="",S_e=Rme||o_e;const R_e={},x_e=new eme.__emitter(eme);Xme();let r_e="",t_e=0,l_e=0,n_e=0,f_e=!1;try{if(y_e.__emitTokens)y_e.__emitTokens(kme,x_e);else{for(S_e.matcher.considerAll();;){n_e++,f_e?f_e=!1:S_e.matcher.considerAll(),S_e.matcher.lastIndex=l_e;const jme=S_e.matcher.exec(kme);if(!jme)break;const Jme=kme.substring(l_e,jme.index),h_e=u_e(Jme,jme);l_e=jme.index+h_e}u_e(kme.substring(l_e))}return x_e.finalize(),D_e=x_e.toHTML(),{language:Dme,value:D_e,relevance:t_e,illegal:!1,_emitter:x_e,_top:S_e}}catch(jme){if(jme.message&&jme.message.includes("Illegal"))return{language:Dme,value:escape$1(kme),illegal:!0,relevance:0,_illegalBy:{message:jme.message,index:l_e,context:kme.slice(l_e-100,l_e+100),mode:jme.mode,resultSoFar:D_e},_emitter:x_e};if($_)return{language:Dme,value:escape$1(kme),illegal:!1,relevance:0,errorRaised:jme,_emitter:x_e,_top:S_e};throw jme}}function ame(Dme){const kme={value:escape$1(Dme),illegal:!1,relevance:0,_top:zP,_emitter:new eme.__emitter(eme)};return kme._emitter.addText(Dme),kme}function ome(Dme,kme){kme=kme||eme.languages||Object.keys(kh);const Vme=ame(Dme),Rme=kme.filter(_me).filter(vme).map(Cme=>ime(Cme,Dme,!1));Rme.unshift(Vme);const Fme=Rme.sort((Cme,yme)=>{if(Cme.relevance!==yme.relevance)return yme.relevance-Cme.relevance;if(Cme.language&&yme.language){if(_me(Cme.language).supersetOf===yme.language)return 1;if(_me(yme.language).supersetOf===Cme.language)return-1}return 0}),[Bme,bme]=Fme,Sme=Bme;return Sme.secondBest=bme,Sme}function sme(Dme,kme,Vme){const Rme=kme&&x_[kme]||Vme;Dme.classList.add("hljs"),Dme.classList.add(`language-${Rme}`)}function cme(Dme){let kme=null;const Vme=nme(Dme);if(tme(Vme))return;if(Lme("before:highlightElement",{el:Dme,language:Vme}),Dme.children.length>0&&(eme.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Dme)),eme.throwUnescapedHTML))throw new HTMLInjectionError("One of your code blocks includes unescaped HTML.",Dme.innerHTML);kme=Dme;const Rme=kme.textContent,Fme=Vme?rme(Rme,{language:Vme,ignoreIllegals:!0}):ome(Rme);Dme.innerHTML=Fme.value,sme(Dme,Vme,Fme.language),Dme.result={language:Fme.language,re:Fme.relevance,relevance:Fme.relevance},Fme.secondBest&&(Dme.secondBest={language:Fme.secondBest.language,relevance:Fme.secondBest.relevance}),Lme("after:highlightElement",{el:Dme,result:Fme,text:Rme})}function lme(Dme){eme=inherit(eme,Dme)}const ume=()=>{pme(),deprecated("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function dme(){pme(),deprecated("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let fme=!1;function pme(){if(document.readyState==="loading"){fme=!0;return}document.querySelectorAll(eme.cssSelector).forEach(cme)}function hme(){fme&&pme()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",hme,!1);function mme(Dme,kme){let Vme=null;try{Vme=kme(Ff)}catch(Rme){if(error$1("Language definition for '{}' could not be registered.".replace("{}",Dme)),$_)error$1(Rme);else throw Rme;Vme=zP}Vme.name||(Vme.name=Dme),kh[Dme]=Vme,Vme.rawDefinition=kme.bind(null,Ff),Vme.aliases&&Tme(Vme.aliases,{languageName:Dme})}function gme(Dme){delete kh[Dme];for(const kme of Object.keys(x_))x_[kme]===Dme&&delete x_[kme]}function Eme(){return Object.keys(kh)}function _me(Dme){return Dme=(Dme||"").toLowerCase(),kh[Dme]||kh[x_[Dme]]}function Tme(Dme,{languageName:kme}){typeof Dme=="string"&&(Dme=[Dme]),Dme.forEach(Vme=>{x_[Vme.toLowerCase()]=kme})}function vme(Dme){const kme=_me(Dme);return kme&&!kme.disableAutodetect}function Ame(Dme){Dme["before:highlightBlock"]&&!Dme["before:highlightElement"]&&(Dme["before:highlightElement"]=kme=>{Dme["before:highlightBlock"](Object.assign({block:kme.el},kme))}),Dme["after:highlightBlock"]&&!Dme["after:highlightElement"]&&(Dme["after:highlightElement"]=kme=>{Dme["after:highlightBlock"](Object.assign({block:kme.el},kme))})}function Ome(Dme){Ame(Dme),B_.push(Dme)}function wme(Dme){const kme=B_.indexOf(Dme);kme!==-1&&B_.splice(kme,1)}function Lme(Dme,kme){const Vme=Dme;B_.forEach(function(Rme){Rme[Vme]&&Rme[Vme](kme)})}function Pme(Dme){return deprecated("10.7.0","highlightBlock will be removed entirely in v12.0"),deprecated("10.7.0","Please use highlightElement now."),cme(Dme)}Object.assign(Ff,{highlight:rme,highlightAuto:ome,highlightAll:pme,highlightElement:cme,highlightBlock:Pme,configure:lme,initHighlighting:ume,initHighlightingOnLoad:dme,registerLanguage:mme,unregisterLanguage:gme,listLanguages:Eme,getLanguage:_me,registerAliases:Tme,autoDetection:vme,inherit,addPlugin:Ome,removePlugin:wme}),Ff.debugMode=function(){$_=!1},Ff.safeMode=function(){$_=!0},Ff.versionString=version,Ff.regex={concat,lookahead,either,optional,anyNumberOfTimes};for(const Dme in MODES)typeof MODES[Dme]=="object"&&deepFreeze(MODES[Dme]);return Object.assign(Ff,MODES),Ff},highlight=HLJS({});highlight.newInstance=()=>HLJS({});var core=highlight;highlight.HighlightJS=highlight,highlight.default=highlight;const HighlightJS$1=getDefaultExportFromCjs(core);function parseNodes(Ff,kh=[]){return Ff.map(x_=>{const B_=[...kh,...x_.properties?x_.properties.className:[]];return x_.children?parseNodes(x_.children,B_):{text:x_.value,classes:B_}}).flat()}function getHighlightNodes(Ff){return Ff.value||Ff.children||[]}function registered(Ff){return!!HighlightJS$1.getLanguage(Ff)}function getDecorations({doc:Ff,name:kh,lowlight:x_,defaultLanguage:B_}){const $_=[],$P=x_.listLanguages();return findChildren(Ff,zP=>zP.type.name===kh).forEach(zP=>{let eme=zP.pos+1;const tme=zP.node.attrs.language||B_,nme=tme&&($P.includes(tme)||registered(tme))?getHighlightNodes(x_.highlight(tme,zP.node.textContent)):getHighlightNodes(x_.highlightAuto(zP.node.textContent));parseNodes(nme).forEach(rme=>{const ime=eme+rme.text.length;if(rme.classes.length){const ame=Decoration.inline(eme,ime,{class:rme.classes.join(" ")});$_.push(ame)}eme=ime})}),DecorationSet.create(Ff,$_)}function isFunction$1(Ff){return typeof Ff=="function"}function LowlightPlugin({name:Ff,lowlight:kh,defaultLanguage:x_}){if(!["highlight","highlightAuto","listLanguages"].every($_=>isFunction$1(kh[$_])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const B_=new Plugin({key:new PluginKey("lowlight"),state:{init:($_,{doc:$P})=>getDecorations({doc:$P,name:Ff,lowlight:kh,defaultLanguage:x_}),apply:($_,$P,zP,eme)=>{const tme=zP.selection.$head.parent.type.name,nme=eme.selection.$head.parent.type.name,rme=findChildren(zP.doc,ame=>ame.type.name===Ff),ime=findChildren(eme.doc,ame=>ame.type.name===Ff);return $_.docChanged&&([tme,nme].includes(Ff)||ime.length!==rme.length||$_.steps.some(ame=>ame.from!==void 0&&ame.to!==void 0&&rme.some(ome=>ome.pos>=ame.from&&ome.pos+ome.node.nodeSize<=ame.to)))?getDecorations({doc:$_.doc,name:Ff,lowlight:kh,defaultLanguage:x_}):$P.map($_.mapping,$_.doc)}},props:{decorations($_){return B_.getState($_)}}});return B_}const CodeBlockView=({editor:Ff,node:kh,updateAttributes:x_,extension:B_})=>{var ume,dme,fme,pme;const $_=React.useContext(shareData),[$P,zP]=React.useState("light"),[eme,tme]=React.useState(((ume=kh==null?void 0:kh.attrs)==null?void 0:ume.exec)||!1),[nme,rme]=React.useState(!1),[ime,ame]=React.useState([]),ome=hme=>{x_({language:hme})},sme=hme=>{var gme;const mme=(gme=hme==null?void 0:hme.target)==null?void 0:gme.checked;tme(mme),x_({exec:mme})},cme=()=>{var hme;(hme=navigator==null?void 0:navigator.clipboard)==null||hme.writeText(kh==null?void 0:kh.textContent).then(()=>{rme(!0);const mme=setTimeout(()=>{rme(!1),clearTimeout(mme)},2e3)})},lme=()=>{var hme;(hme=B_==null?void 0:B_.options)==null||hme.onExec(kh==null?void 0:kh.textContent)};return React.useEffect(()=>{eme&&($_!=null&&$_.template)?zP("dark"):zP("light")},[eme,$_==null?void 0:$_.template]),React.useEffect(()=>{var mme,gme,Eme;const hme=(Eme=(gme=(mme=B_==null?void 0:B_.options)==null?void 0:mme.lowlight)==null?void 0:gme.listLanguages())==null?void 0:Eme.map(_me=>({value:_me,label:_me}));ame([...hme])},[B_]),jsxRuntimeExports.jsx(NodeViewWrapper,{children:jsxRuntimeExports.jsxs("div",{className:`code-block code-block-${$P}`,children:[jsxRuntimeExports.jsxs("div",{className:"code-block-header",contentEditable:!1,style:{display:"flex"},children:[jsxRuntimeExports.jsxs("div",{className:"code-block-header-left",children:[((Ff==null?void 0:Ff.isEditable)||!(Ff!=null&&Ff.isEditable)&&((dme=kh==null?void 0:kh.attrs)==null?void 0:dme.language))&&jsxRuntimeExports.jsx(antd.Select,{disabled:!(Ff!=null&&Ff.isEditable),placeholder:"请选择语言",defaultValue:((fme=kh==null?void 0:kh.attrs)==null?void 0:fme.language)||void 0,style:{width:100},onChange:ome,options:ime}),($_==null?void 0:$_.template)&&jsxRuntimeExports.jsx(antd.Select,{disabled:!0,value:(pme=$_==null?void 0:$_.template)==null?void 0:pme.name})]}),($_==null?void 0:$_.template)&&(Ff==null?void 0:Ff.isEditable)&&jsxRuntimeExports.jsx("div",{className:"code-block-header-right",children:jsxRuntimeExports.jsx(antd.Checkbox,{checked:eme,onChange:sme,children:"执行"})})]}),jsxRuntimeExports.jsx("pre",{className:"code-block-body",children:jsxRuntimeExports.jsx(NodeViewContent,{as:"code"})}),jsxRuntimeExports.jsxs("div",{className:"code-block-action",contentEditable:!1,children:[eme&&($_==null?void 0:$_.template)&&jsxRuntimeExports.jsx(antd.Button,{type:"primary",onClick:lme,children:"执行"}),jsxRuntimeExports.jsxs("div",{className:"code-block-action-copy",children:[nme&&jsxRuntimeExports.jsxs("div",{className:"copy-tip",children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{opacity:"0.01",width:"16",height:"16",fill:"black"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1C4.13438 1 1 4.13438 1 8C1 11.8656 4.13438 15 8 15C11.8656 15 15 11.8656 15 8C15 4.13438 11.8656 1 8 1Z",fill:"#30C213"}),jsxRuntimeExports.jsx("path",{d:"M3.75391 8.76556C3.75391 8.76556 5.94801 10.5554 6.16596 12.0777C6.16596 12.0777 9.04299 7.38086 12.2397 6.96062C12.2397 6.96062 11.2662 6.25307 11.5858 5.13477C11.5858 5.13477 9.81311 5.31117 6.4711 10.4844L4.9048 7.8329L3.75391 8.76556Z",fill:"white"})]}),jsxRuntimeExports.jsx("span",{children:"复制成功"})]}),jsxRuntimeExports.jsx(antd.Button,{type:"primary",onClick:cme,children:"复制"})]})]})]})})},CodeBlockLowlight=CodeBlock.extend({addOptions(){var Ff;return{...(Ff=this.parent)==null?void 0:Ff.call(this),lowlight:{},defaultLanguage:null}},addNodeView(){return ReactNodeViewRenderer(CodeBlockView)},addProseMirrorPlugins(){var Ff;return[...((Ff=this.parent)==null?void 0:Ff.call(this))||[],LowlightPlugin({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),FloatingMenuPlugin=Ff=>{var $P,zP;let kh,x_={},B_=!1;return($P=Ff.tip)==null||$P.emitter.on("hover",({node:eme,pos:tme,range:nme})=>{x_={node:eme,pos:tme,range:nme}}),(zP=Ff.tip)==null||zP.emitter.on("show",eme=>{B_=eme.show}),new Plugin({key:new PluginKey(Ff.pluginKey),view:eme=>({update(tme,nme){var sme,cme,lme;const{anchor:rme}=tme.state.selection,{anchor:ime}=nme.selection,{node:ame,pos:ome}=x_;(sme=Ff.tip)!=null&&sme.isShow&&rme>=ome&&rme<ome+ame.nodeSize&&(ime<ome||ime>=ome+ame.nodeSize)||rme!==ime&&((cme=Ff.tip)!=null&&cme.isShow)&&((lme=Ff.tip.tippy)==null||lme.hide())},destroy(){var tme;(tme=Ff.tip)==null||tme.destroy()}}),props:{handleDOMEvents:{mousemove:(eme,tme)=>{kh&&clearTimeout(kh);const{editor:nme,tip:rme}=Ff;nme.isEditable&&(kh=setTimeout(()=>{rme==null||rme.move(eme,tme)},0))},wheel:()=>{var eme;(eme=Ff.tip)==null||eme.hide()}},decorations(eme){if(B_&&x_.node){const tme=Decoration.node(x_.range.from,x_.range.to,{style:"background: rgba(22,119,255,0.10); border-radius: 4px;"});return DecorationSet.create(eme.doc,[tme])}return null}}})},TableSelect=Ff=>{const{onClick:kh}=Ff,[x_,B_]=React.useState({row:0,col:0}),[$_,$P]=React.useState([]);React.useEffect(()=>{const rme=[];for(let ime=0;ime<9;ime++){rme[ime]=[];for(let ame=0;ame<9;ame++)ime<x_.row&&ame<x_.col?rme[ime][ame]=!0:rme[ime][ame]=!1}$P(rme)},[x_]);const zP=nme=>{const{dataset:rme}=nme.target;if(rme.row){const{row:ime,col:ame}=rme;B_({row:parseInt(ime),col:parseInt(ame)})}else{const ime=nme.target.getBoundingClientRect(),ame=nme.clientX-ime.left-nme.target.clientLeft-10,ome=nme.clientY-ime.top-nme.target.clientTop-10;let sme,cme;ame<0?cme=0:(cme=Math.ceil(ame/26),cme=Math.min(cme,9)),ome<0?sme=0:(sme=Math.ceil(ome/26),sme=Math.min(sme,9)),B_(sme===0||cme===0?{row:0,col:0}:{row:sme,col:cme})}},eme=nme=>{B_({row:0,col:0})},tme=()=>{x_.row&&(kh==null||kh(x_))};return jsxRuntimeExports.jsxs("div",{className:"tiptap-table-select",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-table-select-title",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-table-select-title-left",children:"表格行列"}),jsxRuntimeExports.jsx("div",{className:"tiptap-table-select-title-right",children:x_.row?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:x_.row}),jsxRuntimeExports.jsx("span",{children:"x"}),jsxRuntimeExports.jsx("span",{children:x_.col})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})})]}),jsxRuntimeExports.jsx("div",{className:"tiptap-table-select-content",onMouseMove:zP,onClick:tme,onMouseLeave:eme,children:$_.map((nme,rme)=>jsxRuntimeExports.jsx(React.Fragment,{children:nme.map((ime,ame)=>jsxRuntimeExports.jsx("div",{className:ime?"light":"","data-row":rme+1,"data-col":ame+1},`${rme}-${ame}`))},rme))})]})},ActiveSelect=Ff=>{const{onClick:kh,onFromLibraryClick:x_}=Ff,{available:B_}=React.useContext(shareData);return jsxRuntimeExports.jsxs("div",{className:"tiptap-active-select",children:[jsxRuntimeExports.jsx("div",{onClick:kh,children:"自定义创建"}),jsxRuntimeExports.jsx("div",{className:B_?"":"unavailable",onClick:()=>x_==null?void 0:x_(B_),children:"从题库添加"})]})};function bind(Ff,kh){return function(){return Ff.apply(kh,arguments)}}const{toString:toString$1}=Object.prototype,{getPrototypeOf}=Object,kindOf=(Ff=>kh=>{const x_=toString$1.call(kh);return Ff[x_]||(Ff[x_]=x_.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=Ff=>(Ff=Ff.toLowerCase(),kh=>kindOf(kh)===Ff),typeOfTest=Ff=>kh=>typeof kh===Ff,{isArray:isArray$1}=Array,isUndefined=typeOfTest("undefined");function isBuffer$2(Ff){return Ff!==null&&!isUndefined(Ff)&&Ff.constructor!==null&&!isUndefined(Ff.constructor)&&isFunction(Ff.constructor.isBuffer)&&Ff.constructor.isBuffer(Ff)}const isArrayBuffer$1=kindOfTest("ArrayBuffer");function isArrayBufferView(Ff){let kh;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?kh=ArrayBuffer.isView(Ff):kh=Ff&&Ff.buffer&&isArrayBuffer$1(Ff.buffer),kh}const isString$1=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=Ff=>Ff!==null&&typeof Ff=="object",isBoolean=Ff=>Ff===!0||Ff===!1,isPlainObject$2=Ff=>{if(kindOf(Ff)!=="object")return!1;const kh=getPrototypeOf(Ff);return(kh===null||kh===Object.prototype||Object.getPrototypeOf(kh)===null)&&!(Symbol.toStringTag in Ff)&&!(Symbol.iterator in Ff)},isDate=kindOfTest("Date"),isFile$1=kindOfTest("File"),isBlob$1=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=Ff=>isObject(Ff)&&isFunction(Ff.pipe),isFormData=Ff=>{let kh;return Ff&&(typeof FormData=="function"&&Ff instanceof FormData||isFunction(Ff.append)&&((kh=kindOf(Ff))==="formdata"||kh==="object"&&isFunction(Ff.toString)&&Ff.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=Ff=>Ff.trim?Ff.trim():Ff.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(Ff,kh,{allOwnKeys:x_=!1}={}){if(Ff===null||typeof Ff>"u")return;let B_,$_;if(typeof Ff!="object"&&(Ff=[Ff]),isArray$1(Ff))for(B_=0,$_=Ff.length;B_<$_;B_++)kh.call(null,Ff[B_],B_,Ff);else{const $P=x_?Object.getOwnPropertyNames(Ff):Object.keys(Ff),zP=$P.length;let eme;for(B_=0;B_<zP;B_++)eme=$P[B_],kh.call(null,Ff[eme],eme,Ff)}}function findKey(Ff,kh){kh=kh.toLowerCase();const x_=Object.keys(Ff);let B_=x_.length,$_;for(;B_-- >0;)if($_=x_[B_],kh===$_.toLowerCase())return $_;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=Ff=>!isUndefined(Ff)&&Ff!==_global;function merge(){const{caseless:Ff}=isContextDefined(this)&&this||{},kh={},x_=(B_,$_)=>{const $P=Ff&&findKey(kh,$_)||$_;isPlainObject$2(kh[$P])&&isPlainObject$2(B_)?kh[$P]=merge(kh[$P],B_):isPlainObject$2(B_)?kh[$P]=merge({},B_):isArray$1(B_)?kh[$P]=B_.slice():kh[$P]=B_};for(let B_=0,$_=arguments.length;B_<$_;B_++)arguments[B_]&&forEach(arguments[B_],x_);return kh}const extend$2=(Ff,kh,x_,{allOwnKeys:B_}={})=>(forEach(kh,($_,$P)=>{x_&&isFunction($_)?Ff[$P]=bind($_,x_):Ff[$P]=$_},{allOwnKeys:B_}),Ff),stripBOM=Ff=>(Ff.charCodeAt(0)===65279&&(Ff=Ff.slice(1)),Ff),inherits=(Ff,kh,x_,B_)=>{Ff.prototype=Object.create(kh.prototype,B_),Ff.prototype.constructor=Ff,Object.defineProperty(Ff,"super",{value:kh.prototype}),x_&&Object.assign(Ff.prototype,x_)},toFlatObject=(Ff,kh,x_,B_)=>{let $_,$P,zP;const eme={};if(kh=kh||{},Ff==null)return kh;do{for($_=Object.getOwnPropertyNames(Ff),$P=$_.length;$P-- >0;)zP=$_[$P],(!B_||B_(zP,Ff,kh))&&!eme[zP]&&(kh[zP]=Ff[zP],eme[zP]=!0);Ff=x_!==!1&&getPrototypeOf(Ff)}while(Ff&&(!x_||x_(Ff,kh))&&Ff!==Object.prototype);return kh},endsWith=(Ff,kh,x_)=>{Ff=String(Ff),(x_===void 0||x_>Ff.length)&&(x_=Ff.length),x_-=kh.length;const B_=Ff.indexOf(kh,x_);return B_!==-1&&B_===x_},toArray=Ff=>{if(!Ff)return null;if(isArray$1(Ff))return Ff;let kh=Ff.length;if(!isNumber(kh))return null;const x_=new Array(kh);for(;kh-- >0;)x_[kh]=Ff[kh];return x_},isTypedArray$1=(Ff=>kh=>Ff&&kh instanceof Ff)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(Ff,kh)=>{const B_=(Ff&&Ff[Symbol.iterator]).call(Ff);let $_;for(;($_=B_.next())&&!$_.done;){const $P=$_.value;kh.call(Ff,$P[0],$P[1])}},matchAll=(Ff,kh)=>{let x_;const B_=[];for(;(x_=Ff.exec(kh))!==null;)B_.push(x_);return B_},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=Ff=>Ff.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(x_,B_,$_){return B_.toUpperCase()+$_}),hasOwnProperty$2=(({hasOwnProperty:Ff})=>(kh,x_)=>Ff.call(kh,x_))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(Ff,kh)=>{const x_=Object.getOwnPropertyDescriptors(Ff),B_={};forEach(x_,($_,$P)=>{let zP;(zP=kh($_,$P,Ff))!==!1&&(B_[$P]=zP||$_)}),Object.defineProperties(Ff,B_)},freezeMethods=Ff=>{reduceDescriptors(Ff,(kh,x_)=>{if(isFunction(Ff)&&["arguments","caller","callee"].indexOf(x_)!==-1)return!1;const B_=Ff[x_];if(isFunction(B_)){if(kh.enumerable=!1,"writable"in kh){kh.writable=!1;return}kh.set||(kh.set=()=>{throw Error("Can not rewrite read-only method '"+x_+"'")})}})},toObjectSet=(Ff,kh)=>{const x_={},B_=$_=>{$_.forEach($P=>{x_[$P]=!0})};return isArray$1(Ff)?B_(Ff):B_(String(Ff).split(kh)),x_},noop$1=()=>{},toFiniteNumber=(Ff,kh)=>Ff!=null&&Number.isFinite(Ff=+Ff)?Ff:kh,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT$1="0123456789",ALPHABET={DIGIT:DIGIT$1,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT$1},generateString=(Ff=16,kh=ALPHABET.ALPHA_DIGIT)=>{let x_="";const{length:B_}=kh;for(;Ff--;)x_+=kh[Math.random()*B_|0];return x_};function isSpecCompliantForm(Ff){return!!(Ff&&isFunction(Ff.append)&&Ff[Symbol.toStringTag]==="FormData"&&Ff[Symbol.iterator])}const toJSONObject=Ff=>{const kh=new Array(10),x_=(B_,$_)=>{if(isObject(B_)){if(kh.indexOf(B_)>=0)return;if(!("toJSON"in B_)){kh[$_]=B_;const $P=isArray$1(B_)?[]:{};return forEach(B_,(zP,eme)=>{const tme=x_(zP,$_+1);!isUndefined(tme)&&($P[eme]=tme)}),kh[$_]=void 0,$P}}return B_};return x_(Ff,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=Ff=>Ff&&(isObject(Ff)||isFunction(Ff))&&isFunction(Ff.then)&&isFunction(Ff.catch),_setImmediate=((Ff,kh)=>Ff?setImmediate:kh?((x_,B_)=>(_global.addEventListener("message",({source:$_,data:$P})=>{$_===_global&&$P===x_&&B_.length&&B_.shift()()},!1),$_=>{B_.push($_),_global.postMessage(x_,"*")}))(`axios@${Math.random()}`,[]):x_=>setTimeout(x_))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,utils$1={isArray:isArray$1,isArrayBuffer:isArrayBuffer$1,isBuffer:isBuffer$2,isFormData,isArrayBufferView,isString:isString$1,isNumber,isBoolean,isObject,isPlainObject:isPlainObject$2,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile:isFile$1,isBlob:isBlob$1,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge,extend:extend$2,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$2,hasOwnProp:hasOwnProperty$2,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$1,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError(Ff,kh,x_,B_,$_){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=Ff,this.name="AxiosError",kh&&(this.code=kh),x_&&(this.config=x_),B_&&(this.request=B_),$_&&(this.response=$_,this.status=$_.status?$_.status:null)}utils$1.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(Ff=>{descriptors[Ff]={value:Ff}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(Ff,kh,x_,B_,$_,$P)=>{const zP=Object.create(prototype$1);return utils$1.toFlatObject(Ff,zP,function(tme){return tme!==Error.prototype},eme=>eme!=="isAxiosError"),AxiosError.call(zP,Ff.message,kh,x_,B_,$_),zP.cause=Ff,zP.name=Ff.name,$P&&Object.assign(zP,$P),zP};const httpAdapter=null;function isVisitable(Ff){return utils$1.isPlainObject(Ff)||utils$1.isArray(Ff)}function removeBrackets(Ff){return utils$1.endsWith(Ff,"[]")?Ff.slice(0,-2):Ff}function renderKey(Ff,kh,x_){return Ff?Ff.concat(kh).map(function($_,$P){return $_=removeBrackets($_),!x_&&$P?"["+$_+"]":$_}).join(x_?".":""):kh}function isFlatArray(Ff){return utils$1.isArray(Ff)&&!Ff.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(kh){return/^is[A-Z]/.test(kh)});function toFormData(Ff,kh,x_){if(!utils$1.isObject(Ff))throw new TypeError("target must be an object");kh=kh||new FormData,x_=utils$1.toFlatObject(x_,{metaTokens:!0,dots:!1,indexes:!1},!1,function(cme,lme){return!utils$1.isUndefined(lme[cme])});const B_=x_.metaTokens,$_=x_.visitor||rme,$P=x_.dots,zP=x_.indexes,tme=(x_.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(kh);if(!utils$1.isFunction($_))throw new TypeError("visitor must be a function");function nme(sme){if(sme===null)return"";if(utils$1.isDate(sme))return sme.toISOString();if(!tme&&utils$1.isBlob(sme))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(sme)||utils$1.isTypedArray(sme)?tme&&typeof Blob=="function"?new Blob([sme]):Buffer.from(sme):sme}function rme(sme,cme,lme){let ume=sme;if(sme&&!lme&&typeof sme=="object"){if(utils$1.endsWith(cme,"{}"))cme=B_?cme:cme.slice(0,-2),sme=JSON.stringify(sme);else if(utils$1.isArray(sme)&&isFlatArray(sme)||(utils$1.isFileList(sme)||utils$1.endsWith(cme,"[]"))&&(ume=utils$1.toArray(sme)))return cme=removeBrackets(cme),ume.forEach(function(fme,pme){!(utils$1.isUndefined(fme)||fme===null)&&kh.append(zP===!0?renderKey([cme],pme,$P):zP===null?cme:cme+"[]",nme(fme))}),!1}return isVisitable(sme)?!0:(kh.append(renderKey(lme,cme,$P),nme(sme)),!1)}const ime=[],ame=Object.assign(predicates,{defaultVisitor:rme,convertValue:nme,isVisitable});function ome(sme,cme){if(!utils$1.isUndefined(sme)){if(ime.indexOf(sme)!==-1)throw Error("Circular reference detected in "+cme.join("."));ime.push(sme),utils$1.forEach(sme,function(ume,dme){(!(utils$1.isUndefined(ume)||ume===null)&&$_.call(kh,ume,utils$1.isString(dme)?dme.trim():dme,cme,ame))===!0&&ome(ume,cme?cme.concat(dme):[dme])}),ime.pop()}}if(!utils$1.isObject(Ff))throw new TypeError("data must be an object");return ome(Ff),kh}function encode$1(Ff){const kh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(Ff).replace(/[!'()~]|%20|%00/g,function(B_){return kh[B_]})}function AxiosURLSearchParams(Ff,kh){this._pairs=[],Ff&&toFormData(Ff,this,kh)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(kh,x_){this._pairs.push([kh,x_])},prototype.toString=function(kh){const x_=kh?function(B_){return kh.call(this,B_,encode$1)}:encode$1;return this._pairs.map(function($_){return x_($_[0])+"="+x_($_[1])},"").join("&")};function encode(Ff){return encodeURIComponent(Ff).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(Ff,kh,x_){if(!kh)return Ff;const B_=x_&&x_.encode||encode,$_=x_&&x_.serialize;let $P;if($_?$P=$_(kh,x_):$P=utils$1.isURLSearchParams(kh)?kh.toString():new AxiosURLSearchParams(kh,x_).toString(B_),$P){const zP=Ff.indexOf("#");zP!==-1&&(Ff=Ff.slice(0,zP)),Ff+=(Ff.indexOf("?")===-1?"?":"&")+$P}return Ff}class InterceptorManager{constructor(){this.handlers=[]}use(kh,x_,B_){return this.handlers.push({fulfilled:kh,rejected:x_,synchronous:B_?B_.synchronous:!1,runWhen:B_?B_.runWhen:null}),this.handlers.length-1}eject(kh){this.handlers[kh]&&(this.handlers[kh]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(kh){utils$1.forEach(this.handlers,function(B_){B_!==null&&kh(B_)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(Ff,kh){return toFormData(Ff,new platform.classes.URLSearchParams,Object.assign({visitor:function(x_,B_,$_,$P){return platform.isNode&&utils$1.isBuffer(x_)?(this.append(B_,x_.toString("base64")),!1):$P.defaultVisitor.apply(this,arguments)}},kh))}function parsePropPath(Ff){return utils$1.matchAll(/\w+|\[(\w*)]/g,Ff).map(kh=>kh[0]==="[]"?"":kh[1]||kh[0])}function arrayToObject(Ff){const kh={},x_=Object.keys(Ff);let B_;const $_=x_.length;let $P;for(B_=0;B_<$_;B_++)$P=x_[B_],kh[$P]=Ff[$P];return kh}function formDataToJSON(Ff){function kh(x_,B_,$_,$P){let zP=x_[$P++];if(zP==="__proto__")return!0;const eme=Number.isFinite(+zP),tme=$P>=x_.length;return zP=!zP&&utils$1.isArray($_)?$_.length:zP,tme?(utils$1.hasOwnProp($_,zP)?$_[zP]=[$_[zP],B_]:$_[zP]=B_,!eme):((!$_[zP]||!utils$1.isObject($_[zP]))&&($_[zP]=[]),kh(x_,B_,$_[zP],$P)&&utils$1.isArray($_[zP])&&($_[zP]=arrayToObject($_[zP])),!eme)}if(utils$1.isFormData(Ff)&&utils$1.isFunction(Ff.entries)){const x_={};return utils$1.forEachEntry(Ff,(B_,$_)=>{kh(parsePropPath(B_),$_,x_,0)}),x_}return null}function stringifySafely(Ff,kh,x_){if(utils$1.isString(Ff))try{return(kh||JSON.parse)(Ff),utils$1.trim(Ff)}catch(B_){if(B_.name!=="SyntaxError")throw B_}return(x_||JSON.stringify)(Ff)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(kh,x_){const B_=x_.getContentType()||"",$_=B_.indexOf("application/json")>-1,$P=utils$1.isObject(kh);if($P&&utils$1.isHTMLForm(kh)&&(kh=new FormData(kh)),utils$1.isFormData(kh))return $_?JSON.stringify(formDataToJSON(kh)):kh;if(utils$1.isArrayBuffer(kh)||utils$1.isBuffer(kh)||utils$1.isStream(kh)||utils$1.isFile(kh)||utils$1.isBlob(kh)||utils$1.isReadableStream(kh))return kh;if(utils$1.isArrayBufferView(kh))return kh.buffer;if(utils$1.isURLSearchParams(kh))return x_.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),kh.toString();let eme;if($P){if(B_.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(kh,this.formSerializer).toString();if((eme=utils$1.isFileList(kh))||B_.indexOf("multipart/form-data")>-1){const tme=this.env&&this.env.FormData;return toFormData(eme?{"files[]":kh}:kh,tme&&new tme,this.formSerializer)}}return $P||$_?(x_.setContentType("application/json",!1),stringifySafely(kh)):kh}],transformResponse:[function(kh){const x_=this.transitional||defaults$1.transitional,B_=x_&&x_.forcedJSONParsing,$_=this.responseType==="json";if(utils$1.isResponse(kh)||utils$1.isReadableStream(kh))return kh;if(kh&&utils$1.isString(kh)&&(B_&&!this.responseType||$_)){const zP=!(x_&&x_.silentJSONParsing)&&$_;try{return JSON.parse(kh)}catch(eme){if(zP)throw eme.name==="SyntaxError"?AxiosError.from(eme,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):eme}}return kh}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(kh){return kh>=200&&kh<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],Ff=>{defaults$1.headers[Ff]={}});const defaults$2=defaults$1,ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=Ff=>{const kh={};let x_,B_,$_;return Ff&&Ff.split(`
|
|
142
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Fme=Dme,Rme=kme),Vme===void 0&&(Vme=!0);const Bme={code:Rme,language:Fme};Lme("before:highlight",Bme);const bme=Bme.result?Bme.result:ime(Bme.language,Bme.code,Vme);return bme.code=Bme.code,Lme("after:highlight",bme),bme}function ime(Dme,kme,Vme,Rme){const Fme=Object.create(null);function Bme(jme,Jme){return jme.keywords[Jme]}function bme(){if(!S_e.keywords){x_e.addText(r_e);return}let jme=0;S_e.keywordPatternRe.lastIndex=0;let Jme=S_e.keywordPatternRe.exec(r_e),h_e="";for(;Jme;){h_e+=r_e.substring(jme,Jme.index);const O_e=y_e.case_insensitive?Jme[0].toLowerCase():Jme[0],I_e=Bme(S_e,O_e);if(I_e){const[B_e,L_e]=I_e;if(x_e.addText(h_e),h_e="",Fme[O_e]=(Fme[O_e]||0)+1,Fme[O_e]<=MAX_KEYWORD_HITS&&(t_e+=L_e),B_e.startsWith("_"))h_e+=Jme[0];else{const m_e=y_e.classNameAliases[B_e]||B_e;yme(Jme[0],m_e)}}else h_e+=Jme[0];jme=S_e.keywordPatternRe.lastIndex,Jme=S_e.keywordPatternRe.exec(r_e)}h_e+=r_e.substring(jme),x_e.addText(h_e)}function Sme(){if(r_e==="")return;let jme=null;if(typeof S_e.subLanguage=="string"){if(!kh[S_e.subLanguage]){x_e.addText(r_e);return}jme=ime(S_e.subLanguage,r_e,!0,R_e[S_e.subLanguage]),R_e[S_e.subLanguage]=jme._top}else jme=ome(r_e,S_e.subLanguage.length?S_e.subLanguage:null);S_e.relevance>0&&(t_e+=jme.relevance),x_e.__addSublanguage(jme._emitter,jme.language)}function Cme(){S_e.subLanguage!=null?Sme():bme(),r_e=""}function yme(jme,Jme){jme!==""&&(x_e.startScope(Jme),x_e.addText(jme),x_e.endScope())}function Nme(jme,Jme){let h_e=1;const O_e=Jme.length-1;for(;h_e<=O_e;){if(!jme._emit[h_e]){h_e++;continue}const I_e=y_e.classNameAliases[jme[h_e]]||jme[h_e],B_e=Jme[h_e];I_e?yme(B_e,I_e):(r_e=B_e,bme(),r_e=""),h_e++}}function Ime(jme,Jme){return jme.scope&&typeof jme.scope=="string"&&x_e.openNode(y_e.classNameAliases[jme.scope]||jme.scope),jme.beginScope&&(jme.beginScope._wrap?(yme(r_e,y_e.classNameAliases[jme.beginScope._wrap]||jme.beginScope._wrap),r_e=""):jme.beginScope._multi&&(Nme(jme.beginScope,Jme),r_e="")),S_e=Object.create(jme,{parent:{value:S_e}}),S_e}function Ume(jme,Jme,h_e){let O_e=startsWith(jme.endRe,h_e);if(O_e){if(jme["on:end"]){const I_e=new Response$1(jme);jme["on:end"](Jme,I_e),I_e.isMatchIgnored&&(O_e=!1)}if(O_e){for(;jme.endsParent&&jme.parent;)jme=jme.parent;return jme}}if(jme.endsWithParent)return Ume(jme.parent,Jme,h_e)}function Gme(jme){return S_e.matcher.regexIndex===0?(r_e+=jme[0],1):(f_e=!0,0)}function Hme(jme){const Jme=jme[0],h_e=jme.rule,O_e=new Response$1(h_e),I_e=[h_e.__beforeBegin,h_e["on:begin"]];for(const B_e of I_e)if(B_e&&(B_e(jme,O_e),O_e.isMatchIgnored))return Gme(Jme);return h_e.skip?r_e+=Jme:(h_e.excludeBegin&&(r_e+=Jme),Cme(),!h_e.returnBegin&&!h_e.excludeBegin&&(r_e=Jme)),Ime(h_e,jme),h_e.returnBegin?0:Jme.length}function zme(jme){const Jme=jme[0],h_e=kme.substring(jme.index),O_e=Ume(S_e,jme,h_e);if(!O_e)return NO_MATCH;const I_e=S_e;S_e.endScope&&S_e.endScope._wrap?(Cme(),yme(Jme,S_e.endScope._wrap)):S_e.endScope&&S_e.endScope._multi?(Cme(),Nme(S_e.endScope,jme)):I_e.skip?r_e+=Jme:(I_e.returnEnd||I_e.excludeEnd||(r_e+=Jme),Cme(),I_e.excludeEnd&&(r_e=Jme));do S_e.scope&&x_e.closeNode(),!S_e.skip&&!S_e.subLanguage&&(t_e+=S_e.relevance),S_e=S_e.parent;while(S_e!==O_e.parent);return O_e.starts&&Ime(O_e.starts,jme),I_e.returnEnd?0:Jme.length}function Xme(){const jme=[];for(let Jme=S_e;Jme!==y_e;Jme=Jme.parent)Jme.scope&&jme.unshift(Jme.scope);jme.forEach(Jme=>x_e.openNode(Jme))}let Wme={};function u_e(jme,Jme){const h_e=Jme&&Jme[0];if(r_e+=jme,h_e==null)return Cme(),0;if(Wme.type==="begin"&&Jme.type==="end"&&Wme.index===Jme.index&&h_e===""){if(r_e+=kme.slice(Jme.index,Jme.index+1),!$_){const O_e=new Error(`0 width match regex (${Dme})`);throw O_e.languageName=Dme,O_e.badRule=Wme.rule,O_e}return 1}if(Wme=Jme,Jme.type==="begin")return Hme(Jme);if(Jme.type==="illegal"&&!Vme){const O_e=new Error('Illegal lexeme "'+h_e+'" for mode "'+(S_e.scope||"<unnamed>")+'"');throw O_e.mode=S_e,O_e}else if(Jme.type==="end"){const O_e=zme(Jme);if(O_e!==NO_MATCH)return O_e}if(Jme.type==="illegal"&&h_e==="")return 1;if(n_e>1e5&&n_e>Jme.index*3)throw new Error("potential infinite loop, way more iterations than matches");return r_e+=h_e,h_e.length}const y_e=_me(Dme);if(!y_e)throw error$1($P.replace("{}",Dme)),new Error('Unknown language: "'+Dme+'"');const o_e=compileLanguage(y_e);let D_e="",S_e=Rme||o_e;const R_e={},x_e=new eme.__emitter(eme);Xme();let r_e="",t_e=0,l_e=0,n_e=0,f_e=!1;try{if(y_e.__emitTokens)y_e.__emitTokens(kme,x_e);else{for(S_e.matcher.considerAll();;){n_e++,f_e?f_e=!1:S_e.matcher.considerAll(),S_e.matcher.lastIndex=l_e;const jme=S_e.matcher.exec(kme);if(!jme)break;const Jme=kme.substring(l_e,jme.index),h_e=u_e(Jme,jme);l_e=jme.index+h_e}u_e(kme.substring(l_e))}return x_e.finalize(),D_e=x_e.toHTML(),{language:Dme,value:D_e,relevance:t_e,illegal:!1,_emitter:x_e,_top:S_e}}catch(jme){if(jme.message&&jme.message.includes("Illegal"))return{language:Dme,value:escape$1(kme),illegal:!0,relevance:0,_illegalBy:{message:jme.message,index:l_e,context:kme.slice(l_e-100,l_e+100),mode:jme.mode,resultSoFar:D_e},_emitter:x_e};if($_)return{language:Dme,value:escape$1(kme),illegal:!1,relevance:0,errorRaised:jme,_emitter:x_e,_top:S_e};throw jme}}function ame(Dme){const kme={value:escape$1(Dme),illegal:!1,relevance:0,_top:zP,_emitter:new eme.__emitter(eme)};return kme._emitter.addText(Dme),kme}function ome(Dme,kme){kme=kme||eme.languages||Object.keys(kh);const Vme=ame(Dme),Rme=kme.filter(_me).filter(vme).map(Cme=>ime(Cme,Dme,!1));Rme.unshift(Vme);const Fme=Rme.sort((Cme,yme)=>{if(Cme.relevance!==yme.relevance)return yme.relevance-Cme.relevance;if(Cme.language&&yme.language){if(_me(Cme.language).supersetOf===yme.language)return 1;if(_me(yme.language).supersetOf===Cme.language)return-1}return 0}),[Bme,bme]=Fme,Sme=Bme;return Sme.secondBest=bme,Sme}function sme(Dme,kme,Vme){const Rme=kme&&x_[kme]||Vme;Dme.classList.add("hljs"),Dme.classList.add(`language-${Rme}`)}function cme(Dme){let kme=null;const Vme=nme(Dme);if(tme(Vme))return;if(Lme("before:highlightElement",{el:Dme,language:Vme}),Dme.children.length>0&&(eme.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Dme)),eme.throwUnescapedHTML))throw new HTMLInjectionError("One of your code blocks includes unescaped HTML.",Dme.innerHTML);kme=Dme;const Rme=kme.textContent,Fme=Vme?rme(Rme,{language:Vme,ignoreIllegals:!0}):ome(Rme);Dme.innerHTML=Fme.value,sme(Dme,Vme,Fme.language),Dme.result={language:Fme.language,re:Fme.relevance,relevance:Fme.relevance},Fme.secondBest&&(Dme.secondBest={language:Fme.secondBest.language,relevance:Fme.secondBest.relevance}),Lme("after:highlightElement",{el:Dme,result:Fme,text:Rme})}function lme(Dme){eme=inherit(eme,Dme)}const ume=()=>{pme(),deprecated("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function dme(){pme(),deprecated("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let fme=!1;function pme(){if(document.readyState==="loading"){fme=!0;return}document.querySelectorAll(eme.cssSelector).forEach(cme)}function hme(){fme&&pme()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",hme,!1);function mme(Dme,kme){let Vme=null;try{Vme=kme(Ff)}catch(Rme){if(error$1("Language definition for '{}' could not be registered.".replace("{}",Dme)),$_)error$1(Rme);else throw Rme;Vme=zP}Vme.name||(Vme.name=Dme),kh[Dme]=Vme,Vme.rawDefinition=kme.bind(null,Ff),Vme.aliases&&Tme(Vme.aliases,{languageName:Dme})}function gme(Dme){delete kh[Dme];for(const kme of Object.keys(x_))x_[kme]===Dme&&delete x_[kme]}function Eme(){return Object.keys(kh)}function _me(Dme){return Dme=(Dme||"").toLowerCase(),kh[Dme]||kh[x_[Dme]]}function Tme(Dme,{languageName:kme}){typeof Dme=="string"&&(Dme=[Dme]),Dme.forEach(Vme=>{x_[Vme.toLowerCase()]=kme})}function vme(Dme){const kme=_me(Dme);return kme&&!kme.disableAutodetect}function Ame(Dme){Dme["before:highlightBlock"]&&!Dme["before:highlightElement"]&&(Dme["before:highlightElement"]=kme=>{Dme["before:highlightBlock"](Object.assign({block:kme.el},kme))}),Dme["after:highlightBlock"]&&!Dme["after:highlightElement"]&&(Dme["after:highlightElement"]=kme=>{Dme["after:highlightBlock"](Object.assign({block:kme.el},kme))})}function Ome(Dme){Ame(Dme),B_.push(Dme)}function wme(Dme){const kme=B_.indexOf(Dme);kme!==-1&&B_.splice(kme,1)}function Lme(Dme,kme){const Vme=Dme;B_.forEach(function(Rme){Rme[Vme]&&Rme[Vme](kme)})}function Pme(Dme){return deprecated("10.7.0","highlightBlock will be removed entirely in v12.0"),deprecated("10.7.0","Please use highlightElement now."),cme(Dme)}Object.assign(Ff,{highlight:rme,highlightAuto:ome,highlightAll:pme,highlightElement:cme,highlightBlock:Pme,configure:lme,initHighlighting:ume,initHighlightingOnLoad:dme,registerLanguage:mme,unregisterLanguage:gme,listLanguages:Eme,getLanguage:_me,registerAliases:Tme,autoDetection:vme,inherit,addPlugin:Ome,removePlugin:wme}),Ff.debugMode=function(){$_=!1},Ff.safeMode=function(){$_=!0},Ff.versionString=version,Ff.regex={concat,lookahead,either,optional,anyNumberOfTimes};for(const Dme in MODES)typeof MODES[Dme]=="object"&&deepFreeze(MODES[Dme]);return Object.assign(Ff,MODES),Ff},highlight=HLJS({});highlight.newInstance=()=>HLJS({});var core=highlight;highlight.HighlightJS=highlight,highlight.default=highlight;const HighlightJS$1=getDefaultExportFromCjs(core);function parseNodes(Ff,kh=[]){return Ff.map(x_=>{const B_=[...kh,...x_.properties?x_.properties.className:[]];return x_.children?parseNodes(x_.children,B_):{text:x_.value,classes:B_}}).flat()}function getHighlightNodes(Ff){return Ff.value||Ff.children||[]}function registered(Ff){return!!HighlightJS$1.getLanguage(Ff)}function getDecorations({doc:Ff,name:kh,lowlight:x_,defaultLanguage:B_}){const $_=[],$P=x_.listLanguages();return findChildren(Ff,zP=>zP.type.name===kh).forEach(zP=>{let eme=zP.pos+1;const tme=zP.node.attrs.language||B_,nme=tme&&($P.includes(tme)||registered(tme))?getHighlightNodes(x_.highlight(tme,zP.node.textContent)):getHighlightNodes(x_.highlightAuto(zP.node.textContent));parseNodes(nme).forEach(rme=>{const ime=eme+rme.text.length;if(rme.classes.length){const ame=Decoration.inline(eme,ime,{class:rme.classes.join(" ")});$_.push(ame)}eme=ime})}),DecorationSet.create(Ff,$_)}function isFunction$1(Ff){return typeof Ff=="function"}function LowlightPlugin({name:Ff,lowlight:kh,defaultLanguage:x_}){if(!["highlight","highlightAuto","listLanguages"].every($_=>isFunction$1(kh[$_])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const B_=new Plugin({key:new PluginKey("lowlight"),state:{init:($_,{doc:$P})=>getDecorations({doc:$P,name:Ff,lowlight:kh,defaultLanguage:x_}),apply:($_,$P,zP,eme)=>{const tme=zP.selection.$head.parent.type.name,nme=eme.selection.$head.parent.type.name,rme=findChildren(zP.doc,ame=>ame.type.name===Ff),ime=findChildren(eme.doc,ame=>ame.type.name===Ff);return $_.docChanged&&([tme,nme].includes(Ff)||ime.length!==rme.length||$_.steps.some(ame=>ame.from!==void 0&&ame.to!==void 0&&rme.some(ome=>ome.pos>=ame.from&&ome.pos+ome.node.nodeSize<=ame.to)))?getDecorations({doc:$_.doc,name:Ff,lowlight:kh,defaultLanguage:x_}):$P.map($_.mapping,$_.doc)}},props:{decorations($_){return B_.getState($_)}}});return B_}const CodeBlockView=({editor:Ff,node:kh,updateAttributes:x_,extension:B_})=>{var ume,dme,fme,pme;const $_=React.useContext(shareData),[$P,zP]=React.useState("light"),[eme,tme]=React.useState(((ume=kh==null?void 0:kh.attrs)==null?void 0:ume.exec)||!1),[nme,rme]=React.useState(!1),[ime,ame]=React.useState([]),ome=hme=>{x_({language:hme})},sme=hme=>{var gme;const mme=(gme=hme==null?void 0:hme.target)==null?void 0:gme.checked;tme(mme),x_({exec:mme})},cme=()=>{var hme;(hme=navigator==null?void 0:navigator.clipboard)==null||hme.writeText(kh==null?void 0:kh.textContent).then(()=>{rme(!0);const mme=setTimeout(()=>{rme(!1),clearTimeout(mme)},2e3)})},lme=()=>{var hme;(hme=B_==null?void 0:B_.options)==null||hme.onExec(kh==null?void 0:kh.textContent)};return React.useEffect(()=>{eme&&($_!=null&&$_.template)?zP("dark"):zP("light")},[eme,$_==null?void 0:$_.template]),React.useEffect(()=>{var mme,gme,Eme;const hme=(Eme=(gme=(mme=B_==null?void 0:B_.options)==null?void 0:mme.lowlight)==null?void 0:gme.listLanguages())==null?void 0:Eme.map(_me=>({value:_me,label:_me}));ame([...hme])},[B_]),jsxRuntimeExports.jsx(NodeViewWrapper,{children:jsxRuntimeExports.jsxs("div",{className:`code-block code-block-${$P}`,children:[jsxRuntimeExports.jsxs("div",{className:"code-block-header",contentEditable:!1,style:{display:"flex"},children:[jsxRuntimeExports.jsxs("div",{className:"code-block-header-left",children:[((Ff==null?void 0:Ff.isEditable)||!(Ff!=null&&Ff.isEditable)&&((dme=kh==null?void 0:kh.attrs)==null?void 0:dme.language))&&jsxRuntimeExports.jsx(antd.Select,{disabled:!(Ff!=null&&Ff.isEditable),placeholder:"请选择语言",defaultValue:((fme=kh==null?void 0:kh.attrs)==null?void 0:fme.language)||void 0,style:{width:100},onChange:ome,options:ime}),($_==null?void 0:$_.template)&&jsxRuntimeExports.jsx(antd.Select,{disabled:!0,value:(pme=$_==null?void 0:$_.template)==null?void 0:pme.name})]}),($_==null?void 0:$_.template)&&(Ff==null?void 0:Ff.isEditable)&&jsxRuntimeExports.jsx("div",{className:"code-block-header-right",children:jsxRuntimeExports.jsx(antd.Checkbox,{checked:eme,onChange:sme,children:"执行"})})]}),jsxRuntimeExports.jsx("pre",{className:"code-block-body",children:jsxRuntimeExports.jsx(NodeViewContent,{as:"code"})}),jsxRuntimeExports.jsxs("div",{className:"code-block-action",contentEditable:!1,children:[eme&&($_==null?void 0:$_.template)&&jsxRuntimeExports.jsx(antd.Button,{type:"primary",onClick:lme,children:"执行"}),jsxRuntimeExports.jsxs("div",{className:"code-block-action-copy",children:[nme&&jsxRuntimeExports.jsxs("div",{className:"copy-tip",children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{opacity:"0.01",width:"16",height:"16",fill:"black"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1C4.13438 1 1 4.13438 1 8C1 11.8656 4.13438 15 8 15C11.8656 15 15 11.8656 15 8C15 4.13438 11.8656 1 8 1Z",fill:"#30C213"}),jsxRuntimeExports.jsx("path",{d:"M3.75391 8.76556C3.75391 8.76556 5.94801 10.5554 6.16596 12.0777C6.16596 12.0777 9.04299 7.38086 12.2397 6.96062C12.2397 6.96062 11.2662 6.25307 11.5858 5.13477C11.5858 5.13477 9.81311 5.31117 6.4711 10.4844L4.9048 7.8329L3.75391 8.76556Z",fill:"white"})]}),jsxRuntimeExports.jsx("span",{children:"复制成功"})]}),jsxRuntimeExports.jsx(antd.Button,{type:"primary",onClick:cme,children:"复制"})]})]})]})})},CodeBlockLowlight=CodeBlock.extend({addOptions(){var Ff;return{...(Ff=this.parent)==null?void 0:Ff.call(this),lowlight:{},defaultLanguage:null}},addNodeView(){return ReactNodeViewRenderer(CodeBlockView)},addProseMirrorPlugins(){var Ff;return[...((Ff=this.parent)==null?void 0:Ff.call(this))||[],LowlightPlugin({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),FloatingMenuPlugin=Ff=>{var $P,zP;let kh,x_={},B_=!1;return($P=Ff.tip)==null||$P.emitter.on("hover",({node:eme,pos:tme,range:nme})=>{x_={node:eme,pos:tme,range:nme}}),(zP=Ff.tip)==null||zP.emitter.on("show",eme=>{B_=eme.show}),new Plugin({key:new PluginKey(Ff.pluginKey),view:eme=>({update(tme,nme){var sme,cme,lme;const{anchor:rme}=tme.state.selection,{anchor:ime}=nme.selection,{node:ame,pos:ome}=x_;(sme=Ff.tip)!=null&&sme.isShow&&rme>=ome&&rme<ome+ame.nodeSize&&(ime<ome||ime>=ome+ame.nodeSize)||rme!==ime&&((cme=Ff.tip)!=null&&cme.isShow)&&((lme=Ff.tip.tippy)==null||lme.hide())},destroy(){var tme;(tme=Ff.tip)==null||tme.destroy()}}),props:{handleDOMEvents:{mousemove:(eme,tme)=>{kh&&clearTimeout(kh);const{editor:nme,tip:rme}=Ff;nme.isEditable&&(kh=setTimeout(()=>{rme==null||rme.move(eme,tme)},0))},wheel:()=>{var eme;(eme=Ff.tip)==null||eme.hide()}},decorations(eme){if(B_&&x_.node){const tme=Decoration.node(x_.range.from,x_.range.to,{style:"background: rgba(22,119,255,0.10); border-radius: 4px;"});return DecorationSet.create(eme.doc,[tme])}return null}}})},TableSelect=Ff=>{const{onClick:kh}=Ff,[x_,B_]=React.useState({row:0,col:0}),[$_,$P]=React.useState([]);React.useEffect(()=>{const rme=[];for(let ime=0;ime<9;ime++){rme[ime]=[];for(let ame=0;ame<9;ame++)ime<x_.row&&ame<x_.col?rme[ime][ame]=!0:rme[ime][ame]=!1}$P(rme)},[x_]);const zP=nme=>{const{dataset:rme}=nme.target;if(rme.row){const{row:ime,col:ame}=rme;B_({row:parseInt(ime),col:parseInt(ame)})}else{const ime=nme.target.getBoundingClientRect(),ame=nme.clientX-ime.left-nme.target.clientLeft-10,ome=nme.clientY-ime.top-nme.target.clientTop-10;let sme,cme;ame<0?cme=0:(cme=Math.ceil(ame/26),cme=Math.min(cme,9)),ome<0?sme=0:(sme=Math.ceil(ome/26),sme=Math.min(sme,9)),B_(sme===0||cme===0?{row:0,col:0}:{row:sme,col:cme})}},eme=nme=>{B_({row:0,col:0})},tme=()=>{x_.row&&(kh==null||kh(x_))};return jsxRuntimeExports.jsxs("div",{className:"tiptap-table-select",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-table-select-title",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-table-select-title-left",children:"表格行列"}),jsxRuntimeExports.jsx("div",{className:"tiptap-table-select-title-right",children:x_.row?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:x_.row}),jsxRuntimeExports.jsx("span",{children:"x"}),jsxRuntimeExports.jsx("span",{children:x_.col})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})})]}),jsxRuntimeExports.jsx("div",{className:"tiptap-table-select-content",onMouseMove:zP,onClick:tme,onMouseLeave:eme,children:$_.map((nme,rme)=>jsxRuntimeExports.jsx(React.Fragment,{children:nme.map((ime,ame)=>jsxRuntimeExports.jsx("div",{className:ime?"light":"","data-row":rme+1,"data-col":ame+1},`${rme}-${ame}`))},rme))})]})},ActiveSelect=Ff=>{const{onClick:kh,onFromLibraryClick:x_}=Ff,{available:B_}=React.useContext(shareData);return jsxRuntimeExports.jsxs("div",{className:"tiptap-active-select",children:[jsxRuntimeExports.jsx("div",{onClick:kh,children:"自定义创建"}),jsxRuntimeExports.jsx("div",{className:B_?"":"unavailable",onClick:x_,children:"从题库添加"})]})};function bind(Ff,kh){return function(){return Ff.apply(kh,arguments)}}const{toString:toString$1}=Object.prototype,{getPrototypeOf}=Object,kindOf=(Ff=>kh=>{const x_=toString$1.call(kh);return Ff[x_]||(Ff[x_]=x_.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=Ff=>(Ff=Ff.toLowerCase(),kh=>kindOf(kh)===Ff),typeOfTest=Ff=>kh=>typeof kh===Ff,{isArray:isArray$1}=Array,isUndefined=typeOfTest("undefined");function isBuffer$2(Ff){return Ff!==null&&!isUndefined(Ff)&&Ff.constructor!==null&&!isUndefined(Ff.constructor)&&isFunction(Ff.constructor.isBuffer)&&Ff.constructor.isBuffer(Ff)}const isArrayBuffer$1=kindOfTest("ArrayBuffer");function isArrayBufferView(Ff){let kh;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?kh=ArrayBuffer.isView(Ff):kh=Ff&&Ff.buffer&&isArrayBuffer$1(Ff.buffer),kh}const isString$1=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=Ff=>Ff!==null&&typeof Ff=="object",isBoolean=Ff=>Ff===!0||Ff===!1,isPlainObject$2=Ff=>{if(kindOf(Ff)!=="object")return!1;const kh=getPrototypeOf(Ff);return(kh===null||kh===Object.prototype||Object.getPrototypeOf(kh)===null)&&!(Symbol.toStringTag in Ff)&&!(Symbol.iterator in Ff)},isDate=kindOfTest("Date"),isFile$1=kindOfTest("File"),isBlob$1=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=Ff=>isObject(Ff)&&isFunction(Ff.pipe),isFormData=Ff=>{let kh;return Ff&&(typeof FormData=="function"&&Ff instanceof FormData||isFunction(Ff.append)&&((kh=kindOf(Ff))==="formdata"||kh==="object"&&isFunction(Ff.toString)&&Ff.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=Ff=>Ff.trim?Ff.trim():Ff.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(Ff,kh,{allOwnKeys:x_=!1}={}){if(Ff===null||typeof Ff>"u")return;let B_,$_;if(typeof Ff!="object"&&(Ff=[Ff]),isArray$1(Ff))for(B_=0,$_=Ff.length;B_<$_;B_++)kh.call(null,Ff[B_],B_,Ff);else{const $P=x_?Object.getOwnPropertyNames(Ff):Object.keys(Ff),zP=$P.length;let eme;for(B_=0;B_<zP;B_++)eme=$P[B_],kh.call(null,Ff[eme],eme,Ff)}}function findKey(Ff,kh){kh=kh.toLowerCase();const x_=Object.keys(Ff);let B_=x_.length,$_;for(;B_-- >0;)if($_=x_[B_],kh===$_.toLowerCase())return $_;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=Ff=>!isUndefined(Ff)&&Ff!==_global;function merge(){const{caseless:Ff}=isContextDefined(this)&&this||{},kh={},x_=(B_,$_)=>{const $P=Ff&&findKey(kh,$_)||$_;isPlainObject$2(kh[$P])&&isPlainObject$2(B_)?kh[$P]=merge(kh[$P],B_):isPlainObject$2(B_)?kh[$P]=merge({},B_):isArray$1(B_)?kh[$P]=B_.slice():kh[$P]=B_};for(let B_=0,$_=arguments.length;B_<$_;B_++)arguments[B_]&&forEach(arguments[B_],x_);return kh}const extend$2=(Ff,kh,x_,{allOwnKeys:B_}={})=>(forEach(kh,($_,$P)=>{x_&&isFunction($_)?Ff[$P]=bind($_,x_):Ff[$P]=$_},{allOwnKeys:B_}),Ff),stripBOM=Ff=>(Ff.charCodeAt(0)===65279&&(Ff=Ff.slice(1)),Ff),inherits=(Ff,kh,x_,B_)=>{Ff.prototype=Object.create(kh.prototype,B_),Ff.prototype.constructor=Ff,Object.defineProperty(Ff,"super",{value:kh.prototype}),x_&&Object.assign(Ff.prototype,x_)},toFlatObject=(Ff,kh,x_,B_)=>{let $_,$P,zP;const eme={};if(kh=kh||{},Ff==null)return kh;do{for($_=Object.getOwnPropertyNames(Ff),$P=$_.length;$P-- >0;)zP=$_[$P],(!B_||B_(zP,Ff,kh))&&!eme[zP]&&(kh[zP]=Ff[zP],eme[zP]=!0);Ff=x_!==!1&&getPrototypeOf(Ff)}while(Ff&&(!x_||x_(Ff,kh))&&Ff!==Object.prototype);return kh},endsWith=(Ff,kh,x_)=>{Ff=String(Ff),(x_===void 0||x_>Ff.length)&&(x_=Ff.length),x_-=kh.length;const B_=Ff.indexOf(kh,x_);return B_!==-1&&B_===x_},toArray=Ff=>{if(!Ff)return null;if(isArray$1(Ff))return Ff;let kh=Ff.length;if(!isNumber(kh))return null;const x_=new Array(kh);for(;kh-- >0;)x_[kh]=Ff[kh];return x_},isTypedArray$1=(Ff=>kh=>Ff&&kh instanceof Ff)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(Ff,kh)=>{const B_=(Ff&&Ff[Symbol.iterator]).call(Ff);let $_;for(;($_=B_.next())&&!$_.done;){const $P=$_.value;kh.call(Ff,$P[0],$P[1])}},matchAll=(Ff,kh)=>{let x_;const B_=[];for(;(x_=Ff.exec(kh))!==null;)B_.push(x_);return B_},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=Ff=>Ff.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(x_,B_,$_){return B_.toUpperCase()+$_}),hasOwnProperty$2=(({hasOwnProperty:Ff})=>(kh,x_)=>Ff.call(kh,x_))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(Ff,kh)=>{const x_=Object.getOwnPropertyDescriptors(Ff),B_={};forEach(x_,($_,$P)=>{let zP;(zP=kh($_,$P,Ff))!==!1&&(B_[$P]=zP||$_)}),Object.defineProperties(Ff,B_)},freezeMethods=Ff=>{reduceDescriptors(Ff,(kh,x_)=>{if(isFunction(Ff)&&["arguments","caller","callee"].indexOf(x_)!==-1)return!1;const B_=Ff[x_];if(isFunction(B_)){if(kh.enumerable=!1,"writable"in kh){kh.writable=!1;return}kh.set||(kh.set=()=>{throw Error("Can not rewrite read-only method '"+x_+"'")})}})},toObjectSet=(Ff,kh)=>{const x_={},B_=$_=>{$_.forEach($P=>{x_[$P]=!0})};return isArray$1(Ff)?B_(Ff):B_(String(Ff).split(kh)),x_},noop$1=()=>{},toFiniteNumber=(Ff,kh)=>Ff!=null&&Number.isFinite(Ff=+Ff)?Ff:kh,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT$1="0123456789",ALPHABET={DIGIT:DIGIT$1,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT$1},generateString=(Ff=16,kh=ALPHABET.ALPHA_DIGIT)=>{let x_="";const{length:B_}=kh;for(;Ff--;)x_+=kh[Math.random()*B_|0];return x_};function isSpecCompliantForm(Ff){return!!(Ff&&isFunction(Ff.append)&&Ff[Symbol.toStringTag]==="FormData"&&Ff[Symbol.iterator])}const toJSONObject=Ff=>{const kh=new Array(10),x_=(B_,$_)=>{if(isObject(B_)){if(kh.indexOf(B_)>=0)return;if(!("toJSON"in B_)){kh[$_]=B_;const $P=isArray$1(B_)?[]:{};return forEach(B_,(zP,eme)=>{const tme=x_(zP,$_+1);!isUndefined(tme)&&($P[eme]=tme)}),kh[$_]=void 0,$P}}return B_};return x_(Ff,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=Ff=>Ff&&(isObject(Ff)||isFunction(Ff))&&isFunction(Ff.then)&&isFunction(Ff.catch),_setImmediate=((Ff,kh)=>Ff?setImmediate:kh?((x_,B_)=>(_global.addEventListener("message",({source:$_,data:$P})=>{$_===_global&&$P===x_&&B_.length&&B_.shift()()},!1),$_=>{B_.push($_),_global.postMessage(x_,"*")}))(`axios@${Math.random()}`,[]):x_=>setTimeout(x_))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,utils$1={isArray:isArray$1,isArrayBuffer:isArrayBuffer$1,isBuffer:isBuffer$2,isFormData,isArrayBufferView,isString:isString$1,isNumber,isBoolean,isObject,isPlainObject:isPlainObject$2,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile:isFile$1,isBlob:isBlob$1,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge,extend:extend$2,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$2,hasOwnProp:hasOwnProperty$2,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$1,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError(Ff,kh,x_,B_,$_){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=Ff,this.name="AxiosError",kh&&(this.code=kh),x_&&(this.config=x_),B_&&(this.request=B_),$_&&(this.response=$_,this.status=$_.status?$_.status:null)}utils$1.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(Ff=>{descriptors[Ff]={value:Ff}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(Ff,kh,x_,B_,$_,$P)=>{const zP=Object.create(prototype$1);return utils$1.toFlatObject(Ff,zP,function(tme){return tme!==Error.prototype},eme=>eme!=="isAxiosError"),AxiosError.call(zP,Ff.message,kh,x_,B_,$_),zP.cause=Ff,zP.name=Ff.name,$P&&Object.assign(zP,$P),zP};const httpAdapter=null;function isVisitable(Ff){return utils$1.isPlainObject(Ff)||utils$1.isArray(Ff)}function removeBrackets(Ff){return utils$1.endsWith(Ff,"[]")?Ff.slice(0,-2):Ff}function renderKey(Ff,kh,x_){return Ff?Ff.concat(kh).map(function($_,$P){return $_=removeBrackets($_),!x_&&$P?"["+$_+"]":$_}).join(x_?".":""):kh}function isFlatArray(Ff){return utils$1.isArray(Ff)&&!Ff.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(kh){return/^is[A-Z]/.test(kh)});function toFormData(Ff,kh,x_){if(!utils$1.isObject(Ff))throw new TypeError("target must be an object");kh=kh||new FormData,x_=utils$1.toFlatObject(x_,{metaTokens:!0,dots:!1,indexes:!1},!1,function(cme,lme){return!utils$1.isUndefined(lme[cme])});const B_=x_.metaTokens,$_=x_.visitor||rme,$P=x_.dots,zP=x_.indexes,tme=(x_.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(kh);if(!utils$1.isFunction($_))throw new TypeError("visitor must be a function");function nme(sme){if(sme===null)return"";if(utils$1.isDate(sme))return sme.toISOString();if(!tme&&utils$1.isBlob(sme))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(sme)||utils$1.isTypedArray(sme)?tme&&typeof Blob=="function"?new Blob([sme]):Buffer.from(sme):sme}function rme(sme,cme,lme){let ume=sme;if(sme&&!lme&&typeof sme=="object"){if(utils$1.endsWith(cme,"{}"))cme=B_?cme:cme.slice(0,-2),sme=JSON.stringify(sme);else if(utils$1.isArray(sme)&&isFlatArray(sme)||(utils$1.isFileList(sme)||utils$1.endsWith(cme,"[]"))&&(ume=utils$1.toArray(sme)))return cme=removeBrackets(cme),ume.forEach(function(fme,pme){!(utils$1.isUndefined(fme)||fme===null)&&kh.append(zP===!0?renderKey([cme],pme,$P):zP===null?cme:cme+"[]",nme(fme))}),!1}return isVisitable(sme)?!0:(kh.append(renderKey(lme,cme,$P),nme(sme)),!1)}const ime=[],ame=Object.assign(predicates,{defaultVisitor:rme,convertValue:nme,isVisitable});function ome(sme,cme){if(!utils$1.isUndefined(sme)){if(ime.indexOf(sme)!==-1)throw Error("Circular reference detected in "+cme.join("."));ime.push(sme),utils$1.forEach(sme,function(ume,dme){(!(utils$1.isUndefined(ume)||ume===null)&&$_.call(kh,ume,utils$1.isString(dme)?dme.trim():dme,cme,ame))===!0&&ome(ume,cme?cme.concat(dme):[dme])}),ime.pop()}}if(!utils$1.isObject(Ff))throw new TypeError("data must be an object");return ome(Ff),kh}function encode$1(Ff){const kh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(Ff).replace(/[!'()~]|%20|%00/g,function(B_){return kh[B_]})}function AxiosURLSearchParams(Ff,kh){this._pairs=[],Ff&&toFormData(Ff,this,kh)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(kh,x_){this._pairs.push([kh,x_])},prototype.toString=function(kh){const x_=kh?function(B_){return kh.call(this,B_,encode$1)}:encode$1;return this._pairs.map(function($_){return x_($_[0])+"="+x_($_[1])},"").join("&")};function encode(Ff){return encodeURIComponent(Ff).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(Ff,kh,x_){if(!kh)return Ff;const B_=x_&&x_.encode||encode,$_=x_&&x_.serialize;let $P;if($_?$P=$_(kh,x_):$P=utils$1.isURLSearchParams(kh)?kh.toString():new AxiosURLSearchParams(kh,x_).toString(B_),$P){const zP=Ff.indexOf("#");zP!==-1&&(Ff=Ff.slice(0,zP)),Ff+=(Ff.indexOf("?")===-1?"?":"&")+$P}return Ff}class InterceptorManager{constructor(){this.handlers=[]}use(kh,x_,B_){return this.handlers.push({fulfilled:kh,rejected:x_,synchronous:B_?B_.synchronous:!1,runWhen:B_?B_.runWhen:null}),this.handlers.length-1}eject(kh){this.handlers[kh]&&(this.handlers[kh]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(kh){utils$1.forEach(this.handlers,function(B_){B_!==null&&kh(B_)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(Ff,kh){return toFormData(Ff,new platform.classes.URLSearchParams,Object.assign({visitor:function(x_,B_,$_,$P){return platform.isNode&&utils$1.isBuffer(x_)?(this.append(B_,x_.toString("base64")),!1):$P.defaultVisitor.apply(this,arguments)}},kh))}function parsePropPath(Ff){return utils$1.matchAll(/\w+|\[(\w*)]/g,Ff).map(kh=>kh[0]==="[]"?"":kh[1]||kh[0])}function arrayToObject(Ff){const kh={},x_=Object.keys(Ff);let B_;const $_=x_.length;let $P;for(B_=0;B_<$_;B_++)$P=x_[B_],kh[$P]=Ff[$P];return kh}function formDataToJSON(Ff){function kh(x_,B_,$_,$P){let zP=x_[$P++];if(zP==="__proto__")return!0;const eme=Number.isFinite(+zP),tme=$P>=x_.length;return zP=!zP&&utils$1.isArray($_)?$_.length:zP,tme?(utils$1.hasOwnProp($_,zP)?$_[zP]=[$_[zP],B_]:$_[zP]=B_,!eme):((!$_[zP]||!utils$1.isObject($_[zP]))&&($_[zP]=[]),kh(x_,B_,$_[zP],$P)&&utils$1.isArray($_[zP])&&($_[zP]=arrayToObject($_[zP])),!eme)}if(utils$1.isFormData(Ff)&&utils$1.isFunction(Ff.entries)){const x_={};return utils$1.forEachEntry(Ff,(B_,$_)=>{kh(parsePropPath(B_),$_,x_,0)}),x_}return null}function stringifySafely(Ff,kh,x_){if(utils$1.isString(Ff))try{return(kh||JSON.parse)(Ff),utils$1.trim(Ff)}catch(B_){if(B_.name!=="SyntaxError")throw B_}return(x_||JSON.stringify)(Ff)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(kh,x_){const B_=x_.getContentType()||"",$_=B_.indexOf("application/json")>-1,$P=utils$1.isObject(kh);if($P&&utils$1.isHTMLForm(kh)&&(kh=new FormData(kh)),utils$1.isFormData(kh))return $_?JSON.stringify(formDataToJSON(kh)):kh;if(utils$1.isArrayBuffer(kh)||utils$1.isBuffer(kh)||utils$1.isStream(kh)||utils$1.isFile(kh)||utils$1.isBlob(kh)||utils$1.isReadableStream(kh))return kh;if(utils$1.isArrayBufferView(kh))return kh.buffer;if(utils$1.isURLSearchParams(kh))return x_.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),kh.toString();let eme;if($P){if(B_.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(kh,this.formSerializer).toString();if((eme=utils$1.isFileList(kh))||B_.indexOf("multipart/form-data")>-1){const tme=this.env&&this.env.FormData;return toFormData(eme?{"files[]":kh}:kh,tme&&new tme,this.formSerializer)}}return $P||$_?(x_.setContentType("application/json",!1),stringifySafely(kh)):kh}],transformResponse:[function(kh){const x_=this.transitional||defaults$1.transitional,B_=x_&&x_.forcedJSONParsing,$_=this.responseType==="json";if(utils$1.isResponse(kh)||utils$1.isReadableStream(kh))return kh;if(kh&&utils$1.isString(kh)&&(B_&&!this.responseType||$_)){const zP=!(x_&&x_.silentJSONParsing)&&$_;try{return JSON.parse(kh)}catch(eme){if(zP)throw eme.name==="SyntaxError"?AxiosError.from(eme,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):eme}}return kh}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(kh){return kh>=200&&kh<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],Ff=>{defaults$1.headers[Ff]={}});const defaults$2=defaults$1,ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=Ff=>{const kh={};let x_,B_,$_;return Ff&&Ff.split(`
|
|
143
143
|
`).forEach(function(zP){$_=zP.indexOf(":"),x_=zP.substring(0,$_).trim().toLowerCase(),B_=zP.substring($_+1).trim(),!(!x_||kh[x_]&&ignoreDuplicateOf[x_])&&(x_==="set-cookie"?kh[x_]?kh[x_].push(B_):kh[x_]=[B_]:kh[x_]=kh[x_]?kh[x_]+", "+B_:B_)}),kh},$internals=Symbol("internals");function normalizeHeader(Ff){return Ff&&String(Ff).trim().toLowerCase()}function normalizeValue(Ff){return Ff===!1||Ff==null?Ff:utils$1.isArray(Ff)?Ff.map(normalizeValue):String(Ff)}function parseTokens(Ff){const kh=Object.create(null),x_=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B_;for(;B_=x_.exec(Ff);)kh[B_[1]]=B_[2];return kh}const isValidHeaderName=Ff=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Ff.trim());function matchHeaderValue(Ff,kh,x_,B_,$_){if(utils$1.isFunction(B_))return B_.call(this,kh,x_);if($_&&(kh=x_),!!utils$1.isString(kh)){if(utils$1.isString(B_))return kh.indexOf(B_)!==-1;if(utils$1.isRegExp(B_))return B_.test(kh)}}function formatHeader(Ff){return Ff.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(kh,x_,B_)=>x_.toUpperCase()+B_)}function buildAccessors(Ff,kh){const x_=utils$1.toCamelCase(" "+kh);["get","set","has"].forEach(B_=>{Object.defineProperty(Ff,B_+x_,{value:function($_,$P,zP){return this[B_].call(this,kh,$_,$P,zP)},configurable:!0})})}class AxiosHeaders{constructor(kh){kh&&this.set(kh)}set(kh,x_,B_){const $_=this;function $P(eme,tme,nme){const rme=normalizeHeader(tme);if(!rme)throw new Error("header name must be a non-empty string");const ime=utils$1.findKey($_,rme);(!ime||$_[ime]===void 0||nme===!0||nme===void 0&&$_[ime]!==!1)&&($_[ime||tme]=normalizeValue(eme))}const zP=(eme,tme)=>utils$1.forEach(eme,(nme,rme)=>$P(nme,rme,tme));if(utils$1.isPlainObject(kh)||kh instanceof this.constructor)zP(kh,x_);else if(utils$1.isString(kh)&&(kh=kh.trim())&&!isValidHeaderName(kh))zP(parseHeaders(kh),x_);else if(utils$1.isHeaders(kh))for(const[eme,tme]of kh.entries())$P(tme,eme,B_);else kh!=null&&$P(x_,kh,B_);return this}get(kh,x_){if(kh=normalizeHeader(kh),kh){const B_=utils$1.findKey(this,kh);if(B_){const $_=this[B_];if(!x_)return $_;if(x_===!0)return parseTokens($_);if(utils$1.isFunction(x_))return x_.call(this,$_,B_);if(utils$1.isRegExp(x_))return x_.exec($_);throw new TypeError("parser must be boolean|regexp|function")}}}has(kh,x_){if(kh=normalizeHeader(kh),kh){const B_=utils$1.findKey(this,kh);return!!(B_&&this[B_]!==void 0&&(!x_||matchHeaderValue(this,this[B_],B_,x_)))}return!1}delete(kh,x_){const B_=this;let $_=!1;function $P(zP){if(zP=normalizeHeader(zP),zP){const eme=utils$1.findKey(B_,zP);eme&&(!x_||matchHeaderValue(B_,B_[eme],eme,x_))&&(delete B_[eme],$_=!0)}}return utils$1.isArray(kh)?kh.forEach($P):$P(kh),$_}clear(kh){const x_=Object.keys(this);let B_=x_.length,$_=!1;for(;B_--;){const $P=x_[B_];(!kh||matchHeaderValue(this,this[$P],$P,kh,!0))&&(delete this[$P],$_=!0)}return $_}normalize(kh){const x_=this,B_={};return utils$1.forEach(this,($_,$P)=>{const zP=utils$1.findKey(B_,$P);if(zP){x_[zP]=normalizeValue($_),delete x_[$P];return}const eme=kh?formatHeader($P):String($P).trim();eme!==$P&&delete x_[$P],x_[eme]=normalizeValue($_),B_[eme]=!0}),this}concat(...kh){return this.constructor.concat(this,...kh)}toJSON(kh){const x_=Object.create(null);return utils$1.forEach(this,(B_,$_)=>{B_!=null&&B_!==!1&&(x_[$_]=kh&&utils$1.isArray(B_)?B_.join(", "):B_)}),x_}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([kh,x_])=>kh+": "+x_).join(`
|
|
144
144
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(kh){return kh instanceof this?kh:new this(kh)}static concat(kh,...x_){const B_=new this(kh);return x_.forEach($_=>B_.set($_)),B_}static accessor(kh){const B_=(this[$internals]=this[$internals]={accessors:{}}).accessors,$_=this.prototype;function $P(zP){const eme=normalizeHeader(zP);B_[eme]||(buildAccessors($_,zP),B_[eme]=!0)}return utils$1.isArray(kh)?kh.forEach($P):$P(kh),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:Ff},kh)=>{let x_=kh[0].toUpperCase()+kh.slice(1);return{get:()=>Ff,set(B_){this[x_]=B_}}}),utils$1.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(Ff,kh){const x_=this||defaults$2,B_=kh||x_,$_=AxiosHeaders$1.from(B_.headers);let $P=B_.data;return utils$1.forEach(Ff,function(eme){$P=eme.call(x_,$P,$_.normalize(),kh?kh.status:void 0)}),$_.normalize(),$P}function isCancel(Ff){return!!(Ff&&Ff.__CANCEL__)}function CanceledError(Ff,kh,x_){AxiosError.call(this,Ff??"canceled",AxiosError.ERR_CANCELED,kh,x_),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(Ff,kh,x_){const B_=x_.config.validateStatus;!x_.status||!B_||B_(x_.status)?Ff(x_):kh(new AxiosError("Request failed with status code "+x_.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(x_.status/100)-4],x_.config,x_.request,x_))}function parseProtocol(Ff){const kh=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Ff);return kh&&kh[1]||""}function speedometer(Ff,kh){Ff=Ff||10;const x_=new Array(Ff),B_=new Array(Ff);let $_=0,$P=0,zP;return kh=kh!==void 0?kh:1e3,function(tme){const nme=Date.now(),rme=B_[$P];zP||(zP=nme),x_[$_]=tme,B_[$_]=nme;let ime=$P,ame=0;for(;ime!==$_;)ame+=x_[ime++],ime=ime%Ff;if($_=($_+1)%Ff,$_===$P&&($P=($P+1)%Ff),nme-zP<kh)return;const ome=rme&&nme-rme;return ome?Math.round(ame*1e3/ome):void 0}}function throttle(Ff,kh){let x_=0,B_=1e3/kh,$_,$P;const zP=(nme,rme=Date.now())=>{x_=rme,$_=null,$P&&(clearTimeout($P),$P=null),Ff.apply(null,nme)};return[(...nme)=>{const rme=Date.now(),ime=rme-x_;ime>=B_?zP(nme,rme):($_=nme,$P||($P=setTimeout(()=>{$P=null,zP($_)},B_-ime)))},()=>$_&&zP($_)]}const progressEventReducer=(Ff,kh,x_=3)=>{let B_=0;const $_=speedometer(50,250);return throttle($P=>{const zP=$P.loaded,eme=$P.lengthComputable?$P.total:void 0,tme=zP-B_,nme=$_(tme),rme=zP<=eme;B_=zP;const ime={loaded:zP,total:eme,progress:eme?zP/eme:void 0,bytes:tme,rate:nme||void 0,estimated:nme&&eme&&rme?(eme-zP)/nme:void 0,event:$P,lengthComputable:eme!=null,[kh?"download":"upload"]:!0};Ff(ime)},x_)},progressEventDecorator=(Ff,kh)=>{const x_=Ff!=null;return[B_=>kh[0]({lengthComputable:x_,total:Ff,loaded:B_}),kh[1]]},asyncDecorator=Ff=>(...kh)=>utils$1.asap(()=>Ff(...kh)),isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const kh=platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent),x_=document.createElement("a");let B_;function $_($P){let zP=$P;return kh&&(x_.setAttribute("href",zP),zP=x_.href),x_.setAttribute("href",zP),{href:x_.href,protocol:x_.protocol?x_.protocol.replace(/:$/,""):"",host:x_.host,search:x_.search?x_.search.replace(/^\?/,""):"",hash:x_.hash?x_.hash.replace(/^#/,""):"",hostname:x_.hostname,port:x_.port,pathname:x_.pathname.charAt(0)==="/"?x_.pathname:"/"+x_.pathname}}return B_=$_(window.location.href),function(zP){const eme=utils$1.isString(zP)?$_(zP):zP;return eme.protocol===B_.protocol&&eme.host===B_.host}}():function(){return function(){return!0}}(),cookies=platform.hasStandardBrowserEnv?{write(Ff,kh,x_,B_,$_,$P){const zP=[Ff+"="+encodeURIComponent(kh)];utils$1.isNumber(x_)&&zP.push("expires="+new Date(x_).toGMTString()),utils$1.isString(B_)&&zP.push("path="+B_),utils$1.isString($_)&&zP.push("domain="+$_),$P===!0&&zP.push("secure"),document.cookie=zP.join("; ")},read(Ff){const kh=document.cookie.match(new RegExp("(^|;\\s*)("+Ff+")=([^;]*)"));return kh?decodeURIComponent(kh[3]):null},remove(Ff){this.write(Ff,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(Ff){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(Ff)}function combineURLs(Ff,kh){return kh?Ff.replace(/\/?\/$/,"")+"/"+kh.replace(/^\/+/,""):Ff}function buildFullPath(Ff,kh){return Ff&&!isAbsoluteURL(kh)?combineURLs(Ff,kh):kh}const headersToObject=Ff=>Ff instanceof AxiosHeaders$1?{...Ff}:Ff;function mergeConfig(Ff,kh){kh=kh||{};const x_={};function B_(nme,rme,ime){return utils$1.isPlainObject(nme)&&utils$1.isPlainObject(rme)?utils$1.merge.call({caseless:ime},nme,rme):utils$1.isPlainObject(rme)?utils$1.merge({},rme):utils$1.isArray(rme)?rme.slice():rme}function $_(nme,rme,ime){if(utils$1.isUndefined(rme)){if(!utils$1.isUndefined(nme))return B_(void 0,nme,ime)}else return B_(nme,rme,ime)}function $P(nme,rme){if(!utils$1.isUndefined(rme))return B_(void 0,rme)}function zP(nme,rme){if(utils$1.isUndefined(rme)){if(!utils$1.isUndefined(nme))return B_(void 0,nme)}else return B_(void 0,rme)}function eme(nme,rme,ime){if(ime in kh)return B_(nme,rme);if(ime in Ff)return B_(void 0,nme)}const tme={url:$P,method:$P,data:$P,baseURL:zP,transformRequest:zP,transformResponse:zP,paramsSerializer:zP,timeout:zP,timeoutMessage:zP,withCredentials:zP,withXSRFToken:zP,adapter:zP,responseType:zP,xsrfCookieName:zP,xsrfHeaderName:zP,onUploadProgress:zP,onDownloadProgress:zP,decompress:zP,maxContentLength:zP,maxBodyLength:zP,beforeRedirect:zP,transport:zP,httpAgent:zP,httpsAgent:zP,cancelToken:zP,socketPath:zP,responseEncoding:zP,validateStatus:eme,headers:(nme,rme)=>$_(headersToObject(nme),headersToObject(rme),!0)};return utils$1.forEach(Object.keys(Object.assign({},Ff,kh)),function(rme){const ime=tme[rme]||$_,ame=ime(Ff[rme],kh[rme],rme);utils$1.isUndefined(ame)&&ime!==eme||(x_[rme]=ame)}),x_}const resolveConfig=Ff=>{const kh=mergeConfig({},Ff);let{data:x_,withXSRFToken:B_,xsrfHeaderName:$_,xsrfCookieName:$P,headers:zP,auth:eme}=kh;kh.headers=zP=AxiosHeaders$1.from(zP),kh.url=buildURL(buildFullPath(kh.baseURL,kh.url),Ff.params,Ff.paramsSerializer),eme&&zP.set("Authorization","Basic "+btoa((eme.username||"")+":"+(eme.password?unescape(encodeURIComponent(eme.password)):"")));let tme;if(utils$1.isFormData(x_)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)zP.setContentType(void 0);else if((tme=zP.getContentType())!==!1){const[nme,...rme]=tme?tme.split(";").map(ime=>ime.trim()).filter(Boolean):[];zP.setContentType([nme||"multipart/form-data",...rme].join("; "))}}if(platform.hasStandardBrowserEnv&&(B_&&utils$1.isFunction(B_)&&(B_=B_(kh)),B_||B_!==!1&&isURLSameOrigin(kh.url))){const nme=$_&&$P&&cookies.read($P);nme&&zP.set($_,nme)}return kh},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(Ff){return new Promise(function(x_,B_){const $_=resolveConfig(Ff);let $P=$_.data;const zP=AxiosHeaders$1.from($_.headers).normalize();let{responseType:eme,onUploadProgress:tme,onDownloadProgress:nme}=$_,rme,ime,ame,ome,sme;function cme(){ome&&ome(),sme&&sme(),$_.cancelToken&&$_.cancelToken.unsubscribe(rme),$_.signal&&$_.signal.removeEventListener("abort",rme)}let lme=new XMLHttpRequest;lme.open($_.method.toUpperCase(),$_.url,!0),lme.timeout=$_.timeout;function ume(){if(!lme)return;const fme=AxiosHeaders$1.from("getAllResponseHeaders"in lme&&lme.getAllResponseHeaders()),hme={data:!eme||eme==="text"||eme==="json"?lme.responseText:lme.response,status:lme.status,statusText:lme.statusText,headers:fme,config:Ff,request:lme};settle(function(gme){x_(gme),cme()},function(gme){B_(gme),cme()},hme),lme=null}"onloadend"in lme?lme.onloadend=ume:lme.onreadystatechange=function(){!lme||lme.readyState!==4||lme.status===0&&!(lme.responseURL&&lme.responseURL.indexOf("file:")===0)||setTimeout(ume)},lme.onabort=function(){lme&&(B_(new AxiosError("Request aborted",AxiosError.ECONNABORTED,Ff,lme)),lme=null)},lme.onerror=function(){B_(new AxiosError("Network Error",AxiosError.ERR_NETWORK,Ff,lme)),lme=null},lme.ontimeout=function(){let pme=$_.timeout?"timeout of "+$_.timeout+"ms exceeded":"timeout exceeded";const hme=$_.transitional||transitionalDefaults;$_.timeoutErrorMessage&&(pme=$_.timeoutErrorMessage),B_(new AxiosError(pme,hme.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,Ff,lme)),lme=null},$P===void 0&&zP.setContentType(null),"setRequestHeader"in lme&&utils$1.forEach(zP.toJSON(),function(pme,hme){lme.setRequestHeader(hme,pme)}),utils$1.isUndefined($_.withCredentials)||(lme.withCredentials=!!$_.withCredentials),eme&&eme!=="json"&&(lme.responseType=$_.responseType),nme&&([ame,sme]=progressEventReducer(nme,!0),lme.addEventListener("progress",ame)),tme&&lme.upload&&([ime,ome]=progressEventReducer(tme),lme.upload.addEventListener("progress",ime),lme.upload.addEventListener("loadend",ome)),($_.cancelToken||$_.signal)&&(rme=fme=>{lme&&(B_(!fme||fme.type?new CanceledError(null,Ff,lme):fme),lme.abort(),lme=null)},$_.cancelToken&&$_.cancelToken.subscribe(rme),$_.signal&&($_.signal.aborted?rme():$_.signal.addEventListener("abort",rme)));const dme=parseProtocol($_.url);if(dme&&platform.protocols.indexOf(dme)===-1){B_(new AxiosError("Unsupported protocol "+dme+":",AxiosError.ERR_BAD_REQUEST,Ff));return}lme.send($P||null)})},composeSignals=(Ff,kh)=>{const{length:x_}=Ff=Ff?Ff.filter(Boolean):[];if(kh||x_){let B_=new AbortController,$_;const $P=function(nme){if(!$_){$_=!0,eme();const rme=nme instanceof Error?nme:this.reason;B_.abort(rme instanceof AxiosError?rme:new CanceledError(rme instanceof Error?rme.message:rme))}};let zP=kh&&setTimeout(()=>{zP=null,$P(new AxiosError(`timeout ${kh} of ms exceeded`,AxiosError.ETIMEDOUT))},kh);const eme=()=>{Ff&&(zP&&clearTimeout(zP),zP=null,Ff.forEach(nme=>{nme.unsubscribe?nme.unsubscribe($P):nme.removeEventListener("abort",$P)}),Ff=null)};Ff.forEach(nme=>nme.addEventListener("abort",$P));const{signal:tme}=B_;return tme.unsubscribe=()=>utils$1.asap(eme),tme}},composeSignals$1=composeSignals,streamChunk=function*(Ff,kh){let x_=Ff.byteLength;if(!kh||x_<kh){yield Ff;return}let B_=0,$_;for(;B_<x_;)$_=B_+kh,yield Ff.slice(B_,$_),B_=$_},readBytes=async function*(Ff,kh){for await(const x_ of readStream(Ff))yield*streamChunk(x_,kh)},readStream=async function*(Ff){if(Ff[Symbol.asyncIterator]){yield*Ff;return}const kh=Ff.getReader();try{for(;;){const{done:x_,value:B_}=await kh.read();if(x_)break;yield B_}}finally{await kh.cancel()}},trackStream=(Ff,kh,x_,B_)=>{const $_=readBytes(Ff,kh);let $P=0,zP,eme=tme=>{zP||(zP=!0,B_&&B_(tme))};return new ReadableStream({async pull(tme){try{const{done:nme,value:rme}=await $_.next();if(nme){eme(),tme.close();return}let ime=rme.byteLength;if(x_){let ame=$P+=ime;x_(ame)}tme.enqueue(new Uint8Array(rme))}catch(nme){throw eme(nme),nme}},cancel(tme){return eme(tme),$_.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(Ff=>kh=>Ff.encode(kh))(new TextEncoder):async Ff=>new Uint8Array(await new Response(Ff).arrayBuffer())),test=(Ff,...kh)=>{try{return!!Ff(...kh)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let Ff=!1;const kh=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return Ff=!0,"half"}}).headers.has("Content-Type");return Ff&&!kh}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(Ff=>Ff.body)};isFetchSupported&&(Ff=>{["text","arrayBuffer","blob","formData","stream"].forEach(kh=>{!resolvers[kh]&&(resolvers[kh]=utils$1.isFunction(Ff[kh])?x_=>x_[kh]():(x_,B_)=>{throw new AxiosError(`Response type '${kh}' is not supported`,AxiosError.ERR_NOT_SUPPORT,B_)})})})(new Response);const getBodyLength=async Ff=>{if(Ff==null)return 0;if(utils$1.isBlob(Ff))return Ff.size;if(utils$1.isSpecCompliantForm(Ff))return(await new Request(platform.origin,{method:"POST",body:Ff}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(Ff)||utils$1.isArrayBuffer(Ff))return Ff.byteLength;if(utils$1.isURLSearchParams(Ff)&&(Ff=Ff+""),utils$1.isString(Ff))return(await encodeText(Ff)).byteLength},resolveBodyLength=async(Ff,kh)=>{const x_=utils$1.toFiniteNumber(Ff.getContentLength());return x_??getBodyLength(kh)},fetchAdapter=isFetchSupported&&(async Ff=>{let{url:kh,method:x_,data:B_,signal:$_,cancelToken:$P,timeout:zP,onDownloadProgress:eme,onUploadProgress:tme,responseType:nme,headers:rme,withCredentials:ime="same-origin",fetchOptions:ame}=resolveConfig(Ff);nme=nme?(nme+"").toLowerCase():"text";let ome=composeSignals$1([$_,$P&&$P.toAbortSignal()],zP),sme;const cme=ome&&ome.unsubscribe&&(()=>{ome.unsubscribe()});let lme;try{if(tme&&supportsRequestStream&&x_!=="get"&&x_!=="head"&&(lme=await resolveBodyLength(rme,B_))!==0){let hme=new Request(kh,{method:"POST",body:B_,duplex:"half"}),mme;if(utils$1.isFormData(B_)&&(mme=hme.headers.get("content-type"))&&rme.setContentType(mme),hme.body){const[gme,Eme]=progressEventDecorator(lme,progressEventReducer(asyncDecorator(tme)));B_=trackStream(hme.body,DEFAULT_CHUNK_SIZE,gme,Eme)}}utils$1.isString(ime)||(ime=ime?"include":"omit");const ume="credentials"in Request.prototype;sme=new Request(kh,{...ame,signal:ome,method:x_.toUpperCase(),headers:rme.normalize().toJSON(),body:B_,duplex:"half",credentials:ume?ime:void 0});let dme=await fetch(sme);const fme=supportsResponseStream&&(nme==="stream"||nme==="response");if(supportsResponseStream&&(eme||fme&&cme)){const hme={};["status","statusText","headers"].forEach(_me=>{hme[_me]=dme[_me]});const mme=utils$1.toFiniteNumber(dme.headers.get("content-length")),[gme,Eme]=eme&&progressEventDecorator(mme,progressEventReducer(asyncDecorator(eme),!0))||[];dme=new Response(trackStream(dme.body,DEFAULT_CHUNK_SIZE,gme,()=>{Eme&&Eme(),cme&&cme()}),hme)}nme=nme||"text";let pme=await resolvers[utils$1.findKey(resolvers,nme)||"text"](dme,Ff);return!fme&&cme&&cme(),await new Promise((hme,mme)=>{settle(hme,mme,{data:pme,headers:AxiosHeaders$1.from(dme.headers),status:dme.status,statusText:dme.statusText,config:Ff,request:sme})})}catch(ume){throw cme&&cme(),ume&&ume.name==="TypeError"&&/fetch/i.test(ume.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,Ff,sme),{cause:ume.cause||ume}):AxiosError.from(ume,ume&&ume.code,Ff,sme)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(Ff,kh)=>{if(Ff){try{Object.defineProperty(Ff,"name",{value:kh})}catch{}Object.defineProperty(Ff,"adapterName",{value:kh})}});const renderReason=Ff=>`- ${Ff}`,isResolvedHandle=Ff=>utils$1.isFunction(Ff)||Ff===null||Ff===!1,adapters={getAdapter:Ff=>{Ff=utils$1.isArray(Ff)?Ff:[Ff];const{length:kh}=Ff;let x_,B_;const $_={};for(let $P=0;$P<kh;$P++){x_=Ff[$P];let zP;if(B_=x_,!isResolvedHandle(x_)&&(B_=knownAdapters[(zP=String(x_)).toLowerCase()],B_===void 0))throw new AxiosError(`Unknown adapter '${zP}'`);if(B_)break;$_[zP||"#"+$P]=B_}if(!B_){const $P=Object.entries($_).map(([eme,tme])=>`adapter ${eme} `+(tme===!1?"is not supported by the environment":"is not available in the build"));let zP=kh?$P.length>1?`since :
|
|
145
145
|
`+$P.map(renderReason).join(`
|
|
146
146
|
`):" "+renderReason($P[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+zP,"ERR_NOT_SUPPORT")}return B_},adapters:knownAdapters};function throwIfCancellationRequested(Ff){if(Ff.cancelToken&&Ff.cancelToken.throwIfRequested(),Ff.signal&&Ff.signal.aborted)throw new CanceledError(null,Ff)}function dispatchRequest(Ff){return throwIfCancellationRequested(Ff),Ff.headers=AxiosHeaders$1.from(Ff.headers),Ff.data=transformData.call(Ff,Ff.transformRequest),["post","put","patch"].indexOf(Ff.method)!==-1&&Ff.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(Ff.adapter||defaults$2.adapter)(Ff).then(function(B_){return throwIfCancellationRequested(Ff),B_.data=transformData.call(Ff,Ff.transformResponse,B_),B_.headers=AxiosHeaders$1.from(B_.headers),B_},function(B_){return isCancel(B_)||(throwIfCancellationRequested(Ff),B_&&B_.response&&(B_.response.data=transformData.call(Ff,Ff.transformResponse,B_.response),B_.response.headers=AxiosHeaders$1.from(B_.response.headers))),Promise.reject(B_)})}const VERSION="1.7.7",validators$1={};["object","boolean","number","function","string","symbol"].forEach((Ff,kh)=>{validators$1[Ff]=function(B_){return typeof B_===Ff||"a"+(kh<1?"n ":" ")+Ff}});const deprecatedWarnings={};validators$1.transitional=function(kh,x_,B_){function $_($P,zP){return"[Axios v"+VERSION+"] Transitional option '"+$P+"'"+zP+(B_?". "+B_:"")}return($P,zP,eme)=>{if(kh===!1)throw new AxiosError($_(zP," has been removed"+(x_?" in "+x_:"")),AxiosError.ERR_DEPRECATED);return x_&&!deprecatedWarnings[zP]&&(deprecatedWarnings[zP]=!0,console.warn($_(zP," has been deprecated since v"+x_+" and will be removed in the near future"))),kh?kh($P,zP,eme):!0}};function assertOptions(Ff,kh,x_){if(typeof Ff!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const B_=Object.keys(Ff);let $_=B_.length;for(;$_-- >0;){const $P=B_[$_],zP=kh[$P];if(zP){const eme=Ff[$P],tme=eme===void 0||zP(eme,$P,Ff);if(tme!==!0)throw new AxiosError("option "+$P+" must be "+tme,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(x_!==!0)throw new AxiosError("Unknown option "+$P,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(kh){this.defaults=kh,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(kh,x_){try{return await this._request(kh,x_)}catch(B_){if(B_ instanceof Error){let $_;Error.captureStackTrace?Error.captureStackTrace($_={}):$_=new Error;const $P=$_.stack?$_.stack.replace(/^.+\n/,""):"";try{B_.stack?$P&&!String(B_.stack).endsWith($P.replace(/^.+\n.+\n/,""))&&(B_.stack+=`
|
|
147
|
-
`+$P):B_.stack=$P}catch{}}throw B_}}_request(kh,x_){typeof kh=="string"?(x_=x_||{},x_.url=kh):x_=kh||{},x_=mergeConfig(this.defaults,x_);const{transitional:B_,paramsSerializer:$_,headers:$P}=x_;B_!==void 0&&validator.assertOptions(B_,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),$_!=null&&(utils$1.isFunction($_)?x_.paramsSerializer={serialize:$_}:validator.assertOptions($_,{encode:validators.function,serialize:validators.function},!0)),x_.method=(x_.method||this.defaults.method||"get").toLowerCase();let zP=$P&&utils$1.merge($P.common,$P[x_.method]);$P&&utils$1.forEach(["delete","get","head","post","put","patch","common"],sme=>{delete $P[sme]}),x_.headers=AxiosHeaders$1.concat(zP,$P);const eme=[];let tme=!0;this.interceptors.request.forEach(function(cme){typeof cme.runWhen=="function"&&cme.runWhen(x_)===!1||(tme=tme&&cme.synchronous,eme.unshift(cme.fulfilled,cme.rejected))});const nme=[];this.interceptors.response.forEach(function(cme){nme.push(cme.fulfilled,cme.rejected)});let rme,ime=0,ame;if(!tme){const sme=[dispatchRequest.bind(this),void 0];for(sme.unshift.apply(sme,eme),sme.push.apply(sme,nme),ame=sme.length,rme=Promise.resolve(x_);ime<ame;)rme=rme.then(sme[ime++],sme[ime++]);return rme}ame=eme.length;let ome=x_;for(ime=0;ime<ame;){const sme=eme[ime++],cme=eme[ime++];try{ome=sme(ome)}catch(lme){cme.call(this,lme);break}}try{rme=dispatchRequest.call(this,ome)}catch(sme){return Promise.reject(sme)}for(ime=0,ame=nme.length;ime<ame;)rme=rme.then(nme[ime++],nme[ime++]);return rme}getUri(kh){kh=mergeConfig(this.defaults,kh);const x_=buildFullPath(kh.baseURL,kh.url);return buildURL(x_,kh.params,kh.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(kh){Axios.prototype[kh]=function(x_,B_){return this.request(mergeConfig(B_||{},{method:kh,url:x_,data:(B_||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(kh){function x_(B_){return function($P,zP,eme){return this.request(mergeConfig(eme||{},{method:kh,headers:B_?{"Content-Type":"multipart/form-data"}:{},url:$P,data:zP}))}}Axios.prototype[kh]=x_(),Axios.prototype[kh+"Form"]=x_(!0)});const Axios$1=Axios;class CancelToken{constructor(kh){if(typeof kh!="function")throw new TypeError("executor must be a function.");let x_;this.promise=new Promise(function($P){x_=$P});const B_=this;this.promise.then($_=>{if(!B_._listeners)return;let $P=B_._listeners.length;for(;$P-- >0;)B_._listeners[$P]($_);B_._listeners=null}),this.promise.then=$_=>{let $P;const zP=new Promise(eme=>{B_.subscribe(eme),$P=eme}).then($_);return zP.cancel=function(){B_.unsubscribe($P)},zP},kh(function($P,zP,eme){B_.reason||(B_.reason=new CanceledError($P,zP,eme),x_(B_.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(kh){if(this.reason){kh(this.reason);return}this._listeners?this._listeners.push(kh):this._listeners=[kh]}unsubscribe(kh){if(!this._listeners)return;const x_=this._listeners.indexOf(kh);x_!==-1&&this._listeners.splice(x_,1)}toAbortSignal(){const kh=new AbortController,x_=B_=>{kh.abort(B_)};return this.subscribe(x_),kh.signal.unsubscribe=()=>this.unsubscribe(x_),kh.signal}static source(){let kh;return{token:new CancelToken(function($_){kh=$_}),cancel:kh}}}const CancelToken$1=CancelToken;function spread(Ff){return function(x_){return Ff.apply(null,x_)}}function isAxiosError(Ff){return utils$1.isObject(Ff)&&Ff.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([Ff,kh])=>{HttpStatusCode[kh]=Ff});const HttpStatusCode$1=HttpStatusCode;function createInstance(Ff){const kh=new Axios$1(Ff),x_=bind(Axios$1.prototype.request,kh);return utils$1.extend(x_,Axios$1.prototype,kh,{allOwnKeys:!0}),utils$1.extend(x_,kh,null,{allOwnKeys:!0}),x_.create=function($_){return createInstance(mergeConfig(Ff,$_))},x_}const axios=createInstance(defaults$2);axios.Axios=Axios$1,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(kh){return Promise.all(kh)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=Ff=>formDataToJSON(utils$1.isHTMLForm(Ff)?new FormData(Ff):Ff),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const upload=async Ff=>{try{return(await axios.post(`${Ff==null?void 0:Ff.url}/oss/upload?ext=${Ff==null?void 0:Ff.ext}`,Ff==null?void 0:Ff.file,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(kh){return kh}},base64ToText=Ff=>{try{const kh=atob(Ff),x_=new Uint8Array(kh.length);for(let $_=0;$_<kh.length;$_++)x_[$_]=kh.charCodeAt($_);return new TextDecoder().decode(x_)}catch{return""}},textToBase64=Ff=>{const x_=new TextEncoder().encode(Ff),B_=String.fromCharCode(...x_);return btoa(B_)},getFileSuffix=Ff=>{const kh=Ff.indexOf(".")>-1?Ff.split("."):[];return kh.length>0?kh[kh.length-1]:""},marks={strong:"bold",emphasis:"italic",delete:"strike",link:"link"},toNodeObj=(Ff,kh)=>{var $_,$P,zP,eme,tme,nme,rme,ime,ame;const x_={};x_.type=Ff==null?void 0:Ff.type;const B_=kh?[...kh]:[];switch(Ff==null?void 0:Ff.type){case"break":x_.type="hardBreak";break;case"linkReference":x_.type="paragraph";break;case"text":x_.text=Ff==null?void 0:Ff.value,B_!=null&&B_.length&&(x_.marks=B_);break;case"heading":x_.attrs={level:Ff==null?void 0:Ff.depth};break;case"list":x_.type=Ff!=null&&Ff.ordered?"orderedList":"bulletList";break;case"listItem":($_=Ff.children)!=null&&$_.length||(x_.content=[{type:"paragraph"}]);break;case"thematicBreak":x_.type="horizontalRule";break;case"image":x_.attrs={src:Ff==null?void 0:Ff.url,alt:Ff==null?void 0:Ff.alt,title:Ff==null?void 0:Ff.title},B_!=null&&B_.length&&(x_.marks=B_);break;case"html":x_.type="paragraph",x_.content=[{type:"text",text:Ff==null?void 0:Ff.value}];break;case"code":(Ff==null?void 0:Ff.props)==="active"?(x_.type="active",x_.attrs={language:Ff==null?void 0:Ff.lang,id:JSON.parse(Ff==null?void 0:Ff.value).id}):(Ff==null?void 0:Ff.props)==="exec"?(x_.type="codeBlock",x_.attrs={language:Ff==null?void 0:Ff.lang,exec:!0},x_.content=Ff!=null&&Ff.value?[{type:"text",text:Ff==null?void 0:Ff.value}]:[]):(x_.type="codeBlock",x_.attrs={language:Ff==null?void 0:Ff.lang},x_.content=Ff!=null&&Ff.value?[{type:"text",text:Ff==null?void 0:Ff.value}]:[]);break;case"inlineCode":x_.type="text",x_.text=Ff==null?void 0:Ff.value,x_.marks=[...B_,{type:"code"}];break;case"tableCell":($P=Ff==null?void 0:Ff.children)!=null&&$P.length?((zP=Ff==null?void 0:Ff.children)==null?void 0:zP.length)===1&&((eme=Ff==null?void 0:Ff.children[0])==null?void 0:eme.type)==="text"&&(Ff.children=[{type:"paragraph",children:Ff==null?void 0:Ff.children}]):x_.content=[{type:"paragraph"}];break;case"blockquote":(tme=Ff==null?void 0:Ff.children)!=null&&tme.length||(x_.content=[{type:"paragraph"}]);break;default:{const ome=Object.keys(marks);if(ome!=null&&ome.includes(Ff==null?void 0:Ff.type))if(Ff.type==="link"&&/\.pdf$/i.test(Ff.url))x_.type="pdf",x_.attrs={pdfUrl:Ff==null?void 0:Ff.url};else{const sme={type:marks[Ff==null?void 0:Ff.type]};Ff.type==="link"&&(sme.attrs={href:Ff==null?void 0:Ff.url,target:"_blank",title:Ff==null?void 0:Ff.title});const cme=Ff==null?void 0:Ff.children;(cme==null?void 0:cme.length)===1&&cme[0].type==="text"?(x_.type="text",x_.text=cme[0].value,x_.marks=[...B_,sme]):(x_.type="fragment",B_.push(sme))}}break}if((nme=Ff==null?void 0:Ff.children)!=null&&nme.length)if((Ff==null?void 0:Ff.type)==="paragraph"&&((rme=Ff==null?void 0:Ff.children)==null?void 0:rme.length)===1&&((ime=Ff==null?void 0:Ff.children[0])==null?void 0:ime.type)==="image"){x_.type="image";const ome=Ff==null?void 0:Ff.children[0];x_.attrs={src:ome==null?void 0:ome.url,alt:ome==null?void 0:ome.alt,title:ome==null?void 0:ome.title}}else x_.content=(ame=Ff==null?void 0:Ff.children)==null?void 0:ame.map(ome=>toNodeObj(ome,B_));return x_.type==="text"&&(x_!=null&&x_.content)&&(x_==null||delete x_.content),x_},toEditorJSON=Ff=>{var x_,B_,$_;const kh={};return kh.type="document",(x_=Ff==null?void 0:Ff.children)!=null&&x_.length&&(kh.content=($_=(B_=Ff==null?void 0:Ff.children)==null?void 0:B_.filter($P=>($P==null?void 0:$P.type)!=="definition"&&($P==null?void 0:$P.type)!=="html"))==null?void 0:$_.map($P=>toNodeObj($P))),kh},marksMD={bold:"strong",italic:"emphasis",strike:"delete",link:"link"},toMDNodeObj=(Ff,kh)=>{var $_,$P,zP,eme,tme,nme,rme,ime,ame,ome,sme,cme,lme,ume,dme,fme,pme,hme,mme,gme,Eme,_me,Tme,vme,Ame,Ome,wme,Lme;const x_={};x_.type=Ff==null?void 0:Ff.type;const B_=kh?[...kh]:[];switch(Ff==null?void 0:Ff.type){case"hardBreak":x_.type="break";break;case"text":{const Pme=($_=Ff==null?void 0:Ff.marks)==null?void 0:$_.length;if(!Pme)x_.value=Ff==null?void 0:Ff.text;else if(Pme===1){const Dme=Ff==null?void 0:Ff.marks[0];(Dme==null?void 0:Dme.type)==="code"?(x_.type="inlineCode",x_.value=Ff==null?void 0:Ff.text):(Dme==null?void 0:Dme.type)==="link"?(x_.type="link",x_.url=($P=Dme==null?void 0:Dme.attrs)==null?void 0:$P.href,x_.title=((zP=Dme==null?void 0:Dme.attrs)==null?void 0:zP.title)||"",x_.children=[{type:"text",value:Ff==null?void 0:Ff.text}]):(B_==null?void 0:B_.length)===0&&marksMD[Dme==null?void 0:Dme.type]?(x_.type=marksMD[Dme==null?void 0:Dme.type],x_.children=[{type:"text",value:Ff==null?void 0:Ff.text}]):x_.value=Ff==null?void 0:Ff.text}else for(let Dme=0;Dme<((eme=Ff==null?void 0:Ff.marks)==null?void 0:eme.length);Dme++){const kme=Ff==null?void 0:Ff.marks[Dme];if(!B_.includes(kme==null?void 0:kme.type)&&marksMD[kme==null?void 0:kme.type]){if(x_.type=marksMD[kme==null?void 0:kme.type],x_.children=[{type:"text",value:Ff==null?void 0:Ff.text}],x_.type==="link"){x_.url=(tme=kme==null?void 0:kme.attrs)==null?void 0:tme.href,x_.title=((nme=kme==null?void 0:kme.attrs)==null?void 0:nme.title)||"";break}}else x_.value=Ff==null?void 0:Ff.text}}break;case"fragment":if((rme=Ff==null?void 0:Ff.content)!=null&&rme.length&&((ame=(ime=Ff==null?void 0:Ff.content[0])==null?void 0:ime.marks)!=null&&ame.length)){const Pme=(ome=Ff==null?void 0:Ff.content[0])==null?void 0:ome.marks,Dme=Pme==null?void 0:Pme.find(Vme=>!(B_!=null&&B_.includes(Vme==null?void 0:Vme.type))),kme=Dme==null?void 0:Dme.type;x_.type=marksMD[kme],kme==="link"&&(x_.url=(sme=Dme==null?void 0:Dme.attrs)==null?void 0:sme.href,x_.title=((cme=Dme==null?void 0:Dme.attrs)==null?void 0:cme.title)||""),B_.push(kme)}else x_.type="paragraph";break;case"heading":x_.depth=(lme=Ff==null?void 0:Ff.attrs)==null?void 0:lme.level;break;case"bulletList":x_.type="list",x_.ordered=!1;break;case"orderedList":x_.type="list",x_.ordered=!0;break;case"horizontalRule":x_.type="thematicBreak";break;case"image":B_!=null&&B_.length?(x_.url=(ume=Ff==null?void 0:Ff.attrs)==null?void 0:ume.src,x_.alt=(dme=Ff==null?void 0:Ff.attrs)==null?void 0:dme.alt,x_.title=(fme=Ff==null?void 0:Ff.attrs)==null?void 0:fme.title):(x_.type="paragraph",x_.children=[{type:"image",url:(pme=Ff==null?void 0:Ff.attrs)==null?void 0:pme.src,alt:(hme=Ff==null?void 0:Ff.attrs)==null?void 0:hme.alt,title:(mme=Ff==null?void 0:Ff.attrs)==null?void 0:mme.title}]);break;case"codeBlock":x_.type="code",x_.lang=(gme=Ff==null?void 0:Ff.attrs)==null?void 0:gme.language,x_.value=(Eme=Ff==null?void 0:Ff.content)!=null&&Eme.length?(_me=Ff==null?void 0:Ff.content[0])==null?void 0:_me.text:"",(Tme=Ff==null?void 0:Ff.attrs)!=null&&Tme.exec&&(x_.props="exec");break;case"active":x_.type="code",x_.lang=(vme=Ff==null?void 0:Ff.attrs)==null?void 0:vme.language,x_.value=JSON.stringify({id:(Ame=Ff==null?void 0:Ff.attrs)==null?void 0:Ame.id}),x_.props="active";break;case"pdf":x_.type="paragraph",x_.children=[{type:"link",url:(Ome=Ff==null?void 0:Ff.attrs)==null?void 0:Ome.pdfUrl}];break}return(wme=Ff==null?void 0:Ff.content)!=null&&wme.length&&(x_.children=(Lme=Ff==null?void 0:Ff.content)==null?void 0:Lme.map(Pme=>toMDNodeObj(Pme,B_))),x_.type==="code"&&(x_!=null&&x_.children)&&(x_==null||delete x_.children),x_},toMarkdownJson=Ff=>{var x_,B_;const kh={};return kh.type="root",(x_=Ff==null?void 0:Ff.content)!=null&&x_.length&&(kh.children=(B_=Ff==null?void 0:Ff.content)==null?void 0:B_.map($_=>toMDNodeObj($_))),kh},normalClass$1="tiptap-menu-item-menus-item",lighClass$1="tiptap-menu-item-menus-item tiptap-menu-item-menus-light";function insertParagraph$1(Ff,kh=2){const{state:x_,view:B_}=Ff,{tr:$_,selection:$P}=x_,zP=Ff.schema.nodes.paragraph.create();$_.insert($P.to+kh,zP),B_.dispatch($_)}const Menu=Ff=>{const kh=React.useContext(shareData),{editor:x_,data:B_}=Ff,[$_,$P]=React.useState(null),[zP,eme]=React.useState(null),tme=(B_==null?void 0:B_.pos)+1||0,nme=()=>{x_==null||x_.chain().focus(tme).setParagraph().hideTip().run()},rme=Ome=>{x_==null||x_.chain().focus(tme).setHeading({level:Ome}).hideTip().run()},ime=()=>{const Ome=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);x_!=null&&x_.chain().focus(tme).setCodeBlock().hideTip().run()&&(Ome||insertParagraph$1(x_,1))},ame=()=>{const Ome=document.createElement("input");Ome.type="file",Ome.accept="image/*",Ome.addEventListener("change",wme=>{const Lme=wme.target.files[0],Pme=Lme.size,Dme=10*1024*1024;if(Pme>Dme)antd.message.warning("图片大小不能超过10Mb!");else{const kme=new FormData;kme.append("file",Lme),upload({url:kh==null?void 0:kh.apiUrl,file:kme,ext:Lme==null?void 0:Lme.name}).then(Vme=>{if(Vme!=null&&Vme.url){const Rme=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);x_!=null&&x_.chain().focus(tme).setImage({src:Vme==null?void 0:Vme.url}).hideTip().run()&&(Rme||insertParagraph$1(x_,0))}}).catch(()=>{antd.message.destroy(),antd.message.error("图片上传失败")})}}),Ome.click()},ome=Ome=>{const wme=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);x_!=null&&x_.chain().focus(tme).insertTable({rows:Ome.row,cols:Ome.col,withHeaderRow:!0}).hideTip().run()&&(wme||insertParagraph$1(x_,4*Ome.row*Ome.col+Ome.row*2-2))},sme=(Ome=!1)=>{Ome?x_==null||x_.chain().focus(tme).toggleOrderedList().hideTip().run():x_==null||x_.chain().focus(tme).toggleBulletList().hideTip().run()},cme=()=>{x_==null||x_.chain().focus(tme).showBubbleMenu({from:tme,to:tme}).hideTip().run()},lme=Ome=>{window.postMessage({type:Ome,value:{pos:tme}}),x_==null||x_.commands.hideTip()},ume=(Ome,wme)=>{wme?window.postMessage({type:"AddActiveFromLibrary",value:{type:Ome}}):antd.Modal.warning({title:"暂无权限",content:"暂无创建课程考试权限,如需开通该模块,请联系平台超管(微信:396800448)",centered:!0,okText:"我知道了"}),x_==null||x_.commands.hideTip()},dme=()=>{mme()},fme=()=>{x_==null||x_.chain().focus(tme-1).setHorizontalRule().hideTip().run()},pme=()=>{const Ome=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);x_!=null&&x_.chain().focus(tme).setBlockquote().hideTip().run()&&(Ome||insertParagraph$1(x_))},hme=Ome=>{var wme,Lme;return((Lme=(wme=B_==null?void 0:B_.node)==null?void 0:wme.type)==null?void 0:Lme.name)===Ome},mme=()=>{const Ome=document.createElement("input");Ome.type="file",Ome.accept=".pdf",Ome.addEventListener("change",wme=>{const Lme=wme.target.files[0];if((Lme==null?void 0:Lme.type)!=="application/pdf"){antd.message.destroy(),antd.message.error("仅支持上传.pdf结尾的文件");return}if((Lme==null?void 0:Lme.size)>200*1024*1024){antd.message.destroy(),antd.message.error("上传文件不可超过200MB");return}const Pme=new FormData;Pme.append("file",Lme),upload({url:kh==null?void 0:kh.apiUrl,file:Pme,ext:getFileSuffix(Lme==null?void 0:Lme.name)}).then(Dme=>{var Vme,Rme;const kme=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);(Rme=(Vme=x_==null?void 0:x_.chain().focus(tme))==null?void 0:Vme.setPdf({pdfUrl:Dme==null?void 0:Dme.url}))!=null&&Rme.hideTip().run()&&(kme||insertParagraph$1(x_,1))}).catch(()=>{antd.message.destroy(),antd.message.error("文件上传失败")})}),Ome.click()},gme=Ome=>{var wme,Lme,Pme,Dme;return hme((Lme=(wme=B_==null?void 0:B_.node)==null?void 0:wme.type)==null?void 0:Lme.name)&&((Dme=(Pme=B_==null?void 0:B_.node)==null?void 0:Pme.attrs)==null?void 0:Dme.level)===Ome};React.useEffect(()=>{!$_||!zP||tippy($_,{placement:"right",content:zP,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:500,onTrigger(){$_.classList.add("tiptap-menu-item-list-item-light")},onHide(){$_.classList.remove("tiptap-menu-item-list-item-light")}})},[$_,zP]);const Eme=React.useRef(null),_me=React.useRef(null);React.useEffect(()=>{!Eme.current||!_me.current||tippy(Eme.current,{placement:"right",content:_me.current,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:105,onTrigger(){var Ome;(Ome=Eme.current)==null||Ome.classList.add("tiptap-menu-item-list-item-light")},onHide(){var Ome;(Ome=Eme.current)==null||Ome.classList.remove("tiptap-menu-item-list-item-light")}})},[Eme.current,_me.current]);const Tme=React.useRef(null),vme=React.useRef(null);React.useEffect(()=>{!Tme.current||!vme.current||tippy(Tme.current,{placement:"right",content:vme.current,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:105,onTrigger(){var Ome;(Ome=Tme.current)==null||Ome.classList.add("tiptap-menu-item-list-item-light")},onHide(){var Ome;(Ome=Tme.current)==null||Ome.classList.remove("tiptap-menu-item-list-item-light")}})},[Tme.current,vme.current]);const Ame=window.innerHeight/2-30;return jsxRuntimeExports.jsxs("div",{className:"tiptap-menu tiptap-scroll",style:{maxHeight:Ame,overflowY:"auto"},children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"基础"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-menus",children:[jsxRuntimeExports.jsx("div",{className:hme("paragraph")?lighClass$1:normalClass$1,"data-tip":"正文",onClick:nme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 3.99984V13.9998H7.33398V3.99984H3.33398V2.6665H12.6673V3.99984H8.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(1)?lighClass$1:normalClass$1,"data-tip":"一级标题",onClick:()=>{rme(1)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732V7.33317H7.33398V2.6665H8.66732V13.3332ZM14.001 5.33317V13.3332H12.6677L12.6673 6.8025L11.334 7.15984V5.77984L13.001 5.33317H14.001Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(2)?lighClass$1:normalClass$1,"data-tip":"二级标题",onClick:()=>{rme(2)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2.66536 2.6665V7.33317H7.33203V2.6665H8.66536V13.3332H7.33203V8.6665H2.66536V13.3332H1.33203V2.6665H2.66536ZM12.332 5.33317C13.7128 5.33317 14.832 6.45246 14.832 7.83317C14.832 8.40477 14.6402 8.93157 14.3174 9.35264L14.2188 9.4733L12.0216 11.9998H14.6654V13.3332H9.9987L9.99823 12.2958L13.2125 8.59857C13.3908 8.3937 13.4987 8.12604 13.4987 7.83317C13.4987 7.18884 12.9764 6.6665 12.332 6.6665C11.7199 6.6665 11.2179 7.1379 11.1692 7.7375L11.1654 7.83317H9.83203C9.83203 6.45246 10.9513 5.33317 12.332 5.33317Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(3)?lighClass$1:normalClass$1,"data-tip":"三级标题",onClick:()=>{rme(3)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33317L14.6663 6.6665L12.9963 8.5885C14.0555 8.87877 14.834 9.84837 14.834 10.9998C14.834 12.3806 13.7147 13.4998 12.334 13.4998C11.1167 13.4998 10.1025 12.6298 9.87959 11.4776L11.1887 11.2233C11.2929 11.7607 11.7661 12.1665 12.334 12.1665C12.9783 12.1665 13.5007 11.6442 13.5007 10.9998C13.5007 10.3555 12.9783 9.83317 12.334 9.83317C12.1433 9.83317 11.9633 9.8789 11.8044 9.96004L10.9335 8.92864L12.8996 6.6665H10.0007V5.33317H14.6673ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(4)?lighClass$1:normalClass$1,"data-tip":"四级标题",onClick:()=>{rme(4)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732V7.33317H7.33398V2.6665H8.66732V13.3332ZM14.6673 5.33317V10.6665H15.6673V11.9998H14.6673V13.3332H13.334V11.9998H9.66732V11.1065L13.0007 5.33317H14.6673ZM13.334 7.42184L11.4607 10.6665H13.334V7.42184Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(5)?lighClass$1:normalClass$1,"data-tip":"五级标题",onClick:()=>{rme(5)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33317V6.6665H11.7853L11.4757 8.4237C11.6963 8.36464 11.9281 8.33317 12.1673 8.33317C13.6401 8.33317 14.834 9.5271 14.834 10.9998C14.834 12.4726 13.6401 13.6665 12.1673 13.6665C10.9495 13.6665 9.92245 12.8502 9.60325 11.735L10.8854 11.3678C11.0451 11.9252 11.5586 12.3332 12.1673 12.3332C12.9037 12.3332 13.5007 11.7362 13.5007 10.9998C13.5007 10.2634 12.9037 9.6665 12.1673 9.6665C11.7469 9.6665 11.372 9.86104 11.1276 10.165L9.92085 9.56244L10.6673 5.33317H14.6673ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(6)?lighClass$1:normalClass$1,"data-tip":"六级标题",onClick:()=>{rme(6)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0653 5.33317L12.3333 8.33317C13.8067 8.33317 15.0007 9.5271 15.0007 10.9998C15.0007 12.4726 13.8067 13.6665 12.334 13.6665C10.8613 13.6665 9.66732 12.4726 9.66732 10.9998C9.66732 10.5089 9.79998 10.049 10.0314 9.6539L12.526 5.33317H14.0653ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732ZM12.334 9.6665C11.5976 9.6665 11.0007 10.2634 11.0007 10.9998C11.0007 11.7362 11.5976 12.3332 12.334 12.3332C13.0704 12.3332 13.6673 11.7362 13.6673 10.9998C13.6673 10.2634 13.0704 9.6665 12.334 9.6665Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("bulletList")?lighClass$1:normalClass$1,"data-tip":"无序列表",onClick:()=>{sme(!1)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 2.66683H14V4.00016H5.33333V2.66683ZM3 4.3335C2.44771 4.3335 2 3.88578 2 3.3335C2 2.78121 2.44771 2.3335 3 2.3335C3.55229 2.3335 4 2.78121 4 3.3335C4 3.88578 3.55229 4.3335 3 4.3335ZM3 9.00016C2.44771 9.00016 2 8.55243 2 8.00016C2 7.4479 2.44771 7.00016 3 7.00016C3.55229 7.00016 4 7.4479 4 8.00016C4 8.55243 3.55229 9.00016 3 9.00016ZM3 13.6002C2.44771 13.6002 2 13.1524 2 12.6002C2 12.0479 2.44771 11.6002 3 11.6002C3.55229 11.6002 4 12.0479 4 12.6002C4 13.1524 3.55229 13.6002 3 13.6002ZM5.33333 7.3335H14V8.66683H5.33333V7.3335ZM5.33333 12.0002H14V13.3335H5.33333V12.0002Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("orderedList")?lighClass$1:normalClass$1,"data-tip":"有序列表",onClick:()=>{sme(!0)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 2.66667H14V4H5.33333V2.66667ZM3.33333 2V4H4V4.66667H2V4H2.66667V2.66667H2V2H3.33333ZM2 9.33333V7.66667H3.33333V7.33333H2V6.66667H4V8.33333H2.66667V8.66667H4V9.33333H2ZM3.33333 13H2V12.3333H3.33333V12H2V11.3333H4V14H2V13.3333H3.33333V13ZM5.33333 7.33333H14V8.66667H5.33333V7.33333ZM5.33333 12H14V13.3333H5.33333V12Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("link")?lighClass$1:normalClass$1,"data-tip":"链接",onClick:cme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12.2422 10.357L11.2993 9.41423L12.2422 8.47143C13.5439 7.1697 13.5439 5.05914 12.2422 3.7574C10.9404 2.45565 8.82988 2.45565 7.52815 3.7574L6.58533 4.70021L5.64253 3.7574L6.58533 2.81459C8.40781 0.992142 11.3625 0.992142 13.185 2.81459C15.0074 4.63704 15.0074 7.59183 13.185 9.41423L12.2422 10.357ZM10.3565 12.2427L9.41375 13.1855C7.59135 15.008 4.63655 15.008 2.8141 13.1855C0.991654 11.363 0.991654 8.4083 2.8141 6.58582L3.75691 5.64302L4.69971 6.58582L3.75691 7.52863C2.45516 8.83036 2.45516 10.941 3.75691 12.2427C5.05865 13.5444 7.16921 13.5444 8.47095 12.2427L9.41375 11.2999L10.3565 12.2427ZM9.88515 5.17161L10.8279 6.11442L6.11393 10.8285L5.17112 9.88563L9.88515 5.17161Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("orderedList")?lighClass$1:normalClass$1,"data-tip":"分割线",onClick:fme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.33398 7.3335H2.66732V8.66683H1.33398V7.3335ZM4.00065 7.3335H12.0007V8.66683H4.00065V7.3335ZM13.334 7.3335H14.6673V8.66683H13.334V7.3335Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("orderedList")?lighClass$1:normalClass$1,"data-tip":"引用",onClick:pme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0007 2.00049C14.3689 2.00049 14.6673 2.29897 14.6673 2.66715V12.0005C14.6673 12.3687 14.3689 12.6672 14.0007 12.6672H4.30398L1.33398 15.0005V2.66715C1.33398 2.29897 1.63246 2.00049 2.00065 2.00049H14.0007ZM13.334 3.33382H2.66732V12.2572L3.84287 11.3338H13.334V3.33382ZM7.01085 4.94156L7.30838 5.40075C6.19666 6.00229 6.2161 6.96842 6.2161 7.17682C6.3195 7.16255 6.42803 7.16069 6.53556 7.17069C7.13698 7.22642 7.61105 7.72016 7.61105 8.33382C7.61105 8.97816 7.08872 9.50049 6.44437 9.50049C6.08668 9.50049 5.74464 9.33702 5.52846 9.10749C5.18504 8.74295 5.00065 8.33382 5.00065 7.67062C5.00065 6.50411 5.81948 5.45838 7.01085 4.94156ZM10.3442 4.94156L10.6417 5.40075C9.52998 6.00229 9.54945 6.96842 9.54945 7.17682C9.65285 7.16255 9.76138 7.16069 9.86892 7.17069C10.4703 7.22642 10.9444 7.72016 10.9444 8.33382C10.9444 8.97816 10.4221 9.50049 9.77772 9.50049C9.42005 9.50049 9.07798 9.33702 8.86178 9.10749C8.51838 8.74295 8.33398 8.33382 8.33398 7.67062C8.33398 6.50411 9.15285 5.45838 10.3442 4.94156Z"})})})]})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"常用"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:ime,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M16 8L12.2287 11.7713L11.2859 10.8284L14.1144 8L11.2859 5.17157L12.2287 4.22877L16 8ZM1.88562 8L4.71405 10.8284L3.77123 11.7713L0 8L3.77123 4.22877L4.71405 5.17157L1.88562 8ZM6.52563 14H5.10673L9.4744 2H10.8933L6.52563 14Z",fill:"#14C3FA"})}),jsxRuntimeExports.jsx("span",{children:"可执行代码块"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:ame,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.99518 14C1.63002 14 1.33398 13.7034 1.33398 13.3377V2.66227C1.33398 2.29651 1.63752 2 1.99518 2H14.0061C14.3713 2 14.6673 2.29663 14.6673 2.66227V13.3377C14.6673 13.7035 14.3638 14 14.0061 14H1.99518ZM13.334 10V3.33333H2.66732V12.6667L9.33398 6L13.334 10ZM13.334 11.8856L9.33398 7.8856L4.55294 12.6667H13.334V11.8856ZM5.33398 7.33333C4.5976 7.33333 4.00065 6.7364 4.00065 6C4.00065 5.26362 4.5976 4.66667 5.33398 4.66667C6.07036 4.66667 6.66732 5.26362 6.66732 6C6.66732 6.7364 6.07036 7.33333 5.33398 7.33333Z",fill:"#FBC12D"})}),jsxRuntimeExports.jsx("span",{children:"图片"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:$P,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.33333 6.66667H6.66667V9.33333H9.33333V6.66667ZM10.6667 6.66667V9.33333H12.6667V6.66667H10.6667ZM9.33333 12.6667V10.6667H6.66667V12.6667H9.33333ZM10.6667 12.6667H12.6667V10.6667H10.6667V12.6667ZM9.33333 3.33333H6.66667V5.33333H9.33333V3.33333ZM10.6667 3.33333V5.33333H12.6667V3.33333H10.6667ZM5.33333 6.66667H3.33333V9.33333H5.33333V6.66667ZM5.33333 12.6667V10.6667H3.33333V12.6667H5.33333ZM5.33333 3.33333H3.33333V5.33333H5.33333V3.33333ZM2.66667 2H13.3333C13.7015 2 14 2.29848 14 2.66667V13.3333C14 13.7015 13.7015 14 13.3333 14H2.66667C2.29848 14 2 13.7015 2 13.3333V2.66667C2 2.29848 2.29848 2 2.66667 2Z",fill:"#2DDA9C"})}),jsxRuntimeExports.jsx("span",{children:"表格"}),jsxRuntimeExports.jsx("div",{ref:eme,children:jsxRuntimeExports.jsx(TableSelect,{onClick:ome})})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:dme,children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M2.66667 2.6H7.4V5C7.4 5.68856 7.9781 6.26667 8.66667 6.26667H11.0667V6.76667C11.0667 7.08855 11.3448 7.36667 11.6667 7.36667C11.9886 7.36667 12.2667 7.08855 12.2667 6.76667V4.66667C12.2667 4.50327 12.1865 4.34951 12.1165 4.24453L12.111 4.23629L12.104 4.22929L9.43738 1.56262C9.31201 1.43725 9.14874 1.4 9 1.4H2.66667C1.9781 1.4 1.4 1.9781 1.4 2.66667V13.3333C1.4 14.0219 1.9781 14.6 2.66667 14.6H9.1C9.4219 14.6 9.7 14.3219 9.7 14C9.7 13.6781 9.4219 13.4 9.1 13.4H2.66667C2.6394 13.4 2.62444 13.3913 2.61655 13.3835C2.60866 13.3756 2.6 13.3606 2.6 13.3333V2.66667C2.6 2.6394 2.60866 2.62444 2.61655 2.61655C2.62444 2.60866 2.6394 2.6 2.66667 2.6ZM8.75817 2.6L11.0667 4.94101V5.06667H8.66667C8.6394 5.06667 8.62444 5.05802 8.61655 5.05013C8.60866 5.04223 8.6 5.02727 8.6 5V2.6H8.75817Z",fill:"#3D79EE",stroke:"#3D79EE",strokeWidth:"0.2"}),jsxRuntimeExports.jsx("path",{d:"M5.19934 8.33301C4.99934 8.33301 4.89934 8.36635 4.79934 8.43301C4.69934 8.49968 4.66602 8.63301 4.66602 8.79968V12.033C4.66602 12.133 4.69934 12.233 4.76602 12.333C4.83267 12.3997 4.93267 12.4664 5.09934 12.4664C5.26602 12.4664 5.36602 12.3997 5.43267 12.333C5.49934 12.2664 5.53267 12.1664 5.53267 12.033V11.033H6.03267C6.93267 11.033 7.43267 10.5664 7.43267 9.66635C7.43267 9.23301 7.29934 8.86635 7.06602 8.66635C6.83267 8.43301 6.49934 8.33301 6.03267 8.33301H5.19934ZM6.56602 9.66635C6.56602 9.86635 6.53267 10.033 6.43267 10.0997C6.36602 10.1664 6.19934 10.233 5.99934 10.233H5.49934V9.13301H5.99934C6.19934 9.13301 6.33267 9.16635 6.43267 9.26635C6.53267 9.33301 6.56602 9.46635 6.56602 9.66635ZM10.4327 8.93301C10.2993 8.73301 10.0993 8.59968 9.89934 8.46635C9.66602 8.39968 9.39934 8.33301 9.09934 8.33301H8.13267C7.99934 8.33301 7.86602 8.33301 7.76602 8.46635C7.73267 8.53301 7.69934 8.63301 7.69934 8.76635V11.9997C7.69934 12.133 7.73267 12.233 7.76602 12.2997C7.86602 12.433 7.99934 12.433 8.13267 12.433H9.13267C9.43267 12.433 9.66602 12.3664 9.89934 12.2664C10.0993 12.1664 10.2993 11.9997 10.4327 11.7997C10.566 11.5997 10.666 11.3997 10.7327 11.133C10.7993 10.8997 10.8327 10.633 10.8327 10.3664C10.8327 10.0997 10.7993 9.83301 10.7327 9.59968C10.666 9.36635 10.566 9.13301 10.4327 8.93301ZM9.76602 11.333C9.63267 11.533 9.43267 11.633 9.16602 11.633H8.56602V9.13301H8.99934C9.33267 9.13301 9.59934 9.23301 9.73267 9.43301C9.89934 9.63301 9.96602 9.96635 9.96602 10.3664C9.99934 10.7997 9.89934 11.0997 9.76602 11.333ZM13.2993 8.33301H11.6327C11.4993 8.33301 11.366 8.36635 11.2993 8.43301C11.1993 8.49968 11.166 8.63301 11.166 8.76635V12.033C11.166 12.133 11.1993 12.233 11.266 12.2997C11.3327 12.3997 11.4327 12.433 11.5993 12.433C11.7327 12.433 11.866 12.3997 11.9327 12.2997C11.966 12.233 12.0327 12.1664 12.0327 11.9997V10.6664H13.166C13.366 10.6664 13.5327 10.5664 13.566 10.3997C13.5993 10.2664 13.5993 10.1664 13.566 10.133C13.5327 10.0664 13.466 9.86635 13.166 9.86635H11.9993V9.09968H13.266C13.3993 9.09968 13.4993 9.06635 13.566 9.03301C13.6327 8.99968 13.6993 8.89968 13.6993 8.69968C13.7327 8.49968 13.566 8.33301 13.2993 8.33301Z",fill:"#3D79EE"})]}),jsxRuntimeExports.jsx("span",{children:"PDF"})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"实验活动"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:Eme,children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.11099 7.65258H3.02108C2.20928 7.65258 1.54883 6.99213 1.54883 6.18033V3.09042C1.54883 2.27861 2.20928 1.61816 3.02108 1.61816H6.11099C6.92279 1.61816 7.58324 2.27861 7.58324 3.09042V6.18033C7.58324 6.99213 6.92279 7.65258 6.11099 7.65258ZM3.02108 2.50274C2.69703 2.50274 2.4334 2.76637 2.4334 3.09042V6.18033C2.4334 6.50437 2.69703 6.76801 3.02108 6.76801H6.11099C6.43504 6.76801 6.69867 6.50437 6.69867 6.18033V3.09042C6.69867 2.76637 6.43504 2.50274 6.11099 2.50274H3.02108ZM6.11099 14.3808H3.02108C2.20928 14.3808 1.54883 13.7204 1.54883 12.9086V9.81867C1.54883 9.00687 2.20928 8.34642 3.02108 8.34642H6.11099C6.92279 8.34642 7.58324 9.00687 7.58324 9.81867V12.9086C7.58324 13.7204 6.92279 14.3808 6.11099 14.3808ZM3.02108 9.23099C2.69703 9.23099 2.4334 9.49463 2.4334 9.81867V12.9086C2.4334 13.2326 2.69703 13.4963 3.02108 13.4963H6.11099C6.43504 13.4963 6.69867 13.2326 6.69867 12.9086V9.81867C6.69867 9.49463 6.43504 9.23099 6.11099 9.23099H3.02108ZM9.88078 7.65259H12.9707C13.7825 7.65259 14.443 6.99214 14.4429 6.18033V3.09042C14.4429 2.27862 13.7825 1.61817 12.9707 1.61817H9.88078C9.069 1.61817 8.40853 2.27862 8.40853 3.09042V6.18033C8.40853 6.99214 9.069 7.65259 9.88078 7.65259ZM9.2931 3.09042C9.2931 2.76637 9.55675 2.50274 9.88078 2.50274H12.9707C13.2947 2.50274 13.5584 2.76637 13.5584 3.09042V6.18033C13.5584 6.50438 13.2947 6.76801 12.9707 6.76801H9.88078C9.55675 6.76801 9.2931 6.50438 9.2931 6.18033V3.09042ZM12.9756 14.3812H9.88572C9.07392 14.3812 8.41347 13.7208 8.41347 12.909V9.81911C8.41347 9.00731 9.07392 8.34685 9.88572 8.34685H12.9756C13.3836 8.34685 13.7592 8.50129 14.0332 8.78173C14.3006 9.05546 14.4479 9.4239 14.4479 9.81911V12.909C14.4479 13.7208 13.7874 14.3812 12.9756 14.3812ZM10.515 13.0828C10.7097 13.2726 11.026 13.2726 11.2207 13.0828H11.2207L13.9558 10.4037C14.1505 10.2139 14.1505 9.9024 13.9558 9.7126C13.7611 9.5228 13.4448 9.5228 13.2501 9.7126L10.8679 12.0462L9.63169 10.8368C9.43699 10.647 9.12068 10.647 8.92599 10.8368C8.73129 11.0266 8.73129 11.3381 8.92599 11.5279L10.515 13.0828Z",fill:"#15DAC2"}),jsxRuntimeExports.jsx("path",{d:"M14.4429 6.18033L14.3429 6.18033L14.3429 6.18034L14.4429 6.18033ZM14.0332 8.78173L13.9616 8.85161L13.9616 8.85161L14.0332 8.78173ZM14.4479 12.909L14.3479 12.909L14.3479 12.909L14.4479 12.909ZM11.2207 13.0828V12.9828H11.18L11.1509 13.0112L11.2207 13.0828ZM10.515 13.0828L10.4451 13.1543L10.4452 13.1544L10.515 13.0828ZM11.2207 13.0828V13.1828H11.2616L11.2907 13.1542L11.2207 13.0828ZM13.9558 10.4037L13.886 10.332L13.8859 10.3322L13.9558 10.4037ZM13.9558 9.7126L14.0256 9.64099L14.0256 9.64099L13.9558 9.7126ZM13.2501 9.7126L13.1803 9.64099L13.1802 9.64116L13.2501 9.7126ZM10.8679 12.0462L10.7979 12.1177L10.8679 12.1861L10.9378 12.1176L10.8679 12.0462ZM9.63169 10.8368L9.70162 10.7653L9.70149 10.7652L9.63169 10.8368ZM8.92599 10.8368L8.85619 10.7652L8.85619 10.7652L8.92599 10.8368ZM8.92599 11.5279L8.99593 11.4564L8.99579 11.4563L8.92599 11.5279ZM3.02108 7.75258H6.11099V7.55258H3.02108V7.75258ZM1.44883 6.18033C1.44883 7.04736 2.15405 7.75258 3.02108 7.75258V7.55258C2.26451 7.55258 1.64883 6.9369 1.64883 6.18033H1.44883ZM1.44883 3.09042V6.18033H1.64883V3.09042H1.44883ZM3.02108 1.51816C2.15405 1.51816 1.44883 2.22339 1.44883 3.09042H1.64883C1.64883 2.33384 2.26451 1.71816 3.02108 1.71816V1.51816ZM6.11099 1.51816H3.02108V1.71816H6.11099V1.51816ZM7.68324 3.09042C7.68324 2.22339 6.97802 1.51816 6.11099 1.51816V1.71816C6.86756 1.71816 7.48324 2.33384 7.48324 3.09042H7.68324ZM7.68324 6.18033V3.09042H7.48324V6.18033H7.68324ZM6.11099 7.75258C6.97802 7.75258 7.68324 7.04736 7.68324 6.18033H7.48324C7.48324 6.9369 6.86756 7.55258 6.11099 7.55258V7.75258ZM2.5334 3.09042C2.5334 2.8216 2.75226 2.60274 3.02108 2.60274V2.40274C2.6418 2.40274 2.3334 2.71114 2.3334 3.09042H2.5334ZM2.5334 6.18033V3.09042H2.3334V6.18033H2.5334ZM3.02108 6.66801C2.75226 6.66801 2.5334 6.44915 2.5334 6.18033H2.3334C2.3334 6.5596 2.6418 6.86801 3.02108 6.86801V6.66801ZM6.11099 6.66801H3.02108V6.86801H6.11099V6.66801ZM6.59867 6.18033C6.59867 6.44915 6.37981 6.66801 6.11099 6.66801V6.86801C6.49027 6.86801 6.79867 6.5596 6.79867 6.18033H6.59867ZM6.59867 3.09042V6.18033H6.79867V3.09042H6.59867ZM6.11099 2.60274C6.37981 2.60274 6.59867 2.8216 6.59867 3.09042H6.79867C6.79867 2.71114 6.49027 2.40274 6.11099 2.40274V2.60274ZM3.02108 2.60274H6.11099V2.40274H3.02108V2.60274ZM3.02108 14.4808H6.11099V14.2808H3.02108V14.4808ZM1.44883 12.9086C1.44883 13.7756 2.15405 14.4808 3.02108 14.4808V14.2808C2.26451 14.2808 1.64883 13.6652 1.64883 12.9086H1.44883ZM1.44883 9.81867V12.9086H1.64883V9.81867H1.44883ZM3.02108 8.24642C2.15405 8.24642 1.44883 8.95164 1.44883 9.81867H1.64883C1.64883 9.0621 2.26451 8.44642 3.02108 8.44642V8.24642ZM6.11099 8.24642H3.02108V8.44642H6.11099V8.24642ZM7.68324 9.81867C7.68324 8.95164 6.97802 8.24642 6.11099 8.24642V8.44642C6.86756 8.44642 7.48324 9.0621 7.48324 9.81867H7.68324ZM7.68324 12.9086V9.81867H7.48324V12.9086H7.68324ZM6.11099 14.4808C6.97802 14.4808 7.68324 13.7756 7.68324 12.9086H7.48324C7.48324 13.6652 6.86756 14.2808 6.11099 14.2808V14.4808ZM2.5334 9.81867C2.5334 9.54985 2.75226 9.33099 3.02108 9.33099V9.13099C2.6418 9.13099 2.3334 9.4394 2.3334 9.81867H2.5334ZM2.5334 12.9086V9.81867H2.3334V12.9086H2.5334ZM3.02108 13.3963C2.75226 13.3963 2.5334 13.1774 2.5334 12.9086H2.3334C2.3334 13.2879 2.6418 13.5963 3.02108 13.5963V13.3963ZM6.11099 13.3963H3.02108V13.5963H6.11099V13.3963ZM6.59867 12.9086C6.59867 13.1774 6.37981 13.3963 6.11099 13.3963V13.5963C6.49027 13.5963 6.79867 13.2879 6.79867 12.9086H6.59867ZM6.59867 9.81867V12.9086H6.79867V9.81867H6.59867ZM6.11099 9.33099C6.37981 9.33099 6.59867 9.54985 6.59867 9.81867H6.79867C6.79867 9.4394 6.49027 9.13099 6.11099 9.13099V9.33099ZM3.02108 9.33099H6.11099V9.13099H3.02108V9.33099ZM12.9707 7.55259H9.88078V7.75259H12.9707V7.55259ZM14.3429 6.18034C14.343 6.93691 13.7273 7.55259 12.9707 7.55259V7.75259C13.8377 7.75259 14.543 7.04736 14.5429 6.18033L14.3429 6.18034ZM14.3429 3.09042V6.18033H14.5429V3.09042H14.3429ZM12.9707 1.71817C13.7273 1.71817 14.3429 2.33385 14.3429 3.09042H14.5429C14.5429 2.22339 13.8377 1.51817 12.9707 1.51817V1.71817ZM9.88078 1.71817H12.9707V1.51817H9.88078V1.71817ZM8.50853 3.09042C8.50853 2.33385 9.12423 1.71817 9.88078 1.71817V1.51817C9.01377 1.51817 8.30853 2.22339 8.30853 3.09042H8.50853ZM8.50853 6.18033V3.09042H8.30853V6.18033H8.50853ZM9.88078 7.55259C9.12423 7.55259 8.50853 6.93691 8.50853 6.18033H8.30853C8.30853 7.04736 9.01377 7.75259 9.88078 7.75259V7.55259ZM9.88078 2.40274C9.50152 2.40274 9.1931 2.71114 9.1931 3.09042H9.3931C9.3931 2.82161 9.61198 2.60274 9.88078 2.60274V2.40274ZM12.9707 2.40274H9.88078V2.60274H12.9707V2.40274ZM13.6584 3.09042C13.6584 2.71115 13.35 2.40274 12.9707 2.40274V2.60274C13.2395 2.60274 13.4584 2.8216 13.4584 3.09042H13.6584ZM13.6584 6.18033V3.09042H13.4584V6.18033H13.6584ZM12.9707 6.86801C13.35 6.86801 13.6584 6.55961 13.6584 6.18033H13.4584C13.4584 6.44916 13.2395 6.66801 12.9707 6.66801V6.86801ZM9.88078 6.86801H12.9707V6.66801H9.88078V6.86801ZM9.1931 6.18033C9.1931 6.55961 9.50152 6.86801 9.88078 6.86801V6.66801C9.61198 6.66801 9.3931 6.44915 9.3931 6.18033H9.1931ZM9.1931 3.09042V6.18033H9.3931V3.09042H9.1931ZM9.88572 14.4812H12.9756V14.2812H9.88572V14.4812ZM8.31347 12.909C8.31347 13.776 9.01869 14.4812 9.88572 14.4812V14.2812C9.12915 14.2812 8.51347 13.6656 8.51347 12.909H8.31347ZM8.31347 9.81911V12.909H8.51347V9.81911H8.31347ZM9.88572 8.24685C9.01869 8.24685 8.31347 8.95208 8.31347 9.81911H8.51347C8.51347 9.06254 9.12915 8.44685 9.88572 8.44685V8.24685ZM12.9756 8.24685H9.88572V8.44685H12.9756V8.24685ZM14.1047 8.71185C13.8111 8.41129 13.4093 8.24685 12.9756 8.24685V8.44685C13.3579 8.44685 13.7073 8.59129 13.9616 8.85161L14.1047 8.71185ZM14.5479 9.81911C14.5479 9.39874 14.391 9.00493 14.1047 8.71185L13.9616 8.85161C14.2102 9.10599 14.3479 9.44906 14.3479 9.81911H14.5479ZM14.5479 12.909V9.81911H14.3479V12.909H14.5479ZM12.9756 14.4812C13.8427 14.4812 14.5479 13.776 14.5479 12.909L14.3479 12.909C14.3479 13.6656 13.7322 14.2812 12.9756 14.2812V14.4812ZM11.1509 13.0112C10.995 13.1631 10.7407 13.1631 10.5848 13.0112L10.4452 13.1544C10.6787 13.3821 11.057 13.3821 11.2905 13.1544L11.1509 13.0112ZM11.2207 12.9828H11.2207V13.1828H11.2207V12.9828ZM13.8859 10.3322L11.1508 13.0114L11.2907 13.1542L14.0258 10.4751L13.8859 10.3322ZM13.886 9.7842C14.0405 9.93476 14.0405 10.1815 13.886 10.332L14.0256 10.4753C14.2606 10.2462 14.2606 9.87004 14.0256 9.64099L13.886 9.7842ZM13.3199 9.7842C13.4758 9.63226 13.7302 9.63226 13.886 9.7842L14.0256 9.64099C13.7921 9.41333 13.4139 9.41333 13.1803 9.64099L13.3199 9.7842ZM10.9378 12.1176L13.3201 9.78404L13.1802 9.64116L10.7979 11.9748L10.9378 12.1176ZM9.56176 10.9083L10.7979 12.1177L10.9378 11.9747L9.70162 10.7653L9.56176 10.9083ZM8.99579 10.9084C9.15165 10.7565 9.40603 10.7565 9.56188 10.9084L9.70149 10.7652C9.46795 10.5375 9.08971 10.5376 8.85619 10.7652L8.99579 10.9084ZM8.99579 11.4563C8.84135 11.3057 8.84136 11.059 8.99579 10.9084L8.85619 10.7652C8.62122 10.9942 8.62123 11.3704 8.85618 11.5995L8.99579 11.4563ZM10.5849 13.0113L8.99593 11.4564L8.85605 11.5993L10.4451 13.1543L10.5849 13.0113Z",fill:"#15DAC2"})]}),jsxRuntimeExports.jsx("span",{children:"选择题"}),jsxRuntimeExports.jsx("div",{ref:_me,children:jsxRuntimeExports.jsx(ActiveSelect,{onClick:()=>{lme("choiceQuestion")},onFromLibraryClick:Ome=>{ume("choiceQuestion",Ome)}})})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M13.334 6V3.33333H2.66732V6H13.334ZM13.334 7.33333H2.66732V12.6667H13.334V7.33333ZM2.00065 2H14.0007C14.3689 2 14.6673 2.29848 14.6673 2.66667V13.3333C14.6673 13.7015 14.3689 14 14.0007 14H2.00065C1.63246 14 1.33398 13.7015 1.33398 13.3333V2.66667C1.33398 2.29848 1.63246 2 2.00065 2ZM3.33398 8H5.33398V11.3333H3.33398V8ZM3.33398 4H4.66732V5.33333H3.33398V4ZM6.00065 4H7.33398V5.33333H6.00065V4Z",fill:"#7251F7"})}),jsxRuntimeExports.jsx("span",{children:"示例演示"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:Tme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 2.66634H3.33333V13.333H12.6667V5.33301H10V2.66634ZM2 1.99421C2 1.62904 2.29833 1.33301 2.66567 1.33301H10.6667L13.9998 4.66634L14 13.9947C14 14.3656 13.7034 14.6663 13.3377 14.6663H2.66227C2.29651 14.6663 2 14.3628 2 14.0051V1.99421ZM11.7713 7.99967L9.4142 10.3567L8.4714 9.41387L9.8856 7.99967L8.4714 6.58546L9.4142 5.64265L11.7713 7.99967ZM4.22877 7.99967L6.58579 5.64265L7.5286 6.58546L6.11438 7.99967L7.5286 9.41387L6.58579 10.3567L4.22877 7.99967Z",fill:"#FB973C"})}),jsxRuntimeExports.jsx("span",{children:"编码测验"}),jsxRuntimeExports.jsx("div",{ref:vme,children:jsxRuntimeExports.jsx(ActiveSelect,{onClick:()=>{lme("codingTest")},onFromLibraryClick:Ome=>{ume("codingTest",Ome)}})})]})]})]})]})},ChangeMenu=Ff=>{const{editor:kh,data:x_}=Ff;x_.pos+1;const B_=()=>{const{range:$P}=x_;kh==null||kh.chain().deleteRange($P).hideTip().run()},$_=()=>{const $P=kh==null?void 0:kh.view.nodeDOM(x_.pos),zP="text/html",eme=new Blob([$P==null?void 0:$P.outerHTML],{type:zP}),tme=[new ClipboardItem({[zP]:eme})];navigator.clipboard.write(tme),kh==null||kh.commands.hideTip()};return jsxRuntimeExports.jsxs("div",{className:"tiptap-changemenu",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-changemenu-item tiptap-changemenu-item-del",onClick:B_,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11.332 3.99967H14.6654V5.33301H13.332V13.9997C13.332 14.3679 13.0336 14.6663 12.6654 14.6663H3.33203C2.96384 14.6663 2.66536 14.3679 2.66536 13.9997V5.33301H1.33203V3.99967H4.66536V1.99967C4.66536 1.63149 4.96384 1.33301 5.33203 1.33301H10.6654C11.0336 1.33301 11.332 1.63149 11.332 1.99967V3.99967ZM11.9987 5.33301H3.9987V13.333H11.9987V5.33301ZM5.9987 7.33301H7.33203V11.333H5.9987V7.33301ZM8.66537 7.33301H9.9987V11.333H8.66537V7.33301ZM5.9987 2.66634V3.99967H9.9987V2.66634H5.9987Z"})}),jsxRuntimeExports.jsx("span",{children:"删除"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-changemenu-item",onClick:$_,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M4.66653 3.99967V1.99967C4.66653 1.63149 4.96501 1.33301 5.3332 1.33301H13.3332C13.7014 1.33301 13.9999 1.63149 13.9999 1.99967V11.333C13.9999 11.7012 13.7014 11.9997 13.3332 11.9997H11.3332V13.9991C11.3332 14.3676 11.0333 14.6663 10.662 14.6663H2.67111C2.30039 14.6663 2 14.3699 2 13.9991L2.00173 4.66692C2.0018 4.29841 2.30176 3.99967 2.67295 3.99967H4.66653ZM3.33495 5.33301L3.33346 13.333H9.99987V5.33301H3.33495ZM5.99987 3.99967H11.3332V10.6663H12.6665V2.66634H5.99987V3.99967Z",fill:"#999999"})}),jsxRuntimeExports.jsx("span",{children:"复制"})]})]})},Tip=Ff=>{const{editor:kh,emitter:x_}=Ff,[B_,$_]=React.useState(null),[$P,zP]=React.useState(null),[eme,tme]=React.useState(null),[nme,rme]=React.useState(null),[ime,ame]=React.useState({}),[ome,sme]=React.useState("add");return React.useEffect(()=>{if(!B_||!$P)return;const cme=tippy(B_,{placement:"bottom-start",content:$P,interactive:!0,trigger:"mouseenter focus click focusin",onTrigger(lme,ume){kh==null||kh.commands.changeTip(!0)},onHide(lme){kh==null||kh.commands.changeTip(!1)}});return()=>{cme.unmount(),cme.destroy()}},[B_,$P]),React.useEffect(()=>{if(!eme||!nme)return;const cme=tippy(eme,{placement:"bottom-start",content:nme,interactive:!0,duration:[300,300],onTrigger(lme,ume){kh==null||kh.commands.changeTip(!0)},onHide(lme){kh==null||kh.commands.changeTip(!1)}});return()=>{cme.unmount(),cme.destroy()}},[eme,nme]),React.useEffect(()=>{x_==null||x_.on("hover",cme=>{ame({...cme})}),x_==null||x_.on("type",({type:cme})=>{cme==="add"?sme("add"):cme==="content"&&sme("content")})},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ome==="add"?jsxRuntimeExports.jsxs("div",{className:"floatingmenu-tip",ref:$_,children:[jsxRuntimeExports.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6.5625 6.5625V9.9375C6.5625 10.0867 6.50324 10.2298 6.39775 10.3352C6.29226 10.4407 6.14918 10.5 6 10.5C5.85082 10.5 5.70774 10.4407 5.60225 10.3352C5.49676 10.2298 5.4375 10.0867 5.4375 9.9375V6.5625H2.0625C1.91332 6.5625 1.77024 6.50324 1.66475 6.39775C1.55926 6.29226 1.5 6.14918 1.5 6C1.5 5.85082 1.55926 5.70774 1.66475 5.60225C1.77024 5.49676 1.91332 5.4375 2.0625 5.4375H5.4375V2.0625C5.4375 1.91332 5.49676 1.77024 5.60225 1.66475C5.70774 1.55926 5.85082 1.5 6 1.5C6.14918 1.5 6.29226 1.55926 6.39775 1.66475C6.50324 1.77024 6.5625 1.91332 6.5625 2.0625V5.4375H9.9375C10.0867 5.4375 10.2298 5.49676 10.3352 5.60225C10.4407 5.70774 10.5 5.85082 10.5 6C10.5 6.14918 10.4407 6.29226 10.3352 6.39775C10.2298 6.50324 10.0867 6.5625 9.9375 6.5625H6.5625Z",fill:"#999999"})}),jsxRuntimeExports.jsx("div",{ref:zP,children:jsxRuntimeExports.jsx(Menu,{editor:kh,data:ime})})]}):jsxRuntimeExports.jsxs("div",{className:"floatingmenu-tip",ref:tme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.07432 2.59277C5.40059 2.59277 5.72366 2.65704 6.02509 2.78189C6.32652 2.90675 6.60041 3.08975 6.83111 3.32046C7.06181 3.55116 7.24482 3.82505 7.36968 4.12648C7.49453 4.42791 7.5588 4.75098 7.5588 5.07725V7.56173H5.07432C4.74805 7.56173 4.42498 7.49746 4.12355 7.37261C3.82212 7.24775 3.54824 7.06474 3.31753 6.83404C3.08683 6.60333 2.90382 6.32945 2.77896 6.02802C2.65411 5.72659 2.58984 5.40352 2.58984 5.07725C2.58984 4.75098 2.65411 4.42791 2.77896 4.12648C2.90382 3.82505 3.08683 3.55116 3.31753 3.32046C3.54824 3.08975 3.82212 2.90675 4.12355 2.78189C4.42498 2.65704 4.74805 2.59277 5.07432 2.59277ZM6.68192 6.68485V5.07725C6.68192 4.7593 6.58764 4.44848 6.41099 4.18411C6.23435 3.91974 5.98327 3.71369 5.68952 3.59202C5.39577 3.47034 5.07254 3.43851 4.76069 3.50054C4.44885 3.56257 4.1624 3.71568 3.93757 3.9405C3.71275 4.16533 3.55964 4.45178 3.49761 4.76362C3.43558 5.07547 3.46741 5.3987 3.58909 5.69245C3.71076 5.9862 3.91682 6.23728 4.18118 6.41392C4.44555 6.59057 4.75637 6.68485 5.07432 6.68485H6.68192ZM10.9201 2.59277C11.2464 2.59277 11.5695 2.65704 11.8709 2.78189C12.1723 2.90675 12.4462 3.08975 12.6769 3.32046C12.9076 3.55116 13.0906 3.82505 13.2155 4.12648C13.3404 4.42791 13.4046 4.75098 13.4046 5.07725C13.4046 5.40352 13.3404 5.72659 13.2155 6.02802C13.0906 6.32945 12.9076 6.60333 12.6769 6.83404C12.4462 7.06474 12.1723 7.24775 11.8709 7.37261C11.5695 7.49746 11.2464 7.56173 10.9201 7.56173H8.43567V5.07725C8.43567 4.75098 8.49993 4.42791 8.62479 4.12648C8.74965 3.82505 8.93265 3.55116 9.16336 3.32046C9.39406 3.08975 9.66795 2.90675 9.96938 2.78189C10.2708 2.65704 10.5939 2.59277 10.9201 2.59277ZM9.31254 6.68485H10.9201C11.2381 6.68485 11.5489 6.59057 11.8133 6.41392C12.0777 6.23728 12.2837 5.9862 12.4054 5.69245C12.5271 5.3987 12.5589 5.07547 12.4969 4.76362C12.4348 4.45178 12.2817 4.16533 12.0569 3.9405C11.8321 3.71568 11.5456 3.56257 11.2338 3.50054C10.9219 3.43851 10.5987 3.47034 10.3049 3.59202C10.0112 3.71369 9.76012 3.91974 9.58347 4.18411C9.40683 4.44848 9.31254 4.7593 9.31254 5.07725V6.68485ZM5.07432 13.4076C4.4154 13.4076 3.78346 13.1458 3.31753 12.6799C2.8516 12.2139 2.58984 11.582 2.58984 10.9231C2.58984 10.2642 2.8516 9.63222 3.31753 9.16629C3.78346 8.70036 4.4154 8.4386 5.07432 8.4386H7.5588V10.9231C7.5588 11.2493 7.49453 11.5724 7.36968 11.8738C7.24482 12.1753 7.06181 12.4492 6.83111 12.6799C6.60041 12.9106 6.32652 13.0936 6.02509 13.2184C5.72366 13.3433 5.40059 13.4076 5.07432 13.4076ZM6.68192 9.31547H5.07432C4.75637 9.31547 4.44555 9.40976 4.18118 9.5864C3.91682 9.76305 3.71076 10.0141 3.58909 10.3079C3.46741 10.6016 3.43558 10.9249 3.49761 11.2367C3.55964 11.5485 3.71275 11.835 3.93757 12.0598C4.1624 12.2847 4.44885 12.4378 4.76069 12.4998C5.07254 12.5618 5.39577 12.53 5.68952 12.4083C5.98327 12.2866 6.23435 12.0806 6.41099 11.8162C6.58764 11.5518 6.68192 11.241 6.68192 10.9231V9.31547ZM10.9201 13.4076C10.5939 13.4076 10.2708 13.3433 9.96938 13.2184C9.66795 13.0936 9.39406 12.9106 9.16336 12.6799C8.93265 12.4492 8.74965 12.1753 8.62479 11.8738C8.49993 11.5724 8.43567 11.2493 8.43567 10.9231V8.4386H10.9201C11.5791 8.4386 12.211 8.70036 12.6769 9.16629C13.1429 9.63222 13.4046 10.2642 13.4046 10.9231C13.4046 11.582 13.1429 12.2139 12.6769 12.6799C12.211 13.1458 11.5791 13.4076 10.9201 13.4076ZM9.31254 9.31547V10.9231C9.31254 11.241 9.40683 11.5518 9.58347 11.8162C9.76012 12.0806 10.0112 12.2866 10.3049 12.4083C10.5987 12.53 10.9219 12.5618 11.2338 12.4998C11.5456 12.4378 11.8321 12.2847 12.0569 12.0598C12.2817 11.835 12.4348 11.5485 12.4969 11.2367C12.5589 10.9249 12.5271 10.6016 12.4054 10.3079C12.2837 10.0141 12.0777 9.76305 11.8133 9.5864C11.5489 9.40976 11.2381 9.31547 10.9201 9.31547H9.31254Z",fill:"#999999"})}),jsxRuntimeExports.jsx("div",{ref:rme,children:jsxRuntimeExports.jsx(ChangeMenu,{editor:kh,data:ime})})]})})};class EventEmitter{constructor(){tEe(this,"callbacks",{})}on(kh,x_){return this.callbacks[kh]||(this.callbacks[kh]=[]),this.callbacks[kh].push(x_),this}emit(kh,...x_){const B_=this.callbacks[kh];return B_&&B_.forEach($_=>$_.apply(this,x_)),this}off(kh,x_){const B_=this.callbacks[kh];return B_&&(x_?this.callbacks[kh]=B_.filter($_=>$_!==x_):delete this.callbacks[kh]),this}removeAllListeners(){this.callbacks={}}}const allowTypes=["paragraph","heading","horizontalRule","blockquote","codeBlock","image","table"];class Handle{constructor(kh,x_,B_,$_=[]){tEe(this,"editor");tEe(this,"tippy");tEe(this,"component");tEe(this,"tippyOptions");tEe(this,"ignoreType");tEe(this,"isShow");tEe(this,"emitter");tEe(this,"lastPos",null);tEe(this,"prevent",!1);this.editor=kh,this.tippy=null,this.component=x_,this.tippyOptions=B_,this.ignoreType=$_,this.isShow=!1,this.emitter=new EventEmitter}build(){return new ReactRenderer(this.component,{editor:this.editor,props:{editor:this.editor,emitter:this.emitter}}).element}createTippy(kh=!1){var B_,$_,$P;if(!kh&&this.tippy)return;const x_=this.build();this.tippy=tippy(document.body,{duration:0,getReferenceClientRect:null,content:x_,interactive:!0,trigger:"manual",placement:"left-start",hideOnClick:"toggle",...this.tippyOptions}),($P=($_=(B_=this.editor)==null?void 0:B_.view)==null?void 0:$_.dom.parentElement)==null||$P.addEventListener("mouseleave",this.mouseLeave.bind(this))}mouseLeave(){setTimeout(()=>{this.hide()},10)}show(){var kh;this.prevent||((kh=this.tippy)==null||kh.show(),this.isShow=!0)}hide(){var kh;this.prevent||((kh=this.tippy)==null||kh.hide(),this.lastPos=null,this.isShow=!1)}setProps(kh){var x_;(x_=this.tippy)==null||x_.setProps(kh)}setPrevent(kh){this.prevent=kh}move(kh,x_){var ame;if(this.prevent)return;this.createTippy();const{state:B_}=kh,{doc:$_,selection:$P}=B_,zP=kh==null?void 0:kh.posAtCoords({left:x_==null?void 0:x_.clientX,top:x_==null?void 0:x_.clientY});if(!zP)return!1;const{pos:eme,inside:tme}=zP;let nme=!1,rme=!0;const ime=(ame=document.getElementById("ylz-editor-container"))==null?void 0:ame.getBoundingClientRect();$_.descendants((ome,sme,cme,lme)=>{if(eme>=sme&&eme<sme+ome.nodeSize){if(eme!==this.lastPos){this.lastPos=eme,this.emitter.emit("hover",{node:ome,pos:sme,range:{from:sme,to:sme+ome.nodeSize}});const ume=posToDOMRect(kh,sme,sme+ome.nodeSize);ome.type.name==="horizontalRule"?((ume.top-10<((ime==null?void 0:ime.top)||0)||ume.top+6>((ime==null?void 0:ime.bottom)||0))&&(nme=!0),this.setProps({getReferenceClientRect:()=>({...ume,top:ume.top-10})})):((ume.top+6<((ime==null?void 0:ime.top)||0)||ume.top+22>((ime==null?void 0:ime.bottom)||0))&&(nme=!0),this.setProps({getReferenceClientRect:()=>({...ume,top:ume.top+6})}))}else rme=!1;ome.type.name!=="paragraph"?this.emitter.emit("type",{type:"content"}):this.emitter.emit("type",{type:"add"}),allowTypes.includes(ome.type.name)||(nme=!0),this.ignoreType.includes(ome.type.name)&&(nme=!0)}return!1}),rme&&(nme?this.hide():this.show())}destroy(){var kh,x_,B_,$_;(kh=this.tippy)==null||kh.destroy(),($_=(B_=(x_=this.editor)==null?void 0:x_.view)==null?void 0:B_.dom.parentElement)==null||$_.removeEventListener("mouseleave",this.mouseLeave),this.tippy=null,this.isShow=!1,this.lastPos=null}}const FloatingMenu=Extension.create({name:"floatingMenu",addOptions(){return{pluginKey:this.name,tip:null}},onBeforeCreate(){this.options.tip=new Handle(this.editor,Tip,{},["title","pdf","active"])},addCommands(){return{showTip:()=>()=>{var Ff,kh,x_;return(x_=(kh=(Ff=this.options)==null?void 0:Ff.tip)==null?void 0:kh.tippy)==null||x_.show(),!0},hideTip:()=>()=>{var Ff,kh,x_;return(x_=(kh=(Ff=this.options)==null?void 0:Ff.tip)==null?void 0:kh.tippy)==null||x_.hide(),!0},changeTip:(Ff=!0)=>()=>{var kh;return(kh=this.options.tip)==null||kh.setPrevent(Ff),!0}}},addProseMirrorPlugins(){return[FloatingMenuPlugin({editor:this.editor,...this.options})]}}),inputRegex=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Image$1=Node$1.create({name:"image",addOptions(){return{oss:"",inline:!1,allowBase64:!1,HTMLAttributes:{class:"tiptap-image"}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:Ff}){return["img",mergeAttributes(this.options.HTMLAttributes,Ff)]},addCommands(){return{setImage:Ff=>({commands:kh})=>kh.insertContent({type:this.name,attrs:Ff})}},addKeyboardShortcuts(){return{"Mod-v":()=>{var kh,x_;const Ff=this;(x_=(kh=navigator==null?void 0:navigator.clipboard)==null?void 0:kh.read())==null||x_.then(async B_=>{var $_,$P;for(const zP of B_)if(($_=zP==null?void 0:zP.types)!=null&&$_.includes("text/html")){const eme=await(zP==null?void 0:zP.getType("text/html")),tme=new FileReader;tme.onloadend=async()=>{var rme;if(!tme.result.startsWith("<img")){for(const ime of zP==null?void 0:zP.types)if(ime!=null&&ime.includes("image")){const ame=await zP.getType(ime),ome=new Date().getTime(),sme=new File([ame],ome.toString().substring(0,4)),cme=new FormData;cme.append("file",sme),upload({url:(rme=Ff.options)==null?void 0:rme.oss,file:cme,ext:"png"}).then(lme=>{if(lme!=null&&lme.url)return Ff.editor.commands.setImage({src:lme==null?void 0:lme.url})})}}},tme.readAsText(eme)}else for(const eme of zP==null?void 0:zP.types)if(eme!=null&&eme.includes("image")){const tme=await zP.getType(eme),nme=new Date().getTime(),rme=new File([tme],nme.toString().substring(0,4)),ime=new FormData;ime.append("file",rme),upload({url:($P=Ff.options)==null?void 0:$P.oss,file:ime,ext:"png"}).then(ame=>{if(ame!=null&&ame.url)return Ff.editor.commands.setImage({src:ame==null?void 0:ame.url})})}}).catch(B_=>{console.error("获取剪切板内容失败:",B_)})}}},addInputRules(){return[nodeInputRule({find:inputRegex,type:this.type,getAttributes:Ff=>{const[,,kh,x_,B_]=Ff;return{src:x_,alt:kh,title:B_}}})]}});function findSuggestionMatch(Ff){var kh;const{char:x_,allowSpaces:B_,allowedPrefixes:$_,startOfLine:$P,$position:zP}=Ff,eme=escapeForRegEx(x_),tme=new RegExp(`\\s${eme}$`),nme=$P?"^":"",rme=B_?new RegExp(`${nme}${eme}.*?(?=\\s${eme}|$)`,"gm"):new RegExp(`${nme}(?:^)?${eme}[^\\s${eme}]*`,"gm"),ime=((kh=zP.nodeBefore)===null||kh===void 0?void 0:kh.isText)&&zP.nodeBefore.text;if(!ime)return null;const ame=zP.pos-ime.length,ome=Array.from(ime.matchAll(rme)).pop();if(!ome||ome.input===void 0||ome.index===void 0)return null;const sme=ome.input.slice(Math.max(0,ome.index-1),ome.index),cme=new RegExp(`^[${$_==null?void 0:$_.join("")}\0]?$`).test(sme);if($_!==null&&!cme)return null;const lme=ame+ome.index;let ume=lme+ome[0].length;return B_&&tme.test(ime.slice(ume-1,ume+1))&&(ome[0]+=" ",ume+=1),lme<zP.pos&&ume>=zP.pos?{range:{from:lme,to:ume},query:ome[0].slice(x_.length),text:ome[0]}:null}const SuggestionPluginKey=new PluginKey("suggestion");function Suggestion({pluginKey:Ff=SuggestionPluginKey,editor:kh,char:x_="@",allowSpaces:B_=!1,allowedPrefixes:$_=[" "],startOfLine:$P=!1,decorationTag:zP="span",decorationClass:eme="suggestion",command:tme=()=>null,items:nme=()=>[],render:rme=()=>({}),allow:ime=()=>!0,findSuggestionMatch:ame=findSuggestionMatch}){let ome;const sme=rme==null?void 0:rme(),cme=new Plugin({key:Ff,view(){return{update:async(lme,ume)=>{var dme,fme,pme,hme,mme,gme,Eme;const _me=(dme=this.key)===null||dme===void 0?void 0:dme.getState(ume),Tme=(fme=this.key)===null||fme===void 0?void 0:fme.getState(lme.state),vme=_me.active&&Tme.active&&_me.range.from!==Tme.range.from,Ame=!_me.active&&Tme.active,Ome=_me.active&&!Tme.active,wme=!Ame&&!Ome&&_me.query!==Tme.query,Lme=Ame||vme,Pme=wme&&!vme,Dme=Ome||vme;if(!Lme&&!Pme&&!Dme)return;const kme=Dme&&!Lme?_me:Tme,Vme=lme.dom.querySelector(`[data-decoration-id="${kme.decorationId}"]`);ome={editor:kh,range:kme.range,query:kme.query,text:kme.text,items:[],command:Rme=>{tme({editor:kh,range:kme.range,props:Rme})},decorationNode:Vme,clientRect:Vme?()=>{var Rme;const{decorationId:Fme}=(Rme=this.key)===null||Rme===void 0?void 0:Rme.getState(kh.state),Bme=lme.dom.querySelector(`[data-decoration-id="${Fme}"]`);return(Bme==null?void 0:Bme.getBoundingClientRect())||null}:null},Lme&&((pme=sme==null?void 0:sme.onBeforeStart)===null||pme===void 0||pme.call(sme,ome)),Pme&&((hme=sme==null?void 0:sme.onBeforeUpdate)===null||hme===void 0||hme.call(sme,ome)),(Pme||Lme)&&(ome.items=await nme({editor:kh,query:kme.query})),Dme&&((mme=sme==null?void 0:sme.onExit)===null||mme===void 0||mme.call(sme,ome)),Pme&&((gme=sme==null?void 0:sme.onUpdate)===null||gme===void 0||gme.call(sme,ome)),Lme&&((Eme=sme==null?void 0:sme.onStart)===null||Eme===void 0||Eme.call(sme,ome))},destroy:()=>{var lme;ome&&((lme=sme==null?void 0:sme.onExit)===null||lme===void 0||lme.call(sme,ome))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(lme,ume,dme,fme){const{isEditable:pme}=kh,{composing:hme}=kh.view,{selection:mme}=lme,{empty:gme,from:Eme}=mme,_me={...ume};if(_me.composing=hme,pme&&(gme||kh.view.composing)){(Eme<ume.range.from||Eme>ume.range.to)&&!hme&&!ume.composing&&(_me.active=!1);const Tme=ame({char:x_,allowSpaces:B_,allowedPrefixes:$_,startOfLine:$P,$position:mme.$from}),vme=`id_${Math.floor(Math.random()*4294967295)}`;Tme&&ime({editor:kh,state:fme,range:Tme.range})?(_me.active=!0,_me.decorationId=ume.decorationId?ume.decorationId:vme,_me.range=Tme.range,_me.query=Tme.query,_me.text=Tme.text):_me.active=!1}else _me.active=!1;return _me.active||(_me.decorationId=null,_me.range={from:0,to:0},_me.query=null,_me.text=null),_me}},props:{handleKeyDown(lme,ume){var dme;const{active:fme,range:pme}=cme.getState(lme.state);return fme&&((dme=sme==null?void 0:sme.onKeyDown)===null||dme===void 0?void 0:dme.call(sme,{view:lme,event:ume,range:pme}))||!1},decorations(lme){const{active:ume,range:dme,decorationId:fme}=cme.getState(lme);return ume?DecorationSet.create(lme.doc,[Decoration.inline(dme.from,dme.to,{nodeName:zP,class:eme,"data-decoration-id":fme})]):null}}});return cme}const normalClass="tiptap-menu-item-menus-item",lighClass="tiptap-menu-item-menus-item tiptap-menu-item-menus-light";function insertParagraph(Ff,kh=2){const{state:x_,view:B_}=Ff,{tr:$_,selection:$P}=x_,zP=Ff.schema.nodes.paragraph.create();$_.insert($P.to+kh,zP),B_.dispatch($_)}const SlashMenu=Ff=>{var wme;const kh=React.useContext(shareData),{editor:x_,emitter:B_}=Ff,[$_,$P]=React.useState(null),[zP,eme]=React.useState(null),[tme,nme]=React.useState({}),rme=React.useRef(null);React.useEffect(()=>{B_==null||B_.on("show",Lme=>{nme({...Lme})})},[]);const ime=((wme=tme==null?void 0:tme.range)==null?void 0:wme.from)+1||0,ame=()=>{x_==null||x_.chain().focus(ime).deleteRange(tme.range).setParagraph().hideMenu().run()},ome=Lme=>{x_==null||x_.chain().focus(ime).deleteRange(tme.range).setHeading({level:Lme}).hideMenu().run()},sme=()=>{const Lme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);x_!=null&&x_.chain().focus(ime).deleteRange(tme.range).setCodeBlock().hideMenu().run()&&(Lme||insertParagraph(x_,1))},cme=()=>{const Lme=document.createElement("input");Lme.type="file",Lme.accept="image/*",Lme.addEventListener("change",Pme=>{const Dme=Pme.target.files[0],kme=Dme.size,Vme=10*1024*1024;if(kme>Vme)antd.message.warning("图片大小不能超过10Mb!");else{const Rme=new FormData;Rme.append("file",Dme),upload({url:kh==null?void 0:kh.apiUrl,file:Rme,ext:Dme==null?void 0:Dme.name}).then(Fme=>{if(Fme!=null&&Fme.url){const Bme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);x_!=null&&x_.chain().focus(ime).deleteRange(tme.range).setImage({src:Fme==null?void 0:Fme.url}).hideMenu().run()&&(Bme||insertParagraph(x_,0))}}).catch(()=>{antd.message.destroy(),antd.message.error("图片上传失败")})}}),Lme.click()},lme=Lme=>{const Pme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);x_!=null&&x_.chain().focus(ime).deleteRange(tme.range).insertTable({rows:Lme.row,cols:Lme.col,withHeaderRow:!0}).hideMenu().run()&&(Pme||insertParagraph(x_,4*Lme.row*Lme.col+Lme.row*2-2))},ume=(Lme=!1)=>{Lme?x_==null||x_.chain().focus(ime).deleteRange(tme.range).toggleOrderedList().hideMenu().run():x_==null||x_.chain().focus(ime).deleteRange(tme.range).toggleBulletList().hideMenu().run()},dme=()=>{x_==null||x_.chain().focus(ime).deleteRange(tme.range).showBubbleMenu({from:ime,to:ime}).hideMenu().run()},fme=Lme=>{var Pme;x_==null||x_.chain().focus(ime).deleteRange(tme.range).hideMenu().run(),window.postMessage({type:Lme,value:{pos:(Pme=tme==null?void 0:tme.range)==null?void 0:Pme.from}})},pme=(Lme,Pme)=>{x_==null||x_.chain().focus(ime).deleteRange(tme.range).hideMenu().run(),Pme?window.postMessage({type:"AddActiveFromLibrary",value:{type:Lme}}):antd.Modal.warning({title:"暂无权限",content:"暂无创建课程考试权限,如需开通该模块,请联系平台超管(微信:396800448)",centered:!0,okText:"我知道了"})},hme=()=>{mme()},mme=()=>{const Lme=document.createElement("input");Lme.type="file",Lme.accept=".pdf",Lme.addEventListener("change",Pme=>{const Dme=Pme.target.files[0];if((Dme==null?void 0:Dme.type)!=="application/pdf"){antd.message.destroy(),antd.message.error("仅支持上传.pdf结尾的文件");return}if((Dme==null?void 0:Dme.size)>200*1024*1024){antd.message.destroy(),antd.message.error("上传文件不可超过200MB");return}const kme=new FormData;kme.append("file",Dme),upload({url:kh==null?void 0:kh.apiUrl,file:kme,ext:getFileSuffix(Dme==null?void 0:Dme.name)}).then(Vme=>{var Fme,Bme;const Rme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);(Bme=(Fme=x_==null?void 0:x_.chain().focus(ime))==null?void 0:Fme.deleteRange(tme.range).setPdf({pdfUrl:Vme==null?void 0:Vme.url}))!=null&&Bme.hideMenu().run()&&(Rme||insertParagraph(x_,1))}).catch(()=>{antd.message.destroy(),antd.message.error("文件上传失败")})}),Lme.click()},gme=()=>{x_==null||x_.chain().deleteRange(tme.range).focus(ime+1).setHorizontalRule().hideMenu().run()},Eme=()=>{const Lme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);x_!=null&&x_.chain().focus(ime).deleteRange(tme.range).setBlockquote().hideMenu().run()&&(Lme||insertParagraph(x_))};React.useEffect(()=>{!$_||!zP||tippy($_,{placement:"right",content:zP,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:500,onTrigger(){$_.classList.add("tiptap-menu-item-list-item-light")},onHide(){$_.classList.remove("tiptap-menu-item-list-item-light")}})},[$_,zP]);const _me=React.useRef(null),Tme=React.useRef(null);React.useEffect(()=>{!_me.current||!Tme.current||tippy(_me.current,{placement:"right",content:Tme.current,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:105,onTrigger(){var Lme;(Lme=_me.current)==null||Lme.classList.add("tiptap-menu-item-list-item-light")},onHide(){var Lme;(Lme=_me.current)==null||Lme.classList.remove("tiptap-menu-item-list-item-light")}})},[_me.current,Tme.current]);const vme=React.useRef(null),Ame=React.useRef(null);React.useEffect(()=>{!vme.current||!Ame.current||tippy(vme.current,{placement:"right",content:Ame.current,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:105,onTrigger(){var Lme;(Lme=vme.current)==null||Lme.classList.add("tiptap-menu-item-list-item-light")},onHide(){var Lme;(Lme=vme.current)==null||Lme.classList.remove("tiptap-menu-item-list-item-light")}})},[vme.current,Ame.current]);const Ome=window.innerHeight/2-30;return jsxRuntimeExports.jsxs("div",{className:"tiptap-menu tiptap-scroll",style:{maxHeight:Ome,overflowY:"auto"},ref:rme,children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"基础"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-menus",children:[jsxRuntimeExports.jsx("div",{className:lighClass,"data-tip":"正文",onClick:ame,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 3.99984V13.9998H7.33398V3.99984H3.33398V2.6665H12.6673V3.99984H8.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"一级标题",onClick:()=>{ome(1)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732V7.33317H7.33398V2.6665H8.66732V13.3332ZM14.001 5.33317V13.3332H12.6677L12.6673 6.8025L11.334 7.15984V5.77984L13.001 5.33317H14.001Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"二级标题",onClick:()=>{ome(2)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2.66536 2.6665V7.33317H7.33203V2.6665H8.66536V13.3332H7.33203V8.6665H2.66536V13.3332H1.33203V2.6665H2.66536ZM12.332 5.33317C13.7128 5.33317 14.832 6.45246 14.832 7.83317C14.832 8.40477 14.6402 8.93157 14.3174 9.35264L14.2188 9.4733L12.0216 11.9998H14.6654V13.3332H9.9987L9.99823 12.2958L13.2125 8.59857C13.3908 8.3937 13.4987 8.12604 13.4987 7.83317C13.4987 7.18884 12.9764 6.6665 12.332 6.6665C11.7199 6.6665 11.2179 7.1379 11.1692 7.7375L11.1654 7.83317H9.83203C9.83203 6.45246 10.9513 5.33317 12.332 5.33317Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"三级标题",onClick:()=>{ome(3)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33317L14.6663 6.6665L12.9963 8.5885C14.0555 8.87877 14.834 9.84837 14.834 10.9998C14.834 12.3806 13.7147 13.4998 12.334 13.4998C11.1167 13.4998 10.1025 12.6298 9.87959 11.4776L11.1887 11.2233C11.2929 11.7607 11.7661 12.1665 12.334 12.1665C12.9783 12.1665 13.5007 11.6442 13.5007 10.9998C13.5007 10.3555 12.9783 9.83317 12.334 9.83317C12.1433 9.83317 11.9633 9.8789 11.8044 9.96004L10.9335 8.92864L12.8996 6.6665H10.0007V5.33317H14.6673ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"四级标题",onClick:()=>{ome(4)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732V7.33317H7.33398V2.6665H8.66732V13.3332ZM14.6673 5.33317V10.6665H15.6673V11.9998H14.6673V13.3332H13.334V11.9998H9.66732V11.1065L13.0007 5.33317H14.6673ZM13.334 7.42184L11.4607 10.6665H13.334V7.42184Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"五级标题",onClick:()=>{ome(5)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33317V6.6665H11.7853L11.4757 8.4237C11.6963 8.36464 11.9281 8.33317 12.1673 8.33317C13.6401 8.33317 14.834 9.5271 14.834 10.9998C14.834 12.4726 13.6401 13.6665 12.1673 13.6665C10.9495 13.6665 9.92245 12.8502 9.60325 11.735L10.8854 11.3678C11.0451 11.9252 11.5586 12.3332 12.1673 12.3332C12.9037 12.3332 13.5007 11.7362 13.5007 10.9998C13.5007 10.2634 12.9037 9.6665 12.1673 9.6665C11.7469 9.6665 11.372 9.86104 11.1276 10.165L9.92085 9.56244L10.6673 5.33317H14.6673ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"六级标题",onClick:()=>{ome(6)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0653 5.33317L12.3333 8.33317C13.8067 8.33317 15.0007 9.5271 15.0007 10.9998C15.0007 12.4726 13.8067 13.6665 12.334 13.6665C10.8613 13.6665 9.66732 12.4726 9.66732 10.9998C9.66732 10.5089 9.79998 10.049 10.0314 9.6539L12.526 5.33317H14.0653ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732ZM12.334 9.6665C11.5976 9.6665 11.0007 10.2634 11.0007 10.9998C11.0007 11.7362 11.5976 12.3332 12.334 12.3332C13.0704 12.3332 13.6673 11.7362 13.6673 10.9998C13.6673 10.2634 13.0704 9.6665 12.334 9.6665Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"无序列表",onClick:()=>{ume(!1)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 2.66683H14V4.00016H5.33333V2.66683ZM3 4.3335C2.44771 4.3335 2 3.88578 2 3.3335C2 2.78121 2.44771 2.3335 3 2.3335C3.55229 2.3335 4 2.78121 4 3.3335C4 3.88578 3.55229 4.3335 3 4.3335ZM3 9.00016C2.44771 9.00016 2 8.55243 2 8.00016C2 7.4479 2.44771 7.00016 3 7.00016C3.55229 7.00016 4 7.4479 4 8.00016C4 8.55243 3.55229 9.00016 3 9.00016ZM3 13.6002C2.44771 13.6002 2 13.1524 2 12.6002C2 12.0479 2.44771 11.6002 3 11.6002C3.55229 11.6002 4 12.0479 4 12.6002C4 13.1524 3.55229 13.6002 3 13.6002ZM5.33333 7.3335H14V8.66683H5.33333V7.3335ZM5.33333 12.0002H14V13.3335H5.33333V12.0002Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"有序列表",onClick:()=>{ume(!0)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 2.66667H14V4H5.33333V2.66667ZM3.33333 2V4H4V4.66667H2V4H2.66667V2.66667H2V2H3.33333ZM2 9.33333V7.66667H3.33333V7.33333H2V6.66667H4V8.33333H2.66667V8.66667H4V9.33333H2ZM3.33333 13H2V12.3333H3.33333V12H2V11.3333H4V14H2V13.3333H3.33333V13ZM5.33333 7.33333H14V8.66667H5.33333V7.33333ZM5.33333 12H14V13.3333H5.33333V12Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"链接",onClick:dme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12.2422 10.357L11.2993 9.41423L12.2422 8.47143C13.5439 7.1697 13.5439 5.05914 12.2422 3.7574C10.9404 2.45565 8.82988 2.45565 7.52815 3.7574L6.58533 4.70021L5.64253 3.7574L6.58533 2.81459C8.40781 0.992142 11.3625 0.992142 13.185 2.81459C15.0074 4.63704 15.0074 7.59183 13.185 9.41423L12.2422 10.357ZM10.3565 12.2427L9.41375 13.1855C7.59135 15.008 4.63655 15.008 2.8141 13.1855C0.991654 11.363 0.991654 8.4083 2.8141 6.58582L3.75691 5.64302L4.69971 6.58582L3.75691 7.52863C2.45516 8.83036 2.45516 10.941 3.75691 12.2427C5.05865 13.5444 7.16921 13.5444 8.47095 12.2427L9.41375 11.2999L10.3565 12.2427ZM9.88515 5.17161L10.8279 6.11442L6.11393 10.8285L5.17112 9.88563L9.88515 5.17161Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"分割线",onClick:gme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.33398 7.3335H2.66732V8.66683H1.33398V7.3335ZM4.00065 7.3335H12.0007V8.66683H4.00065V7.3335ZM13.334 7.3335H14.6673V8.66683H13.334V7.3335Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"引用",onClick:Eme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0007 2.00049C14.3689 2.00049 14.6673 2.29897 14.6673 2.66715V12.0005C14.6673 12.3687 14.3689 12.6672 14.0007 12.6672H4.30398L1.33398 15.0005V2.66715C1.33398 2.29897 1.63246 2.00049 2.00065 2.00049H14.0007ZM13.334 3.33382H2.66732V12.2572L3.84287 11.3338H13.334V3.33382ZM7.01085 4.94156L7.30838 5.40075C6.19666 6.00229 6.2161 6.96842 6.2161 7.17682C6.3195 7.16255 6.42803 7.16069 6.53556 7.17069C7.13698 7.22642 7.61105 7.72016 7.61105 8.33382C7.61105 8.97816 7.08872 9.50049 6.44437 9.50049C6.08668 9.50049 5.74464 9.33702 5.52846 9.10749C5.18504 8.74295 5.00065 8.33382 5.00065 7.67062C5.00065 6.50411 5.81948 5.45838 7.01085 4.94156ZM10.3442 4.94156L10.6417 5.40075C9.52998 6.00229 9.54945 6.96842 9.54945 7.17682C9.65285 7.16255 9.76138 7.16069 9.86892 7.17069C10.4703 7.22642 10.9444 7.72016 10.9444 8.33382C10.9444 8.97816 10.4221 9.50049 9.77772 9.50049C9.42005 9.50049 9.07798 9.33702 8.86178 9.10749C8.51838 8.74295 8.33398 8.33382 8.33398 7.67062C8.33398 6.50411 9.15285 5.45838 10.3442 4.94156Z"})})})]})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"常用"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:sme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M16 8L12.2287 11.7713L11.2859 10.8284L14.1144 8L11.2859 5.17157L12.2287 4.22877L16 8ZM1.88562 8L4.71405 10.8284L3.77123 11.7713L0 8L3.77123 4.22877L4.71405 5.17157L1.88562 8ZM6.52563 14H5.10673L9.4744 2H10.8933L6.52563 14Z",fill:"#14C3FA"})}),jsxRuntimeExports.jsx("span",{children:"可执行代码块"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:cme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.99518 14C1.63002 14 1.33398 13.7034 1.33398 13.3377V2.66227C1.33398 2.29651 1.63752 2 1.99518 2H14.0061C14.3713 2 14.6673 2.29663 14.6673 2.66227V13.3377C14.6673 13.7035 14.3638 14 14.0061 14H1.99518ZM13.334 10V3.33333H2.66732V12.6667L9.33398 6L13.334 10ZM13.334 11.8856L9.33398 7.8856L4.55294 12.6667H13.334V11.8856ZM5.33398 7.33333C4.5976 7.33333 4.00065 6.7364 4.00065 6C4.00065 5.26362 4.5976 4.66667 5.33398 4.66667C6.07036 4.66667 6.66732 5.26362 6.66732 6C6.66732 6.7364 6.07036 7.33333 5.33398 7.33333Z",fill:"#FBC12D"})}),jsxRuntimeExports.jsx("span",{children:"图片"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:$P,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.33333 6.66667H6.66667V9.33333H9.33333V6.66667ZM10.6667 6.66667V9.33333H12.6667V6.66667H10.6667ZM9.33333 12.6667V10.6667H6.66667V12.6667H9.33333ZM10.6667 12.6667H12.6667V10.6667H10.6667V12.6667ZM9.33333 3.33333H6.66667V5.33333H9.33333V3.33333ZM10.6667 3.33333V5.33333H12.6667V3.33333H10.6667ZM5.33333 6.66667H3.33333V9.33333H5.33333V6.66667ZM5.33333 12.6667V10.6667H3.33333V12.6667H5.33333ZM5.33333 3.33333H3.33333V5.33333H5.33333V3.33333ZM2.66667 2H13.3333C13.7015 2 14 2.29848 14 2.66667V13.3333C14 13.7015 13.7015 14 13.3333 14H2.66667C2.29848 14 2 13.7015 2 13.3333V2.66667C2 2.29848 2.29848 2 2.66667 2Z",fill:"#2DDA9C"})}),jsxRuntimeExports.jsx("span",{children:"表格"}),jsxRuntimeExports.jsx("div",{ref:eme,children:jsxRuntimeExports.jsx(TableSelect,{onClick:lme})})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:hme,children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M2.66667 2.6H7.4V5C7.4 5.68856 7.9781 6.26667 8.66667 6.26667H11.0667V6.76667C11.0667 7.08855 11.3448 7.36667 11.6667 7.36667C11.9886 7.36667 12.2667 7.08855 12.2667 6.76667V4.66667C12.2667 4.50327 12.1865 4.34951 12.1165 4.24453L12.111 4.23629L12.104 4.22929L9.43738 1.56262C9.31201 1.43725 9.14874 1.4 9 1.4H2.66667C1.9781 1.4 1.4 1.9781 1.4 2.66667V13.3333C1.4 14.0219 1.9781 14.6 2.66667 14.6H9.1C9.4219 14.6 9.7 14.3219 9.7 14C9.7 13.6781 9.4219 13.4 9.1 13.4H2.66667C2.6394 13.4 2.62444 13.3913 2.61655 13.3835C2.60866 13.3756 2.6 13.3606 2.6 13.3333V2.66667C2.6 2.6394 2.60866 2.62444 2.61655 2.61655C2.62444 2.60866 2.6394 2.6 2.66667 2.6ZM8.75817 2.6L11.0667 4.94101V5.06667H8.66667C8.6394 5.06667 8.62444 5.05802 8.61655 5.05013C8.60866 5.04223 8.6 5.02727 8.6 5V2.6H8.75817Z",fill:"#3D79EE",stroke:"#3D79EE",strokeWidth:"0.2"}),jsxRuntimeExports.jsx("path",{d:"M5.19934 8.33301C4.99934 8.33301 4.89934 8.36635 4.79934 8.43301C4.69934 8.49968 4.66602 8.63301 4.66602 8.79968V12.033C4.66602 12.133 4.69934 12.233 4.76602 12.333C4.83267 12.3997 4.93267 12.4664 5.09934 12.4664C5.26602 12.4664 5.36602 12.3997 5.43267 12.333C5.49934 12.2664 5.53267 12.1664 5.53267 12.033V11.033H6.03267C6.93267 11.033 7.43267 10.5664 7.43267 9.66635C7.43267 9.23301 7.29934 8.86635 7.06602 8.66635C6.83267 8.43301 6.49934 8.33301 6.03267 8.33301H5.19934ZM6.56602 9.66635C6.56602 9.86635 6.53267 10.033 6.43267 10.0997C6.36602 10.1664 6.19934 10.233 5.99934 10.233H5.49934V9.13301H5.99934C6.19934 9.13301 6.33267 9.16635 6.43267 9.26635C6.53267 9.33301 6.56602 9.46635 6.56602 9.66635ZM10.4327 8.93301C10.2993 8.73301 10.0993 8.59968 9.89934 8.46635C9.66602 8.39968 9.39934 8.33301 9.09934 8.33301H8.13267C7.99934 8.33301 7.86602 8.33301 7.76602 8.46635C7.73267 8.53301 7.69934 8.63301 7.69934 8.76635V11.9997C7.69934 12.133 7.73267 12.233 7.76602 12.2997C7.86602 12.433 7.99934 12.433 8.13267 12.433H9.13267C9.43267 12.433 9.66602 12.3664 9.89934 12.2664C10.0993 12.1664 10.2993 11.9997 10.4327 11.7997C10.566 11.5997 10.666 11.3997 10.7327 11.133C10.7993 10.8997 10.8327 10.633 10.8327 10.3664C10.8327 10.0997 10.7993 9.83301 10.7327 9.59968C10.666 9.36635 10.566 9.13301 10.4327 8.93301ZM9.76602 11.333C9.63267 11.533 9.43267 11.633 9.16602 11.633H8.56602V9.13301H8.99934C9.33267 9.13301 9.59934 9.23301 9.73267 9.43301C9.89934 9.63301 9.96602 9.96635 9.96602 10.3664C9.99934 10.7997 9.89934 11.0997 9.76602 11.333ZM13.2993 8.33301H11.6327C11.4993 8.33301 11.366 8.36635 11.2993 8.43301C11.1993 8.49968 11.166 8.63301 11.166 8.76635V12.033C11.166 12.133 11.1993 12.233 11.266 12.2997C11.3327 12.3997 11.4327 12.433 11.5993 12.433C11.7327 12.433 11.866 12.3997 11.9327 12.2997C11.966 12.233 12.0327 12.1664 12.0327 11.9997V10.6664H13.166C13.366 10.6664 13.5327 10.5664 13.566 10.3997C13.5993 10.2664 13.5993 10.1664 13.566 10.133C13.5327 10.0664 13.466 9.86635 13.166 9.86635H11.9993V9.09968H13.266C13.3993 9.09968 13.4993 9.06635 13.566 9.03301C13.6327 8.99968 13.6993 8.89968 13.6993 8.69968C13.7327 8.49968 13.566 8.33301 13.2993 8.33301Z",fill:"#3D79EE"})]}),jsxRuntimeExports.jsx("span",{children:"PDF"})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"实验活动"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:_me,children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.11099 7.65258H3.02108C2.20928 7.65258 1.54883 6.99213 1.54883 6.18033V3.09042C1.54883 2.27861 2.20928 1.61816 3.02108 1.61816H6.11099C6.92279 1.61816 7.58324 2.27861 7.58324 3.09042V6.18033C7.58324 6.99213 6.92279 7.65258 6.11099 7.65258ZM3.02108 2.50274C2.69703 2.50274 2.4334 2.76637 2.4334 3.09042V6.18033C2.4334 6.50437 2.69703 6.76801 3.02108 6.76801H6.11099C6.43504 6.76801 6.69867 6.50437 6.69867 6.18033V3.09042C6.69867 2.76637 6.43504 2.50274 6.11099 2.50274H3.02108ZM6.11099 14.3808H3.02108C2.20928 14.3808 1.54883 13.7204 1.54883 12.9086V9.81867C1.54883 9.00687 2.20928 8.34642 3.02108 8.34642H6.11099C6.92279 8.34642 7.58324 9.00687 7.58324 9.81867V12.9086C7.58324 13.7204 6.92279 14.3808 6.11099 14.3808ZM3.02108 9.23099C2.69703 9.23099 2.4334 9.49463 2.4334 9.81867V12.9086C2.4334 13.2326 2.69703 13.4963 3.02108 13.4963H6.11099C6.43504 13.4963 6.69867 13.2326 6.69867 12.9086V9.81867C6.69867 9.49463 6.43504 9.23099 6.11099 9.23099H3.02108ZM9.88078 7.65259H12.9707C13.7825 7.65259 14.443 6.99214 14.4429 6.18033V3.09042C14.4429 2.27862 13.7825 1.61817 12.9707 1.61817H9.88078C9.069 1.61817 8.40853 2.27862 8.40853 3.09042V6.18033C8.40853 6.99214 9.069 7.65259 9.88078 7.65259ZM9.2931 3.09042C9.2931 2.76637 9.55675 2.50274 9.88078 2.50274H12.9707C13.2947 2.50274 13.5584 2.76637 13.5584 3.09042V6.18033C13.5584 6.50438 13.2947 6.76801 12.9707 6.76801H9.88078C9.55675 6.76801 9.2931 6.50438 9.2931 6.18033V3.09042ZM12.9756 14.3812H9.88572C9.07392 14.3812 8.41347 13.7208 8.41347 12.909V9.81911C8.41347 9.00731 9.07392 8.34685 9.88572 8.34685H12.9756C13.3836 8.34685 13.7592 8.50129 14.0332 8.78173C14.3006 9.05546 14.4479 9.4239 14.4479 9.81911V12.909C14.4479 13.7208 13.7874 14.3812 12.9756 14.3812ZM10.515 13.0828C10.7097 13.2726 11.026 13.2726 11.2207 13.0828H11.2207L13.9558 10.4037C14.1505 10.2139 14.1505 9.9024 13.9558 9.7126C13.7611 9.5228 13.4448 9.5228 13.2501 9.7126L10.8679 12.0462L9.63169 10.8368C9.43699 10.647 9.12068 10.647 8.92599 10.8368C8.73129 11.0266 8.73129 11.3381 8.92599 11.5279L10.515 13.0828Z",fill:"#15DAC2"}),jsxRuntimeExports.jsx("path",{d:"M14.4429 6.18033L14.3429 6.18033L14.3429 6.18034L14.4429 6.18033ZM14.0332 8.78173L13.9616 8.85161L13.9616 8.85161L14.0332 8.78173ZM14.4479 12.909L14.3479 12.909L14.3479 12.909L14.4479 12.909ZM11.2207 13.0828V12.9828H11.18L11.1509 13.0112L11.2207 13.0828ZM10.515 13.0828L10.4451 13.1543L10.4452 13.1544L10.515 13.0828ZM11.2207 13.0828V13.1828H11.2616L11.2907 13.1542L11.2207 13.0828ZM13.9558 10.4037L13.886 10.332L13.8859 10.3322L13.9558 10.4037ZM13.9558 9.7126L14.0256 9.64099L14.0256 9.64099L13.9558 9.7126ZM13.2501 9.7126L13.1803 9.64099L13.1802 9.64116L13.2501 9.7126ZM10.8679 12.0462L10.7979 12.1177L10.8679 12.1861L10.9378 12.1176L10.8679 12.0462ZM9.63169 10.8368L9.70162 10.7653L9.70149 10.7652L9.63169 10.8368ZM8.92599 10.8368L8.85619 10.7652L8.85619 10.7652L8.92599 10.8368ZM8.92599 11.5279L8.99593 11.4564L8.99579 11.4563L8.92599 11.5279ZM3.02108 7.75258H6.11099V7.55258H3.02108V7.75258ZM1.44883 6.18033C1.44883 7.04736 2.15405 7.75258 3.02108 7.75258V7.55258C2.26451 7.55258 1.64883 6.9369 1.64883 6.18033H1.44883ZM1.44883 3.09042V6.18033H1.64883V3.09042H1.44883ZM3.02108 1.51816C2.15405 1.51816 1.44883 2.22339 1.44883 3.09042H1.64883C1.64883 2.33384 2.26451 1.71816 3.02108 1.71816V1.51816ZM6.11099 1.51816H3.02108V1.71816H6.11099V1.51816ZM7.68324 3.09042C7.68324 2.22339 6.97802 1.51816 6.11099 1.51816V1.71816C6.86756 1.71816 7.48324 2.33384 7.48324 3.09042H7.68324ZM7.68324 6.18033V3.09042H7.48324V6.18033H7.68324ZM6.11099 7.75258C6.97802 7.75258 7.68324 7.04736 7.68324 6.18033H7.48324C7.48324 6.9369 6.86756 7.55258 6.11099 7.55258V7.75258ZM2.5334 3.09042C2.5334 2.8216 2.75226 2.60274 3.02108 2.60274V2.40274C2.6418 2.40274 2.3334 2.71114 2.3334 3.09042H2.5334ZM2.5334 6.18033V3.09042H2.3334V6.18033H2.5334ZM3.02108 6.66801C2.75226 6.66801 2.5334 6.44915 2.5334 6.18033H2.3334C2.3334 6.5596 2.6418 6.86801 3.02108 6.86801V6.66801ZM6.11099 6.66801H3.02108V6.86801H6.11099V6.66801ZM6.59867 6.18033C6.59867 6.44915 6.37981 6.66801 6.11099 6.66801V6.86801C6.49027 6.86801 6.79867 6.5596 6.79867 6.18033H6.59867ZM6.59867 3.09042V6.18033H6.79867V3.09042H6.59867ZM6.11099 2.60274C6.37981 2.60274 6.59867 2.8216 6.59867 3.09042H6.79867C6.79867 2.71114 6.49027 2.40274 6.11099 2.40274V2.60274ZM3.02108 2.60274H6.11099V2.40274H3.02108V2.60274ZM3.02108 14.4808H6.11099V14.2808H3.02108V14.4808ZM1.44883 12.9086C1.44883 13.7756 2.15405 14.4808 3.02108 14.4808V14.2808C2.26451 14.2808 1.64883 13.6652 1.64883 12.9086H1.44883ZM1.44883 9.81867V12.9086H1.64883V9.81867H1.44883ZM3.02108 8.24642C2.15405 8.24642 1.44883 8.95164 1.44883 9.81867H1.64883C1.64883 9.0621 2.26451 8.44642 3.02108 8.44642V8.24642ZM6.11099 8.24642H3.02108V8.44642H6.11099V8.24642ZM7.68324 9.81867C7.68324 8.95164 6.97802 8.24642 6.11099 8.24642V8.44642C6.86756 8.44642 7.48324 9.0621 7.48324 9.81867H7.68324ZM7.68324 12.9086V9.81867H7.48324V12.9086H7.68324ZM6.11099 14.4808C6.97802 14.4808 7.68324 13.7756 7.68324 12.9086H7.48324C7.48324 13.6652 6.86756 14.2808 6.11099 14.2808V14.4808ZM2.5334 9.81867C2.5334 9.54985 2.75226 9.33099 3.02108 9.33099V9.13099C2.6418 9.13099 2.3334 9.4394 2.3334 9.81867H2.5334ZM2.5334 12.9086V9.81867H2.3334V12.9086H2.5334ZM3.02108 13.3963C2.75226 13.3963 2.5334 13.1774 2.5334 12.9086H2.3334C2.3334 13.2879 2.6418 13.5963 3.02108 13.5963V13.3963ZM6.11099 13.3963H3.02108V13.5963H6.11099V13.3963ZM6.59867 12.9086C6.59867 13.1774 6.37981 13.3963 6.11099 13.3963V13.5963C6.49027 13.5963 6.79867 13.2879 6.79867 12.9086H6.59867ZM6.59867 9.81867V12.9086H6.79867V9.81867H6.59867ZM6.11099 9.33099C6.37981 9.33099 6.59867 9.54985 6.59867 9.81867H6.79867C6.79867 9.4394 6.49027 9.13099 6.11099 9.13099V9.33099ZM3.02108 9.33099H6.11099V9.13099H3.02108V9.33099ZM12.9707 7.55259H9.88078V7.75259H12.9707V7.55259ZM14.3429 6.18034C14.343 6.93691 13.7273 7.55259 12.9707 7.55259V7.75259C13.8377 7.75259 14.543 7.04736 14.5429 6.18033L14.3429 6.18034ZM14.3429 3.09042V6.18033H14.5429V3.09042H14.3429ZM12.9707 1.71817C13.7273 1.71817 14.3429 2.33385 14.3429 3.09042H14.5429C14.5429 2.22339 13.8377 1.51817 12.9707 1.51817V1.71817ZM9.88078 1.71817H12.9707V1.51817H9.88078V1.71817ZM8.50853 3.09042C8.50853 2.33385 9.12423 1.71817 9.88078 1.71817V1.51817C9.01377 1.51817 8.30853 2.22339 8.30853 3.09042H8.50853ZM8.50853 6.18033V3.09042H8.30853V6.18033H8.50853ZM9.88078 7.55259C9.12423 7.55259 8.50853 6.93691 8.50853 6.18033H8.30853C8.30853 7.04736 9.01377 7.75259 9.88078 7.75259V7.55259ZM9.88078 2.40274C9.50152 2.40274 9.1931 2.71114 9.1931 3.09042H9.3931C9.3931 2.82161 9.61198 2.60274 9.88078 2.60274V2.40274ZM12.9707 2.40274H9.88078V2.60274H12.9707V2.40274ZM13.6584 3.09042C13.6584 2.71115 13.35 2.40274 12.9707 2.40274V2.60274C13.2395 2.60274 13.4584 2.8216 13.4584 3.09042H13.6584ZM13.6584 6.18033V3.09042H13.4584V6.18033H13.6584ZM12.9707 6.86801C13.35 6.86801 13.6584 6.55961 13.6584 6.18033H13.4584C13.4584 6.44916 13.2395 6.66801 12.9707 6.66801V6.86801ZM9.88078 6.86801H12.9707V6.66801H9.88078V6.86801ZM9.1931 6.18033C9.1931 6.55961 9.50152 6.86801 9.88078 6.86801V6.66801C9.61198 6.66801 9.3931 6.44915 9.3931 6.18033H9.1931ZM9.1931 3.09042V6.18033H9.3931V3.09042H9.1931ZM9.88572 14.4812H12.9756V14.2812H9.88572V14.4812ZM8.31347 12.909C8.31347 13.776 9.01869 14.4812 9.88572 14.4812V14.2812C9.12915 14.2812 8.51347 13.6656 8.51347 12.909H8.31347ZM8.31347 9.81911V12.909H8.51347V9.81911H8.31347ZM9.88572 8.24685C9.01869 8.24685 8.31347 8.95208 8.31347 9.81911H8.51347C8.51347 9.06254 9.12915 8.44685 9.88572 8.44685V8.24685ZM12.9756 8.24685H9.88572V8.44685H12.9756V8.24685ZM14.1047 8.71185C13.8111 8.41129 13.4093 8.24685 12.9756 8.24685V8.44685C13.3579 8.44685 13.7073 8.59129 13.9616 8.85161L14.1047 8.71185ZM14.5479 9.81911C14.5479 9.39874 14.391 9.00493 14.1047 8.71185L13.9616 8.85161C14.2102 9.10599 14.3479 9.44906 14.3479 9.81911H14.5479ZM14.5479 12.909V9.81911H14.3479V12.909H14.5479ZM12.9756 14.4812C13.8427 14.4812 14.5479 13.776 14.5479 12.909L14.3479 12.909C14.3479 13.6656 13.7322 14.2812 12.9756 14.2812V14.4812ZM11.1509 13.0112C10.995 13.1631 10.7407 13.1631 10.5848 13.0112L10.4452 13.1544C10.6787 13.3821 11.057 13.3821 11.2905 13.1544L11.1509 13.0112ZM11.2207 12.9828H11.2207V13.1828H11.2207V12.9828ZM13.8859 10.3322L11.1508 13.0114L11.2907 13.1542L14.0258 10.4751L13.8859 10.3322ZM13.886 9.7842C14.0405 9.93476 14.0405 10.1815 13.886 10.332L14.0256 10.4753C14.2606 10.2462 14.2606 9.87004 14.0256 9.64099L13.886 9.7842ZM13.3199 9.7842C13.4758 9.63226 13.7302 9.63226 13.886 9.7842L14.0256 9.64099C13.7921 9.41333 13.4139 9.41333 13.1803 9.64099L13.3199 9.7842ZM10.9378 12.1176L13.3201 9.78404L13.1802 9.64116L10.7979 11.9748L10.9378 12.1176ZM9.56176 10.9083L10.7979 12.1177L10.9378 11.9747L9.70162 10.7653L9.56176 10.9083ZM8.99579 10.9084C9.15165 10.7565 9.40603 10.7565 9.56188 10.9084L9.70149 10.7652C9.46795 10.5375 9.08971 10.5376 8.85619 10.7652L8.99579 10.9084ZM8.99579 11.4563C8.84135 11.3057 8.84136 11.059 8.99579 10.9084L8.85619 10.7652C8.62122 10.9942 8.62123 11.3704 8.85618 11.5995L8.99579 11.4563ZM10.5849 13.0113L8.99593 11.4564L8.85605 11.5993L10.4451 13.1543L10.5849 13.0113Z",fill:"#15DAC2"})]}),jsxRuntimeExports.jsx("span",{children:"选择题"}),jsxRuntimeExports.jsx("div",{ref:Tme,children:jsxRuntimeExports.jsx(ActiveSelect,{onClick:()=>{fme("choiceQuestion")},onFromLibraryClick:Lme=>{pme("choiceQuestion",Lme)}})})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M13.334 6V3.33333H2.66732V6H13.334ZM13.334 7.33333H2.66732V12.6667H13.334V7.33333ZM2.00065 2H14.0007C14.3689 2 14.6673 2.29848 14.6673 2.66667V13.3333C14.6673 13.7015 14.3689 14 14.0007 14H2.00065C1.63246 14 1.33398 13.7015 1.33398 13.3333V2.66667C1.33398 2.29848 1.63246 2 2.00065 2ZM3.33398 8H5.33398V11.3333H3.33398V8ZM3.33398 4H4.66732V5.33333H3.33398V4ZM6.00065 4H7.33398V5.33333H6.00065V4Z",fill:"#7251F7"})}),jsxRuntimeExports.jsx("span",{children:"示例演示"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:vme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 2.66634H3.33333V13.333H12.6667V5.33301H10V2.66634ZM2 1.99421C2 1.62904 2.29833 1.33301 2.66567 1.33301H10.6667L13.9998 4.66634L14 13.9947C14 14.3656 13.7034 14.6663 13.3377 14.6663H2.66227C2.29651 14.6663 2 14.3628 2 14.0051V1.99421ZM11.7713 7.99967L9.4142 10.3567L8.4714 9.41387L9.8856 7.99967L8.4714 6.58546L9.4142 5.64265L11.7713 7.99967ZM4.22877 7.99967L6.58579 5.64265L7.5286 6.58546L6.11438 7.99967L7.5286 9.41387L6.58579 10.3567L4.22877 7.99967Z",fill:"#FB973C"})}),jsxRuntimeExports.jsx("span",{children:"编码测验"}),jsxRuntimeExports.jsx("div",{ref:Ame,children:jsxRuntimeExports.jsx(ActiveSelect,{onClick:()=>{fme("codingTest")},onFromLibraryClick:Lme=>{pme("codingTest",Lme)}})})]})]})]})]})},build=(Ff,kh,x_)=>new ReactRenderer(Ff,{editor:kh,props:{editor:kh,emitter:x_}}).element,char="/",ignoreChar=["title"],Slash=Extension.create({name:"Slash",addOptions(){return{char,allowSpaces:!1,startOfLine:!0,render:void 0,tip:null,emitter:null,allow:Ff=>{const kh=Ff.editor.state.doc;let x_=!0;return Ff.editor.isFocused&&kh.nodesBetween(Ff.range.from,Ff.range.to,(B_,$_,$P)=>(ignoreChar.includes(B_.type.name)&&(x_=!1),!1)),x_}}},onBeforeCreate(){this.options.emitter=new EventEmitter,this.options.render=()=>({onBeforeStart:Ff=>{if(this.options.tip)return;const kh=build(SlashMenu,this.editor,this.options.emitter);this.options.tip=tippy(document.body,{getReferenceClientRect:null,content:kh,interactive:!0,trigger:"manual",placement:"bottom",offset:[85,10],duration:[300,300]})},onStart:Ff=>{var kh,x_,B_,$_;console.log((kh=Ff==null?void 0:Ff.clientRect)==null?void 0:kh.call(Ff)),(x_=this.options.tip)==null||x_.setProps({getReferenceClientRect:Ff.clientRect}),(B_=this.options.emitter)==null||B_.emit("show",{node:{type:{name:"paragraph"}},range:Ff.range}),this.editor.chain().hideTip().changeTip(!0).run(),($_=this.options.tip)==null||$_.show()},onExit:Ff=>{var kh;this.editor.chain().changeTip(!1).run(),(kh=this.options.tip)==null||kh.destroy(),this.options.tip=null},onUpdate:Ff=>{var kh;this.editor.chain().changeTip(!1).run(),(kh=this.options.tip)==null||kh.destroy(),this.options.tip=null}})},addCommands(){return{showMenu:()=>()=>{var Ff,kh;return this.editor.chain().hideTip().changeTip(!0).run(),(kh=(Ff=this.options)==null?void 0:Ff.tip)==null||kh.show(),!0},hideMenu:()=>()=>{var Ff,kh;return this.editor.chain().changeTip(!1).run(),(kh=(Ff=this.options)==null?void 0:Ff.tip)==null||kh.destroy(),this.options.tip=null,!0}}},addProseMirrorPlugins(){return[Suggestion({editor:this.editor,...this.options}),new Plugin({key:new PluginKey("slash-whell"),props:{handleDOMEvents:{wheel:()=>{this.editor.commands.hideMenu()}}}})]}});function bail(Ff){if(Ff)throw Ff}/*!
|
|
147
|
+
`+$P):B_.stack=$P}catch{}}throw B_}}_request(kh,x_){typeof kh=="string"?(x_=x_||{},x_.url=kh):x_=kh||{},x_=mergeConfig(this.defaults,x_);const{transitional:B_,paramsSerializer:$_,headers:$P}=x_;B_!==void 0&&validator.assertOptions(B_,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),$_!=null&&(utils$1.isFunction($_)?x_.paramsSerializer={serialize:$_}:validator.assertOptions($_,{encode:validators.function,serialize:validators.function},!0)),x_.method=(x_.method||this.defaults.method||"get").toLowerCase();let zP=$P&&utils$1.merge($P.common,$P[x_.method]);$P&&utils$1.forEach(["delete","get","head","post","put","patch","common"],sme=>{delete $P[sme]}),x_.headers=AxiosHeaders$1.concat(zP,$P);const eme=[];let tme=!0;this.interceptors.request.forEach(function(cme){typeof cme.runWhen=="function"&&cme.runWhen(x_)===!1||(tme=tme&&cme.synchronous,eme.unshift(cme.fulfilled,cme.rejected))});const nme=[];this.interceptors.response.forEach(function(cme){nme.push(cme.fulfilled,cme.rejected)});let rme,ime=0,ame;if(!tme){const sme=[dispatchRequest.bind(this),void 0];for(sme.unshift.apply(sme,eme),sme.push.apply(sme,nme),ame=sme.length,rme=Promise.resolve(x_);ime<ame;)rme=rme.then(sme[ime++],sme[ime++]);return rme}ame=eme.length;let ome=x_;for(ime=0;ime<ame;){const sme=eme[ime++],cme=eme[ime++];try{ome=sme(ome)}catch(lme){cme.call(this,lme);break}}try{rme=dispatchRequest.call(this,ome)}catch(sme){return Promise.reject(sme)}for(ime=0,ame=nme.length;ime<ame;)rme=rme.then(nme[ime++],nme[ime++]);return rme}getUri(kh){kh=mergeConfig(this.defaults,kh);const x_=buildFullPath(kh.baseURL,kh.url);return buildURL(x_,kh.params,kh.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(kh){Axios.prototype[kh]=function(x_,B_){return this.request(mergeConfig(B_||{},{method:kh,url:x_,data:(B_||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(kh){function x_(B_){return function($P,zP,eme){return this.request(mergeConfig(eme||{},{method:kh,headers:B_?{"Content-Type":"multipart/form-data"}:{},url:$P,data:zP}))}}Axios.prototype[kh]=x_(),Axios.prototype[kh+"Form"]=x_(!0)});const Axios$1=Axios;class CancelToken{constructor(kh){if(typeof kh!="function")throw new TypeError("executor must be a function.");let x_;this.promise=new Promise(function($P){x_=$P});const B_=this;this.promise.then($_=>{if(!B_._listeners)return;let $P=B_._listeners.length;for(;$P-- >0;)B_._listeners[$P]($_);B_._listeners=null}),this.promise.then=$_=>{let $P;const zP=new Promise(eme=>{B_.subscribe(eme),$P=eme}).then($_);return zP.cancel=function(){B_.unsubscribe($P)},zP},kh(function($P,zP,eme){B_.reason||(B_.reason=new CanceledError($P,zP,eme),x_(B_.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(kh){if(this.reason){kh(this.reason);return}this._listeners?this._listeners.push(kh):this._listeners=[kh]}unsubscribe(kh){if(!this._listeners)return;const x_=this._listeners.indexOf(kh);x_!==-1&&this._listeners.splice(x_,1)}toAbortSignal(){const kh=new AbortController,x_=B_=>{kh.abort(B_)};return this.subscribe(x_),kh.signal.unsubscribe=()=>this.unsubscribe(x_),kh.signal}static source(){let kh;return{token:new CancelToken(function($_){kh=$_}),cancel:kh}}}const CancelToken$1=CancelToken;function spread(Ff){return function(x_){return Ff.apply(null,x_)}}function isAxiosError(Ff){return utils$1.isObject(Ff)&&Ff.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([Ff,kh])=>{HttpStatusCode[kh]=Ff});const HttpStatusCode$1=HttpStatusCode;function createInstance(Ff){const kh=new Axios$1(Ff),x_=bind(Axios$1.prototype.request,kh);return utils$1.extend(x_,Axios$1.prototype,kh,{allOwnKeys:!0}),utils$1.extend(x_,kh,null,{allOwnKeys:!0}),x_.create=function($_){return createInstance(mergeConfig(Ff,$_))},x_}const axios=createInstance(defaults$2);axios.Axios=Axios$1,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(kh){return Promise.all(kh)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=Ff=>formDataToJSON(utils$1.isHTMLForm(Ff)?new FormData(Ff):Ff),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const upload=async Ff=>{try{return(await axios.post(`${Ff==null?void 0:Ff.url}/oss/upload?ext=${Ff==null?void 0:Ff.ext}`,Ff==null?void 0:Ff.file,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(kh){return kh}},base64ToText=Ff=>{try{const kh=atob(Ff),x_=new Uint8Array(kh.length);for(let $_=0;$_<kh.length;$_++)x_[$_]=kh.charCodeAt($_);return new TextDecoder().decode(x_)}catch{return""}},textToBase64=Ff=>{const x_=new TextEncoder().encode(Ff),B_=String.fromCharCode(...x_);return btoa(B_)},getFileSuffix=Ff=>{const kh=Ff.indexOf(".")>-1?Ff.split("."):[];return kh.length>0?kh[kh.length-1]:""},marks={strong:"bold",emphasis:"italic",delete:"strike",link:"link"},toNodeObj=(Ff,kh)=>{var $_,$P,zP,eme,tme,nme,rme,ime,ame;const x_={};x_.type=Ff==null?void 0:Ff.type;const B_=kh?[...kh]:[];switch(Ff==null?void 0:Ff.type){case"break":x_.type="hardBreak";break;case"linkReference":x_.type="paragraph";break;case"text":x_.text=Ff==null?void 0:Ff.value,B_!=null&&B_.length&&(x_.marks=B_);break;case"heading":x_.attrs={level:Ff==null?void 0:Ff.depth};break;case"list":x_.type=Ff!=null&&Ff.ordered?"orderedList":"bulletList";break;case"listItem":($_=Ff.children)!=null&&$_.length||(x_.content=[{type:"paragraph"}]);break;case"thematicBreak":x_.type="horizontalRule";break;case"image":x_.attrs={src:Ff==null?void 0:Ff.url,alt:Ff==null?void 0:Ff.alt,title:Ff==null?void 0:Ff.title},B_!=null&&B_.length&&(x_.marks=B_);break;case"html":x_.type="paragraph",x_.content=[{type:"text",text:Ff==null?void 0:Ff.value}];break;case"code":(Ff==null?void 0:Ff.props)==="active"?(x_.type="active",x_.attrs={language:Ff==null?void 0:Ff.lang,id:JSON.parse(Ff==null?void 0:Ff.value).id}):(Ff==null?void 0:Ff.props)==="exec"?(x_.type="codeBlock",x_.attrs={language:Ff==null?void 0:Ff.lang,exec:!0},x_.content=Ff!=null&&Ff.value?[{type:"text",text:Ff==null?void 0:Ff.value}]:[]):(x_.type="codeBlock",x_.attrs={language:Ff==null?void 0:Ff.lang},x_.content=Ff!=null&&Ff.value?[{type:"text",text:Ff==null?void 0:Ff.value}]:[]);break;case"inlineCode":x_.type="text",x_.text=Ff==null?void 0:Ff.value,x_.marks=[...B_,{type:"code"}];break;case"tableCell":($P=Ff==null?void 0:Ff.children)!=null&&$P.length?((zP=Ff==null?void 0:Ff.children)==null?void 0:zP.length)===1&&((eme=Ff==null?void 0:Ff.children[0])==null?void 0:eme.type)==="text"&&(Ff.children=[{type:"paragraph",children:Ff==null?void 0:Ff.children}]):x_.content=[{type:"paragraph"}];break;case"blockquote":(tme=Ff==null?void 0:Ff.children)!=null&&tme.length||(x_.content=[{type:"paragraph"}]);break;default:{const ome=Object.keys(marks);if(ome!=null&&ome.includes(Ff==null?void 0:Ff.type))if(Ff.type==="link"&&/\.pdf$/i.test(Ff.url))x_.type="pdf",x_.attrs={pdfUrl:Ff==null?void 0:Ff.url};else{const sme={type:marks[Ff==null?void 0:Ff.type]};Ff.type==="link"&&(sme.attrs={href:Ff==null?void 0:Ff.url,target:"_blank",title:Ff==null?void 0:Ff.title});const cme=Ff==null?void 0:Ff.children;(cme==null?void 0:cme.length)===1&&cme[0].type==="text"?(x_.type="text",x_.text=cme[0].value,x_.marks=[...B_,sme]):(x_.type="fragment",B_.push(sme))}}break}if((nme=Ff==null?void 0:Ff.children)!=null&&nme.length)if((Ff==null?void 0:Ff.type)==="paragraph"&&((rme=Ff==null?void 0:Ff.children)==null?void 0:rme.length)===1&&((ime=Ff==null?void 0:Ff.children[0])==null?void 0:ime.type)==="image"){x_.type="image";const ome=Ff==null?void 0:Ff.children[0];x_.attrs={src:ome==null?void 0:ome.url,alt:ome==null?void 0:ome.alt,title:ome==null?void 0:ome.title}}else x_.content=(ame=Ff==null?void 0:Ff.children)==null?void 0:ame.map(ome=>toNodeObj(ome,B_));return x_.type==="text"&&(x_!=null&&x_.content)&&(x_==null||delete x_.content),x_},toEditorJSON=Ff=>{var x_,B_,$_;const kh={};return kh.type="document",(x_=Ff==null?void 0:Ff.children)!=null&&x_.length&&(kh.content=($_=(B_=Ff==null?void 0:Ff.children)==null?void 0:B_.filter($P=>($P==null?void 0:$P.type)!=="definition"&&($P==null?void 0:$P.type)!=="html"))==null?void 0:$_.map($P=>toNodeObj($P))),kh},marksMD={bold:"strong",italic:"emphasis",strike:"delete",link:"link"},toMDNodeObj=(Ff,kh)=>{var $_,$P,zP,eme,tme,nme,rme,ime,ame,ome,sme,cme,lme,ume,dme,fme,pme,hme,mme,gme,Eme,_me,Tme,vme,Ame,Ome,wme,Lme;const x_={};x_.type=Ff==null?void 0:Ff.type;const B_=kh?[...kh]:[];switch(Ff==null?void 0:Ff.type){case"hardBreak":x_.type="break";break;case"text":{const Pme=($_=Ff==null?void 0:Ff.marks)==null?void 0:$_.length;if(!Pme)x_.value=Ff==null?void 0:Ff.text;else if(Pme===1){const Dme=Ff==null?void 0:Ff.marks[0];(Dme==null?void 0:Dme.type)==="code"?(x_.type="inlineCode",x_.value=Ff==null?void 0:Ff.text):(Dme==null?void 0:Dme.type)==="link"?(x_.type="link",x_.url=($P=Dme==null?void 0:Dme.attrs)==null?void 0:$P.href,x_.title=((zP=Dme==null?void 0:Dme.attrs)==null?void 0:zP.title)||"",x_.children=[{type:"text",value:Ff==null?void 0:Ff.text}]):(B_==null?void 0:B_.length)===0&&marksMD[Dme==null?void 0:Dme.type]?(x_.type=marksMD[Dme==null?void 0:Dme.type],x_.children=[{type:"text",value:Ff==null?void 0:Ff.text}]):x_.value=Ff==null?void 0:Ff.text}else for(let Dme=0;Dme<((eme=Ff==null?void 0:Ff.marks)==null?void 0:eme.length);Dme++){const kme=Ff==null?void 0:Ff.marks[Dme];if(!B_.includes(kme==null?void 0:kme.type)&&marksMD[kme==null?void 0:kme.type]){if(x_.type=marksMD[kme==null?void 0:kme.type],x_.children=[{type:"text",value:Ff==null?void 0:Ff.text}],x_.type==="link"){x_.url=(tme=kme==null?void 0:kme.attrs)==null?void 0:tme.href,x_.title=((nme=kme==null?void 0:kme.attrs)==null?void 0:nme.title)||"";break}}else x_.value=Ff==null?void 0:Ff.text}}break;case"fragment":if((rme=Ff==null?void 0:Ff.content)!=null&&rme.length&&((ame=(ime=Ff==null?void 0:Ff.content[0])==null?void 0:ime.marks)!=null&&ame.length)){const Pme=(ome=Ff==null?void 0:Ff.content[0])==null?void 0:ome.marks,Dme=Pme==null?void 0:Pme.find(Vme=>!(B_!=null&&B_.includes(Vme==null?void 0:Vme.type))),kme=Dme==null?void 0:Dme.type;x_.type=marksMD[kme],kme==="link"&&(x_.url=(sme=Dme==null?void 0:Dme.attrs)==null?void 0:sme.href,x_.title=((cme=Dme==null?void 0:Dme.attrs)==null?void 0:cme.title)||""),B_.push(kme)}else x_.type="paragraph";break;case"heading":x_.depth=(lme=Ff==null?void 0:Ff.attrs)==null?void 0:lme.level;break;case"bulletList":x_.type="list",x_.ordered=!1;break;case"orderedList":x_.type="list",x_.ordered=!0;break;case"horizontalRule":x_.type="thematicBreak";break;case"image":B_!=null&&B_.length?(x_.url=(ume=Ff==null?void 0:Ff.attrs)==null?void 0:ume.src,x_.alt=(dme=Ff==null?void 0:Ff.attrs)==null?void 0:dme.alt,x_.title=(fme=Ff==null?void 0:Ff.attrs)==null?void 0:fme.title):(x_.type="paragraph",x_.children=[{type:"image",url:(pme=Ff==null?void 0:Ff.attrs)==null?void 0:pme.src,alt:(hme=Ff==null?void 0:Ff.attrs)==null?void 0:hme.alt,title:(mme=Ff==null?void 0:Ff.attrs)==null?void 0:mme.title}]);break;case"codeBlock":x_.type="code",x_.lang=(gme=Ff==null?void 0:Ff.attrs)==null?void 0:gme.language,x_.value=(Eme=Ff==null?void 0:Ff.content)!=null&&Eme.length?(_me=Ff==null?void 0:Ff.content[0])==null?void 0:_me.text:"",(Tme=Ff==null?void 0:Ff.attrs)!=null&&Tme.exec&&(x_.props="exec");break;case"active":x_.type="code",x_.lang=(vme=Ff==null?void 0:Ff.attrs)==null?void 0:vme.language,x_.value=JSON.stringify({id:(Ame=Ff==null?void 0:Ff.attrs)==null?void 0:Ame.id}),x_.props="active";break;case"pdf":x_.type="paragraph",x_.children=[{type:"link",url:(Ome=Ff==null?void 0:Ff.attrs)==null?void 0:Ome.pdfUrl}];break}return(wme=Ff==null?void 0:Ff.content)!=null&&wme.length&&(x_.children=(Lme=Ff==null?void 0:Ff.content)==null?void 0:Lme.map(Pme=>toMDNodeObj(Pme,B_))),x_.type==="code"&&(x_!=null&&x_.children)&&(x_==null||delete x_.children),x_},toMarkdownJson=Ff=>{var x_,B_;const kh={};return kh.type="root",(x_=Ff==null?void 0:Ff.content)!=null&&x_.length&&(kh.children=(B_=Ff==null?void 0:Ff.content)==null?void 0:B_.map($_=>toMDNodeObj($_))),kh},normalClass$1="tiptap-menu-item-menus-item",lighClass$1="tiptap-menu-item-menus-item tiptap-menu-item-menus-light";function insertParagraph$1(Ff,kh=2){const{state:x_,view:B_}=Ff,{tr:$_,selection:$P}=x_,zP=Ff.schema.nodes.paragraph.create();$_.insert($P.to+kh,zP),B_.dispatch($_)}const Menu=Ff=>{const kh=React.useContext(shareData),{editor:x_,data:B_}=Ff,[$_,$P]=React.useState(null),[zP,eme]=React.useState(null),tme=(B_==null?void 0:B_.pos)+1||0,nme=()=>{x_==null||x_.chain().focus(tme).setParagraph().hideTip().run()},rme=Ome=>{x_==null||x_.chain().focus(tme).setHeading({level:Ome}).hideTip().run()},ime=()=>{const Ome=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);x_!=null&&x_.chain().focus(tme).setCodeBlock().hideTip().run()&&(Ome||insertParagraph$1(x_,1))},ame=()=>{const Ome=document.createElement("input");Ome.type="file",Ome.accept="image/*",Ome.addEventListener("change",wme=>{const Lme=wme.target.files[0],Pme=Lme.size,Dme=10*1024*1024;if(Pme>Dme)antd.message.warning("图片大小不能超过10Mb!");else{const kme=new FormData;kme.append("file",Lme),upload({url:kh==null?void 0:kh.apiUrl,file:kme,ext:Lme==null?void 0:Lme.name}).then(Vme=>{if(Vme!=null&&Vme.url){const Rme=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);x_!=null&&x_.chain().focus(tme).setImage({src:Vme==null?void 0:Vme.url}).hideTip().run()&&(Rme||insertParagraph$1(x_,0))}}).catch(()=>{antd.message.destroy(),antd.message.error("图片上传失败")})}}),Ome.click()},ome=Ome=>{const wme=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);x_!=null&&x_.chain().focus(tme).insertTable({rows:Ome.row,cols:Ome.col,withHeaderRow:!0}).hideTip().run()&&(wme||insertParagraph$1(x_,4*Ome.row*Ome.col+Ome.row*2-2))},sme=(Ome=!1)=>{Ome?x_==null||x_.chain().focus(tme).toggleOrderedList().hideTip().run():x_==null||x_.chain().focus(tme).toggleBulletList().hideTip().run()},cme=()=>{x_==null||x_.chain().focus(tme).showBubbleMenu({from:tme,to:tme}).hideTip().run()},lme=Ome=>{window.postMessage({type:Ome,value:{pos:tme}}),x_==null||x_.commands.hideTip()},ume=Ome=>{window.postMessage({type:"AddActiveFromLibrary",value:{type:Ome}}),x_==null||x_.commands.hideTip()},dme=()=>{mme()},fme=()=>{x_==null||x_.chain().focus(tme-1).setHorizontalRule().hideTip().run()},pme=()=>{const Ome=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);x_!=null&&x_.chain().focus(tme).setBlockquote().hideTip().run()&&(Ome||insertParagraph$1(x_))},hme=Ome=>{var wme,Lme;return((Lme=(wme=B_==null?void 0:B_.node)==null?void 0:wme.type)==null?void 0:Lme.name)===Ome},mme=()=>{const Ome=document.createElement("input");Ome.type="file",Ome.accept=".pdf",Ome.addEventListener("change",wme=>{const Lme=wme.target.files[0];if((Lme==null?void 0:Lme.type)!=="application/pdf"){antd.message.destroy(),antd.message.error("仅支持上传.pdf结尾的文件");return}if((Lme==null?void 0:Lme.size)>200*1024*1024){antd.message.destroy(),antd.message.error("上传文件不可超过200MB");return}const Pme=new FormData;Pme.append("file",Lme),upload({url:kh==null?void 0:kh.apiUrl,file:Pme,ext:getFileSuffix(Lme==null?void 0:Lme.name)}).then(Dme=>{var Vme,Rme;const kme=x_==null?void 0:x_.view.state.doc.nodeAt(tme+1);(Rme=(Vme=x_==null?void 0:x_.chain().focus(tme))==null?void 0:Vme.setPdf({pdfUrl:Dme==null?void 0:Dme.url}))!=null&&Rme.hideTip().run()&&(kme||insertParagraph$1(x_,1))}).catch(()=>{antd.message.destroy(),antd.message.error("文件上传失败")})}),Ome.click()},gme=Ome=>{var wme,Lme,Pme,Dme;return hme((Lme=(wme=B_==null?void 0:B_.node)==null?void 0:wme.type)==null?void 0:Lme.name)&&((Dme=(Pme=B_==null?void 0:B_.node)==null?void 0:Pme.attrs)==null?void 0:Dme.level)===Ome};React.useEffect(()=>{!$_||!zP||tippy($_,{placement:"right",content:zP,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:500,onTrigger(){$_.classList.add("tiptap-menu-item-list-item-light")},onHide(){$_.classList.remove("tiptap-menu-item-list-item-light")}})},[$_,zP]);const Eme=React.useRef(null),_me=React.useRef(null);React.useEffect(()=>{!Eme.current||!_me.current||tippy(Eme.current,{placement:"right",content:_me.current,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:105,onTrigger(){var Ome;(Ome=Eme.current)==null||Ome.classList.add("tiptap-menu-item-list-item-light")},onHide(){var Ome;(Ome=Eme.current)==null||Ome.classList.remove("tiptap-menu-item-list-item-light")}})},[Eme.current,_me.current]);const Tme=React.useRef(null),vme=React.useRef(null);React.useEffect(()=>{!Tme.current||!vme.current||tippy(Tme.current,{placement:"right",content:vme.current,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:105,onTrigger(){var Ome;(Ome=Tme.current)==null||Ome.classList.add("tiptap-menu-item-list-item-light")},onHide(){var Ome;(Ome=Tme.current)==null||Ome.classList.remove("tiptap-menu-item-list-item-light")}})},[Tme.current,vme.current]);const Ame=window.innerHeight/2-30;return jsxRuntimeExports.jsxs("div",{className:"tiptap-menu tiptap-scroll",style:{maxHeight:Ame,overflowY:"auto"},children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"基础"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-menus",children:[jsxRuntimeExports.jsx("div",{className:hme("paragraph")?lighClass$1:normalClass$1,"data-tip":"正文",onClick:nme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 3.99984V13.9998H7.33398V3.99984H3.33398V2.6665H12.6673V3.99984H8.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(1)?lighClass$1:normalClass$1,"data-tip":"一级标题",onClick:()=>{rme(1)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732V7.33317H7.33398V2.6665H8.66732V13.3332ZM14.001 5.33317V13.3332H12.6677L12.6673 6.8025L11.334 7.15984V5.77984L13.001 5.33317H14.001Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(2)?lighClass$1:normalClass$1,"data-tip":"二级标题",onClick:()=>{rme(2)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2.66536 2.6665V7.33317H7.33203V2.6665H8.66536V13.3332H7.33203V8.6665H2.66536V13.3332H1.33203V2.6665H2.66536ZM12.332 5.33317C13.7128 5.33317 14.832 6.45246 14.832 7.83317C14.832 8.40477 14.6402 8.93157 14.3174 9.35264L14.2188 9.4733L12.0216 11.9998H14.6654V13.3332H9.9987L9.99823 12.2958L13.2125 8.59857C13.3908 8.3937 13.4987 8.12604 13.4987 7.83317C13.4987 7.18884 12.9764 6.6665 12.332 6.6665C11.7199 6.6665 11.2179 7.1379 11.1692 7.7375L11.1654 7.83317H9.83203C9.83203 6.45246 10.9513 5.33317 12.332 5.33317Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(3)?lighClass$1:normalClass$1,"data-tip":"三级标题",onClick:()=>{rme(3)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33317L14.6663 6.6665L12.9963 8.5885C14.0555 8.87877 14.834 9.84837 14.834 10.9998C14.834 12.3806 13.7147 13.4998 12.334 13.4998C11.1167 13.4998 10.1025 12.6298 9.87959 11.4776L11.1887 11.2233C11.2929 11.7607 11.7661 12.1665 12.334 12.1665C12.9783 12.1665 13.5007 11.6442 13.5007 10.9998C13.5007 10.3555 12.9783 9.83317 12.334 9.83317C12.1433 9.83317 11.9633 9.8789 11.8044 9.96004L10.9335 8.92864L12.8996 6.6665H10.0007V5.33317H14.6673ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(4)?lighClass$1:normalClass$1,"data-tip":"四级标题",onClick:()=>{rme(4)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732V7.33317H7.33398V2.6665H8.66732V13.3332ZM14.6673 5.33317V10.6665H15.6673V11.9998H14.6673V13.3332H13.334V11.9998H9.66732V11.1065L13.0007 5.33317H14.6673ZM13.334 7.42184L11.4607 10.6665H13.334V7.42184Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(5)?lighClass$1:normalClass$1,"data-tip":"五级标题",onClick:()=>{rme(5)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33317V6.6665H11.7853L11.4757 8.4237C11.6963 8.36464 11.9281 8.33317 12.1673 8.33317C13.6401 8.33317 14.834 9.5271 14.834 10.9998C14.834 12.4726 13.6401 13.6665 12.1673 13.6665C10.9495 13.6665 9.92245 12.8502 9.60325 11.735L10.8854 11.3678C11.0451 11.9252 11.5586 12.3332 12.1673 12.3332C12.9037 12.3332 13.5007 11.7362 13.5007 10.9998C13.5007 10.2634 12.9037 9.6665 12.1673 9.6665C11.7469 9.6665 11.372 9.86104 11.1276 10.165L9.92085 9.56244L10.6673 5.33317H14.6673ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:gme(6)?lighClass$1:normalClass$1,"data-tip":"六级标题",onClick:()=>{rme(6)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0653 5.33317L12.3333 8.33317C13.8067 8.33317 15.0007 9.5271 15.0007 10.9998C15.0007 12.4726 13.8067 13.6665 12.334 13.6665C10.8613 13.6665 9.66732 12.4726 9.66732 10.9998C9.66732 10.5089 9.79998 10.049 10.0314 9.6539L12.526 5.33317H14.0653ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732ZM12.334 9.6665C11.5976 9.6665 11.0007 10.2634 11.0007 10.9998C11.0007 11.7362 11.5976 12.3332 12.334 12.3332C13.0704 12.3332 13.6673 11.7362 13.6673 10.9998C13.6673 10.2634 13.0704 9.6665 12.334 9.6665Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("bulletList")?lighClass$1:normalClass$1,"data-tip":"无序列表",onClick:()=>{sme(!1)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 2.66683H14V4.00016H5.33333V2.66683ZM3 4.3335C2.44771 4.3335 2 3.88578 2 3.3335C2 2.78121 2.44771 2.3335 3 2.3335C3.55229 2.3335 4 2.78121 4 3.3335C4 3.88578 3.55229 4.3335 3 4.3335ZM3 9.00016C2.44771 9.00016 2 8.55243 2 8.00016C2 7.4479 2.44771 7.00016 3 7.00016C3.55229 7.00016 4 7.4479 4 8.00016C4 8.55243 3.55229 9.00016 3 9.00016ZM3 13.6002C2.44771 13.6002 2 13.1524 2 12.6002C2 12.0479 2.44771 11.6002 3 11.6002C3.55229 11.6002 4 12.0479 4 12.6002C4 13.1524 3.55229 13.6002 3 13.6002ZM5.33333 7.3335H14V8.66683H5.33333V7.3335ZM5.33333 12.0002H14V13.3335H5.33333V12.0002Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("orderedList")?lighClass$1:normalClass$1,"data-tip":"有序列表",onClick:()=>{sme(!0)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 2.66667H14V4H5.33333V2.66667ZM3.33333 2V4H4V4.66667H2V4H2.66667V2.66667H2V2H3.33333ZM2 9.33333V7.66667H3.33333V7.33333H2V6.66667H4V8.33333H2.66667V8.66667H4V9.33333H2ZM3.33333 13H2V12.3333H3.33333V12H2V11.3333H4V14H2V13.3333H3.33333V13ZM5.33333 7.33333H14V8.66667H5.33333V7.33333ZM5.33333 12H14V13.3333H5.33333V12Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("link")?lighClass$1:normalClass$1,"data-tip":"链接",onClick:cme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12.2422 10.357L11.2993 9.41423L12.2422 8.47143C13.5439 7.1697 13.5439 5.05914 12.2422 3.7574C10.9404 2.45565 8.82988 2.45565 7.52815 3.7574L6.58533 4.70021L5.64253 3.7574L6.58533 2.81459C8.40781 0.992142 11.3625 0.992142 13.185 2.81459C15.0074 4.63704 15.0074 7.59183 13.185 9.41423L12.2422 10.357ZM10.3565 12.2427L9.41375 13.1855C7.59135 15.008 4.63655 15.008 2.8141 13.1855C0.991654 11.363 0.991654 8.4083 2.8141 6.58582L3.75691 5.64302L4.69971 6.58582L3.75691 7.52863C2.45516 8.83036 2.45516 10.941 3.75691 12.2427C5.05865 13.5444 7.16921 13.5444 8.47095 12.2427L9.41375 11.2999L10.3565 12.2427ZM9.88515 5.17161L10.8279 6.11442L6.11393 10.8285L5.17112 9.88563L9.88515 5.17161Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("orderedList")?lighClass$1:normalClass$1,"data-tip":"分割线",onClick:fme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.33398 7.3335H2.66732V8.66683H1.33398V7.3335ZM4.00065 7.3335H12.0007V8.66683H4.00065V7.3335ZM13.334 7.3335H14.6673V8.66683H13.334V7.3335Z"})})}),jsxRuntimeExports.jsx("div",{className:hme("orderedList")?lighClass$1:normalClass$1,"data-tip":"引用",onClick:pme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0007 2.00049C14.3689 2.00049 14.6673 2.29897 14.6673 2.66715V12.0005C14.6673 12.3687 14.3689 12.6672 14.0007 12.6672H4.30398L1.33398 15.0005V2.66715C1.33398 2.29897 1.63246 2.00049 2.00065 2.00049H14.0007ZM13.334 3.33382H2.66732V12.2572L3.84287 11.3338H13.334V3.33382ZM7.01085 4.94156L7.30838 5.40075C6.19666 6.00229 6.2161 6.96842 6.2161 7.17682C6.3195 7.16255 6.42803 7.16069 6.53556 7.17069C7.13698 7.22642 7.61105 7.72016 7.61105 8.33382C7.61105 8.97816 7.08872 9.50049 6.44437 9.50049C6.08668 9.50049 5.74464 9.33702 5.52846 9.10749C5.18504 8.74295 5.00065 8.33382 5.00065 7.67062C5.00065 6.50411 5.81948 5.45838 7.01085 4.94156ZM10.3442 4.94156L10.6417 5.40075C9.52998 6.00229 9.54945 6.96842 9.54945 7.17682C9.65285 7.16255 9.76138 7.16069 9.86892 7.17069C10.4703 7.22642 10.9444 7.72016 10.9444 8.33382C10.9444 8.97816 10.4221 9.50049 9.77772 9.50049C9.42005 9.50049 9.07798 9.33702 8.86178 9.10749C8.51838 8.74295 8.33398 8.33382 8.33398 7.67062C8.33398 6.50411 9.15285 5.45838 10.3442 4.94156Z"})})})]})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"常用"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:ime,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M16 8L12.2287 11.7713L11.2859 10.8284L14.1144 8L11.2859 5.17157L12.2287 4.22877L16 8ZM1.88562 8L4.71405 10.8284L3.77123 11.7713L0 8L3.77123 4.22877L4.71405 5.17157L1.88562 8ZM6.52563 14H5.10673L9.4744 2H10.8933L6.52563 14Z",fill:"#14C3FA"})}),jsxRuntimeExports.jsx("span",{children:"可执行代码块"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:ame,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.99518 14C1.63002 14 1.33398 13.7034 1.33398 13.3377V2.66227C1.33398 2.29651 1.63752 2 1.99518 2H14.0061C14.3713 2 14.6673 2.29663 14.6673 2.66227V13.3377C14.6673 13.7035 14.3638 14 14.0061 14H1.99518ZM13.334 10V3.33333H2.66732V12.6667L9.33398 6L13.334 10ZM13.334 11.8856L9.33398 7.8856L4.55294 12.6667H13.334V11.8856ZM5.33398 7.33333C4.5976 7.33333 4.00065 6.7364 4.00065 6C4.00065 5.26362 4.5976 4.66667 5.33398 4.66667C6.07036 4.66667 6.66732 5.26362 6.66732 6C6.66732 6.7364 6.07036 7.33333 5.33398 7.33333Z",fill:"#FBC12D"})}),jsxRuntimeExports.jsx("span",{children:"图片"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:$P,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.33333 6.66667H6.66667V9.33333H9.33333V6.66667ZM10.6667 6.66667V9.33333H12.6667V6.66667H10.6667ZM9.33333 12.6667V10.6667H6.66667V12.6667H9.33333ZM10.6667 12.6667H12.6667V10.6667H10.6667V12.6667ZM9.33333 3.33333H6.66667V5.33333H9.33333V3.33333ZM10.6667 3.33333V5.33333H12.6667V3.33333H10.6667ZM5.33333 6.66667H3.33333V9.33333H5.33333V6.66667ZM5.33333 12.6667V10.6667H3.33333V12.6667H5.33333ZM5.33333 3.33333H3.33333V5.33333H5.33333V3.33333ZM2.66667 2H13.3333C13.7015 2 14 2.29848 14 2.66667V13.3333C14 13.7015 13.7015 14 13.3333 14H2.66667C2.29848 14 2 13.7015 2 13.3333V2.66667C2 2.29848 2.29848 2 2.66667 2Z",fill:"#2DDA9C"})}),jsxRuntimeExports.jsx("span",{children:"表格"}),jsxRuntimeExports.jsx("div",{ref:eme,children:jsxRuntimeExports.jsx(TableSelect,{onClick:ome})})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:dme,children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M2.66667 2.6H7.4V5C7.4 5.68856 7.9781 6.26667 8.66667 6.26667H11.0667V6.76667C11.0667 7.08855 11.3448 7.36667 11.6667 7.36667C11.9886 7.36667 12.2667 7.08855 12.2667 6.76667V4.66667C12.2667 4.50327 12.1865 4.34951 12.1165 4.24453L12.111 4.23629L12.104 4.22929L9.43738 1.56262C9.31201 1.43725 9.14874 1.4 9 1.4H2.66667C1.9781 1.4 1.4 1.9781 1.4 2.66667V13.3333C1.4 14.0219 1.9781 14.6 2.66667 14.6H9.1C9.4219 14.6 9.7 14.3219 9.7 14C9.7 13.6781 9.4219 13.4 9.1 13.4H2.66667C2.6394 13.4 2.62444 13.3913 2.61655 13.3835C2.60866 13.3756 2.6 13.3606 2.6 13.3333V2.66667C2.6 2.6394 2.60866 2.62444 2.61655 2.61655C2.62444 2.60866 2.6394 2.6 2.66667 2.6ZM8.75817 2.6L11.0667 4.94101V5.06667H8.66667C8.6394 5.06667 8.62444 5.05802 8.61655 5.05013C8.60866 5.04223 8.6 5.02727 8.6 5V2.6H8.75817Z",fill:"#3D79EE",stroke:"#3D79EE",strokeWidth:"0.2"}),jsxRuntimeExports.jsx("path",{d:"M5.19934 8.33301C4.99934 8.33301 4.89934 8.36635 4.79934 8.43301C4.69934 8.49968 4.66602 8.63301 4.66602 8.79968V12.033C4.66602 12.133 4.69934 12.233 4.76602 12.333C4.83267 12.3997 4.93267 12.4664 5.09934 12.4664C5.26602 12.4664 5.36602 12.3997 5.43267 12.333C5.49934 12.2664 5.53267 12.1664 5.53267 12.033V11.033H6.03267C6.93267 11.033 7.43267 10.5664 7.43267 9.66635C7.43267 9.23301 7.29934 8.86635 7.06602 8.66635C6.83267 8.43301 6.49934 8.33301 6.03267 8.33301H5.19934ZM6.56602 9.66635C6.56602 9.86635 6.53267 10.033 6.43267 10.0997C6.36602 10.1664 6.19934 10.233 5.99934 10.233H5.49934V9.13301H5.99934C6.19934 9.13301 6.33267 9.16635 6.43267 9.26635C6.53267 9.33301 6.56602 9.46635 6.56602 9.66635ZM10.4327 8.93301C10.2993 8.73301 10.0993 8.59968 9.89934 8.46635C9.66602 8.39968 9.39934 8.33301 9.09934 8.33301H8.13267C7.99934 8.33301 7.86602 8.33301 7.76602 8.46635C7.73267 8.53301 7.69934 8.63301 7.69934 8.76635V11.9997C7.69934 12.133 7.73267 12.233 7.76602 12.2997C7.86602 12.433 7.99934 12.433 8.13267 12.433H9.13267C9.43267 12.433 9.66602 12.3664 9.89934 12.2664C10.0993 12.1664 10.2993 11.9997 10.4327 11.7997C10.566 11.5997 10.666 11.3997 10.7327 11.133C10.7993 10.8997 10.8327 10.633 10.8327 10.3664C10.8327 10.0997 10.7993 9.83301 10.7327 9.59968C10.666 9.36635 10.566 9.13301 10.4327 8.93301ZM9.76602 11.333C9.63267 11.533 9.43267 11.633 9.16602 11.633H8.56602V9.13301H8.99934C9.33267 9.13301 9.59934 9.23301 9.73267 9.43301C9.89934 9.63301 9.96602 9.96635 9.96602 10.3664C9.99934 10.7997 9.89934 11.0997 9.76602 11.333ZM13.2993 8.33301H11.6327C11.4993 8.33301 11.366 8.36635 11.2993 8.43301C11.1993 8.49968 11.166 8.63301 11.166 8.76635V12.033C11.166 12.133 11.1993 12.233 11.266 12.2997C11.3327 12.3997 11.4327 12.433 11.5993 12.433C11.7327 12.433 11.866 12.3997 11.9327 12.2997C11.966 12.233 12.0327 12.1664 12.0327 11.9997V10.6664H13.166C13.366 10.6664 13.5327 10.5664 13.566 10.3997C13.5993 10.2664 13.5993 10.1664 13.566 10.133C13.5327 10.0664 13.466 9.86635 13.166 9.86635H11.9993V9.09968H13.266C13.3993 9.09968 13.4993 9.06635 13.566 9.03301C13.6327 8.99968 13.6993 8.89968 13.6993 8.69968C13.7327 8.49968 13.566 8.33301 13.2993 8.33301Z",fill:"#3D79EE"})]}),jsxRuntimeExports.jsx("span",{children:"PDF"})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"实验活动"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:Eme,children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.11099 7.65258H3.02108C2.20928 7.65258 1.54883 6.99213 1.54883 6.18033V3.09042C1.54883 2.27861 2.20928 1.61816 3.02108 1.61816H6.11099C6.92279 1.61816 7.58324 2.27861 7.58324 3.09042V6.18033C7.58324 6.99213 6.92279 7.65258 6.11099 7.65258ZM3.02108 2.50274C2.69703 2.50274 2.4334 2.76637 2.4334 3.09042V6.18033C2.4334 6.50437 2.69703 6.76801 3.02108 6.76801H6.11099C6.43504 6.76801 6.69867 6.50437 6.69867 6.18033V3.09042C6.69867 2.76637 6.43504 2.50274 6.11099 2.50274H3.02108ZM6.11099 14.3808H3.02108C2.20928 14.3808 1.54883 13.7204 1.54883 12.9086V9.81867C1.54883 9.00687 2.20928 8.34642 3.02108 8.34642H6.11099C6.92279 8.34642 7.58324 9.00687 7.58324 9.81867V12.9086C7.58324 13.7204 6.92279 14.3808 6.11099 14.3808ZM3.02108 9.23099C2.69703 9.23099 2.4334 9.49463 2.4334 9.81867V12.9086C2.4334 13.2326 2.69703 13.4963 3.02108 13.4963H6.11099C6.43504 13.4963 6.69867 13.2326 6.69867 12.9086V9.81867C6.69867 9.49463 6.43504 9.23099 6.11099 9.23099H3.02108ZM9.88078 7.65259H12.9707C13.7825 7.65259 14.443 6.99214 14.4429 6.18033V3.09042C14.4429 2.27862 13.7825 1.61817 12.9707 1.61817H9.88078C9.069 1.61817 8.40853 2.27862 8.40853 3.09042V6.18033C8.40853 6.99214 9.069 7.65259 9.88078 7.65259ZM9.2931 3.09042C9.2931 2.76637 9.55675 2.50274 9.88078 2.50274H12.9707C13.2947 2.50274 13.5584 2.76637 13.5584 3.09042V6.18033C13.5584 6.50438 13.2947 6.76801 12.9707 6.76801H9.88078C9.55675 6.76801 9.2931 6.50438 9.2931 6.18033V3.09042ZM12.9756 14.3812H9.88572C9.07392 14.3812 8.41347 13.7208 8.41347 12.909V9.81911C8.41347 9.00731 9.07392 8.34685 9.88572 8.34685H12.9756C13.3836 8.34685 13.7592 8.50129 14.0332 8.78173C14.3006 9.05546 14.4479 9.4239 14.4479 9.81911V12.909C14.4479 13.7208 13.7874 14.3812 12.9756 14.3812ZM10.515 13.0828C10.7097 13.2726 11.026 13.2726 11.2207 13.0828H11.2207L13.9558 10.4037C14.1505 10.2139 14.1505 9.9024 13.9558 9.7126C13.7611 9.5228 13.4448 9.5228 13.2501 9.7126L10.8679 12.0462L9.63169 10.8368C9.43699 10.647 9.12068 10.647 8.92599 10.8368C8.73129 11.0266 8.73129 11.3381 8.92599 11.5279L10.515 13.0828Z",fill:"#15DAC2"}),jsxRuntimeExports.jsx("path",{d:"M14.4429 6.18033L14.3429 6.18033L14.3429 6.18034L14.4429 6.18033ZM14.0332 8.78173L13.9616 8.85161L13.9616 8.85161L14.0332 8.78173ZM14.4479 12.909L14.3479 12.909L14.3479 12.909L14.4479 12.909ZM11.2207 13.0828V12.9828H11.18L11.1509 13.0112L11.2207 13.0828ZM10.515 13.0828L10.4451 13.1543L10.4452 13.1544L10.515 13.0828ZM11.2207 13.0828V13.1828H11.2616L11.2907 13.1542L11.2207 13.0828ZM13.9558 10.4037L13.886 10.332L13.8859 10.3322L13.9558 10.4037ZM13.9558 9.7126L14.0256 9.64099L14.0256 9.64099L13.9558 9.7126ZM13.2501 9.7126L13.1803 9.64099L13.1802 9.64116L13.2501 9.7126ZM10.8679 12.0462L10.7979 12.1177L10.8679 12.1861L10.9378 12.1176L10.8679 12.0462ZM9.63169 10.8368L9.70162 10.7653L9.70149 10.7652L9.63169 10.8368ZM8.92599 10.8368L8.85619 10.7652L8.85619 10.7652L8.92599 10.8368ZM8.92599 11.5279L8.99593 11.4564L8.99579 11.4563L8.92599 11.5279ZM3.02108 7.75258H6.11099V7.55258H3.02108V7.75258ZM1.44883 6.18033C1.44883 7.04736 2.15405 7.75258 3.02108 7.75258V7.55258C2.26451 7.55258 1.64883 6.9369 1.64883 6.18033H1.44883ZM1.44883 3.09042V6.18033H1.64883V3.09042H1.44883ZM3.02108 1.51816C2.15405 1.51816 1.44883 2.22339 1.44883 3.09042H1.64883C1.64883 2.33384 2.26451 1.71816 3.02108 1.71816V1.51816ZM6.11099 1.51816H3.02108V1.71816H6.11099V1.51816ZM7.68324 3.09042C7.68324 2.22339 6.97802 1.51816 6.11099 1.51816V1.71816C6.86756 1.71816 7.48324 2.33384 7.48324 3.09042H7.68324ZM7.68324 6.18033V3.09042H7.48324V6.18033H7.68324ZM6.11099 7.75258C6.97802 7.75258 7.68324 7.04736 7.68324 6.18033H7.48324C7.48324 6.9369 6.86756 7.55258 6.11099 7.55258V7.75258ZM2.5334 3.09042C2.5334 2.8216 2.75226 2.60274 3.02108 2.60274V2.40274C2.6418 2.40274 2.3334 2.71114 2.3334 3.09042H2.5334ZM2.5334 6.18033V3.09042H2.3334V6.18033H2.5334ZM3.02108 6.66801C2.75226 6.66801 2.5334 6.44915 2.5334 6.18033H2.3334C2.3334 6.5596 2.6418 6.86801 3.02108 6.86801V6.66801ZM6.11099 6.66801H3.02108V6.86801H6.11099V6.66801ZM6.59867 6.18033C6.59867 6.44915 6.37981 6.66801 6.11099 6.66801V6.86801C6.49027 6.86801 6.79867 6.5596 6.79867 6.18033H6.59867ZM6.59867 3.09042V6.18033H6.79867V3.09042H6.59867ZM6.11099 2.60274C6.37981 2.60274 6.59867 2.8216 6.59867 3.09042H6.79867C6.79867 2.71114 6.49027 2.40274 6.11099 2.40274V2.60274ZM3.02108 2.60274H6.11099V2.40274H3.02108V2.60274ZM3.02108 14.4808H6.11099V14.2808H3.02108V14.4808ZM1.44883 12.9086C1.44883 13.7756 2.15405 14.4808 3.02108 14.4808V14.2808C2.26451 14.2808 1.64883 13.6652 1.64883 12.9086H1.44883ZM1.44883 9.81867V12.9086H1.64883V9.81867H1.44883ZM3.02108 8.24642C2.15405 8.24642 1.44883 8.95164 1.44883 9.81867H1.64883C1.64883 9.0621 2.26451 8.44642 3.02108 8.44642V8.24642ZM6.11099 8.24642H3.02108V8.44642H6.11099V8.24642ZM7.68324 9.81867C7.68324 8.95164 6.97802 8.24642 6.11099 8.24642V8.44642C6.86756 8.44642 7.48324 9.0621 7.48324 9.81867H7.68324ZM7.68324 12.9086V9.81867H7.48324V12.9086H7.68324ZM6.11099 14.4808C6.97802 14.4808 7.68324 13.7756 7.68324 12.9086H7.48324C7.48324 13.6652 6.86756 14.2808 6.11099 14.2808V14.4808ZM2.5334 9.81867C2.5334 9.54985 2.75226 9.33099 3.02108 9.33099V9.13099C2.6418 9.13099 2.3334 9.4394 2.3334 9.81867H2.5334ZM2.5334 12.9086V9.81867H2.3334V12.9086H2.5334ZM3.02108 13.3963C2.75226 13.3963 2.5334 13.1774 2.5334 12.9086H2.3334C2.3334 13.2879 2.6418 13.5963 3.02108 13.5963V13.3963ZM6.11099 13.3963H3.02108V13.5963H6.11099V13.3963ZM6.59867 12.9086C6.59867 13.1774 6.37981 13.3963 6.11099 13.3963V13.5963C6.49027 13.5963 6.79867 13.2879 6.79867 12.9086H6.59867ZM6.59867 9.81867V12.9086H6.79867V9.81867H6.59867ZM6.11099 9.33099C6.37981 9.33099 6.59867 9.54985 6.59867 9.81867H6.79867C6.79867 9.4394 6.49027 9.13099 6.11099 9.13099V9.33099ZM3.02108 9.33099H6.11099V9.13099H3.02108V9.33099ZM12.9707 7.55259H9.88078V7.75259H12.9707V7.55259ZM14.3429 6.18034C14.343 6.93691 13.7273 7.55259 12.9707 7.55259V7.75259C13.8377 7.75259 14.543 7.04736 14.5429 6.18033L14.3429 6.18034ZM14.3429 3.09042V6.18033H14.5429V3.09042H14.3429ZM12.9707 1.71817C13.7273 1.71817 14.3429 2.33385 14.3429 3.09042H14.5429C14.5429 2.22339 13.8377 1.51817 12.9707 1.51817V1.71817ZM9.88078 1.71817H12.9707V1.51817H9.88078V1.71817ZM8.50853 3.09042C8.50853 2.33385 9.12423 1.71817 9.88078 1.71817V1.51817C9.01377 1.51817 8.30853 2.22339 8.30853 3.09042H8.50853ZM8.50853 6.18033V3.09042H8.30853V6.18033H8.50853ZM9.88078 7.55259C9.12423 7.55259 8.50853 6.93691 8.50853 6.18033H8.30853C8.30853 7.04736 9.01377 7.75259 9.88078 7.75259V7.55259ZM9.88078 2.40274C9.50152 2.40274 9.1931 2.71114 9.1931 3.09042H9.3931C9.3931 2.82161 9.61198 2.60274 9.88078 2.60274V2.40274ZM12.9707 2.40274H9.88078V2.60274H12.9707V2.40274ZM13.6584 3.09042C13.6584 2.71115 13.35 2.40274 12.9707 2.40274V2.60274C13.2395 2.60274 13.4584 2.8216 13.4584 3.09042H13.6584ZM13.6584 6.18033V3.09042H13.4584V6.18033H13.6584ZM12.9707 6.86801C13.35 6.86801 13.6584 6.55961 13.6584 6.18033H13.4584C13.4584 6.44916 13.2395 6.66801 12.9707 6.66801V6.86801ZM9.88078 6.86801H12.9707V6.66801H9.88078V6.86801ZM9.1931 6.18033C9.1931 6.55961 9.50152 6.86801 9.88078 6.86801V6.66801C9.61198 6.66801 9.3931 6.44915 9.3931 6.18033H9.1931ZM9.1931 3.09042V6.18033H9.3931V3.09042H9.1931ZM9.88572 14.4812H12.9756V14.2812H9.88572V14.4812ZM8.31347 12.909C8.31347 13.776 9.01869 14.4812 9.88572 14.4812V14.2812C9.12915 14.2812 8.51347 13.6656 8.51347 12.909H8.31347ZM8.31347 9.81911V12.909H8.51347V9.81911H8.31347ZM9.88572 8.24685C9.01869 8.24685 8.31347 8.95208 8.31347 9.81911H8.51347C8.51347 9.06254 9.12915 8.44685 9.88572 8.44685V8.24685ZM12.9756 8.24685H9.88572V8.44685H12.9756V8.24685ZM14.1047 8.71185C13.8111 8.41129 13.4093 8.24685 12.9756 8.24685V8.44685C13.3579 8.44685 13.7073 8.59129 13.9616 8.85161L14.1047 8.71185ZM14.5479 9.81911C14.5479 9.39874 14.391 9.00493 14.1047 8.71185L13.9616 8.85161C14.2102 9.10599 14.3479 9.44906 14.3479 9.81911H14.5479ZM14.5479 12.909V9.81911H14.3479V12.909H14.5479ZM12.9756 14.4812C13.8427 14.4812 14.5479 13.776 14.5479 12.909L14.3479 12.909C14.3479 13.6656 13.7322 14.2812 12.9756 14.2812V14.4812ZM11.1509 13.0112C10.995 13.1631 10.7407 13.1631 10.5848 13.0112L10.4452 13.1544C10.6787 13.3821 11.057 13.3821 11.2905 13.1544L11.1509 13.0112ZM11.2207 12.9828H11.2207V13.1828H11.2207V12.9828ZM13.8859 10.3322L11.1508 13.0114L11.2907 13.1542L14.0258 10.4751L13.8859 10.3322ZM13.886 9.7842C14.0405 9.93476 14.0405 10.1815 13.886 10.332L14.0256 10.4753C14.2606 10.2462 14.2606 9.87004 14.0256 9.64099L13.886 9.7842ZM13.3199 9.7842C13.4758 9.63226 13.7302 9.63226 13.886 9.7842L14.0256 9.64099C13.7921 9.41333 13.4139 9.41333 13.1803 9.64099L13.3199 9.7842ZM10.9378 12.1176L13.3201 9.78404L13.1802 9.64116L10.7979 11.9748L10.9378 12.1176ZM9.56176 10.9083L10.7979 12.1177L10.9378 11.9747L9.70162 10.7653L9.56176 10.9083ZM8.99579 10.9084C9.15165 10.7565 9.40603 10.7565 9.56188 10.9084L9.70149 10.7652C9.46795 10.5375 9.08971 10.5376 8.85619 10.7652L8.99579 10.9084ZM8.99579 11.4563C8.84135 11.3057 8.84136 11.059 8.99579 10.9084L8.85619 10.7652C8.62122 10.9942 8.62123 11.3704 8.85618 11.5995L8.99579 11.4563ZM10.5849 13.0113L8.99593 11.4564L8.85605 11.5993L10.4451 13.1543L10.5849 13.0113Z",fill:"#15DAC2"})]}),jsxRuntimeExports.jsx("span",{children:"选择题"}),jsxRuntimeExports.jsx("div",{ref:_me,children:jsxRuntimeExports.jsx(ActiveSelect,{onClick:()=>{lme("choiceQuestion")},onFromLibraryClick:()=>{ume("choiceQuestion")}})})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M13.334 6V3.33333H2.66732V6H13.334ZM13.334 7.33333H2.66732V12.6667H13.334V7.33333ZM2.00065 2H14.0007C14.3689 2 14.6673 2.29848 14.6673 2.66667V13.3333C14.6673 13.7015 14.3689 14 14.0007 14H2.00065C1.63246 14 1.33398 13.7015 1.33398 13.3333V2.66667C1.33398 2.29848 1.63246 2 2.00065 2ZM3.33398 8H5.33398V11.3333H3.33398V8ZM3.33398 4H4.66732V5.33333H3.33398V4ZM6.00065 4H7.33398V5.33333H6.00065V4Z",fill:"#7251F7"})}),jsxRuntimeExports.jsx("span",{children:"示例演示"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:Tme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 2.66634H3.33333V13.333H12.6667V5.33301H10V2.66634ZM2 1.99421C2 1.62904 2.29833 1.33301 2.66567 1.33301H10.6667L13.9998 4.66634L14 13.9947C14 14.3656 13.7034 14.6663 13.3377 14.6663H2.66227C2.29651 14.6663 2 14.3628 2 14.0051V1.99421ZM11.7713 7.99967L9.4142 10.3567L8.4714 9.41387L9.8856 7.99967L8.4714 6.58546L9.4142 5.64265L11.7713 7.99967ZM4.22877 7.99967L6.58579 5.64265L7.5286 6.58546L6.11438 7.99967L7.5286 9.41387L6.58579 10.3567L4.22877 7.99967Z",fill:"#FB973C"})}),jsxRuntimeExports.jsx("span",{children:"编码测验"}),jsxRuntimeExports.jsx("div",{ref:vme,children:jsxRuntimeExports.jsx(ActiveSelect,{onClick:()=>{lme("codingTest")},onFromLibraryClick:()=>{ume("codingTest")}})})]})]})]})]})},ChangeMenu=Ff=>{const{editor:kh,data:x_}=Ff;x_.pos+1;const B_=()=>{const{range:$P}=x_;kh==null||kh.chain().deleteRange($P).hideTip().run()},$_=()=>{const $P=kh==null?void 0:kh.view.nodeDOM(x_.pos),zP="text/html",eme=new Blob([$P==null?void 0:$P.outerHTML],{type:zP}),tme=[new ClipboardItem({[zP]:eme})];navigator.clipboard.write(tme),kh==null||kh.commands.hideTip()};return jsxRuntimeExports.jsxs("div",{className:"tiptap-changemenu",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-changemenu-item tiptap-changemenu-item-del",onClick:B_,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11.332 3.99967H14.6654V5.33301H13.332V13.9997C13.332 14.3679 13.0336 14.6663 12.6654 14.6663H3.33203C2.96384 14.6663 2.66536 14.3679 2.66536 13.9997V5.33301H1.33203V3.99967H4.66536V1.99967C4.66536 1.63149 4.96384 1.33301 5.33203 1.33301H10.6654C11.0336 1.33301 11.332 1.63149 11.332 1.99967V3.99967ZM11.9987 5.33301H3.9987V13.333H11.9987V5.33301ZM5.9987 7.33301H7.33203V11.333H5.9987V7.33301ZM8.66537 7.33301H9.9987V11.333H8.66537V7.33301ZM5.9987 2.66634V3.99967H9.9987V2.66634H5.9987Z"})}),jsxRuntimeExports.jsx("span",{children:"删除"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-changemenu-item",onClick:$_,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M4.66653 3.99967V1.99967C4.66653 1.63149 4.96501 1.33301 5.3332 1.33301H13.3332C13.7014 1.33301 13.9999 1.63149 13.9999 1.99967V11.333C13.9999 11.7012 13.7014 11.9997 13.3332 11.9997H11.3332V13.9991C11.3332 14.3676 11.0333 14.6663 10.662 14.6663H2.67111C2.30039 14.6663 2 14.3699 2 13.9991L2.00173 4.66692C2.0018 4.29841 2.30176 3.99967 2.67295 3.99967H4.66653ZM3.33495 5.33301L3.33346 13.333H9.99987V5.33301H3.33495ZM5.99987 3.99967H11.3332V10.6663H12.6665V2.66634H5.99987V3.99967Z",fill:"#999999"})}),jsxRuntimeExports.jsx("span",{children:"复制"})]})]})},Tip=Ff=>{const{editor:kh,emitter:x_}=Ff,[B_,$_]=React.useState(null),[$P,zP]=React.useState(null),[eme,tme]=React.useState(null),[nme,rme]=React.useState(null),[ime,ame]=React.useState({}),[ome,sme]=React.useState("add");return React.useEffect(()=>{if(!B_||!$P)return;const cme=tippy(B_,{placement:"bottom-start",content:$P,interactive:!0,trigger:"mouseenter focus click focusin",onTrigger(lme,ume){kh==null||kh.commands.changeTip(!0)},onHide(lme){kh==null||kh.commands.changeTip(!1)}});return()=>{cme.unmount(),cme.destroy()}},[B_,$P]),React.useEffect(()=>{if(!eme||!nme)return;const cme=tippy(eme,{placement:"bottom-start",content:nme,interactive:!0,duration:[300,300],onTrigger(lme,ume){kh==null||kh.commands.changeTip(!0)},onHide(lme){kh==null||kh.commands.changeTip(!1)}});return()=>{cme.unmount(),cme.destroy()}},[eme,nme]),React.useEffect(()=>{x_==null||x_.on("hover",cme=>{ame({...cme})}),x_==null||x_.on("type",({type:cme})=>{cme==="add"?sme("add"):cme==="content"&&sme("content")})},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ome==="add"?jsxRuntimeExports.jsxs("div",{className:"floatingmenu-tip",ref:$_,children:[jsxRuntimeExports.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6.5625 6.5625V9.9375C6.5625 10.0867 6.50324 10.2298 6.39775 10.3352C6.29226 10.4407 6.14918 10.5 6 10.5C5.85082 10.5 5.70774 10.4407 5.60225 10.3352C5.49676 10.2298 5.4375 10.0867 5.4375 9.9375V6.5625H2.0625C1.91332 6.5625 1.77024 6.50324 1.66475 6.39775C1.55926 6.29226 1.5 6.14918 1.5 6C1.5 5.85082 1.55926 5.70774 1.66475 5.60225C1.77024 5.49676 1.91332 5.4375 2.0625 5.4375H5.4375V2.0625C5.4375 1.91332 5.49676 1.77024 5.60225 1.66475C5.70774 1.55926 5.85082 1.5 6 1.5C6.14918 1.5 6.29226 1.55926 6.39775 1.66475C6.50324 1.77024 6.5625 1.91332 6.5625 2.0625V5.4375H9.9375C10.0867 5.4375 10.2298 5.49676 10.3352 5.60225C10.4407 5.70774 10.5 5.85082 10.5 6C10.5 6.14918 10.4407 6.29226 10.3352 6.39775C10.2298 6.50324 10.0867 6.5625 9.9375 6.5625H6.5625Z",fill:"#999999"})}),jsxRuntimeExports.jsx("div",{ref:zP,children:jsxRuntimeExports.jsx(Menu,{editor:kh,data:ime})})]}):jsxRuntimeExports.jsxs("div",{className:"floatingmenu-tip",ref:tme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.07432 2.59277C5.40059 2.59277 5.72366 2.65704 6.02509 2.78189C6.32652 2.90675 6.60041 3.08975 6.83111 3.32046C7.06181 3.55116 7.24482 3.82505 7.36968 4.12648C7.49453 4.42791 7.5588 4.75098 7.5588 5.07725V7.56173H5.07432C4.74805 7.56173 4.42498 7.49746 4.12355 7.37261C3.82212 7.24775 3.54824 7.06474 3.31753 6.83404C3.08683 6.60333 2.90382 6.32945 2.77896 6.02802C2.65411 5.72659 2.58984 5.40352 2.58984 5.07725C2.58984 4.75098 2.65411 4.42791 2.77896 4.12648C2.90382 3.82505 3.08683 3.55116 3.31753 3.32046C3.54824 3.08975 3.82212 2.90675 4.12355 2.78189C4.42498 2.65704 4.74805 2.59277 5.07432 2.59277ZM6.68192 6.68485V5.07725C6.68192 4.7593 6.58764 4.44848 6.41099 4.18411C6.23435 3.91974 5.98327 3.71369 5.68952 3.59202C5.39577 3.47034 5.07254 3.43851 4.76069 3.50054C4.44885 3.56257 4.1624 3.71568 3.93757 3.9405C3.71275 4.16533 3.55964 4.45178 3.49761 4.76362C3.43558 5.07547 3.46741 5.3987 3.58909 5.69245C3.71076 5.9862 3.91682 6.23728 4.18118 6.41392C4.44555 6.59057 4.75637 6.68485 5.07432 6.68485H6.68192ZM10.9201 2.59277C11.2464 2.59277 11.5695 2.65704 11.8709 2.78189C12.1723 2.90675 12.4462 3.08975 12.6769 3.32046C12.9076 3.55116 13.0906 3.82505 13.2155 4.12648C13.3404 4.42791 13.4046 4.75098 13.4046 5.07725C13.4046 5.40352 13.3404 5.72659 13.2155 6.02802C13.0906 6.32945 12.9076 6.60333 12.6769 6.83404C12.4462 7.06474 12.1723 7.24775 11.8709 7.37261C11.5695 7.49746 11.2464 7.56173 10.9201 7.56173H8.43567V5.07725C8.43567 4.75098 8.49993 4.42791 8.62479 4.12648C8.74965 3.82505 8.93265 3.55116 9.16336 3.32046C9.39406 3.08975 9.66795 2.90675 9.96938 2.78189C10.2708 2.65704 10.5939 2.59277 10.9201 2.59277ZM9.31254 6.68485H10.9201C11.2381 6.68485 11.5489 6.59057 11.8133 6.41392C12.0777 6.23728 12.2837 5.9862 12.4054 5.69245C12.5271 5.3987 12.5589 5.07547 12.4969 4.76362C12.4348 4.45178 12.2817 4.16533 12.0569 3.9405C11.8321 3.71568 11.5456 3.56257 11.2338 3.50054C10.9219 3.43851 10.5987 3.47034 10.3049 3.59202C10.0112 3.71369 9.76012 3.91974 9.58347 4.18411C9.40683 4.44848 9.31254 4.7593 9.31254 5.07725V6.68485ZM5.07432 13.4076C4.4154 13.4076 3.78346 13.1458 3.31753 12.6799C2.8516 12.2139 2.58984 11.582 2.58984 10.9231C2.58984 10.2642 2.8516 9.63222 3.31753 9.16629C3.78346 8.70036 4.4154 8.4386 5.07432 8.4386H7.5588V10.9231C7.5588 11.2493 7.49453 11.5724 7.36968 11.8738C7.24482 12.1753 7.06181 12.4492 6.83111 12.6799C6.60041 12.9106 6.32652 13.0936 6.02509 13.2184C5.72366 13.3433 5.40059 13.4076 5.07432 13.4076ZM6.68192 9.31547H5.07432C4.75637 9.31547 4.44555 9.40976 4.18118 9.5864C3.91682 9.76305 3.71076 10.0141 3.58909 10.3079C3.46741 10.6016 3.43558 10.9249 3.49761 11.2367C3.55964 11.5485 3.71275 11.835 3.93757 12.0598C4.1624 12.2847 4.44885 12.4378 4.76069 12.4998C5.07254 12.5618 5.39577 12.53 5.68952 12.4083C5.98327 12.2866 6.23435 12.0806 6.41099 11.8162C6.58764 11.5518 6.68192 11.241 6.68192 10.9231V9.31547ZM10.9201 13.4076C10.5939 13.4076 10.2708 13.3433 9.96938 13.2184C9.66795 13.0936 9.39406 12.9106 9.16336 12.6799C8.93265 12.4492 8.74965 12.1753 8.62479 11.8738C8.49993 11.5724 8.43567 11.2493 8.43567 10.9231V8.4386H10.9201C11.5791 8.4386 12.211 8.70036 12.6769 9.16629C13.1429 9.63222 13.4046 10.2642 13.4046 10.9231C13.4046 11.582 13.1429 12.2139 12.6769 12.6799C12.211 13.1458 11.5791 13.4076 10.9201 13.4076ZM9.31254 9.31547V10.9231C9.31254 11.241 9.40683 11.5518 9.58347 11.8162C9.76012 12.0806 10.0112 12.2866 10.3049 12.4083C10.5987 12.53 10.9219 12.5618 11.2338 12.4998C11.5456 12.4378 11.8321 12.2847 12.0569 12.0598C12.2817 11.835 12.4348 11.5485 12.4969 11.2367C12.5589 10.9249 12.5271 10.6016 12.4054 10.3079C12.2837 10.0141 12.0777 9.76305 11.8133 9.5864C11.5489 9.40976 11.2381 9.31547 10.9201 9.31547H9.31254Z",fill:"#999999"})}),jsxRuntimeExports.jsx("div",{ref:rme,children:jsxRuntimeExports.jsx(ChangeMenu,{editor:kh,data:ime})})]})})};class EventEmitter{constructor(){tEe(this,"callbacks",{})}on(kh,x_){return this.callbacks[kh]||(this.callbacks[kh]=[]),this.callbacks[kh].push(x_),this}emit(kh,...x_){const B_=this.callbacks[kh];return B_&&B_.forEach($_=>$_.apply(this,x_)),this}off(kh,x_){const B_=this.callbacks[kh];return B_&&(x_?this.callbacks[kh]=B_.filter($_=>$_!==x_):delete this.callbacks[kh]),this}removeAllListeners(){this.callbacks={}}}const allowTypes=["paragraph","heading","horizontalRule","blockquote","codeBlock","image","table"];class Handle{constructor(kh,x_,B_,$_=[]){tEe(this,"editor");tEe(this,"tippy");tEe(this,"component");tEe(this,"tippyOptions");tEe(this,"ignoreType");tEe(this,"isShow");tEe(this,"emitter");tEe(this,"lastPos",null);tEe(this,"prevent",!1);this.editor=kh,this.tippy=null,this.component=x_,this.tippyOptions=B_,this.ignoreType=$_,this.isShow=!1,this.emitter=new EventEmitter}build(){return new ReactRenderer(this.component,{editor:this.editor,props:{editor:this.editor,emitter:this.emitter}}).element}createTippy(kh=!1){var B_,$_,$P;if(!kh&&this.tippy)return;const x_=this.build();this.tippy=tippy(document.body,{duration:0,getReferenceClientRect:null,content:x_,interactive:!0,trigger:"manual",placement:"left-start",hideOnClick:"toggle",...this.tippyOptions}),($P=($_=(B_=this.editor)==null?void 0:B_.view)==null?void 0:$_.dom.parentElement)==null||$P.addEventListener("mouseleave",this.mouseLeave.bind(this))}mouseLeave(){setTimeout(()=>{this.hide()},10)}show(){var kh;this.prevent||((kh=this.tippy)==null||kh.show(),this.isShow=!0)}hide(){var kh;this.prevent||((kh=this.tippy)==null||kh.hide(),this.lastPos=null,this.isShow=!1)}setProps(kh){var x_;(x_=this.tippy)==null||x_.setProps(kh)}setPrevent(kh){this.prevent=kh}move(kh,x_){var ame;if(this.prevent)return;this.createTippy();const{state:B_}=kh,{doc:$_,selection:$P}=B_,zP=kh==null?void 0:kh.posAtCoords({left:x_==null?void 0:x_.clientX,top:x_==null?void 0:x_.clientY});if(!zP)return!1;const{pos:eme,inside:tme}=zP;let nme=!1,rme=!0;const ime=(ame=document.getElementById("ylz-editor-container"))==null?void 0:ame.getBoundingClientRect();$_.descendants((ome,sme,cme,lme)=>{if(eme>=sme&&eme<sme+ome.nodeSize){if(eme!==this.lastPos){this.lastPos=eme,this.emitter.emit("hover",{node:ome,pos:sme,range:{from:sme,to:sme+ome.nodeSize}});const ume=posToDOMRect(kh,sme,sme+ome.nodeSize);ome.type.name==="horizontalRule"?((ume.top-10<((ime==null?void 0:ime.top)||0)||ume.top+6>((ime==null?void 0:ime.bottom)||0))&&(nme=!0),this.setProps({getReferenceClientRect:()=>({...ume,top:ume.top-10})})):((ume.top+6<((ime==null?void 0:ime.top)||0)||ume.top+22>((ime==null?void 0:ime.bottom)||0))&&(nme=!0),this.setProps({getReferenceClientRect:()=>({...ume,top:ume.top+6})}))}else rme=!1;ome.type.name!=="paragraph"?this.emitter.emit("type",{type:"content"}):this.emitter.emit("type",{type:"add"}),allowTypes.includes(ome.type.name)||(nme=!0),this.ignoreType.includes(ome.type.name)&&(nme=!0)}return!1}),rme&&(nme?this.hide():this.show())}destroy(){var kh,x_,B_,$_;(kh=this.tippy)==null||kh.destroy(),($_=(B_=(x_=this.editor)==null?void 0:x_.view)==null?void 0:B_.dom.parentElement)==null||$_.removeEventListener("mouseleave",this.mouseLeave),this.tippy=null,this.isShow=!1,this.lastPos=null}}const FloatingMenu=Extension.create({name:"floatingMenu",addOptions(){return{pluginKey:this.name,tip:null}},onBeforeCreate(){this.options.tip=new Handle(this.editor,Tip,{},["title","pdf","active"])},addCommands(){return{showTip:()=>()=>{var Ff,kh,x_;return(x_=(kh=(Ff=this.options)==null?void 0:Ff.tip)==null?void 0:kh.tippy)==null||x_.show(),!0},hideTip:()=>()=>{var Ff,kh,x_;return(x_=(kh=(Ff=this.options)==null?void 0:Ff.tip)==null?void 0:kh.tippy)==null||x_.hide(),!0},changeTip:(Ff=!0)=>()=>{var kh;return(kh=this.options.tip)==null||kh.setPrevent(Ff),!0}}},addProseMirrorPlugins(){return[FloatingMenuPlugin({editor:this.editor,...this.options})]}}),inputRegex=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Image$1=Node$1.create({name:"image",addOptions(){return{oss:"",inline:!1,allowBase64:!1,HTMLAttributes:{class:"tiptap-image"}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:Ff}){return["img",mergeAttributes(this.options.HTMLAttributes,Ff)]},addCommands(){return{setImage:Ff=>({commands:kh})=>kh.insertContent({type:this.name,attrs:Ff})}},addKeyboardShortcuts(){return{"Mod-v":()=>{var kh,x_;const Ff=this;(x_=(kh=navigator==null?void 0:navigator.clipboard)==null?void 0:kh.read())==null||x_.then(async B_=>{var $_,$P;for(const zP of B_)if(($_=zP==null?void 0:zP.types)!=null&&$_.includes("text/html")){const eme=await(zP==null?void 0:zP.getType("text/html")),tme=new FileReader;tme.onloadend=async()=>{var rme;if(!tme.result.startsWith("<img")){for(const ime of zP==null?void 0:zP.types)if(ime!=null&&ime.includes("image")){const ame=await zP.getType(ime),ome=new Date().getTime(),sme=new File([ame],ome.toString().substring(0,4)),cme=new FormData;cme.append("file",sme),upload({url:(rme=Ff.options)==null?void 0:rme.oss,file:cme,ext:"png"}).then(lme=>{if(lme!=null&&lme.url)return Ff.editor.commands.setImage({src:lme==null?void 0:lme.url})})}}},tme.readAsText(eme)}else for(const eme of zP==null?void 0:zP.types)if(eme!=null&&eme.includes("image")){const tme=await zP.getType(eme),nme=new Date().getTime(),rme=new File([tme],nme.toString().substring(0,4)),ime=new FormData;ime.append("file",rme),upload({url:($P=Ff.options)==null?void 0:$P.oss,file:ime,ext:"png"}).then(ame=>{if(ame!=null&&ame.url)return Ff.editor.commands.setImage({src:ame==null?void 0:ame.url})})}}).catch(B_=>{console.error("获取剪切板内容失败:",B_)})}}},addInputRules(){return[nodeInputRule({find:inputRegex,type:this.type,getAttributes:Ff=>{const[,,kh,x_,B_]=Ff;return{src:x_,alt:kh,title:B_}}})]}});function findSuggestionMatch(Ff){var kh;const{char:x_,allowSpaces:B_,allowedPrefixes:$_,startOfLine:$P,$position:zP}=Ff,eme=escapeForRegEx(x_),tme=new RegExp(`\\s${eme}$`),nme=$P?"^":"",rme=B_?new RegExp(`${nme}${eme}.*?(?=\\s${eme}|$)`,"gm"):new RegExp(`${nme}(?:^)?${eme}[^\\s${eme}]*`,"gm"),ime=((kh=zP.nodeBefore)===null||kh===void 0?void 0:kh.isText)&&zP.nodeBefore.text;if(!ime)return null;const ame=zP.pos-ime.length,ome=Array.from(ime.matchAll(rme)).pop();if(!ome||ome.input===void 0||ome.index===void 0)return null;const sme=ome.input.slice(Math.max(0,ome.index-1),ome.index),cme=new RegExp(`^[${$_==null?void 0:$_.join("")}\0]?$`).test(sme);if($_!==null&&!cme)return null;const lme=ame+ome.index;let ume=lme+ome[0].length;return B_&&tme.test(ime.slice(ume-1,ume+1))&&(ome[0]+=" ",ume+=1),lme<zP.pos&&ume>=zP.pos?{range:{from:lme,to:ume},query:ome[0].slice(x_.length),text:ome[0]}:null}const SuggestionPluginKey=new PluginKey("suggestion");function Suggestion({pluginKey:Ff=SuggestionPluginKey,editor:kh,char:x_="@",allowSpaces:B_=!1,allowedPrefixes:$_=[" "],startOfLine:$P=!1,decorationTag:zP="span",decorationClass:eme="suggestion",command:tme=()=>null,items:nme=()=>[],render:rme=()=>({}),allow:ime=()=>!0,findSuggestionMatch:ame=findSuggestionMatch}){let ome;const sme=rme==null?void 0:rme(),cme=new Plugin({key:Ff,view(){return{update:async(lme,ume)=>{var dme,fme,pme,hme,mme,gme,Eme;const _me=(dme=this.key)===null||dme===void 0?void 0:dme.getState(ume),Tme=(fme=this.key)===null||fme===void 0?void 0:fme.getState(lme.state),vme=_me.active&&Tme.active&&_me.range.from!==Tme.range.from,Ame=!_me.active&&Tme.active,Ome=_me.active&&!Tme.active,wme=!Ame&&!Ome&&_me.query!==Tme.query,Lme=Ame||vme,Pme=wme&&!vme,Dme=Ome||vme;if(!Lme&&!Pme&&!Dme)return;const kme=Dme&&!Lme?_me:Tme,Vme=lme.dom.querySelector(`[data-decoration-id="${kme.decorationId}"]`);ome={editor:kh,range:kme.range,query:kme.query,text:kme.text,items:[],command:Rme=>{tme({editor:kh,range:kme.range,props:Rme})},decorationNode:Vme,clientRect:Vme?()=>{var Rme;const{decorationId:Fme}=(Rme=this.key)===null||Rme===void 0?void 0:Rme.getState(kh.state),Bme=lme.dom.querySelector(`[data-decoration-id="${Fme}"]`);return(Bme==null?void 0:Bme.getBoundingClientRect())||null}:null},Lme&&((pme=sme==null?void 0:sme.onBeforeStart)===null||pme===void 0||pme.call(sme,ome)),Pme&&((hme=sme==null?void 0:sme.onBeforeUpdate)===null||hme===void 0||hme.call(sme,ome)),(Pme||Lme)&&(ome.items=await nme({editor:kh,query:kme.query})),Dme&&((mme=sme==null?void 0:sme.onExit)===null||mme===void 0||mme.call(sme,ome)),Pme&&((gme=sme==null?void 0:sme.onUpdate)===null||gme===void 0||gme.call(sme,ome)),Lme&&((Eme=sme==null?void 0:sme.onStart)===null||Eme===void 0||Eme.call(sme,ome))},destroy:()=>{var lme;ome&&((lme=sme==null?void 0:sme.onExit)===null||lme===void 0||lme.call(sme,ome))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(lme,ume,dme,fme){const{isEditable:pme}=kh,{composing:hme}=kh.view,{selection:mme}=lme,{empty:gme,from:Eme}=mme,_me={...ume};if(_me.composing=hme,pme&&(gme||kh.view.composing)){(Eme<ume.range.from||Eme>ume.range.to)&&!hme&&!ume.composing&&(_me.active=!1);const Tme=ame({char:x_,allowSpaces:B_,allowedPrefixes:$_,startOfLine:$P,$position:mme.$from}),vme=`id_${Math.floor(Math.random()*4294967295)}`;Tme&&ime({editor:kh,state:fme,range:Tme.range})?(_me.active=!0,_me.decorationId=ume.decorationId?ume.decorationId:vme,_me.range=Tme.range,_me.query=Tme.query,_me.text=Tme.text):_me.active=!1}else _me.active=!1;return _me.active||(_me.decorationId=null,_me.range={from:0,to:0},_me.query=null,_me.text=null),_me}},props:{handleKeyDown(lme,ume){var dme;const{active:fme,range:pme}=cme.getState(lme.state);return fme&&((dme=sme==null?void 0:sme.onKeyDown)===null||dme===void 0?void 0:dme.call(sme,{view:lme,event:ume,range:pme}))||!1},decorations(lme){const{active:ume,range:dme,decorationId:fme}=cme.getState(lme);return ume?DecorationSet.create(lme.doc,[Decoration.inline(dme.from,dme.to,{nodeName:zP,class:eme,"data-decoration-id":fme})]):null}}});return cme}const normalClass="tiptap-menu-item-menus-item",lighClass="tiptap-menu-item-menus-item tiptap-menu-item-menus-light";function insertParagraph(Ff,kh=2){const{state:x_,view:B_}=Ff,{tr:$_,selection:$P}=x_,zP=Ff.schema.nodes.paragraph.create();$_.insert($P.to+kh,zP),B_.dispatch($_)}const SlashMenu=Ff=>{var wme;const kh=React.useContext(shareData),{editor:x_,emitter:B_}=Ff,[$_,$P]=React.useState(null),[zP,eme]=React.useState(null),[tme,nme]=React.useState({}),rme=React.useRef(null);React.useEffect(()=>{B_==null||B_.on("show",Lme=>{nme({...Lme})})},[]);const ime=((wme=tme==null?void 0:tme.range)==null?void 0:wme.from)+1||0,ame=()=>{x_==null||x_.chain().focus(ime).deleteRange(tme.range).setParagraph().hideMenu().run()},ome=Lme=>{x_==null||x_.chain().focus(ime).deleteRange(tme.range).setHeading({level:Lme}).hideMenu().run()},sme=()=>{const Lme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);x_!=null&&x_.chain().focus(ime).deleteRange(tme.range).setCodeBlock().hideMenu().run()&&(Lme||insertParagraph(x_,1))},cme=()=>{const Lme=document.createElement("input");Lme.type="file",Lme.accept="image/*",Lme.addEventListener("change",Pme=>{const Dme=Pme.target.files[0],kme=Dme.size,Vme=10*1024*1024;if(kme>Vme)antd.message.warning("图片大小不能超过10Mb!");else{const Rme=new FormData;Rme.append("file",Dme),upload({url:kh==null?void 0:kh.apiUrl,file:Rme,ext:Dme==null?void 0:Dme.name}).then(Fme=>{if(Fme!=null&&Fme.url){const Bme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);x_!=null&&x_.chain().focus(ime).deleteRange(tme.range).setImage({src:Fme==null?void 0:Fme.url}).hideMenu().run()&&(Bme||insertParagraph(x_,0))}}).catch(()=>{antd.message.destroy(),antd.message.error("图片上传失败")})}}),Lme.click()},lme=Lme=>{const Pme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);x_!=null&&x_.chain().focus(ime).deleteRange(tme.range).insertTable({rows:Lme.row,cols:Lme.col,withHeaderRow:!0}).hideMenu().run()&&(Pme||insertParagraph(x_,4*Lme.row*Lme.col+Lme.row*2-2))},ume=(Lme=!1)=>{Lme?x_==null||x_.chain().focus(ime).deleteRange(tme.range).toggleOrderedList().hideMenu().run():x_==null||x_.chain().focus(ime).deleteRange(tme.range).toggleBulletList().hideMenu().run()},dme=()=>{x_==null||x_.chain().focus(ime).deleteRange(tme.range).showBubbleMenu({from:ime,to:ime}).hideMenu().run()},fme=Lme=>{var Pme;x_==null||x_.chain().focus(ime).deleteRange(tme.range).hideMenu().run(),window.postMessage({type:Lme,value:{pos:(Pme=tme==null?void 0:tme.range)==null?void 0:Pme.from}})},pme=Lme=>{x_==null||x_.chain().focus(ime).deleteRange(tme.range).hideMenu().run(),window.postMessage({type:"AddActiveFromLibrary",value:{type:Lme}})},hme=()=>{mme()},mme=()=>{const Lme=document.createElement("input");Lme.type="file",Lme.accept=".pdf",Lme.addEventListener("change",Pme=>{const Dme=Pme.target.files[0];if((Dme==null?void 0:Dme.type)!=="application/pdf"){antd.message.destroy(),antd.message.error("仅支持上传.pdf结尾的文件");return}if((Dme==null?void 0:Dme.size)>200*1024*1024){antd.message.destroy(),antd.message.error("上传文件不可超过200MB");return}const kme=new FormData;kme.append("file",Dme),upload({url:kh==null?void 0:kh.apiUrl,file:kme,ext:getFileSuffix(Dme==null?void 0:Dme.name)}).then(Vme=>{var Fme,Bme;const Rme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);(Bme=(Fme=x_==null?void 0:x_.chain().focus(ime))==null?void 0:Fme.deleteRange(tme.range).setPdf({pdfUrl:Vme==null?void 0:Vme.url}))!=null&&Bme.hideMenu().run()&&(Rme||insertParagraph(x_,1))}).catch(()=>{antd.message.destroy(),antd.message.error("文件上传失败")})}),Lme.click()},gme=()=>{x_==null||x_.chain().deleteRange(tme.range).focus(ime+1).setHorizontalRule().hideMenu().run()},Eme=()=>{const Lme=x_==null?void 0:x_.view.state.doc.nodeAt(ime+1);x_!=null&&x_.chain().focus(ime).deleteRange(tme.range).setBlockquote().hideMenu().run()&&(Lme||insertParagraph(x_))};React.useEffect(()=>{!$_||!zP||tippy($_,{placement:"right",content:zP,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:500,onTrigger(){$_.classList.add("tiptap-menu-item-list-item-light")},onHide(){$_.classList.remove("tiptap-menu-item-list-item-light")}})},[$_,zP]);const _me=React.useRef(null),Tme=React.useRef(null);React.useEffect(()=>{!_me.current||!Tme.current||tippy(_me.current,{placement:"right",content:Tme.current,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:105,onTrigger(){var Lme;(Lme=_me.current)==null||Lme.classList.add("tiptap-menu-item-list-item-light")},onHide(){var Lme;(Lme=_me.current)==null||Lme.classList.remove("tiptap-menu-item-list-item-light")}})},[_me.current,Tme.current]);const vme=React.useRef(null),Ame=React.useRef(null);React.useEffect(()=>{!vme.current||!Ame.current||tippy(vme.current,{placement:"right",content:Ame.current,interactive:!0,duration:[300,300],interactiveBorder:10,interactiveDebounce:75,maxWidth:105,onTrigger(){var Lme;(Lme=vme.current)==null||Lme.classList.add("tiptap-menu-item-list-item-light")},onHide(){var Lme;(Lme=vme.current)==null||Lme.classList.remove("tiptap-menu-item-list-item-light")}})},[vme.current,Ame.current]);const Ome=window.innerHeight/2-30;return jsxRuntimeExports.jsxs("div",{className:"tiptap-menu tiptap-scroll",style:{maxHeight:Ome,overflowY:"auto"},ref:rme,children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"基础"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-menus",children:[jsxRuntimeExports.jsx("div",{className:lighClass,"data-tip":"正文",onClick:ame,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 3.99984V13.9998H7.33398V3.99984H3.33398V2.6665H12.6673V3.99984H8.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"一级标题",onClick:()=>{ome(1)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732V7.33317H7.33398V2.6665H8.66732V13.3332ZM14.001 5.33317V13.3332H12.6677L12.6673 6.8025L11.334 7.15984V5.77984L13.001 5.33317H14.001Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"二级标题",onClick:()=>{ome(2)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2.66536 2.6665V7.33317H7.33203V2.6665H8.66536V13.3332H7.33203V8.6665H2.66536V13.3332H1.33203V2.6665H2.66536ZM12.332 5.33317C13.7128 5.33317 14.832 6.45246 14.832 7.83317C14.832 8.40477 14.6402 8.93157 14.3174 9.35264L14.2188 9.4733L12.0216 11.9998H14.6654V13.3332H9.9987L9.99823 12.2958L13.2125 8.59857C13.3908 8.3937 13.4987 8.12604 13.4987 7.83317C13.4987 7.18884 12.9764 6.6665 12.332 6.6665C11.7199 6.6665 11.2179 7.1379 11.1692 7.7375L11.1654 7.83317H9.83203C9.83203 6.45246 10.9513 5.33317 12.332 5.33317Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"三级标题",onClick:()=>{ome(3)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33317L14.6663 6.6665L12.9963 8.5885C14.0555 8.87877 14.834 9.84837 14.834 10.9998C14.834 12.3806 13.7147 13.4998 12.334 13.4998C11.1167 13.4998 10.1025 12.6298 9.87959 11.4776L11.1887 11.2233C11.2929 11.7607 11.7661 12.1665 12.334 12.1665C12.9783 12.1665 13.5007 11.6442 13.5007 10.9998C13.5007 10.3555 12.9783 9.83317 12.334 9.83317C12.1433 9.83317 11.9633 9.8789 11.8044 9.96004L10.9335 8.92864L12.8996 6.6665H10.0007V5.33317H14.6673ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"四级标题",onClick:()=>{ome(4)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732V7.33317H7.33398V2.6665H8.66732V13.3332ZM14.6673 5.33317V10.6665H15.6673V11.9998H14.6673V13.3332H13.334V11.9998H9.66732V11.1065L13.0007 5.33317H14.6673ZM13.334 7.42184L11.4607 10.6665H13.334V7.42184Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"五级标题",onClick:()=>{ome(5)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33317V6.6665H11.7853L11.4757 8.4237C11.6963 8.36464 11.9281 8.33317 12.1673 8.33317C13.6401 8.33317 14.834 9.5271 14.834 10.9998C14.834 12.4726 13.6401 13.6665 12.1673 13.6665C10.9495 13.6665 9.92245 12.8502 9.60325 11.735L10.8854 11.3678C11.0451 11.9252 11.5586 12.3332 12.1673 12.3332C12.9037 12.3332 13.5007 11.7362 13.5007 10.9998C13.5007 10.2634 12.9037 9.6665 12.1673 9.6665C11.7469 9.6665 11.372 9.86104 11.1276 10.165L9.92085 9.56244L10.6673 5.33317H14.6673ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:normalClass,"data-tip":"六级标题",onClick:()=>{ome(6)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0653 5.33317L12.3333 8.33317C13.8067 8.33317 15.0007 9.5271 15.0007 10.9998C15.0007 12.4726 13.8067 13.6665 12.334 13.6665C10.8613 13.6665 9.66732 12.4726 9.66732 10.9998C9.66732 10.5089 9.79998 10.049 10.0314 9.6539L12.526 5.33317H14.0653ZM2.66732 2.6665V7.33317H7.33398V2.6665H8.66732V13.3332H7.33398V8.6665H2.66732V13.3332H1.33398V2.6665H2.66732ZM12.334 9.6665C11.5976 9.6665 11.0007 10.2634 11.0007 10.9998C11.0007 11.7362 11.5976 12.3332 12.334 12.3332C13.0704 12.3332 13.6673 11.7362 13.6673 10.9998C13.6673 10.2634 13.0704 9.6665 12.334 9.6665Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"无序列表",onClick:()=>{ume(!1)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 2.66683H14V4.00016H5.33333V2.66683ZM3 4.3335C2.44771 4.3335 2 3.88578 2 3.3335C2 2.78121 2.44771 2.3335 3 2.3335C3.55229 2.3335 4 2.78121 4 3.3335C4 3.88578 3.55229 4.3335 3 4.3335ZM3 9.00016C2.44771 9.00016 2 8.55243 2 8.00016C2 7.4479 2.44771 7.00016 3 7.00016C3.55229 7.00016 4 7.4479 4 8.00016C4 8.55243 3.55229 9.00016 3 9.00016ZM3 13.6002C2.44771 13.6002 2 13.1524 2 12.6002C2 12.0479 2.44771 11.6002 3 11.6002C3.55229 11.6002 4 12.0479 4 12.6002C4 13.1524 3.55229 13.6002 3 13.6002ZM5.33333 7.3335H14V8.66683H5.33333V7.3335ZM5.33333 12.0002H14V13.3335H5.33333V12.0002Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"有序列表",onClick:()=>{ume(!0)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 2.66667H14V4H5.33333V2.66667ZM3.33333 2V4H4V4.66667H2V4H2.66667V2.66667H2V2H3.33333ZM2 9.33333V7.66667H3.33333V7.33333H2V6.66667H4V8.33333H2.66667V8.66667H4V9.33333H2ZM3.33333 13H2V12.3333H3.33333V12H2V11.3333H4V14H2V13.3333H3.33333V13ZM5.33333 7.33333H14V8.66667H5.33333V7.33333ZM5.33333 12H14V13.3333H5.33333V12Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"链接",onClick:dme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12.2422 10.357L11.2993 9.41423L12.2422 8.47143C13.5439 7.1697 13.5439 5.05914 12.2422 3.7574C10.9404 2.45565 8.82988 2.45565 7.52815 3.7574L6.58533 4.70021L5.64253 3.7574L6.58533 2.81459C8.40781 0.992142 11.3625 0.992142 13.185 2.81459C15.0074 4.63704 15.0074 7.59183 13.185 9.41423L12.2422 10.357ZM10.3565 12.2427L9.41375 13.1855C7.59135 15.008 4.63655 15.008 2.8141 13.1855C0.991654 11.363 0.991654 8.4083 2.8141 6.58582L3.75691 5.64302L4.69971 6.58582L3.75691 7.52863C2.45516 8.83036 2.45516 10.941 3.75691 12.2427C5.05865 13.5444 7.16921 13.5444 8.47095 12.2427L9.41375 11.2999L10.3565 12.2427ZM9.88515 5.17161L10.8279 6.11442L6.11393 10.8285L5.17112 9.88563L9.88515 5.17161Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"分割线",onClick:gme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.33398 7.3335H2.66732V8.66683H1.33398V7.3335ZM4.00065 7.3335H12.0007V8.66683H4.00065V7.3335ZM13.334 7.3335H14.6673V8.66683H13.334V7.3335Z"})})}),jsxRuntimeExports.jsx("div",{className:"tiptap-menu-item-menus-item","data-tip":"引用",onClick:Eme,children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0007 2.00049C14.3689 2.00049 14.6673 2.29897 14.6673 2.66715V12.0005C14.6673 12.3687 14.3689 12.6672 14.0007 12.6672H4.30398L1.33398 15.0005V2.66715C1.33398 2.29897 1.63246 2.00049 2.00065 2.00049H14.0007ZM13.334 3.33382H2.66732V12.2572L3.84287 11.3338H13.334V3.33382ZM7.01085 4.94156L7.30838 5.40075C6.19666 6.00229 6.2161 6.96842 6.2161 7.17682C6.3195 7.16255 6.42803 7.16069 6.53556 7.17069C7.13698 7.22642 7.61105 7.72016 7.61105 8.33382C7.61105 8.97816 7.08872 9.50049 6.44437 9.50049C6.08668 9.50049 5.74464 9.33702 5.52846 9.10749C5.18504 8.74295 5.00065 8.33382 5.00065 7.67062C5.00065 6.50411 5.81948 5.45838 7.01085 4.94156ZM10.3442 4.94156L10.6417 5.40075C9.52998 6.00229 9.54945 6.96842 9.54945 7.17682C9.65285 7.16255 9.76138 7.16069 9.86892 7.17069C10.4703 7.22642 10.9444 7.72016 10.9444 8.33382C10.9444 8.97816 10.4221 9.50049 9.77772 9.50049C9.42005 9.50049 9.07798 9.33702 8.86178 9.10749C8.51838 8.74295 8.33398 8.33382 8.33398 7.67062C8.33398 6.50411 9.15285 5.45838 10.3442 4.94156Z"})})})]})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"常用"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:sme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M16 8L12.2287 11.7713L11.2859 10.8284L14.1144 8L11.2859 5.17157L12.2287 4.22877L16 8ZM1.88562 8L4.71405 10.8284L3.77123 11.7713L0 8L3.77123 4.22877L4.71405 5.17157L1.88562 8ZM6.52563 14H5.10673L9.4744 2H10.8933L6.52563 14Z",fill:"#14C3FA"})}),jsxRuntimeExports.jsx("span",{children:"可执行代码块"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:cme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.99518 14C1.63002 14 1.33398 13.7034 1.33398 13.3377V2.66227C1.33398 2.29651 1.63752 2 1.99518 2H14.0061C14.3713 2 14.6673 2.29663 14.6673 2.66227V13.3377C14.6673 13.7035 14.3638 14 14.0061 14H1.99518ZM13.334 10V3.33333H2.66732V12.6667L9.33398 6L13.334 10ZM13.334 11.8856L9.33398 7.8856L4.55294 12.6667H13.334V11.8856ZM5.33398 7.33333C4.5976 7.33333 4.00065 6.7364 4.00065 6C4.00065 5.26362 4.5976 4.66667 5.33398 4.66667C6.07036 4.66667 6.66732 5.26362 6.66732 6C6.66732 6.7364 6.07036 7.33333 5.33398 7.33333Z",fill:"#FBC12D"})}),jsxRuntimeExports.jsx("span",{children:"图片"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:$P,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.33333 6.66667H6.66667V9.33333H9.33333V6.66667ZM10.6667 6.66667V9.33333H12.6667V6.66667H10.6667ZM9.33333 12.6667V10.6667H6.66667V12.6667H9.33333ZM10.6667 12.6667H12.6667V10.6667H10.6667V12.6667ZM9.33333 3.33333H6.66667V5.33333H9.33333V3.33333ZM10.6667 3.33333V5.33333H12.6667V3.33333H10.6667ZM5.33333 6.66667H3.33333V9.33333H5.33333V6.66667ZM5.33333 12.6667V10.6667H3.33333V12.6667H5.33333ZM5.33333 3.33333H3.33333V5.33333H5.33333V3.33333ZM2.66667 2H13.3333C13.7015 2 14 2.29848 14 2.66667V13.3333C14 13.7015 13.7015 14 13.3333 14H2.66667C2.29848 14 2 13.7015 2 13.3333V2.66667C2 2.29848 2.29848 2 2.66667 2Z",fill:"#2DDA9C"})}),jsxRuntimeExports.jsx("span",{children:"表格"}),jsxRuntimeExports.jsx("div",{ref:eme,children:jsxRuntimeExports.jsx(TableSelect,{onClick:lme})})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",onClick:hme,children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M2.66667 2.6H7.4V5C7.4 5.68856 7.9781 6.26667 8.66667 6.26667H11.0667V6.76667C11.0667 7.08855 11.3448 7.36667 11.6667 7.36667C11.9886 7.36667 12.2667 7.08855 12.2667 6.76667V4.66667C12.2667 4.50327 12.1865 4.34951 12.1165 4.24453L12.111 4.23629L12.104 4.22929L9.43738 1.56262C9.31201 1.43725 9.14874 1.4 9 1.4H2.66667C1.9781 1.4 1.4 1.9781 1.4 2.66667V13.3333C1.4 14.0219 1.9781 14.6 2.66667 14.6H9.1C9.4219 14.6 9.7 14.3219 9.7 14C9.7 13.6781 9.4219 13.4 9.1 13.4H2.66667C2.6394 13.4 2.62444 13.3913 2.61655 13.3835C2.60866 13.3756 2.6 13.3606 2.6 13.3333V2.66667C2.6 2.6394 2.60866 2.62444 2.61655 2.61655C2.62444 2.60866 2.6394 2.6 2.66667 2.6ZM8.75817 2.6L11.0667 4.94101V5.06667H8.66667C8.6394 5.06667 8.62444 5.05802 8.61655 5.05013C8.60866 5.04223 8.6 5.02727 8.6 5V2.6H8.75817Z",fill:"#3D79EE",stroke:"#3D79EE",strokeWidth:"0.2"}),jsxRuntimeExports.jsx("path",{d:"M5.19934 8.33301C4.99934 8.33301 4.89934 8.36635 4.79934 8.43301C4.69934 8.49968 4.66602 8.63301 4.66602 8.79968V12.033C4.66602 12.133 4.69934 12.233 4.76602 12.333C4.83267 12.3997 4.93267 12.4664 5.09934 12.4664C5.26602 12.4664 5.36602 12.3997 5.43267 12.333C5.49934 12.2664 5.53267 12.1664 5.53267 12.033V11.033H6.03267C6.93267 11.033 7.43267 10.5664 7.43267 9.66635C7.43267 9.23301 7.29934 8.86635 7.06602 8.66635C6.83267 8.43301 6.49934 8.33301 6.03267 8.33301H5.19934ZM6.56602 9.66635C6.56602 9.86635 6.53267 10.033 6.43267 10.0997C6.36602 10.1664 6.19934 10.233 5.99934 10.233H5.49934V9.13301H5.99934C6.19934 9.13301 6.33267 9.16635 6.43267 9.26635C6.53267 9.33301 6.56602 9.46635 6.56602 9.66635ZM10.4327 8.93301C10.2993 8.73301 10.0993 8.59968 9.89934 8.46635C9.66602 8.39968 9.39934 8.33301 9.09934 8.33301H8.13267C7.99934 8.33301 7.86602 8.33301 7.76602 8.46635C7.73267 8.53301 7.69934 8.63301 7.69934 8.76635V11.9997C7.69934 12.133 7.73267 12.233 7.76602 12.2997C7.86602 12.433 7.99934 12.433 8.13267 12.433H9.13267C9.43267 12.433 9.66602 12.3664 9.89934 12.2664C10.0993 12.1664 10.2993 11.9997 10.4327 11.7997C10.566 11.5997 10.666 11.3997 10.7327 11.133C10.7993 10.8997 10.8327 10.633 10.8327 10.3664C10.8327 10.0997 10.7993 9.83301 10.7327 9.59968C10.666 9.36635 10.566 9.13301 10.4327 8.93301ZM9.76602 11.333C9.63267 11.533 9.43267 11.633 9.16602 11.633H8.56602V9.13301H8.99934C9.33267 9.13301 9.59934 9.23301 9.73267 9.43301C9.89934 9.63301 9.96602 9.96635 9.96602 10.3664C9.99934 10.7997 9.89934 11.0997 9.76602 11.333ZM13.2993 8.33301H11.6327C11.4993 8.33301 11.366 8.36635 11.2993 8.43301C11.1993 8.49968 11.166 8.63301 11.166 8.76635V12.033C11.166 12.133 11.1993 12.233 11.266 12.2997C11.3327 12.3997 11.4327 12.433 11.5993 12.433C11.7327 12.433 11.866 12.3997 11.9327 12.2997C11.966 12.233 12.0327 12.1664 12.0327 11.9997V10.6664H13.166C13.366 10.6664 13.5327 10.5664 13.566 10.3997C13.5993 10.2664 13.5993 10.1664 13.566 10.133C13.5327 10.0664 13.466 9.86635 13.166 9.86635H11.9993V9.09968H13.266C13.3993 9.09968 13.4993 9.06635 13.566 9.03301C13.6327 8.99968 13.6993 8.89968 13.6993 8.69968C13.7327 8.49968 13.566 8.33301 13.2993 8.33301Z",fill:"#3D79EE"})]}),jsxRuntimeExports.jsx("span",{children:"PDF"})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-menu-item-title",children:"实验活动"}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:_me,children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.11099 7.65258H3.02108C2.20928 7.65258 1.54883 6.99213 1.54883 6.18033V3.09042C1.54883 2.27861 2.20928 1.61816 3.02108 1.61816H6.11099C6.92279 1.61816 7.58324 2.27861 7.58324 3.09042V6.18033C7.58324 6.99213 6.92279 7.65258 6.11099 7.65258ZM3.02108 2.50274C2.69703 2.50274 2.4334 2.76637 2.4334 3.09042V6.18033C2.4334 6.50437 2.69703 6.76801 3.02108 6.76801H6.11099C6.43504 6.76801 6.69867 6.50437 6.69867 6.18033V3.09042C6.69867 2.76637 6.43504 2.50274 6.11099 2.50274H3.02108ZM6.11099 14.3808H3.02108C2.20928 14.3808 1.54883 13.7204 1.54883 12.9086V9.81867C1.54883 9.00687 2.20928 8.34642 3.02108 8.34642H6.11099C6.92279 8.34642 7.58324 9.00687 7.58324 9.81867V12.9086C7.58324 13.7204 6.92279 14.3808 6.11099 14.3808ZM3.02108 9.23099C2.69703 9.23099 2.4334 9.49463 2.4334 9.81867V12.9086C2.4334 13.2326 2.69703 13.4963 3.02108 13.4963H6.11099C6.43504 13.4963 6.69867 13.2326 6.69867 12.9086V9.81867C6.69867 9.49463 6.43504 9.23099 6.11099 9.23099H3.02108ZM9.88078 7.65259H12.9707C13.7825 7.65259 14.443 6.99214 14.4429 6.18033V3.09042C14.4429 2.27862 13.7825 1.61817 12.9707 1.61817H9.88078C9.069 1.61817 8.40853 2.27862 8.40853 3.09042V6.18033C8.40853 6.99214 9.069 7.65259 9.88078 7.65259ZM9.2931 3.09042C9.2931 2.76637 9.55675 2.50274 9.88078 2.50274H12.9707C13.2947 2.50274 13.5584 2.76637 13.5584 3.09042V6.18033C13.5584 6.50438 13.2947 6.76801 12.9707 6.76801H9.88078C9.55675 6.76801 9.2931 6.50438 9.2931 6.18033V3.09042ZM12.9756 14.3812H9.88572C9.07392 14.3812 8.41347 13.7208 8.41347 12.909V9.81911C8.41347 9.00731 9.07392 8.34685 9.88572 8.34685H12.9756C13.3836 8.34685 13.7592 8.50129 14.0332 8.78173C14.3006 9.05546 14.4479 9.4239 14.4479 9.81911V12.909C14.4479 13.7208 13.7874 14.3812 12.9756 14.3812ZM10.515 13.0828C10.7097 13.2726 11.026 13.2726 11.2207 13.0828H11.2207L13.9558 10.4037C14.1505 10.2139 14.1505 9.9024 13.9558 9.7126C13.7611 9.5228 13.4448 9.5228 13.2501 9.7126L10.8679 12.0462L9.63169 10.8368C9.43699 10.647 9.12068 10.647 8.92599 10.8368C8.73129 11.0266 8.73129 11.3381 8.92599 11.5279L10.515 13.0828Z",fill:"#15DAC2"}),jsxRuntimeExports.jsx("path",{d:"M14.4429 6.18033L14.3429 6.18033L14.3429 6.18034L14.4429 6.18033ZM14.0332 8.78173L13.9616 8.85161L13.9616 8.85161L14.0332 8.78173ZM14.4479 12.909L14.3479 12.909L14.3479 12.909L14.4479 12.909ZM11.2207 13.0828V12.9828H11.18L11.1509 13.0112L11.2207 13.0828ZM10.515 13.0828L10.4451 13.1543L10.4452 13.1544L10.515 13.0828ZM11.2207 13.0828V13.1828H11.2616L11.2907 13.1542L11.2207 13.0828ZM13.9558 10.4037L13.886 10.332L13.8859 10.3322L13.9558 10.4037ZM13.9558 9.7126L14.0256 9.64099L14.0256 9.64099L13.9558 9.7126ZM13.2501 9.7126L13.1803 9.64099L13.1802 9.64116L13.2501 9.7126ZM10.8679 12.0462L10.7979 12.1177L10.8679 12.1861L10.9378 12.1176L10.8679 12.0462ZM9.63169 10.8368L9.70162 10.7653L9.70149 10.7652L9.63169 10.8368ZM8.92599 10.8368L8.85619 10.7652L8.85619 10.7652L8.92599 10.8368ZM8.92599 11.5279L8.99593 11.4564L8.99579 11.4563L8.92599 11.5279ZM3.02108 7.75258H6.11099V7.55258H3.02108V7.75258ZM1.44883 6.18033C1.44883 7.04736 2.15405 7.75258 3.02108 7.75258V7.55258C2.26451 7.55258 1.64883 6.9369 1.64883 6.18033H1.44883ZM1.44883 3.09042V6.18033H1.64883V3.09042H1.44883ZM3.02108 1.51816C2.15405 1.51816 1.44883 2.22339 1.44883 3.09042H1.64883C1.64883 2.33384 2.26451 1.71816 3.02108 1.71816V1.51816ZM6.11099 1.51816H3.02108V1.71816H6.11099V1.51816ZM7.68324 3.09042C7.68324 2.22339 6.97802 1.51816 6.11099 1.51816V1.71816C6.86756 1.71816 7.48324 2.33384 7.48324 3.09042H7.68324ZM7.68324 6.18033V3.09042H7.48324V6.18033H7.68324ZM6.11099 7.75258C6.97802 7.75258 7.68324 7.04736 7.68324 6.18033H7.48324C7.48324 6.9369 6.86756 7.55258 6.11099 7.55258V7.75258ZM2.5334 3.09042C2.5334 2.8216 2.75226 2.60274 3.02108 2.60274V2.40274C2.6418 2.40274 2.3334 2.71114 2.3334 3.09042H2.5334ZM2.5334 6.18033V3.09042H2.3334V6.18033H2.5334ZM3.02108 6.66801C2.75226 6.66801 2.5334 6.44915 2.5334 6.18033H2.3334C2.3334 6.5596 2.6418 6.86801 3.02108 6.86801V6.66801ZM6.11099 6.66801H3.02108V6.86801H6.11099V6.66801ZM6.59867 6.18033C6.59867 6.44915 6.37981 6.66801 6.11099 6.66801V6.86801C6.49027 6.86801 6.79867 6.5596 6.79867 6.18033H6.59867ZM6.59867 3.09042V6.18033H6.79867V3.09042H6.59867ZM6.11099 2.60274C6.37981 2.60274 6.59867 2.8216 6.59867 3.09042H6.79867C6.79867 2.71114 6.49027 2.40274 6.11099 2.40274V2.60274ZM3.02108 2.60274H6.11099V2.40274H3.02108V2.60274ZM3.02108 14.4808H6.11099V14.2808H3.02108V14.4808ZM1.44883 12.9086C1.44883 13.7756 2.15405 14.4808 3.02108 14.4808V14.2808C2.26451 14.2808 1.64883 13.6652 1.64883 12.9086H1.44883ZM1.44883 9.81867V12.9086H1.64883V9.81867H1.44883ZM3.02108 8.24642C2.15405 8.24642 1.44883 8.95164 1.44883 9.81867H1.64883C1.64883 9.0621 2.26451 8.44642 3.02108 8.44642V8.24642ZM6.11099 8.24642H3.02108V8.44642H6.11099V8.24642ZM7.68324 9.81867C7.68324 8.95164 6.97802 8.24642 6.11099 8.24642V8.44642C6.86756 8.44642 7.48324 9.0621 7.48324 9.81867H7.68324ZM7.68324 12.9086V9.81867H7.48324V12.9086H7.68324ZM6.11099 14.4808C6.97802 14.4808 7.68324 13.7756 7.68324 12.9086H7.48324C7.48324 13.6652 6.86756 14.2808 6.11099 14.2808V14.4808ZM2.5334 9.81867C2.5334 9.54985 2.75226 9.33099 3.02108 9.33099V9.13099C2.6418 9.13099 2.3334 9.4394 2.3334 9.81867H2.5334ZM2.5334 12.9086V9.81867H2.3334V12.9086H2.5334ZM3.02108 13.3963C2.75226 13.3963 2.5334 13.1774 2.5334 12.9086H2.3334C2.3334 13.2879 2.6418 13.5963 3.02108 13.5963V13.3963ZM6.11099 13.3963H3.02108V13.5963H6.11099V13.3963ZM6.59867 12.9086C6.59867 13.1774 6.37981 13.3963 6.11099 13.3963V13.5963C6.49027 13.5963 6.79867 13.2879 6.79867 12.9086H6.59867ZM6.59867 9.81867V12.9086H6.79867V9.81867H6.59867ZM6.11099 9.33099C6.37981 9.33099 6.59867 9.54985 6.59867 9.81867H6.79867C6.79867 9.4394 6.49027 9.13099 6.11099 9.13099V9.33099ZM3.02108 9.33099H6.11099V9.13099H3.02108V9.33099ZM12.9707 7.55259H9.88078V7.75259H12.9707V7.55259ZM14.3429 6.18034C14.343 6.93691 13.7273 7.55259 12.9707 7.55259V7.75259C13.8377 7.75259 14.543 7.04736 14.5429 6.18033L14.3429 6.18034ZM14.3429 3.09042V6.18033H14.5429V3.09042H14.3429ZM12.9707 1.71817C13.7273 1.71817 14.3429 2.33385 14.3429 3.09042H14.5429C14.5429 2.22339 13.8377 1.51817 12.9707 1.51817V1.71817ZM9.88078 1.71817H12.9707V1.51817H9.88078V1.71817ZM8.50853 3.09042C8.50853 2.33385 9.12423 1.71817 9.88078 1.71817V1.51817C9.01377 1.51817 8.30853 2.22339 8.30853 3.09042H8.50853ZM8.50853 6.18033V3.09042H8.30853V6.18033H8.50853ZM9.88078 7.55259C9.12423 7.55259 8.50853 6.93691 8.50853 6.18033H8.30853C8.30853 7.04736 9.01377 7.75259 9.88078 7.75259V7.55259ZM9.88078 2.40274C9.50152 2.40274 9.1931 2.71114 9.1931 3.09042H9.3931C9.3931 2.82161 9.61198 2.60274 9.88078 2.60274V2.40274ZM12.9707 2.40274H9.88078V2.60274H12.9707V2.40274ZM13.6584 3.09042C13.6584 2.71115 13.35 2.40274 12.9707 2.40274V2.60274C13.2395 2.60274 13.4584 2.8216 13.4584 3.09042H13.6584ZM13.6584 6.18033V3.09042H13.4584V6.18033H13.6584ZM12.9707 6.86801C13.35 6.86801 13.6584 6.55961 13.6584 6.18033H13.4584C13.4584 6.44916 13.2395 6.66801 12.9707 6.66801V6.86801ZM9.88078 6.86801H12.9707V6.66801H9.88078V6.86801ZM9.1931 6.18033C9.1931 6.55961 9.50152 6.86801 9.88078 6.86801V6.66801C9.61198 6.66801 9.3931 6.44915 9.3931 6.18033H9.1931ZM9.1931 3.09042V6.18033H9.3931V3.09042H9.1931ZM9.88572 14.4812H12.9756V14.2812H9.88572V14.4812ZM8.31347 12.909C8.31347 13.776 9.01869 14.4812 9.88572 14.4812V14.2812C9.12915 14.2812 8.51347 13.6656 8.51347 12.909H8.31347ZM8.31347 9.81911V12.909H8.51347V9.81911H8.31347ZM9.88572 8.24685C9.01869 8.24685 8.31347 8.95208 8.31347 9.81911H8.51347C8.51347 9.06254 9.12915 8.44685 9.88572 8.44685V8.24685ZM12.9756 8.24685H9.88572V8.44685H12.9756V8.24685ZM14.1047 8.71185C13.8111 8.41129 13.4093 8.24685 12.9756 8.24685V8.44685C13.3579 8.44685 13.7073 8.59129 13.9616 8.85161L14.1047 8.71185ZM14.5479 9.81911C14.5479 9.39874 14.391 9.00493 14.1047 8.71185L13.9616 8.85161C14.2102 9.10599 14.3479 9.44906 14.3479 9.81911H14.5479ZM14.5479 12.909V9.81911H14.3479V12.909H14.5479ZM12.9756 14.4812C13.8427 14.4812 14.5479 13.776 14.5479 12.909L14.3479 12.909C14.3479 13.6656 13.7322 14.2812 12.9756 14.2812V14.4812ZM11.1509 13.0112C10.995 13.1631 10.7407 13.1631 10.5848 13.0112L10.4452 13.1544C10.6787 13.3821 11.057 13.3821 11.2905 13.1544L11.1509 13.0112ZM11.2207 12.9828H11.2207V13.1828H11.2207V12.9828ZM13.8859 10.3322L11.1508 13.0114L11.2907 13.1542L14.0258 10.4751L13.8859 10.3322ZM13.886 9.7842C14.0405 9.93476 14.0405 10.1815 13.886 10.332L14.0256 10.4753C14.2606 10.2462 14.2606 9.87004 14.0256 9.64099L13.886 9.7842ZM13.3199 9.7842C13.4758 9.63226 13.7302 9.63226 13.886 9.7842L14.0256 9.64099C13.7921 9.41333 13.4139 9.41333 13.1803 9.64099L13.3199 9.7842ZM10.9378 12.1176L13.3201 9.78404L13.1802 9.64116L10.7979 11.9748L10.9378 12.1176ZM9.56176 10.9083L10.7979 12.1177L10.9378 11.9747L9.70162 10.7653L9.56176 10.9083ZM8.99579 10.9084C9.15165 10.7565 9.40603 10.7565 9.56188 10.9084L9.70149 10.7652C9.46795 10.5375 9.08971 10.5376 8.85619 10.7652L8.99579 10.9084ZM8.99579 11.4563C8.84135 11.3057 8.84136 11.059 8.99579 10.9084L8.85619 10.7652C8.62122 10.9942 8.62123 11.3704 8.85618 11.5995L8.99579 11.4563ZM10.5849 13.0113L8.99593 11.4564L8.85605 11.5993L10.4451 13.1543L10.5849 13.0113Z",fill:"#15DAC2"})]}),jsxRuntimeExports.jsx("span",{children:"选择题"}),jsxRuntimeExports.jsx("div",{ref:Tme,children:jsxRuntimeExports.jsx(ActiveSelect,{onClick:()=>{fme("choiceQuestion")},onFromLibraryClick:()=>{pme("choiceQuestion")}})})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M13.334 6V3.33333H2.66732V6H13.334ZM13.334 7.33333H2.66732V12.6667H13.334V7.33333ZM2.00065 2H14.0007C14.3689 2 14.6673 2.29848 14.6673 2.66667V13.3333C14.6673 13.7015 14.3689 14 14.0007 14H2.00065C1.63246 14 1.33398 13.7015 1.33398 13.3333V2.66667C1.33398 2.29848 1.63246 2 2.00065 2ZM3.33398 8H5.33398V11.3333H3.33398V8ZM3.33398 4H4.66732V5.33333H3.33398V4ZM6.00065 4H7.33398V5.33333H6.00065V4Z",fill:"#7251F7"})}),jsxRuntimeExports.jsx("span",{children:"示例演示"})]}),jsxRuntimeExports.jsxs("div",{className:"tiptap-menu-item-list-item",ref:vme,children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 2.66634H3.33333V13.333H12.6667V5.33301H10V2.66634ZM2 1.99421C2 1.62904 2.29833 1.33301 2.66567 1.33301H10.6667L13.9998 4.66634L14 13.9947C14 14.3656 13.7034 14.6663 13.3377 14.6663H2.66227C2.29651 14.6663 2 14.3628 2 14.0051V1.99421ZM11.7713 7.99967L9.4142 10.3567L8.4714 9.41387L9.8856 7.99967L8.4714 6.58546L9.4142 5.64265L11.7713 7.99967ZM4.22877 7.99967L6.58579 5.64265L7.5286 6.58546L6.11438 7.99967L7.5286 9.41387L6.58579 10.3567L4.22877 7.99967Z",fill:"#FB973C"})}),jsxRuntimeExports.jsx("span",{children:"编码测验"}),jsxRuntimeExports.jsx("div",{ref:Ame,children:jsxRuntimeExports.jsx(ActiveSelect,{onClick:()=>{fme("codingTest")},onFromLibraryClick:()=>{pme("codingTest")}})})]})]})]})]})},build=(Ff,kh,x_)=>new ReactRenderer(Ff,{editor:kh,props:{editor:kh,emitter:x_}}).element,char="/",ignoreChar=["title"],Slash=Extension.create({name:"Slash",addOptions(){return{char,allowSpaces:!1,startOfLine:!0,render:void 0,tip:null,emitter:null,allow:Ff=>{const kh=Ff.editor.state.doc;let x_=!0;return Ff.editor.isFocused&&kh.nodesBetween(Ff.range.from,Ff.range.to,(B_,$_,$P)=>(ignoreChar.includes(B_.type.name)&&(x_=!1),!1)),x_}}},onBeforeCreate(){this.options.emitter=new EventEmitter,this.options.render=()=>({onBeforeStart:Ff=>{if(this.options.tip)return;const kh=build(SlashMenu,this.editor,this.options.emitter);this.options.tip=tippy(document.body,{getReferenceClientRect:null,content:kh,interactive:!0,trigger:"manual",placement:"bottom",offset:[85,10],duration:[300,300]})},onStart:Ff=>{var kh,x_,B_,$_;console.log((kh=Ff==null?void 0:Ff.clientRect)==null?void 0:kh.call(Ff)),(x_=this.options.tip)==null||x_.setProps({getReferenceClientRect:Ff.clientRect}),(B_=this.options.emitter)==null||B_.emit("show",{node:{type:{name:"paragraph"}},range:Ff.range}),this.editor.chain().hideTip().changeTip(!0).run(),($_=this.options.tip)==null||$_.show()},onExit:Ff=>{var kh;this.editor.chain().changeTip(!1).run(),(kh=this.options.tip)==null||kh.destroy(),this.options.tip=null},onUpdate:Ff=>{var kh;this.editor.chain().changeTip(!1).run(),(kh=this.options.tip)==null||kh.destroy(),this.options.tip=null}})},addCommands(){return{showMenu:()=>()=>{var Ff,kh;return this.editor.chain().hideTip().changeTip(!0).run(),(kh=(Ff=this.options)==null?void 0:Ff.tip)==null||kh.show(),!0},hideMenu:()=>()=>{var Ff,kh;return this.editor.chain().changeTip(!1).run(),(kh=(Ff=this.options)==null?void 0:Ff.tip)==null||kh.destroy(),this.options.tip=null,!0}}},addProseMirrorPlugins(){return[Suggestion({editor:this.editor,...this.options}),new Plugin({key:new PluginKey("slash-whell"),props:{handleDOMEvents:{wheel:()=>{this.editor.commands.hideMenu()}}}})]}});function bail(Ff){if(Ff)throw Ff}/*!
|
|
148
148
|
* Determine if an object is a Buffer
|
|
149
149
|
*
|
|
150
150
|
* @author Feross Aboukhadijeh <https://feross.org>
|