(window.webpackJsonp=window.webpackJsonp||[]).push([[120,5,6,7,8,10,16,17],{"+NIl":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/stex/stex.js ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};function a(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=o.hasOwnProperty(s)?o[s]:o.DEFAULT)),a(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return a(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return a(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return a(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return a(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),a(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=o.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return a(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),a(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(a(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return o.importmodule=i("importmodule","tag",["string","builtin"]),o.documentclass=i("documentclass","tag",["","atom"]),o.usepackage=i("usepackage","tag",["atom"]),o.begin=i("begin","tag",["atom"]),o.end=i("end","tag",["atom"]),o.label=i("label","tag",["atom"]),o.ref=i("ref","tag",["atom"]),o.eqref=i("eqref","tag",["atom"]),o.cite=i("cite","tag",["atom"]),o.bibitem=i("bibitem","tag",["atom"]),o.Bibitem=i("Bibitem","tag",["atom"]),o.RBibitem=i("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"19Vz":
/*!**************************************************************!*\
!*** ./node_modules/codemirror/addon/display/placeholder.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){o(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=o(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(o,a,s){var l=s&&s!=e.Init;if(a&&!l)o.on("blur",r),o.on("change",i),o.on("swapDoc",i),e.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(o)}),i(o);else if(!a&&l){o.off("blur",r),o.off("change",i),o.off("swapDoc",i),e.off(o.getInputField(),"compositionupdate",o.state.placeholderCompose),t(o);var c=o.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!o.hasFocus()&&r(o)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1ZF9":
/*!*****************************************!*\
!*** ./src/assets/images/Authorize.png ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/Authorize.cc9c212f.png"},"1eCo":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/xml/xml.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=h;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=h,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=h,t.state=v,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=h;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",E):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",E(e,0,n)):(a="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",x):(a="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",x(e,0,n)):(a="error",w)}function x(e,t,n){return"endTag"!=e?(a="error",x):(m(n),v)}function w(e,t,n){return a="error",x(e,0,n)}function E(e,t,n){if("word"==e)return a="attribute",S;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return a="error",E}function S(e,t,n){return"equals"==e?C:(l.allowMissing||(a="error"),E(e,0,n))}function C(e,t,n){return"string"==e?k:"word"==e&&l.allowUnquoted?(a="string",E):(a="error",E(e,0,n))}function k(e,t,n){return"string"==e?k:E(e,0,n)}return h.isInText=!0,{startState:function(e){var t={tokenize:h,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==C&&(e.state=E)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1uat":
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha512.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],h=n[6],d=n[7],f=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=a.high,x=a.low,w=s.high,E=s.low,S=u.high,C=u.low,k=h.high,_=h.low,T=d.high,O=d.low,A=f,L=p,D=m,I=g,R=v,M=y,N=b,j=x,P=w,B=E,F=S,U=C,H=k,z=_,G=T,V=O,W=0;W<80;W++){var K,q,X=c[W];if(W<16)q=X.high=0|e[t+2*W],K=X.low=0|e[t+2*W+1];else{var Y=c[W-15],$=Y.high,J=Y.low,Z=($>>>1|J<<31)^($>>>8|J<<24)^$>>>7,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^(J>>>7|$<<25),ee=c[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[W-7],ae=oe.high,se=oe.low,le=c[W-16],ce=le.high,ue=le.low;q=(q=(q=Z+ae+((K=Q+se)>>>0>>0?1:0))+re+((K+=ie)>>>0>>0?1:0))+ce+((K+=ue)>>>0>>0?1:0),X.high=q,X.low=K}var he,de=P&F^~P&H,fe=B&U^~B&z,pe=A&D^A&R^D&R,me=L&I^L&M^I&M,ge=(A>>>28|L<<4)^(A<<30|L>>>2)^(A<<25|L>>>7),ve=(L>>>28|A<<4)^(L<<30|A>>>2)^(L<<25|A>>>7),ye=(P>>>14|B<<18)^(P>>>18|B<<14)^(P<<23|B>>>9),be=(B>>>14|P<<18)^(B>>>18|P<<14)^(B<<23|P>>>9),xe=l[W],we=xe.high,Ee=xe.low,Se=G+ye+((he=V+be)>>>0>>0?1:0),Ce=ve+me;G=H,V=z,H=F,z=U,F=P,U=B,P=N+(Se=(Se=(Se=Se+de+((he+=fe)>>>0>>0?1:0))+we+((he+=Ee)>>>0>>0?1:0))+q+((he+=K)>>>0>>0?1:0))+((B=j+he|0)>>>0>>0?1:0)|0,N=R,j=M,R=D,M=I,D=A,I=L,A=Se+(ge+pe+(Ce>>>0>>0?1:0))+((L=he+Ce|0)>>>0>>0?1:0)|0}p=r.low=p+L,r.high=f+A+(p>>>0>>0?1:0),g=i.low=g+I,i.high=m+D+(g>>>0>>0?1:0),y=o.low=y+M,o.high=v+R+(y>>>0>>0?1:0),x=a.low=x+j,a.high=b+N+(x>>>0>>0?1:0),E=s.low=E+B,s.high=w+P+(E>>>0>>0?1:0),C=u.low=C+U,u.high=S+F+(C>>>0>>0?1:0),_=h.low=_+z,h.high=k+H+(_>>>0>>0?1:0),O=d.low=O+V,d.high=T+G+(O>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},"3y9D":
/*!****************************************!*\
!*** ./node_modules/crypto-js/sha1.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(/*! ./core */"Ib8C"),i=(r=u).lib,o=i.WordArray,a=i.Hasher,s=r.algo,l=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var h=(r<<5|r>>>27)+s+l[c];h+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(c),r.HmacSHA1=a._createHmacHelper(c),u.SHA1)},4:
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){},"55Ip":
/*!***************************************************************!*\
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
\***************************************************************/
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
/*! exports used: Link, NavLink */function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return b}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),o=n(/*! react */"q1tI"),a=n.n(o),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");a.a.Component;a.a.Component;var h=function(e,t){return"function"==typeof e?e(t):e},d=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=a.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,o=Object(c.a)(e,["innerRef","navigate","onClick"]),s=o.target,u=Object(l.a)({},o,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,a.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,o=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=d(h(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=h(s,e.location);(o?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,a.a.createElement(i,m)}))})),v=function(e){return e},y=a.a.forwardRef;void 0===y&&(y=v);var b=y((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,o=e.activeClassName,s=void 0===o?"active":o,f=e.activeStyle,p=e.className,m=e.exact,b=e.isActive,x=e.location,w=e.sensitive,E=e.strict,S=e.style,C=e.to,k=e.innerRef,_=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=x||e.location,o=d(h(C,n),n),c=o.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),O=T?Object(r.f)(n.pathname,{path:T,exact:m,sensitive:w,strict:E}):null,A=!!(b?b(O,n):O),L=A?function(){for(var e=arguments.length,t=new Array(e),n=0;n>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(O=n[i]).high^=a,O.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var f=0,p=0,m=0;m<5;m++)f^=(O=n[d+5*m]).high,p^=O.low;var g=h[d];g.high=f,g.low=p}for(d=0;d<5;d++){var v=h[(d+4)%5],y=h[(d+1)%5],b=y.high,x=y.low;for(f=v.high^(b<<1|x>>>31),p=v.low^(x<<1|b>>>31),m=0;m<5;m++)(O=n[d+5*m]).high^=f,O.low^=p}for(var w=1;w<25;w++){var E=(O=n[w]).high,S=O.low,C=l[w];C<32?(f=E<>>32-C,p=S<>>32-C):(f=S<>>64-C,p=E<>>64-C);var k=h[c[w]];k.high=f,k.low=p}var _=h[0],T=n[0];for(_.high=T.high,_.low=T.low,d=0;d<5;d++)for(m=0;m<5;m++){var O=n[w=d+5*m],A=h[w],L=h[(d+1)%5+5*m],D=h[(d+2)%5+5*m];O.high=A.high^~L.high&D.high,O.low=A.low^~L.low&D.low}O=n[0];var I=u[s];O.high^=I.high,O.low^=I.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(d)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),r.SHA3)},"6+eU":
/*!************************************************************!*\
!*** ./node_modules/rc-pagination/es/index.js + 4 modules ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n("wx14"),i=n("rePB"),o=n("VTBJ"),a=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=f()(n,"".concat(n,"-").concat(e.page),(t={},Object(i.a)(t,"".concat(n,"-active"),e.active),Object(i.a)(t,e.className,!!e.className),Object(i.a)(t,"".concat(n,"-disabled"),!e.page),t));return h.a.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",h.a.createElement("a",{rel:"nofollow"},e.page)))},m=13,g=38,v=40,y=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o=0||t.relatedTarget.className.indexOf("".concat(o,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,o=t.changeSize,a=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,d=t.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,y=null;if(!o&&!a)return null;var b=this.getPageSizeOptions();if(o&&m){var x=b.map((function(t,n){return h.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=h.a.createElement(m,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return a&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function w(){}function E(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var S=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(a.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(E(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||h.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=h.a.createElement(e,Object(o.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=E(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=E(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var o=r.state.pageSize;return r.props.onChange(n,o),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current2?n-2:0),i=2;i=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,o=t.className,a=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,d=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,y=t.showTotal,x=t.simple,w=t.itemRender,S=t.showPrevNextJumpers,C=t.jumpPrevIcon,k=t.jumpNextIcon,_=t.selectComponentClass,T=t.selectPrefixCls,O=t.pageSizeOptions,A=this.state,L=A.current,D=A.pageSize,I=A.currentInputValue;if(!0===l&&c<=D)return null;var R=E(void 0,this.state,this.props),M=[],N=null,j=null,P=null,B=null,F=null,U=m&&m.goButton,H=g?1:2,z=L-1>0?L-1:0,G=L+1=2*H&&3!==L&&(M[0]=Object(u.cloneElement)(M[0],{className:"".concat(n,"-item-after-jump-prev")}),M.unshift(N)),R-L>=2*H&&L!==R-2&&(M[M.length-1]=Object(u.cloneElement)(M[M.length-1],{className:"".concat(n,"-item-before-jump-next")}),M.push(j)),1!==$&&M.unshift(P),J!==R&&M.push(B)}var ee=null;y&&(ee=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(L-1)*D+1,L*D>c?c:L*D])));var te=!this.hasPrev()||!R,ne=!this.hasNext()||!R;return h.a.createElement("ul",Object(r.a)({className:f()(n,o,Object(i.a)({},"".concat(n,"-disabled"),s)),style:a,unselectable:"unselectable",ref:this.savePaginationNode},V),ee,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(z)),M,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(G)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:_,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:L,pageSize:D,pageSizeOptions:O,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=E(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(h.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:w,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:w,locale:x.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var C=S},"6RRn":
/*!*******************************************!*\
!*** ./node_modules/rc-table/es/index.js ***!
\*******************************************/
/*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */
/*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(e,t,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(t,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var o=n(/*! ./utils/legacyUtil */"hW8S");n.d(t,"a",(function(){return o.a})),t.c=r.b},"6eGT":
/*!*******************************************************!*\
!*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},"7Cbv":
/*!**************************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var a=/^(?:[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;for(var s=function(e){return"string"==typeof e&&a.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},"7ahc":
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
\*************************************************************/
/*! exports provided: default, MyCodeMirror */
/*! exports used: MyCodeMirror, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),o=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),a=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! codemirror */"VrN/"),d=n.n(h),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},m={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"]};function g(e){var t=e.value,n=e.onChange,i=e.mode,o=e.options,a=void 0===o?{}:o,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(s.a)(h,2),p=f[0],m=f[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();n&&n(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||" ")}),300))}),[p,t]),Object(c.useEffect)((function(){if(l.current&&!p){var e=d.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},a));m(e)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t.b=function(e){var t=e.callback,n=e.onCancel,r=Object(c.useState)("python"),h=Object(s.a)(r,2),d=h[0],v=h[1];return u.a.createElement(a.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)}}),u.a.createElement(a.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(e){v(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(f,{key:e,value:e},m[e][0])})))),u.a.createElement(a.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(o.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(o.a,{type:"ghost",onClick:n},"取消")))}},"815F":
/*!***************************************************!*\
!*** ./node_modules/rc-tree/es/utils/treeUtil.js ***!
\***************************************************/
/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */
/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(a.a)(t).map((function(t){if(!Object(l.i)(t))return Object(s.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,a=r.children,c=Object(o.a)(r,["children"]),u=Object(i.a)({key:n},c),h=e(a);return h.length&&(u.children=h),u})).filter((function(e){return e}))}(e)}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),o=[];function a(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===e.length-1])});return o.push(p),!0===t||n.has(f)?p.children=a(u.children||[],p):p.children=[],p}))}return a(e),o}function d(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,o,a){var s=i?i.children:e,c=i?Object(l.h)(a.pos,o):"0";if(i){var u=r(i,c),h={node:i,index:o,pos:c,key:u,parentPos:a.node?a.pos:null,level:a.level+1};t(h)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:a?a.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,o=arguments.length>2?arguments[2]:void 0,a={},s={},l={posEntities:a,keyEntities:s};return n&&(l=n(l)||l),d(e,(function(e){var t=e.node,n=e.index,i=e.pos,o=e.key,u=e.parentPos,h={node:t,index:n,key:o,pos:i,level:e.level},d=c(o,i);a[i]=h,s[d]=h,h.parent=a[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),o),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,o=t.loadingKeys,a=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==o.indexOf(e),checked:-1!==a.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,o=e.checked,a=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,h=e.dragOverGapTop,d=e.dragOverGapBottom,f=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:o,loaded:a,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN":
/*!**********************************************!*\
!*** ./node_modules/codemirror/mode/meta.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.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 t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){m.length=0,g=[""]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var o=t[n];i.push("- "+o.text+"");var a=[];return n=e(t,++n,o.level,a),a.length>0&&(i.push("
"),a.forEach((function(e){i.push(e)})),i.push("
")),i.push(" "),n=e(t,n,r,i)}(m,0,0,g),g.push("
"),g.join("")}var E={heading:function(e){var t=y.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(s.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var o=k(),a=r;r=o,_[o]={type:"block",expression:a}}return{type:"code",raw:n,lang:i,text:r}}}},S=/(?:\${2})([^\n`]+?)(?:\${2})/gi,C=0,k=function(){return"__special_katext_id_".concat(C++,"__")},_={};function T(){C=0,_={}}function O(e){return e=e.replace(S,(function(e,t){var n=k();return _[n]={type:"inline",expression:t},n}))}var A=v.listitem;v.listitem=function(e){return A(O(e))};var L=v.paragraph;v.paragraph=function(e){return L(O(e))};var D=v.tablecell;v.tablecell=function(e,t){return D(O(e),t)},v.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"".concat(e,"
"):'').concat(n?e:Object(p.escape)(e,!0),"
\n"):''+(n?e:Object(p.escape)(e,!0))+"
"},v.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:t,text:e}),"'+e+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:E,renderer:v});var I=f.a,R=(n("SJMd"),n("ulZh")),M=n.n(R),N=n("m3rI"),j=n("Oy/b"),P=n("p5ED"),B=n("ErOA"),F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function U(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function H(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function z(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"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(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),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 r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'',"render"),this.addActionButton(r,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),Z=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,o;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:t.toolboxButtonStyleColorsClass.name))}))},e}(),Q=function(e,t){this.title=e,this.icon=t},ee=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=r,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=r-2+"px",o.style.height=r-2+"px",o.style.backgroundColor=e,o.style.borderRadius=r/2+"px","transparent"===e&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML=''),i.appendChild(o),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(Q),te=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),ne=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),re=function(){function e(){this.GRIP_SIZE=10,this.visual=V.createGroup(),this.visual.appendChild(V.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(V.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),ie=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(V.createTransform()),i.setupControlBox(),i}return U(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=V.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup();var e=V.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),this.container.appendChild(this.controlBox),this.controlRect=V.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=V.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 ne,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},t.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,o=this.height+this.CB_DISTANCE-e/2,a=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,a,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,o),this.positionGrip(this.controlGrips.bottomCenter.visual,r,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ie.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ie.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(te),ae=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(oe),se=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=r,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),r.appendChild(o),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(Q),le=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=r,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var o='";i.innerHTML=o,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(Q),ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='',t}(ae),ue=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},he=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return U(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(te),de=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()),V.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='',t}(he),fe=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=r,o.setCurrentFont=o.setCurrentFont.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(o),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(Q),pe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return U(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.bgRectangle=V.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=V.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=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(t){e.textElement.appendChild(V.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=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(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&V.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&V.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='',t}(oe),me=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.drawingImage=V.createImage(),this.visual.appendChild(this.drawingImage);var e=V.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],o=t[3],a=!1,s=0;s0&&(a=!0,so&&(o=s),l>i&&(i=l));if(a){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(o-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=o-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,o-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.prototype.setDrawingImage=function(){V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='',t}(oe),ge=function(e){function t(t,n,r){var i=e.call(this,t,r||'')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){e.setCurrentType(i,o)})),t.appendChild(o),"both"===i||"start"===i){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='',a.style.marginLeft="5px",o.appendChild(a)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),o.appendChild(s),"both"===i||"end"===i){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='',c.style.marginRight="5px",o.appendChild(c)}r.typeBoxes.push(o)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(Q),ve=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new ge("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.prototype.createTips=function(){this.arrow1=V.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=V.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",V.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),V.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='',t}(de),ye=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new ee("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='',t}(ae),be=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=r,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(Q),xe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new ee("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new be("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='',t}(ye),we='',Ee=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new ee("Text color",r.defaultColorSet,i.color,''),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new ee("Fill color",r.defaultColorSet,i.bgColor,we),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new re,i.tipGrip.visual.transform.baseVal.appendItem(V.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return U(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.prototype.createTip=function(){V.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=V.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(V.setAttributes(this.bgRectangle,[["fill",e]]),V.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/2,y:this.height+20});var r=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?r',t}(pe),Se=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new ee("Line color",G(r.defaultColorSet,["transparent"]),r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new ee("Fill color",G(r.defaultColorSet,["transparent"]),i.fillColor,we),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new be("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),V.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="EllipseMarker",t.title="Ellipse marker",t.icon='',t}(oe),Ce=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return U(t,e),Object.defineProperty(t.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},t.prototype.createTips=function(){this.tip1=V.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(V.createTransform()),this.visual.appendChild(this.tip1),this.tip2=V.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(V.createTransform()),this.visual.appendChild(this.tip2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(V.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()]]),V.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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='',t}(de),ke=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='',t}(Se),_e=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),Te=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorCurve=V.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),V.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setupControlBox=function(){e.prototype.setupControlBox.call(this),this.curveControlLine1=V.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=V.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='',t}(he),Oe=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Ae=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return U(t,e),t}(Oe),Le=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return U(t,e),t}(Oe),De=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Ie=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new _e,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 De,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new X(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,ke,Se,xe,Ee,Ce,ye,de,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Se,xe,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),W.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new Oe(e))}))},e.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new K).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new Oe(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(e){return e(new Oe(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new J(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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(e),1),e.dispose()},e.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Le(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new Le(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Le(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new Le(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;void 0!==this._currentMarker&&(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=null!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.addLicenseKey=function(e){W.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new Oe(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new Oe(e))})))},e.instanceCounter=0,e}(),Re=function(e,t){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};
/* **********************************
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.
***************************************************************************** */function Me(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Ne(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function je(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&t>0){var n=new qe(e,t),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(o);var a=Be.createDefs();o.appendChild(a);var s=Be.createElement("clipPath",[["id","text-bg-clip"]]);a.appendChild(s);var l=Be.createPath(Be.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));o.appendChild(l);var c=Be.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Be.createTSpan(e+":"+t)),o.appendChild(c);var u=c.getBBox();Be.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Be.createPath(Be.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return s.appendChild(h),Be.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(o),o.outerHTML}return''},e}(),Ye=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Me(t,e),t.prototype.setupDropdown=function(){var e=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(t){t.className=e.className,t.colorsClassName=e.colorsClassName,e.dropdownBlock.appendChild(t.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},t.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},t.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},t.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},t.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},t.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},t}(We),$e=function(){function e(e,t){this.GRIP_SIZE=10,this.color=e,this.fillColor=t,this.visual=Be.createGroup(),this.visual.appendChild(Be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Be.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e.prototype.setCenter=function(e,t){this.visual.childNodes.forEach((function(n){return Be.setAttributes(n,[["cx",e.toString()],["cy",t.toString()]])}))},e}(),Je=function(){function e(e,t,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=e,this.canvasHeight=t,this.margin=n,this.container=r,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(e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(e){this._aspectRatio=e,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.gridContainer&&Be.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e=this;this.cropShadeElement=Be.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Be.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var t=0;tthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-t.height/2),Be.setAttributes(this.cropRectElement,[["x",t.x.toString()],["y",t.y.toString()],["width",t.width.toString()],["height",t.height.toString()]]);var n=t.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(e,r){var i=t.y+n*(r+1);Be.setAttributes(e,[["x1",""+t.x],["y1",""+i],["x2",""+(t.x+t.width)],["y2",""+i]])}));var r=t.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(e,n){var i=t.x+r*(n+1);Be.setAttributes(e,[["x1",""+i],["y1",""+t.y],["x2",""+i],["y2",""+(t.y+t.height)]])})),Be.setAttributes(this.cropShadeElement,[["d",Be.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,t.x,t.y,t.width,t.height)]]),this.topLeftGrip.setCenter(t.x,t.y),this.topRightGrip.setCenter(t.x+t.width,t.y),this.bottomLeftGrip.setCenter(t.x,t.y+t.height),this.bottomRightGrip.setCenter(t.x+t.width,t.y+t.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},e.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)},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.container.getBoundingClientRect();return{x:e-n.left+this.margin,y:t-n.top+this.margin}},e.prototype.onPointerDown=function(e){this.container.setPointerCapture(e.pointerId),this.previousPoint=this.clientToLocalCoordinates(e.clientX,e.clientY),this.cropRectElement===e.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(e.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(e.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(e.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(e.target)&&(this.activeGrip=this.bottomRightGrip)},e.prototype.onPointerMove=function(e){if(this.isMoving)this.move(this.clientToLocalCoordinates(e.clientX,e.clientY));else if(this.activeGrip){var t=this.clientToLocalCoordinates(e.clientX,e.clientY);this.resize(t)}e.preventDefault()},e.prototype.onPointerUp=function(e){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(e.pointerId)},e.prototype.move=function(e){var t=e.x-this.previousPoint.x,n=e.y-this.previousPoint.y;1!==this.zoomFactor&&(t=-t/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+t),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=e},e.prototype.resize=function(e){var t=Object.assign({},this.cropRect),n=e.x-this.previousPoint.x,r=e.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:t.x+nthis.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-t.width),t.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(t.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),t.height=this.aspectRatio.getVerticalLength(t.width)):(t.y+=r,t.height=this.cropRect.y+this.cropRect.height-t.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?t.height=this.aspectRatio.getVerticalLength(t.width):t.height+=r}t.width<10&&(t.x=this.cropRect.x,t.width=10),t.height<10&&(t.y=this.cropRect.y,t.height=10),this.previousPoint=e,t.x>=this.margin&&t.y>=this.margin&&t.x-this.margin+t.width<=this.canvasWidth&&t.y-this.margin+t.height<=this.canvasHeight&&(this.cropRect=t,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var e=this.cropRect.x+this.cropRect.width/2,t=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/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=e-this.cropRect.width/2,this.cropRect.y=t-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)}},e.prototype.getRescaledRect=function(e,t,n,r,i,o){var a=n/e,s=r/t;return{x:(i.x-o)*a+o,y:(i.y-o)*s+o,width:i.width*a,height:i.height*s}},e.prototype.scaleCanvas=function(e,t){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,e,t,this.cropRect,this.margin);this.canvasWidth=e,this.canvasHeight=t,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},e}(),Ze=function(){function e(e){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=e,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(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),e.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},e.prototype.onPointerDown=function(e){this.controlContainer.setPointerCapture(e.pointerId),this.isDragging=!0,this.previousPoint={x:e.clientX,y:e.clientY}},e.prototype.onPointerMove=function(e){this.isDragging&&(this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.previousPoint.x=e.clientX)},e.prototype.onPointerUp=function(e){this.isDragging&&this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(e.pointerId)},e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var e=this.angleLabelText.getBBox();Be.setAttributes(this.angleLabelElement,[["x",((this.width-e.width)/2).toString()],["y",(this.height/2).toString()]])}},e.prototype.positionScaleShape=function(){if(this.scaleShape){var e=this.scaleShape.transform.baseVal.getItem(0);e.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(e,0)}},e.prototype.getVisual=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("width",this.width+"px"),e.setAttribute("height",this.height+"px"),e.setAttribute("viewBox","0 0 "+this.width+" "+this.height),e.style.flexShrink="0",document.body.appendChild(e);for(var t="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;t+="h4v"+-r+"h1v"+r}t+="v1H0Z",this.scaleShape=Be.createPath(t);var i=Be.createTransform();this.scaleShape.transform.baseVal.appendItem(i),e.appendChild(this.scaleShape),this.angleLabelElement=Be.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Be.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var o=Be.createTSpan("");return o.innerHTML="°",this.angleLabelElement.appendChild(o),e.appendChild(this.angleLabelElement),document.body.removeChild(e),e},e}(),Qe=function(){function e(){this.naturalSize=!1,this.imageType="image/png"}return e.prototype.rasterize=function(e,t,n,r,i,o,a){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=e.width.baseVal.value-2*r,c.height=e.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=t.naturalWidth/(e.width.baseVal.value-2*r)/o,h=t.naturalHeight/(e.height.baseVal.value-2*r)/a,c.width=t.naturalWidth/o,c.height=t.naturalHeight/a):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(o,a),d.translate(-c.width/2,-c.height/2),d.drawImage(t,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},e}(),et=function(){function e(t){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=e.instanceCounter++,this.styles=new Fe(this.instanceNo),this.target=t,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(e){this._zoomToCropEnabled=e,e?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(e){this._gridLines=e,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(e){this._rotationAngle=e,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){var e;return null!==(e=this._aspectRatio)&&void 0!==e?e:this.aspectRatios[0]},set:function(e){this._aspectRatio=e},enumerable:!1,configurable:!0}),e.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(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},e.prototype.show=function(){this.showUI(),this.open()},e.prototype.close=function(e){void 0===e&&(e=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),e||this.closeEventListeners.forEach((function(e){return e()})),this._isOpen=!1)},e.prototype.addRenderEventListener=function(e){this.renderEventListeners.push(e)},e.prototype.removeRenderEventListener=function(e){this.renderEventListeners.indexOf(e)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(e),1)},e.prototype.addCloseEventListener=function(e){this.closeEventListeners.push(e)},e.prototype.removeCloseEventListener=function(e){this.closeEventListeners.indexOf(e)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(e),1)},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.contentDiv.clientWidth/e>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*e:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=t+2*this.CANVAS_MARGINe+this.CANVAS_MARGIN?this.target.offsetTop-(e+this.CANVAS_MARGIN):0;this.coverDiv.style.top=t+"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=void 0!==this.styles.settings.zIndex?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=void 0!==this.styles.settings.zIndex?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="popup"===this.displayMode?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,"popup"===this.displayMode&&(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","popup"===this.displayMode&&(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},e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},e.prototype.addTopToolbar=function(){var e=this;this.topToolbar=new ze,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 t=new Ve;t.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(t);var n=[];this.aspectRatios.forEach((function(t){var r=new We(Xe.getIcon(t.horizontal,t.vertical),0===t.horizontal&&0===t.vertical?"FREE":t.horizontal+":"+t.vertical);r.onClick=function(){return e.ratioButtonClicked(t)},n.push(r)})),this.aspectRatioButton=new Ye(Xe.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,t.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new We('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){e.isGridVisible=!e.isGridVisible,r.isActive=e.isGridVisible},t.addButton(r);var i=new We('',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){e.zoomToCropEnabled=!e.zoomToCropEnabled,i.isActive=e.zoomToCropEnabled},t.addButton(i),!Pe.isLicensed){var o=new Ke;this.topToolbar.addElementBlock(o);var a=document.createElement("div");a.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='',a.appendChild(s),o.addElement(a)}var l=new Ve;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new We('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new We('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},e.prototype.addBottomToolbar=function(){var e=this;this.bottomToolbar=new ze,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 t=new Ve;t.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(t);var n=new We('',"Rotate left");n.onClick=this.rotateLeftButtonClicked,t.addButton(n);var r=new We('',"Rotate right");r.onClick=this.rotateRightButtonClicked,t.addButton(r);var i=new Ke;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Ze("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(t){e.rotateBy(t),e.straightener.angle=e.rotationAngle},i.addElement(this.straightener.getUI());var o=new Ve;o.minWidth=2*this.toolbarHeight+"px",o.contentAlign="end",this.bottomToolbar.addButtonBlock(o);var a=new We('',"Flip horizontal");a.onClick=this.flipHorizontallyButtonClicked,o.addButton(a);var s=new We('',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,o.addButton(s)},e.prototype.ratioButtonClicked=function(e){this.aspectRatio=e,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Xe.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qe(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},e.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},e.prototype.restoreState=function(e){if(e){var t=this.cropLayer.getRescaledRect(e.width,e.height,this.imageWidth,this.imageHeight,e.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(t),this.cropRectChanged(t),this.flippedHorizontally=e.flippedHorizontally,this.flippedVertically=e.flippedVertically,this.applyFlip(),this.rotationAngle=e.rotationAngle,this.applyRotation()}},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.cropImage.getBoundingClientRect();return{x:e-n.left,y:t-n.top}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var e=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.rotateLeftButtonClicked=function(){var e=this.rotationAngle-90;this.rotationAngle%90!=0&&(e+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateRightButtonClicked=function(){var e=this.rotationAngle+90;this.rotationAngle%90!=0&&(e-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateTo=function(e){e=(e=e>180?e-360:e)<=-180?e+360:e,this.rotationAngle=e,this.applyRotation()},e.prototype.rotateBy=function(e){this.rotateTo((this.rotationAngle+e)%360)},e.prototype.applyRotation=function(){var e=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var t=this.editingTargetRotationContainer.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(t,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=e},e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},e.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,(function(){var e,t;return je(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return e=n.sent(),t=this.getState(),this.renderEventListeners.forEach((function(n){return n(e,t)})),this.close(!0),[2]}}))}))},e.prototype.render=function(){return Ne(this,void 0,void 0,(function(){var e;return je(this,(function(t){switch(t.label){case 0:return(e=new Qe).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.width=this.renderWidth,e.height=this.renderHeight,this.unzoomFromCrop(),Be.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,e.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 t.sent(),[4,e.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,t.sent()]}}))}))},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new He("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new He("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new He("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var e=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new He("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*e)+"px;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new He("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new He("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new He("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new He("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new He("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -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%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new He("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new He("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},e.instanceCounter=0,e}(),tt=n("8hTe"),nt=n.n(tt),rt=/]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.edit,d=void 0!==l&&l,f=e.className,p=e.showTextOnly,m=e.showLines,g=e.replaces,v=e.zoomImg,y=e.hasMask,E=e.style,S=void 0===E?{}:E,C=e.stylesPrev,k=void 0===C?{}:C,O=String(n),A=Object(u.useRef)(),L=Object(u.useRef)(),D=Object(u.useState)(""),R=Object(s.a)(D,2),F=R[0],U=R[1],H=Object(u.useState)("office"),z=Object(s.a)(H,2),G=z[0],V=z[1],W=Object(u.useMemo)((function(){try{O=(O=O.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+N.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+N.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+N.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,"\n")).replace(new RegExp("(?[TOC]
",w()),b()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,o=r.expression;return Object(j.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),T(),p){var n=document.createElement("div");return n.innerHTML=e,n.innerText}return setTimeout((function(){return X()}),500),e}),[O]),K=Object(u.useRef)();function q(e){var t=e.target;if("IMG"===t.tagName.toUpperCase()){if(v){var n=t.getAttribute("src");U(n),V("image")}}else if("A"===t.tagName.toUpperCase()){var r=t.getAttribute("href");if(r.indexOf("office")>-1)e.preventDefault(),U(r),V("office");else if(r.indexOf("application/pdf")>-1)e.preventDefault(),U(r),V("pdf");else if(r.indexOf("type=text")>-1)e.preventDefault(),U(r),V("html");else if(r.startsWith("#")){e.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}x.WebkitLineClamp=m,m&&(S=Object(o.a)(Object(o.a)({},S),x));var X=function(){var e,t=null===(e=K.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var t=new M.a;t.loadSource(e.src),t.attachMedia(e)}}))};Object(u.useEffect)((function(){if(K.current&&W&&W.match(rt)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),T(),b()}}),[W,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(o.a)({},S),className:"".concat(f||""," markdown-body ").concat(nt.a.mdBody),onMouseOver:function(e){d&&("IMG"===e.target.nodeName?(A.current.style.display="flex",A.current.style.width=e.target.clientWidth+"px",A.current.style.height=e.target.clientHeight+"px",A.current.style.top=e.target.offsetTop+"px",A.current.style.left=e.target.offsetLeft+"px",L.current.src=e.target.getAttribute("src")):A.current.style.display="none")},dangerouslySetInnerHTML:{__html:W}}),h.a.createElement("div",{ref:A,className:nt.a.button},h.a.createElement(r.a,null,h.a.createElement(i.a,{onClick:function(){return(e=new et(L.current)).displayMode="popup",e.addRenderEventListener(function(){var e=Object(a.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A.current.style.display="none",e.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t}});case 3:null!=(n=e.sent)&&n.id&&g(L.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),void e.show();var e}},"裁剪"),h.a.createElement(i.a,{onClick:function(){return(e=new Ie(L.current)).settings.displayMode="popup",e.addEventListener("render",function(){var e=Object(a.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A.current.style.display="none",!L.current){e.next=6;break}return e.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t.dataUrl}});case 4:null!=(n=e.sent)&&n.id&&g(L.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.show(),void(window.markerArea=e);var e}},"编辑"))),h.a.createElement("img",{ref:L,src:"https://ali-cdn.educoder.net/images/avatars/PortalImage/170?t=1659681136",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),h.a.createElement(P.a,{close:!0,data:F,hasMask:y,type:null!=F&&F.length?G:"",style:Object(o.a)({},k),onClose:function(){return U("")}}))}},"9OqN":
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-ctr.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),o.mode.CTR=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);n.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var o,a=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(a.nonce=null===(o=n.csp)||void 0===o?void 0:o.nonce);a.innerHTML=e;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(a):n.prepend&&l?s.insertBefore(a,l):s.appendChild(a),a}var a=new Map;function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!a.has(r)){var s=o("",n),l=s.parentNode;a.set(r,l),l.removeChild(s)}var c=Array.from(a.get(r).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(c){var u,h,d;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=n.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=n.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==e&&(c.innerHTML=e),c}var f=o(e,n);return f["rc-util-key"]=t,f}},Bd2K:
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closetag.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(a,s,l){if(l!=e.Init&&l&&a.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var a=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;cu.ch&&(m=m.slice(0,m.length-h.end+u.ch));var b=m.toLowerCase();if(!m||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&i(v,b)>-1||o(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],m,u,!0))return e.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&i(x,m)>-1)s[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var w=y&&i(y,b)>-1;s[c]={indent:w,text:">"+(w?"\n\n":"")+""+m+">",newPos:w?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var E="object"==typeof l&&l.dontIndentOnAutoClose;for(c=a.length-1;c>=0;c--){var S=s[c];r.replaceRange(S.text,a[c].head,a[c].anchor,"+insert");var C=r.listSelections().slice(0);C[c]={head:S.newPos,anchor:S.newPos},r.setSelections(C),!E&&S.indent&&(r.indentLine(S.newPos.line,null,!0),r.indentLine(S.newPos.line+1,null,!0))}}(r)}),a.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["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 r(t,n){for(var r=t.listSelections(),i=[],a=n?"/":"",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c"!=t.getLine(u.line).charAt(h.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var i=null;e.forEach((function(o,a){if(!o&&null!==i)return n.push("M".concat(i+t," ").concat(r+t,"h").concat(a-i,"v1H").concat(i+t,"z")),void(i=null);if(a!==e.length-1)o&&null===i&&(i=a);else{if(!o)return;null===i?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(i+t,",").concat(r+t," h").concat(a+1-i,"v1H").concat(i+t,"z"))}}))})),n.join("")}function S(e,t){return e.slice().map((function(e,n){return n=t.y+t.h?e:e.map((function(e,n){return(n=t.x+t.w)&&e}))}))}function C(e,t){var n=e.imageSettings,r=e.size,i=e.includeMargin;if(null==n)return null;var o=i?4:0,a=t.length+2*o,s=Math.floor(.1*r),l=a/r,c=(n.width||s)*l,u=(n.height||s)*l,h=null==n.x?t.length/2-c/2:n.x*l,d=null==n.y?t.length/2-u/2:n.y*l,f=null;if(n.excavate){var p=Math.floor(h),m=Math.floor(d);f={x:p,y:m,w:Math.ceil(c+h-p),h:Math.ceil(u+d-m)}}return{x:h,y:d,h:u,w:c,excavation:f}}var k=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),_=function(e){function t(){var e,n;l(this,t);for(var r=arguments.length,i=new Array(r),o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){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}}e.exports={defaults:{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},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=x(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(y,"$1")+t:e+t}function x(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:I(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,o,a,s,l,c=t[0],u=t[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,g=p.length,v=0;v1||this.options.smartLists&&i!==u)&&(o=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),v=g-1)),a=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),a||(a=m)),a&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):M(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=N(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a?(i=a[1],o=a[3]):o=""}else o=t[3]?t[3].slice(1,-1):"";return j(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return j(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=M(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=M(this.options.mangle?t(i[1]):i[1])):n=M(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=M(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=M(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):M(i[0]):i[0]:M(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),B=k,F=S,U=_,H={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=F(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=F(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=F(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=//,H.html=F(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=F(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=F(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=F(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=F(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:F("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:F(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,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:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};z.punctuation=F(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=F(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=F(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=F(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=F(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=F(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=F(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=F(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=F(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=F(z._blockSkip,"g").getRegex(),z.overlapSkip=F(z._overlapSkip,"g").getRegex(),z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,z._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])?)+(?![-_])/,z.autolink=F(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex(),z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,z.tag=F(z.tag).replace("comment",H._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=F(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=F(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=F(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=U({},z),z.pedantic=U({},z.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:F(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=U({},z.normal,{escape:F(z.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&&(n="x"+n.toString(16)),r+=""+n+";";return r}var Y=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||V,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:W.normal,inline:K.normal};this.options.pedantic?(t.block=W.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=W.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,o=t.prototype;return o.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,n,r))e=e.substring(o.raw.length),n=o.inLink,r=o.inRawBlock,t.push(o);else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.strong(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.em(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.autolink(e,X))e=e.substring(o.raw.length),t.push(o);else if(n||!(o=this.tokenizer.url(e,X))){if(o=this.tokenizer.inlineText(e,r,q))e=e.substring(o.raw.length),i=o.raw.slice(-1),t.push(o);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(o.raw.length),t.push(o);return t},n=t,i=[{key:"rules",get:function(){return{block:W,inline:K}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),$=r.defaults,J=C,Z=w,Q=function(){function e(e){this.options=e||$}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?''+(n?e:Z(e,!0))+"
\n":""+(n?e:Z(e,!0))+"
\n"},t.blockquote=function(e){return"\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+""+r+">\n"},t.listitem=function(e){return""+e+"\n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return""+e+"
\n"},t.table=function(e,t){return t&&(t=""+t+""),"\n"},t.tablerow=function(e){return"\n"+e+"
\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+""+n+">\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
":"
"},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"+n+""},t.image=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=r.defaults,re=E,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b,x="",w=e.length;for(n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1An error occurred:"+se(e.message+"",!0)+"
";throw e}}return he.options=he.setOptions=function(e){return oe(he.defaults,e),ce(he.defaults),he},he.getDefaults=le,he.defaults=ue,he.use=function(e){var t=oe({},e);if(e.renderer&&function(){var n=he.defaults.renderer||new Q,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=h,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=h,i[6]^=u,i[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},ELLl:
/*!*************************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closebrackets.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),c=0;c=0;c--){var h=a[c].head;t.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a1&&d.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;v="addFour"}else if(f){var w=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return e.Pass;v="both"}else v=f&&c(t,b)?"both":d.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var E=l%2?a.charAt(l-1):i,S=l%2?i:a.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(E+S,null),t.triggerElectric(E+S),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(E+E+E+E,"before"),t.execCommand("goCharRight"));var o,a}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},ELcG:
/*!*********************************************!*\
!*** ./node_modules/crypto-js/ripemd160.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),
/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,f,x,w,E,S,C,k,_,T,O=this._hash.words,A=h.words,L=d.words,D=s.words,I=l.words,R=c.words,M=u.words;for(E=o=O[0],S=a=O[1],C=f=O[2],k=x=O[3],_=w=O[4],n=0;n<80;n+=1)T=o+e[t+D[n]]|0,T+=n<16?p(a,f,x)+A[0]:n<32?m(a,f,x)+A[1]:n<48?g(a,f,x)+A[2]:n<64?v(a,f,x)+A[3]:y(a,f,x)+A[4],T=(T=b(T|=0,R[n]))+w|0,o=w,w=x,x=b(f,10),f=a,a=T,T=E+e[t+I[n]]|0,T+=n<16?y(S,C,k)+L[0]:n<32?v(S,C,k)+L[1]:n<48?g(S,C,k)+L[2]:n<64?m(S,C,k)+L[3]:p(S,C,k)+L[4],T=(T=b(T|=0,M[n]))+_|0,E=_,_=k,k=b(C,10),C=S,S=T;T=O[1]+f+k|0,O[1]=O[2]+x+_|0,O[2]=O[3]+w+E|0,O[3]=O[4]+o+S|0,O[4]=O[0]+a+C|0,O[0]=T},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function b(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(Math),r.RIPEMD160)},ETIr:
/*!**********************************************!*\
!*** ./node_modules/crypto-js/enc-base64.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),i=(r=o).lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o>>6-a%4*2,c=s|l;r[o>>>2]|=c<<24-o%4*8,o++}return i.create(r,o)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},"F+F2":
/*!***************************************************!*\
!*** ./node_modules/crypto-js/lib-typedarrays.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e}}(),r.lib.WordArray)},GRO8:
/*!**************************************************************!*\
!*** ./src/pages/Competitions/Detail/index.tsx + 21 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/LeftOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/RightOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/component/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/components/AppplyDepartmentModal/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/components/AppplySchoolModal/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/AuthenticationModel/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/UploadFile/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/competitions.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/cityData.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/verifyLogin.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/account/auth.png (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/account/job.png (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/auto-complete/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/auto-complete/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/card/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/card/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/carousel/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/carousel/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/md5/md5.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);var r=n("k1fw"),i=(n("2qtc"),n("kLXV")),o=(n("lUTK"),n("BvKs")),a=(n("+L6B"),n("2/Rp")),s=(n("T2oS"),n("W9HT")),l=(n("sPJy"),n("bE4q")),c=(n("miYZ"),n("tsqr")),u=n("9og8"),h=n("tJVT"),d=n("PpiC"),f=n("WmNS"),p=n.n(f),m=n("q1tI"),g=n.n(m),v=n("Ty5D"),y=n("55Ip"),b=n("9kvl"),x=n("KeDT"),w=n.n(x),E=n("zrhs"),S=(n("DZo9"),n("8z0m")),C=n("LtfV"),k=n("KhGG"),_=S.a.Dragger,T=Object(b.a)((function(e){return{user:e.user,classroomList:e.classroomList,shixunsDetail:e.shixunsDetail}}))((function(e){var t=e.user,n=e.dispatch,r=(e.classroomList,e.shixunsDetail),o=e.getResults,a=(Object(v.i)(),Object(m.useState)()),s=Object(h.a)(a,2),l=(s[0],s[1],Object(m.useState)([])),d=Object(h.a)(l,2),f=d[0],y=d[1],b=Object(m.useState)(!1),x=Object(h.a)(b,2),w=x[0],E=x[1],S={onRemove:function(){y([])},beforeUpload:function(e){if(console.log(e),(null==e?void 0:e.size)>524288e3)return c.b.info("文件超过500M,不符合上传要求"),!1;var t=[];return t.push(e),y([].concat(t)),!1},fileList:f};return g.a.createElement(i.a,{title:"提交文件",visible:"md-tab"===r.actionTabs.key,confirmLoading:w,onOk:Object(u.a)(p.a.mark((function e(){var i,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==f?void 0:f.length)<=0)){e.next=3;break}return c.b.info("请先选择文件"),e.abrupt("return");case 3:return E(!0),e.next=6,Object(k.c)(f[0],{login:null===(i=t.userInfo)||void 0===i?void 0:i.login,container_type:"Competition",container_id:r.actionTabs.params.id,stage_type:r.actionTabs.params.value,file_name:null===(a=f[0])||void 0===a?void 0:a.name});case 6:0===(null==(s=e.sent)?void 0:s.status)?(c.b.info("提交成功"),n({type:"shixunsDetail/setActionTabs",payload:{key:""}}),E(!1),y([]),o(r.actionTabs.params.value)):(E(!1),c.b.info("提交失败"));case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){y([]),n({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},g.a.createElement(_,S,g.a.createElement("p",{className:"ant-upload-drag-icon"},g.a.createElement(C.a,null)),g.a.createElement("p",{className:"ant-upload-hint"},"拖拽文件或者点击上传")))})),O=(n("14J3"),n("BMrR")),A=(n("5NDa"),n("5rEg")),L=n("9Bee"),D=n("m3rI"),I=n("ErOA"),R=n("NLgs"),M=(n("fV52"),n("3I+P")),N=(n("OaEy"),n("2fM7")),j=n("5bA4"),P=n("UESt"),B=N.a.Option;var F=function(e){var t=e.rewarddata,n=e.getlistdatas,r=e.is_signed,o=e.dispatch,a=e.userlist,s=Object(m.useRef)(null),l=Object(m.useState)(!1),d=Object(h.a)(l,2),f=d[0],v=d[1],y=Object(m.useState)(void 0),b=Object(h.a)(y,2),x=b[0],E=b[1],S=Object(m.useState)(""),C=Object(h.a)(S,2),k=C[0],_=C[1],T=Object(m.useState)(void 0),O=Object(h.a)(T,2),L=O[0],I=O[1],F=Object(m.useState)(void 0),U=Object(h.a)(F,2),H=U[0],z=U[1],G=Object(m.useState)(void 0),V=Object(h.a)(G,2),W=V[0],K=V[1];function q(e){return X.apply(this,arguments)}function X(){return(X=Object(u.a)(p.a.mark((function e(t){var i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.user_received){e.next=3;break}return window.open(t.click_info),e.abrupt("return");case 3:if(Object(R.f)(o)){e.next=5;break}return e.abrupt("return");case 5:if(!1!==r){e.next=8;break}return c.b.info("您尚未报名参赛,请报名参赛后领取"),e.abrupt("return");case 8:if("Pop"!==t.click_event){e.next=14;break}return _(t.id),v(!0),e.abrupt("return");case 14:E(void 0);case 15:return e.next=17,o({type:"competitions/Reward",payload:{competition_module_setting_id:t.id}});case 17:(i=e.sent)&&0===i.status&&(n(),"Link"===t.click_event?(c.b.info("领取成功"),window.open(t.click_info)):c.b.info(t.click_info));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a||a.real_name){e.next=4;break}if(L){e.next=4;break}return c.b.info("姓名不能为空"),e.abrupt("return");case 4:if(!a||a.email){e.next=8;break}if(H){e.next=8;break}return c.b.info("邮箱不能为空"),e.abrupt("return");case 8:if(!a||a.phone){e.next=12;break}if(W){e.next=12;break}return c.b.info("手机号码不能为空"),e.abrupt("return");case 12:if(x){e.next=15;break}return c.b.info("请选择你的年级"),e.abrupt("return");case 15:return e.next=17,o({type:"competitions/Reward",payload:{competition_module_setting_id:k,className:x,name:L,mail:H,phone:W}});case 17:(t=e.sent)&&0===t.status&&(v(!1),n(),c.b.info("HCIA认证考试代金劵将由Educoder平台统一发放,请及时关注邮箱或站内短信查收"));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",null,g.a.createElement(i.a,{visible:f,title:"完善信息",onCancel:function(){return v(!1)},onOk:function(){!function(){Y.apply(this,arguments)}()}},g.a.createElement("p",null,"您的姓名:",g.a.createElement(A.a,{className:a&&a.real_name?"":w.a.bkfff,style:{width:"300px",marginLeft:"14px",background:a&&a.phone?"":"#ffffff!important"},value:a&&a.real_name||L,disabled:a&&a.real_name||!1,onChange:function(e){return I(e.target.value)}})),g.a.createElement("p",{style:{marginTop:"1em"}},"您的邮箱:",g.a.createElement(A.a,{className:a&&a.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:a&&a.phone?"":"#ffffff!important"},value:a&&a.email||H,disabled:a&&a.email||!1,onChange:function(e){return z(e.target.value)}})),g.a.createElement("p",{style:{marginTop:"1em"}},"您的手机号:",g.a.createElement(A.a,{style:{width:"300px"},className:a&&a.phone?"":"bkfff",value:a&&a.phone||W,disabled:a&&a.phone||!1,onChange:function(e){return K(e.target.value)}})),"您的年级:",g.a.createElement(N.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(e){E(e)}},g.a.createElement(B,{value:"大一"},"大一"),g.a.createElement(B,{value:"大二"},"大二"),g.a.createElement(B,{value:"大三"},"大三"),g.a.createElement(B,{value:"大四"},"大四"),g.a.createElement(B,{value:"大五"},"大五"),g.a.createElement(B,{value:"硕一"},"硕一"),g.a.createElement(B,{value:"硕二"},"硕二"),g.a.createElement(B,{value:"硕三"},"硕三"),g.a.createElement(B,{value:"博一"},"博一"),g.a.createElement(B,{value:"博二"},"博二"),g.a.createElement(B,{value:"博三"},"博三"),g.a.createElement(B,{value:"博四"},"博四"),g.a.createElement(B,{value:"博五"},"博五")),g.a.createElement("p",{style:{marginTop:"1em"}},"提醒:如无华为云账号,请尽快注册华为云!")),t&&t.length>3?g.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},g.a.createElement("span",{className:w.a.spanprev,onClick:function(){s.current.prev()}},g.a.createElement(j.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),g.a.createElement(M.a,{ref:s,className:w.a.divwidth,slidesToShow:3,slidesToScroll:1},t&&t.map((function(e,t){return g.a.createElement("div",{style:{textAlign:"center",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/".concat(e.image_url)}),!1===e.user_received||"Link"===e.click_event?g.a.createElement("p",{className:w.a.receiveclick,onClick:function(){return q(e)}},"点击领取"):g.a.createElement("p",{className:w.a.receivealready},"已经领取"))}))),g.a.createElement("span",{className:w.a.spannext,onClick:function(){s.current.next()}},g.a.createElement(P.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):g.a.createElement("div",{className:w.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},t&&t.map((function(e,t){return g.a.createElement("div",{style:{textAlign:"center",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/".concat(e.image_url)}),!1===e.user_received||"Link"===e.click_event?g.a.createElement("p",{className:w.a.receiveclick,onClick:function(){return q(e)}},"点击领取"):g.a.createElement("p",{className:w.a.receivealready},"已经领取"))}))))},U=function(e,t){var n=e.StaffDetail,o=e.HeaderDetail,s=e.ItemData,l=e.setIssee,d=e.ModelType,f=e.dispatch,y=e.userinfo,b=e.Editable,x=Object(m.useState)(!1),w=Object(h.a)(x,2),E=w[0],C=w[1],k=Object(m.useState)([]),_=Object(h.a)(k,2),T=_[0],M=_[1],N=Object(m.useState)(""),j=Object(h.a)(N,2),P=j[0],B=j[1],U=Object(m.useState)(""),H=Object(h.a)(U,2),z=H[0],G=H[1],V=Object(m.useState)(!1),W=Object(h.a)(V,2),K=W[0],q=W[1],X=Object(v.i)().identifier,Y=Object(m.useRef)(null),$=Object(m.useRef)(null);Y.current=null==n?void 0:n.enrolled,Object(m.useEffect)((function(){var e;return null===(e=$.current)||void 0===e||e.addEventListener("click",J),function(){var e;null===(e=$.current)||void 0===e||e.removeEventListener("click",J)}}),[]);var J=function(e){var t;if("modal-upload"===(null==e||null===(t=e.target)||void 0===t?void 0:t.id)){if(!Object(R.e)(f))return;if(!Y.current)return void i.a.info({title:"提示",centered:!0,okText:"我知道了",content:"请先报名,再提交作品"});C(!0)}};Object(m.useEffect)((function(){var e,t,n;null!=o&&o.upload_file&&(M([{name:null==o||null===(e=o.upload_file)||void 0===e?void 0:e.title,status:"done",uid:"123456789"}]),G(null==o?void 0:o.upload_file_url),B(null==o||null===(t=o.upload_file)||void 0===t||null===(n=t.url)||void 0===n?void 0:n.split("/")[3]))}),[null==o?void 0:o.upload_file]);var Z={name:"file",multiple:!1,withCredentials:!0,action:D.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:T,onChange:function(e){var t,n,i=e.file.status,o=[Object(r.a)({},e.file)];(M(o),"uploading"===e.file.status&&q(!0),"done"===i)&&(B(null===(t=o[0])||void 0===t||null===(n=t.response)||void 0===n?void 0:n.id),q(!1));"error"===i&&(M([]),q(!1))},beforeUpload:function(e){return e.size/1024/1024<1e3?Promise.resolve():(c.b.info("文件大小必须小于1000MB"),Promise.reject())}},Q=function(){C(!0)};return Object(m.useImperativeHandle)(t,(function(){return{handleVisible:Q}})),g.a.createElement("div",{ref:$},"reward"===d?g.a.createElement(F,{userlist:y,dispatch:f,rewarddata:s.reward_setting,is_signed:s.is_signed}):null,g.a.createElement("div",{style:{textAlign:"right"}},((null==y?void 0:y.admin)||(null==y?void 0:y.business)||b)&&g.a.createElement(a.a,{onClick:function(){return l(!1)}},"编辑")),g.a.createElement(L.a,{value:s.md_content}),s&&s.attachments&&s.attachments.map((function(e,t){return g.a.createElement("div",null,g.a.createElement("a",{href:(null===D.a||void 0===D.a?void 0:D.a.API_SERVER)+e.url,target:"_self",download:e.title},g.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),g.a.createElement("span",{style:{color:"#000000"}},e.title),g.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},e.filesize)))})),g.a.createElement(i.a,{centered:!0,title:"上传作品",visible:E,okText:"提交作品",cancelText:"取消",confirmLoading:K,onCancel:function(){return C(!1)},onOk:Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P||z){e.next=3;break}return C(!1),e.abrupt("return");case 3:return q(!0),e.next=6,Object(I.a)("/api/competitions/".concat(X,"/upload_file.json"),{method:"post",body:{attachment_id:P,upload_file_url:z}});case 6:0===e.sent.status&&(C(!1),q(!1));case 8:case"end":return e.stop()}}),e)})))},g.a.createElement("div",null,g.a.createElement(O.a,{align:"middle",className:"mb20"},g.a.createElement("span",null,"作品链接:"),g.a.createElement(A.a,{style:{width:416},value:z,onChange:function(e){var t;return G(null===(t=e.target)||void 0===t?void 0:t.value)}})),g.a.createElement(O.a,{align:"top"},g.a.createElement("span",{style:{lineHeight:"28px"}},"作品文件:"),g.a.createElement(S.a,Z,g.a.createElement(a.a,{type:"primary",className:"mb10"},"上传作品"))))))},H=Object(m.forwardRef)(U),z=n("Ot1p"),G=n("hJwl");var V=function(e){var t=e.ItemData,n=e.setIssee,r=e.MenuItem,i=e.dispatch,o=e.identifier,s=e.ModelType,l=e.userinfo,d=e.getrightdatas,f=Object(m.useState)([]),v=Object(h.a)(f,2),y=v[0],b=v[1],x=Object(m.useState)(t.md_content),w=Object(h.a)(x,2),E=w[0],C=w[1];Object(m.useEffect)((function(){var e,n=[];null==t||null===(e=t.attachments)||void 0===e||e.map((function(e){var t={uid:e.id,name:e.title,response:{id:e.id}};n.push(t)})),b(n)}),[null==t?void 0:t.attachments]);var k={name:"file",multiple:!0,withCredentials:!0,action:D.a.API_SERVER+"/api/attachments.json",defaultFileList:function(){var e,n=[];return null==t||null===(e=t.attachments)||void 0===e||e.map((function(e){var t={uid:null==e?void 0:e.id,name:e.title,response:{id:e.id}};n.push(t)})),n}(),onRemove:function(e){Object(G.t)({id:e.uid})},onChange:function(e){var t=e.file.status;"removed"===t&&b(e.fileList),"done"===t?(b(e.fileList),c.b.success("".concat(e.file.name," 文件上传成功"))):"error"===t&&c.b.error("".concat(e.file.name," 文件上传失败"))},beforeUpload:function(e){var t=e.size/1024/1024<150;return t||c.b.info("文件大小必须小于150MB"),t}};function _(){return(_=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"competitions/updateMdContent",payload:{attachment_ids:T(y),competition_module_id:t.id,md_content_id:t.md_id,content:E,identifier:o}});case 2:e.sent&&(c.b.info("提交成功"),n(!0),d(r));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){var t=[];return e&&e.map((function(e){t.push(e.response.id)})),t}return console.log(k),g.a.createElement("div",null,"reward"===s?g.a.createElement(F,{userlist:l,dispatch:i,rewarddata:t.reward_setting,is_signed:t.is_signed}):null,g.a.createElement(z.a,{defaultValue:E,onChange:function(e){return C(e)}}),g.a.createElement(S.a,k,g.a.createElement(a.a,{className:"uploadBtn"},"上传附件"),"(单个文件150M以内)"),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return _.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return n(!0)}},"取消")))},W=(n("g9YV"),n("wCAj")),K=(n("Znn+"),n("ZTPi"));var q=function(){return g.a.createElement("div",null,g.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"总排行"),g.a.createElement("div",{style:{textAlign:"center"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),g.a.createElement("p",null,"要抓住一切机会,向所有人证明自己,证明你能够迎接荣耀")))},X=(n("5Dmo"),n("3S7+")),Y=(n("jCWc"),n("kPKH")),$=(n("IzEo"),n("bx4M"));var J=function(e){var t=e.oneItem,n=e.towItem,r=e.threeItem;return g.a.createElement("div",{style:{textAlign:"center"}},g.a.createElement(O.a,{gutter:16,style:{justifyContent:"center"}},g.a.createElement(Y.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.towtop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==n?void 0:n.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==n?void 0:n.user_image)}),(null==n?void 0:n.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==n?void 0:n.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==n?void 0:n.record_user_name)))),className:w.a.towdiv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==n?void 0:n.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==n?void 0:n.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==n?void 0:n.extra_score)+parseFloat(null==n?void 0:n.score),"分"))),g.a.createElement(Y.a,{span:6},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.onetop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==t?void 0:t.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==t?void 0:t.user_image)}),(null==t?void 0:t.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==t?void 0:t.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==t?void 0:t.record_user_name)))),className:w.a.onediv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==t?void 0:t.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==t?void 0:t.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==t?void 0:t.extra_score)+parseFloat(null==t?void 0:t.score),"分"))),g.a.createElement(Y.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.threetop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==r?void 0:r.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==r?void 0:r.user_image)}),(null==r?void 0:r.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==r?void 0:r.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==r?void 0:r.record_user_name)))),className:w.a.threediv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==r?void 0:r.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==r?void 0:r.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==r?void 0:r.extra_score)+parseFloat(null==r?void 0:r.score),"分")))))};var Z=function(e){var t,n,r,i,o,a,s,l,c,u,h,d,f,p,m,v,b,x,E,S,C,k,_,T,O,A,L,I,R,M,N=e.ItemData;return g.a.createElement("div",null,g.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"总排行"),g.a.createElement(J,{oneItem:null==N?void 0:N.teams[0],towItem:null==N?void 0:N.teams[1],threeItem:null==N?void 0:N.teams[2]}),(null==N||null===(t=N.user_ranks)||void 0===t?void 0:t.length)>0&&g.a.createElement("div",{className:w.a.myTeam},!1===(null==N||null===(n=N.user_ranks)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.success)?g.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},g.a.createElement("p",{style:{marginBottom:"0px"}}," 是否晋级:",g.a.createElement("span",{style:{color:!1===(null==N||null===(i=N.user_ranks)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.success)?"red":"green"}},!1===(null==N||null===(a=N.user_ranks)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.success)?"否":null!=N&&null!==(l=N.user_ranks)&&void 0!==l&&null!==(c=l[0])&&void 0!==c&&c.success?"是":"")),(null==N||null===(u=N.user_ranks)||void 0===u||null===(h=u[0])||void 0===h?void 0:h.awards)&&g.a.createElement("p",{style:{marginBottom:"0px"}}," 是否获奖:",g.a.createElement("span",null,"percent_20"===(null==N||null===(d=N.user_ranks)||void 0===d||null===(f=d[0])||void 0===f?void 0:f.awards)?"二等奖":"percent_30"===(null==N||null===(p=N.user_ranks)||void 0===p||null===(m=p[0])||void 0===m?void 0:m.awards)?"三等奖":"没有获得奖项"))):g.a.createElement("span",{style:{marginRight:"70px"}},"我的排名:",null==N||null===(v=N.user_ranks)||void 0===v||null===(b=v[0])||void 0===b?void 0:b.rank),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"战队名"},null==N||null===(x=N.user_ranks)||void 0===x||null===(E=x[0])||void 0===E?void 0:E.team_name)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"时间"},null==N||null===(S=N.user_ranks)||void 0===S||null===(C=S[0])||void 0===C?void 0:C.cost_time)),g.a.createElement("span",{style:{flex:1,textAlign:"center"}},g.a.createElement(X.a,{title:"赋能赛加分"},null==N||null===(k=N.user_ranks)||void 0===k||null===(_=k[0])||void 0===_?void 0:_.extra_score)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"比赛成绩"},null==N||null===(T=N.user_ranks)||void 0===T||null===(O=T[0])||void 0===O?void 0:O.score)),g.a.createElement("span",null,g.a.createElement(X.a,{title:"总分"},parseFloat(null==N||null===(A=N.user_ranks)||void 0===A||null===(L=A[0])||void 0===L?void 0:L.extra_score)+parseFloat(null==N||null===(I=N.user_ranks)||void 0===I||null===(R=I[0])||void 0===R?void 0:R.score)||0))),null==N||null===(M=N.teams)||void 0===M?void 0:M.map((function(e,t){return g.a.createElement("div",{className:w.a.bottomItem},g.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},t+1),g.a.createElement(y.a,{to:"/users/".concat(null==e?void 0:e.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==e?void 0:e.user_image)}),(null==e?void 0:e.competition_prize)&&g.a.createElement("span",{className:w.a.spanrightradius},null==e?void 0:e.competition_prize)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"战队名"},null==e?void 0:e.team_name)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"单位/学校名"},e.school_name)),g.a.createElement("span",{style:{flex:1,textAlign:"center"}},g.a.createElement(X.a,{title:"赋能赛加分"},e.extra_score)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"比赛成绩"},e.score)),g.a.createElement("span",{style:{color:"#0152d9"}},g.a.createElement(X.a,{title:"总分"},parseFloat(e.extra_score)+parseFloat(e.score))))})))},Q=K.a.TabPane;var ee=function(e){var t,n,r,i,o,s,l=e.ChartRules,d=e.ItemData,f=e.getCharts,y=e.Selectkey,b=e.getChartRules,x=e.userinfo,E=e.Editable,S=e.HeaderDetail,C=Object(m.useState)(!1),k=Object(h.a)(C,2),_=k[0],T=k[1],O=Object(m.useState)(""),A=Object(h.a)(O,2),R=A[0],M=A[1],N=Object(m.useState)(!0),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],G=U[1],V=Object(m.useState)(),X=Object(h.a)(V,2),Y=X[0],$=X[1],J=Object(v.i)().identifier;function ee(){return(ee=Object(u.a)(p.a.mark((function e(){var t,n,r,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=3;break}return c.b.info("内容不能为空"),e.abrupt("return");case 3:if(B(!1),!(t=null==H?void 0:H.id)){e.next=12;break}return e.next=8,Object(I.a)("/api/competitions/".concat(J,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(n=l.rule_contents)||void 0===n||null===(r=n.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(t)})))||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id,stage_id:null==H?void 0:H.id}});case 8:0===e.sent.status&&(c.b.info("更新成功"),T(!1),b()),e.next=16;break;case 12:return e.next=14,Object(I.a)("/api/competitions/".concat(J,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.id,stage_id:null==H?void 0:H.id}});case 14:0===e.sent.status&&(c.b.info("更新成功"),T(!1),b());case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(m.useEffect)((function(){if(P){var e,t,n,r,i,o,a,s=null==l||null===(e=l.stages)||void 0===e?void 0:e[0];if(G(s),null!=s&&s.id)"mAP"!==(null==S?void 0:S.task)&&"dog"!==(null==S?void 0:S.task)||f(null==s?void 0:s.id),M((null===(t=l.rule_contents)||void 0===t||null===(n=t.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==s?void 0:s.id)})))||void 0===n||null===(r=n[0])||void 0===r?void 0:r.content)||"");else"mAP"===(null==S?void 0:S.task)||null==S||S.task,M((null===(i=l.rule_contents)||void 0===i||null===(o=i.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===o||null===(a=o[0])||void 0===a?void 0:a.content)||"")}}),[l]);var te=[{title:"排名",dataIndex:"name",align:"center",key:"name",render:function(e,t,n){return g.a.createElement("span",null,n+1)}},{title:"头像",dataIndex:"user_image",align:"center",key:"user_image",render:function(e){return g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(e)})}},{title:"战队名称",dataIndex:"team_name",key:"team_name",render:function(e){return g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=15?(null==e?void 0:e.substr(0,15))+"...":e||"--")}},{title:"单位",dataIndex:"school_name",key:"school_name",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},{title:"mAP"===(null==S?void 0:S.task)?"mAP指标":"Jittor-3"===(null==S?void 0:S.task)?"总分":"top1指标",dataIndex:"score",key:"score",render:function(e){return g.a.createElement("span",null,e||"--")}}];return g.a.createElement("div",null,(null==l||null===(t=l.stages)||void 0===t?void 0:t.length)>0?null:g.a.createElement(q,null),(null==l||null===(n=l.stages)||void 0===n?void 0:n.length)>0&&g.a.createElement(K.a,{animated:!0,tabBarExtraContent:((null==x?void 0:x.admin)||(null==x?void 0:x.business)||E)&&g.a.createElement(a.a,{onClick:function(){T(!0)}},"编辑"),onChange:function(e){var t,n,r,i,o;T(!1);var a=null==l||null===(t=l.stages)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];G(a);var s=null==a||null===(n=a.children)||void 0===n?void 0:n[0];$(s),M((null===(r=l.rule_contents)||void 0===r||null===(i=r.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==a?void 0:a.id)})))||void 0===i||null===(o=i[0])||void 0===o?void 0:o.content)||""),f((null==s?void 0:s.id)||e)}},l&&l.stages.map((function(e,t){return g.a.createElement(Q,{tab:e.name,key:null===e.id?0:e.id},!1===_&&l&&l.rule_contents.map((function(t,n){return e.id===t.competition_stage_id||null===e.id&&0===t.competition_stage_id?g.a.createElement(L.a,{key:n,value:void 0===t.content||null===t.content?"":t.content}):void 0})))}))),(null==H||null===(r=H.children)||void 0===r?void 0:r.length)>0&&g.a.createElement(K.a,{activeKey:(null==Y?void 0:Y.id)+"",onChange:function(e){var t,n=null==H||null===(t=H.children)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];$(n),f(e)}},null==H||null===(i=H.children)||void 0===i?void 0:i.map((function(e,t){return g.a.createElement(Q,{tab:e.name,key:null===e.id?0:e.id})}))),_&&g.a.createElement("div",null,g.a.createElement(z.a,{defaultValue:R,onChange:function(e){M(e)}}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return ee.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return T(!1)}},"取消"))),(null==d||null===(o=d.teams)||void 0===o?void 0:o.length)>0&&("mAP"===(null==S?void 0:S.task)||"dog"===(null==S?void 0:S.task)||"Jittor-3"===(null==S?void 0:S.task))?g.a.createElement(W.a,{dataSource:null==d?void 0:d.teams,columns:te,pagination:!1}):(null==d||null===(s=d.teams)||void 0===s?void 0:s.length)>0&&g.a.createElement(Z,{ItemData:d}))},te=(n("/zsF"),n("PArb"));var ne=function(e){var t,n,r,i,o,s,l,c=e.Prize,d=Object(v.i)(),f=Object(m.useState)([{type:1,name:"团体奖证书"},{type:2,name:"个人奖证书"},{type:3,name:"优秀指导教师证书"}]),y=Object(h.a)(f,2),b=y[0],x=(y[1],function(){var e=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(G.u)({type:t.type,id:d.identifier});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(location.href="/competitions/exports?id=".concat(d.identifier,"&type=").concat(t.type));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());return g.a.createElement("div",null,g.a.createElement("p",{className:w.a.downloadpdf},"温馨提示:填写的个人信息经审批后,将提供个人获奖证书下载;团队队员信息全部审批后,将提供团队获奖证书下载。"),g.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"证书情况"),(null==c||null===(t=c.personal_certifications)||void 0===t?void 0:t.length)>0?g.a.createElement("p",null,g.a.createElement("span",null,"个人证书:"),g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/pdfs.png"}),g.a.createElement("a",{style:{marginLeft:"5px"},href:D.a.API_SERVER+"".concat(null==c||null===(n=c.personal_certifications[0])||void 0===n?void 0:n.url)},"立即下载")):g.a.createElement("p",null,g.a.createElement("span",null,"个人证书:")," ",g.a.createElement("span",{style:{color:"#000"}},"暂未生成"),g.a.createElement("span",{style:{marginLeft:"20px"}},"原因:")," ",g.a.createElement("span",{style:{color:"#000"}},"组委会未完成证书审批,请稍后")),(null==c||null===(r=c.team_certifications)||void 0===r?void 0:r.length)>0?g.a.createElement("p",null,g.a.createElement("span",null,"团队证书:"),g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/pdfs.png"}),g.a.createElement("a",{style:{marginLeft:"5px"},href:D.a.API_SERVER+"".concat(null==c||null===(i=c.team_certifications[0])||void 0===i?void 0:i.url)},"立即下载")):g.a.createElement("p",null,g.a.createElement("span",null,"团队证书:")," ",g.a.createElement("span",{style:{color:"#000"}},"暂未生成")),g.a.createElement(te.a,null),(null==c||null===(o=c.teams)||void 0===o?void 0:o.length)>0?g.a.createElement("div",null,g.a.createElement("p",null,(null==c?void 0:c.teams)&&(null==c||null===(s=c.teams[0])||void 0===s?void 0:s.name),"战队信息填报概况"),g.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},g.a.createElement("span",{style:{width:"5%"}},"角色"),g.a.createElement("span",{style:{width:"5%"}},"姓名"),g.a.createElement("span",{style:{width:"10%"}},"实名认证"),g.a.createElement("span",{style:{width:"10%"}},"职业认证"),g.a.createElement("span",{style:{width:"10%"}},"手机绑定"),g.a.createElement("span",{style:{width:"10%"}},"邮箱绑定"),g.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"开户行及银行卡号信息(队长填写)")),(null==c?void 0:c.teams)&&(null==c||null===(l=c.teams[0])||void 0===l?void 0:l.team_members.map((function(e,t){var n,r,i,o,a,s;return g.a.createElement("p",{className:w.a.teamItem},g.a.createElement("span",{style:{width:"5%"}},null==e?void 0:e.role),g.a.createElement("span",{style:{width:"5%"}},null==e?void 0:e.name),g.a.createElement("span",{style:{width:"10%"}},"authed"===(null==e?void 0:e.real_name_auth)?"已认证":"authing"===(null==e?void 0:e.real_name_auth)?"待审核":"未认证"),g.a.createElement("span",{style:{width:"10%"}},"authed"===(null==e?void 0:e.professional_auth)?"已认证":"authing"===(null==e?void 0:e.professional_auth)?"待审核":"未认证"),g.a.createElement("span",{style:{width:"10%"}},null!=e&&e.phone_binded?"已绑定":"未绑定"),g.a.createElement("span",{style:{width:"10%"}},null!=e&&e.email_binded?"已绑定":"未绑定"),"队长"===(null==e?void 0:e.role)?g.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(null==c?void 0:c.teams)&&(null==c||null===(n=c.teams[0])||void 0===n||null===(r=n.bank_account)||void 0===r?void 0:r.bank),(null==c?void 0:c.teams)&&(null==c||null===(i=c.teams[0])||void 0===i||null===(o=i.bank_account)||void 0===o?void 0:o.second_bank),(null==c?void 0:c.teams)&&(null==c||null===(a=c.teams[0])||void 0===a||null===(s=a.bank_account)||void 0===s?void 0:s.card_no)):g.a.createElement("span",{style:{width:"50%"}}))})))):null,g.a.createElement(O.a,{gutter:[20,20]},b.map((function(e,t){return g.a.createElement(Y.a,{key:t},g.a.createElement(a.a,{type:"primary",onClick:function(){return x(e)}},e.name))}))))},re=n("0Owb"),ie=(n("7Kak"),n("9yH6")),oe=(n("y8nQ"),n("Vl3Y")),ae=n("1vsH"),se=n("Dgm7"),le=n.n(se),ce=n("NnUe"),ue=n.n(ce),he=S.a.Dragger,de=Object(b.a)((function(e){var t=e.user,n=e.account,r=e.loading;return{user:t,account:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t=e.user,n=e.account,o=(e.globalSetting,e.loading),l=e.dispatch,f=(Object(d.a)(e,["user","account","globalSetting","loading","dispatch"]),oe.a.useForm()),v=Object(h.a)(f,1)[0],y=Object(m.useState)({}),b=Object(h.a)(y,2),x=(b[0],b[1]),w=Object(m.useState)(!0),E=Object(h.a)(w,2),S=E[0],C=E[1],k=Object(m.useState)(),_=Object(h.a)(k,2),T=_[0],O=_[1],L=Object(m.useState)(),I=Object(h.a)(L,2),R=I[0],M=I[1],N=Object(m.useState)(),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],z=U[1];Object(m.useEffect)((function(){if(n.basicInfo){var e=n.basicInfo,t={name:e.show_realname?e.name:Object(ae.F)(e.name),gender:e.gender};O(e.name),C(e.show_realname),v.setFieldsValue(t),x(t)}}),[n.basicInfo]);var G=function(){var e=Object(u.a)(p.a.mark((function e(r){var i,o,a,s,u,h,d,f;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=(a=r||{}).name,u=a.gender,h=a.idNumber,R){e.next=4;break}return c.b.info("请先上传照片!"),e.abrupt("return");case 4:return e.next=6,l({type:"account/applyRealNameAuth",payload:{id:(null===(i=n.basicInfo)||void 0===i?void 0:i.id)||(null===(o=t.userInfo)||void 0===o?void 0:o.login),name:s,gender:u,id_number:h,show_realname:S,attachment_ids:[P]}});case 6:d=e.sent,V(),d&&(c.b.info("申请已提交,请等待审核!"),l({type:"account/getBasicInfo",payload:{login:null===(f=t.userInfo)||void 0===f?void 0:f.login}}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(){l({type:"account/setActionTabs",payload:{}})},W={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(D.a.API_SERVER,"/api/attachments.json"),className:ue.a.uploader,onChange:function(e){var t;"uploading"!==e.file.status?"done"===e.file.status&&(console.log(e.file,e.file.response),B(null===(t=e.file.response)||void 0===t?void 0:t.id),Object(ae.C)(e.file.originFileObj,(function(e){M(e),z(!1)}))):z(!0)},beforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/bmp"===e.type;return t||c.b.info("请上传正确文件格式"),t}};return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:"Account-RealNameAuth"===n.actionTabs.key,title:"修改实名信息",width:"600px",footer:null},g.a.createElement(s.a,{spinning:!!H},g.a.createElement(oe.a,{className:ue.a.formWrap,form:v,layout:"horizontal",onValuesChange:function(e){x(Object(r.a)({},v.getFieldsValue())),"name"in e&&O(e.name)},onFinish:G},g.a.createElement(oe.a.Item,{label:"姓名",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"请输入真实姓名,最大限制".concat(10,"个字符")},{validator:ae.I}],extra:g.a.createElement("span",null,S?"(显示:平台将显示您的真实姓名)":"(隐藏:平台将显示你的昵称)")},g.a.createElement(A.a,{disabled:!S,placeholder:"请输入真实姓名,最大限制".concat(10,"个字符"),maxLength:10,addonAfter:g.a.createElement("i",{className:"iconfont ".concat(S?"icon-xianshi":"icon-yincang"," font18 ").concat(ue.a.color0152d9),onClick:function(){var e=!S;C(e);var t=e?T:Object(ae.F)(T);v.setFieldsValue({name:t})}})})),g.a.createElement(oe.a.Item,{label:"性别:",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"请选择性别"}]},g.a.createElement(ie.a.Group,null,g.a.createElement(ie.a,{value:0},"男"),g.a.createElement(ie.a,{value:1},"女"))),g.a.createElement(oe.a.Item,{label:"证件号:",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"请输入证件号"}]},g.a.createElement(A.a,{placeholder:"请输入证件号"})),g.a.createElement(oe.a.Item,{label:"身份证上传",labelCol:{span:3}},g.a.createElement("div",{className:ue.a.flexRow},g.a.createElement("div",{className:"".concat(ue.a.flexColumn," ").concat(ue.a.example)},g.a.createElement("span",{className:ue.a.exampleImg},g.a.createElement("img",{src:le.a})),g.a.createElement("span",{className:"tc"},g.a.createElement("p",null,"示例图片"),g.a.createElement("p",{className:"".concat(ue.a.colorOrange," font12")},"(png/jpg/bmp格式,不超过2MB)"))),g.a.createElement("div",{className:ue.a.flexColumn},g.a.createElement(he,Object(re.a)({},W,{accept:".png,.jpg,.bmp,.jpeg"}),R?g.a.createElement("img",{src:R,className:ue.a.uploadImg}):g.a.createElement("div",{className:ue.a.imageTip},g.a.createElement("p",null,g.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(ue.a.uploadTipIcon)})),g.a.createElement("p",{className:ue.a.uploadTip},g.a.createElement("a",{className:ue.a.color05101a},"点击或拖拽上传图片")))),g.a.createElement("span",{className:"tc"},g.a.createElement("p",{className:ue.a.viewLargerImg},"查看大图"))))),g.a.createElement("div",{className:ue.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:V},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:o["account/applyRealNameAuth"]},"保存"))),g.a.createElement("div",{className:ue.a.note},g.a.createElement("p",null,"认证须知:"),g.a.createElement("p",null,"1.你需要准备有效的身份证正面(人像面)的证件照照片,请确保证件照片清晰可见,严禁PS;"),g.a.createElement("p",null,"2.我们将在你提交认证信息后的24小时(不包含节假日)内完成审核,审核结果将会以系统消息的形式发送给你;"),g.a.createElement("p",null,"3.实名认证审核完成后,无法删除,请谨慎填写;"),g.a.createElement("p",null,"4.实名认证审核完成后,系统将自动发放500个金币作为奖励;"),g.a.createElement("p",null,"5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;"),g.a.createElement("p",null,"6.如存在恶意乱填写姓名,证件号,及上传与实名认证证件无关图片者,一经发现将冻结EduCoder账号。"),g.a.createElement("p",null,"7.提交实名认证后系统会自动将状态改为已认证,你将可以体验平台需要实名认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。")))))})),fe=(n("O3gP"),n("lrIw")),pe=n("KXlV"),me=n.n(pe),ge=n("Sjjz"),ve=n.n(ge),ye=A.a.TextArea,be=Object(b.a)((function(e){var t=e.account,n=e.loading;return{account:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){e.account,e.globalSetting;var t=e.loading,n=e.dispatch,r=e.schoolName,o=e.departmentName,s=e.visible,l=e.onClose,f=void 0===l?function(){}:l,v=e.onSuccess,y=void 0===v?function(){}:v,b=Object(d.a)(e,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),x=oe.a.useForm(),w=Object(h.a)(x,1)[0],E=Object(m.useRef)();Object(m.useEffect)((function(){E.current=b.schoolId}),[b.schoolId]),Object(m.useEffect)((function(){w.setFieldsValue({department:o})}),[o]);var S=function(){var e=Object(u.a)(p.a.mark((function e(t){var r,i,o,a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=t||{}).department,o=r.remarks,e.next=3,n({type:"account/appplyDepartment",payload:{school_id:E.current,name:i,remarks:o}});case 3:a=e.sent,f(),a&&(c.b.success("新增院系/部门成功!"),y(i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:s,title:"申请添加子单位名称",width:"600px",footer:null},g.a.createElement(oe.a,{className:ve.a.formWrap,form:w,labelCol:{span:4},wrapperCol:{span:20},onFinish:S},g.a.createElement(oe.a.Item,{label:"单位名称:"},r),g.a.createElement(oe.a.Item,{label:"部门名称:",name:"department",rules:[{required:!0,message:"请输入部门或者学院名称"}]},g.a.createElement(A.a,{placeholder:"请输入部门或者学院名称"})),g.a.createElement(oe.a.Item,{label:"说明:",name:"remarks"},g.a.createElement(ye,{placeholder:"再次说明特别情况(选填)"})),g.a.createElement("div",{className:ve.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:function(){f()}},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:t["account/appplyDepartment"]},"保存")))))})),xe=(n("6UJt"),n("DFOY")),we=n("jO45"),Ee=n("jN4g"),Se=n("gJ3r"),Ce=n("jwmR"),ke=n.n(Ce),_e=function(e,t){return t.some((function(t){return t.label.toLowerCase().indexOf(e.toLowerCase())>-1}))},Te=A.a.TextArea,Oe=Object(b.a)((function(e){var t=e.account,n=e.loading;return{account:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){e.account,e.globalSetting;var t=e.loading,n=e.dispatch,r=e.schoolName,o=e.visible,s=e.onClose,l=void 0===s?function(){}:s,f=e.onSuccess,v=void 0===f?function(){}:f,y=(Object(d.a)(e,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),oe.a.useForm()),b=Object(h.a)(y,1)[0];Object(m.useEffect)((function(){b.setFieldsValue({name:r})}),[r]);var x=function(){var e=Object(u.a)(p.a.mark((function e(t){var r,i,o,a,s,u,h;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=t||{}).name,o=r.city,a=void 0===o?[]:o,s=r.address,u=r.remarks,e.next=3,n({type:"account/appplySchool",payload:{name:i,province:a[0],city:a[1],address:s,remarks:u}});case 3:h=e.sent,l(),h&&(c.b.success("新增学校/单位成功!"),v(i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:o,title:"申请添加单位名称",width:"600px",footer:null},g.a.createElement(oe.a,{className:ke.a.formWrap,form:b,labelCol:{span:4},wrapperCol:{span:20},onFinish:x},g.a.createElement(oe.a.Item,{label:"单位全称:",name:"name",rules:[{required:!0,message:"请输入学校或工作单位"}]},g.a.createElement(A.a,{placeholder:"学校或工作单位"})),g.a.createElement("div",{className:"".concat(ke.a.flexRow," ").concat(ke.a.example)},g.a.createElement("div",null,"示例:"),g.a.createElement("div",{className:ke.a.flexColumn},g.a.createElement("div",null,g.a.createElement(we.a,{style:{color:"rgb(82, 196, 26)"}}),g.a.createElement("span",{className:"font14 ml5"},"正确示例:数据结构")),g.a.createElement("div",null,g.a.createElement(Ee.a,{style:{color:"red"}}),g.a.createElement("span",{className:"font14 ml5"},"错误示例:数据结构2019春")))),g.a.createElement(oe.a.Item,{label:"地区:",name:"city"},g.a.createElement(xe.a,{allowClear:!0,size:"large",options:Se.a,placeholder:"请选择所在地",showSearch:{matchInputWidth:!0,filter:_e}})),g.a.createElement(oe.a.Item,{label:"详细地址:",name:"address"},g.a.createElement(A.a,{placeholder:"请填写完整的地址信息"})),g.a.createElement(oe.a.Item,{label:"说明:",name:"remarks"},g.a.createElement(Te,{placeholder:"再次说明特别情况(选填)"})),g.a.createElement("div",{className:ke.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:function(){l()}},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:t["account/appplySchool"]},"保存")))))})),Ae=N.a.Option,Le=S.a.Dragger,De=Object(b.a)((function(e){var t=e.user,n=e.account,r=e.loading;return{user:t,account:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t,n,o=e.user,l=e.account,f=e.globalSetting,v=e.loading,y=e.dispatch,b=e.Scoid,x=(Object(d.a)(e,["user","account","globalSetting","loading","dispatch","Scoid"]),oe.a.useForm()),w=Object(h.a)(x,1)[0],E=Object(m.useState)({}),S=Object(h.a)(E,2),C=S[0],k=S[1],_=Object(m.useState)([]),T=Object(h.a)(_,2),L=T[0],I=T[1],R=Object(m.useState)([]),M=Object(h.a)(R,2),j=M[0],P=M[1],B=Object(m.useState)([]),F=Object(h.a)(B,2),U=F[0],H=F[1],z=Object(m.useState)([]),G=Object(h.a)(z,2),V=G[0],W=G[1],K=Object(m.useState)(),q=Object(h.a)(K,2),X=q[0],$=q[1],J=Object(m.useState)(),Z=Object(h.a)(J,2),Q=Z[0],ee=Z[1],te=Object(m.useState)(),ne=Object(h.a)(te,2),ie=ne[0],se=ne[1],le=Object(m.useState)(),ce=Object(h.a)(le,2),he=ce[0],de=ce[1],pe=Object(m.useState)(),ge=Object(h.a)(pe,2),ve=ge[0],ye=ge[1];Object(m.useEffect)((function(){xe()}),[]),Object(m.useEffect)((function(){Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,we(b);case 4:t=e.sent,H(null==t?void 0:t.departments);case 6:case"end":return e.stop()}}),e)})))()}),[b]);var xe=function(){var e=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y({type:"account/getSchoolOption"});case 2:t=e.sent,I(null==t?void 0:t.schools);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),we=function(e){return y({type:"account/getDepartmentOption",payload:{id:e}})};Object(m.useEffect)((function(){if(l.basicInfo){var e=l.basicInfo,t={identity:e.identity,school:e.school_name,department:e.department_name,studentNo:e.student_id,jobTitle:"teacher"==e.identity?e.technical_title:"教授",manager:"professional"==e.identity?e.technical_title:"企业管理者"};w.setFieldsValue(t),k(t)}}),[l.basicInfo]);var Ee=function(){var e=Object(u.a)(p.a.mark((function e(t,n){var i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(i=L.find((function(e){return e.name===t})))||void 0===i?void 0:i.id,e.next=3,we(s);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:l=e.t0,H(null==l?void 0:l.departments),c=n||(null==l||null===(o=l.departments)||void 0===o||null===(a=o[0])||void 0===a?void 0:a.name),w.setFieldsValue({department:c}),k(Object(r.a)(Object(r.a)({},C),{school:t,department:c}));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Se=function(){var e=Object(u.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xe();case 2:w.setFieldsValue({school:t,department:""}),k(Object(r.a)(Object(r.a)({},C),{school:t,department:""}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ce=function(){var e=Object(u.a)(p.a.mark((function e(t){var n,r,i,a,s,u,h,d,f,m,g,v,b,x,w,E;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(s=t||{}).school,h=s.department,d=s.identity,f=s.studentNo,m=s.jobTitle,g=s.manager,X){e.next=4;break}return c.b.info("请先上传照片!"),e.abrupt("return");case 4:return v=null===(n=L.find((function(e){return e.name===u})))||void 0===n?void 0:n.id,b=null===(r=U.find((function(e){return e.name===h})))||void 0===r?void 0:r.id,x="student"===d?f:"teacher"===d?m:g,e.next=9,y({type:"account/applyProfessionalAuth",payload:{id:(null===(i=l.basicInfo)||void 0===i?void 0:i.id)||(null===(a=o.userInfo)||void 0===a?void 0:a.login),school_id:v,department_id:b,identity:d,extra:x,attachment_ids:[Q]}});case 9:w=e.sent,ke(),w&&(c.b.info("申请已提交,请等待审核!"),y({type:"account/getBasicInfo",payload:{login:null===(E=o.userInfo)||void 0===E?void 0:E.login}}));case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ke=function(){y({type:"account/setActionTabs",payload:{}})},_e={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(D.a.API_SERVER,"/api/attachments.json"),className:ue.a.uploader,onChange:function(e){var t;"uploading"!==e.file.status?"done"===e.file.status&&(console.log(e.file,e.file.response),ee(null===(t=e.file.response)||void 0===t?void 0:t.id),Object(ae.C)(e.file.originFileObj,(function(e){$(e),se(!1)}))):se(!0)},beforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/bmp"===e.type;return t||c.b.info("请上传正确文件格式"),t}};return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:ue.a.modal,visible:"Account-ProfessionalAuth"===l.actionTabs.key,title:g.a.createElement("div",null,g.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(ue.a.colorBlue)}),"职业认证"),width:"660px",footer:null},g.a.createElement(s.a,{spinning:!!ie},g.a.createElement(oe.a,{className:ue.a.formWrap,form:w,layout:"horizontal",onValuesChange:function(e){(k(Object(r.a)({},w.getFieldsValue())),"school"in e)&&(P(L.filter((function(t){return t.name.includes(e.school)}))),(L.find((function(t){return t.name===e.school}))||{}).id?Ee(e.school):(w.setFieldsValue({department:""}),k(Object(r.a)(Object(r.a)({},C),{school:e.school,department:""}))))},onFinish:Ce},g.a.createElement(O.a,{gutter:[10,0]},g.a.createElement(Y.a,{flex:"300px"},g.a.createElement(oe.a.Item,{label:"职业",name:"identity",rules:[{required:!0,message:"请先选择职业"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"teacher"},"教师"),g.a.createElement(Ae,{value:"student"},"学生"),g.a.createElement(Ae,{value:"professional"},"专业人士")))),"student"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.studentNo,name:"studentNo",rules:[{required:!0,message:"请先输入学号"}]},g.a.createElement(A.a,{type:"text",placeholder:"请输入学号"}))),"teacher"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.jobTitle,name:"jobTitle",rules:[{required:!0,message:"请先选择职称"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"教授"},"教授"),g.a.createElement(Ae,{value:"副教授"},"副教授"),g.a.createElement(Ae,{value:"讲师"},"讲师"),g.a.createElement(Ae,{value:"助教"},"助教")))),"professional"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.manager,name:"manager",rules:[{required:!0,message:"请先选择职称"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"企业管理者"},"企业管理者"),g.a.createElement(Ae,{value:"部门管理者"},"部门管理者"),g.a.createElement(Ae,{value:"高级工程师"},"高级工程师"),g.a.createElement(Ae,{value:"工程师"},"工程师"),g.a.createElement(Ae,{value:"助理工程师"},"助理工程师"))))),g.a.createElement(oe.a.Item,{label:"学校/单位",name:"school",extra:C.school&&!(null!=L&&L.find((function(e){return e.name===C.school})))&&g.a.createElement("div",{className:ue.a.schoolHintWrap},g.a.createElement("span",{className:ue.a.colorCDCDCD},"未找到包含“",C.school,"”的高校,"),g.a.createElement("span",{className:"".concat(ue.a.color0152d9," current"),onClick:function(){de(!0)}},"申请新增")),rules:[{required:!0,message:"请先选择学校/单位"}]},g.a.createElement(fe.a,{showSearch:!0,options:null==j?void 0:j.map((function(e){return{value:e.name}}))})),g.a.createElement(oe.a.Item,{label:"院系/部门",name:"department",extra:C.department&&!(null!=U&&U.find((function(e){return e.name===C.department})))&&g.a.createElement("div",{className:ue.a.schoolHintWrap},g.a.createElement("span",{className:ue.a.colorCDCDCD},C.department?"未找到包含“".concat(C.department,"”的高校,"):"未找到院系,"),g.a.createElement("span",{className:"".concat(ue.a.color0152d9," current"),onClick:function(){L.find((function(e){return e.name===C.school}))?ye(!0):c.b.info("请先选择正确的单位或者学校!")}},"申请新增")),rules:[{required:!0,message:"请先选择院系/部门"}]},g.a.createElement(fe.a,{showSearch:!0,onChange:function(e){return W(U.filter((function(t){return t.name.includes(e)})))},options:null==V?void 0:V.map((function(e){return{value:e.name}}))})),g.a.createElement(oe.a.Item,{label:"职业证上传"},g.a.createElement("div",{className:ue.a.flexRow},g.a.createElement("div",{className:"".concat(ue.a.flexColumn," ").concat(ue.a.example)},g.a.createElement("span",{className:ue.a.exampleImg},g.a.createElement("img",{src:me.a})),g.a.createElement("span",{className:"tc"},g.a.createElement("p",null,"示例图片"),g.a.createElement("p",{className:"".concat(ue.a.colorOrange," font12")},"(png/jpg/bmp格式,不超过2MB)"))),g.a.createElement("div",{className:ue.a.flexColumn},g.a.createElement(Le,Object(re.a)({},_e,{accept:".png,.jpg,.bmp,.jpeg"}),X?g.a.createElement("img",{src:X,className:ue.a.uploadImg}):g.a.createElement("div",{className:ue.a.imageTip},g.a.createElement("p",null,g.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(ue.a.uploadTipIcon)})),g.a.createElement("p",{className:ue.a.uploadTip},g.a.createElement("a",{className:ue.a.color05101a},"点击或拖拽上传图片")))),g.a.createElement("span",{className:"tc"},g.a.createElement("p",{className:ue.a.viewLargerImg},"查看大图"))))),g.a.createElement("div",{className:ue.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:ke},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:v["account/applyProfessionalAuth"]},"保存"))),g.a.createElement("div",{className:ue.a.note},g.a.createElement("p",null,"认证须知:"),g.a.createElement("p",null,"1.根据职业上传相应的证件照:教师(教师证),专业人士(员工证)、学生(学生证),请确保证件照内容完整并且清晰可见,严禁PS;"),g.a.createElement("p",null,"2.我们将在你提交职业证信息后的24小时(不包含节假日)内完成审核,审核结果将会以系统消息的形式发送给你;"),g.a.createElement("p",null,"3.职业认证审核完成后,无法删除,请谨慎填写;职业变更请选择重新认证;"),g.a.createElement("p",null,"4.职业认证审核完成后,系统将自动发放500个金币作为奖励;"),g.a.createElement("p",null,"5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;"),g.a.createElement("p",null,"6.如存在恶意乱填写姓名,学号,及上传与职业证件无关图片者,一经发现将冻结",!(null!=f&&null!==(t=f.setting)&&void 0!==t&&t.is_local)&&"EduCoder","账号。"),g.a.createElement("p",null,"7.非老师身份提交职业认证后系统会自动将状态改为已认证,你将可以体验平台需要职业认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。")))),g.a.createElement(Oe,{visible:he,onClose:function(){return de(!1)},schoolName:C.school,onSuccess:Se}),g.a.createElement(be,{visible:ve,onClose:function(){return ye(!1)},schoolId:null===(n=L.find((function(e){return e.name===C.school})))||void 0===n?void 0:n.id,schoolName:C.school,departmentName:C.department,onSuccess:function(e){return Ee(C.school,e)}}))})),Ie=n("aCH8"),Re=n.n(Ie);var Me=function(e){var t=e.type,n=e.dispatch,r=e.userid,i=e.isshow,o=e.setPhoneshow,s=e.setEmailshow,l="79e33abd4b6588941ab7622aed1e67e8",d=Object(m.useState)(""),f=Object(h.a)(d,2),v=f[0],y=f[1],b=Object(m.useState)("获取验证码"),x=Object(h.a)(b,2),w=x[0],E=(x[1],Object(m.useState)(60)),S=Object(h.a)(E,2),C=S[0],k=S[1],_=Object(m.useState)(!1),T=Object(h.a)(_,2),O=T[0],L=T[1],D=Object(m.useState)(""),I=Object(h.a)(D,2),R=I[0],M=I[1];function N(){return(N=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=3;break}return 3===t?c.b.info("手机号不能为空"):c.b.info("邮箱地址不能为空"),e.abrupt("return");case 3:return e.next=5,n({type:"competitions/getVerification",payload:{type:t,login:v,smscode:Re()(l+v)}});case 5:1===e.sent.status&&(c.b.info("获取验证码成功"),j(),L(!0));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(){k(60);var e=setInterval((function(){--C>-1?k(C):(clearInterval(e),L(!1))}),1e3)}function P(){return(P=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"competitions/PhoneBind",payload:{userid:r,code:R,phone:v}});case 2:0===e.sent.status&&(c.b.info("绑定成功"),o("none"));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){return(B=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"competitions/EmailBind",payload:{userid:r,code:R,email:v}});case 2:0===e.sent.status&&(c.b.info("绑定成功"),s("none"));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",{style:{display:i}},g.a.createElement("p",null,g.a.createElement(A.a,{value:v,onChange:function(e){return y(e.target.value)},placeholder:3===t?"请输入手机号":"请输入邮箱地址",style:{width:"370px"}})),g.a.createElement("span",null,g.a.createElement(A.a,{value:R,onChange:function(e){return M(e.target.value)},placeholder:3===t?"请输入手机获取的验证码":"请输入邮箱获取的验证码",style:{width:"250px"}}))," ",g.a.createElement(a.a,{disabled:O,onClick:function(){return function(){return N.apply(this,arguments)}()},type:"primary",style:{marginLeft:"20px",width:"100px"}},O?"重新发送".concat(C,"s"):w),g.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},g.a.createElement(a.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){R?3===t?function(){P.apply(this,arguments)}():function(){B.apply(this,arguments)}():c.b.info("验证码不能为空")}},"确认"),g.a.createElement(a.a,{style:{marginLeft:"20px"},onClick:function(){3===t?o("none"):s("none")}},"取消")))};var Ne=function(e){var t=e.dispatch,n=e.userid,i={wrapperCol:{offset:3,span:21}},o=oe.a.useForm(),s=Object(h.a)(o,1)[0],l=Object(v.i)().identifier;return g.a.createElement("div",{style:{width:"500px"}},g.a.createElement(oe.a,{form:s,name:"basic"},g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"开户行"),name:"bank",rules:[{required:!0,message:"请输入开户行"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"支行"),name:"second_bank",rules:[{required:!0,message:"请输入支行"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"账号"),name:"card_no",rules:[{required:!0,message:"请输入账号"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{type:"primary",htmlType:"submit",onClick:Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.validateFields().then(function(){var e=Object(u.a)(p.a.mark((function e(i){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"competitions/setleader",payload:Object(r.a)({identifier:l,user_id:n},i)});case 2:0===e.sent.status&&c.b.info("提交成功");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})))},"提交"))))},je={teacher:"教师",student:"学生",professional:"专业人士"};var Pe=function(e){var t,n,r,i,o,s,l,d,f=e.Prize,v=e.Accounts,y=e.dispatch,b=e.userid,x=Object(m.useState)("none"),w=Object(h.a)(x,2),E=w[0],S=w[1],C=Object(m.useState)("none"),k=Object(h.a)(C,2),_=k[0],T=k[1];function O(e){return A.apply(this,arguments)}function A(){return(A=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("1"!==t){e.next=6;break}return e.next=3,y({type:"competitions/Authentication"});case 3:n=e.sent,e.next=9;break;case 6:return e.next=8,y({type:"competitions/Professional"});case 8:n=e.sent;case 9:0===n.status&&c.b.info("撤销成功");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",null,g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"实名信息"),"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"通过实名认证后才能获得证书"):null,"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"立即认证"):null),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",null,"姓名:",g.a.createElement("span",null,null==v?void 0:v.name),"uncertified"===(null==v?void 0:v.authentication)?null:"applying"===(null==v?void 0:v.authentication)?g.a.createElement("span",null,g.a.createElement("span",null,"待审核"),g.a.createElement(a.a,{type:"primary",onClick:function(){return O("1")},ghost:!0,style:{marginLeft:"20px"}},"撤销认证")):g.a.createElement("span",{style:{color:"#6ec76e"}},g.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," 已认证")),g.a.createElement("p",null,"性别:",g.a.createElement("span",null,0===(null==v?void 0:v.gender)?"男":"女"))),g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"职业信息"),"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"通过实名认证后才能获得证书"):null,"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"立即认证"):null),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",null,"职业:",g.a.createElement("span",null,v&&v.identity&&je[v.identity]),"uncertified"===(null==v?void 0:v.authentication)?null:"applying"===(null==v?void 0:v.authentication)?g.a.createElement("span",null,g.a.createElement("span",null,"待审核"),g.a.createElement(a.a,{type:"primary",onClick:function(){return O("2")},ghost:!0,style:{marginLeft:"20px"}},"撤销认证")):g.a.createElement("span",{style:{color:"#6ec76e"}},g.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),g.a.createElement("span",null,"已认证"),g.a.createElement(a.a,{type:"primary",onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"重新认证"))),g.a.createElement("p",null,"学号:",g.a.createElement("span",null,(null==v?void 0:v.student_id)||"--")),g.a.createElement("p",null,"学校:",g.a.createElement("span",null,(null==v?void 0:v.school_name)||"--")),g.a.createElement("p",null,"院系:",g.a.createElement("span",null,(null==v?void 0:v.department_name)||"--"))),g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"联系方式")),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"手机号:"),g.a.createElement("span",{style:{width:"150px"}},(null==v?void 0:v.phone)||"--"),"none"===E?g.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){S("block")}},"更换"):null),g.a.createElement(Me,{type:3,dispatch:y,userid:null==v?void 0:v.id,isshow:E,setPhoneshow:S,setEmailshow:T}),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email:"),g.a.createElement("span",{style:{width:"150px"}},(null==v?void 0:v.mail)||"--"),"none"===_?g.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){T("block")}},"更换"):null),g.a.createElement(Me,{type:4,dispatch:y,userid:null==v?void 0:v.id,isshow:_,setEmailshow:T,setPhoneshow:S})),null!=f&&f.leader&&null!=f&&f.teams&&null!=f&&null!==(t=f.teams[0])&&void 0!==t&&null!==(n=t.bank_account)&&void 0!==n&&n.bank?g.a.createElement("p",null,g.a.createElement("span",{style:{fontSize:"16px"}},"签/领/开户行及银行卡号"),g.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"为保障奖金的及时发放,请队长如实填写你名下的银行卡信息")):g.a.createElement("div",null,g.a.createElement("p",null,g.a.createElement("span",{style:{fontSize:"16px"}},"签/领/开户行及银行卡号"),g.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"为保障奖金的及时发放,请队长如实填写你名下的银行卡信息")),g.a.createElement(Ne,{dispatch:y,userid:b})),null!=f&&f.leader?g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"开户行:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(r=f.teams[0])||void 0===r||null===(i=r.bank_account)||void 0===i?void 0:i.bank)||"--")),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"支行:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(o=f.teams[0])||void 0===o||null===(s=o.bank_account)||void 0===s?void 0:s.second_bank)||"--")),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"账号:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(l=f.teams[0])||void 0===l||null===(d=l.bank_account)||void 0===d?void 0:d.card_no)||"--"))):null,g.a.createElement(De,{Scoid:null==v?void 0:v.school_id}),g.a.createElement(de,null))},Be=K.a.TabPane;var Fe=function(e){var t=e.Prize,n=e.Accounts,r=e.getAccounts,i=e.dispatch,o=e.userid;return g.a.createElement("div",{className:"fr"},g.a.createElement("div",{className:"mb100 "},g.a.createElement(K.a,{defaultActiveKey:"1",onChange:function(e){"2"===e&&r()}},g.a.createElement(Be,{tab:"获奖证书下载",key:"1"},g.a.createElement(ne,{Prize:t})),g.a.createElement(Be,{tab:"完善个人信息",key:"2"},g.a.createElement(Pe,{userid:o,dispatch:i,Prize:t,Accounts:n})))))},Ue=n("xKgJ"),He=n("wd/R"),ze=n.n(He),Ge=K.a.TabPane;var Ve=function(e){var t,n,r,i,o,s,l=e.ChartRules,d=e.ItemData,f=e.getCharts,y=e.Selectkey,b=e.HeaderDetail,x=e.getChartRules,w=e.userinfo,E=e.Editable,S=e.dispatch,C=e.StaffDetail,k=Object(m.useState)(!1),_=Object(h.a)(k,2),T=_[0],O=_[1],A=Object(m.useState)(""),D=Object(h.a)(A,2),R=D[0],M=D[1],N=Object(m.useState)(!0),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],G=U[1],V=Object(m.useState)(),Y=Object(h.a)(V,2),$=Y[0],J=Y[1],Z=Object(v.i)().identifier;function Q(){return(Q=Object(u.a)(p.a.mark((function e(){var t,n,r,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=3;break}return c.b.info("内容不能为空"),e.abrupt("return");case 3:if(B(!1),!(t=null==H?void 0:H.id)){e.next=12;break}return e.next=8,Object(I.a)("/api/competitions/".concat(Z,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(n=l.rule_contents)||void 0===n||null===(r=n.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(t)})))||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id,stage_id:null==H?void 0:H.id}});case 8:0===e.sent.status&&(c.b.info("更新成功"),O(!1),x()),e.next=16;break;case 12:return e.next=14,Object(I.a)("/api/competitions/".concat(Z,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.id,stage_id:null==H?void 0:H.id}});case 14:0===e.sent.status&&(c.b.info("更新成功"),O(!1),x());case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(m.useEffect)((function(){if(P){var e,t,n,r,i=null==l||null===(e=l.stages)||void 0===e?void 0:e[0];G(i);var o,a,s,c,u,h,d=null==l||null===(t=l.stages)||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.children)||void 0===r?void 0:r[0];if(J(d),null!=i&&i.id)f(null==i?void 0:i.id),M((null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==i?void 0:i.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||"");else f(0),M((null===(c=l.rule_contents)||void 0===c||null===(u=c.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===u||null===(h=u[0])||void 0===h?void 0:h.content)||"")}}),[l]);var ee=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(e,t,n){return g.a.createElement("span",null,e)}},{title:"附件",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(e){return g.a.createElement(X.a,{title:e},g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=10?(null==e?void 0:e.substr(0,10))+"...":e||"--"))}},{title:"提交人",dataIndex:"user_name",key:"user_name",width:100,render:function(e){return g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=6?(null==e?void 0:e.substr(0,6))+"...":e||"--")}},{title:"提交时间",dataIndex:"created_at",key:"created_at",align:"center"},{title:"状态",dataIndex:"status",key:"status",width:50,render:function(e){return g.a.createElement("span",null,1===e?"计算中":2===e?"完成":0===e?"待计算":3===e&&"错误")}},!(null!=H&&H.display_four_indicators)&&"计图挑战热身赛"===(null==H?void 0:H.name)&&{title:"数据指标1",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},!(null!=H&&H.display_four_indicators)&&"计图挑战热身赛"===(null==H?void 0:H.name)&&{title:"数据指标2",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){return(null==e?void 0:e.length)>0?null==e?void 0:e.map((function(e,t){return g.a.createElement("span",null,null==e?void 0:e.name,":",null==e?void 0:e.value," ",g.a.createElement("br",null))})):g.a.createElement("span",null,"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(e){return g.a.createElement("span",null,e||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"美学评分",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"score"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"fid"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"总分",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"total_score"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Coffee"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Easyship"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Scar"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Scarf"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"总分",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Total"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},{title:"操作",dataIndex:"result_url",width:50,key:"result_url",render:function(e){return g.a.createElement("a",{href:e,target:"_blank",download:"附件"},"下载")}}].filter((function(e){return!!e}));return g.a.createElement("div",null,(null==l||null===(t=l.stages)||void 0===t?void 0:t.length)>0?null:g.a.createElement(q,null),(null==l||null===(n=l.stages)||void 0===n?void 0:n.length)>0&&g.a.createElement(K.a,{animated:!0,tabBarExtraContent:null!=w&&w.admin||null!=w&&w.business||E?g.a.createElement(a.a,{onClick:function(){O(!0)}},"编辑"):C.enrolled&&(null==H?void 0:H.start_time)&&(null==H?void 0:H.end_time)&&g.a.createElement("span",null,"提交时间:",ze()(null==H?void 0:H.start_time).format("YYYY-MM-DD HH:mm:ss"),"至",ze()(null==H?void 0:H.end_time).format("YYYY-MM-DD HH:mm:ss"),g.a.createElement(a.a,{style:{marginLeft:"20px"},disabled:ze()(null==H?void 0:H.start_time).unix()>ze()(ze()().format("YYYY-MM-DD HH:mm:s")).unix()||ze()(ze()().format("YYYY-MM-DD HH:mm:s")).unix()>ze()(null==H?void 0:H.end_time).unix(),onClick:function(){S({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(null==$?void 0:$.id)||(null==H?void 0:H.id),id:null==b?void 0:b.id}}})}},"提交结果")),onChange:function(e){var t,n,r,i,o;O(!1);var a=null==l||null===(t=l.stages)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0],s=null==a||null===(n=a.children)||void 0===n?void 0:n[0];J(s),G(a),M((null===(r=l.rule_contents)||void 0===r||null===(i=r.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==a?void 0:a.id)})))||void 0===i||null===(o=i[0])||void 0===o?void 0:o.content)||""),f((null==s?void 0:s.id)||e)}},l&&l.stages.map((function(e,t){return g.a.createElement(Ge,{tab:e.name,key:null===e.id?0:e.id},!1===T&&l&&l.rule_contents.map((function(t,n){return e.id===t.competition_stage_id||null===e.id&&0===t.competition_stage_id?g.a.createElement(L.a,{key:n,value:void 0===t.content||null===t.content?"":t.content}):void 0})))}))),(null==H||null===(r=H.children)||void 0===r?void 0:r.length)>0&&g.a.createElement(K.a,{activeKey:(null==$?void 0:$.id)+"",onChange:function(e){var t,n=null==H||null===(t=H.children)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];J(n),f(e)}},null==H||null===(i=H.children)||void 0===i?void 0:i.map((function(e,t){return g.a.createElement(Ge,{tab:e.name,key:null===e.id?0:e.id})}))),T&&g.a.createElement("div",null,g.a.createElement(z.a,{defaultValue:R,onChange:function(e){M(e)}}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return Q.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return O(!1)}},"取消"))),(null===(o=b.competition_modules.filter((function(e){return e.id===y})))||void 0===o||null===(s=o[0])||void 0===s?void 0:s.show_leaderboard)&&g.a.createElement(W.a,{dataSource:null==d?void 0:d.results,columns:ee}))},We=(n("DjyN"),n("NUBc")),Ke=K.a.TabPane;var qe=function(e){var t,n,i,o,a,l,c=e.loading,d=e.ChartRules,f=e.ItemData,y=e.getCharts,b=(e.Selectkey,e.HeaderDetail,e.getChartRules,e.userinfo,e.Editable,e.dispatch,e.StaffDetail,Object(m.useState)(!1)),x=Object(h.a)(b,2),w=(x[0],x[1]),E=Object(m.useState)(""),S=Object(h.a)(E,2),C=(S[0],S[1]),k=Object(m.useState)(!0),_=Object(h.a)(k,2),T=_[0],O=(_[1],Object(m.useState)()),L=Object(h.a)(O,2),I=L[0],R=L[1],M=Object(m.useState)(),N=Object(h.a)(M,2),j=N[0],P=N[1],B=(Object(v.i)().identifier,Object(m.useState)({page:1,limit:10,sort:"desc"})),F=Object(h.a)(B,2),U=F[0],H=F[1];Object(m.useEffect)((function(){var e;T&&null!=d&&null!==(e=d.stages)&&void 0!==e&&e[0]&&z()}),[null==d||null===(t=d.stages)||void 0===t?void 0:t[0]]);var z=function(){var e=Object(u.a)(p.a.mark((function e(){var t,n,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=null==d||null===(t=d.stages)||void 0===t?void 0:t[0],R(a),s=null==d||null===(n=d.stages)||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.children)||void 0===o?void 0:o[0],P(s),U.id=(null==s?void 0:s.id)||(null==a?void 0:a.id),H(Object(r.a)({},U)),e.next=7,y(Object(r.a)(Object(r.a)({},U),{},{stage_id:U.id}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return g.a.createElement("div",null,(null==d||null===(n=d.stages)||void 0===n?void 0:n.length)>0?null:g.a.createElement(q,null),(null==d||null===(i=d.stages)||void 0===i?void 0:i.length)>0&&g.a.createElement(K.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!1),l=null==d||null===(n=d.stages)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],c=null==l||null===(i=l.children)||void 0===i?void 0:i[0],P(c),R(l),C((null===(o=d.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==l?void 0:l.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||""),U.page=1,U.limit=10,U.id=(null==c?void 0:c.id)||t,H(Object(r.a)({},U)),e.next=9,y(Object(r.a)({},U));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},d&&d.stages.map((function(e,t){return g.a.createElement(Ke,{tab:e.name,key:null===e.id?0:e.id})}))),(null==I||null===(o=I.children)||void 0===o?void 0:o.length)>0&&g.a.createElement(K.a,{activeKey:(null==j?void 0:j.id)+"",onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==I||null===(n=I.children)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],P(i),U.page=1,U.limit=10,U.id=t,H(Object(r.a)({},U)),e.next=5,y(Object(r.a)({},U));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},null==I||null===(a=I.children)||void 0===a?void 0:a.map((function(e,t){return g.a.createElement(Ke,{tab:e.name,key:null===e.id?0:e.id})}))),g.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),g.a.createElement("div",{style:{padding:"20px 30px"}},g.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){U.page=1,U.sort="desc"===U.sort?"asc":"desc",H(Object(r.a)({},U)),y(Object(r.a)({},U))}},"按提交时间","asc"===U.sort?"正":"倒","序排序 ",g.a.createElement("i",{className:"iconfont font14 ".concat("asc"===U.sort?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",g.a.createElement(A.a.Search,{onSearch:function(e){U.page=1,U.search=e,H(Object(r.a)({},U)),y(Object(r.a)({},U))},style:{width:"82%"},placeholder:"输入人员/战队名称进行搜索"}),g.a.createElement(s.a,{spinning:c},null==f||null===(l=f.results)||void 0===l?void 0:l.map((function(e,t){return g.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:0===t?14:30}},g.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/"+(null==e?void 0:e.image_url),style:{width:40,height:40,borderRadius:"50%"}}),g.a.createElement("div",{style:{marginLeft:10}},g.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},null==e?void 0:e.user_name),g.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"所属战队",g.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(null==e?void 0:e.team_name)||"- -")),g.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"学校 ",g.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(null==e?void 0:e.school_name)||"- -")))),g.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},g.a.createElement("div",null,g.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"提交时间:",null==e?void 0:e.created_at),g.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"消耗内存:",(null==e?void 0:e.ts_mem)||"- -","MB"),g.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"代码执行时间:",(null==e?void 0:e.ts_time)||"- -","秒")),g.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(null==e?void 0:e.game_identifier),target:"_blank"},g.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),g.a.createElement("span",{style:{lineHeight:"14px"}},"查看代码"))))}))),g.a.createElement(We.a,{total:null==f?void 0:f.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:U.page,onChange:function(e,t){U.page=e,H(Object(r.a)({},U)),y(Object(r.a)({},U))}})))};var Xe=function(e){var t,n=e.item,r=e.index,i=e.StaffDetail,o=Object(m.useState)(!0),s=Object(h.a)(o,2),l=s[0],c=s[1],u=Object(m.useState)(!0),d=Object(h.a)(u,2),f=d[0],p=d[1],v=Object(m.useRef)();return g.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},g.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/"+(null==n?void 0:n.pic),style:{width:220,height:130,borderRadius:"4px"}}),g.a.createElement("div",{style:{marginLeft:20,width:"75%"}},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},g.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"任务",function(e){var t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=parseInt(e);var r=function(e){for(var r=e.toString().split("").reverse(),i="",o=0;o0&&0==r[o]&&0==r[o-1]?"":t[r[o]]+(0==r[o]?n[0]:n[o]))+i;return i},i=Math.floor(e/1e4),o=e%1e4;return o.toString().length<4&&(o="0"+o),i?r(i)+"万"+r(o):r(e)}(r+1),":",g.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},null==n?void 0:n.name)),g.a.createElement("span",{style:{color:"#9096A3"}},"关卡",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},null==n?void 0:n.challenges_count)," ")),g.a.createElement("div",{ref:v},g.a.createElement(L.a,{style:{maxHeight:l&&100},value:null==n?void 0:n.description})),g.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){c(!l)}},l?"阅读全文 ":"收起全文 ",g.a.createElement("i",{className:"iconfont font14 ".concat(l?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),g.a.createElement("div",{style:{marginTop:14,maxHeight:f&&58,overflow:"hidden"}},null==n||null===(t=n.challenges)||void 0===t?void 0:t.map((function(e,t){return g.a.createElement("div",{style:{marginTop:0===t?0:12}},g.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),g.a.createElement("span",{style:{marginLeft:10}},"第",t+1,"关",null==e?void 0:e.name))}))),g.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},g.a.createElement("span",{onClick:function(){p(!f)}},f?"展开":"收起"," ",g.a.createElement("i",{className:"iconfont font14 ".concat(f?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(null==i?void 0:i.enrolled)&&g.a.createElement(a.a,{onClick:function(){window.open("/shixuns/".concat(null==n?void 0:n.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"开启挑战")))))},Ye=K.a.TabPane;var $e=function(e){var t,n,i,o,a,l,c=e.loading,d=e.ChartRules,f=e.ItemData,y=e.getCharts,b=(e.Selectkey,e.HeaderDetail,e.getChartRules,e.userinfo,e.Editable,e.dispatch,e.StaffDetail),x=Object(m.useState)(!1),w=Object(h.a)(x,2),E=(w[0],w[1]),S=Object(m.useState)(""),C=Object(h.a)(S,2),k=(C[0],C[1]),_=Object(m.useState)(!0),T=Object(h.a)(_,2),O=T[0],A=(T[1],Object(m.useState)()),L=Object(h.a)(A,2),D=L[0],I=L[1],R=Object(m.useState)(),M=Object(h.a)(R,2),N=M[0],j=M[1],P=(Object(v.i)().identifier,Object(m.useState)({page:1,limit:10})),B=Object(h.a)(P,2),F=B[0],U=B[1],H=Object(m.useState)(),z=Object(h.a)(H,2);z[0],z[1],Object(m.useEffect)((function(){var e;O&&null!=d&&null!==(e=d.stages)&&void 0!==e&&e[0]&&G()}),[null==d||null===(t=d.stages)||void 0===t?void 0:t[0]]);var G=function(){var e=Object(u.a)(p.a.mark((function e(){var t,n,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=null==d||null===(t=d.stages)||void 0===t?void 0:t[0],I(a),s=null==d||null===(n=d.stages)||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.children)||void 0===o?void 0:o[0],j(s),F.id=(null==s?void 0:s.id)||(null==a?void 0:a.id),U(Object(r.a)({},F)),e.next=7,y(Object(r.a)(Object(r.a)({},F),{},{stage_id:F.id}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return g.a.createElement("div",null,(null==d||null===(n=d.stages)||void 0===n?void 0:n.length)>0?null:g.a.createElement(q,null),(null==d||null===(i=d.stages)||void 0===i?void 0:i.length)>0&&g.a.createElement(K.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(!1),l=null==d||null===(n=d.stages)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],c=null==l||null===(i=l.children)||void 0===i?void 0:i[0],j(c),I(l),k((null===(o=d.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==l?void 0:l.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||""),F.page=1,F.limit=10,F.id=(null==c?void 0:c.id)||t,U(Object(r.a)({},F)),e.next=9,y(Object(r.a)({},F));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},d&&d.stages.map((function(e,t){return g.a.createElement(Ye,{tab:e.name,key:null===e.id?0:e.id})}))),(null==D||null===(o=D.children)||void 0===o?void 0:o.length)>0&&g.a.createElement(K.a,{activeKey:(null==N?void 0:N.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==D||null===(n=D.children)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],j(i),F.page=1,F.limit=10,F.id=t,U(Object(r.a)({},F)),e.next=5,y(Object(r.a)({},F));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},null==D||null===(a=D.children)||void 0===a?void 0:a.map((function(e,t){return g.a.createElement(Ye,{tab:e.name,key:null===e.id?0:e.id})}))),g.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),g.a.createElement("div",{style:{padding:"20px 30px"}},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},g.a.createElement("span",{style:{color:"#9096A3"}},"作品提交时间",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},null==f?void 0:f.start_time,"~",null==f?void 0:f.end_time)),g.a.createElement("span",{style:{color:"#9096A3"}},"成绩来源",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},0===(null==f?void 0:f.score_source)?"经验值":"预测准确率")," ")),g.a.createElement(s.a,{spinning:c},null==f||null===(l=f.results)||void 0===l?void 0:l.map((function(e,t){return g.a.createElement(Xe,{StaffDetail:b,item:e,index:t})}))),g.a.createElement(We.a,{total:null==f?void 0:f.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:F.page,onChange:function(e,t){F.page=e,U(Object(r.a)({},F)),y(Object(r.a)({},F))}})))},Je=n("UfjD"),Ze=n("qHvr");t.default=Object(b.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t,user:e.user}}))((function(e){e.globalSetting;var t,n,f,b,x,S,C,k,_=e.loading,O=e.dispatch,A=e.user,L=(Object(d.a)(e,["globalSetting","loading","dispatch","user"]),Object(m.useState)({avatar_url:""})),I=Object(h.a)(L,2),M=I[0],N=I[1],j=Object(m.useState)([]),P=Object(h.a)(j,2),B=P[0],F=P[1],U=Object(v.i)().identifier,z=Object(m.useState)([]),G=Object(h.a)(z,2),W=G[0],K=G[1],q=Object(m.useState)(!0),X=Object(h.a)(q,2),Y=X[0],$=X[1],J=Object(m.useState)([]),Z=Object(h.a)(J,2),Q=Z[0],te=Z[1],ne=Object(m.useState)([]),re=Object(h.a)(ne,2),ie=re[0],oe=re[1],se=Object(m.useState)(!1),le=Object(h.a)(se,2),ce=le[0],ue=le[1],he=Object(m.useState)(!1),de=Object(h.a)(he,2),fe=de[0],pe=de[1],me=Object(m.useState)(!1),ge=Object(h.a)(me,2),ve=ge[0],ye=ge[1],be=Object(m.useState)([]),xe=Object(h.a)(be,2),we=xe[0],Ee=xe[1],Se=Object(m.useState)([]),Ce=Object(h.a)(Se,2),ke=Ce[0],_e=Ce[1],Te=Object(m.useState)([]),Oe=Object(h.a)(Te,2),Ae=Oe[0],Le=Oe[1],De=Object(m.useState)(!1),Ie=Object(h.a)(De,2),Re=Ie[0],Me=Ie[1],Ne=Object(m.useState)([]),je=Object(h.a)(Ne,2),Pe=je[0],Be=je[1],He=Object(m.useState)(),ze=Object(h.a)(He,2),Ge=ze[0],We=ze[1],Ke=Object(m.useState)(!0),Xe=Object(h.a)(Ke,2),Ye=Xe[0],Qe=Xe[1],et=Object(m.useState)(!1),tt=Object(h.a)(et,2),nt=tt[0],rt=tt[1],it=Object(m.useState)(!1),ot=Object(h.a)(it,2),at=ot[0],st=ot[1],lt=Object(m.useState)(!1),ct=Object(h.a)(lt,2),ut=ct[0],ht=ct[1],dt=Object(m.useState)(!1),ft=Object(h.a)(dt,2),pt=ft[0],mt=ft[1],gt=Object(m.useState)(!1),vt=Object(h.a)(gt,2),yt=vt[0],bt=vt[1],xt=Object(m.useState)(!0),wt=Object(h.a)(xt,2),Et=wt[0],St=wt[1],Ct=Object(v.h)(),kt=Object(m.useRef)(null);function _t(){return Tt.apply(this,arguments)}function Tt(){return(Tt=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=F,e.next=3,O({type:"competitions/getStaff",payload:{identifier:U}});case 3:return e.t1=e.sent,(0,e.t0)(e.t1),e.next=7,O({type:"competitions/getHeader",payload:{identifier:U}});case 7:t=e.sent,N(t),Object(ae.V)((null==t?void 0:t.name)||"竞赛");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ot(e){return At.apply(this,arguments)}function At(){return(At=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Le(t.id),Ae=t.id,te(t),"entrance"!==t.module_type){e.next=9;break}return e.next=6,O({type:"competitions/getItem",payload:{url:t.module_url,module_type:"entrance"}});case 6:n=e.sent,e.next=12;break;case 9:return e.next=11,O({type:"competitions/getItem",payload:{url:t.module_url}});case 11:n=e.sent;case 12:ue(!1),ye(!1),Me(!1),K(n),rt(!1),st(!1),oe(t.module_type),"chart"===t.module_type?(ue(!0),$(!1),It()):"certificate"===t.module_type?(ye(!0),ue(!1),$(!1),Ht()):"md_tab"===t.module_type?(Me(!0),$(!1),localStorage.setItem("issee","2"),ue(!1),ye(!1),Ft()):"md_shixun"===t.module_type?(rt(!0),$(!1),Ft()):"entrance"===t.module_type?(st(!0),$(!1),Ft()):($(!0),localStorage.setItem("issee","1"));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e,t,n){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(u.a)(p.a.mark((function e(t,n,r){var i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),Object(R.e)(O)){e.next=3;break}return e.abrupt("return");case 3:if(null==M||!M.is_authentication||null!=A&&null!==(i=A.userInfo)&&void 0!==i&&i.authentication){e.next=6;break}return O({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),e.abrupt("return");case 6:if(null==M||!M.enroll_url){e.next=9;break}return Object(ae.Q)(null==M?void 0:M.enroll_url),e.abrupt("return");case 9:if("ismodel"!==r){e.next=23;break}if(!0!==n.member_of_course){e.next=14;break}Object(ae.Q)("/classrooms/".concat(n.course_id)),e.next=21;break;case 14:if(n.invite_code){e.next=17;break}return c.b.info("本竞赛只面向部分学校/单位开放,你暂时没有参赛资格"),e.abrupt("return");case 17:return e.next=19,O({type:"competitions/addApplytojoincourse",payload:{invite_code:n.invite_code,student:1}});case 19:0===e.sent.status&&Object(ae.Q)("/classrooms/".concat(n.course_id));case 21:e.next=27;break;case 23:if(!0!==B.enrolled){e.next=26;break}return Object(ae.Q)(r),e.abrupt("return");case 26:ht(!0);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function It(){return Rt.apply(this,arguments)}function Rt(){return(Rt=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=pe,e.next=3,O({type:"competitions/ChartRules",payload:{identifier:U}});case 3:return e.t1=e.sent,e.next=6,(0,e.t0)(e.t1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mt(){return(Mt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Charts",payload:{identifier:U,stage_id:t}});case 2:n=e.sent,K(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(){return(Nt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Qe(!0),e.next=3,O({type:"competitions/Results",payload:Object(r.a)({identifier:U,stage_id:null==t?void 0:t.id},t)});case 3:n=e.sent,K(n),Qe(!1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jt(){return(jt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Qe(!0),e.next=3,O({type:"competitions/Results",payload:Object(r.a)({identifier:U,stage_id:null==t?void 0:t.id,module_type:"entrance"},t)});case 3:n=e.sent,K(n),Qe(!1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pt(e){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Results",payload:{identifier:U,stage_id:t}});case 2:if(n=e.sent,"1"!==localStorage.getItem("issee")){e.next=5;break}return e.abrupt("return");case 5:K(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ft(){return Ut.apply(this,arguments)}function Ut(){return(Ut=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Be,e.next=3,O({type:"competitions/TabResults",payload:{identifier:U,competition_module_id:Ae}});case 3:e.t1=e.sent,(0,e.t0)(e.t1);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ht(){return zt.apply(this,arguments)}function zt(){return(zt=Object(u.a)(p.a.mark((function e(){var t,n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Prize",payload:{identifier:U,user_id:null==A||null===(t=A.userInfo)||void 0===t?void 0:t.user_id}});case 2:n=e.sent,Ee(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(){return(Gt=Object(u.a)(p.a.mark((function e(){var t,n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Accounts",payload:{id:null==A||null===(t=A.userInfo)||void 0===t?void 0:t.user_id}});case 2:n=e.sent,_e(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vt(){return(Vt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Et){e.next=2;break}return e.abrupt("return");case 2:if(St(!1),!Wt()){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,O({type:"competitions/AddTeam",payload:{identifier:U,name:t}});case 7:(n=e.sent)&&0===n.status?(c.b.info("创建战队成功"),_t(),mt(!1)):St(!0);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(){var e,t,n,r;if(null!=A&&null!==(e=A.userInfo)&&void 0!==e&&e.is_teacher){if(null!=B&&null!==(n=B.teacher_staff)&&void 0!==n&&n.mutiple_limited&&null!=B&&B.enrolled)return c.b.info("你已经报名,不能重复报名"),St(!0),!0}else if(null!=B&&null!==(r=B.member_staff)&&void 0!==r&&r.mutiple_limited&&null!=B&&B.enrolled)return c.b.info("你已经报名,不能重复报名"),St(!0),!0;if(null!=B&&B.enroll_ended)return c.b.info("报名已截止,无需报名"),St(!0),!0;if(null!=A&&null!==(t=A.userInfo)&&void 0!==t&&t.is_teacher){if(!B.teacher_staff)return c.b.info("已禁止老师报名"),St(!0),!0}else if(null==B||!B.member_staff)return c.b.info("已禁止学生报名"),St(!0),!0}function Kt(){return(Kt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Et){e.next=2;break}return e.abrupt("return");case 2:if(!Wt()){e.next=4;break}return e.abrupt("return");case 4:return St(!1),e.next=7,O({type:"competitions/JoinTeam",payload:{identifier:U,invite_code:t}});case 7:(n=e.sent)&&0===n.status?(c.b.info("加入战队成功"),bt(!1),St(!0),_t()):St(!0);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(m.useEffect)((function(){U&&_t(),Object(ae.V)("竞赛")}),[U]),Object(m.useEffect)((function(){var e;We(1===parseInt(null==Ct||null===(e=Ct.query)||void 0===e?void 0:e.type))}),[Ct]),Object(m.useEffect)((function(){var e;if((null==M||null===(e=M.competition_modules)||void 0===e?void 0:e.length)>0){var t,n;if("赛题发布"===(null==Ct||null===(t=Ct.query)||void 0===t?void 0:t.active)){var r,i=null==M||null===(r=M.competition_modules)||void 0===r?void 0:r.find((function(e){return"赛题发布"===e.name}));if(i)return void Ot(i)}Ot(null==M||null===(n=M.competition_modules)||void 0===n?void 0:n[0])}}),[M]),g.a.createElement("div",{className:"edu-container minH500"},g.a.createElement(l.a,{className:"mt10",separator:">"},g.a.createElement(l.a.Item,null,g.a.createElement(y.a,{to:"/competitions/index"},"在线竞赛")),g.a.createElement(l.a.Item,null,M.name,M.sub_title?"-"+M.sub_title:null)),g.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},g.a.createElement(s.a,{spinning:_.effects["competitions/getHeader"]},g.a.createElement("div",{style:{height:"355px",width:"800px"}},(null==M?void 0:M.avatar_url)&&null!==(null==M?void 0:M.avatar_url)&&g.a.createElement("img",{style:{height:"355px",width:"800px"},src:D.a.IMG_SERVER+"/"+(null==M?void 0:M.avatar_url)}),!(null!=M&&M.avatar_url)&&null==(null==M?void 0:M.avatar_url)&&g.a.createElement("img",{style:{height:"355px",width:"800px"},src:D.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),g.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},g.a.createElement("p",{className:"".concat(w.a.titlesize)},M.name,M.sub_title?"-"+M.sub_title:null),g.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"奖金"),null!=M&&M.bonus?g.a.createElement("span",{style:{fontSize:"24px"}},"¥",parseInt(M&&M.bonus).toLocaleString()):g.a.createElement("span",{style:{fontSize:"24px"}},"暂无")),g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"浏览"),g.a.createElement("span",{style:{fontSize:"24px"}},parseInt(M&&M.visits_count).toLocaleString())),g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"报名"),g.a.createElement("span",{style:{fontSize:"24px"}},parseInt(M&&M.member_count).toLocaleString()))),g.a.createElement("p",{className:w.a.timesize,style:{marginTop:30}},g.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"竞赛时间:"),M.start_time,"~",M.end_time),g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"报名截止:"),M.enroll_end_time),"ended"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"已结束"):null,"nearly_published"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"未发布"):null,"progressing"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"进行中"):null,g.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(null==M?void 0:M.mode)<=2&&B.enrolled&&g.a.createElement(a.a,{onClick:function(e){var t;1===(null==M?void 0:M.mode)?Ot(null===(t=M.competition_modules)||void 0===t?void 0:t.find((function(e){return"entrance"===e.module_type}))):Lt(e,M,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:2===(null==M?void 0:M.mode)||1===(null==M?void 0:M.mode)&&(null===(t=M.competition_modules)||void 0===t||null===(n=t.filter((function(e){return"entrance"===e.module_type})))||void 0===n?void 0:n.length)>0?"":"none"},className:w.a.buttonsize},1===(null==M?void 0:M.mode)&&"赛题入口",2===(null==M?void 0:M.mode)&&"进入课堂"),"ended"===M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"已结束"):null,"nearly_published"===M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"未发布"):null,"nearly_published"!==M.competition_status&&M.enroll_end&&"ended"!==M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"报名截止"):null,"progressing"===M.competition_status&&1!=M.enroll_end?g.a.createElement(a.a,{type:"primary",disabled:B.enrolled&&!M.need_attachment,className:w.a.buttonsize,onClick:function(e){var t;B.enrolled&&M.need_attachment?null===(t=kt.current)||void 0===t||t.handleVisible():Lt(e,M,2===M.mode?"ismodel":M.personal?"personal":"/competitions/index/".concat(M.identifier,"/enroll"))}},B.enrolled?M.need_attachment?"上传作品":"已报名":null!=M&&M.enroll_url?"前往大赛官网报名":"立即报名"):null),"游客"!=A.userInfo.real_name&&!(null!=M&&M.enroll_url)&&g.a.createElement("span",{onClick:function(e){return Lt(e,M,2===M.mode?"ismodel":M.personal?"personal":"/competitions/index/".concat(M.identifier,"/enroll"))},className:w.a.myteam},Object(Ue.u)()?"参赛战队>>":"我的战队>>"))),g.a.createElement("div",{className:w.a.bootmdetail},g.a.createElement("div",{className:w.a.flex1},g.a.createElement(o.a,{selectedKeys:["".concat(Ae)]},M&&M.competition_modules&&M.competition_modules.map((function(e,t){if("enroll"!=e.module_type)return g.a.createElement(o.a.Item,{className:w.a.menuItem,onClick:function(){if(null!=e&&e.is_authentication){if(!Object(R.e)(O))return;c.b.info("加入战队才能查看")}else Ot(e)},key:e.id},e.name)})))),g.a.createElement("div",{className:w.a.flex6,style:{padding:(nt||at)&&0}},ve?g.a.createElement(Fe,{dispatch:O,userid:null==A||null===(f=A.userInfo)||void 0===f?void 0:f.user_id,Prize:we,Accounts:ke,getAccounts:function(){return Gt.apply(this,arguments)}}):null,ce?g.a.createElement(ee,{HeaderDetail:M,userinfo:A.userInfo,Editable:null==M||null===(b=M.permission)||void 0===b?void 0:b.editable,getCharts:function(e){return Mt.apply(this,arguments)},getChartRules:It,Selectkey:Ae,ChartRules:fe,ItemData:W}):null,Y?g.a.createElement(H,{ref:kt,StaffDetail:B,HeaderDetail:M,userinfo:A.userInfo,Editable:null==M||null===(x=M.permission)||void 0===x?void 0:x.editable,ItemData:W,setIssee:$,ModelType:ie,dispatch:O}):null,Y||nt||at||ce||ve||Re?null:g.a.createElement(V,{userinfo:A.userInfo,ModelType:ie,getrightdatas:Ot,dispatch:O,MenuItem:Q,setIssee:$,identifier:U,ItemData:W}),Re&&g.a.createElement(Ve,{dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(S=M.permission)||void 0===S?void 0:S.editable,getCharts:Pt,getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}),nt&&g.a.createElement(qe,{loading:Ye,dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(C=M.permission)||void 0===C?void 0:C.editable,getCharts:function(e){return Nt.apply(this,arguments)},getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}),at&&g.a.createElement($e,{loading:Ye,dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(k=M.permission)||void 0===k?void 0:k.editable,getCharts:function(e){return jt.apply(this,arguments)},getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}))),g.a.createElement(E.a,null),g.a.createElement(T,{getResults:Pt}),g.a.createElement(i.a,{visible:Ge,footer:null,width:720,title:"提示",centered:!0,onCancel:function(){return We(!1)}},g.a.createElement("div",{className:w.a.modal},g.a.createElement("div",null,"华为模型王者挑战赛黄金赛正式开启啦"),g.a.createElement("div",null,"本赛段总奖金高达",g.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"元"),g.a.createElement("div",null,"1、符合赛题要求的队伍(共25支)可获得奖金:12000RMB/队 ;"),g.a.createElement("div",null,"2、参与获得“荣耀殿堂”榜主的队伍,可获得由中国软件开源创新大赛组委会颁发的黄金宝箱;"),g.a.createElement("div",null,"3、各赛题精度最高的队伍,可获得由中国软件开源创新大赛组委会颁发的黄金宝箱+荣誉证书;"),g.a.createElement("div",null,"心动吧,那就快点击下方按钮报名参赛"),g.a.createElement(a.a,{type:"primary",onClick:function(){return Object(ae.Q)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"前往报名参赛"))),g.a.createElement(i.a,{title:"选择参赛方式",visible:ut,onCancel:function(){ht(!1)},footer:!1},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},g.a.createElement(a.a,{type:"primary",style:{height:40},onClick:function(){bt(!0),ht(!1)}},"加入战队参赛"),g.a.createElement(a.a,{style:{height:40},onClick:function(){mt(!0),ht(!1)}},"去创建战队参赛"))),yt?g.a.createElement(Je.a,{isjoin:yt,setJoin:bt,JoinTeams:function(e){return Kt.apply(this,arguments)}}):null,pt?g.a.createElement(Ze.a,{isAddmodle:pt,setIsAdd:mt,createTeam:function(e){return Vt.apply(this,arguments)}}):null)}))},GRuw:
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha224.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(/*! ./core */"Ib8C"),n(/*! ./sha256 */"lPiR"),i=(r=l).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),l.SHA224)},GfqC:
/*!********************************************************!*\
!*** ./node_modules/rc-upload/es/index.js + 6 modules ***!
\********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),o=n("TSYQ"),a=n.n(o);function s(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function l(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+"[]",e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot "+e.method+" "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),s(t)):e.onSuccess(s(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return n.some((function(e){var t,n,a=e.trim();return"."===a.charAt(0)?(t=r.toLowerCase(),n=a.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a}))}return!0};var f=function(e,t,n){var r=function e(r,i){i=i||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,""+i+r.name+"/")}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),w=a()((v(e={},o,!0),v(e,o+"-disabled",l),v(e,s,s),e)),E=l?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},E,{className:w,role:"button",style:u}),i.a.createElement("input",p({},(t=x,Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t[n]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),t}(r.Component),w=Object.assign||function(e){for(var t=1;t=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;o>>i&1)),a.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=i.getRSBlocks(e,t),s=new o,c=0;c8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(l.PAD0,8),s.getLengthInBits()>=8*h));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),l=new Array(t.length),c=0;c=0?p.get(m):0}}var g=0;for(d=0;d>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=h.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},p=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,c=e.min(4*l,o);if(l){for(var h=0;h=0;)t^=p.G15<=0;)t^=p.G18<>>=1;return t},getPatternPosition:function(e){return p.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case h:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case f:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new i([1],0),n=0;n5&&(n+=3+o-5)}for(r=0;rn)){e.next=7;break}return i.b.info("文件超过".concat(n/1024/1024/1024,"GB,不符合上传要求")),e.abrupt("return",!1);case 7:return v.push({name:t.name,file:t}),b(Object(o.a)(v)),u.onChange(v),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},O=function(){var e=Object(c.a)(d.a.mark((function e(t,n){var r,a,s,l,c,h,f,p,g;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.file_name=t.name,f=t.name,e.next=4,Object(m.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if((p=e.sent).data=JSON.parse(S(p.data)),0===(null==p?void 0:p.status)){e.next=12;break}return v[v.findIndex((function(e){return e.name===f}))].status="error",v[v.findIndex((function(e){return e.name===f}))].file.status="error",u.onChange(v),i.b.warn("上传失败,请重新尝试"),e.abrupt("return");case 12:return k=new w.a({endpoint:null==p||null===(r=p.data)||void 0===r?void 0:r.end_point,region:null==p||null===(a=p.data)||void 0===a?void 0:a.region,accessKeyId:null==p||null===(s=p.data)||void 0===s?void 0:s.access_key_id,accessKeySecret:null==p||null===(l=p.data)||void 0===l?void 0:l.access_key_secret,bucket:null==p||null===(c=p.data)||void 0===c?void 0:c.bucket,stsToken:null==p||null===(h=p.data)||void 0===h?void 0:h.security_token}),console.log(t,"file"),_(k),g=Object(y.a)(),e.abrupt("return",new Promise((function(e,r){try{var a;k.multipartUpload("".concat(u.identifier,"/").concat(g).concat(f.indexOf(".")>-1?"."+f.split(".").pop():""),new Blob([t.file],{type:t.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,t,n){try{console.log("进度",e,t,n);var r=v.findIndex((function(e){return e.name===f}));v[r].file.percent=100*e,v[r].tempCheckpoint=t,b(Object(o.a)(v))}catch(e){}},checkpoint:v[v.findIndex((function(e){return e.name===f}))].tempCheckpoint,callback:{customValue:{id:f+""},url:null==p||null===(a=p.data)||void 0===a?void 0:a.callback_url,host:null==p?void 0:p.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(n)}}).then((function(n){var r,o=v.findIndex((function(e){return e.name===f})),a="done";if(0===(null===(r=n.data)||void 0===r?void 0:r.status)){var s;t.response=null===(s=n.data)||void 0===s?void 0:s.data;var l=v.findIndex((function(e){return e.name===f}));v[l].status="done",v[l].file.status="done"}else{var c;i.b.warn(null===(c=n.data)||void 0===c?void 0:c.message),a="error"}v[o].status=a,v[o].file.status=a,u.onChange(v),e(null==n?void 0:n.data)})).catch((function(e){v[v.findIndex((function(e){return e.name===f}))].status="error",v[v.findIndex((function(e){return e.name===f}))].file.status="error",i.b.warn("上传失败,请重新尝试"),b(Object(o.a)(v)),u.onChange(v),r(e),console.log("err:",e)}))}catch(e){}})));case 17:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return Object(f.useEffect)((function(){v.every((function(e){return"done"===e||"error"===e}))&&u.onComplete(v)}),[v]),Object(f.useEffect)((function(){var e;l&&(null===(e=k)||void 0===e||e.cancel())}),[l]),Object(f.useEffect)((function(){u.uploading&&v.map(function(){var e=Object(c.a)(d.a.mark((function e(t){var r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.status&&"error"!==t.status||l){e.next=6;break}return t.status="uploading",t.file.status="uploading",e.next=5,O(t,{login:null==n||null===(r=n.userInfo)||void 0===r?void 0:r.login,container_type:u.container_type,container_id:u.container_id,description:u.description});case 5:e.sent;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}),[u.uploading]),p.a.createElement(E,Object(r.a)({},T,{height:u.height,className:u.className}),p.a.createElement("p",{className:"ant-upload-hint"},u.text||"拖拽文件或者点击上传"))}))},KmYQ:
/*!***************************************************!*\
!*** ./node_modules/crypto-js/pad-zeropadding.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},LdHM:
/*!********************************************************!*\
!*** ./node_modules/rc-select/es/index.js + 6 modules ***!
\********************************************************/
/*! exports provided: Option, OptGroup, default */
/*! exports used: OptGroup, Option, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return S}));var r=n("1OyB"),i=n("vuIU"),o=n("Ji7U"),a=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,o=e.childrenAsData,a=e.values,p=e.searchValue,y=e.multiple,b=e.defaultActiveFirstOption,x=e.height,w=e.itemHeight,E=e.notFoundContent,S=e.open,C=e.menuItemSelectedIcon,k=e.virtual,_=e.onSelect,T=e.onToggleOpen,O=e.onActiveValue,A=e.onScroll,L=e.onMouseEnter,D="".concat(n,"-item"),I=Object(f.a)((function(){return i}),[S,i],(function(e,t){return t[0]&&e[1]!==t[1]})),R=s.useRef(null),M=function(e){e.preventDefault()},N=function(e){R.current&&R.current.scrollTo({index:e})},j=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=I.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(k.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,o=e.props,a=o.children,l=Object(c.a)(o,["children"]);return t||!r?_(e):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:T(a)})})).filter((function(e){return e}))}var O=n("2Qr1"),A=n("qNPg"),L=n("U8pU"),D=n("Kwbf"),I=n("WKfj");var R=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,o=e.allowClear,a=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,h=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,y=void 0!==c?c:v||"combobox"===t,b=n||T(r);if(Object(D.a)("tags"!==t||b.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var x=b.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!o||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var w=Object(I.d)(p);Object(D.a)(!f||w.every((function(e){return"object"===Object(L.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var E=null;Object(k.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(k.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(E=t.type,!1)})):(E=t,!0))})),E&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(E.displayName||E.name||E,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(A.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:T,flattenOptions:O.d,getLabeledValue:O.e,filterOptions:O.b,isValueDisabled:O.g,findValueOption:O.c,warningProps:R,fillOptionsWithMissingValue:O.a}),N=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);N.Option=w,N.OptGroup=S;var j=N;t.c=j},M8RZ:
/*!**********************************!*\
!*** ./src/components/modal.tsx ***!
\**********************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MlIO:
/*!********************************************!*\
!*** ./node_modules/crypto-js/x64-core.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(/*! ./core */"Ib8C"),i=(r=l).lib,o=i.Base,a=i.WordArray,(s=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),s.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r1&&void 0!==arguments[1]&&arguments[1];return!(!E(e)||!S(t))},E=function(e){return!!Object(h.p)()||(e({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},S=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Object(u.c)()._store.getState(),r=n.user;return!(null===(e=r.userInfo)||void 0===e||!e.profile_completed)||(o.a.confirm({title:"提示",width:530,centered:!0,content:t?"按照有关政策规定,特殊实验需要先绑定手机号才能使用,请先绑定手机号码":"您需要去完善您的个人资料,才能使用此功能",okText:"立即完善",cancelText:"稍后完善",onOk:function(){u.d.push("/account/profile/edit")}}),!1)},C=function(){var e;return!(null===(e=Object(u.c)()._store.getState().user.userInfo)||void 0===e||!e.professional_certification)||(o.a.confirm({title:"提示",centered:!0,content:c.a.createElement("div",{className:"tc"},"您需要去完成您的职业认证,才能使用此功能"),okText:"立即完善",cancelText:"稍后完善",onOk:function(){Object(d.Q)("/account/certification")}}),!1)},k=function(){return!!Object(h.a)()||(o.a.warning({centered:!0,width:530,title:"提示",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("p",null,"您可以扫码加群@群管理员,申请操作权限哦!"),c.a.createElement("img",{src:Object(h.t)()?b.a:"".concat(x.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"我知道了",maskClosable:!0}),!1)},_=function(e,t){return!!e||(o.a.confirm({centered:!0,zIndex:1e4,width:530,title:"提示",content:c.a.createElement("div",null,c.a.createElement("p",null,t||"该实践资源需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。"),c.a.createElement("div",{style:{marginLeft:"110px"}},c.a.createElement("img",{src:v.a,width:200}),c.a.createElement("div",{style:{marginLeft:"35px"}},"群号:","714336072"))),okText:"立即联系",cancelText:"取消",onOk:function(){Object(d.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(u.c)()._store.getState(),a=n.shixunsDetail.detail;return 2===(null==a?void 0:a.public)||1===(null==a?void 0:a.public)||3===(null==a?void 0:a.shixun_status)?(o.a.info({centered:!0,icon:c.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"提示",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},c.a.createElement("span",null,"该实践项目的状态为",2===(null==a?void 0:a.public)?"已公开":1===(null==a?void 0:a.public)?"待审核":"已关闭",",",t,"。"),c.a.createElement("p",null,"如有需要,请联系平台管理员进行技术支持。")),c.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:m.a,alt:"二维码",width:160})),okText:"我知道了"}),!0):2===(null==a?void 0:a.shixun_status)&&(o.a.confirm({centered:!0,icon:c.a.createElement(f.a,null),title:"提示",content:c.a.createElement("div",null,c.a.createElement("span",null,"该实践项目已发布,",t,"。"),c.a.createElement("br",null),c.a.createElement("span",null,"如有需要,您可以撤销发布后,再进行操作。")),okText:"撤销发布",cancelText:"取消",onOk:function(){var t;o.a.confirm({width:440,centered:!0,icon:c.a.createElement(f.a,{style:{color:"#faad14"}}),title:"提示",content:"撤销发布后,学员将无法进行练习。是否确认撤销发布?",okText:"确定撤销发布",cancelText:"取消",onOk:(t=Object(i.a)(s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({type:"shixunsDetail/cancelRelease",payload:{id:null==a?void 0:a.identifier}});case 2:401!==t.sent.status&&(r.b.success("撤销发布成功。实训回到未发布的状态。"),e({type:"shixunsDetail/getShixunsDetail",payload:{id:null==a?void 0:a.identifier}}),e({type:"practiceSetting/getCommonData",payload:{id:null==a?void 0:a.identifier}}));case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}}),!0)}},NnUe:
/*!********************************************************************!*\
!*** ./src/pages/Competitions/Detail/component/index.less?modules ***!
\********************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:
/*!******************************************************!*\
!*** ./node_modules/rc-tree/es/utils/conductUtil.js ***!
\******************************************************/
/*! exports provided: isCheckDisabled, conductCheck */
/*! exports used: conductCheck */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function o(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function a(e,t,n,a){var s,l=[];s=a||o;var c=new Set(e.filter((function(e){var t=!!n[e];return t||l.push(e),t}))),u=new Map,h=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(t),h=Math.max(h,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,n,r){for(var o=new Set(e),a=new Set,s=0;s<=n;s+=1){(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,a=void 0===i?[]:i;o.has(t)&&!r(n)&&a.filter((function(e){return!r(e.node)})).forEach((function(e){o.add(e.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);i&&!n&&(i=!1),s||!n&&!a.has(t)||(s=!0)})),i&&o.add(t.key),s&&a.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(a,o))}}(c,u,h,s):function(e,t,n,r,o){for(var a=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;a.has(t)||s.has(t)||o(n)||i.filter((function(e){return!o(e.node)})).forEach((function(e){a.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!o(n)&&e.parent&&!c.has(e.parent.key))if(o(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!o(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||a.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(s,a))}}(c,t.halfCheckedKeys,u,h,s)}},OLod:
/*!***********************************************!*\
!*** ./node_modules/crypto-js/cipher-core.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./evpkdf */"K3mO"),void(r.lib.Cipher||function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=t.enc,l=(s.Utf8,s.Base64),c=t.algo.EvpKDF,u=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),h=(n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),d=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=h.CBC=function(){var e=d.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},m=(n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(l)},parse:function(e){var t,n=l.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=c.create({keySize:t+n}).compute(e,r),a=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,m.create({key:i,iv:a,salt:r})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))},OZM5:
/*!*****************************************!*\
!*** ./node_modules/rc-tree/es/util.js ***!
\*****************************************/
/*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */
/*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return h})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),o=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function a(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function h(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function d(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,o=r.bottom,a=r.height,s=Math.max(.25*a,2);return n<=i+s?-1:n>=o-s?1:0}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(o.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var o=i.parent;i.node.disabled||o&&e(o.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},Ot1p:
/*!**************************************************************!*\
!*** ./src/components/markdown-editor/index.tsx + 6 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/qrcode.react/lib/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),o=(n("miYZ"),n("tsqr")),a=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=(n("Q9mQ"),n("diRs")),b=n("0Owb"),x=(n("dejd"),n("C+DQ"),n("D1Df")),w=n.n(x),E=n("1vsH"),S=n("m3rI"),C=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function k(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,o=e.className,a=void 0===o?"":o,s=e.children;return d.a.createElement("a",{title:n,className:a,onClick:function(){t(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var _=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,o=e.insertTemp,a=e.hidetoolBar,s=e.uuid,l=e.setOpenPhones,c=Object(E.E)("_educoder_session_login"),u=Object(E.E)("_educoder_session"),h=[].concat(C,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!a&&h.map((function(e,t){return d.a.createElement("li",{key:t},e.actionName?d.a.createElement(k,Object(b.a)({},e,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,o&&d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(o),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",null,d.a.createElement(y.a,{title:"打开手机扫一扫",content:d.a.createElement("div",null,d.a.createElement("span",{style:{display:"none"}},"test----",location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(S.a.API_SERVER)),d.a.createElement(w.a,{size:150,fgColor:"#000",value:location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(S.a.API_SERVER)}))},d.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return l(!0)}},"手机上传文件"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(k,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},T=n("M8RZ"),O=(n("+L6B"),n("2/Rp")),A=(n("y8nQ"),n("Vl3Y")),L=(n("5NDa"),n("5rEg")),D={labelCol:{span:4},wrapperCol:{span:20}},I=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(A.a,Object(b.a)({},D,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),d.a.createElement(A.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(L.a,null)),d.a.createElement(A.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(L.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))},R=n("7ahc"),M=n("k1fw"),N=(n("HmJG"),n("BjJ7")),j=A.a.useForm,P={width:280,marginRight:10},B={labelCol:{span:5},wrapperCol:{span:19}},F=function(e){var t=e.callback,n=e.onCancel,r=j(),i=Object(s.a)(r,1)[0],o=Object(h.useRef)();function a(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id,"?type=").concat(e.content_type),type:t.type})}return d.a.createElement(A.a,Object(b.a)({form:i},B,{className:"upload-image-panel",onFinish:function(e){t(Object(M.a)(Object(M.a)({},e),{},{name:o.current}))}}),d.a.createElement(A.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(A.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(L.a,{style:P})),d.a.createElement(U,{onFileChange:function(e){var t=e.target.files[0];o.current=t.name,H(t,a)}}))),d.a.createElement(A.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(L.a,{style:{width:264}})),d.a.createElement(A.a.Item,{style:{textAlign:"right"}},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))};function U(e){var t=e.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:t}))}function H(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(N.a,"/api/attachments.json")),r.send(n)}n("giR+");var z,G,V=n("fyUT"),W=(n("7Kak"),n("9yH6")),K=W.a.Group,q={margin:"0 8px"},X=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(A.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:q},"单元格数:"),d.a.createElement("span",{style:q},"行数"),d.a.createElement(A.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(V.a,null)),d.a.createElement("span",{style:q},"列数"),d.a.createElement(A.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(V.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:q},"对齐方式:"),d.a.createElement(A.a.Item,{name:"align"},d.a.createElement(K,null,d.a.createElement(W.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(W.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(W.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(W.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))},Y=n("ErOA"),$=n("7Cbv"),J="------------",Z={default:J,left:":".concat(J),center:":".concat(J,":"),right:"".concat(J,":")},Q=n("9VGf");function ee(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var te=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ne=["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"],re=(z={},Object(l.a)(z,te+"-B","bold"),Object(l.a)(z,te+"-I","italic"),z),ie=(G={},Object(l.a)(G,"link","添加链接"),Object(l.a)(G,"code-block","添加代码块"),Object(l.a)(G,"upload-image","添加文件"),Object(l.a)(G,"add-table","添加表格"),G);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,c=e.onChange,f=e.width,y=void 0===f?"100%":f,b=e.height,x=void 0===b?400:b,w=e.miniToolbar,E=void 0!==w&&w,C=e.isFocus,k=void 0!==C&&C,O=e.watch,A=e.insertTemp,L=e.mode,D=void 0===L?"markdown":L,M=e.id,N=void 0===M?"markdown-editor-id":M,j=e.showResizeBar,P=void 0!==j&&j,B=e.noStorage,U=void 0!==B&&B,z=e.showNullButton,G=void 0!==z&&z,V=e.hidetoolBar,W=void 0!==V&&V,K=e.fullScreen,q=void 0!==K&&K,J=e.onBlur,te=e.onCMBeforeChange,oe=e.onFullScreen,ae=e.className,se=void 0===ae?"":ae,le=e.disablePaste,ce=void 0!==le&&le,ue=e.placeholder,he=void 0===ue?"":ue,de=e.values,fe=void 0===de?"":de,pe=Object(h.useState)(null),me=Object(s.a)(pe,2),ge=me[0],ve=me[1],ye=Object(h.useState)(n),be=Object(s.a)(ye,2),xe=be[0],we=be[1],Ee=Object(h.useState)(O),Se=Object(s.a)(Ee,2),Ce=Se[0],ke=Se[1],_e=Object(h.useState)(q),Te=Object(s.a)(_e,2),Oe=Te[0],Ae=Te[1],Le=Object(h.useState)(""),De=Object(s.a)(Le,2),Ie=De[0],Re=De[1],Me=Object(h.useState)(0),Ne=Object(s.a)(Me,2),je=Ne[0],Pe=Ne[1],Be=Object(h.useState)(x),Fe=Object(s.a)(Be,2),Ue=Fe[0],He=Fe[1],ze=Object(h.useState)(!1),Ge=Object(s.a)(ze,2),Ve=(Ge[0],Ge[1]),We=Object(h.useRef)(Object($.a)()),Ke=Object(h.useRef)(!1),qe=Object(h.useRef)(),Xe=Object(h.useRef)(),Ye=Object(h.useRef)(),$e=Object(h.useRef)(),Je=Object(h.useRef)(),Ze=function(){var e=Object(a.a)(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:We.current}});case 2:null!=(n=e.sent)&&null!==(t=n.attachments)&&void 0!==t&&t.length&&(console.log("cm:",ge,Xe),n.attachments.map((function(e){e.content_type.indexOf("image")>-1?ge.replaceSelection(".concat(e.content_type,")")):e.content_type.indexOf("video")>-1?ge.replaceSelection('')):e.content_type.indexOf("pdf")>-1?ge.replaceSelection('').concat(e.name,"")):ge.replaceSelection("[".concat(e.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(h.useEffect)((function(){we(fe),null==ge||ge.setValue(fe)}),[fe]),Object(h.useEffect)((function(){null==oe||oe(Oe)}),[Oe]),Object(h.useEffect)((function(){if(Xe.current){var e=p.a.fromTextArea(Xe.current,{mode:D,lineNumbers:!E,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ce){var r=n.clipboardData;if(r){var i=r.types.toString(),a=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==D)return;try{var s,l=a[1];"file"===(null===(s=a[0])||void 0===s?void 0:s.kind)&&(l=a[0]);var c=l.getAsFile(),u=c.name.split(".").pop();H(c,(function(t){var n,r,i;t.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection(".concat(t.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('').concat(c.name,"")):ne.includes(u)?e.replaceSelection('').concat(c.name,"")):e.replaceSelection("[".concat(c.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){o.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return k&&e.focus(),e.on("paste",t),e.on("dragleave",(function(e,t){Ye.current.classList.remove("mouse-hover-md")})),e.on("dragover",(function(e,t){Ye.current.classList.add("mouse-hover-md")})),e.on("drop",(function(t,n){var r;if(Ye.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(t){var n=r[t],i=n.name.split(".").pop();H(n,(function(t){var r,o,a;t.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection(".concat(t.content_type,")")):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("video"))>-1?e.replaceSelection('')):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?e.replaceSelection('').concat(n.name,"")):ne.includes(i)?e.replaceSelection('').concat(n.name,"")):e.replaceSelection("[".concat(n.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))},o=0;o0||r.target.offsetWidth>0)&&(Qe(),ge.setSize("100%","100%"),ge.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(Xe.current.parentElement),e}();return function(){e.unobserve(Xe.current.parentElement)}}}),[ge,Qe]),Object(h.useEffect)((function(){if(ge){for(var e=[],t=function(){var t=r[n],i=(o=Object(s.a)(t,2))[0],a=o[1],c=Object(l.a)({},i,(function(){et(a)}));e.push(c),ge.addKeyMap(c)},n=0,r=Object.entries(re);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(N);e>=je+1e4&&(!t||t!==xe)&&(window.sessionStorage.setItem(N,xe),Ve(!0))}}),1e4),Object(h.useEffect)((function(){ke(O)}),[ge,O]),Object(h.useEffect)((function(){ge&&k&&ge.focus()}),[ge,k]),Object(h.useEffect)((function(){if(Ce&&ge){var e=ge.getScrollerElement();function t(e){var t=e.target;if(Je.current){var n=t.scrollTop/t.scrollHeight;Je.current.scrollTop=Je.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[ge,Ce]),Object(h.useEffect)((function(){if(ge&&te){function e(e,t){te(e,t)}return ge.on("beforeChange",e),function(){ge.off("beforeChange",e)}}}),[ge,te]),Object(h.useEffect)((function(){if(ge&&J){function e(){J(ge.getValue())}return ge.on("blur",e),function(){ge.off("blur",e)}}}),[ge,J]),Object(h.useEffect)((function(){if(ge){function e(e){var t=e.getValue();we(t),Pe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(t)}return ge.on("change",e),function(){ge.off("change",e)}}}),[ge,c]),Object(h.useEffect)((function(){ge&&(null==n?(ge.setValue(""),we("")):n!==ge.getValue()&&(ge.setValue(n),we(n),ge.setCursor(ge.lineCount(),0)))}),[ge,n]);var et=Object(h.useCallback)((function(e){var t=ge.getCursor(),n=ge.getSelection(),r=n.split("\n");switch(e){case"bold":return ge.replaceSelection("**"+n+"**"),""===n&&ge.setCursor(t.line,t.ch+2),ge.focus();case"italic":return ge.replaceSelection("*"+n+"*"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"code":return ge.replaceSelection("`"+n+"`"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"inline-latex":return ge.replaceSelection("`$$"+n+"$$`"),""===n&&ge.setCursor(t.line,t.ch+3),ge.focus();case"latex":return ge.replaceSelection("```latex\n"+n+"\n```"),ge.setCursor(t.line+1,n.length+1),ge.focus();case"line-break":return ge.replaceSelection("
\n"),ge.focus();case"list-ul":return""===n?ge.replaceSelection("- "+n):ge.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ge.focus();case"list-ol":return""===n?ge.replaceSelection("1. "+n):ge.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ge.focus();case"add-null-ch":return""===n&&ge.setCursor(t.line,t.ch+1),ge.replaceSelection("▁"),ge.focus();case"inster-template-1":return""===n&&ge.setCursor(t.line,t.ch),ge.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),ge.focus();case"eraser":return ge.setValue(""),ge.focus();case"trigger-watch":return ke(!Ce),ge.focus();case"trigger-full-screen":return Ae(!Oe),ge.focus();case"link":return void Re("link");case"code-block":return void Re("code-block");case"upload-image":return void Re("upload-image");case"add-table":return void Re("add-table");default:throw new Error}}),[ge,Ce,Oe]),tt=Object(h.useCallback)((function(e){switch(Re(""),Ie){case"link":var t=e.title,n=e.link;return ge.replaceSelection("[".concat(t,"](").concat(n,")")),ge.focus();case"code-block":var r=e.language,i=e.content;return ge.replaceSelection(["```"+r,i,"```"].join("\n")),ge.focus();case"upload-image":var o=e.src,a=e.alt,s=e.name;return o.indexOf("type=image")>-1?ge.replaceSelection(".concat(o,' "').concat(a||"",'" )')):o.indexOf("type=application/pdf")>-1?ge.replaceSelection('').concat(s,"")):ge.replaceSelection('').concat(s,"")),ge.focus();case"add-table":for(var l=e.row,c=e.col,u=e.align,h="\n",d=0;d300&&(r=300),He(x+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",o),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)}}}),[ge,$e]),Object(h.useEffect)((function(){He(x)}),[x]);var it={width:ee(y),height:ee(Ue)};Object(h.useMemo)((function(){if(je){var e=new Date(je),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[je]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ye},d.a.createElement("div",{className:"markdown-editor-container ".concat(se," ").concat(Ce?"on-preview":""," ").concat(E?"mini":""," ").concat(Oe?"full-screen":""),style:it},d.a.createElement(_,{insertTemp:A,watch:Ce,fullScreen:Oe,showNullButton:G,onActionCallback:et,hidetoolBar:W,uuid:We.current,setOpenPhones:function(){Ke.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Xe,placeholder:he})),Ce?d.a.createElement("div",{ref:Je,className:"preview-container"},"stex"===D&&d.a.createElement(v,{value:xe}),"stex"!==D&&d.a.createElement(g.a,{edit:!0,value:xe,replaces:function(e,t){var n=ge.getValue();n=n.replace(e,t),we(n),null==ge||ge.setValue(n)}})):null))),P?d.a.createElement("a",{ref:$e,className:"editor-resize"}):null,d.a.createElement(T.a,null,ie[Ie]?d.a.createElement(r.a,{centered:!0,title:ie[Ie],visible:!0,onCancel:rt,footer:null},nt):null))}},PVpz:
/*!*************************************************!*\
!*** ./node_modules/crypto-js/rabbit-legacy.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(r[0]^=c,r[1]^=h,r[2]^=u,r[3]^=d,r[4]^=c,r[5]^=h,r[6]^=u,r[7]^=d,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},RxwV:
/*!**********************************************************!*\
!*** ./node_modules/rc-cascader/es/index.js + 4 modules ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/array-tree-filter/lib/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("q1tI"),i=n("uciX"),o=n("2W6z"),a=n.n(o),s=n("4IlW"),l=n("uK0f"),c=n.n(l);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n0;(d||!1===e.isLeaf)&&(u+=" ".concat(i,"-menu-item-expand"),e.loading||(h=r.createElement("span",{className:"".concat(i,"-menu-item-expand-icon")},a))),"hover"!==o||!d&&!1!==e.isLeaf||(c={onMouseEnter:this.delayOnSelect.bind(this,l),onMouseLeave:this.delayOnSelect.bind(this),onClick:l}),this.isActiveOption(e,t)&&(u+=" ".concat(i,"-menu-item-active"),c.ref=this.saveMenuItem(t)),e.disabled&&(u+=" ".concat(i,"-menu-item-disabled"));var f=null;e.loading&&(u+=" ".concat(i,"-menu-item-loading"),f=s||null);var p="";return"title"in e?p=e.title:"string"==typeof e[this.getFieldName("label")]&&(p=e[this.getFieldName("label")]),r.createElement("li",Object.assign({key:e[this.getFieldName("value")],className:u,title:p},c,{role:"menuitem",onMouseDown:function(e){return e.preventDefault()}}),e[this.getFieldName("label")],h,f)}},{key:"getActiveOptions",value:function(e){var t=this,n=this.props.options,r=e||this.props.activeValue;return c()(n,(function(e,n){return e[t.getFieldName("value")]===r[n]}),{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var e=this,t=this.props.options,n=this.getActiveOptions().map((function(t){return t[e.getFieldName("children")]})).filter((function(e){return!!e}));return n.unshift(t),n}},{key:"delayOnSelect",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=o.length?0:l:(l-=1)<0?o.length-1:l:0,r[i]=o[l][t.getFieldName("value")]}else if(e.keyCode===s.a.LEFT||e.keyCode===s.a.BACKSPACE)e.preventDefault(),r.splice(r.length-1,1);else if(e.keyCode===s.a.RIGHT)e.preventDefault(),o[a]&&o[a][t.getFieldName("children")]&&r.push(o[a][t.getFieldName("children")][0][t.getFieldName("value")]);else if(e.keyCode===s.a.ESC||e.keyCode===s.a.TAB)return void t.setPopupVisible(!1);r&&0!==r.length||t.setPopupVisible(!1);var c=t.getActiveOptions(r),u=c[c.length-1];t.handleMenuSelect(u,c.length-1,e),t.props.onKeyDown&&t.props.onKeyDown(e)}else t.setPopupVisible(!0)}},t.saveTrigger=function(e){t.trigger=e};var n=[];return"value"in e?n=e.value||[]:"defaultValue"in e&&(n=e.defaultValue||[]),a()(!("filedNames"in e),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),t.state={popupVisible:e.popupVisible,activeValue:n,value:n,prevProps:e},t.defaultFieldNames={label:"label",value:"value",children:"children"},t}return t=u,o=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};return"value"in e&&!function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r0?p=r.createElement(y,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):m=" ".concat(t,"-menus-empty");var g=p;return d&&(g=d(p)),r.createElement(i.a,Object.assign({ref:this.saveTrigger},f,{popupPlacement:u,builtinPlacements:c,popupTransitionName:n,action:l?[]:["click"],popupVisible:!l&&this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(t,"-menus"),popupClassName:o+m,popup:g}),r.cloneElement(h,{onKeyDown:this.handleKeyDown,tabIndex:l?void 0:0}))}}])&&C(t.prototype,n),o&&C(t,o),u}(r.Component)).defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:b,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},A);t.a=L},S6kV:
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-ofb.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;a.hasOwnProperty(f)||(o.push(d),a[f]=null)}o.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,o=e.length;i122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var d=[],f=[];for(o=0;op[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.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")),i=r.length,o=[],a=0,s=0;a=2&&"["===d?r[a]=c(h):"\\"!==d&&(r[a]=h.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var h=[];for(i=0,o=e.length;i=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y="src"),g||(f[v]=y)}var S=u;if(u+=v.length,g){var C=b[1],k=v.indexOf(C),_=k+C.length;b[2]&&(k=(_=v.length-b[2].length)-C.length);var T=y.substring(5);d(l,s+S,v.substring(0,k),o,c),d(l,s+S+k,C,w(T,C),c),d(l,s+S+_,v.substring(_),o,c)}else c.push(s+S,y)}e.decorations=c};return o}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var o=i>1?"":"\n\r",a=o?".":"[\\S\\s]",s="/(?=[^/*"+o+"])(?:[^/\\x5B\\x5C"+o+"]|\\x5C"+a+"|\\x5B(?:[^\\x5C\\x5D"+o+"]|\\x5C"+a+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),m(t,n)}var v=g({keywords:[r,o,i,a,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,o=e.ownerDocument,a=o.createElement("li");e.firstChild;)a.appendChild(e.firstChild);var s=[a];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var a=e.nodeValue,s=a.match(i);if(s){var u=a.substring(0,s.index);e.nodeValue=u;var h=a.substring(s.index+s[0].length);if(h)e.parentNode.insertBefore(o.createTextNode(h),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var d=e.firstChild;d;d=d.nextSibling)l(d)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var o=e(i,1),a=t.nextSibling;o.appendChild(r);for(var s=a;s;s=a)a=s.nextSibling,o.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u=0;){var i=n[r];b.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):b[i]=t}}function w(e,t){return e&&b.hasOwnProperty(e)||(e=/^\s*=x&&(u+=2),s>=w&&(f+=2)}}finally{v&&(v.style.display=y)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function S(e,t,n){var r=n||!1,i=t||null,o=document.createElement("div");return o.innerHTML=""+e+"
",o=o.firstChild,r&&y(o,r,!0),E({langExtension:i,numberLines:r,sourceNode:o,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),o.innerHTML}function C(t,n){var r=n||document.body,i=r.ownerDocument||document;function o(e){return r.getElementsByTagName(e)}for(var a=[o("pre"),o("code"),o("xmp")],s=[],l=0;l]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^