(window.webpackJsonp=window.webpackJsonp||[]).push([[148,6,7],{"+NIl":function(bt,Ye,C){(function(F){F(C("VrN/"))})(function(F){"use strict";F.defineMode("stex",function(ge,oe){"use strict";function Oe(le,W){le.cmdState.push(W)}function Ee(le){return le.cmdState.length>0?le.cmdState[le.cmdState.length-1]:null}function G(le){var W=le.cmdState.pop();W&&W.closeBracket()}function M(le){for(var W=le.cmdState,P=W.length-1;P>=0;P--){var U=W[P];if(U.name=="DEFAULT")continue;return U}return{styleIdentifier:function(){return null}}}function D(le,W,P){return function(){this.name=le,this.bracketNo=0,this.style=W,this.styles=P,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var S={};S.importmodule=D("importmodule","tag",["string","builtin"]),S.documentclass=D("documentclass","tag",["","atom"]),S.usepackage=D("usepackage","tag",["atom"]),S.begin=D("begin","tag",["atom"]),S.end=D("end","tag",["atom"]),S.label=D("label","tag",["atom"]),S.ref=D("ref","tag",["atom"]),S.eqref=D("eqref","tag",["atom"]),S.cite=D("cite","tag",["atom"]),S.bibitem=D("bibitem","tag",["atom"]),S.Bibitem=D("Bibitem","tag",["atom"]),S.RBibitem=D("RBibitem","tag",["atom"]),S.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function z(le,W){le.f=W}function $(le,W){var P;if(le.match(/^\\[a-zA-Z@]+/)){var U=le.current().slice(1);return P=S.hasOwnProperty(U)?S[U]:S.DEFAULT,P=new P,Oe(W,P),z(W,ye),P.style}if(le.match(/^\\[$&%#{}_]/))return"tag";if(le.match(/^\\[,;!\/\\]/))return"tag";if(le.match("\\["))return z(W,function(ie,Te){return re(ie,Te,"\\]")}),"keyword";if(le.match("\\("))return z(W,function(ie,Te){return re(ie,Te,"\\)")}),"keyword";if(le.match("$$"))return z(W,function(ie,Te){return re(ie,Te,"$$")}),"keyword";if(le.match("$"))return z(W,function(ie,Te){return re(ie,Te,"$")}),"keyword";var se=le.next();if(se=="%")return le.skipToEnd(),"comment";if(se=="}"||se=="]"){if(P=Ee(W),P)P.closeBracket(se),z(W,ye);else return"error";return"bracket"}else return se=="{"||se=="["?(P=S.DEFAULT,P=new P,Oe(W,P),"bracket"):/\d/.test(se)?(le.eatWhile(/[\w.%]/),"atom"):(le.eatWhile(/[\w\-_]/),P=M(W),P.name=="begin"&&(P.argument=le.current()),P.styleIdentifier())}function re(le,W,P){if(le.eatSpace())return null;if(P&&le.match(P))return z(W,$),"keyword";if(le.match(/^\\[a-zA-Z@]+/))return"tag";if(le.match(/^[a-zA-Z]+/))return"variable-2";if(le.match(/^\\[$&%#{}_]/))return"tag";if(le.match(/^\\[,;!\/]/))return"tag";if(le.match(/^[\^_&]/))return"tag";if(le.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(le.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var U=le.next();return U=="{"||U=="}"||U=="["||U=="]"||U=="("||U==")"?"bracket":U=="%"?(le.skipToEnd(),"comment"):"error"}function ye(le,W){var P=le.peek(),U;return P=="{"||P=="["?(U=Ee(W),U.openBracket(P),le.eat(P),z(W,$),"bracket"):/[ \t\r]/.test(P)?(le.eat(P),null):(z(W,$),G(W),$(le,W))}return{startState:function(){var le=oe.inMathMode?function(W,P){return re(W,P)}:$;return{cmdState:[],f:le}},copyState:function(le){return{cmdState:le.cmdState.slice(),f:le.f}},token:function(le,W){return W.f(le,W)},blankLine:function(le){le.f=$,le.cmdState.length=0},lineComment:"%"}}),F.defineMIME("text/x-stex","stex"),F.defineMIME("text/x-latex","stex")})},"19Vz":function(bt,Ye,C){(function(F){F(C("VrN/"))})(function(F){F.defineOption("placeholder","",function(D,S,z){var $=z&&z!=F.Init;if(S&&!$)D.on("blur",Ee),D.on("change",G),D.on("swapDoc",G),F.on(D.getInputField(),"compositionupdate",D.state.placeholderCompose=function(){Oe(D)}),G(D);else if(!S&&$){D.off("blur",Ee),D.off("change",G),D.off("swapDoc",G),F.off(D.getInputField(),"compositionupdate",D.state.placeholderCompose),ge(D);var re=D.getWrapperElement();re.className=re.className.replace(" CodeMirror-empty","")}S&&!D.hasFocus()&&Ee(D)});function ge(D){D.state.placeholder&&(D.state.placeholder.parentNode.removeChild(D.state.placeholder),D.state.placeholder=null)}function oe(D){ge(D);var S=D.state.placeholder=document.createElement("pre");S.style.cssText="height: 0; overflow: visible",S.style.direction=D.getOption("direction"),S.className="CodeMirror-placeholder CodeMirror-line-like";var z=D.getOption("placeholder");typeof z=="string"&&(z=document.createTextNode(z)),S.appendChild(z),D.display.lineSpace.insertBefore(S,D.display.lineSpace.firstChild)}function Oe(D){setTimeout(function(){var S=!1,z=D.getInputField();z.nodeName=="TEXTAREA"?S=!z.value:D.lineCount()==1&&(S=!/[^\u200b]/.test(z.querySelector(".CodeMirror-line").textContent)),S?oe(D):ge(D)},20)}function Ee(D){M(D)&&oe(D)}function G(D){var S=D.getWrapperElement(),z=M(D);S.className=S.className.replace(" CodeMirror-empty","")+(z?" CodeMirror-empty":""),z?oe(D):ge(D)}function M(D){return D.lineCount()===1&&D.getLine(0)===""}})},"1eCo":function(bt,Ye,C){(function(F){F(C("VrN/"))})(function(F){"use strict";var ge={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};F.defineMode("xml",function(Oe,Ee){var G=Oe.indentUnit,M={},D=Ee.htmlMode?ge:oe;for(var S in D)M[S]=D[S];for(var S in Ee)M[S]=Ee[S];var z,$;function re(y,Z){function X(j){return Z.tokenize=j,j(y,Z)}var w=y.next();if(w=="<")return y.eat("!")?y.eat("[")?y.match("CDATA[")?X(W("atom","]]>")):null:y.match("--")?X(W("comment","-->")):y.match("DOCTYPE",!0,!0)?(y.eatWhile(/[\w\._\-]/),X(P(1))):null:y.eat("?")?(y.eatWhile(/[\w\._\-]/),Z.tokenize=W("meta","?>"),"meta"):(z=y.eat("/")?"closeTag":"openTag",Z.tokenize=ye,"tag bracket");if(w=="&"){var ee;return y.eat("#")?y.eat("x")?ee=y.eatWhile(/[a-fA-F\d]/)&&y.eat(";"):ee=y.eatWhile(/[\d]/)&&y.eat(";"):ee=y.eatWhile(/[\w\.\-:]/)&&y.eat(";"),ee?"atom":"error"}else return y.eatWhile(/[^&<]/),null}re.isInText=!0;function ye(y,Z){var X=y.next();if(X==">"||X=="/"&&y.eat(">"))return Z.tokenize=re,z=X==">"?"endTag":"selfcloseTag","tag bracket";if(X=="=")return z="equals",null;if(X=="<"){Z.tokenize=re,Z.state=Te,Z.tagName=Z.tagStart=null;var w=Z.tokenize(y,Z);return w?w+" tag error":"tag error"}else return/[\'\"]/.test(X)?(Z.tokenize=le(X),Z.stringStartCol=y.column(),Z.tokenize(y,Z)):(y.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function le(y){var Z=function(X,w){for(;!X.eol();)if(X.next()==y){w.tokenize=ye;break}return"string"};return Z.isInAttribute=!0,Z}function W(y,Z){return function(X,w){for(;!X.eol();){if(X.match(Z)){w.tokenize=re;break}X.next()}return y}}function P(y){return function(Z,X){for(var w;(w=Z.next())!=null;){if(w=="<")return X.tokenize=P(y+1),X.tokenize(Z,X);if(w==">")if(y==1){X.tokenize=re;break}else return X.tokenize=P(y-1),X.tokenize(Z,X)}return"meta"}}function U(y,Z,X){this.prev=y.context,this.tagName=Z,this.indent=y.indented,this.startOfLine=X,(M.doNotIndent.hasOwnProperty(Z)||y.context&&y.context.noIndent)&&(this.noIndent=!0)}function se(y){y.context&&(y.context=y.context.prev)}function ie(y,Z){for(var X;;){if(!y.context)return;if(X=y.context.tagName,!M.contextGrabbers.hasOwnProperty(X)||!M.contextGrabbers[X].hasOwnProperty(Z))return;se(y)}}function Te(y,Z,X){return y=="openTag"?(X.tagStart=Z.column(),We):y=="closeTag"?pe:Te}function We(y,Z,X){return y=="word"?(X.tagName=Z.current(),$="tag",Q):M.allowMissingTagName&&y=="endTag"?($="tag bracket",Q(y,Z,X)):($="error",We)}function pe(y,Z,X){if(y=="word"){var w=Z.current();return X.context&&X.context.tagName!=w&&M.implicitlyClosed.hasOwnProperty(X.context.tagName)&&se(X),X.context&&X.context.tagName==w||M.matchClosing===!1?($="tag",be):($="tag error",Re)}else return M.allowMissingTagName&&y=="endTag"?($="tag bracket",be(y,Z,X)):($="error",Re)}function be(y,Z,X){return y!="endTag"?($="error",be):(se(X),Te)}function Re(y,Z,X){return $="error",be(y,Z,X)}function Q(y,Z,X){if(y=="word")return $="attribute",me;if(y=="endTag"||y=="selfcloseTag"){var w=X.tagName,ee=X.tagStart;return X.tagName=X.tagStart=null,y=="selfcloseTag"||M.autoSelfClosers.hasOwnProperty(w)?ie(X,w):(ie(X,w),X.context=new U(X,w,ee==X.indented)),Te}return $="error",Q}function me(y,Z,X){return y=="equals"?Ae:(M.allowMissing||($="error"),Q(y,Z,X))}function Ae(y,Z,X){return y=="string"?J:y=="word"&&M.allowUnquoted?($="string",Q):($="error",Q(y,Z,X))}function J(y,Z,X){return y=="string"?J:Q(y,Z,X)}return{startState:function(y){var Z={tokenize:re,state:Te,indented:y||0,tagName:null,tagStart:null,context:null};return y!=null&&(Z.baseIndent=y),Z},token:function(y,Z){if(!Z.tagName&&y.sol()&&(Z.indented=y.indentation()),y.eatSpace())return null;z=null;var X=Z.tokenize(y,Z);return(X||z)&&X!="comment"&&($=null,Z.state=Z.state(z||X,y,Z),$&&(X=$=="error"?X+" error":$)),X},indent:function(y,Z,X){var w=y.context;if(y.tokenize.isInAttribute)return y.tagStart==y.indented?y.stringStartCol+1:y.indented+G;if(w&&w.noIndent)return F.Pass;if(y.tokenize!=ye&&y.tokenize!=re)return X?X.match(/^(\s*)/)[0].length:0;if(y.tagName)return M.multilineTagIndentPastTag!==!1?y.tagStart+y.tagName.length+2:y.tagStart+G*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/$/,blockCommentStart:"",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(y){y.state==Ae&&(y.state=Q)},xmlCurrentTag:function(y){return y.tagName?{name:y.tagName,close:y.type=="closeTag"}:null},xmlCurrentContext:function(y){for(var Z=[],X=y.context;X;X=X.prev)X.tagName&&Z.push(X.tagName);return Z.reverse()}}}),F.defineMIME("text/xml","xml"),F.defineMIME("application/xml","xml"),F.mimeModes.hasOwnProperty("text/html")||F.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7/Dv":function(bt,Ye,C){bt.exports={bg:"bg___2rJyo",head:"head___23PFV",formWrap:"formWrap___2b6uL"}},"7ahc":function(bt,Ye,C){"use strict";C.d(Ye,"a",function(){return We});var F=C("k1fw"),ge=C("0Owb"),oe=C("+L6B"),Oe=C("2/Rp"),Ee=C("y8nQ"),G=C("Vl3Y"),M=C("tJVT"),D=C("OaEy"),S=C("2fM7"),z=C("q1tI"),$=C.n(z),re=C("VrN/"),ye=C.n(re),le=C("p77/"),W=C.n(le),P=C("c5Ni"),U=C.n(P),se=S.a.Option,ie={labelCol:{span:4},wrapperCol:{span:20}},Te={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Ye.b=function(pe){var be=pe.callback,Re=pe.onCancel,Q=Object(z.useState)("python"),me=Object(M.a)(Q,2),Ae=me[0],J=me[1];function y(X){J(Te[X][1])}function Z(X){be(X)}return $.a.createElement(G.a,Object(ge.a)({},ie,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Z}),$.a.createElement(G.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},$.a.createElement(S.a,{onChange:y},Object.keys(Te).map(function(X){return $.a.createElement(se,{key:X,value:X},Te[X][0])}))),$.a.createElement(G.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},$.a.createElement(We,{mode:Ae})),$.a.createElement("div",{className:"flex-container flex-end"},$.a.createElement(Oe.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),$.a.createElement(Oe.a,{type:"ghost",onClick:Re},"\u53D6\u6D88")))};function We(pe){var be=pe.value,Re=pe.onChange,Q=pe.mode,me=pe.options,Ae=me===void 0?{}:me,J=Object(z.useRef)(),y=Object(z.useState)(),Z=Object(M.a)(y,2),X=Z[0],w=Z[1];return Object(z.useEffect)(function(){if(X){function ee(j){var A=j.getValue();Re&&Re(A)}return X.on("change",ee),function(){X.off("change",ee)}}},[X,Re]),Object(z.useEffect)(function(){X&&X.setOption("mode",Q)},[X,Q]),Object(z.useEffect)(function(){X&&((be!==X.getValue()||be==="")&&setTimeout(function(){X.setValue(be||" ")},300))},[X,be]),Object(z.useEffect)(function(){if(J.current&&!X){var ee=ye.a.fromTextArea(J.current,Object(F.a)({mode:Q,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ae));w(ee)}},[J.current,X]),$.a.createElement("div",{className:"my-codemirror-container"},$.a.createElement("textarea",{ref:J}))}},"7ixt":function(bt,Ye,C){"use strict";C.d(Ye,"a",function(){return oe});var F={adjustX:1,adjustY:1},ge=[0,0],oe={left:{points:["cr","cl"],overflow:F,offset:[-4,0],targetOffset:ge},right:{points:["cl","cr"],overflow:F,offset:[4,0],targetOffset:ge},top:{points:["bc","tc"],overflow:F,offset:[0,-4],targetOffset:ge},bottom:{points:["tc","bc"],overflow:F,offset:[0,4],targetOffset:ge},topLeft:{points:["bl","tl"],overflow:F,offset:[0,-4],targetOffset:ge},leftTop:{points:["tr","tl"],overflow:F,offset:[-4,0],targetOffset:ge},topRight:{points:["br","tr"],overflow:F,offset:[0,-4],targetOffset:ge},rightTop:{points:["tl","tr"],overflow:F,offset:[4,0],targetOffset:ge},bottomRight:{points:["tr","br"],overflow:F,offset:[0,4],targetOffset:ge},rightBottom:{points:["bl","br"],overflow:F,offset:[4,0],targetOffset:ge},bottomLeft:{points:["tl","bl"],overflow:F,offset:[0,4],targetOffset:ge},leftBottom:{points:["br","bl"],overflow:F,offset:[-4,0],targetOffset:ge}},Oe=oe},"8EBN":function(bt,Ye,C){(function(F){F(C("VrN/"))})(function(F){"use strict";F.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var ge=0;ge-1&&Oe.substring(M+1,Oe.length);if(D)return F.findModeByExtension(D)},F.findModeByName=function(Oe){Oe=Oe.toLowerCase();for(var Ee=0;Ee=de.length?_e.slice(de.length):_e}).join(`
`)}var z=[],$=[""],re=new M.a.Renderer,ye=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function le(){z.length=0,$=[""]}var W={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function P(g,_,N,de){if(_>=g.length||g[_].level<=N)return _;var _e=g[_];de.push("- "+_e.text+""),_++;var ae=[];return _=P(g,_,_e.level,ae),ae.length>0&&(de.push("
"),ae.forEach(function(Se){de.push(Se)}),de.push("
")),de.push(" "),_=P(g,_,N,de),_}function U(){return P(z,0,0,$),$.push("
"),$.join("")}var se={heading:function(_){var N=ye.exec(_);if(N)return{type:"heading",raw:N[0],depth:N[1].length,text:N[2]}},fences:function(_){var N=this.rules.block.fences.exec(_);if(N){var de=N[0],_e=S(de,N[3]||""),ae=N[2]?N[2].trim():N[2];if(["latex","katex","math"].indexOf(ae)>=0){var Se=We(),ue=_e;_e=Se,pe[Se]={type:"block",expression:ue}}return{type:"code",raw:de,lang:ae,text:_e}}}},ie=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Te=0,We=function(){return"__special_katext_id_".concat(Te++,"__")},pe={};function be(){return pe}function Re(){Te=0,pe={}}function Q(g){return g=g.replace(ie,function(_,N){var de=We();return pe[de]={type:"inline",expression:N},de}),g}var me=re.listitem;re.listitem=function(g){return me(Q(g))};var Ae=re.paragraph;re.paragraph=function(g){return Ae(Q(g))};var J=re.tablecell;re.tablecell=function(g,_){return J(Q(g),_)},re.code=function(g,_,N){var de=(_||"").match(/\S*/)[0];return de?["latex","katex","math"].indexOf(de)>=0?"".concat(g,"
"):'
').concat(N?g:Object(D.escape)(g,!0),`
`):''+(N?g:Object(D.escape)(g,!0))+"
"},re.heading=function(g,_,N){var de=this.options.headerPrefix+N.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return z.push({anchor:de,level:_,text:g}),"'+g+""},M.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),M.a.use({tokenizer:se,renderer:re});var y=M.a,Z=C("SJMd"),X=C("ulZh"),w=C.n(X),ee=C("m3rI"),j=C("Oy/b"),A=C("p5ED"),k=/]*>/g;function c(g){var _=document.createElement("div");return _.innerHTML=g,_.childNodes.length===0?"":_.childNodes[0].nodeValue}var l=Ye.a=function(g){var _,N=g.value,de=N===void 0?"":N,_e=g.className,ae=g.showTextOnly,Se=g.showLines,ue=g.style,ce=ue===void 0?{}:ue,H=g.stylesPrev,te=H===void 0?{}:H,h=(_=String(de))===null||_===void 0?void 0:_.replace(/|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),T=Object(oe.useState)(""),m=Object(ge.a)(T,2),R=m[0],Y=m[1],B=Object(oe.useMemo)(function(){try{var Pe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,we=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Me=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;h=h.replace(Pe,"("+ee.a.API_SERVER+"/api/attachments/").replace(we,'"'+ee.a.API_SERVER+"/api/attachments/").replace(Me,'"'+ee.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),h=h.replace(new RegExp("(?[TOC]
",U()),le()),Ge=Ge.replace(/(__special_katext_id_\d+__)/g,function(qe,ht){var nt=Ve[ht],Xe=nt.type,ve=nt.expression;return Object(j.renderToString)(c(ve)||"",{displayMode:Xe==="block",throwOnError:!1,output:"html"})}),Ge=Ge.replace(/▁/g,"\u2581\u2581\u2581"),Re(),ae){var Ke=document.createElement("div");return Ke.innerHTML=Ge,Ke.innerText}return setTimeout(function(){return je()},500),Ge},[h]),ne=Object(oe.useRef)();W.WebkitLineClamp=Se,Se&&(ce=Object(F.a)(Object(F.a)({},ce),W));function ke(Pe){var we=Pe.target;if(we.tagName.toUpperCase()==="A"){var Me=we.getAttribute("href");if(Me.indexOf("office")>-1)Pe.preventDefault(),Y(Me);else if(Me.startsWith("#")){Pe.preventDefault();var Ge=document.getElementById(Me.replace("#",""));Ge&&Ge.scrollIntoView(!0)}}}var je=function(){var we,Me=(we=ne.current)===null||we===void 0?void 0:we.querySelectorAll("video");Me==null||Me.forEach(function(Ge){if(Ge.oncontextmenu=function(){return!1},Ge.src.indexOf(".m3u8")>-1&&!Ge.canPlayType("application/vnd.apple.mpegurl")){if(w.a.isSupported()){var Ve=new w.a;Ve.loadSource(Ge.src),Ve.attachMedia(Ge)}}})};return Object(oe.useEffect)(function(){if(ne.current&&B&&(B.match(k)&&window.PR.prettyPrint()),ne.current)return ne.current.addEventListener("click",ke),function(){ne.current.removeEventListener("click",ke),Re(),le()}},[B,ne.current,ke]),Oe.a.createElement(Oe.a.Fragment,null,Oe.a.createElement("div",{ref:ne,style:Object(F.a)({},ce),className:"".concat(_e||""," markdown-body "),dangerouslySetInnerHTML:{__html:B}}),Oe.a.createElement(A.a,{close:!0,data:R,type:R!=null&&R.length?"office":"",style:Object(F.a)({},te),onClose:function(){return Y("")}}))}},"9VGf":function(bt,Ye,C){"use strict";C.d(Ye,"a",function(){return oe});var F=C("q1tI"),ge=C.n(F);function oe(Oe,Ee){var G=Object(F.useRef)();Object(F.useEffect)(function(){G.current=Oe}),Object(F.useEffect)(function(){function M(){G.current()}if(Ee!==null){var D=setInterval(M,Ee);return function(){return clearInterval(D)}}},[Ee])}},Bd2K:function(bt,Ye,C){(function(F){F(C("VrN/"),C("osHv"))})(function(F){F.defineOption("autoCloseTags",!1,function(S,z,$){if($!=F.Init&&$&&S.removeKeyMap("autoCloseTags"),!z)return;var re={name:"autoCloseTags"};(typeof z!="object"||z.whenClosing!==!1)&&(re["'/'"]=function(ye){return G(ye)}),(typeof z!="object"||z.whenOpening!==!1)&&(re["'>'"]=function(ye){return Oe(ye)}),S.addKeyMap(re)});var ge=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Oe(S){if(S.getOption("disableInput"))return F.Pass;for(var z=S.listSelections(),$=[],re=S.getOption("autoCloseTags"),ye=0;yele.ch&&(ie=ie.slice(0,ie.length-W.end+le.ch));var be=ie.toLowerCase();if(!ie||W.type=="string"&&(W.end!=le.ch||!/[\"\']/.test(W.string.charAt(W.string.length-1))||W.string.length==1)||W.type=="tag"&&se.close||W.string.indexOf("/")==le.ch-W.start-1||We&&M(We,be)>-1||D(S,P.mode.xmlCurrentContext&&P.mode.xmlCurrentContext(U)||[],ie,le,!0))return F.Pass;var Re=typeof re=="object"&&re.emptyTags;if(Re&&M(Re,ie)>-1){$[ye]={text:"/>",newPos:F.Pos(le.line,le.ch+2)};continue}var Q=pe&&M(pe,be)>-1;$[ye]={indent:Q,text:">"+(Q?`
`:"")+""+ie+">",newPos:Q?F.Pos(le.line+1,0):F.Pos(le.line,le.ch+1)}}for(var me=typeof re=="object"&&re.dontIndentOnAutoClose,ye=z.length-1;ye>=0;ye--){var Ae=$[ye];S.replaceRange(Ae.text,z[ye].head,z[ye].anchor,"+insert");var J=S.listSelections().slice(0);J[ye]={head:Ae.newPos,anchor:Ae.newPos},S.setSelections(J),!me&&Ae.indent&&(S.indentLine(Ae.newPos.line,null,!0),S.indentLine(Ae.newPos.line+1,null,!0))}}function Ee(S,z){for(var $=S.listSelections(),re=[],ye=z?"/":"",le=S.getOption("autoCloseTags"),W=typeof le=="object"&&le.dontIndentOnSlash,P=0;P<$.length;P++){if(!$[P].empty())return F.Pass;var U=$[P].head,se=S.getTokenAt(U),ie=F.innerMode(S.getMode(),se.state),Te=ie.state;if(z&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=U.ch-1))return F.Pass;var We,pe=ie.mode.name!="xml"&&S.getMode().name=="htmlmixed";if(pe&&ie.mode.name=="javascript")We=ye+"script";else if(pe&&ie.mode.name=="css")We=ye+"style";else{var be=ie.mode.xmlCurrentContext&&ie.mode.xmlCurrentContext(Te);if(!be||be.length&&D(S,be,be[be.length-1],U))return F.Pass;We=ye+be[be.length-1]}S.getLine(U.line).charAt(se.end)!=">"&&(We+=">"),re[P]=We}if(S.replaceSelections(re),$=S.listSelections(),!W)for(var P=0;P<$.length;P++)(P==$.length-1||$[P].head.line<$[P+1].head.line)&&S.indentLine($[P].head.line)}function G(S){return S.getOption("disableInput")?F.Pass:Ee(S,!0)}F.commands.closeTag=function(S){return Ee(S)};function M(S,z){if(S.indexOf)return S.indexOf(z);for(var $=0,re=S.length;$=0&&z[U]==$;U--)++P;re=W.to;for(var U=1;U0){for(var z=0;z1&&arguments[1]!==void 0?arguments[1]:"",z=[],$=0;$50)return $.b.info("\u6587\u4EF6\u8D85\u8FC750M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var ze={name:it.name,uid:it.uid,file:it,percent:0};Y.push(ze),x.current=Object(re.a)(Y),B(Object(re.a)(Y))},fe={name:"file",multiple:!0,fileList:Y,action:"".concat(w.a.API_SERVER,"/api/attachments.json"),onChange:v,onRemove:b,beforeUpload:V};function Le(st){nt(st)}var tt=function(){var st=Object(ye.a)(be.a.mark(function it(ze){var ct,ft,_t;return be.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(Ve(!0),ct={forum_id:ze.forum_id,attachment_id:ht&&ht.id,children_forum_id:ze.children_forum_id,attachments:Y==null?void 0:Y.map(function(Bt){var Ut;return Bt==null||((Ut=Bt.response)===null||Ut===void 0)?void 0:Ut.id}),memo:{subject:ze.subject,content:ze.content,tag_id:ze.tag_id,is_original:ze.is_original,reprint_link:ze.reprint_link}},!ae.memoId){vt.next=9;break}return vt.next=5,Object(ee.a)("/api/memos/".concat(ae.memoId,".json"),{method:"put",body:ct});case 5:ft=vt.sent,ft.status===1&&($.b.success(ft==null?void 0:ft.message),Ae.d.push("/forums/".concat(ae.memoId))),vt.next=13;break;case 9:return vt.next=11,Object(ee.a)("/api/memos.json",{method:"post",body:ct});case 11:_t=vt.sent,_t.status===1&&($.b.success(_t==null?void 0:_t.message),Ae.d.push("/forums/".concat(_t.memo_id)));case 13:Ve(!1);case 14:case"end":return vt.stop()}},it)}));return function(ze){return st.apply(this,arguments)}}(),rt=function(){Ae.d.goBack()},ot=function(it){if(T(Object(S.a)(Object(S.a)({},h),it)),"forum_id"in it){var ze,ct,ft=at.find(function(kt){return kt.id===it.forum_id}),_t=(ft==null||((ze=ft.children_tags)===null||ze===void 0||((ct=ze[0])===null||ct===void 0))?void 0:ct.id)||void 0;L((ft==null?void 0:ft.children_tags)||[]),ce.setFieldsValue({children_forum_id:_t}),T(Object(S.a)(Object(S.a)({},h),{},{children_forum_id:_t}))}};return Q.a.createElement("section",{className:Z.a.bg},Q.a.createElement("div",{className:Z.a.head},ae.memoId?"\u7F16\u8F91":"\u65B0\u5EFA"),Q.a.createElement(W.a,{form:ce,className:Z.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:ot,onFinish:tt},Q.a.createElement(W.a.Item,{name:"subject",label:"\u6807\u9898",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},Q.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",maxLength:50,suffix:"".concat(((g=h.subject)===null||g===void 0?void 0:g.length)||0,"/50")})),Q.a.createElement(W.a.Item,{name:"content",label:"\u5185\u5BB9",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},Q.a.createElement(J.a,{defaultValue:h.content||"",watch:!0})),Q.a.createElement(A,fe,Q.a.createElement("p",{className:"ant-upload-drag-icon"},Q.a.createElement(X.a,null)),Q.a.createElement("p",{className:"ant-upload-text"},"\u62D6\u52A8\u6587\u4EF6\u6216",Q.a.createElement("span",{className:"c-light-primary"},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20"))),Q.a.createElement(G.a,{className:"mt20",align:"bottom"},Q.a.createElement(W.a.Item,{name:"forum_id",label:"\u4E3B\u9898\u677F\u5757",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E3B\u9898\u677F\u5757"}]},Q.a.createElement(We.a,{placeholder:"\u8BF7\u9009\u62E9\u4E3B\u9898\u677F\u5757",style:{width:260}},at==null?void 0:at.map(function(st){return Q.a.createElement(j,{value:st.id},st.name)}))),Q.a.createElement(W.a.Item,{name:"children_forum_id",label:""},Q.a.createElement(We.a,{style:{width:260,marginLeft:20}},I==null?void 0:I.map(function(st){return Q.a.createElement(j,{value:st.id},st.title)})))),Q.a.createElement(W.a.Item,{name:"tag_id",label:"\u5E16\u5B50\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5E16\u5B50\u6807\u7B7E"}]},Q.a.createElement(We.a,{style:{width:"260px"}},Q.a.createElement(j,{value:1},"\u4EA4\u6D41"),Q.a.createElement(j,{value:2},"\u6C42\u52A9"))),Q.a.createElement(W.a.Item,{name:"is_original",label:"\u662F\u5426\u539F\u521B",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u539F\u521B"}]},Q.a.createElement(Oe.a.Group,null,Q.a.createElement(Oe.a,{value:1},"\u662F"),Q.a.createElement(Oe.a,{value:2},"\u5426"))),(h==null?void 0:h.is_original)===2&&Q.a.createElement(W.a.Item,{name:"reprint_link",label:"\u8F6C\u8F7D\u81EA"},Q.a.createElement(D.a,{style:{width:"260px"},placeholder:"\u8F6C\u8F7D\u94FE\u63A5"})),Q.a.createElement(G.a,{className:"mt20",align:"middle"},Q.a.createElement(ge.a,{onClick:rt},"\u8FD4\u56DE"),Q.a.createElement(ge.a,{loading:Ge,className:"ml20",type:"primary",onClick:function(){return ce.submit()}},"\u4FDD\u5B58"))))};Ye.default=Object(Ae.a)(function(c){var l=c.forumsDetail,g=c.globalSetting;return{forumsDetail:l,globalSetting:g}})(k)},DlQD:function(bt,Ye,C){(function(F,ge){bt.exports=ge()})(this,function(){"use strict";function F(I,L){for(var x=0;xI.length)&&(L=I.length);for(var x=0,f=new Array(L);x=I.length?{done:!0}:{done:!1,value:I[f++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return x=I[Symbol.iterator](),x.next.bind(x)}function G(I,L){return L={exports:{}},I(L,L.exports),L.exports}var M=G(function(I){function L(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function x(f){I.exports.defaults=f}I.exports={defaults:L(),getDefaults:L,changeDefaults:x}}),D=M.defaults,S=M.getDefaults,z=M.changeDefaults,$=/[&<>"']/,re=/[&<>"']/g,ye=/[<>"']|&(?!#?\w+;)/,le=/[<>"']|&(?!#?\w+;)/g,W={"&":"&","<":"<",">":">",'"':""","'":"'"},P=function(L){return W[L]};function U(I,L){if(L){if($.test(I))return I.replace(re,P)}else if(ye.test(I))return I.replace(le,P);return I}var se=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ie(I){return I.replace(se,function(L,x){return x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""})}var Te=/(^|[^\[])\^/g;function We(I,L){I=I.source||I,L=L||"";var x={replace:function(p,v){return v=v.source||v,v=v.replace(Te,"$1"),I=I.replace(p,v),x},getRegex:function(){return new RegExp(I,L)}};return x}var pe=/[^\w:]/g,be=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Re(I,L,x){if(I){var f;try{f=decodeURIComponent(ie(x)).replace(pe,"").toLowerCase()}catch(p){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}L&&!be.test(x)&&(x=y(L,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(p){return null}return x}var Q={},me=/^[^:]+:\/*[^/]*$/,Ae=/^([^:]+:)[\s\S]*$/,J=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(I,L){Q[" "+I]||(me.test(I)?Q[" "+I]=I+"/":Q[" "+I]=ee(I,"/",!0)),I=Q[" "+I];var x=I.indexOf(":")===-1;return L.substring(0,2)==="//"?x?L:I.replace(Ae,"$1")+L:L.charAt(0)==="/"?x?L:I.replace(J,"$1")+L:I+L}var Z={exec:function(){}};function X(I){for(var L=1,x,f;L=0&&V[Le]==="\\";)fe=!fe;return fe?"|":" |"}),f=x.split(/ \|/),p=0;if(f.length>L)f.splice(L);else for(;f.length=f.length?p.slice(f.length):p}).join(`
`)}var ae=function(){function I(x){this.options=x||c}var L=I.prototype;return L.space=function(f){var p=this.rules.block.newline.exec(f);if(p)return p[0].length>1?{type:"space",raw:p[0]}:{raw:`
`}},L.code=function(f,p){var v=this.rules.block.code.exec(f);if(v){var b=p[p.length-1];if(b&&b.type==="paragraph")return{raw:v[0],text:v[0].trimRight()};var V=v[0].replace(/^ {4}/gm,"");return{type:"code",raw:v[0],codeBlockStyle:"indented",text:this.options.pedantic?V:l(V,`
`)}}},L.fences=function(f){var p=this.rules.block.fences.exec(f);if(p){var v=p[0],b=_e(v,p[3]||"");return{type:"code",raw:v,lang:p[2]?p[2].trim():p[2],text:b}}},L.heading=function(f){var p=this.rules.block.heading.exec(f);if(p)return{type:"heading",raw:p[0],depth:p[1].length,text:p[2]}},L.nptable=function(f){var p=this.rules.block.nptable.exec(f);if(p){var v={type:"table",header:g(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(`
`):[],raw:p[0]};if(v.header.length===v.align.length){var b=v.align.length,V;for(V=0;V ?/gm,"");return{type:"blockquote",raw:p[0],text:v}}},L.list=function(f){var p=this.rules.block.list.exec(f);if(p){for(var v=p[0],b=p[2],V=b.length>1,fe=b[b.length-1]===")",Le={type:"list",raw:v,ordered:V,start:V?+b.slice(0,-1):"",loose:!1,items:[]},tt=p[0].match(this.rules.block.item),rt=!1,ot,st,it,ze,ct,ft,_t,kt=tt.length,vt=0;vt1||this.options.smartLists&&it!==b)&&(ze=tt.slice(vt+1).join(`
`),Le.raw=Le.raw.substring(0,Le.raw.length-ze.length),vt=kt-1)),ct=rt||/\n\n(?!\s*$)/.test(ot),vt!==kt-1&&(rt=ot.charAt(ot.length-1)===`
`,ct||(ct=rt)),ct&&(Le.loose=!0),ft=/^\[[ xX]\] /.test(ot),_t=void 0,ft&&(_t=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),Le.items.push({type:"list_item",raw:v,task:ft,checked:_t,loose:ct,text:ot});return Le}},L.html=function(f){var p=this.rules.block.html.exec(f);if(p)return{type:this.options.sanitize?"paragraph":"html",raw:p[0],pre:!this.options.sanitizer&&(p[1]==="pre"||p[1]==="script"||p[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(p[0]):_(p[0]):p[0]}},L.def=function(f){var p=this.rules.block.def.exec(f);if(p){p[3]&&(p[3]=p[3].substring(1,p[3].length-1));var v=p[1].toLowerCase().replace(/\s+/g," ");return{tag:v,raw:p[0],href:p[2],title:p[3]}}},L.table=function(f){var p=this.rules.block.table.exec(f);if(p){var v={type:"table",header:g(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(`
`):[]};if(v.header.length===v.align.length){v.raw=p[0];var b=v.align.length,V;for(V=0;V/i.test(b[0])&&(p=!1),!v&&/^<(pre|code|kbd|script)(\s|>)/i.test(b[0])?v=!0:v&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(b[0])&&(v=!1),{type:this.options.sanitize?"text":"html",raw:b[0],inLink:p,inRawBlock:v,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):_(b[0]):b[0]}},L.link=function(f){var p=this.rules.inline.link.exec(f);if(p){var v=N(p[2],"()");if(v>-1){var b=p[0].indexOf("!")===0?5:4,V=b+p[1].length+v;p[2]=p[2].substring(0,v),p[0]=p[0].substring(0,V).trim(),p[3]=""}var fe=p[2],Le="";if(this.options.pedantic){var tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(fe);tt?(fe=tt[1],Le=tt[3]):Le=""}else Le=p[3]?p[3].slice(1,-1):"";fe=fe.trim().replace(/^<([\s\S]*)>$/,"$1");var rt=de(p,{href:fe&&fe.replace(this.rules.inline._escapes,"$1"),title:Le&&Le.replace(this.rules.inline._escapes,"$1")},p[0]);return rt}},L.reflink=function(f,p){var v;if((v=this.rules.inline.reflink.exec(f))||(v=this.rules.inline.nolink.exec(f))){var b=(v[2]||v[1]).replace(/\s+/g," ");if(b=p[b.toLowerCase()],!b||!b.href){var V=v[0].charAt(0);return{type:"text",raw:V,text:V}}var fe=de(v,b,v[0]);return fe}},L.strong=function(f,p,v){v===void 0&&(v="");var b=this.rules.inline.strong.start.exec(f);if(b&&(!b[1]||b[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){p=p.slice(-1*f.length);var V=b[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;V.lastIndex=0;for(var fe;(b=V.exec(p))!=null;)if(fe=this.rules.inline.strong.middle.exec(p.slice(0,b.index+3)),fe)return{type:"strong",raw:f.slice(0,fe[0].length),text:f.slice(2,fe[0].length-2)}}},L.em=function(f,p,v){v===void 0&&(v="");var b=this.rules.inline.em.start.exec(f);if(b&&(!b[1]||b[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){p=p.slice(-1*f.length);var V=b[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;V.lastIndex=0;for(var fe;(b=V.exec(p))!=null;)if(fe=this.rules.inline.em.middle.exec(p.slice(0,b.index+2)),fe)return{type:"em",raw:f.slice(0,fe[0].length),text:f.slice(1,fe[0].length-1)}}},L.codespan=function(f){var p=this.rules.inline.code.exec(f);if(p){var v=p[2].replace(/\n/g," "),b=/[^ ]/.test(v),V=v.startsWith(" ")&&v.endsWith(" ");return b&&V&&(v=v.substring(1,v.length-1)),v=_(v,!0),{type:"codespan",raw:p[0],text:v}}},L.br=function(f){var p=this.rules.inline.br.exec(f);if(p)return{type:"br",raw:p[0]}},L.del=function(f){var p=this.rules.inline.del.exec(f);if(p)return{type:"del",raw:p[0],text:p[1]}},L.autolink=function(f,p){var v=this.rules.inline.autolink.exec(f);if(v){var b,V;return v[2]==="@"?(b=_(this.options.mangle?p(v[1]):v[1]),V="mailto:"+b):(b=_(v[1]),V=b),{type:"link",raw:v[0],text:b,href:V,tokens:[{type:"text",raw:b,text:b}]}}},L.url=function(f,p){var v;if(v=this.rules.inline.url.exec(f)){var b,V;if(v[2]==="@")b=_(this.options.mangle?p(v[0]):v[0]),V="mailto:"+b;else{var fe;do fe=v[0],v[0]=this.rules.inline._backpedal.exec(v[0])[0];while(fe!==v[0]);b=_(v[0]),v[1]==="www."?V="http://"+b:V=b}return{type:"link",raw:v[0],text:b,href:V,tokens:[{type:"text",raw:b,text:b}]}}},L.inlineText=function(f,p,v){var b=this.rules.inline.text.exec(f);if(b){var V;return p?V=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):_(b[0]):b[0]:V=_(this.options.smartypants?v(b[0]):b[0]),{type:"text",raw:b[0],text:V}}},I}(),Se=k.noopTest,ue=k.edit,ce=k.merge,H={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Se,table:Se,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};H._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,H._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,H.def=ue(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=ue(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=ue(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=//,H.html=ue(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=ue(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=ue(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=ce({},H),H.gfm=ce({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=ue(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=ue(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=ce({},H.normal,{html:ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Se,paragraph:ue(H.normal._paragraph).replace("hr",H.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Se,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Se,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",te.punctuation=ue(te.punctuation).replace(/punctuation/g,te._punctuation).getRegex(),te._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",te._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",te.em.start=ue(te.em.start).replace(/punctuation/g,te._punctuation).getRegex(),te.em.middle=ue(te.em.middle).replace(/punctuation/g,te._punctuation).replace(/overlapSkip/g,te._overlapSkip).getRegex(),te.em.endAst=ue(te.em.endAst,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.em.endUnd=ue(te.em.endUnd,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.strong.start=ue(te.strong.start).replace(/punctuation/g,te._punctuation).getRegex(),te.strong.middle=ue(te.strong.middle).replace(/punctuation/g,te._punctuation).replace(/blockSkip/g,te._blockSkip).getRegex(),te.strong.endAst=ue(te.strong.endAst,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.strong.endUnd=ue(te.strong.endUnd,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.blockSkip=ue(te._blockSkip,"g").getRegex(),te.overlapSkip=ue(te._overlapSkip,"g").getRegex(),te._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,te._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,te._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,te.autolink=ue(te.autolink).replace("scheme",te._scheme).replace("email",te._email).getRegex(),te._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,te.tag=ue(te.tag).replace("comment",H._comment).replace("attribute",te._attribute).getRegex(),te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,te._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,te.link=ue(te.link).replace("label",te._label).replace("href",te._href).replace("title",te._title).getRegex(),te.reflink=ue(te.reflink).replace("label",te._label).getRegex(),te.reflinkSearch=ue(te.reflinkSearch,"g").replace("reflink",te.reflink).replace("nolink",te.nolink).getRegex(),te.normal=ce({},te),te.pedantic=ce({},te.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ue(/^!?\[(label)\]\((.*?)\)/).replace("label",te._label).getRegex(),reflink:ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te._label).getRegex()}),te.gfm=ce({},te.normal,{escape:ue(te.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(f="x"+f.toString(16)),L+=""+f+";";return L}var ne=function(){function I(x){this.tokens=[],this.tokens.links=Object.create(null),this.options=x||T,this.options.tokenizer=this.options.tokenizer||new ae,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:m.normal,inline:R.normal};this.options.pedantic?(f.block=m.pedantic,f.inline=R.pedantic):this.options.gfm&&(f.block=m.gfm,this.options.breaks?f.inline=R.breaks:f.inline=R.gfm),this.tokenizer.rules=f}I.lex=function(f,p){var v=new I(p);return v.lex(f)};var L=I.prototype;return L.lex=function(f){return f=f.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(f,this.tokens,!0),this.inline(this.tokens),this.tokens},L.blockTokens=function(f,p,v){p===void 0&&(p=[]),v===void 0&&(v=!0),f=f.replace(/^ +$/gm,"");for(var b,V,fe,Le;f;){if(b=this.tokenizer.space(f)){f=f.substring(b.raw.length),b.type&&p.push(b);continue}if(b=this.tokenizer.code(f,p)){f=f.substring(b.raw.length),b.type?p.push(b):(Le=p[p.length-1],Le.raw+=`
`+b.raw,Le.text+=`
`+b.text);continue}if(b=this.tokenizer.fences(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.heading(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.nptable(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.hr(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.blockquote(f)){f=f.substring(b.raw.length),b.tokens=this.blockTokens(b.text,[],v),p.push(b);continue}if(b=this.tokenizer.list(f)){for(f=f.substring(b.raw.length),fe=b.items.length,V=0;V0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(Le))!=null;)rt.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(Le=Le.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Le.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(Le))!=null;)Le=Le.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Le.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(fe=this.tokenizer.escape(f)){f=f.substring(fe.raw.length),p.push(fe);continue}if(fe=this.tokenizer.tag(f,v,b)){f=f.substring(fe.raw.length),v=fe.inLink,b=fe.inRawBlock,p.push(fe);continue}if(fe=this.tokenizer.link(f)){f=f.substring(fe.raw.length),fe.type==="link"&&(fe.tokens=this.inlineTokens(fe.text,[],!0,b)),p.push(fe);continue}if(fe=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(fe.raw.length),fe.type==="link"&&(fe.tokens=this.inlineTokens(fe.text,[],!0,b)),p.push(fe);continue}if(fe=this.tokenizer.strong(f,Le,V)){f=f.substring(fe.raw.length),fe.tokens=this.inlineTokens(fe.text,[],v,b),p.push(fe);continue}if(fe=this.tokenizer.em(f,Le,V)){f=f.substring(fe.raw.length),fe.tokens=this.inlineTokens(fe.text,[],v,b),p.push(fe);continue}if(fe=this.tokenizer.codespan(f)){f=f.substring(fe.raw.length),p.push(fe);continue}if(fe=this.tokenizer.br(f)){f=f.substring(fe.raw.length),p.push(fe);continue}if(fe=this.tokenizer.del(f)){f=f.substring(fe.raw.length),fe.tokens=this.inlineTokens(fe.text,[],v,b),p.push(fe);continue}if(fe=this.tokenizer.autolink(f,B)){f=f.substring(fe.raw.length),p.push(fe);continue}if(!v&&(fe=this.tokenizer.url(f,B))){f=f.substring(fe.raw.length),p.push(fe);continue}if(fe=this.tokenizer.inlineText(f,b,Y)){f=f.substring(fe.raw.length),V=fe.raw.slice(-1),p.push(fe);continue}if(f){var ot="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return p},ge(I,null,[{key:"rules",get:function(){return{block:m,inline:R}}}]),I}(),ke=M.defaults,je=k.cleanUrl,Pe=k.escape,we=function(){function I(x){this.options=x||ke}var L=I.prototype;return L.code=function(f,p,v){var b=(p||"").match(/\S*/)[0];if(this.options.highlight){var V=this.options.highlight(f,b);V!=null&&V!==f&&(v=!0,f=V)}return b?''+(v?f:Pe(f,!0))+`
`:""+(v?f:Pe(f,!0))+`
`},L.blockquote=function(f){return`
`+f+`
`},L.html=function(f){return f},L.heading=function(f,p,v,b){return this.options.headerIds?"
`:""+f+"
`},L.hr=function(){return this.options.xhtml?`
`:`
`},L.list=function(f,p,v){var b=p?"ol":"ul",V=p&&v!==1?' start="'+v+'"':"";return"<"+b+V+`>
`+f+""+b+`>
`},L.listitem=function(f){return""+f+`
`},L.checkbox=function(f){return" "},L.paragraph=function(f){return""+f+`
`},L.table=function(f,p){return p&&(p=""+p+""),`
`},L.tablerow=function(f){return`
`+f+`
`},L.tablecell=function(f,p){var v=p.header?"th":"td",b=p.align?"<"+v+' align="'+p.align+'">':"<"+v+">";return b+f+""+v+`>
`},L.strong=function(f){return""+f+""},L.em=function(f){return""+f+""},L.codespan=function(f){return""+f+""},L.br=function(){return this.options.xhtml?"
":"
"},L.del=function(f){return""+f+""},L.link=function(f,p,v){if(f=je(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var b='"+v+"",b},L.image=function(f,p,v){if(f=je(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var b='
":">",b},L.text=function(f){return f},I}(),Me=function(){function I(){}var L=I.prototype;return L.strong=function(f){return f},L.em=function(f){return f},L.codespan=function(f){return f},L.del=function(f){return f},L.html=function(f){return f},L.text=function(f){return f},L.link=function(f,p,v){return""+v},L.image=function(f,p,v){return""+v},L.br=function(){return""},I}(),Ge=function(){function I(){this.seen={}}var L=I.prototype;return L.slug=function(f){var p=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(p)){var v=p;do this.seen[v]++,p=v+"-"+this.seen[v];while(this.seen.hasOwnProperty(p))}return this.seen[p]=0,p},I}(),Ve=M.defaults,Ke=k.unescape,qe=function(){function I(x){this.options=x||Ve,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Me,this.slugger=new Ge}I.parse=function(f,p){var v=new I(p);return v.parse(f)};var L=I.prototype;return L.parse=function(f,p){p===void 0&&(p=!0);var v="",b,V,fe,Le,tt,rt,ot,st,it,ze,ct,ft,_t,kt,vt,Bt,Ut,zt,pn=f.length;for(b=0;b0&&vt.tokens[0].type==="text"?(vt.tokens[0].text=zt+" "+vt.tokens[0].text,vt.tokens[0].tokens&&vt.tokens[0].tokens.length>0&&vt.tokens[0].tokens[0].type==="text"&&(vt.tokens[0].tokens[0].text=zt+" "+vt.tokens[0].tokens[0].text)):vt.tokens.unshift({type:"text",text:zt}):kt+=zt),kt+=this.parse(vt.tokens,_t),it+=this.renderer.listitem(kt,Ut,Bt);v+=this.renderer.list(it,ct,ft);continue}case"html":{v+=this.renderer.html(ze.text);continue}case"paragraph":{v+=this.renderer.paragraph(this.parseInline(ze.tokens));continue}case"text":{for(it=ze.tokens?this.parseInline(ze.tokens):ze.text;b+1An error occurred:
"+Xe(fe.message+"",!0)+"
";throw fe}}Ce.options=Ce.setOptions=function(I){return ht(Ce.defaults,I),at(Ce.defaults),Ce},Ce.getDefaults=ve,Ce.defaults=Je,Ce.use=function(I){var L=ht({},I);if(I.renderer&&function(){var f=Ce.defaults.renderer||new we,p=function(V){var fe=f[V];f[V]=function(){for(var Le=arguments.length,tt=new Array(Le),rt=0;rt`,triples:"",explode:"[]{}"},oe=F.Pos;F.defineOption("autoCloseBrackets",!1,function(W,P,U){U&&U!=F.Init&&(W.removeKeyMap(Ee),W.state.closeBrackets=null),P&&(G(Oe(P,"pairs")),W.state.closeBrackets=P,W.addKeyMap(Ee))});function Oe(W,P){return P=="pairs"&&typeof W=="string"?W:typeof W=="object"&&W[P]!=null?W[P]:ge[P]}var Ee={Backspace:S,Enter:z};function G(W){for(var P=0;P=0;ie--){var We=se[ie].head;W.replaceRange("",oe(We.line,We.ch-1),oe(We.line,We.ch+1),"+delete")}}function z(W){var P=D(W),U=P&&Oe(P,"explode");if(!U||W.getOption("disableInput"))return F.Pass;for(var se=W.listSelections(),ie=0;ie0;return{anchor:new oe(W.anchor.line,W.anchor.ch+(P?-1:1)),head:new oe(W.head.line,W.head.ch+(P?1:-1))}}function re(W,P){var U=D(W);if(!U||W.getOption("disableInput"))return F.Pass;var se=Oe(U,"pairs"),ie=se.indexOf(P);if(ie==-1)return F.Pass;for(var Te=Oe(U,"closeBefore"),We=Oe(U,"triples"),pe=se.charAt(ie+1)==P,be=W.listSelections(),Re=ie%2==0,Q,me=0;me=0&&W.getRange(J,oe(J.line,J.ch+3))==P+P+P?y="skipThree":y="skip";else if(pe&&J.ch>1&&We.indexOf(P)>=0&&W.getRange(oe(J.line,J.ch-2),J)==P+P){if(J.ch>2&&/\bstring/.test(W.getTokenTypeAt(oe(J.line,J.ch-2))))return F.Pass;y="addFour"}else if(pe){var X=J.ch==0?" ":W.getRange(oe(J.line,J.ch-1),J);if(!F.isWordChar(Z)&&X!=P&&!F.isWordChar(X))y="both";else return F.Pass}else if(Re&&(Z.length===0||/\s/.test(Z)||Te.indexOf(Z)>-1))y="both";else return F.Pass;if(!Q)Q=y;else if(Q!=y)return F.Pass}var w=ie%2?se.charAt(ie-1):P,ee=ie%2?P:se.charAt(ie+1);W.operation(function(){if(Q=="skip")W.execCommand("goCharRight");else if(Q=="skipThree")for(var j=0;j<3;j++)W.execCommand("goCharRight");else if(Q=="surround"){for(var A=W.getSelections(),j=0;j0&&(N.percent=N.loaded/N.total*100),k.onProgress(N)});var l=new FormData;k.data&&Object.keys(k.data).forEach(function(_){var N=k.data[_];if(Array.isArray(N)){N.forEach(function(de){l.append(_+"[]",de)});return}l.append(_,k.data[_])}),k.file instanceof Blob?l.append(k.filename,k.file,k.file.name):l.append(k.filename,k.file),c.onerror=function(N){k.onError(N)},c.onload=function(){return c.status<200||c.status>=300?k.onError(Ee(k,c),G(c)):k.onSuccess(G(c),c)},c.open(k.method,k.action,!0),k.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var g=k.headers||{};return g["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(g).forEach(function(_){g[_]!==null&&c.setRequestHeader(_,g[_])}),c.send(l),{abort:function(){c.abort()}}}var D=+new Date,S=0;function z(){return"rc-upload-"+D+"-"+ ++S}function $(k,c){return k.indexOf(c,k.length-c.length)!==-1}var re=function(k,c){if(k&&c){var l=Array.isArray(c)?c:c.split(","),g=k.name||"",_=k.type||"",N=_.replace(/\/.*$/,"");return l.some(function(de){var _e=de.trim();return _e.charAt(0)==="."?$(g.toLowerCase(),_e.toLowerCase()):/\/\*$/.test(_e)?N===_e.replace(/\/.*$/,""):_===_e})}return!0};function ye(k,c){var l=k.createReader(),g=[];function _(){l.readEntries(function(N){var de=Array.prototype.slice.apply(N);g=g.concat(de);var _e=!de.length;_e?c(g):_()})}_()}var le=function(c,l,g){var _=function N(de,_e){_e=_e||"",de.isFile?de.file(function(ae){g(ae)&&(de.fullPath&&!ae.webkitRelativePath&&(Object.defineProperties(ae,{webkitRelativePath:{writable:!0}}),ae.webkitRelativePath=de.fullPath.replace(/^\//,""),Object.defineProperties(ae,{webkitRelativePath:{writable:!1}})),l([ae]))}):de.isDirectory&&ye(de,function(ae){ae.forEach(function(Se){N(Se,""+_e+de.name+"/")})})};c.forEach(function(N){_(N.webkitGetAsEntry())})},W=le,P=Object.assign||function(k){for(var c=1;c=0)continue;if(!Object.prototype.hasOwnProperty.call(k,g))continue;l[g]=k[g]}return l}function We(k,c){if(!(k instanceof c))throw new TypeError("Cannot call a class as a function")}function pe(k,c){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:k}function be(k,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);k.prototype=Object.create(c&&c.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(k,c):k.__proto__=c)}var Re=function(c){return Object.keys(c).reduce(function(l,g){return(g.substr(0,5)==="data-"||g.substr(0,5)==="aria-"||g==="role")&&(l[g]=c[g]),l},{})},Q=function(k){be(c,k);function c(){var l,g,_,N;We(this,c);for(var de=arguments.length,_e=Array(de),ae=0;ae1&&arguments[1]!==void 0?arguments[1]:1,x=Me.length,f=0;f1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Re.a)(l).map(function(_,N){if(!Ee.isValidElement(_)||!_.type)return null;var de=_.type.isSelectOptGroup,_e=_.key,ae=_.props,Se=ae.children,ue=Object(M.a)(ae,["children"]);return g||!de?Q(_):Object(be.a)(Object(be.a)({key:"__RC_SELECT_GRP__".concat(_e===null?N:_e,"__"),label:_e},ue),{},{options:me(Se)})}).filter(function(_){return _})}var Ae=C("2Qr1"),J=C("qNPg"),y=C("U8pU"),Z=C("Kwbf"),X=C("WKfj");function w(l){var g=l.mode,_=l.options,N=l.children,de=l.backfill,_e=l.allowClear,ae=l.placeholder,Se=l.getInputElement,ue=l.showSearch,ce=l.onSearch,H=l.defaultOpen,te=l.autoFocus,h=l.labelInValue,T=l.value,m=l.inputValue,R=l.optionLabelProp,Y=g==="multiple"||g==="tags",B=ue!==void 0?ue:Y||g==="combobox",ne=_||me(N);if(Object(Z.a)(g!=="tags"||ne.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),g==="tags"||g==="combobox"){var ke=ne.some(function(we){return we.options?we.options.some(function(Me){return typeof("value"in Me?Me.value:Me.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(Z.a)(!ke,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(Z.a)(g!=="combobox"||!R,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(Z.a)(g==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(Z.a)(g==="combobox"||!Se,"`getInputElement` only work with `combobox` mode."),Object(Z.b)(g!=="combobox"||!Se||!_e||!ae,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ce&&!B&&g!=="combobox"&&g!=="tags"&&Object(Z.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(Z.b)(!H||te,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),T!=null){var je=Object(X.d)(T);Object(Z.a)(!h||je.every(function(we){return Object(y.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(Z.a)(!Y||Array.isArray(T),"`value` should be array when `mode` is `multiple` or `tags`")}if(N){var Pe=null;Object(Re.a)(N).some(function(we){if(!Ee.isValidElement(we)||!we.type)return!1;var Me=we.type;if(Me.isSelectOption)return!1;if(Me.isSelectOptGroup){var Ge=Object(Re.a)(we.props.children).every(function(Ve){return!Ee.isValidElement(Ve)||!we.type||Ve.type.isSelectOption?!0:(Pe=Ve.type,!1)});return!Ge}return Pe=Me,!0}),Pe&&Object(Z.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Pe.displayName||Pe.name||Pe,"`.")),Object(Z.a)(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var ee=w,j=Object(J.a)({prefixCls:"rc-select",components:{optionList:se},convertChildrenToData:me,flattenOptions:Ae.d,getLabeledValue:Ae.e,filterOptions:Ae.b,isValueDisabled:Ae.g,findValueOption:Ae.c,warningProps:ee,fillOptionsWithMissingValue:Ae.a}),A=function(l){Object(oe.a)(_,l);var g=Object(Oe.a)(_);function _(){var N;return Object(F.a)(this,_),N=g.apply(this,arguments),N.selectRef=Ee.createRef(),N.focus=function(){N.selectRef.current.focus()},N.blur=function(){N.selectRef.current.blur()},N}return Object(ge.a)(_,[{key:"render",value:function(){return Ee.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),_}(Ee.Component);A.Option=Te,A.OptGroup=pe;var k=A,c=Ye.c=k},M8RZ:function(bt,Ye,C){"use strict";C.d(Ye,"a",function(){return S});var F=C("fWQN"),ge=C("mtLc"),oe=C("yKVA"),Oe=C("879j"),Ee=C("q1tI"),G=C.n(Ee),M=C("i8i4"),D=C.n(M),S=function(z){Object(oe.a)(re,z);var $=Object(Oe.a)(re);function re(ye){var le;Object(F.a)(this,re),le=$.call(this,ye);var W=window.document;return le.node=W.createElement("div"),W.body.appendChild(le.node),le}return Object(ge.a)(re,[{key:"render",value:function(){var le=this.props.children;return Object(M.createPortal)(le,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),re}(G.a.Component)},OLES:function(bt,Ye,C){"use strict";var F=C("U8pU"),ge=C("VTBJ"),oe=C("Ff2n"),Oe=C("q1tI"),Ee=C("uciX"),G=C("7ixt"),M=function(ye){var le=ye.overlay,W=ye.prefixCls,P=ye.id,U=ye.overlayInnerStyle;return Oe.createElement("div",{className:"".concat(W,"-inner"),id:P,role:"tooltip",style:U},typeof le=="function"?le():le)},D=M,S=function(ye,le){var W=ye.overlayClassName,P=ye.trigger,U=P===void 0?["hover"]:P,se=ye.mouseEnterDelay,ie=se===void 0?0:se,Te=ye.mouseLeaveDelay,We=Te===void 0?.1:Te,pe=ye.overlayStyle,be=ye.prefixCls,Re=be===void 0?"rc-tooltip":be,Q=ye.children,me=ye.onVisibleChange,Ae=ye.afterVisibleChange,J=ye.transitionName,y=ye.animation,Z=ye.placement,X=Z===void 0?"right":Z,w=ye.align,ee=w===void 0?{}:w,j=ye.destroyTooltipOnHide,A=j===void 0?!1:j,k=ye.defaultVisible,c=ye.getTooltipContainer,l=ye.overlayInnerStyle,g=Object(oe.a)(ye,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),_=Object(Oe.useRef)(null);Object(Oe.useImperativeHandle)(le,function(){return _.current});var N=Object(ge.a)({},g);"visible"in ye&&(N.popupVisible=ye.visible);var de=function(){var ce=ye.arrowContent,H=ce===void 0?null:ce,te=ye.overlay,h=ye.id;return[Oe.createElement("div",{className:"".concat(Re,"-arrow"),key:"arrow"},H),Oe.createElement(D,{key:"content",prefixCls:Re,id:h,overlay:te,overlayInnerStyle:l})]},_e=!1,ae=!1;if(typeof A=="boolean")_e=A;else if(A&&Object(F.a)(A)==="object"){var Se=A.keepParent;_e=Se===!0,ae=Se===!1}return Oe.createElement(Ee.a,Object.assign({popupClassName:W,prefixCls:Re,popup:de,action:U,builtinPlacements:G.a,popupPlacement:X,ref:_,popupAlign:ee,getPopupContainer:c,onPopupVisibleChange:me,afterPopupVisibleChange:Ae,popupTransitionName:J,popupAnimation:y,defaultPopupVisible:k,destroyPopupOnHide:_e,autoDestroy:ae,mouseLeaveDelay:We,popupStyle:pe,mouseEnterDelay:ie},N),Q)},z=Object(Oe.forwardRef)(S),$=Ye.a=z},Ot1p:function(bt,Ye,C){"use strict";var F=C("2qtc"),ge=C("kLXV"),oe=C("rAM+"),Oe=C("miYZ"),Ee=C("tsqr"),G=C("tJVT"),M=C("jrin"),D=C("q1tI"),S=C.n(D),z=C("VrN/"),$=C.n(z),re=C("bdgK"),ye=C("p77/"),le=C("Bd2K"),W=C("ELLl"),P=C("19Vz"),U=C("lZu9"),se=C("+NIl"),ie=C("kSUc"),Te=C("9Bee"),We=function(x){var f=x.value,p=f===void 0?"":f,v=x.className,b=x.showTextOnly,V=x.showLines,fe=x.style,Le=fe===void 0?{}:fe,tt=Object(D.useMemo)(function(){return""},[p]);return S.a.createElement(S.a.Fragment,null,S.a.createElement("div",{dangerouslySetInnerHTML:{__html:tt}}))},pe=C("0Owb"),be=C("dejd"),Re=C("C+DQ"),Q=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function me(x){var f=x.onActionCallback,p=x.title,v=x.icon,b=x.actionName,V=x.className,fe=V===void 0?"":V,Le=x.children;function tt(){f(b)}return S.a.createElement("a",{title:p,className:fe,onClick:tt},S.a.createElement("i",{className:"md-iconfont ".concat(v)}),Le)}var Ae=function(x){var f=x.watch,p=x.showNullButton,v=x.onActionCallback,b=x.fullScreen,V=x.insertTemp,fe=x.hidetoolBar,Le=[].concat(Q,[{title:"".concat(f?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(f?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return S.a.createElement("ul",{className:"markdown-toolbar-container"},!fe&&Le.map(function(tt,rt){return S.a.createElement("li",{key:rt},tt.actionName?S.a.createElement(me,Object(pe.a)({},tt,{onActionCallback:v})):S.a.createElement("span",{className:"v-line"}))}),p?S.a.createElement("li",null,S.a.createElement(me,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:v},S.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,V&&S.a.createElement("li",null,S.a.createElement(me,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(V),onActionCallback:v},S.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),S.a.createElement("li",{className:"btn-full-screen"},S.a.createElement(me,{icon:"".concat(b?"icon-shrink":"icon-enlarge"),title:b?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:v})))},J=C("M8RZ"),y=C("+L6B"),Z=C("2/Rp"),X=C("y8nQ"),w=C("Vl3Y"),ee=C("5NDa"),j=C("5rEg"),A={labelCol:{span:4},wrapperCol:{span:20}},k=function(x){var f=x.callback,p=x.onCancel;function v(b){f(b)}return S.a.createElement(w.a,Object(pe.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:v}),S.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},S.a.createElement(j.a,null)),S.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},S.a.createElement(j.a,null)),S.a.createElement("div",{className:"flex-container flex-end"},S.a.createElement(Z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(Z.a,{type:"ghost",onClick:p},"\u53D6\u6D88")))},c=C("7ahc"),l=C("HmJG"),g=C("BjJ7"),_=w.a.useForm,N={width:280,marginRight:10},de={labelCol:{span:5},wrapperCol:{span:19}},_e=function(x){var f=x.callback,p=x.onCancel,v=_(),b=Object(G.a)(v,1),V=b[0];function fe(rt){f(rt)}function Le(rt,ot){V.setFieldsValue({src:"/api/attachments/".concat(rt.id),type:ot.type})}function tt(rt){var ot=rt.target.files[0];Se(ot,Le)}return S.a.createElement(w.a,Object(pe.a)({form:V},de,{className:"upload-image-panel",onFinish:fe}),S.a.createElement(w.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},S.a.createElement("div",{className:"flex-container"},S.a.createElement(w.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},S.a.createElement(j.a,{style:N})),S.a.createElement(ae,{onFileChange:tt}))),S.a.createElement(w.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},S.a.createElement(j.a,{style:{width:264}})),S.a.createElement(w.a.Item,{style:{textAlign:"right"}},S.a.createElement(Z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(Z.a,{type:"ghost",onClick:p},"\u53D6\u6D88")))};function ae(x){var f=x.onFileChange;return S.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",S.a.createElement("input",{type:"file",onChange:f}))}function Se(x,f){if(!x)throw new String("\u6CA1\u6709\u6587\u4EF6");var p=new FormData;p.append("editormd-image-file",x),p.append("file_param_name","editormd-image-file"),p.append("byxhr","true");var v=new window.XMLHttpRequest;v.withCredentials=!0,v.addEventListener("load",function(b){f(JSON.parse(b.target.responseText),x)},!1),v.addEventListener("error",function(b){console.error(b)},!1),v.open("POST","".concat(g.a,"/api/attachments.json")),v.send(p)}var ue=C("giR+"),ce=C("fyUT"),H=C("7Kak"),te=C("9yH6"),h=te.a.Group,T={margin:"0 8px"},m=function(x){var f=x.callback,p=x.onCancel;function v(b){f(b)}return S.a.createElement(w.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:v},S.a.createElement("div",{className:"flex-container"},S.a.createElement("span",{style:T},"\u5355\u5143\u683C\u6570\uFF1A"),S.a.createElement("span",{style:T},"\u884C\u6570"),S.a.createElement(w.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},S.a.createElement(ce.a,null)),S.a.createElement("span",{style:T},"\u5217\u6570"),S.a.createElement(w.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},S.a.createElement(ce.a,null))),S.a.createElement("div",{className:"flex-container",style:{marginTop:12}},S.a.createElement("span",{style:T},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),S.a.createElement(w.a.Item,{name:"align"},S.a.createElement(h,null,S.a.createElement(te.a,{value:"default"},S.a.createElement("i",{className:"fa fa-align-justify"})),S.a.createElement(te.a,{value:"left"},S.a.createElement("i",{className:"fa fa-align-left"})),S.a.createElement(te.a,{value:"center"},S.a.createElement("i",{className:"fa fa-align-center"})),S.a.createElement(te.a,{value:"right"},S.a.createElement("i",{className:"fa fa-align-right"}))))),S.a.createElement("div",{className:"flex-container flex-end"},S.a.createElement(Z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(Z.a,{type:"ghost",onClick:p},"\u53D6\u6D88")))},R=C("m3rI"),Y=C("wMS7"),B=C.n(Y),ne="link",ke="upload-image",je="code-block",Pe="add-table",we="------------",Me={default:we,left:":".concat(we),center:":".concat(we,":"),right:"".concat(we,":")},Ge=C("9VGf"),Ve,Ke;function qe(){}var ht=0,nt=1e4,Xe="\u2581",ve=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function at(x){return/^\d+$/.test(x)?"".concat(x,"px"):x}var Je=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ce=Je?"Cmd":"Ctrl",Ie=(Ve={},Object(M.a)(Ve,Ce+"-B","bold"),Object(M.a)(Ve,Ce+"-I","italic"),Ve),I=(Ke={},Object(M.a)(Ke,ne,"\u6DFB\u52A0\u94FE\u63A5"),Object(M.a)(Ke,je,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(M.a)(Ke,ke,"\u6DFB\u52A0\u56FE\u7247"),Object(M.a)(Ke,Pe,"\u6DFB\u52A0\u8868\u683C"),Ke),L=Ye.a=function(x){var f=x.defaultValue,p=f===void 0?"":f,v=x.onChange,b=x.width,V=b===void 0?"100%":b,fe=x.height,Le=fe===void 0?400:fe,tt=x.miniToolbar,rt=tt===void 0?!1:tt,ot=x.isFocus,st=ot===void 0?!1:ot,it=x.watch,ze=x.insertTemp,ct=x.mode,ft=ct===void 0?"markdown":ct,_t=x.id,kt=_t===void 0?"markdown-editor-id":_t,vt=x.showResizeBar,Bt=vt===void 0?!1:vt,Ut=x.noStorage,zt=Ut===void 0?!1:Ut,pn=x.showNullButton,an=pn===void 0?!1:pn,nr=x.hidetoolBar,An=nr===void 0?!1:nr,Rn=x.fullScreen,Wn=Rn===void 0?!1:Rn,Dt=x.onBlur,Qe=x.onCMBeforeChange,tn=x.onFullScreen,Gn=x.className,mn=Gn===void 0?"":Gn,Ct=x.disablePaste,kn=Ct===void 0?!1:Ct,Pn=x.placeholder,Ln=Pn===void 0?"":Pn,Ne=x.values,mt=Ne===void 0?"":Ne,Sn=Object(D.useState)(null),Dn=Object(G.a)(Sn,2),Fe=Dn[0],Xn=Dn[1],Tr=Object(D.useState)(p),pt=Object(G.a)(Tr,2),un=pt[0],Hn=pt[1],Vn=Object(D.useState)(it),cn=Object(G.a)(Vn,2),Mn=cn[0],dt=cn[1],he=Object(D.useState)(Wn),Ze=Object(G.a)(he,2),lt=Ze[0],Tt=Ze[1],dn=Object(D.useState)(""),$t=Object(G.a)(dn,2),jt=$t[0],Rt=$t[1],Or=Object(D.useState)(0),En=Object(G.a)(Or,2),Nn=En[0],gn=En[1],ki=Object(D.useState)(Le),Si=Object(G.a)(ki,2),pr=Si[0],rr=Si[1],Zi=Object(D.useState)(!1),Ti=Object(G.a)(Zi,2),Fa=Ti[0],qr=Ti[1],$n=Object(D.useRef)(),Ar=Object(D.useRef)(),Lr=Object(D.useRef)(),mr=Object(D.useRef)();Object(D.useEffect)(function(){Hn(mt),Fe==null||Fe.setValue(mt)},[mt]),Object(D.useEffect)(function(){tn==null||tn(lt)},[lt]),Object(D.useEffect)(function(){if($n.current){var yt=$.a.fromTextArea($n.current,{mode:ft,lineNumbers:!rt,lineWrapping:!0,value:p,autoCloseTags:!0,autoCloseBrackets:!0});st&&yt.focus();function xt(wt,St){if(kn){St.preventDefault();return}var At=St.clipboardData;if(At){var Pt=At.types.toString(),Ft=At.items,Yt=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];if(Pt==="Files"||At.types.indexOf("Files")>-1){if(St.preventDefault(),ft=="stex")return;try{var qt,qn=Ft[1];((qt=Ft[0])===null||qt===void 0?void 0:qt.kind)==="file"&&(qn=Ft[0]);var Kt=qn.getAsFile(),ar=Kt.name.split(".").pop();Se(Kt,function(on){if(on.id){var Jn,Zn,Qr;(Kt==null||((Jn=Kt.type)===null||Jn===void 0)?void 0:Jn.indexOf("image"))>-1?yt.replaceSelection(".concat(on.content_type,")")):(Kt==null||((Zn=Kt.type)===null||Zn===void 0)?void 0:Zn.indexOf("video"))>-1?yt.replaceSelection('')):(Kt==null||((Qr=Kt.type)===null||Qr===void 0)?void 0:Qr.indexOf("pdf"))>-1?yt.replaceSelection('').concat(Kt.name,"")):Yt.includes(ar)?yt.replaceSelection('').concat(Kt.name,"")):yt.replaceSelection("[".concat(Kt.name,"](").concat(R.a.API_SERVER,"/api/attachments/").concat(on.id,"?type=").concat(on.content_type,")"))}else(on==null?void 0:on.status)===401&&(document.location.href="/user/login")})}catch(on){Ee.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return yt.on("paste",xt),Xn(yt),function(){yt.off("paste",xt)}}},[]);var Jr=Object(D.useCallback)(function(){if(Ar.current)try{}catch(yt){console.log(yt,"---- to set md editor body height")}},[pr,Ar,lt]);Object(D.useEffect)(function(){function yt(){var wt=new re.default(function(St){var At=Object(oe.a)(St),Pt;try{for(At.s();!(Pt=At.n()).done;){var Ft=Pt.value;(Ft.target.offsetHeight>0||Ft.target.offsetWidth>0)&&(Jr(),Fe.setSize("100%","100%"),Fe.refresh())}}catch(Yt){At.e(Yt)}finally{At.f()}});return wt.observe($n.current.parentElement),wt}if(Fe){var xt=yt();return function(){xt.unobserve($n.current.parentElement)}}},[Fe,Jr]),Object(D.useEffect)(function(){if(Fe){for(var yt=[],xt=function(){var Ft=St[wt];At=Object(G.a)(Ft,2);var Yt=At[0],qt=At[1],qn=Object(M.a)({},Yt,function(){gr(qt)});yt.push(qn),Fe.addKeyMap(qn)},wt=0,St=Object.entries(Ie);wt0){var yt=new Date().getTime(),xt=window.sessionStorage.getItem(kt);yt>=Nn+nt&&(!xt||xt!==un)&&(window.sessionStorage.setItem(kt,un),qr(!0))}},nt),Object(D.useEffect)(function(){dt(it)},[Fe,it]),Object(D.useEffect)(function(){Fe&&(st&&Fe.focus())},[Fe,st]),Object(D.useEffect)(function(){if(Mn&&Fe){var yt=Fe.getScrollerElement();function xt(wt){var St=wt.target;if(mr.current){var At=St.scrollTop/St.scrollHeight;mr.current.scrollTop=mr.current.scrollHeight*At}}return yt.addEventListener("scroll",xt),function(){yt.removeEventListener("scroll",xt)}}},[Fe,Mn]),Object(D.useEffect)(function(){if(Fe&&Qe){function yt(xt,wt){Qe(xt,wt)}return Fe.on("beforeChange",yt),function(){Fe.off("beforeChange",yt)}}},[Fe,Qe]),Object(D.useEffect)(function(){if(Fe&&Dt){function yt(){Dt(Fe.getValue())}return Fe.on("blur",yt),function(){Fe.off("blur",yt)}}},[Fe,Dt]),Object(D.useEffect)(function(){if(Fe){function yt(xt){var wt=B.a.sanitize(xt.getValue());Hn(wt),gn(new Date().getTime()),xt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),v&&v(wt)}return Fe.on("change",yt),function(){Fe.off("change",yt)}}},[Fe,v]),Object(D.useEffect)(function(){Fe&&(p==null?(Fe.setValue(""),Hn("")):p!==Fe.getValue()&&(Fe.setValue(p),Hn(p),Fe.setCursor(Fe.lineCount(),0)))},[Fe,p]);var gr=Object(D.useCallback)(function(yt){var xt=Fe.getCursor(),wt=Fe.getSelection(),St=wt.split(`
`);switch(yt){case"bold":return Fe.replaceSelection("**"+wt+"**"),wt===""&&Fe.setCursor(xt.line,xt.ch+2),Fe.focus();case"italic":return Fe.replaceSelection("*"+wt+"*"),wt===""&&Fe.setCursor(xt.line,xt.ch+1),Fe.focus();case"code":return Fe.replaceSelection("`"+wt+"`"),wt===""&&Fe.setCursor(xt.line,xt.ch+1),Fe.focus();case"inline-latex":return Fe.replaceSelection("`$$"+wt+"$$`"),wt===""&&Fe.setCursor(xt.line,xt.ch+3),Fe.focus();case"latex":return Fe.replaceSelection("```latex\n"+wt+"\n```"),Fe.setCursor(xt.line+1,wt.length+1),Fe.focus();case"line-break":return Fe.replaceSelection(`
`),Fe.focus();case"list-ul":return wt===""?Fe.replaceSelection("- "+wt):Fe.replaceSelection(St.map(function(At){return At===""?"":"- ".concat(At)}).join(`
`)),Fe.focus();case"list-ol":return wt===""?Fe.replaceSelection("1. "+wt):Fe.replaceSelection(St.map(function(At,Pt){return At===""?"":"".concat(Pt+1,". ").concat(At)}).join(`
`)),Fe.focus();case"add-null-ch":return wt===""&&Fe.setCursor(xt.line,xt.ch+1),Fe.replaceSelection(Xe),Fe.focus();case"inster-template-1":return wt===""&&Fe.setCursor(xt.line,xt.ch),Fe.replaceSelection(ve),Fe.focus();case"eraser":return Fe.setValue(""),Fe.focus();case"trigger-watch":return dt(!Mn),Fe.focus();case"trigger-full-screen":return Tt(!lt),Fe.focus();case ne:Rt(ne);return;case je:Rt(je);return;case ke:Rt(ke);return;case Pe:Rt(Pe);return;default:throw new Error}},[Fe,Mn,lt]),Yn=Object(D.useCallback)(function(yt){Rt("");switch(jt){case ne:var xt=yt.title,wt=yt.link;return Fe.replaceSelection("[".concat(xt,"](").concat(wt,")")),Fe.focus();case je:var St=yt.language,At=yt.content;return Fe.replaceSelection(["```"+St,At,"```"].join(`
`)),Fe.focus();case ke:var Pt=yt.src,Ft=yt.alt;return Fe.replaceSelection(".concat(Pt,' "').concat(Ft,'" )')),Fe.focus();case Pe:for(var Yt=yt.row,qt=yt.col,qn=yt.align,Kt=`
`,ar=0;ar300&&(Yt=300);var qt=Le+Yt+"px";rr(qt)}}return yt.addEventListener("mousedown",St),document.addEventListener("mousemove",Pt),document.addEventListener("mouseup",At),function(){yt.removeEventListener("mousedown",St),document.removeEventListener("mousemove",Pt),document.removeEventListener("mouseup",At)}}},[Fe,Lr]),Object(D.useEffect)(function(){rr(Le)},[Le]);var Oi=at(V),Dr=at(pr),Qi={width:Oi,height:Dr},ea=Object(D.useMemo)(function(){if(Nn){var yt=new Date(Nn),xt=yt.getHours(),wt=yt.getMinutes(),St=yt.getSeconds();return xt=xt<10?"0"+xt:xt,wt=wt<10?"0"+wt:wt,St=St<10?"0"+St:St,"".concat(xt,":").concat(wt,":").concat(St)}return 0},[Nn]);function jn(){window.sessionStorage.removeItem(kt),qr(!1),gn(0)}function Wa(){qr(!1),gn(0),Fe.setValue(window.sessionStorage.getItem(kt))}return S.a.createElement(D.Fragment,null,S.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ar},S.a.createElement("div",{className:"markdown-editor-container ".concat(mn," ").concat(Mn?"on-preview":""," ").concat(rt?"mini":""," ").concat(lt?"full-screen":""),style:Qi},S.a.createElement(Ae,{insertTemp:ze,watch:Mn,fullScreen:lt,showNullButton:an,onActionCallback:gr,hidetoolBar:An}),S.a.createElement("div",{className:"markdown-editor-body"},S.a.createElement("div",{className:"codemirror-container"},S.a.createElement("textarea",{ref:$n,placeholder:Ln})),Mn?S.a.createElement("div",{ref:mr,className:"preview-container"},ft==="stex"&&S.a.createElement(We,{value:un}),ft!=="stex"&&S.a.createElement(Te.a,{value:un})):null))),Bt?S.a.createElement("a",{ref:Lr,className:"editor-resize"}):null,S.a.createElement(J.a,null,I[jt]?S.a.createElement(ge.a,{centered:!0,title:I[jt],visible:!0,onCancel:ir,footer:null},Zr):null))}},SJMd:function(bt,Ye){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var C,F,ge,oe=!1,Oe,Ee;window.PR_SHOULD_USE_CONTINUATION=!0;var G,M;(function(){var D=window,S=["break,continue,do,else,for,if,return,while"],z=[S,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],$=[z,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],re=[$,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],ye=[$,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],le=[$,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],W="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",P=[$,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],U="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",se=[S,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],ie=[S,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],Te=[S,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],We=[re,le,ye,P,U,se,ie,Te],pe=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,be="str",Re="kwd",Q="com",me="typ",Ae="lit",J="pun",y="pln",Z="tag",X="dec",w="src",ee="atn",j="atv",A="nocode",k="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(B){for(var ne=0,ke=!1,je=!1,Pe=0,we=B.length;Pe122||(f<65||x>90||at.push([Math.max(65,x)|32,Math.min(f,90)|32]),f<97||x>122||at.push([Math.max(97,x)&~32,Math.min(f,122)&~32]))}}at.sort(function(V,fe){return V[0]-fe[0]||fe[1]-V[1]});for(var p=[],v=[],Ie=0;Ieb[0]&&(b[1]+1>b[0]&&Ce.push("-"),Ce.push(Ke(b[1])))}return Ce.push("]"),Ce.join("")}function ht(Xe){for(var ve=Xe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),at=ve.length,Je=[],Ce=0,Ie=0;Ce=2&&x==="["?ve[Ce]=qe(I):x!=="\\"&&(ve[Ce]=I.replace(/[a-zA-Z]/g,function(v){var b=v.charCodeAt(0);return"["+String.fromCharCode(b&~32,b|32)+"]"}))}return ve.join("")}for(var nt=[],Pe=0,we=B.length;Pe=0;)ke[nt.charAt(Xe)]=ht;var ve=ht[1],at=""+ve;Ve.hasOwnProperty(at)||(Ge.push(ve),Ve[at]=null)}Ge.push(/[\0-\uffff]/),je=c(Ge)})();var Pe=ne.length,we=function(Me){for(var Ge=Me.sourceCode,Ve=Me.basePos,Ke=Me.sourceNode,qe=[Ve,y],ht=0,nt=Ge.match(je)||[],Xe={},ve=0,at=nt.length;ve=5&&Ce.substring(0,5)==="lang-",I&&!(Ie&&typeof Ie[1]=="string")&&(I=!1,Ce=w),I||(Xe[Je]=Ce)}var f=ht;if(ht+=Je.length,!I)qe.push(Ve+f,Ce);else{var p=Ie[1],v=Je.indexOf(p),b=v+p.length;Ie[2]&&(b=Je.length-Ie[2].length,v=b-p.length);var V=Ce.substring(5);g(Ke,Ve+f,Je.substring(0,v),we,qe),g(Ke,Ve+f+v,p,te(V,p),qe),g(Ke,Ve+f+b,Je.substring(b),we,qe)}}Me.decorations=qe};return we}function _e(B){var ne=[],ke=[];B.tripleQuotedStrings?ne.push([be,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):B.multiLineStrings?ne.push([be,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ne.push([be,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),B.verbatimStrings&&ke.push([be,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var je=B.hashComments;je&&(B.cStyleComments?(je>1?ne.push([Q,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ne.push([Q,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ke.push([be,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ne.push([Q,/^#[^\r\n]*/,null,"#"])),B.cStyleComments&&(ke.push([Q,/^\/\/[^\r\n]*/,null]),ke.push([Q,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Pe=B.regexLiterals;if(Pe){var we=Pe>1?"":`
\r`,Me=we?".":"[\\S\\s]",Ge="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+Me+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+Me+")*(?:\\x5D|$))+/";ke.push(["lang-regex",RegExp("^"+k+"("+Ge+")")])}var Ve=B.types;Ve&&ke.push([me,Ve]);var Ke=(""+B.keywords).replace(/^ | $/g,"");Ke.length&&ke.push([Re,new RegExp("^(?:"+Ke.replace(/[\s,]+/g,"|")+")\\b"),null]),ne.push([y,/^\s+/,null,` \r
\xA0`]);var qe="^.[^\\s\\w.$@'\"`/\\\\]*";return B.regexLiterals&&(qe+="(?!s*/)"),ke.push([Ae,/^@[a-z_$][a-z_$@0-9]*/i,null],[me,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[y,/^[a-z_$][a-z_$@0-9]*/i,null],[Ae,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[y,/^\\[\s\S]?/,null],[J,new RegExp(qe),null]),de(ne,ke)}var ae=_e({keywords:We,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Se(B,ne,ke){for(var je=/(?:^|\s)nocode(?:\s|$)/,Pe=/\r\n?|\n/,we=B.ownerDocument,Me=we.createElement("li");B.firstChild;)Me.appendChild(B.firstChild);var Ge=[Me];function Ve(ve){var at=ve.nodeType;if(at==1&&!je.test(ve.className))if(ve.nodeName==="br")Ke(ve),ve.parentNode&&ve.parentNode.removeChild(ve);else for(var Je=ve.firstChild;Je;Je=Je.nextSibling)Ve(Je);else if((at==3||at==4)&&ke){var Ce=ve.nodeValue,Ie=Ce.match(Pe);if(Ie){var I=Ce.substring(0,Ie.index);ve.nodeValue=I;var L=Ce.substring(Ie.index+Ie[0].length);if(L){var x=ve.parentNode;x.insertBefore(we.createTextNode(L),ve.nextSibling)}Ke(ve),I||ve.parentNode.removeChild(ve)}}}function Ke(ve){for(;!ve.nextSibling;)if(ve=ve.parentNode,!ve)return;function at(Ie,I){var L=I?Ie.cloneNode(!1):Ie,x=Ie.parentNode;if(x){var f=at(x,1),p=Ie.nextSibling;f.appendChild(L);for(var v=p;v;v=p)p=v.nextSibling,f.appendChild(v)}return L}for(var Je=at(ve.nextSibling,0),Ce;(Ce=Je.parentNode)&&Ce.nodeType===1;)Je=Ce;Ge.push(Je)}for(var qe=0;qe=x&&(Ve+=2),we>=f&&(ht+=2)}}finally{Ce&&(Ce.style.display=Ie)}}var ce={};function H(B,ne){for(var ke=ne.length;--ke>=0;){var je=ne[ke];ce.hasOwnProperty(je)?D.console&&console.warn("cannot override language handler %s",je):ce[je]=B}}function te(B,ne){return B&&ce.hasOwnProperty(B)||(B=/^\s*]*(?:>|$)/],[Q,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[J,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^