(window.webpackJsonp=window.webpackJsonp||[]).push([[212,5,6,7,8,14],{"+NIl":function(H,J,I){(function(N){N(I("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(g,S){"use strict";function k(n,o){n.cmdState.push(o)}function y(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function m(n){var o=n.cmdState.pop();o&&o.closeBracket()}function C(n){for(var o=n.cmdState,h=o.length-1;h>=0;h--){var d=o[h];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function _(n,o,h){return function(){this.name=n,this.bracketNo=0,this.style=o,this.styles=h,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var e={};e.importmodule=_("importmodule","tag",["string","builtin"]),e.documentclass=_("documentclass","tag",["","atom"]),e.usepackage=_("usepackage","tag",["atom"]),e.begin=_("begin","tag",["atom"]),e.end=_("end","tag",["atom"]),e.label=_("label","tag",["atom"]),e.ref=_("ref","tag",["atom"]),e.eqref=_("eqref","tag",["atom"]),e.cite=_("cite","tag",["atom"]),e.bibitem=_("bibitem","tag",["atom"]),e.Bibitem=_("Bibitem","tag",["atom"]),e.RBibitem=_("RBibitem","tag",["atom"]),e.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function f(n,o){n.f=o}function r(n,o){var h;if(n.match(/^\\[a-zA-Z@]+/)){var d=n.current().slice(1);return h=e.hasOwnProperty(d)?e[d]:e.DEFAULT,h=new h,k(o,h),f(o,i),h.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return f(o,function(s,l){return c(s,l,"\\]")}),"keyword";if(n.match("\\("))return f(o,function(s,l){return c(s,l,"\\)")}),"keyword";if(n.match("$$"))return f(o,function(s,l){return c(s,l,"$$")}),"keyword";if(n.match("$"))return f(o,function(s,l){return c(s,l,"$")}),"keyword";var u=n.next();if(u=="%")return n.skipToEnd(),"comment";if(u=="}"||u=="]"){if(h=y(o),h)h.closeBracket(u),f(o,i);else return"error";return"bracket"}else return u=="{"||u=="["?(h=e.DEFAULT,h=new h,k(o,h),"bracket"):/\d/.test(u)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),h=C(o),h.name=="begin"&&(h.argument=n.current()),h.styleIdentifier())}function c(n,o,h){if(n.eatSpace())return null;if(h&&n.match(h))return f(o,r),"keyword";if(n.match(/^\\[a-zA-Z@]+/))return"tag";if(n.match(/^[a-zA-Z]+/))return"variable-2";if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/]/))return"tag";if(n.match(/^[\^_&]/))return"tag";if(n.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(n.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=n.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(n.skipToEnd(),"comment"):"error"}function i(n,o){var h=n.peek(),d;return h=="{"||h=="["?(d=y(o),d.openBracket(h),n.eat(h),f(o,r),"bracket"):/[ \t\r]/.test(h)?(n.eat(h),null):(f(o,r),m(o),r(n,o))}return{startState:function(){var n=S.inMathMode?function(o,h){return c(o,h)}:r;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,o){return o.f(n,o)},blankLine:function(n){n.f=r,n.cmdState.length=0},lineComment:"%"}}),N.defineMIME("text/x-stex","stex"),N.defineMIME("text/x-latex","stex")})},"+ua5":function(H,J,I){},"/cxE":function(H,J,I){"use strict";I.d(J,"f",function(){return S}),I.d(J,"g",function(){return k}),I.d(J,"h",function(){return y}),I.d(J,"e",function(){return C}),I.d(J,"b",function(){return _}),I.d(J,"c",function(){return e}),I.d(J,"d",function(){return f}),I.d(J,"a",function(){return r});class N{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+`
`+c.stack):c},0)}}emit(c){this.listeners.forEach(i=>{i(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}const g=new N;function S(c){C(c)||g.onUnexpectedError(c);return}function k(c){C(c)||g.onUnexpectedExternalError(c);return}function y(c){if(c instanceof Error){let{name:i,message:n}=c;const o=c.stacktrace||c.stack;return{$isError:!0,name:i,message:n,stack:o}}return c}const m="Canceled";function C(c){return c instanceof Error&&c.name===m&&c.message===m}function _(){const c=new Error(m);return c.name=c.message,c}function e(c){return c?new Error(`Illegal argument: ${c}`):new Error("Illegal argument")}function f(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}class r extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}},"19Vz":function(H,J,I){(function(N){N(I("VrN/"))})(function(N){N.defineOption("placeholder","",function(_,e,f){var r=f&&f!=N.Init;if(e&&!r)_.on("blur",y),_.on("change",m),_.on("swapDoc",m),N.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){k(_)}),m(_);else if(!e&&r){_.off("blur",y),_.off("change",m),_.off("swapDoc",m),N.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),g(_);var c=_.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}e&&!_.hasFocus()&&y(_)});function g(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function S(_){g(_);var e=_.state.placeholder=document.createElement("pre");e.style.cssText="height: 0; overflow: visible",e.style.direction=_.getOption("direction"),e.className="CodeMirror-placeholder CodeMirror-line-like";var f=_.getOption("placeholder");typeof f=="string"&&(f=document.createTextNode(f)),e.appendChild(f),_.display.lineSpace.insertBefore(e,_.display.lineSpace.firstChild)}function k(_){setTimeout(function(){var e=!1,f=_.getInputField();f.nodeName=="TEXTAREA"?e=!f.value:_.lineCount()==1&&(e=!/[^\u200b]/.test(f.querySelector(".CodeMirror-line").textContent)),e?S(_):g(_)},20)}function y(_){C(_)&&S(_)}function m(_){var e=_.getWrapperElement(),f=C(_);e.className=e.className.replace(" CodeMirror-empty","")+(f?" CodeMirror-empty":""),f?S(_):g(_)}function C(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1T2W":function(H,J,I){H.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(H,J,I){(function(N){N(I("VrN/"))})(function(N){"use strict";var g={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},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(k,y){var m=k.indentUnit,C={},_=y.htmlMode?g:S;for(var e in _)C[e]=_[e];for(var e in y)C[e]=y[e];var f,r;function c(T,F){function P(K){return F.tokenize=K,K(T,F)}var A=T.next();if(A=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?P(o("atom","]]>")):null:T.match("--")?P(o("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),P(h(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),F.tokenize=o("meta","?>"),"meta"):(f=T.eat("/")?"closeTag":"openTag",F.tokenize=i,"tag bracket");if(A=="&"){var z;return T.eat("#")?T.eat("x")?z=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):z=T.eatWhile(/[\d]/)&&T.eat(";"):z=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),z?"atom":"error"}else return T.eatWhile(/[^&<]/),null}c.isInText=!0;function i(T,F){var P=T.next();if(P==">"||P=="/"&&T.eat(">"))return F.tokenize=c,f=P==">"?"endTag":"selfcloseTag","tag bracket";if(P=="=")return f="equals",null;if(P=="<"){F.tokenize=c,F.state=l,F.tagName=F.tagStart=null;var A=F.tokenize(T,F);return A?A+" tag error":"tag error"}else return/[\'\"]/.test(P)?(F.tokenize=n(P),F.stringStartCol=T.column(),F.tokenize(T,F)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(T){var F=function(P,A){for(;!P.eol();)if(P.next()==T){A.tokenize=i;break}return"string"};return F.isInAttribute=!0,F}function o(T,F){return function(P,A){for(;!P.eol();){if(P.match(F)){A.tokenize=c;break}P.next()}return T}}function h(T){return function(F,P){for(var A;(A=F.next())!=null;){if(A=="<")return P.tokenize=h(T+1),P.tokenize(F,P);if(A==">")if(T==1){P.tokenize=c;break}else return P.tokenize=h(T-1),P.tokenize(F,P)}return"meta"}}function d(T,F,P){this.prev=T.context,this.tagName=F,this.indent=T.indented,this.startOfLine=P,(C.doNotIndent.hasOwnProperty(F)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function u(T){T.context&&(T.context=T.context.prev)}function s(T,F){for(var P;;){if(!T.context)return;if(P=T.context.tagName,!C.contextGrabbers.hasOwnProperty(P)||!C.contextGrabbers[P].hasOwnProperty(F))return;u(T)}}function l(T,F,P){return T=="openTag"?(P.tagStart=F.column(),E):T=="closeTag"?b:l}function E(T,F,P){return T=="word"?(P.tagName=F.current(),r="tag",R):C.allowMissingTagName&&T=="endTag"?(r="tag bracket",R(T,F,P)):(r="error",E)}function b(T,F,P){if(T=="word"){var A=F.current();return P.context&&P.context.tagName!=A&&C.implicitlyClosed.hasOwnProperty(P.context.tagName)&&u(P),P.context&&P.context.tagName==A||C.matchClosing===!1?(r="tag",p):(r="tag error",L)}else return C.allowMissingTagName&&T=="endTag"?(r="tag bracket",p(T,F,P)):(r="error",L)}function p(T,F,P){return T!="endTag"?(r="error",p):(u(P),l)}function L(T,F,P){return r="error",p(T,F,P)}function R(T,F,P){if(T=="word")return r="attribute",v;if(T=="endTag"||T=="selfcloseTag"){var A=P.tagName,z=P.tagStart;return P.tagName=P.tagStart=null,T=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(A)?s(P,A):(s(P,A),P.context=new d(P,A,z==P.indented)),l}return r="error",R}function v(T,F,P){return T=="equals"?x:(C.allowMissing||(r="error"),R(T,F,P))}function x(T,F,P){return T=="string"?w:T=="word"&&C.allowUnquoted?(r="string",R):(r="error",R(T,F,P))}function w(T,F,P){return T=="string"?w:R(T,F,P)}return{startState:function(T){var F={tokenize:c,state:l,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(F.baseIndent=T),F},token:function(T,F){if(!F.tagName&&T.sol()&&(F.indented=T.indentation()),T.eatSpace())return null;f=null;var P=F.tokenize(T,F);return(P||f)&&P!="comment"&&(r=null,F.state=F.state(f||P,T,F),r&&(P=r=="error"?P+" error":r)),P},indent:function(T,F,P){var A=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+m;if(A&&A.noIndent)return N.Pass;if(T.tokenize!=i&&T.tokenize!=c)return P?P.match(/^(\s*)/)[0].length:0;if(T.tagName)return C.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+m*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(T){T.state==x&&(T.state=R)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var F=[],P=T.context;P;P=P.prev)P.tagName&&F.push(P.tagName);return F.reverse()}}}),N.defineMIME("text/xml","xml"),N.defineMIME("application/xml","xml"),N.mimeModes.hasOwnProperty("text/html")||N.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("MlIO"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Hasher,y=g.x64,m=y.Word,C=y.WordArray,_=g.algo;function e(){return m.create.apply(m,arguments)}var f=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],r=[];(function(){for(var i=0;i<80;i++)r[i]=e()})();var c=_.SHA512=k.extend({_doReset:function(){this._hash=new C.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(i,n){for(var o=this._hash.words,h=o[0],d=o[1],u=o[2],s=o[3],l=o[4],E=o[5],b=o[6],p=o[7],L=h.high,R=h.low,v=d.high,x=d.low,w=u.high,T=u.low,F=s.high,P=s.low,A=l.high,z=l.low,K=E.high,O=E.low,B=b.high,U=b.low,D=p.high,W=p.low,Q=L,re=R,ee=v,ye=x,be=w,he=T,Ie=F,Se=P,fe=A,ue=z,ie=K,Ce=O,ne=B,ce=U,Ae=D,oe=W,q=0;q<80;q++){var $,X,de=r[q];if(q<16)X=de.high=i[n+q*2]|0,$=de.low=i[n+q*2+1]|0;else{var pe=r[q-15],xe=pe.high,Ke=pe.low,qe=(xe>>>1|Ke<<31)^(xe>>>8|Ke<<24)^xe>>>7,tt=(Ke>>>1|xe<<31)^(Ke>>>8|xe<<24)^(Ke>>>7|xe<<25),et=r[q-2],it=et.high,at=et.low,je=(it>>>19|at<<13)^(it<<3|at>>>29)^it>>>6,De=(at>>>19|it<<13)^(at<<3|it>>>29)^(at>>>6|it<<26),nt=r[q-7],lt=nt.high,Ve=nt.low,Qe=r[q-16],Fe=Qe.high,Re=Qe.low;$=tt+Ve,X=qe+lt+($>>>0>>0?1:0),$=$+De,X=X+je+($>>>0>>0?1:0),$=$+Re,X=X+Fe+($>>>0>>0?1:0),de.high=X,de.low=$}var Me=fe&ie^~fe&ne,Ee=ue&Ce^~ue&ce,Oe=Q&ee^Q&be^ee&be,ke=re&ye^re&he^ye&he,Ne=(Q>>>28|re<<4)^(Q<<30|re>>>2)^(Q<<25|re>>>7),He=(re>>>28|Q<<4)^(re<<30|Q>>>2)^(re<<25|Q>>>7),rt=(fe>>>14|ue<<18)^(fe>>>18|ue<<14)^(fe<<23|ue>>>9),ct=(ue>>>14|fe<<18)^(ue>>>18|fe<<14)^(ue<<23|fe>>>9),yt=f[q],ht=yt.high,pt=yt.low,Dt=oe+ct,At=Ae+rt+(Dt>>>0>>0?1:0),Dt=Dt+Ee,At=At+Me+(Dt>>>0>>0?1:0),Dt=Dt+pt,At=At+ht+(Dt>>>0>>0?1:0),Dt=Dt+$,At=At+X+(Dt>>>0<$>>>0?1:0),bt=He+ke,Xt=Ne+Oe+(bt>>>0>>0?1:0);Ae=ne,oe=ce,ne=ie,ce=Ce,ie=fe,Ce=ue,ue=Se+Dt|0,fe=Ie+At+(ue>>>0>>0?1:0)|0,Ie=be,Se=he,be=ee,he=ye,ee=Q,ye=re,re=Dt+bt|0,Q=At+Xt+(re>>>0>>0?1:0)|0}R=h.low=R+re,h.high=L+Q+(R>>>0>>0?1:0),x=d.low=x+ye,d.high=v+ee+(x>>>0>>0?1:0),T=u.low=T+he,u.high=w+be+(T>>>0>>0?1:0),P=s.low=P+Se,s.high=F+Ie+(P>>>0>>0?1:0),z=l.low=z+ue,l.high=A+fe+(z>>>0>>0?1:0),O=E.low=O+Ce,E.high=K+ie+(O>>>0>>0?1:0),U=b.low=U+ce,b.high=B+ne+(U>>>0>>0?1:0),W=p.low=W+oe,p.high=D+Ae+(W>>>0>>0?1:0)},_doFinalize:function(){var i=this._data,n=i.words,o=this._nDataBytes*8,h=i.sigBytes*8;n[h>>>5]|=128<<24-h%32,n[(h+128>>>10<<5)+30]=Math.floor(o/4294967296),n[(h+128>>>10<<5)+31]=o,i.sigBytes=n.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var i=k.clone.call(this);return i._hash=this._hash.clone(),i},blockSize:1024/32});g.SHA512=k._createHelper(c),g.HmacSHA512=k._createHmacHelper(c)}(),N.SHA512})},"24hK":function(H,J,I){"use strict";I.d(J,"a",function(){return g});class N{constructor(S){this.element=S,this.next=N.Undefined,this.prev=N.Undefined}}N.Undefined=new N(void 0);class g{constructor(){this._first=N.Undefined,this._last=N.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===N.Undefined}clear(){let S=this._first;for(;S!==N.Undefined;){const k=S.next;S.prev=N.Undefined,S.next=N.Undefined,S=k}this._first=N.Undefined,this._last=N.Undefined,this._size=0}unshift(S){return this._insert(S,!1)}push(S){return this._insert(S,!0)}_insert(S,k){const y=new N(S);if(this._first===N.Undefined)this._first=y,this._last=y;else if(k){const C=this._last;this._last=y,y.prev=C,C.next=y}else{const C=this._first;this._first=y,y.next=C,C.prev=y}this._size+=1;let m=!1;return()=>{m||(m=!0,this._remove(y))}}shift(){if(this._first===N.Undefined)return;{const S=this._first.element;return this._remove(this._first),S}}pop(){if(this._last===N.Undefined)return;{const S=this._last.element;return this._remove(this._last),S}}_remove(S){if(S.prev!==N.Undefined&&S.next!==N.Undefined){const k=S.prev;k.next=S.next,S.next.prev=k}else S.prev===N.Undefined&&S.next===N.Undefined?(this._first=N.Undefined,this._last=N.Undefined):S.next===N.Undefined?(this._last=this._last.prev,this._last.next=N.Undefined):S.prev===N.Undefined&&(this._first=this._first.next,this._first.prev=N.Undefined);this._size-=1}*[Symbol.iterator](){let S=this._first;for(;S!==N.Undefined;)yield S.element,S=S.next}}},"3/fG":function(H,J,I){"use strict";I.d(J,"a",function(){return g});function N(S,k){let y;return k.length===0?y=S:y=S.replace(/\{(\d+)\}/g,function(m,C){const _=C[0];return typeof k[_]!="undefined"?k[_]:m}),y}function g(S,k,...y){return N(k,y)}},"3y9D":function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,y=S.Hasher,m=g.algo,C=[],_=m.SHA1=y.extend({_doReset:function(){this._hash=new k.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,f){for(var r=this._hash.words,c=r[0],i=r[1],n=r[2],o=r[3],h=r[4],d=0;d<80;d++){if(d<16)C[d]=e[f+d]|0;else{var u=C[d-3]^C[d-8]^C[d-14]^C[d-16];C[d]=u<<1|u>>>31}var s=(c<<5|c>>>27)+h+C[d];d<20?s+=(i&n|~i&o)+1518500249:d<40?s+=(i^n^o)+1859775393:d<60?s+=(i&n|i&o|n&o)-1894007588:s+=(i^n^o)-899497514,h=o,o=n,n=i<<30|i>>>2,i=c,c=s}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+n|0,r[3]=r[3]+o|0,r[4]=r[4]+h|0},_doFinalize:function(){var e=this._data,f=e.words,r=this._nDataBytes*8,c=e.sigBytes*8;return f[c>>>5]|=128<<24-c%32,f[(c+64>>>9<<4)+14]=Math.floor(r/4294967296),f[(c+64>>>9<<4)+15]=r,e.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var e=y.clone.call(this);return e._hash=this._hash.clone(),e}});g.SHA1=y._createHelper(_),g.HmacSHA1=y._createHmacHelper(_)}(),N.SHA1})},4:function(H,J){},"5VLF":function(H,J,I){"use strict";var N,g;function S(k,y,m){var C=function(_,e){return k.js_beautify(_,e)};return C.js=k.js_beautify,C.css=y.css_beautify,C.html=m.html_beautify,C.js_beautify=k.js_beautify,C.css_beautify=y.css_beautify,C.html_beautify=m.html_beautify,C}!(N=[I("6UM0"),I("TXwP"),I("psGv")],g=function(k,y,m){return S(k,y,m)}.apply(J,N),g!==void 0&&(H.exports=g))},"5Y4S":function(H,J,I){"use strict";I.d(J,"a",function(){return S});var N=I("MNsG");const g=N.b.performance&&typeof N.b.performance.now=="function";class S{constructor(k){this._highResolution=g&&k,this._startTime=this._now(),this._stopTime=-1}static create(k=!0){return new S(k)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?N.b.performance.now():Date.now()}}},"5hvy":function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("MlIO"))})(this,function(N){return function(g){var S=N,k=S.lib,y=k.WordArray,m=k.Hasher,C=S.x64,_=C.Word,e=S.algo,f=[],r=[],c=[];(function(){for(var o=1,h=0,d=0;d<24;d++){f[o+5*h]=(d+1)*(d+2)/2%64;var u=h%5,s=(2*o+3*h)%5;o=u,h=s}for(var o=0;o<5;o++)for(var h=0;h<5;h++)r[o+5*h]=h+(2*o+3*h)%5*5;for(var l=1,E=0;E<24;E++){for(var b=0,p=0,L=0;L<7;L++){if(l&1){var R=(1<>>24)&16711935|(l<<24|l>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var b=d[s];b.high^=E,b.low^=l}for(var p=0;p<24;p++){for(var L=0;L<5;L++){for(var R=0,v=0,x=0;x<5;x++){var b=d[L+5*x];R^=b.high,v^=b.low}var w=i[L];w.high=R,w.low=v}for(var L=0;L<5;L++)for(var T=i[(L+4)%5],F=i[(L+1)%5],P=F.high,A=F.low,R=T.high^(P<<1|A>>>31),v=T.low^(A<<1|P>>>31),x=0;x<5;x++){var b=d[L+5*x];b.high^=R,b.low^=v}for(var z=1;z<25;z++){var R,v,b=d[z],K=b.high,O=b.low,B=f[z];B<32?(R=K<>>32-B,v=O<>>32-B):(R=O<>>64-B,v=K<>>64-B);var U=i[r[z]];U.high=R,U.low=v}var D=i[0],W=d[0];D.high=W.high,D.low=W.low;for(var L=0;L<5;L++)for(var x=0;x<5;x++){var z=L+5*x,b=d[z],Q=i[z],re=i[(L+1)%5+5*x],ee=i[(L+2)%5+5*x];b.high=Q.high^~re.high&ee.high,b.low=Q.low^~re.low&ee.low}var b=d[0],ye=c[p];b.high^=ye.high,b.low^=ye.low}},_doFinalize:function(){var o=this._data,h=o.words,d=this._nDataBytes*8,u=o.sigBytes*8,s=this.blockSize*32;h[u>>>5]|=1<<24-u%32,h[(g.ceil((u+1)/s)*s>>>5)-1]|=128,o.sigBytes=h.length*4,this._process();for(var l=this._state,E=this.cfg.outputLength/8,b=E/8,p=[],L=0;L>>24)&16711935|(v<<24|v>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,p.push(x),p.push(v)}return new y.init(p,E)},clone:function(){for(var o=m.clone.call(this),h=o._state=this._state.slice(0),d=0;d<25;d++)h[d]=h[d].clone();return o}});S.SHA3=m._createHelper(n),S.HmacSHA3=m._createHmacHelper(n)}(Math),N.SHA3})},"5nXd":function(H,J,I){var N=I("MFOe"),g=N.slice,S=N.pluck,k=N.each,y=N.bind,m=N.create,C=N.isList,_=N.isFunction,e=N.isObject;H.exports={createStore:c};var f={version:"2.0.12",enabled:!1,get:function(i,n){var o=this.storage.read(this._namespacePrefix+i);return this._deserialize(o,n)},set:function(i,n){return n===void 0?this.remove(i):(this.storage.write(this._namespacePrefix+i,this._serialize(n)),n)},remove:function(i){this.storage.remove(this._namespacePrefix+i)},each:function(i){var n=this;this.storage.each(function(o,h){i.call(n,n._deserialize(o),(h||"").replace(n._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(i){return this._namespacePrefix=="__storejs_"+i+"_"},createStore:function(){return c.apply(this,arguments)},addPlugin:function(i){this._addPlugin(i)},namespace:function(i){return c(this.storage,this.plugins,i)}};function r(){var i=typeof console=="undefined"?null:console;if(!i)return;var n=i.warn?i.warn:i.log;n.apply(i,arguments)}function c(i,n,o){o||(o=""),i&&!C(i)&&(i=[i]),n&&!C(n)&&(n=[n]);var h=o?"__storejs_"+o+"_":"",d=o?new RegExp("^"+h):null,u=/^[a-zA-Z0-9_\-]*$/;if(!u.test(o))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var s={_namespacePrefix:h,_namespaceRegexp:d,_testStorage:function(E){try{var b="__storejs__test__";E.write(b,b);var p=E.read(b)===b;return E.remove(b),p}catch(L){return!1}},_assignPluginFnProp:function(E,b){var p=this[b];this[b]=function(){var R=g(arguments,0),v=this;function x(){return p?(k(arguments,function(T,F){R[F]=T}),p.apply(v,R)):void 0}var w=[x].concat(R);return E.apply(v,w)}},_serialize:function(E){return JSON.stringify(E)},_deserialize:function(E,b){if(!E)return b;var p="";try{p=JSON.parse(E)}catch(L){p=E}return p!==void 0?p:b},_addStorage:function(E){if(this.enabled)return;this._testStorage(E)&&(this.storage=E,this.enabled=!0)},_addPlugin:function(E){var b=this;if(C(E)){k(E,function(R){b._addPlugin(R)});return}var p=S(this.plugins,function(R){return E===R});if(p)return;if(this.plugins.push(E),!_(E))throw new Error("Plugins must be function values that return objects");var L=E.call(this);if(!e(L))throw new Error("Plugins must return an object of function properties");k(L,function(R,v){if(!_(R))throw new Error("Bad plugin property: "+v+" from plugin "+E.name+". Plugins should only return functions.");b._assignPluginFnProp(R,v)})},addStorage:function(E){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(E)}},l=m(s,f,{plugins:[]});return l.raw={},k(l,function(E,b){_(E)&&(l.raw[b]=y(l,E))}),k(i,function(E){l._addStorage(E)}),k(n,function(E){l._addPlugin(E)}),l}},"6+eU":function(H,J,I){"use strict";I.d(J,"a",function(){return p});var N=I("wx14"),g=I("rePB"),S=I("VTBJ"),k=I("1OyB"),y=I("vuIU"),m=I("Ji7U"),C=I("LK+K"),_=I("q1tI"),e=I.n(_),f=I("TSYQ"),r=I.n(f),c=function(R){var v,x="".concat(R.rootPrefixCls,"-item"),w=r()(x,"".concat(x,"-").concat(R.page),(v={},Object(g.a)(v,"".concat(x,"-active"),R.active),Object(g.a)(v,R.className,!!R.className),Object(g.a)(v,"".concat(x,"-disabled"),!R.page),v)),T=function(){R.onClick(R.page)},F=function(A){R.onKeyPress(A,R.onClick,R.page)};return e.a.createElement("li",{title:R.showTitle?R.page:null,className:w,onClick:T,onKeyPress:F,tabIndex:"0"},R.itemRender(R.page,"page",e.a.createElement("a",{rel:"nofollow"},R.page)))},i=c,n={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(L){Object(m.a)(v,L);var R=Object(C.a)(v);function v(){var x;Object(k.a)(this,v);for(var w=arguments.length,T=new Array(w),F=0;F=0||P.relatedTarget.className.indexOf("".concat(O,"-next"))>=0))return;x.setState({goInputText:""}),K(x.getValidValue())},x.go=function(P){var A=x.state.goInputText;if(A==="")return;(P.keyCode===n.ENTER||P.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(y.a)(v,[{key:"getValidValue",value:function(){var w=this.state,T=w.goInputText,F=w.current;return!T||isNaN(T)?F:Number(T)}},{key:"getPageSizeOptions",value:function(){var w=this.props,T=w.pageSize,F=w.pageSizeOptions;return F.some(function(P){return P.toString()===T.toString()})?F:F.concat([T.toString()]).sort(function(P,A){var z=isNaN(Number(P))?0:Number(P),K=isNaN(Number(A))?0:Number(A);return z-K})}},{key:"render",value:function(){var w=this,T=this.props,F=T.pageSize,P=T.locale,A=T.rootPrefixCls,z=T.changeSize,K=T.quickGo,O=T.goButton,B=T.selectComponentClass,U=T.buildOptionText,D=T.selectPrefixCls,W=T.disabled,Q=this.state.goInputText,re="".concat(A,"-options"),ee=B,ye=null,be=null,he=null;if(!z&&!K)return null;var Ie=this.getPageSizeOptions();if(z&&ee){var Se=Ie.map(function(fe,ue){return e.a.createElement(ee.Option,{key:ue,value:fe.toString()},(U||w.buildOptionText)(fe))});ye=e.a.createElement(ee,{disabled:W,prefixCls:D,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(F||Ie[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ue){return ue.parentNode}},Se)}return K&&(O&&(he=typeof O=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:W,className:"".concat(re,"-quick-jumper-button")},P.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},O)),be=e.a.createElement("div",{className:"".concat(re,"-quick-jumper")},P.jump_to,e.a.createElement("input",{disabled:W,type:"text",value:Q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),P.page,he)),e.a.createElement("li",{className:"".concat(re)},ye,be)}}]),v}(e.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=o,d=I("N2Kk");function u(){}function s(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function l(L,R,v){return v}function E(L,R,v){var x=typeof L=="undefined"?R.pageSize:L;return Math.floor((v.total-1)/x)+1}var b=function(L){Object(m.a)(v,L);var R=Object(C.a)(v);function v(x){var w;Object(k.a)(this,v),w=R.call(this,x),w.getJumpPrevPage=function(){return Math.max(1,w.state.current-(w.props.showLessItems?3:5))},w.getJumpNextPage=function(){return Math.min(E(void 0,w.state,w.props),w.state.current+(w.props.showLessItems?3:5))},w.getItemIcon=function(z,K){var O=w.props.prefixCls,B=z||e.a.createElement("button",{type:"button","aria-label":K,className:"".concat(O,"-item-link")});return typeof z=="function"&&(B=e.a.createElement(z,Object(S.a)({},w.props))),B},w.savePaginationNode=function(z){w.paginationNode=z},w.isValid=function(z){return s(z)&&z!==w.state.current},w.shouldDisplayQuickJumper=function(){var z=w.props,K=z.showQuickJumper,O=z.pageSize,B=z.total;return B<=O?!1:K},w.handleKeyDown=function(z){(z.keyCode===n.ARROW_UP||z.keyCode===n.ARROW_DOWN)&&z.preventDefault()},w.handleKeyUp=function(z){var K=w.getValidValue(z),O=w.state.currentInputValue;K!==O&&w.setState({currentInputValue:K}),z.keyCode===n.ENTER?w.handleChange(K):z.keyCode===n.ARROW_UP?w.handleChange(K-1):z.keyCode===n.ARROW_DOWN&&w.handleChange(K+1)},w.changePageSize=function(z){var K=w.state.current,O=E(z,w.state,w.props);K=K>O?O:K,O===0&&(K=w.state.current),typeof z=="number"&&("pageSize"in w.props||w.setState({pageSize:z}),"current"in w.props||w.setState({current:K,currentInputValue:K})),w.props.onShowSizeChange(K,z),"onChange"in w.props&&w.props.onChange&&w.props.onChange(K,z)},w.handleChange=function(z){var K=w.props.disabled,O=z;if(w.isValid(O)&&!K){var B=E(void 0,w.state,w.props);O>B?O=B:O<1&&(O=1),"current"in w.props||w.setState({current:O,currentInputValue:O});var U=w.state.pageSize;return w.props.onChange(O,U),O}return w.state.current},w.prev=function(){w.hasPrev()&&w.handleChange(w.state.current-1)},w.next=function(){w.hasNext()&&w.handleChange(w.state.current+1)},w.jumpPrev=function(){w.handleChange(w.getJumpPrevPage())},w.jumpNext=function(){w.handleChange(w.getJumpNextPage())},w.hasPrev=function(){return w.state.current>1},w.hasNext=function(){return w.state.current2?O-2:0),U=2;U=F?A=F:A=Number(T),A}},{key:"getShowSizeChanger",value:function(){var w=this.props,T=w.showSizeChanger,F=w.total,P=w.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:F>P}},{key:"renderPrev",value:function(w){var T=this.props,F=T.prevIcon,P=T.itemRender,A=P(w,"prev",this.getItemIcon(F,"prev page")),z=!this.hasPrev();return Object(_.isValidElement)(A)?Object(_.cloneElement)(A,{disabled:z}):A}},{key:"renderNext",value:function(w){var T=this.props,F=T.nextIcon,P=T.itemRender,A=P(w,"next",this.getItemIcon(F,"next page")),z=!this.hasNext();return Object(_.isValidElement)(A)?Object(_.cloneElement)(A,{disabled:z}):A}},{key:"render",value:function(){var w=this,T=this.props,F=T.prefixCls,P=T.className,A=T.style,z=T.disabled,K=T.hideOnSinglePage,O=T.total,B=T.locale,U=T.showQuickJumper,D=T.showLessItems,W=T.showTitle,Q=T.showTotal,re=T.simple,ee=T.itemRender,ye=T.showPrevNextJumpers,be=T.jumpPrevIcon,he=T.jumpNextIcon,Ie=T.selectComponentClass,Se=T.selectPrefixCls,fe=T.pageSizeOptions,ue=this.state,ie=ue.current,Ce=ue.pageSize,ne=ue.currentInputValue;if(K===!0&&O<=Ce)return null;var ce=E(void 0,this.state,this.props),Ae=[],oe=null,q=null,$=null,X=null,de=null,pe=U&&U.goButton,xe=D?1:2,Ke=ie-1>0?ie-1:0,qe=ie+1=xe*2&&ie!==1+2&&(Ae[0]=Object(_.cloneElement)(Ae[0],{className:"".concat(F,"-item-after-jump-prev")}),Ae.unshift(oe)),ce-ie>=xe*2&&ie!==ce-2&&(Ae[Ae.length-1]=Object(_.cloneElement)(Ae[Ae.length-1],{className:"".concat(F,"-item-before-jump-next")}),Ae.push(q)),nt!==1&&Ae.unshift($),lt!==ce&&Ae.push(X)}var Fe=null;Q&&(Fe=e.a.createElement("li",{className:"".concat(F,"-total-text")},Q(O,[O===0?0:(ie-1)*Ce+1,ie*Ce>O?O:ie*Ce])));var Re=!this.hasPrev()||!ce,Me=!this.hasNext()||!ce;return e.a.createElement("ul",Object(N.a)({className:r()(F,P,Object(g.a)({},"".concat(F,"-disabled"),z)),style:A,unselectable:"unselectable",ref:this.savePaginationNode},tt),Fe,e.a.createElement("li",{title:W?B.prev_page:null,onClick:this.prev,tabIndex:Re?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),Re)),"aria-disabled":Re},this.renderPrev(Ke)),Ae,e.a.createElement("li",{title:W?B.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(qe)),e.a.createElement(h,{disabled:z,locale:B,rootPrefixCls:F,selectComponentClass:Ie,selectPrefixCls:Se,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ie,pageSize:Ce,pageSizeOptions:fe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:pe}))}}],[{key:"getDerivedStateFromProps",value:function(w,T){var F={};if("current"in w&&(F.current=w.current,w.current!==T.current&&(F.currentInputValue=F.current)),"pageSize"in w&&w.pageSize!==T.pageSize){var P=T.current,A=E(w.pageSize,T,w);P=P>A?A:P,"current"in w||(F.current=P,F.currentInputValue=P),F.pageSize=w.pageSize}return F}}]),v}(e.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:u,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:u,locale:d.a,style:{},itemRender:l,totalBoundaryShowSizeChanger:50};var p=b},"6RRn":function(H,J,I){"use strict";var N=I("wCXF"),g=I("n6Qo");I.d(J,"b",function(){return g.a});var S=I("IBYe"),k=I("6eGT"),y=I("hW8S");I.d(J,"a",function(){return y.a}),J.c=N.b},"6UM0":function(H,J,I){var N,g;(function(){var S;(function(){"use strict";var y=[function(e,f,r){var c=r(1).Beautifier,i=r(5).Options;function n(o,h){var d=new c(o,h);return d.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new i}},function(e,f,r){var c=r(2).Output,i=r(3).Token,n=r(4),o=r(5).Options,h=r(7).Tokenizer,d=r(7).line_starters,u=r(7).positionable_operators,s=r(7).TOKEN;function l(D,W){return W.indexOf(D)!==-1}function E(D){return D.replace(/^\s+/g,"")}function b(D){for(var W={},Q=0;QQ&&(Q=D.line_indent_level));var re={mode:W,parent:D,last_token:D?D.last_token:new i(s.START_BLOCK,""),last_word:D?D.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:Q,alignment:0,line_indent_level:D?D.line_indent_level:Q,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},B.prototype._reset=function(D){var W=D.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var Q=new h(D,this._options);return this._tokens=Q.tokenize(),D},B.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D,W=this._reset(this._source_text),Q=this._options.eol;this._options.eol==="auto"&&(Q=`
`,W&&n.lineBreak.test(W||"")&&(Q=W.match(n.lineBreak)[0]));for(var re=this._tokens.next();re;)this.handle_token(re),this._last_last_text=this._flags.last_token.text,this._flags.last_token=re,re=this._tokens.next();return D=this._output.get_code(Q),D},B.prototype.handle_token=function(D,W){D.type===s.START_EXPR?this.handle_start_expr(D):D.type===s.END_EXPR?this.handle_end_expr(D):D.type===s.START_BLOCK?this.handle_start_block(D):D.type===s.END_BLOCK?this.handle_end_block(D):D.type===s.WORD?this.handle_word(D):D.type===s.RESERVED?this.handle_word(D):D.type===s.SEMICOLON?this.handle_semicolon(D):D.type===s.STRING?this.handle_string(D):D.type===s.EQUALS?this.handle_equals(D):D.type===s.OPERATOR?this.handle_operator(D):D.type===s.COMMA?this.handle_comma(D):D.type===s.BLOCK_COMMENT?this.handle_block_comment(D,W):D.type===s.COMMENT?this.handle_comment(D,W):D.type===s.DOT?this.handle_dot(D):D.type===s.EOF?this.handle_eof(D):D.type===s.UNKNOWN?this.handle_unknown(D,W):this.handle_unknown(D,W)},B.prototype.handle_whitespace_and_comments=function(D,W){var Q=D.newlines,re=this._options.keep_array_indentation&&A(this._flags.mode);if(D.comments_before)for(var ee=D.comments_before.next();ee;)this.handle_whitespace_and_comments(ee,W),this.handle_token(ee,W),ee=D.comments_before.next();if(re)for(var ye=0;ye0,W);else if(this._options.max_preserve_newlines&&Q>this._options.max_preserve_newlines&&(Q=this._options.max_preserve_newlines),this._options.preserve_newlines&&Q>1){this.print_newline(!1,W);for(var be=1;be0&&(!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))},B.prototype.set_mode=function(D){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,D),this._flags=this.create_flags(this._previous_flags,D),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},B.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===T.Statement&&F(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},B.prototype.start_of_object_property=function(){return this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},B.prototype.start_of_statement=function(D){var W=!1;return W=W||L(this._flags.last_token,["var","let","const"])&&D.type===s.WORD,W=W||p(this._flags.last_token,"do"),W=W||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&L(this._flags.last_token,U)&&!D.newlines,W=W||p(this._flags.last_token,"else")&&!(p(D,"if")&&!D.comments_before),W=W||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),W=W||this._flags.last_token.type===s.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(D.text==="--"||D.text==="++")&&this._last_last_text!=="function"&&D.type!==s.WORD&&D.type!==s.RESERVED,W=W||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),W?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(D,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D,L(D,["do","for","if","while"])),!0):!1},B.prototype.handle_start_expr=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D);var W=T.Expression;if(D.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,d)&&(this._output.space_before_token=!0),this.print_token(D),this.set_mode(W),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}W=T.ArrayLiteral,A(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())),l(this._flags.last_token.type,[s.START_EXPR,s.END_EXPR,s.WORD,s.OPERATOR,s.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===s.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,W=T.ForInitializer):l(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=T.Conditional):l(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&D.whitespace_before===""?this._output.space_before_token=!1:(l(this._flags.last_token.text,d)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var Q=this._tokens.peek(-3);if(this._options.space_after_named_function&&Q){var re=this._tokens.peek(-4);L(Q,["async","function"])||Q.text==="*"&&L(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?(Q.text==="{"||Q.text===","||Q.text==="*"&&(re.text==="{"||re.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(D);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(l(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&l(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===s.START_BLOCK?this.print_newline():(this._flags.last_token.type===s.END_EXPR||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===s.COMMA)&&this.allow_wrap_or_preserved_newline(D,D.newlines),this.print_token(D),this.set_mode(W),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},B.prototype.handle_end_expr=function(D){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(D,D.text==="]"&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===s.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(D),this.restore_mode(),F(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===T.Conditional&&(this._previous_flags.mode=T.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},B.prototype.handle_start_block=function(D){this.handle_whitespace_and_comments(D);var W=this._tokens.peek(),Q=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):Q&&(l(Q.text,[":",","])&&l(W.type,[s.STRING,s.WORD,s.RESERVED])||l(W.text,["get","set","..."])&&l(Q.type,[s.WORD,s.RESERVED]))?l(this._last_last_text,["class","interface"])&&!l(Q.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):l(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var re=!W.comments_before&&W.text==="}",ee=re&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var ye=0,be=null;this._flags.inline_frame=!0;do if(ye+=1,be=this._tokens.peek(ye-1),be.newlines){this._flags.inline_frame=!1;break}while(be.type!==s.EOF&&!(be.type===s.END_BLOCK&&be.opened===D))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(ee||this._flags.last_token.type===s.EQUALS||L(this._flags.last_token,R)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(A(this._previous_flags.mode)&&(this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.COMMA)&&((this._flags.last_token.type===s.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(D),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==s.OPERATOR&&this._flags.last_token.type!==s.START_EXPR&&(this._flags.last_token.type===s.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(D),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},B.prototype.handle_end_block=function(D){for(this.handle_whitespace_and_comments(D);this._flags.mode===T.Statement;)this.restore_mode();var W=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!W?this._output.space_before_token=!0:this._options.brace_style==="expand"?W||this.print_newline():W||(A(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(D)},B.prototype.handle_word=function(D){if(D.type===s.RESERVED){if(l(D.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)D.type=s.WORD;else if(D.text==="import"&&l(this._tokens.peek().text,["(","."]))D.type=s.WORD;else if(l(D.text,["as","from"])&&!this._flags.import_block)D.type=s.WORD;else if(this._flags.mode===T.ObjectLiteral){var W=this._tokens.peek();W.text===":"&&(D.type=s.WORD)}}if(this.start_of_statement(D)?L(this._flags.last_token,["var","let","const"])&&D.type===s.WORD&&(this._flags.declaration_statement=!0):D.newlines&&!z(this._flags.mode)&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==s.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(D),this.print_newline()):this.handle_whitespace_and_comments(D),this._flags.do_block&&!this._flags.do_while)if(p(D,"while")){this._output.space_before_token=!0,this.print_token(D),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&&p(D,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===T.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(D,["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(D),this._flags.in_case=!0;return}if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D)),p(D,"function")){(l(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(l(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!D.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,U)?this._output.space_before_token=!0:p(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===s.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(z(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(D),this._flags.last_word=D.text;return}var Q="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?Q="SPACE":L(D,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines?Q="NEWLINE":(Q="SPACE",this._output.space_before_token=!0):Q="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===T.BlockStatement?Q="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&z(this._flags.mode)?Q="SPACE":this._flags.last_token.type===s.STRING?Q="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(l(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&l(this._last_last_text,["{",","]))?Q="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?Q="SPACE":Q="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,Q="NEWLINE"),L(D,d)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Q="SPACE":Q="NEWLINE"),L(D,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var re=this._output.current_line;re.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Q==="NEWLINE"?L(this._flags.last_token,R)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(D,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==s.END_EXPR?(this._flags.last_token.type!==s.START_EXPR||!L(D,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(D,"if")&&p(D.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(D,d)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&A(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Q==="SPACE"&&(this._output.space_before_token=!0);D.previous&&(D.previous.type===s.WORD||D.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(D),this._flags.last_word=D.text,D.type===s.RESERVED&&(D.text==="do"?this._flags.do_block=!0:D.text==="if"?this._flags.if_block=!0:D.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(D,"from")&&(this._flags.import_block=!1))},B.prototype.handle_semicolon=function(D){this.start_of_statement(D)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(D);for(var W=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(W,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(D)},B.prototype.handle_string=function(D){D.text.startsWith("`")&&D.newlines===0&&D.whitespace_before===""&&(D.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(D)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(D),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D):D.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(D.previous.text==="]"||D.previous.text===")")&&D.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(D)},B.prototype.handle_equals=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0},B.prototype.handle_comma=function(D){this.handle_whitespace_and_comments(D,!0),this.print_token(D),this._output.space_before_token=!0,this._flags.declaration_statement?(z(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(D)):this._flags.mode===T.ObjectLiteral||this._flags.mode===T.Statement&&this._flags.parent.mode===T.ObjectLiteral?(this._flags.mode===T.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(D)},B.prototype.handle_operator=function(D){var W=D.text==="*"&&(L(this._flags.last_token,["function","yield"])||l(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),Q=l(D.text,["-","+"])&&(l(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||l(this._flags.last_token.text,d)||this._flags.last_token.text===",");if(!this.start_of_statement(D)){var re=!W;this.handle_whitespace_and_comments(D,re)}if(D.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(D);return}if(D.text==="::"){this.print_token(D);return}if(this._flags.last_token.type===s.OPERATOR&&l(this._options.operator_position,w)&&this.allow_wrap_or_preserved_newline(D),D.text===":"&&this._flags.in_case){this.print_token(D),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==s.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 ee=!0,ye=!0,be=!1;if(D.text===":"?this._flags.ternary_depth===0?ee=!1:(this._flags.ternary_depth-=1,be=!0):D.text==="?"&&(this._flags.ternary_depth+=1),!Q&&!W&&this._options.preserve_newlines&&l(D.text,u)){var he=D.text===":",Ie=he&&be,Se=he&&!be;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!Se,this.print_token(D),(!he||Ie)&&this.allow_wrap_or_preserved_newline(D),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!he||Ie?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(D):this._output.space_before_token=!1,this.print_token(D),this._output.space_before_token=!0;return;case x.preserve_newline:Se||this.allow_wrap_or_preserved_newline(D),ee=!(this._output.just_added_newline()||Se),this._output.space_before_token=ee,this.print_token(D),this._output.space_before_token=!0;return}}if(W){this.allow_wrap_or_preserved_newline(D),ee=!1;var fe=this._tokens.peek();ye=fe&&l(fe.type,[s.WORD,s.RESERVED])}else if(D.text==="...")this.allow_wrap_or_preserved_newline(D),ee=this._flags.last_token.type===s.START_BLOCK,ye=!1;else if(l(D.text,["--","++","!","~"])||Q){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(D),ee=!1,ye=!1,D.newlines&&(D.text==="--"||D.text==="++"||D.text==="~")){var ue=L(this._flags.last_token,R)&&D.newlines;ue&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ue,!0)}this._flags.last_token.text===";"&&z(this._flags.mode)&&(ee=!0),this._flags.last_token.type===s.RESERVED?ee=!0:this._flags.last_token.type===s.END_EXPR?ee=!(this._flags.last_token.text==="]"&&(D.text==="--"||D.text==="++")):this._flags.last_token.type===s.OPERATOR&&(ee=l(D.text,["--","-","++","+"])&&l(this._flags.last_token.text,["--","-","++","+"]),l(D.text,["+","-"])&&l(this._flags.last_token.text,["--","++"])&&(ye=!0)),(this._flags.mode===T.BlockStatement&&!this._flags.inline_frame||this._flags.mode===T.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ee,this.print_token(D),this._output.space_before_token=ye},B.prototype.handle_block_comment=function(D,W){if(this._output.raw){this._output.add_raw_token(D),D.directives&&D.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(D.directives){this.print_newline(!1,W),this.print_token(D),D.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(D.text)&&!D.newlines){this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0;return}else this.print_block_commment(D,W)},B.prototype.print_block_commment=function(D,W){var Q=P(D.text),re,ee=!1,ye=!1,be=D.whitespace_before,he=be.length;if(this.print_newline(!1,W),this.print_token_line_indentation(D),this._output.add_token(Q[0]),this.print_newline(!1,W),Q.length>1){for(Q=Q.slice(1),ee=K(Q,"*"),ye=O(Q,be),ee&&(this._flags.alignment=1),re=0;re=0;n--)if(this.__items[n].match(i))return!0;return!1},f.prototype.set_indent=function(i,n){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},f.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)},f.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},f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.prototype.push=function(i){this.__items.push(i);var n=i.lastIndexOf(`
`);n!==-1?this.__character_count=i.length-n:this.__character_count+=i.length},f.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function r(i,n){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),n=n||"",i.indent_level>0&&(n=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}r.prototype.get_indent_size=function(i,n){var o=this.__base_string_length;return n=n||0,i<0&&(o=0),o+=i*this.__indent_size,o+=n,o},r.prototype.get_indent_string=function(i,n){var o=this.__base_string;return n=n||0,i<0&&(i=0,o=""),n+=i*this.__indent_size,this.__ensure_cache(n),o+=this.__cache[n],o},r.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var i=this.__cache.length,n=0,o="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,o=new Array(n+1).join(this.__indent_string)),i&&(o+=new Array(i+1).join(" ")),this.__cache.push(o)};function c(i,n){this.__indent_cache=new r(i,n),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(i,n){return this.__indent_cache.get_indent_string(i,n)},c.prototype.get_indent_size=function(i,n){return this.__indent_cache.get_indent_size(i,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(i){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return i!==`
`&&(o=o.replace(/[\n]/g,i)),o},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(i,n){return i=i||0,n=n||0,this.next_line.set_indent(i,n),this.__lines.length>1?(this.current_line.set_indent(i,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(i){for(var n=0;n1&&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},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(i,n){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(i)!==0&&h.item(-1)!==n){this.__lines.splice(o+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},e.exports.Output=c},function(e){function f(r,c,i,n){this.type=r,this.text=c,this.comments_before=null,this.newlines=i||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=f},function(e,f){var r="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",i="\\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",n="\\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",o="(?:\\\\u[0-9a-fA-F]{4}|["+r+i+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])*";f.identifier=new RegExp(o+h,"g"),f.identifierStart=new RegExp(o),f.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])+");var d=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;f.newline=/[\n\r\u2028\u2029]/,f.lineBreak=new RegExp(`\r
|`+f.newline.source),f.allLineBreaks=new RegExp(f.lineBreak.source,"g")},function(e,f,r){var c=r(6).Options,i=["before-newline","after-newline","preserve-newline"];function n(o){c.call(this,o,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="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 d=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(" "),v=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),v="\\?\\.(?!\\d) "+v,v=v.replace(/ /g,"|");var x=new RegExp(v),w="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),T=w.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),F=new RegExp("^(?:"+T.join("|")+")$"),P,A=function(K,O){i.call(this,K,O),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var B=new d(this._input),U=new u(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(h.identifier).matching(h.identifierMatch),number:B.matching(b),punct:B.matching(x),comment:B.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:B.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:B.matching(//),include:B.starting_with(/#include/).until_after(h.lineBreak),shebang:B.starting_with(/#!/).until_after(h.lineBreak),xml:B.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:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};A.prototype=new i,A.prototype._is_comment=function(K){return K.type===l.COMMENT||K.type===l.BLOCK_COMMENT||K.type===l.UNKNOWN},A.prototype._is_opening=function(K){return K.type===l.START_BLOCK||K.type===l.START_EXPR},A.prototype._is_closing=function(K,O){return(K.type===l.END_BLOCK||K.type===l.END_EXPR)&&O&&(K.text==="]"&&O.text==="["||K.text===")"&&O.text==="("||K.text==="}"&&O.text==="{")},A.prototype._reset=function(){P=!1},A.prototype._get_next_token=function(K,O){var B=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(l.EOF,""):(B=B||this._read_non_javascript(U),B=B||this._read_string(U),B=B||this._read_word(K),B=B||this._read_singles(U),B=B||this._read_comment(U),B=B||this._read_regexp(U,K),B=B||this._read_xml(U,K),B=B||this._read_punctuation(),B=B||this._create_token(l.UNKNOWN,this._input.next()),B)},A.prototype._read_word=function(K){var O;if(O=this.__patterns.identifier.read(),O!=="")return O=O.replace(h.allLineBreaks,`
`),!(K.type===l.DOT||K.type===l.RESERVED&&(K.text==="set"||K.text==="get"))&&F.test(O)?(O==="in"||O==="of")&&(K.type===l.WORD||K.type===l.STRING)?this._create_token(l.OPERATOR,O):this._create_token(l.RESERVED,O):this._create_token(l.WORD,O);if(O=this.__patterns.number.read(),O!=="")return this._create_token(l.WORD,O)},A.prototype._read_singles=function(K){var O=null;return K==="("||K==="["?O=this._create_token(l.START_EXPR,K):K===")"||K==="]"?O=this._create_token(l.END_EXPR,K):K==="{"?O=this._create_token(l.START_BLOCK,K):K==="}"?O=this._create_token(l.END_BLOCK,K):K===";"?O=this._create_token(l.SEMICOLON,K):K==="."&&L.test(this._input.peek(1))?O=this._create_token(l.DOT,K):K===","&&(O=this._create_token(l.COMMA,K)),O&&this._input.next(),O},A.prototype._read_punctuation=function(){var K=this.__patterns.punct.read();if(K!=="")return K==="="?this._create_token(l.EQUALS,K):K==="?."?this._create_token(l.DOT,K):this._create_token(l.OPERATOR,K)},A.prototype._read_non_javascript=function(K){var O="";if(K==="#"){if(this._is_first_token()&&(O=this.__patterns.shebang.read(),O))return this._create_token(l.UNKNOWN,O.trim()+`
`);if(O=this.__patterns.include.read(),O)return this._create_token(l.UNKNOWN,O.trim()+`
`);K=this._input.next();var B="#";if(this._input.hasNext()&&this._input.testChar(p)){do K=this._input.next(),B+=K;while(this._input.hasNext()&&K!=="#"&&K!=="=");return K==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(B+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(B+="{}",this._input.next(),this._input.next())),this._create_token(l.WORD,B)}this._input.back()}else if(K==="<"&&this._is_first_token()){if(O=this.__patterns.html_comment_start.read(),O){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)O+=this._input.next();return P=!0,this._create_token(l.COMMENT,O)}}else if(P&&K==="-"&&(O=this.__patterns.html_comment_end.read(),O))return P=!1,this._create_token(l.COMMENT,O);return null},A.prototype._read_comment=function(K){var O=null;if(K==="/"){var B="";if(this._input.peek(1)==="*"){B=this.__patterns.block_comment.read();var U=E.get_directives(B);U&&U.ignore==="start"&&(B+=E.readIgnored(this._input)),B=B.replace(h.allLineBreaks,`
`),O=this._create_token(l.BLOCK_COMMENT,B),O.directives=U}else this._input.peek(1)==="/"&&(B=this.__patterns.comment.read(),O=this._create_token(l.COMMENT,B))}return O},A.prototype._read_string=function(K){if(K==="`"||K==="'"||K==='"'){var O=this._input.next();return this.has_char_escapes=!1,K==="`"?O+=this._read_string_recursive("`",!0,"${"):O+=this._read_string_recursive(K),this.has_char_escapes&&this._options.unescape_strings&&(O=z(O)),this._input.peek()===K&&(O+=this._input.next()),O=O.replace(h.allLineBreaks,`
`),this._create_token(l.STRING,O)}return null},A.prototype._allow_regexp_or_xml=function(K){return K.type===l.RESERVED&&s(K.text,["return","case","throw","else","do","typeof","yield"])||K.type===l.END_EXPR&&K.text===")"&&K.opened.previous.type===l.RESERVED&&s(K.opened.previous.text,["if","while","for"])||s(K.type,[l.COMMENT,l.START_EXPR,l.START_BLOCK,l.START,l.END_BLOCK,l.OPERATOR,l.EQUALS,l.EOF,l.SEMICOLON,l.COMMA])},A.prototype._read_regexp=function(K,O){if(K==="/"&&this._allow_regexp_or_xml(O)){for(var B=this._input.next(),U=!1,D=!1;this._input.hasNext()&&(U||D||this._input.peek()!==K)&&!this._input.testChar(h.newline);)B+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?D=!0:this._input.peek()==="]"&&(D=!1)),this._input.next();return this._input.peek()===K&&(B+=this._input.next(),B+=this._input.read(h.identifier)),this._create_token(l.STRING,B)}return null},A.prototype._read_xml=function(K,O){if(this._options.e4x&&K==="<"&&this._allow_regexp_or_xml(O)){var B="",U=this.__patterns.xml.read_match();if(U){for(var D=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=D.indexOf("{")===0,Q=0;U;){var re=!!U[1],ee=U[2],ye=!!U[U.length-1]||ee.slice(0,8)==="![CDATA[";if(!ye&&(ee===D||W&&ee.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--Q:++Q),B+=U[0],Q<=0)break;U=this.__patterns.xml.read_match()}return U||(B+=this._input.match(/[\s\S]*/g)[0]),B=B.replace(h.allLineBreaks,`
`),this._create_token(l.STRING,B)}}return null};function z(K){for(var O="",B=0,U=new c(K),D=null;U.hasNext();)if(D=U.match(/([\s]|[^\\]|\\\\)+/g),D&&(O+=D[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")D=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")D=U.match(/u([0-9A-Fa-f]{4})/g);else{O+="\\",U.hasNext()&&(O+=U.next());continue}if(!D)return K;if(B=parseInt(D[1],16),B>126&&B<=255&&D[0].indexOf("x")===0)return K;if(B>=0&&B<32){O+="\\"+D[0];continue}else B===34||B===39||B===92?O+="\\"+String.fromCharCode(B):O+=String.fromCharCode(B)}return O}A.prototype._read_string_recursive=function(K,O,B){var U,D;K==="'"?D=this.__patterns.single_quote:K==='"'?D=this.__patterns.double_quote:K==="`"?D=this.__patterns.template_text:K==="}"&&(D=this.__patterns.template_expression);for(var W=D.read(),Q="";this._input.hasNext();){if(Q=this._input.next(),Q===K||!O&&h.newline.test(Q)){this._input.back();break}else Q==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
`&&this._input.next(),Q+=this._input.next()):B&&(B==="${"&&Q==="$"&&this._input.peek()==="{"&&(Q+=this._input.next()),B===Q&&(K==="`"?Q+=this._read_string_recursive("}",O,"`"):Q+=this._read_string_recursive("`",O,"${"),this._input.hasNext()&&(Q+=this._input.next())));Q+=D.read(),W+=Q}return W},e.exports.Tokenizer=A,e.exports.TOKEN=l,e.exports.positionable_operators=R.slice(),e.exports.line_starters=w.slice()},function(e){var f=RegExp.prototype.hasOwnProperty("sticky");function r(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&c=0&&i=c.length&&this.__input.substring(i-c.length,i).toLowerCase()===c},e.exports.InputScanner=r},function(e,f,r){var c=r(8).InputScanner,i=r(3).Token,n=r(10).TokenStream,o=r(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},d=function(u,s){this._input=new c(u),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};d.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var u,s=new i(h.START,""),l=null,E=[],b=new n;s.type!==h.EOF;){for(u=this._get_next_token(s,l);this._is_comment(u);)b.add(u),u=this._get_next_token(s,l);b.isEmpty()||(u.comments_before=b,b=new n),u.parent=l,this._is_opening(u)?(E.push(l),l=u):l&&this._is_closing(u,l)&&(u.opened=l,l.closed=u,l=E.pop(),u.parent=l),u.previous=s,s.next=u,this.__tokens.add(u),s=u}return this.__tokens},d.prototype._is_first_token=function(){return this.__tokens.isEmpty()},d.prototype._reset=function(){},d.prototype._get_next_token=function(u,s){this._readWhitespace();var l=this._input.read(/.+/g);return l?this._create_token(h.RAW,l):this._create_token(h.EOF,"")},d.prototype._is_comment=function(u){return!1},d.prototype._is_opening=function(u){return!1},d.prototype._is_closing=function(u,s){return!1},d.prototype._create_token=function(u,s){var l=new i(u,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return l},d.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=d,e.exports.TOKEN=h},function(e){function f(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position=0&&r/),erb:d.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:d.starting_with(/{%/).until_after(/%}/),django_value:d.starting_with(/{{/).until_after(/}}/),django_comment:d.starting_with(/{#/).until_after(/#}/),smarty:d.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:d.starting_with(/{\*/).until_after(/\*}/),smarty_literal:d.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new c,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(o){var h=this._create();return h._disabled[o]=!0,h._update(),h},n.prototype.read_options=function(o){var h=this._create();for(var d in i)h._disabled[d]=o.templating.indexOf(d)===-1;return h._update(),h},n.prototype.exclude=function(o){var h=this._create();return h._excluded[o]=!0,h._update(),h},n.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),o+=h,h=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},n.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},n.prototype._read_template=function(){var o="",h=this._input.peek();if(h==="<"){var d=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&d==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&d==="%"&&(o=o||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},e.exports.TemplatablePattern=n}],m={};function C(e){var f=m[e];if(f!==void 0)return f.exports;var r=m[e]={exports:{}};return y[e](r,r.exports,C),r.exports}var _=C(0);S=_})();var k=S;!(N=[],g=function(){return{js_beautify:k}}.apply(J,N),g!==void 0&&(H.exports=g))})()},"6eGT":function(H,J,I){"use strict";function N(g){return null}J.a=N},"746U":function(H,J,I){"use strict";I.d(J,"f",function(){return N}),I.d(J,"l",function(){return g}),I.d(J,"k",function(){return S}),I.d(J,"j",function(){return k}),I.d(J,"g",function(){return y}),I.d(J,"m",function(){return m}),I.d(J,"h",function(){return C}),I.d(J,"n",function(){return _}),I.d(J,"c",function(){return e}),I.d(J,"a",function(){return f}),I.d(J,"i",function(){return r}),I.d(J,"o",function(){return c}),I.d(J,"e",function(){return o}),I.d(J,"d",function(){return h}),I.d(J,"p",function(){return d}),I.d(J,"b",function(){return u});function N(s){return Array.isArray(s)}function g(s){return typeof s=="string"}function S(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function k(s){return typeof s=="number"&&!isNaN(s)}function y(s){return s===!0||s===!1}function m(s){return typeof s=="undefined"}function C(s){return!_(s)}function _(s){return m(s)||s===null}function e(s,l){if(!s)throw new Error(l?`Unexpected type, expected '${l}'`:"Unexpected type")}function f(s){if(_(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function r(s){return typeof s=="function"}function c(s,l){const E=Math.min(s.length,l.length);for(let b=0;bfunction(){const L=Array.prototype.slice.call(arguments,0);return l(p,L)};let b={};for(const p of s)b[p]=E(p);return b}function d(s){return s===null?void 0:s}function u(s,l="Unreachable"){throw new Error(l)}},"7Cbv":function(H,J,I){"use strict";var N=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),g=new Uint8Array(16);function S(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(g)}var k=/^(?:[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 y(i){return typeof i=="string"&&k.test(i)}for(var m=y,C=[],_=0;_<256;++_)C.push((_+256).toString(16).substr(1));function e(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(C[i[n+0]]+C[i[n+1]]+C[i[n+2]]+C[i[n+3]]+"-"+C[i[n+4]]+C[i[n+5]]+"-"+C[i[n+6]]+C[i[n+7]]+"-"+C[i[n+8]]+C[i[n+9]]+"-"+C[i[n+10]]+C[i[n+11]]+C[i[n+12]]+C[i[n+13]]+C[i[n+14]]+C[i[n+15]]).toLowerCase();if(!m(o))throw TypeError("Stringified UUID is invalid");return o}var f=e;function r(i,n,o){i=i||{};var h=i.random||(i.rng||S)();if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,n){o=o||0;for(var d=0;d<16;++d)n[o+d]=h[d];return n}return f(h)}var c=J.a=r},"7ahc":function(H,J,I){"use strict";I.d(J,"a",function(){return E});var N=I("k1fw"),g=I("0Owb"),S=I("+L6B"),k=I("2/Rp"),y=I("y8nQ"),m=I("Vl3Y"),C=I("tJVT"),_=I("OaEy"),e=I("2fM7"),f=I("q1tI"),r=I.n(f),c=I("VrN/"),i=I.n(c),n=I("p77/"),o=I.n(n),h=I("c5Ni"),d=I.n(h),u=e.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},l={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"]};J.b=function(b){var p=b.callback,L=b.onCancel,R=Object(f.useState)("python"),v=Object(C.a)(R,2),x=v[0],w=v[1];function T(P){w(l[P][1])}function F(P){p(P)}return r.a.createElement(m.a,Object(g.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),r.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(e.a,{onChange:T},Object.keys(l).map(function(P){return r.a.createElement(u,{key:P,value:P},l[P][0])}))),r.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(E,{mode:x})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(k.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function E(b){var p=b.value,L=b.onChange,R=b.mode,v=b.options,x=v===void 0?{}:v,w=Object(f.useRef)(),T=Object(f.useState)(),F=Object(C.a)(T,2),P=F[0],A=F[1];return Object(f.useEffect)(function(){if(P){function z(K){var O=K.getValue();L&&L(O)}return P.on("change",z),function(){P.off("change",z)}}},[P,L]),Object(f.useEffect)(function(){P&&P.setOption("mode",R)},[P,R]),Object(f.useEffect)(function(){P&&((p!==P.getValue()||p==="")&&setTimeout(function(){P.setValue(p||" ")},300))},[P,p]),Object(f.useEffect)(function(){if(w.current&&!P){var z=i.a.fromTextArea(w.current,Object(N.a)({mode:R,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));A(z)}},[w.current,P]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:w}))}},"815F":function(H,J,I){"use strict";I.d(J,"e",function(){return C}),I.d(J,"c",function(){return e}),I.d(J,"d",function(){return f}),I.d(J,"a",function(){return c}),I.d(J,"f",function(){return i}),I.d(J,"b",function(){return n});var N=I("KQm4"),g=I("VTBJ"),S=I("Ff2n"),k=I("Zm9Q"),y=I("Kwbf"),m=I("OZM5");function C(o,h){return o!=null?o:h}function _(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=new Map;function d(u){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(l){var E=l.key,b=l.children;Object(y.a)(E!=null,"Tree node must have a certain key: [".concat(s).concat(E,"]"));var p=String(E);Object(y.a)(!h.has(p)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(p)),h.set(p,!0),d(b,"".concat(s).concat(p," > "))})}d(o)}function e(o){function h(d){var u=Object(k.a)(d);return u.map(function(s){if(!Object(m.i)(s))return Object(y.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var l=s.key,E=s.props,b=E.children,p=Object(S.a)(E,["children"]),L=Object(g.a)({key:l},p),R=h(b);return R.length&&(L.children=R),L}).filter(function(s){return s})}return h(o)}function f(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=new Set(h===!0?[]:h),u=[];function s(l){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return l.map(function(b,p){var L=Object(m.h)(E?E.pos:"0",p),R=C(b.key,L),v=Object(g.a)(Object(g.a)({},b),{},{parent:E,pos:L,children:null,data:b,isStart:[].concat(Object(N.a)(E?E.isStart:[]),[p===0]),isEnd:[].concat(Object(N.a)(E?E.isEnd:[]),[p===l.length-1])});return u.push(v),h===!0||d.has(R)?v.children=s(b.children||[],v):v.children=[],v})}return s(o),u}function r(o,h,d){var u;d?typeof d=="string"?u=function(E){return E[d]}:typeof d=="function"&&(u=function(E){return d(E)}):u=function(E,b){return C(E.key,b)};function s(l,E,b){var p=l?l.children:o,L=l?Object(m.h)(b.pos,E):"0";if(l){var R=u(l,L),v={node:l,index:E,pos:L,key:R,parentPos:b.node?b.pos:null,level:b.level+1};h(v)}p&&p.forEach(function(x,w){s(x,w,{node:l,pos:L,level:b?b.level+1:-1})})}s(null)}function c(o){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=h.initWrapper,u=h.processEntity,s=h.onProcessFinished,l=arguments.length>2?arguments[2]:void 0,E={},b={},p={posEntities:E,keyEntities:b};return d&&(p=d(p)||p),r(o,function(L){var R=L.node,v=L.index,x=L.pos,w=L.key,T=L.parentPos,F=L.level,P={node:R,index:v,key:w,pos:x,level:F},A=C(w,x);E[x]=P,b[A]=P,P.parent=E[T],P.parent&&(P.parent.children=P.parent.children||[],P.parent.children.push(P)),u&&u(P,p)},l),s&&s(p),p}function i(o,h){var d=h.expandedKeys,u=h.selectedKeys,s=h.loadedKeys,l=h.loadingKeys,E=h.checkedKeys,b=h.halfCheckedKeys,p=h.dragOverNodeKey,L=h.dropPosition,R=h.keyEntities,v=R[o],x={eventKey:o,expanded:d.indexOf(o)!==-1,selected:u.indexOf(o)!==-1,loaded:s.indexOf(o)!==-1,loading:l.indexOf(o)!==-1,checked:E.indexOf(o)!==-1,halfChecked:b.indexOf(o)!==-1,pos:String(v?v.pos:""),dragOver:p===o&&L===0,dragOverGapTop:p===o&&L===-1,dragOverGapBottom:p===o&&L===1};return x}function n(o){var h=o.data,d=o.expanded,u=o.selected,s=o.checked,l=o.loaded,E=o.loading,b=o.halfChecked,p=o.dragOver,L=o.dragOverGapTop,R=o.dragOverGapBottom,v=o.pos,x=o.active,w=Object(g.a)(Object(g.a)({},h),{},{expanded:d,selected:u,checked:s,loaded:l,loading:E,halfChecked:b,dragOver:p,dragOverGapTop:L,dragOverGapBottom:R,pos:v,active:x});return"props"in w||Object.defineProperty(w,"props",{get:function(){return Object(y.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),w}},"8EBN":function(H,J,I){(function(N){N(I("VrN/"))})(function(N){"use strict";N.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 g=0;g-1&&k.substring(C+1,k.length);if(_)return N.findModeByExtension(_)},N.findModeByName=function(k){k=k.toLowerCase();for(var y=0;y=te.length?ve.slice(te.length):ve}).join(`
`)}var d=[],u=[""],s=new n.a.Renderer,l=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){d.length=0,u=[""]}var b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(le,V,Y,te){if(V>=le.length||le[V].level<=Y)return V;var ve=le[V];te.push("- "+ve.text+""),V++;var ae=[];return V=p(le,V,ve.level,ae),ae.length>0&&(te.push("
"),ae.forEach(function(ze){te.push(ze)}),te.push("
")),te.push(" "),V=p(le,V,Y,te),V}function L(){return p(d,0,0,u),u.push("
"),u.join("")}var R={heading:function(V){var Y=l.exec(V);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},fences:function(V){var Y=this.rules.block.fences.exec(V);if(Y){var te=Y[0],ve=h(te,Y[3]||""),ae=Y[2]?Y[2].trim():Y[2];if(["latex","katex","math"].indexOf(ae)>=0){var ze=w(),ft=ve;ve=ze,T[ze]={type:"block",expression:ft}}return{type:"code",raw:te,lang:ae,text:ve}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,w=function(){return"__special_katext_id_".concat(x++,"__")},T={};function F(){return T}function P(){x=0,T={}}function A(le){return le=le.replace(v,function(V,Y){var te=w();return T[te]={type:"inline",expression:Y},te}),le}var z=s.listitem;s.listitem=function(le){return z(A(le))};var K=s.paragraph;s.paragraph=function(le){return K(A(le))};var O=s.tablecell;s.tablecell=function(le,V){return O(A(le),V)},s.code=function(le,V,Y){var te=(V||"").match(/\S*/)[0];return te?["latex","katex","math"].indexOf(te)>=0?"".concat(le,"
"):'
').concat(Y?le:Object(o.escape)(le,!0),`
`):''+(Y?le:Object(o.escape)(le,!0))+"
"},s.heading=function(le,V,Y){var te=this.options.headerPrefix+Y.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:te,level:V,text:le}),"'+le+""},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:R,renderer:s});var B=n.a,U=I("SJMd"),D=I("ulZh"),W=I.n(D),Q=I("m3rI"),re=I("Oy/b"),ee=I("p5ED"),ye=I("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 be=function(le,V){return(be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,te){Y.__proto__=te}||function(Y,te){for(var ve in te)Object.prototype.hasOwnProperty.call(te,ve)&&(Y[ve]=te[ve])})(le,V)};function he(le,V){function Y(){this.constructor=le}be(le,V),le.prototype=V===null?Object.create(V):(Y.prototype=V.prototype,new Y)}function Ie(le,V,Y,te){return new(Y||(Y=Promise))(function(ve,ae){function ze(Wt){try{Ct(te.next(Wt))}catch(gt){ae(gt)}}function ft(Wt){try{Ct(te.throw(Wt))}catch(gt){ae(gt)}}function Ct(Wt){var gt;Wt.done?ve(Wt.value):(gt=Wt.value,gt instanceof Y?gt:new Y(function(Yt){Yt(gt)})).then(ze,ft)}Ct((te=te.apply(le,V||[])).next())})}function Se(le,V){var Y,te,ve,ae,ze={label:0,sent:function(){if(1&ve[0])throw ve[1];return ve[1]},trys:[],ops:[]};return ae={next:ft(0),throw:ft(1),return:ft(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function ft(Ct){return function(Wt){return function(gt){if(Y)throw new TypeError("Generator is already executing.");for(;ze;)try{if(Y=1,te&&(ve=2>[0]?te.return:gt[0]?te.throw||((ve=te.return)&&ve.call(te),0):te.next)&&!(ve=ve.call(te,gt[1])).done)return ve;switch(te=0,ve&&(gt=[2>[0],ve.value]),gt[0]){case 0:case 1:ve=gt;break;case 4:return ze.label++,{value:gt[1],done:!1};case 5:ze.label++,te=gt[1],gt=[0];continue;case 7:gt=ze.ops.pop(),ze.trys.pop();continue;default:if(!(ve=ze.trys,(ve=ve.length>0&&ve[ve.length-1])||gt[0]!==6&>[0]!==2)){ze=0;continue}if(gt[0]===3&&(!ve||gt[1]>ve[0]&>[1]',"select"),this.addActionButton(te,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(te,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(te,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(te,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(te,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(te,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(te,'',"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(ae){var ze=document.createElement("div");ze.className=""+Y.toolbarButtonStyleClass.name,ze.setAttribute("data-type-name",ae.typeName),ze.innerHTML=ae.icon,ze.addEventListener("click",function(){Y.markerToolbarButtonClicked(ze,ae)}),Y.buttons.push(ze),Y.markerButtons.push(ze)}),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 ve=document.createElement("div");ve.className=this.toolbarBlockStyleClass.name,ve.style.whiteSpace="nowrap",ve.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ve),this.addActionButton(ve,'',"render"),this.addActionButton(ve,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},le.prototype.addButtonClickListener=function(V){this.buttonClickListeners.push(V)},le.prototype.removeButtonClickListener=function(V){this.buttonClickListeners.indexOf(V)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(V),1)},le.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},le.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var V=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Y=0;Y0&&this.buttonClickListeners.forEach(function(te){return te("marker",Y)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(V,Y){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(te){return te("action",Y)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},le.prototype.setActiveButton=function(V){this.resetButtonStyles(),V.className=V.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),V.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},le.prototype.setActiveMarkerButton=function(V){var Y=this.markerButtons.find(function(te){return te.getAttribute("data-type-name")===V});Y&&this.setActiveButton(Y)},le.prototype.setCurrentMarker=function(V){var Y=this;this.currentMarker=V,this.buttons.filter(function(te){return/delete|notes/.test(te.getAttribute("data-action"))}).forEach(function(te){Y.currentMarker===void 0?(te.style.fillOpacity="0.4",te.style.pointerEvents="none"):(te.style.fillOpacity="1",te.style.pointerEvents="all")})},le}(),$=function(){function le(V,Y,te,ve){this.panels=[],this.panelButtons=[],this.markerjsContainer=V,this.displayMode=Y,this.uiStyleSettings=te,this.styles=ve,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var V;this.toolboxStyleClass=this.styles.addClass(new oe("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 oe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Y=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new oe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new oe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new oe("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 oe("toolbox-panel-row_colors",`
background-color: `+((V=this.uiStyleSettings.toolboxBackgroundColor)!==null&&V!==void 0?V:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new oe("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
padding: `+Y+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},le.prototype.show=function(V){var Y;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(V){var Y,te,ve=this;this.panels=V,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((te=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&te!==void 0?te:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ae){var ze;ae.uiStyleSettings=ve.uiStyleSettings;var ft=document.createElement("div");ft.className=ve.toolboxButtonStyleClass.name+" "+((ze=ve.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ze!==void 0?ze:ve.toolboxButtonStyleColorsClass.name),ft.innerHTML=ae.icon,ft.title=ae.title,ft.addEventListener("click",function(){ve.panelButtonClick(ae)}),ve.panelButtons.push(ft),ve.buttonRow.appendChild(ft)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(V){var Y=this,te=-1;if(V!==this.activePanel){te=this.panels.indexOf(V),this.panelRow.innerHTML="";var ve=V.getUi();ve.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ve),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=V}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Y.displayMode==="inline"?Y.panelRow.style.display="none":Y.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ae,ze){var ft,Ct;ae.className=Y.toolboxButtonStyleClass.name+" "+(ze===te?""+((ft=Y.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ft!==void 0?ft:Y.toolboxActiveButtonStyleColorsClass.name):""+((Ct=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:Y.toolboxButtonStyleColorsClass.name))})},le}(),X=function(le,V){this.title=le,this.icon=V},de=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'')||this;return ze.colors=[],ze.addTransparent=!1,ze.colorBoxes=[],ze.colors=te,ze.currentColor=ve,ze.setCurrentColor=ze.setCurrentColor.bind(ze),ze.getColorBox=ze.getColorBox.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.overflow="hidden",te.style.whiteSpace="nowrap",this.colors.forEach(function(ve){var ae=Y.getColorBox(ve);te.appendChild(ae),Y.colorBoxes.push(ae)}),te},V.prototype.getColorBox=function(Y){var te=this,ve=this.uiStyleSettings.toolbarHeight/4,ae=this.uiStyleSettings.toolbarHeight-ve,ze=document.createElement("div");ze.style.display="inline-block",ze.style.boxSizing="content-box",ze.style.width=ae-2+"px",ze.style.height=ae-2+"px",ze.style.padding="1px",ze.style.marginRight="2px",ze.style.marginBottom="2px",ze.style.borderWidth="2px",ze.style.borderStyle="solid",ze.style.borderRadius=(ae+2)/2+"px",ze.style.borderColor=Y===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ze.addEventListener("click",function(){te.setCurrentColor(Y,ze)});var ft=document.createElement("div");return ft.style.display="inline-block",ft.style.width=ae-2+"px",ft.style.height=ae-2+"px",ft.style.backgroundColor=Y,ft.style.borderRadius=ae/2+"px",Y==="transparent"&&(ft.style.fill=this.uiStyleSettings.toolboxAccentColor,ft.innerHTML=``),ze.appendChild(ft),ze},V.prototype.setCurrentColor=function(Y,te){var ve=this;this.currentColor=Y,this.colorBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Y)},V}(X),pe=function(){function le(V,Y,te){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=Y,this.globalSettings=te,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(le.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(V){return!1},Object.defineProperty(le.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),le.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},le.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},le.prototype.pointerDown=function(V,Y){},le.prototype.dblClick=function(V,Y){},le.prototype.manipulate=function(V){},le.prototype.pointerUp=function(V){this.stateChanged()},le.prototype.dispose=function(){},le.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},le.prototype.getState=function(){return{typeName:le.typeName,state:this.state,notes:this.notes}},le.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},le.prototype.scale=function(V,Y){},le.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},le.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},le.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var V=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),V.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(V)&&this.onStateChanged(this)}},le.typeName="MarkerBase",le}(),xe=function(){function le(){this.findGripByVisual=this.findGripByVisual.bind(this)}return le.prototype.findGripByVisual=function(V){return this.topLeft.ownsTarget(V)?this.topLeft:this.topCenter.ownsTarget(V)?this.topCenter:this.topRight.ownsTarget(V)?this.topRight:this.centerLeft.ownsTarget(V)?this.centerLeft:this.centerRight.ownsTarget(V)?this.centerRight:this.bottomLeft.ownsTarget(V)?this.bottomLeft:this.bottomCenter.ownsTarget(V)?this.bottomCenter:this.bottomRight.ownsTarget(V)?this.bottomRight:void 0},le}(),Ke=function(){function le(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},le}(),qe=function(){function le(){}return le.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},le.toSVGMatrix=function(V,Y){return V.a=Y.a,V.b=Y.b,V.c=Y.c,V.d=Y.d,V.e=Y.e,V.f=Y.f,V},le}(),tt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.left=0,ae.top=0,ae.width=0,ae.height=0,ae.defaultSize={x:50,y:20},ae.offsetX=0,ae.offsetY=0,ae.rotationAngle=0,ae.CB_DISTANCE=10,ae._suppressMarkerCreateEvent=!1,ae.container.transform.baseVal.appendItem(ue.createTransform()),ae.setupControlBox(),ae}return he(V,le),Object.defineProperty(V.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"visual",{get:function(){return this._visual},set:function(Y){this._visual=Y;var te=ue.createTransform();this._visual.transform.baseVal.appendItem(te)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(Y){return!!le.prototype.ownsTarget.call(this,Y)||!!(this.controlGrips.findGripByVisual(Y)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y))},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="new"&&(this.left=Y.x,this.top=Y.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ve=this.unrotatePoint(Y);if(this.manipulationStartX=ve.x,this.manipulationStartY=ve.y,this.offsetX=ve.x-this.left,this.offsetY=ve.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(te),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(te)){this.activeGrip=this.rotatorGrip;var ae=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ae.x-this.width/2,this.top=ae.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ze=this.container.transform.baseVal.getItem(0);ze.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ze,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function(Y){var te=this.state;le.prototype.pointerUp.call(this,Y),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Y),this._state="select",te==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function(Y){this.visual.style.transform="translate("+Y.x+"px, "+Y.y+"px)"},V.prototype.manipulate=function(Y){var te=this.unrotatePoint(Y);this.state==="creating"?this.resize(Y):this.state==="move"?(this.left=this.manipulationStartLeft+(te.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(te.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(te):this.state==="rotate"&&this.rotate(Y)},V.prototype.resize=function(Y){var te=this.manipulationStartLeft,ve=this.manipulationStartWidth,ae=this.manipulationStartTop,ze=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:te=this.manipulationStartLeft+Y.x-this.manipulationStartX,ve=this.manipulationStartWidth+this.manipulationStartLeft-te;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ve=this.manipulationStartWidth+Y.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ae=this.manipulationStartTop+Y.y-this.manipulationStartY,ze=this.manipulationStartHeight+this.manipulationStartTop-ae;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ze=this.manipulationStartHeight+Y.y-this.manipulationStartY}ve>=0?(this.left=te,this.width=ve):(this.left=te+ve,this.width=-ve),ze>=0?(this.top=ae,this.height=ze):(this.top=ae+ze,this.height=-ze),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function(Y){if(Math.abs(Y.x-this.centerX)>.1){var te=Math.sign(Y.x-this.centerX);this.rotationAngle=180*Math.atan((Y.y-this.centerY)/(Y.x-this.centerX))/Math.PI+90*te,this.applyRotation()}},V.prototype.applyRotation=function(){var Y=this.container.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Y,0)},V.prototype.rotatePoint=function(Y){if(this.rotationAngle===0)return Y;var te=this.container.getCTM(),ve=ue.createPoint(Y.x,Y.y);return{x:(ve=ve.matrixTransform(te)).x,y:ve.y}},V.prototype.unrotatePoint=function(Y){if(this.rotationAngle===0)return Y;var te=this.container.getCTM();te=te.inverse();var ve=ue.createPoint(Y.x,Y.y);return{x:(ve=ve.matrixTransform(te)).x,y:ve.y}},V.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var Y=ue.createTransform();Y.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Y),this.container.appendChild(this.controlBox),this.controlRect=ue.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=ue.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 xe,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var Y=this.controlBox.transform.baseVal.getItem(0);Y.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Y,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()},V.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()},V.prototype.createGrip=function(){var Y=new Ke;return Y.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(Y.visual),Y},V.prototype.positionGrips=function(){var Y=this.controlGrips.topLeft.GRIP_SIZE,te=-Y/2,ve=te,ae=(this.width+this.CB_DISTANCE)/2-Y/2,ze=(this.height+this.CB_DISTANCE)/2-Y/2,ft=this.height+this.CB_DISTANCE-Y/2,Ct=this.width+this.CB_DISTANCE-Y/2;this.positionGrip(this.controlGrips.topLeft.visual,te,ve),this.positionGrip(this.controlGrips.topCenter.visual,ae,ve),this.positionGrip(this.controlGrips.topRight.visual,Ct,ve),this.positionGrip(this.controlGrips.centerLeft.visual,te,ze),this.positionGrip(this.controlGrips.centerRight.visual,Ct,ze),this.positionGrip(this.controlGrips.bottomLeft.visual,te,ft),this.positionGrip(this.controlGrips.bottomCenter.visual,ae,ft),this.positionGrip(this.controlGrips.bottomRight.visual,Ct,ft),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ae,ve-3*this.CB_DISTANCE)},V.prototype.positionGrip=function(Y,te,ve){var ae=Y.transform.baseVal.getItem(0);ae.setTranslate(te,ve),Y.transform.baseVal.replaceItem(ae,0)},V.prototype.hideControlBox=function(){this.controlBox.style.display="none"},V.prototype.showControlBox=function(){this.controlBox.style.display=""},V.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},le.prototype.getState.call(this))},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.left=te.left,this.top=te.top,this.width=te.width,this.height=te.height,this.rotationAngle=te.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,te.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,te.containerTransformMatrix))},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te);var ve=this.rotatePoint({x:this.left,y:this.top}),ae=this.unrotatePoint({x:ve.x*Y,y:ve.y*te});this.left=ae.x,this.top=ae.y,this.width=this.width*Y,this.height=this.height*te,this.adjustControlBox()},V}(pe),et=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.fillColor="transparent",ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.opacity=1,ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setFillColor=ae.setFillColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.createVisual=ae.createVisual.bind(ae),ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},V.prototype.createVisual=function(){this.visual=ue.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)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.setSize()},V.prototype.setSize=function(){le.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(Y){le.prototype.pointerUp.call(this,Y),this.setSize()},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},V.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this))},V.prototype.restoreState=function(Y){var te=Y;this.fillColor=te.fillColor,this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.opacity=te.opacity,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.setSize()},V.title="Rectangle marker",V}(tt),it=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'')||this;return ze.widths=[],ze.widthBoxes=[],ze.widths=te,ze.currentWidth=ve,ze.setCurrentWidth=ze.setCurrentWidth.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",this.widths.forEach(function(ve){var ae=document.createElement("div");ae.style.display="flex",ae.style.flexGrow="2",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.borderColor=ve===Y.currentWidth?Y.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){Y.setCurrentWidth(ve,ae)}),te.appendChild(ae);var ze=document.createElement("div");ze.innerText=ve.toString(),ze.style.marginRight="5px",ae.appendChild(ze);var ft=document.createElement("div");ft.style.minHeight="20px",ft.style.flexGrow="2",ft.style.display="flex",ft.style.alignItems="center";var Ct=document.createElement("hr");Ct.style.minWidth="20px",Ct.style.border="0px",Ct.style.borderTop=ve+"px solid "+Y.uiStyleSettings.toolboxColor,Ct.style.flexGrow="2",ft.appendChild(Ct),ae.appendChild(ft),Y.widthBoxes.push(ae)}),te},V.prototype.setCurrentWidth=function(Y,te){var ve=this;this.currentWidth=Y,this.widthBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(X),at=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'')||this;return ze.styles=[],ze.styleBoxes=[],ze.styles=te,ze.currentStyle=ve,ze.setCurrentStyle=ze.setCurrentStyle.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",this.styles.forEach(function(ve){var ae=document.createElement("div");ae.style.display="flex",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.overflow="hidden",ae.style.maxWidth=100/Y.styles.length-5+"%",ae.style.borderColor=ve===Y.currentStyle?Y.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){Y.setCurrentStyle(ve,ae)}),te.appendChild(ae);var ze=document.createElement("div");ze.style.minHeight="20px",ze.style.flexGrow="2",ze.style.overflow="hidden";var ft=``;ze.innerHTML=ft,ae.appendChild(ze),Y.styleBoxes.push(ae)}),te},V.prototype.setCurrentStyle=function(Y,te){var ve=this;this.currentStyle=Y,this.styleBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(X),je=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.strokeColor=ve.defaultColor,ae.strokeWidth=ve.defaultStrokeWidth,ae.strokeDasharray=ve.defaultStrokeDasharray,ae.strokePanel=new de("Line color",ve.defaultColorSet,ve.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new at("Line style",ve.defaultStrokeDasharrays,ve.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return he(V,le),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="FrameMarker",V.title="Frame marker",V.icon='',V}(et),De=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},nt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.x1=0,ae.y1=0,ae.x2=0,ae.y2=0,ae.defaultLength=50,ae.manipulationStartX=0,ae.manipulationStartY=0,ae.manipulationStartX1=0,ae.manipulationStartY1=0,ae.manipulationStartX2=0,ae.manipulationStartY2=0,ae.setupControlBox(),ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!!le.prototype.ownsTarget.call(this,Y)||!(!this.grip1.ownsTarget(Y)&&!this.grip2.ownsTarget(Y))},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.state==="new"&&(this.x1=Y.x,this.y1=Y.y,this.x2=Y.x,this.y2=Y.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(te)?this.activeGrip=this.grip1:this.grip2.ownsTarget(te)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},V.prototype.pointerUp=function(Y){var te=this.state;le.prototype.pointerUp.call(this,Y),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(Y),this._state="select",te==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function(Y){this.state==="creating"?this.resize(Y):this.state==="move"?(this.x1=this.manipulationStartX1+Y.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Y.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Y.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Y.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Y)},V.prototype.resize=function(Y){switch(this.activeGrip){case this.grip1:this.x1=Y.x,this.y1=Y.y;break;case this.grip2:case void 0:this.x2=Y.x,this.y2=Y.y}this.adjustVisual(),this.adjustControlBox()},V.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){this.positionGrips()},V.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},V.prototype.createGrip=function(){var Y=new Ke;return Y.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(Y.visual),Y},V.prototype.positionGrips=function(){var Y=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Y/2,this.y1-Y/2),this.positionGrip(this.grip2.visual,this.x2-Y/2,this.y2-Y/2)},V.prototype.positionGrip=function(Y,te,ve){var ae=Y.transform.baseVal.getItem(0);ae.setTranslate(te,ve),Y.transform.baseVal.replaceItem(ae,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},le.prototype.getState.call(this))},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.x1=te.x1,this.y1=te.y1,this.x2=te.x2,this.y2=te.y2},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.x1=this.x1*Y,this.y1=this.y1*te,this.x2=this.x2*Y,this.y2=this.y2*te,this.adjustVisual(),this.adjustControlBox()},V}(pe),lt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.strokeColor=ve.defaultColor,ae.strokeWidth=ve.defaultStrokeWidth,ae.strokeDasharray=ve.defaultStrokeDasharray,ae.strokePanel=new de("Line color",ve.defaultColorSet,ve.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new at("Line style",ve.defaultStrokeDasharrays,ve.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorLine&&Y!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.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)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},V.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()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.createVisual(),this.adjustVisual()},V.typeName="LineMarker",V.title="Line marker",V.icon='',V}(nt),Ve=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'')||this;return ze.fonts=[],ze.fontBoxes=[],ze.fonts=te,ze.currentFont=ve,ze.setCurrentFont=ze.setCurrentFont.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.overflow="hidden",te.style.flexGrow="2",this.fonts.forEach(function(ve){var ae=document.createElement("div");ae.style.display="inline-block",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.overflow="hidden",ae.style.maxWidth=100/Y.fonts.length-5+"%",ae.style.borderColor=ve===Y.currentFont?Y.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){Y.setCurrentFont(ve,ae)}),te.appendChild(ae);var ze=document.createElement("div");ze.style.display="flex",ze.style.minHeight="20px",ze.style.flexGrow="2",ze.style.fontFamily=ve,ze.style.overflow="hidden";var ft=document.createElement("div");ft.style.whiteSpace="nowrap",ft.style.overflow="hidden",ft.style.textOverflow="ellipsis",ft.innerHTML="The quick brown fox jumps over the lazy dog",ze.appendChild(ft),ae.appendChild(ze),Y.fontBoxes.push(ae)}),te},V.prototype.setCurrentFont=function(Y,te){var ve=this;this.currentFont=Y,this.fontBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(X),Qe=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.color="transparent",ae.padding=5,ae.DEFAULT_TEXT="your text here",ae.text=ae.DEFAULT_TEXT,ae.isMoved=!1,ae.color=ve.defaultColor,ae.fontFamily=ve.defaultFontFamily,ae.defaultSize={x:100,y:30},ae.setColor=ae.setColor.bind(ae),ae.setFont=ae.setFont.bind(ae),ae.renderText=ae.renderText.bind(ae),ae.sizeText=ae.sizeText.bind(ae),ae.textEditDivClicked=ae.textEditDivClicked.bind(ae),ae.showTextEditor=ae.showTextEditor.bind(ae),ae.setSize=ae.setSize.bind(ae),ae.positionTextEditor=ae.positionTextEditor.bind(ae),ae.colorPanel=new de("Color",ve.defaultColorSet,ve.defaultColor),ae.colorPanel.onColorChanged=ae.setColor,ae.fontFamilyPanel=new Ve("Font",ve.defaultFontFamilies,ve.defaultFontFamily),ae.fontFamilyPanel.onFontChanged=ae.setFont,ae}return he(V,le),V.prototype.ownsTarget=function(Y){if(le.prototype.ownsTarget.call(this,Y)||Y===this.visual||Y===this.textElement||Y===this.bgRectangle)return!0;var te=!1;return this.textElement.childNodes.forEach(function(ve){ve===Y&&(te=!0)}),te},V.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.renderText=function(){var Y=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(te){Y.textElement.appendChild(ue.createTSpan(te.trim()===""?" ":te.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var Y=this.textElement.getBBox(),te=1;if(Y.width>0&&Y.height>0){var ve=(1*this.width-this.width*this.padding*2/100)/Y.width,ae=(1*this.height-this.height*this.padding*2/100)/Y.height;te=Math.min(ve,ae)}return te},V.prototype.getTextPosition=function(Y){var te=this.textElement.getBBox(),ve=0,ae=0;return te.width>0&&te.height>0&&(ve=(this.width-te.width*Y)/2,ae=this.height/2-te.height*Y/2),{x:ve,y:ae}},V.prototype.sizeText=function(){var Y=this.textElement.getBBox(),te=this.getTextScale(),ve=this.getTextPosition(te);ve.y-=Y.y*te,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ve.x+"px, "+ve.y+"px) scale("+te+", "+te+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ve.x,ve.y),this.textElement.transform.baseVal.getItem(1).setScale(te,te))},V.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Y.x-this.pointerDownPoint.x)>5||Math.abs(Y.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){le.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function(Y){var te=this.state;te==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,Y),this.setSize(),(te==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var Y=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(te){te.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var te=Number.parseFloat(Y.textEditor.style.fontSize);Y.textEditor.clientWidth>=Number.parseInt(Y.textEditor.style.maxWidth)&&te>.9;)te-=.1,Y.textEditor.style.fontSize=Math.max(te,.9)+"em"}),this.textEditor.addEventListener("keyup",function(te){te.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(te){if(te.clipboardData){var ve=te.clipboardData.getData("text"),ae=window.getSelection();if(!ae.rangeCount)return!1;ae.deleteFromDocument(),ae.getRangeAt(0).insertNode(document.createTextNode(ve)),te.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Y.textEditDivClicked(Y.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},V.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Y=this.getTextScale(),te=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ve=this.textElement.getBBox(),ae={x:ve.width*Y,y:ve.height*Y};te.x-=ae.x/2,te.y-=ae.y/2,this.textEditor.style.top=te.y+"px",this.textEditor.style.left=te.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-te.x+"px",this.textEditor.style.fontSize=Math.max(16*Y,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function(Y){this.text=Y.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},V.prototype.select=function(){le.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),le.prototype.deselect.call(this)},V.prototype.dblClick=function(Y,te){le.prototype.dblClick.call(this,Y,te),this.showTextEditor()},V.prototype.setColor=function(Y){this.textElement&&ue.setAttributes(this.textElement,[["fill",Y]]),this.color=Y,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Y)},V.prototype.setFont=function(Y){this.textElement&&ue.setAttributes(this.textElement,[["font-family",Y]]),this.fontFamily=Y,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},V.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},V.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){var te=Y;this.color=te.color,this.fontFamily=te.fontFamily,this.padding=te.padding,this.text=te.text,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.setSize(),this.sizeText(),this.positionTextEditor()},V.typeName="TextMarker",V.title="Text marker",V.icon='',V}(tt),Fe=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.color="transparent",ae.lineWidth=3,ae.drawing=!1,ae.pixelRatio=1,ae.color=ve.defaultColor,ae.lineWidth=ve.defaultStrokeWidth,ae.pixelRatio=ve.freehandPixelRatio,ae.setColor=ae.setColor.bind(ae),ae.addCanvas=ae.addCanvas.bind(ae),ae.finishCreation=ae.finishCreation.bind(ae),ae.setLineWidth=ae.setLineWidth.bind(ae),ae.colorPanel=new de("Color",ve.defaultColorSet,ve.defaultColor),ae.colorPanel.onColorChanged=ae.setColor,ae.lineWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.lineWidthPanel.onWidthChanged=ae.setLineWidth,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var Y=ue.createTransform();this.visual.transform.baseVal.appendItem(Y),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(Y,te){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(Y.x,Y.y),this.drawing=!0):le.prototype.pointerDown.call(this,Y,te)},V.prototype.manipulate=function(Y){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Y.x,Y.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(Y){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,Y)},V.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)},V.prototype.select=function(){this.state==="creating"&&this.finishCreation(),le.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),le.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var Y=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),te=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ve=te[0],ae=te[1],ze=te[2],ft=te[3],Ct=!1,Wt=0;Wt0&&(Ct=!0,Wtft&&(ft=Wt),gt>ze&&(ze=gt));if(Ct){this.left=ve/this.pixelRatio,this.top=ae/this.pixelRatio,this.width=(ze-ve)/this.pixelRatio,this.height=(ft-ae)/this.pixelRatio;var Yt=document.createElement("canvas");Yt.width=ze-ve,Yt.height=ft-ae,Yt.getContext("2d").putImageData(this.canvasContext.getImageData(ve,ae,ze-ve,ft-ae),0,0),this.drawingImgUrl=Yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function(Y){this.color=Y,this.colorChanged(Y)},V.prototype.setLineWidth=function(Y){this.lineWidth=Y},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){this.createVisual(),le.prototype.restoreState.call(this,Y),this.drawingImgUrl=Y.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.setDrawingImage()},V.typeName="FreehandMarker",V.title="Freehand marker",V.icon='',V}(tt),Re=function(le){function V(Y,te,ve){var ae=le.call(this,Y,ve||'')||this;return ae.typeBoxes=[],ae.currentType=te,ae.setCurrentType=ae.setCurrentType.bind(ae),ae}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2";for(var ve=function(ft){var Ct="both";switch(ft){case 0:Ct="both";break;case 1:Ct="start";break;case 2:Ct="end";break;case 3:Ct="none"}var Wt=document.createElement("div");if(Wt.style.display="flex",Wt.style.flexGrow="2",Wt.style.alignItems="center",Wt.style.justifyContent="space-between",Wt.style.padding="5px",Wt.style.borderWidth="2px",Wt.style.borderStyle="solid",Wt.style.borderColor=Ct===ae.currentType?ae.uiStyleSettings.toolboxAccentColor:"transparent",Wt.addEventListener("click",function(){Y.setCurrentType(Ct,Wt)}),te.appendChild(Wt),Ct==="both"||Ct==="start"){var gt=document.createElement("div");gt.style.display="flex",gt.style.alignItems="center",gt.style.minHeight="20px",gt.innerHTML=``,gt.style.marginLeft="5px",Wt.appendChild(gt)}var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.style.flexGrow="2";var er=document.createElement("hr");if(er.style.minWidth="20px",er.style.border="0px",er.style.borderTop="3px solid "+(ae.uiStyleSettings!==void 0?ae.uiStyleSettings.toolboxColor:"#eeeeee"),er.style.flexGrow="2",Yt.appendChild(er),Wt.appendChild(Yt),Ct==="both"||Ct==="end"){var Hr=document.createElement("div");Hr.style.display="flex",Hr.style.alignItems="center",Hr.style.minHeight="20px",Hr.innerHTML=``,Hr.style.marginRight="5px",Wt.appendChild(Hr)}ae.typeBoxes.push(Wt)},ae=this,ze=0;ze<4;ze++)ve(ze);return te},V.prototype.setCurrentType=function(Y,te){var ve=this;this.currentType=Y,this.typeBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings!==void 0?ve.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(X),Me=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.arrowType="end",ae.arrowBaseHeight=10,ae.arrowBaseWidth=10,ae.getArrowPoints=ae.getArrowPoints.bind(ae),ae.setArrowType=ae.setArrowType.bind(ae),ae.arrowTypePanel=new Re("Arrow type","end"),ae.arrowTypePanel.onArrowTypeChanged=ae.setArrowType,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.arrow1&&Y!==this.arrow2)},V.prototype.getArrowPoints=function(Y,te){var ve=this.arrowBaseWidth+2*this.strokeWidth,ae=this.arrowBaseHeight+2*this.strokeWidth;return Y-ve/2+","+(te+ae/2)+" "+Y+","+(te-ae/2)+" "+(Y+ve/2)+","+(te+ae/2)},V.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(le.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",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),te=this.arrow1.transform.baseVal.getItem(0);te.setRotate(Y,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(te,0);var ve=this.arrow2.transform.baseVal.getItem(0);ve.setRotate(Y+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ve,0)}},V.prototype.setArrowType=function(Y){this.arrowType=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.arrowType=te.arrowType,this.createTips(),this.adjustVisual()},V.typeName="ArrowMarker",V.title="Arrow marker",V.icon='',V}(lt),Ee=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.fillColor=ve.defaultFillColor,ae.strokeWidth=0,ae.fillPanel=new de("Color",ve.defaultColorSet,ve.defaultFillColor),ae.fillPanel.onColorChanged=ae.setFillColor,ae}return he(V,le),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="CoverMarker",V.title="Cover marker",V.icon='',V}(et),Oe=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'')||this;return ze.opacities=[],ze.opacityBoxes=[],ze.opacities=te,ze.currentOpacity=ve,ze.setCurrentOpacity=ze.setCurrentOpacity.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",te.style.justifyContent="space-between",this.opacities.forEach(function(ve){var ae=document.createElement("div");ae.style.display="flex",ae.style.alignItems="center",ae.style.justifyContent="center",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.borderColor=ve===Y.currentOpacity?Y.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){Y.setCurrentOpacity(ve,ae)}),te.appendChild(ae);var ze=document.createElement("div");ze.innerText=100*ve+"%",ae.appendChild(ze),Y.opacityBoxes.push(ae)}),te},V.prototype.setCurrentOpacity=function(Y,te){var ve=this;this.currentOpacity=Y,this.opacityBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(X),ke=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.setOpacity=ae.setOpacity.bind(ae),ae.fillColor=ve.defaultHighlightColor,ae.strokeWidth=0,ae.opacity=ve.defaultHighlightOpacity,ae.fillPanel=new de("Color",ve.defaultColorSet,ae.fillColor),ae.fillPanel.onColorChanged=ae.setFillColor,ae.opacityPanel=new Oe("Opacity",ve.defaultOpacitySteps,ae.opacity),ae.opacityPanel.onOpacityChanged=ae.setOpacity,ae}return he(V,le),V.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="HighlightMarker",V.title="Highlight marker",V.icon='',V}(Ee),Ne='',He=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.bgColor="transparent",ae.tipPosition={x:0,y:0},ae.tipBase1Position={x:0,y:0},ae.tipBase2Position={x:0,y:0},ae.tipMoving=!1,ae.color=ve.defaultStrokeColor,ae.bgColor=ve.defaultFillColor,ae.fontFamily=ve.defaultFontFamily,ae.defaultSize={x:100,y:30},ae.setBgColor=ae.setBgColor.bind(ae),ae.getTipPoints=ae.getTipPoints.bind(ae),ae.positionTip=ae.positionTip.bind(ae),ae.setTipPoints=ae.setTipPoints.bind(ae),ae.colorPanel=new de("Text color",ve.defaultColorSet,ae.color,''),ae.colorPanel.onColorChanged=ae.setColor,ae.bgColorPanel=new de("Fill color",ve.defaultColorSet,ae.bgColor,Ne),ae.bgColorPanel.onColorChanged=ae.setBgColor,ae.fontFamilyPanel=new Ve("Font",ve.defaultFontFamilies,ve.defaultFontFamily),ae.fontFamilyPanel.onFontChanged=ae.setFont,ae.tipGrip=new Ke,ae.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),ae.controlBox.appendChild(ae.tipGrip.visual),ae}return he(V,le),V.prototype.ownsTarget=function(Y){return le.prototype.ownsTarget.call(this,Y)||this.tipGrip.ownsTarget(Y)||this.tip===Y},V.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function(Y,te){this.state==="new"&&le.prototype.pointerDown.call(this,Y,te),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(te)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):le.prototype.pointerDown.call(this,Y,te)},V.prototype.pointerUp=function(Y){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,Y);else{var te=this.state==="creating";le.prototype.pointerUp.call(this,Y),this.setTipPoints(te),this.positionTip()}},V.prototype.manipulate=function(Y){if(this.tipMoving){var te=this.unrotatePoint(Y);this.tipPosition={x:te.x-this.manipulationStartLeft,y:te.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,Y)},V.prototype.setBgColor=function(Y){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",Y]]),ue.setAttributes(this.tip,[["fill",Y]])),this.bgColor=Y,this.fillColorChanged(Y)},V.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},V.prototype.setTipPoints=function(Y){Y===void 0&&(Y=!1);var te=Math.min(this.height/2,15),ve=this.height/5;Y&&(this.tipPosition={x:te+ve/2,y:this.height+20});var ae=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?ae',V}(Qe),rt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.fillColor="transparent",ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.opacity=1,ae.strokeColor=ve.defaultColor,ae.strokeWidth=ve.defaultStrokeWidth,ae.strokeDasharray=ve.defaultStrokeDasharray,ae.fillColor=ve.defaultFillColor,ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setFillColor=ae.setFillColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.setOpacity=ae.setOpacity.bind(ae),ae.createVisual=ae.createVisual.bind(ae),ae.strokePanel=new de("Line color",fe(ve.defaultColorSet,["transparent"]),ve.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.fillPanel=new de("Fill color",fe(ve.defaultColorSet,["transparent"]),ae.fillColor,Ne),ae.fillPanel.onColorChanged=ae.setFillColor,ae.strokeWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new at("Line style",ve.defaultStrokeDasharrays,ve.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae.opacityPanel=new Oe("Opacity",ve.defaultOpacitySteps,ae.opacity),ae.opacityPanel.onOpacityChanged=ae.setOpacity,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},V.prototype.createVisual=function(){this.visual=ue.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)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.setSize()},V.prototype.setSize=function(){le.prototype.setSize.call(this),ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},V.prototype.pointerUp=function(Y){le.prototype.pointerUp.call(this,Y),this.setSize()},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},V.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Y),this.stateChanged()},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){var te=Y;this.fillColor=te.fillColor,this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.opacity=te.opacity,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.setSize()},V.typeName="EllipseMarker",V.title="Ellipse marker",V.icon='',V}(tt),ct=function(le){function V(Y,te,ve){return le.call(this,Y,te,ve)||this}return he(V,le),Object.defineProperty(V.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.tip1&&Y!==this.tip2)},V.prototype.createTips=function(){this.tip1=ue.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(ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ue.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(ue.createTransform()),this.visual.appendChild(this.tip2)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(le.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ue.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()]]),ue.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 Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),te=this.tip1.transform.baseVal.getItem(0);te.setRotate(Y,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(te,0);var ve=this.tip2.transform.baseVal.getItem(0);ve.setRotate(Y+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ve,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y),this.createTips(),this.adjustVisual()},V.typeName="MeasurementMarker",V.title="Measurement marker",V.icon='',V}(lt),yt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.strokePanel.colors=ve.defaultColorSet,ae.fillColor="transparent",ae}return he(V,le),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="EllipseFrameMarker",V.title="Ellipse frame marker",V.icon='',V}(rt),ht=function(){function le(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),le.prototype.addUndoStep=function(V){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(V)||(this.undoStack.push(V),JSON.stringify(this.lastRedoStep)!==JSON.stringify(V)&&this.redoStack.splice(0,this.redoStack.length))},le.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},le.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},le.prototype.undo=function(){if(this.undoStack.length>1){var V=this.undoStack.pop();return V!==void 0&&this.redoStack.push(V),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},le.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},le}(),pt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.curveX=0,ae.curveY=0,ae.manipulationStartCurveX=0,ae.manipulationStartCurveY=0,ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.positionGrips=ae.positionGrips.bind(ae),ae.addControlGrips=ae.addControlGrips.bind(ae),ae.adjustVisual=ae.adjustVisual.bind(ae),ae.setupControlBox=ae.setupControlBox.bind(ae),ae.resize=ae.resize.bind(ae),ae.strokeColor=ve.defaultColor,ae.strokeWidth=ve.defaultStrokeWidth,ae.strokeDasharray=ve.defaultStrokeDasharray,ae.strokePanel=new de("Line color",ve.defaultColorSet,ve.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new at("Line style",ve.defaultStrokeDasharrays,ve.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorCurve&&Y!==this.visibleCurve&&!this.curveGrip.ownsTarget(Y))},V.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},V.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.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)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Y.x,this.curveY=Y.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(te)&&(this.activeGrip=this.curveGrip,this._state="resize")},V.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){le.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.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)},V.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,le.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){le.prototype.positionGrips.call(this);var Y=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Y/2,this.curveY-Y/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()))},V.prototype.manipulate=function(Y){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Y.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Y.y-this.manipulationStartY),le.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){this.activeGrip===this.curveGrip&&(this.curveX=Y.x,this.curveY=Y.y),le.prototype.resize.call(this,Y),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual()},V.prototype.scale=function(Y,te){this.curveX=this.curveX*Y,this.curveY=this.curveY*te,le.prototype.scale.call(this,Y,te)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.curveX=te.curveX,this.curveY=te.curveY,this.createVisual(),this.adjustVisual()},V.typeName="CurveMarker",V.title="Curve marker",V.icon='',V}(nt),Dt=function(){function le(V,Y){Y===void 0&&(Y=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=Y}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),At=function(le){function V(Y,te,ve){var ae=le.call(this,Y,!1)||this;return ae.dataUrl=te,ae.state=ve,ae}return he(V,le),V}(Dt),bt=function(le){function V(Y,te,ve){ve===void 0&&(ve=!1);var ae=le.call(this,Y,ve)||this;return ae.marker=te,ae}return he(V,le),V}(Dt),Xt=function(){function le(){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 le.prototype.addEventListener=function(V,Y){this[V].push(Y)},le.prototype.removeEventListener=function(V,Y){var te=this[V].indexOf(Y);te>-1&&this[V].splice(te,1)},le}(),Gt=function(){function le(V){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new De,this._isOpen=!1,this.undoRedoManager=new ht,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 Xt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new ce(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=V,this.targetRoot=document.body,this.width=V.clientWidth,this.height=V.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(le.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,Fe,Me,Qe,yt,rt,ke,He,ct,Ee,lt,pt]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,Fe,Me,Qe,rt,ke,He]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,Fe,Me,Qe,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var Y=this;this._availableMarkerTypes.splice(0),V.forEach(function(te){if(typeof te=="string"){var ve=Y.ALL_MARKER_TYPES.find(function(ae){return ae.typeName===te});ve!==void 0&&Y._availableMarkerTypes.push(ve)}else Y._availableMarkerTypes.push(te)})},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(V){this._zoomLevel=V,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(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),le.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&ne.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ne.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Y){return Y(new Dt(V))})},le.prototype.render=function(){return Ie(this,void 0,void 0,function(){var V;return Se(this,function(Y){switch(Y.label){case 0:return this.setCurrentMarker(),(V=new Ce).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.markersOnly=this.renderMarkersOnly,V.width=this.renderWidth,V.height=this.renderHeight,[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Y.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Y.sent()]}})})},le.prototype.close=function(V){var Y=this;if(V===void 0&&(V=!1),this.isOpen){var te=!1;V||this.eventListeners.beforeclose.forEach(function(ve){var ae=new Dt(Y,!0);ve(ae),ae.defaultPrevented&&(te=!0)}),te||(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(ve){return ve(new Dt(Y))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var V,Y=[],te=0;tethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,te=Y',V.title="Powered by marker.js",V.style.display="grid",V.style.alignItems="center",V.style.justifyItems="center",V.style.padding="3px",V.style.width="20px",V.style.height="20px",this.logoUI.appendChild(V),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},le.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")},le.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"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.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 V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"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 q(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(V),1),V.dispose()},le.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())},le.prototype.toolbarButtonClicked=function(V,Y){if(V==="marker"&&Y!==void 0)this.createNewMarker(Y);else if(V==="action")switch(Y){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()}},le.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0){var Y=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ve){var ae=new bt(V,V._currentMarker,!0);ve(ae),ae.defaultPrevented&&(Y=!0)}),!Y){var te=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(ve){return ve(new bt(V,te))})}}},le.prototype.clear=function(){var V=this,Y=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ze){var ft=new bt(V,void 0,!0);ze(ft),ft.defaultPrevented&&(Y=!0)}),!Y)){this.setCurrentMarker();for(var te=function(ze){var ft=ve.markers[ze];ve.setCurrentMarker(ve.markers[ze]),ve._currentMarker.dispose(),ve.markerImage.removeChild(ve._currentMarker.container),ve.markers.splice(ve.markers.indexOf(ve._currentMarker),1),ve.eventListeners.markerdelete.forEach(function(Ct){return Ct(new bt(V,ft))})},ve=this,ae=this.markers.length-1;ae>=0;ae--)te(ae);this.addUndoStep()}},Object.defineProperty(le.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),le.prototype.showNotesEditor=function(){var V;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=(V=this._currentMarker.notes)!==null&&V!==void 0?V:"",this.overlayContainer.appendChild(this.notesArea))},le.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)},le.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},le.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Y=this.getState(),te=this.undoRedoManager.getLastUndoStep();if(!te||te.width===Y.width&&te.height===Y.height){var ve=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Y),ve1&&this.panTo({x:V.clientX,y:V.clientY}))},le.prototype.onPointerUp=function(V){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(V.clientX,V.clientY)),this.isDragging=!1,this.addUndoStep()},le.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},le.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},le.prototype.clientToLocalCoordinates=function(V,Y){var te=this.markerImage.getBoundingClientRect();return{x:(V-te.left)/this.zoomLevel,y:(Y-te.top)/this.zoomLevel}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"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()},le.prototype.addLicenseKey=function(V){ie.addKey(V)},le.prototype.addEventListener=function(V,Y){this.eventListeners.addEventListener(V,Y)},le.prototype.removeEventListener=function(V,Y){this.eventListeners.removeEventListener(V,Y)},le.prototype.renderState=function(V){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(le.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),le.prototype.focus=function(){var V=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Y){return Y(new Dt(V))}))},le.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Y){return Y(new Dt(V))}))},le.instanceCounter=0,le}();/* **********************************
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 rr=function(le,V){return(rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,te){Y.__proto__=te}||function(Y,te){for(var ve in te)Object.prototype.hasOwnProperty.call(te,ve)&&(Y[ve]=te[ve])})(le,V)};function sr(le,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function Y(){this.constructor=le}rr(le,V),le.prototype=V===null?Object.create(V):(Y.prototype=V.prototype,new Y)}function Kt(le,V,Y,te){return new(Y||(Y=Promise))(function(ve,ae){function ze(Wt){try{Ct(te.next(Wt))}catch(gt){ae(gt)}}function ft(Wt){try{Ct(te.throw(Wt))}catch(gt){ae(gt)}}function Ct(Wt){var gt;Wt.done?ve(Wt.value):(gt=Wt.value,gt instanceof Y?gt:new Y(function(Yt){Yt(gt)})).then(ze,ft)}Ct((te=te.apply(le,V||[])).next())})}function kt(le,V){var Y,te,ve,ae,ze={label:0,sent:function(){if(1&ve[0])throw ve[1];return ve[1]},trys:[],ops:[]};return ae={next:ft(0),throw:ft(1),return:ft(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function ft(Ct){return function(Wt){return function(gt){if(Y)throw new TypeError("Generator is already executing.");for(;ze;)try{if(Y=1,te&&(ve=2>[0]?te.return:gt[0]?te.throw||((ve=te.return)&&ve.call(te),0):te.next)&&!(ve=ve.call(te,gt[1])).done)return ve;switch(te=0,ve&&(gt=[2>[0],ve.value]),gt[0]){case 0:case 1:ve=gt;break;case 4:return ze.label++,{value:gt[1],done:!1};case 5:ze.label++,te=gt[1],gt=[0];continue;case 7:gt=ze.ops.pop(),ze.trys.pop();continue;default:if(!(ve=ze.trys,(ve=ve.length>0&&ve[ve.length-1])||gt[0]!==6&>[0]!==2)){ze=0;continue}if(gt[0]===3&&(!ve||gt[1]>ve[0]&>[1]0&&Y>0){var te=new Er(V,Y),ve=te.ratio>=1?20:te.getHorizontalLength(20),ae=te.ratio<1?20:te.getVerticalLength(20),ze=document.createElementNS("http://www.w3.org/2000/svg","svg");ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),ze.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ze);var ft=_t.createDefs();ze.appendChild(ft);var Ct=_t.createElement("clipPath",[["id","text-bg-clip"]]);ft.appendChild(Ct);var Wt=_t.createPath(_t.getHollowRectanglePath((24-ve)/2,(24-ae)/2,ve,ae,(24-ve)/2+2,(24-ae)/2+2,ve-4,ae-4));ze.appendChild(Wt);var gt=_t.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);gt.appendChild(_t.createTSpan(V+":"+Y)),ze.appendChild(gt);var Yt=gt.getBBox();_t.setAttributes(gt,[["x",((24-Yt.width)/2).toString()],["y",((24-Yt.height)/2-Yt.y).toString()]]);var er=_t.createPath(_t.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Yt.width))/2,(24-Math.ceil(Yt.height))/2,Math.ceil(Yt.width),Math.ceil(Yt.height)));return Ct.appendChild(er),_t.setAttributes(Wt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ze),ze.outerHTML}return''},le}(),Bt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te)||this;return ae.isDropdownOpen=!1,ae.onClick=ae.dropdownButtonClicked,ae.dropdownButtons=ve,ae}return sr(V,le),V.prototype.setupDropdown=function(){var Y=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(te){te.className=Y.className,te.colorsClassName=Y.colorsClassName,Y.dropdownBlock.appendChild(te.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},V.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},V.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},V.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},V.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},V.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},V}(It),Nt=function(){function le(V,Y){this.GRIP_SIZE=10,this.color=V,this.fillColor=Y,this.visual=_t.createGroup(),this.visual.appendChild(_t.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_t.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},le.prototype.setCenter=function(V,Y){this.visual.childNodes.forEach(function(te){return _t.setAttributes(te,[["cx",V.toString()],["cy",Y.toString()]])})},le}(),vr=function(){function le(V,Y,te,ve){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=V,this.canvasHeight=Y,this.margin=te,this.container=ve,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(le.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(V){this._aspectRatio=V,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.gridContainer&&_t.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(V){this._zoomFactor=V,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),le.prototype.open=function(){var V=this;this.cropShadeElement=_t.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=_t.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var Y=0;Ythis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-Y.height/2),_t.setAttributes(this.cropRectElement,[["x",Y.x.toString()],["y",Y.y.toString()],["width",Y.width.toString()],["height",Y.height.toString()]]);var te=Y.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ae,ze){var ft=Y.y+te*(ze+1);_t.setAttributes(ae,[["x1",""+Y.x],["y1",""+ft],["x2",""+(Y.x+Y.width)],["y2",""+ft]])});var ve=Y.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ae,ze){var ft=Y.x+ve*(ze+1);_t.setAttributes(ae,[["x1",""+ft],["y1",""+Y.y],["x2",""+ft],["y2",""+(Y.y+Y.height)]])}),_t.setAttributes(this.cropShadeElement,[["d",_t.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,Y.x,Y.y,Y.width,Y.height)]]),this.topLeftGrip.setCenter(Y.x,Y.y),this.topRightGrip.setCenter(Y.x+Y.width,Y.y),this.bottomLeftGrip.setCenter(Y.x,Y.y+Y.height),this.bottomRightGrip.setCenter(Y.x+Y.width,Y.y+Y.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},le.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)},le.prototype.clientToLocalCoordinates=function(V,Y){var te=this.container.getBoundingClientRect();return{x:V-te.left+this.margin,y:Y-te.top+this.margin}},le.prototype.onPointerDown=function(V){this.container.setPointerCapture(V.pointerId),this.previousPoint=this.clientToLocalCoordinates(V.clientX,V.clientY),this.cropRectElement===V.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(V.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(V.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(V.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(V.target)&&(this.activeGrip=this.bottomRightGrip)},le.prototype.onPointerMove=function(V){if(this.isMoving)this.move(this.clientToLocalCoordinates(V.clientX,V.clientY));else if(this.activeGrip){var Y=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize(Y)}V.preventDefault()},le.prototype.onPointerUp=function(V){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(V.pointerId)},le.prototype.move=function(V){var Y=V.x-this.previousPoint.x,te=V.y-this.previousPoint.y;this.zoomFactor!==1&&(Y=-Y/this.zoomFactor,te=-te/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+Y),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+te),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=V},le.prototype.resize=function(V){var Y=Object.assign({},this.cropRect),te=V.x-this.previousPoint.x,ve=V.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:Y.x+tethis.canvasWidth*this.zoomFactor&&(te=this.canvasWidth*this.zoomFactor-Y.width),Y.width+=te}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(Y.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(te),Y.height=this.aspectRatio.getVerticalLength(Y.width)):(Y.y+=ve,Y.height=this.cropRect.y+this.cropRect.height-Y.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?Y.height=this.aspectRatio.getVerticalLength(Y.width):Y.height+=ve}Y.width<10&&(Y.x=this.cropRect.x,Y.width=10),Y.height<10&&(Y.y=this.cropRect.y,Y.height=10),this.previousPoint=V,Y.x>=this.margin&&Y.y>=this.margin&&Y.x-this.margin+Y.width<=this.canvasWidth&&Y.y-this.margin+Y.height<=this.canvasHeight&&(this.cropRect=Y,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},le.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var V=this.cropRect.x+this.cropRect.width/2,Y=this.cropRect.y+this.cropRect.height/2,te=this.aspectRatio.getHorizontalLength(this.cropRect.height),ve=this.aspectRatio.getVerticalLength(this.cropRect.width);te/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=V-this.cropRect.width/2,this.cropRect.y=Y-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)}},le.prototype.getRescaledRect=function(V,Y,te,ve,ae,ze){var ft=te/V,Ct=ve/Y;return{x:(ae.x-ze)*ft+ze,y:(ae.y-ze)*Ct+ze,width:ae.width*ft,height:ae.height*Ct}},le.prototype.scaleCanvas=function(V,Y){var te=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,Y,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=Y,this.onCropChange&&this.onCropChange(te),this.setCropRectangle(te)},le}(),Qr=function(){function le(V){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=V,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(le.prototype,"angle",{get:function(){return this._angle},set:function(V){this._angle=V,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),le.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},le.prototype.onPointerDown=function(V){this.controlContainer.setPointerCapture(V.pointerId),this.isDragging=!0,this.previousPoint={x:V.clientX,y:V.clientY}},le.prototype.onPointerMove=function(V){this.isDragging&&(this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.previousPoint.x=V.clientX)},le.prototype.onPointerUp=function(V){this.isDragging&&this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(V.pointerId)},le.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var V=this.angleLabelText.getBBox();_t.setAttributes(this.angleLabelElement,[["x",((this.width-V.width)/2).toString()],["y",(this.height/2).toString()]])}},le.prototype.positionScaleShape=function(){if(this.scaleShape){var V=this.scaleShape.transform.baseVal.getItem(0);V.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(V,0)}},le.prototype.getVisual=function(){var V=document.createElementNS("http://www.w3.org/2000/svg","svg");V.setAttribute("xmlns","http://www.w3.org/2000/svg"),V.setAttribute("width",this.width+"px"),V.setAttribute("height",this.height+"px"),V.setAttribute("viewBox","0 0 "+this.width+" "+this.height),V.style.flexShrink="0",document.body.appendChild(V);for(var Y="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,te=1;te<=this.width/5+10;te++){var ve=te%5==0?this.height/3:this.height/6;Y+="h4v"+-ve+"h1v"+ve}Y+="v1H0Z",this.scaleShape=_t.createPath(Y);var ae=_t.createTransform();this.scaleShape.transform.baseVal.appendItem(ae),V.appendChild(this.scaleShape),this.angleLabelElement=_t.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=_t.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ze=_t.createTSpan("");return ze.innerHTML="°",this.angleLabelElement.appendChild(ze),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},le}(),Cr=function(){function le(){this.naturalSize=!1,this.imageType="image/png"}return le.prototype.rasterize=function(V,Y,te,ve,ae,ze,ft){var Ct=this;return new Promise(function(Wt){var gt=document.createElement("canvas");gt.width=V.width.baseVal.value-2*ve,gt.height=V.height.baseVal.value-2*ve;var Yt=1,er=1;Ct.naturalSize===!0?(Yt=Y.naturalWidth/(V.width.baseVal.value-2*ve)/ze,er=Y.naturalHeight/(V.height.baseVal.value-2*ve)/ft,gt.width=Y.naturalWidth/ze,gt.height=Y.naturalHeight/ft):Ct.width!==void 0&&Ct.height!==void 0&&(Yt=Ct.width/te.width,er=Ct.height/te.height,gt.width*=Yt,gt.height*=er);var Hr=gt.getContext("2d");Hr.translate(gt.width/2,gt.height/2),Hr.rotate(ae*Math.PI/180),Hr.scale(ze,ft),Hr.translate(-gt.width/2,-gt.height/2),Hr.drawImage(Y,0,0,gt.width,gt.height);var on=document.createElement("canvas");on.width=te.width*Yt,on.height=te.height*er,on.getContext("2d").putImageData(Hr.getImageData((te.x-ve)*Yt,(te.y-ve)*er,te.width*Yt,te.height*er),0,0),Wt(on.toDataURL(Ct.imageType,Ct.imageQuality))})},le}(),vt=function(){function le(V){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=le.instanceCounter++,this.styles=new Mt(this.instanceNo),this.target=V,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(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(V){this._zoomToCropEnabled=V,V?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"gridLines",{get:function(){return this._gridLines},set:function(V){this._gridLines=V,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(V){this._rotationAngle=V,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"aspectRatio",{get:function(){var V;return(V=this._aspectRatio)!==null&&V!==void 0?V:this.aspectRatios[0]},set:function(V){this._aspectRatio=V},enumerable:!1,configurable:!0}),le.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},le.prototype.show=function(){this.showUI(),this.open()},le.prototype.close=function(V){V===void 0&&(V=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),V||this.closeEventListeners.forEach(function(Y){return Y()}),this._isOpen=!1)},le.prototype.addRenderEventListener=function(V){this.renderEventListeners.push(V)},le.prototype.removeRenderEventListener=function(V){this.renderEventListeners.indexOf(V)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(V),1)},le.prototype.addCloseEventListener=function(V){this.closeEventListeners.push(V)},le.prototype.removeCloseEventListener=function(V){this.closeEventListeners.indexOf(V)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(V),1)},le.prototype.setupResizeObserver=function(){var V=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.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))},le.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var V=1*this.target.clientWidth/this.target.clientHeight,Y=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,te=Y+2*this.CANVAS_MARGINV+this.CANVAS_MARGIN?this.target.offsetTop-(V+this.CANVAS_MARGIN):0;this.coverDiv.style.top=Y+"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},le.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},le.prototype.addTopToolbar=function(){var V=this;this.topToolbar=new qt,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 Y=new Et;Y.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(Y);var te=[];this.aspectRatios.forEach(function(er){var Hr=new It(nr.getIcon(er.horizontal,er.vertical),er.horizontal===0&&er.vertical===0?"FREE":er.horizontal+":"+er.vertical);Hr.onClick=function(){return V.ratioButtonClicked(er)},te.push(Hr)}),this.aspectRatioButton=new Bt(nr.getIcon(0,0),"Aspect ratio",te),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,Y.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ve=new It('',"Toggle grid");ve.isActive=this.isGridVisible,ve.onClick=function(){V.isGridVisible=!V.isGridVisible,ve.isActive=V.isGridVisible},Y.addButton(ve);var ae=new It('',"Zoom to selection");if(ae.isActive=this.zoomToCropEnabled,ae.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,ae.isActive=V.zoomToCropEnabled},Y.addButton(ae),!ir.isLicensed){var ze=new wt;this.topToolbar.addElementBlock(ze);var ft=document.createElement("div");ft.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ct=document.createElement("a");Ct.style.color="currentColor",Ct.href="https://markerjs.com/products/cropro",Ct.target="_blank",Ct.innerHTML='',ft.appendChild(Ct),ze.addElement(ft)}var Wt=new Et;Wt.minWidth=3*this.toolbarHeight+"px",Wt.contentAlign="end",this.topToolbar.addButtonBlock(Wt);var gt=new It('',"OK");gt.onClick=this.startRenderAndClose,Wt.addButton(gt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(gt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new It('',"Close");Yt.onClick=this.close,Wt.addButton(Yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},le.prototype.addBottomToolbar=function(){var V=this;this.bottomToolbar=new qt,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 Y=new Et;Y.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(Y);var te=new It('',"Rotate left");te.onClick=this.rotateLeftButtonClicked,Y.addButton(te);var ve=new It('',"Rotate right");ve.onClick=this.rotateRightButtonClicked,Y.addButton(ve);var ae=new wt;ae.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ae),this.straightener=new Qr("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(Wt){V.rotateBy(Wt),V.straightener.angle=V.rotationAngle},ae.addElement(this.straightener.getUI());var ze=new Et;ze.minWidth=2*this.toolbarHeight+"px",ze.contentAlign="end",this.bottomToolbar.addButtonBlock(ze);var ft=new It('',"Flip horizontal");ft.onClick=this.flipHorizontallyButtonClicked,ze.addButton(ft);var Ct=new It('',"Flip vertical");Ct.onClick=this.flipVerticallyButtonClicked,ze.addButton(Ct)},le.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},le.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=nr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},le.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Er(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},le.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},le.prototype.restoreState=function(V){if(V){var Y=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(Y),this.cropRectChanged(Y),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation()}},le.prototype.clientToLocalCoordinates=function(V,Y){var te=this.cropImage.getBoundingClientRect();return{x:V-te.left,y:Y-te.top}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var V=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=V+"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()},le.prototype.rotateLeftButtonClicked=function(){var V=this.rotationAngle-90;this.rotationAngle%90!=0&&(V+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(V)},le.prototype.rotateRightButtonClicked=function(){var V=this.rotationAngle+90;this.rotationAngle%90!=0&&(V-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(V)},le.prototype.rotateTo=function(V){V=(V=V>180?V-360:V)<=-180?V+360:V,this.rotationAngle=V,this.applyRotation()},le.prototype.rotateBy=function(V){this.rotateTo((this.rotationAngle+V)%360)},le.prototype.applyRotation=function(){var V=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var Y=this.editingTargetRotationContainer.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(Y,0);var te=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/te.width,this.imageHeight/te.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=V},le.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},le.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},le.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},le.prototype.startRenderAndClose=function(){return Kt(this,void 0,void 0,function(){var V,Y;return kt(this,function(te){switch(te.label){case 0:return[4,this.render()];case 1:return V=te.sent(),Y=this.getState(),this.renderEventListeners.forEach(function(ve){return ve(V,Y)}),this.close(!0),[2]}})})},le.prototype.render=function(){return Kt(this,void 0,void 0,function(){var V;return kt(this,function(Y){switch(Y.label){case 0:return(V=new Cr).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,this.unzoomFromCrop(),_t.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,V.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 Y.sent(),[4,V.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,Y.sent()]}})})},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ot("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 Ot("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ot("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var V=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ot("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*V)+`px;
height: `+(this.toolbarHeight-2*V)+`px;
padding: `+V+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ot("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ot("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Rt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Rt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ot("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 Ot("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ot("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 Ot("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*V)+`px;
padding: `+V+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ot("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},le.instanceCounter=0,le}(),Ht=I("8hTe"),Zr=I.n(Ht),ln=/]*>/g;function kn(le){var V=document.createElement("div");return V.innerHTML=le,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var Cn=J.a=function(le){var V=le.value,Y=V===void 0?"":V,te=le.edit,ve=te===void 0?!1:te,ae=le.className,ze=le.showTextOnly,ft=le.showLines,Ct=le.replaces,Wt=le.zoomImg,gt=le.hasMask,Yt=le.style,er=Yt===void 0?{}:Yt,Hr=le.stylesPrev,on=Hr===void 0?{}:Hr,Gr=String(Y),lr=Object(f.useRef)(),qr=Object(f.useRef)(),On=Object(f.useState)(""),zt=Object(C.a)(On,2),mr=zt[0],pr=zt[1],jr=Object(f.useState)("office"),Tr=Object(C.a)(jr,2),li=Tr[0],An=Tr[1],Ui=function(){var hr=new vt(qr.current);hr.displayMode="popup",hr.addRenderEventListener(function(){var nn=Object(m.a)(e.a.mark(function xr(fn){var Fr;return e.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return lr.current.style.display="none",En.next=3,Object(ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:fn}});case 3:Fr=En.sent,Fr!=null&&Fr.id&&Ct(qr.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Fr==null?void 0:Fr.id,"?type=").concat(Fr.content_type));case 5:case"end":return En.stop()}},xr)}));return function(xr){return nn.apply(this,arguments)}}()),hr.show()},Bi=function(){var hr=new Gt(qr.current);hr.settings.displayMode="popup",hr.addEventListener("render",function(){var nn=Object(m.a)(e.a.mark(function xr(fn){var Fr;return e.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:if(lr.current.style.display="none",!qr.current){En.next=6;break}return En.next=4,Object(ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:fn.dataUrl}});case 4:Fr=En.sent,Fr!=null&&Fr.id&&Ct(qr.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Fr==null?void 0:Fr.id,"?type=").concat(Fr.content_type));case 6:case"end":return En.stop()}},xr)}));return function(xr){return nn.apply(this,arguments)}}()),hr.show(),window.markerArea=hr},qn=Object(f.useMemo)(function(){lr.current&&(lr.current.style.zIndex=-1);try{var en=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,hr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,nn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Gr=Gr.replace(en,"("+Q.a.API_SERVER+"/api/attachments/").replace(hr,'"'+Q.a.API_SERVER+"/api/attachments/").replace(nn,'"'+Q.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(mi){}var xr=B(Gr),fn=F();if(Gr.match(/\[TOC\]/)&&(xr=xr.replace("[TOC]
",L()),E()),xr=xr.replace(/(__special_katext_id_\d+__)/g,function(mi,En){var Un=fn[En],Di=Un.type,ui=Un.expression;return Object(re.renderToString)(kn(ui)||"",{displayMode:Di==="block",throwOnError:!1,output:"html"})}),xr=xr.replace(/▁/g,"\u2581\u2581\u2581"),P(),ze){var Fr=document.createElement("div");return Fr.innerHTML=xr,Fr.innerText}return setTimeout(function(){return hn()},500),xr},[Gr]),un=Object(f.useRef)();b.WebkitLineClamp=ft,ft&&(er=Object(y.a)(Object(y.a)({},er),b));function Si(en){var hr=en.target;if(hr.tagName.toUpperCase()==="IMG"){if(Wt){var nn=hr.getAttribute("src");pr(nn),An("image")}}else if(hr.tagName.toUpperCase()==="A"){var xr=hr.getAttribute("href");if(xr.indexOf("office")>-1)en.preventDefault(),pr(xr),An("office");else if(xr.indexOf("application/pdf")>-1)en.preventDefault(),pr(xr),An("pdf");else if(xr.indexOf("text/html")>-1)en.preventDefault(),pr(xr),An("html");else if(xr.startsWith("#")){en.preventDefault();var fn=document.getElementById(xr.replace("#",""));fn&&fn.scrollIntoView(!0)}}}var hn=function(){var hr,nn=(hr=un.current)===null||hr===void 0?void 0:hr.querySelectorAll("video");nn==null||nn.forEach(function(xr){if(xr.oncontextmenu=function(){return!1},xr.src.indexOf(".m3u8")>-1&&!xr.canPlayType("application/vnd.apple.mpegurl")){if(W.a.isSupported()){var fn=new W.a;fn.loadSource(xr.src),fn.attachMedia(xr)}}})};Object(f.useEffect)(function(){if(un.current&&qn&&(qn.match(ln)&&window.PR.prettyPrint()),un.current)return un.current.addEventListener("click",Si),function(){un.current.removeEventListener("click",Si),P(),E()}},[qn,un.current,Si]);var Yn=function(hr){if(!ve)return;hr.target.nodeName==="IMG"?(lr.current.style.zIndex=1,lr.current.style.display="flex",lr.current.style.width=hr.target.clientWidth+"px",lr.current.style.height=hr.target.clientHeight+"px",lr.current.style.top=hr.target.offsetTop+"px",lr.current.style.left=hr.target.offsetLeft+"px",qr.current.src=hr.target.getAttribute("src")):lr.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:un,style:Object(y.a)({},er),className:"".concat(ae||""," markdown-body ").concat(Zr.a.mdBody),onMouseOver:Yn,dangerouslySetInnerHTML:{__html:qn}}),r.a.createElement("div",{ref:lr,className:Zr.a.button},r.a.createElement(g.a,null,r.a.createElement(k.a,{onClick:function(){return Ui()}},"\u88C1\u526A"),r.a.createElement(k.a,{onClick:function(){return Bi()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:qr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),r.a.createElement(ee.a,{close:!0,data:mr,type:mr!=null&&mr.length?li:"",style:Object(y.a)({},on),onClose:function(){return pr("")}}))}},"9OqN":function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.mode.CTR=function(){var g=N.lib.BlockCipherMode.extend(),S=g.Encryptor=g.extend({processBlock:function(k,y){var m=this._cipher,C=m.blockSize,_=this._iv,e=this._counter;_&&(e=this._counter=_.slice(0),this._iv=void 0);var f=e.slice(0);m.encryptBlock(f,0),e[C-1]=e[C-1]+1|0;for(var r=0;r0&&Fe.current===oe.length){tt(!1);var _t=W(ir);_t=_t.filter(function(Mt){var Rt,Ot;return!!((Rt=Mt[0])!==null&&Rt!==void 0&&Rt.name&&(Ot=Mt[1])!==null&&Ot!==void 0&&Ot.name)}),_t=_t.map(function(Mt){return Object(d.a)(Object(d.a)(Object(d.a)({},Mt[0]),Mt[1]),{},{is_file:!1})}),he(_t),be()}}else tt(!1),be()});return}if(lt){var At=new FormData;At.append("file",ht.file),At.append("identifier",fe);var bt=Object(K.a)("/api/attachments.json",{method:"post",body:At},!0);bt.then(function(kt){if(kt.filename){Fe.current=Fe.current+1;var ir=Qe.current.map(function(Mt){if(Mt.name===(kt==null?void 0:kt.filename)){var Rt,Ot=Object(d.a)(Object(d.a)({},Mt),{},{is_oss:!lt});return kt!=null&&(Rt=kt.filename)!==null&&Rt!==void 0&&Rt.includes(".in")?(Ot.in_object_key=kt==null?void 0:kt.object,Ot.in_object_size=kt==null?void 0:kt.size,Ot.input=kt==null?void 0:kt.filename,Ot.in_file=ht):(Ot.out_object_key=kt==null?void 0:kt.object,Ot.out_object_size=kt==null?void 0:kt.size,Ot.output=kt==null?void 0:kt.filename,Ot.out_file=ht),Ot}return Mt});if(Qe.current=Object(l.a)(ir),q(Object(l.a)(ir)),Fe.current>0&&Fe.current===oe.length){tt(!1);var _t=W(ir);_t=_t.filter(function(Mt){var Rt,Ot;return!!((Rt=Mt[0])!==null&&Rt!==void 0&&Rt.name&&(Ot=Mt[1])!==null&&Ot!==void 0&&Ot.name)}),_t=_t.map(function(Mt){return Object(d.a)(Object(d.a)(Object(d.a)({},Mt[0]),Mt[1]),{},{is_file:!0})}),he(_t),be()}}else tt(!1),be()});return}var Xt=new A.a({endpoint:de.end_point,region:de.region,accessKeyId:de.access_key_id,accessKeySecret:de.access_key_secret,bucket:de.bucket,stsToken:de.security_token}),Gt=ht.name,rr={container_type:"TestSet",file_name:Gt},sr=Object(O.a)(),Kt="testsets/".concat(fe,"/").concat(sr).concat(Gt.indexOf(".")>-1?"."+Gt.split(".").pop():"");fe===null&&(Kt="testsets/".concat(sr).concat(Gt.indexOf(".")>-1?"."+Gt.split(".").pop():"")),Xt.multipartUpload(Kt,new Blob([ht.file],{type:ht.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Gt+""},url:de==null?void 0:de.callback_url,host:de==null?void 0:de.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(K.e)(rr)}}).then(function(kt){if(kt.data.status===0){Fe.current=Fe.current+1;var ir=Qe.current.map(function(Mt){var Rt,Ot;if(Mt.name===((Rt=kt.data)===null||Rt===void 0||((Ot=Rt.data)===null||Ot===void 0)?void 0:Ot.file_name)){var qt,Jr,Et,It=Object(d.a)(Object(d.a)({},Mt),{},{is_oss:!lt});if((qt=kt.data)!==null&&qt!==void 0&&(Jr=qt.data)!==null&&Jr!==void 0&&(Et=Jr.file_name)!==null&&Et!==void 0&&Et.includes(".in")){var wt,Er,nr,Bt,Nt,vr;It.in_object_key=(wt=kt.data)===null||wt===void 0||((Er=wt.data)===null||Er===void 0)?void 0:Er.object,It.in_object_size=(nr=kt.data)===null||nr===void 0||((Bt=nr.data)===null||Bt===void 0)?void 0:Bt.size,It.input=(Nt=kt.data)===null||Nt===void 0||((vr=Nt.data)===null||vr===void 0)?void 0:vr.file_name,It.in_file=ht}else{var Qr,Cr,vt,Ht,Zr,ln;It.out_object_key=(Qr=kt.data)===null||Qr===void 0||((Cr=Qr.data)===null||Cr===void 0)?void 0:Cr.object,It.out_object_size=(vt=kt.data)===null||vt===void 0||((Ht=vt.data)===null||Ht===void 0)?void 0:Ht.size,It.output=(Zr=kt.data)===null||Zr===void 0||((ln=Zr.data)===null||ln===void 0)?void 0:ln.file_name,It.out_file=ht}return It}return Mt});if(Qe.current=Object(l.a)(ir),q(Object(l.a)(ir)),Fe.current>0&&Fe.current===oe.length){tt(!1);var _t=W(ir);_t=_t.filter(function(Mt){var Rt,Ot;return!!((Rt=Mt[0])!==null&&Rt!==void 0&&Rt.name&&(Ot=Mt[1])!==null&&Ot!==void 0&&Ot.name)}),_t=_t.map(function(Mt){return Object(d.a)(Object(d.a)(Object(d.a)({},Mt[0]),Mt[1]),{},{is_file:!0})}),he(_t),be()}}})},Ne=function(ht){return new Promise(function(pt,Dt){for(var At=0,bt=[],Xt=function(sr){ht[sr].file.slice(0,1).arrayBuffer().then(function(){At++,At===ht.length&&(bt.length?(h.b.warn("".concat(bt.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Dt()):pt(ht))}).catch(function(Kt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Kt),At++,bt.push(ht[sr].name),At===ht.length&&(bt.length?(h.b.warn("".concat(bt.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Dt()):pt(ht))})},Gt=0;Gt100)return h.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(ht.name))return h.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var pt={name:ht.name,uid:ht.uid,file:ht,percent:0};return oe.push(pt),Qe.current=Object(l.a)(oe),q(Object(l.a)(oe)),!1}},ct=W(oe);return console.log(oe,ct,"fileList"),v.a.createElement(n.a,{visible:Ie,wrapClassName:Se,onOk:He,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:qe},onCancel:Re,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},v.a.createElement("div",{className:w.a.wrap},oe.length?v.a.createElement("div",null,v.a.createElement(_.a,{justify:"space-between",align:"middle",className:"mb20"},v.a.createElement("div",{style:{visibility:ie?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",v.a.createElement(f.a.Group,{className:"ml10",value:at,onChange:function(ht){return je(ht.target.value)}},v.a.createElement(f.a,{value:!1},"\u6587\u672C"),v.a.createElement(f.a,{value:!0},"\u6587\u4EF6"))),v.a.createElement(b.a,rt,v.a.createElement(c.a,{className:w.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),v.a.createElement(re,{data:ct,onRemove:Oe})):v.a.createElement("div",{className:w.a.noData},v.a.createElement("img",{src:F.a,alt:""}),v.a.createElement(b.a,rt,v.a.createElement(c.a,{className:w.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),v.a.createElement("div",{className:w.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",v.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",v.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",v.a.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",v.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",v.a.createElement("br",null))))},re=function(ye){var be=ye.data,he=be===void 0?[]:be,Ie=ye.onRemove,Se=ye.width,fe=Se===void 0?"auto":Se,ue=ye.showScore,ie=ue===void 0?!1:ue,Ce=ye.disabled,ne=Ce===void 0?!1:Ce,ce=ye.inputChange,Ae=ye.onEvaluatingChange,oe=ye.showEvaluatingSetting,q=oe===void 0?!1:oe,$={value:"",filename:"",dataUrl:""},X=Object(R.useState)(Object(d.a)({},$)),de=Object(s.a)(X,2),pe=de[0],xe=de[1],Ke=function(it){var at=document.createElement("a");document.body.appendChild(at);var je=URL.createObjectURL(it.file);at.href=je,at.download=it.name,at.click(),URL.revokeObjectURL(je),document.body.removeChild(at)},qe=function(it,at){Object(B.y)(it,at)},tt=function(it,at){n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:v.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){Ie(it,at)},onCancel:function(){}})};return he.length?v.a.createElement("div",{style:{width:fe}},v.a.createElement("div",{className:w.a.head},q&&v.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",v.a.createElement(m.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},v.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),v.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),v.a.createElement("div",{style:{width:ie?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),v.a.createElement("div",{style:{width:ie?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),ie&&v.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),q&&v.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",v.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},v.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),q&&v.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",v.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},v.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),v.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),he.map(function(et,it){var at,je,De,nt;return v.a.createElement("div",{key:it,className:w.a.list},q&&v.a.createElement("div",{style:{width:"10%"}},v.a.createElement(k.a,{checked:!!et.hidden,onChange:function(Ve){Ae(Ve.target.checked?1:0,it,"hidden")}})),v.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",it+1),v.a.createElement("div",{className:w.a.info,style:{width:ie?"25%":"35%"}},v.a.createElement("span",{title:et.input||((at=et[0])===null||at===void 0?void 0:at.name),onClick:Object(u.a)(L.a.mark(function lt(){var Ve,Qe;return L.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(et.input?et.input_file_url?Ve=et.input_file_url:Ve=et.in_file:Ve=et[0],!(typeof Ve=="string")){Re.next=14;break}return Re.next=4,fetch(Ve,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Qe=Re.sent,Re.t0=xe,Re.next=8,Qe.text();case 8:Re.t1=Re.sent,Re.t2=Ve,Re.t3={value:Re.t1,filename:"",dataUrl:Re.t2},(0,Re.t0)(Re.t3),Re.next=18;break;case 14:return Re.next=16,Object(B.G)(Ve.file);case 16:Qe=Re.sent,xe({value:Qe.text,filename:Ve.name,dataUrl:Qe.link});case 18:case"end":return Re.stop()}},lt)}))},et.input||((je=et[0])===null||je===void 0?void 0:je.name))),v.a.createElement("div",{className:w.a.info,style:{width:ie?"25%":"35%"}},v.a.createElement("span",{title:et.output||((De=et[1])===null||De===void 0?void 0:De.name),onClick:Object(u.a)(L.a.mark(function lt(){var Ve,Qe;return L.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(et.input?et.output_file_url?Ve=et.output_file_url:Ve=et.out_file:Ve=et[1],!(typeof Ve=="string")){Re.next=14;break}return Re.next=4,fetch(Ve,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Qe=Re.sent,Re.t0=xe,Re.next=8,Qe.text();case 8:Re.t1=Re.sent,Re.t2=Ve,Re.t3={value:Re.t1,filename:"",dataUrl:Re.t2},(0,Re.t0)(Re.t3),Re.next=18;break;case 14:return Re.next=16,Object(B.G)(Ve.file);case 16:Qe=Re.sent,xe({value:Qe.text,filename:Ve.name,dataUrl:Qe.link});case 18:case"end":return Re.stop()}},lt)}))},et.output||((nt=et[1])===null||nt===void 0?void 0:nt.name))),ie&&v.a.createElement("div",{style:{width:"20%"}},v.a.createElement(g.a,{disabled:ne,style:{width:"70%"},onChange:function(Ve){return ce(Ve,it)},value:et.score}),v.a.createElement("span",null,"\xA0%")),q&&v.a.createElement("div",{style:{width:"20%"}},v.a.createElement(k.a,{checked:et.is_invisible||!1,onChange:function(Ve){Ae(Ve.target.checked,it,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),q&&v.a.createElement("div",{style:{width:"20%"}},v.a.createElement(k.a,{checked:et.last_match_rule||!1,onChange:function(Ve){Ae(Ve.target.checked,it,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),v.a.createElement("div",{onClick:function(){return tt(et,it)},style:{width:"10%"}},v.a.createElement("span",{className:w.a.del},"\u5220\u9664")))}),v.a.createElement(U.a,{close:!0,data:pe.dataUrl,filename:pe.filename,type:pe.dataUrl.length?"txt":"",onClose:function(){return xe(Object(d.a)({},$))},monacoEditor:{value:pe.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):v.a.createElement(v.a.Fragment,null)};J.b=Q},BU3w:function(H,J,I){"use strict";I.d(J,"a",function(){return m});var N=I("MNnm"),g="rc-util-key";function S(C){if(C.attachTo)return C.attachTo;var _=document.querySelector("head");return _||document.body}function k(C){var _,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(N.a)())return null;var f=document.createElement("style");if((_=e.csp)===null||_===void 0?void 0:_.nonce){var r;f.nonce=(r=e.csp)===null||r===void 0?void 0:r.nonce}f.innerHTML=C;var c=S(e),i=c.firstChild;return e.prepend&&c.prepend?c.prepend(f):e.prepend&&i?c.insertBefore(f,i):c.appendChild(f),f}var y=new Map;function m(C,_){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=S(e);if(!y.has(f)){var r=k("",e),c=r.parentNode;y.set(f,c),c.removeChild(r)}var i=Array.from(y.get(f).children).find(function(u){return u.tagName==="STYLE"&&u[g]===_});if(i){var n,o;if(((n=e.csp)===null||n===void 0?void 0:n.nonce)&&i.nonce!==((o=e.csp)===null||o===void 0?void 0:o.nonce)){var h;i.nonce=(h=e.csp)===null||h===void 0?void 0:h.nonce}return i.innerHTML!==C&&(i.innerHTML=C),i}var d=k(C,e);return d[g]=_,d}},Bd2K:function(H,J,I){(function(N){N(I("VrN/"),I("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(e,f,r){if(r!=N.Init&&r&&e.removeKeyMap("autoCloseTags"),!f)return;var c={name:"autoCloseTags"};(typeof f!="object"||f.whenClosing!==!1)&&(c["'/'"]=function(i){return m(i)}),(typeof f!="object"||f.whenOpening!==!1)&&(c["'>'"]=function(i){return k(i)}),e.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["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 k(e){if(e.getOption("disableInput"))return N.Pass;for(var f=e.listSelections(),r=[],c=e.getOption("autoCloseTags"),i=0;in.ch&&(s=s.slice(0,s.length-o.end+n.ch));var p=s.toLowerCase();if(!s||o.type=="string"&&(o.end!=n.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&u.close||o.string.indexOf("/")==n.ch-o.start-1||E&&C(E,p)>-1||_(e,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(d)||[],s,n,!0))return N.Pass;var L=typeof c=="object"&&c.emptyTags;if(L&&C(L,s)>-1){r[i]={text:"/>",newPos:N.Pos(n.line,n.ch+2)};continue}var R=b&&C(b,p)>-1;r[i]={indent:R,text:">"+(R?`
`:"")+""+s+">",newPos:R?N.Pos(n.line+1,0):N.Pos(n.line,n.ch+1)}}for(var v=typeof c=="object"&&c.dontIndentOnAutoClose,i=f.length-1;i>=0;i--){var x=r[i];e.replaceRange(x.text,f[i].head,f[i].anchor,"+insert");var w=e.listSelections().slice(0);w[i]={head:x.newPos,anchor:x.newPos},e.setSelections(w),!v&&x.indent&&(e.indentLine(x.newPos.line,null,!0),e.indentLine(x.newPos.line+1,null,!0))}}function y(e,f){for(var r=e.listSelections(),c=[],i=f?"/":"",n=e.getOption("autoCloseTags"),o=typeof n=="object"&&n.dontIndentOnSlash,h=0;h"&&(E+=">"),c[h]=E}if(e.replaceSelections(c),r=e.listSelections(),!o)for(var h=0;h=0&&f[d]==r;d--)++h;c=o.to;for(var d=1;d0){for(var f=0;f<_.length;f++)if(_[f].compile_success==0||!_[f].compile_success){e=!1;break}}else e=!1;return e}function S(_){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",f=[],r=0;r<_.length;r++){var c=_[r],i=e?"".concat(e,"/").concat(c.name):"".concat(c.name);f.push({title:c.name,isLeaf:!(c.type==="tree"),key:i})}return f}function k(_,e,f){for(var r=0;r<_.length;r++){var c=_[r];if(c.key===e){c.children=f;break}c.children&&k(c.children,e,f)}return _}function y(_,e,f){var r;return function(){var c=this,i=arguments,n=function(){r=null,f||_.apply(c,i)},o=f&&!r;clearTimeout(r),r=setTimeout(n,e),o&&_.apply(c,i)}}var m=!0,C=N.a.API_SERVER},Bvq2:function(H,J,I){H.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":function(H,J,I){},"C/vA":function(H,J,I){"use strict";I.d(J,"a",function(){return N});function N(g){const S=this;let k=!1,y;return function(){return k||(k=!0,y=g.apply(S,arguments)),y}}},"Cg/j":function(H,J,I){"use strict";I.d(J,"b",function(){return N}),I.d(J,"a",function(){return g}),I.d(J,"c",function(){return k}),I.d(J,"d",function(){return y});var N;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function C(_){return _[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=C})(N||(N={}));const g=k("instantiationService");function S(m,C,_,e){C[N.DI_TARGET]===C?C[N.DI_DEPENDENCIES].push({id:m,index:_,optional:e}):(C[N.DI_DEPENDENCIES]=[{id:m,index:_,optional:e}],C[N.DI_TARGET]=C)}function k(m){if(N.serviceIds.has(m))return N.serviceIds.get(m);const C=function(_,e,f){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");S(C,_,f,!1)};return C.toString=()=>m,N.serviceIds.set(m,C),C}function y(m){return function(C,_,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");S(m,C,e,!0)}}},CrYA:function(H,J,I){var N=I("MFOe"),g=N.Global;H.exports={name:"sessionStorage",read:k,write:y,each:m,remove:C,clearAll:_};function S(){return g.sessionStorage}function k(e){return S().getItem(e)}function y(e,f){return S().setItem(e,f)}function m(e){for(var f=S().length-1;f>=0;f--){var r=S().key(f);e(k(r),r)}}function C(e){return S().removeItem(e)}function _(){return S().clear()}},DlQD:function(H,J,I){(function(N,g){H.exports=g()})(this,function(){"use strict";function N(Fe,Re){for(var Me=0;MeFe.length)&&(Re=Fe.length);for(var Me=0,Ee=new Array(Re);Me=Fe.length?{done:!0}:{done:!1,value:Fe[Ee++]}}}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 Me=Fe[Symbol.iterator](),Me.next.bind(Me)}function m(Fe,Re){return Re={exports:{}},Fe(Re,Re.exports),Re.exports}var C=m(function(Fe){function Re(){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 Me(Ee){Fe.exports.defaults=Ee}Fe.exports={defaults:Re(),getDefaults:Re,changeDefaults:Me}}),_=C.defaults,e=C.getDefaults,f=C.changeDefaults,r=/[&<>"']/,c=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(Re){return o[Re]};function d(Fe,Re){if(Re){if(r.test(Fe))return Fe.replace(c,h)}else if(i.test(Fe))return Fe.replace(n,h);return Fe}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Fe){return Fe.replace(u,function(Re,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var l=/(^|[^\[])\^/g;function E(Fe,Re){Fe=Fe.source||Fe,Re=Re||"";var Me={replace:function(Oe,ke){return ke=ke.source||ke,ke=ke.replace(l,"$1"),Fe=Fe.replace(Oe,ke),Me},getRegex:function(){return new RegExp(Fe,Re)}};return Me}var b=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(Fe,Re,Me){if(Fe){var Ee;try{Ee=decodeURIComponent(s(Me)).replace(b,"").toLowerCase()}catch(Oe){return null}if(Ee.indexOf("javascript:")===0||Ee.indexOf("vbscript:")===0||Ee.indexOf("data:")===0)return null}Re&&!p.test(Me)&&(Me=T(Re,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(Oe){return null}return Me}var R={},v=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(Fe,Re){R[" "+Fe]||(v.test(Fe)?R[" "+Fe]=Fe+"/":R[" "+Fe]=z(Fe,"/",!0)),Fe=R[" "+Fe];var Me=Fe.indexOf(":")===-1;return Re.substring(0,2)==="//"?Me?Re:Fe.replace(x,"$1")+Re:Re.charAt(0)==="/"?Me?Re:Fe.replace(w,"$1")+Re:Fe+Re}var F={exec:function(){}};function P(Fe){for(var Re=1,Me,Ee;Re=0&&He[ct]==="\\";)rt=!rt;return rt?"|":" |"}),Ee=Me.split(/ \|/),Oe=0;if(Ee.length>Re)Ee.splice(Re);else for(;Ee.length=Ee.length?Oe.slice(Ee.length):Oe}).join(`
`)}var be=function(){function Fe(Me){this.options=Me||U}var Re=Fe.prototype;return Re.space=function(Ee){var Oe=this.rules.block.newline.exec(Ee);if(Oe)return Oe[0].length>1?{type:"space",raw:Oe[0]}:{raw:`
`}},Re.code=function(Ee,Oe){var ke=this.rules.block.code.exec(Ee);if(ke){var Ne=Oe[Oe.length-1];if(Ne&&Ne.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var He=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?He:D(He,`
`)}}},Re.fences=function(Ee){var Oe=this.rules.block.fences.exec(Ee);if(Oe){var ke=Oe[0],Ne=ye(ke,Oe[3]||"");return{type:"code",raw:ke,lang:Oe[2]?Oe[2].trim():Oe[2],text:Ne}}},Re.heading=function(Ee){var Oe=this.rules.block.heading.exec(Ee);if(Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},Re.nptable=function(Ee){var Oe=this.rules.block.nptable.exec(Ee);if(Oe){var ke={type:"table",header:W(Oe[1].replace(/^ *| *\| *$/g,"")),align:Oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Oe[3]?Oe[3].replace(/\n$/,"").split(`
`):[],raw:Oe[0]};if(ke.header.length===ke.align.length){var Ne=ke.align.length,He;for(He=0;He ?/gm,"");return{type:"blockquote",raw:Oe[0],text:ke}}},Re.list=function(Ee){var Oe=this.rules.block.list.exec(Ee);if(Oe){for(var ke=Oe[0],Ne=Oe[2],He=Ne.length>1,rt=Ne[Ne.length-1]===")",ct={type:"list",raw:ke,ordered:He,start:He?+Ne.slice(0,-1):"",loose:!1,items:[]},yt=Oe[0].match(this.rules.block.item),ht=!1,pt,Dt,At,bt,Xt,Gt,rr,sr=yt.length,Kt=0;Kt1||this.options.smartLists&&At!==Ne)&&(bt=yt.slice(Kt+1).join(`
`),ct.raw=ct.raw.substring(0,ct.raw.length-bt.length),Kt=sr-1)),Xt=ht||/\n\n(?!\s*$)/.test(pt),Kt!==sr-1&&(ht=pt.charAt(pt.length-1)===`
`,Xt||(Xt=ht)),Xt&&(ct.loose=!0),Gt=/^\[[ xX]\] /.test(pt),rr=void 0,Gt&&(rr=pt[1]!==" ",pt=pt.replace(/^\[[ xX]\] +/,"")),ct.items.push({type:"list_item",raw:ke,task:Gt,checked:rr,loose:Xt,text:pt});return ct}},Re.html=function(Ee){var Oe=this.rules.block.html.exec(Ee);if(Oe)return{type:this.options.sanitize?"paragraph":"html",raw:Oe[0],pre:!this.options.sanitizer&&(Oe[1]==="pre"||Oe[1]==="script"||Oe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):Q(Oe[0]):Oe[0]}},Re.def=function(Ee){var Oe=this.rules.block.def.exec(Ee);if(Oe){Oe[3]&&(Oe[3]=Oe[3].substring(1,Oe[3].length-1));var ke=Oe[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Oe[0],href:Oe[2],title:Oe[3]}}},Re.table=function(Ee){var Oe=this.rules.block.table.exec(Ee);if(Oe){var ke={type:"table",header:W(Oe[1].replace(/^ *| *\| *$/g,"")),align:Oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Oe[3]?Oe[3].replace(/\n$/,"").split(`
`):[]};if(ke.header.length===ke.align.length){ke.raw=Oe[0];var Ne=ke.align.length,He;for(He=0;He/i.test(Ne[0])&&(Oe=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ne[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ne[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Ne[0],inLink:Oe,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):Q(Ne[0]):Ne[0]}},Re.link=function(Ee){var Oe=this.rules.inline.link.exec(Ee);if(Oe){var ke=re(Oe[2],"()");if(ke>-1){var Ne=Oe[0].indexOf("!")===0?5:4,He=Ne+Oe[1].length+ke;Oe[2]=Oe[2].substring(0,ke),Oe[0]=Oe[0].substring(0,He).trim(),Oe[3]=""}var rt=Oe[2],ct="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(rt);yt?(rt=yt[1],ct=yt[3]):ct=""}else ct=Oe[3]?Oe[3].slice(1,-1):"";rt=rt.trim().replace(/^<([\s\S]*)>$/,"$1");var ht=ee(Oe,{href:rt&&rt.replace(this.rules.inline._escapes,"$1"),title:ct&&ct.replace(this.rules.inline._escapes,"$1")},Oe[0]);return ht}},Re.reflink=function(Ee,Oe){var ke;if((ke=this.rules.inline.reflink.exec(Ee))||(ke=this.rules.inline.nolink.exec(Ee))){var Ne=(ke[2]||ke[1]).replace(/\s+/g," ");if(Ne=Oe[Ne.toLowerCase()],!Ne||!Ne.href){var He=ke[0].charAt(0);return{type:"text",raw:He,text:He}}var rt=ee(ke,Ne,ke[0]);return rt}},Re.strong=function(Ee,Oe,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.strong.start.exec(Ee);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Oe=Oe.slice(-1*Ee.length);var He=Ne[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;He.lastIndex=0;for(var rt;(Ne=He.exec(Oe))!=null;)if(rt=this.rules.inline.strong.middle.exec(Oe.slice(0,Ne.index+3)),rt)return{type:"strong",raw:Ee.slice(0,rt[0].length),text:Ee.slice(2,rt[0].length-2)}}},Re.em=function(Ee,Oe,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.em.start.exec(Ee);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Oe=Oe.slice(-1*Ee.length);var He=Ne[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;He.lastIndex=0;for(var rt;(Ne=He.exec(Oe))!=null;)if(rt=this.rules.inline.em.middle.exec(Oe.slice(0,Ne.index+2)),rt)return{type:"em",raw:Ee.slice(0,rt[0].length),text:Ee.slice(1,rt[0].length-1)}}},Re.codespan=function(Ee){var Oe=this.rules.inline.code.exec(Ee);if(Oe){var ke=Oe[2].replace(/\n/g," "),Ne=/[^ ]/.test(ke),He=ke.startsWith(" ")&&ke.endsWith(" ");return Ne&&He&&(ke=ke.substring(1,ke.length-1)),ke=Q(ke,!0),{type:"codespan",raw:Oe[0],text:ke}}},Re.br=function(Ee){var Oe=this.rules.inline.br.exec(Ee);if(Oe)return{type:"br",raw:Oe[0]}},Re.del=function(Ee){var Oe=this.rules.inline.del.exec(Ee);if(Oe)return{type:"del",raw:Oe[0],text:Oe[1]}},Re.autolink=function(Ee,Oe){var ke=this.rules.inline.autolink.exec(Ee);if(ke){var Ne,He;return ke[2]==="@"?(Ne=Q(this.options.mangle?Oe(ke[1]):ke[1]),He="mailto:"+Ne):(Ne=Q(ke[1]),He=Ne),{type:"link",raw:ke[0],text:Ne,href:He,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Re.url=function(Ee,Oe){var ke;if(ke=this.rules.inline.url.exec(Ee)){var Ne,He;if(ke[2]==="@")Ne=Q(this.options.mangle?Oe(ke[0]):ke[0]),He="mailto:"+Ne;else{var rt;do rt=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(rt!==ke[0]);Ne=Q(ke[0]),ke[1]==="www."?He="http://"+Ne:He=Ne}return{type:"link",raw:ke[0],text:Ne,href:He,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Re.inlineText=function(Ee,Oe,ke){var Ne=this.rules.inline.text.exec(Ee);if(Ne){var He;return Oe?He=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):Q(Ne[0]):Ne[0]:He=Q(this.options.smartypants?ke(Ne[0]):Ne[0]),{type:"text",raw:Ne[0],text:He}}},Fe}(),he=B.noopTest,Ie=B.edit,Se=B.merge,fe={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:he,table:he,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};fe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,fe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,fe.def=Ie(fe.def).replace("label",fe._label).replace("title",fe._title).getRegex(),fe.bullet=/(?:[*+-]|\d{1,9}[.)])/,fe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,fe.item=Ie(fe.item,"gm").replace(/bull/g,fe.bullet).getRegex(),fe.list=Ie(fe.list).replace(/bull/g,fe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+fe.def.source+")").getRegex(),fe._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",fe._comment=//,fe.html=Ie(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fe.paragraph=Ie(fe._paragraph).replace("hr",fe.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",fe._tag).getRegex(),fe.blockquote=Ie(fe.blockquote).replace("paragraph",fe.paragraph).getRegex(),fe.normal=Se({},fe),fe.gfm=Se({},fe.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*|$)"}),fe.gfm.nptable=Ie(fe.gfm.nptable).replace("hr",fe.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",fe._tag).getRegex(),fe.gfm.table=Ie(fe.gfm.table).replace("hr",fe.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",fe._tag).getRegex(),fe.pedantic=Se({},fe.normal,{html:Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fe._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:he,paragraph:Ie(fe.normal._paragraph).replace("hr",fe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",fe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:he,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:he,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ue.punctuation=Ie(ue.punctuation).replace(/punctuation/g,ue._punctuation).getRegex(),ue._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ue._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ue.em.start=Ie(ue.em.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.middle=Ie(ue.em.middle).replace(/punctuation/g,ue._punctuation).replace(/overlapSkip/g,ue._overlapSkip).getRegex(),ue.em.endAst=Ie(ue.em.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.endUnd=Ie(ue.em.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.start=Ie(ue.strong.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.middle=Ie(ue.strong.middle).replace(/punctuation/g,ue._punctuation).replace(/blockSkip/g,ue._blockSkip).getRegex(),ue.strong.endAst=Ie(ue.strong.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.endUnd=Ie(ue.strong.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.blockSkip=Ie(ue._blockSkip,"g").getRegex(),ue.overlapSkip=Ie(ue._overlapSkip,"g").getRegex(),ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ue._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])?)+(?![-_])/,ue.autolink=Ie(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex(),ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ue.tag=Ie(ue.tag).replace("comment",fe._comment).replace("attribute",ue._attribute).getRegex(),ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ue._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ue.link=Ie(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex(),ue.reflink=Ie(ue.reflink).replace("label",ue._label).getRegex(),ue.reflinkSearch=Ie(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex(),ue.normal=Se({},ue),ue.pedantic=Se({},ue.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:Ie(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()}),ue.gfm=Se({},ue.normal,{escape:Ie(ue.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&&(Ee="x"+Ee.toString(16)),Re+=""+Ee+";";return Re}var q=function(){function Fe(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||Ce,this.options.tokenizer=this.options.tokenizer||new be,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ee={block:ne.normal,inline:ce.normal};this.options.pedantic?(Ee.block=ne.pedantic,Ee.inline=ce.pedantic):this.options.gfm&&(Ee.block=ne.gfm,this.options.breaks?Ee.inline=ce.breaks:Ee.inline=ce.gfm),this.tokenizer.rules=Ee}Fe.lex=function(Ee,Oe){var ke=new Fe(Oe);return ke.lex(Ee)};var Re=Fe.prototype;return Re.lex=function(Ee){return Ee=Ee.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(Ee,this.tokens,!0),this.inline(this.tokens),this.tokens},Re.blockTokens=function(Ee,Oe,ke){Oe===void 0&&(Oe=[]),ke===void 0&&(ke=!0),Ee=Ee.replace(/^ +$/gm,"");for(var Ne,He,rt,ct;Ee;){if(Ne=this.tokenizer.space(Ee)){Ee=Ee.substring(Ne.raw.length),Ne.type&&Oe.push(Ne);continue}if(Ne=this.tokenizer.code(Ee,Oe)){Ee=Ee.substring(Ne.raw.length),Ne.type?Oe.push(Ne):(ct=Oe[Oe.length-1],ct.raw+=`
`+Ne.raw,ct.text+=`
`+Ne.text);continue}if(Ne=this.tokenizer.fences(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.heading(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.nptable(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.hr(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.blockquote(Ee)){Ee=Ee.substring(Ne.raw.length),Ne.tokens=this.blockTokens(Ne.text,[],ke),Oe.push(Ne);continue}if(Ne=this.tokenizer.list(Ee)){for(Ee=Ee.substring(Ne.raw.length),rt=Ne.items.length,He=0;He
"+je(rt.message+"",!0)+"
";throw rt}}Ve.options=Ve.setOptions=function(Fe){return it(Ve.defaults,Fe),nt(Ve.defaults),Ve},Ve.getDefaults=De,Ve.defaults=lt,Ve.use=function(Fe){var Re=it({},Fe);if(Fe.renderer&&function(){var Ee=Ve.defaults.renderer||new pe,Oe=function(He){var rt=Ee[He];Ee[He]=function(){for(var ct=arguments.length,yt=new Array(ct),ht=0;ht=0;i--){if(!S(c[i]))continue;var n=c[i].split("="),o=unescape(n[0]),h=unescape(n[1]);r(h,o)}}function C(r,c){if(!r)return;k.cookie=escape(r)+"="+escape(c)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function _(r){if(!r||!f(r))return;k.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function e(){m(function(r,c){_(c)})}function f(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(k.cookie)}},E4JC:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.StreamCipher,y=g.algo,m=[],C=[],_=[],e=y.Rabbit=k.extend({_doReset:function(){for(var r=this._key.words,c=this.cfg.iv,i=0;i<4;i++)r[i]=(r[i]<<8|r[i]>>>24)&16711935|(r[i]<<24|r[i]>>>8)&4278255360;var n=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],o=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var i=0;i<4;i++)f.call(this);for(var i=0;i<8;i++)o[i]^=n[i+4&7];if(c){var h=c.words,d=h[0],u=h[1],s=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,l=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=s>>>16|l&4294901760,b=l<<16|s&65535;o[0]^=s,o[1]^=E,o[2]^=l,o[3]^=b,o[4]^=s,o[5]^=E,o[6]^=l,o[7]^=b;for(var i=0;i<4;i++)f.call(this)}},_doProcessBlock:function(r,c){var i=this._X;f.call(this),m[0]=i[0]^i[5]>>>16^i[3]<<16,m[1]=i[2]^i[7]>>>16^i[5]<<16,m[2]=i[4]^i[1]>>>16^i[7]<<16,m[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,r[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function f(){for(var r=this._X,c=this._C,i=0;i<8;i++)C[i]=c[i];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0>>0?1:0)|0,this._b=c[7]>>>0>>0?1:0;for(var i=0;i<8;i++){var n=r[i]+c[i],o=n&65535,h=n>>>16,d=((o*o>>>17)+o*h>>>15)+h*h,u=((n&4294901760)*n|0)+((n&65535)*n|0);_[i]=d^u}r[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,r[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,r[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,r[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,r[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,r[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,r[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,r[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.Rabbit=k._createHelper(e)}(),N.Rabbit})},ELLl:function(H,J,I){(function(N){N(I("VrN/"))})(function(N){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=N.Pos;N.defineOption("autoCloseBrackets",!1,function(o,h,d){d&&d!=N.Init&&(o.removeKeyMap(y),o.state.closeBrackets=null),h&&(m(k(h,"pairs")),o.state.closeBrackets=h,o.addKeyMap(y))});function k(o,h){return h=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[h]!=null?o[h]:g[h]}var y={Backspace:e,Enter:f};function m(o){for(var h=0;h=0;s--){var E=u[s].head;o.replaceRange("",S(E.line,E.ch-1),S(E.line,E.ch+1),"+delete")}}function f(o){var h=_(o),d=h&&k(h,"explode");if(!d||o.getOption("disableInput"))return N.Pass;for(var u=o.listSelections(),s=0;s0;return{anchor:new S(o.anchor.line,o.anchor.ch+(h?-1:1)),head:new S(o.head.line,o.head.ch+(h?1:-1))}}function c(o,h){var d=_(o);if(!d||o.getOption("disableInput"))return N.Pass;var u=k(d,"pairs"),s=u.indexOf(h);if(s==-1)return N.Pass;for(var l=k(d,"closeBefore"),E=k(d,"triples"),b=u.charAt(s+1)==h,p=o.listSelections(),L=s%2==0,R,v=0;v=0&&o.getRange(w,S(w.line,w.ch+3))==h+h+h?T="skipThree":T="skip";else if(b&&w.ch>1&&E.indexOf(h)>=0&&o.getRange(S(w.line,w.ch-2),w)==h+h){if(w.ch>2&&/\bstring/.test(o.getTokenTypeAt(S(w.line,w.ch-2))))return N.Pass;T="addFour"}else if(b){var P=w.ch==0?" ":o.getRange(S(w.line,w.ch-1),w);if(!N.isWordChar(F)&&P!=h&&!N.isWordChar(P))T="both";else return N.Pass}else if(L&&(F.length===0||/\s/.test(F)||l.indexOf(F)>-1))T="both";else return N.Pass;if(!R)R=T;else if(R!=T)return N.Pass}var A=s%2?u.charAt(s-1):h,z=s%2?h:u.charAt(s+1);o.operation(function(){if(R=="skip")o.execCommand("goCharRight");else if(R=="skipThree")for(var K=0;K<3;K++)o.execCommand("goCharRight");else if(R=="surround"){for(var O=o.getSelections(),K=0;K>>24)&16711935|(R<<24|R>>>8)&4278255360}var v=this._hash.words,x=c.words,w=i.words,T=_.words,F=e.words,P=f.words,A=r.words,z,K,O,B,U,D,W,Q,re,ee;D=z=v[0],W=K=v[1],Q=O=v[2],re=B=v[3],ee=U=v[4];for(var ye,p=0;p<80;p+=1)ye=z+E[b+T[p]]|0,p<16?ye+=o(K,O,B)+x[0]:p<32?ye+=h(K,O,B)+x[1]:p<48?ye+=d(K,O,B)+x[2]:p<64?ye+=u(K,O,B)+x[3]:ye+=s(K,O,B)+x[4],ye=ye|0,ye=l(ye,P[p]),ye=ye+U|0,z=U,U=B,B=l(O,10),O=K,K=ye,ye=D+E[b+F[p]]|0,p<16?ye+=s(W,Q,re)+w[0]:p<32?ye+=u(W,Q,re)+w[1]:p<48?ye+=d(W,Q,re)+w[2]:p<64?ye+=h(W,Q,re)+w[3]:ye+=o(W,Q,re)+w[4],ye=ye|0,ye=l(ye,A[p]),ye=ye+ee|0,D=ee,ee=re,re=l(Q,10),Q=W,W=ye;ye=v[1]+O+re|0,v[1]=v[2]+B+ee|0,v[2]=v[3]+U+D|0,v[3]=v[4]+z+W|0,v[4]=v[0]+K+Q|0,v[0]=ye},_doFinalize:function(){var E=this._data,b=E.words,p=this._nDataBytes*8,L=E.sigBytes*8;b[L>>>5]|=128<<24-L%32,b[(L+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,E.sigBytes=(b.length+1)*4,this._process();for(var R=this._hash,v=R.words,x=0;x<5;x++){var w=v[x];v[x]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return R},clone:function(){var E=m.clone.call(this);return E._hash=this._hash.clone(),E}});function o(E,b,p){return E^b^p}function h(E,b,p){return E&b|~E&p}function d(E,b,p){return(E|~b)^p}function u(E,b,p){return E&p|b&~p}function s(E,b,p){return E^(b|~p)}function l(E,b){return E<>>32-b}S.RIPEMD160=m._createHelper(n),S.HmacRIPEMD160=m._createHmacHelper(n)}(Math),N.RIPEMD160})},ETIr:function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,y=g.enc,m=y.Base64={stringify:function(_){var e=_.words,f=_.sigBytes,r=this._map;_.clamp();for(var c=[],i=0;i>>2]>>>24-i%4*8&255,o=e[i+1>>>2]>>>24-(i+1)%4*8&255,h=e[i+2>>>2]>>>24-(i+2)%4*8&255,d=n<<16|o<<8|h,u=0;u<4&&i+u*.75>>6*(3-u)&63));var s=r.charAt(64);if(s)for(;c.length%4;)c.push(s);return c.join("")},parse:function(_){var e=_.length,f=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var c=0;c>>6-i%4*2,h=n|o;r[c>>>2]|=h<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64})},"F+F2":function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var g=N,S=g.lib,k=S.WordArray,y=k.init,m=k.init=function(C){if(C instanceof ArrayBuffer&&(C=new Uint8Array(C)),(C instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&C instanceof Uint8ClampedArray||C instanceof Int16Array||C instanceof Uint16Array||C instanceof Int32Array||C instanceof Uint32Array||C instanceof Float32Array||C instanceof Float64Array)&&(C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength)),C instanceof Uint8Array){for(var _=C.byteLength,e=[],f=0;f<_;f++)e[f>>>2]|=C[f]<<24-f%4*8;y.call(this,e,_)}else y.apply(this,arguments)};m.prototype=k}(),N.lib.WordArray})},FWmy:function(H,J,I){"use strict";I.d(J,"a",function(){return N});function N(g,S){if(!g)throw new Error(S?`Assertion failed (${S})`:"Assertion Failed")}},GRuw:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("lPiR"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,y=g.algo,m=y.SHA256,C=y.SHA224=m.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var _=m._doFinalize.call(this);return _.sigBytes-=4,_}});g.SHA224=m._createHelper(C),g.HmacSHA224=m._createHmacHelper(C)}(),N.SHA224})},GfqC:function(H,J,I){"use strict";var N=I("q1tI"),g=I.n(N),S=I("TSYQ"),k=I.n(S);function y(B,U){var D="cannot "+B.method+" "+B.action+" "+U.status+"'",W=new Error(D);return W.status=U.status,W.method=B.method,W.url=B.action,W}function m(B){var U=B.responseText||B.response;if(!U)return U;try{return JSON.parse(U)}catch(D){return U}}function C(B){var U=new XMLHttpRequest;B.onProgress&&U.upload&&(U.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),B.onProgress(re)});var D=new FormData;B.data&&Object.keys(B.data).forEach(function(Q){var re=B.data[Q];if(Array.isArray(re)){re.forEach(function(ee){D.append(Q+"[]",ee)});return}D.append(Q,B.data[Q])}),B.file instanceof Blob?D.append(B.filename,B.file,B.file.name):D.append(B.filename,B.file),U.onerror=function(re){B.onError(re)},U.onload=function(){return U.status<200||U.status>=300?B.onError(y(B,U),m(U)):B.onSuccess(m(U),U)},U.open(B.method,B.action,!0),B.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var W=B.headers||{};return W["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(W).forEach(function(Q){W[Q]!==null&&U.setRequestHeader(Q,W[Q])}),U.send(D),{abort:function(){U.abort()}}}var _=+new Date,e=0;function f(){return"rc-upload-"+_+"-"+ ++e}function r(B,U){return B.indexOf(U,B.length-U.length)!==-1}var c=function(B,U){if(B&&U){var D=Array.isArray(U)?U:U.split(","),W=B.name||"",Q=B.type||"",re=Q.replace(/\/.*$/,"");return D.some(function(ee){var ye=ee.trim();return ye.charAt(0)==="."?r(W.toLowerCase(),ye.toLowerCase()):/\/\*$/.test(ye)?re===ye.replace(/\/.*$/,""):Q===ye})}return!0};function i(B,U){var D=B.createReader(),W=[];function Q(){D.readEntries(function(re){var ee=Array.prototype.slice.apply(re);W=W.concat(ee);var ye=!ee.length;ye?U(W):Q()})}Q()}var n=function(U,D,W){var Q=function re(ee,ye){ye=ye||"",ee.isFile?ee.file(function(be){W(be)&&(ee.fullPath&&!be.webkitRelativePath&&(Object.defineProperties(be,{webkitRelativePath:{writable:!0}}),be.webkitRelativePath=ee.fullPath.replace(/^\//,""),Object.defineProperties(be,{webkitRelativePath:{writable:!1}})),D([be]))}):ee.isDirectory&&i(ee,function(be){be.forEach(function(he){re(he,""+ye+ee.name+"/")})})};U.forEach(function(re){Q(re.webkitGetAsEntry())})},o=n,h=Object.assign||function(B){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(B,W))continue;D[W]=B[W]}return D}function E(B,U){if(!(B instanceof U))throw new TypeError("Cannot call a class as a function")}function b(B,U){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:B}function p(B,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);B.prototype=Object.create(U&&U.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(B,U):B.__proto__=U)}var L=function(U){return Object.keys(U).reduce(function(D,W){return(W.substr(0,5)==="data-"||W.substr(0,5)==="aria-"||W==="role")&&(D[W]=U[W]),D},{})},R=function(B){p(U,B);function U(){var D,W,Q,re;E(this,U);for(var ee=arguments.length,ye=Array(ee),be=0;be>>2]>>>24-L%4*8&255;l[b+L>>>2]|=R<<24-(b+L)%4*8}else for(var v=0;v>>2]=E[v>>>2];return this.sigBytes+=p,this},clamp:function(){var s=this.words,l=this.sigBytes;s[l>>>2]&=4294967295<<32-l%4*8,s.length=S.ceil(l/4)},clone:function(){var s=f.clone.call(this);return s.words=this.words.slice(0),s},random:function(s){for(var l=[],E=0;E>>2]>>>24-p%4*8&255;b.push((L>>>4).toString(16)),b.push((L&15).toString(16))}return b.join("")},parse:function(s){for(var l=s.length,E=[],b=0;b>>3]|=parseInt(s.substr(b,2),16)<<24-b%8*4;return new r.init(E,l/2)}},n=c.Latin1={stringify:function(s){for(var l=s.words,E=s.sigBytes,b=[],p=0;p>>2]>>>24-p%4*8&255;b.push(String.fromCharCode(L))}return b.join("")},parse:function(s){for(var l=s.length,E=[],b=0;b>>2]|=(s.charCodeAt(b)&255)<<24-b%4*8;return new r.init(E,l)}},o=c.Utf8={stringify:function(s){try{return decodeURIComponent(escape(n.stringify(s)))}catch(l){throw new Error("Malformed UTF-8 data")}},parse:function(s){return n.parse(unescape(encodeURIComponent(s)))}},h=e.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(s){typeof s=="string"&&(s=o.parse(s)),this._data.concat(s),this._nDataBytes+=s.sigBytes},_process:function(s){var l,E=this._data,b=E.words,p=E.sigBytes,L=this.blockSize,R=L*4,v=p/R;s?v=S.ceil(v):v=S.max((v|0)-this._minBufferSize,0);var x=v*L,w=S.min(x*4,p);if(x){for(var T=0;T>>6)+e(128|z&63):e(224|z>>>12&15)+e(128|z>>>6&63)+e(128|z&63)}else{var z=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return e(240|z>>>18&7)+e(128|z>>>12&63)+e(128|z>>>6&63)+e(128|z&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c=function(A){return A.replace(r,f)},i=function(A){var z=[0,2,1][A.length%3],K=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),O=[C.charAt(K>>>18),C.charAt(K>>>12&63),z>=2?"=":C.charAt(K>>>6&63),z>=1?"=":C.charAt(K&63)];return O.join("")},n=k.btoa&&typeof k.btoa=="function"?function(A){return k.btoa(A)}:function(A){if(A.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return A.replace(/[\s\S]{1,3}/g,i)},o=function(A){return n(c(String(A)))},h=function(A){return A.replace(/[+\/]/g,function(z){return z=="+"?"-":"_"}).replace(/=/g,"")},d=function(A,z){return z?h(o(A)):o(A)},u=function(A){return d(A,!0)},s;k.Uint8Array&&(s=function(A,z){for(var K="",O=0,B=A.length;O>>18)+C.charAt(Q>>>12&63)+(typeof D!="undefined"?C.charAt(Q>>>6&63):"=")+(typeof W!="undefined"?C.charAt(Q&63):"=")}return z?h(K):K});var l=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(A){switch(A.length){case 4:var z=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),K=z-65536;return e((K>>>10)+55296)+e((K&1023)+56320);case 3:return e((15&A.charCodeAt(0))<<12|(63&A.charCodeAt(1))<<6|63&A.charCodeAt(2));default:return e((31&A.charCodeAt(0))<<6|63&A.charCodeAt(1))}},b=function(A){return A.replace(l,E)},p=function(A){var z=A.length,K=z%4,O=(z>0?_[A.charAt(0)]<<18:0)|(z>1?_[A.charAt(1)]<<12:0)|(z>2?_[A.charAt(2)]<<6:0)|(z>3?_[A.charAt(3)]:0),B=[e(O>>>16),e(O>>>8&255),e(O&255)];return B.length-=[0,0,2,1][K],B.join("")},L=k.atob&&typeof k.atob=="function"?function(A){return k.atob(A)}:function(A){return A.replace(/\S{1,4}/g,p)},R=function(A){return L(String(A).replace(/[^A-Za-z0-9\+\/]/g,""))},v=function(A){return b(L(A))},x=function(A){return String(A).replace(/[-_]/g,function(z){return z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},w=function(A){return v(x(A))},T;k.Uint8Array&&(T=function(A){return Uint8Array.from(R(x(A)),function(z){return z.charCodeAt(0)})});var F=function(){var A=k.Base64;return k.Base64=y,A};if(k.Base64={VERSION:m,atob:R,btoa:n,fromBase64:w,toBase64:d,utob:c,encode:d,encodeURI:u,btou:b,decode:w,noConflict:F,fromUint8Array:s,toUint8Array:T},typeof Object.defineProperty=="function"){var P=function(A){return{value:A,enumerable:!1,writable:!0,configurable:!0}};k.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",P(function(){return w(this)})),Object.defineProperty(String.prototype,"toBase64",P(function(A){return d(this,A)})),Object.defineProperty(String.prototype,"toBase64URI",P(function(){return d(this,!0)}))}}return k.Meteor&&(Base64=k.Base64),H.exports?H.exports.Base64=k.Base64:!(g=[],S=function(){return k.Base64}.apply(J,g),S!==void 0&&(H.exports=S)),{Base64:k.Base64}})}).call(this,I("IyRk"))},JYp7:function(H,J,I){"use strict";I.d(J,"a",function(){return N});var N;(function(g){function S(l){return l&&typeof l=="object"&&typeof l[Symbol.iterator]=="function"}g.is=S;const k=Object.freeze([]);function y(){return k}g.empty=y;function*m(l){yield l}g.single=m;function C(l){return l||k}g.from=C;function _(l){return!l||l[Symbol.iterator]().next().done===!0}g.isEmpty=_;function e(l){return l[Symbol.iterator]().next().value}g.first=e;function f(l,E){for(const b of l)if(E(b))return!0;return!1}g.some=f;function r(l,E){for(const b of l)if(E(b))return b;return}g.find=r;function*c(l,E){for(const b of l)E(b)&&(yield b)}g.filter=c;function*i(l,E){let b=0;for(const p of l)yield E(p,b++)}g.map=i;function*n(...l){for(const E of l)for(const b of E)yield b}g.concat=n;function*o(l){for(const E of l)for(const b of E)yield b}g.concatNested=o;function h(l,E,b){let p=b;for(const L of l)p=E(p,L);return p}g.reduce=h;function*d(l,E,b=l.length){for(E<0&&(E+=l.length),b<0?b+=l.length:b>l.length&&(b=l.length);Ep===L){const p=l[Symbol.iterator](),L=E[Symbol.iterator]();for(;;){const R=p.next(),v=L.next();if(R.done!==v.done)return!1;if(R.done)return!0;if(!b(R.value,v.value))return!1}}g.equals=s})(N||(N={}))},K3mO:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Base,y=S.WordArray,m=g.algo,C=m.MD5,_=m.EvpKDF=k.extend({cfg:k.extend({keySize:128/32,hasher:C,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,f){for(var r,c=this.cfg,i=c.hasher.create(),n=y.create(),o=n.words,h=c.keySize,d=c.iterations;o.lengthSe)){ue.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Se/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return O.push({name:Ie.name,file:Ie}),B(Object(k.a)(O)),A.onChange(O),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},he)}));function be(he){return ye.apply(this,arguments)}return be}()},ee=function(){var ye=Object(_.a)(c.a.mark(function be(he,Ie){var Se,fe,ue,ie,Ce,ne,ce,Ae,oe,q;return c.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return Ie.file_name=he.name,ce=he.name,X.next=4,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Ae=X.sent,Ae.data=JSON.parse(p(Ae.data)),!((Ae==null?void 0:Ae.status)!==0)){X.next=12;break}return O[O.findIndex(function(de){return de.name===ce})].status="error",O[O.findIndex(function(de){return de.name===ce})].file.status="error",A.onChange(O),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),X.abrupt("return");case 12:return W=new E.a({endpoint:Ae==null||((Se=Ae.data)===null||Se===void 0)?void 0:Se.end_point,region:Ae==null||((fe=Ae.data)===null||fe===void 0)?void 0:fe.region,accessKeyId:Ae==null||((ue=Ae.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:Ae==null||((ie=Ae.data)===null||ie===void 0)?void 0:ie.access_key_secret,bucket:Ae==null||((Ce=Ae.data)===null||Ce===void 0)?void 0:Ce.bucket,stsToken:Ae==null||((ne=Ae.data)===null||ne===void 0)?void 0:ne.security_token}),console.log(he,"file"),Q(W),oe=he.name.split("."),oe.pop(),q=Ie.realFileName?oe:Object(u.a)(),X.abrupt("return",new Promise(function(de,pe){try{var xe;W.multipartUpload("".concat(A.identifier,"/").concat(q).concat(ce.indexOf(".")>-1?"."+ce.split(".").pop():""),new Blob([he.file],{type:he.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(qe,tt,et){try{console.log("\u8FDB\u5EA6",qe,tt,et);var it=O.findIndex(function(at){return at.name===ce});O[it].file.percent=qe*100,O[it].tempCheckpoint=tt,B(Object(k.a)(O))}catch(at){}},checkpoint:O[O.findIndex(function(Ke){return Ke.name===ce})].tempCheckpoint,callback:{customValue:{id:ce+""},url:Ae==null||((xe=Ae.data)===null||xe===void 0)?void 0:xe.callback_url,host:Ae==null?void 0:Ae.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(Ie)}}).then(function(Ke){var qe,tt=O.findIndex(function(De){return De.name===ce}),et="done";if(((qe=Ke.data)===null||qe===void 0?void 0:qe.status)===0){var it;he.response=(it=Ke.data)===null||it===void 0?void 0:it.data;var at=O.findIndex(function(De){return De.name===ce});O[at].status="done",O[at].file.status="done"}else{var je;S.b.warn((je=Ke.data)===null||je===void 0?void 0:je.message),et="error"}O[tt].status=et,O[tt].file.status=et,A.onChange(O),de(Ke==null?void 0:Ke.data)}).catch(function(Ke){O[O.findIndex(function(qe){return qe.name===ce})].status="error",O[O.findIndex(function(qe){return qe.name===ce})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B(Object(k.a)(O)),A.onChange(O),pe(Ke),console.log("err:",Ke)})}catch(Ke){}}));case 19:case"end":return X.stop()}},be)}));return function(he,Ie){return ye.apply(this,arguments)}}();return Object(i.useEffect)(function(){O.every(function(ye){return ye==="done"||ye==="error"})&&A.onComplete(O)},[O]),Object(i.useEffect)(function(){if(P){var ye;(ye=W)===null||ye===void 0||ye.cancel()}},[P]),Object(i.useEffect)(function(){A.uploading&&O.map(function(){var ye=Object(_.a)(c.a.mark(function be(he){var Ie,Se;return c.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!he.status||he.status==="error")&&!P)){ue.next=6;break}return he.status="uploading",he.file.status="uploading",ue.next=5,ee(he,{login:F==null||((Ie=F.userInfo)===null||Ie===void 0)?void 0:Ie.login,container_type:A.container_type,container_id:A.container_id,description:A.description,realFileName:A.realFileName});case 5:Se=ue.sent;case 6:case"end":return ue.stop()}},be)}));return function(be){return ye.apply(this,arguments)}}())},[A.uploading]),n.a.createElement(b,Object(N.a)({},re,{height:A.height,className:A.className}),n.a.createElement("p",{className:"ant-upload-hint"},A.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};J.b=Object(s.a)(function(w){var T=w.loading,F=w.globalSetting,P=w.user;return{globalSetting:F,loading:T.models.competitions,user:P}})(x)},KmYQ:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(g,S){var k=S*4;g.clamp(),g.sigBytes+=k-(g.sigBytes%k||k)},unpad:function(g){for(var S=g.words,k=g.sigBytes-1,k=g.sigBytes-1;k>=0;k--)if(S[k>>>2]>>>24-k%4*8&255){g.sigBytes=k+1;break}}},N.pad.ZeroPadding})},L9qf:function(H,J,I){H.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:function(H,J,I){"use strict";I.d(J,"b",function(){return l}),I.d(J,"a",function(){return b});var N=I("1OyB"),g=I("vuIU"),S=I("Ji7U"),k=I("LK+K"),y=I("q1tI"),m=I("rePB"),C=I("Ff2n"),_=I("ODXe"),e=I("4IlW"),f=I("bX4T"),r=I("YrtM"),c=I("TSYQ"),i=I.n(c),n=I("+nKL"),o=I("8OUc"),h=function(W,Q){var re=W.prefixCls,ee=W.id,ye=W.flattenOptions,be=W.childrenAsData,he=W.values,Ie=W.searchValue,Se=W.multiple,fe=W.defaultActiveFirstOption,ue=W.height,ie=W.itemHeight,Ce=W.notFoundContent,ne=W.open,ce=W.menuItemSelectedIcon,Ae=W.virtual,oe=W.onSelect,q=W.onToggleOpen,$=W.onActiveValue,X=W.onScroll,de=W.onMouseEnter,pe="".concat(re,"-item"),xe=Object(r.a)(function(){return ye},[ne,ye],function(Qe,Fe){return Fe[0]&&Qe[1]!==Fe[1]}),Ke=y.useRef(null),qe=function(Fe){Fe.preventDefault()},tt=function(Fe){Ke.current&&Ke.current.scrollTo({index:Fe})},et=function(Fe){for(var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Me=xe.length,Ee=0;Ee1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(D).map(function(Q,re){if(!y.isValidElement(Q)||!Q.type)return null;var ee=Q.type.isSelectOptGroup,ye=Q.key,be=Q.props,he=be.children,Ie=Object(C.a)(be,["children"]);return W||!ee?R(Q):Object(p.a)(Object(p.a)({key:"__RC_SELECT_GRP__".concat(ye===null?re:ye,"__"),label:ye},Ie),{},{options:v(he)})}).filter(function(Q){return Q})}var x=I("2Qr1"),w=I("qNPg"),T=I("U8pU"),F=I("Kwbf"),P=I("WKfj");function A(D){var W=D.mode,Q=D.options,re=D.children,ee=D.backfill,ye=D.allowClear,be=D.placeholder,he=D.getInputElement,Ie=D.showSearch,Se=D.onSearch,fe=D.defaultOpen,ue=D.autoFocus,ie=D.labelInValue,Ce=D.value,ne=D.inputValue,ce=D.optionLabelProp,Ae=W==="multiple"||W==="tags",oe=Ie!==void 0?Ie:Ae||W==="combobox",q=Q||v(re);if(Object(F.a)(W!=="tags"||q.every(function(pe){return!pe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var $=q.some(function(pe){return pe.options?pe.options.some(function(xe){return typeof("value"in xe?xe.value:xe.key)=="number"}):typeof("value"in pe?pe.value:pe.key)=="number"});Object(F.a)(!$,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(W!=="combobox"||!ce,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(W==="combobox"||!ee,"`backfill` only works with `combobox` mode."),Object(F.a)(W==="combobox"||!he,"`getInputElement` only work with `combobox` mode."),Object(F.b)(W!=="combobox"||!he||!ye||!be,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Se&&!oe&&W!=="combobox"&&W!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!fe||ue,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ce!=null){var X=Object(P.d)(Ce);Object(F.a)(!ie||X.every(function(pe){return Object(T.a)(pe)==="object"&&("key"in pe||"value"in pe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!Ae||Array.isArray(Ce),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var de=null;Object(L.a)(re).some(function(pe){if(!y.isValidElement(pe)||!pe.type)return!1;var xe=pe.type;if(xe.isSelectOption)return!1;if(xe.isSelectOptGroup){var Ke=Object(L.a)(pe.props.children).every(function(qe){return!y.isValidElement(qe)||!pe.type||qe.type.isSelectOption?!0:(de=qe.type,!1)});return!Ke}return de=xe,!0}),de&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(de.displayName||de.name||de,"`.")),Object(F.a)(ne===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=A,K=Object(w.a)({prefixCls:"rc-select",components:{optionList:u},convertChildrenToData:v,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:z,fillOptionsWithMissingValue:x.a}),O=function(D){Object(S.a)(Q,D);var W=Object(k.a)(Q);function Q(){var re;return Object(N.a)(this,Q),re=W.apply(this,arguments),re.selectRef=y.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(g.a)(Q,[{key:"render",value:function(){return y.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),Q}(y.Component);O.Option=l,O.OptGroup=b;var B=O,U=J.c=B},M8RZ:function(H,J,I){"use strict";I.d(J,"a",function(){return e});var N=I("fWQN"),g=I("mtLc"),S=I("yKVA"),k=I("879j"),y=I("q1tI"),m=I.n(y),C=I("i8i4"),_=I.n(C),e=function(f){Object(S.a)(c,f);var r=Object(k.a)(c);function c(i){var n;Object(N.a)(this,c),n=r.call(this,i);var o=window.document;return n.node=o.createElement("div"),o.body.appendChild(n.node),n}return Object(g.a)(c,[{key:"render",value:function(){var n=this.props.children;return Object(C.createPortal)(n,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(m.a.Component)},MFOe:function(H,J,I){(function(N){var g=m(),S=C(),k=_(),y=typeof window!="undefined"?window:N;H.exports={assign:g,create:S,trim:k,bind:e,slice:f,each:r,map:c,pluck:i,isList:n,isFunction:o,isObject:h,Global:y};function m(){return Object.assign?Object.assign:function(u,s,l,E){for(var b=1;bg.a.None;function o(A){return(z,K=null,O)=>{let B=!1,U;return U=A(D=>B?void 0:(U?U.dispose():B=!0,z.call(K,D)),null,O),B&&U.dispose(),U}}n.once=o;function h(A,z){return b((K,O=null,B)=>A(U=>K.call(O,z(U)),null,B))}n.map=h;function d(A,z){return b((K,O=null,B)=>A(U=>{z(U),K.call(O,U)},null,B))}n.forEach=d;function u(A,z){return b((K,O=null,B)=>A(U=>z(U)&&K.call(O,U),null,B))}n.filter=u;function s(A){return A}n.signal=s;function l(...A){return(z,K=null,O)=>Object(g.e)(...A.map(B=>B(U=>z.call(K,U),null,O)))}n.any=l;function E(A,z,K){let O=K;return h(A,B=>(O=z(O,B),O))}n.reduce=E;function b(A){let z;const K=new e({onFirstListenerAdd(){z=A(K.fire,K)},onLastListenerRemove(){z.dispose()}});return K.event}function p(A,z,K=100,O=!1,B){let U,D,W,Q=0;const re=new e({leakWarningThreshold:B,onFirstListenerAdd(){U=A(ee=>{Q++,D=z(D,ee),O&&!W&&(re.fire(D),D=void 0),clearTimeout(W),W=setTimeout(()=>{const ye=D;D=void 0,W=void 0,(!O||Q>1)&&re.fire(ye),Q=0},K)})},onLastListenerRemove(){U.dispose()}});return re.event}n.debounce=p;function L(A,z=(K,O)=>K===O){let K=!0,O;return u(A,B=>{const U=K||!z(B,O);return K=!1,O=B,U})}n.latch=L;function R(A,z){return[n.filter(A,z),n.filter(A,K=>!z(K))]}n.split=R;function v(A,z=!1,K=[]){let O=K.slice(),B=A(W=>{O?O.push(W):D.fire(W)});const U=()=>{O&&O.forEach(W=>D.fire(W)),O=null},D=new e({onFirstListenerAdd(){B||(B=A(W=>D.fire(W)))},onFirstListenerDidAdd(){O&&(z?setTimeout(U):U())},onLastListenerRemove(){B&&B.dispose(),B=null}});return D.event}n.buffer=v;class x{constructor(A){this.event=A}map(A){return new x(h(this.event,A))}forEach(A){return new x(d(this.event,A))}filter(A){return new x(u(this.event,A))}reduce(A,z){return new x(E(this.event,A,z))}latch(){return new x(L(this.event))}debounce(A,z=100,K=!1,O){return new x(p(this.event,A,z,K,O))}on(A,z,K){return this.event(A,z,K)}once(A,z,K){return o(this.event)(A,z,K)}}function w(A){return new x(A)}n.chain=w;function T(A,z,K=O=>O){const O=(...W)=>D.fire(K(...W)),B=()=>A.on(z,O),U=()=>A.removeListener(z,O),D=new e({onFirstListenerAdd:B,onLastListenerRemove:U});return D.event}n.fromNodeEventEmitter=T;function F(A,z,K=O=>O){const O=(...W)=>D.fire(K(...W)),B=()=>A.addEventListener(z,O),U=()=>A.removeEventListener(z,O),D=new e({onFirstListenerAdd:B,onLastListenerRemove:U});return D.event}n.fromDOMEventEmitter=F;function P(A){return new Promise(z=>o(A)(z))}n.toPromise=P})(y||(y={}));class m{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${m._idPool++}`}start(n){this._stopWatch=new k.a(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let C=-1;class _{constructor(n,o=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let o=C;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||n{const u=this._stacks.get(h)||0;this._stacks.set(h,u-1)}}}class e{constructor(n){var o;this._disposed=!1,this._options=n,this._leakageMon=C>0?new _(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(n,o,h)=>{var d;this._listeners||(this._listeners=new S.a);const u=this._listeners.isEmpty();u&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(o?[n,o]:n);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,o);const l=(d=this._leakageMon)===null||d===void 0?void 0:d.check(this._listeners.size),E=Object(g.i)(()=>{if(l&&l(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const b=this._listeners&&!this._listeners.isEmpty();b||this._options.onLastListenerRemove(this)}});return h instanceof g.b?h.add(E):Array.isArray(h)&&h.push(E),E}),this._event}fire(n){var o,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new S.a);for(let d of this._listeners)this._deliveryQueue.push([d,n]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[d,u]=this._deliveryQueue.shift();try{typeof d=="function"?d.call(void 0,u):d[0].call(d[1],u)}catch(s){Object(N.f)(s)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var n,o,h,d,u;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(d=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||d===void 0||d.call(h),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class f extends e{constructor(n){super(n);this._isPaused=0,this._eventQueue=new S.a,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}class r extends f{constructor(n){var o;super(n);this._delay=(o=n.delay)!==null&&o!==void 0?o:100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}class c{constructor(){this.buffers=[]}wrapEvent(n){return(o,h,d)=>n(u=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>o.call(h,u)):o.call(h,u)},void 0,d)}bufferEvents(n){const o=[];this.buffers.push(o);const h=n();return this.buffers.pop(),o.forEach(d=>d()),h}}class i{constructor(){this.listening=!1,this.inputEvent=y.None,this.inputEventListener=g.a.None,this.emitter=new e({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(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(H,J,I){"use strict";(function(N,g){I.d(J,"b",function(){return h}),I.d(J,"i",function(){return l}),I.d(J,"f",function(){return E}),I.d(J,"d",function(){return b}),I.d(J,"g",function(){return p}),I.d(J,"h",function(){return L}),I.d(J,"c",function(){return R}),I.d(J,"k",function(){return v}),I.d(J,"j",function(){return x}),I.d(J,"a",function(){return w}),I.d(J,"e",function(){return P});var S;const k="en";let y=!1,m=!1,C=!1,_=!1,e=!1,f=!1,r=!1,c,i=k,n,o;const h=typeof self=="object"?self:typeof N=="object"?N:{};let d;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?d=h.vscode.process:typeof g!="undefined"&&(d=g);const u=typeof((S=d==null?void 0:d.versions)===null||S===void 0?void 0:S.electron)=="string"&&d.type==="renderer";if(typeof navigator=="object"&&!u)o=navigator.userAgent,y=o.indexOf("Windows")>=0,m=o.indexOf("Macintosh")>=0,r=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,C=o.indexOf("Linux")>=0,f=!0,c=navigator.language,i=c;else if(typeof d=="object"){y=d.platform==="win32",m=d.platform==="darwin",C=d.platform==="linux",_=C&&!!d.env.SNAP&&!!d.env.SNAP_REVISION,c=k,i=k;const A=d.env.VSCODE_NLS_CONFIG;if(A)try{const z=JSON.parse(A),K=z.availableLanguages["*"];c=z.locale,i=K||k,n=z._translationsConfigFile}catch(z){}e=!0}else console.error("Unable to resolve platform.");let s=0;m?s=1:y?s=3:C&&(s=2);const l=y,E=m,b=C,p=e,L=f,R=r,v=o,x=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let K=[];h.addEventListener("message",B=>{if(B.data&&B.data.vscodeSetImmediateId)for(let U=0,D=K.length;U{const U=++O;K.push({id:U,callback:B}),h.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(d==null?void 0:d.nextTick)=="function")return d.nextTick.bind(d);const z=Promise.resolve();return K=>z.then(K)}(),w=m||r?2:y?1:3;let T=!0,F=!1;function P(){if(!F){F=!0;const A=new Uint8Array(2);A[0]=1,A[1]=2;const z=new Uint16Array(A.buffer);T=z[0]===(2<<8)+1}return T}}).call(this,I("IyRk"),I("Q2Ig"))},MlIO:function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,y=k.Base,m=k.WordArray,C=S.x64={},_=C.Word=y.extend({init:function(f,r){this.high=f,this.low=r}}),e=C.WordArray=y.extend({init:function(f,r){f=this.words=f||[],r!=g?this.sigBytes=r:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,r=f.length,c=[],i=0;i=de.length?pe:de[Ke]})}function k(X){return X.replace(/[<>&]/g,function(de){switch(de){case"<":return"<";case">":return">";case"&":return"&";default:return de}})}function y(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(X,de=" "){const pe=C(X,de);return _(pe,de)}function C(X,de){if(!X||!de)return X;const pe=de.length;if(pe===0||X.length===0)return X;let xe=0;for(;X.indexOf(de,xe)===xe;)xe=xe+pe;return X.substring(xe)}function _(X,de){if(!X||!de)return X;const pe=de.length,xe=X.length;if(pe===0||xe===0)return X;let Ke=xe,qe=-1;for(;!(qe=X.lastIndexOf(de,Ke-1),qe===-1||qe+pe!==Ke);){if(qe===0)return"";Ke=qe}return X.substring(0,Ke)}function e(X){return X.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(X){return X.replace(/\*/g,"")}function r(X,de,pe={}){if(!X)throw new Error("Cannot create regex from empty string");de||(X=y(X)),pe.wholeWord&&(/\B/.test(X.charAt(0))||(X="\\b"+X),/\B/.test(X.charAt(X.length-1))||(X=X+"\\b"));let xe="";return pe.global&&(xe+="g"),pe.matchCase||(xe+="i"),pe.multiline&&(xe+="m"),pe.unicode&&(xe+="u"),new RegExp(X,xe)}function c(X){if(X.source==="^"||X.source==="^$"||X.source==="$"||X.source==="^\\s*$")return!1;const de=X.exec("");return!!(de&&X.lastIndex===0)}function i(X){return(X.global?"g":"")+(X.ignoreCase?"i":"")+(X.multiline?"m":"")+(X.unicode?"u":"")}function n(X){return X.split(/\r\n|\r|\n/)}function o(X){for(let de=0,pe=X.length;de=0;pe--){const xe=X.charCodeAt(pe);if(xe!==32&&xe!==9)return pe}return-1}function u(X,de){return Xde?1:0}function s(X,de,pe=0,xe=X.length,Ke=0,qe=de.length){for(;peat)return 1}const tt=xe-pe,et=qe-Ke;return ttet?1:0}function l(X,de){return E(X,de,0,X.length,0,de.length)}function E(X,de,pe=0,xe=X.length,Ke=0,qe=de.length){for(;pe=128||at>=128)return s(X.toLowerCase(),de.toLowerCase(),pe,xe,Ke,qe);b(it)&&(it-=32),b(at)&&(at-=32);const je=it-at;if(je===0)continue;return je}const tt=xe-pe,et=qe-Ke;return ttet?1:0}function b(X){return X>=97&&X<=122}function p(X){return X>=65&&X<=90}function L(X,de){return X.length===de.length&&E(X,de)===0}function R(X,de){const pe=de.length;return de.length>X.length?!1:E(X,de,0,pe)===0}function v(X,de){let pe,xe=Math.min(X.length,de.length);for(pe=0;pe1){const xe=X.charCodeAt(de-2);if(w(xe))return F(xe,pe)}return pe}function z(X,de){const pe=ne.getInstance(),xe=de,Ke=X.length,qe=P(X,Ke,de);de+=qe>=65536?2:1;let tt=pe.getGraphemeBreakType(qe);for(;de=65536?2:1,tt=it}return de-xe}function K(X,de){const pe=ne.getInstance(),xe=de,Ke=A(X,de);de-=Ke>=65536?2:1;let qe=pe.getGraphemeBreakType(Ke);for(;de>0;){const tt=A(X,de),et=pe.getGraphemeBreakType(tt);if(Ce(et,qe))break;de-=tt>=65536?2:1,qe=et}return xe-de}const O=/(?:[\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 B(X){return O.test(X)}const U=/(?:[\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 D(X){return U.test(X)}const W=/^[\t\n\r\x20-\x7E]*$/;function Q(X){return W.test(X)}const re=/[\u2028\u2029]/;function ee(X){return re.test(X)}function ye(X){for(let de=0,pe=X.length;de=11904&&X<=55215||X>=63744&&X<=64255||X>=65281&&X<=65374}function he(X){return X>=127462&&X<=127487||X===8986||X===8987||X===9200||X===9203||X>=9728&&X<=10175||X===11088||X===11093||X>=127744&&X<=128591||X>=128640&&X<=128764||X>=128992&&X<=129003||X>=129280&&X<=129535||X>=129648&&X<=129750}const Ie=String.fromCharCode(65279);function Se(X){return!!(X&&X.length>0&&X.charCodeAt(0)===65279)}function fe(X,de=!1){return X?(de&&(X=X.replace(/\\./g,"")),X.toLowerCase()!==X):!1}function ue(X){const de=90-65+1;return X=X%(2*de),Xde[3*xe+1])xe=2*xe+1;else return de[3*xe+2];return 0}}ne._INSTANCE=null;function ce(){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 Ae(X,de){if(X===0)return 0;const pe=oe(X,de);if(pe!==void 0)return pe;const xe=A(de,X);return X-=q(xe),X}function oe(X,de){let pe=A(de,X);for(X-=q(pe);$(pe)||pe===65039||pe===8419;){if(X===0)return;pe=A(de,X),X-=q(pe)}if(!he(pe))return;if(X>=0){const xe=A(de,X);xe===8205&&(X-=q(xe))}return X}function q(X){return X>=65536?2:1}function $(X){return 127995<=X&&X<=127999}},NFKh:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("MlIO"),I("F+F2"),I("qM6L"),I("ETIr"),I("wbyO"),I("cv67"),I("3y9D"),I("lPiR"),I("GRuw"),I("1uat"),I("uGsb"),I("5hvy"),I("ELcG"),I("WYAk"),I("e7zE"),I("K3mO"),I("OLod"),I("ALsQ"),I("9OqN"),I("qu8F"),I("S6kV"),I("gb/T"),I("qBft"),I("oRuE"),I("jO9C"),I("KmYQ"),I("uGxW"),I("bQjk"),I("wZgz"),I("pA7S"),I("w7YG"),I("E4JC"),I("PVpz"))})(this,function(N){return N})},NvD2:function(H,J,I){"use strict";I.d(J,"a",function(){return m});var N=I("Kwbf");function g(C,_){var e=new Set;return C.forEach(function(f){_.has(f)||e.add(f)}),e}function S(C){var _=C||{},e=_.disabled,f=_.disableCheckbox,r=_.checkable;return!!(e||f)||r===!1}function k(C,_,e,f){for(var r=new Set(C),c=new Set,i=0;i<=e;i+=1){var n=_.get(i)||new Set;n.forEach(function(u){var s=u.key,l=u.node,E=u.children,b=E===void 0?[]:E;r.has(s)&&!f(l)&&b.filter(function(p){return!f(p.node)}).forEach(function(p){r.add(p.key)})})}for(var o=new Set,h=e;h>=0;h-=1){var d=_.get(h)||new Set;d.forEach(function(u){var s=u.parent,l=u.node;if(f(l)||!u.parent||o.has(u.parent.key))return;if(f(u.parent.node)){o.add(s.key);return}var E=!0,b=!1;(s.children||[]).filter(function(p){return!f(p.node)}).forEach(function(p){var L=p.key,R=r.has(L);E&&!R&&(E=!1),!b&&(R||c.has(L))&&(b=!0)}),E&&r.add(s.key),b&&c.add(s.key),o.add(s.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(g(c,r))}}function y(C,_,e,f,r){for(var c=new Set(C),i=new Set(_),n=0;n<=f;n+=1){var o=e.get(n)||new Set;o.forEach(function(s){var l=s.key,E=s.node,b=s.children,p=b===void 0?[]:b;!c.has(l)&&!i.has(l)&&!r(E)&&p.filter(function(L){return!r(L.node)}).forEach(function(L){c.delete(L.key)})})}i=new Set;for(var h=new Set,d=f;d>=0;d-=1){var u=e.get(d)||new Set;u.forEach(function(s){var l=s.parent,E=s.node;if(r(E)||!s.parent||h.has(s.parent.key))return;if(r(s.parent.node)){h.add(l.key);return}var b=!0,p=!1;(l.children||[]).filter(function(L){return!r(L.node)}).forEach(function(L){var R=L.key,v=c.has(R);b&&!v&&(b=!1),!p&&(v||i.has(R))&&(p=!0)}),b||c.delete(l.key),p&&i.add(l.key),h.add(l.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(i,c))}}function m(C,_,e,f){var r=[],c;f?c=f:c=S;var i=new Set(C.filter(function(d){var u=!!e[d];return u||r.push(d),u})),n=new Map,o=0;Object.keys(e).forEach(function(d){var u=e[d],s=u.level,l=n.get(s);l||(l=new Set,n.set(s,l)),l.add(u),o=Math.max(o,s)}),Object(N.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var h;return _===!0?h=k(i,n,o,c):h=y(i,_.halfCheckedKeys,n,o,c),h}},OLod:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("K3mO"))})(this,function(N){N.lib.Cipher||function(g){var S=N,k=S.lib,y=k.Base,m=k.WordArray,C=k.BufferedBlockAlgorithm,_=S.enc,e=_.Utf8,f=_.Base64,r=S.algo,c=r.EvpKDF,i=k.Cipher=C.extend({cfg:y.extend(),createEncryptor:function(w,T){return this.create(this._ENC_XFORM_MODE,w,T)},createDecryptor:function(w,T){return this.create(this._DEC_XFORM_MODE,w,T)},init:function(w,T,F){this.cfg=this.cfg.extend(F),this._xformMode=w,this._key=T,this.reset()},reset:function(){C.reset.call(this),this._doReset()},process:function(w){return this._append(w),this._process()},finalize:function(w){w&&this._append(w);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function w(T){return typeof T=="string"?x:L}return function(T){return{encrypt:function(F,P,A){return w(P).encrypt(T,F,P,A)},decrypt:function(F,P,A){return w(P).decrypt(T,F,P,A)}}}}()}),n=k.StreamCipher=i.extend({_doFinalize:function(){var w=this._process(!0);return w},blockSize:1}),o=S.mode={},h=k.BlockCipherMode=y.extend({createEncryptor:function(w,T){return this.Encryptor.create(w,T)},createDecryptor:function(w,T){return this.Decryptor.create(w,T)},init:function(w,T){this._cipher=w,this._iv=T}}),d=o.CBC=function(){var w=h.extend();w.Encryptor=w.extend({processBlock:function(F,P){var A=this._cipher,z=A.blockSize;T.call(this,F,P,z),A.encryptBlock(F,P),this._prevBlock=F.slice(P,P+z)}}),w.Decryptor=w.extend({processBlock:function(F,P){var A=this._cipher,z=A.blockSize,K=F.slice(P,P+z);A.decryptBlock(F,P),T.call(this,F,P,z),this._prevBlock=K}});function T(F,P,A){var z,K=this._iv;K?(z=K,this._iv=g):z=this._prevBlock;for(var O=0;O>>2]&255;w.sigBytes-=T}},l=k.BlockCipher=i.extend({cfg:i.cfg.extend({mode:d,padding:s}),reset:function(){var w;i.reset.call(this);var T=this.cfg,F=T.iv,P=T.mode;this._xformMode==this._ENC_XFORM_MODE?w=P.createEncryptor:(w=P.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==w?this._mode.init(this,F&&F.words):(this._mode=w.call(P,this,F&&F.words),this._mode.__creator=w)},_doProcessBlock:function(w,T){this._mode.processBlock(w,T)},_doFinalize:function(){var w,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),w=this._process(!0)):(w=this._process(!0),T.unpad(w)),w},blockSize:128/32}),E=k.CipherParams=y.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),b=S.format={},p=b.OpenSSL={stringify:function(w){var T,F=w.ciphertext,P=w.salt;return P?T=m.create([1398893684,1701076831]).concat(P).concat(F):T=F,T.toString(f)},parse:function(w){var T,F=f.parse(w),P=F.words;return P[0]==1398893684&&P[1]==1701076831&&(T=m.create(P.slice(2,4)),P.splice(0,4),F.sigBytes-=16),E.create({ciphertext:F,salt:T})}},L=k.SerializableCipher=y.extend({cfg:y.extend({format:p}),encrypt:function(w,T,F,P){P=this.cfg.extend(P);var A=w.createEncryptor(F,P),z=A.finalize(T),K=A.cfg;return E.create({ciphertext:z,key:F,iv:K.iv,algorithm:w,mode:K.mode,padding:K.padding,blockSize:w.blockSize,formatter:P.format})},decrypt:function(w,T,F,P){P=this.cfg.extend(P),T=this._parse(T,P.format);var A=w.createDecryptor(F,P).finalize(T.ciphertext);return A},_parse:function(w,T){return typeof w=="string"?T.parse(w,this):w}}),R=S.kdf={},v=R.OpenSSL={execute:function(w,T,F,P){P||(P=m.random(64/8));var A=c.create({keySize:T+F}).compute(w,P),z=m.create(A.words.slice(T),F*4);return A.sigBytes=T*4,E.create({key:A,iv:z,salt:P})}},x=k.PasswordBasedCipher=L.extend({cfg:L.cfg.extend({kdf:v}),encrypt:function(w,T,F,P){P=this.cfg.extend(P);var A=P.kdf.execute(F,w.keySize,w.ivSize);P.iv=A.iv;var z=L.encrypt.call(this,w,T,A.key,P);return z.mixIn(A),z},decrypt:function(w,T,F,P){P=this.cfg.extend(P),T=this._parse(T,P.format);var A=P.kdf.execute(F,w.keySize,w.ivSize,T.salt);P.iv=A.iv;var z=L.decrypt.call(this,w,T,A.key,P);return z}})}()})},OZM5:function(H,J,I){"use strict";I.d(J,"b",function(){return f}),I.d(J,"a",function(){return r}),I.d(J,"k",function(){return c}),I.d(J,"h",function(){return i}),I.d(J,"i",function(){return n}),I.d(J,"g",function(){return o}),I.d(J,"c",function(){return h}),I.d(J,"d",function(){return d}),I.d(J,"j",function(){return l}),I.d(J,"e",function(){return E}),I.d(J,"f",function(){return b});var N=I("KQm4"),g=I("U8pU"),S=I("Ff2n"),k=I("q1tI"),y=I.n(k),m=I("Kwbf"),C=I("WaYH"),_=.25,e=2;function f(p,L){var R=p.slice(),v=R.indexOf(L);return v>=0&&R.splice(v,1),R}function r(p,L){var R=p.slice();return R.indexOf(L)===-1&&R.push(L),R}function c(p){return p.split("-")}function i(p,L){return"".concat(p,"-").concat(L)}function n(p){return p&&p.type&&p.type.isTreeNode}function o(p,L){var R=[p],v=L[p];function x(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.forEach(function(T){var F=T.key,P=T.children;R.push(F),x(P)})}return x(v.children),R}function h(p,L){var R=p.clientY,v=L.selectHandle.getBoundingClientRect(),x=v.top,w=v.bottom,T=v.height,F=Math.max(T*_,e);return R<=x+F?-1:R>=w-F?1:0}function d(p,L){if(!p)return;var R=L.multiple;return R?p.slice():p.length?[p[0]]:p}var u=function(L){return L};function s(p,L){if(!p)return[];var R=L||{},v=R.processProps,x=v===void 0?u:v,w=Array.isArray(p)?p:[p];return w.map(function(T){var F=T.children,P=Object(S.a)(T,["children"]),A=s(F,L);return y.a.createElement(C.a,Object.assign({},x(P)),A)})}function l(p){if(!p)return null;var L;if(Array.isArray(p))L={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(g.a)(p)==="object")L={checkedKeys:p.checked||void 0,halfCheckedKeys:p.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function E(p,L){var R=new Set;function v(x){if(R.has(x))return;var w=L[x];if(!w)return;R.add(x);var T=w.parent,F=w.node;if(F.disabled)return;T&&v(T.key)}return(p||[]).forEach(function(x){v(x)}),Object(N.a)(R)}function b(p){var L={};return Object.keys(p).forEach(function(R){(R.startsWith("data-")||R.startsWith("aria-"))&&(L[R]=p[R])}),L}},Ot1p:function(H,J,I){"use strict";var N=I("2qtc"),g=I("kLXV"),S=I("rAM+"),k=I("miYZ"),y=I("tsqr"),m=I("9og8"),C=I("tJVT"),_=I("jrin"),e=I("WmNS"),f=I.n(e),r=I("q1tI"),c=I.n(r),i=I("VrN/"),n=I.n(i),o=I("bdgK"),h=I("p77/"),d=I("Bd2K"),u=I("ELLl"),s=I("19Vz"),l=I("lZu9"),E=I("+NIl"),b=I("kSUc"),p=I("9Bee"),L=function(He){var rt=He.value,ct=rt===void 0?"":rt,yt=He.className,ht=He.showTextOnly,pt=He.showLines,Dt=He.style,At=Dt===void 0?{}:Dt,bt=Object(r.useMemo)(function(){return""},[ct]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:bt}}))},R=I("0Owb"),v=I("dejd"),x=I("C+DQ"),w=I("1vsH"),T=I("m3rI"),F=[{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 P(He){var rt=He.onActionCallback,ct=He.title,yt=He.icon,ht=He.actionName,pt=He.className,Dt=pt===void 0?"":pt,At=He.children;function bt(){rt(ht)}return c.a.createElement("a",{title:ct,className:Dt,onClick:bt},c.a.createElement("i",{className:"md-iconfont ".concat(yt)}),At)}var A=function(He){var rt=He.watch,ct=He.showNullButton,yt=He.onActionCallback,ht=He.fullScreen,pt=He.insertTemp,Dt=He.hidetoolBar,At=He.uuid,bt=He.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(w.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(w.F)("_educoder_session"),"&key=").concat(At,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Xt=[].concat(F,[{title:"".concat(rt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(rt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!Dt&&Xt.map(function(Gt,rr){return c.a.createElement("li",{key:rr},Gt.actionName?c.a.createElement(P,Object(R.a)({},Gt,{onActionCallback:yt})):c.a.createElement("span",{className:"v-line"}))}),ct?c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:yt},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,pt&&c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(pt),onActionCallback:yt},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(P,{icon:"".concat(ht?"icon-shrink":"icon-enlarge"),title:ht?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:yt})))},z=I("M8RZ"),K=I("+L6B"),O=I("2/Rp"),B=I("y8nQ"),U=I("Vl3Y"),D=I("5NDa"),W=I("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},re=function(He){var rt=He.callback,ct=He.onCancel;function yt(ht){rt(ht)}return c.a.createElement(U.a,Object(R.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:yt}),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},c.a.createElement(W.a,null)),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},c.a.createElement(W.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:ct},"\u53D6\u6D88")))},ee=I("7ahc"),ye=I("HmJG"),be=I("BjJ7"),he=U.a.useForm,Ie={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}},fe=function(He){var rt=He.callback,ct=He.onCancel,yt=he(),ht=Object(C.a)(yt,1),pt=ht[0];function Dt(Xt){rt(Xt)}function At(Xt,Gt){if(Xt.status===-1){y.b.error(Xt.message);return}pt.setFieldsValue({src:"/api/attachments/".concat(Xt.id),type:Gt.type})}function bt(Xt){var Gt=Xt.target.files[0];ie(Gt,At)}return c.a.createElement(U.a,Object(R.a)({form:pt},Se,{className:"upload-image-panel",onFinish:Dt}),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},c.a.createElement(W.a,{style:Ie})),c.a.createElement(ue,{onFileChange:bt}))),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(W.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:ct},"\u53D6\u6D88")))};function ue(He){var rt=He.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:rt}))}function ie(He,rt){if(!He)throw new String("\u6CA1\u6709\u6587\u4EF6");var ct=new FormData;ct.append("editormd-image-file",He),ct.append("file_param_name","editormd-image-file"),ct.append("byxhr","true");var yt=new window.XMLHttpRequest;yt.withCredentials=!0,yt.addEventListener("load",function(ht){rt(JSON.parse(ht.target.responseText),He)},!1),yt.addEventListener("error",function(ht){console.error(ht)},!1),yt.open("POST","".concat(be.a,"/api/attachments.json")),yt.send(ct)}var Ce=I("giR+"),ne=I("fyUT"),ce=I("7Kak"),Ae=I("9yH6"),oe=Ae.a.Group,q={margin:"0 8px"},$=function(He){var rt=He.callback,ct=He.onCancel;function yt(ht){rt(ht)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:yt},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:q},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:q},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(ne.a,null)),c.a.createElement("span",{style:q},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(ne.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:q},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(oe,null,c.a.createElement(Ae.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(Ae.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(Ae.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(Ae.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:ct},"\u53D6\u6D88")))},X=I("ErOA"),de=I("7Cbv"),pe="link",xe="upload-image",Ke="code-block",qe="add-table",tt="------------",et={default:tt,left:":".concat(tt),center:":".concat(tt,":"),right:"".concat(tt,":")},it=I("9VGf"),at,je;function De(){}var nt=0,lt=1e4,Ve="\u2581",Qe=`
**\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 Fe(He){return/^\d+$/.test(He)?"".concat(He,"px"):He}var Re=navigator.platform.toUpperCase().indexOf("MAC")>=0,Me=Re?"Cmd":"Ctrl",Ee=["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"],Oe=(at={},Object(_.a)(at,Me+"-B","bold"),Object(_.a)(at,Me+"-I","italic"),at),ke=(je={},Object(_.a)(je,pe,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(je,Ke,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(je,xe,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(je,qe,"\u6DFB\u52A0\u8868\u683C"),je),Ne=J.a=function(He){var rt=He.defaultValue,ct=rt===void 0?"":rt,yt=He.onChange,ht=He.width,pt=ht===void 0?"100%":ht,Dt=He.height,At=Dt===void 0?400:Dt,bt=He.miniToolbar,Xt=bt===void 0?!1:bt,Gt=He.isFocus,rr=Gt===void 0?!1:Gt,sr=He.watch,Kt=He.insertTemp,kt=He.mode,ir=kt===void 0?"markdown":kt,_t=He.id,Mt=_t===void 0?"markdown-editor-id":_t,Rt=He.showResizeBar,Ot=Rt===void 0?!1:Rt,qt=He.noStorage,Jr=qt===void 0?!1:qt,Et=He.showNullButton,It=Et===void 0?!1:Et,wt=He.hidetoolBar,Er=wt===void 0?!1:wt,nr=He.fullScreen,Bt=nr===void 0?!1:nr,Nt=He.onBlur,vr=He.onCMBeforeChange,Qr=He.onFullScreen,Cr=He.className,vt=Cr===void 0?"":Cr,Ht=He.disablePaste,Zr=Ht===void 0?!1:Ht,ln=He.placeholder,kn=ln===void 0?"":ln,Cn=He.values,le=Cn===void 0?"":Cn,V=Object(r.useState)(null),Y=Object(C.a)(V,2),te=Y[0],ve=Y[1],ae=Object(r.useState)(ct),ze=Object(C.a)(ae,2),ft=ze[0],Ct=ze[1],Wt=Object(r.useState)(sr),gt=Object(C.a)(Wt,2),Yt=gt[0],er=gt[1],Hr=Object(r.useState)(Bt),on=Object(C.a)(Hr,2),Gr=on[0],lr=on[1],qr=Object(r.useState)(""),On=Object(C.a)(qr,2),zt=On[0],mr=On[1],pr=Object(r.useState)(0),jr=Object(C.a)(pr,2),Tr=jr[0],li=jr[1],An=Object(r.useState)(At),Ui=Object(C.a)(An,2),Bi=Ui[0],qn=Ui[1],un=Object(r.useState)(!1),Si=Object(C.a)(un,2),hn=Si[0],Yn=Si[1],en=Object(r.useRef)(Object(de.a)()),hr=Object(r.useRef)(!1),nn=Object(r.useRef)(),xr=Object(r.useRef)(),fn=Object(r.useRef)(),Fr=Object(r.useRef)(),mi=Object(r.useRef)(),En=function(){var $t=Object(m.a)(f.a.mark(function ur(){var Qt,yr;return f.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:return zr.next=2,Object(X.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:en.current}});case 2:yr=zr.sent,yr!=null&&(Qt=yr.attachments)!==null&&Qt!==void 0&&Qt.length&&(console.log("cm:",te,xr),yr.attachments.map(function(Rr){Rr.content_type.indexOf("image")>-1?te.replaceSelection(".concat(Rr.content_type,")")):Rr.content_type.indexOf("video")>-1?te.replaceSelection('')):Rr.content_type.indexOf("pdf")>-1?te.replaceSelection('').concat(Rr.name,"")):te.replaceSelection("[".concat(Rr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Rr.id,"?type=").concat(Rr.content_type,")"))}));case 4:case"end":return zr.stop()}},ur)}));return function(){return $t.apply(this,arguments)}}();Object(r.useEffect)(function(){Ct(le),te==null||te.setValue(le)},[le]),Object(r.useEffect)(function(){Qr==null||Qr(Gr)},[Gr]),Object(r.useEffect)(function(){if(xr.current){var $t=n.a.fromTextArea(xr.current,{mode:ir,lineNumbers:!Xt,lineWrapping:!0,value:ct,autoCloseTags:!0,autoCloseBrackets:!0});rr&&$t.focus();function ur(Qt,yr){if(Zr){yr.preventDefault();return}var kr=yr.clipboardData;if(kr){var zr=kr.types.toString(),Rr=kr.items;if(zr==="Files"||kr.types.indexOf("Files")>-1){if(yr.preventDefault(),ir=="stex")return;try{var vn,$n=Rr[1];((vn=Rr[0])===null||vn===void 0?void 0:vn.kind)==="file"&&($n=Rr[0]);var Sr=$n.getAsFile(),Ei=Sr.name.split(".").pop();ie(Sr,function(Vr){if(Vr.id){var jn,Bn,gi;(Sr==null||((jn=Sr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?$t.replaceSelection(".concat(Vr.content_type,")")):(Sr==null||((Bn=Sr.type)===null||Bn===void 0)?void 0:Bn.indexOf("video"))>-1?$t.replaceSelection('')):(Sr==null||((gi=Sr.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?$t.replaceSelection('').concat(Sr.name,"")):Ee.includes(Ei)?$t.replaceSelection('').concat(Sr.name,"")):$t.replaceSelection("[".concat(Sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,"?type=").concat(Vr.content_type,")"))}else(Vr==null?void 0:Vr.status)===401&&(document.location.href="/user/login")})}catch(Vr){y.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return $t.on("paste",ur),$t.on("dragleave",function(Qt,yr){fn.current.classList.remove("mouse-hover-md")}),$t.on("dragover",function(Qt,yr){fn.current.classList.add("mouse-hover-md")}),$t.on("drop",function(Qt,yr){fn.current.classList.add("mouse-hover-md");var kr;if(kr=yr.dataTransfer.files,kr.length>0){yr.preventDefault(),yr.stopPropagation();for(var zr=function($n){var Sr=kr[$n],Ei=Sr.name.split(".").pop();ie(Sr,function(Vr){if(Vr.id){var jn,Bn,gi;(Sr==null||((jn=Sr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?$t.replaceSelection(".concat(Vr.content_type,")")):(Sr==null||((Bn=Sr.type)===null||Bn===void 0)?void 0:Bn.indexOf("video"))>-1?$t.replaceSelection('')):(Sr==null||((gi=Sr.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?$t.replaceSelection('').concat(Sr.name,"")):Ee.includes(Ei)?$t.replaceSelection('').concat(Sr.name,"")):$t.replaceSelection("[".concat(Sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,"?type=").concat(Vr.content_type,")"))}else(Vr==null?void 0:Vr.status)===401&&(document.location.href="/user/login")})},Rr=0;Rr0||Rr.target.offsetWidth>0)&&(Un(),te.setSize("100%","100%"),te.refresh())}}catch(vn){kr.e(vn)}finally{kr.f()}});return Qt.observe(xr.current.parentElement),Qt}if(te){var ur=$t();return function(){ur.unobserve(xr.current.parentElement)}}},[te,Un]),Object(r.useEffect)(function(){if(te){for(var $t=[],ur=function(){var Rr=yr[Qt];kr=Object(C.a)(Rr,2);var vn=kr[0],$n=kr[1],Sr=Object(_.a)({},vn,function(){Di($n)});$t.push(Sr),te.addKeyMap(Sr)},Qt=0,yr=Object.entries(Oe);Qt0){var $t=new Date().getTime(),ur=window.sessionStorage.getItem(Mt);$t>=Tr+lt&&(!ur||ur!==ft)&&(window.sessionStorage.setItem(Mt,ft),Yn(!0))}},lt),Object(r.useEffect)(function(){er(sr)},[te,sr]),Object(r.useEffect)(function(){te&&(rr&&te.focus())},[te,rr]),Object(r.useEffect)(function(){if(Yt&&te){var $t=te.getScrollerElement();function ur(Qt){var yr=Qt.target;if(mi.current){var kr=yr.scrollTop/yr.scrollHeight;mi.current.scrollTop=mi.current.scrollHeight*kr}}return $t.addEventListener("scroll",ur),function(){$t.removeEventListener("scroll",ur)}}},[te,Yt]),Object(r.useEffect)(function(){if(te&&vr){function $t(ur,Qt){vr(ur,Qt)}return te.on("beforeChange",$t),function(){te.off("beforeChange",$t)}}},[te,vr]),Object(r.useEffect)(function(){if(te&&Nt){function $t(){Nt(te.getValue())}return te.on("blur",$t),function(){te.off("blur",$t)}}},[te,Nt]),Object(r.useEffect)(function(){if(te){function $t(ur){var Qt=ur.getValue();Ct(Qt),li(new Date().getTime()),ur.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),yt&&yt(Qt)}return te.on("change",$t),function(){te.off("change",$t)}}},[te,yt]),Object(r.useEffect)(function(){te&&(ct==null?(te.setValue(""),Ct("")):ct!==te.getValue()&&(te.setValue(ct),Ct(ct),te.setCursor(te.lineCount(),0)))},[te,ct]);var Di=Object(r.useCallback)(function($t){var ur=te.getCursor(),Qt=te.getSelection(),yr=Qt.split(`
`);switch($t){case"bold":return te.replaceSelection("**"+Qt+"**"),Qt===""&&te.setCursor(ur.line,ur.ch+2),te.focus();case"italic":return te.replaceSelection("*"+Qt+"*"),Qt===""&&te.setCursor(ur.line,ur.ch+1),te.focus();case"code":return te.replaceSelection("`"+Qt+"`"),Qt===""&&te.setCursor(ur.line,ur.ch+1),te.focus();case"inline-latex":return te.replaceSelection("`$$"+Qt+"$$`"),Qt===""&&te.setCursor(ur.line,ur.ch+3),te.focus();case"latex":return te.replaceSelection("```latex\n"+Qt+"\n```"),te.setCursor(ur.line+1,Qt.length+1),te.focus();case"line-break":return te.replaceSelection(`
`),te.focus();case"list-ul":return Qt===""?te.replaceSelection("- "+Qt):te.replaceSelection(yr.map(function(kr){return kr===""?"":"- ".concat(kr)}).join(`
`)),te.focus();case"list-ol":return Qt===""?te.replaceSelection("1. "+Qt):te.replaceSelection(yr.map(function(kr,zr){return kr===""?"":"".concat(zr+1,". ").concat(kr)}).join(`
`)),te.focus();case"add-null-ch":return Qt===""&&te.setCursor(ur.line,ur.ch+1),te.replaceSelection(Ve),te.focus();case"inster-template-1":return Qt===""&&te.setCursor(ur.line,ur.ch),te.replaceSelection(Qe),te.focus();case"eraser":return te.setValue(""),te.focus();case"trigger-watch":return er(!Yt),te.focus();case"trigger-full-screen":return lr(!Gr),te.focus();case pe:mr(pe);return;case Ke:mr(Ke);return;case xe:mr(xe);return;case qe:mr(qe);return;default:throw new Error}},[te,Yt,Gr]),ui=Object(r.useCallback)(function($t){mr("");switch(zt){case pe:var ur=$t.title,Qt=$t.link;return te.replaceSelection("[".concat(ur,"](").concat(Qt,")")),te.focus();case Ke:var yr=$t.language,kr=$t.content;return te.replaceSelection(["```"+yr,kr,"```"].join(`
`)),te.focus();case xe:var zr=$t.src,Rr=$t.alt;return Rr?te.replaceSelection(".concat(zr,' "').concat(Rr,'" )')):te.replaceSelection("")),te.focus();case qe:for(var vn=$t.row,$n=$t.col,Sr=$t.align,Ei=`
`,Vr=0;Vr300&&(vn=300);var $n=At+vn+"px";qn($n)}}return $t.addEventListener("mousedown",yr),document.addEventListener("mousemove",zr),document.addEventListener("mouseup",kr),function(){$t.removeEventListener("mousedown",yr),document.removeEventListener("mousemove",zr),document.removeEventListener("mouseup",kr)}}},[te,Fr]),Object(r.useEffect)(function(){qn(At)},[At]);var ti=Fe(pt),ji=Fe(Bi),ci={width:ti,height:ji},_i=Object(r.useMemo)(function(){if(Tr){var $t=new Date(Tr),ur=$t.getHours(),Qt=$t.getMinutes(),yr=$t.getSeconds();return ur=ur<10?"0"+ur:ur,Qt=Qt<10?"0"+Qt:Qt,yr=yr<10?"0"+yr:yr,"".concat(ur,":").concat(Qt,":").concat(yr)}return 0},[Tr]);function Hi(){window.sessionStorage.removeItem(Mt),Yn(!1),li(0)}function di(){Yn(!1),li(0),te.setValue(window.sessionStorage.getItem(Mt))}function tn($t,ur){var Qt=te.getValue();Qt=Qt.replace($t,ur),Ct(Qt),te==null||te.setValue(Qt)}return c.a.createElement(r.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:fn},c.a.createElement("div",{className:"markdown-editor-container ".concat(vt," ").concat(Yt?"on-preview":""," ").concat(Xt?"mini":""," ").concat(Gr?"full-screen":""),style:ci},c.a.createElement(A,{insertTemp:Kt,watch:Yt,fullScreen:Gr,showNullButton:It,onActionCallback:Di,hidetoolBar:Er,uuid:en.current,setOpenPhones:function(){hr.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:xr,placeholder:kn})),Yt?c.a.createElement("div",{ref:mi,className:"preview-container"},ir==="stex"&&c.a.createElement(L,{value:ft}),ir!=="stex"&&c.a.createElement(p.a,{edit:!0,value:ft,replaces:tn})):null))),Ot?c.a.createElement("a",{ref:Fr,className:"editor-resize"}):null,c.a.createElement(z.a,null,ke[zt]?c.a.createElement(g.a,{centered:!0,title:ke[zt],visible:!0,onCancel:ei,footer:null,className:"markdown-popup-form"},bi):null))}},PD8m:function(H,J){H.exports={name:"memoryStorage",read:N,write:g,each:S,remove:k,clearAll:y};var I={};function N(m){return I[m]}function g(m,C){I[m]=C}function S(m){for(var C in I)I.hasOwnProperty(C)&&m(I[C],C)}function k(m){delete I[m]}function y(m){I={}}},PVpz:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.StreamCipher,y=g.algo,m=[],C=[],_=[],e=y.RabbitLegacy=k.extend({_doReset:function(){var r=this._key.words,c=this.cfg.iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],n=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var o=0;o<4;o++)f.call(this);for(var o=0;o<8;o++)n[o]^=i[o+4&7];if(c){var h=c.words,d=h[0],u=h[1],s=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,l=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=s>>>16|l&4294901760,b=l<<16|s&65535;n[0]^=s,n[1]^=E,n[2]^=l,n[3]^=b,n[4]^=s,n[5]^=E,n[6]^=l,n[7]^=b;for(var o=0;o<4;o++)f.call(this)}},_doProcessBlock:function(r,c){var i=this._X;f.call(this),m[0]=i[0]^i[5]>>>16^i[3]<<16,m[1]=i[2]^i[7]>>>16^i[5]<<16,m[2]=i[4]^i[1]>>>16^i[7]<<16,m[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,r[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function f(){for(var r=this._X,c=this._C,i=0;i<8;i++)C[i]=c[i];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0>>0?1:0)|0,this._b=c[7]>>>0>>0?1:0;for(var i=0;i<8;i++){var n=r[i]+c[i],o=n&65535,h=n>>>16,d=((o*o>>>17)+o*h>>>15)+h*h,u=((n&4294901760)*n|0)+((n&65535)*n|0);_[i]=d^u}r[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,r[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,r[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,r[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,r[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,r[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,r[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,r[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.RabbitLegacy=k._createHelper(e)}(),N.RabbitLegacy})},RELg:function(H,J,I){var N=I("MFOe"),g=N.Global;H.exports={name:"oldIE-userDataStorage",write:C,read:_,each:e,remove:f,clearAll:r};var S="storejs",k=g.document,y=n(),m=(g.navigator?g.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(o,h){if(m)return;var d=i(o);y(function(u){u.setAttribute(d,h),u.save(S)})}function _(o){if(m)return;var h=i(o),d=null;return y(function(u){d=u.getAttribute(h)}),d}function e(o){y(function(h){for(var d=h.XMLDocument.documentElement.attributes,u=d.length-1;u>=0;u--){var s=d[u];o(h.getAttribute(s.name),s.name)}})}function f(o){var h=i(o);y(function(d){d.removeAttribute(h),d.save(S)})}function r(){y(function(o){var h=o.XMLDocument.documentElement.attributes;o.load(S);for(var d=h.length-1;d>=0;d--)o.removeAttribute(h[d].name);o.save(S)})}var c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function i(o){return o.replace(/^\d/,"___$&").replace(c,"___")}function n(){if(!k||!k.documentElement||!k.documentElement.addBehavior)return null;var o="script",h,d,u;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+o+">document.w=window"+o+'>'),d.close(),h=d.w.frames[0].document,u=h.createElement("div")}catch(s){u=k.createElement("div"),h=k.body}return function(s){var l=[].slice.call(arguments,0);l.unshift(u),h.appendChild(u),u.addBehavior("#default#userData"),u.load(S),s.apply(this,l),h.removeChild(u);return}}},S6kV:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.mode.OFB=function(){var g=N.lib.BlockCipherMode.extend(),S=g.Encryptor=g.extend({processBlock:function(k,y){var m=this._cipher,C=m.blockSize,_=this._iv,e=this._keystream;_&&(e=this._keystream=_.slice(0),this._iv=void 0),m.encryptBlock(e,0);for(var f=0;f|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(oe){for(var q=0,$=!1,X=!1,de=0,pe=oe.length;de122||(Ee<65||Me>90||nt.push([Math.max(65,Me)|32,Math.min(Ee,90)|32]),Ee<97||Me>122||nt.push([Math.max(97,Me)&~32,Math.min(Ee,122)&~32]))}}nt.sort(function(He,rt){return He[0]-rt[0]||rt[1]-He[1]});for(var Oe=[],ke=[],Qe=0;QeNe[0]&&(Ne[1]+1>Ne[0]&&Ve.push("-"),Ve.push(tt(Ne[1])))}return Ve.push("]"),Ve.join("")}function it(je){for(var De=je.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")),nt=De.length,lt=[],Ve=0,Qe=0;Ve=2&&Me==="["?De[Ve]=et(Fe):Me!=="\\"&&(De[Ve]=Fe.replace(/[a-zA-Z]/g,function(ke){var Ne=ke.charCodeAt(0);return"["+String.fromCharCode(Ne&~32,Ne|32)+"]"}))}return De.join("")}for(var at=[],de=0,pe=oe.length;de=0;)$[at.charAt(je)]=it;var De=it[1],nt=""+De;qe.hasOwnProperty(nt)||(Ke.push(De),qe[nt]=null)}Ke.push(/[\0-\uffff]/),X=U(Ke)})();var de=q.length,pe=function(xe){for(var Ke=xe.sourceCode,qe=xe.basePos,tt=xe.sourceNode,et=[qe,T],it=0,at=Ke.match(X)||[],je={},De=0,nt=at.length;De=5&&Ve.substring(0,5)==="lang-",Fe&&!(Qe&&typeof Qe[1]=="string")&&(Fe=!1,Ve=A),Fe||(je[lt]=Ve)}var Ee=it;if(it+=lt.length,!Fe)et.push(qe+Ee,Ve);else{var Oe=Qe[1],ke=lt.indexOf(Oe),Ne=ke+Oe.length;Qe[2]&&(Ne=lt.length-Qe[2].length,ke=Ne-Oe.length);var He=Ve.substring(5);W(tt,qe+Ee,lt.substring(0,ke),pe,et),W(tt,qe+Ee+ke,Oe,ue(He,Oe),et),W(tt,qe+Ee+Ne,lt.substring(Ne),pe,et)}}xe.decorations=et};return pe}function ye(oe){var q=[],$=[];oe.tripleQuotedStrings?q.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):oe.multiLineStrings?q.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):q.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),oe.verbatimStrings&&$.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var X=oe.hashComments;X&&(oe.cStyleComments?(X>1?q.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):q.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),$.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):q.push([R,/^#[^\r\n]*/,null,"#"])),oe.cStyleComments&&($.push([R,/^\/\/[^\r\n]*/,null]),$.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var de=oe.regexLiterals;if(de){var pe=de>1?"":`
\r`,xe=pe?".":"[\\S\\s]",Ke="/(?=[^/*"+pe+"])(?:[^/\\x5B\\x5C"+pe+"]|\\x5C"+xe+"|\\x5B(?:[^\\x5C\\x5D"+pe+"]|\\x5C"+xe+")*(?:\\x5D|$))+/";$.push(["lang-regex",RegExp("^"+B+"("+Ke+")")])}var qe=oe.types;qe&&$.push([v,qe]);var tt=(""+oe.keywords).replace(/^ | $/g,"");tt.length&&$.push([L,new RegExp("^(?:"+tt.replace(/[\s,]+/g,"|")+")\\b"),null]),q.push([T,/^\s+/,null,` \r
\xA0`]);var et="^.[^\\s\\w.$@'\"`/\\\\]*";return oe.regexLiterals&&(et+="(?!s*/)"),$.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[v,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[w,new RegExp(et),null]),ee(q,$)}var be=ye({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function he(oe,q,$){for(var X=/(?:^|\s)nocode(?:\s|$)/,de=/\r\n?|\n/,pe=oe.ownerDocument,xe=pe.createElement("li");oe.firstChild;)xe.appendChild(oe.firstChild);var Ke=[xe];function qe(De){var nt=De.nodeType;if(nt==1&&!X.test(De.className))if(De.nodeName==="br")tt(De),De.parentNode&&De.parentNode.removeChild(De);else for(var lt=De.firstChild;lt;lt=lt.nextSibling)qe(lt);else if((nt==3||nt==4)&&$){var Ve=De.nodeValue,Qe=Ve.match(de);if(Qe){var Fe=Ve.substring(0,Qe.index);De.nodeValue=Fe;var Re=Ve.substring(Qe.index+Qe[0].length);if(Re){var Me=De.parentNode;Me.insertBefore(pe.createTextNode(Re),De.nextSibling)}tt(De),Fe||De.parentNode.removeChild(De)}}}function tt(De){for(;!De.nextSibling;)if(De=De.parentNode,!De)return;function nt(Qe,Fe){var Re=Fe?Qe.cloneNode(!1):Qe,Me=Qe.parentNode;if(Me){var Ee=nt(Me,1),Oe=Qe.nextSibling;Ee.appendChild(Re);for(var ke=Oe;ke;ke=Oe)Oe=ke.nextSibling,Ee.appendChild(ke)}return Re}for(var lt=nt(De.nextSibling,0),Ve;(Ve=lt.parentNode)&&Ve.nodeType===1;)lt=Ve;Ke.push(lt)}for(var et=0;et=Me&&(qe+=2),pe>=Ee&&(it+=2)}}finally{Ve&&(Ve.style.display=Qe)}}var Se={};function fe(oe,q){for(var $=q.length;--$>=0;){var X=q[$];Se.hasOwnProperty(X)?_.console&&console.warn("cannot override language handler %s",X):Se[X]=oe}}function ue(oe,q){return oe&&Se.hasOwnProperty(oe)||(oe=/^\s*]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[w,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^