(window.webpackJsonp=window.webpackJsonp||[]).push([[276,5,6,7],{"+NIl":function(nt,xe,Z){(function(ne){ne(Z("VrN/"))})(function(ne){"use strict";ne.defineMode("stex",function(J,P){"use strict";function X(h,l){h.cmdState.push(l)}function j(h){return h.cmdState.length>0?h.cmdState[h.cmdState.length-1]:null}function B(h){var l=h.cmdState.pop();l&&l.closeBracket()}function K(h){for(var l=h.cmdState,f=l.length-1;f>=0;f--){var o=l[f];if(o.name=="DEFAULT")continue;return o}return{styleIdentifier:function(){return null}}}function G(h,l,f){return function(){this.name=h,this.bracketNo=0,this.style=l,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var r={};r.importmodule=G("importmodule","tag",["string","builtin"]),r.documentclass=G("documentclass","tag",["","atom"]),r.usepackage=G("usepackage","tag",["atom"]),r.begin=G("begin","tag",["atom"]),r.end=G("end","tag",["atom"]),r.label=G("label","tag",["atom"]),r.ref=G("ref","tag",["atom"]),r.eqref=G("eqref","tag",["atom"]),r.cite=G("cite","tag",["atom"]),r.bibitem=G("bibitem","tag",["atom"]),r.Bibitem=G("Bibitem","tag",["atom"]),r.RBibitem=G("RBibitem","tag",["atom"]),r.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function L(h,l){h.f=l}function v(h,l){var f;if(h.match(/^\\[a-zA-Z@]+/)){var o=h.current().slice(1);return f=r.hasOwnProperty(o)?r[o]:r.DEFAULT,f=new f,X(l,f),L(l,p),f.style}if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/\\]/))return"tag";if(h.match("\\["))return L(l,function(a,s){return m(a,s,"\\]")}),"keyword";if(h.match("\\("))return L(l,function(a,s){return m(a,s,"\\)")}),"keyword";if(h.match("$$"))return L(l,function(a,s){return m(a,s,"$$")}),"keyword";if(h.match("$"))return L(l,function(a,s){return m(a,s,"$")}),"keyword";var u=h.next();if(u=="%")return h.skipToEnd(),"comment";if(u=="}"||u=="]"){if(f=j(l),f)f.closeBracket(u),L(l,p);else return"error";return"bracket"}else return u=="{"||u=="["?(f=r.DEFAULT,f=new f,X(l,f),"bracket"):/\d/.test(u)?(h.eatWhile(/[\w.%]/),"atom"):(h.eatWhile(/[\w\-_]/),f=K(l),f.name=="begin"&&(f.argument=h.current()),f.styleIdentifier())}function m(h,l,f){if(h.eatSpace())return null;if(f&&h.match(f))return L(l,v),"keyword";if(h.match(/^\\[a-zA-Z@]+/))return"tag";if(h.match(/^[a-zA-Z]+/))return"variable-2";if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/]/))return"tag";if(h.match(/^[\^_&]/))return"tag";if(h.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(h.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var o=h.next();return o=="{"||o=="}"||o=="["||o=="]"||o=="("||o==")"?"bracket":o=="%"?(h.skipToEnd(),"comment"):"error"}function p(h,l){var f=h.peek(),o;return f=="{"||f=="["?(o=j(l),o.openBracket(f),h.eat(f),L(l,v),"bracket"):/[ \t\r]/.test(f)?(h.eat(f),null):(L(l,v),B(l),v(h,l))}return{startState:function(){var h=P.inMathMode?function(l,f){return m(l,f)}:v;return{cmdState:[],f:h}},copyState:function(h){return{cmdState:h.cmdState.slice(),f:h.f}},token:function(h,l){return l.f(h,l)},blankLine:function(h){h.f=v,h.cmdState.length=0},lineComment:"%"}}),ne.defineMIME("text/x-stex","stex"),ne.defineMIME("text/x-latex","stex")})},"+ua5":function(nt,xe,Z){},"/cxE":function(nt,xe,Z){"use strict";Z.d(xe,"f",function(){return P}),Z.d(xe,"g",function(){return X}),Z.d(xe,"h",function(){return j}),Z.d(xe,"e",function(){return K}),Z.d(xe,"b",function(){return G}),Z.d(xe,"c",function(){return r}),Z.d(xe,"d",function(){return L}),Z.d(xe,"a",function(){return v});class ne{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
`+m.stack):m},0)}}emit(m){this.listeners.forEach(p=>{p(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const J=new ne;function P(m){K(m)||J.onUnexpectedError(m);return}function X(m){K(m)||J.onUnexpectedExternalError(m);return}function j(m){if(m instanceof Error){let{name:p,message:h}=m;const l=m.stacktrace||m.stack;return{$isError:!0,name:p,message:h,stack:l}}return m}const B="Canceled";function K(m){return m instanceof Error&&m.name===B&&m.message===B}function G(){const m=new Error(B);return m.name=m.message,m}function r(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function L(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class v extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"19Vz":function(nt,xe,Z){(function(ne){ne(Z("VrN/"))})(function(ne){ne.defineOption("placeholder","",function(G,r,L){var v=L&&L!=ne.Init;if(r&&!v)G.on("blur",j),G.on("change",B),G.on("swapDoc",B),ne.on(G.getInputField(),"compositionupdate",G.state.placeholderCompose=function(){X(G)}),B(G);else if(!r&&v){G.off("blur",j),G.off("change",B),G.off("swapDoc",B),ne.off(G.getInputField(),"compositionupdate",G.state.placeholderCompose),J(G);var m=G.getWrapperElement();m.className=m.className.replace(" CodeMirror-empty","")}r&&!G.hasFocus()&&j(G)});function J(G){G.state.placeholder&&(G.state.placeholder.parentNode.removeChild(G.state.placeholder),G.state.placeholder=null)}function P(G){J(G);var r=G.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=G.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var L=G.getOption("placeholder");typeof L=="string"&&(L=document.createTextNode(L)),r.appendChild(L),G.display.lineSpace.insertBefore(r,G.display.lineSpace.firstChild)}function X(G){setTimeout(function(){var r=!1,L=G.getInputField();L.nodeName=="TEXTAREA"?r=!L.value:G.lineCount()==1&&(r=!/[^\u200b]/.test(L.querySelector(".CodeMirror-line").textContent)),r?P(G):J(G)},20)}function j(G){K(G)&&P(G)}function B(G){var r=G.getWrapperElement(),L=K(G);r.className=r.className.replace(" CodeMirror-empty","")+(L?" CodeMirror-empty":""),L?P(G):J(G)}function K(G){return G.lineCount()===1&&G.getLine(0)===""}})},"1eCo":function(nt,xe,Z){(function(ne){ne(Z("VrN/"))})(function(ne){"use strict";var J={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},P={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ne.defineMode("xml",function(X,j){var B=X.indentUnit,K={},G=j.htmlMode?J:P;for(var r in G)K[r]=G[r];for(var r in j)K[r]=j[r];var L,v;function m(c,w){function y(F){return w.tokenize=F,F(c,w)}var b=c.next();if(b=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?y(l("atom","]]>")):null:c.match("--")?y(l("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),y(f(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),w.tokenize=l("meta","?>"),"meta"):(L=c.eat("/")?"closeTag":"openTag",w.tokenize=p,"tag bracket");if(b=="&"){var U;return c.eat("#")?c.eat("x")?U=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):U=c.eatWhile(/[\d]/)&&c.eat(";"):U=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),U?"atom":"error"}else return c.eatWhile(/[^&<]/),null}m.isInText=!0;function p(c,w){var y=c.next();if(y==">"||y=="/"&&c.eat(">"))return w.tokenize=m,L=y==">"?"endTag":"selfcloseTag","tag bracket";if(y=="=")return L="equals",null;if(y=="<"){w.tokenize=m,w.state=s,w.tagName=w.tagStart=null;var b=w.tokenize(c,w);return b?b+" tag error":"tag error"}else return/[\'\"]/.test(y)?(w.tokenize=h(y),w.stringStartCol=c.column(),w.tokenize(c,w)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(c){var w=function(y,b){for(;!y.eol();)if(y.next()==c){b.tokenize=p;break}return"string"};return w.isInAttribute=!0,w}function l(c,w){return function(y,b){for(;!y.eol();){if(y.match(w)){b.tokenize=m;break}y.next()}return c}}function f(c){return function(w,y){for(var b;(b=w.next())!=null;){if(b=="<")return y.tokenize=f(c+1),y.tokenize(w,y);if(b==">")if(c==1){y.tokenize=m;break}else return y.tokenize=f(c-1),y.tokenize(w,y)}return"meta"}}function o(c,w,y){this.prev=c.context,this.tagName=w,this.indent=c.indented,this.startOfLine=y,(K.doNotIndent.hasOwnProperty(w)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function u(c){c.context&&(c.context=c.context.prev)}function a(c,w){for(var y;;){if(!c.context)return;if(y=c.context.tagName,!K.contextGrabbers.hasOwnProperty(y)||!K.contextGrabbers[y].hasOwnProperty(w))return;u(c)}}function s(c,w,y){return c=="openTag"?(y.tagStart=w.column(),R):c=="closeTag"?_:s}function R(c,w,y){return c=="word"?(y.tagName=w.current(),v="tag",O):K.allowMissingTagName&&c=="endTag"?(v="tag bracket",O(c,w,y)):(v="error",R)}function _(c,w,y){if(c=="word"){var b=w.current();return y.context&&y.context.tagName!=b&&K.implicitlyClosed.hasOwnProperty(y.context.tagName)&&u(y),y.context&&y.context.tagName==b||K.matchClosing===!1?(v="tag",C):(v="tag error",D)}else return K.allowMissingTagName&&c=="endTag"?(v="tag bracket",C(c,w,y)):(v="error",D)}function C(c,w,y){return c!="endTag"?(v="error",C):(u(y),s)}function D(c,w,y){return v="error",C(c,w,y)}function O(c,w,y){if(c=="word")return v="attribute",A;if(c=="endTag"||c=="selfcloseTag"){var b=y.tagName,U=y.tagStart;return y.tagName=y.tagStart=null,c=="selfcloseTag"||K.autoSelfClosers.hasOwnProperty(b)?a(y,b):(a(y,b),y.context=new o(y,b,U==y.indented)),s}return v="error",O}function A(c,w,y){return c=="equals"?S:(K.allowMissing||(v="error"),O(c,w,y))}function S(c,w,y){return c=="string"?T:c=="word"&&K.allowUnquoted?(v="string",O):(v="error",O(c,w,y))}function T(c,w,y){return c=="string"?T:O(c,w,y)}return{startState:function(c){var w={tokenize:m,state:s,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(w.baseIndent=c),w},token:function(c,w){if(!w.tagName&&c.sol()&&(w.indented=c.indentation()),c.eatSpace())return null;L=null;var y=w.tokenize(c,w);return(y||L)&&y!="comment"&&(v=null,w.state=w.state(L||y,c,w),v&&(y=v=="error"?y+" error":v)),y},indent:function(c,w,y){var b=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+B;if(b&&b.noIndent)return ne.Pass;if(c.tokenize!=p&&c.tokenize!=m)return y?y.match(/^(\s*)/)[0].length:0;if(c.tagName)return K.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+B*(K.multilineTagIndentFactor||1);if(K.alignCDATA&&/$/,blockCommentStart:"",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml",skipAttribute:function(c){c.state==S&&(c.state=O)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var w=[],y=c.context;y;y=y.prev)y.tagName&&w.push(y.tagName);return w.reverse()}}}),ne.defineMIME("text/xml","xml"),ne.defineMIME("application/xml","xml"),ne.mimeModes.hasOwnProperty("text/html")||ne.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"24hK":function(nt,xe,Z){"use strict";Z.d(xe,"a",function(){return J});class ne{constructor(P){this.element=P,this.next=ne.Undefined,this.prev=ne.Undefined}}ne.Undefined=new ne(void 0);class J{constructor(){this._first=ne.Undefined,this._last=ne.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ne.Undefined}clear(){let P=this._first;for(;P!==ne.Undefined;){const X=P.next;P.prev=ne.Undefined,P.next=ne.Undefined,P=X}this._first=ne.Undefined,this._last=ne.Undefined,this._size=0}unshift(P){return this._insert(P,!1)}push(P){return this._insert(P,!0)}_insert(P,X){const j=new ne(P);if(this._first===ne.Undefined)this._first=j,this._last=j;else if(X){const K=this._last;this._last=j,j.prev=K,K.next=j}else{const K=this._first;this._first=j,j.next=K,K.prev=j}this._size+=1;let B=!1;return()=>{B||(B=!0,this._remove(j))}}shift(){if(this._first===ne.Undefined)return;{const P=this._first.element;return this._remove(this._first),P}}pop(){if(this._last===ne.Undefined)return;{const P=this._last.element;return this._remove(this._last),P}}_remove(P){if(P.prev!==ne.Undefined&&P.next!==ne.Undefined){const X=P.prev;X.next=P.next,P.next.prev=X}else P.prev===ne.Undefined&&P.next===ne.Undefined?(this._first=ne.Undefined,this._last=ne.Undefined):P.next===ne.Undefined?(this._last=this._last.prev,this._last.next=ne.Undefined):P.prev===ne.Undefined&&(this._first=this._first.next,this._first.prev=ne.Undefined);this._size-=1}*[Symbol.iterator](){let P=this._first;for(;P!==ne.Undefined;)yield P.element,P=P.next}}},"3/fG":function(nt,xe,Z){"use strict";Z.d(xe,"a",function(){return J});function ne(P,X){let j;return X.length===0?j=P:j=P.replace(/\{(\d+)\}/g,function(B,K){const G=K[0];return typeof X[G]!="undefined"?X[G]:B}),j}function J(P,X,...j){return ne(X,j)}},"55Ip":function(nt,xe,Z){"use strict";Z.d(xe,"a",function(){return a});var ne=Z("Ty5D"),J=Z("dI71"),P=Z("q1tI"),X=Z.n(P),j=Z("YS25"),B=Z("17x9"),K=Z.n(B),G=Z("wx14"),r=Z("zLVn"),L=Z("9R94"),v=function(S){Object(J.a)(T,S);function T(){for(var w,y=arguments.length,b=new Array(y),U=0;U$&&($=g.line_indent_level));var ie={mode:H,parent:g,last_token:g?g.last_token:new p(a.START_BLOCK,""),last_word:g?g.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:$,alignment:0,line_indent_level:g?g.line_indent_level:$,start_line_index:this._output.get_line_number(),ternary_depth:0};return ie},N.prototype._reset=function(g){var H=g.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,H),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var $=new f(g,this._options);return this._tokens=$.tokenize(),g},N.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g,H=this._reset(this._source_text),$=this._options.eol;this._options.eol==="auto"&&($=`
`,H&&h.lineBreak.test(H||"")&&($=H.match(h.lineBreak)[0]));for(var ie=this._tokens.next();ie;)this.handle_token(ie),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ie,ie=this._tokens.next();return g=this._output.get_code($),g},N.prototype.handle_token=function(g,H){g.type===a.START_EXPR?this.handle_start_expr(g):g.type===a.END_EXPR?this.handle_end_expr(g):g.type===a.START_BLOCK?this.handle_start_block(g):g.type===a.END_BLOCK?this.handle_end_block(g):g.type===a.WORD?this.handle_word(g):g.type===a.RESERVED?this.handle_word(g):g.type===a.SEMICOLON?this.handle_semicolon(g):g.type===a.STRING?this.handle_string(g):g.type===a.EQUALS?this.handle_equals(g):g.type===a.OPERATOR?this.handle_operator(g):g.type===a.COMMA?this.handle_comma(g):g.type===a.BLOCK_COMMENT?this.handle_block_comment(g,H):g.type===a.COMMENT?this.handle_comment(g,H):g.type===a.DOT?this.handle_dot(g):g.type===a.EOF?this.handle_eof(g):g.type===a.UNKNOWN?this.handle_unknown(g,H):this.handle_unknown(g,H)},N.prototype.handle_whitespace_and_comments=function(g,H){var $=g.newlines,ie=this._options.keep_array_indentation&&b(this._flags.mode);if(g.comments_before)for(var oe=g.comments_before.next();oe;)this.handle_whitespace_and_comments(oe,H),this.handle_token(oe,H),oe=g.comments_before.next();if(ie)for(var Ce=0;Ce<$;Ce+=1)this.print_newline(Ce>0,H);else if(this._options.max_preserve_newlines&&$>this._options.max_preserve_newlines&&($=this._options.max_preserve_newlines),this._options.preserve_newlines&&$>1){this.print_newline(!1,H);for(var ve=1;ve<$;ve+=1)this.print_newline(!0,H)}};var I=["async","break","continue","return","throw","yield"];N.prototype.allow_wrap_or_preserved_newline=function(g,H){if(H=H===void 0?!1:H,this._output.just_added_newline())return;var $=this._options.preserve_newlines&&g.newlines||H,ie=s(this._flags.last_token.text,u)||s(g.text,u);if(ie){var oe=s(this._flags.last_token.text,u)&&s(this._options.operator_position,T)||s(g.text,u);$=$&&oe}if($)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(D(this._flags.last_token,I))return;this._output.set_wrap_point()}},N.prototype.print_newline=function(g,H){if(!H&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var $=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&C($,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(g)&&(this._flags.multiline_frame=!0)},N.prototype.print_token_line_indentation=function(g){this._output.just_added_newline()&&(this._options.keep_array_indentation&&g.newlines&&(g.text==="["||b(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(g.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},N.prototype.print_token=function(g){if(this._output.raw){this._output.add_raw_token(g);return}if(this._options.comma_first&&g.previous&&g.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var H=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(H),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(g),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(g),this._output.non_breaking_space=!0,this._output.add_token(g.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},N.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},N.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},N.prototype.set_mode=function(g){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,g),this._flags=this.create_flags(this._previous_flags,g),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},N.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===c.Statement&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},N.prototype.start_of_object_property=function(){return this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"]))},N.prototype.start_of_statement=function(g){var H=!1;return H=H||D(this._flags.last_token,["var","let","const"])&&g.type===a.WORD,H=H||C(this._flags.last_token,"do"),H=H||!(this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement)&&D(this._flags.last_token,I)&&!g.newlines,H=H||C(this._flags.last_token,"else")&&!(C(g,"if")&&!g.comments_before),H=H||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===c.ForInitializer||this._previous_flags.mode===c.Conditional),H=H||this._flags.last_token.type===a.WORD&&this._flags.mode===c.BlockStatement&&!this._flags.in_case&&!(g.text==="--"||g.text==="++")&&this._last_last_text!=="function"&&g.type!==a.WORD&&g.type!==a.RESERVED,H=H||this._flags.mode===c.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"])),H?(this.set_mode(c.Statement),this.indent(),this.handle_whitespace_and_comments(g,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g,D(g,["do","for","if","while"])),!0):!1},N.prototype.handle_start_expr=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g);var H=c.Expression;if(g.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){D(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(g),this.set_mode(H),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}H=c.ArrayLiteral,b(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),s(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,H=c.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,H=c.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&g.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,o)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var $=this._tokens.peek(-3);if(this._options.space_after_named_function&&$){var ie=this._tokens.peek(-4);D($,["async","function"])||$.text==="*"&&D(ie,["async","function"])?this._output.space_before_token=!0:this._flags.mode===c.ObjectLiteral?($.text==="{"||$.text===","||$.text==="*"&&(ie.text==="{"||ie.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(g);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(g,g.newlines),this.print_token(g),this.set_mode(H),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},N.prototype.handle_end_expr=function(g){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(g),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(g,g.text==="]"&&b(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(g),this.restore_mode(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===c.Conditional&&(this._previous_flags.mode=c.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},N.prototype.handle_start_block=function(g){this.handle_whitespace_and_comments(g);var H=this._tokens.peek(),$=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(c.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(c.BlockStatement):$&&(s($.text,[":",","])&&s(H.type,[a.STRING,a.WORD,a.RESERVED])||s(H.text,["get","set","..."])&&s($.type,[a.WORD,a.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s($.text,[":",","])?this.set_mode(c.BlockStatement):this.set_mode(c.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(c.BlockStatement):s(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||D(this._flags.last_token,["return","throw","import","default"])?this.set_mode(c.ObjectLiteral):this.set_mode(c.BlockStatement),this._flags.last_token&&(D(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ie=!H.comments_before&&H.text==="}",oe=ie&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var Ce=0,ve=null;this._flags.inline_frame=!0;do if(Ce+=1,ve=this._tokens.peek(Ce-1),ve.newlines){this._flags.inline_frame=!1;break}while(ve.type!==a.EOF&&!(ve.type===a.END_BLOCK&&ve.opened===g))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&g.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(oe||this._flags.last_token.type===a.EQUALS||D(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(b(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(g),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(this._flags.last_token.type===a.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(g),this.indent(),!ie&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},N.prototype.handle_end_block=function(g){for(this.handle_whitespace_and_comments(g);this._flags.mode===c.Statement;)this.restore_mode();var H=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!H?this._output.space_before_token=!0:this._options.brace_style==="expand"?H||this.print_newline():H||(b(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(g)},N.prototype.handle_word=function(g){if(g.type===a.RESERVED){if(s(g.text,["set","get"])&&this._flags.mode!==c.ObjectLiteral)g.type=a.WORD;else if(g.text==="import"&&s(this._tokens.peek().text,["(","."]))g.type=a.WORD;else if(s(g.text,["as","from"])&&!this._flags.import_block)g.type=a.WORD;else if(this._flags.mode===c.ObjectLiteral){var H=this._tokens.peek();H.text===":"&&(g.type=a.WORD)}}if(this.start_of_statement(g)?D(this._flags.last_token,["var","let","const"])&&g.type===a.WORD&&(this._flags.declaration_statement=!0):g.newlines&&!U(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!D(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(g),this.print_newline()):this.handle_whitespace_and_comments(g),this._flags.do_block&&!this._flags.do_while)if(C(g,"while")){this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&C(g,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===c.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&D(g,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(g),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g)),C(g,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&(!this._output.just_added_blankline()&&!g.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?D(this._flags.last_token,["get","set","new","export"])||D(this._flags.last_token,I)?this._output.space_before_token=!0:C(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(U(this._flags.mode)||b(this._flags.mode))||this.print_newline(),this.print_token(g),this._flags.last_word=g.text;return}var $="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?$="SPACE":D(g,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&g.newlines?$="NEWLINE":($="SPACE",this._output.space_before_token=!0):$="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===c.BlockStatement?$="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&U(this._flags.mode)?$="SPACE":this._flags.last_token.type===a.STRING?$="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&s(this._last_last_text,["{",","]))?$="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?$="SPACE":$="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,$="NEWLINE"),D(g,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?$="SPACE":$="NEWLINE"),D(g,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===c.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&g.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ie=this._output.current_line;ie.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else $==="NEWLINE"?D(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&D(g,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!D(g,["var","let","const"]))&&this._flags.last_token.text!==":"&&(C(g,"if")&&C(g.previous,"else")?this._output.space_before_token=!0:this.print_newline()):D(g,o)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&b(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():$==="SPACE"&&(this._output.space_before_token=!0);g.previous&&(g.previous.type===a.WORD||g.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(g),this._flags.last_word=g.text,g.type===a.RESERVED&&(g.text==="do"?this._flags.do_block=!0:g.text==="if"?this._flags.if_block=!0:g.text==="import"?this._flags.import_block=!0:this._flags.import_block&&C(g,"from")&&(this._flags.import_block=!1))},N.prototype.handle_semicolon=function(g){this.start_of_statement(g)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(g);for(var H=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&C(H,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(g)},N.prototype.handle_string=function(g){g.text.startsWith("`")&&g.newlines===0&&g.whitespace_before===""&&(g.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(g)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(g),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g):g.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(g.previous.text==="]"||g.previous.text===")")&&g.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(g)},N.prototype.handle_equals=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0},N.prototype.handle_comma=function(g){this.handle_whitespace_and_comments(g,!0),this.print_token(g),this._output.space_before_token=!0,this._flags.declaration_statement?(U(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(g)):this._flags.mode===c.ObjectLiteral||this._flags.mode===c.Statement&&this._flags.parent.mode===c.ObjectLiteral?(this._flags.mode===c.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(g)},N.prototype.handle_operator=function(g){var H=g.text==="*"&&(D(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),$=s(g.text,["-","+"])&&(s(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||s(this._flags.last_token.text,o)||this._flags.last_token.text===",");if(!this.start_of_statement(g)){var ie=!H;this.handle_whitespace_and_comments(g,ie)}if(g.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(g);return}if(g.text==="::"){this.print_token(g);return}if(this._flags.last_token.type===a.OPERATOR&&s(this._options.operator_position,T)&&this.allow_wrap_or_preserved_newline(g),g.text===":"&&this._flags.in_case){this.print_token(g),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var oe=!0,Ce=!0,ve=!1;if(g.text===":"?this._flags.ternary_depth===0?oe=!1:(this._flags.ternary_depth-=1,ve=!0):g.text==="?"&&(this._flags.ternary_depth+=1),!$&&!H&&this._options.preserve_newlines&&s(g.text,u)){var Se=g.text===":",Ae=Se&&ve,Oe=Se&&!ve;switch(this._options.operator_position){case S.before_newline:this._output.space_before_token=!Oe,this.print_token(g),(!Se||Ae)&&this.allow_wrap_or_preserved_newline(g),this._output.space_before_token=!0;return;case S.after_newline:this._output.space_before_token=!0,!Se||Ae?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(g):this._output.space_before_token=!1,this.print_token(g),this._output.space_before_token=!0;return;case S.preserve_newline:Oe||this.allow_wrap_or_preserved_newline(g),oe=!(this._output.just_added_newline()||Oe),this._output.space_before_token=oe,this.print_token(g),this._output.space_before_token=!0;return}}if(H){this.allow_wrap_or_preserved_newline(g),oe=!1;var he=this._tokens.peek();Ce=he&&s(he.type,[a.WORD,a.RESERVED])}else if(g.text==="...")this.allow_wrap_or_preserved_newline(g),oe=this._flags.last_token.type===a.START_BLOCK,Ce=!1;else if(s(g.text,["--","++","!","~"])||$){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(g),oe=!1,Ce=!1,g.newlines&&(g.text==="--"||g.text==="++"||g.text==="~")){var ce=D(this._flags.last_token,O)&&g.newlines;ce&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ce,!0)}this._flags.last_token.text===";"&&U(this._flags.mode)&&(oe=!0),this._flags.last_token.type===a.RESERVED?oe=!0:this._flags.last_token.type===a.END_EXPR?oe=!(this._flags.last_token.text==="]"&&(g.text==="--"||g.text==="++")):this._flags.last_token.type===a.OPERATOR&&(oe=s(g.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(g.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(Ce=!0)),(this._flags.mode===c.BlockStatement&&!this._flags.inline_frame||this._flags.mode===c.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||oe,this.print_token(g),this._output.space_before_token=Ce},N.prototype.handle_block_comment=function(g,H){if(this._output.raw){this._output.add_raw_token(g),g.directives&&g.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(g.directives){this.print_newline(!1,H),this.print_token(g),g.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!h.newline.test(g.text)&&!g.newlines){this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0;return}else this.print_block_commment(g,H)},N.prototype.print_block_commment=function(g,H){var $=y(g.text),ie,oe=!1,Ce=!1,ve=g.whitespace_before,Se=ve.length;if(this.print_newline(!1,H),this.print_token_line_indentation(g),this._output.add_token($[0]),this.print_newline(!1,H),$.length>1){for($=$.slice(1),oe=F($,"*"),Ce=E($,ve),oe&&(this._flags.alignment=1),ie=0;ie<$.length;ie++)oe?(this.print_token_line_indentation(g),this._output.add_token(R($[ie]))):Ce&&$[ie]?(this.print_token_line_indentation(g),this._output.add_token($[ie].substring(Se))):(this._output.current_line.set_indent(-1),this._output.add_token($[ie])),this.print_newline(!1,H);this._flags.alignment=0}},N.prototype.handle_comment=function(g,H){g.newlines?this.print_newline(!1,H):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(g),this.print_newline(!1,H)},N.prototype.handle_dot=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),D(this._flags.last_token,O)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(g,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(g)},N.prototype.handle_unknown=function(g,H){this.print_token(g),g.text[g.text.length-1]===`
`&&this.print_newline(!1,H)},N.prototype.handle_eof=function(g){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(g)},r.exports.Beautifier=N},function(r){function L(p){this.__parent=p,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}L.prototype.clone_empty=function(){var p=new L(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},L.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},L.prototype.has_match=function(p){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(p))return!0;return!1},L.prototype.set_indent=function(p,h){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},L.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},L.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},L.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},L.prototype.is_empty=function(){return this.__items.length===0},L.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},L.prototype.push=function(p){this.__items.push(p);var h=p.lastIndexOf(`
`);h!==-1?this.__character_count=p.length-h:this.__character_count+=p.length},L.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},L.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},L.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},L.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},L.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function v(p,h){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),h=h||"",p.indent_level>0&&(h=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}v.prototype.get_indent_size=function(p,h){var l=this.__base_string_length;return h=h||0,p<0&&(l=0),l+=p*this.__indent_size,l+=h,l},v.prototype.get_indent_string=function(p,h){var l=this.__base_string;return h=h||0,p<0&&(p=0,l=""),h+=p*this.__indent_size,this.__ensure_cache(h),l+=this.__cache[h],l},v.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var p=this.__cache.length,h=0,l="";this.__indent_size&&p>=this.__indent_size&&(h=Math.floor(p/this.__indent_size),p-=h*this.__indent_size,l=new Array(h+1).join(this.__indent_string)),p&&(l+=new Array(p+1).join(" ")),this.__cache.push(l)};function m(p,h){this.__indent_cache=new v(p,h),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new L(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(p,h){return this.__indent_cache.get_indent_string(p,h)},m.prototype.get_indent_size=function(p,h){return this.__indent_cache.get_indent_size(p,h)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(p){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===`
`&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(`
`);return p!==`
`&&(l=l.replace(/[\n]/g,p)),l},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(p,h){return p=p||0,h=h||0,this.next_line.set_indent(p,h),this.__lines.length>1?(this.current_line.set_indent(p,h),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(p){for(var h=0;h1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(p,h){for(var l=this.__lines.length-2;l>=0;){var f=this.__lines[l];if(f.is_empty())break;if(f.item(0).indexOf(p)!==0&&f.item(-1)!==h){this.__lines.splice(l+1,0,new L(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},r.exports.Output=m},function(r){function L(v,m,p,h){this.type=v,this.text=m,this.comments_before=null,this.newlines=p||0,this.whitespace_before=h||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}r.exports.Token=L},function(r,L){var v="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",h="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",l="(?:\\\\u[0-9a-fA-F]{4}|["+v+p+"])",f="(?:\\\\u[0-9a-fA-F]{4}|["+m+p+h+"])*";L.identifier=new RegExp(l+f,"g"),L.identifierStart=new RegExp(l),L.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+p+h+"])+");var o=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;L.newline=/[\n\r\u2028\u2029]/,L.lineBreak=new RegExp(`\r
|`+L.newline.source),L.allLineBreaks=new RegExp(L.lineBreak.source,"g")},function(r,L,v){var m=v(6).Options,p=["before-newline","after-newline","preserve-newline"];function h(l){m.call(this,l,"js");var f=this.raw_options.brace_style||null;f==="expand-strict"?this.raw_options.brace_style="expand":f==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var u=0;u>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),A=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";A=A.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),A="\\?\\.(?!\\d) "+A,A=A.replace(/ /g,"|");var S=new RegExp(A),T="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),c=T.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),w=new RegExp("^(?:"+c.join("|")+")$"),y,b=function(F,E){p.call(this,F,E),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var N=new o(this._input),I=new u(this._input).read_options(this._options);this.__patterns={template:I,identifier:I.starting_with(f.identifier).matching(f.identifierMatch),number:N.matching(_),punct:N.matching(S),comment:N.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:N.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:N.matching(//),include:N.starting_with(/#include/).until_after(f.lineBreak),shebang:N.starting_with(/#!/).until_after(f.lineBreak),xml:N.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:I.until(/['\\\n\r\u2028\u2029]/),double_quote:I.until(/["\\\n\r\u2028\u2029]/),template_text:I.until(/[`\\$]/),template_expression:I.until(/[`}\\]/)}};b.prototype=new p,b.prototype._is_comment=function(F){return F.type===s.COMMENT||F.type===s.BLOCK_COMMENT||F.type===s.UNKNOWN},b.prototype._is_opening=function(F){return F.type===s.START_BLOCK||F.type===s.START_EXPR},b.prototype._is_closing=function(F,E){return(F.type===s.END_BLOCK||F.type===s.END_EXPR)&&E&&(F.text==="]"&&E.text==="["||F.text===")"&&E.text==="("||F.text==="}"&&E.text==="{")},b.prototype._reset=function(){y=!1},b.prototype._get_next_token=function(F,E){var N=null;this._readWhitespace();var I=this._input.peek();return I===null?this._create_token(s.EOF,""):(N=N||this._read_non_javascript(I),N=N||this._read_string(I),N=N||this._read_word(F),N=N||this._read_singles(I),N=N||this._read_comment(I),N=N||this._read_regexp(I,F),N=N||this._read_xml(I,F),N=N||this._read_punctuation(),N=N||this._create_token(s.UNKNOWN,this._input.next()),N)},b.prototype._read_word=function(F){var E;if(E=this.__patterns.identifier.read(),E!=="")return E=E.replace(f.allLineBreaks,`
`),!(F.type===s.DOT||F.type===s.RESERVED&&(F.text==="set"||F.text==="get"))&&w.test(E)?(E==="in"||E==="of")&&(F.type===s.WORD||F.type===s.STRING)?this._create_token(s.OPERATOR,E):this._create_token(s.RESERVED,E):this._create_token(s.WORD,E);if(E=this.__patterns.number.read(),E!=="")return this._create_token(s.WORD,E)},b.prototype._read_singles=function(F){var E=null;return F==="("||F==="["?E=this._create_token(s.START_EXPR,F):F===")"||F==="]"?E=this._create_token(s.END_EXPR,F):F==="{"?E=this._create_token(s.START_BLOCK,F):F==="}"?E=this._create_token(s.END_BLOCK,F):F===";"?E=this._create_token(s.SEMICOLON,F):F==="."&&D.test(this._input.peek(1))?E=this._create_token(s.DOT,F):F===","&&(E=this._create_token(s.COMMA,F)),E&&this._input.next(),E},b.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(s.EQUALS,F):F==="?."?this._create_token(s.DOT,F):this._create_token(s.OPERATOR,F)},b.prototype._read_non_javascript=function(F){var E="";if(F==="#"){if(this._is_first_token()&&(E=this.__patterns.shebang.read(),E))return this._create_token(s.UNKNOWN,E.trim()+`
`);if(E=this.__patterns.include.read(),E)return this._create_token(s.UNKNOWN,E.trim()+`
`);F=this._input.next();var N="#";if(this._input.hasNext()&&this._input.testChar(C)){do F=this._input.next(),N+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(N+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(N+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,N)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(E=this.__patterns.html_comment_start.read(),E){for(;this._input.hasNext()&&!this._input.testChar(f.newline);)E+=this._input.next();return y=!0,this._create_token(s.COMMENT,E)}}else if(y&&F==="-"&&(E=this.__patterns.html_comment_end.read(),E))return y=!1,this._create_token(s.COMMENT,E);return null},b.prototype._read_comment=function(F){var E=null;if(F==="/"){var N="";if(this._input.peek(1)==="*"){N=this.__patterns.block_comment.read();var I=R.get_directives(N);I&&I.ignore==="start"&&(N+=R.readIgnored(this._input)),N=N.replace(f.allLineBreaks,`
`),E=this._create_token(s.BLOCK_COMMENT,N),E.directives=I}else this._input.peek(1)==="/"&&(N=this.__patterns.comment.read(),E=this._create_token(s.COMMENT,N))}return E},b.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var E=this._input.next();return this.has_char_escapes=!1,F==="`"?E+=this._read_string_recursive("`",!0,"${"):E+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(E=U(E)),this._input.peek()===F&&(E+=this._input.next()),E=E.replace(f.allLineBreaks,`
`),this._create_token(s.STRING,E)}return null},b.prototype._allow_regexp_or_xml=function(F){return F.type===s.RESERVED&&a(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===s.END_EXPR&&F.text===")"&&F.opened.previous.type===s.RESERVED&&a(F.opened.previous.text,["if","while","for"])||a(F.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},b.prototype._read_regexp=function(F,E){if(F==="/"&&this._allow_regexp_or_xml(E)){for(var N=this._input.next(),I=!1,g=!1;this._input.hasNext()&&(I||g||this._input.peek()!==F)&&!this._input.testChar(f.newline);)N+=this._input.peek(),I?I=!1:(I=this._input.peek()==="\\",this._input.peek()==="["?g=!0:this._input.peek()==="]"&&(g=!1)),this._input.next();return this._input.peek()===F&&(N+=this._input.next(),N+=this._input.read(f.identifier)),this._create_token(s.STRING,N)}return null},b.prototype._read_xml=function(F,E){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(E)){var N="",I=this.__patterns.xml.read_match();if(I){for(var g=I[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),H=g.indexOf("{")===0,$=0;I;){var ie=!!I[1],oe=I[2],Ce=!!I[I.length-1]||oe.slice(0,8)==="![CDATA[";if(!Ce&&(oe===g||H&&oe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ie?--$:++$),N+=I[0],$<=0)break;I=this.__patterns.xml.read_match()}return I||(N+=this._input.match(/[\s\S]*/g)[0]),N=N.replace(f.allLineBreaks,`
`),this._create_token(s.STRING,N)}}return null};function U(F){for(var E="",N=0,I=new m(F),g=null;I.hasNext();)if(g=I.match(/([\s]|[^\\]|\\\\)+/g),g&&(E+=g[0]),I.peek()==="\\"){if(I.next(),I.peek()==="x")g=I.match(/x([0-9A-Fa-f]{2})/g);else if(I.peek()==="u")g=I.match(/u([0-9A-Fa-f]{4})/g);else{E+="\\",I.hasNext()&&(E+=I.next());continue}if(!g)return F;if(N=parseInt(g[1],16),N>126&&N<=255&&g[0].indexOf("x")===0)return F;if(N>=0&&N<32){E+="\\"+g[0];continue}else N===34||N===39||N===92?E+="\\"+String.fromCharCode(N):E+=String.fromCharCode(N)}return E}b.prototype._read_string_recursive=function(F,E,N){var I,g;F==="'"?g=this.__patterns.single_quote:F==='"'?g=this.__patterns.double_quote:F==="`"?g=this.__patterns.template_text:F==="}"&&(g=this.__patterns.template_expression);for(var H=g.read(),$="";this._input.hasNext();){if($=this._input.next(),$===F||!E&&f.newline.test($)){this._input.back();break}else $==="\\"&&this._input.hasNext()?(I=this._input.peek(),I==="x"||I==="u"?this.has_char_escapes=!0:I==="\r"&&this._input.peek(1)===`
`&&this._input.next(),$+=this._input.next()):N&&(N==="${"&&$==="$"&&this._input.peek()==="{"&&($+=this._input.next()),N===$&&(F==="`"?$+=this._read_string_recursive("}",E,"`"):$+=this._read_string_recursive("`",E,"${"),this._input.hasNext()&&($+=this._input.next())));$+=g.read(),H+=$}return H},r.exports.Tokenizer=b,r.exports.TOKEN=s,r.exports.positionable_operators=O.slice(),r.exports.line_starters=T.slice()},function(r){var L=RegExp.prototype.hasOwnProperty("sticky");function v(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position=0&&m=0&&p=m.length&&this.__input.substring(p-m.length,p).toLowerCase()===m},r.exports.InputScanner=v},function(r,L,v){var m=v(8).InputScanner,p=v(3).Token,h=v(10).TokenStream,l=v(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(u,a){this._input=new m(u),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var u,a=new p(f.START,""),s=null,R=[],_=new h;a.type!==f.EOF;){for(u=this._get_next_token(a,s);this._is_comment(u);)_.add(u),u=this._get_next_token(a,s);_.isEmpty()||(u.comments_before=_,_=new h),u.parent=s,this._is_opening(u)?(R.push(s),s=u):s&&this._is_closing(u,s)&&(u.opened=s,s.closed=u,s=R.pop(),u.parent=s),u.previous=a,a.next=u,this.__tokens.add(u),a=u}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(u,a){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(f.RAW,s):this._create_token(f.EOF,"")},o.prototype._is_comment=function(u){return!1},o.prototype._is_opening=function(u){return!1},o.prototype._is_closing=function(u,a){return!1},o.prototype._create_token=function(u,a){var s=new p(u,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=o,r.exports.TOKEN=f},function(r){function L(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}L.prototype.restart=function(){this.__position=0},L.prototype.isEmpty=function(){return this.__tokens_length===0},L.prototype.hasNext=function(){return this.__position=0&&v/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new m,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(l){var f=this._create();return f._disabled[l]=!0,f._update(),f},h.prototype.read_options=function(l){var f=this._create();for(var o in p)f._disabled[o]=l.templating.indexOf(o)===-1;return f._update(),f},h.prototype.exclude=function(l){var f=this._create();return f._excluded[l]=!0,f._update(),f},h.prototype.read=function(){var l="";this._match_pattern?l=this._input.read(this._starting_pattern):l=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),l+=f,f=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},h.prototype.__set_templated_pattern=function(){var l=[];this._disabled.php||l.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||l.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||l.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(l.push(this.__patterns.django._starting_pattern.source),l.push(this.__patterns.django_value._starting_pattern.source),l.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||l.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&l.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+l.join("|")+")")},h.prototype._read_template=function(){var l="",f=this._input.peek();if(f==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(l=l||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(l=l||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(l=l||this.__patterns.handlebars_comment.read(),l=l||this.__patterns.handlebars_unescaped.read(),l=l||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(l=l||this.__patterns.django_value.read()),this._excluded.django||(l=l||this.__patterns.django_comment.read(),l=l||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(l=l||this.__patterns.smarty_comment.read(),l=l||this.__patterns.smarty_literal.read(),l=l||this.__patterns.smarty.read()));return l},r.exports.TemplatablePattern=h}],B={};function K(r){var L=B[r];if(L!==void 0)return L.exports;var v=B[r]={exports:{}};return j[r](v,v.exports,K),v.exports}var G=K(0);P=G})();var X=P;!(ne=[],J=function(){return{js_beautify:X}}.apply(xe,ne),J!==void 0&&(nt.exports=J))})()},"6xqJ":function(nt,xe,Z){"use strict";Z.r(xe);var ne=Z("+L6B"),J=Z("2/Rp"),P=Z("sRBo"),X=Z("kaz8"),j=Z("14J3"),B=Z("BMrR"),K=Z("jCWc"),G=Z("kPKH"),r=Z("giR+"),L=Z("fyUT"),v=Z("DZo9"),m=Z("8z0m"),p=Z("0Owb"),h=Z("5NDa"),l=Z("5rEg"),f=Z("sPJy"),o=Z("bE4q"),u=Z("oBTY"),a=Z("k1fw"),s=Z("9og8"),R=Z("miYZ"),_=Z("tsqr"),C=Z("y8nQ"),D=Z("Vl3Y"),O=Z("tJVT"),A=Z("WmNS"),S=Z.n(A),T=Z("q1tI"),c=Z.n(T),w=Z("Ty5D"),y=Z("9kvl"),b=Z("55Ip"),U=Z("Ot1p"),F=Z("XYT7"),E=Z("m3rI"),N=Z("I98M"),I=Z.n(N),g=function($){var ie,oe=$.shixunHomeworks,Ce=$.newCourse,ve=$.globalSetting,Se=$.loading,Ae=$.dispatch,Oe=$.match,he=Object(w.i)(),ce=D.a.useForm(),re=Object(O.a)(ce,1),fe=re[0],se=Object(T.useState)({}),ke=Object(O.a)(se,2),Ne=ke[0],Re=ke[1],Pe=Object(T.useState)(!1),je=Object(O.a)(Pe,2),ue=je[0],Ee=je[1],Le=Object(T.useState)([]),Ie=Object(O.a)(Le,2),Ge=Ie[0],Xe=Ie[1],Je=Object(T.useState)([]),Qe=Object(O.a)(Je,2),at=Qe[0],qe=Qe[1],tt=oe.commonHomeWorkEditDefaultData,Be={name:"file",multiple:!0,action:E.a.API_SERVER+"/api/attachments.json",defaultFileList:Ge,onChange:function(Te){var me=Te.file.status;me!=="uploading",me==="done"?_.b.success("".concat(Te.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F")):me==="error"&&_.b.error("".concat(Te.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))}};Object(T.useEffect)(function(){ot()},[he.topicId]);var ut=function(Te){return Te==null?void 0:Te.map(function(me){return{uid:me.id,response:{id:me.id},name:me.title,status:"done",url:me.url}})},ot=function(){var He=Object(s.a)(S.a.mark(function Te(){var me;return S.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return ae.next=2,Ae({type:"shixunHomeworks/editCommonHomeWorkDefaultBankData",payload:{id:he.topicId}});case 2:me=ae.sent,me&&(fe.setFieldsValue({name:me.name}),fe.setFieldsValue({description:me.description}),fe.setFieldsValue(Object(a.a)({},me)),Re(Object(a.a)({},me)),Xe(Object(u.a)(ut(me.attachments))),qe(Object(u.a)(ut(me.reference_attachments))),Ee(!0));case 4:case"end":return ae.stop()}},Te)}));return function(){return He.apply(this,arguments)}}(),Ue=function(){var He=Object(s.a)(S.a.mark(function Te(me){var be,ae,le,de;return S.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:return be=Object(a.a)({},me),be.attachment_ids&&(be.attachment_ids=be==null||((ae=be.attachment_ids.fileList)===null||ae===void 0)?void 0:ae.map(function(Fe){return Fe.response.id})),be.reference_attachment_ids&&(be.reference_attachment_ids=be==null||((le=be.reference_attachment_ids.fileList)===null||le===void 0)?void 0:le.map(function(Fe){return Fe.response.id})),we.next=5,Object(F.n)(Object(a.a)(Object(a.a)(Object(a.a)({id:he.topicId},Oe.params),be),{},{type:3}));case 5:de=we.sent,de&&y.d.push("/users/".concat(he.username,"/topics/").concat(he.topicId,"/").concat(he.topictype,"/group/detail"));case 7:case"end":return we.stop()}},Te)}));return function(me){return He.apply(this,arguments)}}();return c.a.createElement("section",{className:I.a.bg},c.a.createElement("section",{className:"animated fadeIn"},c.a.createElement("aside",{className:"mt10"},c.a.createElement(o.a,{separator:">"},c.a.createElement(o.a.Item,null,c.a.createElement(b.a,{to:"/users/".concat(he.username,"/").concat(he.topictype==="personal"?"topics":"topicbank","/").concat(he.topictype)},he.topictype==="personal"?"\u6211\u7684\u8BFE\u5802\u8D44\u6E90":"\u516C\u5171\u9898\u5E93")),c.a.createElement(o.a.Item,null,c.a.createElement(b.a,{to:"/users/".concat(he.username,"/topics/").concat(he.topicId,"/").concat(he.topictype,"/group/detail")},"\u8BE6\u60C5")),c.a.createElement(o.a.Item,null,"\u7F16\u8F91")))),c.a.createElement("aside",{className:"font24 bold mt20 mb20"},"\u7F16\u8F91\u666E\u901A\u4F5C\u4E1A"),c.a.createElement(D.a,{form:fe,className:I.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){Re(Object(a.a)({},fe.getFieldsValue()))},onFinish:Ue},c.a.createElement("div",{className:I.a.fieldWrap},c.a.createElement(D.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},c.a.createElement(l.a,{maxLength:60,suffix:"".concat(((ie=Ne.name)===null||ie===void 0?void 0:ie.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),c.a.createElement("div",{className:I.a.mdWrap},c.a.createElement(D.a.Item,{name:"description",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:5e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},c.a.createElement(U.a,{watch:!0,defaultValue:tt.description})),c.a.createElement("div",null,c.a.createElement(D.a.Item,{name:"attachment_ids"},ue&&c.a.createElement(m.a,Object(p.a)({defaultFileList:Ge},Be),c.a.createElement("span",{className:"c-blue"},"\u4E0A\u4F20\u9644\u4EF6")," \uFF08\u5355\u4E2A\u6587\u4EF6150MB\u4EE5\u5185\uFF09"))),c.a.createElement(B.a,{gutter:[20,20]},c.a.createElement(G.a,{flex:"230px"},c.a.createElement(D.a.Item,{name:"min_num",label:"\u5206\u7EC4\u8BBE\u7F6E",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5C0F\u4EBA\u6570"}]},c.a.createElement(L.a,{style:{width:200},min:1,placeholder:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5C0F\u4EBA\u6570"}))),c.a.createElement(G.a,{flex:"230px"},c.a.createElement(D.a.Item,{name:"max_num",label:c.a.createElement("div",null,"\xA0"),rules:[{required:!0,message:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5927\u4EBA\u6570"}]},c.a.createElement(L.a,{style:{width:200},max:10,placeholder:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5927\u4EBA\u6570"}))),c.a.createElement(G.a,null,c.a.createElement("div",{className:"mt30"},"\uFF08\u5B66\u751F\u63D0\u4EA4\u4F5C\u54C1\u65F6\u9700\u8981\u5173\u8054\u540C\u7EC4\u6210\u5458\uFF0C\u7EC4\u5185\u6210\u5458\u4F5C\u54C1\u5171\u4EAB\uFF09"))),c.a.createElement(B.a,null,c.a.createElement(G.a,null,c.a.createElement(D.a.Item,{name:"base_on_project",valuePropName:"checked"},c.a.createElement(X.a,{value:1,defaultChecked:!0},"\u57FA\u4E8E\u9879\u76EE\u5B9E\u65BD")),c.a.createElement("span",{className:"c-light-black"},"\uFF08\u9009\u4E2D\uFF0C\u5219\u5FC5\u987B\u5728\u672C\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u9879\u76EE\u7BA1\u7406\u5458\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF1B\u4E0D\u9009\u4E2D\uFF0C\u65E0\u9700\u5728\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u4EFB\u610F\u5C0F\u7EC4\u6210\u5458\u5747\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF09")))),c.a.createElement("div",{className:I.a.mdWrap},c.a.createElement(D.a.Item,{name:"reference_answer",label:"\u53C2\u8003\u7B54\u6848:"},c.a.createElement(U.a,{defaultValue:tt.reference_answer,watch:!0})),c.a.createElement("div",null,c.a.createElement(D.a.Item,{name:"reference_attachment_ids"},ue&&c.a.createElement(m.a,Object(p.a)({},Be,{defaultFileList:at}),c.a.createElement("span",{className:"c-blue"},"\u4E0A\u4F20\u9644\u4EF6")," \uFF08\u5355\u4E2A\u6587\u4EF6150MB\u4EE5\u5185\uFF09")))),c.a.createElement("div",{className:I.a.backgroundFa},c.a.createElement("div",{className:"pt40 mb30"},c.a.createElement(D.a.Item,null,c.a.createElement(J.a,{size:"large",type:"primary",className:"".concat(I.a.button," mr20"),htmlType:"submit"},"\u63D0\u4EA4"),c.a.createElement(J.a,{size:"large",type:"primary",ghost:!0,className:I.a.button,onClick:function(){return y.d.push("/users/".concat(he.username,"/topics/").concat(he.topicId,"/").concat(he.topictype,"/group/detail"))}},"\u53D6\u6D88"))))))};xe.default=Object(y.a)(function(H){var $=H.shixunHomeworks,ie=H.newCourse,oe=H.loading,Ce=H.globalSetting;return{shixunHomeworks:$,newCourse:ie,globalSetting:Ce,loading:oe.effects}})(g)},"746U":function(nt,xe,Z){"use strict";Z.d(xe,"f",function(){return ne}),Z.d(xe,"l",function(){return J}),Z.d(xe,"k",function(){return P}),Z.d(xe,"j",function(){return X}),Z.d(xe,"g",function(){return j}),Z.d(xe,"m",function(){return B}),Z.d(xe,"h",function(){return K}),Z.d(xe,"n",function(){return G}),Z.d(xe,"c",function(){return r}),Z.d(xe,"a",function(){return L}),Z.d(xe,"i",function(){return v}),Z.d(xe,"o",function(){return m}),Z.d(xe,"e",function(){return l}),Z.d(xe,"d",function(){return f}),Z.d(xe,"p",function(){return o}),Z.d(xe,"b",function(){return u});function ne(a){return Array.isArray(a)}function J(a){return typeof a=="string"}function P(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&!(a instanceof RegExp)&&!(a instanceof Date)}function X(a){return typeof a=="number"&&!isNaN(a)}function j(a){return a===!0||a===!1}function B(a){return typeof a=="undefined"}function K(a){return!G(a)}function G(a){return B(a)||a===null}function r(a,s){if(!a)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function L(a){if(G(a))throw new Error("Assertion Failed: argument is undefined or null");return a}function v(a){return typeof a=="function"}function m(a,s){const R=Math.min(a.length,s.length);for(let _=0;_function(){const D=Array.prototype.slice.call(arguments,0);return s(C,D)};let _={};for(const C of a)_[C]=R(C);return _}function o(a){return a===null?void 0:a}function u(a,s="Unreachable"){throw new Error(s)}},"7Cbv":function(nt,xe,Z){"use strict";var ne=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),J=new Uint8Array(16);function P(){if(!ne)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ne(J)}var X=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function j(p){return typeof p=="string"&&X.test(p)}for(var B=j,K=[],G=0;G<256;++G)K.push((G+256).toString(16).substr(1));function r(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=(K[p[h+0]]+K[p[h+1]]+K[p[h+2]]+K[p[h+3]]+"-"+K[p[h+4]]+K[p[h+5]]+"-"+K[p[h+6]]+K[p[h+7]]+"-"+K[p[h+8]]+K[p[h+9]]+"-"+K[p[h+10]]+K[p[h+11]]+K[p[h+12]]+K[p[h+13]]+K[p[h+14]]+K[p[h+15]]).toLowerCase();if(!B(l))throw TypeError("Stringified UUID is invalid");return l}var L=r;function v(p,h,l){p=p||{};var f=p.random||(p.rng||P)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,h){l=l||0;for(var o=0;o<16;++o)h[l+o]=f[o];return h}return L(f)}var m=xe.a=v},"7ahc":function(nt,xe,Z){"use strict";Z.d(xe,"a",function(){return R});var ne=Z("k1fw"),J=Z("0Owb"),P=Z("+L6B"),X=Z("2/Rp"),j=Z("y8nQ"),B=Z("Vl3Y"),K=Z("tJVT"),G=Z("OaEy"),r=Z("2fM7"),L=Z("q1tI"),v=Z.n(L),m=Z("VrN/"),p=Z.n(m),h=Z("p77/"),l=Z.n(h),f=Z("c5Ni"),o=Z.n(f),u=r.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},s={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"]};xe.b=function(_){var C=_.callback,D=_.onCancel,O=Object(L.useState)("python"),A=Object(K.a)(O,2),S=A[0],T=A[1];function c(y){T(s[y][1])}function w(y){C(y)}return v.a.createElement(B.a,Object(J.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:w}),v.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},v.a.createElement(r.a,{onChange:c},Object.keys(s).map(function(y){return v.a.createElement(u,{key:y,value:y},s[y][0])}))),v.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},v.a.createElement(R,{mode:S})),v.a.createElement("div",{className:"flex-container flex-end"},v.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),v.a.createElement(X.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function R(_){var C=_.value,D=_.onChange,O=_.mode,A=_.options,S=A===void 0?{}:A,T=Object(L.useRef)(),c=Object(L.useState)(),w=Object(K.a)(c,2),y=w[0],b=w[1];return Object(L.useEffect)(function(){if(y){function U(F){var E=F.getValue();D&&D(E)}return y.on("change",U),function(){y.off("change",U)}}},[y,D]),Object(L.useEffect)(function(){y&&y.setOption("mode",O)},[y,O]),Object(L.useEffect)(function(){y&&((C!==y.getValue()||C==="")&&setTimeout(function(){y.setValue(C||" ")},300))},[y,C]),Object(L.useEffect)(function(){if(T.current&&!y){var U=p.a.fromTextArea(T.current,Object(ne.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},S));b(U)}},[T.current,y]),v.a.createElement("div",{className:"my-codemirror-container"},v.a.createElement("textarea",{ref:T}))}},"8EBN":function(nt,xe,Z){(function(ne){ne(Z("VrN/"))})(function(ne){"use strict";ne.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 J=0;J-1&&X.substring(K+1,X.length);if(G)return ne.findModeByExtension(G)},ne.findModeByName=function(X){X=X.toLowerCase();for(var j=0;j=W.length?ee.slice(W.length):ee}).join(`
`)}var o=[],u=[""],a=new h.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function R(){o.length=0,u=[""]}var _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function C(Y,x,k,W){if(x>=Y.length||Y[x].level<=k)return x;var ee=Y[x];W.push("- "+ee.text+""),x++;var V=[];return x=C(Y,x,ee.level,V),V.length>0&&(W.push("
"),V.forEach(function(_e){W.push(_e)}),W.push("
")),W.push(" "),x=C(Y,x,k,W),x}function D(){return C(o,0,0,u),u.push("
"),u.join("")}var O={heading:function(x){var k=s.exec(x);if(k)return{type:"heading",raw:k[0],depth:k[1].length,text:k[2]}},fences:function(x){var k=this.rules.block.fences.exec(x);if(k){var W=k[0],ee=f(W,k[3]||""),V=k[2]?k[2].trim():k[2];if(["latex","katex","math"].indexOf(V)>=0){var _e=T(),Ke=ee;ee=_e,c[_e]={type:"block",expression:Ke}}return{type:"code",raw:W,lang:V,text:ee}}}},A=/(?:\${2})([^\n`]+?)(?:\${2})/gi,S=0,T=function(){return"__special_katext_id_".concat(S++,"__")},c={};function w(){return c}function y(){S=0,c={}}function b(Y){return Y=Y.replace(A,function(x,k){var W=T();return c[W]={type:"inline",expression:k},W}),Y}var U=a.listitem;a.listitem=function(Y){return U(b(Y))};var F=a.paragraph;a.paragraph=function(Y){return F(b(Y))};var E=a.tablecell;a.tablecell=function(Y,x){return E(b(Y),x)},a.code=function(Y,x,k){var W=(x||"").match(/\S*/)[0];return W?["latex","katex","math"].indexOf(W)>=0?"".concat(Y,"
"):'
').concat(k?Y:Object(l.escape)(Y,!0),`
`):''+(k?Y:Object(l.escape)(Y,!0))+"
"},a.heading=function(Y,x,k){var W=this.options.headerPrefix+k.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:W,level:x,text:Y}),"'+Y+""},h.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),h.a.use({tokenizer:O,renderer:a});var N=h.a,I=Z("SJMd"),g=Z("ulZh"),H=Z.n(g),$=Z("m3rI"),ie=Z("Oy/b"),oe=Z("p5ED"),Ce=Z("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ve=function(Y,x){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,W){k.__proto__=W}||function(k,W){for(var ee in W)Object.prototype.hasOwnProperty.call(W,ee)&&(k[ee]=W[ee])})(Y,x)};function Se(Y,x){function k(){this.constructor=Y}ve(Y,x),Y.prototype=x===null?Object.create(x):(k.prototype=x.prototype,new k)}function Ae(Y,x,k,W){return new(k||(k=Promise))(function(ee,V){function _e(pt){try{et(W.next(pt))}catch(Ve){V(Ve)}}function Ke(pt){try{et(W.throw(pt))}catch(Ve){V(Ve)}}function et(pt){var Ve;pt.done?ee(pt.value):(Ve=pt.value,Ve instanceof k?Ve:new k(function(_t){_t(Ve)})).then(_e,Ke)}et((W=W.apply(Y,x||[])).next())})}function Oe(Y,x){var k,W,ee,V,_e={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return V={next:Ke(0),throw:Ke(1),return:Ke(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function Ke(et){return function(pt){return function(Ve){if(k)throw new TypeError("Generator is already executing.");for(;_e;)try{if(k=1,W&&(ee=2&Ve[0]?W.return:Ve[0]?W.throw||((ee=W.return)&&ee.call(W),0):W.next)&&!(ee=ee.call(W,Ve[1])).done)return ee;switch(W=0,ee&&(Ve=[2&Ve[0],ee.value]),Ve[0]){case 0:case 1:ee=Ve;break;case 4:return _e.label++,{value:Ve[1],done:!1};case 5:_e.label++,W=Ve[1],Ve=[0];continue;case 7:Ve=_e.ops.pop(),_e.trys.pop();continue;default:if(!(ee=_e.trys,(ee=ee.length>0&&ee[ee.length-1])||Ve[0]!==6&&Ve[0]!==2)){_e=0;continue}if(Ve[0]===3&&(!ee||Ve[1]>ee[0]&&Ve[1]',"select"),this.addActionButton(W,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(W,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(W,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(W,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(W,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(W,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(W,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(V){var _e=document.createElement("div");_e.className=""+k.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",V.typeName),_e.innerHTML=V.icon,_e.addEventListener("click",function(){k.markerToolbarButtonClicked(_e,V)}),k.buttons.push(_e),k.markerButtons.push(_e)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",ee.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ee),this.addActionButton(ee,'',"render"),this.addActionButton(ee,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Y.prototype.addButtonClickListener=function(x){this.buttonClickListeners.push(x)},Y.prototype.removeButtonClickListener=function(x){this.buttonClickListeners.indexOf(x)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(x),1)},Y.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Y.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var x=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var k=0;k0&&this.buttonClickListeners.forEach(function(W){return W("marker",k)}),this.markerButtonOverflowBlock.style.display="none"},Y.prototype.actionToolbarButtonClicked=function(x,k){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(W){return W("action",k)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Y.prototype.setActiveButton=function(x){this.resetButtonStyles(),x.className=x.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),x.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Y.prototype.setActiveMarkerButton=function(x){var k=this.markerButtons.find(function(W){return W.getAttribute("data-type-name")===x});k&&this.setActiveButton(k)},Y.prototype.setCurrentMarker=function(x){var k=this;this.currentMarker=x,this.buttons.filter(function(W){return/delete|notes/.test(W.getAttribute("data-action"))}).forEach(function(W){k.currentMarker===void 0?(W.style.fillOpacity="0.4",W.style.pointerEvents="none"):(W.style.fillOpacity="1",W.style.pointerEvents="all")})},Y}(),je=function(){function Y(x,k,W,ee){this.panels=[],this.panelButtons=[],this.markerjsContainer=x,this.displayMode=k,this.uiStyleSettings=W,this.styles=ee,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Y.prototype.addStyles=function(){var x;this.toolboxStyleClass=this.styles.addClass(new Re("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Re("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var k=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Re("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Re("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Re("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Re("toolbox-panel-row_colors",`
background-color: `+((x=this.uiStyleSettings.toolboxBackgroundColor)!==null&&x!==void 0?x:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Re("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px;
padding: `+k+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Re("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Re("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ne("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ne("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Y.prototype.show=function(x){var k;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=x,this.uiContainer.className=this.toolboxStyleClass.name+" "+((k=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Y.prototype.setPanelButtons=function(x){var k,W,ee=this;this.panels=x,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((W=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&W!==void 0?W:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(V){var _e;V.uiStyleSettings=ee.uiStyleSettings;var Ke=document.createElement("div");Ke.className=ee.toolboxButtonStyleClass.name+" "+((_e=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:ee.toolboxButtonStyleColorsClass.name),Ke.innerHTML=V.icon,Ke.title=V.title,Ke.addEventListener("click",function(){ee.panelButtonClick(V)}),ee.panelButtons.push(Ke),ee.buttonRow.appendChild(Ke)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Y.prototype.panelButtonClick=function(x){var k=this,W=-1;if(x!==this.activePanel){W=this.panels.indexOf(x),this.panelRow.innerHTML="";var ee=x.getUi();ee.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ee),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=x}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){k.displayMode==="inline"?k.panelRow.style.display="none":k.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(V,_e){var Ke,et;V.className=k.toolboxButtonStyleClass.name+" "+(_e===W?""+((Ke=k.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:k.toolboxActiveButtonStyleColorsClass.name):""+((et=k.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&et!==void 0?et:k.toolboxButtonStyleColorsClass.name))})},Y}(),ue=function(Y,x){this.title=Y,this.icon=x},Ee=function(Y){function x(k,W,ee,V){var _e=Y.call(this,k,V||'')||this;return _e.colors=[],_e.addTransparent=!1,_e.colorBoxes=[],_e.colors=W,_e.currentColor=ee,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return Se(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.whiteSpace="nowrap",this.colors.forEach(function(ee){var V=k.getColorBox(ee);W.appendChild(V),k.colorBoxes.push(V)}),W},x.prototype.getColorBox=function(k){var W=this,ee=this.uiStyleSettings.toolbarHeight/4,V=this.uiStyleSettings.toolbarHeight-ee,_e=document.createElement("div");_e.style.display="inline-block",_e.style.boxSizing="content-box",_e.style.width=V-2+"px",_e.style.height=V-2+"px",_e.style.padding="1px",_e.style.marginRight="2px",_e.style.marginBottom="2px",_e.style.borderWidth="2px",_e.style.borderStyle="solid",_e.style.borderRadius=(V+2)/2+"px",_e.style.borderColor=k===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){W.setCurrentColor(k,_e)});var Ke=document.createElement("div");return Ke.style.display="inline-block",Ke.style.width=V-2+"px",Ke.style.height=V-2+"px",Ke.style.backgroundColor=k,Ke.style.borderRadius=V/2+"px",k==="transparent"&&(Ke.style.fill=this.uiStyleSettings.toolboxAccentColor,Ke.innerHTML=``),_e.appendChild(Ke),_e},x.prototype.setCurrentColor=function(k,W){var ee=this;this.currentColor=k,this.colorBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(k)},x}(ue),Le=function(){function Y(x,k,W){this._state="new",this._isSelected=!1,this._container=x,this._overlayContainer=k,this.globalSettings=W,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Y.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Y.prototype.ownsTarget=function(x){return!1},Object.defineProperty(Y.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Y.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Y.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Y.prototype.pointerDown=function(x,k){},Y.prototype.dblClick=function(x,k){},Y.prototype.manipulate=function(x){},Y.prototype.pointerUp=function(x){this.stateChanged()},Y.prototype.dispose=function(){},Y.prototype.addMarkerVisualToContainer=function(x){this.container.childNodes.length>0?this.container.insertBefore(x,this.container.childNodes[0]):this.container.appendChild(x)},Y.prototype.getState=function(){return{typeName:Y.typeName,state:this.state,notes:this.notes}},Y.prototype.restoreState=function(x){this._state=x.state,this.notes=x.notes},Y.prototype.scale=function(x,k){},Y.prototype.colorChanged=function(x){this.onColorChanged&&this.onColorChanged(x),this.stateChanged()},Y.prototype.fillColorChanged=function(x){this.onFillColorChanged&&this.onFillColorChanged(x),this.stateChanged()},Y.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var x=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),x.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(x)&&this.onStateChanged(this)}},Y.typeName="MarkerBase",Y}(),Ie=function(){function Y(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Y.prototype.findGripByVisual=function(x){return this.topLeft.ownsTarget(x)?this.topLeft:this.topCenter.ownsTarget(x)?this.topCenter:this.topRight.ownsTarget(x)?this.topRight:this.centerLeft.ownsTarget(x)?this.centerLeft:this.centerRight.ownsTarget(x)?this.centerRight:this.bottomLeft.ownsTarget(x)?this.bottomLeft:this.bottomCenter.ownsTarget(x)?this.bottomCenter:this.bottomRight.ownsTarget(x)?this.bottomRight:void 0},Y}(),Ge=function(){function Y(){this.GRIP_SIZE=10,this.visual=ce.createGroup(),this.visual.appendChild(ce.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ce.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Y.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},Y}(),Xe=function(){function Y(){}return Y.toITransformMatrix=function(x){return{a:x.a,b:x.b,c:x.c,d:x.d,e:x.e,f:x.f}},Y.toSVGMatrix=function(x,k){return x.a=k.a,x.b=k.b,x.c=k.c,x.d=k.d,x.e=k.e,x.f=k.f,x},Y}(),Je=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.left=0,V.top=0,V.width=0,V.height=0,V.defaultSize={x:50,y:20},V.offsetX=0,V.offsetY=0,V.rotationAngle=0,V.CB_DISTANCE=10,V._suppressMarkerCreateEvent=!1,V.container.transform.baseVal.appendItem(ce.createTransform()),V.setupControlBox(),V}return Se(x,Y),Object.defineProperty(x.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"visual",{get:function(){return this._visual},set:function(k){this._visual=k;var W=ce.createTransform();this._visual.transform.baseVal.appendItem(W)},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(k){return!!Y.prototype.ownsTarget.call(this,k)||!!(this.controlGrips.findGripByVisual(k)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k))},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="new"&&(this.left=k.x,this.top=k.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ee=this.unrotatePoint(k);if(this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.offsetX=ee.x-this.left,this.offsetY=ee.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(W),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(W)){this.activeGrip=this.rotatorGrip;var V=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=V.x-this.width/2,this.top=V.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _e=this.container.transform.baseVal.getItem(0);_e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_e,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},x.prototype.pointerUp=function(k){var W=this.state;Y.prototype.pointerUp.call(this,k),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(k),this._state="select",W==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},x.prototype.moveVisual=function(k){this.visual.style.transform="translate("+k.x+"px, "+k.y+"px)"},x.prototype.manipulate=function(k){var W=this.unrotatePoint(k);this.state==="creating"?this.resize(k):this.state==="move"?(this.left=this.manipulationStartLeft+(W.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(W.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(W):this.state==="rotate"&&this.rotate(k)},x.prototype.resize=function(k){var W=this.manipulationStartLeft,ee=this.manipulationStartWidth,V=this.manipulationStartTop,_e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:W=this.manipulationStartLeft+k.x-this.manipulationStartX,ee=this.manipulationStartWidth+this.manipulationStartLeft-W;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ee=this.manipulationStartWidth+k.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:V=this.manipulationStartTop+k.y-this.manipulationStartY,_e=this.manipulationStartHeight+this.manipulationStartTop-V;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_e=this.manipulationStartHeight+k.y-this.manipulationStartY}ee>=0?(this.left=W,this.width=ee):(this.left=W+ee,this.width=-ee),_e>=0?(this.top=V,this.height=_e):(this.top=V+_e,this.height=-_e),this.setSize()},x.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},x.prototype.rotate=function(k){if(Math.abs(k.x-this.centerX)>.1){var W=Math.sign(k.x-this.centerX);this.rotationAngle=180*Math.atan((k.y-this.centerY)/(k.x-this.centerX))/Math.PI+90*W,this.applyRotation()}},x.prototype.applyRotation=function(){var k=this.container.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(k,0)},x.prototype.rotatePoint=function(k){if(this.rotationAngle===0)return k;var W=this.container.getCTM(),ee=ce.createPoint(k.x,k.y);return{x:(ee=ee.matrixTransform(W)).x,y:ee.y}},x.prototype.unrotatePoint=function(k){if(this.rotationAngle===0)return k;var W=this.container.getCTM();W=W.inverse();var ee=ce.createPoint(k.x,k.y);return{x:(ee=ee.matrixTransform(W)).x,y:ee.y}},x.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=ce.createGroup();var k=ce.createTransform();k.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(k),this.container.appendChild(this.controlBox),this.controlRect=ce.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ce.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ie,this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){var k=this.controlBox.transform.baseVal.getItem(0);k.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(k,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},x.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},x.prototype.createGrip=function(){var k=new Ge;return k.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(k.visual),k},x.prototype.positionGrips=function(){var k=this.controlGrips.topLeft.GRIP_SIZE,W=-k/2,ee=W,V=(this.width+this.CB_DISTANCE)/2-k/2,_e=(this.height+this.CB_DISTANCE)/2-k/2,Ke=this.height+this.CB_DISTANCE-k/2,et=this.width+this.CB_DISTANCE-k/2;this.positionGrip(this.controlGrips.topLeft.visual,W,ee),this.positionGrip(this.controlGrips.topCenter.visual,V,ee),this.positionGrip(this.controlGrips.topRight.visual,et,ee),this.positionGrip(this.controlGrips.centerLeft.visual,W,_e),this.positionGrip(this.controlGrips.centerRight.visual,et,_e),this.positionGrip(this.controlGrips.bottomLeft.visual,W,Ke),this.positionGrip(this.controlGrips.bottomCenter.visual,V,Ke),this.positionGrip(this.controlGrips.bottomRight.visual,et,Ke),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,V,ee-3*this.CB_DISTANCE)},x.prototype.positionGrip=function(k,W,ee){var V=k.transform.baseVal.getItem(0);V.setTranslate(W,ee),k.transform.baseVal.replaceItem(V,0)},x.prototype.hideControlBox=function(){this.controlBox.style.display="none"},x.prototype.showControlBox=function(){this.controlBox.style.display=""},x.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Xe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Xe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Y.prototype.getState.call(this))},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.left=W.left,this.top=W.top,this.width=W.width,this.height=W.height,this.rotationAngle=W.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Xe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,W.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Xe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,W.containerTransformMatrix))},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W);var ee=this.rotatePoint({x:this.left,y:this.top}),V=this.unrotatePoint({x:ee.x*k,y:ee.y*W});this.left=V.x,this.top=V.y,this.width=this.width*k,this.height=this.height*W,this.adjustControlBox()},x}(Le),Qe=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.createVisual=V.createVisual.bind(V),V}return Se(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual)},x.prototype.createVisual=function(){this.visual=ce.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},x.prototype.manipulate=function(k){Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),this.setSize()},x.prototype.setSize=function(){Y.prototype.setSize.call(this),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(k){Y.prototype.pointerUp.call(this,k),this.setSize()},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},x.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Y.prototype.getState.call(this))},x.prototype.restoreState=function(k){var W=k;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),Y.prototype.restoreState.call(this,k),this.setSize()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setSize()},x.title="Rectangle marker",x}(Je),at=function(Y){function x(k,W,ee,V){var _e=Y.call(this,k,V||'')||this;return _e.widths=[],_e.widthBoxes=[],_e.widths=W,_e.currentWidth=ee,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return Se(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.widths.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.flexGrow="2",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=ee===k.currentWidth?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentWidth(ee,V)}),W.appendChild(V);var _e=document.createElement("div");_e.innerText=ee.toString(),_e.style.marginRight="5px",V.appendChild(_e);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.display="flex",Ke.style.alignItems="center";var et=document.createElement("hr");et.style.minWidth="20px",et.style.border="0px",et.style.borderTop=ee+"px solid "+k.uiStyleSettings.toolboxColor,et.style.flexGrow="2",Ke.appendChild(et),V.appendChild(Ke),k.widthBoxes.push(V)}),W},x.prototype.setCurrentWidth=function(k,W){var ee=this;this.currentWidth=k,this.widthBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},x}(ue),qe=function(Y){function x(k,W,ee,V){var _e=Y.call(this,k,V||'')||this;return _e.styles=[],_e.styleBoxes=[],_e.styles=W,_e.currentStyle=ee,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return Se(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.styles.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/k.styles.length-5+"%",V.style.borderColor=ee===k.currentStyle?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentStyle(ee,V)}),W.appendChild(V);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.overflow="hidden";var Ke=``;_e.innerHTML=Ke,V.appendChild(_e),k.styleBoxes.push(V)}),W},x.prototype.setCurrentStyle=function(k,W){var ee=this;this.currentStyle=k,this.styleBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},x}(ue),tt=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new Ee("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new at("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Se(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="FrameMarker",x.title="Frame marker",x.icon='',x}(Qe),Be=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},ut=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.x1=0,V.y1=0,V.x2=0,V.y2=0,V.defaultLength=50,V.manipulationStartX=0,V.manipulationStartY=0,V.manipulationStartX1=0,V.manipulationStartY1=0,V.manipulationStartX2=0,V.manipulationStartY2=0,V.setupControlBox(),V}return Se(x,Y),x.prototype.ownsTarget=function(k){return!!Y.prototype.ownsTarget.call(this,k)||!(!this.grip1.ownsTarget(k)&&!this.grip2.ownsTarget(k))},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.manipulationStartX=k.x,this.manipulationStartY=k.y,this.state==="new"&&(this.x1=k.x,this.y1=k.y,this.x2=k.x,this.y2=k.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(W)?this.activeGrip=this.grip1:this.grip2.ownsTarget(W)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},x.prototype.pointerUp=function(k){var W=this.state;Y.prototype.pointerUp.call(this,k),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(k),this._state="select",W==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},x.prototype.adjustVisual=function(){},x.prototype.manipulate=function(k){this.state==="creating"?this.resize(k):this.state==="move"?(this.x1=this.manipulationStartX1+k.x-this.manipulationStartX,this.y1=this.manipulationStartY1+k.y-this.manipulationStartY,this.x2=this.manipulationStartX2+k.x-this.manipulationStartX,this.y2=this.manipulationStartY2+k.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(k)},x.prototype.resize=function(k){switch(this.activeGrip){case this.grip1:this.x1=k.x,this.y1=k.y;break;case this.grip2:case void 0:this.x2=k.x,this.y2=k.y}this.adjustVisual(),this.adjustControlBox()},x.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=ce.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){this.positionGrips()},x.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},x.prototype.createGrip=function(){var k=new Ge;return k.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(k.visual),k},x.prototype.positionGrips=function(){var k=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-k/2,this.y1-k/2),this.positionGrip(this.grip2.visual,this.x2-k/2,this.y2-k/2)},x.prototype.positionGrip=function(k,W,ee){var V=k.transform.baseVal.getItem(0);V.setTranslate(W,ee),k.transform.baseVal.replaceItem(V,0)},x.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Y.prototype.getState.call(this))},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.x1=W.x1,this.y1=W.y1,this.x2=W.x2,this.y2=W.y2},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.x1=this.x1*k,this.y1=this.y1*W,this.x2=this.x2*k,this.y2=this.y2*W,this.adjustVisual(),this.adjustControlBox()},x}(Le),ot=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new Ee("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new at("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Se(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorLine&&k!==this.visibleLine)},x.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},x.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ce.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.createVisual(),this.adjustVisual()},x.typeName="LineMarker",x.title="Line marker",x.icon='',x}(ut),Ue=function(Y){function x(k,W,ee,V){var _e=Y.call(this,k,V||'')||this;return _e.fonts=[],_e.fontBoxes=[],_e.fonts=W,_e.currentFont=ee,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return Se(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.flexGrow="2",this.fonts.forEach(function(ee){var V=document.createElement("div");V.style.display="inline-block",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/k.fonts.length-5+"%",V.style.borderColor=ee===k.currentFont?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentFont(ee,V)}),W.appendChild(V);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=ee,_e.style.overflow="hidden";var Ke=document.createElement("div");Ke.style.whiteSpace="nowrap",Ke.style.overflow="hidden",Ke.style.textOverflow="ellipsis",Ke.innerHTML="The quick brown fox jumps over the lazy dog",_e.appendChild(Ke),V.appendChild(_e),k.fontBoxes.push(V)}),W},x.prototype.setCurrentFont=function(k,W){var ee=this;this.currentFont=k,this.fontBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},x}(ue),He=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.color="transparent",V.padding=5,V.DEFAULT_TEXT="your text here",V.text=V.DEFAULT_TEXT,V.isMoved=!1,V.color=ee.defaultColor,V.fontFamily=ee.defaultFontFamily,V.defaultSize={x:100,y:30},V.setColor=V.setColor.bind(V),V.setFont=V.setFont.bind(V),V.renderText=V.renderText.bind(V),V.sizeText=V.sizeText.bind(V),V.textEditDivClicked=V.textEditDivClicked.bind(V),V.showTextEditor=V.showTextEditor.bind(V),V.setSize=V.setSize.bind(V),V.positionTextEditor=V.positionTextEditor.bind(V),V.colorPanel=new Ee("Color",ee.defaultColorSet,ee.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.fontFamilyPanel=new Ue("Font",ee.defaultFontFamilies,ee.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V}return Se(x,Y),x.prototype.ownsTarget=function(k){if(Y.prototype.ownsTarget.call(this,k)||k===this.visual||k===this.textElement||k===this.bgRectangle)return!0;var W=!1;return this.textElement.childNodes.forEach(function(ee){ee===k&&(W=!0)}),W},x.prototype.createVisual=function(){this.visual=ce.createGroup(),this.bgRectangle=ce.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ce.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.isMoved=!1,this.pointerDownPoint=k,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},x.prototype.renderText=function(){var k=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(W){k.textElement.appendChild(ce.createTSpan(W.trim()===""?" ":W.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},x.prototype.getTextScale=function(){var k=this.textElement.getBBox(),W=1;if(k.width>0&&k.height>0){var ee=(1*this.width-this.width*this.padding*2/100)/k.width,V=(1*this.height-this.height*this.padding*2/100)/k.height;W=Math.min(ee,V)}return W},x.prototype.getTextPosition=function(k){var W=this.textElement.getBBox(),ee=0,V=0;return W.width>0&&W.height>0&&(ee=(this.width-W.width*k)/2,V=this.height/2-W.height*k/2),{x:ee,y:V}},x.prototype.sizeText=function(){var k=this.textElement.getBBox(),W=this.getTextScale(),ee=this.getTextPosition(W);ee.y-=k.y*W,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ee.x+"px, "+ee.y+"px) scale("+W+", "+W+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ee.x,ee.y),this.textElement.transform.baseVal.getItem(1).setScale(W,W))},x.prototype.manipulate=function(k){Y.prototype.manipulate.call(this,k),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(k.x-this.pointerDownPoint.x)>5||Math.abs(k.y-this.pointerDownPoint.y)>5)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),this.isMoved=!0,this.setSize(),this.sizeText()},x.prototype.setSize=function(){Y.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},x.prototype.pointerUp=function(k){var W=this.state;W==="creating"&&(this._suppressMarkerCreateEvent=!0),Y.prototype.pointerUp.call(this,k),this.setSize(),(W==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},x.prototype.showTextEditor=function(){var k=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(W){W.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var W=Number.parseFloat(k.textEditor.style.fontSize);k.textEditor.clientWidth>=Number.parseInt(k.textEditor.style.maxWidth)&&W>.9;)W-=.1,k.textEditor.style.fontSize=Math.max(W,.9)+"em"}),this.textEditor.addEventListener("keyup",function(W){W.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(W){if(W.clipboardData){var ee=W.clipboardData.getData("text"),V=window.getSelection();if(!V.rangeCount)return!1;V.deleteFromDocument(),V.getRangeAt(0).insertNode(document.createTextNode(ee)),W.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){k.textEditDivClicked(k.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},x.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var k=this.getTextScale(),W=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ee=this.textElement.getBBox(),V={x:ee.width*k,y:ee.height*k};W.x-=V.x/2,W.y-=V.y/2,this.textEditor.style.top=W.y+"px",this.textEditor.style.left=W.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-W.x+"px",this.textEditor.style.fontSize=Math.max(16*k,12)+"px",this.textElement.style.display="none"}},x.prototype.textEditDivClicked=function(k){this.text=k.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},x.prototype.select=function(){Y.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},x.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Y.prototype.deselect.call(this)},x.prototype.dblClick=function(k,W){Y.prototype.dblClick.call(this,k,W),this.showTextEditor()},x.prototype.setColor=function(k){this.textElement&&ce.setAttributes(this.textElement,[["fill",k]]),this.color=k,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(k)},x.prototype.setFont=function(k){this.textElement&&ce.setAttributes(this.textElement,[["font-family",k]]),this.fontFamily=k,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},x.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},x.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){var W=k;this.color=W.color,this.fontFamily=W.fontFamily,this.padding=W.padding,this.text=W.text,this.createVisual(),Y.prototype.restoreState.call(this,k),this.setSize()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setSize(),this.sizeText(),this.positionTextEditor()},x.typeName="TextMarker",x.title="Text marker",x.icon='',x}(Je),Te=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.color="transparent",V.lineWidth=3,V.drawing=!1,V.pixelRatio=1,V.color=ee.defaultColor,V.lineWidth=ee.defaultStrokeWidth,V.pixelRatio=ee.freehandPixelRatio,V.setColor=V.setColor.bind(V),V.addCanvas=V.addCanvas.bind(V),V.finishCreation=V.finishCreation.bind(V),V.setLineWidth=V.setLineWidth.bind(V),V.colorPanel=new Ee("Color",ee.defaultColorSet,ee.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.lineWidthPanel=new at("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.lineWidthPanel.onWidthChanged=V.setLineWidth,V}return Se(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.drawingImage)},x.prototype.createVisual=function(){this.visual=ce.createGroup(),this.drawingImage=ce.createImage(),this.visual.appendChild(this.drawingImage);var k=ce.createTransform();this.visual.transform.baseVal.appendItem(k),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(k.x,k.y),this.drawing=!0):Y.prototype.pointerDown.call(this,k,W)},x.prototype.manipulate=function(k){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(k.x,k.y),this.canvasContext.stroke()):Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(k){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Y.prototype.pointerUp.call(this,k)},x.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},x.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.select.call(this)},x.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.deselect.call(this)},x.prototype.finishCreation=function(){for(var k=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),W=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ee=W[0],V=W[1],_e=W[2],Ke=W[3],et=!1,pt=0;pt0&&(et=!0,ptKe&&(Ke=pt),Ve>_e&&(_e=Ve));if(et){this.left=ee/this.pixelRatio,this.top=V/this.pixelRatio,this.width=(_e-ee)/this.pixelRatio,this.height=(Ke-V)/this.pixelRatio;var _t=document.createElement("canvas");_t.width=_e-ee,_t.height=Ke-V,_t.getContext("2d").putImageData(this.canvasContext.getImageData(ee,V,_e-ee,Ke-V),0,0),this.drawingImgUrl=_t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},x.prototype.setDrawingImage=function(){ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},x.prototype.setColor=function(k){this.color=k,this.colorChanged(k)},x.prototype.setLineWidth=function(k){this.lineWidth=k},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({drawingImgUrl:this.drawingImgUrl},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){this.createVisual(),Y.prototype.restoreState.call(this,k),this.drawingImgUrl=k.drawingImgUrl,this.setDrawingImage()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setDrawingImage()},x.typeName="FreehandMarker",x.title="Freehand marker",x.icon='',x}(Je),me=function(Y){function x(k,W,ee){var V=Y.call(this,k,ee||'')||this;return V.typeBoxes=[],V.currentType=W,V.setCurrentType=V.setCurrentType.bind(V),V}return Se(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2";for(var ee=function(Ke){var et="both";switch(Ke){case 0:et="both";break;case 1:et="start";break;case 2:et="end";break;case 3:et="none"}var pt=document.createElement("div");if(pt.style.display="flex",pt.style.flexGrow="2",pt.style.alignItems="center",pt.style.justifyContent="space-between",pt.style.padding="5px",pt.style.borderWidth="2px",pt.style.borderStyle="solid",pt.style.borderColor=et===V.currentType?V.uiStyleSettings.toolboxAccentColor:"transparent",pt.addEventListener("click",function(){k.setCurrentType(et,pt)}),W.appendChild(pt),et==="both"||et==="start"){var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.alignItems="center",Ve.style.minHeight="20px",Ve.innerHTML=``,Ve.style.marginLeft="5px",pt.appendChild(Ve)}var _t=document.createElement("div");_t.style.display="flex",_t.style.alignItems="center",_t.style.minHeight="20px",_t.style.flexGrow="2";var jt=document.createElement("hr");if(jt.style.minWidth="20px",jt.style.border="0px",jt.style.borderTop="3px solid "+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee"),jt.style.flexGrow="2",_t.appendChild(jt),pt.appendChild(_t),et==="both"||et==="end"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.innerHTML=``,$t.style.marginRight="5px",pt.appendChild($t)}V.typeBoxes.push(pt)},V=this,_e=0;_e<4;_e++)ee(_e);return W},x.prototype.setCurrentType=function(k,W){var ee=this;this.currentType=k,this.typeBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},x}(ue),be=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.arrowType="end",V.arrowBaseHeight=10,V.arrowBaseWidth=10,V.getArrowPoints=V.getArrowPoints.bind(V),V.setArrowType=V.setArrowType.bind(V),V.arrowTypePanel=new me("Arrow type","end"),V.arrowTypePanel.onArrowTypeChanged=V.setArrowType,V}return Se(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.arrow1&&k!==this.arrow2)},x.prototype.getArrowPoints=function(k,W){var ee=this.arrowBaseWidth+2*this.strokeWidth,V=this.arrowBaseHeight+2*this.strokeWidth;return k-ee/2+","+(W+V/2)+" "+k+","+(W-V/2)+" "+(k+ee/2)+","+(W+V/2)},x.prototype.createTips=function(){this.arrow1=ce.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ce.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow2)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(Y.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ce.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ce.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.arrow1.transform.baseVal.getItem(0);W.setRotate(k,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(W,0);var ee=this.arrow2.transform.baseVal.getItem(0);ee.setRotate(k+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ee,0)}},x.prototype.setArrowType=function(k){this.arrowType=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({arrowType:this.arrowType},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.arrowType=W.arrowType,this.createTips(),this.adjustVisual()},x.typeName="ArrowMarker",x.title="Arrow marker",x.icon='',x}(ot),ae=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.fillColor=ee.defaultFillColor,V.strokeWidth=0,V.fillPanel=new Ee("Color",ee.defaultColorSet,ee.defaultFillColor),V.fillPanel.onColorChanged=V.setFillColor,V}return Se(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="CoverMarker",x.title="Cover marker",x.icon='',x}(Qe),le=function(Y){function x(k,W,ee,V){var _e=Y.call(this,k,V||'')||this;return _e.opacities=[],_e.opacityBoxes=[],_e.opacities=W,_e.currentOpacity=ee,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return Se(x,Y),x.prototype.getUi=function(){var k=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",W.style.justifyContent="space-between",this.opacities.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="center",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=ee===k.currentOpacity?k.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){k.setCurrentOpacity(ee,V)}),W.appendChild(V);var _e=document.createElement("div");_e.innerText=100*ee+"%",V.appendChild(_e),k.opacityBoxes.push(V)}),W},x.prototype.setCurrentOpacity=function(k,W){var ee=this;this.currentOpacity=k,this.opacityBoxes.forEach(function(V){V.style.borderColor=V===W?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},x}(ue),de=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.setOpacity=V.setOpacity.bind(V),V.fillColor=ee.defaultHighlightColor,V.strokeWidth=0,V.opacity=ee.defaultHighlightOpacity,V.fillPanel=new Ee("Color",ee.defaultColorSet,V.fillColor),V.fillPanel.onColorChanged=V.setFillColor,V.opacityPanel=new le("Opacity",ee.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return Se(x,Y),x.prototype.setOpacity=function(k){this.opacity=k,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="HighlightMarker",x.title="Highlight marker",x.icon='',x}(ae),ge='',we=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.bgColor="transparent",V.tipPosition={x:0,y:0},V.tipBase1Position={x:0,y:0},V.tipBase2Position={x:0,y:0},V.tipMoving=!1,V.color=ee.defaultStrokeColor,V.bgColor=ee.defaultFillColor,V.fontFamily=ee.defaultFontFamily,V.defaultSize={x:100,y:30},V.setBgColor=V.setBgColor.bind(V),V.getTipPoints=V.getTipPoints.bind(V),V.positionTip=V.positionTip.bind(V),V.setTipPoints=V.setTipPoints.bind(V),V.colorPanel=new Ee("Text color",ee.defaultColorSet,V.color,''),V.colorPanel.onColorChanged=V.setColor,V.bgColorPanel=new Ee("Fill color",ee.defaultColorSet,V.bgColor,ge),V.bgColorPanel.onColorChanged=V.setBgColor,V.fontFamilyPanel=new Ue("Font",ee.defaultFontFamilies,ee.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V.tipGrip=new Ge,V.tipGrip.visual.transform.baseVal.appendItem(ce.createTransform()),V.controlBox.appendChild(V.tipGrip.visual),V}return Se(x,Y),x.prototype.ownsTarget=function(k){return Y.prototype.ownsTarget.call(this,k)||this.tipGrip.ownsTarget(k)||this.tip===k},x.prototype.createTip=function(){ce.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ce.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},x.prototype.pointerDown=function(k,W){this.state==="new"&&Y.prototype.pointerDown.call(this,k,W),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(W)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Y.prototype.pointerDown.call(this,k,W)},x.prototype.pointerUp=function(k){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Y.prototype.pointerUp.call(this,k);else{var W=this.state==="creating";Y.prototype.pointerUp.call(this,k),this.setTipPoints(W),this.positionTip()}},x.prototype.manipulate=function(k){if(this.tipMoving){var W=this.unrotatePoint(k);this.tipPosition={x:W.x-this.manipulationStartLeft,y:W.y-this.manipulationStartTop},this.positionTip()}else Y.prototype.manipulate.call(this,k)},x.prototype.setBgColor=function(k){this.bgRectangle&&this.tip&&(ce.setAttributes(this.bgRectangle,[["fill",k]]),ce.setAttributes(this.tip,[["fill",k]])),this.bgColor=k,this.fillColorChanged(k)},x.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},x.prototype.setTipPoints=function(k){k===void 0&&(k=!1);var W=Math.min(this.height/2,15),ee=this.height/5;k&&(this.tipPosition={x:W+ee/2,y:this.height+20});var V=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?V',x}(He),Fe=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.fillColor=ee.defaultFillColor,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.setOpacity=V.setOpacity.bind(V),V.createVisual=V.createVisual.bind(V),V.strokePanel=new Ee("Line color",he(ee.defaultColorSet,["transparent"]),ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.fillPanel=new Ee("Fill color",he(ee.defaultColorSet,["transparent"]),V.fillColor,ge),V.fillPanel.onColorChanged=V.setFillColor,V.strokeWidthPanel=new at("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V.opacityPanel=new le("Opacity",ee.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return Se(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual)},x.prototype.createVisual=function(){this.visual=ce.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},x.prototype.manipulate=function(k){Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){Y.prototype.resize.call(this,k),this.setSize()},x.prototype.setSize=function(){Y.prototype.setSize.call(this),ce.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},x.prototype.pointerUp=function(k){Y.prototype.pointerUp.call(this,k),this.setSize()},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},x.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(k),this.stateChanged()},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.setOpacity=function(k){this.opacity=k,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){var W=k;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),Y.prototype.restoreState.call(this,k),this.setSize()},x.prototype.scale=function(k,W){Y.prototype.scale.call(this,k,W),this.setSize()},x.typeName="EllipseMarker",x.title="Ellipse marker",x.icon='',x}(Je),ze=function(Y){function x(k,W,ee){return Y.call(this,k,W,ee)||this}return Se(x,Y),Object.defineProperty(x.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.tip1&&k!==this.tip2)},x.prototype.createTips=function(){this.tip1=ce.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ce.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.tip2)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(Y.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ce.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.tip1.transform.baseVal.getItem(0);W.setRotate(k,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(W,0);var ee=this.tip2.transform.baseVal.getItem(0);ee.setRotate(k+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ee,0)}},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k),this.createTips(),this.adjustVisual()},x.typeName="MeasurementMarker",x.title="Measurement marker",x.icon='',x}(ot),st=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokePanel.colors=ee.defaultColorSet,V.fillColor="transparent",V}return Se(x,Y),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Y.prototype.getState.call(this);return k.typeName=x.typeName,k},x.typeName="EllipseFrameMarker",x.title="Ellipse frame marker",x.icon='',x}(Fe),mt=function(){function Y(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Y.prototype.addUndoStep=function(x){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(x)||(this.undoStack.push(x),JSON.stringify(this.lastRedoStep)!==JSON.stringify(x)&&this.redoStack.splice(0,this.redoStack.length))},Y.prototype.replaceLastUndoStep=function(x){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=x)},Y.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Y.prototype.undo=function(){if(this.undoStack.length>1){var x=this.undoStack.pop();return x!==void 0&&this.redoStack.push(x),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Y.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Y}(),ft=function(Y){function x(k,W,ee){var V=Y.call(this,k,W,ee)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.curveX=0,V.curveY=0,V.manipulationStartCurveX=0,V.manipulationStartCurveY=0,V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.positionGrips=V.positionGrips.bind(V),V.addControlGrips=V.addControlGrips.bind(V),V.adjustVisual=V.adjustVisual.bind(V),V.setupControlBox=V.setupControlBox.bind(V),V.resize=V.resize.bind(V),V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new Ee("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new at("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new qe("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return Se(x,Y),x.prototype.ownsTarget=function(k){return!(!Y.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorCurve&&k!==this.visibleCurve&&!this.curveGrip.ownsTarget(k))},x.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},x.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorCurve=ce.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ce.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(k,W){Y.prototype.pointerDown.call(this,k,W),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=k.x,this.curveY=k.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(W)&&(this.activeGrip=this.curveGrip,this._state="resize")},x.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ce.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setupControlBox=function(){Y.prototype.setupControlBox.call(this),this.curveControlLine1=ce.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ce.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},x.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Y.prototype.addControlGrips.call(this)},x.prototype.positionGrips=function(){Y.prototype.positionGrips.call(this);var k=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-k/2,this.curveY-k/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},x.prototype.manipulate=function(k){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+k.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+k.y-this.manipulationStartY),Y.prototype.manipulate.call(this,k)},x.prototype.resize=function(k){this.activeGrip===this.curveGrip&&(this.curveX=k.x,this.curveY=k.y),Y.prototype.resize.call(this,k),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},x.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},x.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},x.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual()},x.prototype.scale=function(k,W){this.curveX=this.curveX*k,this.curveY=this.curveY*W,Y.prototype.scale.call(this,k,W)},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Y.prototype.getState.call(this));return k.typeName=x.typeName,k},x.prototype.restoreState=function(k){Y.prototype.restoreState.call(this,k);var W=k;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.curveX=W.curveX,this.curveY=W.curveY,this.createVisual(),this.adjustVisual()},x.typeName="CurveMarker",x.title="Curve marker",x.icon='',x}(ut),wt=function(){function Y(x,k){k===void 0&&(k=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=x,this.cancelable=k}return Object.defineProperty(Y.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Y.prototype.preventDefault=function(){this._defaultPrevented=!0},Y}(),St=function(Y){function x(k,W,ee){var V=Y.call(this,k,!1)||this;return V.dataUrl=W,V.state=ee,V}return Se(x,Y),x}(wt),ct=function(Y){function x(k,W,ee){ee===void 0&&(ee=!1);var V=Y.call(this,k,ee)||this;return V.marker=W,V}return Se(x,Y),x}(wt),Ut=function(){function Y(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Y.prototype.addEventListener=function(x,k){this[x].push(k)},Y.prototype.removeEventListener=function(x,k){var W=this[x].indexOf(k);W>-1&&this[x].splice(W,1)},Y}(),Lt=function(){function Y(x){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Be,this._isOpen=!1,this.undoRedoManager=new mt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ut,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Y.instanceCounter++,this.styles=new ke(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=x,this.targetRoot=document.body,this.width=x.clientWidth,this.height=x.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Y.prototype,"ALL_MARKER_TYPES",{get:function(){return[tt,Te,be,He,st,Fe,de,we,ze,ae,ot,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[tt,Te,be,He,Fe,de,we]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"BASIC_MARKER_TYPES",{get:function(){return[tt,Te,be,He,de]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(x){var k=this;this._availableMarkerTypes.splice(0),x.forEach(function(W){if(typeof W=="string"){var ee=k.ALL_MARKER_TYPES.find(function(V){return V.typeName===W});ee!==void 0&&k._availableMarkerTypes.push(ee)}else k._availableMarkerTypes.push(W)})},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(x){this._zoomLevel=x,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Y.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Y.prototype.show=function(){var x=this;this.styles.styleSheetRoot===void 0&&se.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=se.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(k){return k(new wt(x))})},Y.prototype.render=function(){return Ae(this,void 0,void 0,function(){var x;return Oe(this,function(k){switch(k.label){case 0:return this.setCurrentMarker(),(x=new fe).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.markersOnly=this.renderMarkersOnly,x.width=this.renderWidth,x.height=this.renderHeight,[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return k.sent(),[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,k.sent()]}})})},Y.prototype.close=function(x){var k=this;if(x===void 0&&(x=!1),this.isOpen){var W=!1;x||this.eventListeners.beforeclose.forEach(function(ee){var V=new wt(k,!0);ee(V),V.defaultPrevented&&(W=!0)}),W||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ee){return ee(new wt(k))}),this.detachEvents(),this._isOpen=!1)}},Y.prototype.addMarkersToToolbar=function(){for(var x,k=[],W=0;Wthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*x:this.editorCanvas.clientWidth,W=k',x.title="Powered by marker.js",x.style.display="grid",x.style.alignItems="center",x.style.justifyItems="center",x.style.padding="3px",x.style.width="20px",x.style.height="20px",this.logoUI.appendChild(x),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Y.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Y.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Y.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Y.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Pe(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(x),1),x.dispose()},Y.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Y.prototype.toolbarButtonClicked=function(x,k){if(x==="marker"&&k!==void 0)this.createNewMarker(k);else if(x==="action")switch(k){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Y.prototype.deleteSelectedMarker=function(){var x=this;if(this._currentMarker!==void 0){var k=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ee){var V=new ct(x,x._currentMarker,!0);ee(V),V.defaultPrevented&&(k=!0)}),!k){var W=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ee){return ee(new ct(x,W))})}}},Y.prototype.clear=function(){var x=this,k=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var Ke=new ct(x,void 0,!0);_e(Ke),Ke.defaultPrevented&&(k=!0)}),!k)){this.setCurrentMarker();for(var W=function(_e){var Ke=ee.markers[_e];ee.setCurrentMarker(ee.markers[_e]),ee._currentMarker.dispose(),ee.markerImage.removeChild(ee._currentMarker.container),ee.markers.splice(ee.markers.indexOf(ee._currentMarker),1),ee.eventListeners.markerdelete.forEach(function(et){return et(new ct(x,Ke))})},ee=this,V=this.markers.length-1;V>=0;V--)W(V);this.addUndoStep()}},Object.defineProperty(Y.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Y.prototype.showNotesEditor=function(){var x;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(x=this._currentMarker.notes)!==null&&x!==void 0?x:"",this.overlayContainer.appendChild(this.notesArea))},Y.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Y.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Y.prototype.addUndoStep=function(){var x=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var k=this.getState(),W=this.undoRedoManager.getLastUndoStep();if(!W||W.width===k.width&&W.height===k.height){var ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(k),ee1&&this.panTo({x:x.clientX,y:x.clientY}))},Y.prototype.onPointerUp=function(x){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(x.clientX,x.clientY)),this.isDragging=!1,this.addUndoStep()},Y.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Y.prototype.onKeyUp=function(x){this._currentMarker===void 0||this.notesArea!==void 0||x.key!=="Delete"&&x.key!=="Backspace"||this.deleteSelectedMarker()},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.markerImage.getBoundingClientRect();return{x:(x-W.left)/this.zoomLevel,y:(k-W.top)/this.zoomLevel}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Y.prototype.addLicenseKey=function(x){re.addKey(x)},Y.prototype.addEventListener=function(x,k){this.eventListeners.addEventListener(x,k)},Y.prototype.removeEventListener=function(x,k){this.eventListeners.removeEventListener(x,k)},Y.prototype.renderState=function(x){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(x),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Y.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Y.prototype.focus=function(){var x=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(k){return k(new wt(x))}))},Y.prototype.blur=function(){var x=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(k){return k(new wt(x))}))},Y.instanceCounter=0,Y}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var qt=function(Y,x){return(qt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,W){k.__proto__=W}||function(k,W){for(var ee in W)Object.prototype.hasOwnProperty.call(W,ee)&&(k[ee]=W[ee])})(Y,x)};function Qt(Y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function k(){this.constructor=Y}qt(Y,x),Y.prototype=x===null?Object.create(x):(k.prototype=x.prototype,new k)}function It(Y,x,k,W){return new(k||(k=Promise))(function(ee,V){function _e(pt){try{et(W.next(pt))}catch(Ve){V(Ve)}}function Ke(pt){try{et(W.throw(pt))}catch(Ve){V(Ve)}}function et(pt){var Ve;pt.done?ee(pt.value):(Ve=pt.value,Ve instanceof k?Ve:new k(function(_t){_t(Ve)})).then(_e,Ke)}et((W=W.apply(Y,x||[])).next())})}function Cr(Y,x){var k,W,ee,V,_e={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return V={next:Ke(0),throw:Ke(1),return:Ke(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function Ke(et){return function(pt){return function(Ve){if(k)throw new TypeError("Generator is already executing.");for(;_e;)try{if(k=1,W&&(ee=2&Ve[0]?W.return:Ve[0]?W.throw||((ee=W.return)&&ee.call(W),0):W.next)&&!(ee=ee.call(W,Ve[1])).done)return ee;switch(W=0,ee&&(Ve=[2&Ve[0],ee.value]),Ve[0]){case 0:case 1:ee=Ve;break;case 4:return _e.label++,{value:Ve[1],done:!1};case 5:_e.label++,W=Ve[1],Ve=[0];continue;case 7:Ve=_e.ops.pop(),_e.trys.pop();continue;default:if(!(ee=_e.trys,(ee=ee.length>0&&ee[ee.length-1])||Ve[0]!==6&&Ve[0]!==2)){_e=0;continue}if(Ve[0]===3&&(!ee||Ve[1]>ee[0]&&Ve[1]0&&k>0){var W=new Ur(x,k),ee=W.ratio>=1?20:W.getHorizontalLength(20),V=W.ratio<1?20:W.getVerticalLength(20),_e=document.createElementNS("http://www.w3.org/2000/svg","svg");_e.setAttribute("xmlns","http://www.w3.org/2000/svg"),_e.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(_e);var Ke=yt.createDefs();_e.appendChild(Ke);var et=yt.createElement("clipPath",[["id","text-bg-clip"]]);Ke.appendChild(et);var pt=yt.createPath(yt.getHollowRectanglePath((24-ee)/2,(24-V)/2,ee,V,(24-ee)/2+2,(24-V)/2+2,ee-4,V-4));_e.appendChild(pt);var Ve=yt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ve.appendChild(yt.createTSpan(x+":"+k)),_e.appendChild(Ve);var _t=Ve.getBBox();yt.setAttributes(Ve,[["x",((24-_t.width)/2).toString()],["y",((24-_t.height)/2-_t.y).toString()]]);var jt=yt.createPath(yt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(_t.width))/2,(24-Math.ceil(_t.height))/2,Math.ceil(_t.width),Math.ceil(_t.height)));return et.appendChild(jt),yt.setAttributes(pt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(_e),_e.outerHTML}return''},Y}(),Jt=function(Y){function x(k,W,ee){var V=Y.call(this,k,W)||this;return V.isDropdownOpen=!1,V.onClick=V.dropdownButtonClicked,V.dropdownButtons=ee,V}return Qt(x,Y),x.prototype.setupDropdown=function(){var k=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(W){W.className=k.className,W.colorsClassName=k.colorsClassName,k.dropdownBlock.appendChild(W.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},x.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},x.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},x.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},x.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},x.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},x}(Pt),Rt=function(){function Y(x,k){this.GRIP_SIZE=10,this.color=x,this.fillColor=k,this.visual=yt.createGroup(),this.visual.appendChild(yt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(yt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Y.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},Y.prototype.setCenter=function(x,k){this.visual.childNodes.forEach(function(W){return yt.setAttributes(W,[["cx",x.toString()],["cy",k.toString()]])})},Y}(),lr=function(){function Y(x,k,W,ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=x,this.canvasHeight=k,this.margin=W,this.container=ee,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(Y.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(x){this._aspectRatio=x,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.gridContainer&&yt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(x){this._zoomFactor=x,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Y.prototype.open=function(){var x=this;this.cropShadeElement=yt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=yt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var k=0;kthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-k.height/2),yt.setAttributes(this.cropRectElement,[["x",k.x.toString()],["y",k.y.toString()],["width",k.width.toString()],["height",k.height.toString()]]);var W=k.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(V,_e){var Ke=k.y+W*(_e+1);yt.setAttributes(V,[["x1",""+k.x],["y1",""+Ke],["x2",""+(k.x+k.width)],["y2",""+Ke]])});var ee=k.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(V,_e){var Ke=k.x+ee*(_e+1);yt.setAttributes(V,[["x1",""+Ke],["y1",""+k.y],["x2",""+Ke],["y2",""+(k.y+k.height)]])}),yt.setAttributes(this.cropShadeElement,[["d",yt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,k.x,k.y,k.width,k.height)]]),this.topLeftGrip.setCenter(k.x,k.y),this.topRightGrip.setCenter(k.x+k.width,k.y),this.bottomLeftGrip.setCenter(k.x,k.y+k.height),this.bottomRightGrip.setCenter(k.x+k.width,k.y+k.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Y.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.container.getBoundingClientRect();return{x:x-W.left+this.margin,y:k-W.top+this.margin}},Y.prototype.onPointerDown=function(x){this.container.setPointerCapture(x.pointerId),this.previousPoint=this.clientToLocalCoordinates(x.clientX,x.clientY),this.cropRectElement===x.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(x.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(x.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(x.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(x.target)&&(this.activeGrip=this.bottomRightGrip)},Y.prototype.onPointerMove=function(x){if(this.isMoving)this.move(this.clientToLocalCoordinates(x.clientX,x.clientY));else if(this.activeGrip){var k=this.clientToLocalCoordinates(x.clientX,x.clientY);this.resize(k)}x.preventDefault()},Y.prototype.onPointerUp=function(x){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(x.pointerId)},Y.prototype.move=function(x){var k=x.x-this.previousPoint.x,W=x.y-this.previousPoint.y;this.zoomFactor!==1&&(k=-k/this.zoomFactor,W=-W/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+k),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+W),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=x},Y.prototype.resize=function(x){var k=Object.assign({},this.cropRect),W=x.x-this.previousPoint.x,ee=x.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:k.x+Wthis.canvasWidth*this.zoomFactor&&(W=this.canvasWidth*this.zoomFactor-k.width),k.width+=W}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(k.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(W),k.height=this.aspectRatio.getVerticalLength(k.width)):(k.y+=ee,k.height=this.cropRect.y+this.cropRect.height-k.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?k.height=this.aspectRatio.getVerticalLength(k.width):k.height+=ee}k.width<10&&(k.x=this.cropRect.x,k.width=10),k.height<10&&(k.y=this.cropRect.y,k.height=10),this.previousPoint=x,k.x>=this.margin&&k.y>=this.margin&&k.x-this.margin+k.width<=this.canvasWidth&&k.y-this.margin+k.height<=this.canvasHeight&&(this.cropRect=k,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Y.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var x=this.cropRect.x+this.cropRect.width/2,k=this.cropRect.y+this.cropRect.height/2,W=this.aspectRatio.getHorizontalLength(this.cropRect.height),ee=this.aspectRatio.getVerticalLength(this.cropRect.width);W/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=x-this.cropRect.width/2,this.cropRect.y=k-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},Y.prototype.getRescaledRect=function(x,k,W,ee,V,_e){var Ke=W/x,et=ee/k;return{x:(V.x-_e)*Ke+_e,y:(V.y-_e)*et+_e,width:V.width*Ke,height:V.height*et}},Y.prototype.scaleCanvas=function(x,k){var W=this.getRescaledRect(this.canvasWidth,this.canvasHeight,x,k,this.cropRect,this.margin);this.canvasWidth=x,this.canvasHeight=k,this.onCropChange&&this.onCropChange(W),this.setCropRectangle(W)},Y}(),Ir=function(){function Y(x){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=x,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(Y.prototype,"angle",{get:function(){return this._angle},set:function(x){this._angle=x,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Y.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},Y.prototype.onPointerDown=function(x){this.controlContainer.setPointerCapture(x.pointerId),this.isDragging=!0,this.previousPoint={x:x.clientX,y:x.clientY}},Y.prototype.onPointerMove=function(x){this.isDragging&&(this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.previousPoint.x=x.clientX)},Y.prototype.onPointerUp=function(x){this.isDragging&&this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(x.pointerId)},Y.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var x=this.angleLabelText.getBBox();yt.setAttributes(this.angleLabelElement,[["x",((this.width-x.width)/2).toString()],["y",(this.height/2).toString()]])}},Y.prototype.positionScaleShape=function(){if(this.scaleShape){var x=this.scaleShape.transform.baseVal.getItem(0);x.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(x,0)}},Y.prototype.getVisual=function(){var x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("xmlns","http://www.w3.org/2000/svg"),x.setAttribute("width",this.width+"px"),x.setAttribute("height",this.height+"px"),x.setAttribute("viewBox","0 0 "+this.width+" "+this.height),x.style.flexShrink="0",document.body.appendChild(x);for(var k="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,W=1;W<=this.width/5+10;W++){var ee=W%5==0?this.height/3:this.height/6;k+="h4v"+-ee+"h1v"+ee}k+="v1H0Z",this.scaleShape=yt.createPath(k);var V=yt.createTransform();this.scaleShape.transform.baseVal.appendItem(V),x.appendChild(this.scaleShape),this.angleLabelElement=yt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=yt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var _e=yt.createTSpan("");return _e.innerHTML="°",this.angleLabelElement.appendChild(_e),x.appendChild(this.angleLabelElement),document.body.removeChild(x),x},Y}(),Xr=function(){function Y(){this.naturalSize=!1,this.imageType="image/png"}return Y.prototype.rasterize=function(x,k,W,ee,V,_e,Ke){var et=this;return new Promise(function(pt){var Ve=document.createElement("canvas");Ve.width=x.width.baseVal.value-2*ee,Ve.height=x.height.baseVal.value-2*ee;var _t=1,jt=1;et.naturalSize===!0?(_t=k.naturalWidth/(x.width.baseVal.value-2*ee)/_e,jt=k.naturalHeight/(x.height.baseVal.value-2*ee)/Ke,Ve.width=k.naturalWidth/_e,Ve.height=k.naturalHeight/Ke):et.width!==void 0&&et.height!==void 0&&(_t=et.width/W.width,jt=et.height/W.height,Ve.width*=_t,Ve.height*=jt);var $t=Ve.getContext("2d");$t.translate(Ve.width/2,Ve.height/2),$t.rotate(V*Math.PI/180),$t.scale(_e,Ke),$t.translate(-Ve.width/2,-Ve.height/2),$t.drawImage(k,0,0,Ve.width,Ve.height);var jr=document.createElement("canvas");jr.width=W.width*_t,jr.height=W.height*jt,jr.getContext("2d").putImageData($t.getImageData((W.x-ee)*_t,(W.y-ee)*jt,W.width*_t,W.height*jt),0,0),pt(jr.toDataURL(et.imageType,et.imageQuality))})},Y}(),$e=function(){function Y(x){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=Y.instanceCounter++,this.styles=new Lr(this.instanceNo),this.target=x,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(x){this._zoomToCropEnabled=x,x?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"gridLines",{get:function(){return this._gridLines},set:function(x){this._gridLines=x,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(x){this._rotationAngle=x,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"aspectRatio",{get:function(){var x;return(x=this._aspectRatio)!==null&&x!==void 0?x:this.aspectRatios[0]},set:function(x){this._aspectRatio=x},enumerable:!1,configurable:!0}),Y.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},Y.prototype.show=function(){this.showUI(),this.open()},Y.prototype.close=function(x){x===void 0&&(x=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),x||this.closeEventListeners.forEach(function(k){return k()}),this._isOpen=!1)},Y.prototype.addRenderEventListener=function(x){this.renderEventListeners.push(x)},Y.prototype.removeRenderEventListener=function(x){this.renderEventListeners.indexOf(x)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(x),1)},Y.prototype.addCloseEventListener=function(x){this.closeEventListeners.push(x)},Y.prototype.removeCloseEventListener=function(x){this.closeEventListeners.indexOf(x)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(x),1)},Y.prototype.setupResizeObserver=function(){var x=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){x.resize(x.target.clientWidth,x.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},Y.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var x=1*this.target.clientWidth/this.target.clientHeight,k=this.contentDiv.clientWidth/x>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*x:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,W=k+2*this.CANVAS_MARGINx+this.CANVAS_MARGIN?this.target.offsetTop-(x+this.CANVAS_MARGIN):0;this.coverDiv.style.top=k+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},Y.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Y.prototype.addTopToolbar=function(){var x=this;this.topToolbar=new Ft,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new cr;k.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(k);var W=[];this.aspectRatios.forEach(function(jt){var $t=new Pt(Vt.getIcon(jt.horizontal,jt.vertical),jt.horizontal===0&&jt.vertical===0?"FREE":jt.horizontal+":"+jt.vertical);$t.onClick=function(){return x.ratioButtonClicked(jt)},W.push($t)}),this.aspectRatioButton=new Jt(Vt.getIcon(0,0),"Aspect ratio",W),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,k.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ee=new Pt('',"Toggle grid");ee.isActive=this.isGridVisible,ee.onClick=function(){x.isGridVisible=!x.isGridVisible,ee.isActive=x.isGridVisible},k.addButton(ee);var V=new Pt('',"Zoom to selection");if(V.isActive=this.zoomToCropEnabled,V.onClick=function(){x.zoomToCropEnabled=!x.zoomToCropEnabled,V.isActive=x.zoomToCropEnabled},k.addButton(V),!Kr.isLicensed){var _e=new dt;this.topToolbar.addElementBlock(_e);var Ke=document.createElement("div");Ke.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var et=document.createElement("a");et.style.color="currentColor",et.href="https://markerjs.com/products/cropro",et.target="_blank",et.innerHTML='',Ke.appendChild(et),_e.addElement(Ke)}var pt=new cr;pt.minWidth=3*this.toolbarHeight+"px",pt.contentAlign="end",this.topToolbar.addButtonBlock(pt);var Ve=new Pt('',"OK");Ve.onClick=this.startRenderAndClose,pt.addButton(Ve),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ve.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var _t=new Pt('',"Close");_t.onClick=this.close,pt.addButton(_t),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(_t.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Y.prototype.addBottomToolbar=function(){var x=this;this.bottomToolbar=new Ft,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new cr;k.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(k);var W=new Pt('',"Rotate left");W.onClick=this.rotateLeftButtonClicked,k.addButton(W);var ee=new Pt('',"Rotate right");ee.onClick=this.rotateRightButtonClicked,k.addButton(ee);var V=new dt;V.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(V),this.straightener=new Ir("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(pt){x.rotateBy(pt),x.straightener.angle=x.rotationAngle},V.addElement(this.straightener.getUI());var _e=new cr;_e.minWidth=2*this.toolbarHeight+"px",_e.contentAlign="end",this.bottomToolbar.addButtonBlock(_e);var Ke=new Pt('',"Flip horizontal");Ke.onClick=this.flipHorizontallyButtonClicked,_e.addButton(Ke);var et=new Pt('',"Flip vertical");et.onClick=this.flipVerticallyButtonClicked,_e.addButton(et)},Y.prototype.ratioButtonClicked=function(x){this.aspectRatio=x,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Y.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Vt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Y.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ur(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Y.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Y.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Y.prototype.restoreState=function(x){if(x){var k=this.cropLayer.getRescaledRect(x.width,x.height,this.imageWidth,this.imageHeight,x.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(k),this.cropRectChanged(k),this.flippedHorizontally=x.flippedHorizontally,this.flippedVertically=x.flippedVertically,this.applyFlip(),this.rotationAngle=x.rotationAngle,this.applyRotation()}},Y.prototype.clientToLocalCoordinates=function(x,k){var W=this.cropImage.getBoundingClientRect();return{x:x-W.left,y:k-W.top}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var x=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},Y.prototype.rotateLeftButtonClicked=function(){var x=this.rotationAngle-90;this.rotationAngle%90!=0&&(x+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(x)},Y.prototype.rotateRightButtonClicked=function(){var x=this.rotationAngle+90;this.rotationAngle%90!=0&&(x-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(x)},Y.prototype.rotateTo=function(x){x=(x=x>180?x-360:x)<=-180?x+360:x,this.rotationAngle=x,this.applyRotation()},Y.prototype.rotateBy=function(x){this.rotateTo((this.rotationAngle+x)%360)},Y.prototype.applyRotation=function(){var x=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var k=this.editingTargetRotationContainer.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(k,0);var W=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/W.width,this.imageHeight/W.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=x},Y.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Y.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Y.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Y.prototype.startRenderAndClose=function(){return It(this,void 0,void 0,function(){var x,k;return Cr(this,function(W){switch(W.label){case 0:return[4,this.render()];case 1:return x=W.sent(),k=this.getState(),this.renderEventListeners.forEach(function(ee){return ee(x,k)}),this.close(!0),[2]}})})},Y.prototype.render=function(){return It(this,void 0,void 0,function(){var x;return Cr(this,function(k){switch(k.label){case 0:return(x=new Xr).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.width=this.renderWidth,x.height=this.renderHeight,this.unzoomFromCrop(),yt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,x.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return k.sent(),[4,x.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,k.sent()]}})})},Y.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new xt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new xt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new xt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var x=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new xt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*x)+`px;
height: `+(this.toolbarHeight-2*x)+`px;
padding: `+x+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new xt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new xt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new bt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new bt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new xt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new xt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new xt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new xt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*x)+`px;
padding: `+x+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new xt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},Y.instanceCounter=0,Y}(),Ct=Z("8hTe"),pi=Z.n(Ct),mi=/]*>/g;function gi(Y){var x=document.createElement("div");return x.innerHTML=Y,x.childNodes.length===0?"":x.childNodes[0].nodeValue}var vi=xe.a=function(Y){var x=Y.value,k=x===void 0?"":x,W=Y.edit,ee=W===void 0?!1:W,V=Y.className,_e=Y.showTextOnly,Ke=Y.showLines,et=Y.replaces,pt=Y.zoomImg,Ve=Y.hasMask,_t=Y.style,jt=_t===void 0?{}:_t,$t=Y.stylesPrev,jr=$t===void 0?{}:$t,Er=String(k),xr=Object(L.useRef)(),Qr=Object(L.useRef)(),Ii=Object(L.useState)(""),dr=Object(K.a)(Ii,2),zr=dr[0],li=dr[1],ui=Object(L.useState)("office"),Hr=Object(K.a)(ui,2),Di=Hr[0],yi=Hr[1],Ki=function(){var Ht=new $e(Qr.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var yr=Object(B.a)(r.a.mark(function kt(ar){var Kt;return r.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return xr.current.style.display="none",fr.next=3,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ar}});case 3:Kt=fr.sent,Kt!=null&&Kt.id&&et(Qr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return fr.stop()}},kt)}));return function(kt){return yr.apply(this,arguments)}}()),Ht.show()},zi=function(){var Ht=new Lt(Qr.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var yr=Object(B.a)(r.a.mark(function kt(ar){var Kt;return r.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:if(xr.current.style.display="none",!Qr.current){fr.next=6;break}return fr.next=4,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ar.dataUrl}});case 4:Kt=fr.sent,Kt!=null&&Kt.id&&et(Qr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return fr.stop()}},kt)}));return function(kt){return yr.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},Zr=Object(L.useMemo)(function(){xr.current&&(xr.current.style.zIndex=-1);try{var ir=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,yr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Er=Er.replace(ir,"("+$.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+$.a.API_SERVER+"/api/attachments/").replace(yr,'"'+$.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(ii){}var kt=N(Er),ar=w();if(Er.match(/\[TOC\]/)&&(kt=kt.replace("[TOC]
",D()),R()),kt=kt.replace(/(__special_katext_id_\d+__)/g,function(ii,fr){var Ar=ar[fr],Vi=Ar.type,Ei=Ar.expression;return Object(ie.renderToString)(gi(Ei)||"",{displayMode:Vi==="block",throwOnError:!1,output:"html"})}),kt=kt.replace(/▁/g,"\u2581\u2581\u2581"),y(),_e){var Kt=document.createElement("div");return Kt.innerHTML=kt,Kt.innerText}return setTimeout(function(){return cn()},500),kt},[Er]),$r=Object(L.useRef)();_.WebkitLineClamp=Ke,Ke&&(jt=Object(j.a)(Object(j.a)({},jt),_));function bi(ir){var Ht=ir.target;if(Ht.tagName.toUpperCase()==="IMG"){if(pt){var yr=Ht.getAttribute("src");li(yr),yi("image")}}else if(Ht.tagName.toUpperCase()==="A"){var kt=Ht.getAttribute("href");if(kt.indexOf("office")>-1)ir.preventDefault(),li(kt),yi("office");else if(kt.indexOf("application/pdf")>-1)ir.preventDefault(),li(kt),yi("pdf");else if(kt.indexOf("text/html")>-1)ir.preventDefault(),li(kt),yi("html");else if(kt.startsWith("#")){ir.preventDefault();var ar=document.getElementById(kt.replace("#",""));ar&&ar.scrollIntoView(!0)}}}var cn=function(){var Ht,yr=(Ht=$r.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");yr==null||yr.forEach(function(kt){if(kt.oncontextmenu=function(){return!1},kt.src.indexOf(".m3u8")>-1&&!kt.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var ar=new H.a;ar.loadSource(kt.src),ar.attachMedia(kt)}}})};Object(L.useEffect)(function(){if($r.current&&Zr&&(Zr.match(mi)&&window.PR.prettyPrint()),$r.current)return $r.current.addEventListener("click",bi),function(){$r.current.removeEventListener("click",bi),y(),R()}},[Zr,$r.current,bi]);var _i=function(Ht){if(!ee)return;Ht.target.nodeName==="IMG"?(xr.current.style.zIndex=1,xr.current.style.display="flex",xr.current.style.width=Ht.target.clientWidth+"px",xr.current.style.height=Ht.target.clientHeight+"px",xr.current.style.top=Ht.target.offsetTop+"px",xr.current.style.left=Ht.target.offsetLeft+"px",Qr.current.src=Ht.target.getAttribute("src")):xr.current.style.display="none"};return v.a.createElement("div",{style:{position:"relative"}},v.a.createElement("div",{ref:$r,style:Object(j.a)({},jt),className:"".concat(V||""," markdown-body ").concat(pi.a.mdBody),onMouseOver:_i,dangerouslySetInnerHTML:{__html:Zr}}),v.a.createElement("div",{ref:xr,className:pi.a.button},v.a.createElement(J.a,null,v.a.createElement(X.a,{onClick:function(){return Ki()}},"\u88C1\u526A"),v.a.createElement(X.a,{onClick:function(){return zi()}},"\u7F16\u8F91"))),v.a.createElement("img",{ref:Qr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),v.a.createElement(oe.a,{close:!0,data:zr,type:zr!=null&&zr.length?Di:"",style:Object(j.a)({},jr),onClose:function(){return li("")}}))}},"9VGf":function(nt,xe,Z){"use strict";Z.d(xe,"a",function(){return P});var ne=Z("q1tI"),J=Z.n(ne);function P(X,j){var B=Object(ne.useRef)();Object(ne.useEffect)(function(){B.current=X}),Object(ne.useEffect)(function(){function K(){B.current()}if(j!==null){var G=setInterval(K,j);return function(){return clearInterval(G)}}},[j])}},BU3w:function(nt,xe,Z){"use strict";Z.d(xe,"a",function(){return B});var ne=Z("MNnm"),J="rc-util-key";function P(K){if(K.attachTo)return K.attachTo;var G=document.querySelector("head");return G||document.body}function X(K){var G,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ne.a)())return null;var L=document.createElement("style");if((G=r.csp)===null||G===void 0?void 0:G.nonce){var v;L.nonce=(v=r.csp)===null||v===void 0?void 0:v.nonce}L.innerHTML=K;var m=P(r),p=m.firstChild;return r.prepend&&m.prepend?m.prepend(L):r.prepend&&p?m.insertBefore(L,p):m.appendChild(L),L}var j=new Map;function B(K,G){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},L=P(r);if(!j.has(L)){var v=X("",r),m=v.parentNode;j.set(L,m),m.removeChild(v)}var p=Array.from(j.get(L).children).find(function(u){return u.tagName==="STYLE"&&u[J]===G});if(p){var h,l;if(((h=r.csp)===null||h===void 0?void 0:h.nonce)&&p.nonce!==((l=r.csp)===null||l===void 0?void 0:l.nonce)){var f;p.nonce=(f=r.csp)===null||f===void 0?void 0:f.nonce}return p.innerHTML!==K&&(p.innerHTML=K),p}var o=X(K,r);return o[J]=G,o}},Bd2K:function(nt,xe,Z){(function(ne){ne(Z("VrN/"),Z("osHv"))})(function(ne){ne.defineOption("autoCloseTags",!1,function(r,L,v){if(v!=ne.Init&&v&&r.removeKeyMap("autoCloseTags"),!L)return;var m={name:"autoCloseTags"};(typeof L!="object"||L.whenClosing!==!1)&&(m["'/'"]=function(p){return B(p)}),(typeof L!="object"||L.whenOpening!==!1)&&(m["'>'"]=function(p){return X(p)}),r.addKeyMap(m)});var J=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],P=["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 X(r){if(r.getOption("disableInput"))return ne.Pass;for(var L=r.listSelections(),v=[],m=r.getOption("autoCloseTags"),p=0;ph.ch&&(a=a.slice(0,a.length-l.end+h.ch));var C=a.toLowerCase();if(!a||l.type=="string"&&(l.end!=h.ch||!/[\"\']/.test(l.string.charAt(l.string.length-1))||l.string.length==1)||l.type=="tag"&&u.close||l.string.indexOf("/")==h.ch-l.start-1||R&&K(R,C)>-1||G(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(o)||[],a,h,!0))return ne.Pass;var D=typeof m=="object"&&m.emptyTags;if(D&&K(D,a)>-1){v[p]={text:"/>",newPos:ne.Pos(h.line,h.ch+2)};continue}var O=_&&K(_,C)>-1;v[p]={indent:O,text:">"+(O?`
`:"")+""+a+">",newPos:O?ne.Pos(h.line+1,0):ne.Pos(h.line,h.ch+1)}}for(var A=typeof m=="object"&&m.dontIndentOnAutoClose,p=L.length-1;p>=0;p--){var S=v[p];r.replaceRange(S.text,L[p].head,L[p].anchor,"+insert");var T=r.listSelections().slice(0);T[p]={head:S.newPos,anchor:S.newPos},r.setSelections(T),!A&&S.indent&&(r.indentLine(S.newPos.line,null,!0),r.indentLine(S.newPos.line+1,null,!0))}}function j(r,L){for(var v=r.listSelections(),m=[],p=L?"/":"",h=r.getOption("autoCloseTags"),l=typeof h=="object"&&h.dontIndentOnSlash,f=0;f"&&(R+=">"),m[f]=R}if(r.replaceSelections(m),v=r.listSelections(),!l)for(var f=0;f=0&&L[o]==v;o--)++f;m=l.to;for(var o=1;o0){for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:"",L=[],v=0;vB,ne.serviceIds.set(B,K),K}function j(B){return function(K,G,r){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");P(B,K,r,!0)}}},DlQD:function(nt,xe,Z){(function(ne,J){nt.exports=J()})(this,function(){"use strict";function ne(Te,me){for(var be=0;beTe.length)&&(me=Te.length);for(var be=0,ae=new Array(me);be=Te.length?{done:!0}:{done:!1,value:Te[ae++]}}}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 be=Te[Symbol.iterator](),be.next.bind(be)}function B(Te,me){return me={exports:{}},Te(me,me.exports),me.exports}var K=B(function(Te){function me(){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 be(ae){Te.exports.defaults=ae}Te.exports={defaults:me(),getDefaults:me,changeDefaults:be}}),G=K.defaults,r=K.getDefaults,L=K.changeDefaults,v=/[&<>"']/,m=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(me){return l[me]};function o(Te,me){if(me){if(v.test(Te))return Te.replace(m,f)}else if(p.test(Te))return Te.replace(h,f);return Te}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Te){return Te.replace(u,function(me,be){return be=be.toLowerCase(),be==="colon"?":":be.charAt(0)==="#"?be.charAt(1)==="x"?String.fromCharCode(parseInt(be.substring(2),16)):String.fromCharCode(+be.substring(1)):""})}var s=/(^|[^\[])\^/g;function R(Te,me){Te=Te.source||Te,me=me||"";var be={replace:function(le,de){return de=de.source||de,de=de.replace(s,"$1"),Te=Te.replace(le,de),be},getRegex:function(){return new RegExp(Te,me)}};return be}var _=/[^\w:]/g,C=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(Te,me,be){if(Te){var ae;try{ae=decodeURIComponent(a(be)).replace(_,"").toLowerCase()}catch(le){return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}me&&!C.test(be)&&(be=c(me,be));try{be=encodeURI(be).replace(/%25/g,"%")}catch(le){return null}return be}var O={},A=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,T=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(Te,me){O[" "+Te]||(A.test(Te)?O[" "+Te]=Te+"/":O[" "+Te]=U(Te,"/",!0)),Te=O[" "+Te];var be=Te.indexOf(":")===-1;return me.substring(0,2)==="//"?be?me:Te.replace(S,"$1")+me:me.charAt(0)==="/"?be?me:Te.replace(T,"$1")+me:Te+me}var w={exec:function(){}};function y(Te){for(var me=1,be,ae;me=0&&we[ze]==="\\";)Fe=!Fe;return Fe?"|":" |"}),ae=be.split(/ \|/),le=0;if(ae.length>me)ae.splice(me);else for(;ae.length=ae.length?le.slice(ae.length):le}).join(`
`)}var ve=function(){function Te(be){this.options=be||I}var me=Te.prototype;return me.space=function(ae){var le=this.rules.block.newline.exec(ae);if(le)return le[0].length>1?{type:"space",raw:le[0]}:{raw:`
`}},me.code=function(ae,le){var de=this.rules.block.code.exec(ae);if(de){var ge=le[le.length-1];if(ge&&ge.type==="paragraph")return{raw:de[0],text:de[0].trimRight()};var we=de[0].replace(/^ {4}/gm,"");return{type:"code",raw:de[0],codeBlockStyle:"indented",text:this.options.pedantic?we:g(we,`
`)}}},me.fences=function(ae){var le=this.rules.block.fences.exec(ae);if(le){var de=le[0],ge=Ce(de,le[3]||"");return{type:"code",raw:de,lang:le[2]?le[2].trim():le[2],text:ge}}},me.heading=function(ae){var le=this.rules.block.heading.exec(ae);if(le)return{type:"heading",raw:le[0],depth:le[1].length,text:le[2]}},me.nptable=function(ae){var le=this.rules.block.nptable.exec(ae);if(le){var de={type:"table",header:H(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
`):[],raw:le[0]};if(de.header.length===de.align.length){var ge=de.align.length,we;for(we=0;we ?/gm,"");return{type:"blockquote",raw:le[0],text:de}}},me.list=function(ae){var le=this.rules.block.list.exec(ae);if(le){for(var de=le[0],ge=le[2],we=ge.length>1,Fe=ge[ge.length-1]===")",ze={type:"list",raw:de,ordered:we,start:we?+ge.slice(0,-1):"",loose:!1,items:[]},st=le[0].match(this.rules.block.item),mt=!1,ft,wt,St,ct,Ut,Lt,qt,Qt=st.length,It=0;It1||this.options.smartLists&&St!==ge)&&(ct=st.slice(It+1).join(`
`),ze.raw=ze.raw.substring(0,ze.raw.length-ct.length),It=Qt-1)),Ut=mt||/\n\n(?!\s*$)/.test(ft),It!==Qt-1&&(mt=ft.charAt(ft.length-1)===`
`,Ut||(Ut=mt)),Ut&&(ze.loose=!0),Lt=/^\[[ xX]\] /.test(ft),qt=void 0,Lt&&(qt=ft[1]!==" ",ft=ft.replace(/^\[[ xX]\] +/,"")),ze.items.push({type:"list_item",raw:de,task:Lt,checked:qt,loose:Ut,text:ft});return ze}},me.html=function(ae){var le=this.rules.block.html.exec(ae);if(le)return{type:this.options.sanitize?"paragraph":"html",raw:le[0],pre:!this.options.sanitizer&&(le[1]==="pre"||le[1]==="script"||le[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(le[0]):$(le[0]):le[0]}},me.def=function(ae){var le=this.rules.block.def.exec(ae);if(le){le[3]&&(le[3]=le[3].substring(1,le[3].length-1));var de=le[1].toLowerCase().replace(/\s+/g," ");return{tag:de,raw:le[0],href:le[2],title:le[3]}}},me.table=function(ae){var le=this.rules.block.table.exec(ae);if(le){var de={type:"table",header:H(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
`):[]};if(de.header.length===de.align.length){de.raw=le[0];var ge=de.align.length,we;for(we=0;we/i.test(ge[0])&&(le=!1),!de&&/^<(pre|code|kbd|script)(\s|>)/i.test(ge[0])?de=!0:de&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ge[0])&&(de=!1),{type:this.options.sanitize?"text":"html",raw:ge[0],inLink:le,inRawBlock:de,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ge[0]):$(ge[0]):ge[0]}},me.link=function(ae){var le=this.rules.inline.link.exec(ae);if(le){var de=ie(le[2],"()");if(de>-1){var ge=le[0].indexOf("!")===0?5:4,we=ge+le[1].length+de;le[2]=le[2].substring(0,de),le[0]=le[0].substring(0,we).trim(),le[3]=""}var Fe=le[2],ze="";if(this.options.pedantic){var st=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Fe);st?(Fe=st[1],ze=st[3]):ze=""}else ze=le[3]?le[3].slice(1,-1):"";Fe=Fe.trim().replace(/^<([\s\S]*)>$/,"$1");var mt=oe(le,{href:Fe&&Fe.replace(this.rules.inline._escapes,"$1"),title:ze&&ze.replace(this.rules.inline._escapes,"$1")},le[0]);return mt}},me.reflink=function(ae,le){var de;if((de=this.rules.inline.reflink.exec(ae))||(de=this.rules.inline.nolink.exec(ae))){var ge=(de[2]||de[1]).replace(/\s+/g," ");if(ge=le[ge.toLowerCase()],!ge||!ge.href){var we=de[0].charAt(0);return{type:"text",raw:we,text:we}}var Fe=oe(de,ge,de[0]);return Fe}},me.strong=function(ae,le,de){de===void 0&&(de="");var ge=this.rules.inline.strong.start.exec(ae);if(ge&&(!ge[1]||ge[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){le=le.slice(-1*ae.length);var we=ge[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;we.lastIndex=0;for(var Fe;(ge=we.exec(le))!=null;)if(Fe=this.rules.inline.strong.middle.exec(le.slice(0,ge.index+3)),Fe)return{type:"strong",raw:ae.slice(0,Fe[0].length),text:ae.slice(2,Fe[0].length-2)}}},me.em=function(ae,le,de){de===void 0&&(de="");var ge=this.rules.inline.em.start.exec(ae);if(ge&&(!ge[1]||ge[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){le=le.slice(-1*ae.length);var we=ge[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;we.lastIndex=0;for(var Fe;(ge=we.exec(le))!=null;)if(Fe=this.rules.inline.em.middle.exec(le.slice(0,ge.index+2)),Fe)return{type:"em",raw:ae.slice(0,Fe[0].length),text:ae.slice(1,Fe[0].length-1)}}},me.codespan=function(ae){var le=this.rules.inline.code.exec(ae);if(le){var de=le[2].replace(/\n/g," "),ge=/[^ ]/.test(de),we=de.startsWith(" ")&&de.endsWith(" ");return ge&&we&&(de=de.substring(1,de.length-1)),de=$(de,!0),{type:"codespan",raw:le[0],text:de}}},me.br=function(ae){var le=this.rules.inline.br.exec(ae);if(le)return{type:"br",raw:le[0]}},me.del=function(ae){var le=this.rules.inline.del.exec(ae);if(le)return{type:"del",raw:le[0],text:le[1]}},me.autolink=function(ae,le){var de=this.rules.inline.autolink.exec(ae);if(de){var ge,we;return de[2]==="@"?(ge=$(this.options.mangle?le(de[1]):de[1]),we="mailto:"+ge):(ge=$(de[1]),we=ge),{type:"link",raw:de[0],text:ge,href:we,tokens:[{type:"text",raw:ge,text:ge}]}}},me.url=function(ae,le){var de;if(de=this.rules.inline.url.exec(ae)){var ge,we;if(de[2]==="@")ge=$(this.options.mangle?le(de[0]):de[0]),we="mailto:"+ge;else{var Fe;do Fe=de[0],de[0]=this.rules.inline._backpedal.exec(de[0])[0];while(Fe!==de[0]);ge=$(de[0]),de[1]==="www."?we="http://"+ge:we=ge}return{type:"link",raw:de[0],text:ge,href:we,tokens:[{type:"text",raw:ge,text:ge}]}}},me.inlineText=function(ae,le,de){var ge=this.rules.inline.text.exec(ae);if(ge){var we;return le?we=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ge[0]):$(ge[0]):ge[0]:we=$(this.options.smartypants?de(ge[0]):ge[0]),{type:"text",raw:ge[0],text:we}}},Te}(),Se=N.noopTest,Ae=N.edit,Oe=N.merge,he={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]+/};he._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,he._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,he.def=Ae(he.def).replace("label",he._label).replace("title",he._title).getRegex(),he.bullet=/(?:[*+-]|\d{1,9}[.)])/,he.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,he.item=Ae(he.item,"gm").replace(/bull/g,he.bullet).getRegex(),he.list=Ae(he.list).replace(/bull/g,he.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+he.def.source+")").getRegex(),he._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",he._comment=//,he.html=Ae(he.html,"i").replace("comment",he._comment).replace("tag",he._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he.paragraph=Ae(he._paragraph).replace("hr",he.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",he._tag).getRegex(),he.blockquote=Ae(he.blockquote).replace("paragraph",he.paragraph).getRegex(),he.normal=Oe({},he),he.gfm=Oe({},he.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*|$)"}),he.gfm.nptable=Ae(he.gfm.nptable).replace("hr",he.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",he._tag).getRegex(),he.gfm.table=Ae(he.gfm.table).replace("hr",he.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",he._tag).getRegex(),he.pedantic=Oe({},he.normal,{html:Ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he._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:Ae(he.normal._paragraph).replace("hr",he.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",he.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ce={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]*?(?:(?=[\\?@\\[\\]`^{|}~",ce.punctuation=Ae(ce.punctuation).replace(/punctuation/g,ce._punctuation).getRegex(),ce._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ce._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ce.em.start=Ae(ce.em.start).replace(/punctuation/g,ce._punctuation).getRegex(),ce.em.middle=Ae(ce.em.middle).replace(/punctuation/g,ce._punctuation).replace(/overlapSkip/g,ce._overlapSkip).getRegex(),ce.em.endAst=Ae(ce.em.endAst,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.em.endUnd=Ae(ce.em.endUnd,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.start=Ae(ce.strong.start).replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.middle=Ae(ce.strong.middle).replace(/punctuation/g,ce._punctuation).replace(/blockSkip/g,ce._blockSkip).getRegex(),ce.strong.endAst=Ae(ce.strong.endAst,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.endUnd=Ae(ce.strong.endUnd,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.blockSkip=Ae(ce._blockSkip,"g").getRegex(),ce.overlapSkip=Ae(ce._overlapSkip,"g").getRegex(),ce._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ce._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])?)+(?![-_])/,ce.autolink=Ae(ce.autolink).replace("scheme",ce._scheme).replace("email",ce._email).getRegex(),ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ce.tag=Ae(ce.tag).replace("comment",he._comment).replace("attribute",ce._attribute).getRegex(),ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ce._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ce.link=Ae(ce.link).replace("label",ce._label).replace("href",ce._href).replace("title",ce._title).getRegex(),ce.reflink=Ae(ce.reflink).replace("label",ce._label).getRegex(),ce.reflinkSearch=Ae(ce.reflinkSearch,"g").replace("reflink",ce.reflink).replace("nolink",ce.nolink).getRegex(),ce.normal=Oe({},ce),ce.pedantic=Oe({},ce.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:Ae(/^!?\[(label)\]\((.*?)\)/).replace("label",ce._label).getRegex(),reflink:Ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ce._label).getRegex()}),ce.gfm=Oe({},ce.normal,{escape:Ae(ce.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&&(ae="x"+ae.toString(16)),me+=""+ae+";";return me}var Pe=function(){function Te(be){this.tokens=[],this.tokens.links=Object.create(null),this.options=be||fe,this.options.tokenizer=this.options.tokenizer||new ve,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ae={block:se.normal,inline:ke.normal};this.options.pedantic?(ae.block=se.pedantic,ae.inline=ke.pedantic):this.options.gfm&&(ae.block=se.gfm,this.options.breaks?ae.inline=ke.breaks:ae.inline=ke.gfm),this.tokenizer.rules=ae}Te.lex=function(ae,le){var de=new Te(le);return de.lex(ae)};var me=Te.prototype;return me.lex=function(ae){return ae=ae.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ae,this.tokens,!0),this.inline(this.tokens),this.tokens},me.blockTokens=function(ae,le,de){le===void 0&&(le=[]),de===void 0&&(de=!0),ae=ae.replace(/^ +$/gm,"");for(var ge,we,Fe,ze;ae;){if(ge=this.tokenizer.space(ae)){ae=ae.substring(ge.raw.length),ge.type&&le.push(ge);continue}if(ge=this.tokenizer.code(ae,le)){ae=ae.substring(ge.raw.length),ge.type?le.push(ge):(ze=le[le.length-1],ze.raw+=`
`+ge.raw,ze.text+=`
`+ge.text);continue}if(ge=this.tokenizer.fences(ae)){ae=ae.substring(ge.raw.length),le.push(ge);continue}if(ge=this.tokenizer.heading(ae)){ae=ae.substring(ge.raw.length),le.push(ge);continue}if(ge=this.tokenizer.nptable(ae)){ae=ae.substring(ge.raw.length),le.push(ge);continue}if(ge=this.tokenizer.hr(ae)){ae=ae.substring(ge.raw.length),le.push(ge);continue}if(ge=this.tokenizer.blockquote(ae)){ae=ae.substring(ge.raw.length),ge.tokens=this.blockTokens(ge.text,[],de),le.push(ge);continue}if(ge=this.tokenizer.list(ae)){for(ae=ae.substring(ge.raw.length),Fe=ge.items.length,we=0;we0)for(;(st=this.tokenizer.rules.inline.reflinkSearch.exec(ze))!=null;)mt.includes(st[0].slice(st[0].lastIndexOf("[")+1,-1))&&(ze=ze.slice(0,st.index)+"["+"a".repeat(st[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(st=this.tokenizer.rules.inline.blockSkip.exec(ze))!=null;)ze=ze.slice(0,st.index)+"["+"a".repeat(st[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ae;){if(Fe=this.tokenizer.escape(ae)){ae=ae.substring(Fe.raw.length),le.push(Fe);continue}if(Fe=this.tokenizer.tag(ae,de,ge)){ae=ae.substring(Fe.raw.length),de=Fe.inLink,ge=Fe.inRawBlock,le.push(Fe);continue}if(Fe=this.tokenizer.link(ae)){ae=ae.substring(Fe.raw.length),Fe.type==="link"&&(Fe.tokens=this.inlineTokens(Fe.text,[],!0,ge)),le.push(Fe);continue}if(Fe=this.tokenizer.reflink(ae,this.tokens.links)){ae=ae.substring(Fe.raw.length),Fe.type==="link"&&(Fe.tokens=this.inlineTokens(Fe.text,[],!0,ge)),le.push(Fe);continue}if(Fe=this.tokenizer.strong(ae,ze,we)){ae=ae.substring(Fe.raw.length),Fe.tokens=this.inlineTokens(Fe.text,[],de,ge),le.push(Fe);continue}if(Fe=this.tokenizer.em(ae,ze,we)){ae=ae.substring(Fe.raw.length),Fe.tokens=this.inlineTokens(Fe.text,[],de,ge),le.push(Fe);continue}if(Fe=this.tokenizer.codespan(ae)){ae=ae.substring(Fe.raw.length),le.push(Fe);continue}if(Fe=this.tokenizer.br(ae)){ae=ae.substring(Fe.raw.length),le.push(Fe);continue}if(Fe=this.tokenizer.del(ae)){ae=ae.substring(Fe.raw.length),Fe.tokens=this.inlineTokens(Fe.text,[],de,ge),le.push(Fe);continue}if(Fe=this.tokenizer.autolink(ae,Re)){ae=ae.substring(Fe.raw.length),le.push(Fe);continue}if(!de&&(Fe=this.tokenizer.url(ae,Re))){ae=ae.substring(Fe.raw.length),le.push(Fe);continue}if(Fe=this.tokenizer.inlineText(ae,ge,Ne)){ae=ae.substring(Fe.raw.length),we=Fe.raw.slice(-1),le.push(Fe);continue}if(ae){var ft="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return le},J(Te,null,[{key:"rules",get:function(){return{block:se,inline:ke}}}]),Te}(),je=K.defaults,ue=N.cleanUrl,Ee=N.escape,Le=function(){function Te(be){this.options=be||je}var me=Te.prototype;return me.code=function(ae,le,de){var ge=(le||"").match(/\S*/)[0];if(this.options.highlight){var we=this.options.highlight(ae,ge);we!=null&&we!==ae&&(de=!0,ae=we)}return ge?''+(de?ae:Ee(ae,!0))+`
`:""+(de?ae:Ee(ae,!0))+`
`},me.blockquote=function(ae){return`
`+ae+`
`},me.html=function(ae){return ae},me.heading=function(ae,le,de,ge){return this.options.headerIds?"
`:""+ae+"
`},me.hr=function(){return this.options.xhtml?`
`:`
`},me.list=function(ae,le,de){var ge=le?"ol":"ul",we=le&&de!==1?' start="'+de+'"':"";return"<"+ge+we+`>
`+ae+""+ge+`>
`},me.listitem=function(ae){return""+ae+`
`},me.checkbox=function(ae){return" "},me.paragraph=function(ae){return""+ae+`
`},me.table=function(ae,le){return le&&(le=""+le+""),`
`},me.tablerow=function(ae){return`
`+ae+`
`},me.tablecell=function(ae,le){var de=le.header?"th":"td",ge=le.align?"<"+de+' align="'+le.align+'">':"<"+de+">";return ge+ae+""+de+`>
`},me.strong=function(ae){return""+ae+""},me.em=function(ae){return""+ae+""},me.codespan=function(ae){return""+ae+""},me.br=function(){return this.options.xhtml?"
":"
"},me.del=function(ae){return""+ae+""},me.link=function(ae,le,de){if(ae=ue(this.options.sanitize,this.options.baseUrl,ae),ae===null)return de;var ge='"+de+"",ge},me.image=function(ae,le,de){if(ae=ue(this.options.sanitize,this.options.baseUrl,ae),ae===null)return de;var ge='
":">",ge},me.text=function(ae){return ae},Te}(),Ie=function(){function Te(){}var me=Te.prototype;return me.strong=function(ae){return ae},me.em=function(ae){return ae},me.codespan=function(ae){return ae},me.del=function(ae){return ae},me.html=function(ae){return ae},me.text=function(ae){return ae},me.link=function(ae,le,de){return""+de},me.image=function(ae,le,de){return""+de},me.br=function(){return""},Te}(),Ge=function(){function Te(){this.seen={}}var me=Te.prototype;return me.slug=function(ae){var le=ae.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(le)){var de=le;do this.seen[de]++,le=de+"-"+this.seen[de];while(this.seen.hasOwnProperty(le))}return this.seen[le]=0,le},Te}(),Xe=K.defaults,Je=N.unescape,Qe=function(){function Te(be){this.options=be||Xe,this.options.renderer=this.options.renderer||new Le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ie,this.slugger=new Ge}Te.parse=function(ae,le){var de=new Te(le);return de.parse(ae)};var me=Te.prototype;return me.parse=function(ae,le){le===void 0&&(le=!0);var de="",ge,we,Fe,ze,st,mt,ft,wt,St,ct,Ut,Lt,qt,Qt,It,Cr,Kr,yt,Lr=ae.length;for(ge=0;ge0&&It.tokens[0].type==="text"?(It.tokens[0].text=yt+" "+It.tokens[0].text,It.tokens[0].tokens&&It.tokens[0].tokens.length>0&&It.tokens[0].tokens[0].type==="text"&&(It.tokens[0].tokens[0].text=yt+" "+It.tokens[0].tokens[0].text)):It.tokens.unshift({type:"text",text:yt}):Qt+=yt),Qt+=this.parse(It.tokens,qt),St+=this.renderer.listitem(Qt,Kr,Cr);de+=this.renderer.list(St,Ut,Lt);continue}case"html":{de+=this.renderer.html(ct.text);continue}case"paragraph":{de+=this.renderer.paragraph(this.parseInline(ct.tokens));continue}case"text":{for(St=ct.tokens?this.parseInline(ct.tokens):ct.text;ge+1An error occurred:
"+tt(Fe.message+"",!0)+"
";throw Fe}}Ue.options=Ue.setOptions=function(Te){return at(Ue.defaults,Te),ut(Ue.defaults),Ue},Ue.getDefaults=Be,Ue.defaults=ot,Ue.use=function(Te){var me=at({},Te);if(Te.renderer&&function(){var ae=Ue.defaults.renderer||new Le,le=function(we){var Fe=ae[we];ae[we]=function(){for(var ze=arguments.length,st=new Array(ze),mt=0;mt`,triples:"",explode:"[]{}"},P=ne.Pos;ne.defineOption("autoCloseBrackets",!1,function(l,f,o){o&&o!=ne.Init&&(l.removeKeyMap(j),l.state.closeBrackets=null),f&&(B(X(f,"pairs")),l.state.closeBrackets=f,l.addKeyMap(j))});function X(l,f){return f=="pairs"&&typeof l=="string"?l:typeof l=="object"&&l[f]!=null?l[f]:J[f]}var j={Backspace:r,Enter:L};function B(l){for(var f=0;f=0;a--){var R=u[a].head;l.replaceRange("",P(R.line,R.ch-1),P(R.line,R.ch+1),"+delete")}}function L(l){var f=G(l),o=f&&X(f,"explode");if(!o||l.getOption("disableInput"))return ne.Pass;for(var u=l.listSelections(),a=0;a0;return{anchor:new P(l.anchor.line,l.anchor.ch+(f?-1:1)),head:new P(l.head.line,l.head.ch+(f?1:-1))}}function m(l,f){var o=G(l);if(!o||l.getOption("disableInput"))return ne.Pass;var u=X(o,"pairs"),a=u.indexOf(f);if(a==-1)return ne.Pass;for(var s=X(o,"closeBefore"),R=X(o,"triples"),_=u.charAt(a+1)==f,C=l.listSelections(),D=a%2==0,O,A=0;A=0&&l.getRange(T,P(T.line,T.ch+3))==f+f+f?c="skipThree":c="skip";else if(_&&T.ch>1&&R.indexOf(f)>=0&&l.getRange(P(T.line,T.ch-2),T)==f+f){if(T.ch>2&&/\bstring/.test(l.getTokenTypeAt(P(T.line,T.ch-2))))return ne.Pass;c="addFour"}else if(_){var y=T.ch==0?" ":l.getRange(P(T.line,T.ch-1),T);if(!ne.isWordChar(w)&&y!=f&&!ne.isWordChar(y))c="both";else return ne.Pass}else if(D&&(w.length===0||/\s/.test(w)||s.indexOf(w)>-1))c="both";else return ne.Pass;if(!O)O=c;else if(O!=c)return ne.Pass}var b=a%2?u.charAt(a-1):f,U=a%2?f:u.charAt(a+1);l.operation(function(){if(O=="skip")l.execCommand("goCharRight");else if(O=="skipThree")for(var F=0;F<3;F++)l.execCommand("goCharRight");else if(O=="surround"){for(var E=l.getSelections(),F=0;F0&&(ie.percent=ie.loaded/ie.total*100),N.onProgress(ie)});var g=new FormData;N.data&&Object.keys(N.data).forEach(function($){var ie=N.data[$];if(Array.isArray(ie)){ie.forEach(function(oe){g.append($+"[]",oe)});return}g.append($,N.data[$])}),N.file instanceof Blob?g.append(N.filename,N.file,N.file.name):g.append(N.filename,N.file),I.onerror=function(ie){N.onError(ie)},I.onload=function(){return I.status<200||I.status>=300?N.onError(j(N,I),B(I)):N.onSuccess(B(I),I)},I.open(N.method,N.action,!0),N.withCredentials&&"withCredentials"in I&&(I.withCredentials=!0);var H=N.headers||{};return H["X-Requested-With"]!==null&&I.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function($){H[$]!==null&&I.setRequestHeader($,H[$])}),I.send(g),{abort:function(){I.abort()}}}var G=+new Date,r=0;function L(){return"rc-upload-"+G+"-"+ ++r}function v(N,I){return N.indexOf(I,N.length-I.length)!==-1}var m=function(N,I){if(N&&I){var g=Array.isArray(I)?I:I.split(","),H=N.name||"",$=N.type||"",ie=$.replace(/\/.*$/,"");return g.some(function(oe){var Ce=oe.trim();return Ce.charAt(0)==="."?v(H.toLowerCase(),Ce.toLowerCase()):/\/\*$/.test(Ce)?ie===Ce.replace(/\/.*$/,""):$===Ce})}return!0};function p(N,I){var g=N.createReader(),H=[];function $(){g.readEntries(function(ie){var oe=Array.prototype.slice.apply(ie);H=H.concat(oe);var Ce=!oe.length;Ce?I(H):$()})}$()}var h=function(I,g,H){var $=function ie(oe,Ce){Ce=Ce||"",oe.isFile?oe.file(function(ve){H(ve)&&(oe.fullPath&&!ve.webkitRelativePath&&(Object.defineProperties(ve,{webkitRelativePath:{writable:!0}}),ve.webkitRelativePath=oe.fullPath.replace(/^\//,""),Object.defineProperties(ve,{webkitRelativePath:{writable:!1}})),g([ve]))}):oe.isDirectory&&p(oe,function(ve){ve.forEach(function(Se){ie(Se,""+Ce+oe.name+"/")})})};I.forEach(function(ie){$(ie.webkitGetAsEntry())})},l=h,f=Object.assign||function(N){for(var I=1;I=0)continue;if(!Object.prototype.hasOwnProperty.call(N,H))continue;g[H]=N[H]}return g}function R(N,I){if(!(N instanceof I))throw new TypeError("Cannot call a class as a function")}function _(N,I){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:N}function C(N,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);N.prototype=Object.create(I&&I.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(N,I):N.__proto__=I)}var D=function(I){return Object.keys(I).reduce(function(g,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(g[H]=I[H]),g},{})},O=function(N){C(I,N);function I(){var g,H,$,ie;R(this,I);for(var oe=arguments.length,Ce=Array(oe),ve=0;ves.length&&(_=s.length);R<_;R++)yield s[R]}J.slice=o;function u(s,R=Number.POSITIVE_INFINITY){const _=[];if(R===0)return[_,s];const C=s[Symbol.iterator]();for(let D=0;DC===D){const C=s[Symbol.iterator](),D=R[Symbol.iterator]();for(;;){const O=C.next(),A=D.next();if(O.done!==A.done)return!1;if(O.done)return!0;if(!_(O.value,A.value))return!1}}J.equals=a})(ne||(ne={}))},LdHM:function(nt,xe,Z){"use strict";Z.d(xe,"b",function(){return s}),Z.d(xe,"a",function(){return _});var ne=Z("1OyB"),J=Z("vuIU"),P=Z("Ji7U"),X=Z("LK+K"),j=Z("q1tI"),B=Z("rePB"),K=Z("Ff2n"),G=Z("ODXe"),r=Z("4IlW"),L=Z("bX4T"),v=Z("YrtM"),m=Z("TSYQ"),p=Z.n(m),h=Z("+nKL"),l=Z("8OUc"),f=function(H,$){var ie=H.prefixCls,oe=H.id,Ce=H.flattenOptions,ve=H.childrenAsData,Se=H.values,Ae=H.searchValue,Oe=H.multiple,he=H.defaultActiveFirstOption,ce=H.height,re=H.itemHeight,fe=H.notFoundContent,se=H.open,ke=H.menuItemSelectedIcon,Ne=H.virtual,Re=H.onSelect,Pe=H.onToggleOpen,je=H.onActiveValue,ue=H.onScroll,Ee=H.onMouseEnter,Le="".concat(ie,"-item"),Ie=Object(v.a)(function(){return Ce},[se,Ce],function(He,Te){return Te[0]&&He[1]!==Te[1]}),Ge=j.useRef(null),Xe=function(Te){Te.preventDefault()},Je=function(Te){Ge.current&&Ge.current.scrollTo({index:Te})},Qe=function(Te){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,be=Ie.length,ae=0;ae1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(g).map(function($,ie){if(!j.isValidElement($)||!$.type)return null;var oe=$.type.isSelectOptGroup,Ce=$.key,ve=$.props,Se=ve.children,Ae=Object(K.a)(ve,["children"]);return H||!oe?O($):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(Ce===null?ie:Ce,"__"),label:Ce},Ae),{},{options:A(Se)})}).filter(function($){return $})}var S=Z("2Qr1"),T=Z("qNPg"),c=Z("U8pU"),w=Z("Kwbf"),y=Z("WKfj");function b(g){var H=g.mode,$=g.options,ie=g.children,oe=g.backfill,Ce=g.allowClear,ve=g.placeholder,Se=g.getInputElement,Ae=g.showSearch,Oe=g.onSearch,he=g.defaultOpen,ce=g.autoFocus,re=g.labelInValue,fe=g.value,se=g.inputValue,ke=g.optionLabelProp,Ne=H==="multiple"||H==="tags",Re=Ae!==void 0?Ae:Ne||H==="combobox",Pe=$||A(ie);if(Object(w.a)(H!=="tags"||Pe.every(function(Le){return!Le.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var je=Pe.some(function(Le){return Le.options?Le.options.some(function(Ie){return typeof("value"in Ie?Ie.value:Ie.key)=="number"}):typeof("value"in Le?Le.value:Le.key)=="number"});Object(w.a)(!je,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(w.a)(H!=="combobox"||!ke,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(w.a)(H==="combobox"||!oe,"`backfill` only works with `combobox` mode."),Object(w.a)(H==="combobox"||!Se,"`getInputElement` only work with `combobox` mode."),Object(w.b)(H!=="combobox"||!Se||!Ce||!ve,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Oe&&!Re&&H!=="combobox"&&H!=="tags"&&Object(w.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(w.b)(!he||ce,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var ue=Object(y.d)(fe);Object(w.a)(!re||ue.every(function(Le){return Object(c.a)(Le)==="object"&&("key"in Le||"value"in Le)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(w.a)(!Ne||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(ie){var Ee=null;Object(D.a)(ie).some(function(Le){if(!j.isValidElement(Le)||!Le.type)return!1;var Ie=Le.type;if(Ie.isSelectOption)return!1;if(Ie.isSelectOptGroup){var Ge=Object(D.a)(Le.props.children).every(function(Xe){return!j.isValidElement(Xe)||!Le.type||Xe.type.isSelectOption?!0:(Ee=Xe.type,!1)});return!Ge}return Ee=Ie,!0}),Ee&&Object(w.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ee.displayName||Ee.name||Ee,"`.")),Object(w.a)(se===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var U=b,F=Object(T.a)({prefixCls:"rc-select",components:{optionList:u},convertChildrenToData:A,flattenOptions:S.d,getLabeledValue:S.e,filterOptions:S.b,isValueDisabled:S.g,findValueOption:S.c,warningProps:U,fillOptionsWithMissingValue:S.a}),E=function(g){Object(P.a)($,g);var H=Object(X.a)($);function $(){var ie;return Object(ne.a)(this,$),ie=H.apply(this,arguments),ie.selectRef=j.createRef(),ie.focus=function(){ie.selectRef.current.focus()},ie.blur=function(){ie.selectRef.current.blur()},ie}return Object(J.a)($,[{key:"render",value:function(){return j.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),$}(j.Component);E.Option=s,E.OptGroup=_;var N=E,I=xe.c=N},M8RZ:function(nt,xe,Z){"use strict";Z.d(xe,"a",function(){return r});var ne=Z("fWQN"),J=Z("mtLc"),P=Z("yKVA"),X=Z("879j"),j=Z("q1tI"),B=Z.n(j),K=Z("i8i4"),G=Z.n(K),r=function(L){Object(P.a)(m,L);var v=Object(X.a)(m);function m(p){var h;Object(ne.a)(this,m),h=v.call(this,p);var l=window.document;return h.node=l.createElement("div"),l.body.appendChild(h.node),h}return Object(J.a)(m,[{key:"render",value:function(){var h=this.props.children;return Object(K.createPortal)(h,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(B.a.Component)},MI8n:function(nt,xe,Z){"use strict";Z.d(xe,"c",function(){return j}),Z.d(xe,"b",function(){return r}),Z.d(xe,"e",function(){return L}),Z.d(xe,"a",function(){return v}),Z.d(xe,"d",function(){return m}),Z.d(xe,"f",function(){return p});var ne=Z("/cxE"),J=Z("pmY6"),P=Z("24hK"),X=Z("5Y4S"),j;(function(h){h.None=()=>J.a.None;function l(b){return(U,F=null,E)=>{let N=!1,I;return I=b(g=>N?void 0:(I?I.dispose():N=!0,U.call(F,g)),null,E),N&&I.dispose(),I}}h.once=l;function f(b,U){return _((F,E=null,N)=>b(I=>F.call(E,U(I)),null,N))}h.map=f;function o(b,U){return _((F,E=null,N)=>b(I=>{U(I),F.call(E,I)},null,N))}h.forEach=o;function u(b,U){return _((F,E=null,N)=>b(I=>U(I)&&F.call(E,I),null,N))}h.filter=u;function a(b){return b}h.signal=a;function s(...b){return(U,F=null,E)=>Object(J.e)(...b.map(N=>N(I=>U.call(F,I),null,E)))}h.any=s;function R(b,U,F){let E=F;return f(b,N=>(E=U(E,N),E))}h.reduce=R;function _(b){let U;const F=new r({onFirstListenerAdd(){U=b(F.fire,F)},onLastListenerRemove(){U.dispose()}});return F.event}function C(b,U,F=100,E=!1,N){let I,g,H,$=0;const ie=new r({leakWarningThreshold:N,onFirstListenerAdd(){I=b(oe=>{$++,g=U(g,oe),E&&!H&&(ie.fire(g),g=void 0),clearTimeout(H),H=setTimeout(()=>{const Ce=g;g=void 0,H=void 0,(!E||$>1)&&ie.fire(Ce),$=0},F)})},onLastListenerRemove(){I.dispose()}});return ie.event}h.debounce=C;function D(b,U=(F,E)=>F===E){let F=!0,E;return u(b,N=>{const I=F||!U(N,E);return F=!1,E=N,I})}h.latch=D;function O(b,U){return[h.filter(b,U),h.filter(b,F=>!U(F))]}h.split=O;function A(b,U=!1,F=[]){let E=F.slice(),N=b(H=>{E?E.push(H):g.fire(H)});const I=()=>{E&&E.forEach(H=>g.fire(H)),E=null},g=new r({onFirstListenerAdd(){N||(N=b(H=>g.fire(H)))},onFirstListenerDidAdd(){E&&(U?setTimeout(I):I())},onLastListenerRemove(){N&&N.dispose(),N=null}});return g.event}h.buffer=A;class S{constructor(b){this.event=b}map(b){return new S(f(this.event,b))}forEach(b){return new S(o(this.event,b))}filter(b){return new S(u(this.event,b))}reduce(b,U){return new S(R(this.event,b,U))}latch(){return new S(D(this.event))}debounce(b,U=100,F=!1,E){return new S(C(this.event,b,U,F,E))}on(b,U,F){return this.event(b,U,F)}once(b,U,F){return l(this.event)(b,U,F)}}function T(b){return new S(b)}h.chain=T;function c(b,U,F=E=>E){const E=(...H)=>g.fire(F(...H)),N=()=>b.on(U,E),I=()=>b.removeListener(U,E),g=new r({onFirstListenerAdd:N,onLastListenerRemove:I});return g.event}h.fromNodeEventEmitter=c;function w(b,U,F=E=>E){const E=(...H)=>g.fire(F(...H)),N=()=>b.addEventListener(U,E),I=()=>b.removeEventListener(U,E),g=new r({onFirstListenerAdd:N,onLastListenerRemove:I});return g.event}h.fromDOMEventEmitter=w;function y(b){return new Promise(U=>l(b)(U))}h.toPromise=y})(j||(j={}));class B{constructor(h){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${h}_${B._idPool++}`}start(h){this._stopWatch=new X.a(!0),this._listenerCount=h}stop(){if(this._stopWatch){const h=this._stopWatch.elapsed();this._elapsedOverall+=h,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${h.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}B._idPool=0;let K=-1;class G{constructor(h,l=Math.random().toString(18).slice(2,5)){this.customThreshold=h,this.name=l,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(h){let l=K;if(typeof this.customThreshold=="number"&&(l=this.customThreshold),l<=0||h{const u=this._stacks.get(f)||0;this._stacks.set(f,u-1)}}}class r{constructor(h){var l;this._disposed=!1,this._options=h,this._leakageMon=K>0?new G(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((l=this._options)===null||l===void 0?void 0:l._profName)?new B(this._options._profName):void 0}get event(){return this._event||(this._event=(h,l,f)=>{var o;this._listeners||(this._listeners=new P.a);const u=this._listeners.isEmpty();u&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(l?[h,l]:h);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,h,l);const s=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),R=Object(J.i)(()=>{if(s&&s(),!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)){const _=this._listeners&&!this._listeners.isEmpty();_||this._options.onLastListenerRemove(this)}});return f instanceof J.b?f.add(R):Array.isArray(f)&&f.push(R),R}),this._event}fire(h){var l,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new P.a);for(let o of this._listeners)this._deliveryQueue.push([o,h]);for((l=this._perfMon)===null||l===void 0||l.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,u]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,u):o[0].call(o[1],u)}catch(a){Object(ne.f)(a)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var h,l,f,o,u;this._disposed||(this._disposed=!0,(h=this._listeners)===null||h===void 0||h.clear(),(l=this._deliveryQueue)===null||l===void 0||l.clear(),(o=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||o===void 0||o.call(f),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class L extends r{constructor(h){super(h);this._isPaused=0,this._eventQueue=new P.a,this._mergeFn=h==null?void 0:h.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const h=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(h))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(h){this._listeners&&(this._isPaused!==0?this._eventQueue.push(h):super.fire(h))}}class v extends L{constructor(h){var l;super(h);this._delay=(l=h.delay)!==null&&l!==void 0?l:100}fire(h){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(h)}}class m{constructor(){this.buffers=[]}wrapEvent(h){return(l,f,o)=>h(u=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>l.call(f,u)):l.call(f,u)},void 0,o)}bufferEvents(h){const l=[];this.buffers.push(l);const f=h();return this.buffers.pop(),l.forEach(o=>o()),f}}class p{constructor(){this.listening=!1,this.inputEvent=j.None,this.inputEventListener=J.a.None,this.emitter=new r({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(h){this.inputEvent=h,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=h(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(nt,xe,Z){"use strict";(function(ne,J){Z.d(xe,"b",function(){return f}),Z.d(xe,"i",function(){return s}),Z.d(xe,"f",function(){return R}),Z.d(xe,"d",function(){return _}),Z.d(xe,"g",function(){return C}),Z.d(xe,"h",function(){return D}),Z.d(xe,"c",function(){return O}),Z.d(xe,"k",function(){return A}),Z.d(xe,"j",function(){return S}),Z.d(xe,"a",function(){return T}),Z.d(xe,"e",function(){return y});var P;const X="en";let j=!1,B=!1,K=!1,G=!1,r=!1,L=!1,v=!1,m,p=X,h,l;const f=typeof self=="object"?self:typeof ne=="object"?ne:{};let o;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?o=f.vscode.process:typeof J!="undefined"&&(o=J);const u=typeof((P=o==null?void 0:o.versions)===null||P===void 0?void 0:P.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!u)l=navigator.userAgent,j=l.indexOf("Windows")>=0,B=l.indexOf("Macintosh")>=0,v=(l.indexOf("Macintosh")>=0||l.indexOf("iPad")>=0||l.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,K=l.indexOf("Linux")>=0,L=!0,m=navigator.language,p=m;else if(typeof o=="object"){j=o.platform==="win32",B=o.platform==="darwin",K=o.platform==="linux",G=K&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,m=X,p=X;const b=o.env.VSCODE_NLS_CONFIG;if(b)try{const U=JSON.parse(b),F=U.availableLanguages["*"];m=U.locale,p=F||X,h=U._translationsConfigFile}catch(U){}r=!0}else console.error("Unable to resolve platform.");let a=0;B?a=1:j?a=3:K&&(a=2);const s=j,R=B,_=K,C=r,D=L,O=v,A=l,S=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let F=[];f.addEventListener("message",N=>{if(N.data&&N.data.vscodeSetImmediateId)for(let I=0,g=F.length;I{const I=++E;F.push({id:I,callback:N}),f.postMessage({vscodeSetImmediateId:I},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const U=Promise.resolve();return F=>U.then(F)}(),T=B||v?2:j?1:3;let c=!0,w=!1;function y(){if(!w){w=!0;const b=new Uint8Array(2);b[0]=1,b[1]=2;const U=new Uint16Array(b.buffer);c=U[0]===(2<<8)+1}return c}}).call(this,Z("IyRk"),Z("Q2Ig"))},N0LK:function(nt,xe,Z){"use strict";Z.d(xe,"C",function(){return ne}),Z.d(xe,"v",function(){return P}),Z.d(xe,"s",function(){return X}),Z.d(xe,"t",function(){return j}),Z.d(xe,"U",function(){return B}),Z.d(xe,"J",function(){return K}),Z.d(xe,"O",function(){return G}),Z.d(xe,"p",function(){return r}),Z.d(xe,"T",function(){return L}),Z.d(xe,"q",function(){return v}),Z.d(xe,"N",function(){return m}),Z.d(xe,"M",function(){return p}),Z.d(xe,"Q",function(){return h}),Z.d(xe,"u",function(){return l}),Z.d(xe,"x",function(){return f}),Z.d(xe,"I",function(){return o}),Z.d(xe,"f",function(){return u}),Z.d(xe,"h",function(){return a}),Z.d(xe,"g",function(){return s}),Z.d(xe,"i",function(){return R}),Z.d(xe,"G",function(){return _}),Z.d(xe,"H",function(){return C}),Z.d(xe,"r",function(){return D}),Z.d(xe,"R",function(){return O}),Z.d(xe,"d",function(){return A}),Z.d(xe,"e",function(){return S}),Z.d(xe,"E",function(){return T}),Z.d(xe,"F",function(){return c}),Z.d(xe,"j",function(){return w}),Z.d(xe,"z",function(){return y}),Z.d(xe,"K",function(){return U}),Z.d(xe,"L",function(){return F}),Z.d(xe,"m",function(){return N}),Z.d(xe,"k",function(){return g}),Z.d(xe,"A",function(){return $}),Z.d(xe,"a",function(){return ie}),Z.d(xe,"n",function(){return oe}),Z.d(xe,"l",function(){return Ce}),Z.d(xe,"D",function(){return ve}),Z.d(xe,"B",function(){return Se}),Z.d(xe,"b",function(){return Ae}),Z.d(xe,"S",function(){return Oe}),Z.d(xe,"o",function(){return he}),Z.d(xe,"P",function(){return ce}),Z.d(xe,"w",function(){return re}),Z.d(xe,"c",function(){return fe}),Z.d(xe,"y",function(){return Ne});function ne(ue){return!ue||typeof ue!="string"?!0:ue.trim().length===0}const J=/{(\d+)}/g;function P(ue,...Ee){return Ee.length===0?ue:ue.replace(J,function(Le,Ie){const Ge=parseInt(Ie,10);return isNaN(Ge)||Ge<0||Ge>=Ee.length?Le:Ee[Ge]})}function X(ue){return ue.replace(/[<>&]/g,function(Ee){switch(Ee){case"<":return"<";case">":return">";case"&":return"&";default:return Ee}})}function j(ue){return ue.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function B(ue,Ee=" "){const Le=K(ue,Ee);return G(Le,Ee)}function K(ue,Ee){if(!ue||!Ee)return ue;const Le=Ee.length;if(Le===0||ue.length===0)return ue;let Ie=0;for(;ue.indexOf(Ee,Ie)===Ie;)Ie=Ie+Le;return ue.substring(Ie)}function G(ue,Ee){if(!ue||!Ee)return ue;const Le=Ee.length,Ie=ue.length;if(Le===0||Ie===0)return ue;let Ge=Ie,Xe=-1;for(;!(Xe=ue.lastIndexOf(Ee,Ge-1),Xe===-1||Xe+Le!==Ge);){if(Xe===0)return"";Ge=Xe}return ue.substring(0,Ge)}function r(ue){return ue.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function L(ue){return ue.replace(/\*/g,"")}function v(ue,Ee,Le={}){if(!ue)throw new Error("Cannot create regex from empty string");Ee||(ue=j(ue)),Le.wholeWord&&(/\B/.test(ue.charAt(0))||(ue="\\b"+ue),/\B/.test(ue.charAt(ue.length-1))||(ue=ue+"\\b"));let Ie="";return Le.global&&(Ie+="g"),Le.matchCase||(Ie+="i"),Le.multiline&&(Ie+="m"),Le.unicode&&(Ie+="u"),new RegExp(ue,Ie)}function m(ue){if(ue.source==="^"||ue.source==="^$"||ue.source==="$"||ue.source==="^\\s*$")return!1;const Ee=ue.exec("");return!!(Ee&&ue.lastIndex===0)}function p(ue){return(ue.global?"g":"")+(ue.ignoreCase?"i":"")+(ue.multiline?"m":"")+(ue.unicode?"u":"")}function h(ue){return ue.split(/\r\n|\r|\n/)}function l(ue){for(let Ee=0,Le=ue.length;Ee=0;Le--){const Ie=ue.charCodeAt(Le);if(Ie!==32&&Ie!==9)return Le}return-1}function u(ue,Ee){return ueEe?1:0}function a(ue,Ee,Le=0,Ie=ue.length,Ge=0,Xe=Ee.length){for(;Leqe)return 1}const Je=Ie-Le,Qe=Xe-Ge;return JeQe?1:0}function s(ue,Ee){return R(ue,Ee,0,ue.length,0,Ee.length)}function R(ue,Ee,Le=0,Ie=ue.length,Ge=0,Xe=Ee.length){for(;Le=128||qe>=128)return a(ue.toLowerCase(),Ee.toLowerCase(),Le,Ie,Ge,Xe);_(at)&&(at-=32),_(qe)&&(qe-=32);const tt=at-qe;if(tt===0)continue;return tt}const Je=Ie-Le,Qe=Xe-Ge;return JeQe?1:0}function _(ue){return ue>=97&&ue<=122}function C(ue){return ue>=65&&ue<=90}function D(ue,Ee){return ue.length===Ee.length&&R(ue,Ee)===0}function O(ue,Ee){const Le=Ee.length;return Ee.length>ue.length?!1:R(ue,Ee,0,Le)===0}function A(ue,Ee){let Le,Ie=Math.min(ue.length,Ee.length);for(Le=0;Le1){const Ie=ue.charCodeAt(Ee-2);if(T(Ie))return w(Ie,Le)}return Le}function U(ue,Ee){const Le=se.getInstance(),Ie=Ee,Ge=ue.length,Xe=y(ue,Ge,Ee);Ee+=Xe>=65536?2:1;let Je=Le.getGraphemeBreakType(Xe);for(;Ee=65536?2:1,Je=at}return Ee-Ie}function F(ue,Ee){const Le=se.getInstance(),Ie=Ee,Ge=b(ue,Ee);Ee-=Ge>=65536?2:1;let Xe=Le.getGraphemeBreakType(Ge);for(;Ee>0;){const Je=b(ue,Ee),Qe=Le.getGraphemeBreakType(Je);if(fe(Qe,Xe))break;Ee-=Je>=65536?2:1,Xe=Qe}return Ie-Ee}const E=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function N(ue){return E.test(ue)}const I=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function g(ue){return I.test(ue)}const H=/^[\t\n\r\x20-\x7E]*$/;function $(ue){return H.test(ue)}const ie=/[\u2028\u2029]/;function oe(ue){return ie.test(ue)}function Ce(ue){for(let Ee=0,Le=ue.length;Ee=11904&&ue<=55215||ue>=63744&&ue<=64255||ue>=65281&&ue<=65374}function Se(ue){return ue>=127462&&ue<=127487||ue===8986||ue===8987||ue===9200||ue===9203||ue>=9728&&ue<=10175||ue===11088||ue===11093||ue>=127744&&ue<=128591||ue>=128640&&ue<=128764||ue>=128992&&ue<=129003||ue>=129280&&ue<=129535||ue>=129648&&ue<=129750}const Ae=String.fromCharCode(65279);function Oe(ue){return!!(ue&&ue.length>0&&ue.charCodeAt(0)===65279)}function he(ue,Ee=!1){return ue?(Ee&&(ue=ue.replace(/\\./g,"")),ue.toLowerCase()!==ue):!1}function ce(ue){const Ee=90-65+1;return ue=ue%(2*Ee),ueEe[3*Ie+1])Ie=2*Ie+1;else return Ee[3*Ie+2];return 0}}se._INSTANCE=null;function ke(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Ne(ue,Ee){if(ue===0)return 0;const Le=Re(ue,Ee);if(Le!==void 0)return Le;const Ie=b(Ee,ue);return ue-=Pe(Ie),ue}function Re(ue,Ee){let Le=b(Ee,ue);for(ue-=Pe(Le);je(Le)||Le===65039||Le===8419;){if(ue===0)return;Le=b(Ee,ue),ue-=Pe(Le)}if(!Se(Le))return;if(ue>=0){const Ie=b(Ee,ue);Ie===8205&&(ue-=Pe(Ie))}return ue}function Pe(ue){return ue>=65536?2:1}function je(ue){return 127995<=ue&&ue<=127999}},Ot1p:function(nt,xe,Z){"use strict";var ne=Z("2qtc"),J=Z("kLXV"),P=Z("rAM+"),X=Z("miYZ"),j=Z("tsqr"),B=Z("9og8"),K=Z("tJVT"),G=Z("jrin"),r=Z("WmNS"),L=Z.n(r),v=Z("q1tI"),m=Z.n(v),p=Z("VrN/"),h=Z.n(p),l=Z("bdgK"),f=Z("p77/"),o=Z("Bd2K"),u=Z("ELLl"),a=Z("19Vz"),s=Z("lZu9"),R=Z("+NIl"),_=Z("kSUc"),C=Z("9Bee"),D=function(we){var Fe=we.value,ze=Fe===void 0?"":Fe,st=we.className,mt=we.showTextOnly,ft=we.showLines,wt=we.style,St=wt===void 0?{}:wt,ct=Object(v.useMemo)(function(){return""},[ze]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:ct}}))},O=Z("0Owb"),A=Z("dejd"),S=Z("C+DQ"),T=Z("1vsH"),c=Z("m3rI"),w=[{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 y(we){var Fe=we.onActionCallback,ze=we.title,st=we.icon,mt=we.actionName,ft=we.className,wt=ft===void 0?"":ft,St=we.children;function ct(){Fe(mt)}return m.a.createElement("a",{title:ze,className:wt,onClick:ct},m.a.createElement("i",{className:"md-iconfont ".concat(st)}),St)}var b=function(we){var Fe=we.watch,ze=we.showNullButton,st=we.onActionCallback,mt=we.fullScreen,ft=we.insertTemp,wt=we.hidetoolBar,St=we.uuid,ct=we.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(T.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(T.F)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(c.a.PROXY_SERVER)));var Ut=[].concat(w,[{title:"".concat(Fe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Fe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!wt&&Ut.map(function(Lt,qt){return m.a.createElement("li",{key:qt},Lt.actionName?m.a.createElement(y,Object(O.a)({},Lt,{onActionCallback:st})):m.a.createElement("span",{className:"v-line"}))}),ze?m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:st},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ft&&m.a.createElement("li",null,m.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ft),onActionCallback:st},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(y,{icon:"".concat(mt?"icon-shrink":"icon-enlarge"),title:mt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:st})))},U=Z("M8RZ"),F=Z("+L6B"),E=Z("2/Rp"),N=Z("y8nQ"),I=Z("Vl3Y"),g=Z("5NDa"),H=Z("5rEg"),$={labelCol:{span:4},wrapperCol:{span:20}},ie=function(we){var Fe=we.callback,ze=we.onCancel;function st(mt){Fe(mt)}return m.a.createElement(I.a,Object(O.a)({},$,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:st}),m.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(H.a,null)),m.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(H.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(E.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))},oe=Z("7ahc"),Ce=Z("HmJG"),ve=Z("BjJ7"),Se=I.a.useForm,Ae={width:280,marginRight:10},Oe={labelCol:{span:5},wrapperCol:{span:19}},he=function(we){var Fe=we.callback,ze=we.onCancel,st=Se(),mt=Object(K.a)(st,1),ft=mt[0];function wt(Ut){Fe(Ut)}function St(Ut,Lt){if(Ut.status===-1){j.b.error(Ut.message);return}ft.setFieldsValue({src:"/api/attachments/".concat(Ut.id),type:Lt.type})}function ct(Ut){var Lt=Ut.target.files[0];re(Lt,St)}return m.a.createElement(I.a,Object(O.a)({form:ft},Oe,{className:"upload-image-panel",onFinish:wt}),m.a.createElement(I.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(I.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(H.a,{style:Ae})),m.a.createElement(ce,{onFileChange:ct}))),m.a.createElement(I.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(H.a,{style:{width:264}})),m.a.createElement(I.a.Item,{style:{textAlign:"right"}},m.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(E.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))};function ce(we){var Fe=we.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Fe}))}function re(we,Fe){if(!we)throw new String("\u6CA1\u6709\u6587\u4EF6");var ze=new FormData;ze.append("editormd-image-file",we),ze.append("file_param_name","editormd-image-file"),ze.append("byxhr","true");var st=new window.XMLHttpRequest;st.withCredentials=!0,st.addEventListener("load",function(mt){Fe(JSON.parse(mt.target.responseText),we)},!1),st.addEventListener("error",function(mt){console.error(mt)},!1),st.open("POST","".concat(ve.a,"/api/attachments.json")),st.send(ze)}var fe=Z("giR+"),se=Z("fyUT"),ke=Z("7Kak"),Ne=Z("9yH6"),Re=Ne.a.Group,Pe={margin:"0 8px"},je=function(we){var Fe=we.callback,ze=we.onCancel;function st(mt){Fe(mt)}return m.a.createElement(I.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:st},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:Pe},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:Pe},"\u884C\u6570"),m.a.createElement(I.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(se.a,null)),m.a.createElement("span",{style:Pe},"\u5217\u6570"),m.a.createElement(I.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(se.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:Pe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(I.a.Item,{name:"align"},m.a.createElement(Re,null,m.a.createElement(Ne.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(Ne.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(Ne.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(Ne.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(E.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))},ue=Z("ErOA"),Ee=Z("7Cbv"),Le="link",Ie="upload-image",Ge="code-block",Xe="add-table",Je="------------",Qe={default:Je,left:":".concat(Je),center:":".concat(Je,":"),right:"".concat(Je,":")},at=Z("9VGf"),qe,tt;function Be(){}var ut=0,ot=1e4,Ue="\u2581",He=`
**\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 Te(we){return/^\d+$/.test(we)?"".concat(we,"px"):we}var me=navigator.platform.toUpperCase().indexOf("MAC")>=0,be=me?"Cmd":"Ctrl",ae=["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"],le=(qe={},Object(G.a)(qe,be+"-B","bold"),Object(G.a)(qe,be+"-I","italic"),qe),de=(tt={},Object(G.a)(tt,Le,"\u6DFB\u52A0\u94FE\u63A5"),Object(G.a)(tt,Ge,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(G.a)(tt,Ie,"\u6DFB\u52A0\u6587\u4EF6"),Object(G.a)(tt,Xe,"\u6DFB\u52A0\u8868\u683C"),tt),ge=xe.a=function(we){var Fe=we.defaultValue,ze=Fe===void 0?"":Fe,st=we.onChange,mt=we.width,ft=mt===void 0?"100%":mt,wt=we.height,St=wt===void 0?400:wt,ct=we.miniToolbar,Ut=ct===void 0?!1:ct,Lt=we.isFocus,qt=Lt===void 0?!1:Lt,Qt=we.watch,It=we.insertTemp,Cr=we.mode,Kr=Cr===void 0?"markdown":Cr,yt=we.id,Lr=yt===void 0?"markdown-editor-id":yt,bt=we.showResizeBar,xt=bt===void 0?!1:bt,Ft=we.noStorage,tr=Ft===void 0?!1:Ft,cr=we.showNullButton,Pt=cr===void 0?!1:cr,dt=we.hidetoolBar,Ur=dt===void 0?!1:dt,Vt=we.fullScreen,Jt=Vt===void 0?!1:Vt,Rt=we.onBlur,lr=we.onCMBeforeChange,Ir=we.onFullScreen,Xr=we.className,$e=Xr===void 0?"":Xr,Ct=we.disablePaste,pi=Ct===void 0?!1:Ct,mi=we.placeholder,gi=mi===void 0?"":mi,vi=we.values,Y=vi===void 0?"":vi,x=Object(v.useState)(null),k=Object(K.a)(x,2),W=k[0],ee=k[1],V=Object(v.useState)(ze),_e=Object(K.a)(V,2),Ke=_e[0],et=_e[1],pt=Object(v.useState)(Qt),Ve=Object(K.a)(pt,2),_t=Ve[0],jt=Ve[1],$t=Object(v.useState)(Jt),jr=Object(K.a)($t,2),Er=jr[0],xr=jr[1],Qr=Object(v.useState)(""),Ii=Object(K.a)(Qr,2),dr=Ii[0],zr=Ii[1],li=Object(v.useState)(0),ui=Object(K.a)(li,2),Hr=ui[0],Di=ui[1],yi=Object(v.useState)(St),Ki=Object(K.a)(yi,2),zi=Ki[0],Zr=Ki[1],$r=Object(v.useState)(!1),bi=Object(K.a)($r,2),cn=bi[0],_i=bi[1],ir=Object(v.useRef)(Object(Ee.a)()),Ht=Object(v.useRef)(!1),yr=Object(v.useRef)(),kt=Object(v.useRef)(),ar=Object(v.useRef)(),Kt=Object(v.useRef)(),ii=Object(v.useRef)(),fr=function(){var gt=Object(B.a)(L.a.mark(function At(){var Et,Dt;return L.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,Object(ue.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ir.current}});case 2:Dt=Yt.sent,Dt!=null&&(Et=Dt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",W,kt),Dt.attachments.map(function(Nt){Nt.content_type.indexOf("image")>-1?W.replaceSelection(".concat(Nt.content_type,")")):Nt.content_type.indexOf("video")>-1?W.replaceSelection('')):Nt.content_type.indexOf("pdf")>-1?W.replaceSelection('').concat(Nt.name,"")):W.replaceSelection("[".concat(Nt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}));case 4:case"end":return Yt.stop()}},At)}));return function(){return gt.apply(this,arguments)}}();Object(v.useEffect)(function(){et(Y),W==null||W.setValue(Y)},[Y]),Object(v.useEffect)(function(){Ir==null||Ir(Er)},[Er]),Object(v.useEffect)(function(){if(kt.current){var gt=h.a.fromTextArea(kt.current,{mode:Kr,lineNumbers:!Ut,lineWrapping:!0,value:ze,autoCloseTags:!0,autoCloseBrackets:!0});qt&>.focus();function At(Et,Dt){if(pi){Dt.preventDefault();return}var Bt=Dt.clipboardData;if(Bt){var Yt=Bt.types.toString(),Nt=Bt.items;if(Yt==="Files"||Bt.types.indexOf("Files")>-1){if(Dt.preventDefault(),Kr=="stex")return;try{var ur,Dr=Nt[1];((ur=Nt[0])===null||ur===void 0?void 0:ur.kind)==="file"&&(Dr=Nt[0]);var Mt=Dr.getAsFile(),hi=Mt.name.split(".").pop();re(Mt,function(Wt){if(Wt.id){var kr,Tr,Jr;(Mt==null||((kr=Mt.type)===null||kr===void 0)?void 0:kr.indexOf("image"))>-1?gt.replaceSelection(".concat(Wt.content_type,")")):(Mt==null||((Tr=Mt.type)===null||Tr===void 0)?void 0:Tr.indexOf("video"))>-1?gt.replaceSelection('')):(Mt==null||((Jr=Mt.type)===null||Jr===void 0)?void 0:Jr.indexOf("pdf"))>-1?gt.replaceSelection('').concat(Mt.name,"")):ae.includes(hi)?gt.replaceSelection('').concat(Mt.name,"")):gt.replaceSelection("[".concat(Mt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})}catch(Wt){j.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return gt.on("paste",At),gt.on("dragleave",function(Et,Dt){ar.current.classList.remove("mouse-hover-md")}),gt.on("dragover",function(Et,Dt){ar.current.classList.add("mouse-hover-md")}),gt.on("drop",function(Et,Dt){ar.current.classList.add("mouse-hover-md");var Bt;if(Bt=Dt.dataTransfer.files,Bt.length>0){Dt.preventDefault(),Dt.stopPropagation();for(var Yt=function(Dr){var Mt=Bt[Dr],hi=Mt.name.split(".").pop();re(Mt,function(Wt){if(Wt.id){var kr,Tr,Jr;(Mt==null||((kr=Mt.type)===null||kr===void 0)?void 0:kr.indexOf("image"))>-1?gt.replaceSelection(".concat(Wt.content_type,")")):(Mt==null||((Tr=Mt.type)===null||Tr===void 0)?void 0:Tr.indexOf("video"))>-1?gt.replaceSelection('')):(Mt==null||((Jr=Mt.type)===null||Jr===void 0)?void 0:Jr.indexOf("pdf"))>-1?gt.replaceSelection('').concat(Mt.name,"")):ae.includes(hi)?gt.replaceSelection('').concat(Mt.name,"")):gt.replaceSelection("[".concat(Mt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(Wt.id,"?type=").concat(Wt.content_type,")"))}else(Wt==null?void 0:Wt.status)===401&&(document.location.href="/user/login")})},Nt=0;Nt0||Nt.target.offsetWidth>0)&&(Ar(),W.setSize("100%","100%"),W.refresh())}}catch(ur){Bt.e(ur)}finally{Bt.f()}});return Et.observe(kt.current.parentElement),Et}if(W){var At=gt();return function(){At.unobserve(kt.current.parentElement)}}},[W,Ar]),Object(v.useEffect)(function(){if(W){for(var gt=[],At=function(){var Nt=Dt[Et];Bt=Object(K.a)(Nt,2);var ur=Bt[0],Dr=Bt[1],Mt=Object(G.a)({},ur,function(){Vi(Dr)});gt.push(Mt),W.addKeyMap(Mt)},Et=0,Dt=Object.entries(le);Et0){var gt=new Date().getTime(),At=window.sessionStorage.getItem(Lr);gt>=Hr+ot&&(!At||At!==Ke)&&(window.sessionStorage.setItem(Lr,Ke),_i(!0))}},ot),Object(v.useEffect)(function(){jt(Qt)},[W,Qt]),Object(v.useEffect)(function(){W&&(qt&&W.focus())},[W,qt]),Object(v.useEffect)(function(){if(_t&&W){var gt=W.getScrollerElement();function At(Et){var Dt=Et.target;if(ii.current){var Bt=Dt.scrollTop/Dt.scrollHeight;ii.current.scrollTop=ii.current.scrollHeight*Bt}}return gt.addEventListener("scroll",At),function(){gt.removeEventListener("scroll",At)}}},[W,_t]),Object(v.useEffect)(function(){if(W&&lr){function gt(At,Et){lr(At,Et)}return W.on("beforeChange",gt),function(){W.off("beforeChange",gt)}}},[W,lr]),Object(v.useEffect)(function(){if(W&&Rt){function gt(){Rt(W.getValue())}return W.on("blur",gt),function(){W.off("blur",gt)}}},[W,Rt]),Object(v.useEffect)(function(){if(W){function gt(At){var Et=At.getValue();et(Et),Di(new Date().getTime()),At.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),st&&st(Et)}return W.on("change",gt),function(){W.off("change",gt)}}},[W,st]),Object(v.useEffect)(function(){W&&(ze==null?(W.setValue(""),et("")):ze!==W.getValue()&&(W.setValue(ze),et(ze),W.setCursor(W.lineCount(),0)))},[W,ze]);var Vi=Object(v.useCallback)(function(gt){var At=W.getCursor(),Et=W.getSelection(),Dt=Et.split(`
`);switch(gt){case"bold":return W.replaceSelection("**"+Et+"**"),Et===""&&W.setCursor(At.line,At.ch+2),W.focus();case"italic":return W.replaceSelection("*"+Et+"*"),Et===""&&W.setCursor(At.line,At.ch+1),W.focus();case"code":return W.replaceSelection("`"+Et+"`"),Et===""&&W.setCursor(At.line,At.ch+1),W.focus();case"inline-latex":return W.replaceSelection("`$$"+Et+"$$`"),Et===""&&W.setCursor(At.line,At.ch+3),W.focus();case"latex":return W.replaceSelection("```latex\n"+Et+"\n```"),W.setCursor(At.line+1,Et.length+1),W.focus();case"line-break":return W.replaceSelection(`
`),W.focus();case"list-ul":return Et===""?W.replaceSelection("- "+Et):W.replaceSelection(Dt.map(function(Bt){return Bt===""?"":"- ".concat(Bt)}).join(`
`)),W.focus();case"list-ol":return Et===""?W.replaceSelection("1. "+Et):W.replaceSelection(Dt.map(function(Bt,Yt){return Bt===""?"":"".concat(Yt+1,". ").concat(Bt)}).join(`
`)),W.focus();case"add-null-ch":return Et===""&&W.setCursor(At.line,At.ch+1),W.replaceSelection(Ue),W.focus();case"inster-template-1":return Et===""&&W.setCursor(At.line,At.ch),W.replaceSelection(He),W.focus();case"eraser":return W.setValue(""),W.focus();case"trigger-watch":return jt(!_t),W.focus();case"trigger-full-screen":return xr(!Er),W.focus();case Le:zr(Le);return;case Ge:zr(Ge);return;case Ie:zr(Ie);return;case Xe:zr(Xe);return;default:throw new Error}},[W,_t,Er]),Ei=Object(v.useCallback)(function(gt){zr("");switch(dr){case Le:var At=gt.title,Et=gt.link;return W.replaceSelection("[".concat(At,"](").concat(Et,")")),W.focus();case Ge:var Dt=gt.language,Bt=gt.content;return W.replaceSelection(["```"+Dt,Bt,"```"].join(`
`)),W.focus();case Ie:var Yt=gt.src,Nt=gt.alt;return Nt?W.replaceSelection(".concat(Yt,' "').concat(Nt,'" )')):W.replaceSelection("")),W.focus();case Xe:for(var ur=gt.row,Dr=gt.col,Mt=gt.align,hi=`
`,Wt=0;Wt300&&(ur=300);var Dr=St+ur+"px";Zr(Dr)}}return gt.addEventListener("mousedown",Dt),document.addEventListener("mousemove",Yt),document.addEventListener("mouseup",Bt),function(){gt.removeEventListener("mousedown",Dt),document.removeEventListener("mousemove",Yt),document.removeEventListener("mouseup",Bt)}}},[W,Kt]),Object(v.useEffect)(function(){Zr(St)},[St]);var ni=Te(ft),fn=Te(zi),qr={width:ni,height:fn},pn=Object(v.useMemo)(function(){if(Hr){var gt=new Date(Hr),At=gt.getHours(),Et=gt.getMinutes(),Dt=gt.getSeconds();return At=At<10?"0"+At:At,Et=Et<10?"0"+Et:Et,Dt=Dt<10?"0"+Dt:Dt,"".concat(At,":").concat(Et,":").concat(Dt)}return 0},[Hr]);function jn(){window.sessionStorage.removeItem(Lr),_i(!1),Di(0)}function ki(){_i(!1),Di(0),W.setValue(window.sessionStorage.getItem(Lr))}function ua(gt,At){var Et=W.getValue();Et=Et.replace(gt,At),et(Et),W==null||W.setValue(Et)}return m.a.createElement(v.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:ar},m.a.createElement("div",{className:"markdown-editor-container ".concat($e," ").concat(_t?"on-preview":""," ").concat(Ut?"mini":""," ").concat(Er?"full-screen":""),style:qr},m.a.createElement(b,{insertTemp:It,watch:_t,fullScreen:Er,showNullButton:Pt,onActionCallback:Vi,hidetoolBar:Ur,uuid:ir.current,setOpenPhones:function(){Ht.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:kt,placeholder:gi})),_t?m.a.createElement("div",{ref:ii,className:"preview-container"},Kr==="stex"&&m.a.createElement(D,{value:Ke}),Kr!=="stex"&&m.a.createElement(C.a,{edit:!0,value:Ke,replaces:ua})):null))),xt?m.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,m.a.createElement(U.a,null,de[dr]?m.a.createElement(J.a,{centered:!0,title:de[dr],visible:!0,onCancel:xi,footer:null,className:"markdown-popup-form"},dn):null))}},SJMd:function(nt,xe){/**
* @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 Z,ne,J,P=!1,X,j;window.PR_SHOULD_USE_CONTINUATION=!0;var B,K;(function(){var G=window,r=["break,continue,do,else,for,if,return,while"],L=[r,"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"],v=[L,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[v,"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"],p=[v,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[v,"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"],l="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",f=[v,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="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",u=[r,"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"],a=[r,"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"],s=[r,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[m,h,p,f,o,u,a,s],_=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,C="str",D="kwd",O="com",A="typ",S="lit",T="pun",c="pln",w="tag",y="dec",b="src",U="atn",F="atv",E="nocode",N="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function I(Re){for(var Pe=0,je=!1,ue=!1,Ee=0,Le=Re.length;Ee122||(ae<65||be>90||ut.push([Math.max(65,be)|32,Math.min(ae,90)|32]),ae<97||be>122||ut.push([Math.max(97,be)&~32,Math.min(ae,122)&~32]))}}ut.sort(function(we,Fe){return we[0]-Fe[0]||Fe[1]-we[1]});for(var le=[],de=[],He=0;Hege[0]&&(ge[1]+1>ge[0]&&Ue.push("-"),Ue.push(Je(ge[1])))}return Ue.push("]"),Ue.join("")}function at(tt){for(var Be=tt.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")),ut=Be.length,ot=[],Ue=0,He=0;Ue=2&&be==="["?Be[Ue]=Qe(Te):be!=="\\"&&(Be[Ue]=Te.replace(/[a-zA-Z]/g,function(de){var ge=de.charCodeAt(0);return"["+String.fromCharCode(ge&~32,ge|32)+"]"}))}return Be.join("")}for(var qe=[],Ee=0,Le=Re.length;Ee=0;)je[qe.charAt(tt)]=at;var Be=at[1],ut=""+Be;Xe.hasOwnProperty(ut)||(Ge.push(Be),Xe[ut]=null)}Ge.push(/[\0-\uffff]/),ue=I(Ge)})();var Ee=Pe.length,Le=function(Ie){for(var Ge=Ie.sourceCode,Xe=Ie.basePos,Je=Ie.sourceNode,Qe=[Xe,c],at=0,qe=Ge.match(ue)||[],tt={},Be=0,ut=qe.length;Be=5&&Ue.substring(0,5)==="lang-",Te&&!(He&&typeof He[1]=="string")&&(Te=!1,Ue=b),Te||(tt[ot]=Ue)}var ae=at;if(at+=ot.length,!Te)Qe.push(Xe+ae,Ue);else{var le=He[1],de=ot.indexOf(le),ge=de+le.length;He[2]&&(ge=ot.length-He[2].length,de=ge-le.length);var we=Ue.substring(5);H(Je,Xe+ae,ot.substring(0,de),Le,Qe),H(Je,Xe+ae+de,le,ce(we,le),Qe),H(Je,Xe+ae+ge,ot.substring(ge),Le,Qe)}}Ie.decorations=Qe};return Le}function Ce(Re){var Pe=[],je=[];Re.tripleQuotedStrings?Pe.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Re.multiLineStrings?Pe.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Pe.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Re.verbatimStrings&&je.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ue=Re.hashComments;ue&&(Re.cStyleComments?(ue>1?Pe.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Pe.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),je.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Pe.push([O,/^#[^\r\n]*/,null,"#"])),Re.cStyleComments&&(je.push([O,/^\/\/[^\r\n]*/,null]),je.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ee=Re.regexLiterals;if(Ee){var Le=Ee>1?"":`
\r`,Ie=Le?".":"[\\S\\s]",Ge="/(?=[^/*"+Le+"])(?:[^/\\x5B\\x5C"+Le+"]|\\x5C"+Ie+"|\\x5B(?:[^\\x5C\\x5D"+Le+"]|\\x5C"+Ie+")*(?:\\x5D|$))+/";je.push(["lang-regex",RegExp("^"+N+"("+Ge+")")])}var Xe=Re.types;Xe&&je.push([A,Xe]);var Je=(""+Re.keywords).replace(/^ | $/g,"");Je.length&&je.push([D,new RegExp("^(?:"+Je.replace(/[\s,]+/g,"|")+")\\b"),null]),Pe.push([c,/^\s+/,null,` \r
\xA0`]);var Qe="^.[^\\s\\w.$@'\"`/\\\\]*";return Re.regexLiterals&&(Qe+="(?!s*/)"),je.push([S,/^@[a-z_$][a-z_$@0-9]*/i,null],[A,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[S,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[T,new RegExp(Qe),null]),oe(Pe,je)}var ve=Ce({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Se(Re,Pe,je){for(var ue=/(?:^|\s)nocode(?:\s|$)/,Ee=/\r\n?|\n/,Le=Re.ownerDocument,Ie=Le.createElement("li");Re.firstChild;)Ie.appendChild(Re.firstChild);var Ge=[Ie];function Xe(Be){var ut=Be.nodeType;if(ut==1&&!ue.test(Be.className))if(Be.nodeName==="br")Je(Be),Be.parentNode&&Be.parentNode.removeChild(Be);else for(var ot=Be.firstChild;ot;ot=ot.nextSibling)Xe(ot);else if((ut==3||ut==4)&&je){var Ue=Be.nodeValue,He=Ue.match(Ee);if(He){var Te=Ue.substring(0,He.index);Be.nodeValue=Te;var me=Ue.substring(He.index+He[0].length);if(me){var be=Be.parentNode;be.insertBefore(Le.createTextNode(me),Be.nextSibling)}Je(Be),Te||Be.parentNode.removeChild(Be)}}}function Je(Be){for(;!Be.nextSibling;)if(Be=Be.parentNode,!Be)return;function ut(He,Te){var me=Te?He.cloneNode(!1):He,be=He.parentNode;if(be){var ae=ut(be,1),le=He.nextSibling;ae.appendChild(me);for(var de=le;de;de=le)le=de.nextSibling,ae.appendChild(de)}return me}for(var ot=ut(Be.nextSibling,0),Ue;(Ue=ot.parentNode)&&Ue.nodeType===1;)ot=Ue;Ge.push(ot)}for(var Qe=0;Qe=be&&(Xe+=2),Le>=ae&&(at+=2)}}finally{Ue&&(Ue.style.display=He)}}var Oe={};function he(Re,Pe){for(var je=Pe.length;--je>=0;){var ue=Pe[je];Oe.hasOwnProperty(ue)?G.console&&console.warn("cannot override language handler %s",ue):Oe[ue]=Re}}function ce(Re,Pe){return Re&&Oe.hasOwnProperty(Re)||(Re=/^\s*]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[T,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^