|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[186,6,7,16,20],{"+NIl":function(a,G,d){(function(f){f(d("VrN/"))})(function(f){"use strict";f.defineMode("stex",function(i,O){"use strict";function C(v,_){v.cmdState.push(_)}function x(v){return v.cmdState.length>0?v.cmdState[v.cmdState.length-1]:null}function m(v){var _=v.cmdState.pop();_&&_.closeBracket()}function h(v){for(var _=v.cmdState,S=_.length-1;S>=0;S--){var k=_[S];if(k.name=="DEFAULT")continue;return k}return{styleIdentifier:function(){return null}}}function s(v,_,S){return function(){this.name=v,this.bracketNo=0,this.style=_,this.styles=S,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var l={};l.importmodule=s("importmodule","tag",["string","builtin"]),l.documentclass=s("documentclass","tag",["","atom"]),l.usepackage=s("usepackage","tag",["atom"]),l.begin=s("begin","tag",["atom"]),l.end=s("end","tag",["atom"]),l.label=s("label","tag",["atom"]),l.ref=s("ref","tag",["atom"]),l.eqref=s("eqref","tag",["atom"]),l.cite=s("cite","tag",["atom"]),l.bibitem=s("bibitem","tag",["atom"]),l.Bibitem=s("Bibitem","tag",["atom"]),l.RBibitem=s("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function u(v,_){v.f=_}function o(v,_){var S;if(v.match(/^\\[a-zA-Z@]+/)){var k=v.current().slice(1);return S=l.hasOwnProperty(k)?l[k]:l.DEFAULT,S=new S,C(_,S),u(_,p),S.style}if(v.match(/^\\[$&%#{}_]/))return"tag";if(v.match(/^\\[,;!\/\\]/))return"tag";if(v.match("\\["))return u(_,function(M,I){return g(M,I,"\\]")}),"keyword";if(v.match("\\("))return u(_,function(M,I){return g(M,I,"\\)")}),"keyword";if(v.match("$$"))return u(_,function(M,I){return g(M,I,"$$")}),"keyword";if(v.match("$"))return u(_,function(M,I){return g(M,I,"$")}),"keyword";var T=v.next();if(T=="%")return v.skipToEnd(),"comment";if(T=="}"||T=="]"){if(S=x(_),S)S.closeBracket(T),u(_,p);else return"error";return"bracket"}else return T=="{"||T=="["?(S=l.DEFAULT,S=new S,C(_,S),"bracket"):/\d/.test(T)?(v.eatWhile(/[\w.%]/),"atom"):(v.eatWhile(/[\w\-_]/),S=h(_),S.name=="begin"&&(S.argument=v.current()),S.styleIdentifier())}function g(v,_,S){if(v.eatSpace())return null;if(S&&v.match(S))return u(_,o),"keyword";if(v.match(/^\\[a-zA-Z@]+/))return"tag";if(v.match(/^[a-zA-Z]+/))return"variable-2";if(v.match(/^\\[$&%#{}_]/))return"tag";if(v.match(/^\\[,;!\/]/))return"tag";if(v.match(/^[\^_&]/))return"tag";if(v.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(v.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var k=v.next();return k=="{"||k=="}"||k=="["||k=="]"||k=="("||k==")"?"bracket":k=="%"?(v.skipToEnd(),"comment"):"error"}function p(v,_){var S=v.peek(),k;return S=="{"||S=="["?(k=x(_),k.openBracket(S),v.eat(S),u(_,o),"bracket"):/[ \t\r]/.test(S)?(v.eat(S),null):(u(_,o),m(_),o(v,_))}return{startState:function(){var v=O.inMathMode?function(_,S){return g(_,S)}:o;return{cmdState:[],f:v}},copyState:function(v){return{cmdState:v.cmdState.slice(),f:v.f}},token:function(v,_){return _.f(v,_)},blankLine:function(v){v.f=o,v.cmdState.length=0},lineComment:"%"}}),f.defineMIME("text/x-stex","stex"),f.defineMIME("text/x-latex","stex")})},"19Vz":function(a,G,d){(function(f){f(d("VrN/"))})(function(f){f.defineOption("placeholder","",function(s,l,u){var o=u&&u!=f.Init;if(l&&!o)s.on("blur",x),s.on("change",m),s.on("swapDoc",m),f.on(s.getInputField(),"compositionupdate",s.state.placeholderCompose=function(){C(s)}),m(s);else if(!l&&o){s.off("blur",x),s.off("change",m),s.off("swapDoc",m),f.off(s.getInputField(),"compositionupdate",s.state.placeholderCompose),i(s);var g=s.getWrapperElement();g.className=g.className.replace(" CodeMirror-empty","")}l&&!s.hasFocus()&&x(s)});function i(s){s.state.placeholder&&(s.state.placeholder.parentNode.removeChild(s.state.placeholder),s.state.placeholder=null)}function O(s){i(s);var l=s.state.placeholder=document.createElement("pre");l.style.cssText="height: 0; overflow: visible",l.style.direction=s.getOption("direction"),l.className="CodeMirror-placeholder CodeMirror-line-like";var u=s.getOption("placeholder");typeof u=="string"&&(u=document.createTextNode(u)),l.appendChild(u),s.display.lineSpace.insertBefore(l,s.display.lineSpace.firstChild)}function C(s){setTimeout(function(){var l=!1,u=s.getInputField();u.nodeName=="TEXTAREA"?l=!u.value:s.lineCount()==1&&(l=!/[^\u200b]/.test(u.querySelector(".CodeMirror-line").textContent)),l?O(s):i(s)},20)}function x(s){h(s)&&O(s)}function m(s){var l=s.getWrapperElement(),u=h(s);l.className=l.className.replace(" CodeMirror-empty","")+(u?" CodeMirror-empty":""),u?O(s):i(s)}function h(s){return s.lineCount()===1&&s.getLine(0)===""}})},"1eCo":function(a,G,d){(function(f){f(d("VrN/"))})(function(f){"use strict";var i={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},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};f.defineMode("xml",function(C,x){var m=C.indentUnit,h={},s=x.htmlMode?i:O;for(var l in s)h[l]=s[l];for(var l in x)h[l]=x[l];var u,o;function g(Z,ce){function he(ne){return ce.tokenize=ne,ne(Z,ce)}var V=Z.next();if(V=="<")return Z.eat("!")?Z.eat("[")?Z.match("CDATA[")?he(_("atom","]]>")):null:Z.match("--")?he(_("comment","-->")):Z.match("DOCTYPE",!0,!0)?(Z.eatWhile(/[\w\._\-]/),he(S(1))):null:Z.eat("?")?(Z.eatWhile(/[\w\._\-]/),ce.tokenize=_("meta","?>"),"meta"):(u=Z.eat("/")?"closeTag":"openTag",ce.tokenize=p,"tag bracket");if(V=="&"){var ve;return Z.eat("#")?Z.eat("x")?ve=Z.eatWhile(/[a-fA-F\d]/)&&Z.eat(";"):ve=Z.eatWhile(/[\d]/)&&Z.eat(";"):ve=Z.eatWhile(/[\w\.\-:]/)&&Z.eat(";"),ve?"atom":"error"}else return Z.eatWhile(/[^&<]/),null}g.isInText=!0;function p(Z,ce){var he=Z.next();if(he==">"||he=="/"&&Z.eat(">"))return ce.tokenize=g,u=he==">"?"endTag":"selfcloseTag","tag bracket";if(he=="=")return u="equals",null;if(he=="<"){ce.tokenize=g,ce.state=I,ce.tagName=ce.tagStart=null;var V=ce.tokenize(Z,ce);return V?V+" tag error":"tag error"}else return/[\'\"]/.test(he)?(ce.tokenize=v(he),ce.stringStartCol=Z.column(),ce.tokenize(Z,ce)):(Z.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function v(Z){var ce=function(he,V){for(;!he.eol();)if(he.next()==Z){V.tokenize=p;break}return"string"};return ce.isInAttribute=!0,ce}function _(Z,ce){return function(he,V){for(;!he.eol();){if(he.match(ce)){V.tokenize=g;break}he.next()}return Z}}function S(Z){return function(ce,he){for(var V;(V=ce.next())!=null;){if(V=="<")return he.tokenize=S(Z+1),he.tokenize(ce,he);if(V==">")if(Z==1){he.tokenize=g;break}else return he.tokenize=S(Z-1),he.tokenize(ce,he)}return"meta"}}function k(Z,ce,he){this.prev=Z.context,this.tagName=ce,this.indent=Z.indented,this.startOfLine=he,(h.doNotIndent.hasOwnProperty(ce)||Z.context&&Z.context.noIndent)&&(this.noIndent=!0)}function T(Z){Z.context&&(Z.context=Z.context.prev)}function M(Z,ce){for(var he;;){if(!Z.context)return;if(he=Z.context.tagName,!h.contextGrabbers.hasOwnProperty(he)||!h.contextGrabbers[he].hasOwnProperty(ce))return;T(Z)}}function I(Z,ce,he){return Z=="openTag"?(he.tagStart=ce.column(),j):Z=="closeTag"?D:I}function j(Z,ce,he){return Z=="word"?(he.tagName=ce.current(),o="tag",X):h.allowMissingTagName&&Z=="endTag"?(o="tag bracket",X(Z,ce,he)):(o="error",j)}function D(Z,ce,he){if(Z=="word"){var V=ce.current();return he.context&&he.context.tagName!=V&&h.implicitlyClosed.hasOwnProperty(he.context.tagName)&&T(he),he.context&&he.context.tagName==V||h.matchClosing===!1?(o="tag",y):(o="tag error",J)}else return h.allowMissingTagName&&Z=="endTag"?(o="tag bracket",y(Z,ce,he)):(o="error",J)}function y(Z,ce,he){return Z!="endTag"?(o="error",y):(T(he),I)}function J(Z,ce,he){return o="error",y(Z,ce,he)}function X(Z,ce,he){if(Z=="word")return o="attribute",N;if(Z=="endTag"||Z=="selfcloseTag"){var V=he.tagName,ve=he.tagStart;return he.tagName=he.tagStart=null,Z=="selfcloseTag"||h.autoSelfClosers.hasOwnProperty(V)?M(he,V):(M(he,V),he.context=new k(he,V,ve==he.indented)),I}return o="error",X}function N(Z,ce,he){return Z=="equals"?F:(h.allowMissing||(o="error"),X(Z,ce,he))}function F(Z,ce,he){return Z=="string"?H:Z=="word"&&h.allowUnquoted?(o="string",X):(o="error",X(Z,ce,he))}function H(Z,ce,he){return Z=="string"?H:X(Z,ce,he)}return{startState:function(Z){var ce={tokenize:g,state:I,indented:Z||0,tagName:null,tagStart:null,context:null};return Z!=null&&(ce.baseIndent=Z),ce},token:function(Z,ce){if(!ce.tagName&&Z.sol()&&(ce.indented=Z.indentation()),Z.eatSpace())return null;u=null;var he=ce.tokenize(Z,ce);return(he||u)&&he!="comment"&&(o=null,ce.state=ce.state(u||he,Z,ce),o&&(he=o=="error"?he+" error":o)),he},indent:function(Z,ce,he){var V=Z.context;if(Z.tokenize.isInAttribute)return Z.tagStart==Z.indented?Z.stringStartCol+1:Z.indented+m;if(V&&V.noIndent)return f.Pass;if(Z.tokenize!=p&&Z.tokenize!=g)return he?he.match(/^(\s*)/)[0].length:0;if(Z.tagName)return h.multilineTagIndentPastTag!==!1?Z.tagStart+Z.tagName.length+2:Z.tagStart+m*(h.multilineTagIndentFactor||1);if(h.alignCDATA&&/<!\[CDATA\[/.test(ce))return 0;var ve=ce&&/^<(\/)?([\w_:\.-]*)/.exec(ce);if(ve&&ve[1])for(;V;)if(V.tagName==ve[2]){V=V.prev;break}else if(h.implicitlyClosed.hasOwnProperty(V.tagName))V=V.prev;else break;else if(ve)for(;V;){var ne=h.contextGrabbers[V.tagName];if(ne&&ne.hasOwnProperty(ve[2]))V=V.prev;else break}for(;V&&V.prev&&!V.startOfLine;)V=V.prev;return V?V.indent+m:Z.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:h.htmlMode?"html":"xml",helperType:h.htmlMode?"html":"xml",skipAttribute:function(Z){Z.state==F&&(Z.state=X)},xmlCurrentTag:function(Z){return Z.tagName?{name:Z.tagName,close:Z.type=="closeTag"}:null},xmlCurrentContext:function(Z){for(var ce=[],he=Z.context;he;he=he.prev)he.tagName&&ce.push(he.tagName);return ce.reverse()}}}),f.defineMIME("text/xml","xml"),f.defineMIME("application/xml","xml"),f.mimeModes.hasOwnProperty("text/html")||f.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("MlIO"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.Hasher,x=i.x64,m=x.Word,h=x.WordArray,s=i.algo;function l(){return m.create.apply(m,arguments)}var u=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],o=[];(function(){for(var p=0;p<80;p++)o[p]=l()})();var g=s.SHA512=C.extend({_doReset:function(){this._hash=new h.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(p,v){for(var _=this._hash.words,S=_[0],k=_[1],T=_[2],M=_[3],I=_[4],j=_[5],D=_[6],y=_[7],J=S.high,X=S.low,N=k.high,F=k.low,H=T.high,Z=T.low,ce=M.high,he=M.low,V=I.high,ve=I.low,ne=j.high,W=j.low,z=D.high,R=D.low,w=y.high,P=y.low,le=J,pe=X,ye=N,Ee=F,Oe=H,ae=Z,fe=ce,ge=he,q=V,ie=ve,$=ne,se=W,K=z,Y=R,Ce=w,Q=P,B=0;B<80;B++){var E,U,xe=o[B];if(B<16)U=xe.high=p[v+B*2]|0,E=xe.low=p[v+B*2+1]|0;else{var be=o[B-15],Te=be.high,Fe=be.low,Be=(Te>>>1|Fe<<31)^(Te>>>8|Fe<<24)^Te>>>7,Ue=(Fe>>>1|Te<<31)^(Fe>>>8|Te<<24)^(Fe>>>7|Te<<25),ze=o[B-2],Ve=ze.high,Xe=ze.low,Je=(Ve>>>19|Xe<<13)^(Ve<<3|Xe>>>29)^Ve>>>6,Ne=(Xe>>>19|Ve<<13)^(Xe<<3|Ve>>>29)^(Xe>>>6|Ve<<26),tt=o[B-7],nt=tt.high,Ke=tt.low,$e=o[B-16],je=$e.high,Me=$e.low;E=Ue+Ke,U=Be+nt+(E>>>0<Ue>>>0?1:0),E=E+Ne,U=U+Je+(E>>>0<Ne>>>0?1:0),E=E+Me,U=U+je+(E>>>0<Me>>>0?1:0),xe.high=U,xe.low=E}var Ie=q&$^~q&K,_e=ie&se^~ie&Y,Se=le&ye^le&Oe^ye&Oe,ke=pe&Ee^pe&ae^Ee&ae,Re=(le>>>28|pe<<4)^(le<<30|pe>>>2)^(le<<25|pe>>>7),He=(pe>>>28|le<<4)^(pe<<30|le>>>2)^(pe<<25|le>>>7),Ae=(q>>>14|ie<<18)^(q>>>18|ie<<14)^(q<<23|ie>>>9),Ye=(ie>>>14|q<<18)^(ie>>>18|q<<14)^(ie<<23|q>>>9),it=u[B],lt=it.high,ut=it.low,ct=Q+Ye,xt=Ce+Ae+(ct>>>0<Q>>>0?1:0),ct=ct+_e,xt=xt+Ie+(ct>>>0<_e>>>0?1:0),ct=ct+ut,xt=xt+lt+(ct>>>0<ut>>>0?1:0),ct=ct+E,xt=xt+U+(ct>>>0<E>>>0?1:0),dt=He+ke,kt=Re+Se+(dt>>>0<He>>>0?1:0);Ce=K,Q=Y,K=$,Y=se,$=q,se=ie,ie=ge+ct|0,q=fe+xt+(ie>>>0<ge>>>0?1:0)|0,fe=Oe,ge=ae,Oe=ye,ae=Ee,ye=le,Ee=pe,pe=ct+dt|0,le=xt+kt+(pe>>>0<ct>>>0?1:0)|0}X=S.low=X+pe,S.high=J+le+(X>>>0<pe>>>0?1:0),F=k.low=F+Ee,k.high=N+ye+(F>>>0<Ee>>>0?1:0),Z=T.low=Z+ae,T.high=H+Oe+(Z>>>0<ae>>>0?1:0),he=M.low=he+ge,M.high=ce+fe+(he>>>0<ge>>>0?1:0),ve=I.low=ve+ie,I.high=V+q+(ve>>>0<ie>>>0?1:0),W=j.low=W+se,j.high=ne+$+(W>>>0<se>>>0?1:0),R=D.low=R+Y,D.high=z+K+(R>>>0<Y>>>0?1:0),P=y.low=P+Q,y.high=w+Ce+(P>>>0<Q>>>0?1:0)},_doFinalize:function(){var p=this._data,v=p.words,_=this._nDataBytes*8,S=p.sigBytes*8;v[S>>>5]|=128<<24-S%32,v[(S+128>>>10<<5)+30]=Math.floor(_/4294967296),v[(S+128>>>10<<5)+31]=_,p.sigBytes=v.length*4,this._process();var k=this._hash.toX32();return k},clone:function(){var p=C.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});i.SHA512=C._createHelper(g),i.HmacSHA512=C._createHmacHelper(g)}(),f.SHA512})},"3y9D":function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.WordArray,x=O.Hasher,m=i.algo,h=[],s=m.SHA1=x.extend({_doReset:function(){this._hash=new C.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,u){for(var o=this._hash.words,g=o[0],p=o[1],v=o[2],_=o[3],S=o[4],k=0;k<80;k++){if(k<16)h[k]=l[u+k]|0;else{var T=h[k-3]^h[k-8]^h[k-14]^h[k-16];h[k]=T<<1|T>>>31}var M=(g<<5|g>>>27)+S+h[k];k<20?M+=(p&v|~p&_)+1518500249:k<40?M+=(p^v^_)+1859775393:k<60?M+=(p&v|p&_|v&_)-1894007588:M+=(p^v^_)-899497514,S=_,_=v,v=p<<30|p>>>2,p=g,g=M}o[0]=o[0]+g|0,o[1]=o[1]+p|0,o[2]=o[2]+v|0,o[3]=o[3]+_|0,o[4]=o[4]+S|0},_doFinalize:function(){var l=this._data,u=l.words,o=this._nDataBytes*8,g=l.sigBytes*8;return u[g>>>5]|=128<<24-g%32,u[(g+64>>>9<<4)+14]=Math.floor(o/4294967296),u[(g+64>>>9<<4)+15]=o,l.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var l=x.clone.call(this);return l._hash=this._hash.clone(),l}});i.SHA1=x._createHelper(s),i.HmacSHA1=x._createHmacHelper(s)}(),f.SHA1})},4:function(a,G){},"5hvy":function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("MlIO"))})(this,function(f){return function(i){var O=f,C=O.lib,x=C.WordArray,m=C.Hasher,h=O.x64,s=h.Word,l=O.algo,u=[],o=[],g=[];(function(){for(var _=1,S=0,k=0;k<24;k++){u[_+5*S]=(k+1)*(k+2)/2%64;var T=S%5,M=(2*_+3*S)%5;_=T,S=M}for(var _=0;_<5;_++)for(var S=0;S<5;S++)o[_+5*S]=S+(2*_+3*S)%5*5;for(var I=1,j=0;j<24;j++){for(var D=0,y=0,J=0;J<7;J++){if(I&1){var X=(1<<J)-1;X<32?y^=1<<X:D^=1<<X-32}I&128?I=I<<1^113:I<<=1}g[j]=s.create(D,y)}})();var p=[];(function(){for(var _=0;_<25;_++)p[_]=s.create()})();var v=l.SHA3=m.extend({cfg:m.cfg.extend({outputLength:512}),_doReset:function(){for(var _=this._state=[],S=0;S<25;S++)_[S]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(_,S){for(var k=this._state,T=this.blockSize/2,M=0;M<T;M++){var I=_[S+2*M],j=_[S+2*M+1];I=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,j=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;var D=k[M];D.high^=j,D.low^=I}for(var y=0;y<24;y++){for(var J=0;J<5;J++){for(var X=0,N=0,F=0;F<5;F++){var D=k[J+5*F];X^=D.high,N^=D.low}var H=p[J];H.high=X,H.low=N}for(var J=0;J<5;J++)for(var Z=p[(J+4)%5],ce=p[(J+1)%5],he=ce.high,V=ce.low,X=Z.high^(he<<1|V>>>31),N=Z.low^(V<<1|he>>>31),F=0;F<5;F++){var D=k[J+5*F];D.high^=X,D.low^=N}for(var ve=1;ve<25;ve++){var X,N,D=k[ve],ne=D.high,W=D.low,z=u[ve];z<32?(X=ne<<z|W>>>32-z,N=W<<z|ne>>>32-z):(X=W<<z-32|ne>>>64-z,N=ne<<z-32|W>>>64-z);var R=p[o[ve]];R.high=X,R.low=N}var w=p[0],P=k[0];w.high=P.high,w.low=P.low;for(var J=0;J<5;J++)for(var F=0;F<5;F++){var ve=J+5*F,D=k[ve],le=p[ve],pe=p[(J+1)%5+5*F],ye=p[(J+2)%5+5*F];D.high=le.high^~pe.high&ye.high,D.low=le.low^~pe.low&ye.low}var D=k[0],Ee=g[y];D.high^=Ee.high,D.low^=Ee.low}},_doFinalize:function(){var _=this._data,S=_.words,k=this._nDataBytes*8,T=_.sigBytes*8,M=this.blockSize*32;S[T>>>5]|=1<<24-T%32,S[(i.ceil((T+1)/M)*M>>>5)-1]|=128,_.sigBytes=S.length*4,this._process();for(var I=this._state,j=this.cfg.outputLength/8,D=j/8,y=[],J=0;J<D;J++){var X=I[J],N=X.high,F=X.low;N=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360,F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,y.push(F),y.push(N)}return new x.init(y,j)},clone:function(){for(var _=m.clone.call(this),S=_._state=this._state.slice(0),k=0;k<25;k++)S[k]=S[k].clone();return _}});O.SHA3=m._createHelper(v),O.HmacSHA3=m._createHmacHelper(v)}(Math),f.SHA3})},"5nXd":function(a,G,d){var f=d("MFOe"),i=f.slice,O=f.pluck,C=f.each,x=f.bind,m=f.create,h=f.isList,s=f.isFunction,l=f.isObject;a.exports={createStore:g};var u={version:"2.0.12",enabled:!1,get:function(p,v){var _=this.storage.read(this._namespacePrefix+p);return this._deserialize(_,v)},set:function(p,v){return v===void 0?this.remove(p):(this.storage.write(this._namespacePrefix+p,this._serialize(v)),v)},remove:function(p){this.storage.remove(this._namespacePrefix+p)},each:function(p){var v=this;this.storage.each(function(_,S){p.call(v,v._deserialize(_),(S||"").replace(v._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(p){return this._namespacePrefix=="__storejs_"+p+"_"},createStore:function(){return g.apply(this,arguments)},addPlugin:function(p){this._addPlugin(p)},namespace:function(p){return g(this.storage,this.plugins,p)}};function o(){var p=typeof console=="undefined"?null:console;if(!p)return;var v=p.warn?p.warn:p.log;v.apply(p,arguments)}function g(p,v,_){_||(_=""),p&&!h(p)&&(p=[p]),v&&!h(v)&&(v=[v]);var S=_?"__storejs_"+_+"_":"",k=_?new RegExp("^"+S):null,T=/^[a-zA-Z0-9_\-]*$/;if(!T.test(_))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var M={_namespacePrefix:S,_namespaceRegexp:k,_testStorage:function(j){try{var D="__storejs__test__";j.write(D,D);var y=j.read(D)===D;return j.remove(D),y}catch(J){return!1}},_assignPluginFnProp:function(j,D){var y=this[D];this[D]=function(){var X=i(arguments,0),N=this;function F(){return y?(C(arguments,function(Z,ce){X[ce]=Z}),y.apply(N,X)):void 0}var H=[F].concat(X);return j.apply(N,H)}},_serialize:function(j){return JSON.stringify(j)},_deserialize:function(j,D){if(!j)return D;var y="";try{y=JSON.parse(j)}catch(J){y=j}return y!==void 0?y:D},_addStorage:function(j){if(this.enabled)return;this._testStorage(j)&&(this.storage=j,this.enabled=!0)},_addPlugin:function(j){var D=this;if(h(j)){C(j,function(X){D._addPlugin(X)});return}var y=O(this.plugins,function(X){return j===X});if(y)return;if(this.plugins.push(j),!s(j))throw new Error("Plugins must be function values that return objects");var J=j.call(this);if(!l(J))throw new Error("Plugins must return an object of function properties");C(J,function(X,N){if(!s(X))throw new Error("Bad plugin property: "+N+" from plugin "+j.name+". Plugins should only return functions.");D._assignPluginFnProp(X,N)})},addStorage:function(j){o("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(j)}},I=m(M,u,{plugins:[]});return I.raw={},C(I,function(j,D){s(j)&&(I.raw[D]=x(I,j))}),C(p,function(j){I._addStorage(j)}),C(v,function(j){I._addPlugin(j)}),I}},"7Cbv":function(a,G,d){"use strict";var f=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function O(){if(!f)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(i)}var C=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function x(p){return typeof p=="string"&&C.test(p)}for(var m=x,h=[],s=0;s<256;++s)h.push((s+256).toString(16).substr(1));function l(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=(h[p[v+0]]+h[p[v+1]]+h[p[v+2]]+h[p[v+3]]+"-"+h[p[v+4]]+h[p[v+5]]+"-"+h[p[v+6]]+h[p[v+7]]+"-"+h[p[v+8]]+h[p[v+9]]+"-"+h[p[v+10]]+h[p[v+11]]+h[p[v+12]]+h[p[v+13]]+h[p[v+14]]+h[p[v+15]]).toLowerCase();if(!m(_))throw TypeError("Stringified UUID is invalid");return _}var u=l;function o(p,v,_){p=p||{};var S=p.random||(p.rng||O)();if(S[6]=S[6]&15|64,S[8]=S[8]&63|128,v){_=_||0;for(var k=0;k<16;++k)v[_+k]=S[k];return v}return u(S)}var g=G.a=o},"7ahc":function(a,G,d){"use strict";d.d(G,"a",function(){return j});var f=d("k1fw"),i=d("0Owb"),O=d("+L6B"),C=d("2/Rp"),x=d("y8nQ"),m=d("Vl3Y"),h=d("tJVT"),s=d("OaEy"),l=d("2fM7"),u=d("q1tI"),o=d.n(u),g=d("VrN/"),p=d.n(g),v=d("p77/"),_=d.n(v),S=d("c5Ni"),k=d.n(S),T=l.a.Option,M={labelCol:{span:4},wrapperCol:{span:20}},I={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"]};G.b=function(D){var y=D.callback,J=D.onCancel,X=Object(u.useState)("python"),N=Object(h.a)(X,2),F=N[0],H=N[1];function Z(he){H(I[he][1])}function ce(he){y(he)}return o.a.createElement(m.a,Object(i.a)({},M,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ce}),o.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},o.a.createElement(l.a,{onChange:Z},Object.keys(I).map(function(he){return o.a.createElement(T,{key:he,value:he},I[he][0])}))),o.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},o.a.createElement(j,{mode:F})),o.a.createElement("div",{className:"flex-container flex-end"},o.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),o.a.createElement(C.a,{type:"ghost",onClick:J},"\u53D6\u6D88")))};function j(D){var y=D.value,J=D.onChange,X=D.mode,N=D.options,F=N===void 0?{}:N,H=Object(u.useRef)(),Z=Object(u.useState)(),ce=Object(h.a)(Z,2),he=ce[0],V=ce[1];return Object(u.useEffect)(function(){if(he){function ve(ne){var W=ne.getValue();J&&J(W)}return he.on("change",ve),function(){he.off("change",ve)}}},[he,J]),Object(u.useEffect)(function(){he&&he.setOption("mode",X)},[he,X]),Object(u.useEffect)(function(){he&&((y!==he.getValue()||y==="")&&setTimeout(function(){he.setValue(y||" ")},300))},[he,y]),Object(u.useEffect)(function(){if(H.current&&!he){var ve=p.a.fromTextArea(H.current,Object(f.a)({mode:X,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},F));V(ve)}},[H.current,he]),o.a.createElement("div",{className:"my-codemirror-container"},o.a.createElement("textarea",{ref:H}))}},"7ixt":function(a,G,d){"use strict";d.d(G,"a",function(){return O});var f={adjustX:1,adjustY:1},i=[0,0],O={left:{points:["cr","cl"],overflow:f,offset:[-4,0],targetOffset:i},right:{points:["cl","cr"],overflow:f,offset:[4,0],targetOffset:i},top:{points:["bc","tc"],overflow:f,offset:[0,-4],targetOffset:i},bottom:{points:["tc","bc"],overflow:f,offset:[0,4],targetOffset:i},topLeft:{points:["bl","tl"],overflow:f,offset:[0,-4],targetOffset:i},leftTop:{points:["tr","tl"],overflow:f,offset:[-4,0],targetOffset:i},topRight:{points:["br","tr"],overflow:f,offset:[0,-4],targetOffset:i},rightTop:{points:["tl","tr"],overflow:f,offset:[4,0],targetOffset:i},bottomRight:{points:["tr","br"],overflow:f,offset:[0,4],targetOffset:i},rightBottom:{points:["bl","br"],overflow:f,offset:[4,0],targetOffset:i},bottomLeft:{points:["tl","bl"],overflow:f,offset:[0,4],targetOffset:i},leftBottom:{points:["br","bl"],overflow:f,offset:[-4,0],targetOffset:i}},C=O},"815F":function(a,G,d){"use strict";d.d(G,"e",function(){return h}),d.d(G,"c",function(){return l}),d.d(G,"d",function(){return u}),d.d(G,"a",function(){return g}),d.d(G,"f",function(){return p}),d.d(G,"b",function(){return v});var f=d("KQm4"),i=d("VTBJ"),O=d("Ff2n"),C=d("Zm9Q"),x=d("Kwbf"),m=d("OZM5");function h(_,S){return _!=null?_:S}function s(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=new Map;function k(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(T||[]).forEach(function(I){var j=I.key,D=I.children;Object(x.a)(j!=null,"Tree node must have a certain key: [".concat(M).concat(j,"]"));var y=String(j);Object(x.a)(!S.has(y)||j===null||j===void 0,"Same 'key' exist in the Tree: ".concat(y)),S.set(y,!0),k(D,"".concat(M).concat(y," > "))})}k(_)}function l(_){function S(k){var T=Object(C.a)(k);return T.map(function(M){if(!Object(m.i)(M))return Object(x.a)(!M,"Tree/TreeNode can only accept TreeNode as children."),null;var I=M.key,j=M.props,D=j.children,y=Object(O.a)(j,["children"]),J=Object(i.a)({key:I},y),X=S(D);return X.length&&(J.children=X),J}).filter(function(M){return M})}return S(_)}function u(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],k=new Set(S===!0?[]:S),T=[];function M(I){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return I.map(function(D,y){var J=Object(m.h)(j?j.pos:"0",y),X=h(D.key,J),N=Object(i.a)(Object(i.a)({},D),{},{parent:j,pos:J,children:null,data:D,isStart:[].concat(Object(f.a)(j?j.isStart:[]),[y===0]),isEnd:[].concat(Object(f.a)(j?j.isEnd:[]),[y===I.length-1])});return T.push(N),S===!0||k.has(X)?N.children=M(D.children||[],N):N.children=[],N})}return M(_),T}function o(_,S,k){var T;k?typeof k=="string"?T=function(j){return j[k]}:typeof k=="function"&&(T=function(j){return k(j)}):T=function(j,D){return h(j.key,D)};function M(I,j,D){var y=I?I.children:_,J=I?Object(m.h)(D.pos,j):"0";if(I){var X=T(I,J),N={node:I,index:j,pos:J,key:X,parentPos:D.node?D.pos:null,level:D.level+1};S(N)}y&&y.forEach(function(F,H){M(F,H,{node:I,pos:J,level:D?D.level+1:-1})})}M(null)}function g(_){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=S.initWrapper,T=S.processEntity,M=S.onProcessFinished,I=arguments.length>2?arguments[2]:void 0,j={},D={},y={posEntities:j,keyEntities:D};return k&&(y=k(y)||y),o(_,function(J){var X=J.node,N=J.index,F=J.pos,H=J.key,Z=J.parentPos,ce=J.level,he={node:X,index:N,key:H,pos:F,level:ce},V=h(H,F);j[F]=he,D[V]=he,he.parent=j[Z],he.parent&&(he.parent.children=he.parent.children||[],he.parent.children.push(he)),T&&T(he,y)},I),M&&M(y),y}function p(_,S){var k=S.expandedKeys,T=S.selectedKeys,M=S.loadedKeys,I=S.loadingKeys,j=S.checkedKeys,D=S.halfCheckedKeys,y=S.dragOverNodeKey,J=S.dropPosition,X=S.keyEntities,N=X[_],F={eventKey:_,expanded:k.indexOf(_)!==-1,selected:T.indexOf(_)!==-1,loaded:M.indexOf(_)!==-1,loading:I.indexOf(_)!==-1,checked:j.indexOf(_)!==-1,halfChecked:D.indexOf(_)!==-1,pos:String(N?N.pos:""),dragOver:y===_&&J===0,dragOverGapTop:y===_&&J===-1,dragOverGapBottom:y===_&&J===1};return F}function v(_){var S=_.data,k=_.expanded,T=_.selected,M=_.checked,I=_.loaded,j=_.loading,D=_.halfChecked,y=_.dragOver,J=_.dragOverGapTop,X=_.dragOverGapBottom,N=_.pos,F=_.active,H=Object(i.a)(Object(i.a)({},S),{},{expanded:k,selected:T,checked:M,loaded:I,loading:j,halfChecked:D,dragOver:y,dragOverGapTop:J,dragOverGapBottom:X,pos:N,active:F});return"props"in H||Object.defineProperty(H,"props",{get:function(){return Object(x.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),_}}),H}},"8EBN":function(a,G,d){(function(f){f(d("VrN/"))})(function(f){"use strict";f.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var i=0;i<f.modeInfo.length;i++){var O=f.modeInfo[i];O.mimes&&(O.mime=O.mimes[0])}f.findModeByMIME=function(C){C=C.toLowerCase();for(var x=0;x<f.modeInfo.length;x++){var m=f.modeInfo[x];if(m.mime==C)return m;if(m.mimes){for(var h=0;h<m.mimes.length;h++)if(m.mimes[h]==C)return m}}if(/\+xml$/.test(C))return f.findModeByMIME("application/xml");if(/\+json$/.test(C))return f.findModeByMIME("application/json")},f.findModeByExtension=function(C){C=C.toLowerCase();for(var x=0;x<f.modeInfo.length;x++){var m=f.modeInfo[x];if(m.ext){for(var h=0;h<m.ext.length;h++)if(m.ext[h]==C)return m}}},f.findModeByFileName=function(C){for(var x=0;x<f.modeInfo.length;x++){var m=f.modeInfo[x];if(m.file&&m.file.test(C))return m}var h=C.lastIndexOf("."),s=h>-1&&C.substring(h+1,C.length);if(s)return f.findModeByExtension(s)},f.findModeByName=function(C){C=C.toLowerCase();for(var x=0;x<f.modeInfo.length;x++){var m=f.modeInfo[x];if(m.name.toLowerCase()==C)return m;if(m.alias){for(var h=0;h<m.alias.length;h++)if(m.alias[h].toLowerCase()==C)return m}}}})},"8hTe":function(a,G,d){a.exports={button:"button___1wy9m"}},"9Bee":function(a,G,d){"use strict";var f=d("DYRE"),i=d("zeV3"),O=d("+L6B"),C=d("2/Rp"),x=d("k1fw"),m=d("9og8"),h=d("tJVT"),s=d("WmNS"),l=d.n(s),u=d("q1tI"),o=d.n(u),g=d("vg9a"),p=d("DlQD"),v=d.n(p),_=d("rUJ1");function S(oe,b){var A=oe.match(/^(\s+)(?:```)/);if(A===null)return b;var re=A[1];return b.split(`
|
|
|
`).map(function(ue){var te=ue.match(/^\s+/);if(te===null)return ue;var Pe=Object(h.a)(te,1),Ze=Pe[0];return Ze.length>=re.length?ue.slice(re.length):ue}).join(`
|
|
|
`)}var k=[],T=["<ul>"],M=new v.a.Renderer,I=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function j(){k.length=0,T=["<ul>"]}var D={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function y(oe,b,A,re){if(b>=oe.length||oe[b].level<=A)return b;var ue=oe[b];re.push("<li><a href='#"+ue.anchor+"'>"+ue.text+"</a>"),b++;var te=[];return b=y(oe,b,ue.level,te),te.length>0&&(re.push("<ul>"),te.forEach(function(Pe){re.push(Pe)}),re.push("</ul>")),re.push("</li>"),b=y(oe,b,A,re),b}function J(){return y(k,0,0,T),T.push("</ul>"),T.join("")}var X={heading:function(b){var A=I.exec(b);if(A)return{type:"heading",raw:A[0],depth:A[1].length,text:A[2]}},fences:function(b){var A=this.rules.block.fences.exec(b);if(A){var re=A[0],ue=S(re,A[3]||""),te=A[2]?A[2].trim():A[2];if(["latex","katex","math"].indexOf(te)>=0){var Pe=H(),Ze=ue;ue=Pe,Z[Pe]={type:"block",expression:Ze}}return{type:"code",raw:re,lang:te,text:ue}}}},N=/(?:\${2})([^\n`]+?)(?:\${2})/gi,F=0,H=function(){return"__special_katext_id_".concat(F++,"__")},Z={};function ce(){return Z}function he(){F=0,Z={}}function V(oe){return oe=oe.replace(N,function(b,A){var re=H();return Z[re]={type:"inline",expression:A},re}),oe}var ve=M.listitem;M.listitem=function(oe){return ve(V(oe))};var ne=M.paragraph;M.paragraph=function(oe){return ne(V(oe))};var W=M.tablecell;M.tablecell=function(oe,b){return W(V(oe),b)},M.code=function(oe,b,A){var re=(b||"").match(/\S*/)[0];return re?["latex","katex","math"].indexOf(re)>=0?"<p class='editormd-tex'>".concat(oe,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(b,'">').concat(A?oe:Object(_.escape)(oe,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(A?oe:Object(_.escape)(oe,!0))+"</code></pre>"},M.heading=function(oe,b,A){var re=this.options.headerPrefix+A.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return k.push({anchor:re,level:b,text:oe}),"<h"+b+' id="'+re+'">'+oe+"</h"+b+">"},v.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),v.a.use({tokenizer:X,renderer:M});var z=v.a,R=d("SJMd"),w=d("ulZh"),P=d.n(w),le=d("m3rI"),pe=d("Oy/b"),ye=d("p5ED"),Ee=d("ErOA");/*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var Oe=function(oe,b){return(Oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,re){A.__proto__=re}||function(A,re){for(var ue in re)Object.prototype.hasOwnProperty.call(re,ue)&&(A[ue]=re[ue])})(oe,b)};function ae(oe,b){function A(){this.constructor=oe}Oe(oe,b),oe.prototype=b===null?Object.create(b):(A.prototype=b.prototype,new A)}function fe(oe,b,A,re){return new(A||(A=Promise))(function(ue,te){function Pe(yt){try{ot(re.next(yt))}catch(qe){te(qe)}}function Ze(yt){try{ot(re.throw(yt))}catch(qe){te(qe)}}function ot(yt){var qe;yt.done?ue(yt.value):(qe=yt.value,qe instanceof A?qe:new A(function(Nt){Nt(qe)})).then(Pe,Ze)}ot((re=re.apply(oe,b||[])).next())})}function ge(oe,b){var A,re,ue,te,Pe={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return te={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function Ze(ot){return function(yt){return function(qe){if(A)throw new TypeError("Generator is already executing.");for(;Pe;)try{if(A=1,re&&(ue=2&qe[0]?re.return:qe[0]?re.throw||((ue=re.return)&&ue.call(re),0):re.next)&&!(ue=ue.call(re,qe[1])).done)return ue;switch(re=0,ue&&(qe=[2&qe[0],ue.value]),qe[0]){case 0:case 1:ue=qe;break;case 4:return Pe.label++,{value:qe[1],done:!1};case 5:Pe.label++,re=qe[1],qe=[0];continue;case 7:qe=Pe.ops.pop(),Pe.trys.pop();continue;default:if(!(ue=Pe.trys,(ue=ue.length>0&&ue[ue.length-1])||qe[0]!==6&&qe[0]!==2)){Pe=0;continue}if(qe[0]===3&&(!ue||qe[1]>ue[0]&&qe[1]<ue[3])){Pe.label=qe[1];break}if(qe[0]===6&&Pe.label<ue[1]){Pe.label=ue[1],ue=qe;break}if(ue&&Pe.label<ue[2]){Pe.label=ue[2],Pe.ops.push(qe);break}ue[2]&&Pe.ops.pop(),Pe.trys.pop();continue}qe=b.call(oe,Pe)}catch(Nt){qe=[6,Nt],re=0}finally{A=ue=0}if(5&qe[0])throw qe[1];return{value:qe[0]?qe[1]:void 0,done:!0}}([ot,yt])}}}function q(){for(var oe=0,b=0,A=arguments.length;b<A;b++)oe+=arguments[b].length;var re=Array(oe),ue=0;for(b=0;b<A;b++)for(var te=arguments[b],Pe=0,Ze=te.length;Pe<Ze;Pe++,ue++)re[ue]=te[Pe];return re}var ie=function(){function oe(){}return oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},oe.setAttributes=function(b,A){for(var re=0,ue=A;re<ue.length;re++){var te=ue[re],Pe=te[0],Ze=te[1];b.setAttribute(Pe,Ze)}},oe.createRect=function(b,A,re){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",b.toString()),ue.setAttribute("height",A.toString()),re&&oe.setAttributes(ue,re),ue},oe.createLine=function(b,A,re,ue,te){var Pe=document.createElementNS("http://www.w3.org/2000/svg","line");return Pe.setAttribute("x1",b.toString()),Pe.setAttribute("y1",A.toString()),Pe.setAttribute("x2",re.toString()),Pe.setAttribute("y2",ue.toString()),te&&oe.setAttributes(Pe,te),Pe},oe.createPolygon=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","polygon");return re.setAttribute("points",b),A&&oe.setAttributes(re,A),re},oe.createCircle=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","circle");return re.setAttribute("cx",(b/2).toString()),re.setAttribute("cy",(b/2).toString()),re.setAttribute("r",b.toString()),A&&oe.setAttributes(re,A),re},oe.createEllipse=function(b,A,re){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(b/2).toString()),ue.setAttribute("cy",(A/2).toString()),ue.setAttribute("rx",(b/2).toString()),ue.setAttribute("ry",(A/2).toString()),re&&oe.setAttributes(ue,re),ue},oe.createGroup=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","g");return b&&oe.setAttributes(A,b),A},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(b,A,re,ue,te,Pe,Ze){var ot=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(ot,[["id",b],["orient",A],["markerWidth",re.toString()],["markerHeight",ue.toString()],["refX",te.toString()],["refY",Pe.toString()]]),ot.appendChild(Ze),ot},oe.createText=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","text");return A.setAttribute("x","0"),A.setAttribute("y","0"),b&&oe.setAttributes(A,b),A},oe.createTSpan=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","tspan");return re.textContent=b,A&&oe.setAttributes(re,A),re},oe.createImage=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","image");return b&&oe.setAttributes(A,b),A},oe.createPoint=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return re.x=b,re.y=A,re},oe.createPath=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","path");return re.setAttribute("d",b),A&&oe.setAttributes(re,A),re},oe}(),$=function(){function oe(){}return oe.addKey=function(b){oe.key=b},Object.defineProperty(oe,"isLicensed",{get:function(){return!!oe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(oe.key)},enumerable:!1,configurable:!0}),oe}(),se=function(){function oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return oe.prototype.rasterize=function(b,A,re){var ue=this;return new Promise(function(te){var Pe=re!==void 0?re:document.createElement("canvas");b===null&&(ue.markersOnly=!0,ue.naturalSize=!1);var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg");Ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ze.setAttribute("width",A.width.baseVal.valueAsString),Ze.setAttribute("height",A.height.baseVal.valueAsString),Ze.setAttribute("viewBox","0 0 "+A.viewBox.baseVal.width.toString()+" "+A.viewBox.baseVal.height.toString()),Ze.innerHTML=A.innerHTML,ue.naturalSize===!0?(Ze.width.baseVal.value=b.naturalWidth,Ze.height.baseVal.value=b.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&(Ze.width.baseVal.value=ue.width,Ze.height.baseVal.value=ue.height),Pe.width=Ze.width.baseVal.value,Pe.height=Ze.height.baseVal.value;var ot=Ze.outerHTML,yt=Pe.getContext("2d");ue.markersOnly!==!0&&yt.drawImage(b,0,0,Pe.width,Pe.height);var qe=window.URL,Nt=new Image(Pe.width,Pe.height);Nt.setAttribute("crossOrigin","anonymous");var Gt=new Blob([ot],{type:"image/svg+xml"}),nr=qe.createObjectURL(Gt);Nt.onload=function(){yt.drawImage(Nt,0,0),qe.revokeObjectURL(nr);var Vr=Pe.toDataURL(ue.imageType,ue.imageQuality);te(Vr)},Nt.src=nr})},oe}(),K=function(){},Y=function(){function oe(b){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+b+"_"}return Object.defineProperty(oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),oe.prototype.addClass=function(b){return this.styleSheet===void 0&&this.addStyleSheet(),b.name=""+this.classNamePrefix+b.localName,this.classes.push(b),this.styleSheet.sheet.insertRule("."+b.name+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length),b},oe.prototype.addRule=function(b){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(b),this.styleSheet.sheet.insertRule(b.selector+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var b;this.styleSheet=document.createElement("style"),((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).appendChild(this.styleSheet),this.addRule(new Ce("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Q("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Q("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},oe.prototype.removeStyleSheet=function(){var b;this.styleSheet&&(((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),Ce=function(oe,b){this.selector=oe,this.style=b},Q=function(oe,b){this.localName=oe,this.style=b},B=function(){function oe(b,A,re,ue,te){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=b,this.displayMode=A,this.markerItems=re,this.uiStyleSettings=ue,this.styles=te,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return oe.prototype.show=function(b){var A=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=b,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var re=document.createElement("div");re.className=this.toolbarBlockStyleClass.name,re.style.whiteSpace="nowrap",this.uiContainer.appendChild(re),this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"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(te){var Pe=document.createElement("div");Pe.className=""+A.toolbarButtonStyleClass.name,Pe.setAttribute("data-type-name",te.typeName),Pe.innerHTML=te.icon,Pe.addEventListener("click",function(){A.markerToolbarButtonClicked(Pe,te)}),A.buttons.push(Pe),A.markerButtons.push(Pe)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ue=document.createElement("div");ue.className=this.toolbarBlockStyleClass.name,ue.style.whiteSpace="nowrap",ue.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ue),this.addActionButton(ue,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(ue,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},oe.prototype.addButtonClickListener=function(b){this.buttonClickListeners.push(b)},oe.prototype.removeButtonClickListener=function(b){this.buttonClickListeners.indexOf(b)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(b),1)},oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var b=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var A=0;A<this.markerButtons.length;A++)A<b||A===b&&this.markerButtons.length-1===b?this.markerButtonBlock.appendChild(this.markerButtons[A]):(A===b&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[A]))}},oe.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},oe.prototype.resetButtonStyles=function(){var b=this;this.buttons.forEach(function(A){A.className=A.className.replace(b.uiStyleSettings.toolbarButtonStyleColorsClassName?b.uiStyleSettings.toolbarButtonStyleColorsClassName:b.toolbarButtonStyleColorsClass.name,"").trim(),A.className=A.className.replace(b.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?b.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:b.toolbarActiveButtonStyleColorsClass.name,"").trim(),A.className+=" "+(b.uiStyleSettings.toolbarButtonStyleColorsClassName?b.uiStyleSettings.toolbarButtonStyleColorsClassName:b.toolbarButtonStyleColorsClass.name)})},oe.prototype.addActionButton=function(b,A,re){var ue=this,te=document.createElement("div");switch(te.className=""+this.toolbarButtonStyleClass.name,te.innerHTML=A,te.setAttribute("data-action",re),te.addEventListener("click",function(){ue.actionToolbarButtonClicked(te,re)}),re){case"select":te.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":te.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":te.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":te.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":te.style.fill=this.uiStyleSettings.closeButtonColor}b.appendChild(te),this.buttons.push(te)},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Q("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Q("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Q("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Q("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Q("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var b=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Q("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*b)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*b)+`px;
|
|
|
padding: `+b+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},oe.prototype.markerToolbarButtonClicked=function(b,A){this.setActiveButton(b),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("marker",A)}),this.markerButtonOverflowBlock.style.display="none"},oe.prototype.actionToolbarButtonClicked=function(b,A){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("action",A)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},oe.prototype.setActiveButton=function(b){this.resetButtonStyles(),b.className=b.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),b.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},oe.prototype.setActiveMarkerButton=function(b){var A=this.markerButtons.find(function(re){return re.getAttribute("data-type-name")===b});A&&this.setActiveButton(A)},oe.prototype.setCurrentMarker=function(b){var A=this;this.currentMarker=b,this.buttons.filter(function(re){return/delete|notes/.test(re.getAttribute("data-action"))}).forEach(function(re){A.currentMarker===void 0?(re.style.fillOpacity="0.4",re.style.pointerEvents="none"):(re.style.fillOpacity="1",re.style.pointerEvents="all")})},oe}(),E=function(){function oe(b,A,re,ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=b,this.displayMode=A,this.uiStyleSettings=re,this.styles=ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return oe.prototype.addStyles=function(){var b;this.toolboxStyleClass=this.styles.addClass(new Q("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Q("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var A=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Q("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Q("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Q("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Q("toolbox-panel-row_colors",`
|
|
|
background-color: `+((b=this.uiStyleSettings.toolboxBackgroundColor)!==null&&b!==void 0?b:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Q("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*A)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*A)+`px;
|
|
|
padding: `+A+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Q("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Q("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},oe.prototype.show=function(b){var A;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=b,this.uiContainer.className=this.toolboxStyleClass.name+" "+((A=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&A!==void 0?A:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},oe.prototype.setPanelButtons=function(b){var A,re,ue=this;this.panels=b,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((A=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&A!==void 0?A:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((re=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&re!==void 0?re:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(te){var Pe;te.uiStyleSettings=ue.uiStyleSettings;var Ze=document.createElement("div");Ze.className=ue.toolboxButtonStyleClass.name+" "+((Pe=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Pe!==void 0?Pe:ue.toolboxButtonStyleColorsClass.name),Ze.innerHTML=te.icon,Ze.title=te.title,Ze.addEventListener("click",function(){ue.panelButtonClick(te)}),ue.panelButtons.push(Ze),ue.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},oe.prototype.panelButtonClick=function(b){var A=this,re=-1;if(b!==this.activePanel){re=this.panels.indexOf(b),this.panelRow.innerHTML="";var ue=b.getUi();ue.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ue),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=b}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){A.displayMode==="inline"?A.panelRow.style.display="none":A.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(te,Pe){var Ze,ot;te.className=A.toolboxButtonStyleClass.name+" "+(Pe===re?""+((Ze=A.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:A.toolboxActiveButtonStyleColorsClass.name):""+((ot=A.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ot!==void 0?ot:A.toolboxButtonStyleColorsClass.name))})},oe}(),U=function(oe,b){this.title=oe,this.icon=b},xe=function(oe){function b(A,re,ue,te){var Pe=oe.call(this,A,te||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Pe.colors=[],Pe.addTransparent=!1,Pe.colorBoxes=[],Pe.colors=re,Pe.currentColor=ue,Pe.setCurrentColor=Pe.setCurrentColor.bind(Pe),Pe.getColorBox=Pe.getColorBox.bind(Pe),Pe}return ae(b,oe),b.prototype.getUi=function(){var A=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.whiteSpace="nowrap",this.colors.forEach(function(ue){var te=A.getColorBox(ue);re.appendChild(te),A.colorBoxes.push(te)}),re},b.prototype.getColorBox=function(A){var re=this,ue=this.uiStyleSettings.toolbarHeight/4,te=this.uiStyleSettings.toolbarHeight-ue,Pe=document.createElement("div");Pe.style.display="inline-block",Pe.style.boxSizing="content-box",Pe.style.width=te-2+"px",Pe.style.height=te-2+"px",Pe.style.padding="1px",Pe.style.marginRight="2px",Pe.style.marginBottom="2px",Pe.style.borderWidth="2px",Pe.style.borderStyle="solid",Pe.style.borderRadius=(te+2)/2+"px",Pe.style.borderColor=A===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Pe.addEventListener("click",function(){re.setCurrentColor(A,Pe)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=te-2+"px",Ze.style.height=te-2+"px",Ze.style.backgroundColor=A,Ze.style.borderRadius=te/2+"px",A==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),Pe.appendChild(Ze),Pe},b.prototype.setCurrentColor=function(A,re){var ue=this;this.currentColor=A,this.colorBoxes.forEach(function(te){te.style.borderColor=te===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(A)},b}(U),be=function(){function oe(b,A,re){this._state="new",this._isSelected=!1,this._container=b,this._overlayContainer=A,this.globalSettings=re,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),oe.prototype.ownsTarget=function(b){return!1},Object.defineProperty(oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},oe.prototype.pointerDown=function(b,A){},oe.prototype.dblClick=function(b,A){},oe.prototype.manipulate=function(b){},oe.prototype.pointerUp=function(b){this.stateChanged()},oe.prototype.dispose=function(){},oe.prototype.addMarkerVisualToContainer=function(b){this.container.childNodes.length>0?this.container.insertBefore(b,this.container.childNodes[0]):this.container.appendChild(b)},oe.prototype.getState=function(){return{typeName:oe.typeName,state:this.state,notes:this.notes}},oe.prototype.restoreState=function(b){this._state=b.state,this.notes=b.notes},oe.prototype.scale=function(b,A){},oe.prototype.colorChanged=function(b){this.onColorChanged&&this.onColorChanged(b),this.stateChanged()},oe.prototype.fillColorChanged=function(b){this.onFillColorChanged&&this.onFillColorChanged(b),this.stateChanged()},oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var b=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),b.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(b)&&this.onStateChanged(this)}},oe.typeName="MarkerBase",oe}(),Te=function(){function oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return oe.prototype.findGripByVisual=function(b){return this.topLeft.ownsTarget(b)?this.topLeft:this.topCenter.ownsTarget(b)?this.topCenter:this.topRight.ownsTarget(b)?this.topRight:this.centerLeft.ownsTarget(b)?this.centerLeft:this.centerRight.ownsTarget(b)?this.centerRight:this.bottomLeft.ownsTarget(b)?this.bottomLeft:this.bottomCenter.ownsTarget(b)?this.bottomCenter:this.bottomRight.ownsTarget(b)?this.bottomRight:void 0},oe}(),Fe=function(){function oe(){this.GRIP_SIZE=10,this.visual=ie.createGroup(),this.visual.appendChild(ie.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ie.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(b){return b===this.visual||b===this.visual.childNodes[0]||b===this.visual.childNodes[1]},oe}(),Be=function(){function oe(){}return oe.toITransformMatrix=function(b){return{a:b.a,b:b.b,c:b.c,d:b.d,e:b.e,f:b.f}},oe.toSVGMatrix=function(b,A){return b.a=A.a,b.b=A.b,b.c=A.c,b.d=A.d,b.e=A.e,b.f=A.f,b},oe}(),Ue=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.left=0,te.top=0,te.width=0,te.height=0,te.defaultSize={x:50,y:20},te.offsetX=0,te.offsetY=0,te.rotationAngle=0,te.CB_DISTANCE=10,te._suppressMarkerCreateEvent=!1,te.container.transform.baseVal.appendItem(ie.createTransform()),te.setupControlBox(),te}return ae(b,oe),Object.defineProperty(b.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"visual",{get:function(){return this._visual},set:function(A){this._visual=A;var re=ie.createTransform();this._visual.transform.baseVal.appendItem(re)},enumerable:!1,configurable:!0}),b.prototype.ownsTarget=function(A){return!!oe.prototype.ownsTarget.call(this,A)||!!(this.controlGrips.findGripByVisual(A)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(A))},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.state==="new"&&(this.left=A.x,this.top=A.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ue=this.unrotatePoint(A);if(this.manipulationStartX=ue.x,this.manipulationStartY=ue.y,this.offsetX=ue.x-this.left,this.offsetY=ue.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(re),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(re)){this.activeGrip=this.rotatorGrip;var te=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=te.x-this.width/2,this.top=te.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Pe=this.container.transform.baseVal.getItem(0);Pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},b.prototype.pointerUp=function(A){var re=this.state;oe.prototype.pointerUp.call(this,A),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(A),this._state="select",re==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},b.prototype.moveVisual=function(A){this.visual.style.transform="translate("+A.x+"px, "+A.y+"px)"},b.prototype.manipulate=function(A){var re=this.unrotatePoint(A);this.state==="creating"?this.resize(A):this.state==="move"?(this.left=this.manipulationStartLeft+(re.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(re.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(re):this.state==="rotate"&&this.rotate(A)},b.prototype.resize=function(A){var re=this.manipulationStartLeft,ue=this.manipulationStartWidth,te=this.manipulationStartTop,Pe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+A.x-this.manipulationStartX,ue=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ue=this.manipulationStartWidth+A.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:te=this.manipulationStartTop+A.y-this.manipulationStartY,Pe=this.manipulationStartHeight+this.manipulationStartTop-te;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Pe=this.manipulationStartHeight+A.y-this.manipulationStartY}ue>=0?(this.left=re,this.width=ue):(this.left=re+ue,this.width=-ue),Pe>=0?(this.top=te,this.height=Pe):(this.top=te+Pe,this.height=-Pe),this.setSize()},b.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},b.prototype.rotate=function(A){if(Math.abs(A.x-this.centerX)>.1){var re=Math.sign(A.x-this.centerX);this.rotationAngle=180*Math.atan((A.y-this.centerY)/(A.x-this.centerX))/Math.PI+90*re,this.applyRotation()}},b.prototype.applyRotation=function(){var A=this.container.transform.baseVal.getItem(0);A.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(A,0)},b.prototype.rotatePoint=function(A){if(this.rotationAngle===0)return A;var re=this.container.getCTM(),ue=ie.createPoint(A.x,A.y);return{x:(ue=ue.matrixTransform(re)).x,y:ue.y}},b.prototype.unrotatePoint=function(A){if(this.rotationAngle===0)return A;var re=this.container.getCTM();re=re.inverse();var ue=ie.createPoint(A.x,A.y);return{x:(ue=ue.matrixTransform(re)).x,y:ue.y}},b.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},b.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},b.prototype.setupControlBox=function(){this.controlBox=ie.createGroup();var A=ie.createTransform();A.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(A),this.container.appendChild(this.controlBox),this.controlRect=ie.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ie.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 Te,this.addControlGrips(),this.controlBox.style.display="none"},b.prototype.adjustControlBox=function(){var A=this.controlBox.transform.baseVal.getItem(0);A.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(A,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},b.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},b.prototype.createGrip=function(){var A=new Fe;return A.visual.transform.baseVal.appendItem(ie.createTransform()),this.controlBox.appendChild(A.visual),A},b.prototype.positionGrips=function(){var A=this.controlGrips.topLeft.GRIP_SIZE,re=-A/2,ue=re,te=(this.width+this.CB_DISTANCE)/2-A/2,Pe=(this.height+this.CB_DISTANCE)/2-A/2,Ze=this.height+this.CB_DISTANCE-A/2,ot=this.width+this.CB_DISTANCE-A/2;this.positionGrip(this.controlGrips.topLeft.visual,re,ue),this.positionGrip(this.controlGrips.topCenter.visual,te,ue),this.positionGrip(this.controlGrips.topRight.visual,ot,ue),this.positionGrip(this.controlGrips.centerLeft.visual,re,Pe),this.positionGrip(this.controlGrips.centerRight.visual,ot,Pe),this.positionGrip(this.controlGrips.bottomLeft.visual,re,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,te,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,ot,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,te,ue-3*this.CB_DISTANCE)},b.prototype.positionGrip=function(A,re,ue){var te=A.transform.baseVal.getItem(0);te.setTranslate(re,ue),A.transform.baseVal.replaceItem(te,0)},b.prototype.hideControlBox=function(){this.controlBox.style.display="none"},b.prototype.showControlBox=function(){this.controlBox.style.display=""},b.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Be.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Be.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},oe.prototype.getState.call(this))},b.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var re=A;this.left=re.left,this.top=re.top,this.width=re.width,this.height=re.height,this.rotationAngle=re.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Be.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Be.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},b.prototype.scale=function(A,re){oe.prototype.scale.call(this,A,re);var ue=this.rotatePoint({x:this.left,y:this.top}),te=this.unrotatePoint({x:ue.x*A,y:ue.y*re});this.left=te.x,this.top=te.y,this.width=this.width*A,this.height=this.height*re,this.adjustControlBox()},b}(be),ze=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.createVisual=te.createVisual.bind(te),te}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual)},b.prototype.createVisual=function(){this.visual=ie.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)},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.state==="new"&&(this.createVisual(),this.moveVisual(A),this._state="creating")},b.prototype.manipulate=function(A){oe.prototype.manipulate.call(this,A)},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.setSize()},b.prototype.setSize=function(){oe.prototype.setSize.call(this),ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},b.prototype.pointerUp=function(A){oe.prototype.pointerUp.call(this,A),this.setSize()},b.prototype.setStrokeColor=function(A){this.strokeColor=A,this.visual&&ie.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(A),this.stateChanged()},b.prototype.setFillColor=function(A){this.fillColor=A,this.visual&&ie.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},b.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.visual&&ie.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},b.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.visual&&ie.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},b.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this))},b.prototype.restoreState=function(A){var re=A;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),oe.prototype.restoreState.call(this,A),this.setSize()},b.prototype.scale=function(A,re){oe.prototype.scale.call(this,A,re),this.setSize()},b.title="Rectangle marker",b}(Ue),Ve=function(oe){function b(A,re,ue,te){var Pe=oe.call(this,A,te||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Pe.widths=[],Pe.widthBoxes=[],Pe.widths=re,Pe.currentWidth=ue,Pe.setCurrentWidth=Pe.setCurrentWidth.bind(Pe),Pe}return ae(b,oe),b.prototype.getUi=function(){var A=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.widths.forEach(function(ue){var te=document.createElement("div");te.style.display="flex",te.style.flexGrow="2",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=ue===A.currentWidth?A.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){A.setCurrentWidth(ue,te)}),re.appendChild(te);var Pe=document.createElement("div");Pe.innerText=ue.toString(),Pe.style.marginRight="5px",te.appendChild(Pe);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var ot=document.createElement("hr");ot.style.minWidth="20px",ot.style.border="0px",ot.style.borderTop=ue+"px solid "+A.uiStyleSettings.toolboxColor,ot.style.flexGrow="2",Ze.appendChild(ot),te.appendChild(Ze),A.widthBoxes.push(te)}),re},b.prototype.setCurrentWidth=function(A,re){var ue=this;this.currentWidth=A,this.widthBoxes.forEach(function(te){te.style.borderColor=te===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},b}(U),Xe=function(oe){function b(A,re,ue,te){var Pe=oe.call(this,A,te||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Pe.styles=[],Pe.styleBoxes=[],Pe.styles=re,Pe.currentStyle=ue,Pe.setCurrentStyle=Pe.setCurrentStyle.bind(Pe),Pe}return ae(b,oe),b.prototype.getUi=function(){var A=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.styles.forEach(function(ue){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/A.styles.length-5+"%",te.style.borderColor=ue===A.currentStyle?A.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){A.setCurrentStyle(ue,te)}),re.appendChild(te);var Pe=document.createElement("div");Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.overflow="hidden";var Ze=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+A.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ue!==""?'stroke-dasharray="'+ue+'"':"")+` />
|
|
|
</svg>`;Pe.innerHTML=Ze,te.appendChild(Pe),A.styleBoxes.push(te)}),re},b.prototype.setCurrentStyle=function(A,re){var ue=this;this.currentStyle=A,this.styleBoxes.forEach(function(te){te.style.borderColor=te===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},b}(U),Je=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.strokeColor=ue.defaultColor,te.strokeWidth=ue.defaultStrokeWidth,te.strokeDasharray=ue.defaultStrokeDasharray,te.strokePanel=new xe("Line color",ue.defaultColorSet,ue.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ve("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Xe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return ae(b,oe),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.typeName="FrameMarker",b.title="Frame marker",b.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',b}(ze),Ne=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},tt=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.x1=0,te.y1=0,te.x2=0,te.y2=0,te.defaultLength=50,te.manipulationStartX=0,te.manipulationStartY=0,te.manipulationStartX1=0,te.manipulationStartY1=0,te.manipulationStartX2=0,te.manipulationStartY2=0,te.setupControlBox(),te}return ae(b,oe),b.prototype.ownsTarget=function(A){return!!oe.prototype.ownsTarget.call(this,A)||!(!this.grip1.ownsTarget(A)&&!this.grip2.ownsTarget(A))},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.manipulationStartX=A.x,this.manipulationStartY=A.y,this.state==="new"&&(this.x1=A.x,this.y1=A.y,this.x2=A.x,this.y2=A.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(re)?this.activeGrip=this.grip1:this.grip2.ownsTarget(re)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},b.prototype.pointerUp=function(A){var re=this.state;oe.prototype.pointerUp.call(this,A),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(A),this._state="select",re==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},b.prototype.adjustVisual=function(){},b.prototype.manipulate=function(A){this.state==="creating"?this.resize(A):this.state==="move"?(this.x1=this.manipulationStartX1+A.x-this.manipulationStartX,this.y1=this.manipulationStartY1+A.y-this.manipulationStartY,this.x2=this.manipulationStartX2+A.x-this.manipulationStartX,this.y2=this.manipulationStartY2+A.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(A)},b.prototype.resize=function(A){switch(this.activeGrip){case this.grip1:this.x1=A.x,this.y1=A.y;break;case this.grip2:case void 0:this.x2=A.x,this.y2=A.y}this.adjustVisual(),this.adjustControlBox()},b.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},b.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},b.prototype.setupControlBox=function(){this.controlBox=ie.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},b.prototype.adjustControlBox=function(){this.positionGrips()},b.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},b.prototype.createGrip=function(){var A=new Fe;return A.visual.transform.baseVal.appendItem(ie.createTransform()),this.controlBox.appendChild(A.visual),A},b.prototype.positionGrips=function(){var A=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-A/2,this.y1-A/2),this.positionGrip(this.grip2.visual,this.x2-A/2,this.y2-A/2)},b.prototype.positionGrip=function(A,re,ue){var te=A.transform.baseVal.getItem(0);te.setTranslate(re,ue),A.transform.baseVal.replaceItem(te,0)},b.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},oe.prototype.getState.call(this))},b.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var re=A;this.x1=re.x1,this.y1=re.y1,this.x2=re.x2,this.y2=re.y2},b.prototype.scale=function(A,re){oe.prototype.scale.call(this,A,re),this.x1=this.x1*A,this.y1=this.y1*re,this.x2=this.x2*A,this.y2=this.y2*re,this.adjustVisual(),this.adjustControlBox()},b}(be),nt=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.strokeColor=ue.defaultColor,te.strokeWidth=ue.defaultStrokeWidth,te.strokeDasharray=ue.defaultStrokeDasharray,te.strokePanel=new xe("Line color",ue.defaultColorSet,ue.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ve("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Xe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.selectorLine&&A!==this.visibleLine)},b.prototype.createVisual=function(){this.visual=ie.createGroup(),this.selectorLine=ie.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ie.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)},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},b.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()),ie.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ie.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ie.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},b.prototype.setStrokeColor=function(A){this.strokeColor=A,this.adjustVisual(),this.colorChanged(A)},b.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.adjustVisual()},b.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.adjustVisual(),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var re=A;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.createVisual(),this.adjustVisual()},b.typeName="LineMarker",b.title="Line marker",b.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',b}(tt),Ke=function(oe){function b(A,re,ue,te){var Pe=oe.call(this,A,te||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Pe.fonts=[],Pe.fontBoxes=[],Pe.fonts=re,Pe.currentFont=ue,Pe.setCurrentFont=Pe.setCurrentFont.bind(Pe),Pe}return ae(b,oe),b.prototype.getUi=function(){var A=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.flexGrow="2",this.fonts.forEach(function(ue){var te=document.createElement("div");te.style.display="inline-block",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/A.fonts.length-5+"%",te.style.borderColor=ue===A.currentFont?A.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){A.setCurrentFont(ue,te)}),re.appendChild(te);var Pe=document.createElement("div");Pe.style.display="flex",Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.fontFamily=ue,Pe.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",Pe.appendChild(Ze),te.appendChild(Pe),A.fontBoxes.push(te)}),re},b.prototype.setCurrentFont=function(A,re){var ue=this;this.currentFont=A,this.fontBoxes.forEach(function(te){te.style.borderColor=te===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},b}(U),$e=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.color="transparent",te.padding=5,te.DEFAULT_TEXT="your text here",te.text=te.DEFAULT_TEXT,te.isMoved=!1,te.color=ue.defaultColor,te.fontFamily=ue.defaultFontFamily,te.defaultSize={x:100,y:30},te.setColor=te.setColor.bind(te),te.setFont=te.setFont.bind(te),te.renderText=te.renderText.bind(te),te.sizeText=te.sizeText.bind(te),te.textEditDivClicked=te.textEditDivClicked.bind(te),te.showTextEditor=te.showTextEditor.bind(te),te.setSize=te.setSize.bind(te),te.positionTextEditor=te.positionTextEditor.bind(te),te.colorPanel=new xe("Color",ue.defaultColorSet,ue.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.fontFamilyPanel=new Ke("Font",ue.defaultFontFamilies,ue.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te}return ae(b,oe),b.prototype.ownsTarget=function(A){if(oe.prototype.ownsTarget.call(this,A)||A===this.visual||A===this.textElement||A===this.bgRectangle)return!0;var re=!1;return this.textElement.childNodes.forEach(function(ue){ue===A&&(re=!0)}),re},b.prototype.createVisual=function(){this.visual=ie.createGroup(),this.bgRectangle=ie.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ie.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ie.createTransform()),this.textElement.transform.baseVal.appendItem(ie.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.isMoved=!1,this.pointerDownPoint=A,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(A),this._state="creating")},b.prototype.renderText=function(){var A=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(re){A.textElement.appendChild(ie.createTSpan(re.trim()===""?" ":re.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},b.prototype.getTextScale=function(){var A=this.textElement.getBBox(),re=1;if(A.width>0&&A.height>0){var ue=(1*this.width-this.width*this.padding*2/100)/A.width,te=(1*this.height-this.height*this.padding*2/100)/A.height;re=Math.min(ue,te)}return re},b.prototype.getTextPosition=function(A){var re=this.textElement.getBBox(),ue=0,te=0;return re.width>0&&re.height>0&&(ue=(this.width-re.width*A)/2,te=this.height/2-re.height*A/2),{x:ue,y:te}},b.prototype.sizeText=function(){var A=this.textElement.getBBox(),re=this.getTextScale(),ue=this.getTextPosition(re);ue.y-=A.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ue.x+"px, "+ue.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ue.x,ue.y),this.textElement.transform.baseVal.getItem(1).setScale(re,re))},b.prototype.manipulate=function(A){oe.prototype.manipulate.call(this,A),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(A.x-this.pointerDownPoint.x)>5||Math.abs(A.y-this.pointerDownPoint.y)>5)},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.isMoved=!0,this.setSize(),this.sizeText()},b.prototype.setSize=function(){oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ie.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},b.prototype.pointerUp=function(A){var re=this.state;re==="creating"&&(this._suppressMarkerCreateEvent=!0),oe.prototype.pointerUp.call(this,A),this.setSize(),(re==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},b.prototype.showTextEditor=function(){var A=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(re){re.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var re=Number.parseFloat(A.textEditor.style.fontSize);A.textEditor.clientWidth>=Number.parseInt(A.textEditor.style.maxWidth)&&re>.9;)re-=.1,A.textEditor.style.fontSize=Math.max(re,.9)+"em"}),this.textEditor.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(re){if(re.clipboardData){var ue=re.clipboardData.getData("text"),te=window.getSelection();if(!te.rangeCount)return!1;te.deleteFromDocument(),te.getRangeAt(0).insertNode(document.createTextNode(ue)),re.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){A.textEditDivClicked(A.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},b.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var A=this.getTextScale(),re=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ue=this.textElement.getBBox(),te={x:ue.width*A,y:ue.height*A};re.x-=te.x/2,re.y-=te.y/2,this.textEditor.style.top=re.y+"px",this.textEditor.style.left=re.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-re.x+"px",this.textEditor.style.fontSize=Math.max(16*A,12)+"px",this.textElement.style.display="none"}},b.prototype.textEditDivClicked=function(A){this.text=A.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},b.prototype.select=function(){oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},b.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),oe.prototype.deselect.call(this)},b.prototype.dblClick=function(A,re){oe.prototype.dblClick.call(this,A,re),this.showTextEditor()},b.prototype.setColor=function(A){this.textElement&&ie.setAttributes(this.textElement,[["fill",A]]),this.color=A,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(A)},b.prototype.setFont=function(A){this.textElement&&ie.setAttributes(this.textElement,[["font-family",A]]),this.fontFamily=A,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},b.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},b.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){var re=A;this.color=re.color,this.fontFamily=re.fontFamily,this.padding=re.padding,this.text=re.text,this.createVisual(),oe.prototype.restoreState.call(this,A),this.setSize()},b.prototype.scale=function(A,re){oe.prototype.scale.call(this,A,re),this.setSize(),this.sizeText(),this.positionTextEditor()},b.typeName="TextMarker",b.title="Text marker",b.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',b}(Ue),je=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.color="transparent",te.lineWidth=3,te.drawing=!1,te.pixelRatio=1,te.color=ue.defaultColor,te.lineWidth=ue.defaultStrokeWidth,te.pixelRatio=ue.freehandPixelRatio,te.setColor=te.setColor.bind(te),te.addCanvas=te.addCanvas.bind(te),te.finishCreation=te.finishCreation.bind(te),te.setLineWidth=te.setLineWidth.bind(te),te.colorPanel=new xe("Color",ue.defaultColorSet,ue.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.lineWidthPanel=new Ve("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),te.lineWidthPanel.onWidthChanged=te.setLineWidth,te}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.drawingImage)},b.prototype.createVisual=function(){this.visual=ie.createGroup(),this.drawingImage=ie.createImage(),this.visual.appendChild(this.drawingImage);var A=ie.createTransform();this.visual.transform.baseVal.appendItem(A),this.addMarkerVisualToContainer(this.visual)},b.prototype.pointerDown=function(A,re){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(A.x,A.y),this.drawing=!0):oe.prototype.pointerDown.call(this,A,re)},b.prototype.manipulate=function(A){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(A.x,A.y),this.canvasContext.stroke()):oe.prototype.manipulate.call(this,A)},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ie.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},b.prototype.pointerUp=function(A){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):oe.prototype.pointerUp.call(this,A)},b.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)},b.prototype.select=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.select.call(this)},b.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.deselect.call(this)},b.prototype.finishCreation=function(){for(var A=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),re=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ue=re[0],te=re[1],Pe=re[2],Ze=re[3],ot=!1,yt=0;yt<this.canvasElement.height;yt++)for(var qe=0;qe<this.canvasElement.width;qe++)A.data[yt*this.canvasElement.width*4+4*qe+3]>0&&(ot=!0,yt<te&&(te=yt),qe<ue&&(ue=qe),yt>Ze&&(Ze=yt),qe>Pe&&(Pe=qe));if(ot){this.left=ue/this.pixelRatio,this.top=te/this.pixelRatio,this.width=(Pe-ue)/this.pixelRatio,this.height=(Ze-te)/this.pixelRatio;var Nt=document.createElement("canvas");Nt.width=Pe-ue,Nt.height=Ze-te,Nt.getContext("2d").putImageData(this.canvasContext.getImageData(ue,te,Pe-ue,Ze-te),0,0),this.drawingImgUrl=Nt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},b.prototype.setDrawingImage=function(){ie.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ie.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},b.prototype.setColor=function(A){this.color=A,this.colorChanged(A)},b.prototype.setLineWidth=function(A){this.lineWidth=A},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({drawingImgUrl:this.drawingImgUrl},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){this.createVisual(),oe.prototype.restoreState.call(this,A),this.drawingImgUrl=A.drawingImgUrl,this.setDrawingImage()},b.prototype.scale=function(A,re){oe.prototype.scale.call(this,A,re),this.setDrawingImage()},b.typeName="FreehandMarker",b.title="Freehand marker",b.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',b}(Ue),Me=function(oe){function b(A,re,ue){var te=oe.call(this,A,ue||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return te.typeBoxes=[],te.currentType=re,te.setCurrentType=te.setCurrentType.bind(te),te}return ae(b,oe),b.prototype.getUi=function(){var A=this,re=document.createElement("div");re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2";for(var ue=function(Ze){var ot="both";switch(Ze){case 0:ot="both";break;case 1:ot="start";break;case 2:ot="end";break;case 3:ot="none"}var yt=document.createElement("div");if(yt.style.display="flex",yt.style.flexGrow="2",yt.style.alignItems="center",yt.style.justifyContent="space-between",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.borderColor=ot===te.currentType?te.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){A.setCurrentType(ot,yt)}),re.appendChild(yt),ot==="both"||ot==="start"){var qe=document.createElement("div");qe.style.display="flex",qe.style.alignItems="center",qe.style.minHeight="20px",qe.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,qe.style.marginLeft="5px",yt.appendChild(qe)}var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.minHeight="20px",Nt.style.flexGrow="2";var Gt=document.createElement("hr");if(Gt.style.minWidth="20px",Gt.style.border="0px",Gt.style.borderTop="3px solid "+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee"),Gt.style.flexGrow="2",Nt.appendChild(Gt),yt.appendChild(Nt),ot==="both"||ot==="end"){var nr=document.createElement("div");nr.style.display="flex",nr.style.alignItems="center",nr.style.minHeight="20px",nr.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,nr.style.marginRight="5px",yt.appendChild(nr)}te.typeBoxes.push(yt)},te=this,Pe=0;Pe<4;Pe++)ue(Pe);return re},b.prototype.setCurrentType=function(A,re){var ue=this;this.currentType=A,this.typeBoxes.forEach(function(te){te.style.borderColor=te===re?ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},b}(U),Ie=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.arrowType="end",te.arrowBaseHeight=10,te.arrowBaseWidth=10,te.getArrowPoints=te.getArrowPoints.bind(te),te.setArrowType=te.setArrowType.bind(te),te.arrowTypePanel=new Me("Arrow type","end"),te.arrowTypePanel.onArrowTypeChanged=te.setArrowType,te}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.arrow1&&A!==this.arrow2)},b.prototype.getArrowPoints=function(A,re){var ue=this.arrowBaseWidth+2*this.strokeWidth,te=this.arrowBaseHeight+2*this.strokeWidth;return A-ue/2+","+(re+te/2)+" "+A+","+(re-te/2)+" "+(A+ue/2)+","+(re+te/2)},b.prototype.createTips=function(){this.arrow1=ie.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ie.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ie.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ie.createTransform()),this.visual.appendChild(this.arrow2)},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.state==="creating"&&this.createTips()},b.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ie.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ie.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var A=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),re=this.arrow1.transform.baseVal.getItem(0);re.setRotate(A,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(re,0);var ue=this.arrow2.transform.baseVal.getItem(0);ue.setRotate(A+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ue,0)}},b.prototype.setArrowType=function(A){this.arrowType=A,this.adjustVisual(),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({arrowType:this.arrowType},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var re=A;this.arrowType=re.arrowType,this.createTips(),this.adjustVisual()},b.typeName="ArrowMarker",b.title="Arrow marker",b.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',b}(nt),_e=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.fillColor=ue.defaultFillColor,te.strokeWidth=0,te.fillPanel=new xe("Color",ue.defaultColorSet,ue.defaultFillColor),te.fillPanel.onColorChanged=te.setFillColor,te}return ae(b,oe),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.typeName="CoverMarker",b.title="Cover marker",b.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',b}(ze),Se=function(oe){function b(A,re,ue,te){var Pe=oe.call(this,A,te||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Pe.opacities=[],Pe.opacityBoxes=[],Pe.opacities=re,Pe.currentOpacity=ue,Pe.setCurrentOpacity=Pe.setCurrentOpacity.bind(Pe),Pe}return ae(b,oe),b.prototype.getUi=function(){var A=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",re.style.justifyContent="space-between",this.opacities.forEach(function(ue){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="center",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=ue===A.currentOpacity?A.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){A.setCurrentOpacity(ue,te)}),re.appendChild(te);var Pe=document.createElement("div");Pe.innerText=100*ue+"%",te.appendChild(Pe),A.opacityBoxes.push(te)}),re},b.prototype.setCurrentOpacity=function(A,re){var ue=this;this.currentOpacity=A,this.opacityBoxes.forEach(function(te){te.style.borderColor=te===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},b}(U),ke=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.setOpacity=te.setOpacity.bind(te),te.fillColor=ue.defaultHighlightColor,te.strokeWidth=0,te.opacity=ue.defaultHighlightOpacity,te.fillPanel=new xe("Color",ue.defaultColorSet,te.fillColor),te.fillPanel.onColorChanged=te.setFillColor,te.opacityPanel=new Se("Opacity",ue.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return ae(b,oe),b.prototype.setOpacity=function(A){this.opacity=A,this.visual&&ie.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.typeName="HighlightMarker",b.title="Highlight marker",b.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',b}(_e),Re='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',He=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.bgColor="transparent",te.tipPosition={x:0,y:0},te.tipBase1Position={x:0,y:0},te.tipBase2Position={x:0,y:0},te.tipMoving=!1,te.color=ue.defaultStrokeColor,te.bgColor=ue.defaultFillColor,te.fontFamily=ue.defaultFontFamily,te.defaultSize={x:100,y:30},te.setBgColor=te.setBgColor.bind(te),te.getTipPoints=te.getTipPoints.bind(te),te.positionTip=te.positionTip.bind(te),te.setTipPoints=te.setTipPoints.bind(te),te.colorPanel=new xe("Text color",ue.defaultColorSet,te.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),te.colorPanel.onColorChanged=te.setColor,te.bgColorPanel=new xe("Fill color",ue.defaultColorSet,te.bgColor,Re),te.bgColorPanel.onColorChanged=te.setBgColor,te.fontFamilyPanel=new Ke("Font",ue.defaultFontFamilies,ue.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te.tipGrip=new Fe,te.tipGrip.visual.transform.baseVal.appendItem(ie.createTransform()),te.controlBox.appendChild(te.tipGrip.visual),te}return ae(b,oe),b.prototype.ownsTarget=function(A){return oe.prototype.ownsTarget.call(this,A)||this.tipGrip.ownsTarget(A)||this.tip===A},b.prototype.createTip=function(){ie.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ie.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},b.prototype.pointerDown=function(A,re){this.state==="new"&&oe.prototype.pointerDown.call(this,A,re),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(re)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):oe.prototype.pointerDown.call(this,A,re)},b.prototype.pointerUp=function(A){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,oe.prototype.pointerUp.call(this,A);else{var re=this.state==="creating";oe.prototype.pointerUp.call(this,A),this.setTipPoints(re),this.positionTip()}},b.prototype.manipulate=function(A){if(this.tipMoving){var re=this.unrotatePoint(A);this.tipPosition={x:re.x-this.manipulationStartLeft,y:re.y-this.manipulationStartTop},this.positionTip()}else oe.prototype.manipulate.call(this,A)},b.prototype.setBgColor=function(A){this.bgRectangle&&this.tip&&(ie.setAttributes(this.bgRectangle,[["fill",A]]),ie.setAttributes(this.tip,[["fill",A]])),this.bgColor=A,this.fillColorChanged(A)},b.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},b.prototype.setTipPoints=function(A){A===void 0&&(A=!1);var re=Math.min(this.height/2,15),ue=this.height/5;A&&(this.tipPosition={x:re+ue/2,y:this.height+20});var te=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?te<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:0},this.tipBase2Position={x:re+ue,y:0}):(this.tipBase1Position={x:0,y:re},this.tipBase2Position={x:0,y:re+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?te<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-ue,y:0},this.tipBase2Position={x:this.width-re,y:0}):(this.tipBase1Position={x:this.width,y:re},this.tipBase2Position={x:this.width,y:re+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?te<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-ue,y:this.height},this.tipBase2Position={x:this.width-re,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-re-ue},this.tipBase2Position={x:this.width,y:this.height-re}):te<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:this.height},this.tipBase2Position={x:re+ue,y:this.height}):(this.tipBase1Position={x:0,y:this.height-re},this.tipBase2Position={x:0,y:this.height-re-ue})},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.positionTip()},b.prototype.positionTip=function(){ie.setAttributes(this.tip,[["points",this.getTipPoints()]]);var A=this.tipGrip.visual.transform.baseVal.getItem(0);A.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(A,0)},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),b.prototype.select=function(){this.positionTip(),oe.prototype.select.call(this)},b.prototype.getState=function(){var A=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){var re=A;this.bgColor=re.bgColor,this.tipPosition=re.tipPosition,oe.prototype.restoreState.call(this,A),this.createTip(),this.setTipPoints()},b.prototype.scale=function(A,re){oe.prototype.scale.call(this,A,re),this.tipPosition={x:this.tipPosition.x*A,y:this.tipPosition.y*re},this.positionTip()},b.typeName="CalloutMarker",b.title="Callout marker",b.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',b}($e),Ae=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.strokeColor=ue.defaultColor,te.strokeWidth=ue.defaultStrokeWidth,te.strokeDasharray=ue.defaultStrokeDasharray,te.fillColor=ue.defaultFillColor,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.setOpacity=te.setOpacity.bind(te),te.createVisual=te.createVisual.bind(te),te.strokePanel=new xe("Line color",q(ue.defaultColorSet,["transparent"]),ue.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.fillPanel=new xe("Fill color",q(ue.defaultColorSet,["transparent"]),te.fillColor,Re),te.fillPanel.onColorChanged=te.setFillColor,te.strokeWidthPanel=new Ve("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Xe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te.opacityPanel=new Se("Opacity",ue.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual)},b.prototype.createVisual=function(){this.visual=ie.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)},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.state==="new"&&(this.createVisual(),this.moveVisual(A),this._state="creating")},b.prototype.manipulate=function(A){oe.prototype.manipulate.call(this,A)},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.setSize()},b.prototype.setSize=function(){oe.prototype.setSize.call(this),ie.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},b.prototype.pointerUp=function(A){oe.prototype.pointerUp.call(this,A),this.setSize()},b.prototype.setStrokeColor=function(A){this.strokeColor=A,this.visual&&ie.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(A),this.stateChanged()},b.prototype.setFillColor=function(A){this.fillColor=A,this.visual&&ie.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(A),this.stateChanged()},b.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.visual&&ie.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},b.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.visual&&ie.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},b.prototype.setOpacity=function(A){this.opacity=A,this.visual&&ie.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){var re=A;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),oe.prototype.restoreState.call(this,A),this.setSize()},b.prototype.scale=function(A,re){oe.prototype.scale.call(this,A,re),this.setSize()},b.typeName="EllipseMarker",b.title="Ellipse marker",b.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',b}(Ue),Ye=function(oe){function b(A,re,ue){return oe.call(this,A,re,ue)||this}return ae(b,oe),Object.defineProperty(b.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.tip1&&A!==this.tip2)},b.prototype.createTips=function(){this.tip1=ie.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(ie.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ie.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(ie.createTransform()),this.visual.appendChild(this.tip2)},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.state==="creating"&&this.createTips()},b.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ie.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()]]),ie.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 A=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),re=this.tip1.transform.baseVal.getItem(0);re.setRotate(A,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(re,0);var ue=this.tip2.transform.baseVal.getItem(0);ue.setRotate(A+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ue,0)}},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A),this.createTips(),this.adjustVisual()},b.typeName="MeasurementMarker",b.title="Measurement marker",b.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',b}(nt),it=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.strokePanel.colors=ue.defaultColorSet,te.fillColor="transparent",te}return ae(b,oe),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.typeName="EllipseFrameMarker",b.title="Ellipse frame marker",b.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',b}(Ae),lt=function(){function oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),oe.prototype.addUndoStep=function(b){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(b)||(this.undoStack.push(b),JSON.stringify(this.lastRedoStep)!==JSON.stringify(b)&&this.redoStack.splice(0,this.redoStack.length))},oe.prototype.replaceLastUndoStep=function(b){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=b)},oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},oe.prototype.undo=function(){if(this.undoStack.length>1){var b=this.undoStack.pop();return b!==void 0&&this.redoStack.push(b),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},oe}(),ut=function(oe){function b(A,re,ue){var te=oe.call(this,A,re,ue)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.curveX=0,te.curveY=0,te.manipulationStartCurveX=0,te.manipulationStartCurveY=0,te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.positionGrips=te.positionGrips.bind(te),te.addControlGrips=te.addControlGrips.bind(te),te.adjustVisual=te.adjustVisual.bind(te),te.setupControlBox=te.setupControlBox.bind(te),te.resize=te.resize.bind(te),te.strokeColor=ue.defaultColor,te.strokeWidth=ue.defaultStrokeWidth,te.strokeDasharray=ue.defaultStrokeDasharray,te.strokePanel=new xe("Line color",ue.defaultColorSet,ue.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ve("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Xe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.selectorCurve&&A!==this.visibleCurve&&!this.curveGrip.ownsTarget(A))},b.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},b.prototype.createVisual=function(){this.visual=ie.createGroup(),this.selectorCurve=ie.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ie.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)},b.prototype.pointerDown=function(A,re){oe.prototype.pointerDown.call(this,A,re),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=A.x,this.curveY=A.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(re)&&(this.activeGrip=this.curveGrip,this._state="resize")},b.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ie.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ie.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ie.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},b.prototype.setupControlBox=function(){oe.prototype.setupControlBox.call(this),this.curveControlLine1=ie.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ie.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)},b.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,oe.prototype.addControlGrips.call(this)},b.prototype.positionGrips=function(){oe.prototype.positionGrips.call(this);var A=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-A/2,this.curveY-A/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()))},b.prototype.manipulate=function(A){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+A.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+A.y-this.manipulationStartY),oe.prototype.manipulate.call(this,A)},b.prototype.resize=function(A){this.activeGrip===this.curveGrip&&(this.curveX=A.x,this.curveY=A.y),oe.prototype.resize.call(this,A),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},b.prototype.setStrokeColor=function(A){this.strokeColor=A,this.adjustVisual(),this.colorChanged(A)},b.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.adjustVisual()},b.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.adjustVisual()},b.prototype.scale=function(A,re){this.curveX=this.curveX*A,this.curveY=this.curveY*re,oe.prototype.scale.call(this,A,re)},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var re=A;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.curveX=re.curveX,this.curveY=re.curveY,this.createVisual(),this.adjustVisual()},b.typeName="CurveMarker",b.title="Curve marker",b.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',b}(tt),ct=function(){function oe(b,A){A===void 0&&(A=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=b,this.cancelable=A}return Object.defineProperty(oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),oe.prototype.preventDefault=function(){this._defaultPrevented=!0},oe}(),xt=function(oe){function b(A,re,ue){var te=oe.call(this,A,!1)||this;return te.dataUrl=re,te.state=ue,te}return ae(b,oe),b}(ct),dt=function(oe){function b(A,re,ue){ue===void 0&&(ue=!1);var te=oe.call(this,A,ue)||this;return te.marker=re,te}return ae(b,oe),b}(ct),kt=function(){function oe(){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 oe.prototype.addEventListener=function(b,A){this[b].push(A)},oe.prototype.removeEventListener=function(b,A){var re=this[b].indexOf(A);re>-1&&this[b].splice(re,1)},oe}(),zt=function(){function oe(b){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ne,this._isOpen=!1,this.undoRedoManager=new lt,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 kt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=oe.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=b,this.targetRoot=document.body,this.width=b.clientWidth,this.height=b.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(oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Je,je,Ie,$e,it,Ae,ke,He,Ye,_e,nt,ut]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Je,je,Ie,$e,Ae,ke,He]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Je,je,Ie,$e,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(b){var A=this;this._availableMarkerTypes.splice(0),b.forEach(function(re){if(typeof re=="string"){var ue=A.ALL_MARKER_TYPES.find(function(te){return te.typeName===re});ue!==void 0&&A._availableMarkerTypes.push(ue)}else A._availableMarkerTypes.push(re)})},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(b){this._zoomLevel=b,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(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),$.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},oe.prototype.show=function(){var b=this;this.styles.styleSheetRoot===void 0&&K.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=K.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(A){return A(new ct(b))})},oe.prototype.render=function(){return fe(this,void 0,void 0,function(){var b;return ge(this,function(A){switch(A.label){case 0:return this.setCurrentMarker(),(b=new se).naturalSize=this.renderAtNaturalSize,b.imageType=this.renderImageType,b.imageQuality=this.renderImageQuality,b.markersOnly=this.renderMarkersOnly,b.width=this.renderWidth,b.height=this.renderHeight,[4,b.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return A.sent(),[4,b.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,A.sent()]}})})},oe.prototype.close=function(b){var A=this;if(b===void 0&&(b=!1),this.isOpen){var re=!1;b||this.eventListeners.beforeclose.forEach(function(ue){var te=new ct(A,!0);ue(te),te.defaultPrevented&&(re=!0)}),re||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ue){return ue(new ct(A))}),this.detachEvents(),this._isOpen=!1)}},oe.prototype.addMarkersToToolbar=function(){for(var b,A=[],re=0;re<arguments.length;re++)A[re]=arguments[re];(b=this._availableMarkerTypes).push.apply(b,A)},oe.prototype.addRenderEventListener=function(b){this.addEventListener("render",function(A){b(A.dataUrl,A.state)})},oe.prototype.removeRenderEventListener=function(b){},oe.prototype.addCloseEventListener=function(b){this.addEventListener("close",function(){b()})},oe.prototype.removeCloseEventListener=function(b){},oe.prototype.setupResizeObserver=function(){var b=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){b.resize(b.target.clientWidth,b.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return b.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupTargetResize=function(){var b=1*this.target.clientWidth/this.target.clientHeight,A=this.editorCanvas.clientWidth/b>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*b:this.editorCanvas.clientWidth,re=A<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/b;this.resize(A,re)},oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},oe.prototype.resize=function(b,A){this._isResizing=!0;var re=b/this.imageWidth,ue=A/this.imageHeight;this.imageWidth=Math.round(b),this.imageHeight=Math.round(A),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(re,ue),this._isResizing=!1},oe.prototype.scaleMarkers=function(b,A){var re,ue=this;this._currentMarker&&this._currentMarker instanceof $e?this._currentMarker.scale(b,A):(re=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(te){te!==ue._currentMarker&&te.scale(b,A)}),re!==void 0&&this.setCurrentMarker(re)},oe.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},oe.prototype.setTopLeft=function(){var b=this.editingTarget.getBoundingClientRect(),A=this.editorCanvas.getBoundingClientRect();this.left=b.left-A.left,this.top=b.top-A.top},oe.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},oe.prototype.addDefs=function(){for(var b,A=[],re=0;re<arguments.length;re++)A[re]=arguments[re];this.defs=ie.createDefs(),this.addDefsToImage(),(b=this.defs).append.apply(b,A)},oe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},oe.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},oe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},oe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},oe.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},oe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},oe.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},oe.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var b=document.createElement("a");b.href="https://markerjs.com/",b.target="_blank",b.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',b.title="Powered by marker.js",b.style.display="grid",b.style.alignItems="center",b.style.justifyItems="center",b.style.padding="3px",b.style.width="20px",b.style.height="20px",this.logoUI.appendChild(b),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},oe.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},oe.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"},oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},oe.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var b=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=b+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new B(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new E(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},oe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},oe.prototype.removeMarker=function(b){this.markerImage.removeChild(b.container),this.markers.indexOf(b)>-1&&this.markers.splice(this.markers.indexOf(b),1),b.dispose()},oe.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},oe.prototype.toolbarButtonClicked=function(b,A){if(b==="marker"&&A!==void 0)this.createNewMarker(A);else if(b==="action")switch(A){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},oe.prototype.deleteSelectedMarker=function(){var b=this;if(this._currentMarker!==void 0){var A=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ue){var te=new dt(b,b._currentMarker,!0);ue(te),te.defaultPrevented&&(A=!0)}),!A){var re=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(ue){return ue(new dt(b,re))})}}},oe.prototype.clear=function(){var b=this,A=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Pe){var Ze=new dt(b,void 0,!0);Pe(Ze),Ze.defaultPrevented&&(A=!0)}),!A)){this.setCurrentMarker();for(var re=function(Pe){var Ze=ue.markers[Pe];ue.setCurrentMarker(ue.markers[Pe]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(ot){return ot(new dt(b,Ze))})},ue=this,te=this.markers.length-1;te>=0;te--)re(te);this.addUndoStep()}},Object.defineProperty(oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),oe.prototype.showNotesEditor=function(){var b;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(b=this._currentMarker.notes)!==null&&b!==void 0?b:"",this.overlayContainer.appendChild(this.notesArea))},oe.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},oe.prototype.addUndoStep=function(){var b=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var A=this.getState(),re=this.undoRedoManager.getLastUndoStep();if(!re||re.width===A.width&&re.height===A.height){var ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(A),ue<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(te){return te(new ct(b))})}else this.undoRedoManager.replaceLastUndoStep(A),this.eventListeners.statechange.forEach(function(te){return te(new ct(b))})}},oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},oe.prototype.undoStep=function(){var b=this,A=this.undoRedoManager.undo();A!==void 0&&(this.restoreState(A),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new ct(b))}))},oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},oe.prototype.redoStep=function(){var b=this,A=this.undoRedoManager.redo();A!==void 0&&(this.restoreState(A),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new ct(b))}))},oe.prototype.stepZoom=function(){var b=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=b<this.zoomSteps.length-1?this.zoomSteps[b+1]:this.zoomSteps[0]},oe.prototype.panTo=function(b){this.contentDiv.scrollBy({left:this.prevPanPoint.x-b.x,top:this.prevPanPoint.y-b.y}),this.prevPanPoint=b},oe.prototype.startRenderAndClose=function(){return fe(this,void 0,void 0,function(){var b,A,re=this;return ge(this,function(ue){switch(ue.label){case 0:return[4,this.render()];case 1:return b=ue.sent(),A=this.getState(),this.eventListeners.render.forEach(function(te){return te(new xt(re,b,A))}),this.close(!0),[2]}})})},oe.prototype.getState=function(b){b===!0&&this.setCurrentMarker();var A={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(re){return A.markers.push(re.getState())}),A},oe.prototype.restoreState=function(b){var A=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);b.markers.forEach(function(re){var ue=A._availableMarkerTypes.find(function(Pe){return Pe.typeName===re.typeName});if(ue!==void 0){var te=A.addNewMarker(ue);te.restoreState(re),A.markers.push(te)}}),b.width&&b.height&&(b.width!==this.imageWidth||b.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/b.width,this.imageHeight/b.height),this.eventListeners.restorestate.forEach(function(re){return re(new ct(A))})},oe.prototype.addNewMarker=function(b){var A=ie.createGroup();return this.markerImage.appendChild(A),new b(A,this.overlayContainer,this.settings)},oe.prototype.createNewMarker=function(b){var A,re=this;(A=typeof b=="string"?this._availableMarkerTypes.find(function(ue){return ue.typeName===b}):b)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(A),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(A.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ue){return ue(new dt(re,re._currentMarker))}))},oe.prototype.markerCreated=function(b){var A=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(b),this.setCurrentMarker(b),b instanceof je&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(je):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new dt(A,A._currentMarker))})},oe.prototype.colorChanged=function(b){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=b,this.settings.defaultStrokeColor=b)},oe.prototype.fillColorChanged=function(b){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=b)},oe.prototype.markerStateChanged=function(b){var A=this;this.eventListeners.markerchange.forEach(function(re){return re(new dt(A,b))})},oe.prototype.setCurrentMarker=function(b){var A=this;this._currentMarker!==b&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(re){return re(new dt(A,A._currentMarker))})),this._currentMarker=b,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(re){return re(new dt(A,A._currentMarker))}))},oe.prototype.onPointerDown=function(b){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||b.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var A=this.markers.find(function(re){return re.ownsTarget(b.target)});A!==void 0?(this.setCurrentMarker(A),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(b.clientX,b.clientY),b.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:b.clientX,y:b.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(b.clientX,b.clientY))},oe.prototype.onDblClick=function(b){if(this._isFocused||this.focus(),this.mode==="select"){var A=this.markers.find(function(re){return re.ownsTarget(b.target)});A!==void 0&&A!==this._currentMarker&&this.setCurrentMarker(A),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(b.clientX,b.clientY),b.target):this.setCurrentMarker()}},oe.prototype.onPointerMove=function(b){this.touchPoints!==1&&b.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||b.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(b.clientX,b.clientY)):this.zoomLevel>1&&this.panTo({x:b.clientX,y:b.clientY}))},oe.prototype.onPointerUp=function(b){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(b.clientX,b.clientY)),this.isDragging=!1,this.addUndoStep()},oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},oe.prototype.onKeyUp=function(b){this._currentMarker===void 0||this.notesArea!==void 0||b.key!=="Delete"&&b.key!=="Backspace"||this.deleteSelectedMarker()},oe.prototype.clientToLocalCoordinates=function(b,A){var re=this.markerImage.getBoundingClientRect();return{x:(b-re.left)/this.zoomLevel,y:(A-re.top)/this.zoomLevel}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var b=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=b+"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()},oe.prototype.addLicenseKey=function(b){$.addKey(b)},oe.prototype.addEventListener=function(b,A){this.eventListeners.addEventListener(b,A)},oe.prototype.removeEventListener=function(b,A){this.eventListeners.removeEventListener(b,A)},oe.prototype.renderState=function(b){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(b),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),oe.prototype.focus=function(){var b=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(A){return A(new ct(b))}))},oe.prototype.blur=function(){var b=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(A){return A(new ct(b))}))},oe.instanceCounter=0,oe}();/* **********************************
|
|
|
cropro version 1.2.0
|
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
|
|
copyright Alan Mendelevich
|
|
|
see README and LICENSE for details
|
|
|
********************************** *//*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var Vt=function(oe,b){return(Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,re){A.__proto__=re}||function(A,re){for(var ue in re)Object.prototype.hasOwnProperty.call(re,ue)&&(A[ue]=re[ue])})(oe,b)};function Yt(oe,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function A(){this.constructor=oe}Vt(oe,b),oe.prototype=b===null?Object.create(b):(A.prototype=b.prototype,new A)}function It(oe,b,A,re){return new(A||(A=Promise))(function(ue,te){function Pe(yt){try{ot(re.next(yt))}catch(qe){te(qe)}}function Ze(yt){try{ot(re.throw(yt))}catch(qe){te(qe)}}function ot(yt){var qe;yt.done?ue(yt.value):(qe=yt.value,qe instanceof A?qe:new A(function(Nt){Nt(qe)})).then(Pe,Ze)}ot((re=re.apply(oe,b||[])).next())})}function Ut(oe,b){var A,re,ue,te,Pe={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return te={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function Ze(ot){return function(yt){return function(qe){if(A)throw new TypeError("Generator is already executing.");for(;Pe;)try{if(A=1,re&&(ue=2&qe[0]?re.return:qe[0]?re.throw||((ue=re.return)&&ue.call(re),0):re.next)&&!(ue=ue.call(re,qe[1])).done)return ue;switch(re=0,ue&&(qe=[2&qe[0],ue.value]),qe[0]){case 0:case 1:ue=qe;break;case 4:return Pe.label++,{value:qe[1],done:!1};case 5:Pe.label++,re=qe[1],qe=[0];continue;case 7:qe=Pe.ops.pop(),Pe.trys.pop();continue;default:if(!(ue=Pe.trys,(ue=ue.length>0&&ue[ue.length-1])||qe[0]!==6&&qe[0]!==2)){Pe=0;continue}if(qe[0]===3&&(!ue||qe[1]>ue[0]&&qe[1]<ue[3])){Pe.label=qe[1];break}if(qe[0]===6&&Pe.label<ue[1]){Pe.label=ue[1],ue=qe;break}if(ue&&Pe.label<ue[2]){Pe.label=ue[2],Pe.ops.push(qe);break}ue[2]&&Pe.ops.pop(),Pe.trys.pop();continue}qe=b.call(oe,Pe)}catch(Nt){qe=[6,Nt],re=0}finally{A=ue=0}if(5&qe[0])throw qe[1];return{value:qe[0]?qe[1]:void 0,done:!0}}([ot,yt])}}}var jr=function(){function oe(){}return oe.addKey=function(b){oe.key=b},Object.defineProperty(oe,"isLicensed",{get:function(){return!!oe.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(oe.key)},enumerable:!1,configurable:!0}),oe}(),Tt=function(){function oe(){}return oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},oe.setAttributes=function(b,A){for(var re=0,ue=A;re<ue.length;re++){var te=ue[re],Pe=te[0],Ze=te[1];b.setAttribute(Pe,Ze)}},oe.createRect=function(b,A,re){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",b.toString()),ue.setAttribute("height",A.toString()),re&&oe.setAttributes(ue,re),ue},oe.createLine=function(b,A,re,ue,te){var Pe=document.createElementNS("http://www.w3.org/2000/svg","line");return Pe.setAttribute("x1",b.toString()),Pe.setAttribute("y1",A.toString()),Pe.setAttribute("x2",re.toString()),Pe.setAttribute("y2",ue.toString()),te&&oe.setAttributes(Pe,te),Pe},oe.createPolygon=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","polygon");return re.setAttribute("points",b),A&&oe.setAttributes(re,A),re},oe.createCircle=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","circle");return re.setAttribute("cx",(b/2).toString()),re.setAttribute("cy",(b/2).toString()),re.setAttribute("r",b.toString()),A&&oe.setAttributes(re,A),re},oe.createEllipse=function(b,A,re){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(b/2).toString()),ue.setAttribute("cy",(A/2).toString()),ue.setAttribute("rx",(b/2).toString()),ue.setAttribute("ry",(A/2).toString()),re&&oe.setAttributes(ue,re),ue},oe.createGroup=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","g");return b&&oe.setAttributes(A,b),A},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(b,A,re,ue,te,Pe,Ze){var ot=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(ot,[["id",b],["orient",A],["markerWidth",re.toString()],["markerHeight",ue.toString()],["refX",te.toString()],["refY",Pe.toString()]]),ot.appendChild(Ze),ot},oe.createText=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","text");return A.setAttribute("x","0"),A.setAttribute("y","0"),b&&oe.setAttributes(A,b),A},oe.createTSpan=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","tspan");return re.textContent=b,A&&oe.setAttributes(re,A),re},oe.createImage=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","image");return b&&oe.setAttributes(A,b),A},oe.createPoint=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return re.x=b,re.y=A,re},oe.createPath=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg","path");return re.setAttribute("d",b),A&&oe.setAttributes(re,A),re},oe.createElement=function(b,A){var re=document.createElementNS("http://www.w3.org/2000/svg",b);return A&&oe.setAttributes(re,A),re},oe.getHollowRectanglePath=function(b,A,re,ue,te,Pe,Ze,ot){return"M"+b+","+A+"V"+(A+ue)+"H"+(b+re)+"V"+A+"H"+te+"V"+Pe+"H"+(te+Ze)+"V"+(Pe+ot)+"H"+te+"V"+A+"Z"},oe}(),Rr=function(){function oe(b){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+b+"_"}return Object.defineProperty(oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),oe.prototype.addClass=function(b){return this.styleSheet===void 0&&this.addStyleSheet(),b.name=""+this.classNamePrefix+b.localName,this.classes.push(b),this.styleSheet.sheet.insertRule("."+b.name+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length),b},oe.prototype.addRule=function(b){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(b),this.styleSheet.sheet.insertRule(b.selector+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var b;this.styleSheet=document.createElement("style"),((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).appendChild(this.styleSheet),this.addRule(new Jt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Jt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Jt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new rr("_fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new rr("_fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},oe.prototype.removeStyleSheet=function(){var b;this.styleSheet&&(((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),Jt=function(oe,b){this.selector=oe,this.style=b},rr=function(oe,b){this.localName=oe,this.style=b},dr=function(){function oe(){this.blocks=[],this.display=""}return oe.prototype.addButtonBlock=function(b){b.className=this.blockClassName,b.buttonClassName=this.buttonClassName,b.buttonColorsClassName=this.buttonColorsClassName,b.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(b)},oe.prototype.addElementBlock=function(b){b.className===void 0&&(b.className=this.blockClassName),this.blocks.push(b)},oe.prototype.getUI=function(){var b=document.createElement("div");return b.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,b.style.display=this.display,this.blocks.forEach(function(A){return b.appendChild(A.getUI())}),b},oe}(),mr=function(){function oe(){}return oe.prototype.getUI=function(){var b=document.createElement("div");if(b.className=this.className,this.minWidth!==void 0&&(b.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":b.style.justifyContent="flex-start";break;case"center":b.style.justifyContent="center";break;case"end":b.style.justifyContent="flex-end"}return b.style.whiteSpace="nowrap",b},oe}(),Lr=function(oe){function b(){var A=oe!==null&&oe.apply(this,arguments)||this;return A.buttons=[],A}return Yt(b,oe),b.prototype.addButton=function(A){A.className=this.buttonClassName,A.colorsClassName=this.buttonColorsClassName,A.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(A)},b.prototype.getUI=function(){var A=oe.prototype.getUI.call(this);return this.buttons.forEach(function(re){return A.appendChild(re.getUI())}),A},b}(mr),Ft=function(){function oe(b,A){this._isActive=!1,this._isHidden=!1,this._icon=b,this.title=A,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(oe.prototype,"icon",{get:function(){return this._icon},set:function(b){this._icon=b,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isActive",{get:function(){return this._isActive},set:function(b){this._isActive=b,this.adjustClassName()},enumerable:!1,configurable:!0}),oe.prototype.getUI=function(){var b=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return b.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},oe.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},oe.prototype.hide=function(){this._isHidden=!0},oe}(),pt=function(oe){function b(){var A=oe!==null&&oe.apply(this,arguments)||this;return A.elements=[],A}return Yt(b,oe),b.prototype.addElement=function(A){this.elements.push(A)},b.prototype.getUI=function(){var A=oe.prototype.getUI.call(this);return this.elements.forEach(function(re){return A.appendChild(re)}),A},b}(mr),Xt=function(){function oe(b,A){this.horizontal=b,this.vertical=A}return Object.defineProperty(oe.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),oe.prototype.getVerticalLength=function(b){return b/this.ratio},oe.prototype.getHorizontalLength=function(b){return b*this.ratio},oe}(),hr=function(){function oe(){}return oe.getIcon=function(b,A){if(b>0&&A>0){var re=new Xt(b,A),ue=re.ratio>=1?20:re.getHorizontalLength(20),te=re.ratio<1?20:re.getVerticalLength(20),Pe=document.createElementNS("http://www.w3.org/2000/svg","svg");Pe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Pe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Pe);var Ze=Tt.createDefs();Pe.appendChild(Ze);var ot=Tt.createElement("clipPath",[["id","text-bg-clip"]]);Ze.appendChild(ot);var yt=Tt.createPath(Tt.getHollowRectanglePath((24-ue)/2,(24-te)/2,ue,te,(24-ue)/2+2,(24-te)/2+2,ue-4,te-4));Pe.appendChild(yt);var qe=Tt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);qe.appendChild(Tt.createTSpan(b+":"+A)),Pe.appendChild(qe);var Nt=qe.getBBox();Tt.setAttributes(qe,[["x",((24-Nt.width)/2).toString()],["y",((24-Nt.height)/2-Nt.y).toString()]]);var Gt=Tt.createPath(Tt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Nt.width))/2,(24-Math.ceil(Nt.height))/2,Math.ceil(Nt.width),Math.ceil(Nt.height)));return ot.appendChild(Gt),Tt.setAttributes(yt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Pe),Pe.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},oe}(),Mt=function(oe){function b(A,re,ue){var te=oe.call(this,A,re)||this;return te.isDropdownOpen=!1,te.onClick=te.dropdownButtonClicked,te.dropdownButtons=ue,te}return Yt(b,oe),b.prototype.setupDropdown=function(){var A=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(re){re.className=A.className,re.colorsClassName=A.colorsClassName,A.dropdownBlock.appendChild(re.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},b.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},b.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},b.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},b.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},b.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},b}(Ft),Lt=function(){function oe(b,A){this.GRIP_SIZE=10,this.color=b,this.fillColor=A,this.visual=Tt.createGroup(),this.visual.appendChild(Tt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Tt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(b){return b===this.visual||b===this.visual.childNodes[0]||b===this.visual.childNodes[1]},oe.prototype.setCenter=function(b,A){this.visual.childNodes.forEach(function(re){return Tt.setAttributes(re,[["cx",b.toString()],["cy",A.toString()]])})},oe}(),sr=function(){function oe(b,A,re,ue){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=b,this.canvasHeight=A,this.margin=re,this.container=ue,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(oe.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(b){this._aspectRatio=b,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(b){this._isGridVisible=b,this.gridContainer&&Tt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(b){this._zoomFactor=b,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),oe.prototype.open=function(){var b=this;this.cropShadeElement=Tt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Tt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var A=0;A<this.numberOfGridLines;A++)this.horizontalGridLines.push(Tt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Tt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(re){return b.gridContainer.appendChild(re)}),this.verticalGridLines.forEach(function(re){return b.gridContainer.appendChild(re)}),this.cropRectElement=Tt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Lt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Lt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Lt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Lt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},oe.prototype.setCropRectangle=function(b){this.cropRect=b;var A=Object.assign({},this.cropRect);this.zoomFactor!==1&&(A.width=this.cropRect.width*this.zoomFactor,A.height=this.cropRect.height*this.zoomFactor,A.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-A.width/2,A.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-A.height/2),Tt.setAttributes(this.cropRectElement,[["x",A.x.toString()],["y",A.y.toString()],["width",A.width.toString()],["height",A.height.toString()]]);var re=A.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(te,Pe){var Ze=A.y+re*(Pe+1);Tt.setAttributes(te,[["x1",""+A.x],["y1",""+Ze],["x2",""+(A.x+A.width)],["y2",""+Ze]])});var ue=A.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(te,Pe){var Ze=A.x+ue*(Pe+1);Tt.setAttributes(te,[["x1",""+Ze],["y1",""+A.y],["x2",""+Ze],["y2",""+(A.y+A.height)]])}),Tt.setAttributes(this.cropShadeElement,[["d",Tt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,A.x,A.y,A.width,A.height)]]),this.topLeftGrip.setCenter(A.x,A.y),this.topRightGrip.setCenter(A.x+A.width,A.y),this.bottomLeftGrip.setCenter(A.x,A.y+A.height),this.bottomRightGrip.setCenter(A.x+A.width,A.y+A.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},oe.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)},oe.prototype.clientToLocalCoordinates=function(b,A){var re=this.container.getBoundingClientRect();return{x:b-re.left+this.margin,y:A-re.top+this.margin}},oe.prototype.onPointerDown=function(b){this.container.setPointerCapture(b.pointerId),this.previousPoint=this.clientToLocalCoordinates(b.clientX,b.clientY),this.cropRectElement===b.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(b.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(b.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(b.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(b.target)&&(this.activeGrip=this.bottomRightGrip)},oe.prototype.onPointerMove=function(b){if(this.isMoving)this.move(this.clientToLocalCoordinates(b.clientX,b.clientY));else if(this.activeGrip){var A=this.clientToLocalCoordinates(b.clientX,b.clientY);this.resize(A)}b.preventDefault()},oe.prototype.onPointerUp=function(b){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(b.pointerId)},oe.prototype.move=function(b){var A=b.x-this.previousPoint.x,re=b.y-this.previousPoint.y;this.zoomFactor!==1&&(A=-A/this.zoomFactor,re=-re/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+A),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+re),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=b},oe.prototype.resize=function(b){var A=Object.assign({},this.cropRect),re=b.x-this.previousPoint.x,ue=b.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:A.x+re<this.margin&&(re=this.margin-A.x),A.x+=re,A.width=this.cropRect.x+this.cropRect.width-A.x;break;case this.bottomRightGrip:case this.topRightGrip:A.width+re>this.canvasWidth*this.zoomFactor&&(re=this.canvasWidth*this.zoomFactor-A.width),A.width+=re}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(A.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(re),A.height=this.aspectRatio.getVerticalLength(A.width)):(A.y+=ue,A.height=this.cropRect.y+this.cropRect.height-A.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?A.height=this.aspectRatio.getVerticalLength(A.width):A.height+=ue}A.width<10&&(A.x=this.cropRect.x,A.width=10),A.height<10&&(A.y=this.cropRect.y,A.height=10),this.previousPoint=b,A.x>=this.margin&&A.y>=this.margin&&A.x-this.margin+A.width<=this.canvasWidth&&A.y-this.margin+A.height<=this.canvasHeight&&(this.cropRect=A,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},oe.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var b=this.cropRect.x+this.cropRect.width/2,A=this.cropRect.y+this.cropRect.height/2,re=this.aspectRatio.getHorizontalLength(this.cropRect.height),ue=this.aspectRatio.getVerticalLength(this.cropRect.width);re/this.canvasWidth<ue/this.canvasHeight?this.cropRect.width=re:this.cropRect.height=ue,this.cropRect.width>this.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=b-this.cropRect.width/2,this.cropRect.y=A-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)}},oe.prototype.getRescaledRect=function(b,A,re,ue,te,Pe){var Ze=re/b,ot=ue/A;return{x:(te.x-Pe)*Ze+Pe,y:(te.y-Pe)*ot+Pe,width:te.width*Ze,height:te.height*ot}},oe.prototype.scaleCanvas=function(b,A){var re=this.getRescaledRect(this.canvasWidth,this.canvasHeight,b,A,this.cropRect,this.margin);this.canvasWidth=b,this.canvasHeight=A,this.onCropChange&&this.onCropChange(re),this.setCropRectangle(re)},oe}(),Xr=function(){function oe(b){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=b,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(oe.prototype,"angle",{get:function(){return this._angle},set:function(b){this._angle=b,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),oe.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},oe.prototype.onPointerDown=function(b){this.controlContainer.setPointerCapture(b.pointerId),this.isDragging=!0,this.previousPoint={x:b.clientX,y:b.clientY}},oe.prototype.onPointerMove=function(b){this.isDragging&&(this.onAngleChange&&this.onAngleChange((b.clientX-this.previousPoint.x)/5),this.previousPoint.x=b.clientX)},oe.prototype.onPointerUp=function(b){this.isDragging&&this.onAngleChange&&this.onAngleChange((b.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(b.pointerId)},oe.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var b=this.angleLabelText.getBBox();Tt.setAttributes(this.angleLabelElement,[["x",((this.width-b.width)/2).toString()],["y",(this.height/2).toString()]])}},oe.prototype.positionScaleShape=function(){if(this.scaleShape){var b=this.scaleShape.transform.baseVal.getItem(0);b.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(b,0)}},oe.prototype.getVisual=function(){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("xmlns","http://www.w3.org/2000/svg"),b.setAttribute("width",this.width+"px"),b.setAttribute("height",this.height+"px"),b.setAttribute("viewBox","0 0 "+this.width+" "+this.height),b.style.flexShrink="0",document.body.appendChild(b);for(var A="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,re=1;re<=this.width/5+10;re++){var ue=re%5==0?this.height/3:this.height/6;A+="h4v"+-ue+"h1v"+ue}A+="v1H0Z",this.scaleShape=Tt.createPath(A);var te=Tt.createTransform();this.scaleShape.transform.baseVal.appendItem(te),b.appendChild(this.scaleShape),this.angleLabelElement=Tt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Tt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Pe=Tt.createTSpan("");return Pe.innerHTML="°",this.angleLabelElement.appendChild(Pe),b.appendChild(this.angleLabelElement),document.body.removeChild(b),b},oe}(),Fr=function(){function oe(){this.naturalSize=!1,this.imageType="image/png"}return oe.prototype.rasterize=function(b,A,re,ue,te,Pe,Ze){var ot=this;return new Promise(function(yt){var qe=document.createElement("canvas");qe.width=b.width.baseVal.value-2*ue,qe.height=b.height.baseVal.value-2*ue;var Nt=1,Gt=1;ot.naturalSize===!0?(Nt=A.naturalWidth/(b.width.baseVal.value-2*ue)/Pe,Gt=A.naturalHeight/(b.height.baseVal.value-2*ue)/Ze,qe.width=A.naturalWidth/Pe,qe.height=A.naturalHeight/Ze):ot.width!==void 0&&ot.height!==void 0&&(Nt=ot.width/re.width,Gt=ot.height/re.height,qe.width*=Nt,qe.height*=Gt);var nr=qe.getContext("2d");nr.translate(qe.width/2,qe.height/2),nr.rotate(te*Math.PI/180),nr.scale(Pe,Ze),nr.translate(-qe.width/2,-qe.height/2),nr.drawImage(A,0,0,qe.width,qe.height);var Vr=document.createElement("canvas");Vr.width=re.width*Nt,Vr.height=re.height*Gt,Vr.getContext("2d").putImageData(nr.getImageData((re.x-ue)*Nt,(re.y-ue)*Gt,re.width*Nt,re.height*Gt),0,0),yt(Vr.toDataURL(ot.imageType,ot.imageQuality))})},oe}(),et=function(){function oe(b){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=oe.instanceCounter++,this.styles=new Rr(this.instanceNo),this.target=b,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(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(b){this._zoomToCropEnabled=b,b?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(b){this._isGridVisible=b,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"gridLines",{get:function(){return this._gridLines},set:function(b){this._gridLines=b,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(b){this._rotationAngle=b,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"aspectRatio",{get:function(){var b;return(b=this._aspectRatio)!==null&&b!==void 0?b:this.aspectRatios[0]},set:function(b){this._aspectRatio=b},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},oe.prototype.show=function(){this.showUI(),this.open()},oe.prototype.close=function(b){b===void 0&&(b=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),b||this.closeEventListeners.forEach(function(A){return A()}),this._isOpen=!1)},oe.prototype.addRenderEventListener=function(b){this.renderEventListeners.push(b)},oe.prototype.removeRenderEventListener=function(b){this.renderEventListeners.indexOf(b)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(b),1)},oe.prototype.addCloseEventListener=function(b){this.closeEventListeners.push(b)},oe.prototype.removeCloseEventListener=function(b){this.closeEventListeners.indexOf(b)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(b),1)},oe.prototype.setupResizeObserver=function(){var b=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){b.resize(b.target.clientWidth,b.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var b=1*this.target.clientWidth/this.target.clientHeight,A=this.contentDiv.clientWidth/b>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*b:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,re=A+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/b;this.resize(A,re)}},oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},oe.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Tt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},oe.prototype.resize=function(b,A){this.imageWidth=Math.round(b),this.imageHeight=Math.round(A),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},oe.prototype.setEditingTarget=function(){var b=document.createElement("canvas");b.width=this.target.naturalWidth,b.height=this.target.naturalHeight,b.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var A=b.toDataURL();Tt.setAttributes(this.editingTarget,[["href",A]]),this.setEditingTargetSize()},oe.prototype.setTopLeft=function(){var b=this.target.getBoundingClientRect(),A=this.editorCanvas.getBoundingClientRect();this.left=b.left-A.left-this.CANVAS_MARGIN,this.top=b.top-A.top-this.CANVAS_MARGIN},oe.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Tt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Tt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Tt.createGroup(),this.editingTargetRotationScaleContainer=Tt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var b=Tt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(b);var A=Tt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(A),this.editingTargetContainer=Tt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},oe.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},oe.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Tt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new sr(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},oe.prototype.zoomToCrop=function(){if(this.cropRect){var b=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,A=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=b+"px "+A+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-b+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-A+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},oe.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},oe.prototype.cropRectChanged=function(b){this.cropRect=b,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},oe.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},oe.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"},oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},oe.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var b=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,A=this.target.offsetTop>b+this.CANVAS_MARGIN?this.target.offsetTop-(b+this.CANVAS_MARGIN):0;this.coverDiv.style.top=A+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},oe.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},oe.prototype.addTopToolbar=function(){var b=this;this.topToolbar=new dr,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 A=new Lr;A.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(A);var re=[];this.aspectRatios.forEach(function(Gt){var nr=new Ft(hr.getIcon(Gt.horizontal,Gt.vertical),Gt.horizontal===0&&Gt.vertical===0?"FREE":Gt.horizontal+":"+Gt.vertical);nr.onClick=function(){return b.ratioButtonClicked(Gt)},re.push(nr)}),this.aspectRatioButton=new Mt(hr.getIcon(0,0),"Aspect ratio",re),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,A.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ue=new Ft('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");ue.isActive=this.isGridVisible,ue.onClick=function(){b.isGridVisible=!b.isGridVisible,ue.isActive=b.isGridVisible},A.addButton(ue);var te=new Ft('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(te.isActive=this.zoomToCropEnabled,te.onClick=function(){b.zoomToCropEnabled=!b.zoomToCropEnabled,te.isActive=b.zoomToCropEnabled},A.addButton(te),!jr.isLicensed){var Pe=new pt;this.topToolbar.addElementBlock(Pe);var Ze=document.createElement("div");Ze.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ot=document.createElement("a");ot.style.color="currentColor",ot.href="https://markerjs.com/products/cropro",ot.target="_blank",ot.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Ze.appendChild(ot),Pe.addElement(Ze)}var yt=new Lr;yt.minWidth=3*this.toolbarHeight+"px",yt.contentAlign="end",this.topToolbar.addButtonBlock(yt);var qe=new Ft('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");qe.onClick=this.startRenderAndClose,yt.addButton(qe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(qe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Nt=new Ft('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Nt.onClick=this.close,yt.addButton(Nt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Nt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},oe.prototype.addBottomToolbar=function(){var b=this;this.bottomToolbar=new dr,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 A=new Lr;A.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(A);var re=new Ft('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");re.onClick=this.rotateLeftButtonClicked,A.addButton(re);var ue=new Ft('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");ue.onClick=this.rotateRightButtonClicked,A.addButton(ue);var te=new pt;te.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(te),this.straightener=new Xr("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(yt){b.rotateBy(yt),b.straightener.angle=b.rotationAngle},te.addElement(this.straightener.getUI());var Pe=new Lr;Pe.minWidth=2*this.toolbarHeight+"px",Pe.contentAlign="end",this.bottomToolbar.addButtonBlock(Pe);var Ze=new Ft('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Ze.onClick=this.flipHorizontallyButtonClicked,Pe.addButton(Ze);var ot=new Ft('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");ot.onClick=this.flipVerticallyButtonClicked,Pe.addButton(ot)},oe.prototype.ratioButtonClicked=function(b){this.aspectRatio=b,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},oe.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=hr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},oe.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Xt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},oe.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},oe.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},oe.prototype.restoreState=function(b){if(b){var A=this.cropLayer.getRescaledRect(b.width,b.height,this.imageWidth,this.imageHeight,b.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(A),this.cropRectChanged(A),this.flippedHorizontally=b.flippedHorizontally,this.flippedVertically=b.flippedVertically,this.applyFlip(),this.rotationAngle=b.rotationAngle,this.applyRotation()}},oe.prototype.clientToLocalCoordinates=function(b,A){var re=this.cropImage.getBoundingClientRect();return{x:b-re.left,y:A-re.top}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var b=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=b+"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()},oe.prototype.rotateLeftButtonClicked=function(){var b=this.rotationAngle-90;this.rotationAngle%90!=0&&(b+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(b)},oe.prototype.rotateRightButtonClicked=function(){var b=this.rotationAngle+90;this.rotationAngle%90!=0&&(b-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(b)},oe.prototype.rotateTo=function(b){b=(b=b>180?b-360:b)<=-180?b+360:b,this.rotationAngle=b,this.applyRotation()},oe.prototype.rotateBy=function(b){this.rotateTo((this.rotationAngle+b)%360)},oe.prototype.applyRotation=function(){var b=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var A=this.editingTargetRotationContainer.transform.baseVal.getItem(0);A.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(A,0);var re=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/re.width,this.imageHeight/re.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=b},oe.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},oe.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},oe.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},oe.prototype.startRenderAndClose=function(){return It(this,void 0,void 0,function(){var b,A;return Ut(this,function(re){switch(re.label){case 0:return[4,this.render()];case 1:return b=re.sent(),A=this.getState(),this.renderEventListeners.forEach(function(ue){return ue(b,A)}),this.close(!0),[2]}})})},oe.prototype.render=function(){return It(this,void 0,void 0,function(){var b;return Ut(this,function(A){switch(A.label){case 0:return(b=new Fr).naturalSize=this.renderAtNaturalSize,b.imageType=this.renderImageType,b.imageQuality=this.renderImageQuality,b.width=this.renderWidth,b.height=this.renderHeight,this.unzoomFromCrop(),Tt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,b.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 A.sent(),[4,b.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,A.sent()]}})})},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new rr("toolbar",`
|
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
overflow: hidden;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new rr("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new rr("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var b=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new rr("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.toolbarHeight-2*b)+`px;
|
|
|
height: `+(this.toolbarHeight-2*b)+`px;
|
|
|
padding: `+b+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new rr("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new rr("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new Jt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Jt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new rr("toolbar_dropdown",`
|
|
|
position: absolute;
|
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
|
z-index: 20;
|
|
|
white-space: normal;
|
|
|
box-sizing: content-box;
|
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new rr("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new rr("toolbar_straightener_block",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new rr("toolbar_straightener",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
height: `+(this.toolbarHeight-2*b)+`px;
|
|
|
padding: `+b+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new rr("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},oe.instanceCounter=0,oe}(),Ot=d("8hTe"),Kr=d.n(Ot),Or=/<pre[^>]*>/g;function dn(oe){var b=document.createElement("div");return b.innerHTML=oe,b.childNodes.length===0?"":b.childNodes[0].nodeValue}var bn=G.a=function(oe){var b=oe.value,A=b===void 0?"":b,re=oe.edit,ue=re===void 0?!1:re,te=oe.className,Pe=oe.showTextOnly,Ze=oe.showLines,ot=oe.replaces,yt=oe.zoomImg,qe=oe.hasMask,Nt=oe.style,Gt=Nt===void 0?{}:Nt,nr=oe.stylesPrev,Vr=nr===void 0?{}:nr,Yr=String(A),fr=Object(u.useRef)(),Jr=Object(u.useRef)(),Bn=Object(u.useState)(""),Br=Object(h.a)(Bn,2),Ur=Br[0],$r=Br[1],On=Object(u.useState)("office"),en=Object(h.a)(On,2),xn=en[0],hn=en[1],qn=function(){var Qt=new et(Jr.current);Qt.displayMode="popup",Qt.addRenderEventListener(function(){var kr=Object(m.a)(l.a.mark(function $t(gr){var st;return l.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return fr.current.style.display="none",gt.next=3,Object(Ee.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:gr}});case 3:st=gt.sent,st!=null&&st.id&&ot(Jr.current.getAttribute("src").replace(le.a.API_SERVER,""),"/api/attachments/".concat(st==null?void 0:st.id,"?type=").concat(st.content_type));case 5:case"end":return gt.stop()}},$t)}));return function($t){return kr.apply(this,arguments)}}()),Qt.show()},Un=function(){var Qt=new zt(Jr.current);Qt.settings.displayMode="popup",Qt.addEventListener("render",function(){var kr=Object(m.a)(l.a.mark(function $t(gr){var st;return l.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(fr.current.style.display="none",!Jr.current){gt.next=6;break}return gt.next=4,Object(Ee.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:gr.dataUrl}});case 4:st=gt.sent,st!=null&&st.id&&ot(Jr.current.getAttribute("src").replace(le.a.API_SERVER,""),"/api/attachments/".concat(st==null?void 0:st.id,"?type=").concat(st.content_type));case 6:case"end":return gt.stop()}},$t)}));return function($t){return kr.apply(this,arguments)}}()),Qt.show(),window.markerArea=Qt},mn=Object(u.useMemo)(function(){try{var lr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Qt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,kr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Yr=Yr.replace(lr,"("+le.a.API_SERVER+"/api/attachments/").replace(Qt,'"'+le.a.API_SERVER+"/api/attachments/").replace(kr,'"'+le.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,`
|
|
|
`),Yr=Yr.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
|
`)}catch(mt){}var $t=z(Yr),gr=ce();if(Yr.match(/\[TOC\]/)&&($t=$t.replace("<p>[TOC]</p>",J()),j()),$t=$t.replace(/(__special_katext_id_\d+__)/g,function(mt,gt){var bt=gr[gt],Bt=bt.type,vt=bt.expression;return Object(pe.renderToString)(dn(vt)||"",{displayMode:Bt==="block",throwOnError:!1,output:"html"})}),$t=$t.replace(/▁/g,"\u2581\u2581\u2581"),he(),Pe){var st=document.createElement("div");return st.innerHTML=$t,st.innerText}return setTimeout(function(){return Mn()},500),$t},[Yr]),tn=Object(u.useRef)();D.WebkitLineClamp=Ze,Ze&&(Gt=Object(x.a)(Object(x.a)({},Gt),D));function Dn(lr){var Qt=lr.target;if(Qt.tagName.toUpperCase()==="IMG"){if(yt){var kr=Qt.getAttribute("src");$r(kr),hn("image")}}else if(Qt.tagName.toUpperCase()==="A"){var $t=Qt.getAttribute("href");if($t.indexOf("office")>-1)lr.preventDefault(),$r($t),hn("office");else if($t.indexOf("application/pdf")>-1)lr.preventDefault(),$r($t),hn("pdf");else if($t.indexOf("type=text")>-1)lr.preventDefault(),$r($t),hn("html");else if($t.startsWith("#")){lr.preventDefault();var gr=document.getElementById($t.replace("#",""));gr&&gr.scrollIntoView(!0)}}}var Mn=function(){var Qt,kr=(Qt=tn.current)===null||Qt===void 0?void 0:Qt.querySelectorAll("video");kr==null||kr.forEach(function($t){if($t.oncontextmenu=function(){return!1},$t.src.indexOf(".m3u8")>-1&&!$t.canPlayType("application/vnd.apple.mpegurl")){if(P.a.isSupported()){var gr=new P.a;gr.loadSource($t.src),gr.attachMedia($t)}}})};Object(u.useEffect)(function(){if(tn.current&&mn&&(mn.match(Or)&&window.PR.prettyPrint()),tn.current)return tn.current.addEventListener("click",Dn),function(){tn.current.removeEventListener("click",Dn),he(),j()}},[mn,tn.current,Dn]);var ei=function(Qt){if(!ue)return;Qt.target.nodeName==="IMG"?(fr.current.style.display="flex",fr.current.style.width=Qt.target.clientWidth+"px",fr.current.style.height=Qt.target.clientHeight+"px",fr.current.style.top=Qt.target.offsetTop+"px",fr.current.style.left=Qt.target.offsetLeft+"px",Jr.current.src=Qt.target.getAttribute("src")):fr.current.style.display="none"};return o.a.createElement("div",{style:{position:"relative"}},o.a.createElement("div",{ref:tn,style:Object(x.a)({},Gt),className:"".concat(te||""," markdown-body ").concat(Kr.a.mdBody),onMouseOver:ei,dangerouslySetInnerHTML:{__html:mn}}),o.a.createElement("div",{ref:fr,className:Kr.a.button},o.a.createElement(i.a,null,o.a.createElement(C.a,{onClick:function(){return qn()}},"\u88C1\u526A"),o.a.createElement(C.a,{onClick:function(){return Un()}},"\u7F16\u8F91"))),o.a.createElement("img",{ref:Jr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),o.a.createElement(ye.a,{close:!0,data:Ur,hasMask:qe,type:Ur!=null&&Ur.length?xn:"",style:Object(x.a)({},Vr),onClose:function(){return $r("")}}))}},"9OqN":function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.mode.CTR=function(){var i=f.lib.BlockCipherMode.extend(),O=i.Encryptor=i.extend({processBlock:function(C,x){var m=this._cipher,h=m.blockSize,s=this._iv,l=this._counter;s&&(l=this._counter=s.slice(0),this._iv=void 0);var u=l.slice(0);m.encryptBlock(u,0),l[h-1]=l[h-1]+1|0;for(var o=0;o<h;o++)C[x+o]^=u[o]}});return i.Decryptor=O,i}(),f.mode.CTR})},"9VGf":function(a,G,d){"use strict";d.d(G,"a",function(){return O});var f=d("q1tI"),i=d.n(f);function O(C,x){var m=Object(f.useRef)();Object(f.useEffect)(function(){m.current=C}),Object(f.useEffect)(function(){function h(){m.current()}if(x!==null){var s=setInterval(h,x);return function(){return clearInterval(s)}}},[x])}},ALsQ:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.mode.CFB=function(){var i=f.lib.BlockCipherMode.extend();i.Encryptor=i.extend({processBlock:function(C,x){var m=this._cipher,h=m.blockSize;O.call(this,C,x,h,m),this._prevBlock=C.slice(x,x+h)}}),i.Decryptor=i.extend({processBlock:function(C,x){var m=this._cipher,h=m.blockSize,s=C.slice(x,x+h);O.call(this,C,x,h,m),this._prevBlock=s}});function O(C,x,m,h){var s,l=this._iv;l?(s=l.slice(0),this._iv=void 0):s=this._prevBlock,h.encryptBlock(s,0);for(var u=0;u<m;u++)C[x+u]^=s[u]}return i}(),f.mode.CFB})},B7Ph:function(a,G,d){"use strict";d.d(G,"a",function(){return V});var f=d("5NDa"),i=d("5rEg"),O=d("+L6B"),C=d("2/Rp"),x=d("2qtc"),m=d("kLXV"),h=d("k1fw"),s=d("miYZ"),l=d("tsqr"),u=d("9og8"),o=d("tJVT"),g=d("oBTY"),p=d("DZo9"),v=d("8z0m"),_=d("WmNS"),S=d.n(_),k=d("q1tI"),T=d.n(k),M=d("Bvq2"),I=d.n(M),j=d("nj2k"),D=d.n(j),y=d("mxV5"),J=d.n(y),X=d("KhGG"),N=d("ErOA"),F=d("7Cbv"),H=d("1vsH"),Z=v.a.Dragger,ce=function(ne){for(var W=function(ae){return ae&&ae.substring(0,ae.lastIndexOf("."))},z=Object(g.a)(ne),R=0,w=[],P=0;P<z.length;P++){for(var le="",pe=0;pe<w.length;pe++)if(W(w[pe][0].name)==W(z[P].name)){R=1,le=pe;break}if(R==1)w[le].push(z[P]),R=0;else if(R==0){var ye=new Array;ye.push(z[P]),w.push(ye)}}var Ee=w.map(function(Oe){if(Oe[0].name.includes(".in"))return Oe.length===2?Oe:[Oe[0],{}];if(Oe[0].name.includes(".out"))return Oe.length===2?Oe.reverse():[{},Oe[0]]});return Ee},he=function(ne){var W=ne.onClose,z=ne.onOK,R=ne.visible,w=ne.wrapClassName,P=ne.rootIdentifier,le=Object(k.useState)([]),pe=Object(o.a)(le,2),ye=pe[0],Ee=pe[1],Oe=Object(k.useState)({}),ae=Object(o.a)(Oe,2),fe=ae[0],ge=ae[1],q=Object(k.useState)(!1),ie=Object(o.a)(q,2),$=ie[0],se=ie[1],K=Object(k.useRef)([]),Y=Object(k.useRef)(0),Ce=function(){W()};Object(k.useEffect)(function(){Q()},[]),Object(k.useEffect)(function(){R&&(K.current=[],Y.current=0,Ee([]))},[R]);var Q=function(){var Fe=Object(u.a)(S.a.mark(function Be(){var Ue,ze;return S.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.prev=0,Xe.next=3,Object(N.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:Ue=Xe.sent,ze=JSON.parse(Object(X.a)(Ue.data)),ge(ze),Xe.next=11;break;case 8:Xe.prev=8,Xe.t0=Xe.catch(0),l.b.error(Xe.t0);case 11:case"end":return Xe.stop()}},Be,null,[[0,8]])}));return function(){return Fe.apply(this,arguments)}}(),B=function(Be){return Be&&Be.substring(0,Be.lastIndexOf("."))},E=function(Be){var Ue,ze,Ve=B((Ue=Be[0])===null||Ue===void 0?void 0:Ue.name)||B((ze=Be[1])===null||ze===void 0?void 0:ze.name),Xe=ye.filter(function(Je){return B(Je.name)!==Ve});K.current=Object(g.a)(Xe),Ee(Object(g.a)(Xe))},U=function(Be){var Ue=new J.a({endpoint:fe.end_point,region:fe.region,accessKeyId:fe.access_key_id,accessKeySecret:fe.access_key_secret,bucket:fe.bucket,stsToken:fe.security_token}),ze=Be.name,Ve={container_type:"TestSet",file_name:ze},Xe=Object(F.a)(),Je="testsets/".concat(P,"/").concat(Xe).concat(ze.indexOf(".")>-1?"."+ze.split(".").pop():"");P===null&&(Je="testsets/".concat(Xe).concat(ze.indexOf(".")>-1?"."+ze.split(".").pop():"")),Ue.multipartUpload(Je,new Blob([Be.file],{type:Be.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:ze+""},url:fe==null?void 0:fe.callback_url,host:fe==null?void 0:fe.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(N.e)(Ve)}}).then(function(Ne){if(Ne.data.status===0){Y.current=Y.current+1;var tt=K.current.map(function(Ke){var $e,je;if(Ke.name===(($e=Ne.data)===null||$e===void 0||((je=$e.data)===null||je===void 0)?void 0:je.file_name)){var Me,Ie,_e,Se=Object(h.a)({},Ke);if((Me=Ne.data)!==null&&Me!==void 0&&(Ie=Me.data)!==null&&Ie!==void 0&&(_e=Ie.file_name)!==null&&_e!==void 0&&_e.includes(".in")){var ke,Re,He,Ae,Ye,it;Se.in_object_key=(ke=Ne.data)===null||ke===void 0||((Re=ke.data)===null||Re===void 0)?void 0:Re.object,Se.in_object_size=(He=Ne.data)===null||He===void 0||((Ae=He.data)===null||Ae===void 0)?void 0:Ae.size,Se.input=(Ye=Ne.data)===null||Ye===void 0||((it=Ye.data)===null||it===void 0)?void 0:it.file_name,Se.in_file=Be}else{var lt,ut,ct,xt,dt,kt;Se.out_object_key=(lt=Ne.data)===null||lt===void 0||((ut=lt.data)===null||ut===void 0)?void 0:ut.object,Se.out_object_size=(ct=Ne.data)===null||ct===void 0||((xt=ct.data)===null||xt===void 0)?void 0:xt.size,Se.output=(dt=Ne.data)===null||dt===void 0||((kt=dt.data)===null||kt===void 0)?void 0:kt.file_name,Se.out_file=Be}return Se}return Ke});if(K.current=Object(g.a)(tt),Ee(Object(g.a)(tt)),Y.current>0&&Y.current===ye.length){se(!1);var nt=ce(tt);nt=nt.filter(function(Ke){var $e,je;return!!(($e=Ke[0])!==null&&$e!==void 0&&$e.name&&(je=Ke[1])!==null&&je!==void 0&&je.name)}),nt=nt.map(function(Ke){return Object(h.a)(Object(h.a)(Object(h.a)({},Ke[0]),Ke[1]),{},{is_file:!0})}),z(nt),W()}}})},xe=function(){if(ye.length===0){l.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}se(!0);var Be=ce(ye);if(Be.some(function(Ue){var ze,Ve;return!((ze=Ue[0])!==null&&ze!==void 0&&ze.name&&(Ve=Ue[1])!==null&&Ve!==void 0&&Ve.name)})){m.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:function(){var Ue=Object(u.a)(S.a.mark(function Ve(){return S.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:ye.map(function(){var Ne=Object(u.a)(S.a.mark(function tt(nt){return S.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:U(nt);case 1:case"end":return $e.stop()}},tt)}));return function(tt){return Ne.apply(this,arguments)}}());case 1:case"end":return Je.stop()}},Ve)}));function ze(){return Ue.apply(this,arguments)}return ze}(),onCancel:function(){se(!1)}});return}ye.map(function(){var Ue=Object(u.a)(S.a.mark(function ze(Ve){return S.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:U(Ve);case 1:case"end":return Je.stop()}},ze)}));return function(ze){return Ue.apply(this,arguments)}}())},be={name:"file",fileList:ye,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Be){if(ye!=null&&ye.some(function(ze){return ze.name===Be.name}))return l.b.info("".concat(Be.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Be.size/1024/1024>100)return l.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Be.name))return l.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var Ue={name:Be.name,uid:Be.uid,file:Be,percent:0};return ye.push(Ue),K.current=Object(g.a)(ye),Ee(Object(g.a)(ye)),!1}},Te=ce(ye);return console.log(ye,Te,"fileList"),T.a.createElement(m.a,{visible:R,wrapClassName:w,onOk:xe,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:$},onCancel:Ce,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},T.a.createElement("div",{className:I.a.wrap},ye.length?T.a.createElement("div",null,T.a.createElement(v.a,be,T.a.createElement(C.a,{className:I.a.btnS},"\u4E0A\u4F20\u6587\u4EF6")),T.a.createElement(V,{data:Te,onRemove:E})):T.a.createElement("div",{className:I.a.noData},T.a.createElement("img",{src:D.a,alt:""}),T.a.createElement(v.a,be,T.a.createElement(C.a,{className:I.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),T.a.createElement("div",{className:I.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",T.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",T.a.createElement("br",null),"2\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",T.a.createElement("br",null),"3\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002")))},V=function(ne){var W=ne.data,z=W===void 0?[]:W,R=ne.onRemove,w=ne.width,P=w===void 0?"auto":w,le=ne.showScore,pe=le===void 0?!1:le,ye=ne.disabled,Ee=ye===void 0?!1:ye,Oe=ne.inputChange,ae=function(ie){var $=document.createElement("a");document.body.appendChild($);var se=URL.createObjectURL(ie.file);$.href=se,$.download=ie.name,$.click(),URL.revokeObjectURL(se),document.body.removeChild($)},fe=function(ie,$){Object(H.w)(ie,$)},ge=function(ie,$){m.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:T.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){R(ie,$)},onCancel:function(){}})};return z.length?T.a.createElement("div",{style:{width:P}},T.a.createElement("div",{className:I.a.head},T.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),T.a.createElement("div",{style:{width:pe?"25%":"35%"}},"\u8F93\u5165"),T.a.createElement("div",{style:{width:pe?"25%":"35%"}},"\u8F93\u51FA"),pe&&T.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),T.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),z.map(function(q,ie){var $,se,K,Y;return T.a.createElement("div",{key:ie,className:I.a.list},T.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",ie+1),T.a.createElement("div",{className:I.a.info,style:{width:pe?"25%":"35%"}},T.a.createElement("span",{title:q.input||(($=q[0])===null||$===void 0?void 0:$.name),onClick:function(){q.input?q.input_file_url?fe(q.input_file_url,q.input):ae(q.in_file):ae(q[0])}},q.input||((se=q[0])===null||se===void 0?void 0:se.name))),T.a.createElement("div",{className:I.a.info,style:{width:pe?"25%":"35%"}},T.a.createElement("span",{title:q.output||((K=q[1])===null||K===void 0?void 0:K.name),onClick:function(){q.input?q.output_file_url?fe(q.output_file_url,q.output):ae(q.out_file):ae(q[1])}},q.output||((Y=q[1])===null||Y===void 0?void 0:Y.name))),pe&&T.a.createElement("div",{style:{width:"20%"}},T.a.createElement(i.a,{disabled:Ee,style:{width:"70%"},onChange:function(Q){return Oe(Q,ie)},value:q.score}),T.a.createElement("span",null,"\xA0%")),T.a.createElement("div",{onClick:function(){return ge(q,ie)},style:{width:"10%"}},T.a.createElement("span",{className:I.a.del},"\u5220\u9664")))})):T.a.createElement(T.a.Fragment,null)};G.b=he},Bd2K:function(a,G,d){(function(f){f(d("VrN/"),d("osHv"))})(function(f){f.defineOption("autoCloseTags",!1,function(l,u,o){if(o!=f.Init&&o&&l.removeKeyMap("autoCloseTags"),!u)return;var g={name:"autoCloseTags"};(typeof u!="object"||u.whenClosing!==!1)&&(g["'/'"]=function(p){return m(p)}),(typeof u!="object"||u.whenOpening!==!1)&&(g["'>'"]=function(p){return C(p)}),l.addKeyMap(g)});var i=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 C(l){if(l.getOption("disableInput"))return f.Pass;for(var u=l.listSelections(),o=[],g=l.getOption("autoCloseTags"),p=0;p<u.length;p++){if(!u[p].empty())return f.Pass;var v=u[p].head,_=l.getTokenAt(v),S=f.innerMode(l.getMode(),_.state),k=S.state,T=S.mode.xmlCurrentTag&&S.mode.xmlCurrentTag(k),M=T&&T.name;if(!M)return f.Pass;var I=S.mode.configuration=="html",j=typeof g=="object"&&g.dontCloseTags||I&&i,D=typeof g=="object"&&g.indentTags||I&&O;_.end>v.ch&&(M=M.slice(0,M.length-_.end+v.ch));var y=M.toLowerCase();if(!M||_.type=="string"&&(_.end!=v.ch||!/[\"\']/.test(_.string.charAt(_.string.length-1))||_.string.length==1)||_.type=="tag"&&T.close||_.string.indexOf("/")==v.ch-_.start-1||j&&h(j,y)>-1||s(l,S.mode.xmlCurrentContext&&S.mode.xmlCurrentContext(k)||[],M,v,!0))return f.Pass;var J=typeof g=="object"&&g.emptyTags;if(J&&h(J,M)>-1){o[p]={text:"/>",newPos:f.Pos(v.line,v.ch+2)};continue}var X=D&&h(D,y)>-1;o[p]={indent:X,text:">"+(X?`
|
|
|
|
|
|
`:"")+"</"+M+">",newPos:X?f.Pos(v.line+1,0):f.Pos(v.line,v.ch+1)}}for(var N=typeof g=="object"&&g.dontIndentOnAutoClose,p=u.length-1;p>=0;p--){var F=o[p];l.replaceRange(F.text,u[p].head,u[p].anchor,"+insert");var H=l.listSelections().slice(0);H[p]={head:F.newPos,anchor:F.newPos},l.setSelections(H),!N&&F.indent&&(l.indentLine(F.newPos.line,null,!0),l.indentLine(F.newPos.line+1,null,!0))}}function x(l,u){for(var o=l.listSelections(),g=[],p=u?"/":"</",v=l.getOption("autoCloseTags"),_=typeof v=="object"&&v.dontIndentOnSlash,S=0;S<o.length;S++){if(!o[S].empty())return f.Pass;var k=o[S].head,T=l.getTokenAt(k),M=f.innerMode(l.getMode(),T.state),I=M.state;if(u&&(T.type=="string"||T.string.charAt(0)!="<"||T.start!=k.ch-1))return f.Pass;var j,D=M.mode.name!="xml"&&l.getMode().name=="htmlmixed";if(D&&M.mode.name=="javascript")j=p+"script";else if(D&&M.mode.name=="css")j=p+"style";else{var y=M.mode.xmlCurrentContext&&M.mode.xmlCurrentContext(I);if(!y||y.length&&s(l,y,y[y.length-1],k))return f.Pass;j=p+y[y.length-1]}l.getLine(k.line).charAt(T.end)!=">"&&(j+=">"),g[S]=j}if(l.replaceSelections(g),o=l.listSelections(),!_)for(var S=0;S<o.length;S++)(S==o.length-1||o[S].head.line<o[S+1].head.line)&&l.indentLine(o[S].head.line)}function m(l){return l.getOption("disableInput")?f.Pass:x(l,!0)}f.commands.closeTag=function(l){return x(l)};function h(l,u){if(l.indexOf)return l.indexOf(u);for(var o=0,g=l.length;o<g;++o)if(l[o]==u)return o;return-1}function s(l,u,o,g,p){if(!f.scanForClosingTag)return!1;var v=Math.min(l.lastLine()+1,g.line+500),_=f.scanForClosingTag(l,g,null,v);if(!_||_.tag!=o)return!1;for(var S=p?1:0,k=u.length-1;k>=0&&u[k]==o;k--)++S;g=_.to;for(var k=1;k<S;k++){var T=f.scanForClosingTag(l,g,null,v);if(!T||T.tag!=o)return!1;g=T.to}return!0}})},BjJ7:function(a,G,d){"use strict";d.d(G,"d",function(){return i}),d.d(G,"c",function(){return O}),d.d(G,"e",function(){return C}),d.d(G,"b",function(){return x}),d.d(G,"a",function(){return h});var f=d("m3rI");function i(s){var l=!0;if(s.length>0){for(var u=0;u<s.length;u++)if(s[u].compile_success==0||!s[u].compile_success){l=!1;break}}else l=!1;return l}function O(s){for(var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",u=[],o=0;o<s.length;o++){var g=s[o],p=l?"".concat(l,"/").concat(g.name):"".concat(g.name);u.push({title:g.name,isLeaf:!(g.type==="tree"),key:p})}return u}function C(s,l,u){for(var o=0;o<s.length;o++){var g=s[o];if(g.key===l){g.children=u;break}g.children&&C(g.children,l,u)}return s}function x(s,l,u){var o;return function(){var g=this,p=arguments,v=function(){o=null,u||s.apply(g,p)},_=u&&!o;clearTimeout(o),o=setTimeout(v,l),_&&s.apply(g,p)}}var m=!0,h=f.a.API_SERVER},Bvq2:function(a,G,d){a.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":function(a,G,d){},CrYA:function(a,G,d){var f=d("MFOe"),i=f.Global;a.exports={name:"sessionStorage",read:C,write:x,each:m,remove:h,clearAll:s};function O(){return i.sessionStorage}function C(l){return O().getItem(l)}function x(l,u){return O().setItem(l,u)}function m(l){for(var u=O().length-1;u>=0;u--){var o=O().key(u);l(C(o),o)}}function h(l){return O().removeItem(l)}function s(){return O().clear()}},DlQD:function(a,G,d){(function(f,i){a.exports=i()})(this,function(){"use strict";function f(je,Me){for(var Ie=0;Ie<Me.length;Ie++){var _e=Me[Ie];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(je,_e.key,_e)}}function i(je,Me,Ie){return Me&&f(je.prototype,Me),Ie&&f(je,Ie),je}function O(je,Me){if(!je)return;if(typeof je=="string")return C(je,Me);var Ie=Object.prototype.toString.call(je).slice(8,-1);if(Ie==="Object"&&je.constructor&&(Ie=je.constructor.name),Ie==="Map"||Ie==="Set")return Array.from(je);if(Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie))return C(je,Me)}function C(je,Me){(Me==null||Me>je.length)&&(Me=je.length);for(var Ie=0,_e=new Array(Me);Ie<Me;Ie++)_e[Ie]=je[Ie];return _e}function x(je,Me){var Ie;if(typeof Symbol=="undefined"||je[Symbol.iterator]==null){if(Array.isArray(je)||(Ie=O(je))||Me&&je&&typeof je.length=="number"){Ie&&(je=Ie);var _e=0;return function(){return _e>=je.length?{done:!0}:{done:!1,value:je[_e++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Ie=je[Symbol.iterator](),Ie.next.bind(Ie)}function m(je,Me){return Me={exports:{}},je(Me,Me.exports),Me.exports}var h=m(function(je){function Me(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Ie(_e){je.exports.defaults=_e}je.exports={defaults:Me(),getDefaults:Me,changeDefaults:Ie}}),s=h.defaults,l=h.getDefaults,u=h.changeDefaults,o=/[&<>"']/,g=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,v=/[<>"']|&(?!#?\w+;)/g,_={"&":"&","<":"<",">":">",'"':""","'":"'"},S=function(Me){return _[Me]};function k(je,Me){if(Me){if(o.test(je))return je.replace(g,S)}else if(p.test(je))return je.replace(v,S);return je}var T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function M(je){return je.replace(T,function(Me,Ie){return Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""})}var I=/(^|[^\[])\^/g;function j(je,Me){je=je.source||je,Me=Me||"";var Ie={replace:function(Se,ke){return ke=ke.source||ke,ke=ke.replace(I,"$1"),je=je.replace(Se,ke),Ie},getRegex:function(){return new RegExp(je,Me)}};return Ie}var D=/[^\w:]/g,y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function J(je,Me,Ie){if(je){var _e;try{_e=decodeURIComponent(M(Ie)).replace(D,"").toLowerCase()}catch(Se){return null}if(_e.indexOf("javascript:")===0||_e.indexOf("vbscript:")===0||_e.indexOf("data:")===0)return null}Me&&!y.test(Ie)&&(Ie=Z(Me,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch(Se){return null}return Ie}var X={},N=/^[^:]+:\/*[^/]*$/,F=/^([^:]+:)[\s\S]*$/,H=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Z(je,Me){X[" "+je]||(N.test(je)?X[" "+je]=je+"/":X[" "+je]=ve(je,"/",!0)),je=X[" "+je];var Ie=je.indexOf(":")===-1;return Me.substring(0,2)==="//"?Ie?Me:je.replace(F,"$1")+Me:Me.charAt(0)==="/"?Ie?Me:je.replace(H,"$1")+Me:je+Me}var ce={exec:function(){}};function he(je){for(var Me=1,Ie,_e;Me<arguments.length;Me++){Ie=arguments[Me];for(_e in Ie)Object.prototype.hasOwnProperty.call(Ie,_e)&&(je[_e]=Ie[_e])}return je}function V(je,Me){var Ie=je.replace(/\|/g,function(ke,Re,He){for(var Ae=!1,Ye=Re;--Ye>=0&&He[Ye]==="\\";)Ae=!Ae;return Ae?"|":" |"}),_e=Ie.split(/ \|/),Se=0;if(_e.length>Me)_e.splice(Me);else for(;_e.length<Me;)_e.push("");for(;Se<_e.length;Se++)_e[Se]=_e[Se].trim().replace(/\\\|/g,"|");return _e}function ve(je,Me,Ie){var _e=je.length;if(_e===0)return"";for(var Se=0;Se<_e;){var ke=je.charAt(_e-Se-1);if(ke===Me&&!Ie)Se++;else if(ke!==Me&&Ie)Se++;else break}return je.substr(0,_e-Se)}function ne(je,Me){if(je.indexOf(Me[1])===-1)return-1;for(var Ie=je.length,_e=0,Se=0;Se<Ie;Se++)if(je[Se]==="\\")Se++;else if(je[Se]===Me[0])_e++;else if(je[Se]===Me[1]&&(_e--,_e<0))return Se;return-1}function W(je){je&&je.sanitize&&!je.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var z={escape:k,unescape:M,edit:j,cleanUrl:J,resolveUrl:Z,noopTest:ce,merge:he,splitCells:V,rtrim:ve,findClosingBracket:ne,checkSanitizeDeprecation:W},R=h.defaults,w=z.rtrim,P=z.splitCells,le=z.escape,pe=z.findClosingBracket;function ye(je,Me,Ie){var _e=Me.href,Se=Me.title?le(Me.title):null,ke=je[1].replace(/\\([\[\]])/g,"$1");return je[0].charAt(0)!=="!"?{type:"link",raw:Ie,href:_e,title:Se,text:ke}:{type:"image",raw:Ie,href:_e,title:Se,text:le(ke)}}function Ee(je,Me){var Ie=je.match(/^(\s+)(?:```)/);if(Ie===null)return Me;var _e=Ie[1];return Me.split(`
|
|
|
`).map(function(Se){var ke=Se.match(/^\s+/);if(ke===null)return Se;var Re=ke[0];return Re.length>=_e.length?Se.slice(_e.length):Se}).join(`
|
|
|
`)}var Oe=function(){function je(Ie){this.options=Ie||R}var Me=je.prototype;return Me.space=function(_e){var Se=this.rules.block.newline.exec(_e);if(Se)return Se[0].length>1?{type:"space",raw:Se[0]}:{raw:`
|
|
|
`}},Me.code=function(_e,Se){var ke=this.rules.block.code.exec(_e);if(ke){var Re=Se[Se.length-1];if(Re&&Re.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var He=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?He:w(He,`
|
|
|
`)}}},Me.fences=function(_e){var Se=this.rules.block.fences.exec(_e);if(Se){var ke=Se[0],Re=Ee(ke,Se[3]||"");return{type:"code",raw:ke,lang:Se[2]?Se[2].trim():Se[2],text:Re}}},Me.heading=function(_e){var Se=this.rules.block.heading.exec(_e);if(Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},Me.nptable=function(_e){var Se=this.rules.block.nptable.exec(_e);if(Se){var ke={type:"table",header:P(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:Se[0]};if(ke.header.length===ke.align.length){var Re=ke.align.length,He;for(He=0;He<Re;He++)/^ *-+: *$/.test(ke.align[He])?ke.align[He]="right":/^ *:-+: *$/.test(ke.align[He])?ke.align[He]="center":/^ *:-+ *$/.test(ke.align[He])?ke.align[He]="left":ke.align[He]=null;for(Re=ke.cells.length,He=0;He<Re;He++)ke.cells[He]=P(ke.cells[He],ke.header.length);return ke}}},Me.hr=function(_e){var Se=this.rules.block.hr.exec(_e);if(Se)return{type:"hr",raw:Se[0]}},Me.blockquote=function(_e){var Se=this.rules.block.blockquote.exec(_e);if(Se){var ke=Se[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Se[0],text:ke}}},Me.list=function(_e){var Se=this.rules.block.list.exec(_e);if(Se){for(var ke=Se[0],Re=Se[2],He=Re.length>1,Ae=Re[Re.length-1]===")",Ye={type:"list",raw:ke,ordered:He,start:He?+Re.slice(0,-1):"",loose:!1,items:[]},it=Se[0].match(this.rules.block.item),lt=!1,ut,ct,xt,dt,kt,zt,Vt,Yt=it.length,It=0;It<Yt;It++)ut=it[It],ke=ut,ct=ut.length,ut=ut.replace(/^ *([*+-]|\d+[.)]) */,""),~ut.indexOf(`
|
|
|
`)&&(ct-=ut.length,ut=this.options.pedantic?ut.replace(/^ {1,4}/gm,""):ut.replace(new RegExp("^ {1,"+ct+"}","gm"),"")),It!==Yt-1&&(xt=this.rules.block.bullet.exec(it[It+1])[0],(He?xt.length===1||!Ae&&xt[xt.length-1]===")":xt.length>1||this.options.smartLists&&xt!==Re)&&(dt=it.slice(It+1).join(`
|
|
|
`),Ye.raw=Ye.raw.substring(0,Ye.raw.length-dt.length),It=Yt-1)),kt=lt||/\n\n(?!\s*$)/.test(ut),It!==Yt-1&&(lt=ut.charAt(ut.length-1)===`
|
|
|
`,kt||(kt=lt)),kt&&(Ye.loose=!0),zt=/^\[[ xX]\] /.test(ut),Vt=void 0,zt&&(Vt=ut[1]!==" ",ut=ut.replace(/^\[[ xX]\] +/,"")),Ye.items.push({type:"list_item",raw:ke,task:zt,checked:Vt,loose:kt,text:ut});return Ye}},Me.html=function(_e){var Se=this.rules.block.html.exec(_e);if(Se)return{type:this.options.sanitize?"paragraph":"html",raw:Se[0],pre:!this.options.sanitizer&&(Se[1]==="pre"||Se[1]==="script"||Se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):le(Se[0]):Se[0]}},Me.def=function(_e){var Se=this.rules.block.def.exec(_e);if(Se){Se[3]&&(Se[3]=Se[3].substring(1,Se[3].length-1));var ke=Se[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Se[0],href:Se[2],title:Se[3]}}},Me.table=function(_e){var Se=this.rules.block.table.exec(_e);if(Se){var ke={type:"table",header:P(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(ke.header.length===ke.align.length){ke.raw=Se[0];var Re=ke.align.length,He;for(He=0;He<Re;He++)/^ *-+: *$/.test(ke.align[He])?ke.align[He]="right":/^ *:-+: *$/.test(ke.align[He])?ke.align[He]="center":/^ *:-+ *$/.test(ke.align[He])?ke.align[He]="left":ke.align[He]=null;for(Re=ke.cells.length,He=0;He<Re;He++)ke.cells[He]=P(ke.cells[He].replace(/^ *\| *| *\| *$/g,""),ke.header.length);return ke}}},Me.lheading=function(_e){var Se=this.rules.block.lheading.exec(_e);if(Se)return{type:"heading",raw:Se[0],depth:Se[2].charAt(0)==="="?1:2,text:Se[1]}},Me.paragraph=function(_e){var Se=this.rules.block.paragraph.exec(_e);if(Se)return{type:"paragraph",raw:Se[0],text:Se[1].charAt(Se[1].length-1)===`
|
|
|
`?Se[1].slice(0,-1):Se[1]}},Me.text=function(_e,Se){var ke=this.rules.block.text.exec(_e);if(ke){var Re=Se[Se.length-1];return Re&&Re.type==="text"?{raw:ke[0],text:ke[0]}:{type:"text",raw:ke[0],text:ke[0]}}},Me.escape=function(_e){var Se=this.rules.inline.escape.exec(_e);if(Se)return{type:"escape",raw:Se[0],text:le(Se[1])}},Me.tag=function(_e,Se,ke){var Re=this.rules.inline.tag.exec(_e);if(Re)return!Se&&/^<a /i.test(Re[0])?Se=!0:Se&&/^<\/a>/i.test(Re[0])&&(Se=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Re[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Re[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Re[0],inLink:Se,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Re[0]):le(Re[0]):Re[0]}},Me.link=function(_e){var Se=this.rules.inline.link.exec(_e);if(Se){var ke=pe(Se[2],"()");if(ke>-1){var Re=Se[0].indexOf("!")===0?5:4,He=Re+Se[1].length+ke;Se[2]=Se[2].substring(0,ke),Se[0]=Se[0].substring(0,He).trim(),Se[3]=""}var Ae=Se[2],Ye="";if(this.options.pedantic){var it=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ae);it?(Ae=it[1],Ye=it[3]):Ye=""}else Ye=Se[3]?Se[3].slice(1,-1):"";Ae=Ae.trim().replace(/^<([\s\S]*)>$/,"$1");var lt=ye(Se,{href:Ae&&Ae.replace(this.rules.inline._escapes,"$1"),title:Ye&&Ye.replace(this.rules.inline._escapes,"$1")},Se[0]);return lt}},Me.reflink=function(_e,Se){var ke;if((ke=this.rules.inline.reflink.exec(_e))||(ke=this.rules.inline.nolink.exec(_e))){var Re=(ke[2]||ke[1]).replace(/\s+/g," ");if(Re=Se[Re.toLowerCase()],!Re||!Re.href){var He=ke[0].charAt(0);return{type:"text",raw:He,text:He}}var Ae=ye(ke,Re,ke[0]);return Ae}},Me.strong=function(_e,Se,ke){ke===void 0&&(ke="");var Re=this.rules.inline.strong.start.exec(_e);if(Re&&(!Re[1]||Re[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Se=Se.slice(-1*_e.length);var He=Re[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;He.lastIndex=0;for(var Ae;(Re=He.exec(Se))!=null;)if(Ae=this.rules.inline.strong.middle.exec(Se.slice(0,Re.index+3)),Ae)return{type:"strong",raw:_e.slice(0,Ae[0].length),text:_e.slice(2,Ae[0].length-2)}}},Me.em=function(_e,Se,ke){ke===void 0&&(ke="");var Re=this.rules.inline.em.start.exec(_e);if(Re&&(!Re[1]||Re[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Se=Se.slice(-1*_e.length);var He=Re[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;He.lastIndex=0;for(var Ae;(Re=He.exec(Se))!=null;)if(Ae=this.rules.inline.em.middle.exec(Se.slice(0,Re.index+2)),Ae)return{type:"em",raw:_e.slice(0,Ae[0].length),text:_e.slice(1,Ae[0].length-1)}}},Me.codespan=function(_e){var Se=this.rules.inline.code.exec(_e);if(Se){var ke=Se[2].replace(/\n/g," "),Re=/[^ ]/.test(ke),He=ke.startsWith(" ")&&ke.endsWith(" ");return Re&&He&&(ke=ke.substring(1,ke.length-1)),ke=le(ke,!0),{type:"codespan",raw:Se[0],text:ke}}},Me.br=function(_e){var Se=this.rules.inline.br.exec(_e);if(Se)return{type:"br",raw:Se[0]}},Me.del=function(_e){var Se=this.rules.inline.del.exec(_e);if(Se)return{type:"del",raw:Se[0],text:Se[1]}},Me.autolink=function(_e,Se){var ke=this.rules.inline.autolink.exec(_e);if(ke){var Re,He;return ke[2]==="@"?(Re=le(this.options.mangle?Se(ke[1]):ke[1]),He="mailto:"+Re):(Re=le(ke[1]),He=Re),{type:"link",raw:ke[0],text:Re,href:He,tokens:[{type:"text",raw:Re,text:Re}]}}},Me.url=function(_e,Se){var ke;if(ke=this.rules.inline.url.exec(_e)){var Re,He;if(ke[2]==="@")Re=le(this.options.mangle?Se(ke[0]):ke[0]),He="mailto:"+Re;else{var Ae;do Ae=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(Ae!==ke[0]);Re=le(ke[0]),ke[1]==="www."?He="http://"+Re:He=Re}return{type:"link",raw:ke[0],text:Re,href:He,tokens:[{type:"text",raw:Re,text:Re}]}}},Me.inlineText=function(_e,Se,ke){var Re=this.rules.inline.text.exec(_e);if(Re){var He;return Se?He=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Re[0]):le(Re[0]):Re[0]:He=le(this.options.smartypants?ke(Re[0]):Re[0]),{type:"text",raw:Re[0],text:He}}},je}(),ae=z.noopTest,fe=z.edit,ge=z.merge,q={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*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\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:ae,table:ae,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};q._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,q._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,q.def=fe(q.def).replace("label",q._label).replace("title",q._title).getRegex(),q.bullet=/(?:[*+-]|\d{1,9}[.)])/,q.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,q.item=fe(q.item,"gm").replace(/bull/g,q.bullet).getRegex(),q.list=fe(q.list).replace(/bull/g,q.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+q.def.source+")").getRegex(),q._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",q._comment=/<!--(?!-?>)[\s\S]*?-->/,q.html=fe(q.html,"i").replace("comment",q._comment).replace("tag",q._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),q.paragraph=fe(q._paragraph).replace("hr",q.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",q._tag).getRegex(),q.blockquote=fe(q.blockquote).replace("paragraph",q.paragraph).getRegex(),q.normal=ge({},q),q.gfm=ge({},q.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*|$)"}),q.gfm.nptable=fe(q.gfm.nptable).replace("hr",q.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",q._tag).getRegex(),q.gfm.table=fe(q.gfm.table).replace("hr",q.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",q._tag).getRegex(),q.pedantic=ge({},q.normal,{html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",q._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:ae,paragraph:fe(q.normal._paragraph).replace("hr",q.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",q.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ie={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ae,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\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:ae,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ie._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ie.punctuation=fe(ie.punctuation).replace(/punctuation/g,ie._punctuation).getRegex(),ie._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ie._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ie.em.start=fe(ie.em.start).replace(/punctuation/g,ie._punctuation).getRegex(),ie.em.middle=fe(ie.em.middle).replace(/punctuation/g,ie._punctuation).replace(/overlapSkip/g,ie._overlapSkip).getRegex(),ie.em.endAst=fe(ie.em.endAst,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.em.endUnd=fe(ie.em.endUnd,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.start=fe(ie.strong.start).replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.middle=fe(ie.strong.middle).replace(/punctuation/g,ie._punctuation).replace(/blockSkip/g,ie._blockSkip).getRegex(),ie.strong.endAst=fe(ie.strong.endAst,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.endUnd=fe(ie.strong.endUnd,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.blockSkip=fe(ie._blockSkip,"g").getRegex(),ie.overlapSkip=fe(ie._overlapSkip,"g").getRegex(),ie._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ie._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ie._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])?)+(?![-_])/,ie.autolink=fe(ie.autolink).replace("scheme",ie._scheme).replace("email",ie._email).getRegex(),ie._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ie.tag=fe(ie.tag).replace("comment",q._comment).replace("attribute",ie._attribute).getRegex(),ie._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ie._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ie._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ie.link=fe(ie.link).replace("label",ie._label).replace("href",ie._href).replace("title",ie._title).getRegex(),ie.reflink=fe(ie.reflink).replace("label",ie._label).getRegex(),ie.reflinkSearch=fe(ie.reflinkSearch,"g").replace("reflink",ie.reflink).replace("nolink",ie.nolink).getRegex(),ie.normal=ge({},ie),ie.pedantic=ge({},ie.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:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",ie._label).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ie._label).getRegex()}),ie.gfm=ge({},ie.normal,{escape:fe(ie.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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),ie.gfm.url=fe(ie.gfm.url,"i").replace("email",ie.gfm._extended_email).getRegex(),ie.breaks=ge({},ie.gfm,{br:fe(ie.br).replace("{2,}","*").getRegex(),text:fe(ie.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var $={block:q,inline:ie},se=h.defaults,K=$.block,Y=$.inline;function Ce(je){return je.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Q(je){var Me="",Ie,_e,Se=je.length;for(Ie=0;Ie<Se;Ie++)_e=je.charCodeAt(Ie),Math.random()>.5&&(_e="x"+_e.toString(16)),Me+="&#"+_e+";";return Me}var B=function(){function je(Ie){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ie||se,this.options.tokenizer=this.options.tokenizer||new Oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var _e={block:K.normal,inline:Y.normal};this.options.pedantic?(_e.block=K.pedantic,_e.inline=Y.pedantic):this.options.gfm&&(_e.block=K.gfm,this.options.breaks?_e.inline=Y.breaks:_e.inline=Y.gfm),this.tokenizer.rules=_e}je.lex=function(_e,Se){var ke=new je(Se);return ke.lex(_e)};var Me=je.prototype;return Me.lex=function(_e){return _e=_e.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(_e,this.tokens,!0),this.inline(this.tokens),this.tokens},Me.blockTokens=function(_e,Se,ke){Se===void 0&&(Se=[]),ke===void 0&&(ke=!0),_e=_e.replace(/^ +$/gm,"");for(var Re,He,Ae,Ye;_e;){if(Re=this.tokenizer.space(_e)){_e=_e.substring(Re.raw.length),Re.type&&Se.push(Re);continue}if(Re=this.tokenizer.code(_e,Se)){_e=_e.substring(Re.raw.length),Re.type?Se.push(Re):(Ye=Se[Se.length-1],Ye.raw+=`
|
|
|
`+Re.raw,Ye.text+=`
|
|
|
`+Re.text);continue}if(Re=this.tokenizer.fences(_e)){_e=_e.substring(Re.raw.length),Se.push(Re);continue}if(Re=this.tokenizer.heading(_e)){_e=_e.substring(Re.raw.length),Se.push(Re);continue}if(Re=this.tokenizer.nptable(_e)){_e=_e.substring(Re.raw.length),Se.push(Re);continue}if(Re=this.tokenizer.hr(_e)){_e=_e.substring(Re.raw.length),Se.push(Re);continue}if(Re=this.tokenizer.blockquote(_e)){_e=_e.substring(Re.raw.length),Re.tokens=this.blockTokens(Re.text,[],ke),Se.push(Re);continue}if(Re=this.tokenizer.list(_e)){for(_e=_e.substring(Re.raw.length),Ae=Re.items.length,He=0;He<Ae;He++)Re.items[He].tokens=this.blockTokens(Re.items[He].text,[],!1);Se.push(Re);continue}if(Re=this.tokenizer.html(_e)){_e=_e.substring(Re.raw.length),Se.push(Re);continue}if(ke&&(Re=this.tokenizer.def(_e))){_e=_e.substring(Re.raw.length),this.tokens.links[Re.tag]||(this.tokens.links[Re.tag]={href:Re.href,title:Re.title});continue}if(Re=this.tokenizer.table(_e)){_e=_e.substring(Re.raw.length),Se.push(Re);continue}if(Re=this.tokenizer.lheading(_e)){_e=_e.substring(Re.raw.length),Se.push(Re);continue}if(ke&&(Re=this.tokenizer.paragraph(_e))){_e=_e.substring(Re.raw.length),Se.push(Re);continue}if(Re=this.tokenizer.text(_e,Se)){_e=_e.substring(Re.raw.length),Re.type?Se.push(Re):(Ye=Se[Se.length-1],Ye.raw+=`
|
|
|
`+Re.raw,Ye.text+=`
|
|
|
`+Re.text);continue}if(_e){var it="Infinite loop on byte: "+_e.charCodeAt(0);if(this.options.silent){console.error(it);break}else throw new Error(it)}}return Se},Me.inline=function(_e){var Se,ke,Re,He,Ae,Ye,it=_e.length;for(Se=0;Se<it;Se++){Ye=_e[Se];switch(Ye.type){case"paragraph":case"text":case"heading":{Ye.tokens=[],this.inlineTokens(Ye.text,Ye.tokens);break}case"table":{for(Ye.tokens={header:[],cells:[]},He=Ye.header.length,ke=0;ke<He;ke++)Ye.tokens.header[ke]=[],this.inlineTokens(Ye.header[ke],Ye.tokens.header[ke]);for(He=Ye.cells.length,ke=0;ke<He;ke++)for(Ae=Ye.cells[ke],Ye.tokens.cells[ke]=[],Re=0;Re<Ae.length;Re++)Ye.tokens.cells[ke][Re]=[],this.inlineTokens(Ae[Re],Ye.tokens.cells[ke][Re]);break}case"blockquote":{this.inline(Ye.tokens);break}case"list":{for(He=Ye.items.length,ke=0;ke<He;ke++)this.inline(Ye.items[ke].tokens);break}}}return _e},Me.inlineTokens=function(_e,Se,ke,Re,He){Se===void 0&&(Se=[]),ke===void 0&&(ke=!1),Re===void 0&&(Re=!1),He===void 0&&(He="");var Ae,Ye=_e,it;if(this.tokens.links){var lt=Object.keys(this.tokens.links);if(lt.length>0)for(;(it=this.tokenizer.rules.inline.reflinkSearch.exec(Ye))!=null;)lt.includes(it[0].slice(it[0].lastIndexOf("[")+1,-1))&&(Ye=Ye.slice(0,it.index)+"["+"a".repeat(it[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(it=this.tokenizer.rules.inline.blockSkip.exec(Ye))!=null;)Ye=Ye.slice(0,it.index)+"["+"a".repeat(it[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;_e;){if(Ae=this.tokenizer.escape(_e)){_e=_e.substring(Ae.raw.length),Se.push(Ae);continue}if(Ae=this.tokenizer.tag(_e,ke,Re)){_e=_e.substring(Ae.raw.length),ke=Ae.inLink,Re=Ae.inRawBlock,Se.push(Ae);continue}if(Ae=this.tokenizer.link(_e)){_e=_e.substring(Ae.raw.length),Ae.type==="link"&&(Ae.tokens=this.inlineTokens(Ae.text,[],!0,Re)),Se.push(Ae);continue}if(Ae=this.tokenizer.reflink(_e,this.tokens.links)){_e=_e.substring(Ae.raw.length),Ae.type==="link"&&(Ae.tokens=this.inlineTokens(Ae.text,[],!0,Re)),Se.push(Ae);continue}if(Ae=this.tokenizer.strong(_e,Ye,He)){_e=_e.substring(Ae.raw.length),Ae.tokens=this.inlineTokens(Ae.text,[],ke,Re),Se.push(Ae);continue}if(Ae=this.tokenizer.em(_e,Ye,He)){_e=_e.substring(Ae.raw.length),Ae.tokens=this.inlineTokens(Ae.text,[],ke,Re),Se.push(Ae);continue}if(Ae=this.tokenizer.codespan(_e)){_e=_e.substring(Ae.raw.length),Se.push(Ae);continue}if(Ae=this.tokenizer.br(_e)){_e=_e.substring(Ae.raw.length),Se.push(Ae);continue}if(Ae=this.tokenizer.del(_e)){_e=_e.substring(Ae.raw.length),Ae.tokens=this.inlineTokens(Ae.text,[],ke,Re),Se.push(Ae);continue}if(Ae=this.tokenizer.autolink(_e,Q)){_e=_e.substring(Ae.raw.length),Se.push(Ae);continue}if(!ke&&(Ae=this.tokenizer.url(_e,Q))){_e=_e.substring(Ae.raw.length),Se.push(Ae);continue}if(Ae=this.tokenizer.inlineText(_e,Re,Ce)){_e=_e.substring(Ae.raw.length),He=Ae.raw.slice(-1),Se.push(Ae);continue}if(_e){var ut="Infinite loop on byte: "+_e.charCodeAt(0);if(this.options.silent){console.error(ut);break}else throw new Error(ut)}}return Se},i(je,null,[{key:"rules",get:function(){return{block:K,inline:Y}}}]),je}(),E=h.defaults,U=z.cleanUrl,xe=z.escape,be=function(){function je(Ie){this.options=Ie||E}var Me=je.prototype;return Me.code=function(_e,Se,ke){var Re=(Se||"").match(/\S*/)[0];if(this.options.highlight){var He=this.options.highlight(_e,Re);He!=null&&He!==_e&&(ke=!0,_e=He)}return Re?'<pre><code class="'+this.options.langPrefix+xe(Re,!0)+'">'+(ke?_e:xe(_e,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(ke?_e:xe(_e,!0))+`</code></pre>
|
|
|
`},Me.blockquote=function(_e){return`<blockquote>
|
|
|
`+_e+`</blockquote>
|
|
|
`},Me.html=function(_e){return _e},Me.heading=function(_e,Se,ke,Re){return this.options.headerIds?"<h"+Se+' id="'+this.options.headerPrefix+Re.slug(ke)+'">'+_e+"</h"+Se+`>
|
|
|
`:"<h"+Se+">"+_e+"</h"+Se+`>
|
|
|
`},Me.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Me.list=function(_e,Se,ke){var Re=Se?"ol":"ul",He=Se&&ke!==1?' start="'+ke+'"':"";return"<"+Re+He+`>
|
|
|
`+_e+"</"+Re+`>
|
|
|
`},Me.listitem=function(_e){return"<li>"+_e+`</li>
|
|
|
`},Me.checkbox=function(_e){return"<input "+(_e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Me.paragraph=function(_e){return"<p>"+_e+`</p>
|
|
|
`},Me.table=function(_e,Se){return Se&&(Se="<tbody>"+Se+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+_e+`</thead>
|
|
|
`+Se+`</table>
|
|
|
`},Me.tablerow=function(_e){return`<tr>
|
|
|
`+_e+`</tr>
|
|
|
`},Me.tablecell=function(_e,Se){var ke=Se.header?"th":"td",Re=Se.align?"<"+ke+' align="'+Se.align+'">':"<"+ke+">";return Re+_e+"</"+ke+`>
|
|
|
`},Me.strong=function(_e){return"<strong>"+_e+"</strong>"},Me.em=function(_e){return"<em>"+_e+"</em>"},Me.codespan=function(_e){return"<code>"+_e+"</code>"},Me.br=function(){return this.options.xhtml?"<br/>":"<br>"},Me.del=function(_e){return"<del>"+_e+"</del>"},Me.link=function(_e,Se,ke){if(_e=U(this.options.sanitize,this.options.baseUrl,_e),_e===null)return ke;var Re='<a href="'+xe(_e)+'"';return Se&&(Re+=' title="'+Se+'"'),Re+=">"+ke+"</a>",Re},Me.image=function(_e,Se,ke){if(_e=U(this.options.sanitize,this.options.baseUrl,_e),_e===null)return ke;var Re='<img src="'+_e+'" alt="'+ke+'"';return Se&&(Re+=' title="'+Se+'"'),Re+=this.options.xhtml?"/>":">",Re},Me.text=function(_e){return _e},je}(),Te=function(){function je(){}var Me=je.prototype;return Me.strong=function(_e){return _e},Me.em=function(_e){return _e},Me.codespan=function(_e){return _e},Me.del=function(_e){return _e},Me.html=function(_e){return _e},Me.text=function(_e){return _e},Me.link=function(_e,Se,ke){return""+ke},Me.image=function(_e,Se,ke){return""+ke},Me.br=function(){return""},je}(),Fe=function(){function je(){this.seen={}}var Me=je.prototype;return Me.slug=function(_e){var Se=_e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Se)){var ke=Se;do this.seen[ke]++,Se=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Se))}return this.seen[Se]=0,Se},je}(),Be=h.defaults,Ue=z.unescape,ze=function(){function je(Ie){this.options=Ie||Be,this.options.renderer=this.options.renderer||new be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new Fe}je.parse=function(_e,Se){var ke=new je(Se);return ke.parse(_e)};var Me=je.prototype;return Me.parse=function(_e,Se){Se===void 0&&(Se=!0);var ke="",Re,He,Ae,Ye,it,lt,ut,ct,xt,dt,kt,zt,Vt,Yt,It,Ut,jr,Tt,Rr=_e.length;for(Re=0;Re<Rr;Re++){dt=_e[Re];switch(dt.type){case"space":continue;case"hr":{ke+=this.renderer.hr();continue}case"heading":{ke+=this.renderer.heading(this.parseInline(dt.tokens),dt.depth,Ue(this.parseInline(dt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ke+=this.renderer.code(dt.text,dt.lang,dt.escaped);continue}case"table":{for(ct="",ut="",Ye=dt.header.length,He=0;He<Ye;He++)ut+=this.renderer.tablecell(this.parseInline(dt.tokens.header[He]),{header:!0,align:dt.align[He]});for(ct+=this.renderer.tablerow(ut),xt="",Ye=dt.cells.length,He=0;He<Ye;He++){for(lt=dt.tokens.cells[He],ut="",it=lt.length,Ae=0;Ae<it;Ae++)ut+=this.renderer.tablecell(this.parseInline(lt[Ae]),{header:!1,align:dt.align[Ae]});xt+=this.renderer.tablerow(ut)}ke+=this.renderer.table(ct,xt);continue}case"blockquote":{xt=this.parse(dt.tokens),ke+=this.renderer.blockquote(xt);continue}case"list":{for(kt=dt.ordered,zt=dt.start,Vt=dt.loose,Ye=dt.items.length,xt="",He=0;He<Ye;He++)It=dt.items[He],Ut=It.checked,jr=It.task,Yt="",It.task&&(Tt=this.renderer.checkbox(Ut),Vt?It.tokens.length>0&&It.tokens[0].type==="text"?(It.tokens[0].text=Tt+" "+It.tokens[0].text,It.tokens[0].tokens&&It.tokens[0].tokens.length>0&&It.tokens[0].tokens[0].type==="text"&&(It.tokens[0].tokens[0].text=Tt+" "+It.tokens[0].tokens[0].text)):It.tokens.unshift({type:"text",text:Tt}):Yt+=Tt),Yt+=this.parse(It.tokens,Vt),xt+=this.renderer.listitem(Yt,jr,Ut);ke+=this.renderer.list(xt,kt,zt);continue}case"html":{ke+=this.renderer.html(dt.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(dt.tokens));continue}case"text":{for(xt=dt.tokens?this.parseInline(dt.tokens):dt.text;Re+1<Rr&&_e[Re+1].type==="text";)dt=_e[++Re],xt+=`
|
|
|
`+(dt.tokens?this.parseInline(dt.tokens):dt.text);ke+=Se?this.renderer.paragraph(xt):xt;continue}default:{var Jt='Token with "'+dt.type+'" type was not found.';if(this.options.silent){console.error(Jt);return}else throw new Error(Jt)}}}return ke},Me.parseInline=function(_e,Se){Se=Se||this.renderer;var ke="",Re,He,Ae=_e.length;for(Re=0;Re<Ae;Re++){He=_e[Re];switch(He.type){case"escape":{ke+=Se.text(He.text);break}case"html":{ke+=Se.html(He.text);break}case"link":{ke+=Se.link(He.href,He.title,this.parseInline(He.tokens,Se));break}case"image":{ke+=Se.image(He.href,He.title,He.text);break}case"strong":{ke+=Se.strong(this.parseInline(He.tokens,Se));break}case"em":{ke+=Se.em(this.parseInline(He.tokens,Se));break}case"codespan":{ke+=Se.codespan(He.text);break}case"br":{ke+=Se.br();break}case"del":{ke+=Se.del(this.parseInline(He.tokens,Se));break}case"text":{ke+=Se.text(He.text);break}default:{var Ye='Token with "'+He.type+'" type was not found.';if(this.options.silent){console.error(Ye);return}else throw new Error(Ye)}}}return ke},je}(),Ve=z.merge,Xe=z.checkSanitizeDeprecation,Je=z.escape,Ne=h.getDefaults,tt=h.changeDefaults,nt=h.defaults;function Ke(je,Me,Ie){if(typeof je=="undefined"||je===null)throw new Error("marked(): input parameter is undefined or null");if(typeof je!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(je)+", string expected");if(typeof Me=="function"&&(Ie=Me,Me=null),Me=Ve({},Ke.defaults,Me||{}),Xe(Me),Ie){var _e=Me.highlight,Se;try{Se=B.lex(je,Me)}catch(Ae){return Ie(Ae)}var ke=function(Ye){var it;if(!Ye)try{it=ze.parse(Se,Me)}catch(lt){Ye=lt}return Me.highlight=_e,Ye?Ie(Ye):Ie(null,it)};if(!_e||_e.length<3)return ke();if(delete Me.highlight,!Se.length)return ke();var Re=0;Ke.walkTokens(Se,function(Ae){Ae.type==="code"&&(Re++,setTimeout(function(){_e(Ae.text,Ae.lang,function(Ye,it){if(Ye)return ke(Ye);it!=null&&it!==Ae.text&&(Ae.text=it,Ae.escaped=!0),Re--,Re===0&&ke()})},0))}),Re===0&&ke();return}try{var He=B.lex(je,Me);return Me.walkTokens&&Ke.walkTokens(He,Me.walkTokens),ze.parse(He,Me)}catch(Ae){if(Ae.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Me.silent)return"<p>An error occurred:</p><pre>"+Je(Ae.message+"",!0)+"</pre>";throw Ae}}Ke.options=Ke.setOptions=function(je){return Ve(Ke.defaults,je),tt(Ke.defaults),Ke},Ke.getDefaults=Ne,Ke.defaults=nt,Ke.use=function(je){var Me=Ve({},je);if(je.renderer&&function(){var _e=Ke.defaults.renderer||new be,Se=function(He){var Ae=_e[He];_e[He]=function(){for(var Ye=arguments.length,it=new Array(Ye),lt=0;lt<Ye;lt++)it[lt]=arguments[lt];var ut=je.renderer[He].apply(_e,it);return ut===!1&&(ut=Ae.apply(_e,it)),ut}};for(var ke in je.renderer)Se(ke);Me.renderer=_e}(),je.tokenizer&&function(){var _e=Ke.defaults.tokenizer||new Oe,Se=function(He){var Ae=_e[He];_e[He]=function(){for(var Ye=arguments.length,it=new Array(Ye),lt=0;lt<Ye;lt++)it[lt]=arguments[lt];var ut=je.tokenizer[He].apply(_e,it);return ut===!1&&(ut=Ae.apply(_e,it)),ut}};for(var ke in je.tokenizer)Se(ke);Me.tokenizer=_e}(),je.walkTokens){var Ie=Ke.defaults.walkTokens;Me.walkTokens=function(_e){je.walkTokens(_e),Ie&&Ie(_e)}}Ke.setOptions(Me)},Ke.walkTokens=function(je,Me){for(var Ie=x(je),_e;!(_e=Ie()).done;){var Se=_e.value;Me(Se);switch(Se.type){case"table":{for(var ke=x(Se.tokens.header),Re;!(Re=ke()).done;){var He=Re.value;Ke.walkTokens(He,Me)}for(var Ae=x(Se.tokens.cells),Ye;!(Ye=Ae()).done;)for(var it=Ye.value,lt=x(it),ut;!(ut=lt()).done;){var ct=ut.value;Ke.walkTokens(ct,Me)}break}case"list":{Ke.walkTokens(Se.items,Me);break}default:Se.tokens&&Ke.walkTokens(Se.tokens,Me)}}},Ke.Parser=ze,Ke.parser=ze.parse,Ke.Renderer=be,Ke.TextRenderer=Te,Ke.Lexer=B,Ke.lexer=B.lex,Ke.Tokenizer=Oe,Ke.Slugger=Fe,Ke.parse=Ke;var $e=Ke;return $e})},"DlR+":function(a,G,d){var f=d("MFOe"),i=f.Global,O=f.trim;a.exports={name:"cookieStorage",read:x,write:h,each:m,remove:s,clearAll:l};var C=i.document;function x(o){if(!o||!u(o))return null;var g="(?:^|.*;\\s*)"+escape(o).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(C.cookie.replace(new RegExp(g),"$1"))}function m(o){for(var g=C.cookie.split(/; ?/g),p=g.length-1;p>=0;p--){if(!O(g[p]))continue;var v=g[p].split("="),_=unescape(v[0]),S=unescape(v[1]);o(S,_)}}function h(o,g){if(!o)return;C.cookie=escape(o)+"="+escape(g)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function s(o){if(!o||!u(o))return;C.cookie=escape(o)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function l(){m(function(o,g){s(g)})}function u(o){return new RegExp("(?:^|;\\s*)"+escape(o).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(C.cookie)}},E4JC:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("ETIr"),d("cv67"),d("K3mO"),d("OLod"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.StreamCipher,x=i.algo,m=[],h=[],s=[],l=x.Rabbit=C.extend({_doReset:function(){for(var o=this._key.words,g=this.cfg.iv,p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360;var v=this._X=[o[0],o[3]<<16|o[2]>>>16,o[1],o[0]<<16|o[3]>>>16,o[2],o[1]<<16|o[0]>>>16,o[3],o[2]<<16|o[1]>>>16],_=this._C=[o[2]<<16|o[2]>>>16,o[0]&4294901760|o[1]&65535,o[3]<<16|o[3]>>>16,o[1]&4294901760|o[2]&65535,o[0]<<16|o[0]>>>16,o[2]&4294901760|o[3]&65535,o[1]<<16|o[1]>>>16,o[3]&4294901760|o[0]&65535];this._b=0;for(var p=0;p<4;p++)u.call(this);for(var p=0;p<8;p++)_[p]^=v[p+4&7];if(g){var S=g.words,k=S[0],T=S[1],M=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,I=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,j=M>>>16|I&4294901760,D=I<<16|M&65535;_[0]^=M,_[1]^=j,_[2]^=I,_[3]^=D,_[4]^=M,_[5]^=j,_[6]^=I,_[7]^=D;for(var p=0;p<4;p++)u.call(this)}},_doProcessBlock:function(o,g){var p=this._X;u.call(this),m[0]=p[0]^p[5]>>>16^p[3]<<16,m[1]=p[2]^p[7]>>>16^p[5]<<16,m[2]=p[4]^p[1]>>>16^p[7]<<16,m[3]=p[6]^p[3]>>>16^p[1]<<16;for(var v=0;v<4;v++)m[v]=(m[v]<<8|m[v]>>>24)&16711935|(m[v]<<24|m[v]>>>8)&4278255360,o[g+v]^=m[v]},blockSize:128/32,ivSize:64/32});function u(){for(var o=this._X,g=this._C,p=0;p<8;p++)h[p]=g[p];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<h[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<h[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<h[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<h[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<h[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<h[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<h[6]>>>0?1:0)|0,this._b=g[7]>>>0<h[7]>>>0?1:0;for(var p=0;p<8;p++){var v=o[p]+g[p],_=v&65535,S=v>>>16,k=((_*_>>>17)+_*S>>>15)+S*S,T=((v&4294901760)*v|0)+((v&65535)*v|0);s[p]=k^T}o[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,o[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,o[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,o[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,o[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,o[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,o[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,o[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}i.Rabbit=C._createHelper(l)}(),f.Rabbit})},EHPI:function(a,G,d){"use strict";var f=d("bbsP"),i=d("/wGt"),O=d("tJVT"),C=d("k1fw"),x=d("q1tI"),m=d.n(x),h=d("ZW9T"),s=d("ZD9Y"),l=d("M8RZ"),u=d("bCnd"),o=d("fcyK"),g=d.n(o),p={theme:Object(u.a)("cmCodeMode","vs-dark"),fontSize:Object(u.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(u.a)("cmTabToSpace",!0)},v;(function(k){k[k.set_font_size=0]="set_font_size",k[k.set_theme=1]="set_theme",k[k.on_tab_to_space=2]="on_tab_to_space",k[k.set_show_editor_setting=3]="set_show_editor_setting"})(v||(v={}));function _(k,T){switch(T.type){case v.set_show_editor_setting:return Object(C.a)(Object(C.a)({},k),{},{showEditorSetting:T.payload});case v.set_theme:return Object(C.a)(Object(C.a)({},k),{},{theme:T.payload});case v.set_font_size:return Object(C.a)(Object(C.a)({},k),{},{fontSize:T.payload});case v.on_tab_to_space:return Object(C.a)(Object(C.a)({},k),{},{tabToSpace:T.payload});default:throw new Error}}G.a=function(k){var T=k.value,M=k.onChange,I=k.language,j=k.ActionBarRender,D=j===void 0?function(W){return m.a.createElement(S,{onShowCodeSetting:W})}:j,y=Object(x.useReducer)(_,p),J=Object(O.a)(y,2),X=J[0],N=J[1],F=X.theme,H=X.fontSize,Z=X.showEditorSetting,ce=X.tabToSpace,he={onFontSizeChange:function(z){N({type:v.set_font_size,payload:z}),Object(u.b)("cmFontSize",z)},tabToSpace:ce,cmFontSize:H,className:"oj",cmCodeMode:F,onTabToSpace:function(z){N({type:v.on_tab_to_space,payload:z}),Object(u.b)("cmTabToSpace",z)},onCodeModeChange:function(z){N({type:v.set_theme,payload:z}),Object(u.b)("cmCodeMode",z)}};function V(){N({type:v.set_show_editor_setting,payload:!1})}function ve(){N({type:v.set_show_editor_setting,payload:!0})}var ne={value:T,language:I,onChange:M,theme:F,height:"calc(100% - 56px)",options:{fontSize:H,insertSpaces:ce}};return m.a.createElement(x.Fragment,null,m.a.createElement("div",{className:"code-panel-container"},D(ve),m.a.createElement(h.b,ne)),m.a.createElement(l.a,null,m.a.createElement(i.a,{className:"oj",title:null,placement:"right",closable:!1,visible:Z,onClose:V},m.a.createElement(s.a,he))))};function S(k){var T=k.onShowCodeSetting;return m.a.createElement("div",{className:"action-bar"},m.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),m.a.createElement("a",{onClick:T},m.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(a,G,d){(function(f){f(d("VrN/"))})(function(f){var i={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=f.Pos;f.defineOption("autoCloseBrackets",!1,function(_,S,k){k&&k!=f.Init&&(_.removeKeyMap(x),_.state.closeBrackets=null),S&&(m(C(S,"pairs")),_.state.closeBrackets=S,_.addKeyMap(x))});function C(_,S){return S=="pairs"&&typeof _=="string"?_:typeof _=="object"&&_[S]!=null?_[S]:i[S]}var x={Backspace:l,Enter:u};function m(_){for(var S=0;S<_.length;S++){var k=_.charAt(S),T="'"+k+"'";x[T]||(x[T]=h(k))}}m(i.pairs+"`");function h(_){return function(S){return g(S,_)}}function s(_){var S=_.state.closeBrackets;if(!S||S.override)return S;var k=_.getModeAt(_.getCursor());return k.closeBrackets||S}function l(_){var S=s(_);if(!S||_.getOption("disableInput"))return f.Pass;for(var k=C(S,"pairs"),T=_.listSelections(),M=0;M<T.length;M++){if(!T[M].empty())return f.Pass;var I=p(_,T[M].head);if(!I||k.indexOf(I)%2!=0)return f.Pass}for(var M=T.length-1;M>=0;M--){var j=T[M].head;_.replaceRange("",O(j.line,j.ch-1),O(j.line,j.ch+1),"+delete")}}function u(_){var S=s(_),k=S&&C(S,"explode");if(!k||_.getOption("disableInput"))return f.Pass;for(var T=_.listSelections(),M=0;M<T.length;M++){if(!T[M].empty())return f.Pass;var I=p(_,T[M].head);if(!I||k.indexOf(I)%2!=0)return f.Pass}_.operation(function(){var j=_.lineSeparator()||`
|
|
|
`;_.replaceSelection(j+j,null),_.execCommand("goCharLeft"),T=_.listSelections();for(var D=0;D<T.length;D++){var y=T[D].head.line;_.indentLine(y,null,!0),_.indentLine(y+1,null,!0)}})}function o(_){var S=f.cmpPos(_.anchor,_.head)>0;return{anchor:new O(_.anchor.line,_.anchor.ch+(S?-1:1)),head:new O(_.head.line,_.head.ch+(S?1:-1))}}function g(_,S){var k=s(_);if(!k||_.getOption("disableInput"))return f.Pass;var T=C(k,"pairs"),M=T.indexOf(S);if(M==-1)return f.Pass;for(var I=C(k,"closeBefore"),j=C(k,"triples"),D=T.charAt(M+1)==S,y=_.listSelections(),J=M%2==0,X,N=0;N<y.length;N++){var F=y[N],H=F.head,Z,ce=_.getRange(H,O(H.line,H.ch+1));if(J&&!F.empty())Z="surround";else if((D||!J)&&ce==S)D&&v(_,H)?Z="both":j.indexOf(S)>=0&&_.getRange(H,O(H.line,H.ch+3))==S+S+S?Z="skipThree":Z="skip";else if(D&&H.ch>1&&j.indexOf(S)>=0&&_.getRange(O(H.line,H.ch-2),H)==S+S){if(H.ch>2&&/\bstring/.test(_.getTokenTypeAt(O(H.line,H.ch-2))))return f.Pass;Z="addFour"}else if(D){var he=H.ch==0?" ":_.getRange(O(H.line,H.ch-1),H);if(!f.isWordChar(ce)&&he!=S&&!f.isWordChar(he))Z="both";else return f.Pass}else if(J&&(ce.length===0||/\s/.test(ce)||I.indexOf(ce)>-1))Z="both";else return f.Pass;if(!X)X=Z;else if(X!=Z)return f.Pass}var V=M%2?T.charAt(M-1):S,ve=M%2?S:T.charAt(M+1);_.operation(function(){if(X=="skip")_.execCommand("goCharRight");else if(X=="skipThree")for(var ne=0;ne<3;ne++)_.execCommand("goCharRight");else if(X=="surround"){for(var W=_.getSelections(),ne=0;ne<W.length;ne++)W[ne]=V+W[ne]+ve;_.replaceSelections(W,"around"),W=_.listSelections().slice();for(var ne=0;ne<W.length;ne++)W[ne]=o(W[ne]);_.setSelections(W)}else X=="both"?(_.replaceSelection(V+ve,null),_.triggerElectric(V+ve),_.execCommand("goCharLeft")):X=="addFour"&&(_.replaceSelection(V+V+V+V,"before"),_.execCommand("goCharRight"))})}function p(_,S){var k=_.getRange(O(S.line,S.ch-1),O(S.line,S.ch+1));return k.length==2?k:null}function v(_,S){var k=_.getTokenAt(O(S.line,S.ch+1));return/\bstring/.test(k.type)&&k.start==S.ch&&(S.ch==0||!/\bstring/.test(_.getTokenTypeAt(S)))}})},ELcG:function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){/** @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.
|
|
|
*/return function(i){var O=f,C=O.lib,x=C.WordArray,m=C.Hasher,h=O.algo,s=x.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=x.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]),u=x.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]),o=x.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]),g=x.create([0,1518500249,1859775393,2400959708,2840853838]),p=x.create([1352829926,1548603684,1836072691,2053994217,0]),v=h.RIPEMD160=m.extend({_doReset:function(){this._hash=x.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(j,D){for(var y=0;y<16;y++){var J=D+y,X=j[J];j[J]=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360}var N=this._hash.words,F=g.words,H=p.words,Z=s.words,ce=l.words,he=u.words,V=o.words,ve,ne,W,z,R,w,P,le,pe,ye;w=ve=N[0],P=ne=N[1],le=W=N[2],pe=z=N[3],ye=R=N[4];for(var Ee,y=0;y<80;y+=1)Ee=ve+j[D+Z[y]]|0,y<16?Ee+=_(ne,W,z)+F[0]:y<32?Ee+=S(ne,W,z)+F[1]:y<48?Ee+=k(ne,W,z)+F[2]:y<64?Ee+=T(ne,W,z)+F[3]:Ee+=M(ne,W,z)+F[4],Ee=Ee|0,Ee=I(Ee,he[y]),Ee=Ee+R|0,ve=R,R=z,z=I(W,10),W=ne,ne=Ee,Ee=w+j[D+ce[y]]|0,y<16?Ee+=M(P,le,pe)+H[0]:y<32?Ee+=T(P,le,pe)+H[1]:y<48?Ee+=k(P,le,pe)+H[2]:y<64?Ee+=S(P,le,pe)+H[3]:Ee+=_(P,le,pe)+H[4],Ee=Ee|0,Ee=I(Ee,V[y]),Ee=Ee+ye|0,w=ye,ye=pe,pe=I(le,10),le=P,P=Ee;Ee=N[1]+W+pe|0,N[1]=N[2]+z+ye|0,N[2]=N[3]+R+w|0,N[3]=N[4]+ve+P|0,N[4]=N[0]+ne+le|0,N[0]=Ee},_doFinalize:function(){var j=this._data,D=j.words,y=this._nDataBytes*8,J=j.sigBytes*8;D[J>>>5]|=128<<24-J%32,D[(J+64>>>9<<4)+14]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,j.sigBytes=(D.length+1)*4,this._process();for(var X=this._hash,N=X.words,F=0;F<5;F++){var H=N[F];N[F]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360}return X},clone:function(){var j=m.clone.call(this);return j._hash=this._hash.clone(),j}});function _(j,D,y){return j^D^y}function S(j,D,y){return j&D|~j&y}function k(j,D,y){return(j|~D)^y}function T(j,D,y){return j&y|D&~y}function M(j,D,y){return j^(D|~y)}function I(j,D){return j<<D|j>>>32-D}O.RIPEMD160=m._createHelper(v),O.HmacRIPEMD160=m._createHmacHelper(v)}(Math),f.RIPEMD160})},ETIr:function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.WordArray,x=i.enc,m=x.Base64={stringify:function(s){var l=s.words,u=s.sigBytes,o=this._map;s.clamp();for(var g=[],p=0;p<u;p+=3)for(var v=l[p>>>2]>>>24-p%4*8&255,_=l[p+1>>>2]>>>24-(p+1)%4*8&255,S=l[p+2>>>2]>>>24-(p+2)%4*8&255,k=v<<16|_<<8|S,T=0;T<4&&p+T*.75<u;T++)g.push(o.charAt(k>>>6*(3-T)&63));var M=o.charAt(64);if(M)for(;g.length%4;)g.push(M);return g.join("")},parse:function(s){var l=s.length,u=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var g=0;g<u.length;g++)o[u.charCodeAt(g)]=g}var p=u.charAt(64);if(p){var v=s.indexOf(p);v!==-1&&(l=v)}return h(s,l,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function h(s,l,u){for(var o=[],g=0,p=0;p<l;p++)if(p%4){var v=u[s.charCodeAt(p-1)]<<p%4*2,_=u[s.charCodeAt(p)]>>>6-p%4*2,S=v|_;o[g>>>2]|=S<<24-g%4*8,g++}return C.create(o,g)}}(),f.enc.Base64})},"F+F2":function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){return function(){if(typeof ArrayBuffer!="function")return;var i=f,O=i.lib,C=O.WordArray,x=C.init,m=C.init=function(h){if(h instanceof ArrayBuffer&&(h=new Uint8Array(h)),(h instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&h instanceof Uint8ClampedArray||h instanceof Int16Array||h instanceof Uint16Array||h instanceof Int32Array||h instanceof Uint32Array||h instanceof Float32Array||h instanceof Float64Array)&&(h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength)),h instanceof Uint8Array){for(var s=h.byteLength,l=[],u=0;u<s;u++)l[u>>>2]|=h[u]<<24-u%4*8;x.call(this,l,s)}else x.apply(this,arguments)};m.prototype=C}(),f.lib.WordArray})},GRuw:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("lPiR"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.WordArray,x=i.algo,m=x.SHA256,h=x.SHA224=m.extend({_doReset:function(){this._hash=new C.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var s=m._doFinalize.call(this);return s.sigBytes-=4,s}});i.SHA224=m._createHelper(h),i.HmacSHA224=m._createHmacHelper(h)}(),f.SHA224})},GfqC:function(a,G,d){"use strict";var f=d("q1tI"),i=d.n(f),O=d("TSYQ"),C=d.n(O);function x(z,R){var w="cannot "+z.method+" "+z.action+" "+R.status+"'",P=new Error(w);return P.status=R.status,P.method=z.method,P.url=z.action,P}function m(z){var R=z.responseText||z.response;if(!R)return R;try{return JSON.parse(R)}catch(w){return R}}function h(z){var R=new XMLHttpRequest;z.onProgress&&R.upload&&(R.upload.onprogress=function(pe){pe.total>0&&(pe.percent=pe.loaded/pe.total*100),z.onProgress(pe)});var w=new FormData;z.data&&Object.keys(z.data).forEach(function(le){var pe=z.data[le];if(Array.isArray(pe)){pe.forEach(function(ye){w.append(le+"[]",ye)});return}w.append(le,z.data[le])}),z.file instanceof Blob?w.append(z.filename,z.file,z.file.name):w.append(z.filename,z.file),R.onerror=function(pe){z.onError(pe)},R.onload=function(){return R.status<200||R.status>=300?z.onError(x(z,R),m(R)):z.onSuccess(m(R),R)},R.open(z.method,z.action,!0),z.withCredentials&&"withCredentials"in R&&(R.withCredentials=!0);var P=z.headers||{};return P["X-Requested-With"]!==null&&R.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(P).forEach(function(le){P[le]!==null&&R.setRequestHeader(le,P[le])}),R.send(w),{abort:function(){R.abort()}}}var s=+new Date,l=0;function u(){return"rc-upload-"+s+"-"+ ++l}function o(z,R){return z.indexOf(R,z.length-R.length)!==-1}var g=function(z,R){if(z&&R){var w=Array.isArray(R)?R:R.split(","),P=z.name||"",le=z.type||"",pe=le.replace(/\/.*$/,"");return w.some(function(ye){var Ee=ye.trim();return Ee.charAt(0)==="."?o(P.toLowerCase(),Ee.toLowerCase()):/\/\*$/.test(Ee)?pe===Ee.replace(/\/.*$/,""):le===Ee})}return!0};function p(z,R){var w=z.createReader(),P=[];function le(){w.readEntries(function(pe){var ye=Array.prototype.slice.apply(pe);P=P.concat(ye);var Ee=!ye.length;Ee?R(P):le()})}le()}var v=function(R,w,P){var le=function pe(ye,Ee){Ee=Ee||"",ye.isFile?ye.file(function(Oe){P(Oe)&&(ye.fullPath&&!Oe.webkitRelativePath&&(Object.defineProperties(Oe,{webkitRelativePath:{writable:!0}}),Oe.webkitRelativePath=ye.fullPath.replace(/^\//,""),Object.defineProperties(Oe,{webkitRelativePath:{writable:!1}})),w([Oe]))}):ye.isDirectory&&p(ye,function(Oe){Oe.forEach(function(ae){pe(ae,""+Ee+ye.name+"/")})})};R.forEach(function(pe){le(pe.webkitGetAsEntry())})},_=v,S=Object.assign||function(z){for(var R=1;R<arguments.length;R++){var w=arguments[R];for(var P in w)Object.prototype.hasOwnProperty.call(w,P)&&(z[P]=w[P])}return z},k=function(){function z(R,w){var P=[],le=!0,pe=!1,ye=void 0;try{for(var Ee=R[Symbol.iterator](),Oe;!(le=(Oe=Ee.next()).done)&&!(P.push(Oe.value),w&&P.length===w);le=!0);}catch(ae){pe=!0,ye=ae}finally{try{!le&&Ee.return&&Ee.return()}finally{if(pe)throw ye}}return P}return function(R,w){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return z(R,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(){function z(R,w){for(var P=0;P<w.length;P++){var le=w[P];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(R,le.key,le)}}return function(R,w,P){return w&&z(R.prototype,w),P&&z(R,P),R}}();function M(z,R,w){return R in z?Object.defineProperty(z,R,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[R]=w,z}function I(z,R){var w={};for(var P in z){if(R.indexOf(P)>=0)continue;if(!Object.prototype.hasOwnProperty.call(z,P))continue;w[P]=z[P]}return w}function j(z,R){if(!(z instanceof R))throw new TypeError("Cannot call a class as a function")}function D(z,R){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:z}function y(z,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);z.prototype=Object.create(R&&R.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(z,R):z.__proto__=R)}var J=function(R){return Object.keys(R).reduce(function(w,P){return(P.substr(0,5)==="data-"||P.substr(0,5)==="aria-"||P==="role")&&(w[P]=R[P]),w},{})},X=function(z){y(R,z);function R(){var w,P,le,pe;j(this,R);for(var ye=arguments.length,Ee=Array(ye),Oe=0;Oe<ye;Oe++)Ee[Oe]=arguments[Oe];return pe=(P=(le=D(this,(w=R.__proto__||Object.getPrototypeOf(R)).call.apply(w,[this].concat(Ee))),le),le.state={uid:u()},le.reqs={},le.onChange=function(ae){var fe=ae.target.files;le.uploadFiles(fe),le.reset()},le.onClick=function(ae){var fe=le.fileInput;if(!fe)return;var ge=le.props,q=ge.children,ie=ge.onClick;q&&q.type==="button"&&(fe.parentNode.focus(),fe.parentNode.querySelector("button").blur()),fe.click(),ie&&ie(ae)},le.onKeyDown=function(ae){ae.key==="Enter"&&le.onClick()},le.onFileDrop=function(ae){var fe=le.props.multiple;if(ae.preventDefault(),ae.type==="dragover")return;if(le.props.directory)_(Array.prototype.slice.call(ae.dataTransfer.items),le.uploadFiles,function(q){return g(q,le.props.accept)});else{var ge=Array.prototype.slice.call(ae.dataTransfer.files).filter(function(q){return g(q,le.props.accept)});fe===!1&&(ge=ge.slice(0,1)),le.uploadFiles(ge)}},le.uploadFiles=function(ae){var fe=Array.prototype.slice.call(ae);fe.map(function(ge){return ge.uid=u(),ge}).forEach(function(ge){le.upload(ge,fe)})},le.saveFileInput=function(ae){le.fileInput=ae},P),D(le,pe)}return T(R,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(P,le){var pe=this,ye=this.props;if(!ye.beforeUpload)return setTimeout(function(){return pe.post(P)},0);var Ee=ye.beforeUpload(P,le);Ee&&Ee.then?Ee.then(function(Oe){var ae=Object.prototype.toString.call(Oe);return ae==="[object File]"||ae==="[object Blob]"?pe.post(Oe):pe.post(P)}).catch(function(Oe){console.log(Oe)}):Ee!==!1&&setTimeout(function(){return pe.post(P)},0);return}},{key:"post",value:function(P){var le=this;if(!this._isMounted)return;var pe=this.props,ye=pe.onStart,Ee=pe.onProgress,Oe=pe.transformFile,ae=Oe===void 0?function(fe){return fe}:Oe;new Promise(function(fe){var ge=pe.action;return typeof ge=="function"&&(ge=ge(P)),fe(ge)}).then(function(fe){var ge=P.uid,q=pe.customRequest||h,ie=Promise.resolve(ae(P)).then(function($){var se=pe.data;return typeof se=="function"&&(se=se($)),Promise.all([$,se])}).catch(function($){console.error($)});ie.then(function($){var se=k($,2),K=se[0],Y=se[1],Ce={action:fe,filename:pe.name,data:Y,file:K,headers:pe.headers,withCredentials:pe.withCredentials,method:pe.method||"post",onProgress:Ee?function(Q){Ee(Q,P)}:null,onSuccess:function(B,E){delete le.reqs[ge],pe.onSuccess(B,P,E)},onError:function(B,E){delete le.reqs[ge],pe.onError(B,E,P)}};ye(P),le.reqs[ge]=q(Ce)})})}},{key:"reset",value:function(){this.setState({uid:u()})}},{key:"abort",value:function(P){var le=this.reqs;if(P){var pe=P;P&&P.uid&&(pe=P.uid),le[pe]&&le[pe].abort&&le[pe].abort(),delete le[pe]}else Object.keys(le).forEach(function(ye){le[ye]&&le[ye].abort&&le[ye].abort(),delete le[ye]})}},{key:"render",value:function(){var P,le=this.props,pe=le.component,ye=le.prefixCls,Ee=le.className,Oe=le.disabled,ae=le.id,fe=le.style,ge=le.multiple,q=le.accept,ie=le.children,$=le.directory,se=le.openFileDialogOnClick,K=le.onMouseEnter,Y=le.onMouseLeave,Ce=I(le,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),Q=C()((P={},M(P,ye,!0),M(P,ye+"-disabled",Oe),M(P,Ee,Ee),P)),B=Oe?{}:{onClick:se?this.onClick:function(){},onKeyDown:se?this.onKeyDown:function(){},onMouseEnter:K,onMouseLeave:Y,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(pe,S({},B,{className:Q,role:"button",style:fe}),i.a.createElement("input",S({},J(Ce),{id:ae,type:"file",ref:this.saveFileInput,onClick:function(U){return U.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:q,directory:$?"directory":null,webkitdirectory:$?"webkitdirectory":null,multiple:ge,onChange:this.onChange})),ie)}}]),R}(f.Component),N=X,F=Object.assign||function(z){for(var R=1;R<arguments.length;R++){var w=arguments[R];for(var P in w)Object.prototype.hasOwnProperty.call(w,P)&&(z[P]=w[P])}return z},H=function(){function z(R,w){for(var P=0;P<w.length;P++){var le=w[P];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(R,le.key,le)}}return function(R,w,P){return w&&z(R.prototype,w),P&&z(R,P),R}}();function Z(z,R){if(!(z instanceof R))throw new TypeError("Cannot call a class as a function")}function ce(z,R){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:z}function he(z,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);z.prototype=Object.create(R&&R.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(z,R):z.__proto__=R)}function V(){}var ve=function(z){he(R,z);function R(){var w,P,le,pe;Z(this,R);for(var ye=arguments.length,Ee=Array(ye),Oe=0;Oe<ye;Oe++)Ee[Oe]=arguments[Oe];return pe=(P=(le=ce(this,(w=R.__proto__||Object.getPrototypeOf(R)).call.apply(w,[this].concat(Ee))),le),le.saveUploader=function(ae){le.uploader=ae},P),ce(le,pe)}return H(R,[{key:"abort",value:function(P){this.uploader.abort(P)}},{key:"render",value:function(){return i.a.createElement(N,F({},this.props,{ref:this.saveUploader}))}}]),R}(f.Component);ve.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:V,onError:V,onSuccess:V,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var ne=ve,W=G.a=ne},Gytx:function(a,G){a.exports=function(f,i,O,C){var x=O?O.call(C,f,i):void 0;if(x!==void 0)return!!x;if(f===i)return!0;if(typeof f!="object"||!f||typeof i!="object"||!i)return!1;var m=Object.keys(f),h=Object.keys(i);if(m.length!==h.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(i),l=0;l<m.length;l++){var u=m[l];if(!s(u))return!1;var o=f[u],g=i[u];if(x=O?O.call(C,o,g,u):void 0,x===!1||x===void 0&&o!==g)return!1}return!0}},HmJG:function(a,G,d){},Ib8C:function(a,G,d){(function(f){(function(i,O){a.exports=G=O()})(this,function(){var i=i||function(O,C){var x;if(typeof window!="undefined"&&window.crypto&&(x=window.crypto),typeof self!="undefined"&&self.crypto&&(x=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(x=globalThis.crypto),!x&&typeof window!="undefined"&&window.msCrypto&&(x=window.msCrypto),!x&&typeof f!="undefined"&&f.crypto&&(x=f.crypto),!x&&!0)try{x=d(4)}catch(M){}var m=function(){if(x){if(typeof x.getRandomValues=="function")try{return x.getRandomValues(new Uint32Array(1))[0]}catch(M){}if(typeof x.randomBytes=="function")try{return x.randomBytes(4).readInt32LE()}catch(M){}}throw new Error("Native crypto module could not be used to get secure random number.")},h=Object.create||function(){function M(){}return function(I){var j;return M.prototype=I,j=new M,M.prototype=null,j}}(),s={},l=s.lib={},u=l.Base=function(){return{extend:function(M){var I=h(this);return M&&I.mixIn(M),(!I.hasOwnProperty("init")||this.init===I.init)&&(I.init=function(){I.$super.init.apply(this,arguments)}),I.init.prototype=I,I.$super=this,I},create:function(){var M=this.extend();return M.init.apply(M,arguments),M},init:function(){},mixIn:function(M){for(var I in M)M.hasOwnProperty(I)&&(this[I]=M[I]);M.hasOwnProperty("toString")&&(this.toString=M.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=l.WordArray=u.extend({init:function(M,I){M=this.words=M||[],I!=C?this.sigBytes=I:this.sigBytes=M.length*4},toString:function(M){return(M||p).stringify(this)},concat:function(M){var I=this.words,j=M.words,D=this.sigBytes,y=M.sigBytes;if(this.clamp(),D%4)for(var J=0;J<y;J++){var X=j[J>>>2]>>>24-J%4*8&255;I[D+J>>>2]|=X<<24-(D+J)%4*8}else for(var N=0;N<y;N+=4)I[D+N>>>2]=j[N>>>2];return this.sigBytes+=y,this},clamp:function(){var M=this.words,I=this.sigBytes;M[I>>>2]&=4294967295<<32-I%4*8,M.length=O.ceil(I/4)},clone:function(){var M=u.clone.call(this);return M.words=this.words.slice(0),M},random:function(M){for(var I=[],j=0;j<M;j+=4)I.push(m());return new o.init(I,M)}}),g=s.enc={},p=g.Hex={stringify:function(M){for(var I=M.words,j=M.sigBytes,D=[],y=0;y<j;y++){var J=I[y>>>2]>>>24-y%4*8&255;D.push((J>>>4).toString(16)),D.push((J&15).toString(16))}return D.join("")},parse:function(M){for(var I=M.length,j=[],D=0;D<I;D+=2)j[D>>>3]|=parseInt(M.substr(D,2),16)<<24-D%8*4;return new o.init(j,I/2)}},v=g.Latin1={stringify:function(M){for(var I=M.words,j=M.sigBytes,D=[],y=0;y<j;y++){var J=I[y>>>2]>>>24-y%4*8&255;D.push(String.fromCharCode(J))}return D.join("")},parse:function(M){for(var I=M.length,j=[],D=0;D<I;D++)j[D>>>2]|=(M.charCodeAt(D)&255)<<24-D%4*8;return new o.init(j,I)}},_=g.Utf8={stringify:function(M){try{return decodeURIComponent(escape(v.stringify(M)))}catch(I){throw new Error("Malformed UTF-8 data")}},parse:function(M){return v.parse(unescape(encodeURIComponent(M)))}},S=l.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(M){typeof M=="string"&&(M=_.parse(M)),this._data.concat(M),this._nDataBytes+=M.sigBytes},_process:function(M){var I,j=this._data,D=j.words,y=j.sigBytes,J=this.blockSize,X=J*4,N=y/X;M?N=O.ceil(N):N=O.max((N|0)-this._minBufferSize,0);var F=N*J,H=O.min(F*4,y);if(F){for(var Z=0;Z<F;Z+=J)this._doProcessBlock(D,Z);I=D.splice(0,F),j.sigBytes-=H}return new o.init(I,H)},clone:function(){var M=u.clone.call(this);return M._data=this._data.clone(),M},_minBufferSize:0}),k=l.Hasher=S.extend({cfg:u.extend(),init:function(M){this.cfg=this.cfg.extend(M),this.reset()},reset:function(){S.reset.call(this),this._doReset()},update:function(M){return this._append(M),this._process(),this},finalize:function(M){M&&this._append(M);var I=this._doFinalize();return I},blockSize:512/32,_createHelper:function(M){return function(I,j){return new M.init(j).finalize(I)}},_createHmacHelper:function(M){return function(I,j){return new T.HMAC.init(M,j).finalize(I)}}}),T=s.algo={};return s}(Math);return i})}).call(this,d("IyRk"))},J66h:function(a,G,d){(function(f){var i,O;(function(C,x){a.exports=x(C)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof f!="undefined"?f:this,function(C){"use strict";C=C||{};var x=C.Base64,m="2.6.4",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(V){for(var ve={},ne=0,W=V.length;ne<W;ne++)ve[V.charAt(ne)]=ne;return ve}(h),l=String.fromCharCode,u=function(V){if(V.length<2){var ve=V.charCodeAt(0);return ve<128?V:ve<2048?l(192|ve>>>6)+l(128|ve&63):l(224|ve>>>12&15)+l(128|ve>>>6&63)+l(128|ve&63)}else{var ve=65536+(V.charCodeAt(0)-55296)*1024+(V.charCodeAt(1)-56320);return l(240|ve>>>18&7)+l(128|ve>>>12&63)+l(128|ve>>>6&63)+l(128|ve&63)}},o=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,g=function(V){return V.replace(o,u)},p=function(V){var ve=[0,2,1][V.length%3],ne=V.charCodeAt(0)<<16|(V.length>1?V.charCodeAt(1):0)<<8|(V.length>2?V.charCodeAt(2):0),W=[h.charAt(ne>>>18),h.charAt(ne>>>12&63),ve>=2?"=":h.charAt(ne>>>6&63),ve>=1?"=":h.charAt(ne&63)];return W.join("")},v=C.btoa&&typeof C.btoa=="function"?function(V){return C.btoa(V)}:function(V){if(V.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return V.replace(/[\s\S]{1,3}/g,p)},_=function(V){return v(g(String(V)))},S=function(V){return V.replace(/[+\/]/g,function(ve){return ve=="+"?"-":"_"}).replace(/=/g,"")},k=function(V,ve){return ve?S(_(V)):_(V)},T=function(V){return k(V,!0)},M;C.Uint8Array&&(M=function(V,ve){for(var ne="",W=0,z=V.length;W<z;W+=3){var R=V[W],w=V[W+1],P=V[W+2],le=R<<16|w<<8|P;ne+=h.charAt(le>>>18)+h.charAt(le>>>12&63)+(typeof w!="undefined"?h.charAt(le>>>6&63):"=")+(typeof P!="undefined"?h.charAt(le&63):"=")}return ve?S(ne):ne});var I=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,j=function(V){switch(V.length){case 4:var ve=(7&V.charCodeAt(0))<<18|(63&V.charCodeAt(1))<<12|(63&V.charCodeAt(2))<<6|63&V.charCodeAt(3),ne=ve-65536;return l((ne>>>10)+55296)+l((ne&1023)+56320);case 3:return l((15&V.charCodeAt(0))<<12|(63&V.charCodeAt(1))<<6|63&V.charCodeAt(2));default:return l((31&V.charCodeAt(0))<<6|63&V.charCodeAt(1))}},D=function(V){return V.replace(I,j)},y=function(V){var ve=V.length,ne=ve%4,W=(ve>0?s[V.charAt(0)]<<18:0)|(ve>1?s[V.charAt(1)]<<12:0)|(ve>2?s[V.charAt(2)]<<6:0)|(ve>3?s[V.charAt(3)]:0),z=[l(W>>>16),l(W>>>8&255),l(W&255)];return z.length-=[0,0,2,1][ne],z.join("")},J=C.atob&&typeof C.atob=="function"?function(V){return C.atob(V)}:function(V){return V.replace(/\S{1,4}/g,y)},X=function(V){return J(String(V).replace(/[^A-Za-z0-9\+\/]/g,""))},N=function(V){return D(J(V))},F=function(V){return String(V).replace(/[-_]/g,function(ve){return ve=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},H=function(V){return N(F(V))},Z;C.Uint8Array&&(Z=function(V){return Uint8Array.from(X(F(V)),function(ve){return ve.charCodeAt(0)})});var ce=function(){var V=C.Base64;return C.Base64=x,V};if(C.Base64={VERSION:m,atob:X,btoa:v,fromBase64:H,toBase64:k,utob:g,encode:k,encodeURI:T,btou:D,decode:H,noConflict:ce,fromUint8Array:M,toUint8Array:Z},typeof Object.defineProperty=="function"){var he=function(V){return{value:V,enumerable:!1,writable:!0,configurable:!0}};C.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",he(function(){return H(this)})),Object.defineProperty(String.prototype,"toBase64",he(function(V){return k(this,V)})),Object.defineProperty(String.prototype,"toBase64URI",he(function(){return k(this,!0)}))}}return C.Meteor&&(Base64=C.Base64),a.exports?a.exports.Base64=C.Base64:!(i=[],O=function(){return C.Base64}.apply(G,i),O!==void 0&&(a.exports=O)),{Base64:C.Base64}})}).call(this,d("IyRk"))},K3mO:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("3y9D"),d("WYAk"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.Base,x=O.WordArray,m=i.algo,h=m.MD5,s=m.EvpKDF=C.extend({cfg:C.extend({keySize:128/32,hasher:h,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,u){for(var o,g=this.cfg,p=g.hasher.create(),v=x.create(),_=v.words,S=g.keySize,k=g.iterations;_.length<S;){o&&p.update(o),o=p.update(l).finalize(u),p.reset();for(var T=1;T<k;T++)o=p.finalize(o),p.reset();v.concat(o)}return v.sigBytes=S*4,v}});i.EvpKDF=function(l,u,o){return s.create(o).compute(l,u)}}(),f.EvpKDF})},KhGG:function(a,G,d){"use strict";d.d(G,"a",function(){return y}),d.d(G,"c",function(){return X});var f=d("0Owb"),i=d("miYZ"),O=d("tsqr"),C=d("oBTY"),x=d("tJVT"),m=d("PpiC"),h=d("k1fw"),s=d("9og8"),l=d("DZo9"),u=d("8z0m"),o=d("WmNS"),g=d.n(o),p=d("q1tI"),v=d.n(p),_=d("ErOA"),S=d("NFKh"),k=d.n(S),T=d("7Cbv"),M=d("9kvl"),I=d("mxV5"),j=d.n(I),D=u.a.Dragger,y=function(H){var Z="bf3c199c2470cb477d907b1e0917c17b",ce="5183666c72eec9e4",he=k.a.enc.Utf8.parse(Z),V=k.a.enc.Utf8.parse(ce),ve=k.a.AES.decrypt(H,he,{iv:V,mode:k.a.mode.CBC});return ve.toString(k.a.enc.Utf8)},J,X=function(){var F=Object(s.a)(g.a.mark(function H(Z,ce,he){var V,ve,ne,W,z,R,w,P,le;return g.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return ce.file_name=Z.name,ye.next=3,Object(_.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return w=ye.sent,console.log("decrypt(res.data):",y(w.data)),w.data=JSON.parse(y(w.data)),P=Object(T.a)(),le=new j.a({endpoint:w==null||((V=w.data)===null||V===void 0)?void 0:V.end_point,region:w==null||((ve=w.data)===null||ve===void 0)?void 0:ve.region,accessKeyId:w==null||((ne=w.data)===null||ne===void 0)?void 0:ne.access_key_id,accessKeySecret:w==null||((W=w.data)===null||W===void 0)?void 0:W.access_key_secret,bucket:w==null||((z=w.data)===null||z===void 0)?void 0:z.bucket,stsToken:w==null||((R=w.data)===null||R===void 0)?void 0:R.security_token}),ye.abrupt("return",new Promise(function(Ee,Oe){var ae;le.multipartUpload("".concat(P),new Blob([Z],{type:Z.type}),Object(h.a)(Object(h.a)({timeout:200*1e3,partSize:102400},he),{},{callback:{url:w==null||((ae=w.data)===null||ae===void 0)?void 0:ae.callback_url,host:w==null?void 0:w.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(_.e)(ce)}})).then(function(fe){var ge;Z.response=(ge=fe.data)===null||ge===void 0?void 0:ge.data,Ee(fe==null?void 0:fe.data)}).catch(function(fe){Oe(fe),console.log("err:",fe)})}));case 9:case"end":return ye.stop()}},H)}));return function(Z,ce,he){return F.apply(this,arguments)}}(),N=function(H){var Z=H.user,ce=H.cancelUpload,he=Object(m.a)(H,["user","cancelUpload"]),V=Object(p.useState)([]),ve=Object(x.a)(V,2),ne=ve[0],W=ve[1],z=Object(p.useState)(),R=Object(x.a)(z,2),w=R[0],P=R[1],le={onRemove:function(Ee){W(Object(C.a)(ne.filter(function(Oe){return Oe.name!==Ee.name}))),he.onChange(ne.filter(function(Oe){return Oe.name!==Ee.name}))},disabled:he.disabled,multiple:!0,fileList:ne==null?void 0:ne.map(function(ye){return ye.file}),customRequest:function(){},beforeUpload:function(){var ye=Object(s.a)(g.a.mark(function Oe(ae){var fe;return g.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(fe=he.maxSize||1024*1024*1024*1,!ne.filter(function(ie){return ie.name===ae.name}).length){q.next=4;break}return O.b.info("".concat(ae.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),q.abrupt("return");case 4:if(!((ae==null?void 0:ae.size)>fe)){q.next=7;break}return O.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(fe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),q.abrupt("return",!1);case 7:return ne.push({name:ae.name,file:ae}),W(Object(C.a)(ne)),he.onChange(ne),q.abrupt("return",!1);case 11:case"end":return q.stop()}},Oe)}));function Ee(Oe){return ye.apply(this,arguments)}return Ee}()},pe=function(){var ye=Object(s.a)(g.a.mark(function Ee(Oe,ae){var fe,ge,q,ie,$,se,K,Y,Ce;return g.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return ae.file_name=Oe.name,K=Oe.name,B.next=4,Object(_.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Y=B.sent,Y.data=JSON.parse(y(Y.data)),!((Y==null?void 0:Y.status)!==0)){B.next=12;break}return ne[ne.findIndex(function(E){return E.name===K})].status="error",ne[ne.findIndex(function(E){return E.name===K})].file.status="error",he.onChange(ne),O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B.abrupt("return");case 12:return w=new j.a({endpoint:Y==null||((fe=Y.data)===null||fe===void 0)?void 0:fe.end_point,region:Y==null||((ge=Y.data)===null||ge===void 0)?void 0:ge.region,accessKeyId:Y==null||((q=Y.data)===null||q===void 0)?void 0:q.access_key_id,accessKeySecret:Y==null||((ie=Y.data)===null||ie===void 0)?void 0:ie.access_key_secret,bucket:Y==null||(($=Y.data)===null||$===void 0)?void 0:$.bucket,stsToken:Y==null||((se=Y.data)===null||se===void 0)?void 0:se.security_token}),console.log(Oe,"file"),P(w),Ce=Object(T.a)(),B.abrupt("return",new Promise(function(E,U){try{var xe;w.multipartUpload("".concat(he.identifier,"/").concat(Ce).concat(K.indexOf(".")>-1?"."+K.split(".").pop():""),new Blob([Oe.file],{type:Oe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Te,Fe,Be){try{console.log("\u8FDB\u5EA6",Te,Fe,Be);var Ue=ne.findIndex(function(ze){return ze.name===K});ne[Ue].file.percent=Te*100,ne[Ue].tempCheckpoint=Fe,W(Object(C.a)(ne))}catch(ze){}},checkpoint:ne[ne.findIndex(function(be){return be.name===K})].tempCheckpoint,callback:{customValue:{id:K+""},url:Y==null||((xe=Y.data)===null||xe===void 0)?void 0:xe.callback_url,host:Y==null?void 0:Y.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(_.e)(ae)}}).then(function(be){var Te,Fe=ne.findIndex(function(Xe){return Xe.name===K}),Be="done";if(((Te=be.data)===null||Te===void 0?void 0:Te.status)===0){var Ue;Oe.response=(Ue=be.data)===null||Ue===void 0?void 0:Ue.data;var ze=ne.findIndex(function(Xe){return Xe.name===K});ne[ze].status="done",ne[ze].file.status="done"}else{var Ve;O.b.warn((Ve=be.data)===null||Ve===void 0?void 0:Ve.message),Be="error"}ne[Fe].status=Be,ne[Fe].file.status=Be,he.onChange(ne),E(be==null?void 0:be.data)}).catch(function(be){ne[ne.findIndex(function(Te){return Te.name===K})].status="error",ne[ne.findIndex(function(Te){return Te.name===K})].file.status="error",O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),W(Object(C.a)(ne)),he.onChange(ne),U(be),console.log("err:",be)})}catch(be){}}));case 17:case"end":return B.stop()}},Ee)}));return function(Oe,ae){return ye.apply(this,arguments)}}();return Object(p.useEffect)(function(){ne.every(function(ye){return ye==="done"||ye==="error"})&&he.onComplete(ne)},[ne]),Object(p.useEffect)(function(){if(ce){var ye;(ye=w)===null||ye===void 0||ye.cancel()}},[ce]),Object(p.useEffect)(function(){he.uploading&&ne.map(function(){var ye=Object(s.a)(g.a.mark(function Ee(Oe){var ae,fe;return g.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(!((!Oe.status||Oe.status==="error")&&!ce)){q.next=6;break}return Oe.status="uploading",Oe.file.status="uploading",q.next=5,pe(Oe,{login:Z==null||((ae=Z.userInfo)===null||ae===void 0)?void 0:ae.login,container_type:he.container_type,container_id:he.container_id,description:he.description});case 5:fe=q.sent;case 6:case"end":return q.stop()}},Ee)}));return function(Ee){return ye.apply(this,arguments)}}())},[he.uploading]),v.a.createElement(D,Object(f.a)({},le,{height:he.height,className:he.className}),v.a.createElement("p",{className:"ant-upload-hint"},he.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};G.b=Object(M.a)(function(F){var H=F.loading,Z=F.globalSetting,ce=F.user;return{globalSetting:Z,loading:H.models.competitions,user:ce}})(N)},KmYQ:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.pad.ZeroPadding={pad:function(i,O){var C=O*4;i.clamp(),i.sigBytes+=C-(i.sigBytes%C||C)},unpad:function(i){for(var O=i.words,C=i.sigBytes-1,C=i.sigBytes-1;C>=0;C--)if(O[C>>>2]>>>24-C%4*8&255){i.sigBytes=C+1;break}}},f.pad.ZeroPadding})},LdHM:function(a,G,d){"use strict";d.d(G,"b",function(){return I}),d.d(G,"a",function(){return D});var f=d("1OyB"),i=d("vuIU"),O=d("Ji7U"),C=d("LK+K"),x=d("q1tI"),m=d("rePB"),h=d("Ff2n"),s=d("ODXe"),l=d("4IlW"),u=d("bX4T"),o=d("YrtM"),g=d("TSYQ"),p=d.n(g),v=d("+nKL"),_=d("8OUc"),S=function(P,le){var pe=P.prefixCls,ye=P.id,Ee=P.flattenOptions,Oe=P.childrenAsData,ae=P.values,fe=P.searchValue,ge=P.multiple,q=P.defaultActiveFirstOption,ie=P.height,$=P.itemHeight,se=P.notFoundContent,K=P.open,Y=P.menuItemSelectedIcon,Ce=P.virtual,Q=P.onSelect,B=P.onToggleOpen,E=P.onActiveValue,U=P.onScroll,xe=P.onMouseEnter,be="".concat(pe,"-item"),Te=Object(o.a)(function(){return Ee},[K,Ee],function($e,je){return je[0]&&$e[1]!==je[1]}),Fe=x.useRef(null),Be=function(je){je.preventDefault()},Ue=function(je){Fe.current&&Fe.current.scrollTo({index:je})},ze=function(je){for(var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ie=Te.length,_e=0;_e<Ie;_e+=1){var Se=(je+_e*Me+Ie)%Ie,ke=Te[Se],Re=ke.group,He=ke.data;if(!Re&&!He.disabled)return Se}return-1},Ve=x.useState(function(){return ze(0)}),Xe=Object(s.a)(Ve,2),Je=Xe[0],Ne=Xe[1],tt=function(je){Ne(je);var Me=Te[je];if(!Me){E(null,-1);return}E(Me.data.value,je)};x.useEffect(function(){tt(q!==!1?ze(0):-1)},[Te.length,fe]),x.useEffect(function(){var $e=setTimeout(function(){if(!ge&&K&&ae.size===1){var je=Array.from(ae)[0],Me=Te.findIndex(function(Ie){var _e=Ie.data;return _e.value===je});tt(Me),Ue(Me)}});return function(){return clearTimeout($e)}},[K]);var nt=function(je){je!==void 0&&Q(je,{selected:!ae.has(je)}),ge||B(!1)};if(x.useImperativeHandle(le,function(){return{onKeyDown:function(je){var Me=je.which;switch(Me){case l.a.UP:case l.a.DOWN:{var Ie=0;if(Me===l.a.UP?Ie=-1:Me===l.a.DOWN&&(Ie=1),Ie!==0){var _e=ze(Je+Ie,Ie);Ue(_e),tt(_e)}break}case l.a.ENTER:{var Se=Te[Je];Se&&!Se.data.disabled?nt(Se.data.value):nt(void 0),K&&je.preventDefault();break}case l.a.ESC:B(!1)}},onKeyUp:function(){},scrollTo:function(je){Ue(je)}}}),Te.length===0)return x.createElement("div",{role:"listbox",id:"".concat(ye,"_list"),className:"".concat(be,"-empty"),onMouseDown:Be},se);function Ke($e){var je=Te[$e];if(!je)return null;var Me=je.data||{},Ie=Me.value,_e=Me.label,Se=Me.children,ke=Object(u.a)(Me,!0),Re=Oe?Se:_e;return je?x.createElement("div",Object.assign({"aria-label":typeof Re=="string"?Re:null},ke,{key:$e,role:"option",id:"".concat(ye,"_list_").concat($e),"aria-selected":ae.has(Ie)}),Ie):null}return x.createElement(x.Fragment,null,x.createElement("div",{role:"listbox",id:"".concat(ye,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ke(Je-1),Ke(Je),Ke(Je+1)),x.createElement(v.a,{itemKey:"key",ref:Fe,data:Te,height:ie,itemHeight:$,fullHeight:!1,onMouseDown:Be,onScroll:U,virtual:Ce,onMouseEnter:xe},function($e,je){var Me,Ie=$e.group,_e=$e.groupOption,Se=$e.data,ke=Se.label,Re=Se.key;if(Ie)return x.createElement("div",{className:p()(be,"".concat(be,"-group"))},ke!==void 0?ke:Re);var He=Se.disabled,Ae=Se.value,Ye=Se.title,it=Se.children,lt=Se.style,ut=Se.className,ct=Object(h.a)(Se,["disabled","value","title","children","style","className"]),xt=ae.has(Ae),dt="".concat(be,"-option"),kt=p()(be,dt,ut,(Me={},Object(m.a)(Me,"".concat(dt,"-grouped"),_e),Object(m.a)(Me,"".concat(dt,"-active"),Je===je&&!He),Object(m.a)(Me,"".concat(dt,"-disabled"),He),Object(m.a)(Me,"".concat(dt,"-selected"),xt),Me)),zt=Oe?it:ke,Vt=!Y||typeof Y=="function"||xt;return x.createElement("div",Object.assign({},ct,{"aria-selected":xt,className:kt,title:Ye,onMouseMove:function(){if(Je===je||He)return;tt(je)},onClick:function(){He||nt(Ae)},style:lt}),x.createElement("div",{className:"".concat(dt,"-content")},zt||Ae),x.isValidElement(Y)||xt,Vt&&x.createElement(_.a,{className:"".concat(be,"-option-state"),customizeIcon:Y,customizeIconProps:{isSelected:xt}},xt?"\u2713":null))}))},k=x.forwardRef(S);k.displayName="OptionList";var T=k,M=function(){return null};M.isSelectOption=!0;var I=M,j=function(){return null};j.isSelectOptGroup=!0;var D=j,y=d("VTBJ"),J=d("Zm9Q");function X(w){var P=w.key,le=w.props,pe=le.children,ye=le.value,Ee=Object(h.a)(le,["children","value"]);return Object(y.a)({key:P,value:ye!==void 0?ye:P,children:pe},Ee)}function N(w){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(J.a)(w).map(function(le,pe){if(!x.isValidElement(le)||!le.type)return null;var ye=le.type.isSelectOptGroup,Ee=le.key,Oe=le.props,ae=Oe.children,fe=Object(h.a)(Oe,["children"]);return P||!ye?X(le):Object(y.a)(Object(y.a)({key:"__RC_SELECT_GRP__".concat(Ee===null?pe:Ee,"__"),label:Ee},fe),{},{options:N(ae)})}).filter(function(le){return le})}var F=d("2Qr1"),H=d("qNPg"),Z=d("U8pU"),ce=d("Kwbf"),he=d("WKfj");function V(w){var P=w.mode,le=w.options,pe=w.children,ye=w.backfill,Ee=w.allowClear,Oe=w.placeholder,ae=w.getInputElement,fe=w.showSearch,ge=w.onSearch,q=w.defaultOpen,ie=w.autoFocus,$=w.labelInValue,se=w.value,K=w.inputValue,Y=w.optionLabelProp,Ce=P==="multiple"||P==="tags",Q=fe!==void 0?fe:Ce||P==="combobox",B=le||N(pe);if(Object(ce.a)(P!=="tags"||B.every(function(be){return!be.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),P==="tags"||P==="combobox"){var E=B.some(function(be){return be.options?be.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in be?be.value:be.key)=="number"});Object(ce.a)(!E,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(ce.a)(P!=="combobox"||!Y,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(ce.a)(P==="combobox"||!ye,"`backfill` only works with `combobox` mode."),Object(ce.a)(P==="combobox"||!ae,"`getInputElement` only work with `combobox` mode."),Object(ce.b)(P!=="combobox"||!ae||!Ee||!Oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ge&&!Q&&P!=="combobox"&&P!=="tags"&&Object(ce.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(ce.b)(!q||ie,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),se!=null){var U=Object(he.d)(se);Object(ce.a)(!$||U.every(function(be){return Object(Z.a)(be)==="object"&&("key"in be||"value"in be)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(ce.a)(!Ce||Array.isArray(se),"`value` should be array when `mode` is `multiple` or `tags`")}if(pe){var xe=null;Object(J.a)(pe).some(function(be){if(!x.isValidElement(be)||!be.type)return!1;var Te=be.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var Fe=Object(J.a)(be.props.children).every(function(Be){return!x.isValidElement(Be)||!be.type||Be.type.isSelectOption?!0:(xe=Be.type,!1)});return!Fe}return xe=Te,!0}),xe&&Object(ce.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(xe.displayName||xe.name||xe,"`.")),Object(ce.a)(K===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var ve=V,ne=Object(H.a)({prefixCls:"rc-select",components:{optionList:T},convertChildrenToData:N,flattenOptions:F.d,getLabeledValue:F.e,filterOptions:F.b,isValueDisabled:F.g,findValueOption:F.c,warningProps:ve,fillOptionsWithMissingValue:F.a}),W=function(w){Object(O.a)(le,w);var P=Object(C.a)(le);function le(){var pe;return Object(f.a)(this,le),pe=P.apply(this,arguments),pe.selectRef=x.createRef(),pe.focus=function(){pe.selectRef.current.focus()},pe.blur=function(){pe.selectRef.current.blur()},pe}return Object(i.a)(le,[{key:"render",value:function(){return x.createElement(ne,Object.assign({ref:this.selectRef},this.props))}}]),le}(x.Component);W.Option=I,W.OptGroup=D;var z=W,R=G.c=z},M8RZ:function(a,G,d){"use strict";d.d(G,"a",function(){return l});var f=d("fWQN"),i=d("mtLc"),O=d("yKVA"),C=d("879j"),x=d("q1tI"),m=d.n(x),h=d("i8i4"),s=d.n(h),l=function(u){Object(O.a)(g,u);var o=Object(C.a)(g);function g(p){var v;Object(f.a)(this,g),v=o.call(this,p);var _=window.document;return v.node=_.createElement("div"),_.body.appendChild(v.node),v}return Object(i.a)(g,[{key:"render",value:function(){var v=this.props.children;return Object(h.createPortal)(v,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),g}(m.a.Component)},MFOe:function(a,G,d){(function(f){var i=m(),O=h(),C=s(),x=typeof window!="undefined"?window:f;a.exports={assign:i,create:O,trim:C,bind:l,slice:u,each:o,map:g,pluck:p,isList:v,isFunction:_,isObject:S,Global:x};function m(){return Object.assign?Object.assign:function(T,M,I,j){for(var D=1;D<arguments.length;D++)o(Object(arguments[D]),function(y,J){T[J]=y});return T}}function h(){if(Object.create)return function(M,I,j,D){var y=u(arguments,1);return i.apply(this,[Object.create(M)].concat(y))};{function k(){}return function(M,I,j,D){var y=u(arguments,1);return k.prototype=M,i.apply(this,[new k].concat(y))}}}function s(){return String.prototype.trim?function(T){return String.prototype.trim.call(T)}:function(T){return T.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function l(k,T){return function(){return T.apply(k,Array.prototype.slice.call(arguments,0))}}function u(k,T){return Array.prototype.slice.call(k,T||0)}function o(k,T){p(k,function(M,I){return T(M,I),!1})}function g(k,T){var M=v(k)?[]:{};return p(k,function(I,j){return M[j]=T(I,j),!1}),M}function p(k,T){if(v(k)){for(var M=0;M<k.length;M++)if(T(k[M],M))return k[M]}else for(var I in k)if(k.hasOwnProperty(I)&&T(k[I],I))return k[I]}function v(k){return k!=null&&typeof k!="function"&&typeof k.length=="number"}function _(k){return k&&{}.toString.call(k)==="[object Function]"}function S(k){return k&&{}.toString.call(k)==="[object Object]"}}).call(this,d("IyRk"))},MlIO:function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){return function(i){var O=f,C=O.lib,x=C.Base,m=C.WordArray,h=O.x64={},s=h.Word=x.extend({init:function(u,o){this.high=u,this.low=o}}),l=h.WordArray=x.extend({init:function(u,o){u=this.words=u||[],o!=i?this.sigBytes=o:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,o=u.length,g=[],p=0;p<o;p++){var v=u[p];g.push(v.high),g.push(v.low)}return m.create(g,this.sigBytes)},clone:function(){for(var u=x.clone.call(this),o=u.words=this.words.slice(0),g=o.length,p=0;p<g;p++)o[p]=o[p].clone();return u}})}(),f})},NFKh:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("MlIO"),d("F+F2"),d("qM6L"),d("ETIr"),d("wbyO"),d("cv67"),d("3y9D"),d("lPiR"),d("GRuw"),d("1uat"),d("uGsb"),d("5hvy"),d("ELcG"),d("WYAk"),d("e7zE"),d("K3mO"),d("OLod"),d("ALsQ"),d("9OqN"),d("qu8F"),d("S6kV"),d("gb/T"),d("qBft"),d("oRuE"),d("jO9C"),d("KmYQ"),d("uGxW"),d("bQjk"),d("wZgz"),d("pA7S"),d("w7YG"),d("E4JC"),d("PVpz"))})(this,function(f){return f})},NvD2:function(a,G,d){"use strict";d.d(G,"a",function(){return m});var f=d("Kwbf");function i(h,s){var l=new Set;return h.forEach(function(u){s.has(u)||l.add(u)}),l}function O(h){var s=h||{},l=s.disabled,u=s.disableCheckbox,o=s.checkable;return!!(l||u)||o===!1}function C(h,s,l,u){for(var o=new Set(h),g=new Set,p=0;p<=l;p+=1){var v=s.get(p)||new Set;v.forEach(function(T){var M=T.key,I=T.node,j=T.children,D=j===void 0?[]:j;o.has(M)&&!u(I)&&D.filter(function(y){return!u(y.node)}).forEach(function(y){o.add(y.key)})})}for(var _=new Set,S=l;S>=0;S-=1){var k=s.get(S)||new Set;k.forEach(function(T){var M=T.parent,I=T.node;if(u(I)||!T.parent||_.has(T.parent.key))return;if(u(T.parent.node)){_.add(M.key);return}var j=!0,D=!1;(M.children||[]).filter(function(y){return!u(y.node)}).forEach(function(y){var J=y.key,X=o.has(J);j&&!X&&(j=!1),!D&&(X||g.has(J))&&(D=!0)}),j&&o.add(M.key),D&&g.add(M.key),_.add(M.key)})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(g,o))}}function x(h,s,l,u,o){for(var g=new Set(h),p=new Set(s),v=0;v<=u;v+=1){var _=l.get(v)||new Set;_.forEach(function(M){var I=M.key,j=M.node,D=M.children,y=D===void 0?[]:D;!g.has(I)&&!p.has(I)&&!o(j)&&y.filter(function(J){return!o(J.node)}).forEach(function(J){g.delete(J.key)})})}p=new Set;for(var S=new Set,k=u;k>=0;k-=1){var T=l.get(k)||new Set;T.forEach(function(M){var I=M.parent,j=M.node;if(o(j)||!M.parent||S.has(M.parent.key))return;if(o(M.parent.node)){S.add(I.key);return}var D=!0,y=!1;(I.children||[]).filter(function(J){return!o(J.node)}).forEach(function(J){var X=J.key,N=g.has(X);D&&!N&&(D=!1),!y&&(N||p.has(X))&&(y=!0)}),D||g.delete(I.key),y&&p.add(I.key),S.add(I.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(i(p,g))}}function m(h,s,l,u){var o=[],g;u?g=u:g=O;var p=new Set(h.filter(function(k){var T=!!l[k];return T||o.push(k),T})),v=new Map,_=0;Object.keys(l).forEach(function(k){var T=l[k],M=T.level,I=v.get(M);I||(I=new Set,v.set(M,I)),I.add(T),_=Math.max(_,M)}),Object(f.a)(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(k){return"'".concat(k,"'")}).join(", ")));var S;return s===!0?S=C(p,v,_,g):S=x(p,s.halfCheckedKeys,v,_,g),S}},OLES:function(a,G,d){"use strict";var f=d("U8pU"),i=d("VTBJ"),O=d("Ff2n"),C=d("q1tI"),x=d("uciX"),m=d("7ixt"),h=function(p){var v=p.overlay,_=p.prefixCls,S=p.id,k=p.overlayInnerStyle;return C.createElement("div",{className:"".concat(_,"-inner"),id:S,role:"tooltip",style:k},typeof v=="function"?v():v)},s=h,l=function(p,v){var _=p.overlayClassName,S=p.trigger,k=S===void 0?["hover"]:S,T=p.mouseEnterDelay,M=T===void 0?0:T,I=p.mouseLeaveDelay,j=I===void 0?.1:I,D=p.overlayStyle,y=p.prefixCls,J=y===void 0?"rc-tooltip":y,X=p.children,N=p.onVisibleChange,F=p.afterVisibleChange,H=p.transitionName,Z=p.animation,ce=p.placement,he=ce===void 0?"right":ce,V=p.align,ve=V===void 0?{}:V,ne=p.destroyTooltipOnHide,W=ne===void 0?!1:ne,z=p.defaultVisible,R=p.getTooltipContainer,w=p.overlayInnerStyle,P=Object(O.a)(p,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),le=Object(C.useRef)(null);Object(C.useImperativeHandle)(v,function(){return le.current});var pe=Object(i.a)({},P);"visible"in p&&(pe.popupVisible=p.visible);var ye=function(){var ge=p.arrowContent,q=ge===void 0?null:ge,ie=p.overlay,$=p.id;return[C.createElement("div",{className:"".concat(J,"-arrow"),key:"arrow"},q),C.createElement(s,{key:"content",prefixCls:J,id:$,overlay:ie,overlayInnerStyle:w})]},Ee=!1,Oe=!1;if(typeof W=="boolean")Ee=W;else if(W&&Object(f.a)(W)==="object"){var ae=W.keepParent;Ee=ae===!0,Oe=ae===!1}return C.createElement(x.a,Object.assign({popupClassName:_,prefixCls:J,popup:ye,action:k,builtinPlacements:m.a,popupPlacement:he,ref:le,popupAlign:ve,getPopupContainer:R,onPopupVisibleChange:N,afterPopupVisibleChange:F,popupTransitionName:H,popupAnimation:Z,defaultPopupVisible:z,destroyPopupOnHide:Ee,autoDestroy:Oe,mouseLeaveDelay:j,popupStyle:D,mouseEnterDelay:M},pe),X)},u=Object(C.forwardRef)(l),o=G.a=u},OLod:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("K3mO"))})(this,function(f){f.lib.Cipher||function(i){var O=f,C=O.lib,x=C.Base,m=C.WordArray,h=C.BufferedBlockAlgorithm,s=O.enc,l=s.Utf8,u=s.Base64,o=O.algo,g=o.EvpKDF,p=C.Cipher=h.extend({cfg:x.extend(),createEncryptor:function(H,Z){return this.create(this._ENC_XFORM_MODE,H,Z)},createDecryptor:function(H,Z){return this.create(this._DEC_XFORM_MODE,H,Z)},init:function(H,Z,ce){this.cfg=this.cfg.extend(ce),this._xformMode=H,this._key=Z,this.reset()},reset:function(){h.reset.call(this),this._doReset()},process:function(H){return this._append(H),this._process()},finalize:function(H){H&&this._append(H);var Z=this._doFinalize();return Z},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function H(Z){return typeof Z=="string"?F:J}return function(Z){return{encrypt:function(ce,he,V){return H(he).encrypt(Z,ce,he,V)},decrypt:function(ce,he,V){return H(he).decrypt(Z,ce,he,V)}}}}()}),v=C.StreamCipher=p.extend({_doFinalize:function(){var H=this._process(!0);return H},blockSize:1}),_=O.mode={},S=C.BlockCipherMode=x.extend({createEncryptor:function(H,Z){return this.Encryptor.create(H,Z)},createDecryptor:function(H,Z){return this.Decryptor.create(H,Z)},init:function(H,Z){this._cipher=H,this._iv=Z}}),k=_.CBC=function(){var H=S.extend();H.Encryptor=H.extend({processBlock:function(ce,he){var V=this._cipher,ve=V.blockSize;Z.call(this,ce,he,ve),V.encryptBlock(ce,he),this._prevBlock=ce.slice(he,he+ve)}}),H.Decryptor=H.extend({processBlock:function(ce,he){var V=this._cipher,ve=V.blockSize,ne=ce.slice(he,he+ve);V.decryptBlock(ce,he),Z.call(this,ce,he,ve),this._prevBlock=ne}});function Z(ce,he,V){var ve,ne=this._iv;ne?(ve=ne,this._iv=i):ve=this._prevBlock;for(var W=0;W<V;W++)ce[he+W]^=ve[W]}return H}(),T=O.pad={},M=T.Pkcs7={pad:function(H,Z){for(var ce=Z*4,he=ce-H.sigBytes%ce,V=he<<24|he<<16|he<<8|he,ve=[],ne=0;ne<he;ne+=4)ve.push(V);var W=m.create(ve,he);H.concat(W)},unpad:function(H){var Z=H.words[H.sigBytes-1>>>2]&255;H.sigBytes-=Z}},I=C.BlockCipher=p.extend({cfg:p.cfg.extend({mode:k,padding:M}),reset:function(){var H;p.reset.call(this);var Z=this.cfg,ce=Z.iv,he=Z.mode;this._xformMode==this._ENC_XFORM_MODE?H=he.createEncryptor:(H=he.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==H?this._mode.init(this,ce&&ce.words):(this._mode=H.call(he,this,ce&&ce.words),this._mode.__creator=H)},_doProcessBlock:function(H,Z){this._mode.processBlock(H,Z)},_doFinalize:function(){var H,Z=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(Z.pad(this._data,this.blockSize),H=this._process(!0)):(H=this._process(!0),Z.unpad(H)),H},blockSize:128/32}),j=C.CipherParams=x.extend({init:function(H){this.mixIn(H)},toString:function(H){return(H||this.formatter).stringify(this)}}),D=O.format={},y=D.OpenSSL={stringify:function(H){var Z,ce=H.ciphertext,he=H.salt;return he?Z=m.create([1398893684,1701076831]).concat(he).concat(ce):Z=ce,Z.toString(u)},parse:function(H){var Z,ce=u.parse(H),he=ce.words;return he[0]==1398893684&&he[1]==1701076831&&(Z=m.create(he.slice(2,4)),he.splice(0,4),ce.sigBytes-=16),j.create({ciphertext:ce,salt:Z})}},J=C.SerializableCipher=x.extend({cfg:x.extend({format:y}),encrypt:function(H,Z,ce,he){he=this.cfg.extend(he);var V=H.createEncryptor(ce,he),ve=V.finalize(Z),ne=V.cfg;return j.create({ciphertext:ve,key:ce,iv:ne.iv,algorithm:H,mode:ne.mode,padding:ne.padding,blockSize:H.blockSize,formatter:he.format})},decrypt:function(H,Z,ce,he){he=this.cfg.extend(he),Z=this._parse(Z,he.format);var V=H.createDecryptor(ce,he).finalize(Z.ciphertext);return V},_parse:function(H,Z){return typeof H=="string"?Z.parse(H,this):H}}),X=O.kdf={},N=X.OpenSSL={execute:function(H,Z,ce,he){he||(he=m.random(64/8));var V=g.create({keySize:Z+ce}).compute(H,he),ve=m.create(V.words.slice(Z),ce*4);return V.sigBytes=Z*4,j.create({key:V,iv:ve,salt:he})}},F=C.PasswordBasedCipher=J.extend({cfg:J.cfg.extend({kdf:N}),encrypt:function(H,Z,ce,he){he=this.cfg.extend(he);var V=he.kdf.execute(ce,H.keySize,H.ivSize);he.iv=V.iv;var ve=J.encrypt.call(this,H,Z,V.key,he);return ve.mixIn(V),ve},decrypt:function(H,Z,ce,he){he=this.cfg.extend(he),Z=this._parse(Z,he.format);var V=he.kdf.execute(ce,H.keySize,H.ivSize,Z.salt);he.iv=V.iv;var ve=J.decrypt.call(this,H,Z,V.key,he);return ve}})}()})},OZM5:function(a,G,d){"use strict";d.d(G,"b",function(){return u}),d.d(G,"a",function(){return o}),d.d(G,"k",function(){return g}),d.d(G,"h",function(){return p}),d.d(G,"i",function(){return v}),d.d(G,"g",function(){return _}),d.d(G,"c",function(){return S}),d.d(G,"d",function(){return k}),d.d(G,"j",function(){return I}),d.d(G,"e",function(){return j}),d.d(G,"f",function(){return D});var f=d("KQm4"),i=d("U8pU"),O=d("Ff2n"),C=d("q1tI"),x=d.n(C),m=d("Kwbf"),h=d("WaYH"),s=.25,l=2;function u(y,J){var X=y.slice(),N=X.indexOf(J);return N>=0&&X.splice(N,1),X}function o(y,J){var X=y.slice();return X.indexOf(J)===-1&&X.push(J),X}function g(y){return y.split("-")}function p(y,J){return"".concat(y,"-").concat(J)}function v(y){return y&&y.type&&y.type.isTreeNode}function _(y,J){var X=[y],N=J[y];function F(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];H.forEach(function(Z){var ce=Z.key,he=Z.children;X.push(ce),F(he)})}return F(N.children),X}function S(y,J){var X=y.clientY,N=J.selectHandle.getBoundingClientRect(),F=N.top,H=N.bottom,Z=N.height,ce=Math.max(Z*s,l);return X<=F+ce?-1:X>=H-ce?1:0}function k(y,J){if(!y)return;var X=J.multiple;return X?y.slice():y.length?[y[0]]:y}var T=function(J){return J};function M(y,J){if(!y)return[];var X=J||{},N=X.processProps,F=N===void 0?T:N,H=Array.isArray(y)?y:[y];return H.map(function(Z){var ce=Z.children,he=Object(O.a)(Z,["children"]),V=M(ce,J);return x.a.createElement(h.a,Object.assign({},F(he)),V)})}function I(y){if(!y)return null;var J;if(Array.isArray(y))J={checkedKeys:y,halfCheckedKeys:void 0};else if(Object(i.a)(y)==="object")J={checkedKeys:y.checked||void 0,halfCheckedKeys:y.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return J}function j(y,J){var X=new Set;function N(F){if(X.has(F))return;var H=J[F];if(!H)return;X.add(F);var Z=H.parent,ce=H.node;if(ce.disabled)return;Z&&N(Z.key)}return(y||[]).forEach(function(F){N(F)}),Object(f.a)(X)}function D(y){var J={};return Object.keys(y).forEach(function(X){(X.startsWith("data-")||X.startsWith("aria-"))&&(J[X]=y[X])}),J}},Ot1p:function(a,G,d){"use strict";var f=d("2qtc"),i=d("kLXV"),O=d("rAM+"),C=d("miYZ"),x=d("tsqr"),m=d("9og8"),h=d("tJVT"),s=d("jrin"),l=d("WmNS"),u=d.n(l),o=d("q1tI"),g=d.n(o),p=d("VrN/"),v=d.n(p),_=d("bdgK"),S=d("p77/"),k=d("Bd2K"),T=d("ELLl"),M=d("19Vz"),I=d("lZu9"),j=d("+NIl"),D=d("kSUc"),y=d("9Bee"),J=function(Ae){var Ye=Ae.value,it=Ye===void 0?"":Ye,lt=Ae.className,ut=Ae.showTextOnly,ct=Ae.showLines,xt=Ae.style,dt=xt===void 0?{}:xt,kt=Object(o.useMemo)(function(){return""},[it]);return g.a.createElement(g.a.Fragment,null,g.a.createElement("div",{dangerouslySetInnerHTML:{__html:kt}}))},X=d("0Owb"),N=d("dejd"),F=d("C+DQ"),H=d("1vsH"),Z=d("m3rI"),ce=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function he(Ae){var Ye=Ae.onActionCallback,it=Ae.title,lt=Ae.icon,ut=Ae.actionName,ct=Ae.className,xt=ct===void 0?"":ct,dt=Ae.children;function kt(){Ye(ut)}return g.a.createElement("a",{title:it,className:xt,onClick:kt},g.a.createElement("i",{className:"md-iconfont ".concat(lt)}),dt)}var V=function(Ae){var Ye=Ae.watch,it=Ae.showNullButton,lt=Ae.onActionCallback,ut=Ae.fullScreen,ct=Ae.insertTemp,xt=Ae.hidetoolBar,dt=Ae.uuid,kt=Ae.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(H.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(H.E)("_educoder_session"),"&key=").concat(dt,"&api=").concat(encodeURIComponent(Z.a.PROXY_SERVER)));var zt=[].concat(ce,[{title:"".concat(Ye?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ye?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return g.a.createElement("ul",{className:"markdown-toolbar-container"},!xt&&zt.map(function(Vt,Yt){return g.a.createElement("li",{key:Yt},Vt.actionName?g.a.createElement(he,Object(X.a)({},Vt,{onActionCallback:lt})):g.a.createElement("span",{className:"v-line"}))}),it?g.a.createElement("li",null,g.a.createElement(he,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:lt},g.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ct&&g.a.createElement("li",null,g.a.createElement(he,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ct),onActionCallback:lt},g.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),g.a.createElement("li",{className:"btn-full-screen"},g.a.createElement(he,{icon:"".concat(ut?"icon-shrink":"icon-enlarge"),title:ut?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:lt})))},ve=d("M8RZ"),ne=d("+L6B"),W=d("2/Rp"),z=d("y8nQ"),R=d("Vl3Y"),w=d("5NDa"),P=d("5rEg"),le={labelCol:{span:4},wrapperCol:{span:20}},pe=function(Ae){var Ye=Ae.callback,it=Ae.onCancel;function lt(ut){Ye(ut)}return g.a.createElement(R.a,Object(X.a)({},le,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:lt}),g.a.createElement(R.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},g.a.createElement(P.a,null)),g.a.createElement(R.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},g.a.createElement(P.a,null)),g.a.createElement("div",{className:"flex-container flex-end"},g.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(W.a,{type:"ghost",onClick:it},"\u53D6\u6D88")))},ye=d("7ahc"),Ee=d("k1fw"),Oe=d("HmJG"),ae=d("BjJ7"),fe=R.a.useForm,ge={width:280,marginRight:10},q={labelCol:{span:5},wrapperCol:{span:19}},ie=function(Ae){var Ye=Ae.callback,it=Ae.onCancel,lt=fe(),ut=Object(h.a)(lt,1),ct=ut[0],xt=Object(o.useRef)();function dt(Vt){Ye(Object(Ee.a)(Object(Ee.a)({},Vt),{},{name:xt.current}))}function kt(Vt,Yt){ct.setFieldsValue({src:"/api/attachments/".concat(Vt.id,"?type=").concat(Vt.content_type),type:Yt.type})}function zt(Vt){var Yt=Vt.target.files[0];xt.current=Yt.name,se(Yt,kt)}return g.a.createElement(R.a,Object(X.a)({form:ct},q,{className:"upload-image-panel",onFinish:dt}),g.a.createElement(R.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},g.a.createElement("div",{className:"flex-container"},g.a.createElement(R.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},g.a.createElement(P.a,{style:ge})),g.a.createElement($,{onFileChange:zt}))),g.a.createElement(R.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},g.a.createElement(P.a,{style:{width:264}})),g.a.createElement(R.a.Item,{style:{textAlign:"right"}},g.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(W.a,{type:"ghost",onClick:it},"\u53D6\u6D88")))};function $(Ae){var Ye=Ae.onFileChange;return g.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",g.a.createElement("input",{type:"file",onChange:Ye}))}function se(Ae,Ye){if(!Ae)throw new String("\u6CA1\u6709\u6587\u4EF6");var it=new FormData;it.append("editormd-image-file",Ae),it.append("file_param_name","editormd-image-file"),it.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(ut){Ye(JSON.parse(ut.target.responseText),Ae)},!1),lt.addEventListener("error",function(ut){console.error(ut)},!1),lt.open("POST","".concat(ae.a,"/api/attachments.json")),lt.send(it)}var K=d("giR+"),Y=d("fyUT"),Ce=d("7Kak"),Q=d("9yH6"),B=Q.a.Group,E={margin:"0 8px"},U=function(Ae){var Ye=Ae.callback,it=Ae.onCancel;function lt(ut){Ye(ut)}return g.a.createElement(R.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:lt},g.a.createElement("div",{className:"flex-container"},g.a.createElement("span",{style:E},"\u5355\u5143\u683C\u6570\uFF1A"),g.a.createElement("span",{style:E},"\u884C\u6570"),g.a.createElement(R.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},g.a.createElement(Y.a,null)),g.a.createElement("span",{style:E},"\u5217\u6570"),g.a.createElement(R.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},g.a.createElement(Y.a,null))),g.a.createElement("div",{className:"flex-container",style:{marginTop:12}},g.a.createElement("span",{style:E},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),g.a.createElement(R.a.Item,{name:"align"},g.a.createElement(B,null,g.a.createElement(Q.a,{value:"default"},g.a.createElement("i",{className:"fa fa-align-justify"})),g.a.createElement(Q.a,{value:"left"},g.a.createElement("i",{className:"fa fa-align-left"})),g.a.createElement(Q.a,{value:"center"},g.a.createElement("i",{className:"fa fa-align-center"})),g.a.createElement(Q.a,{value:"right"},g.a.createElement("i",{className:"fa fa-align-right"}))))),g.a.createElement("div",{className:"flex-container flex-end"},g.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(W.a,{type:"ghost",onClick:it},"\u53D6\u6D88")))},xe=d("ErOA"),be=d("7Cbv"),Te="link",Fe="upload-image",Be="code-block",Ue="add-table",ze="------------",Ve={default:ze,left:":".concat(ze),center:":".concat(ze,":"),right:"".concat(ze,":")},Xe=d("9VGf"),Je,Ne;function tt(){}var nt=0,Ke=1e4,$e="\u2581",je=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Me(Ae){return/^\d+$/.test(Ae)?"".concat(Ae,"px"):Ae}var Ie=navigator.platform.toUpperCase().indexOf("MAC")>=0,_e=Ie?"Cmd":"Ctrl",Se=["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"],ke=(Je={},Object(s.a)(Je,_e+"-B","bold"),Object(s.a)(Je,_e+"-I","italic"),Je),Re=(Ne={},Object(s.a)(Ne,Te,"\u6DFB\u52A0\u94FE\u63A5"),Object(s.a)(Ne,Be,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(s.a)(Ne,Fe,"\u6DFB\u52A0\u6587\u4EF6"),Object(s.a)(Ne,Ue,"\u6DFB\u52A0\u8868\u683C"),Ne),He=G.a=function(Ae){var Ye=Ae.defaultValue,it=Ye===void 0?"":Ye,lt=Ae.onChange,ut=Ae.width,ct=ut===void 0?"100%":ut,xt=Ae.height,dt=xt===void 0?400:xt,kt=Ae.miniToolbar,zt=kt===void 0?!1:kt,Vt=Ae.isFocus,Yt=Vt===void 0?!1:Vt,It=Ae.watch,Ut=Ae.insertTemp,jr=Ae.mode,Tt=jr===void 0?"markdown":jr,Rr=Ae.id,Jt=Rr===void 0?"markdown-editor-id":Rr,rr=Ae.showResizeBar,dr=rr===void 0?!1:rr,mr=Ae.noStorage,Lr=mr===void 0?!1:mr,Ft=Ae.showNullButton,pt=Ft===void 0?!1:Ft,Xt=Ae.hidetoolBar,hr=Xt===void 0?!1:Xt,Mt=Ae.fullScreen,Lt=Mt===void 0?!1:Mt,sr=Ae.onBlur,Xr=Ae.onCMBeforeChange,Fr=Ae.onFullScreen,et=Ae.className,Ot=et===void 0?"":et,Kr=Ae.disablePaste,Or=Kr===void 0?!1:Kr,dn=Ae.placeholder,bn=dn===void 0?"":dn,oe=Ae.values,b=oe===void 0?"":oe,A=Object(o.useState)(null),re=Object(h.a)(A,2),ue=re[0],te=re[1],Pe=Object(o.useState)(it),Ze=Object(h.a)(Pe,2),ot=Ze[0],yt=Ze[1],qe=Object(o.useState)(It),Nt=Object(h.a)(qe,2),Gt=Nt[0],nr=Nt[1],Vr=Object(o.useState)(Lt),Yr=Object(h.a)(Vr,2),fr=Yr[0],Jr=Yr[1],Bn=Object(o.useState)(""),Br=Object(h.a)(Bn,2),Ur=Br[0],$r=Br[1],On=Object(o.useState)(0),en=Object(h.a)(On,2),xn=en[0],hn=en[1],qn=Object(o.useState)(dt),Un=Object(h.a)(qn,2),mn=Un[0],tn=Un[1],Dn=Object(o.useState)(!1),Mn=Object(h.a)(Dn,2),ei=Mn[0],lr=Mn[1],Qt=Object(o.useRef)(Object(be.a)()),kr=Object(o.useRef)(!1),$t=Object(o.useRef)(),gr=Object(o.useRef)(),st=Object(o.useRef)(),mt=Object(o.useRef)(),gt=Object(o.useRef)(),bt=function(){var _t=Object(m.a)(u.a.mark(function Rt(){var St,jt;return u.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Object(xe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Qt.current}});case 2:jt=Zt.sent,jt!=null&&(St=jt.attachments)!==null&&St!==void 0&&St.length&&(console.log("cm:",ue,gr),jt.attachments.map(function(Ct){Ct.content_type.indexOf("image")>-1?ue.replaceSelection(".concat(Ct.content_type,")")):Ct.content_type.indexOf("video")>-1?ue.replaceSelection('<video width="100%" controls src="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Ct.content_type.indexOf("pdf")>-1?ue.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(Ct.id,"?type=").concat(Ct.content_type,'&disposition=inline" target="_blank">').concat(Ct.name,"</a>")):ue.replaceSelection("[".concat(Ct.name,"](").concat(Z.a.API_SERVER,"/api/attachments/").concat(Ct.id,"?type=").concat(Ct.content_type,")"))}));case 4:case"end":return Zt.stop()}},Rt)}));return function(){return _t.apply(this,arguments)}}();Object(o.useEffect)(function(){yt(b),ue==null||ue.setValue(b)},[b]),Object(o.useEffect)(function(){Fr==null||Fr(fr)},[fr]),Object(o.useEffect)(function(){if(gr.current){var _t=v.a.fromTextArea(gr.current,{mode:Tt,lineNumbers:!zt,lineWrapping:!0,value:it,autoCloseTags:!0,autoCloseBrackets:!0});Yt&&_t.focus();function Rt(St,jt){if(Or){jt.preventDefault();return}var Kt=jt.clipboardData;if(Kt){var Zt=Kt.types.toString(),Ct=Kt.items;if(Zt==="Files"||Kt.types.indexOf("Files")>-1){if(jt.preventDefault(),Tt=="stex")return;try{var er,vr=Ct[1];((er=Ct[0])===null||er===void 0?void 0:er.kind)==="file"&&(vr=Ct[0]);var Wt=vr.getAsFile(),wn=Wt.name.split(".").pop();se(Wt,function(qt){if(qt.id){var yr,Cr,on;(Wt==null||((yr=Wt.type)===null||yr===void 0)?void 0:yr.indexOf("image"))>-1?_t.replaceSelection(".concat(qt.content_type,")")):(Wt==null||((Cr=Wt.type)===null||Cr===void 0)?void 0:Cr.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(qt.id,'"></video>')):(Wt==null||((on=Wt.type)===null||on===void 0)?void 0:on.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(qt.id,"?type=").concat(Wt.type,'&disposition=inline" target="_blank">').concat(Wt.name,"</a>")):Se.includes(wn)?_t.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(qt.id,'?type=office&disposition=inline" target="_blank">').concat(Wt.name,"</a>")):_t.replaceSelection("[".concat(Wt.name,"](").concat(Z.a.API_SERVER,"/api/attachments/").concat(qt.id,"?type=").concat(qt.content_type,")"))}else(qt==null?void 0:qt.status)===401&&(document.location.href="/user/login")})}catch(qt){x.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return _t.on("paste",Rt),_t.on("dragleave",function(St,jt){st.current.classList.remove("mouse-hover-md")}),_t.on("dragover",function(St,jt){st.current.classList.add("mouse-hover-md")}),_t.on("drop",function(St,jt){st.current.classList.add("mouse-hover-md");var Kt;if(Kt=jt.dataTransfer.files,Kt.length>0){jt.preventDefault(),jt.stopPropagation();for(var Zt=function(vr){var Wt=Kt[vr],wn=Wt.name.split(".").pop();se(Wt,function(qt){if(qt.id){var yr,Cr,on;(Wt==null||((yr=Wt.type)===null||yr===void 0)?void 0:yr.indexOf("image"))>-1?_t.replaceSelection(".concat(qt.content_type,")")):(Wt==null||((Cr=Wt.type)===null||Cr===void 0)?void 0:Cr.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(qt.id,'"></video>')):(Wt==null||((on=Wt.type)===null||on===void 0)?void 0:on.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(qt.id,"?type=").concat(Wt.type,'&disposition=inline" target="_blank">').concat(Wt.name,"</a>")):Se.includes(wn)?_t.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(qt.id,'?type=office&disposition=inline" target="_blank">').concat(Wt.name,"</a>")):_t.replaceSelection("[".concat(Wt.name,"](").concat(Z.a.API_SERVER,"/api/attachments/").concat(qt.id,"?type=").concat(qt.content_type,")"))}else(qt==null?void 0:qt.status)===401&&(document.location.href="/user/login")})},Ct=0;Ct<Kt.length;Ct++)Zt(Ct)}}),te(_t),function(){_t.off("paste",Rt)}}},[]);var Bt=Object(o.useCallback)(function(){if(st.current)try{}catch(_t){console.log(_t,"---- to set md editor body height")}},[mn,st,fr]);Object(o.useEffect)(function(){function _t(){var St=new _.default(function(jt){var Kt=Object(O.a)(jt),Zt;try{for(Kt.s();!(Zt=Kt.n()).done;){var Ct=Zt.value;(Ct.target.offsetHeight>0||Ct.target.offsetWidth>0)&&(Bt(),ue.setSize("100%","100%"),ue.refresh())}}catch(er){Kt.e(er)}finally{Kt.f()}});return St.observe(gr.current.parentElement),St}if(ue){var Rt=_t();return function(){Rt.unobserve(gr.current.parentElement)}}},[ue,Bt]),Object(o.useEffect)(function(){if(ue){for(var _t=[],Rt=function(){var Ct=jt[St];Kt=Object(h.a)(Ct,2);var er=Kt[0],vr=Kt[1],Wt=Object(s.a)({},er,function(){vt(vr)});_t.push(Wt),ue.addKeyMap(Wt)},St=0,jt=Object.entries(ke);St<jt.length;St++){var Kt;Rt()}return $t.current=setInterval(function(){kr.current&&bt()},4e3),function(){clearInterval($t.current);var Zt=Object(O.a)(_t),Ct;try{for(Zt.s();!(Ct=Zt.n()).done;){var er=Ct.value;ue.removeKeyMap(er)}}catch(vr){Zt.e(vr)}finally{Zt.f()}}}},[ue]),Object(o.useEffect)(function(){Lt!==fr&&Jr(Lt)},[Lt]),Object(Xe.a)(function(){if(!Lr&&xn>0){var _t=new Date().getTime(),Rt=window.sessionStorage.getItem(Jt);_t>=xn+Ke&&(!Rt||Rt!==ot)&&(window.sessionStorage.setItem(Jt,ot),lr(!0))}},Ke),Object(o.useEffect)(function(){nr(It)},[ue,It]),Object(o.useEffect)(function(){ue&&(Yt&&ue.focus())},[ue,Yt]),Object(o.useEffect)(function(){if(Gt&&ue){var _t=ue.getScrollerElement();function Rt(St){var jt=St.target;if(gt.current){var Kt=jt.scrollTop/jt.scrollHeight;gt.current.scrollTop=gt.current.scrollHeight*Kt}}return _t.addEventListener("scroll",Rt),function(){_t.removeEventListener("scroll",Rt)}}},[ue,Gt]),Object(o.useEffect)(function(){if(ue&&Xr){function _t(Rt,St){Xr(Rt,St)}return ue.on("beforeChange",_t),function(){ue.off("beforeChange",_t)}}},[ue,Xr]),Object(o.useEffect)(function(){if(ue&&sr){function _t(){sr(ue.getValue())}return ue.on("blur",_t),function(){ue.off("blur",_t)}}},[ue,sr]),Object(o.useEffect)(function(){if(ue){function _t(Rt){var St=Rt.getValue();yt(St),hn(new Date().getTime()),Rt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lt&<(St)}return ue.on("change",_t),function(){ue.off("change",_t)}}},[ue,lt]),Object(o.useEffect)(function(){ue&&(it==null?(ue.setValue(""),yt("")):it!==ue.getValue()&&(ue.setValue(it),yt(it),ue.setCursor(ue.lineCount(),0)))},[ue,it]);var vt=Object(o.useCallback)(function(_t){var Rt=ue.getCursor(),St=ue.getSelection(),jt=St.split(`
|
|
|
`);switch(_t){case"bold":return ue.replaceSelection("**"+St+"**"),St===""&&ue.setCursor(Rt.line,Rt.ch+2),ue.focus();case"italic":return ue.replaceSelection("*"+St+"*"),St===""&&ue.setCursor(Rt.line,Rt.ch+1),ue.focus();case"code":return ue.replaceSelection("`"+St+"`"),St===""&&ue.setCursor(Rt.line,Rt.ch+1),ue.focus();case"inline-latex":return ue.replaceSelection("`$$"+St+"$$`"),St===""&&ue.setCursor(Rt.line,Rt.ch+3),ue.focus();case"latex":return ue.replaceSelection("```latex\n"+St+"\n```"),ue.setCursor(Rt.line+1,St.length+1),ue.focus();case"line-break":return ue.replaceSelection(`<br/>
|
|
|
`),ue.focus();case"list-ul":return St===""?ue.replaceSelection("- "+St):ue.replaceSelection(jt.map(function(Kt){return Kt===""?"":"- ".concat(Kt)}).join(`
|
|
|
`)),ue.focus();case"list-ol":return St===""?ue.replaceSelection("1. "+St):ue.replaceSelection(jt.map(function(Kt,Zt){return Kt===""?"":"".concat(Zt+1,". ").concat(Kt)}).join(`
|
|
|
`)),ue.focus();case"add-null-ch":return St===""&&ue.setCursor(Rt.line,Rt.ch+1),ue.replaceSelection($e),ue.focus();case"inster-template-1":return St===""&&ue.setCursor(Rt.line,Rt.ch),ue.replaceSelection(je),ue.focus();case"eraser":return ue.setValue(""),ue.focus();case"trigger-watch":return nr(!Gt),ue.focus();case"trigger-full-screen":return Jr(!fr),ue.focus();case Te:$r(Te);return;case Be:$r(Be);return;case Fe:$r(Fe);return;case Ue:$r(Ue);return;default:throw new Error}},[ue,Gt,fr]),Dt=Object(o.useCallback)(function(_t){$r("");switch(Ur){case Te:var Rt=_t.title,St=_t.link;return ue.replaceSelection("[".concat(Rt,"](").concat(St,")")),ue.focus();case Be:var jt=_t.language,Kt=_t.content;return ue.replaceSelection(["```"+jt,Kt,"```"].join(`
|
|
|
`)),ue.focus();case Fe:var Zt=_t.src,Ct=_t.alt,er=_t.name;return Zt.indexOf("type=image")>-1?ue.replaceSelection(".concat(Zt,' "').concat(Ct||"",'" )')):Zt.indexOf("type=application/pdf")>-1?ue.replaceSelection('<a href="'.concat(Zt,'&disposition=inline" target="_blank">').concat(er,"</a>")):ue.replaceSelection('<a href="'.concat(Zt,'" target="_blank">').concat(er,"</a>")),ue.focus();case Ue:for(var vr=_t.row,Wt=_t.col,wn=_t.align,qt=`
|
|
|
`,yr=0;yr<vr;yr++){for(var Cr=[],on=[],Wn=0;Wn<Wt;Wn++)yr===1&&on.push(Ve[wn]),Cr.push(" ");yr===1&&(qt+="| ".concat(on.join(" | "),` |
|
|
|
`)),qt+="| ".concat(Cr.join(Wt===1?"":" | "),` |
|
|
|
`)}return ue.replaceSelection(qt+`
|
|
|
`),ue.focus();default:throw new Error}},[ue,Ur]),ur=Object(o.useMemo)(function(){switch(Ur){case Te:return g.a.createElement(pe,{callback:Dt,onCancel:ar});case Be:return g.a.createElement(ye.b,{callback:Dt,onCancel:ar});case Fe:return g.a.createElement(ie,{callback:Dt,onCancel:ar});case Ue:return g.a.createElement(U,{callback:Dt,onCancel:ar});default:return null}},[Ur]);function ar(){$r("")}Object(o.useEffect)(function(){if(mt.current){var _t=mt.current,Rt=!1,St=0;function jt(Ct){Rt=!0,St=Ct.pageY}function Kt(){Rt=!1}function Zt(Ct){if(Rt){var er=Ct.pageY-St;er<0&&(er=0),er>300&&(er=300);var vr=dt+er+"px";tn(vr)}}return _t.addEventListener("mousedown",jt),document.addEventListener("mousemove",Zt),document.addEventListener("mouseup",Kt),function(){_t.removeEventListener("mousedown",jt),document.removeEventListener("mousemove",Zt),document.removeEventListener("mouseup",Kt)}}},[ue,mt]),Object(o.useEffect)(function(){tn(dt)},[dt]);var rn=Me(ct),xr=Me(mn),wr={width:rn,height:xr},nn=Object(o.useMemo)(function(){if(xn){var _t=new Date(xn),Rt=_t.getHours(),St=_t.getMinutes(),jt=_t.getSeconds();return Rt=Rt<10?"0"+Rt:Rt,St=St<10?"0"+St:St,jt=jt<10?"0"+jt:jt,"".concat(Rt,":").concat(St,":").concat(jt)}return 0},[xn]);function Wr(){window.sessionStorage.removeItem(Jt),lr(!1),hn(0)}function Hr(){lr(!1),hn(0),ue.setValue(window.sessionStorage.getItem(Jt))}function Nn(_t,Rt){var St=ue.getValue();St=St.replace(_t,Rt),yt(St),ue==null||ue.setValue(St)}return g.a.createElement(o.Fragment,null,g.a.createElement("div",{className:"markdown-editor-wrapper",ref:st},g.a.createElement("div",{className:"markdown-editor-container ".concat(Ot," ").concat(Gt?"on-preview":""," ").concat(zt?"mini":""," ").concat(fr?"full-screen":""),style:wr},g.a.createElement(V,{insertTemp:Ut,watch:Gt,fullScreen:fr,showNullButton:pt,onActionCallback:vt,hidetoolBar:hr,uuid:Qt.current,setOpenPhones:function(){kr.current=!0}}),g.a.createElement("div",{className:"markdown-editor-body"},g.a.createElement("div",{className:"codemirror-container"},g.a.createElement("textarea",{ref:gr,placeholder:bn})),Gt?g.a.createElement("div",{ref:gt,className:"preview-container"},Tt==="stex"&&g.a.createElement(J,{value:ot}),Tt!=="stex"&&g.a.createElement(y.a,{edit:!0,value:ot,replaces:Nn})):null))),dr?g.a.createElement("a",{ref:mt,className:"editor-resize"}):null,g.a.createElement(ve.a,null,Re[Ur]?g.a.createElement(i.a,{centered:!0,title:Re[Ur],visible:!0,onCancel:ar,footer:null},ur):null))}},"P/tu":function(a,G,d){"use strict";var f=d("ozfa"),i=d("MJZm"),O=d("0Owb"),C=d("9og8"),x=d("tJVT"),m=d("PpiC"),h=d("WmNS"),s=d.n(h),l=d("q1tI"),u=d.n(l),o=d("WCUW"),g=d("spXi"),p=d.n(g),v=function(S){var k=S.value,T=S.onChange,M=S.defaultValue,I=S.disabled,j=Object(m.a)(S,["value","onChange","defaultValue","disabled"]),D=Object(l.useState)([]),y=Object(x.a)(D,2),J=y[0],X=y[1],N=Object(l.useState)("1"),F=Object(x.a)(N,2),H=F[0],Z=F[1];Object(l.useEffect)(function(){ce()},[]);var ce=function(){var ve=Object(C.a)(s.a.mark(function ne(){var W,z;return s.a.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Object(o.x)({});case 2:W=w.sent,W!=null&&W.data&&(z=[{title:u.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:p.a.name},"\u6839\u76EE\u5F55"),value:0,key:0,icon:u.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:he(W.data||[])}],X(z),Z("2"));case 4:case"end":return w.stop()}},ne)}));return function(){return ve.apply(this,arguments)}}(),he=function(ne){function W(z){var R=z.children,w=Array.isArray(R)&&R.length>0,P=z==null?void 0:z.group_id;return{title:u.a.createElement("div",{title:z==null?void 0:z.name,className:p.a.name},z==null?void 0:z.name),value:P,key:P,icon:u.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:w?R==null?void 0:R.map(function(le){return W(le)}):[]}}return ne==null?void 0:ne.map(function(z){return W(z)})},V=M?{defaultExpandedKeys:[0]}:{selectedKeys:k,defaultExpandedKeys:k};return u.a.createElement("div",{className:p.a.customTree},u.a.createElement(i.a,Object(O.a)({key:H},V,{showIcon:!0,treeData:J,onSelect:T,disabled:I},j)))};G.a=v},PD8m:function(a,G){a.exports={name:"memoryStorage",read:f,write:i,each:O,remove:C,clearAll:x};var d={};function f(m){return d[m]}function i(m,h){d[m]=h}function O(m){for(var h in d)d.hasOwnProperty(h)&&m(d[h],h)}function C(m){delete d[m]}function x(m){d={}}},PHyj:function(a,G,d){"use strict";d.r(G),d.d(G,"Types",function(){return Se});var f=d("P2fV"),i=d("NJEC"),O=d("CiB2"),C=d("DYRE"),x=d("zeV3"),m=d("sRBo"),h=d("kaz8"),s=d("7Kak"),l=d("9yH6"),u=d("giR+"),o=d("fyUT"),g=d("6UJt"),p=d("DFOY"),v=d("OaEy"),_=d("2fM7"),S=d("rAM+"),k=d("T2oS"),T=d("W9HT"),M=d("+L6B"),I=d("2/Rp"),j=d("oBTY"),D=d("miYZ"),y=d("tsqr"),J=d("9og8"),X=d("y8nQ"),N=d("Vl3Y"),F=d("tJVT"),H=d("k1fw"),Z=d("fu2T"),ce=d("gK9i"),he=d("2qtc"),V=d("kLXV"),ve=d("5NDa"),ne=d("5rEg"),W=d("WmNS"),z=d.n(W),R=d("q1tI"),w=d.n(R),P=d("uMZB"),le=d.n(P),pe=d("jrin"),ye,Ee=_.a.Option,Oe;(function(Ae){Ae[Ae.language=0]="language",Ae[Ae.difficult=1]="difficult",Ae[Ae.category=2]="category",Ae[Ae.openOrNot=3]="openOrNot"})(Oe||(Oe={}));var ae=(ye={},Object(pe.a)(ye,Oe.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(pe.a)(ye,Oe.difficult,[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}]),Object(pe.a)(ye,Oe.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(pe.a)(ye,Oe.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),ye);function fe(Ae){return ae[Ae].map(function(Ye){return w.a.createElement(Ee,{key:Ye.title,value:Ye.key}," ",Ye.title," ")})}function ge(Ae,Ye){Ae.map(function(it){var lt=it.id,ut=it.name,ct=it.sub_disciplines,xt={value:lt,label:ut};Ye.push(xt),ct&&ct.length>0&&(xt.children=[],ge(ct,xt.children))})}function q(Ae,Ye){for(var it=[],lt=0;lt<Ae.length;lt++){var ut,ct=Ae[lt];if(((ut=ct.sub_disciplines)===null||ut===void 0?void 0:ut.length)>0){it[0]=ct.id;for(var xt=0;xt<ct.sub_disciplines.length;xt++){var dt=ct.sub_disciplines[xt];if(dt.id===Ye)return it[1]=dt.id,[it,dt.tag_disciplines||dt.sub_disciplines||[]]}}}return[it,[]]}var ie=d("Ty5D"),$=d("J66h"),se=d("GIiI"),K=d("2BaD"),Y=d("Ot1p"),Ce=d("ErOA");function Q(){return Object(Ce.c)("problems/new.json")}function B(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"question";return Object(Ce.c)("disciplines.json",{source:Ae})}function E(Ae){return Object(Ce.c)("problems/".concat(Ae,"/edit.json"))}function U(Ae,Ye){return Object(Ce.g)("problems/".concat(Ae,".json"),Ye)}function xe(Ae){return Object(Ce.f)("problems.json",Ae)}function be(Ae,Ye){return Object(Ce.f)("exercises/".concat(Ae,"/exercise_questions.json"),Ye)}function Te(Ae,Ye){return Object(Ce.g)("exercise_questions/".concat(Ae,".json"),Ye)}function Fe(Ae){return Object(Ce.f)("problems/".concat(Ae,"/publish.json"))}function Be(Ae){return Object(Ce.f)("problems/".concat(Ae,"/cancel_publish.json"))}function Ue(Ae){return Object(Ce.c)("problems/".concat(Ae,"/start.json"))}function ze(Ae,Ye){return Object(Ce.f)("tag_disciplines.json",{name:Ye,sub_discipline_id:Ae})}var Ve=d("V0Rq"),Xe=d("cDPC"),Je=d("EHPI"),Ne=d("m3rI"),tt=d("u2Z1"),nt=d("P/tu"),Ke=d("B7Ph"),$e=ne.a.TextArea,je=V.a.confirm,Me=ce.a.Panel;function Ie(){return new Date().getTime()}var _e={loading:!0,user:null,disciplines:[],dicts:null,status:0,data:void 0,lastedUpdateTime:0},Se;(function(Ae){Ae[Ae.SET_INITAL_DATA=0]="SET_INITAL_DATA",Ae[Ae.SET_LOADING=1]="SET_LOADING",Ae[Ae.SET_STATUS=2]="SET_STATUS"})(Se||(Se={}));function ke(Ae,Ye){switch(Ye.type){case Se.SET_INITAL_DATA:return Object(H.a)(Object(H.a)({},Ae),Ye.payload);case Se.SET_LOADING:return Object(H.a)(Object(H.a)({},Ae),{},{loading:Ye.payload});case Se.SET_STATUS:return Object(H.a)(Object(H.a)({},Ae),{},{status:Ye.payload});default:throw new Error}}var Re=G.default=function(){var Ae,Ye,it=Object(ie.h)(),lt=Object(ie.g)(),ut=Object(ie.i)(),ct=ut.id,xt=N.a.useForm(),dt=Object(F.a)(xt,1),kt=dt[0],zt=Object(R.useState)(),Vt=Object(F.a)(zt,2),Yt=Vt[0],It=Vt[1],Ut=Object(R.useState)([]),jr=Object(F.a)(Ut,2),Tt=jr[0],Rr=jr[1],Jt=Object(R.useState)([]),rr=Object(F.a)(Jt,2),dr=rr[0],mr=rr[1],Lr=Object(R.useReducer)(ke,_e),Ft=Object(F.a)(Lr,2),pt=Ft[0],Xt=Ft[1],hr=pt.loading,Mt=pt.data,Lt=pt.user,sr=pt.disciplines,Xr=pt.dicts,Fr=pt.status,et=Mt==null?void 0:Mt.hack_sets,Ot=Mt==null||((Ae=Mt.hack)===null||Ae===void 0)?void 0:Ae.test_set_average,Kr=it.query,Or=Kr.callback_url,dn=Kr.express_id,bn=Kr.score,oe=Kr.question_id,b=Object(R.useState)([]),A=Object(F.a)(b,2),re=A[0],ue=A[1],te=Object(R.useState)(!1),Pe=Object(F.a)(te,2),Ze=Pe[0],ot=Pe[1],yt=Object(R.useState)(!1),qe=Object(F.a)(yt,2),Nt=qe[0],Gt=qe[1],nr=Object(R.useMemo)(function(){var st=[];return sr&&ge(sr,st),st},[sr]),Vr=Object(R.useCallback)(Object(J.a)(z.a.mark(function st(){var mt,gt,bt,Bt,vt,Dt,ur,ar,rn,xr,wr,nn,Wr,Hr,Nn,_t,Rt,St,jt,Kt,Zt,Ct,er,vr,Wt,wn,qt,yr,Cr,on,Wn,Pn,Er,Ri,Di,Hn,zn,di,to,Ln,Cn,ro,no,hi,En,io,In,gn=arguments;return z.a.wrap(function(Zr){for(;;)switch(Zr.prev=Zr.next){case 0:if(mt=gn.length>0&&gn[0]!==void 0?gn[0]:0,gt=sr,!(gt.length===0)){Zr.next=7;break}return Zr.next=5,B();case 5:bt=Zr.sent,gt=bt.disciplines;case 7:if(!ct){Zr.next=15;break}return Bt={disciplines:gt},Zr.next=11,E(ct);case 11:vt=Zr.sent,vt.message?vt.status==="401"&&(document.location.href="/user/login"):(Dt=vt.category,ur=vt.user,ar=vt.code,rn=vt.language,xr=vt.hack_sets,wr=vt.description,nn=vt.difficult,Wr=vt.name,Hr=vt.open_or_not,Nn=vt.sub_discipline_id,_t=vt.tag_discipline_id,Rt=vt.time_limit,St=vt.test_set_average,jt=vt.test_set_score,Kt=vt.status,Zt=vt.tag_discipline_ids,Ct=vt.item_banks_group_id,er=vt.is_file,vr=er===void 0?!1:er,Wt=vt.hide_actual_output,wn=vt.code_compile_score,qt=q(gt,Nn),yr=Object(F.a)(qt,2),Cr=yr[0],on=yr[1],ot(Wt),Wn=vr?[{input:"",output:"",score:100,position:1}]:xr,vr?(mr(xr),kt.setFieldsValue({hack_sets:Wn})):mr([]),Pn=it.query.lastedUpdateTime,Bt=Object(H.a)(Object(H.a)({},Bt),{},{loading:!1,user:ur,dicts:on,status:Kt,lastedUpdateTime:mt||(Pn||0),data:{hack_codes:{language:rn,code:$.Base64.decode(ar)},hack:{category:Dt,difficult:nn,name:Wr,description:wr,open_or_not:Hr,time_limit:Rt,test_set_average:St,test_set_score:jt,sub_discipline_id:Cr,tag_discipline_ids:Zt,score:bn||1,item_banks_group_ids:Ct,is_file:vr,code_compile_score:wn},hack_sets:Wn,tags:Zt}}),parseInt(wn)>0&&Gt(!0),Xt({type:Se.SET_INITAL_DATA,payload:Bt}),It({hack:{category:Dt,difficult:nn,name:Wr,description:wr,open_or_not:Hr,time_limit:Rt,test_set_average:St,test_set_score:jt,sub_discipline_id:Cr,tag_discipline_ids:Zt,score:bn||1,item_banks_group_ids:Ct,is_file:vr}}),Yr(Cr==null?void 0:Cr[0],Cr==null?void 0:Cr[1],gt)),Zr.next=25;break;case 15:return Zr.next=17,Q();case 17:Di=Zr.sent,Hn=Di.user,zn=it.query,di=zn.difficult,to=zn.sub_discipline_id,Ln=zn.tag_discipline_id,Cn=zn.tagIds,ro=zn.banksIds,no=q(gt,parseInt(to,10)),hi=Object(F.a)(no,2),En=hi[0],io=hi[1],In=[Number(ro)],Xt({type:Se.SET_INITAL_DATA,payload:{loading:!1,user:Hn,disciplines:gt,status:0,dicts:io,data:{hack_codes:{language:"C",code:""},hack:{category:null,difficult:parseInt(di,10),time_limit:3,description:"",test_set_score:!0,test_set_average:!0,open_or_not:!0,sub_discipline_id:En,tag_discipline_id:Cn&&(Cn==null||((Er=Cn.split(","))===null||Er===void 0)?void 0:Er.map(function(Gn){return Number(Gn)})),name:"",item_banks_group_ids:In,is_file:!1},tags:Ln?Ln==null?void 0:Ln.split(",").map(function(Gn){return parseInt(Gn,10)}):[],hack_sets:[{input:"",output:"",score:100,position:1}]}}}),It({hack:{category:null,difficult:parseInt(di,10),time_limit:3,description:"",test_set_average:!0,open_or_not:!0,sub_discipline_id:En,tag_discipline_id:Cn&&(Cn==null||((Ri=Cn.split(","))===null||Ri===void 0)?void 0:Ri.map(function(Gn){return Number(Gn)})),name:"",item_banks_group_id:In,is_file:!1}}),Yr(En==null?void 0:En[0],En==null?void 0:En[1],gt);case 25:case"end":return Zr.stop()}},st)})),[ct,sr]);Object(R.useEffect)(function(){try{Vr()}catch(st){console.log(st,"----")}},[]),Object(R.useEffect)(function(){function st(){return mt.apply(this,arguments)}function mt(){return mt=Object(J.a)(z.a.mark(function gt(){var bt;return z.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return vt.next=2,Object(Ce.c)("item_banks_groups/mine.json");case 2:bt=vt.sent,ue(bt);case 4:case"end":return vt.stop()}},gt)})),mt.apply(this,arguments)}st()},[]);var Yr=function(mt,gt,bt){var Bt,vt,Dt,ur=bt==null||((Bt=bt.find(function(ar){return ar.id===mt}))===null||Bt===void 0||((vt=Bt.sub_disciplines)===null||vt===void 0||((Dt=vt.find(function(ar){return ar.id===gt}))===null||Dt===void 0)))?void 0:Dt.tag_disciplines};function fr(st,mt){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(J.a)(z.a.mark(function st(mt,gt){var bt,Bt,vt,Dt,ur,ar,rn,xr,wr,nn,Wr,Hr,Nn,_t,Rt,St,jt,Kt;return z.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:bt=Object(H.a)({},mt),Bt=bt.hack_sets,vt=bt.hack_codes,Dt=bt.hack,ur=bt.tags,Dt.hide_actual_output=Ze,ar=[],rn=[],xr=0,wr=Dt!=null&&Dt.is_file?dr.map(function(er,vr){return Object(H.a)(Object(H.a)({},er),{},{position:vr+1})}):Bt.map(function(er){return Object(H.a)(Object(H.a)({},er),{},{is_file:!1})}),nn=Object(S.a)(wr);try{for(nn.s();!(Wr=nn.n()).done;)Hr=Wr.value,xr+=Hr.score,Hr.id&&Hr.id>=0?ar.push(Hr):rn.push(Hr)}catch(er){nn.e(er)}finally{nn.f()}if(wr!=null&&wr.length){Ct.next=11;break}return y.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),Ct.abrupt("return");case 11:if(xr+=parseInt(Dt.code_compile_score||0),!(xr!==100&&!Dt.test_set_score)){Ct.next=15;break}return y.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),Ct.abrupt("return");case 15:if(!(wr!=null&&wr.some(function(er){return!er.output}))){Ct.next=18;break}return y.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),Ct.abrupt("return");case 18:if(vt.code=$.Base64.encode(vt==null?void 0:vt.code),Dt.sub_discipline_id=Dt.sub_discipline_id[1],Xt({type:Se.SET_LOADING,payload:!0}),Or||(Dt.score=Dt.difficult*100),!ct){Ct.next=43;break}return Ct.next=25,U(ct,{hack:Dt,hack_codes:vt,hack_sets:rn,update_hack_sets:ar,tags:ur});case 25:if(!Or){Ct.next=38;break}return Ct.next=28,Fe(ct);case 28:return Ct.next=30,Te(oe,{question_type:6,question_score:Dt.score,question_title:Dt.name,description:Dt.description,sub_discipline_id:Dt.sub_discipline_id,tag_discipline_ids:Dt.tag_discipline_ids,item_banks_group_ids:Dt.item_banks_group_ids,identifier:ct});case 30:if(Nn=Ct.sent,_t=Nn.status,!(_t===0)){Ct.next=36;break}if(!(gt==="start")){Ct.next=35;break}return Ct.abrupt("return");case 35:lt.replace(Or);case 36:Ct.next=40;break;case 38:y.b.success("\u4FDD\u5B58\u6210\u529F"),Vr(Ie());case 40:Xt({type:Se.SET_LOADING,payload:!1}),Ct.next=66;break;case 43:return Ct.next=45,xe({hack:Dt,hack_codes:vt,hack_sets:wr,tags:ur});case 45:if(Rt=Ct.sent,St=Rt.identifier,Xt({type:Se.SET_LOADING,payload:!1}),!(gt==="start")){Ct.next=50;break}return Ct.abrupt("return");case 50:if(!St){Ct.next=66;break}if(Or){Ct.next=55;break}lt.replace("/problems/".concat(St,"/edit?lastedUpdateTime=").concat(Ie())),Ct.next=66;break;case 55:return Ct.next=57,Fe(St);case 57:if(ct){Ct.next=65;break}return Ct.next=60,be(parseInt(dn,10),{question_type:6,question_score:Dt.score,question_title:Dt.name,identifier:St,tag_discipline_ids:Dt.tag_discipline_ids});case 60:jt=Ct.sent,Kt=jt.status,Kt===0&<.replace(Or),Ct.next=66;break;case 65:lt.replace(Or);case 66:case"end":return Ct.stop()}},st)})),Jr.apply(this,arguments)}function Bn(){kt.submit(),setTimeout(Object(J.a)(z.a.mark(function st(){var mt;return z.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Fe(ct);case 2:mt=bt.sent,mt.status===0?(y.b.success("\u53D1\u5E03\u6210\u529F"),Xt({type:Se.SET_STATUS,payload:1})):y.b.info(mt.message);case 4:case"end":return bt.stop()}},st)})),400)}function Br(){return Ur.apply(this,arguments)}function Ur(){return Ur=Object(J.a)(z.a.mark(function st(){var mt;return z.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Be(ct);case 2:mt=bt.sent,mt.status===0?(y.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F"),Xt({type:Se.SET_STATUS,payload:0})):y.b.info(mt.message);case 4:case"end":return bt.stop()}},st)})),Ur.apply(this,arguments)}function $r(){Fr===0?je({title:"\u63D0\u793A",content:w.a.createElement(R.Fragment,null," ",w.a.createElement("div",null,"\u53D1\u5E03\u540E\u5373\u53EF\u5E94\u7528\u5230\u81EA\u5DF1\u7BA1\u7406\u7684\u8BFE\u5802")," ",w.a.createElement("div",null," \u662F\u5426\u786E\u8BA4\u53D1\u5E03?")," "),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){Bn()}}):je({title:"\u63D0\u793A",content:w.a.createElement("p",null,"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){Br()}})}function On(){return en.apply(this,arguments)}function en(){return en=Object(J.a)(z.a.mark(function st(){return z.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.t0=fr,gt.next=3,kt.getFieldValue();case 3:gt.t1=gt.sent,(0,gt.t0)(gt.t1,"start"),setTimeout(Object(J.a)(z.a.mark(function bt(){var Bt,vt;return z.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return ur.next=2,Ue(ct);case 2:Bt=ur.sent,vt=Bt.identifier,window.location.href="/myproblems/".concat(vt);case 5:case"end":return ur.stop()}},bt)})),400);case 6:case"end":return gt.stop()}},st)})),en.apply(this,arguments)}function xn(){Or?lt.replace(Or):lt.replace("/problemset")}var hn=function(mt){var gt=parseInt(kt.getFieldValue("hack").code_compile_score)||0,bt=Math.floor((100-gt)/mt.length),Bt=bt+(100-gt)%mt.length;mt=mt.map(function(vt,Dt){return Dt===mt.length-1?Object(H.a)(Object(H.a)({},vt),{},{score:Bt}):Object(H.a)(Object(H.a)({},vt),{},{score:bt})}),mr(mt)};function qn(st){st.target.value||hn(dr),Xt({type:Se.SET_INITAL_DATA,payload:{data:Object(H.a)(Object(H.a)({},Mt),{},{hack:Object(H.a)(Object(H.a)({},Mt.hack),{},{test_set_score:st.target.value})})}})}function Un(st){Xt({type:Se.SET_INITAL_DATA,payload:{data:Object(H.a)(Object(H.a)({},Mt),{},{hack:Object(H.a)(Object(H.a)({},Mt.hack),{},{is_file:st.target.value})})}})}function mn(st){ot(st.target.checked)}function tn(st){var mt=st.target.value;mt&&hn(dr),Xt({type:Se.SET_INITAL_DATA,payload:{data:Object(H.a)(Object(H.a)({},Mt),{},{hack:Object(H.a)(Object(H.a)({},Mt.hack),{},{test_set_average:mt})})}})}function Dn(){var st=kt.getFieldValue("hack_sets"),mt=parseInt(kt.getFieldValue("hack").code_compile_score)||0,gt=st.length+1,bt=Math.floor((100-mt)/gt),Bt=(100-mt)%gt;st.map(function(vt,Dt){return Ot&&(vt.score=bt),vt.position=Dt+1,vt}),st.push({input:"",output:"",position:gt,score:Ot?bt+Bt:0}),kt.setFieldsValue({hack_sets:st}),Xt({type:Se.SET_INITAL_DATA,payload:{data:Object(H.a)(Object(H.a)({},Mt),{},{hack_sets:st})}})}function Mn(){var st=kt.getFieldValue("hack_sets"),mt=parseInt(kt.getFieldValue("hack").code_compile_score)||0,gt=st.length,bt=Math.floor((100-mt)/gt),Bt=(100-mt)%gt;st.map(function(vt,Dt){return Ot&&(vt.score=bt,Dt===st.length-1&&(vt.score=bt+Bt)),vt.position=Dt+1,vt}),kt.setFieldsValue({hack_sets:st}),Xt({type:Se.SET_INITAL_DATA,payload:{data:Object(H.a)(Object(H.a)({},Mt),{},{hack_sets:st})}})}Object(R.useEffect)(function(){if(Ot){var st=parseInt(kt.getFieldValue("hack").code_compile_score)||0,mt=et==null?void 0:et.length,gt=Math.floor((100-st)/mt),bt=(100-st)%mt;et==null||et.map(function(Bt,vt){return Bt.score=gt,Bt.position=vt+1,vt===mt-1&&(Bt.score=gt+bt),Bt}),Xt({type:Se.SET_INITAL_DATA,payload:{data:Object(H.a)(Object(H.a)({},Mt),{},{hack_sets:et})}}),kt.setFieldsValue({hack_sets:et})}},[Ot]);function ei(st){var mt=kt.getFieldValue("hack_sets"),gt=parseInt(kt.getFieldValue("hack").code_compile_score)||0,bt=(mt==null?void 0:mt.length)-1,Bt=Math.ceil((100-gt)/bt),vt=(100-gt)%bt;mt.splice(st,1),mt==null||mt.map(function(Dt,ur){return Ot&&(Dt.score=Bt,ur===bt-1&&(Dt.score=Bt+vt)),Dt.position=ur+1,Dt}),Xt({type:Se.SET_INITAL_DATA,payload:{data:Object(H.a)(Object(H.a)({},Mt),{},{hack_sets:mt})}}),kt.setFieldsValue({hack_sets:mt})}function lr(st){Xt({type:Se.SET_INITAL_DATA,payload:{data:Object(H.a)(Object(H.a)({},Mt),{},{hack_codes:Object(H.a)(Object(H.a)({},Mt.hack_codes),{},{language:st})})}})}var Qt=function(mt){var gt;if(mt!=null&&(gt=mt.hack)!==null&>!==void 0&>.sub_discipline_id){var bt,Bt,vt,Dt,ur,ar=mt==null||((bt=mt.hack)===null||bt===void 0)?void 0:bt.sub_discipline_id,rn=Object(F.a)(ar,2),xr=rn[0],wr=rn[1],nn=sr==null||((Bt=sr.find(function(Hr){return Hr.id===xr}))===null||Bt===void 0||((vt=Bt.sub_disciplines)===null||vt===void 0||((Dt=vt.find(function(Hr){return Hr.id===wr}))===null||Dt===void 0)))?void 0:Dt.tag_disciplines,Wr=Object(H.a)(Object(H.a)({},kt.getFieldsValue()),{},{hack:Object(H.a)(Object(H.a)({},(ur=kt.getFieldsValue())===null||ur===void 0?void 0:ur.hack),{},{tag_discipline_ids:[]})});kt.setFieldsValue(Wr),It(Wr)}else It(Object(H.a)({},kt.getFieldsValue()))},kr=function(mt){Rr([].concat(Object(j.a)(Tt),[Object(H.a)({},mt)]))};Object(R.useEffect)(function(){var st,mt;if(Mt!=null&&(st=Mt.hack)!==null&&st!==void 0&&(mt=st.sub_discipline_id)!==null&&mt!==void 0&&mt[1]){var gt,bt;$t(Mt==null||((gt=Mt.hack)===null||gt===void 0||((bt=gt.sub_discipline_id)===null||bt===void 0))?void 0:bt[1])}},[Mt==null||((Ye=Mt.hack)===null||Ye===void 0)?void 0:Ye.sub_discipline_id]);var $t=function(){var st=Object(J.a)(z.a.mark(function mt(gt){var bt;return z.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return vt.next=2,Object(Ve.H)({sub_discipline_id:gt});case 2:bt=vt.sent,Rr(bt.tag_disciplines);case 4:case"end":return vt.stop()}},mt)}));return function(gt){return st.apply(this,arguments)}}();function gr(st){var mt=st[1],gt=q(sr,mt),bt=Object(F.a)(gt,2),Bt=bt[1];kt.setFieldsValue({tags:[]}),Xt({type:Se.SET_INITAL_DATA,payload:{dicts:Bt,data:Object(H.a)(Object(H.a)({},Mt),{},{hack:Object(H.a)(Object(H.a)({},Mt.hack),{},{sub_discipline_id:st}),tags:[]})}})}return w.a.createElement(T.a,{spinning:hr,delay:500},Mt?w.a.createElement(R.Fragment,null,w.a.createElement("header",{className:le.a.header},w.a.createElement("div",null,w.a.createElement("img",{src:"".concat(Ne.a.IMG_SERVER,"/images/").concat(Lt==null?void 0:Lt.image_url),alt:"user",width:30}),w.a.createElement("span",null,Lt==null?void 0:Lt.name)),w.a.createElement("h2",null," ",Mt==null?void 0:Mt.hack.name," "),ct?w.a.createElement("a",{className:le.a.btn_back,onClick:xn}," ",w.a.createElement(se.a,null),"\u9000\u51FA"):null),w.a.createElement(N.a,{form:kt,initialValues:Mt,layout:"vertical",className:le.a["oj-form-container"],onValuesChange:Qt,onFinish:function(mt,gt){var bt;if(it!=null&&(bt=it.query)!==null&&bt!==void 0&&bt.exercise){V.a.confirm({title:"\u4FDD\u5B58\u63D0\u793A",content:"\u8BF7\u6CE8\u610F\uFF0C\u672C\u6B21\u7F16\u8F91\u4EC5\u4FEE\u6539\u8BD5\u5377\u4E2D\u7684\u7F16\u7A0B\u9898\uFF0C\u4E0D\u4F1A\u540C\u6B65\u539F\u8BD5\u9898\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){return fr(mt,gt)}});return}fr(mt,gt)}},w.a.createElement(Xe.a,{leftChild:w.a.createElement(He,{onAddTestCases:Mn,form:kt,handleAddKnowledgeFinish:kr,MyGroup:re,formValue:Yt,knowledgeOptions:Tt,onChangeLanguage:lr,onChangeSubDiscipline:gr,onRemoveTestCase:ei,onAddTestCase:Dn,dicts:Xr,categorys:nr,callback_url:Or,hack:Mt.hack,onChangeScore:qn,onChangehide:mn,onChangeAverage:tn,onChangeFile:Un,uploadData:dr,setUploadData:mr,handleUploadRatio:hn,ischecked:Ze,isshows:Nt}),rightChild:w.a.createElement(N.a.Item,{name:["hack_codes","code"],style:{marginBottom:0}},w.a.createElement(Je.a,{language:Mt.hack_codes.language}))}),w.a.createElement("div",{className:le.a.footer},ct?w.a.createElement(R.Fragment,null,Or?null:w.a.createElement(I.a,{type:Fr?"default":"primary",onClick:$r},Fr?"\u64A4\u9500\u53D1\u5E03":"\u7ACB\u5373\u53D1\u5E03"),w.a.createElement(I.a,{loading:hr,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"),w.a.createElement(I.a,{type:"primary",onClick:On},Fr?"\u5F00\u59CB\u6311\u6218":"\u6A21\u62DF\u6311\u6218")):w.a.createElement(R.Fragment,null,w.a.createElement(I.a,{onClick:xn},"\u53D6\u6D88"),w.a.createElement(I.a,{loading:hr,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"))))):null)};function He(Ae){var Ye,it,lt,ut,ct=Ae.form,xt=Ae.onAddTestCases,dt=Ae.handleAddKnowledgeFinish,kt=Ae.ischecked,zt=Ae.MyGroup,Vt=Ae.formValue,Yt=Ae.knowledgeOptions,It=Ae.categorys,Ut=Ae.hack,jr=Ae.callback_url,Tt=Ae.onChangeAverage,Rr=Ae.onChangeScore,Jt=Ae.onChangehide,rr=Ae.onChangeFile,dr=Ae.onAddTestCase,mr=Ae.onRemoveTestCase,Lr=Ae.onChangeSubDiscipline,Ft=Ae.onChangeLanguage,pt=Ae.uploadData,Xt=Ae.setUploadData,hr=Ae.handleUploadRatio,Mt=Ae.isshows,Lt=((Ye=location)===null||Ye===void 0||((it=Ye.search)===null||it===void 0)?void 0:it.includes("select"))||!1,sr=Object(R.useState)(Mt),Xr=Object(F.a)(sr,2),Fr=Xr[0],et=Xr[1],Ot=Ut.test_set_average,Kr=Ut.test_set_score,Or=Object(R.useState)(!1),dn=Object(F.a)(Or,2),bn=dn[0],oe=dn[1],b=function(Pe,Ze){var ot=Object(j.a)(pt);ot.splice(Ze,1),Ot?hr(ot):Xt(ot)},A=function(Pe,Ze){console.log(Pe,Ze);var ot=pt.map(function(yt,qe){return qe===Ze?Object(H.a)(Object(H.a)({},yt),{},{score:Pe.target.value?Number(Pe.target.value):0}):yt});Xt(ot)},re=function(Pe){var Ze=pt.concat(Pe);Ut.test_set_average?hr(Ze):Xt(Ze)};function ue(te){te.stopPropagation()}return w.a.createElement("div",{className:le.a["oj-left-panel"]},w.a.createElement("div",{className:le.a["oj-form-info"]},w.a.createElement("div",{className:le.a.field},w.a.createElement(N.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficult"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},w.a.createElement(_.a,{disabled:Lt},fe(Oe.difficult))),w.a.createElement(N.a.Item,{label:"\u8BFE\u7A0B(\u5408\u7406\u7684\u8BFE\u7A0B\u5206\u7C7B\u6709\u5229\u4E8E\u5FEB\u901F\u68C0\u7D22)",name:["hack","sub_discipline_id"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},w.a.createElement(p.a,{disabled:Lt,allowClear:!1,options:It,placeholder:"\u8BF7\u9009\u62E9",onChange:Lr}))),w.a.createElement("div",{className:le.a.field},jr&&w.a.createElement(N.a.Item,{label:"\u5206\u6570",name:["hack","score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u6570"}],extra:w.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u5206")},w.a.createElement(o.a,{disabled:Lt,min:1,max:100})),w.a.createElement(N.a.Item,{label:w.a.createElement("div",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236 ",w.a.createElement("span",{className:"c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)")),name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],extra:w.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u79D2")},w.a.createElement(o.a,{min:3})),w.a.createElement(N.a.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",name:["hack_codes","language"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},w.a.createElement(_.a,{onChange:Ft},fe(Oe.language)))),w.a.createElement(N.a.Item,{label:w.a.createElement("span",null,"\u77E5\u8BC6\u70B9\uFF1A",w.a.createElement("span",{className:"c-grey-999"},"\uFF08\u6240\u6709\u81EA\u5EFA\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u88ABEduCoder\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u4E3A\u5B98\u65B9\u77E5\u8BC6\u70B9\u540E\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),name:["hack","tag_discipline_ids"]},w.a.createElement(tt.a,{selectvalues:(Ut==null?void 0:Ut.tag_discipline_id)||(Ut==null?void 0:Ut.tag_discipline_ids),disabled:Lt,subId:Vt==null||((lt=Vt.hack)===null||lt===void 0||((ut=lt.sub_discipline_id)===null||ut===void 0))?void 0:ut[1],knowledgeOptions:Yt,onAddKnowledgeFinish:dt})),w.a.createElement(N.a.Item,{label:"\u52A0\u5165\u6587\u4EF6\u5939\u76EE\u5F55",name:["hack","item_banks_group_ids"],labelCol:{span:24},wrapperCol:{span:24}},w.a.createElement(nt.a,{disabled:Lt})),w.a.createElement(N.a.Item,{label:"\u4EFB\u52A1\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},w.a.createElement(ne.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",suffix:w.a.createElement("span",null,60-Ut.name.length)})),w.a.createElement(N.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},w.a.createElement(Y.a,{miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),w.a.createElement("div",{className:"tst-case-info"},w.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," \u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Ut.is_file&&w.a.createElement(I.a,{type:"primary",ghost:!0,onClick:dr},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),w.a.createElement(N.a.Item,{name:["hack","test_set_score"]},w.a.createElement(l.a.Group,{onChange:Rr},w.a.createElement(l.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",w.a.createElement("span",{className:"tip"}," \uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),w.a.createElement(l.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",w.a.createElement("span",{className:"tip"}," \uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),w.a.createElement(h.a,{style:{marginBottom:"5px"},checked:kt,onChange:Jt},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),w.a.createElement(N.a.Item,{className:le.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},w.a.createElement(l.a.Group,{onChange:rr},w.a.createElement(x.a,{direction:"horizontal"},w.a.createElement(l.a,{value:!1},"\u6587\u672C"),w.a.createElement(l.a,{value:!0},"\u6587\u4EF6")))),!Ut.test_set_score&&w.a.createElement(N.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},w.a.createElement(l.a.Group,{onChange:Tt},w.a.createElement(l.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),w.a.createElement(l.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),!Ut.test_set_score&&w.a.createElement("div",{style:{marginBottom:"20px",marginTop:"-10px"}},w.a.createElement("div",{style:{display:"flex",height:"30px",marginBottom:"10px"}},w.a.createElement(h.a,{checked:Fr,style:{display:"flex",alignItems:"center"},className:le.a.checkboxs,onChange:function(Pe){et(Pe.target.checked),ct.setFieldsValue({hack:{code_compile_score:0}}),Ut.test_set_average&&(Ut.is_file?hr(pt):xt())}},"\u542F\u7528\u7F16\u8BD1\u901A\u8FC7\u5373\u53EF\u5F97\u5206"),Fr&&w.a.createElement("span",{style:{display:"flex"}},w.a.createElement(N.a.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7F16\u8BD1\u5F97\u5206"}],name:["hack","code_compile_score"]},w.a.createElement(o.a,{onChange:function(){Ut.test_set_average&&(Ut.is_file?hr(pt):xt())},parser:function(Pe){return isNaN(parseInt(Pe))?"":parseInt(Pe)},min:0,max:100,style:{width:"90px",margin:"5px 0px"}}))," ",w.a.createElement("span",{style:{display:"flex",alignItems:"center",marginLeft:"5px"}},"%"))),w.a.createElement("span",{style:{color:"#999",fontSize:"12px",marginLeft:"-8px"}},"\uFF08\u8BF7\u6CE8\u610F\u8BE5\u5B9E\u8BAD\u9898\u662F\u5426\u6709\u7F16\u8BD1\u8FC7\u7A0B\uFF0C\u82E5\u6CA1\u6709\u5219\u65E0\u6CD5\u83B7\u5F97\u7F16\u8BD1\u5F97\u5206\uFF09")),Ut.is_file&&w.a.createElement("div",{className:le.a.upBtn},w.a.createElement(I.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return oe(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),w.a.createElement(Ke.a,{disabled:Ut==null?void 0:Ut.test_set_average,inputChange:A,showScore:!Ut.test_set_score,data:pt,onRemove:b})),!Ut.is_file&&w.a.createElement(N.a.List,{name:"hack_sets"},function(te,Pe){return Object(O.a)(Pe),w.a.createElement(ce.a,{accordion:!0},te.map(function(Ze,ot){return w.a.createElement(Me,{key:"".concat(Ze.key,"--").concat(ot),header:w.a.createElement("a",{className:le.a["test-case-name"]},w.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",ot+1,"\b"),Kr?null:w.a.createElement(w.a.Fragment,null,w.a.createElement(N.a.Item,{name:[Ze.name,"score"],fieldKey:[Ze.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(ot+1,"\u8BC4\u5206")}]},w.a.createElement(o.a,{onClick:ue,min:0,max:100,disabled:Ot})),w.a.createElement("span",null,"%"))),extra:ot>0?w.a.createElement("div",{onClick:ue},w.a.createElement(i.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(ot+1),onConfirm:function(){mr(ot)}},w.a.createElement(K.a,{className:le.a["btn-remove-case"]}))):null},w.a.createElement(N.a.Item,{label:"\u8F93\u5165",name:[Ze.name,"input"],fieldKey:[Ze.fieldKey,"input"]},w.a.createElement($e,null)),w.a.createElement(N.a.Item,{label:"\u8F93\u51FA",name:[Ze.name,"output"],fieldKey:[Ze.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},w.a.createElement($e,null)))}))}))),w.a.createElement(Ke.b,{rootIdentifier:null,visible:bn,onClose:function(){return oe(!1)},onOK:re}))}},PVpz:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("ETIr"),d("cv67"),d("K3mO"),d("OLod"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.StreamCipher,x=i.algo,m=[],h=[],s=[],l=x.RabbitLegacy=C.extend({_doReset:function(){var o=this._key.words,g=this.cfg.iv,p=this._X=[o[0],o[3]<<16|o[2]>>>16,o[1],o[0]<<16|o[3]>>>16,o[2],o[1]<<16|o[0]>>>16,o[3],o[2]<<16|o[1]>>>16],v=this._C=[o[2]<<16|o[2]>>>16,o[0]&4294901760|o[1]&65535,o[3]<<16|o[3]>>>16,o[1]&4294901760|o[2]&65535,o[0]<<16|o[0]>>>16,o[2]&4294901760|o[3]&65535,o[1]<<16|o[1]>>>16,o[3]&4294901760|o[0]&65535];this._b=0;for(var _=0;_<4;_++)u.call(this);for(var _=0;_<8;_++)v[_]^=p[_+4&7];if(g){var S=g.words,k=S[0],T=S[1],M=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,I=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,j=M>>>16|I&4294901760,D=I<<16|M&65535;v[0]^=M,v[1]^=j,v[2]^=I,v[3]^=D,v[4]^=M,v[5]^=j,v[6]^=I,v[7]^=D;for(var _=0;_<4;_++)u.call(this)}},_doProcessBlock:function(o,g){var p=this._X;u.call(this),m[0]=p[0]^p[5]>>>16^p[3]<<16,m[1]=p[2]^p[7]>>>16^p[5]<<16,m[2]=p[4]^p[1]>>>16^p[7]<<16,m[3]=p[6]^p[3]>>>16^p[1]<<16;for(var v=0;v<4;v++)m[v]=(m[v]<<8|m[v]>>>24)&16711935|(m[v]<<24|m[v]>>>8)&4278255360,o[g+v]^=m[v]},blockSize:128/32,ivSize:64/32});function u(){for(var o=this._X,g=this._C,p=0;p<8;p++)h[p]=g[p];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<h[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<h[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<h[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<h[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<h[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<h[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<h[6]>>>0?1:0)|0,this._b=g[7]>>>0<h[7]>>>0?1:0;for(var p=0;p<8;p++){var v=o[p]+g[p],_=v&65535,S=v>>>16,k=((_*_>>>17)+_*S>>>15)+S*S,T=((v&4294901760)*v|0)+((v&65535)*v|0);s[p]=k^T}o[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,o[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,o[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,o[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,o[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,o[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,o[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,o[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}i.RabbitLegacy=C._createHelper(l)}(),f.RabbitLegacy})},RELg:function(a,G,d){var f=d("MFOe"),i=f.Global;a.exports={name:"oldIE-userDataStorage",write:h,read:s,each:l,remove:u,clearAll:o};var O="storejs",C=i.document,x=v(),m=(i.navigator?i.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function h(_,S){if(m)return;var k=p(_);x(function(T){T.setAttribute(k,S),T.save(O)})}function s(_){if(m)return;var S=p(_),k=null;return x(function(T){k=T.getAttribute(S)}),k}function l(_){x(function(S){for(var k=S.XMLDocument.documentElement.attributes,T=k.length-1;T>=0;T--){var M=k[T];_(S.getAttribute(M.name),M.name)}})}function u(_){var S=p(_);x(function(k){k.removeAttribute(S),k.save(O)})}function o(){x(function(_){var S=_.XMLDocument.documentElement.attributes;_.load(O);for(var k=S.length-1;k>=0;k--)_.removeAttribute(S[k].name);_.save(O)})}var g=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function p(_){return _.replace(/^\d/,"___$&").replace(g,"___")}function v(){if(!C||!C.documentElement||!C.documentElement.addBehavior)return null;var _="script",S,k,T;try{k=new ActiveXObject("htmlfile"),k.open(),k.write("<"+_+">document.w=window</"+_+'><iframe src="/favicon.ico"></iframe>'),k.close(),S=k.w.frames[0].document,T=S.createElement("div")}catch(M){T=C.createElement("div"),S=C.body}return function(M){var I=[].slice.call(arguments,0);I.unshift(T),S.appendChild(T),T.addBehavior("#default#userData"),T.load(O),M.apply(this,I),S.removeChild(T);return}}},RxwV:function(a,G,d){"use strict";var f=d("q1tI"),i=d("uciX"),O=d("2W6z"),C=d.n(O),x=d("4IlW"),m=d("uK0f"),h=d.n(m);function s(fe,ge){if(fe===ge)return!0;if(!fe||!ge)return!1;var q=fe.length;if(ge.length!==q)return!1;for(var ie=0;ie<q;ie++)if(fe[ie]!==ge[ie])return!1;return!0}function l(fe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(q){return typeof q}:l=function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},l(fe)}function u(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function o(fe,ge){for(var q=0;q<ge.length;q++){var ie=ge[q];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(fe,ie.key,ie)}}function g(fe,ge,q){return ge&&o(fe.prototype,ge),q&&o(fe,q),fe}function p(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function");fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,writable:!0,configurable:!0}}),ge&&v(fe,ge)}function v(fe,ge){return v=Object.setPrototypeOf||function(ie,$){return ie.__proto__=$,ie},v(fe,ge)}function _(fe){var ge=T();return function(){var q=M(fe),ie;if(ge){var $=M(this).constructor;ie=Reflect.construct(q,arguments,$)}else ie=q.apply(this,arguments);return S(this,ie)}}function S(fe,ge){return ge&&(l(ge)==="object"||typeof ge=="function")?ge:k(fe)}function k(fe){if(fe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return fe}function T(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(fe){return!1}}function M(fe){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(q){return q.__proto__||Object.getPrototypeOf(q)},M(fe)}var I=function(){var fe=function(ge){p(ie,ge);var q=_(ie);function ie(){var $;return u(this,ie),$=q.apply(this,arguments),$.menuItems={},$.saveMenuItem=function(se){return function(K){$.menuItems[se]=K}},$}return g(ie,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(se){!se.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(se){var K=this.props,Y=K.fieldNames,Ce=K.defaultFieldNames;return Y[se]||Ce[se]}},{key:"getOption",value:function(se,K){var Y=this.props,Ce=Y.prefixCls,Q=Y.expandTrigger,B=Y.expandIcon,E=Y.loadingIcon,U=this.props.onSelect.bind(this,se,K),xe=this.props.onItemDoubleClick.bind(this,se,K),be={onClick:U,onDoubleClick:xe},Te="".concat(Ce,"-menu-item"),Fe=null,Be=se[this.getFieldName("children")]&&se[this.getFieldName("children")].length>0;(Be||se.isLeaf===!1)&&(Te+=" ".concat(Ce,"-menu-item-expand"),se.loading||(Fe=f.createElement("span",{className:"".concat(Ce,"-menu-item-expand-icon")},B))),Q==="hover"&&(Be||se.isLeaf===!1)&&(be={onMouseEnter:this.delayOnSelect.bind(this,U),onMouseLeave:this.delayOnSelect.bind(this),onClick:U}),this.isActiveOption(se,K)&&(Te+=" ".concat(Ce,"-menu-item-active"),be.ref=this.saveMenuItem(K)),se.disabled&&(Te+=" ".concat(Ce,"-menu-item-disabled"));var Ue=null;se.loading&&(Te+=" ".concat(Ce,"-menu-item-loading"),Ue=E||null);var ze="";return"title"in se?ze=se.title:typeof se[this.getFieldName("label")]=="string"&&(ze=se[this.getFieldName("label")]),f.createElement("li",Object.assign({key:se[this.getFieldName("value")],className:Te,title:ze},be,{role:"menuitem",onMouseDown:function(Xe){return Xe.preventDefault()}}),se[this.getFieldName("label")],Fe,Ue)}},{key:"getActiveOptions",value:function(se){var K=this,Y=this.props.options,Ce=se||this.props.activeValue;return h()(Y,function(Q,B){return Q[K.getFieldName("value")]===Ce[B]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var se=this,K=this.props.options,Y=this.getActiveOptions().map(function(Ce){return Ce[se.getFieldName("children")]}).filter(function(Ce){return!!Ce});return Y.unshift(K),Y}},{key:"delayOnSelect",value:function(se){for(var K=this,Y=arguments.length,Ce=new Array(Y>1?Y-1:0),Q=1;Q<Y;Q++)Ce[Q-1]=arguments[Q];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof se=="function"&&(this.delayTimer=window.setTimeout(function(){se(Ce),K.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var se=this.getShowOptions().length,K=0;K<se;K++){var Y=this.menuItems[K];Y&&Y.parentElement&&(Y.parentElement.scrollTop=Y.offsetTop)}}},{key:"isActiveOption",value:function(se,K){var Y=this.props.activeValue,Ce=Y===void 0?[]:Y;return Ce[K]===se[this.getFieldName("value")]}},{key:"render",value:function(){var se=this,K=this.props,Y=K.prefixCls,Ce=K.dropdownMenuColumnStyle;return f.createElement("div",null,this.getShowOptions().map(function(Q,B){return f.createElement("ul",{className:"".concat(Y,"-menu"),key:B,style:Ce},Q.map(function(E){return se.getOption(E,B)}))}))}}]),ie}(f.Component);return fe.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},fe}(),j=I,D={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},y=D;function J(fe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J=function(q){return typeof q}:J=function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},J(fe)}function X(fe,ge){if(fe==null)return{};var q=N(fe,ge),ie,$;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(fe);for($=0;$<se.length;$++){if(ie=se[$],ge.indexOf(ie)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(fe,ie))continue;q[ie]=fe[ie]}}return q}function N(fe,ge){if(fe==null)return{};var q={},ie=Object.keys(fe),$,se;for(se=0;se<ie.length;se++){if($=ie[se],ge.indexOf($)>=0)continue;q[$]=fe[$]}return q}function F(fe){return he(fe)||ce(fe)||Z(fe)||H()}function H(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z(fe,ge){if(!fe)return;if(typeof fe=="string")return V(fe,ge);var q=Object.prototype.toString.call(fe).slice(8,-1);if(q==="Object"&&fe.constructor&&(q=fe.constructor.name),q==="Map"||q==="Set")return Array.from(fe);if(q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(q))return V(fe,ge)}function ce(fe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(fe))return Array.from(fe)}function he(fe){if(Array.isArray(fe))return V(fe)}function V(fe,ge){(ge==null||ge>fe.length)&&(ge=fe.length);for(var q=0,ie=new Array(ge);q<ge;q++)ie[q]=fe[q];return ie}function ve(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ne(fe,ge){for(var q=0;q<ge.length;q++){var ie=ge[q];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(fe,ie.key,ie)}}function W(fe,ge,q){return ge&&ne(fe.prototype,ge),q&&ne(fe,q),fe}function z(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function");fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,writable:!0,configurable:!0}}),ge&&R(fe,ge)}function R(fe,ge){return R=Object.setPrototypeOf||function(ie,$){return ie.__proto__=$,ie},R(fe,ge)}function w(fe){var ge=pe();return function(){var q=ye(fe),ie;if(ge){var $=ye(this).constructor;ie=Reflect.construct(q,arguments,$)}else ie=q.apply(this,arguments);return P(this,ie)}}function P(fe,ge){return ge&&(J(ge)==="object"||typeof ge=="function")?ge:le(fe)}function le(fe){if(fe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return fe}function pe(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(fe){return!1}}function ye(fe){return ye=Object.setPrototypeOf?Object.getPrototypeOf:function(q){return q.__proto__||Object.getPrototypeOf(q)},ye(fe)}var Ee=function(){var fe=function(ge){z(ie,ge);var q=w(ie);function ie($){var se;ve(this,ie),se=q.call(this,$),se.setPopupVisible=function(Y){var Ce=se.state.value;"popupVisible"in se.props||se.setState({popupVisible:Y}),Y&&!se.state.popupVisible&&se.setState({activeValue:Ce}),se.props.onPopupVisibleChange(Y)},se.handleChange=function(Y,Ce,Q){var B=Ce.visible;(Q.type!=="keydown"||Q.keyCode===x.a.ENTER)&&(se.props.onChange(Y.map(function(E){return E[se.getFieldName("value")]}),Y),se.setPopupVisible(B))},se.handlePopupVisibleChange=function(Y){se.setPopupVisible(Y)},se.handleMenuSelect=function(Y,Ce,Q){var B=se.trigger.getRootDomNode();B&&B.focus&&B.focus();var E=se.props,U=E.changeOnSelect,xe=E.loadData,be=E.expandTrigger;if(!Y||Y.disabled)return;var Te=se.state.activeValue;Te=Te.slice(0,Ce+1),Te[Ce]=Y[se.getFieldName("value")];var Fe=se.getActiveOptions(Te);if(Y.isLeaf===!1&&!Y[se.getFieldName("children")]&&xe){U&&se.handleChange(Fe,{visible:!0},Q),se.setState({activeValue:Te}),xe(Fe);return}var Be={};!Y[se.getFieldName("children")]||!Y[se.getFieldName("children")].length?(se.handleChange(Fe,{visible:!1},Q),Be.value=Te):U&&(Q.type==="click"||Q.type==="keydown")&&(be==="hover"?se.handleChange(Fe,{visible:!1},Q):se.handleChange(Fe,{visible:!0},Q),Be.value=Te),Be.activeValue=Te,("value"in se.props||Q.type==="keydown"&&Q.keyCode!==x.a.ENTER)&&delete Be.value,se.setState(Be)},se.handleItemDoubleClick=function(){var Y=se.props.changeOnSelect;Y&&se.setPopupVisible(!1)},se.handleKeyDown=function(Y){var Ce=se.props.children;if(Ce&&Ce.props.onKeyDown){Ce.props.onKeyDown(Y);return}var Q=F(se.state.activeValue),B=Q.length-1<0?0:Q.length-1,E=se.getCurrentLevelOptions(),U=E.map(function(Fe){return Fe[se.getFieldName("value")]}).indexOf(Q[B]);if(Y.keyCode!==x.a.DOWN&&Y.keyCode!==x.a.UP&&Y.keyCode!==x.a.LEFT&&Y.keyCode!==x.a.RIGHT&&Y.keyCode!==x.a.ENTER&&Y.keyCode!==x.a.SPACE&&Y.keyCode!==x.a.BACKSPACE&&Y.keyCode!==x.a.ESC&&Y.keyCode!==x.a.TAB)return;if(!se.state.popupVisible&&Y.keyCode!==x.a.BACKSPACE&&Y.keyCode!==x.a.LEFT&&Y.keyCode!==x.a.RIGHT&&Y.keyCode!==x.a.ESC&&Y.keyCode!==x.a.TAB){se.setPopupVisible(!0);return}if(Y.keyCode===x.a.DOWN||Y.keyCode===x.a.UP){Y.preventDefault();var xe=U;xe!==-1?Y.keyCode===x.a.DOWN?(xe+=1,xe=xe>=E.length?0:xe):(xe-=1,xe=xe<0?E.length-1:xe):xe=0,Q[B]=E[xe][se.getFieldName("value")]}else if(Y.keyCode===x.a.LEFT||Y.keyCode===x.a.BACKSPACE)Y.preventDefault(),Q.splice(Q.length-1,1);else if(Y.keyCode===x.a.RIGHT)Y.preventDefault(),E[U]&&E[U][se.getFieldName("children")]&&Q.push(E[U][se.getFieldName("children")][0][se.getFieldName("value")]);else if(Y.keyCode===x.a.ESC||Y.keyCode===x.a.TAB){se.setPopupVisible(!1);return}(!Q||Q.length===0)&&se.setPopupVisible(!1);var be=se.getActiveOptions(Q),Te=be[be.length-1];se.handleMenuSelect(Te,be.length-1,Y),se.props.onKeyDown&&se.props.onKeyDown(Y)},se.saveTrigger=function(Y){se.trigger=Y};var K=[];return"value"in $?K=$.value||[]:"defaultValue"in $&&(K=$.defaultValue||[]),C()(!("filedNames"in $),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),se.state={popupVisible:$.popupVisible,activeValue:K,value:K,prevProps:$},se.defaultFieldNames={label:"label",value:"value",children:"children"},se}return W(ie,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(se){var K=this.defaultFieldNames,Y=this.props,Ce=Y.fieldNames,Q=Y.filedNames;return"filedNames"in this.props?Q[se]||K[se]:Ce[se]||K[se]}},{key:"getFieldNames",value:function(){var se=this.props,K=se.fieldNames,Y=se.filedNames;return"filedNames"in this.props?Y:K}},{key:"getCurrentLevelOptions",value:function(){var se=this,K=this.props.options,Y=K===void 0?[]:K,Ce=this.state.activeValue,Q=Ce===void 0?[]:Ce,B=h()(Y,function(E,U){return E[se.getFieldName("value")]===Q[U]},{childrenKeyName:this.getFieldName("children")});return B[B.length-2]?B[B.length-2][this.getFieldName("children")]:F(Y).filter(function(E){return!E.disabled})}},{key:"getActiveOptions",value:function(se){var K=this;return h()(this.props.options||[],function(Y,Ce){return Y[K.getFieldName("value")]===se[Ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var se=this.props,K=se.prefixCls,Y=se.transitionName,Ce=se.popupClassName,Q=se.options,B=Q===void 0?[]:Q,E=se.disabled,U=se.builtinPlacements,xe=se.popupPlacement,be=se.children,Te=se.dropdownRender,Fe=X(se,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Be=f.createElement("div",null),Ue="";B&&B.length>0?Be=f.createElement(j,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Ue=" ".concat(K,"-menus-empty");var ze=Be;return Te&&(ze=Te(Be)),f.createElement(i.a,Object.assign({ref:this.saveTrigger},Fe,{popupPlacement:xe,builtinPlacements:U,popupTransitionName:Y,action:E?[]:["click"],popupVisible:E?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(K,"-menus"),popupClassName:Ce+Ue,popup:ze}),f.cloneElement(be,{onKeyDown:this.handleKeyDown,tabIndex:E?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(se,K){var Y=K.prevProps,Ce=Y===void 0?{}:Y,Q={prevProps:se};return"value"in se&&!s(Ce.value,se.value)&&(Q.value=se.value||[],"loadData"in se||(Q.activeValue=se.value||[])),"popupVisible"in se&&(Q.popupVisible=se.popupVisible),Q}}]),ie}(f.Component);return fe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:y,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},fe}(),Oe=Ee,ae=G.a=Oe},S6kV:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.mode.OFB=function(){var i=f.lib.BlockCipherMode.extend(),O=i.Encryptor=i.extend({processBlock:function(C,x){var m=this._cipher,h=m.blockSize,s=this._iv,l=this._keystream;s&&(l=this._keystream=s.slice(0),this._iv=void 0),m.encryptBlock(l,0);for(var u=0;u<h;u++)C[x+u]^=l[u]}});return i.Decryptor=O,i}(),f.mode.OFB})},SJMd:function(a,G){/**
|
|
|
* @license
|
|
|
* Copyright (C) 2006 Google Inc.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
*
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
*
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/var d,f,i,O=!1,C,x;window.PR_SHOULD_USE_CONTINUATION=!0;var m,h;(function(){var s=window,l=["break,continue,do,else,for,if,return,while"],u=[l,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],g=[o,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],p=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],v=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],_="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",S=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],k="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",T=[l,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],M=[l,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],I=[l,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],j=[g,v,p,S,k,T,M,I],D=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,y="str",J="kwd",X="com",N="typ",F="lit",H="pun",Z="pln",ce="tag",he="dec",V="src",ve="atn",ne="atv",W="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function R(Q){for(var B=0,E=!1,U=!1,xe=0,be=Q.length;xe<be;++xe){var Te=Q[xe];if(Te.ignoreCase)U=!0;else if(/[a-z]/i.test(Te.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){E=!0,U=!1;break}}var Fe={b:8,t:9,n:10,v:11,f:12,r:13};function Be(Je){var Ne=Je.charCodeAt(0);if(Ne!==92)return Ne;var tt=Je.charAt(1);return Ne=Fe[tt],Ne||("0"<=tt&&tt<="7"?parseInt(Je.substring(1),8):tt==="u"||tt==="x"?parseInt(Je.substring(2),16):Je.charCodeAt(1))}function Ue(Je){if(Je<32)return(Je<16?"\\x0":"\\x")+Je.toString(16);var Ne=String.fromCharCode(Je);return Ne==="\\"||Ne==="-"||Ne==="]"||Ne==="^"?"\\"+Ne:Ne}function ze(Je){var Ne=Je.substring(1,Je.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),tt=[],nt=Ne[0]==="^",Ke=["["];nt&&Ke.push("^");for(var $e=nt?1:0,je=Ne.length;$e<je;++$e){var Me=Ne[$e];if(/\\[bdsw]/i.test(Me))Ke.push(Me);else{var Ie=Be(Me),_e;$e+2<je&&Ne[$e+1]==="-"?(_e=Be(Ne[$e+2]),$e+=2):_e=Ie,tt.push([Ie,_e]),_e<65||Ie>122||(_e<65||Ie>90||tt.push([Math.max(65,Ie)|32,Math.min(_e,90)|32]),_e<97||Ie>122||tt.push([Math.max(97,Ie)&~32,Math.min(_e,122)&~32]))}}tt.sort(function(He,Ae){return He[0]-Ae[0]||Ae[1]-He[1]});for(var Se=[],ke=[],$e=0;$e<tt.length;++$e){var Re=tt[$e];Re[0]<=ke[1]+1?ke[1]=Math.max(ke[1],Re[1]):Se.push(ke=Re)}for(var $e=0;$e<Se.length;++$e){var Re=Se[$e];Ke.push(Ue(Re[0])),Re[1]>Re[0]&&(Re[1]+1>Re[0]&&Ke.push("-"),Ke.push(Ue(Re[1])))}return Ke.push("]"),Ke.join("")}function Ve(Je){for(var Ne=Je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),tt=Ne.length,nt=[],Ke=0,$e=0;Ke<tt;++Ke){var je=Ne[Ke];if(je==="(")++$e;else if(je.charAt(0)==="\\"){var Me=+je.substring(1);Me&&(Me<=$e?nt[Me]=-1:Ne[Ke]=Ue(Me))}}for(var Ke=1;Ke<nt.length;++Ke)nt[Ke]===-1&&(nt[Ke]=++B);for(var Ke=0,$e=0;Ke<tt;++Ke){var je=Ne[Ke];if(je==="(")++$e,nt[$e]||(Ne[Ke]="(?:");else if(je.charAt(0)==="\\"){var Me=+je.substring(1);Me&&Me<=$e&&(Ne[Ke]="\\"+nt[Me])}}for(var Ke=0;Ke<tt;++Ke)Ne[Ke]==="^"&&Ne[Ke+1]!=="^"&&(Ne[Ke]="");if(Je.ignoreCase&&E)for(var Ke=0;Ke<tt;++Ke){var je=Ne[Ke],Ie=je.charAt(0);je.length>=2&&Ie==="["?Ne[Ke]=ze(je):Ie!=="\\"&&(Ne[Ke]=je.replace(/[a-zA-Z]/g,function(ke){var Re=ke.charCodeAt(0);return"["+String.fromCharCode(Re&~32,Re|32)+"]"}))}return Ne.join("")}for(var Xe=[],xe=0,be=Q.length;xe<be;++xe){var Te=Q[xe];if(Te.global||Te.multiline)throw new Error(""+Te);Xe.push("(?:"+Ve(Te)+")")}return new RegExp(Xe.join("|"),U?"gi":"g")}function w(Q,B){var E=/(?:^|\s)nocode(?:\s|$)/,U=[],xe=0,be=[],Te=0;function Fe(Be){var Ue=Be.nodeType;if(Ue==1){if(E.test(Be.className))return;for(var ze=Be.firstChild;ze;ze=ze.nextSibling)Fe(ze);var Ve=Be.nodeName.toLowerCase();(Ve==="br"||Ve==="li")&&(U[Te]=`
|
|
|
`,be[Te<<1]=xe++,be[Te++<<1|1]=Be)}else if(Ue==3||Ue==4){var Xe=Be.nodeValue;Xe.length&&(B?Xe=Xe.replace(/\r\n?/g,`
|
|
|
`):Xe=Xe.replace(/[ \t\r\n]+/g," "),U[Te]=Xe,be[Te<<1]=xe,xe+=Xe.length,be[Te++<<1|1]=Be)}}return Fe(Q),{sourceCode:U.join("").replace(/\n$/,""),spans:be}}function P(Q,B,E,U,xe){if(!E)return;var be={sourceNode:Q,pre:1,langExtension:null,numberLines:null,sourceCode:E,spans:null,basePos:B,decorations:null};U(be),xe.push.apply(xe,be.decorations)}var le=/\S/;function pe(Q){for(var B=void 0,E=Q.firstChild;E;E=E.nextSibling){var U=E.nodeType;B=U===1?B?Q:E:U===3&&le.test(E.nodeValue)?Q:B}return B===Q?void 0:B}function ye(Q,B){var E={},U;(function(){for(var Te=Q.concat(B),Fe=[],Be={},Ue=0,ze=Te.length;Ue<ze;++Ue){var Ve=Te[Ue],Xe=Ve[3];if(Xe)for(var Je=Xe.length;--Je>=0;)E[Xe.charAt(Je)]=Ve;var Ne=Ve[1],tt=""+Ne;Be.hasOwnProperty(tt)||(Fe.push(Ne),Be[tt]=null)}Fe.push(/[\0-\uffff]/),U=R(Fe)})();var xe=B.length,be=function(Te){for(var Fe=Te.sourceCode,Be=Te.basePos,Ue=Te.sourceNode,ze=[Be,Z],Ve=0,Xe=Fe.match(U)||[],Je={},Ne=0,tt=Xe.length;Ne<tt;++Ne){var nt=Xe[Ne],Ke=Je[nt],$e=void 0,je;if(typeof Ke=="string")je=!1;else{var Me=E[nt.charAt(0)];if(Me)$e=nt.match(Me[1]),Ke=Me[0];else{for(var Ie=0;Ie<xe;++Ie)if(Me=B[Ie],$e=nt.match(Me[1]),$e){Ke=Me[0];break}$e||(Ke=Z)}je=Ke.length>=5&&Ke.substring(0,5)==="lang-",je&&!($e&&typeof $e[1]=="string")&&(je=!1,Ke=V),je||(Je[nt]=Ke)}var _e=Ve;if(Ve+=nt.length,!je)ze.push(Be+_e,Ke);else{var Se=$e[1],ke=nt.indexOf(Se),Re=ke+Se.length;$e[2]&&(Re=nt.length-$e[2].length,ke=Re-Se.length);var He=Ke.substring(5);P(Ue,Be+_e,nt.substring(0,ke),be,ze),P(Ue,Be+_e+ke,Se,ie(He,Se),ze),P(Ue,Be+_e+Re,nt.substring(Re),be,ze)}}Te.decorations=ze};return be}function Ee(Q){var B=[],E=[];Q.tripleQuotedStrings?B.push([y,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Q.multiLineStrings?B.push([y,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):B.push([y,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Q.verbatimStrings&&E.push([y,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var U=Q.hashComments;U&&(Q.cStyleComments?(U>1?B.push([X,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):B.push([X,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),E.push([y,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):B.push([X,/^#[^\r\n]*/,null,"#"])),Q.cStyleComments&&(E.push([X,/^\/\/[^\r\n]*/,null]),E.push([X,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var xe=Q.regexLiterals;if(xe){var be=xe>1?"":`
|
|
|
\r`,Te=be?".":"[\\S\\s]",Fe="/(?=[^/*"+be+"])(?:[^/\\x5B\\x5C"+be+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+be+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";E.push(["lang-regex",RegExp("^"+z+"("+Fe+")")])}var Be=Q.types;Be&&E.push([N,Be]);var Ue=(""+Q.keywords).replace(/^ | $/g,"");Ue.length&&E.push([J,new RegExp("^(?:"+Ue.replace(/[\s,]+/g,"|")+")\\b"),null]),B.push([Z,/^\s+/,null,` \r
|
|
|
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return Q.regexLiterals&&(ze+="(?!s*/)"),E.push([F,/^@[a-z_$][a-z_$@0-9]*/i,null],[N,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Z,/^[a-z_$][a-z_$@0-9]*/i,null],[F,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Z,/^\\[\s\S]?/,null],[H,new RegExp(ze),null]),ye(B,E)}var Oe=Ee({keywords:j,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ae(Q,B,E){for(var U=/(?:^|\s)nocode(?:\s|$)/,xe=/\r\n?|\n/,be=Q.ownerDocument,Te=be.createElement("li");Q.firstChild;)Te.appendChild(Q.firstChild);var Fe=[Te];function Be(Ne){var tt=Ne.nodeType;if(tt==1&&!U.test(Ne.className))if(Ne.nodeName==="br")Ue(Ne),Ne.parentNode&&Ne.parentNode.removeChild(Ne);else for(var nt=Ne.firstChild;nt;nt=nt.nextSibling)Be(nt);else if((tt==3||tt==4)&&E){var Ke=Ne.nodeValue,$e=Ke.match(xe);if($e){var je=Ke.substring(0,$e.index);Ne.nodeValue=je;var Me=Ke.substring($e.index+$e[0].length);if(Me){var Ie=Ne.parentNode;Ie.insertBefore(be.createTextNode(Me),Ne.nextSibling)}Ue(Ne),je||Ne.parentNode.removeChild(Ne)}}}function Ue(Ne){for(;!Ne.nextSibling;)if(Ne=Ne.parentNode,!Ne)return;function tt($e,je){var Me=je?$e.cloneNode(!1):$e,Ie=$e.parentNode;if(Ie){var _e=tt(Ie,1),Se=$e.nextSibling;_e.appendChild(Me);for(var ke=Se;ke;ke=Se)Se=ke.nextSibling,_e.appendChild(ke)}return Me}for(var nt=tt(Ne.nextSibling,0),Ke;(Ke=nt.parentNode)&&Ke.nodeType===1;)nt=Ke;Fe.push(nt)}for(var ze=0;ze<Fe.length;++ze)Be(Fe[ze]);B===(B|0)&&Fe[0].setAttribute("value",B);var Ve=be.createElement("ol");Ve.className="linenums";for(var Xe=Math.max(0,B-1|0)||0,ze=0,Je=Fe.length;ze<Je;++ze)Te=Fe[ze],Te.className="L"+(ze+Xe)%10,Te.firstChild||Te.appendChild(be.createTextNode("\xA0")),Ve.appendChild(Te);Q.appendChild(Ve)}function fe(Q){var B=/\bMSIE\s(\d+)/.exec(navigator.userAgent);B=B&&+B[1]<=8;var E=/\n/g,U=Q.sourceCode,xe=U.length,be=0,Te=Q.spans,Fe=Te.length,Be=0,Ue=Q.decorations,ze=Ue.length,Ve=0;Ue[ze]=xe;var Xe,Je;for(Je=Xe=0;Je<ze;)Ue[Je]!==Ue[Je+2]?(Ue[Xe++]=Ue[Je++],Ue[Xe++]=Ue[Je++]):Je+=2;for(ze=Xe,Je=Xe=0;Je<ze;){for(var Ne=Ue[Je],tt=Ue[Je+1],nt=Je+2;nt+2<=ze&&Ue[nt+1]===tt;)nt+=2;Ue[Xe++]=Ne,Ue[Xe++]=tt,Je=nt}ze=Ue.length=Xe;var Ke=Q.sourceNode,$e="";Ke&&($e=Ke.style.display,Ke.style.display="none");try{for(var je=null;Be<Fe;){var Me=Te[Be],Ie=Te[Be+2]||xe,_e=Ue[Ve+2]||xe,nt=Math.min(Ie,_e),Se=Te[Be+1],ke;if(Se.nodeType!==1&&(ke=U.substring(be,nt))){B&&(ke=ke.replace(E,"\r")),Se.nodeValue=ke;var Re=Se.ownerDocument,He=Re.createElement("span");He.className=Ue[Ve+1];var Ae=Se.parentNode;Ae.replaceChild(He,Se),He.appendChild(Se),be<Ie&&(Te[Be+1]=Se=Re.createTextNode(U.substring(nt,Ie)),Ae.insertBefore(Se,He.nextSibling))}be=nt,be>=Ie&&(Be+=2),be>=_e&&(Ve+=2)}}finally{Ke&&(Ke.style.display=$e)}}var ge={};function q(Q,B){for(var E=B.length;--E>=0;){var U=B[E];ge.hasOwnProperty(U)?s.console&&console.warn("cannot override language handler %s",U):ge[U]=Q}}function ie(Q,B){return Q&&ge.hasOwnProperty(Q)||(Q=/^\s*</.test(B)?"default-markup":"default-code"),ge[Q]}q(Oe,["default-code"]),q(ye([],[[Z,/^[^<?]+/],[he,/^<!\w[^>]*(?:>|$)/],[X,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[H,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),q(ye([[Z,/^[\s]+/,null,` \r
|
|
|
`],[ne,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ce,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[ve,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[H,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),q(ye([],[[ne,/^[\s\S]+/]]),["uq.val"]),q(Ee({keywords:g,hashComments:!0,cStyleComments:!0,types:D}),["c","cc","cpp","cxx","cyc","m"]),q(Ee({keywords:"null,true,false"}),["json"]),q(Ee({keywords:v,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:D}),["cs"]),q(Ee({keywords:p,cStyleComments:!0}),["java"]),q(Ee({keywords:I,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),q(Ee({keywords:T,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),q(Ee({keywords:k,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),q(Ee({keywords:M,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),q(Ee({keywords:S,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),q(Ee({keywords:_,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),q(ye([],[[y,/^[\s\S]+/]]),["regex"]);function $(Q){var B=Q.langExtension;try{var E=w(Q.sourceNode,Q.pre),U=E.sourceCode;Q.sourceCode=U,Q.spans=E.spans,Q.basePos=0,ie(B,U)(Q),fe(Q)}catch(xe){s.console&&console.log(xe&&xe.stack||xe)}}function se(Q,B,E){var U=E||!1,xe=B||null,be=document.createElement("div");be.innerHTML="<pre>"+Q+"</pre>",be=be.firstChild,U&&ae(be,U,!0);var Te={langExtension:xe,numberLines:U,sourceNode:be,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return $(Te),be.innerHTML}function K(Q,B){var E=B||document.body,U=E.ownerDocument||document;function xe(Me){return E.getElementsByTagName(Me)}for(var be=[xe("pre"),xe("code"),xe("xmp")],Te=[],Fe=0;Fe<be.length;++Fe)for(var Be=0,Ue=be[Fe].length;Be<Ue;++Be)Te.push(be[Fe][Be]);be=null;var ze=Date;ze.now||(ze={now:function(){return+new Date}});var Ve=0,Xe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Je=/\bprettyprint\b/,Ne=/\bprettyprinted\b/,tt=/pre|xmp/i,nt=/^code$/i,Ke=/^(?:pre|code|xmp)$/i,$e={};function je(){for(var Me=s.PR_SHOULD_USE_CONTINUATION?ze.now()+250:Infinity;Ve<Te.length&&ze.now()<Me;Ve++){for(var Ie=Te[Ve],_e=$e,Se=Ie;Se=Se.previousSibling;){var ke=Se.nodeType,Re=(ke===7||ke===8)&&Se.nodeValue;if(Re?!/^\??prettify\b/.test(Re):ke!==3||/\S/.test(Se.nodeValue))break;if(Re){_e={},Re.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Yt,It,Ut){_e[It]=Ut});break}}var He=Ie.className;if((_e!==$e||Je.test(He))&&!Ne.test(He)){for(var Ae=!1,Ye=Ie.parentNode;Ye;Ye=Ye.parentNode){var it=Ye.tagName;if(Ke.test(it)&&Ye.className&&Je.test(Ye.className)){Ae=!0;break}}if(!Ae){Ie.className+=" prettyprinted";var lt=_e.lang;if(!lt){lt=He.match(Xe);var ut;!lt&&(ut=pe(Ie))&&nt.test(ut.tagName)&&(lt=ut.className.match(Xe)),lt&&(lt=lt[1])}var ct;if(tt.test(Ie.tagName))ct=1;else{var xt=Ie.currentStyle,dt=U.defaultView,kt=xt?xt.whiteSpace:dt&&dt.getComputedStyle?dt.getComputedStyle(Ie,null).getPropertyValue("white-space"):0;ct=kt&&kt.substring(0,3)==="pre"}var zt=_e.linenums;(zt=zt==="true"||+zt)||(zt=He.match(/\blinenums\b(?::(\d+))?/),zt=zt?zt[1]&&zt[1].length?+zt[1]:!0:!1),zt&&ae(Ie,zt,ct);var Vt={langExtension:lt,sourceNode:Ie,numberLines:zt,pre:ct,sourceCode:null,basePos:null,spans:null,decorations:null};$(Vt)}}}Ve<Te.length?s.setTimeout(je,250):typeof Q=="function"&&Q()}je()}var Y=s.PR={createSimpleLexer:ye,registerLangHandler:q,sourceDecorator:Ee,PR_ATTRIB_NAME:ve,PR_ATTRIB_VALUE:ne,PR_COMMENT:X,PR_DECLARATION:he,PR_KEYWORD:J,PR_LITERAL:F,PR_NOCODE:W,PR_PLAIN:Z,PR_PUNCTUATION:H,PR_SOURCE:V,PR_STRING:y,PR_TAG:ce,PR_TYPE:N,prettyPrintOne:O?s.prettyPrintOne=se:m=se,prettyPrint:h=O?s.prettyPrint=K:h=K},Ce=s.define;typeof Ce=="function"&&Ce.amd&&Ce("google-code-prettify",[],function(){return Y})})()},T1X5:function(a,G){a.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAALdklEQVR4Xu2dC2wc1RVAzx1nDXFiO4SEhqxtxS0JHzX94TS0FEKLALX8WkKbqrRVKQrh15Zfq0IqIaSGSOXb8ktANFJbKqUFWigEAUohfFRQDC1KxS8UR/7wDbZ3TRxix3urN951No7Xnt15M7Mbz0hRImXevffds/PmzXv33StU0KWqTlcfh6mwkCHmq8M8B5oUZosyS6EeOCD7x/Rsl/kjkFJhu8AHGWiXDNuoYqsoW5K1vCkimUpxg5SzoW+r1gylOUGErygci9IC1Fi2uR+hVeA5VZ6tquOpuSL9lnVYE1d2wNo+0jnVylLNcKYKx6EcaK23XgQJH4vyjDg8OCDc3zxd3vXSLKx7ygJYW5seOGUmZ6GcJ8IShaqwHDCeHoEhVTYh3LO7mweam+XjqO2KFNjWPp09VblUlQuAmVE7YwL93SKs2SncMr9WPojK1kiAdWzXpCa40oHlCtOi6nwpegV2ZOBuGeSGxlnSVYoMP21CBfZmnx5SneFagXPzZnJ+7I+y7S6FdQMO1xxWK++HZUgowNzpeIoVKqwCDgqrcyHp6RFlZbKetWF8HgQOrD2liwTuAHdKvj9frVVTuHDuNGkNspOBAWtt1cShC1ilcLlqecz6gnSkkS3CkMBN77zBypYWGQxCXyDAuvq1KTPIeuCYIIyuAJnPOwmWJWuk3bat1oF1pfWMjLKuAqbptn05Wl63I5ybrJOHbCqyCqw9ratEucqMDjaNrGBZqsLqpjpZaasPVhyrqlVdKe5Wcafr8TXKA6KsS9azXESG/DrHN7CODp0qdaxXON2vMftze4F/aJpljY2y008/fQFr69EZCYeH3ZX0+JrQA2ZHYDDDac0HSe+ENxe4oWRg2SfriRhWca53t3HSnFTqk1YSMPedleZv8TBYHKzc3WZ4TNbxrVLeaSUB6+zV38cTjNJgjUBT1jXMkB8XK6VoYNmp+9XFKorv39cDKlxX7JS/KGDZj+K/x99Z1n5+6gjfLObj2jOw7HLTv+MVDGuwcoK6nQSf97qM5QmYWcj9xHyensRrg9YpjRL4/HtbOd7LgrEnYF1p/U1G+XnQVk9m+Y5wfbJOfjGRDyYEZvazHOFfk2WLZCKHBfX/Zmsmo3ypqV42j6djXGBmp7gzzQuTYPMxKA7Fym1tqGPxeDvX4wLr7NULVdzd4vgKyQOiXNQwQ+4spK4gMBMwc0CG1/bDGIyQXF+ymp5dDkcUCuwpCKwzpXcqbrxgfIXsAYU1TfVy4VhqxwRm4gZJ8L/9IBQtZFdbU7eLQT41VtzjmMDaU3qzwKXW1MeCivaAwi1N9XLZ6Ib7AHPDpzO0hRmR+/L78Ict8J93IT1QdN+sN6irhs/NgR8uhM8eYl28J4EmwninQ/PosPB9gHWmdZUqoS3u/uUVuPEFKMcDWg5wxWL4zlGefGz9JhGuaxgVD7IXsOwpEhMvHsrBBPNknf9IecLKed9Au+vUyJ607t3dJPNPzewFrCOl3wPutf5TKSDwio3wdF7k3imfhMNnugGZkV2q8Ho3PPbWHhOOb4IbT4zMpHMa6+XPOe17A+vVjQhfC8u0E+/d884ysH69JCzNE+v51aY90Mw7beM5E7cJ5A7ln40zZOTnMgLMnHxMDNEZ5mG6RSbcNHv9tAV+sDCQLpck9I9b4Hd5UfKbIwrgM4cKB6toyJ0EHQHWkdJLgFtL6l2JjfKB/WwRfP/TJQoKoNmf/gu/zVuGjQqY6ZrjcEmyVm43/x4B1pnSxxVOCqDvBUXGwLx5W+CJhno5eQSYe1q/jw/DPgAeA/MGDOHjqloONtkN3CesI6XfAB7x2NzabV6B3fca3LoZ+ndbU+0KmpaAn7TA0iP2lVtOQ2LWulMb62WDC6wzrdfp8CGGUC+vwL56L3wU0ArI9Gp4cowZYLkBE2F1Q51cPfyEpXUTyvGh0gK8ArvgUXgxoGwZX5gDa79eAU+Y8HRjnSyR7K5yXwAZZibk7xXYjkHY2Abmb5uXGRJPnAfTqisAGPQ31FErnWldoMrrNh3hVZZXYF7l2byv3IZEd4YoHC4dfbqUDPfZ7KxXWTEwr57K3udwtnT06i8RVhfZ1MrtMbAi3ahcJe1pXSPKiiKbWrk9BlacG1VYa95hG1QZY55UnLBS7vYK7JXtwxuc/ZYnHTWJ4U3Ko2ZVxKTDvMMelY60bs7mISzF577aeAV25l/h7Y98qSrYeO50ePDblQHMzevYmVITDjAvGHeMLzUGVpzXBbZJR0p7gBnFNbVzt1dgr+aGRMtLUzVThofEI8cYEh9/C1ZuGu7n7BrYsMxOn31K6TXAdkTx0WwM9wrMZydLaj6UgTtegje64UefgaPnlCTGdqN+A8z8biPJAFrOwGx72pK8oRiYJU+GJMYFFg+JIXnbghp3SOyO6sCD1yFxxwBs3BbA4m91dvE3YcGV4YjoqYhp/YpH4aWAtlfMZGJNJMsGxRMentZXwIdzFBuYxbszhBbuh3MFLE25IQKtwSxNmRCBs8cIEQjB/UWrcJem4sXfvf32Qhdc8jjcdjIsThbt00AbuIu/8fZK5QDDbK/EG5gVBMxsYMYhApUDzA0RqIQgnEBfDKOEl/E7bDgIx9hb7mFuMTA3qH44zM04o9wDSWNgbsRUXiBpmYdq2wZmhr1C16sfwu0vwsVHw5EHF74vgin/nlDtcjgMEeb5sPw1zFJ/DKEePxp9GMIdFiM4bhTVCUyvT9gR4zxhx4T4Ub3PcSMDrKtPL85kuK3UX1wp7fyccTaHGE5uBhP5ZPMqx1nimAf6ojgy+/J7cP6G0rMILJ4Lt51iExeUG7CCR2bd6X3Ih9KNTj95OmZOhce+u38Do9ChdBdYyGkfcq4uJRPO9ARc9kU4Y8F+DgwKp30IO7GKXVfbkVZmQ+L4iVWyH9Ghpi6y42Z7UsoJ2ISpi0y3o0gOZs/d/iWVCzDPycFMl+P0e/7B+5XgOf2eO/mIE1z69bff9sUluMw+ZXdKnELWr+NLal90ClmjJU7SXJKvbTQqLUmzO2OM06DbAFCUjJLToBstcaGBonxt42Z/hQay77K4lIcNFBPIsFLKI6cjLpYTBjGub7RRLMeYGpejChyY3XJUxty44Ftg0OwXfMsbGs/IKHFJRXvsgiupmLMxLlpqkVbQRUtzpsZlgf1Dk7DKAme/z+LC2z6YhV54210g7tCpUkdc2r5IcJGUts/Z2NajMxIODyscW6Tdk/J2A2sww2nNB0lvqQ7wXTQj+6StVzi9VCMmQzszDGqaZY2NstNPf30DM8qfVJ0yP8VdKkRUP8GPC4JvayYYyXqWi8iQX21WgI2a8pvs3Fbl+u1khO1VhdVNo0pK+bHHumO70mo+rk1VlVBKWvnpfMBtux3h3GSdPGRTj3VgectY64FjbBpbQbKedxIsS9ZIXrEtO9YHAsyYZhaMD13AKoXLJ0uVdbNFInDTO2+wsqVFLOdPHQYeGLCR91pKFwlu8e4WO7+xspXSqnDRRKXp/VofODBjoNm57kqxQoVVUeW18uuocdr3iLIyWc/a8UrS29IfCrCcsSawpzrDtYI7/T/AVicikrNLYd2AwzWFqpoHYVeowHIdMHGPmuBKB5aHWX7YhgNNRG4G7pZBbhirMLYNHePJiARYziA3LFy5VJULKuAzoFuENTuFW0bXVg4aUr78SIHlDMmemjkL5TwRloRZh3OCX/OQKpsQ7tndzQP55XnDhFR2wPINMidBq5WlmuFMFY4Lu2qgqYYnyjPi8OCAcH+uWGhUgEbrLYsnrJAz3OwGaU5AOQ6HL2cLItRYdl6/m8AfnlPl2ao6njKlCy3rsCaurIGN7qX7edDHYSosZIj56jDPgSaF2aLM0uH8+6YaWG4GugsYEOhVYbvABxlolwzbqGKrKFuStbwZxnTcFrH/A8wNv8JI/KKJAAAAAElFTkSuQmCC"},"VrN/":function(a,G,d){(function(f,i){a.exports=i()})(this,function(){"use strict";var f=navigator.userAgent,i=navigator.platform,O=/gecko\/\d/i.test(f),C=/MSIE \d/.test(f),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(f),m=/Edge\/(\d+)/.exec(f),h=C||x||m,s=h&&(C?document.documentMode||6:+(m||x)[1]),l=!m&&/WebKit\//.test(f),u=l&&/Qt\/\d+\.\d+/.test(f),o=!m&&/Chrome\//.test(f),g=/Opera\//.test(f),p=/Apple Computer/.test(navigator.vendor),v=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(f),_=/PhantomJS/.test(f),S=!m&&/AppleWebKit/.test(f)&&/Mobile\/\w+/.test(f),k=/Android/.test(f),T=S||k||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(f),M=S||/Mac/.test(i),I=/\bCrOS\b/.test(f),j=/win/i.test(i),D=g&&f.match(/Version\/(\d*\.\d*)/);D&&(D=Number(D[1])),D&&D>=15&&(g=!1,l=!0);var y=M&&(u||g&&(D==null||D<12.11)),J=O||h&&s>=9;function X(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var N=function(e,t){var n=e.className,r=X(t).exec(n);if(r){var c=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(c?r[1]+c:"")}};function F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function H(e,t){return F(e).appendChild(t)}function Z(e,t,n,r){var c=document.createElement(e);if(n&&(c.className=n),r&&(c.style.cssText=r),typeof t=="string")c.appendChild(document.createTextNode(t));else if(t)for(var L=0;L<t.length;++L)c.appendChild(t[L]);return c}function ce(e,t,n,r){var c=Z(e,t,n,r);return c.setAttribute("role","presentation"),c}var he;document.createRange?he=function(e,t,n,r){var c=document.createRange();return c.setEnd(r||e,n),c.setStart(e,t),c}:he=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(c){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function V(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ve(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function ne(e,t){var n=e.className;X(t).test(n)||(e.className+=(n?" ":"")+t)}function W(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!X(n[r]).test(t)&&(t+=" "+n[r]);return t}var z=function(e){e.select()};S?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:h&&(z=function(e){try{e.select()}catch(t){}});function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function w(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function P(e,t,n,r,c){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var L=r||0,ee=c||0;;){var de=e.indexOf(" ",L);if(de<0||de>=t)return ee+(t-L);ee+=de-L,ee+=n-ee%n,L=de+1}}var le=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};le.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},le.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function pe(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var ye=50,Ee={toString:function(){return"CodeMirror.Pass"}},Oe={scroll:!1},ae={origin:"*mouse"},fe={origin:"+move"};function ge(e,t,n){for(var r=0,c=0;;){var L=e.indexOf(" ",r);L==-1&&(L=e.length);var ee=L-r;if(L==e.length||c+ee>=t)return r+Math.min(ee,t-c);if(c+=L-r,c+=n-c%n,r=L+1,c>=t)return r}}var q=[""];function ie(e){for(;q.length<=e;)q.push($(q)+" ");return q[e]}function $(e){return e[e.length-1]}function se(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function K(e,t,n){for(var r=0,c=n(t);r<e.length&&n(e[r])<=c;)r++;e.splice(r,0,t)}function Y(){}function Ce(e,t){var n;return Object.create?n=Object.create(e):(Y.prototype=e,n=new Y),t&&w(t,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function B(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function E(e,t){return t?t.source.indexOf("\\w")>-1&&B(e)?!0:t.test(e):B(e)}function U(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var xe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function be(e){return e.charCodeAt(0)>=768&&xe.test(e)}function Te(e,t,n){for(;(n<0?t>0:t<e.length)&&be(e.charAt(t));)t+=n;return t}function Fe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var c=(t+n)/2,L=r<0?Math.ceil(c):Math.floor(c);if(L==t)return e(L)?t:n;e(L)?n=L:t=L+r}}function Be(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var c=!1,L=0;L<e.length;++L){var ee=e[L];(ee.from<n&&ee.to>t||t==n&&ee.to==t)&&(r(Math.max(ee.from,t),Math.min(ee.to,n),ee.level==1?"rtl":"ltr",L),c=!0)}c||r(t,n,"ltr")}var Ue=null;function ze(e,t,n){var r;Ue=null;for(var c=0;c<e.length;++c){var L=e[c];if(L.from<t&&L.to>t)return c;L.to==t&&(L.from!=L.to&&n=="before"?r=c:Ue=c),L.from==t&&(L.from!=L.to&&n!="before"?r=c:Ue=c)}return r!=null?r:Ue}var Ve=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(we){return we<=247?e.charAt(we):1424<=we&&we<=1524?"R":1536<=we&&we<=1785?t.charAt(we-1536):1774<=we&&we<=2220?"r":8192<=we&&we<=8203?"w":we==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,c=/[stwN]/,L=/[LRr]/,ee=/[Lb1n]/,de=/[1n]/;function me(we,De,Le){this.level=we,this.from=De,this.to=Le}return function(we,De){var Le=De=="ltr"?"L":"R";if(we.length==0||De=="ltr"&&!r.test(we))return!1;for(var Ge=we.length,We=[],Qe=0;Qe<Ge;++Qe)We.push(n(we.charCodeAt(Qe)));for(var rt=0,at=Le;rt<Ge;++rt){var ht=We[rt];ht=="m"?We[rt]=at:at=ht}for(var wt=0,ft=Le;wt<Ge;++wt){var Et=We[wt];Et=="1"&&ft=="r"?We[wt]="n":L.test(Et)&&(ft=Et,Et=="r"&&(We[wt]="R"))}for(var Pt=1,At=We[0];Pt<Ge-1;++Pt){var Ht=We[Pt];Ht=="+"&&At=="1"&&We[Pt+1]=="1"?We[Pt]="1":Ht==","&&At==We[Pt+1]&&(At=="1"||At=="n")&&(We[Pt]=At),At=Ht}for(var or=0;or<Ge;++or){var Nr=We[or];if(Nr==",")We[or]="N";else if(Nr=="%"){var pr=void 0;for(pr=or+1;pr<Ge&&We[pr]=="%";++pr);for(var pn=or&&We[or-1]=="!"||pr<Ge&&We[pr]=="1"?"1":"N",ln=or;ln<pr;++ln)We[ln]=pn;or=pr-1}}for(var Sr=0,un=Le;Sr<Ge;++Sr){var Ir=We[Sr];un=="L"&&Ir=="1"?We[Sr]="L":L.test(Ir)&&(un=Ir)}for(var Ar=0;Ar<Ge;++Ar)if(c.test(We[Ar])){var Tr=void 0;for(Tr=Ar+1;Tr<Ge&&c.test(We[Tr]);++Tr);for(var br=(Ar?We[Ar-1]:Le)=="L",cn=(Tr<Ge?We[Tr]:Le)=="L",ki=br==cn?br?"L":"R":Le,Qn=Ar;Qn<Tr;++Qn)We[Qn]=ki;Ar=Tr-1}for(var Gr=[],Rn,Pr=0;Pr<Ge;)if(ee.test(We[Pr])){var sa=Pr;for(++Pr;Pr<Ge&&ee.test(We[Pr]);++Pr);Gr.push(new me(0,sa,Pr))}else{var Fn=Pr,ui=Gr.length,ci=De=="rtl"?1:0;for(++Pr;Pr<Ge&&We[Pr]!="L";++Pr);for(var qr=Fn;qr<Pr;)if(de.test(We[qr])){Fn<qr&&(Gr.splice(ui,0,new me(1,Fn,qr)),ui+=ci);var Ai=qr;for(++qr;qr<Pr&&de.test(We[qr]);++qr);Gr.splice(ui,0,new me(2,Ai,qr)),ui+=ci,Fn=qr}else++qr;Fn<Pr&&Gr.splice(ui,0,new me(1,Fn,Pr))}return De=="ltr"&&(Gr[0].level==1&&(Rn=we.match(/^\s+/))&&(Gr[0].from=Rn[0].length,Gr.unshift(new me(0,0,Rn[0].length))),$(Gr).level==1&&(Rn=we.match(/\s+$/))&&($(Gr).to-=Rn[0].length,Gr.push(new me(0,Ge-Rn[0].length,Ge)))),De=="rtl"?Gr.reverse():Gr}}();function Xe(e,t){var n=e.order;return n==null&&(n=e.order=Ve(e.text,t)),n}var Je=[],Ne=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Je).concat(n)}};function tt(e,t){return e._handlers&&e._handlers[t]||Je}function nt(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,c=r&&r[t];if(c){var L=pe(c,n);L>-1&&(r[t]=c.slice(0,L).concat(c.slice(L+1)))}}}function Ke(e,t){var n=tt(e,t);if(!n.length)return;for(var r=Array.prototype.slice.call(arguments,2),c=0;c<n.length;++c)n[c].apply(null,r)}function $e(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ke(e,n||t.type,e,t),ke(t)||t.codemirrorIgnore}function je(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)pe(n,t[r])==-1&&n.push(t[r])}function Me(e,t){return tt(e,t).length>0}function Ie(e){e.prototype.on=function(t,n){Ne(this,t,n)},e.prototype.off=function(t,n){nt(this,t,n)}}function _e(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Re(e){_e(e),Se(e)}function He(e){return e.target||e.srcElement}function Ae(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),M&&e.ctrlKey&&t==1&&(t=3),t}var Ye=function(){if(h&&s<9)return!1;var e=Z("div");return"draggable"in e||"dragDrop"in e}(),it;function lt(e){if(it==null){var t=Z("span","\u200B");H(e,Z("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(it=t.offsetWidth<=1&&t.offsetHeight>2&&!(h&&s<8))}var n=it?Z("span","\u200B"):Z("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var ut;function ct(e){if(ut!=null)return ut;var t=H(e,document.createTextNode("A\u062EA")),n=he(t,0,1).getBoundingClientRect(),r=he(t,1,2).getBoundingClientRect();return F(e),!n||n.left==n.right?!1:ut=r.right-n.right<3}var xt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var c=e.indexOf(`
|
|
|
`,t);c==-1&&(c=e.length);var L=e.slice(t,e.charAt(c-1)=="\r"?c-1:c),ee=L.indexOf("\r");ee!=-1?(n.push(L.slice(0,ee)),t+=ee+1):(n.push(L),t=c+1)}return n}:function(e){return e.split(/\r\n?|\n/)},dt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},kt=function(){var e=Z("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),zt=null;function Vt(e){if(zt!=null)return zt;var t=H(e,Z("span","x")),n=t.getBoundingClientRect(),r=he(t,0,1).getBoundingClientRect();return zt=Math.abs(n.left-r.left)>1}var Yt={},It={};function Ut(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Yt[e]=t}function jr(e,t){It[e]=t}function Tt(e){if(typeof e=="string"&&It.hasOwnProperty(e))e=It[e];else if(e&&typeof e.name=="string"&&It.hasOwnProperty(e.name)){var t=It[e.name];typeof t=="string"&&(t={name:t}),e=Ce(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Tt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Tt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Rr(e,t){t=Tt(t);var n=Yt[t.name];if(!n)return Rr(e,"text/plain");var r=n(e,t);if(Jt.hasOwnProperty(t.name)){var c=Jt[t.name];for(var L in c){if(!c.hasOwnProperty(L))continue;r.hasOwnProperty(L)&&(r["_"+L]=r[L]),r[L]=c[L]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var ee in t.modeProps)r[ee]=t.modeProps[ee];return r}var Jt={};function rr(e,t){var n=Jt.hasOwnProperty(e)?Jt[e]:Jt[e]={};w(t,n)}function dr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var c=t[r];c instanceof Array&&(c=c.concat([])),n[r]=c}return n}function mr(e,t){for(var n;e.innerMode&&!(n=e.innerMode(t),!n||n.mode==e);)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Lr(e,t,n){return e.startState?e.startState(t,n):!0}var Ft=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ft.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Ft.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ft.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ft.prototype.backUp=function(e){this.pos-=e},Ft.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=P(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?P(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.indentation=function(){return P(this.string,null,this.tabSize)-(this.lineStart?P(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(ee){return n?ee.toLowerCase():ee},c=this.string.substr(this.pos,e.length);if(r(c)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var L=this.string.slice(this.pos).match(e);return L&&L.index>0?null:(L&&t!==!1&&(this.pos+=L[0].length),L)}},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ft.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ft.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function pt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var c=n.children[r],L=c.chunkSize();if(t<L){n=c;break}t-=L}return n.lines[t]}function Xt(e,t,n){var r=[],c=t.line;return e.iter(t.line,n.line+1,function(L){var ee=L.text;c==n.line&&(ee=ee.slice(0,n.ch)),c==t.line&&(ee=ee.slice(t.ch)),r.push(ee),++c}),r}function hr(e,t,n){var r=[];return e.iter(t,n,function(c){r.push(c.text)}),r}function Mt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Lt(e){if(e.parent==null)return null;for(var t=e.parent,n=pe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var c=0;!(r.children[c]==t);++c)n+=r.children[c].chunkSize();return n+t.first}function sr(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var c=e.children[r],L=c.height;if(t<L){e=c;continue e}t-=L,n+=c.chunkSize()}return n}while(!e.lines);for(var ee=0;ee<e.lines.length;++ee){var de=e.lines[ee],me=de.height;if(t<me)break;t-=me}return n+ee}function Xr(e,t){return t>=e.first&&t<e.first+e.size}function Fr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(n===void 0&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function Ot(e,t){return e.line-t.line||e.ch-t.ch}function Kr(e,t){return e.sticky==t.sticky&&Ot(e,t)==0}function Or(e){return et(e.line,e.ch)}function dn(e,t){return Ot(e,t)<0?t:e}function bn(e,t){return Ot(e,t)<0?e:t}function oe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function b(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,pt(e,n).text.length):A(t,pt(e,t.line).text.length)}function A(e,t){var n=e.ch;return n==null||n>t?et(e.line,t):n<0?et(e.line,0):e}function re(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=b(e,t[r]);return n}var ue=function(e,t){this.state=e,this.lookAhead=t},te=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};te.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},te.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},te.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},te.fromSaved=function(e,t,n){return t instanceof ue?new te(e,dr(e.mode,t.state),n,t.lookAhead):new te(e,dr(e.mode,t),n)},te.prototype.save=function(e){var t=e!==!1?dr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ue(t,this.maxLookAhead):t};function Pe(e,t,n,r){var c=[e.state.modeGen],L={};Yr(e,t.text,e.doc.mode,n,function(we,De){return c.push(we,De)},L,r);for(var ee=n.state,de=function(we){n.baseTokens=c;var De=e.state.overlays[we],Le=1,Ge=0;n.state=!0,Yr(e,t.text,De.mode,n,function(We,Qe){for(var rt=Le;Ge<We;){var at=c[Le];at>We&&c.splice(Le,1,We,c[Le+1],at),Le+=2,Ge=Math.min(We,at)}if(!Qe)return;if(De.opaque)c.splice(rt,Le-rt,We,"overlay "+Qe),Le=rt+2;else for(;rt<Le;rt+=2){var ht=c[rt+1];c[rt+1]=(ht?ht+" ":"")+"overlay "+Qe}},L),n.state=ee,n.baseTokens=null,n.baseTokenPos=1},me=0;me<e.state.overlays.length;++me)de(me);return{styles:c,classes:L.bgClass||L.textClass?L:null}}function Ze(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ot(e,Lt(t)),c=t.text.length>e.options.maxHighlightLength&&dr(e.doc.mode,r.state),L=Pe(e,t,r);c&&(r.state=c),t.stateAfter=r.save(!c),t.styles=L.styles,L.classes?t.styleClasses=L.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ot(e,t,n){var r=e.doc,c=e.display;if(!r.mode.startState)return new te(r,!0,t);var L=fr(e,t,n),ee=L>r.first&&pt(r,L-1).stateAfter,de=ee?te.fromSaved(r,ee,L):new te(r,Lr(r.mode),L);return r.iter(L,t,function(me){yt(e,me.text,de);var we=de.line;me.stateAfter=we==t-1||we%5==0||we>=c.viewFrom&&we<c.viewTo?de.save():null,de.nextLine()}),n&&(r.modeFrontier=de.line),de}function yt(e,t,n,r){var c=e.doc.mode,L=new Ft(t,e.options.tabSize,n);for(L.start=L.pos=r||0,t==""&&qe(c,n.state);!L.eol();)Nt(c,L,n.state),L.start=L.pos}function qe(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var n=mr(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}function Nt(e,t,n,r){for(var c=0;c<10;c++){r&&(r[0]=mr(e,n).mode);var L=e.token(t,n);if(t.pos>t.start)return L}throw new Error("Mode "+e.name+" failed to advance stream.")}var Gt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function nr(e,t,n,r){var c=e.doc,L=c.mode,ee;t=b(c,t);var de=pt(c,t.line),me=ot(e,t.line,n),we=new Ft(de.text,e.options.tabSize,me),De;for(r&&(De=[]);(r||we.pos<t.ch)&&!we.eol();)we.start=we.pos,ee=Nt(L,we,me.state),r&&De.push(new Gt(we,ee,dr(c.mode,me.state)));return r?De:new Gt(we,ee,me.state)}function Vr(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Yr(e,t,n,r,c,L,ee){var de=n.flattenSpans;de==null&&(de=e.options.flattenSpans);var me=0,we=null,De=new Ft(t,e.options.tabSize,r),Le,Ge=e.options.addModeClass&&[null];for(t==""&&Vr(qe(n,r.state),L);!De.eol();){if(De.pos>e.options.maxHighlightLength?(de=!1,ee&&yt(e,t,r,De.pos),De.pos=t.length,Le=null):Le=Vr(Nt(n,De,r.state,Ge),L),Ge){var We=Ge[0].name;We&&(Le="m-"+(Le?We+" "+Le:We))}if(!de||we!=Le){for(;me<De.start;)me=Math.min(De.start,me+5e3),c(me,we);we=Le}De.start=De.pos}for(;me<De.pos;){var Qe=Math.min(De.pos,me+5e3);c(Qe,we),me=Qe}}function fr(e,t,n){for(var r,c,L=e.doc,ee=n?-1:t-(e.doc.mode.innerMode?1e3:100),de=t;de>ee;--de){if(de<=L.first)return L.first;var me=pt(L,de-1),we=me.stateAfter;if(we&&(!n||de+(we instanceof ue?we.lookAhead:0)<=L.modeFrontier))return de;var De=P(me.text,null,e.options.tabSize);(c==null||r>De)&&(c=de-1,r=De)}return c}function Jr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var n=e.first,r=t-1;r>n;r--){var c=pt(e,r).stateAfter;if(c&&(!(c instanceof ue)||r+c.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}var Bn=!1,Br=!1;function Ur(){Bn=!0}function $r(){Br=!0}function On(e,t,n){this.marker=e,this.from=t,this.to=n}function en(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function xn(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function hn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function qn(e,t,n){var r;if(e)for(var c=0;c<e.length;++c){var L=e[c],ee=L.marker,de=L.from==null||(ee.inclusiveLeft?L.from<=t:L.from<t);if(de||L.from==t&&ee.type=="bookmark"&&(!n||!L.marker.insertLeft)){var me=L.to==null||(ee.inclusiveRight?L.to>=t:L.to>t);(r||(r=[])).push(new On(ee,L.from,me?null:L.to))}}return r}function Un(e,t,n){var r;if(e)for(var c=0;c<e.length;++c){var L=e[c],ee=L.marker,de=L.to==null||(ee.inclusiveRight?L.to>=t:L.to>t);if(de||L.from==t&&ee.type=="bookmark"&&(!n||L.marker.insertLeft)){var me=L.from==null||(ee.inclusiveLeft?L.from<=t:L.from<t);(r||(r=[])).push(new On(ee,me?null:L.from-t,L.to==null?null:L.to-t))}}return r}function mn(e,t){if(t.full)return null;var n=Xr(e,t.from.line)&&pt(e,t.from.line).markedSpans,r=Xr(e,t.to.line)&&pt(e,t.to.line).markedSpans;if(!n&&!r)return null;var c=t.from.ch,L=t.to.ch,ee=Ot(t.from,t.to)==0,de=qn(n,c,ee),me=Un(r,L,ee),we=t.text.length==1,De=$(t.text).length+(we?c:0);if(de)for(var Le=0;Le<de.length;++Le){var Ge=de[Le];if(Ge.to==null){var We=en(me,Ge.marker);We?we&&(Ge.to=We.to==null?null:We.to+De):Ge.to=c}}if(me)for(var Qe=0;Qe<me.length;++Qe){var rt=me[Qe];if(rt.to!=null&&(rt.to+=De),rt.from==null){var at=en(de,rt.marker);at||(rt.from=De,we&&(de||(de=[])).push(rt))}else rt.from+=De,we&&(de||(de=[])).push(rt)}de&&(de=tn(de)),me&&me!=de&&(me=tn(me));var ht=[de];if(!we){var wt=t.text.length-2,ft;if(wt>0&&de)for(var Et=0;Et<de.length;++Et)de[Et].to==null&&(ft||(ft=[])).push(new On(de[Et].marker,null,null));for(var Pt=0;Pt<wt;++Pt)ht.push(ft);ht.push(me)}return ht}function tn(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Dn(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(We){if(We.markedSpans)for(var Qe=0;Qe<We.markedSpans.length;++Qe){var rt=We.markedSpans[Qe].marker;rt.readOnly&&(!r||pe(r,rt)==-1)&&(r||(r=[])).push(rt)}}),!r)return null;for(var c=[{from:t,to:n}],L=0;L<r.length;++L)for(var ee=r[L],de=ee.find(0),me=0;me<c.length;++me){var we=c[me];if(Ot(we.to,de.from)<0||Ot(we.from,de.to)>0)continue;var De=[me,1],Le=Ot(we.from,de.from),Ge=Ot(we.to,de.to);(Le<0||!ee.inclusiveLeft&&!Le)&&De.push({from:we.from,to:de.from}),(Ge>0||!ee.inclusiveRight&&!Ge)&&De.push({from:de.to,to:we.to}),c.splice.apply(c,De),me+=De.length-3}return c}function Mn(e){var t=e.markedSpans;if(!t)return;for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}function ei(e,t){if(!t)return;for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}function lr(e){return e.inclusiveLeft?-1:0}function Qt(e){return e.inclusiveRight?1:0}function kr(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),c=t.find(),L=Ot(r.from,c.from)||lr(e)-lr(t);if(L)return-L;var ee=Ot(r.to,c.to)||Qt(e)-Qt(t);return ee||t.id-e.id}function $t(e,t){var n=Br&&e.markedSpans,r;if(n)for(var c=void 0,L=0;L<n.length;++L)c=n[L],c.marker.collapsed&&(t?c.from:c.to)==null&&(!r||kr(r,c.marker)<0)&&(r=c.marker);return r}function gr(e){return $t(e,!0)}function st(e){return $t(e,!1)}function mt(e,t){var n=Br&&e.markedSpans,r;if(n)for(var c=0;c<n.length;++c){var L=n[c];L.marker.collapsed&&(L.from==null||L.from<t)&&(L.to==null||L.to>t)&&(!r||kr(r,L.marker)<0)&&(r=L.marker)}return r}function gt(e,t,n,r,c){var L=pt(e,t),ee=Br&&L.markedSpans;if(ee)for(var de=0;de<ee.length;++de){var me=ee[de];if(!me.marker.collapsed)continue;var we=me.marker.find(0),De=Ot(we.from,n)||lr(me.marker)-lr(c),Le=Ot(we.to,r)||Qt(me.marker)-Qt(c);if(De>=0&&Le<=0||De<=0&&Le>=0)continue;if(De<=0&&(me.marker.inclusiveRight&&c.inclusiveLeft?Ot(we.to,n)>=0:Ot(we.to,n)>0)||De>=0&&(me.marker.inclusiveRight&&c.inclusiveLeft?Ot(we.from,r)<=0:Ot(we.from,r)<0))return!0}}function bt(e){for(var t;t=gr(e);)e=t.find(-1,!0).line;return e}function Bt(e){for(var t;t=st(e);)e=t.find(1,!0).line;return e}function vt(e){for(var t,n;t=st(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Dt(e,t){var n=pt(e,t),r=bt(n);return n==r?t:Lt(r)}function ur(e,t){if(t>e.lastLine())return t;var n=pt(e,t),r;if(!ar(e,n))return t;for(;r=st(n);)n=r.find(1,!0).line;return Lt(n)+1}function ar(e,t){var n=Br&&t.markedSpans;if(n)for(var r=void 0,c=0;c<n.length;++c){if(r=n[c],!r.marker.collapsed)continue;if(r.from==null)return!0;if(r.marker.widgetNode)continue;if(r.from==0&&r.marker.inclusiveLeft&&rn(e,t,r))return!0}}function rn(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return rn(e,r.line,en(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var c=void 0,L=0;L<t.markedSpans.length;++L)if(c=t.markedSpans[L],c.marker.collapsed&&!c.marker.widgetNode&&c.from==n.to&&(c.to==null||c.to!=n.from)&&(c.marker.inclusiveLeft||n.marker.inclusiveRight)&&rn(e,t,c))return!0}function xr(e){e=bt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var c=n.lines[r];if(c==e)break;t+=c.height}for(var L=n.parent;L;n=L,L=n.parent)for(var ee=0;ee<L.children.length;++ee){var de=L.children[ee];if(de==n)break;t+=de.height}return t}function wr(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=gr(r);){var c=n.find(0,!0);r=c.from.line,t+=c.from.ch-c.to.ch}for(r=e;n=st(r);){var L=n.find(0,!0);t-=r.text.length-L.from.ch,r=L.to.line,t+=r.text.length-L.to.ch}return t}function nn(e){var t=e.display,n=e.doc;t.maxLine=pt(n,n.first),t.maxLineLength=wr(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var c=wr(r);c>t.maxLineLength&&(t.maxLineLength=c,t.maxLine=r)})}var Wr=function(e,t,n){this.text=e,ei(this,t),this.height=n?n(this):1};Wr.prototype.lineNo=function(){return Lt(this)},Ie(Wr);function Hr(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Mn(e),ei(e,n);var c=r?r(e):1;c!=e.height&&Mt(e,c)}function Nn(e){e.parent=null,Mn(e)}var _t={},Rt={};function St(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Rt:_t;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function jt(e,t){var n=ce("span",null,null,l?"padding-right: .1px":null),r={pre:ce("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var c=0;c<=(t.rest?t.rest.length:0);c++){var L=c?t.rest[c-1]:t.line,ee=void 0;r.pos=0,r.addToken=Zt,ct(e.display.measure)&&(ee=Xe(L,e.doc.direction))&&(r.addToken=er(r.addToken,ee)),r.map=[];var de=t!=e.display.externalMeasured&&Lt(L);Wt(L,r,Ze(e,L,de)),L.styleClasses&&(L.styleClasses.bgClass&&(r.bgClass=W(L.styleClasses.bgClass,r.bgClass||"")),L.styleClasses.textClass&&(r.textClass=W(L.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(lt(e.display.measure))),c==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var me=r.content.lastChild;(/\bcm-tab\b/.test(me.className)||me.querySelector&&me.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ke(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=W(r.pre.className,r.textClass||"")),r}function Kt(e){var t=Z("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,c,L,ee){if(!t)return;var de=e.splitSpaces?Ct(t,e.trailingSpace):t,me=e.cm.state.specialChars,we=!1,De;if(!me.test(t))e.col+=t.length,De=document.createTextNode(de),e.map.push(e.pos,e.pos+t.length,De),h&&s<9&&(we=!0),e.pos+=t.length;else{De=document.createDocumentFragment();for(var Le=0;;){me.lastIndex=Le;var Ge=me.exec(t),We=Ge?Ge.index-Le:t.length-Le;if(We){var Qe=document.createTextNode(de.slice(Le,Le+We));h&&s<9?De.appendChild(Z("span",[Qe])):De.appendChild(Qe),e.map.push(e.pos,e.pos+We,Qe),e.col+=We,e.pos+=We}if(!Ge)break;Le+=We+1;var rt=void 0;if(Ge[0]==" "){var at=e.cm.options.tabSize,ht=at-e.col%at;rt=De.appendChild(Z("span",ie(ht),"cm-tab")),rt.setAttribute("role","presentation"),rt.setAttribute("cm-text"," "),e.col+=ht}else Ge[0]=="\r"||Ge[0]==`
|
|
|
`?(rt=De.appendChild(Z("span",Ge[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),rt.setAttribute("cm-text",Ge[0]),e.col+=1):(rt=e.cm.options.specialCharPlaceholder(Ge[0]),rt.setAttribute("cm-text",Ge[0]),h&&s<9?De.appendChild(Z("span",[rt])):De.appendChild(rt),e.col+=1);e.map.push(e.pos,e.pos+1,rt),e.pos++}}if(e.trailingSpace=de.charCodeAt(t.length-1)==32,n||r||c||we||L||ee){var wt=n||"";r&&(wt+=r),c&&(wt+=c);var ft=Z("span",[De],wt,L);if(ee)for(var Et in ee)ee.hasOwnProperty(Et)&&Et!="style"&&Et!="class"&&ft.setAttribute(Et,ee[Et]);return e.content.appendChild(ft)}e.content.appendChild(De)}function Ct(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",c=0;c<e.length;c++){var L=e.charAt(c);L==" "&&n&&(c==e.length-1||e.charCodeAt(c+1)==32)&&(L="\xA0"),r+=L,n=L==" "}return r}function er(e,t){return function(n,r,c,L,ee,de,me){c=c?c+" cm-force-border":"cm-force-border";for(var we=n.pos,De=we+r.length;;){for(var Le=void 0,Ge=0;Ge<t.length&&!(Le=t[Ge],Le.to>we&&Le.from<=we);Ge++);if(Le.to>=De)return e(n,r,c,L,ee,de,me);e(n,r.slice(0,Le.to-we),c,L,null,de,me),L=null,r=r.slice(Le.to-we),we=Le.to}}}function vr(e,t,n,r){var c=!r&&n.widgetNode;c&&e.map.push(e.pos,e.pos+t,c),!r&&e.cm.display.input.needsContentAttribute&&(c||(c=e.content.appendChild(document.createElement("span"))),c.setAttribute("cm-marker",n.id)),c&&(e.cm.display.input.setUneditable(c),e.content.appendChild(c)),e.pos+=t,e.trailingSpace=!1}function Wt(e,t,n){var r=e.markedSpans,c=e.text,L=0;if(!r){for(var ee=1;ee<n.length;ee+=2)t.addToken(t,c.slice(L,L=n[ee]),St(n[ee+1],t.cm.options));return}for(var de=c.length,me=0,we=1,De="",Le,Ge,We=0,Qe,rt,at,ht,wt;;){if(We==me){Qe=rt=at=Ge="",wt=null,ht=null,We=Infinity;for(var ft=[],Et=void 0,Pt=0;Pt<r.length;++Pt){var At=r[Pt],Ht=At.marker;if(Ht.type=="bookmark"&&At.from==me&&Ht.widgetNode)ft.push(Ht);else if(At.from<=me&&(At.to==null||At.to>me||Ht.collapsed&&At.to==me&&At.from==me)){if(At.to!=null&&At.to!=me&&We>At.to&&(We=At.to,rt=""),Ht.className&&(Qe+=" "+Ht.className),Ht.css&&(Ge=(Ge?Ge+";":"")+Ht.css),Ht.startStyle&&At.from==me&&(at+=" "+Ht.startStyle),Ht.endStyle&&At.to==We&&(Et||(Et=[])).push(Ht.endStyle,At.to),Ht.title&&((wt||(wt={})).title=Ht.title),Ht.attributes)for(var or in Ht.attributes)(wt||(wt={}))[or]=Ht.attributes[or];Ht.collapsed&&(!ht||kr(ht.marker,Ht)<0)&&(ht=At)}else At.from>me&&We>At.from&&(We=At.from)}if(Et)for(var Nr=0;Nr<Et.length;Nr+=2)Et[Nr+1]==We&&(rt+=" "+Et[Nr]);if(!ht||ht.from==me)for(var pr=0;pr<ft.length;++pr)vr(t,0,ft[pr]);if(ht&&(ht.from||0)==me){if(vr(t,(ht.to==null?de+1:ht.to)-me,ht.marker,ht.from==null),ht.to==null)return;ht.to==me&&(ht=!1)}}if(me>=de)break;for(var pn=Math.min(de,We);;){if(De){var ln=me+De.length;if(!ht){var Sr=ln>pn?De.slice(0,pn-me):De;t.addToken(t,Sr,Le?Le+Qe:Qe,at,me+Sr.length==We?rt:"",Ge,wt)}if(ln>=pn){De=De.slice(pn-me),me=pn;break}me=ln,at=""}De=c.slice(L,L=n[we++]),Le=St(n[we++],t.cm.options)}}}function wn(e,t,n){this.line=t,this.rest=vt(t),this.size=this.rest?Lt($(this.rest))-n+1:1,this.node=this.text=null,this.hidden=ar(e,t)}function qt(e,t,n){for(var r=[],c,L=t;L<n;L=c){var ee=new wn(e.doc,pt(e.doc,L),L);c=L+ee.size,r.push(ee)}return r}var yr=null;function Cr(e){yr?yr.ops.push(e):e.ownsGroup=yr={ops:[e],delayedCallbacks:[]}}function on(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var c=e.ops[r];if(c.cursorActivityHandlers)for(;c.cursorActivityCalled<c.cursorActivityHandlers.length;)c.cursorActivityHandlers[c.cursorActivityCalled++].call(null,c.cm)}}while(n<t.length)}function Wn(e,t){var n=e.ownsGroup;if(!n)return;try{on(n)}finally{yr=null,t(n)}}var Pn=null;function Er(e,t){var n=tt(e,t);if(!n.length)return;var r=Array.prototype.slice.call(arguments,2),c;yr?c=yr.delayedCallbacks:Pn?c=Pn:(c=Pn=[],setTimeout(Ri,0));for(var L=function(de){c.push(function(){return n[de].apply(null,r)})},ee=0;ee<n.length;++ee)L(ee)}function Ri(){var e=Pn;Pn=null;for(var t=0;t<e.length;++t)e[t]()}function Di(e,t,n,r){for(var c=0;c<t.changes.length;c++){var L=t.changes[c];L=="text"?to(e,t):L=="gutter"?Cn(e,t,n,r):L=="class"?Ln(e,t):L=="widget"&&ro(e,t,r)}t.changes=null}function Hn(e){return e.node==e.text&&(e.node=Z("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),h&&s<8&&(e.node.style.zIndex=2)),e.node}function zn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Hn(t);t.background=r.insertBefore(Z("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function di(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):jt(e,t)}function to(e,t){var n=t.text.className,r=di(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Ln(e,t)):n&&(t.text.className=n)}function Ln(e,t){zn(e,t),t.line.wrapClass?Hn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Cn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var c=Hn(t);t.gutterBackground=Z("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),c.insertBefore(t.gutterBackground,t.text)}var L=t.line.gutterMarkers;if(e.options.lineNumbers||L){var ee=Hn(t),de=t.gutter=Z("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(de),ee.insertBefore(de,t.text),t.line.gutterClass&&(de.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!L||!L["CodeMirror-linenumbers"])&&(t.lineNumber=de.appendChild(Z("div",Fr(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),L)for(var me=0;me<e.display.gutterSpecs.length;++me){var we=e.display.gutterSpecs[me].className,De=L.hasOwnProperty(we)&&L[we];De&&de.appendChild(Z("div",[De],"CodeMirror-gutter-elt","left: "+r.gutterLeft[we]+"px; width: "+r.gutterWidth[we]+"px"))}}}function ro(e,t,n){t.alignable&&(t.alignable=null);for(var r=X("CodeMirror-linewidget"),c=t.node.firstChild,L=void 0;c;c=L)L=c.nextSibling,r.test(c.className)&&t.node.removeChild(c);hi(e,t,n)}function no(e,t,n,r){var c=di(e,t);return t.text=t.node=c.pre,c.bgClass&&(t.bgClass=c.bgClass),c.textClass&&(t.textClass=c.textClass),Ln(e,t),Cn(e,t,n,r),hi(e,t,r),t.node}function hi(e,t,n){if(En(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)En(e,t.rest[r],t,n,!1)}function En(e,t,n,r,c){if(!t.widgets)return;for(var L=Hn(n),ee=0,de=t.widgets;ee<de.length;++ee){var me=de[ee],we=Z("div",[me.node],"CodeMirror-linewidget"+(me.className?" "+me.className:""));me.handleMouseEvents||we.setAttribute("cm-ignore-events","true"),io(me,we,n,r),e.display.input.setUneditable(we),c&&me.above?L.insertBefore(we,n.gutter||n.text):L.appendChild(we),Er(me,"redraw")}}function io(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var c=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(c-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=c+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function In(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!V(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),H(t.display.measure,Z("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function gn(e,t){for(var n=He(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function Mi(e){return e.lineSpace.offsetTop}function Zr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Gn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=H(e.measure,Z("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function kn(e){return ye-e.display.nativeBarWidth}function ti(e){return e.display.scroller.clientWidth-kn(e)-e.display.barWidth}function Oo(e){return e.display.scroller.clientHeight-kn(e)-e.display.barHeight}function Fs(e,t,n){var r=e.options.lineWrapping,c=r&&ti(e);if(!t.measure.heights||r&&t.measure.width!=c){var L=t.measure.heights=[];if(r){t.measure.width=c;for(var ee=t.text.firstChild.getClientRects(),de=0;de<ee.length-1;de++){var me=ee[de],we=ee[de+1];Math.abs(me.bottom-we.bottom)>2&&L.push((me.bottom+we.top)/2-n.top)}}L.push(n.bottom-n.top)}}function ua(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var c=0;c<e.rest.length;c++)if(Lt(e.rest[c])>n)return{map:e.measure.maps[c],cache:e.measure.caches[c],before:!0}}function Bs(e,t){t=bt(t);var n=Lt(t),r=e.display.externalMeasured=new wn(e.doc,t,n);r.lineN=n;var c=r.built=jt(e,r);return r.text=c.pre,H(e.display.lineMeasure,c.pre),r}function ca(e,t,n,r){return An(e,fi(e,t),n,r)}function ko(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ii(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function fi(e,t){var n=Lt(t),r=ko(e,n);r&&!r.text?r=null:r&&r.changes&&(Di(e,r,n,Po(e)),e.curOp.forceUpdate=!0),r||(r=Bs(e,t));var c=ua(r,t,n);return{line:t,view:r,rect:null,map:c.map,cache:c.cache,before:c.before,hasHeights:!1}}function An(e,t,n,r,c){t.before&&(n=-1);var L=n+(r||""),ee;return t.cache.hasOwnProperty(L)?ee=t.cache[L]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Fs(e,t.view,t.rect),t.hasHeights=!0),ee=Ws(e,t,n,r),ee.bogus||(t.cache[L]=ee)),{left:ee.left,right:ee.right,top:c?ee.rtop:ee.top,bottom:c?ee.rbottom:ee.bottom}}var da={left:0,right:0,top:0,bottom:0};function ha(e,t,n){for(var r,c,L,ee,de,me,we=0;we<e.length;we+=3)if(de=e[we],me=e[we+1],t<de?(c=0,L=1,ee="left"):t<me?(c=t-de,L=c+1):(we==e.length-3||t==me&&e[we+3]>t)&&(L=me-de,c=L-1,t>=me&&(ee="right")),c!=null){if(r=e[we+2],de==me&&n==(r.insertLeft?"left":"right")&&(ee=n),n=="left"&&c==0)for(;we&&e[we-2]==e[we-3]&&e[we-1].insertLeft;)r=e[(we-=3)+2],ee="left";if(n=="right"&&c==me-de)for(;we<e.length-3&&e[we+3]==e[we+4]&&!e[we+5].insertLeft;)r=e[(we+=3)+2],ee="right";break}return{node:r,start:c,end:L,collapse:ee,coverStart:de,coverEnd:me}}function Us(e,t){var n=da;if(t=="left")for(var r=0;r<e.length&&!((n=e[r]).left!=n.right);r++);else for(var c=e.length-1;c>=0&&!((n=e[c]).left!=n.right);c--);return n}function Ws(e,t,n,r){var c=ha(t.map,n,r),L=c.node,ee=c.start,de=c.end,me=c.collapse,we;if(L.nodeType==3){for(var De=0;De<4;De++){for(;ee&&be(t.line.text.charAt(c.coverStart+ee));)--ee;for(;c.coverStart+de<c.coverEnd&&be(t.line.text.charAt(c.coverStart+de));)++de;if(h&&s<9&&ee==0&&de==c.coverEnd-c.coverStart?we=L.parentNode.getBoundingClientRect():we=Us(he(L,ee,de).getClientRects(),r),we.left||we.right||ee==0)break;de=ee,ee=ee-1,me="right"}h&&s<11&&(we=Hs(e.display.measure,we))}else{ee>0&&(me=r="right");var Le;e.options.lineWrapping&&(Le=L.getClientRects()).length>1?we=Le[r=="right"?Le.length-1:0]:we=L.getBoundingClientRect()}if(h&&s<9&&!ee&&(!we||!we.left&&!we.right)){var Ge=L.parentNode.getClientRects()[0];Ge?we={left:Ge.left,right:Ge.left+mi(e.display),top:Ge.top,bottom:Ge.bottom}:we=da}for(var We=we.top-t.rect.top,Qe=we.bottom-t.rect.top,rt=(We+Qe)/2,at=t.view.measure.heights,ht=0;ht<at.length-1&&!(rt<at[ht]);ht++);var wt=ht?at[ht-1]:0,ft=at[ht],Et={left:(me=="right"?we.right:we.left)-t.rect.left,right:(me=="left"?we.left:we.right)-t.rect.left,top:wt,bottom:ft};return!we.left&&!we.right&&(Et.bogus=!0),e.options.singleCursorHeightPerLine||(Et.rtop=We,Et.rbottom=Qe),Et}function Hs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Vt(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function fa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function pa(e){e.display.externalMeasure=null,F(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)fa(e.display.view[t])}function Ni(e){pa(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ma(){return o&&k?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ga(){return o&&k?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ao(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=In(e.widgets[n]));return t}function oo(e,t,n,r,c){if(!c){var L=Ao(t);n.top+=L,n.bottom+=L}if(r=="line")return n;r||(r="local");var ee=xr(t);if(r=="local"?ee+=Mi(e.display):ee-=e.display.viewOffset,r=="page"||r=="window"){var de=e.display.lineSpace.getBoundingClientRect();ee+=de.top+(r=="window"?0:ga());var me=de.left+(r=="window"?0:ma());n.left+=me,n.right+=me}return n.top+=ee,n.bottom+=ee,n}function va(e,t,n){if(n=="div")return t;var r=t.left,c=t.top;if(n=="page")r-=ma(),c-=ga();else if(n=="local"||!n){var L=e.display.sizer.getBoundingClientRect();r+=L.left,c+=L.top}var ee=e.display.lineSpace.getBoundingClientRect();return{left:r-ee.left,top:c-ee.top}}function Ro(e,t,n,r,c){return r||(r=pt(e.doc,t.line)),oo(e,r,ca(e,r,t.ch,c),n)}function _n(e,t,n,r,c,L){r=r||pt(e.doc,t.line),c||(c=fi(e,r));function ee(Qe,rt){var at=An(e,c,Qe,rt?"right":"left",L);return rt?at.left=at.right:at.right=at.left,oo(e,r,at,n)}var de=Xe(r,e.doc.direction),me=t.ch,we=t.sticky;if(me>=r.text.length?(me=r.text.length,we="before"):me<=0&&(me=0,we="after"),!de)return ee(we=="before"?me-1:me,we=="before");function De(Qe,rt,at){var ht=de[rt],wt=ht.level==1;return ee(at?Qe-1:Qe,wt!=at)}var Le=ze(de,me,we),Ge=Ue,We=De(me,Le,we=="before");return Ge!=null&&(We.other=De(me,Ge,we!="before")),We}function ya(e,t){var n=0;t=b(e.doc,t),e.options.lineWrapping||(n=mi(e.display)*t.ch);var r=pt(e.doc,t.line),c=xr(r)+Mi(e.display);return{left:n,right:n,top:c,bottom:c+r.height}}function Do(e,t,n,r,c){var L=et(e,t,n);return L.xRel=c,r&&(L.outside=r),L}function Mo(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Do(r.first,0,null,-1,-1);var c=sr(r,n),L=r.first+r.size-1;if(c>L)return Do(r.first+r.size-1,pt(r,L).text.length,null,1,1);t<0&&(t=0);for(var ee=pt(r,c);;){var de=zs(e,ee,c,t,n),me=mt(ee,de.ch+(de.xRel>0||de.outside>0?1:0));if(!me)return de;var we=me.find(1);if(we.line==c)return we;ee=pt(r,c=we.line)}}function ba(e,t,n,r){r-=Ao(t);var c=t.text.length,L=Fe(function(ee){return An(e,n,ee-1).bottom<=r},c,0);return c=Fe(function(ee){return An(e,n,ee).top>r},L,c),{begin:L,end:c}}function xa(e,t,n,r){n||(n=fi(e,t));var c=oo(e,t,An(e,n,r),"line").top;return ba(e,t,n,c)}function No(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function zs(e,t,n,r,c){c-=xr(t);var L=fi(e,t),ee=Ao(t),de=0,me=t.text.length,we=!0,De=Xe(t,e.doc.direction);if(De){var Le=(e.options.lineWrapping?Xs:Gs)(e,t,n,L,De,r,c);we=Le.level!=1,de=we?Le.from:Le.to-1,me=we?Le.to:Le.from-1}var Ge=null,We=null,Qe=Fe(function(Pt){var At=An(e,L,Pt);return At.top+=ee,At.bottom+=ee,No(At,r,c,!1)?(At.top<=c&&At.left<=r&&(Ge=Pt,We=At),!0):!1},de,me),rt,at,ht=!1;if(We){var wt=r-We.left<We.right-r,ft=wt==we;Qe=Ge+(ft?0:1),at=ft?"after":"before",rt=wt?We.left:We.right}else{!we&&(Qe==me||Qe==de)&&Qe++,at=Qe==0?"after":Qe==t.text.length?"before":An(e,L,Qe-(we?1:0)).bottom+ee<=c==we?"after":"before";var Et=_n(e,et(n,Qe,at),"line",t,L);rt=Et.left,ht=c<Et.top?-1:c>=Et.bottom?1:0}return Qe=Te(t.text,Qe,1),Do(n,Qe,at,ht,r-rt)}function Gs(e,t,n,r,c,L,ee){var de=Fe(function(Le){var Ge=c[Le],We=Ge.level!=1;return No(_n(e,et(n,We?Ge.to:Ge.from,We?"before":"after"),"line",t,r),L,ee,!0)},0,c.length-1),me=c[de];if(de>0){var we=me.level!=1,De=_n(e,et(n,we?me.from:me.to,we?"after":"before"),"line",t,r);No(De,L,ee,!0)&&De.top>ee&&(me=c[de-1])}return me}function Xs(e,t,n,r,c,L,ee){var de=ba(e,t,r,ee),me=de.begin,we=de.end;/\s/.test(t.text.charAt(we-1))&&we--;for(var De=null,Le=null,Ge=0;Ge<c.length;Ge++){var We=c[Ge];if(We.from>=we||We.to<=me)continue;var Qe=We.level!=1,rt=An(e,r,Qe?Math.min(we,We.to)-1:Math.max(me,We.from)).right,at=rt<L?L-rt+1e9:rt-L;(!De||Le>at)&&(De=We,Le=at)}return De||(De=c[c.length-1]),De.from<me&&(De={from:me,to:De.to,level:De.level}),De.to>we&&(De={from:De.from,to:we,level:De.level}),De}var ri;function pi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ri==null){ri=Z("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ri.appendChild(document.createTextNode("x")),ri.appendChild(Z("br"));ri.appendChild(document.createTextNode("x"))}H(e.measure,ri);var n=ri.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),F(e.measure),n||1}function mi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=Z("span","xxxxxxxxxx"),n=Z("pre",[t],"CodeMirror-line-like");H(e.measure,n);var r=t.getBoundingClientRect(),c=(r.right-r.left)/10;return c>2&&(e.cachedCharWidth=c),c||10}function Po(e){for(var t=e.display,n={},r={},c=t.gutters.clientLeft,L=t.gutters.firstChild,ee=0;L;L=L.nextSibling,++ee){var de=e.display.gutterSpecs[ee].className;n[de]=L.offsetLeft+L.clientLeft+c,r[de]=L.clientWidth}return{fixedPos:Lo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Lo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function wa(e){var t=pi(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/mi(e.display)-3);return function(c){if(ar(e.doc,c))return 0;var L=0;if(c.widgets)for(var ee=0;ee<c.widgets.length;ee++)c.widgets[ee].height&&(L+=c.widgets[ee].height);return n?L+(Math.ceil(c.text.length/r)||1)*t:L+t}}function Io(e){var t=e.doc,n=wa(e);t.iter(function(r){var c=n(r);c!=r.height&&Mt(r,c)})}function ni(e,t,n,r){var c=e.display;if(!n&&He(t).getAttribute("cm-not-content")=="true")return null;var L,ee,de=c.lineSpace.getBoundingClientRect();try{L=t.clientX-de.left,ee=t.clientY-de.top}catch(Le){return null}var me=Mo(e,L,ee),we;if(r&&me.xRel>0&&(we=pt(e.doc,me.line).text).length==me.ch){var De=P(we,we.length,e.options.tabSize)-we.length;me=et(me.line,Math.max(0,Math.round((L-Gn(e.display).left)/mi(e.display))-De))}return me}function ii(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function an(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(r=0);var c=e.display;if(r&&n<c.viewTo&&(c.updateLineNumbers==null||c.updateLineNumbers>t)&&(c.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=c.viewTo)Br&&Dt(e.doc,t)<c.viewTo&&Kn(e);else if(n<=c.viewFrom)Br&&ur(e.doc,n+r)>c.viewFrom?Kn(e):(c.viewFrom+=r,c.viewTo+=r);else if(t<=c.viewFrom&&n>=c.viewTo)Kn(e);else if(t<=c.viewFrom){var L=ao(e,n,n+r,1);L?(c.view=c.view.slice(L.index),c.viewFrom=L.lineN,c.viewTo+=r):Kn(e)}else if(n>=c.viewTo){var ee=ao(e,t,t,-1);ee?(c.view=c.view.slice(0,ee.index),c.viewTo=ee.lineN):Kn(e)}else{var de=ao(e,t,t,-1),me=ao(e,n,n+r,1);de&&me?(c.view=c.view.slice(0,de.index).concat(qt(e,de.lineN,me.lineN)).concat(c.view.slice(me.index)),c.viewTo+=r):Kn(e)}var we=c.externalMeasured;we&&(n<we.lineN?we.lineN+=r:t<we.lineN+we.size&&(c.externalMeasured=null))}function Xn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,c=e.display.externalMeasured;if(c&&t>=c.lineN&&t<c.lineN+c.size&&(r.externalMeasured=null),t<r.viewFrom||t>=r.viewTo)return;var L=r.view[ii(e,t)];if(L.node==null)return;var ee=L.changes||(L.changes=[]);pe(ee,n)==-1&&ee.push(n)}function Kn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ao(e,t,n,r){var c=ii(e,t),L,ee=e.display.view;if(!Br||n==e.doc.first+e.doc.size)return{index:c,lineN:n};for(var de=e.display.viewFrom,me=0;me<c;me++)de+=ee[me].size;if(de!=t){if(r>0){if(c==ee.length-1)return null;L=de+ee[c].size-t,c++}else L=de-t;t+=L,n+=L}for(;Dt(e.doc,n)!=n;){if(c==(r<0?0:ee.length-1))return null;n+=r*ee[c-(r<0?1:0)].size,c+=r}return{index:c,lineN:n}}function Ks(e,t,n){var r=e.display,c=r.view;c.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=qt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=qt(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ii(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(qt(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ii(e,n)))),r.viewTo=n}function Ca(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var c=t[r];!c.hidden&&(!c.node||c.changes)&&++n}return n}function Pi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ea(e,t){t===void 0&&(t=!0);for(var n=e.doc,r={},c=r.cursors=document.createDocumentFragment(),L=r.selection=document.createDocumentFragment(),ee=0;ee<n.sel.ranges.length;ee++){if(!t&&ee==n.sel.primIndex)continue;var de=n.sel.ranges[ee];if(de.from().line>=e.display.viewTo||de.to().line<e.display.viewFrom)continue;var me=de.empty();(me||e.options.showCursorWhenSelecting)&&_a(e,de.head,c),me||Vs(e,de,L)}return r}function _a(e,t,n){var r=_n(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),c=n.appendChild(Z("div","\xA0","CodeMirror-cursor"));if(c.style.left=r.left+"px",c.style.top=r.top+"px",c.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var L=n.appendChild(Z("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));L.style.display="",L.style.left=r.other.left+"px",L.style.top=r.other.top+"px",L.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function so(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,n){var r=e.display,c=e.doc,L=document.createDocumentFragment(),ee=Gn(e.display),de=ee.left,me=Math.max(r.sizerWidth,ti(e)-r.sizer.offsetLeft)-ee.right,we=c.direction=="ltr";function De(ft,Et,Pt,At){Et<0&&(Et=0),Et=Math.round(Et),At=Math.round(At),L.appendChild(Z("div",null,"CodeMirror-selected","position: absolute; left: "+ft+`px;
|
|
|
top: `+Et+"px; width: "+(Pt==null?me-ft:Pt)+`px;
|
|
|
height: `+(At-Et)+"px"))}function Le(ft,Et,Pt){var At=pt(c,ft),Ht=At.text.length,or,Nr;function pr(Sr,un){return Ro(e,et(ft,Sr),"div",At,un)}function pn(Sr,un,Ir){var Ar=xa(e,At,null,Sr),Tr=un=="ltr"==(Ir=="after")?"left":"right",br=Ir=="after"?Ar.begin:Ar.end-(/\s/.test(At.text.charAt(Ar.end-1))?2:1);return pr(br,Tr)[Tr]}var ln=Xe(At,c.direction);return Be(ln,Et||0,Pt==null?Ht:Pt,function(Sr,un,Ir,Ar){var Tr=Ir=="ltr",br=pr(Sr,Tr?"left":"right"),cn=pr(un-1,Tr?"right":"left"),ki=Et==null&&Sr==0,Qn=Pt==null&&un==Ht,Gr=Ar==0,Rn=!ln||Ar==ln.length-1;if(cn.top-br.top<=3){var Pr=(we?ki:Qn)&&Gr,sa=(we?Qn:ki)&&Rn,Fn=Pr?de:(Tr?br:cn).left,ui=sa?me:(Tr?cn:br).right;De(Fn,br.top,ui-Fn,br.bottom)}else{var ci,qr,Ai,la;Tr?(ci=we&&ki&&Gr?de:br.left,qr=we?me:pn(Sr,Ir,"before"),Ai=we?de:pn(un,Ir,"after"),la=we&&Qn&&Rn?me:cn.right):(ci=we?pn(Sr,Ir,"before"):de,qr=!we&&ki&&Gr?me:br.right,Ai=!we&&Qn&&Rn?de:cn.left,la=we?pn(un,Ir,"after"):me),De(ci,br.top,qr-ci,br.bottom),br.bottom<cn.top&&De(de,br.bottom,null,cn.top),De(Ai,cn.top,la-Ai,cn.bottom)}(!or||so(br,or)<0)&&(or=br),so(cn,or)<0&&(or=cn),(!Nr||so(br,Nr)<0)&&(Nr=br),so(cn,Nr)<0&&(Nr=cn)}),{start:or,end:Nr}}var Ge=t.from(),We=t.to();if(Ge.line==We.line)Le(Ge.line,Ge.ch,We.ch);else{var Qe=pt(c,Ge.line),rt=pt(c,We.line),at=bt(Qe)==bt(rt),ht=Le(Ge.line,Ge.ch,at?Qe.text.length+1:null).end,wt=Le(We.line,at?0:null,We.ch).start;at&&(ht.top<wt.top-2?(De(ht.right,ht.top,null,ht.bottom),De(de,wt.top,wt.left,wt.bottom)):De(ht.right,ht.top,wt.left-ht.right,ht.bottom)),ht.bottom<wt.top&&De(de,ht.bottom,null,wt.top)}n.appendChild(L)}function jo(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||gi(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Sa(e){e.state.focused||(e.display.input.focus(),Fo(e))}function Ta(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,gi(e))},100)}function Fo(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ke(e,"focus",e,t),e.state.focused=!0,ne(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),jo(e)}function gi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ke(e,"blur",e,t),e.state.focused=!1,N(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function lo(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var c=t.view[r],L=e.options.lineWrapping,ee=void 0,de=0;if(c.hidden)continue;if(h&&s<8){var me=c.node.offsetTop+c.node.offsetHeight;ee=me-n,n=me}else{var we=c.node.getBoundingClientRect();ee=we.bottom-we.top,!L&&c.text.firstChild&&(de=c.text.firstChild.getBoundingClientRect().right-we.left-1)}var De=c.line.height-ee;if((De>.005||De<-.005)&&(Mt(c.line,ee),Oa(c.line),c.rest))for(var Le=0;Le<c.rest.length;Le++)Oa(c.rest[Le]);if(de>e.display.sizerWidth){var Ge=Math.ceil(de/mi(e.display));Ge>e.display.maxLineLength&&(e.display.maxLineLength=Ge,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}function Oa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function uo(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Mi(e));var c=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,L=sr(t,r),ee=sr(t,c);if(n&&n.ensure){var de=n.ensure.from.line,me=n.ensure.to.line;de<L?(L=de,ee=sr(t,xr(pt(t,de))+e.wrapper.clientHeight)):Math.min(me,t.lastLine())>=ee&&(L=sr(t,xr(pt(t,me))-e.wrapper.clientHeight),ee=me)}return{from:L,to:Math.max(ee,L+1)}}function Ys(e,t){if($e(e,"scrollCursorIntoView"))return;var n=e.display,r=n.sizer.getBoundingClientRect(),c=null;if(t.top+r.top<0?c=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(c=!1),c!=null&&!_){var L=Z("div","\u200B",null,`position: absolute;
|
|
|
top: `+(t.top-n.viewOffset-Mi(e.display))+`px;
|
|
|
height: `+(t.bottom-t.top+kn(e)+n.barHeight)+`px;
|
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(L),L.scrollIntoView(c),e.display.lineSpace.removeChild(L)}}function Js(e,t,n,r){r==null&&(r=0);var c;!e.options.lineWrapping&&t==n&&(t=t.ch?et(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,n=t.sticky=="before"?et(t.line,t.ch+1,"before"):t);for(var L=0;L<5;L++){var ee=!1,de=_n(e,t),me=!n||n==t?de:_n(e,n);c={left:Math.min(de.left,me.left),top:Math.min(de.top,me.top)-r,right:Math.max(de.left,me.left),bottom:Math.max(de.bottom,me.bottom)+r};var we=Bo(e,c),De=e.doc.scrollTop,Le=e.doc.scrollLeft;if(we.scrollTop!=null&&(Ii(e,we.scrollTop),Math.abs(e.doc.scrollTop-De)>1&&(ee=!0)),we.scrollLeft!=null&&(oi(e,we.scrollLeft),Math.abs(e.doc.scrollLeft-Le)>1&&(ee=!0)),!ee)break}return c}function $s(e,t){var n=Bo(e,t);n.scrollTop!=null&&Ii(e,n.scrollTop),n.scrollLeft!=null&&oi(e,n.scrollLeft)}function Bo(e,t){var n=e.display,r=pi(e.display);t.top<0&&(t.top=0);var c=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,L=Oo(e),ee={};t.bottom-t.top>L&&(t.bottom=t.top+L);var de=e.doc.height+Zr(n),me=t.top<r,we=t.bottom>de-r;if(t.top<c)ee.scrollTop=me?0:t.top;else if(t.bottom>c+L){var De=Math.min(t.top,(we?de:t.bottom)-L);De!=c&&(ee.scrollTop=De)}var Le=e.options.fixedGutter?0:n.gutters.offsetWidth,Ge=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-Le,We=ti(e)-n.gutters.offsetWidth,Qe=t.right-t.left>We;return Qe&&(t.right=t.left+We),t.left<10?ee.scrollLeft=0:t.left<Ge?ee.scrollLeft=Math.max(0,t.left+Le-(Qe?0:10)):t.right>We+Ge-3&&(ee.scrollLeft=t.right+(Qe?0:10)-We),ee}function Uo(e,t){if(t==null)return;co(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function vi(e){co(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Li(e,t,n){(t!=null||n!=null)&&co(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Zs(e,t){co(e),e.curOp.scrollToPos=t}function co(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ya(e,t.from),r=ya(e,t.to);ka(e,n,r,t.margin)}}function ka(e,t,n,r){var c=Bo(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Li(e,c.scrollLeft,c.scrollTop)}function Ii(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;O||Ho(e,{top:t}),Aa(e,t,!0),O&&Ho(e),Bi(e,100)}function Aa(e,t,n){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!n)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function oi(e,t,n,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)return;e.doc.scrollLeft=t,Pa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ji(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Zr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var ai=function(e,t,n){this.cm=n;var r=this.vert=Z("div",[Z("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),c=this.horiz=Z("div",[Z("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=c.tabIndex=-1,e(r),e(c),Ne(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ne(c,"scroll",function(){c.clientWidth&&t(c.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,h&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ai.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var c=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+c)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var L=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+L)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ai.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ai.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ai.prototype.zeroWidthHack=function(){var e=M&&!v?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new le,this.disableVert=new le},ai.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto";function r(){var c=e.getBoundingClientRect(),L=n=="vert"?document.elementFromPoint(c.right-1,(c.top+c.bottom)/2):document.elementFromPoint((c.right+c.left)/2,c.bottom-1);L!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},ai.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fi=function(){};Fi.prototype.update=function(){return{bottom:0,right:0}},Fi.prototype.setScrollLeft=function(){},Fi.prototype.setScrollTop=function(){},Fi.prototype.clear=function(){};function yi(e,t){t||(t=ji(e));var n=e.display.barWidth,r=e.display.barHeight;Ra(e,t);for(var c=0;c<4&&n!=e.display.barWidth||r!=e.display.barHeight;c++)n!=e.display.barWidth&&e.options.lineWrapping&&lo(e),Ra(e,ji(e)),n=e.display.barWidth,r=e.display.barHeight}function Ra(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var Da={native:ai,null:Fi};function Ma(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Da[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ne(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?oi(e,t):Ii(e,t)},e),e.display.scrollbars.addClass&&ne(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function si(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Qs},Cr(e.curOp)}function li(e){var t=e.curOp;t&&Wn(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;el(n)})}function el(e){for(var t=e.ops,n=0;n<t.length;n++)tl(t[n]);for(var r=0;r<t.length;r++)rl(t[r]);for(var c=0;c<t.length;c++)nl(t[c]);for(var L=0;L<t.length;L++)il(t[L]);for(var ee=0;ee<t.length;ee++)ol(t[ee])}function tl(e){var t=e.cm,n=t.display;sl(t),e.updateMaxLine&&nn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ho(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function rl(e){e.updatedDisplay=e.mustUpdate&&Wo(e.cm,e.update)}function nl(e){var t=e.cm,n=t.display;e.updatedDisplay&&lo(t),e.barMeasure=ji(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ca(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-ti(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function il(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&oi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==ve();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&yi(t,e.barMeasure),e.updatedDisplay&&Go(t,e.barMeasure),e.selectionChanged&&jo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Sa(e.cm)}function ol(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Na(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&Aa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&oi(t,e.scrollLeft,!0,!0),e.scrollToPos){var c=Js(t,b(r,e.scrollToPos.from),b(r,e.scrollToPos.to),e.scrollToPos.margin);Ys(t,c)}var L=e.maybeHiddenMarkers,ee=e.maybeUnhiddenMarkers;if(L)for(var de=0;de<L.length;++de)L[de].lines.length||Ke(L[de],"hide");if(ee)for(var me=0;me<ee.length;++me)ee[me].lines.length&&Ke(ee[me],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ke(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function fn(e,t){if(e.curOp)return t();si(e);try{return t()}finally{li(e)}}function Dr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);si(e);try{return t.apply(e,arguments)}finally{li(e)}}}function Qr(e){return function(){if(this.curOp)return e.apply(this,arguments);si(this);try{return e.apply(this,arguments)}finally{li(this)}}}function Mr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);si(t);try{return e.apply(this,arguments)}finally{li(t)}}}function Bi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var n=+new Date+e.options.workTime,r=ot(e,t.highlightFrontier),c=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(L){if(r.line>=e.display.viewFrom){var ee=L.styles,de=L.text.length>e.options.maxHighlightLength?dr(t.mode,r.state):null,me=Pe(e,L,r,!0);de&&(r.state=de),L.styles=me.styles;var we=L.styleClasses,De=me.classes;De?L.styleClasses=De:we&&(L.styleClasses=null);for(var Le=!ee||ee.length!=L.styles.length||we!=De&&(!we||!De||we.bgClass!=De.bgClass||we.textClass!=De.textClass),Ge=0;!Le&&Ge<ee.length;++Ge)Le=ee[Ge]!=L.styles[Ge];Le&&c.push(r.line),L.stateAfter=r.save(),r.nextLine()}else L.text.length<=e.options.maxHighlightLength&&yt(e,L.text,r),L.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Bi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),c.length&&fn(e,function(){for(var L=0;L<c.length;L++)Xn(e,c[L],"text")})}var ho=function(e,t,n){var r=e.display;this.viewport=t,this.visible=uo(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=ti(e),this.force=n,this.dims=Po(e),this.events=[]};ho.prototype.signal=function(e,t){Me(e,t)&&this.events.push(arguments)},ho.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ke.apply(null,this.events[e])};function sl(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kn(e)+"px",t.scrollbarsClipped=!0)}function ll(e){if(e.hasFocus())return null;var t=ve();if(!t||!V(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&V(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function ul(e){if(!e||!e.activeElt||e.activeElt==ve())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&V(document.body,e.anchorNode)&&V(document.body,e.focusNode)){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Wo(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Kn(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Ca(e)==0)return!1;La(e)&&(Kn(e),t.dims=Po(e));var c=r.first+r.size,L=Math.max(t.visible.from-e.options.viewportMargin,r.first),ee=Math.min(c,t.visible.to+e.options.viewportMargin);n.viewFrom<L&&L-n.viewFrom<20&&(L=Math.max(r.first,n.viewFrom)),n.viewTo>ee&&n.viewTo-ee<20&&(ee=Math.min(c,n.viewTo)),Br&&(L=Dt(e.doc,L),ee=ur(e.doc,ee));var de=L!=n.viewFrom||ee!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ks(e,L,ee),n.viewOffset=xr(pt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var me=Ca(e);if(!de&&me==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var we=ll(e);return me>4&&(n.lineDiv.style.display="none"),cl(e,n.updateLineNumbers,t.dims),me>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ul(we),F(n.cursorDiv),F(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,de&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Bi(e,400)),n.updateLineNumbers=null,!0}function Na(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==ti(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Zr(e.display)-Oo(e),n.top)}),t.visible=uo(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=uo(e.display,e.doc,n));if(!Wo(e,t))break;lo(e);var c=ji(e);Pi(e),yi(e,c),Go(e,c),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ho(e,t){var n=new ho(e,t);if(Wo(e,n)){lo(e),Na(e,n);var r=ji(e);Pi(e),yi(e,r),Go(e,r),n.finish()}}function cl(e,t,n){var r=e.display,c=e.options.lineNumbers,L=r.lineDiv,ee=L.firstChild;function de(Qe){var rt=Qe.nextSibling;return l&&M&&e.display.currentWheelTarget==Qe?Qe.style.display="none":Qe.parentNode.removeChild(Qe),rt}for(var me=r.view,we=r.viewFrom,De=0;De<me.length;De++){var Le=me[De];if(!Le.hidden)if(!Le.node||Le.node.parentNode!=L){var Ge=no(e,Le,we,n);L.insertBefore(Ge,ee)}else{for(;ee!=Le.node;)ee=de(ee);var We=c&&t!=null&&t<=we&&Le.lineNumber;Le.changes&&(pe(Le.changes,"gutter")>-1&&(We=!1),Di(e,Le,we,n)),We&&(F(Le.lineNumber),Le.lineNumber.appendChild(document.createTextNode(Fr(e.options,we)))),ee=Le.node.nextSibling}we+=Le.size}for(;ee;)ee=de(ee)}function zo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Go(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+kn(e)+"px"}function Pa(e){var t=e.display,n=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=Lo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,c=t.gutters.offsetWidth,L=r+"px",ee=0;ee<n.length;ee++)if(!n[ee].hidden){e.options.fixedGutter&&(n[ee].gutter&&(n[ee].gutter.style.left=L),n[ee].gutterBackground&&(n[ee].gutterBackground.style.left=L));var de=n[ee].alignable;if(de)for(var me=0;me<de.length;me++)de[me].style.left=L}e.options.fixedGutter&&(t.gutters.style.left=r+c+"px")}function La(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Fr(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var c=r.measure.appendChild(Z("div",[Z("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),L=c.firstChild.offsetWidth,ee=c.offsetWidth-L;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(L,r.lineGutter.offsetWidth-ee)+1,r.lineNumWidth=r.lineNumInnerWidth+ee,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",zo(e.display),!0}return!1}function Xo(e,t){for(var n=[],r=!1,c=0;c<e.length;c++){var L=e[c],ee=null;if(typeof L!="string"&&(ee=L.style,L=L.className),L=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:L,style:ee})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Ia(e){var t=e.gutters,n=e.gutterSpecs;F(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var c=n[r],L=c.className,ee=c.style,de=t.appendChild(Z("div",null,"CodeMirror-gutter "+L));ee&&(de.style.cssText=ee),L=="CodeMirror-linenumbers"&&(e.lineGutter=de,de.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",zo(e)}function Ui(e){Ia(e.display),an(e),Pa(e)}function dl(e,t,n,r){var c=this;this.input=n,c.scrollbarFiller=Z("div",null,"CodeMirror-scrollbar-filler"),c.scrollbarFiller.setAttribute("cm-not-content","true"),c.gutterFiller=Z("div",null,"CodeMirror-gutter-filler"),c.gutterFiller.setAttribute("cm-not-content","true"),c.lineDiv=ce("div",null,"CodeMirror-code"),c.selectionDiv=Z("div",null,null,"position: relative; z-index: 1"),c.cursorDiv=Z("div",null,"CodeMirror-cursors"),c.measure=Z("div",null,"CodeMirror-measure"),c.lineMeasure=Z("div",null,"CodeMirror-measure"),c.lineSpace=ce("div",[c.measure,c.lineMeasure,c.selectionDiv,c.cursorDiv,c.lineDiv],null,"position: relative; outline: none");var L=ce("div",[c.lineSpace],"CodeMirror-lines");c.mover=Z("div",[L],null,"position: relative"),c.sizer=Z("div",[c.mover],"CodeMirror-sizer"),c.sizerWidth=null,c.heightForcer=Z("div",null,null,"position: absolute; height: "+ye+"px; width: 1px;"),c.gutters=Z("div",null,"CodeMirror-gutters"),c.lineGutter=null,c.scroller=Z("div",[c.sizer,c.heightForcer,c.gutters],"CodeMirror-scroll"),c.scroller.setAttribute("tabIndex","-1"),c.wrapper=Z("div",[c.scrollbarFiller,c.gutterFiller,c.scroller],"CodeMirror"),h&&s<8&&(c.gutters.style.zIndex=-1,c.scroller.style.paddingRight=0),!l&&!(O&&T)&&(c.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(c.wrapper):e(c.wrapper)),c.viewFrom=c.viewTo=t.first,c.reportedViewFrom=c.reportedViewTo=t.first,c.view=[],c.renderedView=null,c.externalMeasured=null,c.viewOffset=0,c.lastWrapHeight=c.lastWrapWidth=0,c.updateLineNumbers=null,c.nativeBarWidth=c.barHeight=c.barWidth=0,c.scrollbarsClipped=!1,c.lineNumWidth=c.lineNumInnerWidth=c.lineNumChars=null,c.alignWidgets=!1,c.cachedCharWidth=c.cachedTextHeight=c.cachedPaddingH=null,c.maxLine=null,c.maxLineLength=0,c.maxLineChanged=!1,c.wheelDX=c.wheelDY=c.wheelStartX=c.wheelStartY=null,c.shift=!1,c.selForContextMenu=null,c.activeTouch=null,c.gutterSpecs=Xo(r.gutters,r.lineNumbers),Ia(c),n.init(c)}var fo=0,vn=null;h?vn=-.53:O?vn=15:o?vn=-.7:p&&(vn=-1/3);function ja(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function hl(e){var t=ja(e);return t.x*=vn,t.y*=vn,t}function Fa(e,t){var n=ja(t),r=n.x,c=n.y,L=e.display,ee=L.scroller,de=ee.scrollWidth>ee.clientWidth,me=ee.scrollHeight>ee.clientHeight;if(!(r&&de||c&&me))return;if(c&&M&&l){e:for(var we=t.target,De=L.view;we!=ee;we=we.parentNode)for(var Le=0;Le<De.length;Le++)if(De[Le].node==we){e.display.currentWheelTarget=we;break e}}if(r&&!O&&!g&&vn!=null){c&&me&&Ii(e,Math.max(0,ee.scrollTop+c*vn)),oi(e,Math.max(0,ee.scrollLeft+r*vn)),(!c||c&&me)&&_e(t),L.wheelStartX=null;return}if(c&&vn!=null){var Ge=c*vn,We=e.doc.scrollTop,Qe=We+L.wrapper.clientHeight;Ge<0?We=Math.max(0,We+Ge-50):Qe=Math.min(e.doc.height,Qe+Ge+50),Ho(e,{top:We,bottom:Qe})}fo<20&&(L.wheelStartX==null?(L.wheelStartX=ee.scrollLeft,L.wheelStartY=ee.scrollTop,L.wheelDX=r,L.wheelDY=c,setTimeout(function(){if(L.wheelStartX==null)return;var rt=ee.scrollLeft-L.wheelStartX,at=ee.scrollTop-L.wheelStartY,ht=at&&L.wheelDY&&at/L.wheelDY||rt&&L.wheelDX&&rt/L.wheelDX;if(L.wheelStartX=L.wheelStartY=null,!ht)return;vn=(vn*fo+ht)/(fo+1),++fo},200)):(L.wheelDX+=r,L.wheelDY+=c))}var yn=function(e,t){this.ranges=e,this.primIndex=t};yn.prototype.primary=function(){return this.ranges[this.primIndex]},yn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!Kr(n.anchor,r.anchor)||!Kr(n.head,r.head))return!1}return!0},yn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new tr(Or(this.ranges[t].anchor),Or(this.ranges[t].head));return new yn(e,this.primIndex)},yn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},yn.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Ot(t,r.from())>=0&&Ot(e,r.to())<=0)return n}return-1};var tr=function(e,t){this.anchor=e,this.head=t};tr.prototype.from=function(){return bn(this.anchor,this.head)},tr.prototype.to=function(){return dn(this.anchor,this.head)},tr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Sn(e,t,n){var r=e&&e.options.selectionsMayTouch,c=t[n];t.sort(function(Ge,We){return Ot(Ge.from(),We.from())}),n=pe(t,c);for(var L=1;L<t.length;L++){var ee=t[L],de=t[L-1],me=Ot(de.to(),ee.from());if(r&&!ee.empty()?me>0:me>=0){var we=bn(de.from(),ee.from()),De=dn(de.to(),ee.to()),Le=de.empty()?ee.from()==ee.head:de.from()==de.head;L<=n&&--n,t.splice(--L,2,new tr(Le?De:we,Le?we:De))}}return new yn(t,n)}function Vn(e,t){return new yn([new tr(e,t||e)],0)}function Yn(e){return e.text?et(e.from.line+e.text.length-1,$(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ba(e,t){if(Ot(e,t.from)<0)return e;if(Ot(e,t.to)<=0)return Yn(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Yn(t).ch-t.to.ch),et(n,r)}function Ko(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var c=e.sel.ranges[r];n.push(new tr(Ba(c.anchor,t),Ba(c.head,t)))}return Sn(e.cm,n,e.sel.primIndex)}function Ua(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function fl(e,t,n){for(var r=[],c=et(e.first,0),L=c,ee=0;ee<t.length;ee++){var de=t[ee],me=Ua(de.from,c,L),we=Ua(Yn(de),c,L);if(c=de.to,L=we,n=="around"){var De=e.sel.ranges[ee],Le=Ot(De.head,De.anchor)<0;r[ee]=new tr(Le?we:me,Le?me:we)}else r[ee]=new tr(me,me)}return new yn(r,e.sel.primIndex)}function Vo(e){e.doc.mode=Rr(e.options,e.doc.modeOption),Wi(e)}function Wi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Bi(e,100),e.state.modeGen++,e.curOp&&an(e)}function Wa(e,t){return t.from.ch==0&&t.to.ch==0&&$(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Yo(e,t,n,r){function c(wt){return n?n[wt]:null}function L(wt,ft,Et){Hr(wt,ft,Et,r),Er(wt,"change",wt,t)}function ee(wt,ft){for(var Et=[],Pt=wt;Pt<ft;++Pt)Et.push(new Wr(we[Pt],c(Pt),r));return Et}var de=t.from,me=t.to,we=t.text,De=pt(e,de.line),Le=pt(e,me.line),Ge=$(we),We=c(we.length-1),Qe=me.line-de.line;if(t.full)e.insert(0,ee(0,we.length)),e.remove(we.length,e.size-we.length);else if(Wa(e,t)){var rt=ee(0,we.length-1);L(Le,Le.text,We),Qe&&e.remove(de.line,Qe),rt.length&&e.insert(de.line,rt)}else if(De==Le)if(we.length==1)L(De,De.text.slice(0,de.ch)+Ge+De.text.slice(me.ch),We);else{var at=ee(1,we.length-1);at.push(new Wr(Ge+De.text.slice(me.ch),We,r)),L(De,De.text.slice(0,de.ch)+we[0],c(0)),e.insert(de.line+1,at)}else if(we.length==1)L(De,De.text.slice(0,de.ch)+we[0]+Le.text.slice(me.ch),c(0)),e.remove(de.line+1,Qe);else{L(De,De.text.slice(0,de.ch)+we[0],c(0)),L(Le,Ge+Le.text.slice(me.ch),We);var ht=ee(1,we.length-1);Qe>1&&e.remove(de.line+1,Qe-1),e.insert(de.line+1,ht)}Er(e,"change",e,t)}function Jn(e,t,n){function r(c,L,ee){if(c.linked)for(var de=0;de<c.linked.length;++de){var me=c.linked[de];if(me.doc==L)continue;var we=ee&&me.sharedHist;if(n&&!we)continue;t(me.doc,we),r(me.doc,c,we)}}r(e,null,!0)}function Ha(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Io(e),Vo(e),za(e),e.options.lineWrapping||nn(e),e.options.mode=t.modeOption,an(e)}function za(e){(e.doc.direction=="rtl"?ne:N)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){fn(e,function(){za(e),an(e)})}function po(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Jo(e,t){var n={from:Or(t.from),to:Yn(t),text:Xt(e,t.from,t.to)};return Ka(e,n,t.from.line,t.to.line+1),Jn(e,function(r){return Ka(r,n,t.from.line,t.to.line+1)},!0),n}function Ga(e){for(;e.length;){var t=$(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return Ga(e.done),$(e.done);if(e.done.length&&!$(e.done).ranges)return $(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),$(e.done)}function Xa(e,t,n,r){var c=e.history;c.undone.length=0;var L=+new Date,ee,de;if((c.lastOp==r||c.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&c.lastModTime>L-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(ee=ml(c,c.lastOp==r)))de=$(ee.changes),Ot(t.from,t.to)==0&&Ot(t.from,de.to)==0?de.to=Yn(t):ee.changes.push(Jo(e,t));else{var me=$(c.done);for((!me||!me.ranges)&&mo(e.sel,c.done),ee={changes:[Jo(e,t)],generation:c.generation},c.done.push(ee);c.done.length>c.undoDepth;)c.done.shift(),c.done[0].ranges||c.done.shift()}c.done.push(n),c.generation=++c.maxGeneration,c.lastModTime=c.lastSelTime=L,c.lastOp=c.lastSelOp=r,c.lastOrigin=c.lastSelOrigin=t.origin,de||Ke(e,"historyAdded")}function gl(e,t,n,r){var c=t.charAt(0);return c=="*"||c=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,t,n,r){var c=e.history,L=r&&r.origin;n==c.lastSelOp||L&&c.lastSelOrigin==L&&(c.lastModTime==c.lastSelTime&&c.lastOrigin==L||gl(e,L,$(c.done),t))?c.done[c.done.length-1]=t:mo(t,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=L,c.lastSelOp=n,r&&r.clearRedo!==!1&&Ga(c.undone)}function mo(e,t){var n=$(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ka(e,t,n,r){var c=t["spans_"+e.id],L=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(ee){ee.markedSpans&&((c||(c=t["spans_"+e.id]={}))[L]=ee.markedSpans),++L})}function yl(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function bl(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],c=0;c<t.text.length;++c)r.push(yl(n[c]));return r}function Va(e,t){var n=bl(e,t),r=mn(e,t);if(!n)return r;if(!r)return n;for(var c=0;c<n.length;++c){var L=n[c],ee=r[c];if(L&&ee){e:for(var de=0;de<ee.length;++de){for(var me=ee[de],we=0;we<L.length;++we)if(L[we].marker==me.marker)continue e;L.push(me)}}else ee&&(n[c]=ee)}return n}function bi(e,t,n){for(var r=[],c=0;c<e.length;++c){var L=e[c];if(L.ranges){r.push(n?yn.prototype.deepCopy.call(L):L);continue}var ee=L.changes,de=[];r.push({changes:de});for(var me=0;me<ee.length;++me){var we=ee[me],De=void 0;if(de.push({from:we.from,to:we.to,text:we.text}),t)for(var Le in we)(De=Le.match(/^spans_(\d+)$/))&&(pe(t,Number(De[1]))>-1&&($(de)[Le]=we[Le],delete we[Le]))}}return r}function $o(e,t,n,r){if(r){var c=e.anchor;if(n){var L=Ot(t,c)<0;L!=Ot(n,c)<0?(c=t,t=n):L!=Ot(t,n)<0&&(t=n)}return new tr(c,t)}else return new tr(n||t,t)}function go(e,t,n,r,c){c==null&&(c=e.cm&&(e.cm.display.shift||e.extend)),zr(e,new yn([$o(e.sel.primary(),t,n,c)],0),r)}function Ya(e,t,n){for(var r=[],c=e.cm&&(e.cm.display.shift||e.extend),L=0;L<e.sel.ranges.length;L++)r[L]=$o(e.sel.ranges[L],t[L],null,c);var ee=Sn(e.cm,r,e.sel.primIndex);zr(e,ee,n)}function Zo(e,t,n,r){var c=e.sel.ranges.slice(0);c[t]=n,zr(e,Sn(e.cm,c,e.sel.primIndex),r)}function Ja(e,t,n,r){zr(e,Vn(t,n),r)}function xl(e,t,n){var r={ranges:t.ranges,update:function(c){this.ranges=[];for(var L=0;L<c.length;L++)this.ranges[L]=new tr(b(e,c[L].anchor),b(e,c[L].head))},origin:n&&n.origin};return Ke(e,"beforeSelectionChange",e,r),e.cm&&Ke(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Sn(e.cm,r.ranges,r.ranges.length-1):t}function $a(e,t,n){var r=e.history.done,c=$(r);c&&c.ranges?(r[r.length-1]=t,vo(e,t,n)):zr(e,t,n)}function zr(e,t,n){vo(e,t,n),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function vo(e,t,n){(Me(e,"beforeSelectionChange")||e.cm&&Me(e.cm,"beforeSelectionChange"))&&(t=xl(e,t,n));var r=n&&n.bias||(Ot(t.primary().head,e.sel.primary().head)<0?-1:1);Za(e,qa(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&vi(e.cm)}function Za(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,je(e.cm)),Er(e,"cursorActivity",e)}function Qa(e){Za(e,qa(e,e.sel,null,!1))}function qa(e,t,n,r){for(var c,L=0;L<t.ranges.length;L++){var ee=t.ranges[L],de=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[L],me=yo(e,ee.anchor,de&&de.anchor,n,r),we=yo(e,ee.head,de&&de.head,n,r);(c||me!=ee.anchor||we!=ee.head)&&(c||(c=t.ranges.slice(0,L)),c[L]=new tr(me,we))}return c?Sn(e.cm,c,t.primIndex):t}function xi(e,t,n,r,c){var L=pt(e,t.line);if(L.markedSpans)for(var ee=0;ee<L.markedSpans.length;++ee){var de=L.markedSpans[ee],me=de.marker,we="selectLeft"in me?!me.selectLeft:me.inclusiveLeft,De="selectRight"in me?!me.selectRight:me.inclusiveRight;if((de.from==null||(we?de.from<=t.ch:de.from<t.ch))&&(de.to==null||(De?de.to>=t.ch:de.to>t.ch))){if(c&&(Ke(me,"beforeCursorEnter"),me.explicitlyCleared))if(L.markedSpans){--ee;continue}else break;if(!me.atomic)continue;if(n){var Le=me.find(r<0?1:-1),Ge=void 0;if((r<0?De:we)&&(Le=es(e,Le,-r,Le&&Le.line==t.line?L:null)),Le&&Le.line==t.line&&(Ge=Ot(Le,n))&&(r<0?Ge<0:Ge>0))return xi(e,Le,t,r,c)}var We=me.find(r<0?-1:1);return(r<0?we:De)&&(We=es(e,We,r,We.line==t.line?L:null)),We?xi(e,We,t,r,c):null}}return t}function yo(e,t,n,r,c){var L=r||1,ee=xi(e,t,n,L,c)||!c&&xi(e,t,n,L,!0)||xi(e,t,n,-L,c)||!c&&xi(e,t,n,-L,!0);return ee||(e.cantEdit=!0,et(e.first,0))}function es(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?b(e,et(t.line-1)):null:n>0&&t.ch==(r||pt(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function ts(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),Oe)}function rs(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(c,L,ee,de){c&&(r.from=b(e,c)),L&&(r.to=b(e,L)),ee&&(r.text=ee),de!==void 0&&(r.origin=de)}),Ke(e,"beforeChange",e,r),e.cm&&Ke(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function wi(e,t,n){if(e.cm){if(!e.cm.curOp)return Dr(e.cm,wi)(e,t,n);if(e.cm.state.suppressEdits)return}if((Me(e,"beforeChange")||e.cm&&Me(e.cm,"beforeChange"))&&(t=rs(e,t,!0),!t))return;var r=Bn&&!n&&Dn(e,t.from,t.to);if(r)for(var c=r.length-1;c>=0;--c)ns(e,{from:r[c].from,to:r[c].to,text:c?[""]:t.text,origin:t.origin});else ns(e,t)}function ns(e,t){if(t.text.length==1&&t.text[0]==""&&Ot(t.from,t.to)==0)return;var n=Ko(e,t);Xa(e,t,n,e.cm?e.cm.curOp.id:NaN),Hi(e,t,n,mn(e,t));var r=[];Jn(e,function(c,L){!L&&pe(r,c.history)==-1&&(ss(c.history,t),r.push(c.history)),Hi(c,t,null,mn(c,t))})}function bo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!n)return;for(var c=e.history,L,ee=e.sel,de=t=="undo"?c.done:c.undone,me=t=="undo"?c.undone:c.done,we=0;we<de.length&&!(L=de[we],n?L.ranges&&!L.equals(e.sel):!L.ranges);we++);if(we==de.length)return;for(c.lastOrigin=c.lastSelOrigin=null;;)if(L=de.pop(),L.ranges){if(mo(L,me),n&&!L.equals(e.sel)){zr(e,L,{clearRedo:!1});return}ee=L}else if(r){de.push(L);return}else break;var De=[];mo(ee,me),me.push({changes:De,generation:c.generation}),c.generation=L.generation||++c.maxGeneration;for(var Le=Me(e,"beforeChange")||e.cm&&Me(e.cm,"beforeChange"),Ge=function(rt){var at=L.changes[rt];if(at.origin=t,Le&&!rs(e,at,!1))return de.length=0,{};De.push(Jo(e,at));var ht=rt?Ko(e,at):$(de);Hi(e,at,ht,Va(e,at)),!rt&&e.cm&&e.cm.scrollIntoView({from:at.from,to:Yn(at)});var wt=[];Jn(e,function(ft,Et){!Et&&pe(wt,ft.history)==-1&&(ss(ft.history,at),wt.push(ft.history)),Hi(ft,at,null,Va(ft,at))})},We=L.changes.length-1;We>=0;--We){var Qe=Ge(We);if(Qe)return Qe.v}}function is(e,t){if(t==0)return;if(e.first+=t,e.sel=new yn(se(e.sel.ranges,function(c){return new tr(et(c.anchor.line+t,c.anchor.ch),et(c.head.line+t,c.head.ch))}),e.sel.primIndex),e.cm){an(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Xn(e.cm,r,"gutter")}}function Hi(e,t,n,r){if(e.cm&&!e.cm.curOp)return Dr(e.cm,Hi)(e,t,n,r);if(t.to.line<e.first){is(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var c=t.text.length-1-(e.first-t.from.line);is(e,c),t={from:et(e.first,0),to:et(t.to.line+c,t.to.ch),text:[$(t.text)],origin:t.origin}}var L=e.lastLine();t.to.line>L&&(t={from:t.from,to:et(L,pt(e,L).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Xt(e,t.from,t.to),n||(n=Ko(e,t)),e.cm?wl(e.cm,t,r):Yo(e,t,r),vo(e,n,Oe),e.cantEdit&&yo(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}function wl(e,t,n){var r=e.doc,c=e.display,L=t.from,ee=t.to,de=!1,me=L.line;e.options.lineWrapping||(me=Lt(bt(pt(r,L.line))),r.iter(me,ee.line+1,function(We){if(We==c.maxLine)return de=!0,!0})),r.sel.contains(t.from,t.to)>-1&&je(e),Yo(r,t,n,wa(e)),e.options.lineWrapping||(r.iter(me,L.line+t.text.length,function(We){var Qe=wr(We);Qe>c.maxLineLength&&(c.maxLine=We,c.maxLineLength=Qe,c.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),Jr(r,L.line),Bi(e,400);var we=t.text.length-(ee.line-L.line)-1;t.full?an(e):L.line==ee.line&&t.text.length==1&&!Wa(e.doc,t)?Xn(e,L.line,"text"):an(e,L.line,ee.line+1,we);var De=Me(e,"changes"),Le=Me(e,"change");if(Le||De){var Ge={from:L,to:ee,text:t.text,removed:t.removed,origin:t.origin};Le&&Er(e,"change",e,Ge),De&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ge)}e.display.selForContextMenu=null}function Ci(e,t,n,r,c){var L;r||(r=n),Ot(r,n)<0&&(L=[r,n],n=L[0],r=L[1]),typeof t=="string"&&(t=e.splitLines(t)),wi(e,{from:n,to:r,text:t,origin:c})}function os(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function as(e,t,n,r){for(var c=0;c<e.length;++c){var L=e[c],ee=!0;if(L.ranges){L.copied||(L=e[c]=L.deepCopy(),L.copied=!0);for(var de=0;de<L.ranges.length;de++)os(L.ranges[de].anchor,t,n,r),os(L.ranges[de].head,t,n,r);continue}for(var me=0;me<L.changes.length;++me){var we=L.changes[me];if(n<we.from.line)we.from=et(we.from.line+r,we.from.ch),we.to=et(we.to.line+r,we.to.ch);else if(t<=we.to.line){ee=!1;break}}ee||(e.splice(0,c+1),c=0)}}function ss(e,t){var n=t.from.line,r=t.to.line,c=t.text.length-(r-n)-1;as(e.done,n,r,c),as(e.undone,n,r,c)}function zi(e,t,n,r){var c=t,L=t;return typeof t=="number"?L=pt(e,oe(e,t)):c=Lt(t),c==null?null:(r(L,c)&&e.cm&&Xn(e.cm,c,n),L)}function Gi(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}Gi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var c=this.lines[n];this.height-=c.height,Nn(c),Er(c,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function Xi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var c=e[r];t+=c.chunkSize(),n+=c.height,c.parent=this}this.size=t,this.height=n,this.parent=null}Xi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],c=r.chunkSize();if(e<c){var L=Math.min(t,c-e),ee=r.height;if(r.removeInner(e,L),this.height-=ee-r.height,c==L&&(this.children.splice(n--,1),r.parent=null),(t-=L)==0)break;e=0}else e-=c}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Gi))){var de=[];this.collapse(de),this.children=[new Gi(de)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var c=this.children[r],L=c.chunkSize();if(e<=L){if(c.insertInner(e,t,n),c.lines&&c.lines.length>50){for(var ee=c.lines.length%25+25,de=ee;de<c.lines.length;){var me=new Gi(c.lines.slice(de,de+=25));c.height-=me.height,this.children.splice(++r,0,me),me.parent=this}c.lines=c.lines.slice(0,ee),this.maybeSpill()}break}e-=L}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Xi(t);if(e.parent){e.size-=n.size,e.height-=n.height;var c=pe(e.parent.children,e);e.parent.children.splice(c+1,0,n)}else{var r=new Xi(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var c=this.children[r],L=c.chunkSize();if(e<L){var ee=Math.min(t,L-e);if(c.iterN(e,ee,n))return!0;if((t-=ee)==0)break;e=0}else e-=L}}};var Ki=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Ki.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Lt(n);if(r==null||!t)return;for(var c=0;c<t.length;++c)t[c]==this&&t.splice(c--,1);t.length||(n.widgets=null);var L=In(this);Mt(n,Math.max(0,n.height-L)),e&&(fn(e,function(){ls(e,n,-L),Xn(e,r,"widget")}),Er(e,"lineWidgetCleared",e,this,r))},Ki.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var c=In(this)-t;if(!c)return;ar(this.doc,r)||Mt(r,r.height+c),n&&fn(n,function(){n.curOp.forceUpdate=!0,ls(n,r,c),Er(n,"lineWidgetChanged",n,e,Lt(r))})},Ie(Ki);function ls(e,t,n){xr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Uo(e,n)}function Cl(e,t,n,r){var c=new Ki(e,n,r),L=e.cm;return L&&c.noHScroll&&(L.display.alignWidgets=!0),zi(e,t,"widget",function(ee){var de=ee.widgets||(ee.widgets=[]);if(c.insertAt==null?de.push(c):de.splice(Math.min(de.length-1,Math.max(0,c.insertAt)),0,c),c.line=ee,L&&!ar(e,ee)){var me=xr(ee)<e.scrollTop;Mt(ee,ee.height+In(c)),me&&Uo(L,c.height),L.curOp.forceUpdate=!0}return!0}),L&&Er(L,"lineWidgetAdded",L,c,typeof t=="number"?t:Lt(t)),c}var us=0,$n=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++us};$n.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&si(e),Me(this,"clear")){var n=this.find();n&&Er(this,"clear",n.from,n.to)}for(var r=null,c=null,L=0;L<this.lines.length;++L){var ee=this.lines[L],de=en(ee.markedSpans,this);e&&!this.collapsed?Xn(e,Lt(ee),"text"):e&&(de.to!=null&&(c=Lt(ee)),de.from!=null&&(r=Lt(ee))),ee.markedSpans=xn(ee.markedSpans,de),de.from==null&&this.collapsed&&!ar(this.doc,ee)&&e&&Mt(ee,pi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var me=0;me<this.lines.length;++me){var we=bt(this.lines[me]),De=wr(we);De>e.display.maxLineLength&&(e.display.maxLine=we,e.display.maxLineLength=De,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&an(e,r,c+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qa(e.doc)),e&&Er(e,"markerCleared",e,this,r,c),t&&li(e),this.parent&&this.parent.clear()},$n.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,c=0;c<this.lines.length;++c){var L=this.lines[c],ee=en(L.markedSpans,this);if(ee.from!=null&&(n=et(t?L:Lt(L),ee.from),e==-1))return n;if(ee.to!=null&&(r=et(t?L:Lt(L),ee.to),e==1))return r}return n&&{from:n,to:r}},$n.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;if(!t||!r)return;fn(r,function(){var c=t.line,L=Lt(t.line),ee=ko(r,L);if(ee&&(fa(ee),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ar(n.doc,c)&&n.height!=null){var de=n.height;n.height=null;var me=In(n)-de;me&&Mt(c,c.height+me)}Er(r,"markerChanged",r,e)})},$n.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||pe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},$n.prototype.detachLine=function(e){if(this.lines.splice(pe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ie($n);function Ei(e,t,n,r,c){if(r&&r.shared)return El(e,t,n,r,c);if(e.cm&&!e.cm.curOp)return Dr(e.cm,Ei)(e,t,n,r,c);var L=new $n(e,c),ee=Ot(t,n);if(r&&w(r,L,!1),ee>0||ee==0&&L.clearWhenEmpty!==!1)return L;if(L.replacedWith&&(L.collapsed=!0,L.widgetNode=ce("span",[L.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||L.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(L.widgetNode.insertLeft=!0)),L.collapsed){if(gt(e,t.line,t,n,L)||t.line!=n.line&>(e,n.line,t,n,L))throw new Error("Inserting collapsed marker partially overlapping an existing one");$r()}L.addToHistory&&Xa(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var de=t.line,me=e.cm,we;if(e.iter(de,n.line+1,function(Le){me&&L.collapsed&&!me.options.lineWrapping&&bt(Le)==me.display.maxLine&&(we=!0),L.collapsed&&de!=t.line&&Mt(Le,0),hn(Le,new On(L,de==t.line?t.ch:null,de==n.line?n.ch:null)),++de}),L.collapsed&&e.iter(t.line,n.line+1,function(Le){ar(e,Le)&&Mt(Le,0)}),L.clearOnEnter&&Ne(L,"beforeCursorEnter",function(){return L.clear()}),L.readOnly&&(Ur(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),L.collapsed&&(L.id=++us,L.atomic=!0),me){if(we&&(me.curOp.updateMaxLine=!0),L.collapsed)an(me,t.line,n.line+1);else if(L.className||L.startStyle||L.endStyle||L.css||L.attributes||L.title)for(var De=t.line;De<=n.line;De++)Xn(me,De,"text");L.atomic&&Qa(me.doc),Er(me,"markerAdded",me,L)}return L}var Vi=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Vi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Er(this,"clear")},Vi.prototype.find=function(e,t){return this.primary.find(e,t)},Ie(Vi);function El(e,t,n,r,c){r=w(r),r.shared=!1;var L=[Ei(e,t,n,r,c)],ee=L[0],de=r.widgetNode;return Jn(e,function(me){de&&(r.widgetNode=de.cloneNode(!0)),L.push(Ei(me,b(me,t),b(me,n),r,c));for(var we=0;we<me.linked.length;++we)if(me.linked[we].isParent)return;ee=$(L)}),new Vi(L,ee)}function cs(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),function(t){return t.parent})}function _l(e,t){for(var n=0;n<t.length;n++){var r=t[n],c=r.find(),L=e.clipPos(c.from),ee=e.clipPos(c.to);if(Ot(L,ee)){var de=Ei(e,L,ee,r.primary,r.primary.type);r.markers.push(de),de.parent=r}}}function Sl(e){for(var t=function(r){var c=e[r],L=[c.primary.doc];Jn(c.primary.doc,function(me){return L.push(me)});for(var ee=0;ee<c.markers.length;ee++){var de=c.markers[ee];pe(L,de.doc)==-1&&(de.parent=null,c.markers.splice(ee--,1))}},n=0;n<e.length;n++)t(n)}var Tl=0,sn=function(e,t,n,r,c){if(!(this instanceof sn))return new sn(e,t,n,r,c);n==null&&(n=0),Xi.call(this,[new Gi([new Wr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var L=et(n,0);this.sel=Vn(L),this.history=new po(null),this.id=++Tl,this.modeOption=t,this.lineSep=r,this.direction=c=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Yo(this,{from:L,to:L,text:e}),zr(this,Vn(L),Oe)};sn.prototype=Ce(Xi.prototype,{constructor:sn,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=hr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Mr(function(e){var t=et(this.first,0),n=this.first+this.size-1;wi(this,{from:t,to:et(n,pt(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Li(this.cm,0,0),zr(this,Vn(t),Oe)}),replaceRange:function(e,t,n,r){t=b(this,t),n=n?b(this,n):t,Ci(this,e,t,n,r)},getRange:function(e,t,n){var r=Xt(this,b(this,e),b(this,t));return n===!1?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Xr(this,e))return pt(this,e)},getLineNumber:function(e){return Lt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=pt(this,e)),bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return b(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Mr(function(e,t,n){Ja(this,b(this,typeof e=="number"?et(e,t||0):e),null,n)}),setSelection:Mr(function(e,t,n){Ja(this,b(this,e),b(this,t||e),n)}),extendSelection:Mr(function(e,t,n){go(this,b(this,e),t&&b(this,t),n)}),extendSelections:Mr(function(e,t){Ya(this,re(this,e),t)}),extendSelectionsBy:Mr(function(e,t){var n=se(this.sel.ranges,e);Ya(this,re(this,n),t)}),setSelections:Mr(function(e,t,n){if(!e.length)return;for(var r=[],c=0;c<e.length;c++)r[c]=new tr(b(this,e[c].anchor),b(this,e[c].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),zr(this,Sn(this.cm,r,t),n)}),addSelection:Mr(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new tr(b(this,e),b(this,t||e))),zr(this,Sn(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var c=Xt(this,t[r].from(),t[r].to());n=n?n.concat(c):c}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var c=Xt(this,n[r].from(),n[r].to());e!==!1&&(c=c.join(e||this.lineSeparator())),t[r]=c}return t},replaceSelection:function(e,t,n){for(var r=[],c=0;c<this.sel.ranges.length;c++)r[c]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Mr(function(e,t,n){for(var r=[],c=this.sel,L=0;L<c.ranges.length;L++){var ee=c.ranges[L];r[L]={from:ee.from(),to:ee.to(),text:this.splitLines(e[L]),origin:n}}for(var de=t&&t!="end"&&fl(this,r,t),me=r.length-1;me>=0;me--)wi(this,r[me]);de?$a(this,de):this.cm&&vi(this.cm)}),undo:Mr(function(){bo(this,"undo")}),redo:Mr(function(){bo(this,"redo")}),undoSelection:Mr(function(){bo(this,"undo",!0)}),redoSelection:Mr(function(){bo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var c=0;c<e.undone.length;c++)e.undone[c].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new po(this.history.maxGeneration),Jn(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:bi(this.history.done),undone:bi(this.history.undone)}},setHistory:function(e){var t=this.history=new po(this.history.maxGeneration);t.done=bi(e.done.slice(0),null,!0),t.undone=bi(e.undone.slice(0),null,!0)},setGutterMarker:Mr(function(e,t,n){return zi(this,e,"gutter",function(r){var c=r.gutterMarkers||(r.gutterMarkers={});return c[t]=n,!n&&U(c)&&(r.gutterMarkers=null),!0})}),clearGutter:Mr(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&zi(t,n,"gutter",function(){return n.gutterMarkers[e]=null,U(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Xr(this,e))return null;if(t=e,e=pt(this,e),!e)return null}else if(t=Lt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Mr(function(e,t,n){return zi(this,e,t=="gutter"?"gutter":"class",function(r){var c=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[c])r[c]=n;else{if(X(n).test(r[c]))return!1;r[c]+=" "+n}return!0})}),removeLineClass:Mr(function(e,t,n){return zi(this,e,t=="gutter"?"gutter":"class",function(r){var c=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",L=r[c];if(L)if(n==null)r[c]=null;else{var ee=L.match(X(n));if(!ee)return!1;var de=ee.index+ee[0].length;r[c]=L.slice(0,ee.index)+(!ee.index||de==L.length?"":" ")+L.slice(de)||null}else return!1;return!0})}),addLineWidget:Mr(function(e,t,n){return Cl(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Ei(this,b(this,e),b(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=b(this,e),Ei(this,e,e,n,"bookmark")},findMarksAt:function(e){e=b(this,e);var t=[],n=pt(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var c=n[r];(c.from==null||c.from<=e.ch)&&(c.to==null||c.to>=e.ch)&&t.push(c.marker.parent||c.marker)}return t},findMarks:function(e,t,n){e=b(this,e),t=b(this,t);var r=[],c=e.line;return this.iter(e.line,t.line+1,function(L){var ee=L.markedSpans;if(ee)for(var de=0;de<ee.length;de++){var me=ee[de];!(me.to!=null&&c==e.line&&e.ch>=me.to||me.from==null&&c!=e.line||me.from!=null&&c==t.line&&me.from>=t.ch)&&(!n||n(me.marker))&&r.push(me.marker.parent||me.marker)}++c}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(c){var L=c.text.length+r;if(L>e)return t=e,!0;e-=L,++n}),b(this,et(n,t))},indexFromPos:function(e){e=b(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+n}),t},copy:function(e){var t=new sn(hr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new sn(hr(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],_l(r,cs(this)),r},unlinkDoc:function(e){if(e instanceof cr&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(cs(this));break}if(e.history==this.history){var r=[e.id];Jn(e,function(c){return r.push(c.id)},!0),e.history=new po(null),e.history.done=bi(this.history.done,r),e.history.undone=bi(this.history.undone,r)}},iterLinkedDocs:function(e){Jn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):xt(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Mr(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&pl(this.cm)})}),sn.prototype.eachLine=sn.prototype.iter;var ds=0;function Ol(e){var t=this;if(hs(t),$e(t,e)||gn(t.display,e))return;_e(e),h&&(ds=+new Date);var n=ni(t,e,!0),r=e.dataTransfer.files;if(!n||t.isReadOnly())return;if(r&&r.length&&window.FileReader&&window.File)for(var c=r.length,L=Array(c),ee=0,de=function(){++ee==c&&Dr(t,function(){n=b(t.doc,n);var We={from:n,to:n,text:t.doc.splitLines(L.filter(function(Qe){return Qe!=null}).join(t.doc.lineSeparator())),origin:"paste"};wi(t.doc,We),$a(t.doc,Vn(b(t.doc,n),b(t.doc,Yn(We))))})()},me=function(We,Qe){if(t.options.allowDropFileTypes&&pe(t.options.allowDropFileTypes,We.type)==-1){de();return}var rt=new FileReader;rt.onerror=function(){return de()},rt.onload=function(){var at=rt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(at)){de();return}L[Qe]=at,de()},rt.readAsText(We)},we=0;we<r.length;we++)me(r[we],we);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var De=e.dataTransfer.getData("Text");if(De){var Le;if(t.state.draggingText&&!t.state.draggingText.copy&&(Le=t.listSelections()),vo(t.doc,Vn(n,n)),Le)for(var Ge=0;Ge<Le.length;++Ge)Ci(t.doc,"",Le[Ge].anchor,Le[Ge].head,"drag");t.replaceSelection(De,"around","paste"),t.display.input.focus()}}catch(We){}}}function kl(e,t){if(h&&(!e.state.draggingText||+new Date-ds<100)){Re(t);return}if($e(e,t)||gn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p){var n=Z("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),g&&n.parentNode.removeChild(n)}}function Al(e,t){var n=ni(e,t);if(!n)return;var r=document.createDocumentFragment();_a(e,n,r),e.display.dragCursor||(e.display.dragCursor=Z("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),H(e.display.dragCursor,r)}function hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function fs(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var c=t[r].CodeMirror;c&&n.push(c)}n.length&&n[0].operation(function(){for(var L=0;L<n.length;L++)e(n[L])})}var ps=!1;function Rl(){if(ps)return;Dl(),ps=!0}function Dl(){var e;Ne(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,fs(Ml)},100))}),Ne(window,"blur",function(){return fs(gi)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Zn={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Yi=0;Yi<10;Yi++)Zn[Yi+48]=Zn[Yi+96]=String(Yi);for(var xo=65;xo<=90;xo++)Zn[xo]=String.fromCharCode(xo);for(var Ji=1;Ji<=12;Ji++)Zn[Ji+111]=Zn[Ji+63235]="F"+Ji;var jn={};jn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},jn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},jn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},jn.default=M?jn.macDefault:jn.pcDefault;function Nl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,c,L,ee=0;ee<t.length-1;ee++){var de=t[ee];if(/^(cmd|meta|m)$/i.test(de))L=!0;else if(/^a(lt)?$/i.test(de))n=!0;else if(/^(c|ctrl|control)$/i.test(de))r=!0;else if(/^s(hift)?$/i.test(de))c=!0;else throw new Error("Unrecognized modifier name: "+de)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),L&&(e="Cmd-"+e),c&&(e="Shift-"+e),e}function Pl(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r=="..."){delete e[n];continue}for(var c=se(n.split(" "),Nl),L=0;L<c.length;L++){var ee=void 0,de=void 0;L==c.length-1?(de=c.join(" "),ee=r):(de=c.slice(0,L+1).join(" "),ee="...");var me=t[de];if(!me)t[de]=ee;else if(me!=ee)throw new Error("Inconsistent bindings for "+de)}delete e[n]}for(var we in t)e[we]=t[we];return e}function _i(e,t,n,r){t=wo(t);var c=t.call?t.call(e,r):t[e];if(c===!1)return"nothing";if(c==="...")return"multi";if(c!=null&&n(c))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return _i(e,t.fallthrough,n,r);for(var L=0;L<t.fallthrough.length;L++){var ee=_i(e,t.fallthrough[L],n,r);if(ee)return ee}}}function ms(e){var t=typeof e=="string"?e:Zn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function gs(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function vs(e,t){if(g&&e.keyCode==34&&e.char)return!1;var n=Zn[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),gs(n,e,t))}function wo(e){return typeof e=="string"?jn[e]:e}function Si(e,t){for(var n=e.doc.sel.ranges,r=[],c=0;c<n.length;c++){for(var L=t(n[c]);r.length&&Ot(L.from,$(r).to)<=0;){var ee=r.pop();if(Ot(ee.from,L.from)<0){L.from=ee.from;break}}r.push(L)}fn(e,function(){for(var de=r.length-1;de>=0;de--)Ci(e.doc,"",r[de].from,r[de].to,"+delete");vi(e)})}function Qo(e,t,n){var r=Te(e.text,t+n,n);return r<0||r>e.text.length?null:r}function qo(e,t,n){var r=Qo(e,t.ch,n);return r==null?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,c){if(e){t.doc.direction=="rtl"&&(c=-c);var L=Xe(n,t.doc.direction);if(L){var ee=c<0?$(L):L[0],de=c<0==(ee.level==1),me=de?"after":"before",we;if(ee.level>0||t.doc.direction=="rtl"){var De=fi(t,n);we=c<0?n.text.length-1:0;var Le=An(t,De,we).top;we=Fe(function(Ge){return An(t,De,Ge).top==Le},c<0==(ee.level==1)?ee.from:ee.to-1,we),me=="before"&&(we=Qo(n,we,1))}else we=c<0?ee.to:ee.from;return new et(r,we,me)}}return new et(r,c<0?n.text.length:0,c<0?"before":"after")}function Ll(e,t,n,r){var c=Xe(t,e.doc.direction);if(!c)return qo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var L=ze(c,n.ch,n.sticky),ee=c[L];if(e.doc.direction=="ltr"&&ee.level%2==0&&(r>0?ee.to>n.ch:ee.from<n.ch))return qo(t,n,r);var de=function(ht,wt){return Qo(t,ht instanceof et?ht.ch:ht,wt)},me,we=function(ht){return e.options.lineWrapping?(me=me||fi(e,t),xa(e,t,me,ht)):{begin:0,end:t.text.length}},De=we(n.sticky=="before"?de(n,-1):n.ch);if(e.doc.direction=="rtl"||ee.level==1){var Le=ee.level==1==r<0,Ge=de(n,Le?1:-1);if(Ge!=null&&(Le?Ge<=ee.to&&Ge<=De.end:Ge>=ee.from&&Ge>=De.begin)){var We=Le?"before":"after";return new et(n.line,Ge,We)}}var Qe=function(ht,wt,ft){for(var Et=function(or,Nr){return Nr?new et(n.line,de(or,1),"before"):new et(n.line,or,"after")};ht>=0&&ht<c.length;ht+=wt){var Pt=c[ht],At=wt>0==(Pt.level!=1),Ht=At?ft.begin:de(ft.end,-1);if(Pt.from<=Ht&&Ht<Pt.to)return Et(Ht,At);if(Ht=At?Pt.from:de(Pt.to,-1),ft.begin<=Ht&&Ht<ft.end)return Et(Ht,At)}},rt=Qe(L+r,r,De);if(rt)return rt;var at=r>0?De.end:de(De.begin,-1);return at!=null&&!(r>0&&at==t.text.length)&&(rt=Qe(r>0?0:c.length-1,r,we(at)),rt)?rt:null}var $i={selectAll:ts,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Oe)},killLine:function(e){return Si(e,function(t){if(t.empty()){var n=pt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Si(e,function(t){return{from:et(t.from().line,0),to:b(e.doc,et(t.to().line+1,0))}})},delLineLeft:function(e){return Si(e,function(t){return{from:et(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Si(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Si(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return ys(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return bs(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Il(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},fe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},fe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?bs(e,t.head):r},fe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,c=0;c<n.length;c++){var L=n[c].from(),ee=P(e.getLine(L.line),L.ch,r);t.push(ie(r-ee%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return fn(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){if(!t[r].empty())continue;var c=t[r].head,L=pt(e.doc,c.line).text;if(L){if(c.ch==L.length&&(c=new et(c.line,c.ch-1)),c.ch>0)c=new et(c.line,c.ch+1),e.replaceRange(L.charAt(c.ch-1)+L.charAt(c.ch-2),et(c.line,c.ch-2),c,"+transpose");else if(c.line>e.doc.first){var ee=pt(e.doc,c.line-1).text;ee&&(c=new et(c.line,1),e.replaceRange(L.charAt(0)+e.doc.lineSeparator()+ee.charAt(ee.length-1),et(c.line-1,ee.length-1),c,"+transpose"))}}n.push(new tr(c,c))}e.setSelections(n)})},newlineAndIndent:function(e){return fn(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);vi(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ys(e,t){var n=pt(e.doc,t),r=bt(n);return r!=n&&(t=Lt(r)),ea(!0,e,r,t,1)}function Il(e,t){var n=pt(e.doc,t),r=Bt(n);return r!=n&&(t=Lt(r)),ea(!0,e,n,t,-1)}function bs(e,t){var n=ys(e,t.line),r=pt(e.doc,n.line),c=Xe(r,e.doc.direction);if(!c||c[0].level==0){var L=Math.max(n.ch,r.text.search(/\S/)),ee=t.line==n.line&&t.ch<=L&&t.ch;return et(n.line,ee?0:L,n.sticky)}return n}function Co(e,t,n){if(typeof t=="string"&&(t=$i[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,c=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),c=t(e)!=Ee}finally{e.display.shift=r,e.state.suppressEdits=!1}return c}function jl(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var c=_i(t,e.state.keyMaps[r],n,e);if(c)return c}return e.options.extraKeys&&_i(t,e.options.extraKeys,n,e)||_i(t,e.options.keyMap,n,e)}var Fl=new le;function Zi(e,t,n,r){var c=e.state.keySeq;if(c){if(ms(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==c&&(e.state.keySeq=null,e.display.input.reset())}),xs(e,c+" "+t,n,r))return!0}return xs(e,t,n,r)}function xs(e,t,n,r){var c=jl(e,t,r);return c=="multi"&&(e.state.keySeq=t),c=="handled"&&Er(e,"keyHandled",e,t,n),(c=="handled"||c=="multi")&&(_e(n),jo(e)),!!c}function ws(e,t){var n=vs(t,!0);return n?t.shiftKey&&!e.state.keySeq?Zi(e,"Shift-"+n,t,function(r){return Co(e,r,!0)})||Zi(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Co(e,r)}):Zi(e,n,t,function(r){return Co(e,r)}):!1}function Bl(e,t,n){return Zi(e,"'"+n+"'",t,function(r){return Co(e,r,!0)})}var ta=null;function Cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=ve(),$e(t,e))return;h&&s<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=ws(t,e);g&&(ta=r?n:null,!r&&n==88&&!kt&&(M?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),O&&!M&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ul(t)}function Ul(e){var t=e.display.lineDiv;ne(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(N(t,"CodeMirror-crosshair"),nt(document,"keyup",n),nt(document,"mouseover",n))}Ne(document,"keyup",n),Ne(document,"mouseover",n)}function Es(e){e.keyCode==16&&(this.doc.sel.shift=!1),$e(this,e)}function _s(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(gn(t.display,e)||$e(t,e)||e.ctrlKey&&!e.altKey||M&&e.metaKey)return;var n=e.keyCode,r=e.charCode;if(g&&n==ta){ta=null,_e(e);return}if(g&&(!e.which||e.which<10)&&ws(t,e))return;var c=String.fromCharCode(r==null?n:r);if(c=="\b")return;if(Bl(t,e,c))return;t.display.input.onKeyPress(e)}var Wl=400,ra=function(e,t,n){this.time=e,this.pos=t,this.button=n};ra.prototype.compare=function(e,t,n){return this.time+Wl>e&&Ot(t,this.pos)==0&&n==this.button};var Qi,qi;function Hl(e,t){var n=+new Date;return qi&&qi.compare(n,e,t)?(Qi=qi=null,"triple"):Qi&&Qi.compare(n,e,t)?(qi=new ra(n,e,t),Qi=null,"double"):(Qi=new ra(n,e,t),qi=null,"single")}function Ss(e){var t=this,n=t.display;if($e(t,e)||n.activeTouch&&n.input.supportsTouch())return;if(n.input.ensurePolled(),n.shift=e.shiftKey,gn(n,e)){l||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(na(t,e))return;var r=ni(t,e),c=Ae(e),L=r?Hl(r,c):"single";if(window.focus(),c==1&&t.state.selectingText&&t.state.selectingText(e),r&&zl(t,c,r,L,e))return;c==1?r?Xl(t,r,L,e):He(e)==n.scroller&&_e(e):c==2?(r&&go(t.doc,r),setTimeout(function(){return n.input.focus()},20)):c==3&&(J?t.display.input.onContextMenu(e):Ta(t))}function zl(e,t,n,r,c){var L="Click";return r=="double"?L="Double"+L:r=="triple"&&(L="Triple"+L),L=(t==1?"Left":t==2?"Middle":"Right")+L,Zi(e,gs(L,c),c,function(ee){if(typeof ee=="string"&&(ee=$i[ee]),!ee)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=ee(e,n)!=Ee}finally{e.state.suppressEdits=!1}return de})}function Gl(e,t,n){var r=e.getOption("configureMouse"),c=r?r(e,t,n):{};if(c.unit==null){var L=I?n.shiftKey&&n.metaKey:n.altKey;c.unit=L?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(c.extend==null||e.doc.extend)&&(c.extend=e.doc.extend||n.shiftKey),c.addNew==null&&(c.addNew=M?n.metaKey:n.ctrlKey),c.moveOnDrag==null&&(c.moveOnDrag=!(M?n.altKey:n.ctrlKey)),c}function Xl(e,t,n,r){h?setTimeout(R(Sa,e),0):e.curOp.focus=ve();var c=Gl(e,n,r),L=e.doc.sel,ee;e.options.dragDrop&&Ye&&!e.isReadOnly()&&n=="single"&&(ee=L.contains(t))>-1&&(Ot((ee=L.ranges[ee]).from(),t)<0||t.xRel>0)&&(Ot(ee.to(),t)>0||t.xRel<0)?Kl(e,r,t,c):Vl(e,r,t,c)}function Kl(e,t,n,r){var c=e.display,L=!1,ee=Dr(e,function(we){l&&(c.scroller.draggable=!1),e.state.draggingText=!1,nt(c.wrapper.ownerDocument,"mouseup",ee),nt(c.wrapper.ownerDocument,"mousemove",de),nt(c.scroller,"dragstart",me),nt(c.scroller,"drop",ee),L||(_e(we),r.addNew||go(e.doc,n,null,null,r.extend),l&&!p||h&&s==9?setTimeout(function(){c.wrapper.ownerDocument.body.focus({preventScroll:!0}),c.input.focus()},20):c.input.focus())}),de=function(we){L=L||Math.abs(t.clientX-we.clientX)+Math.abs(t.clientY-we.clientY)>=10},me=function(){return L=!0};l&&(c.scroller.draggable=!0),e.state.draggingText=ee,ee.copy=!r.moveOnDrag,c.scroller.dragDrop&&c.scroller.dragDrop(),Ne(c.wrapper.ownerDocument,"mouseup",ee),Ne(c.wrapper.ownerDocument,"mousemove",de),Ne(c.scroller,"dragstart",me),Ne(c.scroller,"drop",ee),Ta(e),setTimeout(function(){return c.input.focus()},20)}function Ts(e,t,n){if(n=="char")return new tr(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new tr(et(t.line,0),b(e.doc,et(t.line+1,0)));var r=n(e,t);return new tr(r.from,r.to)}function Vl(e,t,n,r){var c=e.display,L=e.doc;_e(t);var ee,de,me=L.sel,we=me.ranges;if(r.addNew&&!r.extend?(de=L.sel.contains(n),de>-1?ee=we[de]:ee=new tr(n,n)):(ee=L.sel.primary(),de=L.sel.primIndex),r.unit=="rectangle")r.addNew||(ee=new tr(n,n)),n=ni(e,t,!0,!0),de=-1;else{var De=Ts(e,n,r.unit);r.extend?ee=$o(ee,De.anchor,De.head,r.extend):ee=De}r.addNew?de==-1?(de=we.length,zr(L,Sn(e,we.concat([ee]),de),{scroll:!1,origin:"*mouse"})):we.length>1&&we[de].empty()&&r.unit=="char"&&!r.extend?(zr(L,Sn(e,we.slice(0,de).concat(we.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),me=L.sel):Zo(L,de,ee,ae):(de=0,zr(L,new yn([ee],0),ae),me=L.sel);var Le=n;function Ge(ft){if(Ot(Le,ft)==0)return;if(Le=ft,r.unit=="rectangle"){for(var Et=[],Pt=e.options.tabSize,At=P(pt(L,n.line).text,n.ch,Pt),Ht=P(pt(L,ft.line).text,ft.ch,Pt),or=Math.min(At,Ht),Nr=Math.max(At,Ht),pr=Math.min(n.line,ft.line),pn=Math.min(e.lastLine(),Math.max(n.line,ft.line));pr<=pn;pr++){var ln=pt(L,pr).text,Sr=ge(ln,or,Pt);or==Nr?Et.push(new tr(et(pr,Sr),et(pr,Sr))):ln.length>Sr&&Et.push(new tr(et(pr,Sr),et(pr,ge(ln,Nr,Pt))))}Et.length||Et.push(new tr(n,n)),zr(L,Sn(e,me.ranges.slice(0,de).concat(Et),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ft)}else{var un=ee,Ir=Ts(e,ft,r.unit),Ar=un.anchor,Tr;Ot(Ir.anchor,Ar)>0?(Tr=Ir.head,Ar=bn(un.from(),Ir.anchor)):(Tr=Ir.anchor,Ar=dn(un.to(),Ir.head));var br=me.ranges.slice(0);br[de]=Yl(e,new tr(b(L,Ar),Tr)),zr(L,Sn(e,br,de),ae)}}var We=c.wrapper.getBoundingClientRect(),Qe=0;function rt(ft){var Et=++Qe,Pt=ni(e,ft,!0,r.unit=="rectangle");if(!Pt)return;if(Ot(Pt,Le)!=0){e.curOp.focus=ve(),Ge(Pt);var At=uo(c,L);(Pt.line>=At.to||Pt.line<At.from)&&setTimeout(Dr(e,function(){Qe==Et&&rt(ft)}),150)}else{var Ht=ft.clientY<We.top?-20:ft.clientY>We.bottom?20:0;Ht&&setTimeout(Dr(e,function(){if(Qe!=Et)return;c.scroller.scrollTop+=Ht,rt(ft)}),50)}}function at(ft){e.state.selectingText=!1,Qe=Infinity,ft&&(_e(ft),c.input.focus()),nt(c.wrapper.ownerDocument,"mousemove",ht),nt(c.wrapper.ownerDocument,"mouseup",wt),L.history.lastSelOrigin=null}var ht=Dr(e,function(ft){ft.buttons===0||!Ae(ft)?at(ft):rt(ft)}),wt=Dr(e,at);e.state.selectingText=wt,Ne(c.wrapper.ownerDocument,"mousemove",ht),Ne(c.wrapper.ownerDocument,"mouseup",wt)}function Yl(e,t){var n=t.anchor,r=t.head,c=pt(e.doc,n.line);if(Ot(n,r)==0&&n.sticky==r.sticky)return t;var L=Xe(c);if(!L)return t;var ee=ze(L,n.ch,n.sticky),de=L[ee];if(de.from!=n.ch&&de.to!=n.ch)return t;var me=ee+(de.from==n.ch==(de.level!=1)?0:1);if(me==0||me==L.length)return t;var we;if(r.line!=n.line)we=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var De=ze(L,r.ch,r.sticky),Le=De-ee||(r.ch-n.ch)*(de.level==1?-1:1);De==me-1||De==me?we=Le<0:we=Le>0}var Ge=L[me+(we?-1:0)],We=we==(Ge.level==1),Qe=We?Ge.from:Ge.to,rt=We?"after":"before";return n.ch==Qe&&n.sticky==rt?t:new tr(new et(n.line,Qe,rt),r)}function Os(e,t,n,r){var c,L;if(t.touches)c=t.touches[0].clientX,L=t.touches[0].clientY;else try{c=t.clientX,L=t.clientY}catch(Ge){return!1}if(c>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&_e(t);var ee=e.display,de=ee.lineDiv.getBoundingClientRect();if(L>de.bottom||!Me(e,n))return ke(t);L-=de.top-ee.viewOffset;for(var me=0;me<e.display.gutterSpecs.length;++me){var we=ee.gutters.childNodes[me];if(we&&we.getBoundingClientRect().right>=c){var De=sr(e.doc,L),Le=e.display.gutterSpecs[me];return Ke(e,n,e,De,Le.className,t),ke(t)}}}function na(e,t){return Os(e,t,"gutterClick",!0)}function ks(e,t){if(gn(e.display,t)||Jl(e,t))return;if($e(e,t,"contextmenu"))return;J||e.display.input.onContextMenu(t)}function Jl(e,t){return Me(e,"gutterContextMenu")?Os(e,t,"gutterContextMenu",!1):!1}function As(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ni(e)}var Ti={toString:function(){return"CodeMirror.Init"}},Rs={},Eo={};function $l(e){var t=e.optionHandlers;function n(r,c,L,ee){e.defaults[r]=c,L&&(t[r]=ee?function(de,me,we){we!=Ti&&L(de,me,we)}:L)}e.defineOption=n,e.Init=Ti,n("value","",function(r,c){return r.setValue(c)},!0),n("mode",null,function(r,c){r.doc.modeOption=c,Vo(r)},!0),n("indentUnit",2,Vo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Wi(r),Ni(r),an(r)},!0),n("lineSeparator",null,function(r,c){if(r.doc.lineSep=c,!c)return;var L=[],ee=r.doc.first;r.doc.iter(function(me){for(var we=0;;){var De=me.text.indexOf(c,we);if(De==-1)break;we=De+c.length,L.push(et(ee,De))}ee++});for(var de=L.length-1;de>=0;de--)Ci(r.doc,c,L[de],et(L[de].line,L[de].ch+c.length))}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,c,L){r.state.specialChars=new RegExp(c.source+(c.test(" ")?"":"| "),"g"),L!=Ti&&r.refresh()}),n("specialCharPlaceholder",Kt,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",T?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,c){return r.getInputField().spellcheck=c},!0),n("autocorrect",!1,function(r,c){return r.getInputField().autocorrect=c},!0),n("autocapitalize",!1,function(r,c){return r.getInputField().autocapitalize=c},!0),n("rtlMoveVisually",!j),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){As(r),Ui(r)},!0),n("keyMap","default",function(r,c,L){var ee=wo(c),de=L!=Ti&&wo(L);de&&de.detach&&de.detach(r,ee),ee.attach&&ee.attach(r,de||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ql,!0),n("gutters",[],function(r,c){r.display.gutterSpecs=Xo(c,r.options.lineNumbers),Ui(r)},!0),n("fixedGutter",!0,function(r,c){r.display.gutters.style.left=c?Lo(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return yi(r)},!0),n("scrollbarStyle","native",function(r){Ma(r),yi(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,c){r.display.gutterSpecs=Xo(r.options.gutters,c),Ui(r)},!0),n("firstLineNumber",1,Ui,!0),n("lineNumberFormatter",function(r){return r},Ui,!0),n("showCursorWhenSelecting",!1,Pi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,c){c=="nocursor"&&(gi(r),r.display.input.blur()),r.display.input.readOnlyChanged(c)}),n("screenReaderLabel",null,function(r,c){c=c===""?null:c,r.display.input.screenReaderLabelChanged(c)}),n("disableInput",!1,function(r,c){c||r.display.input.reset()},!0),n("dragDrop",!0,Zl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Pi,!0),n("singleCursorHeightPerLine",!0,Pi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Wi,!0),n("addModeClass",!1,Wi,!0),n("pollInterval",100),n("undoDepth",200,function(r,c){return r.doc.history.undoDepth=c}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Wi,!0),n("moveInputWithCursor",!0,function(r,c){c||r.display.input.resetPosition()}),n("tabindex",null,function(r,c){return r.display.input.getField().tabIndex=c||""}),n("autofocus",null),n("direction","ltr",function(r,c){return r.doc.setDirection(c)},!0),n("phrases",null)}function Zl(e,t,n){var r=n&&n!=Ti;if(!t!=!r){var c=e.display.dragFunctions,L=t?Ne:nt;L(e.display.scroller,"dragstart",c.start),L(e.display.scroller,"dragenter",c.enter),L(e.display.scroller,"dragover",c.over),L(e.display.scroller,"dragleave",c.leave),L(e.display.scroller,"drop",c.drop)}}function Ql(e){e.options.lineWrapping?(ne(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(N(e.display.wrapper,"CodeMirror-wrap"),nn(e)),Io(e),an(e),Ni(e),setTimeout(function(){return yi(e)},100)}function cr(e,t){var n=this;if(!(this instanceof cr))return new cr(e,t);this.options=t=t?w(t):{},w(Rs,t,!1);var r=t.value;typeof r=="string"?r=new sn(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var c=new cr.inputStyles[t.inputStyle](this),L=this.display=new dl(e,r,c,t);L.wrapper.CodeMirror=this,As(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ma(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new le,keySeq:null,specialChars:null},t.autofocus&&!T&&L.input.focus(),h&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),ql(this),Rl(),si(this),this.curOp.forceUpdate=!0,Ha(this,r),t.autofocus&&!T||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Fo(n)},20):gi(this);for(var ee in Eo)Eo.hasOwnProperty(ee)&&Eo[ee](this,t[ee],Ti);La(this),t.finishInit&&t.finishInit(this);for(var de=0;de<ia.length;++de)ia[de](this);li(this),l&&t.lineWrapping&&getComputedStyle(L.lineDiv).textRendering=="optimizelegibility"&&(L.lineDiv.style.textRendering="auto")}cr.defaults=Rs,cr.optionHandlers=Eo;function ql(e){var t=e.display;Ne(t.scroller,"mousedown",Dr(e,Ss)),h&&s<11?Ne(t.scroller,"dblclick",Dr(e,function(me){if($e(e,me))return;var we=ni(e,me);if(!we||na(e,me)||gn(e.display,me))return;_e(me);var De=e.findWordAt(we);go(e.doc,De.anchor,De.head)})):Ne(t.scroller,"dblclick",function(me){return $e(e,me)||_e(me)}),Ne(t.scroller,"contextmenu",function(me){return ks(e,me)}),Ne(t.input.getField(),"contextmenu",function(me){t.scroller.contains(me.target)||ks(e,me)});var n,r={end:0};function c(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function L(me){if(me.touches.length!=1)return!1;var we=me.touches[0];return we.radiusX<=1&&we.radiusY<=1}function ee(me,we){if(we.left==null)return!0;var De=we.left-me.left,Le=we.top-me.top;return De*De+Le*Le>20*20}Ne(t.scroller,"touchstart",function(me){if(!$e(e,me)&&!L(me)&&!na(e,me)){t.input.ensurePolled(),clearTimeout(n);var we=+new Date;t.activeTouch={start:we,moved:!1,prev:we-r.end<=300?r:null},me.touches.length==1&&(t.activeTouch.left=me.touches[0].pageX,t.activeTouch.top=me.touches[0].pageY)}}),Ne(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ne(t.scroller,"touchend",function(me){var we=t.activeTouch;if(we&&!gn(t,me)&&we.left!=null&&!we.moved&&new Date-we.start<300){var De=e.coordsChar(t.activeTouch,"page"),Le;!we.prev||ee(we,we.prev)?Le=new tr(De,De):!we.prev.prev||ee(we,we.prev.prev)?Le=e.findWordAt(De):Le=new tr(et(De.line,0),b(e.doc,et(De.line+1,0))),e.setSelection(Le.anchor,Le.head),e.focus(),_e(me)}c()}),Ne(t.scroller,"touchcancel",c),Ne(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ii(e,t.scroller.scrollTop),oi(e,t.scroller.scrollLeft,!0),Ke(e,"scroll",e))}),Ne(t.scroller,"mousewheel",function(me){return Fa(e,me)}),Ne(t.scroller,"DOMMouseScroll",function(me){return Fa(e,me)}),Ne(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(me){$e(e,me)||Re(me)},over:function(me){$e(e,me)||(Al(e,me),Re(me))},start:function(me){return kl(e,me)},drop:Dr(e,Ol),leave:function(me){$e(e,me)||hs(e)}};var de=t.input.getField();Ne(de,"keyup",function(me){return Es.call(e,me)}),Ne(de,"keydown",Dr(e,Cs)),Ne(de,"keypress",Dr(e,_s)),Ne(de,"focus",function(me){return Fo(e,me)}),Ne(de,"blur",function(me){return gi(e,me)})}var ia=[];cr.defineInitHook=function(e){return ia.push(e)};function eo(e,t,n,r){var c=e.doc,L;n==null&&(n="add"),n=="smart"&&(c.mode.indent?L=ot(e,t).state:n="prev");var ee=e.options.tabSize,de=pt(c,t),me=P(de.text,null,ee);de.stateAfter&&(de.stateAfter=null);var we=de.text.match(/^\s*/)[0],De;if(!r&&!/\S/.test(de.text))De=0,n="not";else if(n=="smart"&&(De=c.mode.indent(L,de.text.slice(we.length),de.text),De==Ee||De>150)){if(!r)return;n="prev"}n=="prev"?t>c.first?De=P(pt(c,t-1).text,null,ee):De=0:n=="add"?De=me+e.options.indentUnit:n=="subtract"?De=me-e.options.indentUnit:typeof n=="number"&&(De=me+n),De=Math.max(0,De);var Le="",Ge=0;if(e.options.indentWithTabs)for(var We=Math.floor(De/ee);We;--We)Ge+=ee,Le+=" ";if(Ge<De&&(Le+=ie(De-Ge)),Le!=we)return Ci(c,Le,et(t,0),et(t,we.length),"+input"),de.stateAfter=null,!0;for(var Qe=0;Qe<c.sel.ranges.length;Qe++){var rt=c.sel.ranges[Qe];if(rt.head.line==t&&rt.head.ch<we.length){var at=et(t,we.length);Zo(c,Qe,new tr(at,at));break}}}var Tn=null;function _o(e){Tn=e}function oa(e,t,n,r,c){var L=e.doc;e.display.shift=!1,r||(r=L.sel);var ee=+new Date-200,de=c=="paste"||e.state.pasteIncoming>ee,me=xt(t),we=null;if(de&&r.ranges.length>1)if(Tn&&Tn.text.join(`
|
|
|
`)==t){if(r.ranges.length%Tn.text.length==0){we=[];for(var De=0;De<Tn.text.length;De++)we.push(L.splitLines(Tn.text[De]))}}else me.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(we=se(me,function(ht){return[ht]}));for(var Le=e.curOp.updateInput,Ge=r.ranges.length-1;Ge>=0;Ge--){var We=r.ranges[Ge],Qe=We.from(),rt=We.to();We.empty()&&(n&&n>0?Qe=et(Qe.line,Qe.ch-n):e.state.overwrite&&!de?rt=et(rt.line,Math.min(pt(L,rt.line).text.length,rt.ch+$(me).length)):de&&Tn&&Tn.lineWise&&Tn.text.join(`
|
|
|
`)==me.join(`
|
|
|
`)&&(Qe=rt=et(Qe.line,0)));var at={from:Qe,to:rt,text:we?we[Ge%we.length]:me,origin:c||(de?"paste":e.state.cutIncoming>ee?"cut":"+input")};wi(e.doc,at),Er(e,"inputRead",e,at)}t&&!de&&Ms(e,t),vi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Le),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ds(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&fn(t,function(){return oa(t,n,0,null,"paste")}),!0}function Ms(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var c=n.ranges[r];if(c.head.ch>100||r&&n.ranges[r-1].head.line==c.head.line)continue;var L=e.getModeAt(c.head),ee=!1;if(L.electricChars){for(var de=0;de<L.electricChars.length;de++)if(t.indexOf(L.electricChars.charAt(de))>-1){ee=eo(e,c.head.line,"smart");break}}else L.electricInput&&(L.electricInput.test(pt(e.doc,c.head.line).text.slice(0,c.head.ch))&&(ee=eo(e,c.head.line,"smart")));ee&&Er(e,"electricInput",e,c.head.line)}}function Ns(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var c=e.doc.sel.ranges[r].head.line,L={anchor:et(c,0),head:et(c+1,0)};n.push(L),t.push(e.getRange(L.anchor,L.head))}return{text:t,ranges:n}}function Ps(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ls(){var e=Z("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=Z("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),S&&(e.style.border="1px solid black"),Ps(e),t}function eu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,c){var L=this.options,ee=L[r];if(L[r]==c&&r!="mode")return;L[r]=c,t.hasOwnProperty(r)&&Dr(this,t[r])(this,c,ee),Ke(this,"optionChange",this,r)},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,c){this.state.keyMaps[c?"push":"unshift"](wo(r))},removeKeyMap:function(r){for(var c=this.state.keyMaps,L=0;L<c.length;++L)if(c[L]==r||c[L].name==r)return c.splice(L,1),!0},addOverlay:Qr(function(r,c){var L=r.token?r:e.getMode(this.options,r);if(L.startState)throw new Error("Overlays may not be stateful.");K(this.state.overlays,{mode:L,modeSpec:r,opaque:c&&c.opaque,priority:c&&c.priority||0},function(ee){return ee.priority}),this.state.modeGen++,an(this)}),removeOverlay:Qr(function(r){for(var c=this.state.overlays,L=0;L<c.length;++L){var ee=c[L].modeSpec;if(ee==r||typeof r=="string"&&ee.name==r){c.splice(L,1),this.state.modeGen++,an(this);return}}}),indentLine:Qr(function(r,c,L){typeof c!="string"&&typeof c!="number"&&(c==null?c=this.options.smartIndent?"smart":"prev":c=c?"add":"subtract"),Xr(this.doc,r)&&eo(this,r,c,L)}),indentSelection:Qr(function(r){for(var c=this.doc.sel.ranges,L=-1,ee=0;ee<c.length;ee++){var de=c[ee];if(de.empty())de.head.line>L&&(eo(this,de.head.line,r,!0),L=de.head.line,ee==this.doc.sel.primIndex&&vi(this));else{var me=de.from(),we=de.to(),De=Math.max(L,me.line);L=Math.min(this.lastLine(),we.line-(we.ch?0:1))+1;for(var Le=De;Le<L;++Le)eo(this,Le,r);var Ge=this.doc.sel.ranges;me.ch==0&&c.length==Ge.length&&Ge[ee].from().ch>0&&Zo(this.doc,ee,new tr(me,Ge[ee].to()),Oe)}}}),getTokenAt:function(r,c){return nr(this,r,c)},getLineTokens:function(r,c){return nr(this,et(r),c,!0)},getTokenTypeAt:function(r){r=b(this.doc,r);var c=Ze(this,pt(this.doc,r.line)),L=0,ee=(c.length-1)/2,de=r.ch,me;if(de==0)me=c[2];else for(;;){var we=L+ee>>1;if((we?c[we*2-1]:0)>=de)ee=we;else if(c[we*2+1]<de)L=we+1;else{me=c[we*2+2];break}}var De=me?me.indexOf("overlay "):-1;return De<0?me:De==0?null:me.slice(0,De-1)},getModeAt:function(r){var c=this.doc.mode;return c.innerMode?e.innerMode(c,this.getTokenAt(r).state).mode:c},getHelper:function(r,c){return this.getHelpers(r,c)[0]},getHelpers:function(r,c){var L=[];if(!n.hasOwnProperty(c))return L;var ee=n[c],de=this.getModeAt(r);if(typeof de[c]=="string")ee[de[c]]&&L.push(ee[de[c]]);else if(de[c])for(var me=0;me<de[c].length;me++){var we=ee[de[c][me]];we&&L.push(we)}else de.helperType&&ee[de.helperType]?L.push(ee[de.helperType]):ee[de.name]&&L.push(ee[de.name]);for(var De=0;De<ee._global.length;De++){var Le=ee._global[De];Le.pred(de,this)&&pe(L,Le.val)==-1&&L.push(Le.val)}return L},getStateAfter:function(r,c){var L=this.doc;return r=oe(L,r==null?L.first+L.size-1:r),ot(this,r+1,c).state},cursorCoords:function(r,c){var L,ee=this.doc.sel.primary();return r==null?L=ee.head:typeof r=="object"?L=b(this.doc,r):L=r?ee.from():ee.to(),_n(this,L,c||"page")},charCoords:function(r,c){return Ro(this,b(this.doc,r),c||"page")},coordsChar:function(r,c){return r=va(this,r,c||"page"),Mo(this,r.left,r.top)},lineAtHeight:function(r,c){return r=va(this,{top:r,left:0},c||"page").top,sr(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,c,L){var ee=!1,de;if(typeof r=="number"){var me=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>me&&(r=me,ee=!0),de=pt(this.doc,r)}else de=r;return oo(this,de,{top:0,left:0},c||"page",L||ee).top+(ee?this.doc.height-xr(de):0)},defaultTextHeight:function(){return pi(this.display)},defaultCharWidth:function(){return mi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,c,L,ee,de){var me=this.display;r=_n(this,b(this.doc,r));var we=r.bottom,De=r.left;if(c.style.position="absolute",c.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(c),me.sizer.appendChild(c),ee=="over")we=r.top;else if(ee=="above"||ee=="near"){var Le=Math.max(me.wrapper.clientHeight,this.doc.height),Ge=Math.max(me.sizer.clientWidth,me.lineSpace.clientWidth);(ee=="above"||r.bottom+c.offsetHeight>Le)&&r.top>c.offsetHeight?we=r.top-c.offsetHeight:r.bottom+c.offsetHeight<=Le&&(we=r.bottom),De+c.offsetWidth>Ge&&(De=Ge-c.offsetWidth)}c.style.top=we+"px",c.style.left=c.style.right="",de=="right"?(De=me.sizer.clientWidth-c.offsetWidth,c.style.right="0px"):(de=="left"?De=0:de=="middle"&&(De=(me.sizer.clientWidth-c.offsetWidth)/2),c.style.left=De+"px"),L&&$s(this,{left:De,top:we,right:De+c.offsetWidth,bottom:we+c.offsetHeight})},triggerOnKeyDown:Qr(Cs),triggerOnKeyPress:Qr(_s),triggerOnKeyUp:Es,triggerOnMouseDown:Qr(Ss),execCommand:function(r){if($i.hasOwnProperty(r))return $i[r].call(null,this)},triggerElectric:Qr(function(r){Ms(this,r)}),findPosH:function(r,c,L,ee){var de=1;c<0&&(de=-1,c=-c);for(var me=b(this.doc,r),we=0;we<c&&!(me=aa(this.doc,me,de,L,ee),me.hitSide);++we);return me},moveH:Qr(function(r,c){var L=this;this.extendSelectionsBy(function(ee){return L.display.shift||L.doc.extend||ee.empty()?aa(L.doc,ee.head,r,c,L.options.rtlMoveVisually):r<0?ee.from():ee.to()},fe)}),deleteH:Qr(function(r,c){var L=this.doc.sel,ee=this.doc;L.somethingSelected()?ee.replaceSelection("",null,"+delete"):Si(this,function(de){var me=aa(ee,de.head,r,c,!1);return r<0?{from:me,to:de.head}:{from:de.head,to:me}})}),findPosV:function(r,c,L,ee){var de=1,me=ee;c<0&&(de=-1,c=-c);for(var we=b(this.doc,r),De=0;De<c;++De){var Le=_n(this,we,"div");if(me==null?me=Le.left:Le.left=me,we=Is(this,Le,de,L),we.hitSide)break}return we},moveV:Qr(function(r,c){var L=this,ee=this.doc,de=[],me=!this.display.shift&&!ee.extend&&ee.sel.somethingSelected();if(ee.extendSelectionsBy(function(De){if(me)return r<0?De.from():De.to();var Le=_n(L,De.head,"div");De.goalColumn!=null&&(Le.left=De.goalColumn),de.push(Le.left);var Ge=Is(L,Le,r,c);return c=="page"&&De==ee.sel.primary()&&Uo(L,Ro(L,Ge,"div").top-Le.top),Ge},fe),de.length)for(var we=0;we<ee.sel.ranges.length;we++)ee.sel.ranges[we].goalColumn=de[we]}),findWordAt:function(r){var c=this.doc,L=pt(c,r.line).text,ee=r.ch,de=r.ch;if(L){var me=this.getHelper(r,"wordChars");(r.sticky=="before"||de==L.length)&&ee?--ee:++de;for(var we=L.charAt(ee),De=E(we,me)?function(Le){return E(Le,me)}:/\s/.test(we)?function(Le){return/\s/.test(Le)}:function(Le){return!/\s/.test(Le)&&!E(Le)};ee>0&&De(L.charAt(ee-1));)--ee;for(;de<L.length&&De(L.charAt(de));)++de}return new tr(et(r.line,ee),et(r.line,de))},toggleOverwrite:function(r){if(r!=null&&r==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?ne(this.display.cursorDiv,"CodeMirror-overwrite"):N(this.display.cursorDiv,"CodeMirror-overwrite"),Ke(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==ve()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Qr(function(r,c){Li(this,r,c)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-kn(this)-this.display.barHeight,width:r.scrollWidth-kn(this)-this.display.barWidth,clientHeight:Oo(this),clientWidth:ti(this)}},scrollIntoView:Qr(function(r,c){r==null?(r={from:this.doc.sel.primary().head,to:null},c==null&&(c=this.options.cursorScrollMargin)):typeof r=="number"?r={from:et(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=c||0,r.from.line!=null?Zs(this,r):ka(this,r.from,r.to,r.margin)}),setSize:Qr(function(r,c){var L=this,ee=function(me){return typeof me=="number"||/^\d+$/.test(String(me))?me+"px":me};r!=null&&(this.display.wrapper.style.width=ee(r)),c!=null&&(this.display.wrapper.style.height=ee(c)),this.options.lineWrapping&&pa(this);var de=this.display.viewFrom;this.doc.iter(de,this.display.viewTo,function(me){if(me.widgets){for(var we=0;we<me.widgets.length;we++)if(me.widgets[we].noHScroll){Xn(L,de,"widget");break}}++de}),this.curOp.forceUpdate=!0,Ke(this,"refresh",this)}),operation:function(r){return fn(this,r)},startOperation:function(){return si(this)},endOperation:function(){return li(this)},refresh:Qr(function(){var r=this.display.cachedTextHeight;an(this),this.curOp.forceUpdate=!0,Ni(this),Li(this,this.doc.scrollLeft,this.doc.scrollTop),zo(this.display),(r==null||Math.abs(r-pi(this.display))>.5||this.options.lineWrapping)&&Io(this),Ke(this,"refresh",this)}),swapDoc:Qr(function(r){var c=this.doc;return c.cm=null,this.state.selectingText&&this.state.selectingText(),Ha(this,r),Ni(this),this.display.input.reset(),Li(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Er(this,"swapDoc",this,c),c}),phrase:function(r){var c=this.options.phrases;return c&&Object.prototype.hasOwnProperty.call(c,r)?c[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ie(e),e.registerHelper=function(r,c,L){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][c]=L},e.registerGlobalHelper=function(r,c,L,ee){e.registerHelper(r,c,ee),n[r]._global.push({pred:L,val:ee})}}function aa(e,t,n,r,c){var L=t,ee=n,de=pt(e,t.line),me=c&&e.direction=="rtl"?-n:n;function we(){var wt=t.line+me;return wt<e.first||wt>=e.first+e.size?!1:(t=new et(wt,t.ch,t.sticky),de=pt(e,wt))}function De(wt){var ft;if(r=="codepoint"){var Et=de.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(Et)?ft=null:ft=new et(t.line,Math.max(0,Math.min(de.text.length,t.ch+n*(Et>=55296&&Et<56320?2:1))),-n)}else c?ft=Ll(e.cm,de,t,n):ft=qo(de,t,n);if(ft==null)if(!wt&&we())t=ea(c,e.cm,de,t.line,me);else return!1;else t=ft;return!0}if(r=="char"||r=="codepoint")De();else if(r=="column")De(!0);else if(r=="word"||r=="group")for(var Le=null,Ge=r=="group",We=e.cm&&e.cm.getHelper(t,"wordChars"),Qe=!0;!(n<0&&!De(!Qe));Qe=!1){var rt=de.text.charAt(t.ch)||`
|
|
|
`,at=E(rt,We)?"w":Ge&&rt==`
|
|
|
`?"n":!Ge||/\s/.test(rt)?null:"p";if(Ge&&!Qe&&!at&&(at="s"),Le&&Le!=at){n<0&&(n=1,De(),t.sticky="after");break}if(at&&(Le=at),n>0&&!De(!Qe))break}var ht=yo(e,t,L,ee,!0);return Kr(L,ht)&&(ht.hitSide=!0),ht}function Is(e,t,n,r){var c=e.doc,L=t.left,ee;if(r=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),me=Math.max(de-.5*pi(e.display),3);ee=(n>0?t.bottom:t.top)+n*me}else r=="line"&&(ee=n>0?t.bottom+3:t.top-3);for(var we;!(we=Mo(e,L,ee),!we.outside);){if(n<0?ee<=0:ee>=c.height){we.hitSide=!0;break}ee+=n*5}return we}var ir=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new le,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ir.prototype.init=function(e){var t=this,n=this,r=n.cm,c=n.div=e.lineDiv;Ps(c,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function L(de){for(var me=de.target;me;me=me.parentNode){if(me==c)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(me.className))break}return!1}Ne(c,"paste",function(de){if(!L(de)||$e(r,de)||Ds(de,r))return;s<=11&&setTimeout(Dr(r,function(){return t.updateFromDOM()}),20)}),Ne(c,"compositionstart",function(de){t.composing={data:de.data,done:!1}}),Ne(c,"compositionupdate",function(de){t.composing||(t.composing={data:de.data,done:!1})}),Ne(c,"compositionend",function(de){t.composing&&(de.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ne(c,"touchstart",function(){return n.forceCompositionEnd()}),Ne(c,"input",function(){t.composing||t.readFromDOMSoon()});function ee(de){if(!L(de)||$e(r,de))return;if(r.somethingSelected())_o({lineWise:!1,text:r.getSelections()}),de.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var me=Ns(r);_o({lineWise:!0,text:me.text}),de.type=="cut"&&r.operation(function(){r.setSelections(me.ranges,0,Oe),r.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var we=Tn.text.join(`
|
|
|
`);if(de.clipboardData.setData("Text",we),de.clipboardData.getData("Text")==we){de.preventDefault();return}}var De=Ls(),Le=De.firstChild;r.display.lineSpace.insertBefore(De,r.display.lineSpace.firstChild),Le.value=Tn.text.join(`
|
|
|
`);var Ge=document.activeElement;z(Le),setTimeout(function(){r.display.lineSpace.removeChild(De),Ge.focus(),Ge==c&&n.showPrimarySelection()},50)}Ne(c,"copy",ee),Ne(c,"cut",ee)},ir.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ir.prototype.prepareSelection=function(){var e=Ea(this.cm,!1);return e.focus=document.activeElement==this.div,e},ir.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},ir.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ir.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),c=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||c.line<t.display.viewFrom){e.removeAllRanges();return}var L=So(t,e.anchorNode,e.anchorOffset),ee=So(t,e.focusNode,e.focusOffset);if(L&&!L.bad&&ee&&!ee.bad&&Ot(bn(L,ee),r)==0&&Ot(dn(L,ee),c)==0)return;var de=t.display.view,me=r.line>=t.display.viewFrom&&js(t,r)||{node:de[0].measure.map[2],offset:0},we=c.line<t.display.viewTo&&js(t,c);if(!we){var De=de[de.length-1].measure,Le=De.maps?De.maps[De.maps.length-1]:De.map;we={node:Le[Le.length-1],offset:Le[Le.length-2]-Le[Le.length-3]}}if(!me||!we){e.removeAllRanges();return}var Ge=e.rangeCount&&e.getRangeAt(0),We;try{We=he(me.node,me.offset,we.offset,we.node)}catch(Qe){}We&&(!O&&t.state.focused?(e.collapse(me.node,me.offset),We.collapsed||(e.removeAllRanges(),e.addRange(We))):(e.removeAllRanges(),e.addRange(We)),Ge&&e.anchorNode==null?e.addRange(Ge):O&&this.startGracePeriod()),this.rememberSelection()},ir.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},ir.prototype.showMultipleSelections=function(e){H(this.cm.display.cursorDiv,e.cursors),H(this.cm.display.selectionDiv,e.selection)},ir.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ir.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return V(this.div,t)},ir.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ir.prototype.blur=function(){this.div.blur()},ir.prototype.getField=function(){return this.div},ir.prototype.supportsTouch=function(){return!0},ir.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():fn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},ir.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ir.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(k&&o&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var n=So(t,e.anchorNode,e.anchorOffset),r=So(t,e.focusNode,e.focusOffset);n&&r&&fn(t,function(){zr(t.doc,Vn(n,r),Oe),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})},ir.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),c=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=et(r.line-1,pt(e.doc,r.line-1).length)),c.ch==pt(e.doc,c.line).text.length&&c.line<e.lastLine()&&(c=et(c.line+1,0)),r.line<t.viewFrom||c.line>t.viewTo-1)return!1;var L,ee,de;r.line==t.viewFrom||(L=ii(e,r.line))==0?(ee=Lt(t.view[0].line),de=t.view[0].node):(ee=Lt(t.view[L].line),de=t.view[L-1].node.nextSibling);var me=ii(e,c.line),we,De;if(me==t.view.length-1?(we=t.viewTo-1,De=t.lineDiv.lastChild):(we=Lt(t.view[me+1].line)-1,De=t.view[me+1].node.previousSibling),!de)return!1;for(var Le=e.doc.splitLines(ru(e,de,De,ee,we)),Ge=Xt(e.doc,et(ee,0),et(we,pt(e.doc,we).text.length));Le.length>1&&Ge.length>1;)if($(Le)==$(Ge))Le.pop(),Ge.pop(),we--;else if(Le[0]==Ge[0])Le.shift(),Ge.shift(),ee++;else break;for(var We=0,Qe=0,rt=Le[0],at=Ge[0],ht=Math.min(rt.length,at.length);We<ht&&rt.charCodeAt(We)==at.charCodeAt(We);)++We;for(var wt=$(Le),ft=$(Ge),Et=Math.min(wt.length-(Le.length==1?We:0),ft.length-(Ge.length==1?We:0));Qe<Et&&wt.charCodeAt(wt.length-Qe-1)==ft.charCodeAt(ft.length-Qe-1);)++Qe;if(Le.length==1&&Ge.length==1&&ee==r.line)for(;We&&We>r.ch&&wt.charCodeAt(wt.length-Qe-1)==ft.charCodeAt(ft.length-Qe-1);)We--,Qe++;Le[Le.length-1]=wt.slice(0,wt.length-Qe).replace(/^\u200b+/,""),Le[0]=Le[0].slice(We).replace(/\u200b+$/,"");var Pt=et(ee,We),At=et(we,Ge.length?$(Ge).length-Qe:0);if(Le.length>1||Le[0]||Ot(Pt,At))return Ci(e.doc,Le,Pt,At,"+input"),!0},ir.prototype.ensurePolled=function(){this.forceCompositionEnd()},ir.prototype.reset=function(){this.forceCompositionEnd()},ir.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},ir.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},ir.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&fn(this.cm,function(){return an(e.cm)})},ir.prototype.setUneditable=function(e){e.contentEditable="false"},ir.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Dr(this.cm,oa)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},ir.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},ir.prototype.onContextMenu=function(){},ir.prototype.resetPosition=function(){},ir.prototype.needsContentAttribute=!0;function js(e,t){var n=ko(e,t.line);if(!n||n.hidden)return null;var r=pt(e.doc,t.line),c=ua(n,r,t.line),L=Xe(r,e.doc.direction),ee="left";if(L){var de=ze(L,t.ch);ee=de%2?"right":"left"}var me=ha(c.map,t.ch,ee);return me.offset=me.collapse=="right"?me.end:me.start,me}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Oi(e,t){return t&&(e.bad=!0),e}function ru(e,t,n,r,c){var L="",ee=!1,de=e.doc.lineSeparator(),me=!1;function we(We){return function(Qe){return Qe.id==We}}function De(){ee&&(L+=de,me&&(L+=de),ee=me=!1)}function Le(We){We&&(De(),L+=We)}function Ge(We){if(We.nodeType==1){var Qe=We.getAttribute("cm-text");if(Qe){Le(Qe);return}var rt=We.getAttribute("cm-marker"),at;if(rt){var ht=e.findMarks(et(r,0),et(c+1,0),we(+rt));ht.length&&(at=ht[0].find(0))&&Le(Xt(e.doc,at.from,at.to).join(de));return}if(We.getAttribute("contenteditable")=="false")return;var wt=/^(pre|div|p|li|table|br)$/i.test(We.nodeName);if(!/^br$/i.test(We.nodeName)&&We.textContent.length==0)return;wt&&De();for(var ft=0;ft<We.childNodes.length;ft++)Ge(We.childNodes[ft]);/^(pre|p)$/i.test(We.nodeName)&&(me=!0),wt&&(ee=!0)}else We.nodeType==3&&Le(We.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Ge(t),t==n);)t=t.nextSibling,me=!1;return L}function So(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return Oi(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var c=0;c<e.display.view.length;c++){var L=e.display.view[c];if(L.node==r)return nu(L,t,n)}}function nu(e,t,n){var r=e.text.firstChild,c=!1;if(!t||!V(r,t))return Oi(et(Lt(e.line),0),!0);if(t==r&&(c=!0,t=r.childNodes[n],n=0,!t)){var L=e.rest?$(e.rest):e.line;return Oi(et(Lt(L),L.text.length),c)}var ee=t.nodeType==3?t:null,de=t;for(!ee&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(ee=t.firstChild,n&&(n=ee.nodeValue.length));de.parentNode!=r;)de=de.parentNode;var me=e.measure,we=me.maps;function De(at,ht,wt){for(var ft=-1;ft<(we?we.length:0);ft++)for(var Et=ft<0?me.map:we[ft],Pt=0;Pt<Et.length;Pt+=3){var At=Et[Pt+2];if(At==at||At==ht){var Ht=Lt(ft<0?e.line:e.rest[ft]),or=Et[Pt]+wt;return(wt<0||At!=at)&&(or=Et[Pt+(wt?1:0)]),et(Ht,or)}}}var Le=De(ee,de,n);if(Le)return Oi(Le,c);for(var Ge=de.nextSibling,We=ee?ee.nodeValue.length-n:0;Ge;Ge=Ge.nextSibling){if(Le=De(Ge,Ge.firstChild,0),Le)return Oi(et(Le.line,Le.ch-We),c);We+=Ge.textContent.length}for(var Qe=de.previousSibling,rt=n;Qe;Qe=Qe.previousSibling){if(Le=De(Qe,Qe.firstChild,-1),Le)return Oi(et(Le.line,Le.ch+rt),c);rt+=Qe.textContent.length}}var _r=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new le,this.hasSelection=!1,this.composing=null};_r.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var c=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),S&&(c.style.width="0px"),Ne(c,"input",function(){h&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Ne(c,"paste",function(ee){if($e(r,ee)||Ds(ee,r))return;r.state.pasteIncoming=+new Date,n.fastPoll()});function L(ee){if($e(r,ee))return;if(r.somethingSelected())_o({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var de=Ns(r);_o({lineWise:!0,text:de.text}),ee.type=="cut"?r.setSelections(de.ranges,null,Oe):(n.prevInput="",c.value=de.text.join(`
|
|
|
`),z(c))}else return;ee.type=="cut"&&(r.state.cutIncoming=+new Date)}Ne(c,"cut",L),Ne(c,"copy",L),Ne(e.scroller,"paste",function(ee){if(gn(e,ee)||$e(r,ee))return;if(!c.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var de=new Event("paste");de.clipboardData=ee.clipboardData,c.dispatchEvent(de)}),Ne(e.lineSpace,"selectstart",function(ee){gn(e,ee)||_e(ee)}),Ne(c,"compositionstart",function(){var ee=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:ee,range:r.markText(ee,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ne(c,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},_r.prototype.createField=function(e){this.wrapper=Ls(),this.textarea=this.wrapper.firstChild},_r.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},_r.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ea(e);if(e.options.moveInputWithCursor){var c=_n(e,n.sel.primary().head,"div"),L=t.wrapper.getBoundingClientRect(),ee=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,c.top+ee.top-L.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,c.left+ee.left-L.left))}return r},_r.prototype.showSelection=function(e){var t=this.cm,n=t.display;H(n.cursorDiv,e.cursors),H(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},_r.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&z(this.textarea),h&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",h&&s>=9&&(this.hasSelection=null))},_r.prototype.getField=function(){return this.textarea},_r.prototype.supportsTouch=function(){return!1},_r.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!T||ve()!=this.textarea))try{this.textarea.focus()}catch(e){}},_r.prototype.blur=function(){this.textarea.blur()},_r.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},_r.prototype.receivedFocus=function(){this.slowPoll()},_r.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},_r.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},_r.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||dt(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var c=n.value;if(c==r&&!t.somethingSelected())return!1;if(h&&s>=9&&this.hasSelection===c||M&&/[\uf700-\uf7ff]/.test(c))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var L=c.charCodeAt(0);if(L==8203&&!r&&(r="\u200B"),L==8666)return this.reset(),this.cm.execCommand("undo")}for(var ee=0,de=Math.min(r.length,c.length);ee<de&&r.charCodeAt(ee)==c.charCodeAt(ee);)++ee;return fn(t,function(){oa(t,c.slice(ee),r.length-ee,null,e.composing?"*compose":null),c.length>1e3||c.indexOf(`
|
|
|
`)>-1?n.value=e.prevInput="":e.prevInput=c,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},_r.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},_r.prototype.onKeyPress=function(){h&&s>=9&&(this.hasSelection=null),this.fastPoll()},_r.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,c=t.textarea;t.contextMenuPending&&t.contextMenuPending();var L=ni(n,e),ee=r.scroller.scrollTop;if(!L||g)return;var de=n.options.resetSelectionOnContextMenu;de&&n.doc.sel.contains(L)==-1&&Dr(n,zr)(n.doc,Vn(L),Oe);var me=c.style.cssText,we=t.wrapper.style.cssText,De=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",c.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-De.top-5)+"px; left: "+(e.clientX-De.left-5)+`px;
|
|
|
z-index: 1000; background: `+(h?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Le;l&&(Le=window.scrollY),r.input.focus(),l&&window.scrollTo(null,Le),r.input.reset(),n.somethingSelected()||(c.value=t.prevInput=" "),t.contextMenuPending=We,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function Ge(){if(c.selectionStart!=null){var rt=n.somethingSelected(),at="\u200B"+(rt?c.value:"");c.value="\u21DA",c.value=at,t.prevInput=rt?"":"\u200B",c.selectionStart=1,c.selectionEnd=at.length,r.selForContextMenu=n.doc.sel}}function We(){if(t.contextMenuPending!=We)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=we,c.style.cssText=me,h&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=ee),c.selectionStart!=null){(!h||h&&s<9)&&Ge();var rt=0,at=function(){r.selForContextMenu==n.doc.sel&&c.selectionStart==0&&c.selectionEnd>0&&t.prevInput=="\u200B"?Dr(n,ts)(n):rt++<10?r.detectingSelectAll=setTimeout(at,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(at,200)}}if(h&&s>=9&&Ge(),J){Re(e);var Qe=function(){nt(window,"mouseup",Qe),setTimeout(We,20)};Ne(window,"mouseup",Qe)}else setTimeout(We,50)},_r.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},_r.prototype.setUneditable=function(){},_r.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?w(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=ve();t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=de.getValue()}var c;if(e.form&&(Ne(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var L=e.form;c=L.submit;try{var ee=L.submit=function(){r(),L.submit=c,L.submit(),L.submit=ee}}catch(me){}}t.finishInit=function(me){me.save=r,me.getTextArea=function(){return e},me.toTextArea=function(){me.toTextArea=isNaN,r(),e.parentNode.removeChild(me.getWrapperElement()),e.style.display="",e.form&&(nt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=c))}},e.style.display="none";var de=cr(function(me){return e.parentNode.insertBefore(me,e.nextSibling)},t);return de}function ou(e){e.off=nt,e.on=Ne,e.wheelEventPixels=hl,e.Doc=sn,e.splitLines=xt,e.countColumn=P,e.findColumn=ge,e.isWordChar=B,e.Pass=Ee,e.signal=Ke,e.Line=Wr,e.changeEnd=Yn,e.scrollbarModel=Da,e.Pos=et,e.cmpPos=Ot,e.modes=Yt,e.mimeModes=It,e.resolveMode=Tt,e.getMode=Rr,e.modeExtensions=Jt,e.extendMode=rr,e.copyState=dr,e.startState=Lr,e.innerMode=mr,e.commands=$i,e.keyMap=jn,e.keyName=vs,e.isModifierKey=ms,e.lookupKey=_i,e.normalizeKeyMap=Pl,e.StringStream=Ft,e.SharedTextMarker=Vi,e.TextMarker=$n,e.LineWidget=Ki,e.e_preventDefault=_e,e.e_stopPropagation=Se,e.e_stop=Re,e.addClass=ne,e.contains=V,e.rmClass=N,e.keyNames=Zn}$l(cr),eu(cr);var au="iter insert remove copy getEditor constructor".split(" ");for(var To in sn.prototype)sn.prototype.hasOwnProperty(To)&&pe(au,To)<0&&(cr.prototype[To]=function(e){return function(){return e.apply(this.doc,arguments)}}(sn.prototype[To]));return Ie(sn),cr.inputStyles={textarea:_r,contenteditable:ir},cr.defineMode=function(e){!cr.defaults.mode&&e!="null"&&(cr.defaults.mode=e),Ut.apply(this,arguments)},cr.defineMIME=jr,cr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),cr.defineMIME("text/plain","null"),cr.defineExtension=function(e,t){cr.prototype[e]=t},cr.defineDocExtension=function(e,t){sn.prototype[e]=t},cr.fromTextArea=iu,ou(cr),cr.version="5.58.2",cr})},WYAk:function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){(function(){var i=f,O=i.lib,C=O.Base,x=i.enc,m=x.Utf8,h=i.algo,s=h.HMAC=C.extend({init:function(l,u){l=this._hasher=new l.init,typeof u=="string"&&(u=m.parse(u));var o=l.blockSize,g=o*4;u.sigBytes>g&&(u=l.finalize(u)),u.clamp();for(var p=this._oKey=u.clone(),v=this._iKey=u.clone(),_=p.words,S=v.words,k=0;k<o;k++)_[k]^=1549556828,S[k]^=909522486;p.sigBytes=v.sigBytes=g,this.reset()},reset:function(){var l=this._hasher;l.reset(),l.update(this._iKey)},update:function(l){return this._hasher.update(l),this},finalize:function(l){var u=this._hasher,o=u.finalize(l);u.reset();var g=u.finalize(this._oKey.clone().concat(o));return g}})})()})},WaYH:function(a,G,d){"use strict";var f=d("rePB"),i=d("Ff2n"),O=d("VTBJ"),C=d("1OyB"),x=d("vuIU"),m=d("JX7q"),h=d("Ji7U"),s=d("LK+K"),l=d("q1tI"),u=d("TSYQ"),o=d.n(u),g=d("sboe"),p=d("OZM5"),v=function(J){var X=J.prefixCls,N=J.level,F=J.isStart,H=J.isEnd;if(!N)return null;for(var Z="".concat(X,"-indent-unit"),ce=[],he=0;he<N;he+=1){var V;ce.push(l.createElement("span",{key:he,className:o()(Z,(V={},Object(f.a)(V,"".concat(Z,"-start"),F[he+1]),Object(f.a)(V,"".concat(Z,"-end"),H[he+1]),Object(f.a)(V,"".concat(Z,"-end-first-level"),!he&&H[0]),V))}))}return l.createElement("span",{"aria-hidden":"true",className:"".concat(X,"-indent")},ce)},_=v,S=d("815F"),k="open",T="close",M="---",I=function(y){Object(h.a)(X,y);var J=Object(s.a)(X);function X(){var N;return Object(C.a)(this,X),N=J.apply(this,arguments),N.state={dragNodeHighlight:!1},N.onSelectorClick=function(F){var H=N.props.context.onNodeClick;H(F,Object(S.b)(N.props)),N.isSelectable()?N.onSelect(F):N.onCheck(F)},N.onSelectorDoubleClick=function(F){var H=N.props.context.onNodeDoubleClick;H(F,Object(S.b)(N.props))},N.onSelect=function(F){if(N.isDisabled())return;var H=N.props.context.onNodeSelect;F.preventDefault(),H(F,Object(S.b)(N.props))},N.onCheck=function(F){if(N.isDisabled())return;var H=N.props,Z=H.disableCheckbox,ce=H.checked,he=N.props.context.onNodeCheck;if(!N.isCheckable()||Z)return;F.preventDefault();var V=!ce;he(F,Object(S.b)(N.props),V)},N.onMouseEnter=function(F){var H=N.props.context.onNodeMouseEnter;H(F,Object(S.b)(N.props))},N.onMouseLeave=function(F){var H=N.props.context.onNodeMouseLeave;H(F,Object(S.b)(N.props))},N.onContextMenu=function(F){var H=N.props.context.onNodeContextMenu;H(F,Object(S.b)(N.props))},N.onDragStart=function(F){var H=N.props.context.onNodeDragStart;F.stopPropagation(),N.setState({dragNodeHighlight:!0}),H(F,Object(m.a)(N));try{F.dataTransfer.setData("text/plain","")}catch(Z){}},N.onDragEnter=function(F){var H=N.props.context.onNodeDragEnter;F.preventDefault(),F.stopPropagation(),H(F,Object(m.a)(N))},N.onDragOver=function(F){var H=N.props.context.onNodeDragOver;F.preventDefault(),F.stopPropagation(),H(F,Object(m.a)(N))},N.onDragLeave=function(F){var H=N.props.context.onNodeDragLeave;F.stopPropagation(),H(F,Object(m.a)(N))},N.onDragEnd=function(F){var H=N.props.context.onNodeDragEnd;F.stopPropagation(),N.setState({dragNodeHighlight:!1}),H(F,Object(m.a)(N))},N.onDrop=function(F){var H=N.props.context.onNodeDrop;F.preventDefault(),F.stopPropagation(),N.setState({dragNodeHighlight:!1}),H(F,Object(m.a)(N))},N.onExpand=function(F){var H=N.props.context.onNodeExpand;H(F,Object(S.b)(N.props))},N.setSelectHandle=function(F){N.selectHandle=F},N.getNodeState=function(){var F=N.props.expanded;return N.isLeaf()?null:F?k:T},N.hasChildren=function(){var F=N.props.eventKey,H=N.props.context.keyEntities,Z=H[F]||{},ce=Z.children;return!!(ce||[]).length},N.isLeaf=function(){var F=N.props,H=F.isLeaf,Z=F.loaded,ce=N.props.context.loadData,he=N.hasChildren();return H===!1?!1:H||!ce&&!he||ce&&Z&&!he},N.isDisabled=function(){var F=N.props.disabled,H=N.props.context.disabled;return!!(H||F)},N.isCheckable=function(){var F=N.props.checkable,H=N.props.context.checkable;return!H||F===!1?!1:H},N.syncLoadData=function(F){var H=F.expanded,Z=F.loading,ce=F.loaded,he=N.props.context,V=he.loadData,ve=he.onNodeLoad;if(Z)return;V&&H&&!N.isLeaf()&&(!N.hasChildren()&&!ce&&ve(Object(S.b)(N.props)))},N.renderSwitcher=function(){var F=N.props,H=F.expanded,Z=F.switcherIcon,ce=N.props.context,he=ce.prefixCls,V=ce.switcherIcon,ve=Z||V;if(N.isLeaf())return l.createElement("span",{className:o()("".concat(he,"-switcher"),"".concat(he,"-switcher-noop"))},typeof ve=="function"?ve(Object(O.a)(Object(O.a)({},N.props),{},{isLeaf:!0})):ve);var ne=o()("".concat(he,"-switcher"),"".concat(he,"-switcher_").concat(H?k:T));return l.createElement("span",{onClick:N.onExpand,className:ne},typeof ve=="function"?ve(Object(O.a)(Object(O.a)({},N.props),{},{isLeaf:!1})):ve)},N.renderCheckbox=function(){var F=N.props,H=F.checked,Z=F.halfChecked,ce=F.disableCheckbox,he=N.props.context.prefixCls,V=N.isDisabled(),ve=N.isCheckable();if(!ve)return null;var ne=typeof ve!="boolean"?ve:null;return l.createElement("span",{className:o()("".concat(he,"-checkbox"),H&&"".concat(he,"-checkbox-checked"),!H&&Z&&"".concat(he,"-checkbox-indeterminate"),(V||ce)&&"".concat(he,"-checkbox-disabled")),onClick:N.onCheck},ne)},N.renderIcon=function(){var F=N.props.loading,H=N.props.context.prefixCls;return l.createElement("span",{className:o()("".concat(H,"-iconEle"),"".concat(H,"-icon__").concat(N.getNodeState()||"docu"),F&&"".concat(H,"-icon_loading"))})},N.renderSelector=function(){var F=N.state.dragNodeHighlight,H=N.props,Z=H.title,ce=H.selected,he=H.icon,V=H.loading,ve=H.data,ne=N.props.context,W=ne.prefixCls,z=ne.showIcon,R=ne.icon,w=ne.draggable,P=ne.loadData,le=ne.titleRender,pe=N.isDisabled(),ye="".concat(W,"-node-content-wrapper"),Ee;if(z){var Oe=he||R;Ee=Oe?l.createElement("span",{className:o()("".concat(W,"-iconEle"),"".concat(W,"-icon__customize"))},typeof Oe=="function"?Oe(N.props):Oe):N.renderIcon()}else P&&V&&(Ee=N.renderIcon());var ae;typeof Z=="function"?ae=Z(ve):le?ae=le(ve):ae=Z;var fe=l.createElement("span",{className:"".concat(W,"-title")},ae);return l.createElement("span",{ref:N.setSelectHandle,title:typeof Z=="string"?Z:"",className:o()("".concat(ye),"".concat(ye,"-").concat(N.getNodeState()||"normal"),!pe&&(ce||F)&&"".concat(W,"-node-selected"),!pe&&w&&"draggable"),draggable:!pe&&w||void 0,"aria-grabbed":!pe&&w||void 0,onMouseEnter:N.onMouseEnter,onMouseLeave:N.onMouseLeave,onContextMenu:N.onContextMenu,onClick:N.onSelectorClick,onDoubleClick:N.onSelectorDoubleClick,onDragStart:w?N.onDragStart:void 0},Ee,fe)},N}return Object(x.a)(X,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var F=this.props.selectable,H=this.props.context.selectable;return typeof F=="boolean"?F:H}},{key:"render",value:function(){var F,H=this.props,Z=H.eventKey,ce=H.className,he=H.style,V=H.dragOver,ve=H.dragOverGapTop,ne=H.dragOverGapBottom,W=H.isLeaf,z=H.isStart,R=H.isEnd,w=H.expanded,P=H.selected,le=H.checked,pe=H.halfChecked,ye=H.loading,Ee=H.domRef,Oe=H.active,ae=H.onMouseMove,fe=Object(i.a)(H,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ge=this.props.context,q=ge.prefixCls,ie=ge.filterTreeNode,$=ge.draggable,se=ge.keyEntities,K=this.isDisabled(),Y=Object(p.f)(fe),Ce=se[Z]||{},Q=Ce.level,B=R[R.length-1];return l.createElement("div",Object.assign({ref:Ee,className:o()(ce,"".concat(q,"-treenode"),(F={},Object(f.a)(F,"".concat(q,"-treenode-disabled"),K),Object(f.a)(F,"".concat(q,"-treenode-switcher-").concat(w?"open":"close"),!W),Object(f.a)(F,"".concat(q,"-treenode-checkbox-checked"),le),Object(f.a)(F,"".concat(q,"-treenode-checkbox-indeterminate"),pe),Object(f.a)(F,"".concat(q,"-treenode-selected"),P),Object(f.a)(F,"".concat(q,"-treenode-loading"),ye),Object(f.a)(F,"".concat(q,"-treenode-active"),Oe),Object(f.a)(F,"".concat(q,"-treenode-leaf-last"),B),Object(f.a)(F,"drag-over",!K&&V),Object(f.a)(F,"drag-over-gap-top",!K&&ve),Object(f.a)(F,"drag-over-gap-bottom",!K&&ne),Object(f.a)(F,"filter-node",ie&&ie(Object(S.b)(this.props))),F)),style:he,onDragEnter:$?this.onDragEnter:void 0,onDragOver:$?this.onDragOver:void 0,onDragLeave:$?this.onDragLeave:void 0,onDrop:$?this.onDrop:void 0,onDragEnd:$?this.onDragEnd:void 0,onMouseMove:ae},Y),l.createElement(_,{prefixCls:q,level:Q,isStart:z,isEnd:R}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),X}(l.Component),j=function(J){return l.createElement(g.a.Consumer,null,function(X){return l.createElement(I,Object.assign({},J,{context:X}))})};j.displayName="TreeNode",j.defaultProps={title:M},j.isTreeNode=1;var D=G.a=j},XIdC:function(a,G,d){"use strict";var f=d("rePB"),i=d("ODXe"),O=d("Ff2n"),C=d("q1tI"),x=d.n(C),m=d("TSYQ"),h=d.n(m),s=d("6cGi"),l=d("4IlW"),u=C.forwardRef(function(o,g){var p,v=o.prefixCls,_=v===void 0?"rc-switch":v,S=o.className,k=o.checked,T=o.defaultChecked,M=o.disabled,I=o.loadingIcon,j=o.checkedChildren,D=o.unCheckedChildren,y=o.onClick,J=o.onChange,X=o.onKeyDown,N=Object(O.a)(o,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),F=Object(s.a)(!1,{value:k,defaultValue:T}),H=Object(i.a)(F,2),Z=H[0],ce=H[1];function he(W,z){var R=Z;return M||(R=W,ce(R),J==null||J(R,z)),R}function V(W){W.which===l.a.LEFT?he(!1,W):W.which===l.a.RIGHT&&he(!0,W),X==null||X(W)}function ve(W){var z=he(!Z,W);y==null||y(z,W)}var ne=h()(_,S,(p={},Object(f.a)(p,"".concat(_,"-checked"),Z),Object(f.a)(p,"".concat(_,"-disabled"),M),p));return C.createElement("button",Object.assign({},N,{type:"button",role:"switch","aria-checked":Z,disabled:M,className:ne,ref:g,onKeyDown:V,onClick:ve}),I,C.createElement("span",{className:"".concat(_,"-inner")},Z?j:D))});u.displayName="Switch",G.a=u},Y1PL:function(a,G,d){"use strict";d.r(G),d.d(G,"ResizableTextArea",function(){return pe});var f=d("wx14"),i=d("1OyB"),O=d("vuIU"),C=d("Ji7U"),x=d("LK+K"),m=d("q1tI"),h=d("VTBJ"),s=d("rePB"),l=d("Zm9Q"),u=d("Kwbf"),o=d("c+Xe"),g=d("m+aA"),p=d("bdgK"),v=new Map;function _(Oe){Oe.forEach(function(ae){var fe,ge=ae.target;(fe=v.get(ge))===null||fe===void 0||fe.forEach(function(q){return q(ge)})})}var S=new p.default(_),k=null,T=null;function M(Oe,ae){v.has(Oe)||(v.set(Oe,new Set),S.observe(Oe)),v.get(Oe).add(ae)}function I(Oe,ae){v.has(Oe)&&(v.get(Oe).delete(ae),v.get(Oe).size||(S.unobserve(Oe),v.delete(Oe)))}var j=function(Oe){Object(C.a)(fe,Oe);var ae=Object(x.a)(fe);function fe(){return Object(i.a)(this,fe),ae.apply(this,arguments)}return Object(O.a)(fe,[{key:"render",value:function(){return this.props.children}}]),fe}(m.Component),D=m.createContext(null);function y(Oe){var ae=Oe.children,fe=Oe.onBatchResize,ge=m.useRef(0),q=m.useRef([]),ie=m.useContext(D),$=m.useCallback(function(se,K,Y){ge.current+=1;var Ce=ge.current;q.current.push({size:se,element:K,data:Y}),Promise.resolve().then(function(){Ce===ge.current&&(fe==null||fe(q.current),q.current=[])}),ie==null||ie(se,K,Y)},[fe,ie]);return m.createElement(D.Provider,{value:$},ae)}function J(Oe){var ae=Oe.children,fe=Oe.disabled,ge=m.useRef(null),q=m.useRef(null),ie=m.useContext(D),$=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),se=m.isValidElement(ae)&&Object(o.c)(ae),K=se?ae.ref:null,Y=m.useMemo(function(){return Object(o.a)(K,ge)},[K,ge]),Ce=m.useRef(Oe);Ce.current=Oe;var Q=m.useCallback(function(B){var E=Ce.current,U=E.onResize,xe=E.data,be=B.getBoundingClientRect(),Te=be.width,Fe=be.height,Be=B.offsetWidth,Ue=B.offsetHeight,ze=Math.floor(Te),Ve=Math.floor(Fe);if($.current.width!==ze||$.current.height!==Ve||$.current.offsetWidth!==Be||$.current.offsetHeight!==Ue){var Xe={width:ze,height:Ve,offsetWidth:Be,offsetHeight:Ue};$.current=Xe;var Je=Be===Math.round(Te)?Te:Be,Ne=Ue===Math.round(Fe)?Fe:Ue,tt=Object(h.a)(Object(h.a)({},Xe),{},{offsetWidth:Je,offsetHeight:Ne});ie==null||ie(tt,B,xe),U&&Promise.resolve().then(function(){U(tt,B)})}},[]);return m.useEffect(function(){var B=Object(g.a)(ge.current)||Object(g.a)(q.current);return B&&!fe&&M(B,Q),function(){return I(B,Q)}},[ge.current,fe]),m.createElement(j,{ref:q},se?m.cloneElement(ae,{ref:Y}):ae)}var X="rc-observer-key";function N(Oe){var ae=Oe.children,fe=Object(l.a)(ae);return fe.map(function(ge,q){var ie=(ge==null?void 0:ge.key)||"".concat(X,"-").concat(q);return m.createElement(J,Object(f.a)({},Oe,{key:ie}),ge)})}N.Collection=y;var F=N,H=d("bT9E"),Z=d("TSYQ"),ce=d.n(Z),he=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important
|
|
|
`,V=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],ve={},ne;function W(Oe){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=Oe.getAttribute("id")||Oe.getAttribute("data-reactid")||Oe.getAttribute("name");if(ae&&ve[fe])return ve[fe];var ge=window.getComputedStyle(Oe),q=ge.getPropertyValue("box-sizing")||ge.getPropertyValue("-moz-box-sizing")||ge.getPropertyValue("-webkit-box-sizing"),ie=parseFloat(ge.getPropertyValue("padding-bottom"))+parseFloat(ge.getPropertyValue("padding-top")),$=parseFloat(ge.getPropertyValue("border-bottom-width"))+parseFloat(ge.getPropertyValue("border-top-width")),se=V.map(function(Y){return"".concat(Y,":").concat(ge.getPropertyValue(Y))}).join(";"),K={sizingStyle:se,paddingSize:ie,borderSize:$,boxSizing:q};return ae&&fe&&(ve[fe]=K),K}function z(Oe){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ne||(ne=document.createElement("textarea"),ne.setAttribute("tab-index","-1"),ne.setAttribute("aria-hidden","true"),document.body.appendChild(ne)),Oe.getAttribute("wrap")?ne.setAttribute("wrap",Oe.getAttribute("wrap")):ne.removeAttribute("wrap");var q=W(Oe,ae),ie=q.paddingSize,$=q.borderSize,se=q.boxSizing,K=q.sizingStyle;ne.setAttribute("style","".concat(K,";").concat(he)),ne.value=Oe.value||Oe.placeholder||"";var Y=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,Q=ne.scrollHeight,B;if(se==="border-box"?Q+=$:se==="content-box"&&(Q-=ie),fe!==null||ge!==null){ne.value=" ";var E=ne.scrollHeight-ie;fe!==null&&(Y=E*fe,se==="border-box"&&(Y=Y+ie+$),Q=Math.max(Y,Q)),ge!==null&&(Ce=E*ge,se==="border-box"&&(Ce=Ce+ie+$),B=Q>Ce?"":"hidden",Q=Math.min(Ce,Q))}return{height:Q,minHeight:Y,maxHeight:Ce,overflowY:B,resize:"none"}}var R=d("Gytx"),w=d.n(R),P;(function(Oe){Oe[Oe.NONE=0]="NONE",Oe[Oe.RESIZING=1]="RESIZING",Oe[Oe.RESIZED=2]="RESIZED"})(P||(P={}));var le=function(Oe){Object(C.a)(fe,Oe);var ae=Object(x.a)(fe);function fe(ge){var q;return Object(i.a)(this,fe),q=ae.call(this,ge),q.nextFrameActionId=void 0,q.resizeFrameId=void 0,q.textArea=void 0,q.saveTextArea=function(ie){q.textArea=ie},q.handleResize=function(ie){var $=q.state.resizeStatus,se=q.props,K=se.autoSize,Y=se.onResize;if($!==P.NONE)return;typeof Y=="function"&&Y(ie),K&&q.resizeOnNextFrame()},q.resizeOnNextFrame=function(){cancelAnimationFrame(q.nextFrameActionId),q.nextFrameActionId=requestAnimationFrame(q.resizeTextarea)},q.resizeTextarea=function(){var ie=q.props.autoSize;if(!ie||!q.textArea)return;var $=ie.minRows,se=ie.maxRows,K=z(q.textArea,!1,$,se);q.setState({textareaStyles:K,resizeStatus:P.RESIZING},function(){cancelAnimationFrame(q.resizeFrameId),q.resizeFrameId=requestAnimationFrame(function(){q.setState({resizeStatus:P.RESIZED},function(){q.resizeFrameId=requestAnimationFrame(function(){q.setState({resizeStatus:P.NONE}),q.fixFirefoxAutoScroll()})})})})},q.renderTextArea=function(){var ie=q.props,$=ie.prefixCls,se=$===void 0?"rc-textarea":$,K=ie.autoSize,Y=ie.onResize,Ce=ie.className,Q=ie.disabled,B=q.state,E=B.textareaStyles,U=B.resizeStatus,xe=Object(H.a)(q.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),be=ce()(se,Ce,Object(s.a)({},"".concat(se,"-disabled"),Q));"value"in xe&&(xe.value=xe.value||"");var Te=Object(h.a)(Object(h.a)(Object(h.a)({},q.props.style),E),U===P.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(F,{onResize:q.handleResize,disabled:!(K||Y)},m.createElement("textarea",Object(f.a)({},xe,{className:be,style:Te,ref:q.saveTextArea})))},q.state={textareaStyles:{},resizeStatus:P.NONE},q}return Object(O.a)(fe,[{key:"componentDidUpdate",value:function(q){(q.value!==this.props.value||!w()(q.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var q=this.textArea.selectionStart,ie=this.textArea.selectionEnd;this.textArea.setSelectionRange(q,ie)}}catch($){}}},{key:"render",value:function(){return this.renderTextArea()}}]),fe}(m.Component),pe=le,ye=function(Oe){Object(C.a)(fe,Oe);var ae=Object(x.a)(fe);function fe(ge){var q;Object(i.a)(this,fe),q=ae.call(this,ge),q.resizableTextArea=void 0,q.focus=function(){q.resizableTextArea.textArea.focus()},q.saveTextArea=function($){q.resizableTextArea=$},q.handleChange=function($){var se=q.props.onChange;q.setValue($.target.value,function(){q.resizableTextArea.resizeTextarea()}),se&&se($)},q.handleKeyDown=function($){var se=q.props,K=se.onPressEnter,Y=se.onKeyDown;$.keyCode===13&&K&&K($),Y&&Y($)};var ie=typeof ge.value=="undefined"||ge.value===null?ge.defaultValue:ge.value;return q.state={value:ie},q}return Object(O.a)(fe,[{key:"setValue",value:function(q,ie){"value"in this.props||this.setState({value:q},ie)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(pe,Object(f.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(q){return"value"in q?{value:q.value}:null}}]),fe}(m.Component),Ee=G.default=ye},ZD9Y:function(a,G,d){"use strict";var f=d("BoS7"),i=d("Sdc0"),O=d("OaEy"),C=d("2fM7"),x=d("q1tI"),m=d.n(x),h=d("lOMy"),s=d.n(h),l=C.a.Option;G.a=function(u){var o=u.onFontSizeChange,g=u.cmFontSize,p=u.cmCodeMode,v=u.onCodeModeChange,_=u.onTabToSpace,S=u.className,k=S===void 0?"":S,T=u.tabToSpace,M=u.children;return m.a.createElement("div",{className:"tpi-code-setting ".concat(k)},m.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),m.a.createElement(C.a,{bordered:!1,size:"small",value:p,onChange:v},m.a.createElement(l,{value:"vs"},"\u767D\u8272\u80CC\u666F"),m.a.createElement(l,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),m.a.createElement(C.a,{bordered:!1,size:"small",value:g,onChange:o},m.a.createElement(l,{value:12},"12px"),m.a.createElement(l,{value:14},"14px"),m.a.createElement(l,{value:16},"16px"),m.a.createElement(l,{value:18},"18px"),m.a.createElement(l,{value:20},"20px"),m.a.createElement(l,{value:22},"22px"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"Tab\u8F6C\u6362"),m.a.createElement(i.a,{checked:T,onChange:_}))),m.a.createElement("h3",null,"\u5FEB\u6377\u952E"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),m.a.createElement("span",null,"Ctrl + S")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),m.a.createElement("span",null,"F1 / Alt + F1")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),m.a.createElement("span",null,"Ctrl + ]/[")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),m.a.createElement("span",null,"Ctrl + Shift + \\")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),m.a.createElement("span",null,"Home")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),m.a.createElement("span",null,"End"))),M)}},ZW9T:function(a,G,d){"use strict";d.d(G,"a",function(){return j});var f=d("k1fw"),i=d("miYZ"),O=d("tsqr"),C=d("rAM+"),x=d("tJVT"),m=d("PpiC"),h=d("q1tI"),s=d.n(h),l=d("bdgK");function u(D,y,J,X,N){var F=y.getWordUntilPosition(J),H={startLineNumber:J.lineNumber,endLineNumber:J.lineNumber,startColumn:F.startColumn,endColumn:F.endColumn},Z=X.map(function(ce){return{label:ce,kind:D.languages.CompletionItemKind.Keyword,insertText:ce,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:H}});return N.map(function(ce){Z.push(Object(f.a)(Object(f.a)({},ce),{},{range:H}))}),Z}var o=function(D){var y={label:"ifelse",kind:D.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`),insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet},J=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];D.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(H,Z){var ce=u(D,H,Z,J,[y]);return{suggestions:ce}}});var X=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];D.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(H,Z){var ce=[{label:"print",kind:D.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
|
`),insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}],he=u(D,H,Z,X,ce);return{suggestions:he}}});var N=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];D.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(H,Z){var ce=[y,{label:"main",kind:D.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`),insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:D.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
|
`),insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}],he=u(D,H,Z,N,ce);return{suggestions:he}}})},g="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",p=d("LvDl");function v(D){return/^\d+$/.test(D)?"".concat(D,"px"):D}function _(){}var S=!1,k={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function T(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=D;if(Array.isArray(D)){for(var J=0;J<D.length;J++){var X=k[D[J]];if(X)return X}return y[0]}return k[y]||y}var M=null,I=G.b=function(D){var y=D.width,J=y===void 0?"100%":y,X=D.height,N=X===void 0?"100%":X,F=D.value,H=D.language,Z=H===void 0?"javascript":H,ce=D.style,he=ce===void 0?{}:ce,V=D.options,ve=V===void 0?{}:V,ne=D.overrideServices,W=ne===void 0?{}:ne,z=D.theme,R=z===void 0?"vs-dark":z,w=D.onEditBlur,P=D.onSave,le=D.autoHeight,pe=le===void 0?!1:le,ye=D.forbidCopy,Ee=ye===void 0?!1:ye,Oe=D.onChange,ae=Oe===void 0?_:Oe,fe=D.editorDidMount,ge=fe===void 0?_:fe,q=D.onFocus,ie=q===void 0?_:q,$=D.filename,se=$===void 0?"educoder.txt":$,K=Object(m.a)(D,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Y=Object(h.useRef)(),Ce=Object(h.useRef)({}),Q=Object(h.useRef)(),B=Object(h.useRef)(!1),E=Object(h.useRef)(),U=Object(h.useState)(!1),xe=Object(x.a)(U,2),be=xe[0],Te=xe[1];function Fe(){var ke;return Y.current&&(ke=new l.default(function(Re){var He=Object(C.a)(Re),Ae;try{for(He.s();!(Ae=He.n()).done;){var Ye=Ae.value;(Ye.target.offsetHeight>0||Ye.target.offsetWidth>0)&&Ce.current.instance.layout()}}catch(it){He.e(it)}finally{He.f()}}),ke.observe(Y.current)),ke}function Be(){O.b.warn(decodeURIComponent(g))}var Ue=function(){var Re=Ce.current.instance;if(F!=null&&Re&&be){var He=Re.getModel();He&&F!==He.getValue()&&(S=!0,He.setValue(F),Re.layout(),S=!1)}};Object(h.useEffect)(function(){Q.current&&clearTimeout(Q.current),Q.current=setTimeout(function(){Ue()},500)},[F,be,Ce.current]);function ze(){var ke=Ce.current.instance;if(ke){var Re=ke.getSelection(),He=Ce.current.pastePos||{},Ae=new M.Range(He.startLineNumber||Re.endLineNumber,He.startColumn||Re.endColumn,He.endLineNumber||Re.endLineNumber,He.endColumn||Re.endColumn);setTimeout(function(){ke.executeEdits("",[{range:Ae,text:""}])},300)}}function Ve(ke){(window.navigator.platform.match("Mac")?ke.metaKey:ke.ctrlKey)&&ke.keyCode==83&&(ke.preventDefault(),P())}var Xe=function(){if(pe&&Ce.current.instance){var Re=Ce.current.instance.getContentHeight();_e(Re<N?N:Re)}else _e(N)};function Je(ke){var Re=document.createEvent("MouseEvents");Re.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ke.dispatchEvent(Re)}function Ne(ke,Re){var He=window.URL||window.webkitURL||window,Ae=new Blob([Re]),Ye=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ye.href=He.createObjectURL(Ae),Ye.download=ke,Je(Ye)}Object(h.useEffect)(function(){Xe()},[Xe]),Object(h.useEffect)(function(){Y.current&&!be&&d.e(27).then(d.t.bind(null,"M/lh",7)).then(function(ke){try{M=ke,Ce.current.instance=M.editor.create(Y.current,{value:F,language:T(Z),theme:R,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},W);var Re=Ce.current.instance;if(ge(Re,M),setTimeout(function(){Xe(),Ce.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ne(se||"educoder.txt",Re.getValue())}})},500),Ce.current.subscription=Re.onDidChangeModelContent(function(Ae){B.current?clearTimeout(E.current):(Xe(),ae(Re.getValue(),Ae)),E.current=setTimeout(function(){B.current=!1},500)}),window.Monaco||o(M),Ee&&(Re.addCommand(M.KeyMod.CtrlCmd|M.KeyMod.Shift|M.KeyCode.KEY_V,function(){return Be(),null}),Re.addCommand(M.KeyMod.CtrlCmd|M.KeyCode.KEY_C,function(){return Be(),null})),window.Monaco=M,w&&Re.onDidBlurEditorWidget(function(){w(Re.getValue())}),ie&&Re.onDidFocusEditorText(function(){ie(Re.getValue())}),Ee){Re.addCommand(M.KeyMod.CtrlCmd|M.KeyCode.KEY_V,function(){return Be(),null}),Re.onDidPaste(function(Ae){Ce.current.pastePos=Ae});try{window.addEventListener("paste",ze)}catch(Ae){}}var He=Fe();return Te(!0),function(){var Ae=Ce.current.instance;Ae.dispose();var Ye=Ae.getModel();Ye&&Ye.dispose(),Ce.current.subscription&&Ce.current.subscription.dispose(),Ee&&window.removeEventListener("paste",ze),He.unobserve(Y.current)}}catch(Ae){}})},[]),Object(h.useEffect)(function(){var ke=Ce.current.instance;if(ke&&be)return document.addEventListener("keydown",Ve,!1),function(){document.removeEventListener("keydown",Ve)}},[P,be]),Object(h.useEffect)(function(){var ke=Ce.current.instance;if(ke&&be){var Re=T(Z);M.editor.setModelLanguage(ke.getModel(),Re),console.log("language:",Z,ke.getModel(),Re)}},[Z,be]),Object(h.useEffect)(function(){var ke=Ce.current.instance;ke&&be&&M.editor.setTheme(R)},[R,be]),Object(h.useEffect)(function(){var ke=Ce.current.instance;ke&&be&&(ke.updateOptions(Object(f.a)({},ve)),setTimeout(function(){ke.getModel().updateOptions(Object(f.a)({},ve))},200))},[JSON.stringify(ve),be]),Object(h.useEffect)(function(){var ke=Ce.current.instance;ke&&be&&ke.layout()},[J,N,be]);var tt=Object(h.useState)(v(J)),nt=Object(x.a)(tt,2),Ke=nt[0],$e=nt[1],je=Object(h.useState)(v(N)),Me=Object(x.a)(je,2),Ie=Me[0],_e=Me[1],Se=Object(f.a)(Object(f.a)({},he),{},{width:Ke,height:Ie});return s.a.createElement("div",{className:"my-monaco-editor",ref:Y,style:Se})};function j(D){var y=D.width,J=y===void 0?"100%":y,X=D.height,N=X===void 0?"100%":X,F=D.original,H=D.modified,Z=D.language,ce=D.options,he=ce===void 0?{}:ce,V=Object(h.useRef)(),ve=Object(h.useState)(null),ne=Object(x.a)(ve,2),W=ne[0],z=ne[1];function R(pe){var ye;return V.current&&(ye=new l.default(function(Ee){var Oe=Object(C.a)(Ee),ae;try{for(Oe.s();!(ae=Oe.n()).done;){var fe=ae.value;(fe.target.offsetHeight>0||fe.target.offsetWidth>0)&&pe.layout()}}catch(ge){Oe.e(ge)}finally{Oe.f()}}),ye.observe(V.current)),ye}Object(h.useEffect)(function(){V.current&&d.e(27).then(d.t.bind(null,"M/lh",7)).then(function(pe){M=pe;var ye=M.editor.createDiffEditor(V.current,Object(f.a)(Object(f.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},he),{},{wordWrap:!0}));z(ye);var Ee=R(ye);return function(){ye.dispose();var Oe=ye.getModel();Oe&&Oe.dispose(),Ee.unobserve(V.current)}})},[]),Object(h.useEffect)(function(){W&&W.setModel({original:M.editor.createModel(F,Z),modified:M.editor.createModel(H,Z)})},[F,H,Z,W]);var w=v(J),P=v(N),le={width:w,height:P};return s.a.createElement("div",{className:"my-diff-editor",ref:V,style:le})}},ZpRC:function(a,G,d){"use strict";function f(o){return typeof o=="object"&&o!=null&&o.nodeType===1}function i(o,g){return(!g||o!=="hidden")&&o!=="visible"&&o!=="clip"}function O(o,g){if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){var p=getComputedStyle(o,null);return i(p.overflowY,g)||i(p.overflowX,g)||function(v){var _=function(S){if(!S.ownerDocument||!S.ownerDocument.defaultView)return null;try{return S.ownerDocument.defaultView.frameElement}catch(k){return null}}(v);return!!_&&(_.clientHeight<v.scrollHeight||_.clientWidth<v.scrollWidth)}(o)}return!1}function C(o,g,p,v,_,S,k,T){return S<o&&k>g||S>o&&k<g?0:S<=o&&T<=p||k>=g&&T>=p?S-o-v:k>g&&T<p||S<o&&T>p?k-g+_:0}var x=function(o,g){var p=window,v=g.scrollMode,_=g.block,S=g.inline,k=g.boundary,T=g.skipOverflowHiddenElements,M=typeof k=="function"?k:function(E){return E!==k};if(!f(o))throw new TypeError("Invalid target");for(var I=document.scrollingElement||document.documentElement,j=[],D=o;f(D)&&M(D);){if((D=D.parentElement)===I){j.push(D);break}D!=null&&D===document.body&&O(D)&&!O(document.documentElement)||D!=null&&O(D,T)&&j.push(D)}for(var y=p.visualViewport?p.visualViewport.width:innerWidth,J=p.visualViewport?p.visualViewport.height:innerHeight,X=window.scrollX||pageXOffset,N=window.scrollY||pageYOffset,F=o.getBoundingClientRect(),H=F.height,Z=F.width,ce=F.top,he=F.right,V=F.bottom,ve=F.left,ne=_==="start"||_==="nearest"?ce:_==="end"?V:ce+H/2,W=S==="center"?ve+Z/2:S==="end"?he:ve,z=[],R=0;R<j.length;R++){var w=j[R],P=w.getBoundingClientRect(),le=P.height,pe=P.width,ye=P.top,Ee=P.right,Oe=P.bottom,ae=P.left;if(v==="if-needed"&&ce>=0&&ve>=0&&V<=J&&he<=y&&ce>=ye&&V<=Oe&&ve>=ae&&he<=Ee)return z;var fe=getComputedStyle(w),ge=parseInt(fe.borderLeftWidth,10),q=parseInt(fe.borderTopWidth,10),ie=parseInt(fe.borderRightWidth,10),$=parseInt(fe.borderBottomWidth,10),se=0,K=0,Y="offsetWidth"in w?w.offsetWidth-w.clientWidth-ge-ie:0,Ce="offsetHeight"in w?w.offsetHeight-w.clientHeight-q-$:0;if(I===w)se=_==="start"?ne:_==="end"?ne-J:_==="nearest"?C(N,N+J,J,q,$,N+ne,N+ne+H,H):ne-J/2,K=S==="start"?W:S==="center"?W-y/2:S==="end"?W-y:C(X,X+y,y,ge,ie,X+W,X+W+Z,Z),se=Math.max(0,se+N),K=Math.max(0,K+X);else{se=_==="start"?ne-ye-q:_==="end"?ne-Oe+$+Ce:_==="nearest"?C(ye,Oe,le,q,$+Ce,ne,ne+H,H):ne-(ye+le/2)+Ce/2,K=S==="start"?W-ae-ge:S==="center"?W-(ae+pe/2)+Y/2:S==="end"?W-Ee+ie+Y:C(ae,Ee,pe,ge,ie+Y,W,W+Z,Z);var Q=w.scrollLeft,B=w.scrollTop;ne+=B-(se=Math.max(0,Math.min(B+se,w.scrollHeight-le+Ce))),W+=Q-(K=Math.max(0,Math.min(Q+K,w.scrollWidth-pe+Y)))}z.push({el:w,top:se,left:K})}return z};function m(o){return o===Object(o)&&Object.keys(o).length!==0}function h(o,g){g===void 0&&(g="auto");var p="scrollBehavior"in document.body.style;o.forEach(function(v){var _=v.el,S=v.top,k=v.left;_.scroll&&p?_.scroll({top:S,left:k,behavior:g}):(_.scrollTop=S,_.scrollLeft=k)})}function s(o){return o===!1?{block:"end",inline:"nearest"}:m(o)?o:{block:"start",inline:"nearest"}}function l(o,g){var p=!o.ownerDocument.documentElement.contains(o);if(m(g)&&typeof g.behavior=="function")return g.behavior(p?[]:x(o,g));if(p)return;var v=s(g);return h(x(o,v),v.behavior)}var u=G.a=l},Zss7:function(a,G,d){var f;(function(i){var O=/^\s+/,C=/\s+$/,x=0,m=i.round,h=i.min,s=i.max,l=i.random;function u($,se){if($=$||"",se=se||{},$ instanceof u)return $;if(!(this instanceof u))return new u($,se);var K=o($);this._originalInput=$,this._r=K.r,this._g=K.g,this._b=K.b,this._a=K.a,this._roundA=m(100*this._a)/100,this._format=se.format||K.format,this._gradientType=se.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=K.ok,this._tc_id=x++}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var $=this.toRgb();return($.r*299+$.g*587+$.b*114)/1e3},getLuminance:function(){var $=this.toRgb(),se,K,Y,Ce,Q,B;return se=$.r/255,K=$.g/255,Y=$.b/255,se<=.03928?Ce=se/12.92:Ce=i.pow((se+.055)/1.055,2.4),K<=.03928?Q=K/12.92:Q=i.pow((K+.055)/1.055,2.4),Y<=.03928?B=Y/12.92:B=i.pow((Y+.055)/1.055,2.4),.2126*Ce+.7152*Q+.0722*B},setAlpha:function($){return this._a=z($),this._roundA=m(100*this._a)/100,this},toHsv:function(){var $=_(this._r,this._g,this._b);return{h:$.h*360,s:$.s,v:$.v,a:this._a}},toHsvString:function(){var $=_(this._r,this._g,this._b),se=m($.h*360),K=m($.s*100),Y=m($.v*100);return this._a==1?"hsv("+se+", "+K+"%, "+Y+"%)":"hsva("+se+", "+K+"%, "+Y+"%, "+this._roundA+")"},toHsl:function(){var $=p(this._r,this._g,this._b);return{h:$.h*360,s:$.s,l:$.l,a:this._a}},toHslString:function(){var $=p(this._r,this._g,this._b),se=m($.h*360),K=m($.s*100),Y=m($.l*100);return this._a==1?"hsl("+se+", "+K+"%, "+Y+"%)":"hsla("+se+", "+K+"%, "+Y+"%, "+this._roundA+")"},toHex:function($){return k(this._r,this._g,this._b,$)},toHexString:function($){return"#"+this.toHex($)},toHex8:function($){return T(this._r,this._g,this._b,this._a,$)},toHex8String:function($){return"#"+this.toHex8($)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(R(this._r,255)*100)+"%",g:m(R(this._g,255)*100)+"%",b:m(R(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(R(this._r,255)*100)+"%, "+m(R(this._g,255)*100)+"%, "+m(R(this._b,255)*100)+"%)":"rgba("+m(R(this._r,255)*100)+"%, "+m(R(this._g,255)*100)+"%, "+m(R(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:ne[k(this._r,this._g,this._b,!0)]||!1},toFilter:function($){var se="#"+M(this._r,this._g,this._b,this._a),K=se,Y=this._gradientType?"GradientType = 1, ":"";if($){var Ce=u($);K="#"+M(Ce._r,Ce._g,Ce._b,Ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+Y+"startColorstr="+se+",endColorstr="+K+")"},toString:function($){var se=!!$;$=$||this._format;var K=!1,Y=this._a<1&&this._a>=0,Ce=!se&&Y&&($==="hex"||$==="hex6"||$==="hex3"||$==="hex4"||$==="hex8"||$==="name");return Ce?$==="name"&&this._a===0?this.toName():this.toRgbString():($==="rgb"&&(K=this.toRgbString()),$==="prgb"&&(K=this.toPercentageRgbString()),($==="hex"||$==="hex6")&&(K=this.toHexString()),$==="hex3"&&(K=this.toHexString(!0)),$==="hex4"&&(K=this.toHex8String(!0)),$==="hex8"&&(K=this.toHex8String()),$==="name"&&(K=this.toName()),$==="hsl"&&(K=this.toHslString()),$==="hsv"&&(K=this.toHsvString()),K||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function($,se){var K=$.apply(null,[this].concat([].slice.call(se)));return this._r=K._r,this._g=K._g,this._b=K._b,this.setAlpha(K._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(J,arguments)},darken:function(){return this._applyModification(X,arguments)},desaturate:function(){return this._applyModification(I,arguments)},saturate:function(){return this._applyModification(j,arguments)},greyscale:function(){return this._applyModification(D,arguments)},spin:function(){return this._applyModification(N,arguments)},_applyCombination:function($,se){return $.apply(null,[this].concat([].slice.call(se)))},analogous:function(){return this._applyCombination(he,arguments)},complement:function(){return this._applyCombination(F,arguments)},monochromatic:function(){return this._applyCombination(V,arguments)},splitcomplement:function(){return this._applyCombination(ce,arguments)},triad:function(){return this._applyCombination(H,arguments)},tetrad:function(){return this._applyCombination(Z,arguments)}},u.fromRatio=function($,se){if(typeof $=="object"){var K={};for(var Y in $)$.hasOwnProperty(Y)&&(Y==="a"?K[Y]=$[Y]:K[Y]=Ee($[Y]));$=K}return u($,se)};function o($){var se={r:0,g:0,b:0},K=1,Y=null,Ce=null,Q=null,B=!1,E=!1;return typeof $=="string"&&($=q($)),typeof $=="object"&&(ge($.r)&&ge($.g)&&ge($.b)?(se=g($.r,$.g,$.b),B=!0,E=String($.r).substr(-1)==="%"?"prgb":"rgb"):ge($.h)&&ge($.s)&&ge($.v)?(Y=Ee($.s),Ce=Ee($.v),se=S($.h,Y,Ce),B=!0,E="hsv"):ge($.h)&&ge($.s)&&ge($.l)&&(Y=Ee($.s),Q=Ee($.l),se=v($.h,Y,Q),B=!0,E="hsl"),$.hasOwnProperty("a")&&(K=$.a)),K=z(K),{ok:B,format:$.format||E,r:h(255,s(se.r,0)),g:h(255,s(se.g,0)),b:h(255,s(se.b,0)),a:K}}function g($,se,K){return{r:R($,255)*255,g:R(se,255)*255,b:R(K,255)*255}}function p($,se,K){$=R($,255),se=R(se,255),K=R(K,255);var Y=s($,se,K),Ce=h($,se,K),Q,B,E=(Y+Ce)/2;if(Y==Ce)Q=B=0;else{var U=Y-Ce;B=E>.5?U/(2-Y-Ce):U/(Y+Ce);switch(Y){case $:Q=(se-K)/U+(se<K?6:0);break;case se:Q=(K-$)/U+2;break;case K:Q=($-se)/U+4;break}Q/=6}return{h:Q,s:B,l:E}}function v($,se,K){var Y,Ce,Q;$=R($,360),se=R(se,100),K=R(K,100);function B(xe,be,Te){return Te<0&&(Te+=1),Te>1&&(Te-=1),Te<1/6?xe+(be-xe)*6*Te:Te<1/2?be:Te<2/3?xe+(be-xe)*(2/3-Te)*6:xe}if(se===0)Y=Ce=Q=K;else{var E=K<.5?K*(1+se):K+se-K*se,U=2*K-E;Y=B(U,E,$+1/3),Ce=B(U,E,$),Q=B(U,E,$-1/3)}return{r:Y*255,g:Ce*255,b:Q*255}}function _($,se,K){$=R($,255),se=R(se,255),K=R(K,255);var Y=s($,se,K),Ce=h($,se,K),Q,B,E=Y,U=Y-Ce;if(B=Y===0?0:U/Y,Y==Ce)Q=0;else{switch(Y){case $:Q=(se-K)/U+(se<K?6:0);break;case se:Q=(K-$)/U+2;break;case K:Q=($-se)/U+4;break}Q/=6}return{h:Q,s:B,v:E}}function S($,se,K){$=R($,360)*6,se=R(se,100),K=R(K,100);var Y=i.floor($),Ce=$-Y,Q=K*(1-se),B=K*(1-Ce*se),E=K*(1-(1-Ce)*se),U=Y%6,xe=[K,B,Q,Q,E,K][U],be=[E,K,K,B,Q,Q][U],Te=[Q,Q,E,K,K,B][U];return{r:xe*255,g:be*255,b:Te*255}}function k($,se,K,Y){var Ce=[ye(m($).toString(16)),ye(m(se).toString(16)),ye(m(K).toString(16))];return Y&&Ce[0].charAt(0)==Ce[0].charAt(1)&&Ce[1].charAt(0)==Ce[1].charAt(1)&&Ce[2].charAt(0)==Ce[2].charAt(1)?Ce[0].charAt(0)+Ce[1].charAt(0)+Ce[2].charAt(0):Ce.join("")}function T($,se,K,Y,Ce){var Q=[ye(m($).toString(16)),ye(m(se).toString(16)),ye(m(K).toString(16)),ye(Oe(Y))];return Ce&&Q[0].charAt(0)==Q[0].charAt(1)&&Q[1].charAt(0)==Q[1].charAt(1)&&Q[2].charAt(0)==Q[2].charAt(1)&&Q[3].charAt(0)==Q[3].charAt(1)?Q[0].charAt(0)+Q[1].charAt(0)+Q[2].charAt(0)+Q[3].charAt(0):Q.join("")}function M($,se,K,Y){var Ce=[ye(Oe(Y)),ye(m($).toString(16)),ye(m(se).toString(16)),ye(m(K).toString(16))];return Ce.join("")}u.equals=function($,se){return!$||!se?!1:u($).toRgbString()==u(se).toRgbString()},u.random=function(){return u.fromRatio({r:l(),g:l(),b:l()})};function I($,se){se=se===0?0:se||10;var K=u($).toHsl();return K.s-=se/100,K.s=w(K.s),u(K)}function j($,se){se=se===0?0:se||10;var K=u($).toHsl();return K.s+=se/100,K.s=w(K.s),u(K)}function D($){return u($).desaturate(100)}function y($,se){se=se===0?0:se||10;var K=u($).toHsl();return K.l+=se/100,K.l=w(K.l),u(K)}function J($,se){se=se===0?0:se||10;var K=u($).toRgb();return K.r=s(0,h(255,K.r-m(255*-(se/100)))),K.g=s(0,h(255,K.g-m(255*-(se/100)))),K.b=s(0,h(255,K.b-m(255*-(se/100)))),u(K)}function X($,se){se=se===0?0:se||10;var K=u($).toHsl();return K.l-=se/100,K.l=w(K.l),u(K)}function N($,se){var K=u($).toHsl(),Y=(K.h+se)%360;return K.h=Y<0?360+Y:Y,u(K)}function F($){var se=u($).toHsl();return se.h=(se.h+180)%360,u(se)}function H($){var se=u($).toHsl(),K=se.h;return[u($),u({h:(K+120)%360,s:se.s,l:se.l}),u({h:(K+240)%360,s:se.s,l:se.l})]}function Z($){var se=u($).toHsl(),K=se.h;return[u($),u({h:(K+90)%360,s:se.s,l:se.l}),u({h:(K+180)%360,s:se.s,l:se.l}),u({h:(K+270)%360,s:se.s,l:se.l})]}function ce($){var se=u($).toHsl(),K=se.h;return[u($),u({h:(K+72)%360,s:se.s,l:se.l}),u({h:(K+216)%360,s:se.s,l:se.l})]}function he($,se,K){se=se||6,K=K||30;var Y=u($).toHsl(),Ce=360/K,Q=[u($)];for(Y.h=(Y.h-(Ce*se>>1)+720)%360;--se;)Y.h=(Y.h+Ce)%360,Q.push(u(Y));return Q}function V($,se){se=se||6;for(var K=u($).toHsv(),Y=K.h,Ce=K.s,Q=K.v,B=[],E=1/se;se--;)B.push(u({h:Y,s:Ce,v:Q})),Q=(Q+E)%1;return B}u.mix=function($,se,K){K=K===0?0:K||50;var Y=u($).toRgb(),Ce=u(se).toRgb(),Q=K/100,B={r:(Ce.r-Y.r)*Q+Y.r,g:(Ce.g-Y.g)*Q+Y.g,b:(Ce.b-Y.b)*Q+Y.b,a:(Ce.a-Y.a)*Q+Y.a};return u(B)},u.readability=function($,se){var K=u($),Y=u(se);return(i.max(K.getLuminance(),Y.getLuminance())+.05)/(i.min(K.getLuminance(),Y.getLuminance())+.05)},u.isReadable=function($,se,K){var Y=u.readability($,se),Ce,Q;Q=!1,Ce=ie(K);switch(Ce.level+Ce.size){case"AAsmall":case"AAAlarge":Q=Y>=4.5;break;case"AAlarge":Q=Y>=3;break;case"AAAsmall":Q=Y>=7;break}return Q},u.mostReadable=function($,se,K){var Y=null,Ce=0,Q,B,E,U;K=K||{},B=K.includeFallbackColors,E=K.level,U=K.size;for(var xe=0;xe<se.length;xe++)Q=u.readability($,se[xe]),Q>Ce&&(Ce=Q,Y=u(se[xe]));return u.isReadable($,Y,{level:E,size:U})||!B?Y:(K.includeFallbackColors=!1,u.mostReadable($,["#fff","#000"],K))};var ve=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},ne=u.hexNames=W(ve);function W($){var se={};for(var K in $)$.hasOwnProperty(K)&&(se[$[K]]=K);return se}function z($){return $=parseFloat($),(isNaN($)||$<0||$>1)&&($=1),$}function R($,se){le($)&&($="100%");var K=pe($);return $=h(se,s(0,parseFloat($))),K&&($=parseInt($*se,10)/100),i.abs($-se)<1e-6?1:$%se/parseFloat(se)}function w($){return h(1,s(0,$))}function P($){return parseInt($,16)}function le($){return typeof $=="string"&&$.indexOf(".")!=-1&&parseFloat($)===1}function pe($){return typeof $=="string"&&$.indexOf("%")!=-1}function ye($){return $.length==1?"0"+$:""+$}function Ee($){return $<=1&&($=$*100+"%"),$}function Oe($){return i.round(parseFloat($)*255).toString(16)}function ae($){return P($)/255}var fe=function(){var $="[-\\+]?\\d+%?",se="[-\\+]?\\d*\\.\\d+%?",K="(?:"+se+")|(?:"+$+")",Y="[\\s|\\(]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")\\s*\\)?",Ce="[\\s|\\(]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")\\s*\\)?";return{CSS_UNIT:new RegExp(K),rgb:new RegExp("rgb"+Y),rgba:new RegExp("rgba"+Ce),hsl:new RegExp("hsl"+Y),hsla:new RegExp("hsla"+Ce),hsv:new RegExp("hsv"+Y),hsva:new RegExp("hsva"+Ce),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ge($){return!!fe.CSS_UNIT.exec($)}function q($){$=$.replace(O,"").replace(C,"").toLowerCase();var se=!1;if(ve[$])$=ve[$],se=!0;else if($=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var K;return(K=fe.rgb.exec($))?{r:K[1],g:K[2],b:K[3]}:(K=fe.rgba.exec($))?{r:K[1],g:K[2],b:K[3],a:K[4]}:(K=fe.hsl.exec($))?{h:K[1],s:K[2],l:K[3]}:(K=fe.hsla.exec($))?{h:K[1],s:K[2],l:K[3],a:K[4]}:(K=fe.hsv.exec($))?{h:K[1],s:K[2],v:K[3]}:(K=fe.hsva.exec($))?{h:K[1],s:K[2],v:K[3],a:K[4]}:(K=fe.hex8.exec($))?{r:P(K[1]),g:P(K[2]),b:P(K[3]),a:ae(K[4]),format:se?"name":"hex8"}:(K=fe.hex6.exec($))?{r:P(K[1]),g:P(K[2]),b:P(K[3]),format:se?"name":"hex"}:(K=fe.hex4.exec($))?{r:P(K[1]+""+K[1]),g:P(K[2]+""+K[2]),b:P(K[3]+""+K[3]),a:ae(K[4]+""+K[4]),format:se?"name":"hex8"}:(K=fe.hex3.exec($))?{r:P(K[1]+""+K[1]),g:P(K[2]+""+K[2]),b:P(K[3]+""+K[3]),format:se?"name":"hex"}:!1}function ie($){var se,K;return $=$||{level:"AA",size:"small"},se=($.level||"AA").toUpperCase(),K=($.size||"small").toLowerCase(),se!=="AA"&&se!=="AAA"&&(se="AA"),K!=="small"&&K!=="large"&&(K="small"),{level:se,size:K}}a.exports?a.exports=u:!(f=function(){return u}.call(G,d,G,a),f!==void 0&&(a.exports=f))})(Math)},bCnd:function(a,G,d){"use strict";d.d(G,"b",function(){return C}),d.d(G,"a",function(){return x});var f=d("je13"),i=d.n(f),O=!1;function C(m,h){var s=i.a.get("__ec");s||(s={}),s[m]=h,i.a.set("__ec",s)}function x(m,h){var s=i.a.get("__ec");return s?s[m]===void 0?h:s[m]:h}},bQjk:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return function(i){var O=f,C=O.lib,x=C.CipherParams,m=O.enc,h=m.Hex,s=O.format,l=s.Hex={stringify:function(u){return u.ciphertext.toString(h)},parse:function(u){var o=h.parse(u);return x.create({ciphertext:o})}}}(),f.format.Hex})},bT9E:function(a,G,d){"use strict";d.d(G,"a",function(){return i});var f=d("VTBJ");function i(O,C){var x=Object(f.a)({},O);return Array.isArray(C)&&C.forEach(function(m){delete x[m]}),x}},c5Ni:function(a,G,d){},cDPC:function(a,G,d){"use strict";var f=d("tJVT"),i=d("q1tI"),O=d.n(i),C=d("i3hx"),x=d.n(C);G.a=function(m){var h=m.defaultX,s=h===void 0?"40%":h,l=m.leftChild,u=m.rightChild,o=m.className,g=m.hideResize,p=g===void 0?!1:g,v=Object(i.useState)(s),_=Object(f.a)(v,2),S=_[0],k=_[1],T=Object(i.useRef)();function M(){T.current=!0}Object(i.useEffect)(function(){function D(J){T.current&&k(J.pageX)}function y(){T.current=!1}return window.addEventListener("mousemove",D),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",D),window.removeEventListener("mouseup",y)}},[]);var I=typeof S=="number"&&S!==.01?"".concat(S,"px"):s,j="calc(100% - ".concat(p?"0px":"4px"," - ").concat(I,")");return O.a.createElement("div",{className:"split-panel-container ".concat(o)},O.a.createElement("section",{style:{width:I,display:S===.01?"none":""}},l),O.a.createElement("section",{className:"resize-x-bar",onMouseDown:M},O.a.createElement("a",{className:"btn-resize"},O.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},O.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),O.a.createElement("section",{style:{width:j}},u))}},cv67:function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){return function(i){var O=f,C=O.lib,x=C.WordArray,m=C.Hasher,h=O.algo,s=[];(function(){for(var v=0;v<64;v++)s[v]=i.abs(i.sin(v+1))*4294967296|0})();var l=h.MD5=m.extend({_doReset:function(){this._hash=new x.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,_){for(var S=0;S<16;S++){var k=_+S,T=v[k];v[k]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360}var M=this._hash.words,I=v[_+0],j=v[_+1],D=v[_+2],y=v[_+3],J=v[_+4],X=v[_+5],N=v[_+6],F=v[_+7],H=v[_+8],Z=v[_+9],ce=v[_+10],he=v[_+11],V=v[_+12],ve=v[_+13],ne=v[_+14],W=v[_+15],z=M[0],R=M[1],w=M[2],P=M[3];z=u(z,R,w,P,I,7,s[0]),P=u(P,z,R,w,j,12,s[1]),w=u(w,P,z,R,D,17,s[2]),R=u(R,w,P,z,y,22,s[3]),z=u(z,R,w,P,J,7,s[4]),P=u(P,z,R,w,X,12,s[5]),w=u(w,P,z,R,N,17,s[6]),R=u(R,w,P,z,F,22,s[7]),z=u(z,R,w,P,H,7,s[8]),P=u(P,z,R,w,Z,12,s[9]),w=u(w,P,z,R,ce,17,s[10]),R=u(R,w,P,z,he,22,s[11]),z=u(z,R,w,P,V,7,s[12]),P=u(P,z,R,w,ve,12,s[13]),w=u(w,P,z,R,ne,17,s[14]),R=u(R,w,P,z,W,22,s[15]),z=o(z,R,w,P,j,5,s[16]),P=o(P,z,R,w,N,9,s[17]),w=o(w,P,z,R,he,14,s[18]),R=o(R,w,P,z,I,20,s[19]),z=o(z,R,w,P,X,5,s[20]),P=o(P,z,R,w,ce,9,s[21]),w=o(w,P,z,R,W,14,s[22]),R=o(R,w,P,z,J,20,s[23]),z=o(z,R,w,P,Z,5,s[24]),P=o(P,z,R,w,ne,9,s[25]),w=o(w,P,z,R,y,14,s[26]),R=o(R,w,P,z,H,20,s[27]),z=o(z,R,w,P,ve,5,s[28]),P=o(P,z,R,w,D,9,s[29]),w=o(w,P,z,R,F,14,s[30]),R=o(R,w,P,z,V,20,s[31]),z=g(z,R,w,P,X,4,s[32]),P=g(P,z,R,w,H,11,s[33]),w=g(w,P,z,R,he,16,s[34]),R=g(R,w,P,z,ne,23,s[35]),z=g(z,R,w,P,j,4,s[36]),P=g(P,z,R,w,J,11,s[37]),w=g(w,P,z,R,F,16,s[38]),R=g(R,w,P,z,ce,23,s[39]),z=g(z,R,w,P,ve,4,s[40]),P=g(P,z,R,w,I,11,s[41]),w=g(w,P,z,R,y,16,s[42]),R=g(R,w,P,z,N,23,s[43]),z=g(z,R,w,P,Z,4,s[44]),P=g(P,z,R,w,V,11,s[45]),w=g(w,P,z,R,W,16,s[46]),R=g(R,w,P,z,D,23,s[47]),z=p(z,R,w,P,I,6,s[48]),P=p(P,z,R,w,F,10,s[49]),w=p(w,P,z,R,ne,15,s[50]),R=p(R,w,P,z,X,21,s[51]),z=p(z,R,w,P,V,6,s[52]),P=p(P,z,R,w,y,10,s[53]),w=p(w,P,z,R,ce,15,s[54]),R=p(R,w,P,z,j,21,s[55]),z=p(z,R,w,P,H,6,s[56]),P=p(P,z,R,w,W,10,s[57]),w=p(w,P,z,R,N,15,s[58]),R=p(R,w,P,z,ve,21,s[59]),z=p(z,R,w,P,J,6,s[60]),P=p(P,z,R,w,he,10,s[61]),w=p(w,P,z,R,D,15,s[62]),R=p(R,w,P,z,Z,21,s[63]),M[0]=M[0]+z|0,M[1]=M[1]+R|0,M[2]=M[2]+w|0,M[3]=M[3]+P|0},_doFinalize:function(){var v=this._data,_=v.words,S=this._nDataBytes*8,k=v.sigBytes*8;_[k>>>5]|=128<<24-k%32;var T=i.floor(S/4294967296),M=S;_[(k+64>>>9<<4)+15]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,_[(k+64>>>9<<4)+14]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,v.sigBytes=(_.length+1)*4,this._process();for(var I=this._hash,j=I.words,D=0;D<4;D++){var y=j[D];j[D]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}return I},clone:function(){var v=m.clone.call(this);return v._hash=this._hash.clone(),v}});function u(v,_,S,k,T,M,I){var j=v+(_&S|~_&k)+T+I;return(j<<M|j>>>32-M)+_}function o(v,_,S,k,T,M,I){var j=v+(_&k|S&~k)+T+I;return(j<<M|j>>>32-M)+_}function g(v,_,S,k,T,M,I){var j=v+(_^S^k)+T+I;return(j<<M|j>>>32-M)+_}function p(v,_,S,k,T,M,I){var j=v+(S^(_|~k))+T+I;return(j<<M|j>>>32-M)+_}O.MD5=m._createHelper(l),O.HmacMD5=m._createHmacHelper(l)}(Math),f.MD5})},dejd:function(a,G,d){},dmUQ:function(a,G,d){"use strict";var f=d("Ff2n"),i=d("rePB"),O=d("1OyB"),C=d("vuIU"),x=d("Ji7U"),m=d("md7G"),h=d("foSv"),s=d("q1tI"),l=d.n(s),u=d("TSYQ"),o=d.n(u),g=d("4IlW");function p(H,Z){var ce=Object.keys(H);if(Object.getOwnPropertySymbols){var he=Object.getOwnPropertySymbols(H);Z&&(he=he.filter(function(V){return Object.getOwnPropertyDescriptor(H,V).enumerable})),ce.push.apply(ce,he)}return ce}function v(H){for(var Z=1;Z<arguments.length;Z++){var ce=arguments[Z]!=null?arguments[Z]:{};Z%2?p(Object(ce),!0).forEach(function(he){Object(i.a)(H,he,ce[he])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(ce)):p(Object(ce)).forEach(function(he){Object.defineProperty(H,he,Object.getOwnPropertyDescriptor(ce,he))})}return H}function _(H){var Z=S();return function(){var he=Object(h.a)(H),V;if(Z){var ve=Object(h.a)(this).constructor;V=Reflect.construct(he,arguments,ve)}else V=he.apply(this,arguments);return Object(m.a)(this,V)}}function S(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(H){return!1}}function k(){}function T(H){H.preventDefault()}var M=function(Z){return Z.replace(/[^\w.-]+/g,"")},I=200,j=600,D=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,y=function(Z){return Z!=null},J=function(Z,ce){return ce===Z||typeof ce=="number"&&typeof Z=="number"&&isNaN(ce)&&isNaN(Z)},X=function(H){Object(x.a)(ce,H);var Z=_(ce);function ce(he){var V;Object(O.a)(this,ce),V=Z.call(this,he),V.onKeyDown=function(W){var z=V.props,R=z.onKeyDown,w=z.onPressEnter;if(W.keyCode===g.a.UP){var P=V.getRatio(W);V.up(W,P,null),V.stop()}else if(W.keyCode===g.a.DOWN){var le=V.getRatio(W);V.down(W,le,null),V.stop()}else W.keyCode===g.a.ENTER&&w&&w(W);if(V.recordCursorPosition(),V.lastKeyCode=W.keyCode,R){for(var pe=arguments.length,ye=new Array(pe>1?pe-1:0),Ee=1;Ee<pe;Ee++)ye[Ee-1]=arguments[Ee];R.apply(void 0,[W].concat(ye))}},V.onKeyUp=function(W){var z=V.props.onKeyUp;if(V.stop(),V.recordCursorPosition(),z){for(var R=arguments.length,w=new Array(R>1?R-1:0),P=1;P<R;P++)w[P-1]=arguments[P];z.apply(void 0,[W].concat(w))}},V.onChange=function(W){var z=V.props.onChange;V.state.focused&&(V.inputting=!0),V.rawInput=V.props.parser(V.getValueFromEvent(W)),V.setState({inputValue:V.rawInput}),z(V.toNumber(V.rawInput))},V.onMouseUp=function(){var W=V.props.onMouseUp;V.recordCursorPosition(),W&&W.apply(void 0,arguments)},V.onFocus=function(){var W;V.setState({focused:!0}),(W=V.props).onFocus.apply(W,arguments)},V.onBlur=function(){var W=V.props.onBlur;V.inputting=!1,V.setState({focused:!1});var z=V.getCurrentValidValue(V.state.inputValue),R=V.setValue(z,k);if(W){var w=V.input.value,P=V.getInputDisplayValue({focus:!1,value:R});V.input.value=P&&Number(P),W.apply(void 0,arguments),V.input.value=w}},V.getRatio=function(W){var z=1;return W.metaKey||W.ctrlKey?z=.1:W.shiftKey&&(z=10),z},V.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},V.getPrecision=function(W){if(y(V.props.precision))return V.props.precision;var z=String(W);if(z.indexOf("e-")>=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var R=0;return z.indexOf(".")>=0&&(R=z.length-z.indexOf(".")-1),R},V.getInputDisplayValue=function(W){var z=W||V.state,R=z.focused,w=z.inputValue,P=z.value,le;R?le=w:le=V.toPrecisionAsStep(P),le==null&&(le="");var pe=V.formatWrapper(le);return y(V.props.decimalSeparator)&&(pe=pe.toString().replace(".",V.props.decimalSeparator)),pe},V.recordCursorPosition=function(){try{V.cursorStart=V.input.selectionStart,V.cursorEnd=V.input.selectionEnd,V.currentValue=V.input.value,V.cursorBefore=V.input.value.substring(0,V.cursorStart),V.cursorAfter=V.input.value.substring(V.cursorEnd)}catch(W){}},V.restoreByAfter=function(W){if(W===void 0)return!1;var z=V.input.value,R=z.lastIndexOf(W);if(R===-1)return!1;var w=V.cursorBefore.length;return V.lastKeyCode===g.a.DELETE&&V.cursorBefore.charAt(w-1)===W[0]?(V.fixCaret(w,w),!0):R+W.length===z.length?(V.fixCaret(R,R),!0):!1},V.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(z,R){var w=W.substring(R);return V.restoreByAfter(w)})},V.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},V.stop=function(){V.autoStepTimer&&clearTimeout(V.autoStepTimer)},V.down=function(W,z,R){V.pressingUpOrDown=!0,V.step("down",W,z,R)},V.up=function(W,z,R){V.pressingUpOrDown=!0,V.step("up",W,z,R)},V.saveInput=function(W){V.input=W};var ve=he.value;ve===void 0&&(ve=he.defaultValue),V.state={focused:he.autoFocus};var ne=V.getValidValue(V.toNumber(ve));return V.state=v(v({},V.state),{},{inputValue:V.toPrecisionAsStep(ne),value:ne}),V}return Object(C.a)(ce,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(V){var ve=this.props,ne=ve.value,W=ve.onChange,z=ve.max,R=ve.min,w=this.state.focused;if(V){if(!J(V.value,ne)||!J(V.max,z)||!J(V.min,R)){var P=w?ne:this.getValidValue(ne),le;this.pressingUpOrDown?le=P:this.inputting?le=this.rawInput:le=this.toPrecisionAsStep(P),this.setState({value:P,inputValue:le})}var pe="value"in this.props?ne:this.state.value;"max"in this.props&&V.max!==z&&typeof pe=="number"&&pe>z&&W&&W(z),"min"in this.props&&V.min!==R&&typeof pe=="number"&&pe<R&&W&&W(R)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ye=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===g.a.BACKSPACE?ye=this.cursorStart-1:this.lastKeyCode===g.a.DELETE&&(ye=this.cursorStart):ye=this.input.value.length,this.fixCaret(ye,ye)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case g.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case g.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ee){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(V){var ve=V;return ve===""?ve="":this.isNotCompleteNumber(parseFloat(ve))?ve=this.state.value:ve=this.getValidValue(ve),this.toNumber(ve)}},{key:"getValueFromEvent",value:function(V){var ve=V.target.value.trim().replace(/。/g,".");return y(this.props.decimalSeparator)&&(ve=ve.replace(this.props.decimalSeparator,".")),ve}},{key:"getValidValue",value:function(V){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(V);return isNaN(W)?V:(W<ve&&(W=ve),W>ne&&(W=ne),W)}},{key:"setValue",value:function(V,ve){var ne=this.props.precision,W=this.isNotCompleteNumber(parseFloat(V))?null:parseFloat(V),z=this.state.value,R=z===void 0?null:z,w=this.state.inputValue,P=w===void 0?null:w,le=typeof W=="number"?W.toFixed(ne):"".concat(W),pe=W!==R||le!=="".concat(P);return"value"in this.props?(P=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:P},ve)):this.setState({value:W,inputValue:this.toPrecisionAsStep(V)},ve),pe&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(V){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ne=this.props,W=ne.precision,z=ne.step;if(y(W))return W;var R=this.getPrecision(ve),w=this.getPrecision(z),P=this.getPrecision(V);return V?Math.max(P,R+w):R+w}},{key:"getPrecisionFactor",value:function(V){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ne=this.getMaxPrecision(V,ve);return Math.pow(10,ne)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(V){return this.props.formatter?this.props.formatter(V):V}},{key:"toPrecisionAsStep",value:function(V){if(this.isNotCompleteNumber(V)||V==="")return V;var ve=Math.abs(this.getMaxPrecision(V));return isNaN(ve)?V.toString():Number(V).toFixed(ve)}},{key:"toNumber",value:function(V){var ve=this.props.precision,ne=this.state.focused,W=V&&V.length>16&≠return this.isNotCompleteNumber(V)||W?V:y(ve)?Math.round(V*Math.pow(10,ve))/Math.pow(10,ve):Number(V)}},{key:"upStep",value:function(V,ve){var ne=this.props.step,W=this.getPrecisionFactor(V,ve),z=Math.abs(this.getMaxPrecision(V,ve)),R=((W*V+W*ne*ve)/W).toFixed(z);return this.toNumber(R)}},{key:"downStep",value:function(V,ve){var ne=this.props.step,W=this.getPrecisionFactor(V,ve),z=Math.abs(this.getMaxPrecision(V,ve)),R=((W*V-W*ne*ve)/W).toFixed(z);return this.toNumber(R)}},{key:"step",value:function(V,ve){var ne=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),ve&&(ve.persist(),ve.preventDefault());var R=this.props;if(R.disabled)return;var w=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(w))return;var P=this["".concat(V,"Step")](w,W),le=P>R.max||P<R.min;if(P>R.max?P=R.max:P<R.min&&(P=R.min),this.setValue(P,null),this.setState({focused:!0},function(){ne.pressingUpOrDown=!1}),le)return;this.autoStepTimer=setTimeout(function(){ne[V](ve,W,!0)},z?I:j)}},{key:"fixCaret",value:function(V,ve){if(V===void 0||ve===void 0||!this.input||!this.input.value)return;try{var ne=this.input.selectionStart,W=this.input.selectionEnd;(V!==ne||ve!==W)&&this.input.setSelectionRange(V,ve)}catch(z){}}},{key:"render",value:function(){var V,ve=this.props,ne=ve.prefixCls,W=ve.disabled,z=ve.readOnly,R=ve.useTouch,w=ve.autoComplete,P=ve.upHandler,le=ve.downHandler,pe=ve.className,ye=ve.max,Ee=ve.min,Oe=ve.style,ae=ve.title,fe=ve.onMouseEnter,ge=ve.onMouseLeave,q=ve.onMouseOver,ie=ve.onMouseOut,$=ve.required,se=ve.onClick,K=ve.tabIndex,Y=ve.type,Ce=ve.placeholder,Q=ve.id,B=ve.inputMode,E=ve.pattern,U=ve.step,xe=ve.maxLength,be=ve.autoFocus,Te=ve.name,Fe=ve.onPaste,Be=ve.onInput,Ue=Object(f.a)(ve,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),ze=this.state,Ve=ze.value,Xe=ze.focused,Je=o()(ne,(V={},Object(i.a)(V,pe,!!pe),Object(i.a)(V,"".concat(ne,"-disabled"),W),Object(i.a)(V,"".concat(ne,"-focused"),Xe),V)),Ne={};Object.keys(Ue).forEach(function(Re){(Re.substr(0,5)==="data-"||Re.substr(0,5)==="aria-"||Re==="role")&&(Ne[Re]=Ue[Re])});var tt=!z&&!W,nt=this.getInputDisplayValue(null),Ke=(Ve||Ve===0)&&(isNaN(Ve)||Number(Ve)>=ye),$e=(Ve||Ve===0)&&(isNaN(Ve)||Number(Ve)<=Ee),je=Ke||W||z,Me=$e||W||z,Ie=o()("".concat(ne,"-handler"),"".concat(ne,"-handler-up"),Object(i.a)({},"".concat(ne,"-handler-up-disabled"),je)),_e=o()("".concat(ne,"-handler"),"".concat(ne,"-handler-down"),Object(i.a)({},"".concat(ne,"-handler-down-disabled"),Me)),Se=R?{onTouchStart:je?k:this.up,onTouchEnd:this.stop}:{onMouseDown:je?k:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ke=R?{onTouchStart:Me?k:this.down,onTouchEnd:this.stop}:{onMouseDown:Me?k:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return l.a.createElement("div",{className:Je,style:Oe,title:ae,onMouseEnter:fe,onMouseLeave:ge,onMouseOver:q,onMouseOut:ie,onFocus:function(){return null},onBlur:function(){return null}},l.a.createElement("div",{className:"".concat(ne,"-handler-wrap")},l.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Increase Value","aria-disabled":je,className:Ie}),P||l.a.createElement("span",{unselectable:"on",className:"".concat(ne,"-handler-up-inner"),onClick:T})),l.a.createElement("span",Object.assign({unselectable:"on"},ke,{role:"button","aria-label":"Decrease Value","aria-disabled":Me,className:_e}),le||l.a.createElement("span",{unselectable:"on",className:"".concat(ne,"-handler-down-inner"),onClick:T}))),l.a.createElement("div",{className:"".concat(ne,"-input-wrap")},l.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ee,"aria-valuemax":ye,"aria-valuenow":Ve,required:$,type:Y,placeholder:Ce,onPaste:Fe,onClick:se,onMouseUp:this.onMouseUp,className:"".concat(ne,"-input"),tabIndex:K,autoComplete:w,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:k,onKeyUp:tt?this.onKeyUp:k,autoFocus:be,maxLength:xe,readOnly:z,disabled:W,max:ye,min:Ee,step:U,name:Te,title:ae,id:Q,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(nt),pattern:E,inputMode:B,onInput:Be},Ne))))}}]),ce}(l.a.Component);X.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:D,min:-D,step:1,style:{},onChange:k,onKeyDown:k,onPressEnter:k,onFocus:k,onBlur:k,parser:M,required:!1,autoComplete:"off"};var N=X,F=G.a=N},e7zE:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("3y9D"),d("WYAk"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.Base,x=O.WordArray,m=i.algo,h=m.SHA1,s=m.HMAC,l=m.PBKDF2=C.extend({cfg:C.extend({keySize:128/32,hasher:h,iterations:1}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,o){for(var g=this.cfg,p=s.create(g.hasher,u),v=x.create(),_=x.create([1]),S=v.words,k=_.words,T=g.keySize,M=g.iterations;S.length<T;){var I=p.update(o).finalize(_);p.reset();for(var j=I.words,D=j.length,y=I,J=1;J<M;J++){y=p.finalize(y),p.reset();for(var X=y.words,N=0;N<D;N++)j[N]^=X[N]}v.concat(I),k[0]++}return v.sigBytes=T*4,v}});i.PBKDF2=function(u,o,g){return l.create(g).compute(u,o)}}(),f.PBKDF2})},fAei:function(a,G,d){"use strict";d.d(G,"a",function(){return I.a});var f=d("rePB"),i=d("VTBJ"),O=d("KQm4"),C=d("1OyB"),x=d("vuIU"),m=d("Ji7U"),h=d("LK+K"),s=d("q1tI"),l=d("4IlW"),u=d("Kwbf"),o=d("TSYQ"),g=d.n(o),p=d("sboe"),v=d("OZM5"),_=d("815F"),S=d("ODXe"),k=d("Ff2n"),T=d("+nKL"),M=d("8XRh"),I=d("WaYH"),j=function(Ee,Oe){var ae=Ee.className,fe=Ee.style,ge=Ee.motion,q=Ee.motionNodes,ie=Ee.motionType,$=Ee.onMotionStart,se=Ee.onMotionEnd,K=Ee.active,Y=Ee.treeNodeRequiredProps,Ce=Object(k.a)(Ee,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),Q=s.useState(!0),B=Object(S.a)(Q,2),E=B[0],U=B[1],xe=s.useContext(p.a),be=xe.prefixCls,Te=s.useRef(!1),Fe=function(){Te.current||se(),Te.current=!0};return Object(s.useEffect)(function(){q&&ie==="hide"&&E&&U(!1)},[q]),Object(s.useEffect)(function(){return q&&$(),function(){q&&Fe()}},[]),q?s.createElement(M.default,Object.assign({ref:Oe,visible:E},ge,{motionAppear:ie==="show",onAppearEnd:Fe,onLeaveEnd:Fe}),function(Be,Ue){var ze=Be.className,Ve=Be.style;return s.createElement("div",{ref:Ue,className:g()("".concat(be,"-treenode-motion"),ze),style:Ve},q.map(function(Xe){var Je=Xe.data,Ne=Je.key,tt=Object(k.a)(Je,["key"]),nt=Xe.isStart,Ke=Xe.isEnd;delete tt.children;var $e=Object(_.f)(Ne,Y);return s.createElement(I.a,Object.assign({},tt,$e,{active:K,data:Xe.data,key:Ne,isStart:nt,isEnd:Ke}))}))}):s.createElement(I.a,Object.assign({domRef:Oe,className:ae,style:fe},Ce,{active:K}))};j.displayName="MotionTreeNode";var D=s.forwardRef(j),y=D;function J(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Oe=ye.length,ae=Ee.length;if(Math.abs(Oe-ae)!==1)return{add:!1,key:null};function fe(ge,q){var ie=new Map;ge.forEach(function(se){ie.set(se,!0)});var $=q.filter(function(se){return!ie.has(se)});return $.length===1?$[0]:null}return Oe<ae?{add:!0,key:fe(ye,Ee)}:{add:!1,key:fe(Ee,ye)}}function X(ye,Ee,Oe){var ae=ye.findIndex(function(ie){var $=ie.data;return $.key===Oe}),fe=ye[ae+1],ge=Ee.findIndex(function(ie){var $=ie.data;return $.key===Oe});if(fe){var q=Ee.findIndex(function(ie){var $=ie.data;return $.key===fe.data.key});return Ee.slice(ge+1,q)}return Ee.slice(ge+1)}var N={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},F=function(){},H="RC_TREE_MOTION_".concat(Math.random()),Z={key:H},ce={key:H,level:0,index:0,pos:"0",node:Z},he={parent:null,children:[],pos:ce.pos,data:Z,isStart:[],isEnd:[]};function V(ye,Ee,Oe,ae){return Ee===!1||!Oe?ye:ye.slice(0,Math.ceil(Oe/ae)+1)}function ve(ye){var Ee=ye.data.key,Oe=ye.pos;return Object(_.e)(Ee,Oe)}function ne(ye){for(var Ee=String(ye.data.key),Oe=ye;Oe.parent;)Oe=Oe.parent,Ee="".concat(Oe.data.key," > ").concat(Ee);return Ee}var W=function(Ee,Oe){var ae=Ee.prefixCls,fe=Ee.data,ge=Ee.selectable,q=Ee.checkable,ie=Ee.expandedKeys,$=Ee.selectedKeys,se=Ee.checkedKeys,K=Ee.loadedKeys,Y=Ee.loadingKeys,Ce=Ee.halfCheckedKeys,Q=Ee.keyEntities,B=Ee.disabled,E=Ee.dragging,U=Ee.dragOverNodeKey,xe=Ee.dropPosition,be=Ee.motion,Te=Ee.height,Fe=Ee.itemHeight,Be=Ee.virtual,Ue=Ee.focusable,ze=Ee.activeItem,Ve=Ee.focused,Xe=Ee.tabIndex,Je=Ee.onKeyDown,Ne=Ee.onFocus,tt=Ee.onBlur,nt=Ee.onActiveChange,Ke=Ee.onListChangeStart,$e=Ee.onListChangeEnd,je=Object(k.a)(Ee,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),Me=s.useRef(null);s.useImperativeHandle(Oe,function(){return{scrollTo:function(rr){Me.current.scrollTo(rr)}}});var Ie=s.useState(ie),_e=Object(S.a)(Ie,2),Se=_e[0],ke=_e[1],Re=s.useState(fe),He=Object(S.a)(Re,2),Ae=He[0],Ye=He[1],it=s.useState(fe),lt=Object(S.a)(it,2),ut=lt[0],ct=lt[1],xt=s.useState([]),dt=Object(S.a)(xt,2),kt=dt[0],zt=dt[1],Vt=s.useState(null),Yt=Object(S.a)(Vt,2),It=Yt[0],Ut=Yt[1];function jr(){Ye(fe),ct(fe),zt([]),Ut(null),$e()}s.useEffect(function(){ke(ie);var Jt=J(Se,ie);if(Jt.key!==null)if(Jt.add){var rr=Ae.findIndex(function(Xt){var hr=Xt.data.key;return hr===Jt.key}),dr=V(X(Ae,fe,Jt.key),Be,Te,Fe),mr=Ae.slice();mr.splice(rr+1,0,he),ct(mr),zt(dr),Ut("show")}else{var Lr=fe.findIndex(function(Xt){var hr=Xt.data.key;return hr===Jt.key}),Ft=V(X(fe,Ae,Jt.key),Be,Te,Fe),pt=fe.slice();pt.splice(Lr+1,0,he),ct(pt),zt(Ft),Ut("hide")}else Ae!==fe&&(Ye(fe),ct(fe))},[ie,fe]),s.useEffect(function(){E||jr()},[E]);var Tt=be?ut:fe,Rr={expandedKeys:ie,selectedKeys:$,loadedKeys:K,loadingKeys:Y,checkedKeys:se,halfCheckedKeys:Ce,dragOverNodeKey:U,dropPosition:xe,keyEntities:Q};return s.createElement(s.Fragment,null,Ve&&ze&&s.createElement("span",{style:N,"aria-live":"assertive"},ne(ze)),s.createElement("div",{role:"tree"},s.createElement("input",{style:N,disabled:Ue===!1||B,tabIndex:Ue!==!1?Xe:null,onKeyDown:Je,onFocus:Ne,onBlur:tt,value:"",onChange:F})),s.createElement(T.a,Object.assign({},je,{data:Tt,itemKey:ve,height:Te,fullHeight:!1,virtual:Be,itemHeight:Fe,prefixCls:"".concat(ae,"-list"),ref:Me}),function(Jt){var rr=Jt.pos,dr=Jt.data,mr=dr.key,Lr=Object(k.a)(dr,["key"]),Ft=Jt.isStart,pt=Jt.isEnd,Xt=Object(_.e)(mr,rr);delete Lr.children;var hr=Object(_.f)(Xt,Rr);return s.createElement(y,Object.assign({},Lr,hr,{active:ze&&mr===ze.data.key,pos:rr,data:Jt.data,isStart:Ft,isEnd:pt,motion:be,motionNodes:mr===H?kt:null,motionType:It,onMotionStart:Ke,onMotionEnd:jr,treeNodeRequiredProps:Rr,onMouseMove:function(){nt(null)}}))}))},z=s.forwardRef(W);z.displayName="NodeList";var R=z,w=d("NvD2"),P=function(ye){Object(m.a)(Oe,ye);var Ee=Object(h.a)(Oe);function Oe(){var ae;return Object(C.a)(this,Oe),ae=Ee.apply(this,arguments),ae.destroyed=!1,ae.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},ae.listRef=s.createRef(),ae.onNodeDragStart=function(fe,ge){var q=ae.state,ie=q.expandedKeys,$=q.keyEntities,se=ae.props.onDragStart,K=ge.props.eventKey;ae.dragNode=ge;var Y=Object(v.b)(ie,K);ae.setState({dragging:!0,dragNodesKeys:Object(v.g)(K,$)}),ae.setExpandedKeys(Y),se&&se({event:fe,node:Object(_.b)(ge.props)})},ae.onNodeDragEnter=function(fe,ge){var q=ae.state,ie=q.expandedKeys,$=q.keyEntities,se=q.dragNodesKeys,K=ae.props.onDragEnter,Y=ge.props,Ce=Y.pos,Q=Y.eventKey;if(!ae.dragNode||se.indexOf(Q)!==-1)return;var B=Object(v.c)(fe,ge);if(ae.dragNode.props.eventKey===Q&&B===0){ae.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){ae.setState({dragOverNodeKey:Q,dropPosition:B}),ae.delayedDragEnterLogic||(ae.delayedDragEnterLogic={}),Object.keys(ae.delayedDragEnterLogic).forEach(function(E){clearTimeout(ae.delayedDragEnterLogic[E])}),ae.delayedDragEnterLogic[Ce]=window.setTimeout(function(){if(!ae.state.dragging)return;var E=Object(O.a)(ie),U=$[Q];U&&(U.children||[]).length&&(E=Object(v.a)(ie,Q)),"expandedKeys"in ae.props||ae.setExpandedKeys(E),K&&K({event:fe,node:Object(_.b)(ge.props),expandedKeys:E})},400)},0)},ae.onNodeDragOver=function(fe,ge){var q=ae.state.dragNodesKeys,ie=ae.props.onDragOver,$=ge.props.eventKey;if(q.indexOf($)!==-1)return;if(ae.dragNode&&$===ae.state.dragOverNodeKey){var se=Object(v.c)(fe,ge);if(se===ae.state.dropPosition)return;ae.setState({dropPosition:se})}ie&&ie({event:fe,node:Object(_.b)(ge.props)})},ae.onNodeDragLeave=function(fe,ge){var q=ae.props.onDragLeave;ae.setState({dragOverNodeKey:""}),q&&q({event:fe,node:Object(_.b)(ge.props)})},ae.onNodeDragEnd=function(fe,ge){var q=ae.props.onDragEnd;ae.setState({dragOverNodeKey:""}),ae.cleanDragState(),q&&q({event:fe,node:Object(_.b)(ge.props)}),ae.dragNode=null},ae.onNodeDrop=function(fe,ge){var q=ae.state,ie=q.dragNodesKeys,$=ie===void 0?[]:ie,se=q.dropPosition,K=ae.props.onDrop,Y=ge.props,Ce=Y.eventKey,Q=Y.pos;if(ae.setState({dragOverNodeKey:""}),ae.cleanDragState(),$.indexOf(Ce)!==-1){Object(u.a)(!1,"Can not drop to dragNode(include it's children node)");return}var B=Object(v.k)(Q),E={event:fe,node:Object(_.b)(ge.props),dragNode:ae.dragNode?Object(_.b)(ae.dragNode.props):null,dragNodesKeys:$.slice(),dropPosition:se+Number(B[B.length-1]),dropToGap:!1};se!==0&&(E.dropToGap=!0),K&&K(E),ae.dragNode=null},ae.cleanDragState=function(){var fe=ae.state.dragging;fe&&ae.setState({dragging:!1})},ae.onNodeClick=function(fe,ge){var q=ae.props.onClick;q&&q(fe,ge)},ae.onNodeDoubleClick=function(fe,ge){var q=ae.props.onDoubleClick;q&&q(fe,ge)},ae.onNodeSelect=function(fe,ge){var q=ae.state.selectedKeys,ie=ae.state.keyEntities,$=ae.props,se=$.onSelect,K=$.multiple,Y=ge.selected,Ce=ge.key,Q=!Y;Q?K?q=Object(v.a)(q,Ce):q=[Ce]:q=Object(v.b)(q,Ce);var B=q.map(function(E){var U=ie[E];return U?U.node:null}).filter(function(E){return E});ae.setUncontrolledState({selectedKeys:q}),se&&se(q,{event:"select",selected:Q,node:ge,selectedNodes:B,nativeEvent:fe.nativeEvent})},ae.onNodeCheck=function(fe,ge,q){var ie=ae.state,$=ie.keyEntities,se=ie.checkedKeys,K=ie.halfCheckedKeys,Y=ae.props,Ce=Y.checkStrictly,Q=Y.onCheck,B=ge.key,E,U={event:"check",node:ge,checked:q,nativeEvent:fe.nativeEvent};if(Ce){var xe=q?Object(v.a)(se,B):Object(v.b)(se,B),be=Object(v.b)(K,B);E={checked:xe,halfChecked:be},U.checkedNodes=xe.map(function(Ve){return $[Ve]}).filter(function(Ve){return Ve}).map(function(Ve){return Ve.node}),ae.setUncontrolledState({checkedKeys:xe})}else{var Te=Object(w.a)([].concat(Object(O.a)(se),[B]),!0,$),Fe=Te.checkedKeys,Be=Te.halfCheckedKeys;if(!q){var Ue=new Set(Fe);Ue.delete(B);var ze=Object(w.a)(Array.from(Ue),{checked:!1,halfCheckedKeys:Be},$);Fe=ze.checkedKeys,Be=ze.halfCheckedKeys}E=Fe,U.checkedNodes=[],U.checkedNodesPositions=[],U.halfCheckedKeys=Be,Fe.forEach(function(Ve){var Xe=$[Ve];if(!Xe)return;var Je=Xe.node,Ne=Xe.pos;U.checkedNodes.push(Je),U.checkedNodesPositions.push({node:Je,pos:Ne})}),ae.setUncontrolledState({checkedKeys:Fe},!1,{halfCheckedKeys:Be})}Q&&Q(E,U)},ae.onNodeLoad=function(fe){return new Promise(function(ge){ae.setState(function(q){var ie=q.loadedKeys,$=ie===void 0?[]:ie,se=q.loadingKeys,K=se===void 0?[]:se,Y=ae.props,Ce=Y.loadData,Q=Y.onLoad,B=fe.key;if(!Ce||$.indexOf(B)!==-1||K.indexOf(B)!==-1)return{};var E=Ce(fe);return E.then(function(){var U=ae.state,xe=U.loadedKeys,be=U.loadingKeys,Te=Object(v.a)(xe,B),Fe=Object(v.b)(be,B);Q&&Q(Te,{event:"load",node:fe}),ae.setUncontrolledState({loadedKeys:Te}),ae.setState({loadingKeys:Fe}),ge()}),{loadingKeys:Object(v.a)(K,B)}})})},ae.onNodeMouseEnter=function(fe,ge){var q=ae.props.onMouseEnter;q&&q({event:fe,node:ge})},ae.onNodeMouseLeave=function(fe,ge){var q=ae.props.onMouseLeave;q&&q({event:fe,node:ge})},ae.onNodeContextMenu=function(fe,ge){var q=ae.props.onRightClick;q&&(fe.preventDefault(),q({event:fe,node:ge}))},ae.onFocus=function(){var fe=ae.props.onFocus;ae.setState({focused:!0}),fe&&fe.apply(void 0,arguments)},ae.onBlur=function(){var fe=ae.props.onBlur;ae.setState({focused:!1}),ae.onActiveChange(null),fe&&fe.apply(void 0,arguments)},ae.getTreeNodeRequiredProps=function(){var fe=ae.state,ge=fe.expandedKeys,q=fe.selectedKeys,ie=fe.loadedKeys,$=fe.loadingKeys,se=fe.checkedKeys,K=fe.halfCheckedKeys,Y=fe.dragOverNodeKey,Ce=fe.dropPosition,Q=fe.keyEntities;return{expandedKeys:ge||[],selectedKeys:q||[],loadedKeys:ie||[],loadingKeys:$||[],checkedKeys:se||[],halfCheckedKeys:K||[],dragOverNodeKey:Y,dropPosition:Ce,keyEntities:Q}},ae.setExpandedKeys=function(fe){var ge=ae.state.treeData,q=Object(_.d)(ge,fe);ae.setUncontrolledState({expandedKeys:fe,flattenNodes:q},!0)},ae.onNodeExpand=function(fe,ge){var q=ae.state.expandedKeys,ie=ae.state.listChanging,$=ae.props,se=$.onExpand,K=$.loadData,Y=ge.key,Ce=ge.expanded;if(ie)return;var Q=q.indexOf(Y),B=!Ce;if(Object(u.a)(Ce&&Q!==-1||!Ce&&Q===-1,"Expand state not sync with index check"),B?q=Object(v.a)(q,Y):q=Object(v.b)(q,Y),ae.setExpandedKeys(q),se&&se(q,{node:ge,expanded:B,nativeEvent:fe.nativeEvent}),B&&K){var E=ae.onNodeLoad(ge);E&&E.then(function(){var U=Object(_.d)(ae.state.treeData,q);ae.setUncontrolledState({flattenNodes:U})})}},ae.onListChangeStart=function(){ae.setUncontrolledState({listChanging:!0})},ae.onListChangeEnd=function(){setTimeout(function(){ae.setUncontrolledState({listChanging:!1})})},ae.onActiveChange=function(fe){var ge=ae.state.activeKey,q=ae.props.onActiveChange;if(ge===fe)return;ae.setState({activeKey:fe}),fe!==null&&ae.scrollTo({key:fe}),q&&q(fe)},ae.getActiveItem=function(){var fe=ae.state,ge=fe.activeKey,q=fe.flattenNodes;return ge===null?null:q.find(function(ie){var $=ie.data.key;return $===ge})||null},ae.offsetActiveKey=function(fe){var ge=ae.state,q=ge.flattenNodes,ie=ge.activeKey,$=q.findIndex(function(Y){var Ce=Y.data.key;return Ce===ie});$===-1&&fe<0&&($=q.length),$=($+fe+q.length)%q.length;var se=q[$];if(se){var K=se.data.key;ae.onActiveChange(K)}else ae.onActiveChange(null)},ae.onKeyDown=function(fe){var ge=ae.state,q=ge.activeKey,ie=ge.expandedKeys,$=ge.checkedKeys,se=ae.props,K=se.onKeyDown,Y=se.checkable,Ce=se.selectable;switch(fe.which){case l.a.UP:{ae.offsetActiveKey(-1),fe.preventDefault();break}case l.a.DOWN:{ae.offsetActiveKey(1),fe.preventDefault();break}}var Q=ae.getActiveItem();if(Q&&Q.data){var B=ae.getTreeNodeRequiredProps(),E=Q.data.isLeaf===!1||!!(Q.data.children||[]).length,U=Object(_.b)(Object(i.a)(Object(i.a)({},Object(_.f)(q,B)),{},{data:Q.data,active:!0}));switch(fe.which){case l.a.LEFT:{E&&ie.includes(q)?ae.onNodeExpand({},U):Q.parent&&ae.onActiveChange(Q.parent.data.key),fe.preventDefault();break}case l.a.RIGHT:{E&&!ie.includes(q)?ae.onNodeExpand({},U):Q.children&&Q.children.length&&ae.onActiveChange(Q.children[0].data.key),fe.preventDefault();break}case l.a.ENTER:case l.a.SPACE:{Y&&!U.disabled&&U.checkable!==!1&&!U.disableCheckbox?ae.onNodeCheck({},U,!$.includes(q)):!Y&&Ce&&!U.disabled&&U.selectable!==!1&&ae.onNodeSelect({},U);break}}}K&&K(fe)},ae.setUncontrolledState=function(fe){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(ae.destroyed)return;var ie=!1,$=!0,se={};Object.keys(fe).forEach(function(K){if(K in ae.props){$=!1;return}ie=!0,se[K]=fe[K]}),ie&&(!ge||$)&&ae.setState(Object(i.a)(Object(i.a)({},se),q))},ae.scrollTo=function(fe){ae.listRef.current.scrollTo(fe)},ae}return Object(x.a)(Oe,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var fe,ge=this.state,q=ge.focused,ie=ge.flattenNodes,$=ge.keyEntities,se=ge.dragging,K=ge.activeKey,Y=this.props,Ce=Y.prefixCls,Q=Y.className,B=Y.style,E=Y.showLine,U=Y.focusable,xe=Y.tabIndex,be=xe===void 0?0:xe,Te=Y.selectable,Fe=Y.showIcon,Be=Y.icon,Ue=Y.switcherIcon,ze=Y.draggable,Ve=Y.checkable,Xe=Y.checkStrictly,Je=Y.disabled,Ne=Y.motion,tt=Y.loadData,nt=Y.filterTreeNode,Ke=Y.height,$e=Y.itemHeight,je=Y.virtual,Me=Y.titleRender,Ie=Y.onContextMenu,_e=Object(v.f)(this.props);return s.createElement(p.a.Provider,{value:{prefixCls:Ce,selectable:Te,showIcon:Fe,icon:Be,switcherIcon:Ue,draggable:ze,checkable:Ve,checkStrictly:Xe,disabled:Je,keyEntities:$,loadData:tt,filterTreeNode:nt,titleRender:Me,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},s.createElement("div",{className:g()(Ce,Q,(fe={},Object(f.a)(fe,"".concat(Ce,"-show-line"),E),Object(f.a)(fe,"".concat(Ce,"-focused"),q),Object(f.a)(fe,"".concat(Ce,"-active-focused"),K!==null),fe))},s.createElement(R,Object.assign({ref:this.listRef,prefixCls:Ce,style:B,data:ie,disabled:Je,selectable:Te,checkable:!!Ve,motion:Ne,dragging:se,height:Ke,itemHeight:$e,virtual:je,focusable:U,focused:q,tabIndex:be,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ie},this.getTreeNodeRequiredProps(),_e))))}}],[{key:"getDerivedStateFromProps",value:function(fe,ge){var q=ge.prevProps,ie={prevProps:fe};function $(Be){return!q&&Be in fe||q&&q[Be]!==fe[Be]}var se;if($("treeData")?se=fe.treeData:$("children")&&(Object(u.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),se=Object(_.c)(fe.children)),se){ie.treeData=se;var K=Object(_.a)(se);ie.keyEntities=Object(i.a)(Object(f.a)({},H,ce),K.keyEntities)}var Y=ie.keyEntities||ge.keyEntities;if($("expandedKeys")||q&&$("autoExpandParent"))ie.expandedKeys=fe.autoExpandParent||!q&&fe.defaultExpandParent?Object(v.e)(fe.expandedKeys,Y):fe.expandedKeys;else if(!q&&fe.defaultExpandAll){var Ce=Object(i.a)({},Y);delete Ce[H],ie.expandedKeys=Object.keys(Ce).map(function(Be){return Ce[Be].key})}else!q&&fe.defaultExpandedKeys&&(ie.expandedKeys=fe.autoExpandParent||fe.defaultExpandParent?Object(v.e)(fe.defaultExpandedKeys,Y):fe.defaultExpandedKeys);if(ie.expandedKeys||delete ie.expandedKeys,se||ie.expandedKeys){var Q=Object(_.d)(se||ge.treeData,ie.expandedKeys||ge.expandedKeys);ie.flattenNodes=Q}if(fe.selectable&&($("selectedKeys")?ie.selectedKeys=Object(v.d)(fe.selectedKeys,fe):!q&&fe.defaultSelectedKeys&&(ie.selectedKeys=Object(v.d)(fe.defaultSelectedKeys,fe))),fe.checkable){var B;if($("checkedKeys")?B=Object(v.j)(fe.checkedKeys)||{}:!q&&fe.defaultCheckedKeys?B=Object(v.j)(fe.defaultCheckedKeys)||{}:se&&(B=Object(v.j)(fe.checkedKeys)||{checkedKeys:ge.checkedKeys,halfCheckedKeys:ge.halfCheckedKeys}),B){var E=B,U=E.checkedKeys,xe=U===void 0?[]:U,be=E.halfCheckedKeys,Te=be===void 0?[]:be;if(!fe.checkStrictly){var Fe=Object(w.a)(xe,!0,Y);xe=Fe.checkedKeys,Te=Fe.halfCheckedKeys}ie.checkedKeys=xe,ie.halfCheckedKeys=Te}}return $("loadedKeys")&&(ie.loadedKeys=fe.loadedKeys),ie}}]),Oe}(s.Component);P.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},P.TreeNode=I.a;var le=P,pe=G.b=le},fcSX:function(a,G,d){"use strict";var f=d("Ff2n"),i=d("1OyB"),O=d("vuIU"),C=d("Ji7U"),x=d("md7G"),m=d("foSv"),h=d("1W/9"),s=d("q1tI"),l=d("rePB"),u=d("JX7q"),o=d("TSYQ"),g=d.n(o),p=d("qx4F"),v=d("4IlW");function _(W){return Array.isArray(W)?W:[W]}var S={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},k=Object.keys(S).filter(function(W){if(typeof document=="undefined")return!1;var z=document.getElementsByTagName("html")[0];return W in(z?z.style:{})})[0],T=S[k];function M(W,z,R,w){W.addEventListener?W.addEventListener(z,R,w):W.attachEvent&&W.attachEvent("on".concat(z),R)}function I(W,z,R,w){W.removeEventListener?W.removeEventListener(z,R,w):W.attachEvent&&W.detachEvent("on".concat(z),R)}function j(W,z){var R=typeof W=="function"?W(z):W;return Array.isArray(R)?R.length===2?R:[R[0],R[1]]:[R]}var D=function(z){return!isNaN(parseFloat(z))&&isFinite(z)},y=!(typeof window!="undefined"&&window.document&&window.document.createElement),J=function W(z,R,w,P){if(!R||R===document||R instanceof Document)return!1;if(R===z.parentNode)return!0;var le=Math.max(Math.abs(w),Math.abs(P))===Math.abs(P),pe=Math.max(Math.abs(w),Math.abs(P))===Math.abs(w),ye=R.scrollHeight-R.clientHeight,Ee=R.scrollWidth-R.clientWidth,Oe=document.defaultView.getComputedStyle(R),ae=Oe.overflowY==="auto"||Oe.overflowY==="scroll",fe=Oe.overflowX==="auto"||Oe.overflowX==="scroll",ge=ye&&ae,q=Ee&&fe;return le&&(!ge||ge&&(R.scrollTop>=ye&&P<0||R.scrollTop<=0&&P>0))||pe&&(!q||q&&(R.scrollLeft>=Ee&&w<0||R.scrollLeft<=0&&w>0))?W(z,R.parentNode,w,P):!1};function X(W){var z=N();return function(){var w=Object(m.a)(W),P;if(z){var le=Object(m.a)(this).constructor;P=Reflect.construct(w,arguments,le)}else P=w.apply(this,arguments);return Object(x.a)(this,P)}}function N(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(W){return!1}}var F={},H=function(W){Object(C.a)(R,W);var z=X(R);function R(w){var P;return Object(i.a)(this,R),P=z.call(this,w),P.domFocus=function(){P.dom&&P.dom.focus()},P.removeStartHandler=function(le){if(le.touches.length>1)return;P.startPos={x:le.touches[0].clientX,y:le.touches[0].clientY}},P.removeMoveHandler=function(le){if(le.changedTouches.length>1)return;var pe=le.currentTarget,ye=le.changedTouches[0].clientX-P.startPos.x,Ee=le.changedTouches[0].clientY-P.startPos.y;(pe===P.maskDom||pe===P.handlerDom||pe===P.contentDom&&J(pe,le.target,ye,Ee))&&le.cancelable&&le.preventDefault()},P.transitionEnd=function(le){var pe=le.target;I(pe,T,P.transitionEnd),pe.style.transition=""},P.onKeyDown=function(le){if(le.keyCode===v.a.ESC){var pe=P.props.onClose;le.stopPropagation(),pe&&pe(le)}},P.onWrapperTransitionEnd=function(le){var pe=P.props,ye=pe.open,Ee=pe.afterVisibleChange;le.target===P.contentWrapper&&le.propertyName.match(/transform$/)&&(P.dom.style.transition="",!ye&&P.getCurrentDrawerSome()&&(document.body.style.overflowX="",P.maskDom&&(P.maskDom.style.left="",P.maskDom.style.width="")),Ee&&Ee(!!ye))},P.openLevelTransition=function(){var le=P.props,pe=le.open,ye=le.width,Ee=le.height,Oe=P.getHorizontalBoolAndPlacementName(),ae=Oe.isHorizontal,fe=Oe.placementName,ge=P.contentDom?P.contentDom.getBoundingClientRect()[ae?"width":"height"]:0,q=(ae?ye:Ee)||ge;P.setLevelAndScrolling(pe,fe,q)},P.setLevelTransform=function(le,pe,ye,Ee){var Oe=P.props,ae=Oe.placement,fe=Oe.levelMove,ge=Oe.duration,q=Oe.ease,ie=Oe.showMask;P.levelDom.forEach(function($){$.style.transition="transform ".concat(ge," ").concat(q),M($,T,P.transitionEnd);var se=le?ye:0;if(fe){var K=j(fe,{target:$,open:le});se=le?K[0]:K[1]||0}var Y=typeof se=="number"?"".concat(se,"px"):se,Ce=ae==="left"||ae==="top"?Y:"-".concat(Y);Ce=ie&&ae==="right"&&Ee?"calc(".concat(Ce," + ").concat(Ee,"px)"):Ce,$.style.transform=se?"".concat(pe,"(").concat(Ce,")"):""})},P.setLevelAndScrolling=function(le,pe,ye){var Ee=P.props.onChange;if(!y){var Oe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(p.a)(!0):0;P.setLevelTransform(le,pe,ye,Oe),P.toggleScrollingToDrawerAndBody(Oe)}Ee&&Ee(le)},P.toggleScrollingToDrawerAndBody=function(le){var pe=P.props,ye=pe.getOpenCount,Ee=pe.getContainer,Oe=pe.showMask,ae=pe.open,fe=Ee&&Ee(),ge=ye&&ye();if(fe&&fe.parentNode===document.body&&Oe){var q=["touchstart"],ie=[document.body,P.maskDom,P.handlerDom,P.contentDom];ae&&document.body.style.overflow!=="hidden"?(le&&P.addScrollingEffect(le),ge===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",ie.forEach(function($,se){if(!$)return;M($,q[se]||"touchmove",se?P.removeMoveHandler:P.removeStartHandler,P.passive)})):P.getCurrentDrawerSome()&&(ge||(document.body.style.overflow=""),document.body.style.touchAction="",le&&P.remScrollingEffect(le),ie.forEach(function($,se){if(!$)return;I($,q[se]||"touchmove",se?P.removeMoveHandler:P.removeStartHandler,P.passive)}))}},P.addScrollingEffect=function(le){var pe=P.props,ye=pe.placement,Ee=pe.duration,Oe=pe.ease,ae=pe.getOpenCount,fe=pe.switchScrollingEffect,ge=ae&&ae();ge===1&&fe();var q="width ".concat(Ee," ").concat(Oe),ie="transform ".concat(Ee," ").concat(Oe);P.dom.style.transition="none";switch(ye){case"right":P.dom.style.transform="translateX(-".concat(le,"px)");break;case"top":case"bottom":P.dom.style.width="calc(100% - ".concat(le,"px)"),P.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(P.timeout),P.timeout=setTimeout(function(){P.dom&&(P.dom.style.transition="".concat(ie,",").concat(q),P.dom.style.width="",P.dom.style.transform="")})},P.remScrollingEffect=function(le){var pe=P.props,ye=pe.placement,Ee=pe.duration,Oe=pe.ease,ae=pe.getOpenCount,fe=pe.switchScrollingEffect,ge=ae&&ae();ge||fe(!0),k&&(document.body.style.overflowX="hidden"),P.dom.style.transition="none";var q,ie="width ".concat(Ee," ").concat(Oe),$="transform ".concat(Ee," ").concat(Oe);switch(ye){case"left":{P.dom.style.width="100%",ie="width 0s ".concat(Oe," ").concat(Ee);break}case"right":{P.dom.style.transform="translateX(".concat(le,"px)"),P.dom.style.width="100%",ie="width 0s ".concat(Oe," ").concat(Ee),P.maskDom&&(P.maskDom.style.left="-".concat(le,"px"),P.maskDom.style.width="calc(100% + ".concat(le,"px)"));break}case"top":case"bottom":{P.dom.style.width="calc(100% + ".concat(le,"px)"),P.dom.style.height="100%",P.dom.style.transform="translateZ(0)",q="height 0s ".concat(Oe," ").concat(Ee);break}default:break}clearTimeout(P.timeout),P.timeout=setTimeout(function(){P.dom&&(P.dom.style.transition="".concat($,",").concat(q?"".concat(q,","):"").concat(ie),P.dom.style.transform="",P.dom.style.width="",P.dom.style.height="")})},P.getCurrentDrawerSome=function(){return!Object.keys(F).some(function(le){return F[le]})},P.getLevelDom=function(le){var pe=le.level,ye=le.getContainer;if(y)return;var Ee=ye&&ye(),Oe=Ee?Ee.parentNode:null;if(P.levelDom=[],pe==="all"){var ae=Oe?Array.prototype.slice.call(Oe.children):[];ae.forEach(function(fe){fe.nodeName!=="SCRIPT"&&fe.nodeName!=="STYLE"&&fe.nodeName!=="LINK"&&fe!==Ee&&P.levelDom.push(fe)})}else pe&&_(pe).forEach(function(fe){document.querySelectorAll(fe).forEach(function(ge){P.levelDom.push(ge)})})},P.getHorizontalBoolAndPlacementName=function(){var le=P.props.placement,pe=le==="left"||le==="right",ye="translate".concat(pe?"X":"Y");return{isHorizontal:pe,placementName:ye}},P.state={_self:Object(u.a)(P)},P}return Object(O.a)(R,[{key:"componentDidMount",value:function(){var P=this;if(!y){var le=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return le=!0,null}}))}catch(ae){}this.passive=le?{passive:!1}:!1}var pe=this.props,ye=pe.open,Ee=pe.getContainer,Oe=Ee&&Ee();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ye&&(Oe&&Oe.parentNode===document.body&&(F[this.drawerId]=ye),this.openLevelTransition(),this.forceUpdate(function(){P.domFocus()}))}},{key:"componentDidUpdate",value:function(P){var le=this.props,pe=le.open,ye=le.getContainer,Ee=ye&&ye();pe!==P.open&&(pe&&this.domFocus(),Ee&&Ee.parentNode===document.body&&(F[this.drawerId]=!!pe),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var P=this.props,le=P.getOpenCount,pe=P.open,ye=P.switchScrollingEffect,Ee=typeof le=="function"&&le();delete F[this.drawerId],pe&&(this.setLevelTransform(!1),document.body.style.touchAction=""),Ee||(document.body.style.overflow="",ye(!0))}},{key:"render",value:function(){var P,le=this,pe=this.props,ye=pe.className,Ee=pe.children,Oe=pe.style,ae=pe.width,fe=pe.height,ge=pe.defaultOpen,q=pe.open,ie=pe.prefixCls,$=pe.placement,se=pe.level,K=pe.levelMove,Y=pe.ease,Ce=pe.duration,Q=pe.getContainer,B=pe.handler,E=pe.onChange,U=pe.afterVisibleChange,xe=pe.showMask,be=pe.maskClosable,Te=pe.maskStyle,Fe=pe.onClose,Be=pe.onHandleClick,Ue=pe.keyboard,ze=pe.getOpenCount,Ve=pe.switchScrollingEffect,Xe=Object(f.a)(pe,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Je=this.dom?q:!1,Ne=g()(ie,(P={},Object(l.a)(P,"".concat(ie,"-").concat($),!0),Object(l.a)(P,"".concat(ie,"-open"),Je),Object(l.a)(P,ye||"",!!ye),Object(l.a)(P,"no-mask",!xe),P)),tt=this.getHorizontalBoolAndPlacementName(),nt=tt.placementName,Ke=$==="left"||$==="top"?"-100%":"100%",$e=Je?"":"".concat(nt,"(").concat(Ke,")"),je=B&&s.cloneElement(B,{onClick:function(Ie){B.props.onClick&&B.props.onClick(),Be&&Be(Ie)},ref:function(Ie){le.handlerDom=Ie}});return s.createElement("div",Object.assign({},Xe,{tabIndex:-1,className:Ne,style:Oe,ref:function(Ie){le.dom=Ie},onKeyDown:Je&&Ue?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),xe&&s.createElement("div",{className:"".concat(ie,"-mask"),onClick:be?Fe:void 0,style:Te,ref:function(Ie){le.maskDom=Ie}}),s.createElement("div",{className:"".concat(ie,"-content-wrapper"),style:{transform:$e,msTransform:$e,width:D(ae)?"".concat(ae,"px"):ae,height:D(fe)?"".concat(fe,"px"):fe},ref:function(Ie){le.contentWrapper=Ie}},s.createElement("div",{className:"".concat(ie,"-content"),ref:function(Ie){le.contentDom=Ie},onTouchStart:Je&&xe?this.removeStartHandler:void 0,onTouchMove:Je&&xe?this.removeMoveHandler:void 0},Ee),je))}}],[{key:"getDerivedStateFromProps",value:function(P,le){var pe=le.prevProps,ye=le._self,Ee={prevProps:P};if(pe!==void 0){var Oe=P.placement,ae=P.level;Oe!==pe.placement&&(ye.contentDom=null),ae!==pe.level&&ye.getLevelDom(P)}return Ee}}]),R}(s.Component);H.defaultProps={switchScrollingEffect:function(){}};var Z=H;function ce(W){var z=he();return function(){var w=Object(m.a)(W),P;if(z){var le=Object(m.a)(this).constructor;P=Reflect.construct(w,arguments,le)}else P=w.apply(this,arguments);return Object(x.a)(this,P)}}function he(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(W){return!1}}var V=function(W){Object(C.a)(R,W);var z=ce(R);function R(w){var P;Object(i.a)(this,R),P=z.call(this,w),P.onHandleClick=function(pe){var ye=P.props,Ee=ye.onHandleClick,Oe=ye.open;if(Ee&&Ee(pe),typeof Oe=="undefined"){var ae=P.state.open;P.setState({open:!ae})}},P.onClose=function(pe){var ye=P.props,Ee=ye.onClose,Oe=ye.open;Ee&&Ee(pe),typeof Oe=="undefined"&&P.setState({open:!1})};var le=typeof w.open!="undefined"?w.open:!!w.defaultOpen;return P.state={open:le},"onMaskClick"in w&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),P}return Object(O.a)(R,[{key:"render",value:function(){var P=this,le=this.props,pe=le.defaultOpen,ye=le.getContainer,Ee=le.wrapperClassName,Oe=le.forceRender,ae=le.handler,fe=Object(f.a)(le,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ge=this.state.open;if(!ye)return s.createElement("div",{className:Ee,ref:function($){P.dom=$}},s.createElement(Z,Object.assign({},fe,{open:ge,handler:ae,getContainer:function(){return P.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var q=!!ae||Oe;return s.createElement(h.a,{visible:ge,forceRender:q,getContainer:ye,wrapperClassName:Ee},function(ie){var $=ie.visible,se=ie.afterClose,K=Object(f.a)(ie,["visible","afterClose"]);return s.createElement(Z,Object.assign({},fe,K,{open:$!==void 0?$:ge,afterVisibleChange:se!==void 0?se:fe.afterVisibleChange,handler:ae,onClose:P.onClose,onHandleClick:P.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(P,le){var pe=le.prevProps,ye={prevProps:P};return typeof pe!="undefined"&&P.open!==pe.open&&(ye.open=P.open),ye}}]),R}(s.Component);V.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:s.createElement("div",{className:"drawer-handle"},s.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var ve=V,ne=G.a=ve},fcyK:function(a,G,d){},gRFJ:function(a,G,d){a.exports=[d("rdUC"),d("ynwM"),d("RELg"),d("DlR+"),d("CrYA"),d("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(a){return a<10?"0"+a:a}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(a){return rx_escapable.lastIndex=0,rx_escapable.test(a)?'"'+a.replace(rx_escapable,function(G){var d=meta[G];return typeof d=="string"?d:"\\u"+("0000"+G.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,G){var d,f,i,O,C=gap,x,m=G[a];m&&typeof m=="object"&&typeof m.toJSON=="function"&&(m=m.toJSON(a)),typeof rep=="function"&&(m=rep.call(G,a,m));switch(typeof m){case"string":return quote(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":return String(m);case"object":if(!m)return"null";if(gap+=indent,x=[],Object.prototype.toString.apply(m)==="[object Array]"){for(O=m.length,d=0;d<O;d+=1)x[d]=str(d,m)||"null";return i=x.length===0?"[]":gap?`[
|
|
|
`+gap+x.join(`,
|
|
|
`+gap)+`
|
|
|
`+C+"]":"["+x.join(",")+"]",gap=C,i}if(rep&&typeof rep=="object")for(O=rep.length,d=0;d<O;d+=1)typeof rep[d]=="string"&&(f=rep[d],i=str(f,m),i&&x.push(quote(f)+(gap?": ":":")+i));else for(f in m)Object.prototype.hasOwnProperty.call(m,f)&&(i=str(f,m),i&&x.push(quote(f)+(gap?": ":":")+i));return i=x.length===0?"{}":gap?`{
|
|
|
`+gap+x.join(`,
|
|
|
`+gap)+`
|
|
|
`+C+"}":"{"+x.join(",")+"}",gap=C,i}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(a,G,d){var f;if(gap="",indent="",typeof d=="number")for(f=0;f<d;f+=1)indent+=" ";else typeof d=="string"&&(indent=d);if(rep=G,G&&typeof G!="function"&&(typeof G!="object"||typeof G.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(a,G){var d,f,i=a[G];if(i&&typeof i=="object")for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(f=walk(i,d),f!==void 0?i[d]=f:delete i[d]);return reviver.call(a,G,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"gb/T":function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.mode.ECB=function(){var i=f.lib.BlockCipherMode.extend();return i.Encryptor=i.extend({processBlock:function(O,C){this._cipher.encryptBlock(O,C)}}),i.Decryptor=i.extend({processBlock:function(O,C){this._cipher.decryptBlock(O,C)}}),i}(),f.mode.ECB})},h78n:function(a,G,d){"use strict";d.d(G,"a",function(){return V});var f=d("q1tI"),i=d.n(f),O=d("TSYQ"),C=d.n(O),x={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},m=function(W){var z=W.map(function(){return Object(f.useRef)()}),R=Object(f.useRef)();return Object(f.useEffect)(function(){var w=Date.now(),P=!1;Object.keys(z).forEach(function(le){var pe=z[le].current;if(!pe)return;P=!0;var ye=pe.style;ye.transitionDuration=".3s, .3s, .3s, .06s",R.current&&w-R.current<100&&(ye.transitionDuration="0s, 0s")}),P&&(R.current=Date.now())}),[z]};function h(){return h=Object.assign||function(ne){for(var W=1;W<arguments.length;W++){var z=arguments[W];for(var R in z)Object.prototype.hasOwnProperty.call(z,R)&&(ne[R]=z[R])}return ne},h.apply(this,arguments)}function s(ne,W){return p(ne)||g(ne,W)||u(ne,W)||l()}function l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(ne,W){if(!ne)return;if(typeof ne=="string")return o(ne,W);var z=Object.prototype.toString.call(ne).slice(8,-1);if(z==="Object"&&ne.constructor&&(z=ne.constructor.name),z==="Map"||z==="Set")return Array.from(ne);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return o(ne,W)}function o(ne,W){(W==null||W>ne.length)&&(W=ne.length);for(var z=0,R=new Array(W);z<W;z++)R[z]=ne[z];return R}function g(ne,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(ne)))return;var z=[],R=!0,w=!1,P=void 0;try{for(var le=ne[Symbol.iterator](),pe;!(R=(pe=le.next()).done)&&!(z.push(pe.value),W&&z.length===W);R=!0);}catch(ye){w=!0,P=ye}finally{try{!R&&le.return!=null&&le.return()}finally{if(w)throw P}}return z}function p(ne){if(Array.isArray(ne))return ne}function v(ne,W){if(ne==null)return{};var z=_(ne,W),R,w;if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(ne);for(w=0;w<P.length;w++){if(R=P[w],W.indexOf(R)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ne,R))continue;z[R]=ne[R]}}return z}function _(ne,W){if(ne==null)return{};var z={},R=Object.keys(ne),w,P;for(P=0;P<R.length;P++){if(w=R[P],W.indexOf(w)>=0)continue;z[w]=ne[w]}return z}var S=function(W){var z=W.className,R=W.percent,w=W.prefixCls,P=W.strokeColor,le=W.strokeLinecap,pe=W.strokeWidth,ye=W.style,Ee=W.trailColor,Oe=W.trailWidth,ae=W.transition,fe=v(W,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete fe.gapPosition;var ge=Array.isArray(R)?R:[R],q=Array.isArray(P)?P:[P],ie=m(ge),$=s(ie,1),se=$[0],K=pe/2,Y=100-pe/2,Ce="M ".concat(le==="round"?K:0,",").concat(K,`
|
|
|
L `).concat(le==="round"?Y:100,",").concat(K),Q="0 0 100 ".concat(pe),B=0;return i.a.createElement("svg",h({className:C()("".concat(w,"-line"),z),viewBox:Q,preserveAspectRatio:"none",style:ye},fe),i.a.createElement("path",{className:"".concat(w,"-line-trail"),d:Ce,strokeLinecap:le,stroke:Ee,strokeWidth:Oe||pe,fillOpacity:"0"}),ge.map(function(E,U){var xe={strokeDasharray:"".concat(E,"px, 100px"),strokeDashoffset:"-".concat(B,"px"),transition:ae||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},be=q[U]||q[q.length-1];return B+=E,i.a.createElement("path",{key:U,className:"".concat(w,"-line-path"),d:Ce,strokeLinecap:le,stroke:be,strokeWidth:pe,fillOpacity:"0",ref:se[U],style:xe})}))};S.defaultProps=x;var k=S;function T(){return T=Object.assign||function(ne){for(var W=1;W<arguments.length;W++){var z=arguments[W];for(var R in z)Object.prototype.hasOwnProperty.call(z,R)&&(ne[R]=z[R])}return ne},T.apply(this,arguments)}function M(ne,W){return J(ne)||y(ne,W)||j(ne,W)||I()}function I(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j(ne,W){if(!ne)return;if(typeof ne=="string")return D(ne,W);var z=Object.prototype.toString.call(ne).slice(8,-1);if(z==="Object"&&ne.constructor&&(z=ne.constructor.name),z==="Map"||z==="Set")return Array.from(ne);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return D(ne,W)}function D(ne,W){(W==null||W>ne.length)&&(W=ne.length);for(var z=0,R=new Array(W);z<W;z++)R[z]=ne[z];return R}function y(ne,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(ne)))return;var z=[],R=!0,w=!1,P=void 0;try{for(var le=ne[Symbol.iterator](),pe;!(R=(pe=le.next()).done)&&!(z.push(pe.value),W&&z.length===W);R=!0);}catch(ye){w=!0,P=ye}finally{try{!R&&le.return!=null&&le.return()}finally{if(w)throw P}}return z}function J(ne){if(Array.isArray(ne))return ne}function X(ne,W){if(ne==null)return{};var z=N(ne,W),R,w;if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(ne);for(w=0;w<P.length;w++){if(R=P[w],W.indexOf(R)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ne,R))continue;z[R]=ne[R]}}return z}function N(ne,W){if(ne==null)return{};var z={},R=Object.keys(ne),w,P;for(P=0;P<R.length;P++){if(w=R[P],W.indexOf(w)>=0)continue;z[w]=ne[w]}return z}var F=0;function H(ne){return+ne.replace("%","")}function Z(ne){return Array.isArray(ne)?ne:[ne]}function ce(ne,W,z,R){var w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,P=arguments.length>5?arguments[5]:void 0,le=50-R/2,pe=0,ye=-le,Ee=0,Oe=-2*le;switch(P){case"left":pe=-le,ye=0,Ee=2*le,Oe=0;break;case"right":pe=le,ye=0,Ee=-2*le,Oe=0;break;case"bottom":ye=le,Oe=2*le;break;default:}var ae="M 50,50 m ".concat(pe,",").concat(ye,`
|
|
|
a `).concat(le,",").concat(le," 0 1 1 ").concat(Ee,",").concat(-Oe,`
|
|
|
a `).concat(le,",").concat(le," 0 1 1 ").concat(-Ee,",").concat(Oe),fe=Math.PI*2*le,ge={stroke:z,strokeDasharray:"".concat(W/100*(fe-w),"px ").concat(fe,"px"),strokeDashoffset:"-".concat(w/2+ne/100*(fe-w),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ae,pathStyle:ge}}var he=function(W){var z=W.prefixCls,R=W.strokeWidth,w=W.trailWidth,P=W.gapDegree,le=W.gapPosition,pe=W.trailColor,ye=W.strokeLinecap,Ee=W.style,Oe=W.className,ae=W.strokeColor,fe=W.percent,ge=X(W,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),q=Object(f.useMemo)(function(){return F+=1,F},[]),ie=ce(0,100,pe,R,P,le),$=ie.pathString,se=ie.pathStyle,K=Z(fe),Y=Z(ae),Ce=Y.find(function(xe){return Object.prototype.toString.call(xe)==="[object Object]"}),Q=m(K),B=M(Q,1),E=B[0],U=function(){var be=0;return K.map(function(Te,Fe){var Be=Y[Fe]||Y[Y.length-1],Ue=Object.prototype.toString.call(Be)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(q,")"):"",ze=ce(be,Te,Be,R,P,le);return be+=Te,i.a.createElement("path",{key:Fe,className:"".concat(z,"-circle-path"),d:ze.pathString,stroke:Ue,strokeLinecap:ye,strokeWidth:R,opacity:Te===0?0:1,fillOpacity:"0",style:ze.pathStyle,ref:E[Fe]})})};return i.a.createElement("svg",T({className:C()("".concat(z,"-circle"),Oe),viewBox:"0 0 100 100",style:Ee},ge),Ce&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(z,"-gradient-").concat(q),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ce).sort(function(xe,be){return H(xe)-H(be)}).map(function(xe,be){return i.a.createElement("stop",{key:be,offset:xe,stopColor:Ce[xe]})}))),i.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:$,stroke:pe,strokeLinecap:ye,strokeWidth:w||R,fillOpacity:"0",style:se}),U().reverse())};he.defaultProps=x;var V=he,ve={Line:k,Circle:V}},i3hx:function(a,G,d){},i58Z:function(a,G,d){a.exports={wrap:"wrap___Yg2Z9",addKnowledge:"addKnowledge___2FlI0",disabled:"disabled___1_wxN"}},jO9C:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.pad.Iso97971={pad:function(i,O){i.concat(f.lib.WordArray.create([2147483648],1)),f.pad.ZeroPadding.pad(i,O)},unpad:function(i){f.pad.ZeroPadding.unpad(i),i.sigBytes--}},f.pad.Iso97971})},je13:function(a,G,d){var f=d("5nXd"),i=d("gRFJ"),O=[d("uQRt")];a.exports=f.createStore(i,O)},kSUc:function(a,G,d){},lOMy:function(a,G,d){},lPiR:function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){return function(i){var O=f,C=O.lib,x=C.WordArray,m=C.Hasher,h=O.algo,s=[],l=[];(function(){function g(S){for(var k=i.sqrt(S),T=2;T<=k;T++)if(!(S%T))return!1;return!0}function p(S){return(S-(S|0))*4294967296|0}for(var v=2,_=0;_<64;)g(v)&&(_<8&&(s[_]=p(i.pow(v,1/2))),l[_]=p(i.pow(v,1/3)),_++),v++})();var u=[],o=h.SHA256=m.extend({_doReset:function(){this._hash=new x.init(s.slice(0))},_doProcessBlock:function(g,p){for(var v=this._hash.words,_=v[0],S=v[1],k=v[2],T=v[3],M=v[4],I=v[5],j=v[6],D=v[7],y=0;y<64;y++){if(y<16)u[y]=g[p+y]|0;else{var J=u[y-15],X=(J<<25|J>>>7)^(J<<14|J>>>18)^J>>>3,N=u[y-2],F=(N<<15|N>>>17)^(N<<13|N>>>19)^N>>>10;u[y]=X+u[y-7]+F+u[y-16]}var H=M&I^~M&j,Z=_&S^_&k^S&k,ce=(_<<30|_>>>2)^(_<<19|_>>>13)^(_<<10|_>>>22),he=(M<<26|M>>>6)^(M<<21|M>>>11)^(M<<7|M>>>25),V=D+he+H+l[y]+u[y],ve=ce+Z;D=j,j=I,I=M,M=T+V|0,T=k,k=S,S=_,_=V+ve|0}v[0]=v[0]+_|0,v[1]=v[1]+S|0,v[2]=v[2]+k|0,v[3]=v[3]+T|0,v[4]=v[4]+M|0,v[5]=v[5]+I|0,v[6]=v[6]+j|0,v[7]=v[7]+D|0},_doFinalize:function(){var g=this._data,p=g.words,v=this._nDataBytes*8,_=g.sigBytes*8;return p[_>>>5]|=128<<24-_%32,p[(_+64>>>9<<4)+14]=i.floor(v/4294967296),p[(_+64>>>9<<4)+15]=v,g.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var g=m.clone.call(this);return g._hash=this._hash.clone(),g}});O.SHA256=m._createHelper(o),O.HmacSHA256=m._createHmacHelper(o)}(Math),f.SHA256})},lZu9:function(a,G,d){(function(f){f(d("VrN/"),d("1eCo"),d("8EBN"))})(function(f){"use strict";f.defineMode("markdown",function(i,O){var C=f.getMode(i,"text/html"),x=C.name=="null";function m(R){if(f.findModeByName){var w=f.findModeByName(R);w&&(R=w.mime||w.mimes[0])}var P=f.getMode(i,R);return P.name=="null"?null:P}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.tokenTypeOverrides={});var h={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var s in h)h.hasOwnProperty(s)&&O.tokenTypeOverrides[s]&&(h[s]=O.tokenTypeOverrides[s]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,u=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,o=/^\[(x| )\](?=\s)/i,g=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,v=/^[^#!\[\]*_\\<>` "'(~:]+/,_=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,S=/^\s*\[[^\]]+?\]:.*$/,k=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,T=" ";function M(R,w,P){return w.f=w.inline=P,P(R,w)}function I(R,w,P){return w.f=w.block=P,P(R,w)}function j(R){return!R||!/\S/.test(R.string)}function D(R){if(R.linkTitle=!1,R.linkHref=!1,R.linkText=!1,R.em=!1,R.strong=!1,R.strikethrough=!1,R.quote=0,R.indentedCode=!1,R.f==J){var w=x;if(!w){var P=f.innerMode(C,R.htmlState);w=P.mode.name=="xml"&&P.state.tagStart===null&&!P.state.context&&P.state.tokenize.isInText}w&&(R.f=H,R.block=y,R.htmlState=null)}return R.trailingSpace=0,R.trailingSpaceNewLine=!1,R.prevLine=R.thisLine,R.thisLine={stream:null},null}function y(R,w){var P=R.column()===w.indentation,le=j(w.prevLine.stream),pe=w.indentedCode,ye=w.prevLine.hr,Ee=w.list!==!1,Oe=(w.listStack[w.listStack.length-1]||0)+3;w.indentedCode=!1;var ae=w.indentation;if(w.indentationDiff===null&&(w.indentationDiff=w.indentation,Ee)){for(w.list=null;ae<w.listStack[w.listStack.length-1];)w.listStack.pop(),w.listStack.length?w.indentation=w.listStack[w.listStack.length-1]:w.list=!1;w.list!==!1&&(w.indentationDiff=ae-w.listStack[w.listStack.length-1])}var fe=!le&&!ye&&!w.prevLine.header&&(!Ee||!pe)&&!w.prevLine.fencedCodeEnd,ge=(w.list===!1||ye||le)&&w.indentation<=Oe&&R.match(l),q=null;if(w.indentationDiff>=4&&(pe||w.prevLine.fencedCodeEnd||w.prevLine.header||le))return R.skipToEnd(),w.indentedCode=!0,h.code;if(R.eatSpace())return null;if(P&&w.indentation<=Oe&&(q=R.match(g))&&q[1].length<=6)return w.quote=0,w.header=q[1].length,w.thisLine.header=!0,O.highlightFormatting&&(w.formatting="header"),w.f=w.inline,N(w);if(w.indentation<=Oe&&R.eat(">"))return w.quote=P?1:w.quote+1,O.highlightFormatting&&(w.formatting="quote"),R.eatSpace(),N(w);if(!ge&&!w.setext&&P&&w.indentation<=Oe&&(q=R.match(u))){var ie=q[1]?"ol":"ul";return w.indentation=ae+R.current().length,w.list=!0,w.quote=0,w.listStack.push(w.indentation),w.em=!1,w.strong=!1,w.code=!1,w.strikethrough=!1,O.taskLists&&R.match(o,!1)&&(w.taskList=!0),w.f=w.inline,O.highlightFormatting&&(w.formatting=["list","list-"+ie]),N(w)}else{if(P&&w.indentation<=Oe&&(q=R.match(_,!0)))return w.quote=0,w.fencedEndRE=new RegExp(q[1]+"+ *$"),w.localMode=O.fencedCodeBlockHighlighting&&m(q[2]||O.fencedCodeBlockDefaultMode),w.localMode&&(w.localState=f.startState(w.localMode)),w.f=w.block=X,O.highlightFormatting&&(w.formatting="code-block"),w.code=-1,N(w);if(w.setext||(!fe||!Ee)&&!w.quote&&w.list===!1&&!w.code&&!ge&&!S.test(R.string)&&(q=R.lookAhead(1))&&(q=q.match(p)))return w.setext?(w.header=w.setext,w.setext=0,R.skipToEnd(),O.highlightFormatting&&(w.formatting="header")):(w.header=q[0].charAt(0)=="="?1:2,w.setext=w.header),w.thisLine.header=!0,w.f=w.inline,N(w);if(ge)return R.skipToEnd(),w.hr=!0,w.thisLine.hr=!0,h.hr;if(R.peek()==="[")return M(R,w,ve)}return M(R,w,w.inline)}function J(R,w){var P=C.token(R,w.htmlState);if(!x){var le=f.innerMode(C,w.htmlState);(le.mode.name=="xml"&&le.state.tagStart===null&&!le.state.context&&le.state.tokenize.isInText||w.md_inside&&R.current().indexOf(">")>-1)&&(w.f=H,w.block=y,w.htmlState=null)}return P}function X(R,w){var P=w.listStack[w.listStack.length-1]||0,le=w.indentation<P,pe=P+3;if(w.fencedEndRE&&w.indentation<=pe&&(le||R.match(w.fencedEndRE))){O.highlightFormatting&&(w.formatting="code-block");var ye;return le||(ye=N(w)),w.localMode=w.localState=null,w.block=y,w.f=H,w.fencedEndRE=null,w.code=0,w.thisLine.fencedCodeEnd=!0,le?I(R,w,w.block):ye}else return w.localMode?w.localMode.token(R,w.localState):(R.skipToEnd(),h.code)}function N(R){var w=[];if(R.formatting){w.push(h.formatting),typeof R.formatting=="string"&&(R.formatting=[R.formatting]);for(var P=0;P<R.formatting.length;P++)w.push(h.formatting+"-"+R.formatting[P]),R.formatting[P]==="header"&&w.push(h.formatting+"-"+R.formatting[P]+"-"+R.header),R.formatting[P]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=R.quote?w.push(h.formatting+"-"+R.formatting[P]+"-"+R.quote):w.push("error"))}if(R.taskOpen)return w.push("meta"),w.length?w.join(" "):null;if(R.taskClosed)return w.push("property"),w.length?w.join(" "):null;if(R.linkHref?w.push(h.linkHref,"url"):(R.strong&&w.push(h.strong),R.em&&w.push(h.em),R.strikethrough&&w.push(h.strikethrough),R.emoji&&w.push(h.emoji),R.linkText&&w.push(h.linkText),R.code&&w.push(h.code),R.image&&w.push(h.image),R.imageAltText&&w.push(h.imageAltText,"link"),R.imageMarker&&w.push(h.imageMarker)),R.header&&w.push(h.header,h.header+"-"+R.header),R.quote&&(w.push(h.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=R.quote?w.push(h.quote+"-"+R.quote):w.push(h.quote+"-"+O.maxBlockquoteDepth)),R.list!==!1){var le=(R.listStack.length-1)%3;le?le===1?w.push(h.list2):w.push(h.list3):w.push(h.list1)}return R.trailingSpaceNewLine?w.push("trailing-space-new-line"):R.trailingSpace&&w.push("trailing-space-"+(R.trailingSpace%2?"a":"b")),w.length?w.join(" "):null}function F(R,w){return R.match(v,!0)?N(w):void 0}function H(R,w){var P=w.text(R,w);if(typeof P!="undefined")return P;if(w.list)return w.list=null,N(w);if(w.taskList){var le=R.match(o,!0)[1]===" ";return le?w.taskOpen=!0:w.taskClosed=!0,O.highlightFormatting&&(w.formatting="task"),w.taskList=!1,N(w)}if(w.taskOpen=!1,w.taskClosed=!1,w.header&&R.match(/^#+$/,!0))return O.highlightFormatting&&(w.formatting="header"),N(w);var pe=R.next();if(w.linkTitle){w.linkTitle=!1;var ye=pe;pe==="("&&(ye=")"),ye=(ye+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ee="^\\s*(?:[^"+ye+"\\\\]+|\\\\\\\\|\\\\.)"+ye;if(R.match(new RegExp(Ee),!0))return h.linkHref}if(pe==="`"){var Oe=w.formatting;O.highlightFormatting&&(w.formatting="code"),R.eatWhile("`");var ae=R.current().length;if(w.code==0&&(!w.quote||ae==1))return w.code=ae,N(w);if(ae==w.code){var fe=N(w);return w.code=0,fe}else return w.formatting=Oe,N(w)}else if(w.code)return N(w);if(pe==="\\"&&(R.next(),O.highlightFormatting)){var ge=N(w),q=h.formatting+"-escape";return ge?ge+" "+q:q}if(pe==="!"&&R.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return w.imageMarker=!0,w.image=!0,O.highlightFormatting&&(w.formatting="image"),N(w);if(pe==="["&&w.imageMarker&&R.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return w.imageMarker=!1,w.imageAltText=!0,O.highlightFormatting&&(w.formatting="image"),N(w);if(pe==="]"&&w.imageAltText){O.highlightFormatting&&(w.formatting="image");var ge=N(w);return w.imageAltText=!1,w.image=!1,w.inline=w.f=ce,ge}if(pe==="["&&!w.image)return w.linkText&&R.match(/^.*?\]/)||(w.linkText=!0,O.highlightFormatting&&(w.formatting="link")),N(w);if(pe==="]"&&w.linkText){O.highlightFormatting&&(w.formatting="link");var ge=N(w);return w.linkText=!1,w.inline=w.f=R.match(/\(.*?\)| ?\[.*?\]/,!1)?ce:H,ge}if(pe==="<"&&R.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){w.f=w.inline=Z,O.highlightFormatting&&(w.formatting="link");var ge=N(w);return ge?ge+=" ":ge="",ge+h.linkInline}if(pe==="<"&&R.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){w.f=w.inline=Z,O.highlightFormatting&&(w.formatting="link");var ge=N(w);return ge?ge+=" ":ge="",ge+h.linkEmail}if(O.xml&&pe==="<"&&R.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ie=R.string.indexOf(">",R.pos);if(ie!=-1){var $=R.string.substring(R.start,ie);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test($)&&(w.md_inside=!0)}return R.backUp(1),w.htmlState=f.startState(C),I(R,w,J)}if(O.xml&&pe==="<"&&R.match(/^\/\w*?>/))return w.md_inside=!1,"tag";if(pe==="*"||pe==="_"){for(var se=1,K=R.pos==1?" ":R.string.charAt(R.pos-2);se<3&&R.eat(pe);)se++;var Y=R.peek()||" ",Ce=!/\s/.test(Y)&&(!k.test(Y)||/\s/.test(K)||k.test(K)),Q=!/\s/.test(K)&&(!k.test(K)||/\s/.test(Y)||k.test(Y)),B=null,E=null;if(se%2&&(!w.em&&Ce&&(pe==="*"||!Q||k.test(K))?B=!0:w.em==pe&&Q&&(pe==="*"||!Ce||k.test(Y))&&(B=!1)),se>1&&(!w.strong&&Ce&&(pe==="*"||!Q||k.test(K))?E=!0:w.strong==pe&&Q&&(pe==="*"||!Ce||k.test(Y))&&(E=!1)),E!=null||B!=null){O.highlightFormatting&&(w.formatting=B==null?"strong":E==null?"em":"strong em"),B===!0&&(w.em=pe),E===!0&&(w.strong=pe);var fe=N(w);return B===!1&&(w.em=!1),E===!1&&(w.strong=!1),fe}}else if(pe===" "&&(R.eat("*")||R.eat("_"))){if(R.peek()===" ")return N(w);R.backUp(1)}if(O.strikethrough){if(pe==="~"&&R.eatWhile(pe)){if(w.strikethrough){O.highlightFormatting&&(w.formatting="strikethrough");var fe=N(w);return w.strikethrough=!1,fe}else if(R.match(/^[^\s]/,!1))return w.strikethrough=!0,O.highlightFormatting&&(w.formatting="strikethrough"),N(w)}else if(pe===" "&&R.match(/^~~/,!0)){if(R.peek()===" ")return N(w);R.backUp(2)}}if(O.emoji&&pe===":"&&R.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){w.emoji=!0,O.highlightFormatting&&(w.formatting="emoji");var U=N(w);return w.emoji=!1,U}return pe===" "&&(R.match(/^ +$/,!1)?w.trailingSpace++:w.trailingSpace&&(w.trailingSpaceNewLine=!0)),N(w)}function Z(R,w){var P=R.next();if(P===">"){w.f=w.inline=H,O.highlightFormatting&&(w.formatting="link");var le=N(w);return le?le+=" ":le="",le+h.linkInline}return R.match(/^[^>]+/,!0),h.linkInline}function ce(R,w){if(R.eatSpace())return null;var P=R.next();return P==="("||P==="["?(w.f=w.inline=V(P==="("?")":"]"),O.highlightFormatting&&(w.formatting="link-string"),w.linkHref=!0,N(w)):"error"}var he={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function V(R){return function(w,P){var le=w.next();if(le===R){P.f=P.inline=H,O.highlightFormatting&&(P.formatting="link-string");var pe=N(P);return P.linkHref=!1,pe}return w.match(he[R]),P.linkHref=!0,N(P)}}function ve(R,w){return R.match(/^([^\]\\]|\\.)*\]:/,!1)?(w.f=ne,R.next(),O.highlightFormatting&&(w.formatting="link"),w.linkText=!0,N(w)):M(R,w,H)}function ne(R,w){if(R.match(/^\]:/,!0)){w.f=w.inline=W,O.highlightFormatting&&(w.formatting="link");var P=N(w);return w.linkText=!1,P}return R.match(/^([^\]\\]|\\.)+/,!0),h.linkText}function W(R,w){return R.eatSpace()?null:(R.match(/^[^\s]+/,!0),R.peek()===void 0?w.linkTitle=!0:R.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),w.f=w.inline=H,h.linkHref+" url")}var z={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:H,text:F,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(R){return{f:R.f,prevLine:R.prevLine,thisLine:R.thisLine,block:R.block,htmlState:R.htmlState&&f.copyState(C,R.htmlState),indentation:R.indentation,localMode:R.localMode,localState:R.localMode?f.copyState(R.localMode,R.localState):null,inline:R.inline,text:R.text,formatting:!1,linkText:R.linkText,linkTitle:R.linkTitle,linkHref:R.linkHref,code:R.code,em:R.em,strong:R.strong,strikethrough:R.strikethrough,emoji:R.emoji,header:R.header,setext:R.setext,hr:R.hr,taskList:R.taskList,list:R.list,listStack:R.listStack.slice(0),quote:R.quote,indentedCode:R.indentedCode,trailingSpace:R.trailingSpace,trailingSpaceNewLine:R.trailingSpaceNewLine,md_inside:R.md_inside,fencedEndRE:R.fencedEndRE}},token:function(R,w){if(w.formatting=!1,R!=w.thisLine.stream){if(w.header=0,w.hr=!1,R.match(/^\s*$/,!0))return D(w),null;if(w.prevLine=w.thisLine,w.thisLine={stream:R},w.taskList=!1,w.trailingSpace=0,w.trailingSpaceNewLine=!1,!w.localState&&(w.f=w.block,w.f!=J)){var P=R.match(/^\s*/,!0)[0].replace(/\t/g,T).length;if(w.indentation=P,w.indentationDiff=null,P>0)return null}}return w.f(R,w)},innerMode:function(R){return R.block==J?{state:R.htmlState,mode:C}:R.localState?{state:R.localState,mode:R.localMode}:{state:R,mode:z}},indent:function(R,w,P){return R.block==J&&C.indent?C.indent(R.htmlState,w,P):R.localState&&R.localMode.indent?R.localMode.indent(R.localState,w,P):f.Pass},blankLine:D,getType:N,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),f.defineMIME("text/markdown","markdown"),f.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(a){if(!0)module.exports=a();else var G})(function(){var define,module,exports;return function(){function a(G,d,f){function i(x,m){if(!d[x]){if(!G[x]){var h=typeof require=="function"&&require;if(!m&&h)return require(x,!0);if(O)return O(x,!0);var s=new Error("Cannot find module '"+x+"'");throw s.code="MODULE_NOT_FOUND",s}var l=d[x]={exports:{}};G[x][0].call(l.exports,function(u){var o=G[x][1][u];return i(o||u)},l,l.exports,a,G,d,f)}return d[x].exports}for(var O=typeof require=="function"&&require,C=0;C<f.length;C++)i(f[C]);return i}return a}()({1:[function(a,G,d){"use strict";var f=a("./browser/client");f.Buffer=a("buffer").Buffer,f.urllib=a("../shims/xhr"),f.version=a("./browser/version").version,G.exports=f},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(a,G,d){(function(f,i){"use strict";var O=a("babel-runtime/core-js/promise"),C=l(O),x=a("babel-runtime/regenerator"),m=l(x),h=a("babel-runtime/core-js/object/assign"),s=l(h);function l(ve){return ve&&ve.__esModule?ve:{default:ve}}var u=a("debug")("ali-oss"),o=a("copy-to"),g=a("xml2js"),p=a("agentkeepalive"),v=a("merge-descriptors"),_=a("url"),S=a("is-type-of"),k=a("platform"),T=a("utility"),M=a("urllib"),I=a("./version"),j=a("bowser"),D=a("../common/signUtils"),y=a("../common/utils/isIP"),J=y.isIP,X=a("../common/client/initOptions"),N=a("../common/utils/createRequest"),F=N.createRequest,H=new p;function Z(){var ve=k.name,ne=k.version;ve&&ve.toLowerCase&&ve.toLowerCase()==="ie"&&ne.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function ce(){return location&&location.protocol==="https:"}function he(ve,ne){if(Z(),!(this instanceof he))return new he(ve,ne);ve&&ve.inited?this.options=ve:this.options=he.initOptions(ve),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=M,this.agent=this.options.agent||H),this.ctx=ne,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}G.exports=he,he.initOptions=function(ne){ne.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var W=(0,s.default)({secure:ce(),useFetch:!1},ne);return X(W)};var V=he.prototype;V.debug=u,v(V,a("./object")),v(V,a("../common/bucket/getBucketWebsite")),v(V,a("../common/bucket/putBucketWebsite")),v(V,a("../common/bucket/deleteBucketWebsite")),v(V,a("../common/bucket/getBucketLifecycle")),v(V,a("../common/bucket/putBucketLifecycle")),v(V,a("../common/bucket/deleteBucketLifecycle")),v(V,a("../common/bucket/putBucketVersioning")),v(V,a("../common/bucket/getBucketVersioning")),v(V,a("./managed-upload")),v(V,a("../common/multipart")),v(V,a("../common/parallel")),V.signature=function(ne){return this.debug("authorization stringToSign: %s",ne,"info"),D.computeSignature(this.options.accessKeySecret,ne)},V.authorization=function(ne,W,z,R){var w=D.buildCanonicalString(ne.toUpperCase(),W,{headers:R,parameters:z});return D.authorization(this.options.accessKeyId,this.options.accessKeySecret,w)},V.request=function(ne){var W,z,R,w,P,le;return m.default.async(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return W=F.call(this,ne),this.options.useFetch||(W.params.mode="disable-fetch"),z=void 0,R=void 0,w=!!ne.stream,ye.prev=5,ye.next=8,m.default.awrap(this.urllib.request(W.url,W.params));case 8:z=ye.sent,this.debug("response %s %s, got %s, headers: %j",ne.method,W.url,z.status,z.headers,"info"),ye.next=15;break;case 12:ye.prev=12,ye.t0=ye.catch(5),R=ye.t0;case 15:if(P=void 0,!(z&&ne.successStatuses&&ne.successStatuses.indexOf(z.status)===-1)){ye.next=28;break}return ye.next=19,m.default.awrap(this.requestError(z));case 19:if(P=ye.sent,!(P.code==="RequestTimeTooSkewed"&&!w)){ye.next=25;break}return this.options.amendTimeSkewed=+new Date(P.serverTime)-new Date,ye.next=24,m.default.awrap(this.request(ne));case 24:return ye.abrupt("return",ye.sent);case 25:P.params=ne,ye.next=32;break;case 28:if(!R){ye.next=32;break}return ye.next=31,m.default.awrap(this.requestError(R));case 31:P=ye.sent;case 32:if(!P){ye.next=34;break}throw P;case 34:if(!ne.xmlResponse){ye.next=39;break}return ye.next=37,m.default.awrap(this.parseXML(z.data));case 37:le=ye.sent,z.data=le;case 39:return ye.abrupt("return",z);case 40:case"end":return ye.stop()}},null,this,[[5,12]])},V._getResource=function(ne){var W="/";return ne.bucket&&(W+=ne.bucket+"/"),ne.object&&(W+=ne.object),W},V._isIP=J,V._escape=function(ne){return T.encodeURIComponent(ne).replace(/%2F/g,"/")},V._getReqUrl=function(ne){var W={};o(this.options.endpoint).to(W);var z=this._isIP(W.hostname),R=this.options.cname;ne.bucket&&!R&&!z&&(W.host=ne.bucket+"."+W.host);var w="/";ne.bucket&&z&&(w+=ne.bucket+"/"),ne.object&&(w+=this._escape(ne.object).replace(/\+/g,"%2B")),W.pathname=w;var P={};if(ne.query&&v(P,ne.query),ne.subres){var le={};S.string(ne.subres)?le[ne.subres]="":S.array(ne.subres)?ne.subres.forEach(function(pe){le[pe]=""}):le=ne.subres,v(P,le)}return W.query=P,_.format(W)},V._getUserAgent=function(){var ne=i&&i.browser?"js":"nodejs",W="aliyun-sdk-"+ne+"/"+I.version,z=k.description;return!z&&i&&(z="Node.js "+i.version.slice(1)+" on "+i.platform+" "+i.arch),this._checkUserAgent(W+" "+z)},V._checkUserAgent=function(ne){var W=ne.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return W},V.checkBrowserAndVersion=function(ne,W){return j.name===ne&&j.version.split(".")[0]===W},V.parseXML=function(ne){return new C.default(function(W,z){f.isBuffer(ne)&&(ne=ne.toString()),g.parseString(ne,{explicitRoot:!1,explicitArray:!1},function(R,w){R?z(R):W(w)})})},V.requestError=function(ne){var W,z,R,w;return m.default.async(function(le){for(;;)switch(le.prev=le.next){case 0:if(W=null,!(!ne.data||!ne.data.length)){le.next=5;break}ne.status===-1||ne.status===-2?(W=new Error(ne.message),W.name=ne.name,W.status=ne.status,W.code=ne.name):(ne.status===404?(W=new Error("Object not exists"),W.name="NoSuchKeyError",W.status=404,W.code="NoSuchKey"):ne.status===412?(W=new Error("Pre condition failed"),W.name="PreconditionFailedError",W.status=412,W.code="PreconditionFailed"):(W=new Error("Unknow error, status: "+ne.status),W.name="UnknowError",W.status=ne.status),W.requestId=ne.headers["x-oss-request-id"],W.host=""),le.next=33;break;case 5:return z=String(ne.data),this.debug("request response error data: %s",z,"error"),R=void 0,le.prev=8,le.next=11,m.default.awrap(this.parseXML(z));case 11:if(le.t0=le.sent,le.t0){le.next=14;break}le.t0={};case 14:R=le.t0,le.next=24;break;case 17:return le.prev=17,le.t1=le.catch(8),this.debug(z,"error"),le.t1.message+=`
|
|
|
raw xml: `+z,le.t1.status=ne.status,le.t1.requestId=ne.headers["x-oss-request-id"],le.abrupt("return",le.t1);case 24:w=R.Message||"unknow request error, status: "+ne.status,R.Condition&&(w+=" (condition: "+R.Condition+")"),W=new Error(w),W.name=R.Code?R.Code+"Error":"UnknowError",W.status=ne.status,W.code=R.Code,W.requestId=R.RequestId,W.hostId=R.HostId,W.serverTime=R.ServerTime;case 33:return this.debug("generate error %j",W,"error"),le.abrupt("return",W);case 35:case"end":return le.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:a("../../node_modules/is-buffer/index.js")},a("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(a,G,d){(function(f){"use strict";var i=a("babel-runtime/core-js/array/from"),O=s(i),C=a("babel-runtime/core-js/promise"),x=s(C),m=a("babel-runtime/regenerator"),h=s(m);function s(D){return D&&D.__esModule?D:{default:D}}var l=a("is-type-of"),u=a("util"),o=a("path"),g=a("mime"),p=a("copy-to"),v=a("../common/utils/isBlob"),_=v.isBlob,S=a("../common/utils/isFile"),k=S.isFile,T=d;T.multipartUpload=function(y,J,X){var N,F,H,Z,ce,he,V,ve,ne;return h.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(this.resetCancelFlag(),X=X||{},!(X.checkpoint&&X.checkpoint.uploadId)){z.next=6;break}return z.next=5,h.default.awrap(this._resumeMultipart(X.checkpoint,X));case 5:return z.abrupt("return",z.sent);case 6:return N=100*1024,X.mime||(k(J)?X.mime=g.getType(o.extname(J.name)):_(J)?X.mime=J.type:X.mime=g.getType(o.extname(J))),X.headers=X.headers||{},this._convertMetaToHeaders(X.meta,X.headers),z.next=12,h.default.awrap(this._getFileSize(J));case 12:if(F=z.sent,!(F<N)){z.next=25;break}return H=this._createStream(J,0,F),X.contentLength=F,z.next=18,h.default.awrap(this.putStream(y,H,X));case 18:if(Z=z.sent,!(X&&X.progress)){z.next=22;break}return z.next=22,h.default.awrap(X.progress(1));case 22:return ce={res:Z.res,bucket:this.options.bucket,name:y,etag:Z.res.headers.etag},(X.headers&&X.headers["x-oss-callback"]||X.callback)&&(ce.data=Z.data),z.abrupt("return",ce);case 25:if(!(X.partSize&&!(parseInt(X.partSize,10)===X.partSize))){z.next=27;break}throw new Error("partSize must be int number");case 27:if(!(X.partSize&&X.partSize<N)){z.next=29;break}throw new Error("partSize must not be smaller than "+N);case 29:return z.next=31,h.default.awrap(this.initMultipartUpload(y,X));case 31:if(he=z.sent,V=he.uploadId,ve=this._getPartSize(F,X.partSize),ne={file:J,name:y,fileSize:F,partSize:ve,uploadId:V,doneParts:[]},!(X&&X.progress)){z.next=38;break}return z.next=38,h.default.awrap(X.progress(0,ne,he.res));case 38:return z.next=40,h.default.awrap(this._resumeMultipart(ne,X));case 40:return z.abrupt("return",z.sent);case 41:case"end":return z.stop()}},null,this)},T._resumeMultipart=function(y,J){var X,N,F,H,Z,ce,he,V,ve,ne,W,z,R,w,P,le,pe,ye;return h.default.async(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(X=this,!this.isCancel()){Oe.next=3;break}throw this._makeCancelEvent();case 3:return N=y.file,F=y.fileSize,H=y.partSize,Z=y.uploadId,ce=y.doneParts,he=y.name,V=[],ce.length>0&&p(ce).to(V),ve=this._divideParts(F,H),ne=ve.length,W=!1,z=function(fe,ge){var q=this;return new x.default(function($,se){var K,Y,Ce,Q;return h.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(E.prev=0,fe.isCancel()){E.next=18;break}return K=ve[ge-1],Y={stream:fe._createStream(N,K.start,K.end),size:K.end-K.start},E.next=6,h.default.awrap(fe._uploadPart(he,Z,ge,Y));case 6:if(Ce=E.sent,!(!fe.isCancel()&&!W)){E.next=15;break}if(y.doneParts.push({number:ge,etag:Ce.res.headers.etag}),!J.progress){E.next=12;break}return E.next=12,h.default.awrap(J.progress(ce.length/ne,y,Ce.res));case 12:$({number:ge,etag:Ce.res.headers.etag}),E.next=16;break;case 15:$();case 16:E.next=19;break;case 18:$();case 19:E.next=30;break;case 21:E.prev=21,E.t0=E.catch(0),Q=new Error,Q.name=E.t0.name,Q.message=E.t0.message,Q.stack=E.t0.stack,Q.partNum=ge,p(E.t0).to(Q),se(Q);case 30:case"end":return E.stop()}},null,q,[[0,21]])})},R=(0,O.default)(new Array(ne),function(ae,fe){return fe+1}),w=V.map(function(ae){return ae.number}),P=R.filter(function(ae){return w.indexOf(ae)<0}),le=5,pe=J.parallel||le,Oe.next=17,h.default.awrap(this._parallel(P,pe,function(ae){return new x.default(function(fe,ge){z(X,ae).then(function(q){q&&V.push(q),fe()}).catch(function(q){ge(q)})})}));case 17:if(ye=Oe.sent,W=!0,!this.isCancel()){Oe.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(ye&&ye.length>0)){Oe.next=25;break}throw ye[0].message="Failed to upload some parts with error: "+ye[0].toString()+" part_num: "+ye[0].partNum,ye[0];case 25:return Oe.next=27,h.default.awrap(this.completeMultipartUpload(he,Z,V,J));case 27:return Oe.abrupt("return",Oe.sent);case 28:case"end":return Oe.stop()}},null,this)},T._getFileSize=function(y){return h.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(!l.buffer(y)){X.next=4;break}return X.abrupt("return",y.length);case 4:if(!(_(y)||k(y))){X.next=6;break}return X.abrupt("return",y.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return X.stop()}},null,this)};var M=a("stream"),I=M.Readable;function j(D,y){if(!(this instanceof j))return new j(D,y);I.call(this,y),this.file=D,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}u.inherits(j,I),j.prototype.readFileAndPush=function(y){if(this.fileBuffer)for(var J=!0;J&&this.fileBuffer&&this.start<this.fileBuffer.length;){var X=this.start,N=X+y;N=N>this.fileBuffer.length?this.fileBuffer.length:N,this.start=N,J=this.push(this.fileBuffer.slice(X,N))}},j.prototype._read=function(y){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var J=16*1024;y=y||J;var X=this;this.reader.onload=function(F){X.fileBuffer=f.from(new Uint8Array(F.target.result)),X.file=null,X.readFileAndPush(y)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(y)},T._createStream=function(y,J,X){if(_(y)||k(y))return new j(y.slice(J,X));throw new Error("_createStream requires File/Blob.")},T._getPartSize=function(y,J){var X=10*1e3,N=1024*1024;return J?Math.max(Math.ceil(y/X),J):N},T._divideParts=function(y,J){for(var X=Math.ceil(y/J),N=[],F=0;F<X;F++){var H=J*F,Z=Math.min(H+J,y);N.push({start:H,end:Z})}return N}}).call(this,a("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/promise"),i=l(f),O=a("babel-runtime/core-js/object/keys"),C=l(O),x=a("babel-runtime/core-js/object/assign"),m=l(x),h=a("babel-runtime/regenerator"),s=l(h);function l(X){return X&&X.__esModule?X:{default:X}}var u=a("utility"),o=a("fs"),g=a("is-type-of"),p=a("url"),v=a("copy-to"),_=a("path"),S=a("mime"),k=a("../common/callback"),T=a("../common/signUtils"),M=a("merge-descriptors"),I=a("../common/utils/isBlob"),j=I.isBlob,D=a("../common/utils/isFile"),y=D.isFile,J=d;J.append=function(N,F,H){var Z;return s.default.async(function(he){for(;;)switch(he.prev=he.next){case 0:return H=H||{},H.position===void 0&&(H.position="0"),H.subres={append:"",position:H.position},H.method="POST",he.next=6,s.default.awrap(this.put(N,F,H));case 6:return Z=he.sent,Z.nextAppendPosition=Z.res.headers["x-oss-next-append-position"],he.abrupt("return",Z);case 9:case"end":return he.stop()}},null,this)},J.put=function(N,F,H){var Z,ce,he,V,ve,ne,W;return s.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(Z=void 0,H=H||{},N=this._objectName(N),!g.buffer(F)){R.next=7;break}Z=F,R.next=33;break;case 7:if(!(j(F)||y(F))){R.next=32;break}return H.mime||(y(F)?H.mime=S.getType(_.extname(F.name)):H.mime=F.type),ce=this._createStream(F,0,F.size),R.next=12,s.default.awrap(this._getFileSize(F));case 12:return H.contentLength=R.sent,R.prev=13,R.next=16,s.default.awrap(this.putStream(N,ce,H));case 16:return he=R.sent,R.abrupt("return",he);case 20:if(R.prev=20,R.t0=R.catch(13),!(R.t0.code==="RequestTimeTooSkewed")){R.next=29;break}return this.options.amendTimeSkewed=+new Date(R.t0.serverTime)-new Date,R.next=26,s.default.awrap(this.put(N,F,H));case 26:return R.abrupt("return",R.sent);case 29:throw R.t0;case 30:R.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return H.headers=H.headers||{},this._convertMetaToHeaders(H.meta,H.headers),V=H.method||"PUT",ve=this._objectRequestParams(V,N,H),k.encodeCallback(ve,H),ve.mime=H.mime,ve.content=Z,ve.successStatuses=[200],R.next=43,s.default.awrap(this.request(ve));case 43:return ne=R.sent,W={name:N,url:this._objectUrl(N),res:ne.res},ve.headers&&ve.headers["x-oss-callback"]&&(W.data=JSON.parse(ne.data.toString())),R.abrupt("return",W);case 47:case"end":return R.stop()}},null,this,[[13,20]])},J.putStream=function(N,F,H){var Z,ce,he,V;return s.default.async(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return H=H||{},H.headers=H.headers||{},N=this._objectName(N),H.contentLength?H.headers["Content-Length"]=H.contentLength:H.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(H.meta,H.headers),Z=H.method||"PUT",ce=this._objectRequestParams(Z,N,H),k.encodeCallback(ce,H),ce.mime=H.mime,ce.stream=F,ce.successStatuses=[200],ne.next=13,s.default.awrap(this.request(ce));case 13:return he=ne.sent,V={name:N,url:this._objectUrl(N),res:he.res},ce.headers&&ce.headers["x-oss-callback"]&&(V.data=JSON.parse(he.data.toString())),ne.abrupt("return",V);case 17:case"end":return ne.stop()}},null,this)},M(J,a("../common/object/copyObject")),M(J,a("../common/object/getObjectTagging")),M(J,a("../common/object/putObjectTagging")),M(J,a("../common/object/deleteObjectTagging")),M(J,a("../common/image")),M(J,a("../common/object/getBucketVersions")),M(J,a("../common/object/getACL")),M(J,a("../common/object/putACL")),M(J,a("../common/object/head")),M(J,a("../common/object/delete")),M(J,a("../common/object/get")),M(J,a("../common/object/putSymlink")),M(J,a("../common/object/getSymlink")),M(J,a("../common/object/deleteMulti")),M(J,a("../common/object/getObjectMeta")),J.putMeta=function(N,F,H){var Z;return s.default.async(function(he){for(;;)switch(he.prev=he.next){case 0:return he.next=2,s.default.awrap(this.copy(N,N,{meta:F||{},timeout:H&&H.timeout,ctx:H&&H.ctx}));case 2:return Z=he.sent,he.abrupt("return",Z);case 4:case"end":return he.stop()}},null,this)},J.list=function(N,F){var H,Z,ce,he,V;return s.default.async(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return H=this._objectRequestParams("GET","",F),H.query=N,H.xmlResponse=!0,H.successStatuses=[200],ne.next=6,s.default.awrap(this.request(H));case 6:return Z=ne.sent,ce=Z.data.Contents,he=this,ce&&(Array.isArray(ce)||(ce=[ce]),ce=ce.map(function(W){return{name:W.Key,url:he._objectUrl(W.Key),lastModified:W.LastModified,etag:W.ETag,type:W.Type,size:Number(W.Size),storageClass:W.StorageClass,owner:{id:W.Owner.ID,displayName:W.Owner.DisplayName}}})),V=Z.data.CommonPrefixes||null,V&&(Array.isArray(V)||(V=[V]),V=V.map(function(W){return W.Prefix})),ne.abrupt("return",{res:Z.res,objects:ce,prefixes:V,nextMarker:Z.data.NextMarker||null,isTruncated:Z.data.IsTruncated==="true"});case 13:case"end":return ne.stop()}},null,this)},J.restore=function(N,F){var H,Z;return s.default.async(function(he){for(;;)switch(he.prev=he.next){case 0:return F=F||{},F.subres=(0,m.default)({restore:""},F.subres),F.versionId&&(F.subres.versionId=F.versionId),H=this._objectRequestParams("POST",N,F),H.successStatuses=[202],he.next=7,s.default.awrap(this.request(H));case 7:return Z=he.sent,he.abrupt("return",{res:Z.res});case 9:case"end":return he.stop()}},null,this)},J.signatureUrl=function(N,F){F=F||{},N=this._objectName(N),F.method=F.method||"GET";var H=u.timestamp()+(F.expires||1800),Z={bucket:this.options.bucket,object:N},ce=this._getResource(Z);this.options.stsToken&&(F["security-token"]=this.options.stsToken);var he=T._signatureForURL(this.options.accessKeySecret,F,ce,H),V=p.parse(this._getReqUrl(Z));return V.query={OSSAccessKeyId:this.options.accessKeyId,Expires:H,Signature:he.Signature},v(he.subResource).to(V.query),V.format()},J.getObjectUrl=function(N,F){return F?F[F.length-1]!=="/"&&(F+="/"):F=this.options.endpoint.format(),F+this._escape(this._objectName(N))},J._objectUrl=function(N){return this._getReqUrl({bucket:this.options.bucket,object:N})},J.generateObjectUrl=function(X,N){if(N)N[N.length-1]!=="/"&&(N+="/");else{N=this.options.endpoint.format();var F=p.parse(N),H=this.options.bucket;F.hostname=H+"."+F.hostname,F.host=H+"."+F.host,N=F.format()}return N+this._escape(this._objectName(X))},J._objectRequestParams=function(N,F,H){if(!this.options.bucket)throw new Error("Please create a bucket first");H=H||{},F=this._objectName(F);var Z={object:F,bucket:this.options.bucket,method:N,subres:H&&H.subres,timeout:H&&H.timeout,ctx:H&&H.ctx};return H.headers&&(Z.headers={},v(H.headers).to(Z.headers)),Z},J._objectName=function(N){return N.replace(/^\/+/,"")},J._convertMetaToHeaders=function(N,F){if(!N)return;(0,C.default)(N).forEach(function(H){F["x-oss-meta-"+H]=N[H]})},J._deleteFileSafe=function(N){var F=this;return new i.default(function(H){o.exists(N,function(Z){Z?o.unlink(N,function(ce){ce&&F.debug("unlink %j error: %s",N,ce,"error"),H()}):H()})})}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(a,G,d){"use strict";d.version="6.10.0"},{}],6:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(h){return h&&h.__esModule?h:{default:h}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=d;m.deleteBucketLifecycle=function(s,l){var u,o;return i.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return x(s),u=this._bucketRequestParams("DELETE",s,"lifecycle",l),u.successStatuses=[204],p.next=5,i.default.awrap(this.request(u));case 5:return o=p.sent,p.abrupt("return",{res:o.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(h){return h&&h.__esModule?h:{default:h}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=d;m.deleteBucketWebsite=function(s,l){var u,o;return i.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return x(s),u=this._bucketRequestParams("DELETE",s,"website",l),u.successStatuses=[204],p.next=5,i.default.awrap(this.request(u));case 5:return o=p.sent,p.abrupt("return",{res:o.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(o){return o&&o.__esModule?o:{default:o}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=a("../utils/isArray"),h=m.isArray,s=a("../utils/formatObjKey"),l=s.formatObjKey,u=d;u.getBucketLifecycle=function(g,p){var v,_,S;return i.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return x(g),v=this._bucketRequestParams("GET",g,"lifecycle",p),v.successStatuses=[200],v.xmlResponse=!0,T.next=6,i.default.awrap(this.request(v));case 6:return _=T.sent,S=_.data.Rule||null,S&&(h(S)||(S=[S]),S=S.map(function(M){return M.ID&&(M.id=M.ID,delete M.ID),M.Tag&&!h(M.Tag)&&(M.Tag=[M.Tag]),l(M,"firstLowerCase")})),T.abrupt("return",{rules:S,res:_.res});case 10:case"end":return T.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(h){return h&&h.__esModule?h:{default:h}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=d;m.getBucketVersioning=function(s,l){var u,o,g;return i.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return x(s),u=this._bucketRequestParams("GET",s,"versioning",l),u.xmlResponse=!0,u.successStatuses=[200],v.next=6,i.default.awrap(this.request(u));case 6:return o=v.sent,g=o.data.Status,v.abrupt("return",{status:o.status,versionStatus:g,res:o.res});case 9:case"end":return v.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(l){return l&&l.__esModule?l:{default:l}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=a("../utils/isObject"),h=m.isObject,s=d;s.getBucketWebsite=function(u,o){var g,p,v;return i.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return x(u),g=this._bucketRequestParams("GET",u,"website",o),g.successStatuses=[200],g.xmlResponse=!0,S.next=6,i.default.awrap(this.request(g));case 6:return p=S.sent,v=[],p.data.RoutingRules&&p.data.RoutingRules.RoutingRule&&(h(p.data.RoutingRules.RoutingRule)?v=[p.data.RoutingRules.RoutingRule]:v=p.data.RoutingRules.RoutingRule),S.abrupt("return",{index:p.data.IndexDocument&&p.data.IndexDocument.Suffix||"",supportSubDir:p.data.IndexDocument&&p.data.IndexDocument.SupportSubDir||"false",type:p.data.IndexDocument&&p.data.IndexDocument.Type,routingRules:v,error:p.data.ErrorDocument&&p.data.ErrorDocument.Key||null,res:p.res});case 10:case"end":return S.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(y){return y&&y.__esModule?y:{default:y}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=a("../utils/isArray"),h=m.isArray,s=a("../utils/deepCopy"),l=s.deepCopy,u=a("../utils/isObject"),o=u.isObject,g=a("../utils/obj2xml"),p=g.obj2xml,v=a("../utils/checkObjectTag"),_=v.checkObjectTag,S=a("../utils/getStrBytesCount"),k=S.getStrBytesCount,T=d;T.putBucketLifecycle=function(J,X,N){var F,H,Z,ce,he;return i.default.async(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(x(J),h(X)){ve.next=3;break}throw new Error("rules must be Array");case 3:return F=this._bucketRequestParams("PUT",J,"lifecycle",N),H=[],Z={LifecycleConfiguration:{Rule:H}},X.forEach(function(ne){M(ne),D(ne),ne.id&&(ne.ID=ne.id,delete ne.id),H.push(ne)}),ce=p(Z,{headers:!0,firstUpperCase:!0}),F.content=ce,F.mime="xml",F.successStatuses=[200],ve.next=13,i.default.awrap(this.request(F));case 13:return he=ve.sent,ve.abrupt("return",{res:he.res});case 15:case"end":return ve.stop()}},null,this)};function M(y){y.days&&(y.expiration={days:y.days}),y.date&&(y.expiration={createdBeforeDate:y.date})}function I(y,J){var X=y.days,N=y.createdBeforeDate;if(!X&&!N)throw new Error(J+" must includes days or createdBeforeDate");if(X&&!/^[1-9][0-9]*$/.test(X))throw new Error("days must be a positive integer");if(N&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(N))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function j(y){if(!h(y)&&!o(y))throw new Error("tag must be Object or Array");y=o(y)?[y]:y;var J={},X=l(y);X.forEach(function(N){J[N.key]=N.value}),_(J)}function D(y){if(y.id&&k(y.id)>255)throw new Error("ID is composed of 255 bytes at most");if(y.prefix===""||y.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(y.status))throw new Error("Status must be Enabled or Disabled");if(y.transition){if(!["IA","Archive"].includes(y.transition.storageClass))throw new Error("StorageClass must be IA or Archive");I(y.transition,"Transition")}if(y.expiration){if(!y.expiration.expiredObjectDeleteMarker)I(y.expiration,"Expiration");else if(y.expiration.days||y.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(y.abortMultipartUpload&&I(y.abortMultipartUpload,"AbortMultipartUpload"),!y.expiration&&!y.abortMultipartUpload&&!y.transition&&!y.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(y.tag){if(y.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");j(y.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(l){return l&&l.__esModule?l:{default:l}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=a("../utils/obj2xml"),h=m.obj2xml,s=d;s.putBucketVersioning=function(u,o){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,v,_;return i.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:if(x(u),["Enabled","Suspended"].includes(o)){k.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return p=this._bucketRequestParams("PUT",u,"versioning",g),v={VersioningConfiguration:{Status:o}},p.mime="xml",p.content=h(v,{headers:!0}),k.next=9,i.default.awrap(this.request(p));case 9:return _=k.sent,k.abrupt("return",{res:_.res,status:_.status});case 11:case"end":return k.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(o){return o&&o.__esModule?o:{default:o}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=a("../utils/obj2xml"),h=m.obj2xml,s=a("../utils/isArray"),l=s.isArray,u=d;u.putBucketWebsite=function(g){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments[2],_,S,k,T,M;return i.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:if(x(g),_=this._bucketRequestParams("PUT",g,"website",v),S={Suffix:p.index||"index.html"},k={IndexDocument:S},T={WebsiteConfiguration:k},p.supportSubDir&&(S.SupportSubDir=p.supportSubDir),p.type&&(S.Type=p.type),p.error&&(k.ErrorDocument={Key:p.error}),!(p.routingRules!==void 0)){j.next=12;break}if(l(p.routingRules)){j.next=11;break}throw new Error("RoutingRules must be Array");case 11:k.RoutingRules={RoutingRule:p.routingRules};case 12:return T=h(T),_.content=T,_.mime="xml",_.successStatuses=[200],j.next=18,i.default.awrap(this.request(_));case 18:return M=j.sent,j.abrupt("return",{res:M.res});case 20:case"end":return j.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(a,G,d){(function(f){"use strict";var i=a("babel-runtime/core-js/object/keys"),O=m(i),C=a("babel-runtime/core-js/json/stringify"),x=m(C);function m(h){return h&&h.__esModule?h:{default:h}}d.encodeCallback=function(s,l){if(s.headers=s.headers||{},!Object.prototype.hasOwnProperty.call(s.headers,"x-oss-callback")&&l.callback){var u={callbackUrl:encodeURI(l.callback.url),callbackBody:l.callback.body};l.callback.host&&(u.callbackHost=l.callback.host),l.callback.contentType&&(u.callbackBodyType=l.callback.contentType);var o=f.from((0,x.default)(u)).toString("base64");if(s.headers["x-oss-callback"]=o,l.callback.customValue){var g={};(0,O.default)(l.callback.customValue).forEach(function(p){g["x:"+p]=l.callback.customValue[p]}),s.headers["x-oss-callback-var"]=f.from((0,x.default)(g)).toString("base64")}}}}).call(this,a("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/assign"),i=O(f);function O(u){return u&&u.__esModule?u:{default:u}}var C=a("humanize-ms"),x=a("url"),m=a("../utils/checkBucketName"),h=m.checkBucketName;function s(u,o){var g=x.parse(u);if(g.protocol||(g=x.parse("http"+(o?"s":"")+"://"+u)),g.protocol!=="http:"&&g.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return g}function l(u,o,g){var p=g?"https://":"http://",v=o?"-internal.aliyuncs.com":".aliyuncs.com",_="vpc100-oss-cn-";return u.substr(0,_.length)===_&&(v=".aliyuncs.com"),x.parse(p+u+v)}G.exports=function(u){if(!u||!u.accessKeyId||!u.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");u.bucket&&h(u.bucket);var o=(0,i.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},u);if(o.accessKeyId=o.accessKeyId.trim(),o.accessKeySecret=o.accessKeySecret.trim(),o.timeout&&(o.timeout=C(o.timeout)),o.endpoint)o.endpoint=s(o.endpoint,o.secure);else if(o.region)o.endpoint=l(o.region,o.internal,o.secure);else throw new Error("require options.endpoint or options.region");return o.inited=!0,o}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(a,G,d){"use strict";var f=a("merge-descriptors"),i=d;f(i,a("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(o){return o&&o.__esModule?o:{default:o}}var C=a("../utils/checkBucketName"),x=C.checkBucketName,m=a("querystring"),h=a("js-base64"),s=h.Base64.encode,l=d;l.processObjectSave=function(g,p,v,_){var S,k,T,M;return i.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return u(g,"sourceObject"),u(p,"targetObject"),u(v,"process"),p=this._objectName(p),_&&x(_),S=this._objectRequestParams("POST",g,{subres:"x-oss-process"}),k=_?",b_"+s(_):"",p=s(p),T={"x-oss-process":v+"|sys/saveas,o_"+p+k},S.content=m.stringify(T),j.next=12,i.default.awrap(this.request(S));case 12:return M=j.sent,j.abrupt("return",{res:M.res,status:M.res.status});case 14:case"end":return j.stop()}},null,this)};function u(o,g){if(!o)throw new Error(g+" is required");if(typeof o!="string")throw new Error(g+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=O(f);function O(l){return l&&l.__esModule?l:{default:l}}var C=a("copy-to"),x=a("./callback"),m=a("./utils/deepCopy"),h=m.deepCopy,s=d;s.listUploads=function(u,o){var g,p,v,_;return i.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return o=o||{},g={},C(o).to(g),g.subres="uploads",p=this._objectRequestParams("GET","",g),p.query=u,p.xmlResponse=!0,p.successStatuses=[200],k.next=10,i.default.awrap(this.request(p));case 10:return v=k.sent,_=v.data.Upload||[],Array.isArray(_)||(_=[_]),_=_.map(function(T){return{name:T.Key,uploadId:T.UploadId,initiated:T.Initiated}}),k.abrupt("return",{res:v.res,uploads:_,bucket:v.data.Bucket,nextKeyMarker:v.data.NextKeyMarker,nextUploadIdMarker:v.data.NextUploadIdMarker,isTruncated:v.data.IsTruncated==="true"});case 15:case"end":return k.stop()}},null,this)},s.listParts=function(u,o,g,p){var v,_,S;return i.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return p=p||{},v={},C(p).to(v),v.subres={uploadId:o},_=this._objectRequestParams("GET",u,v),_.query=g,_.xmlResponse=!0,_.successStatuses=[200],T.next=10,i.default.awrap(this.request(_));case 10:return S=T.sent,T.abrupt("return",{res:S.res,uploadId:S.data.UploadId,bucket:S.data.Bucket,name:S.data.Key,partNumberMarker:S.data.PartNumberMarker,nextPartNumberMarker:S.data.NextPartNumberMarker,maxParts:S.data.MaxParts,isTruncated:S.data.IsTruncated,parts:S.data.Part||[]});case 12:case"end":return T.stop()}},null,this)},s.abortMultipartUpload=function(u,o,g){var p,v,_;return i.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return this._stop(),g=g||{},p={},C(g).to(p),p.subres={uploadId:o},v=this._objectRequestParams("DELETE",u,p),v.successStatuses=[204],k.next=9,i.default.awrap(this.request(v));case 9:return _=k.sent,k.abrupt("return",{res:_.res});case 11:case"end":return k.stop()}},null,this)},s.initMultipartUpload=function(u,o){var g,p,v;return i.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return o=o||{},g={},C(o).to(g),g.headers=g.headers||{},this._convertMetaToHeaders(o.meta,g.headers),g.subres="uploads",p=this._objectRequestParams("POST",u,g),p.mime=o.mime,p.xmlResponse=!0,p.successStatuses=[200],S.next=12,i.default.awrap(this.request(p));case 12:return v=S.sent,S.abrupt("return",{res:v.res,bucket:v.data.Bucket,name:v.data.Key,uploadId:v.data.UploadId});case 14:case"end":return S.stop()}},null,this)},s.uploadPart=function(u,o,g,p,v,_,S){var k;return i.default.async(function(M){for(;;)switch(M.prev=M.next){case 0:return k={stream:this._createStream(p,v,_),size:_-v},M.next=3,i.default.awrap(this._uploadPart(u,o,g,k,S));case 3:return M.abrupt("return",M.sent);case 4:case"end":return M.stop()}},null,this)},s.completeMultipartUpload=function(u,o,g,p){var v,_,S,k,T,M,I,j;return i.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:for(v=g.concat().sort(function(J,X){return J.number-X.number}).filter(function(J,X,N){return!X||J.number!==N[X-1].number}),_=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,S=0;S<v.length;S++)k=v[S],_+=`<Part>
|
|
|
`,_+="<PartNumber>"+k.number+`</PartNumber>
|
|
|
`,_+="<ETag>"+k.etag+`</ETag>
|
|
|
`,_+=`</Part>
|
|
|
`;return _+="</CompleteMultipartUpload>",p=p||{},T={},T=h(p),T.headers&&delete T.headers["x-oss-server-side-encryption"],T.subres={uploadId:o},M=this._objectRequestParams("POST",u,T),x.encodeCallback(M,T),M.mime="xml",M.content=_,M.headers&&M.headers["x-oss-callback"]||(M.xmlResponse=!0),M.successStatuses=[200],y.next=17,i.default.awrap(this.request(M));case 17:return I=y.sent,j={res:I.res,bucket:M.bucket,name:u,etag:I.res.headers.etag},M.headers&&M.headers["x-oss-callback"]&&(j.data=JSON.parse(I.data.toString())),y.abrupt("return",j);case 21:case"end":return y.stop()}},null,this)},s._uploadPart=function(u,o,g,p,v){var _,S,k;return i.default.async(function(M){for(;;)switch(M.prev=M.next){case 0:return v=v||{},_={},C(v).to(_),_.headers={"Content-Length":p.size},_.subres={partNumber:g,uploadId:o},S=this._objectRequestParams("PUT",u,_),S.mime=_.mime,S.stream=p.stream,S.successStatuses=[200],M.next=11,i.default.awrap(this.request(S));case 11:if(k=M.sent,k.res.headers.etag){M.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
|
https://help.aliyun.com/document_detail/32069.html`);case 14:return p.stream=null,S.stream=null,M.abrupt("return",{name:u,etag:k.res.headers.etag,res:k.res});case 17:case"end":return M.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=h(f),O=a("babel-runtime/core-js/object/keys"),C=h(O),x=a("babel-runtime/helpers/typeof"),m=h(x);function h(o){return o&&o.__esModule?o:{default:o}}var s=a("../utils/checkBucketName"),l=s.checkBucketName,u=d;u.copy=function(g,p,v,_){var S,k,T;return i.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return(typeof v=="undefined"?"undefined":(0,m.default)(v))==="object"&&(_=v),_=_||{},_.headers=_.headers||{},(0,C.default)(_.headers).forEach(function(j){_.headers["x-oss-copy-source-"+j.toLowerCase()]=_.headers[j]}),_.meta&&(_.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(_.meta,_.headers),p=this._getSourceName(p,v),_.versionId&&(p=p+"?versionId="+_.versionId),_.headers["x-oss-copy-source"]=p,S=this._objectRequestParams("PUT",g,_),S.xmlResponse=!0,S.successStatuses=[200,304],I.next=14,i.default.awrap(this.request(S));case 14:return k=I.sent,T=k.data,T&&(T={etag:T.ETag,lastModified:T.LastModified}),I.abrupt("return",{data:T,res:k.res});case 18:case"end":return I.stop()}},null,this)},u._getSourceName=function(g,p){return typeof p=="string"?g=this._objectName(g):g[0]!=="/"?p=this.options.bucket:(p=g.replace(/\/(.+?)(\/.*)/,"$1"),g=g.replace(/(\/.+?\/)(.*)/,"$2")),l(p),g=encodeURI(g),g="/"+p+"/"+g,g}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(h){return h&&h.__esModule?h:{default:h}}var m=d;m.delete=function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o;return i.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return l.subres=(0,C.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),u=this._objectRequestParams("DELETE",s,l),u.successStatuses=[204],p.next=6,i.default.awrap(this.request(u));case 6:return o=p.sent,p.abrupt("return",{res:o.res});case 8:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(u){return u&&u.__esModule?u:{default:u}}var m=a("utility"),h=a("../utils/obj2xml"),s=h.obj2xml,l=d;l.deleteMulti=function(o){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p,v,_,S,k,T,M,I,j,D,y,J;return i.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:if(p=[],!(!o||!o.length)){N.next=3;break}throw new Error("names is required");case 3:for(v=0;v<o.length;v++)_={},typeof o[v]=="string"?_.Key=m.escape(this._objectName(o[v])):(S=o[v],k=S.key,T=S.versionId,_.Key=m.escape(this._objectName(k)),_.VersionId=T),p.push(_);return M={Delete:{Quiet:!!g.quiet,Object:p}},I=s(M,{headers:!0}),g.subres=(0,C.default)({delete:""},g.subres),g.versionId&&(g.subres.versionId=g.versionId),j=this._objectRequestParams("POST","",g),j.mime="xml",j.content=I,j.xmlResponse=!0,j.successStatuses=[200],N.next=15,i.default.awrap(this.request(j));case 15:return D=N.sent,y=D.data,J=y&&y.Deleted||null,J&&(Array.isArray(J)||(J=[J])),N.abrupt("return",{res:D.res,deleted:J||[]});case 20:case"end":return N.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(h){return h&&h.__esModule?h:{default:h}}var m=d;m.deleteObjectTagging=function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o;return i.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return l.subres=(0,C.default)({tagging:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),s=this._objectName(s),u=this._objectRequestParams("DELETE",s,l),u.successStatuses=[204],p.next=7,i.default.awrap(this.request(u));case 7:return o=p.sent,p.abrupt("return",{status:o.status,res:o.res});case 9:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(l){return l&&l.__esModule?l:{default:l}}var m=a("fs"),h=a("is-type-of"),s=d;s.get=function(u,o){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,v,_,S;return i.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return p=null,v=!1,h.writableStream(o)?p=o:h.string(o)?(p=m.createWriteStream(o),v=!0):g=o,g=g||{},g.subres=(0,C.default)({},g.subres),g.versionId&&(g.subres.versionId=g.versionId),g.process&&(g.subres["x-oss-process"]=g.process),_=void 0,T.prev=8,S=this._objectRequestParams("GET",u,g),S.writeStream=p,S.successStatuses=[200,206,304],T.next=14,i.default.awrap(this.request(S));case 14:_=T.sent,v&&p.destroy(),T.next=25;break;case 18:if(T.prev=18,T.t0=T.catch(8),!v){T.next=24;break}return p.destroy(),T.next=24,i.default.awrap(this._deleteFileSafe(o));case 24:throw T.t0;case 25:return T.abrupt("return",{res:_.res,content:_.data});case 26:case"end":return T.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(h){return h&&h.__esModule?h:{default:h}}var m=d;m.getACL=function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o;return i.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return l.subres=(0,C.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),s=this._objectName(s),u=this._objectRequestParams("GET",s,l),u.successStatuses=[200],u.xmlResponse=!0,p.next=8,i.default.awrap(this.request(u));case 8:return o=p.sent,p.abrupt("return",{acl:o.data.AccessControlList.Grant,owner:{id:o.data.Owner.ID,displayName:o.data.Owner.DisplayName},res:o.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/keys"),i=h(f),O=a("babel-runtime/regenerator"),C=h(O),x=a("babel-runtime/core-js/object/assign"),m=h(x);function h(S){return S&&S.__esModule?S:{default:S}}var s=d,l=a("../utils/isObject"),u=l.isObject,o=a("../utils/isArray"),g=o.isArray;s.getBucketVersions=p,s.listObjectVersions=p;function p(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T,M,I,j,D,y;return C.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(!(S.versionIdMarker&&S.keyMarker===void 0)){X.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return k.subres=(0,m.default)({versions:""},k.subres),k.versionId&&(k.subres.versionId=k.versionId),T=this._objectRequestParams("GET","",k),T.xmlResponse=!0,T.successStatuses=[200],T.query=_(S),X.next=10,C.default.awrap(this.request(T));case 10:return M=X.sent,I=M.data.Version||[],j=M.data.DeleteMarker||[],D=this,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(N){return{name:N.Key,url:D._objectUrl(N.Key),lastModified:N.LastModified,isLatest:N.IsLatest==="true",versionId:N.VersionId,etag:N.ETag,type:N.Type,size:Number(N.Size),storageClass:N.StorageClass,owner:{id:N.Owner.ID,displayName:N.Owner.DisplayName}}})),j&&(g(j)||(j=[j]),j=j.map(function(N){return{name:N.Key,lastModified:N.LastModified,versionId:N.VersionId,owner:{id:N.Owner.ID,displayName:N.Owner.DisplayName}}})),y=M.data.CommonPrefixes||null,y&&(g(y)||(y=[y]),y=y.map(function(N){return N.Prefix})),X.abrupt("return",{res:M.res,objects:I,deleteMarker:j,prefixes:y,nextMarker:M.data.NextMarker||null,NextVersionIdMarker:M.data.NextVersionIdMarker||null,isTruncated:M.data.IsTruncated==="true"});case 19:case"end":return X.stop()}},null,this)}function v(S){return S.replace(/([A-Z])/g,"-$1").toLowerCase()}function _(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k={};return u(S)&&(0,i.default)(S).forEach(function(T){k[v(T)]=S[T]}),k}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(h){return h&&h.__esModule?h:{default:h}}var m=d;m.getObjectMeta=function(s,l){var u,o;return i.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return l=l||{},s=this._objectName(s),l.subres=(0,C.default)({objectMeta:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),u=this._objectRequestParams("HEAD",s,l),u.successStatuses=[200],p.next=8,i.default.awrap(this.request(u));case 8:return o=p.sent,p.abrupt("return",{status:o.status,res:o.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(l){return l&&l.__esModule?l:{default:l}}var m=d,h=a("../utils/isObject"),s=h.isObject;m.getObjectTagging=function(u){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,p,v,_,S;return i.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return o.subres=(0,C.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),u=this._objectName(u),g=this._objectRequestParams("GET",u,o),g.successStatuses=[200],T.next=7,i.default.awrap(this.request(g));case 7:return p=T.sent,T.next=10,i.default.awrap(this.parseXML(p.data));case 10:return v=T.sent,_=v.TagSet.Tag,_=_&&s(_)?[_]:_||[],S={},_.forEach(function(M){S[M.Key]=M.Value}),T.abrupt("return",{status:p.status,res:p.res,tag:S});case 16:case"end":return T.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(h){return h&&h.__esModule?h:{default:h}}var m=d;m.getSymlink=function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o,g;return i.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return l.subres=(0,C.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),s=this._objectName(s),u=this._objectRequestParams("GET",s,l),u.successStatuses=[200],v.next=7,i.default.awrap(this.request(u));case 7:return o=v.sent,g=o.res.headers["x-oss-symlink-target"],v.abrupt("return",{targetName:decodeURIComponent(g),res:o.res});case 10:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=h(f),O=a("babel-runtime/core-js/object/keys"),C=h(O),x=a("babel-runtime/core-js/object/assign"),m=h(x);function h(l){return l&&l.__esModule?l:{default:l}}var s=d;s.head=function(u){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,p,v;return i.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return o.subres=(0,m.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),g=this._objectRequestParams("HEAD",u,o),g.successStatuses=[200,304],S.next=6,i.default.awrap(this.request(g));case 6:return p=S.sent,v={meta:null,res:p.res,status:p.status},p.status===200&&(0,C.default)(p.headers).forEach(function(k){k.indexOf("x-oss-meta-")===0&&(v.meta||(v.meta={}),v.meta[k.substring(11)]=p.headers[k])}),S.abrupt("return",v);case 10:case"end":return S.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(h){return h&&h.__esModule?h:{default:h}}var m=d;m.putACL=function(s,l,u){var o,g;return i.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return u=u||{},u.subres=(0,C.default)({acl:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),u.headers=u.headers||{},u.headers["x-oss-object-acl"]=l,s=this._objectName(s),o=this._objectRequestParams("PUT",s,u),o.successStatuses=[200],v.next=10,i.default.awrap(this.request(o));case 10:return g=v.sent,v.abrupt("return",{res:g.res});case 12:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=h(f),O=a("babel-runtime/core-js/object/keys"),C=h(O),x=a("babel-runtime/core-js/object/assign"),m=h(x);function h(p){return p&&p.__esModule?p:{default:p}}var s=a("../utils/obj2xml"),l=s.obj2xml,u=a("../utils/checkObjectTag"),o=u.checkObjectTag,g=d;g.putObjectTagging=function(v,_){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k,T,M;return i.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return o(_),S.subres=(0,m.default)({tagging:""},S.subres),S.versionId&&(S.subres.versionId=S.versionId),v=this._objectName(v),k=this._objectRequestParams("PUT",v,S),k.successStatuses=[200],_=(0,C.default)(_).map(function(D){return{Key:D,Value:_[D]}}),T={Tagging:{TagSet:{Tag:_}}},k.mime="xml",k.content=l(T),j.next=12,i.default.awrap(this.request(k));case 12:return M=j.sent,j.abrupt("return",{res:M.res,status:M.status});case 14:case"end":return j.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/object/assign"),C=x(O);function x(h){return h&&h.__esModule?h:{default:h}}var m=d;m.putSymlink=function(s,l,u){var o,g;return i.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return u=u||{},u.headers=u.headers||{},l=this._escape(this._objectName(l)),this._convertMetaToHeaders(u.meta,u.headers),u.headers["x-oss-symlink-target"]=l,u.subres=(0,C.default)({symlink:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),u.storageClass&&(u.headers["x-oss-storage-class"]=u.storageClass),s=this._objectName(s),o=this._objectRequestParams("PUT",s,u),o.successStatuses=[200],v.next=13,i.default.awrap(this.request(o));case 13:return g=v.sent,v.abrupt("return",{res:g.res});case 15:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(a,G,d){"use strict";var f=a("babel-runtime/regenerator"),i=x(f),O=a("babel-runtime/core-js/promise"),C=x(O);function x(h){return h&&h.__esModule?h:{default:h}}var m=d;m._parallelNode=function(s,l,u,o){var g,p,v,_,S,k,T,M;return i.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:g=this,p=[],v=[],_=s.length/l,S=s.length%l,k=S===0?_:(s.length-S)/l+1,T=1,M=0;case 8:if(!(M<s.length)){j.next=26;break}if(!g.isCancel()){j.next=11;break}return j.abrupt("break",26);case 11:if(o?v.push(u(g,s[M],o)):v.push(u(g,s[M])),!(v.length===l||T===k&&M===s.length-1)){j.next=23;break}return j.prev=13,T+=1,j.next=17,i.default.awrap(C.default.all(v));case 17:j.next=22;break;case 19:j.prev=19,j.t0=j.catch(13),p.push(j.t0);case 22:v=[];case 23:M++,j.next=8;break;case 26:return j.abrupt("return",p);case 27:case"end":return j.stop()}},null,this,[[13,19]])},m._parallel=function(s,l,u){var o=this;return new C.default(function(g){var p=[];if(l<=0||!s){g(p);return}function v(y){return function(){if(y===null)throw new Error("Callback was already called.");var J=y;y=null;for(var X=arguments.length,N=Array(X),F=0;F<X;F++)N[F]=arguments[F];J.apply(this,N)}}function _(y){var J=-1,X=y.length;return function(){return++J<X&&!o.isCancel()?{value:y[J],key:J}:null}}var S=_(s),k=!1,T=0,M=!1;function I(y,J){T-=1,y?(k=!0,p.push(y),g(p)):J==={}||k&&T<=0?(k=!0,g(p)):M||(o.isCancel()?g(p):D())}function j(y,J){u(y).then(function(X){J(null,X)}).catch(function(X){J(X)})}function D(){for(M=!0;T<l&&!k&&!o.isCancel();){var y=S();if(y===null||p.length>0){k=!0,T<=0&&g(p);return}T+=1,j(y.value,v(I))}M=!1}D()})},m.cancel=function(s){this.options.cancelFlag=!0,s&&this.abortMultipartUpload(s.name,s.uploadId,s.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var s={status:0,name:"cancel"};return s}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(a,G,d){(function(f){"use strict";var i=a("babel-runtime/core-js/json/stringify"),O=m(i),C=a("babel-runtime/core-js/object/keys"),x=m(C);function m(l){return l&&l.__esModule?l:{default:l}}var h=a("./../../shims/crypto/crypto.js"),s=a("is-type-of");d.buildCanonicalizedResource=function(u,o){var g=""+u,p="?";if(s.string(o)&&o.trim()!=="")g+=p+o;else if(s.array(o))o.sort(),g+=p+o.join("&");else if(o){var v=function(k,T){return k[0]>T[0]?1:k[0]<T[0]?-1:0},_=function(k){g+=p+k,o[k]&&(g+="="+o[k]),p="&"};(0,x.default)(o).sort(v).forEach(_)}return g},d.buildCanonicalString=function(u,o,g,p){g=g||{};var v=g.headers||{},_="x-oss-",S=[],k={},T=[u.toUpperCase(),v["Content-Md5"]||"",v["Content-Type"]||v["Content-Type".toLowerCase()],p||v["x-oss-date"]];return(0,x.default)(v).forEach(function(M){var I=M.toLowerCase();I.indexOf(_)===0&&(k[I]=String(v[M]).trim())}),(0,x.default)(k).sort().forEach(function(M){S.push(M+":"+k[M])}),T=T.concat(S),T.push(this.buildCanonicalizedResource(o,g.parameters)),T.join(`
|
|
|
`)},d.computeSignature=function(u,o){var g=h.createHmac("sha1",u);return g.update(f.from(o,"utf8")).digest("base64")},d.authorization=function(u,o,g){return"OSS "+u+":"+this.computeSignature(o,g)},d._signatureForURL=function(u){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=arguments[2],p=arguments[3],v={},_=o.subResource,S=_===void 0?{}:_;if(o.process){var k="x-oss-process";S[k]=o.process}if(o.trafficLimit){var T="x-oss-traffic-limit";S[T]=o.trafficLimit}if(o.response&&(0,x.default)(o.response).forEach(function(D){var y="response-"+D.toLowerCase();S[y]=o.response[D]}),(0,x.default)(o).forEach(function(D){var y=D.toLowerCase(),J=o[D];y.indexOf("x-oss-")===0?v[y]=J:(y.indexOf("content-md5")===0||y.indexOf("content-type")===0)&&(v[D]=J)}),Object.prototype.hasOwnProperty.call(o,"security-token")&&(S["security-token"]=o["security-token"]),Object.prototype.hasOwnProperty.call(o,"callback")){var M={callbackUrl:encodeURI(o.callback.url),callbackBody:o.callback.body};if(o.callback.host&&(M.callbackHost=o.callback.host),o.callback.contentType&&(M.callbackBodyType=o.callback.contentType),S.callback=f.from((0,O.default)(M)).toString("base64"),o.callback.customValue){var I={};(0,x.default)(o.callback.customValue).forEach(function(D){I["x:"+D]=o.callback.customValue[D]}),S["callback-var"]=f.from((0,O.default)(I)).toString("base64")}}var j=this.buildCanonicalString(o.method,g,{headers:v,parameters:S},p.toString());return{Signature:this.computeSignature(u,j),subResource:S}}}).call(this,a("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(a,G,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.checkBucketName=void 0,d.checkBucketName=function(f,i){var O=i?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!O.test(f))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/entries"),i=O(f);function O(o){return o&&o.__esModule?o:{default:o}}Object.defineProperty(d,"__esModule",{value:!0}),d.checkObjectTag=void 0;var C=a("./checkValid"),x=C.checkValid,m=a("./isObject"),h=m.isObject,s=[{validator:function(g){if(typeof g!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],l={key:[].concat(s,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(s,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function u(o){if(!h(o))throw new Error("tag must be Object");var g=(0,i.default)(o);if(g.length>10)throw new Error("maximum of 10 tags for a object");var p=["key","value"];g.forEach(function(v){v.forEach(function(_,S){x(_,l[p[S]])})})}d.checkObjectTag=u},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(a,G,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.checkValid=void 0;function f(i,O){O.forEach(function(C){if(C.validator)C.validator(i);else if(C.pattern&&!C.pattern.test(i))throw new Error(C.msg)})}d.checkValid=f},{}],38:[function(a,G,d){(function(f){"use strict";var i=a("babel-runtime/core-js/object/assign"),O=C(i);function C(v){return v&&v.__esModule?v:{default:v}}Object.defineProperty(d,"__esModule",{value:!0}),d.createRequest=void 0;var x=a("./../../../shims/crypto/crypto.js"),m=a("debug")("ali-oss"),h=a("mime"),s=a("dateformat"),l=a("copy-to"),u=a("path");function o(v,_){return v[_]||v[_.toLowerCase()]}function g(v,_){delete v[_],delete v[_.toLowerCase()]}function p(v){var _=new Date;this.options.amendTimeSkewed&&(_=+new Date+this.options.amendTimeSkewed);var S={"x-oss-date":s(_,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(S["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,O.default)(S,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(S["x-oss-security-token"]=this.options.stsToken),l(v.headers).to(S),o(S,"Content-Type")||(v.mime&&v.mime.indexOf("/")>0?S["Content-Type"]=v.mime:S["Content-Type"]=h.getType(v.mime||u.extname(v.object||""))),o(S,"Content-Type")||g(S,"Content-Type"),v.content&&(S["Content-Md5"]=x.createHash("md5").update(f.from(v.content,"utf8")).digest("base64"),S["Content-Length"]||(S["Content-Length"]=v.content.length));var k=this._getResource(v);S.authorization=this.authorization(v.method,k,v.subres,S);var T=this._getReqUrl(v);m("request %s %s, with headers %j, !!stream: %s",v.method,T,S,!!v.stream);var M=v.timeout||this.options.timeout,I={method:v.method,content:v.content,stream:v.stream,headers:S,timeout:M,writeStream:v.writeStream,customResponse:v.customResponse,ctx:v.ctx||this.ctx};return this.agent&&(I.agent=this.agent),this.httpsAgent&&(I.httpsAgent=this.httpsAgent),{url:T,params:I}}d.createRequest=p}).call(this,a("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/keys"),i=x(f),O=a("babel-runtime/helpers/typeof"),C=x(O);function x(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(d,"__esModule",{value:!0}),d.deepCopy=void 0,d.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,C.default)(m))!=="object")return m;var h=Array.isArray(m)?[]:{};return(0,i.default)(m).forEach(function(s){h[s]=d.deepCopy(m[s])}),h}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/keys"),i=x(f),O=a("babel-runtime/helpers/typeof"),C=x(O);function x(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(d,"__esModule",{value:!0}),d.formatObjKey=void 0;function m(s,l){if(s===null||(typeof s=="undefined"?"undefined":(0,C.default)(s))!=="object")return s;var u=void 0;if(Array.isArray(s)){u=[];for(var o=0;o<s.length;o++)u.push(m(s[o],l))}else u={},(0,i.default)(s).forEach(function(g){u[h(g,l)]=m(s[g],l)});return u}d.formatObjKey=m;function h(s,l){return l==="firstUpperCase"?s=s.replace(/^./,function(u){return u.toUpperCase()}):l==="firstLowerCase"&&(s=s.replace(/^./,function(u){return u.toLowerCase()})),s}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(a,G,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.getStrBytesCount=void 0;function f(i){for(var O=0,C=0;C<i.length;C++){var x=i.charAt(C);/^[\u00-\uff]$/.test(x)?O+=1:O+=2}return O}d.getStrBytesCount=f},{}],42:[function(a,G,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.isArray=void 0,d.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}},{}],43:[function(a,G,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.isBlob=void 0;function f(i){return typeof Blob!="undefined"&&i instanceof Blob}d.isBlob=f},{}],44:[function(a,G,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.isFile=void 0,d.isFile=function(f){return typeof File!="undefined"&&f instanceof File}},{}],45:[function(a,G,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.isIP=void 0,d.isIP=function(f){var i=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,O=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return i.test(f)||O.test(f)}},{}],46:[function(a,G,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.isObject=void 0,d.isObject=function(f){return Object.prototype.toString.call(f)==="[object Object]"}},{}],47:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/keys"),i=O(f);function O(h){return h&&h.__esModule?h:{default:h}}Object.defineProperty(d,"__esModule",{value:!0}),d.obj2xml=void 0;var C=a("./formatObjKey");function x(h){return Object.prototype.toString.call(h).replace(/(.*? |])/g,"").toLowerCase()}function m(h,s){var l="";return s&&s.headers&&(l=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),s&&s.firstUpperCase&&(h=C.formatObjKey(h,"firstUpperCase")),x(h)==="object"?(0,i.default)(h).forEach(function(u){x(h[u])==="string"||x(h[u])==="number"?l+="<"+u+">"+h[u]+"</"+u+">":x(h[u])==="object"?l+="<"+u+">"+m(h[u])+"</"+u+">":x(h[u])==="array"?l+=h[u].map(function(o){return"<"+u+">"+m(o)+"</"+u+">"}).join(""):l+="<"+u+">"+h[u].toString()+"</"+u+">"}):l+=h.toString(),l}d.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(a,G,d){G.exports=f,G.exports.HttpsAgent=f;function f(){}},{}],49:[function(a,G,d){G.exports=a("./register")().Promise},{"./register":51}],50:[function(a,G,d){"use strict";var f="@@any-promise/REGISTRATION",i=null;G.exports=function(O,C){return function(m,h){m=m||null,h=h||{};var s=h.global!==!1;if(i===null&&s&&(i=O[f]||null),i!==null&&m!==null&&i.implementation!==m)throw new Error('any-promise already defined as "'+i.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return i===null&&(m!==null&&typeof h.Promise!="undefined"?i={Promise:h.Promise,implementation:m}:i=C(m),s&&(O[f]=i)),i}}},{}],51:[function(a,G,d){"use strict";G.exports=a("./loader")(window,f);function f(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(a,G,d){G.exports={default:a("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(a,G,d){G.exports={default:a("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(a,G,d){G.exports={default:a("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(a,G,d){G.exports={default:a("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(a,G,d){G.exports={default:a("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(a,G,d){G.exports={default:a("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(a,G,d){G.exports={default:a("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(a,G,d){G.exports={default:a("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(a,G,d){G.exports={default:a("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(a,G,d){G.exports={default:a("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(a,G,d){G.exports={default:a("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(a,G,d){G.exports={default:a("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(a,G,d){G.exports={default:a("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(a,G,d){G.exports={default:a("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(a,G,d){G.exports={default:a("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(a,G,d){"use strict";d.__esModule=!0;var f=a("../core-js/symbol/iterator"),i=m(f),O=a("../core-js/symbol"),C=m(O),x=typeof C.default=="function"&&typeof i.default=="symbol"?function(h){return typeof h}:function(h){return h&&typeof C.default=="function"&&h.constructor===C.default&&h!==C.default.prototype?"symbol":typeof h};function m(h){return h&&h.__esModule?h:{default:h}}d.default=typeof C.default=="function"&&x(i.default)==="symbol"?function(h){return typeof h=="undefined"?"undefined":x(h)}:function(h){return h&&typeof C.default=="function"&&h.constructor===C.default&&h!==C.default.prototype?"symbol":typeof h=="undefined"?"undefined":x(h)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(a,G,d){G.exports=a("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(a,G,d){"use strict";d.byteLength=s,d.toByteArray=u,d.fromByteArray=p;for(var f=[],i=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=0,m=C.length;x<m;++x)f[x]=C[x],i[C.charCodeAt(x)]=x;i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;function h(v){var _=v.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=v.indexOf("=");S===-1&&(S=_);var k=S===_?0:4-S%4;return[S,k]}function s(v){var _=h(v),S=_[0],k=_[1];return(S+k)*3/4-k}function l(v,_,S){return(_+S)*3/4-S}function u(v){var _,S=h(v),k=S[0],T=S[1],M=new O(l(v,k,T)),I=0,j=T>0?k-4:k,D;for(D=0;D<j;D+=4)_=i[v.charCodeAt(D)]<<18|i[v.charCodeAt(D+1)]<<12|i[v.charCodeAt(D+2)]<<6|i[v.charCodeAt(D+3)],M[I++]=_>>16&255,M[I++]=_>>8&255,M[I++]=_&255;return T===2&&(_=i[v.charCodeAt(D)]<<2|i[v.charCodeAt(D+1)]>>4,M[I++]=_&255),T===1&&(_=i[v.charCodeAt(D)]<<10|i[v.charCodeAt(D+1)]<<4|i[v.charCodeAt(D+2)]>>2,M[I++]=_>>8&255,M[I++]=_&255),M}function o(v){return f[v>>18&63]+f[v>>12&63]+f[v>>6&63]+f[v&63]}function g(v,_,S){for(var k,T=[],M=_;M<S;M+=3)k=(v[M]<<16&16711680)+(v[M+1]<<8&65280)+(v[M+2]&255),T.push(o(k));return T.join("")}function p(v){for(var _,S=v.length,k=S%3,T=[],M=16383,I=0,j=S-k;I<j;I+=M)T.push(g(v,I,I+M>j?j:I+M));return k===1?(_=v[S-1],T.push(f[_>>2]+f[_<<4&63]+"==")):k===2&&(_=(v[S-2]<<8)+v[S-1],T.push(f[_>>10]+f[_>>4&63]+f[_<<2&63]+"=")),T.join("")}},{}],70:[function(a,G,d){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(f,i,O){typeof G!="undefined"&&G.exports?G.exports=O():typeof define=="function"&&define.amd?define(i,O):f[i]=O()}(this,"bowser",function(){var f=!0;function i(l){function u(z){var R=l.match(z);return R&&R.length>1&&R[1]||""}function o(z){var R=l.match(z);return R&&R.length>1&&R[2]||""}var g=u(/(ipod|iphone|ipad)/i).toLowerCase(),p=/like android/i.test(l),v=!p&&/android/i.test(l),_=/nexus\s*[0-6]\s*/i.test(l),S=!_&&/nexus\s*[0-9]+/i.test(l),k=/CrOS/.test(l),T=/silk/i.test(l),M=/sailfish/i.test(l),I=/tizen/i.test(l),j=/(web|hpw)(o|0)s/i.test(l),D=/windows phone/i.test(l),y=/SamsungBrowser/i.test(l),J=!D&&/windows/i.test(l),X=!g&&!T&&/macintosh/i.test(l),N=!v&&!M&&!I&&!j&&/linux/i.test(l),F=o(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),H=u(/version\/(\d+(\.\d+)?)/i),Z=/tablet/i.test(l)&&!/tablet pc/i.test(l),ce=!Z&&/[^-]mobi/i.test(l),he=/xbox/i.test(l),V;/opera/i.test(l)?V={name:"Opera",opera:f,version:H||u(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(l)?V={name:"Opera",opera:f,version:u(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||H}:/SamsungBrowser/i.test(l)?V={name:"Samsung Internet for Android",samsungBrowser:f,version:H||u(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(l)?V={name:"NAVER Whale browser",whale:f,version:u(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(l)?V={name:"MZ Browser",mzbrowser:f,version:u(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(l)?V={name:"Opera Coast",coast:f,version:H||u(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(l)?V={name:"Focus",focus:f,version:u(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(l)?V={name:"Yandex Browser",yandexbrowser:f,version:H||u(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(l)?V={name:"UC Browser",ucbrowser:f,version:u(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(l)?V={name:"Maxthon",maxthon:f,version:u(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(l)?V={name:"Epiphany",epiphany:f,version:u(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(l)?V={name:"Puffin",puffin:f,version:u(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(l)?V={name:"Sleipnir",sleipnir:f,version:u(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(l)?V={name:"K-Meleon",kMeleon:f,version:u(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:D?(V={name:"Windows Phone",osname:"Windows Phone",windowsphone:f},F?(V.msedge=f,V.version=F):(V.msie=f,V.version=u(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(l)?V={name:"Internet Explorer",msie:f,version:u(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:k?V={name:"Chrome",osname:"Chrome OS",chromeos:f,chromeBook:f,chrome:f,version:u(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(l)?V={name:"Microsoft Edge",msedge:f,version:F}:/vivaldi/i.test(l)?V={name:"Vivaldi",vivaldi:f,version:u(/vivaldi\/(\d+(\.\d+)?)/i)||H}:M?V={name:"Sailfish",osname:"Sailfish OS",sailfish:f,version:u(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(l)?V={name:"SeaMonkey",seamonkey:f,version:u(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(l)?(V={name:"Firefox",firefox:f,version:u(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(l)&&(V.firefoxos=f,V.osname="Firefox OS")):T?V={name:"Amazon Silk",silk:f,version:u(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(l)?V={name:"PhantomJS",phantom:f,version:u(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(l)?V={name:"SlimerJS",slimer:f,version:u(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(l)||/rim\stablet/i.test(l)?V={name:"BlackBerry",osname:"BlackBerry OS",blackberry:f,version:H||u(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:j?(V={name:"WebOS",osname:"WebOS",webos:f,version:H||u(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(l)&&(V.touchpad=f)):/bada/i.test(l)?V={name:"Bada",osname:"Bada",bada:f,version:u(/dolfin\/(\d+(\.\d+)?)/i)}:I?V={name:"Tizen",osname:"Tizen",tizen:f,version:u(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||H}:/qupzilla/i.test(l)?V={name:"QupZilla",qupzilla:f,version:u(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||H}:/chromium/i.test(l)?V={name:"Chromium",chromium:f,version:u(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||H}:/chrome|crios|crmo/i.test(l)?V={name:"Chrome",chrome:f,version:u(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:v?V={name:"Android",version:H}:/safari|applewebkit/i.test(l)?(V={name:"Safari",safari:f},H&&(V.version=H)):g?(V={name:g=="iphone"?"iPhone":g=="ipad"?"iPad":"iPod"},H&&(V.version=H)):/googlebot/i.test(l)?V={name:"Googlebot",googlebot:f,version:u(/googlebot\/(\d+(\.\d+))/i)||H}:V={name:u(/^(.*)\/(.*) /),version:o(/^(.*)\/(.*) /)},!V.msedge&&/(apple)?webkit/i.test(l)?(/(apple)?webkit\/537\.36/i.test(l)?(V.name=V.name||"Blink",V.blink=f):(V.name=V.name||"Webkit",V.webkit=f),!V.version&&H&&(V.version=H)):!V.opera&&/gecko\//i.test(l)&&(V.name=V.name||"Gecko",V.gecko=f,V.version=V.version||u(/gecko\/(\d+(\.\d+)?)/i)),!V.windowsphone&&(v||V.silk)?(V.android=f,V.osname="Android"):!V.windowsphone&&g?(V[g]=f,V.ios=f,V.osname="iOS"):X?(V.mac=f,V.osname="macOS"):he?(V.xbox=f,V.osname="Xbox"):J?(V.windows=f,V.osname="Windows"):N&&(V.linux=f,V.osname="Linux");function ve(z){switch(z){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var ne="";V.windows?ne=ve(u(/Windows ((NT|XP)( \d\d?.\d)?)/i)):V.windowsphone?ne=u(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):V.mac?(ne=u(/Mac OS X (\d+([_\.\s]\d+)*)/i),ne=ne.replace(/[_\s]/g,".")):g?(ne=u(/os (\d+([_\s]\d+)*) like mac os x/i),ne=ne.replace(/[_\s]/g,".")):v?ne=u(/android[ \/-](\d+(\.\d+)*)/i):V.webos?ne=u(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):V.blackberry?ne=u(/rim\stablet\sos\s(\d+(\.\d+)*)/i):V.bada?ne=u(/bada\/(\d+(\.\d+)*)/i):V.tizen&&(ne=u(/tizen[\/\s](\d+(\.\d+)*)/i)),ne&&(V.osversion=ne);var W=!V.windows&&ne.split(".")[0];return Z||S||g=="ipad"||v&&(W==3||W>=4&&!ce)||V.silk?V.tablet=f:(ce||g=="iphone"||g=="ipod"||v||_||V.blackberry||V.webos||V.bada)&&(V.mobile=f),V.msedge||V.msie&&V.version>=10||V.yandexbrowser&&V.version>=15||V.vivaldi&&V.version>=1||V.chrome&&V.version>=20||V.samsungBrowser&&V.version>=4||V.whale&&m([V.version,"1.0"])===1||V.mzbrowser&&m([V.version,"6.0"])===1||V.focus&&m([V.version,"1.0"])===1||V.firefox&&V.version>=20||V.safari&&V.version>=6||V.opera&&V.version>=10||V.ios&&V.osversion&&V.osversion.split(".")[0]>=6||V.blackberry&&V.version>=10.1||V.chromium&&V.version>=20?V.a=f:V.msie&&V.version<10||V.chrome&&V.version<20||V.firefox&&V.version<20||V.safari&&V.version<6||V.opera&&V.version<10||V.ios&&V.osversion&&V.osversion.split(".")[0]<6||V.chromium&&V.version<20?V.c=f:V.x=f,V}var O=i(typeof navigator!="undefined"&&navigator.userAgent||"");O.test=function(l){for(var u=0;u<l.length;++u){var o=l[u];if(typeof o=="string"&&o in O)return!0}return!1};function C(l){return l.split(".").length}function x(l,u){var o=[],g;if(Array.prototype.map)return Array.prototype.map.call(l,u);for(g=0;g<l.length;g++)o.push(u(l[g]));return o}function m(l){for(var u=Math.max(C(l[0]),C(l[1])),o=x(l,function(g){var p=u-C(g);return g=g+new Array(p+1).join(".0"),x(g.split("."),function(v){return new Array(20-v.length).join("0")+v}).reverse()});--u>=0;){if(o[0][u]>o[1][u])return 1;if(o[0][u]===o[1][u]){if(u===0)return 0}else return-1}}function h(l,u,o){var g=O;typeof u=="string"&&(o=u,u=void 0),u===void 0&&(u=!1),o&&(g=i(o));var p=""+g.version;for(var v in l)if(l.hasOwnProperty(v)&&g[v]){if(typeof l[v]!="string")throw new Error("Browser version in the minVersion map should be a string: "+v+": "+String(l));return m([p,l[v]])<0}return u}function s(l,u,o){return!h(l,u,o)}return O.isUnsupportedBrowser=h,O.compareVersions=m,O.check=s,O._detect=i,O.detect=i,O})},{}],71:[function(a,G,d){},{}],72:[function(a,G,d){var f=a("buffer").Buffer,i=f.isEncoding||function(s){switch(s&&s.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function O(s){if(s&&!i(s))throw new Error("Unknown encoding: "+s)}var C=d.StringDecoder=function(s){this.encoding=(s||"utf8").toLowerCase().replace(/[-_]/,""),O(s);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=h;break;default:this.write=x;return}this.charBuffer=new f(6),this.charReceived=0,this.charLength=0};C.prototype.write=function(s){for(var l="";this.charLength;){var u=s.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:s.length;if(s.copy(this.charBuffer,this.charReceived,0,u),this.charReceived+=u,this.charReceived<this.charLength)return"";s=s.slice(u,s.length),l=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var g=l.charCodeAt(l.length-1);if(g>=55296&&g<=56319){this.charLength+=this.surrogateSize,l="";continue}if(this.charReceived=this.charLength=0,s.length===0)return l;break}this.detectIncompleteChar(s);var o=s.length;this.charLength&&(s.copy(this.charBuffer,0,s.length-this.charReceived,o),o-=this.charReceived),l+=s.toString(this.encoding,0,o);var o=l.length-1,g=l.charCodeAt(o);if(g>=55296&&g<=56319){var p=this.surrogateSize;return this.charLength+=p,this.charReceived+=p,this.charBuffer.copy(this.charBuffer,p,0,p),s.copy(this.charBuffer,0,0,p),l.substring(0,o)}return l},C.prototype.detectIncompleteChar=function(s){for(var l=s.length>=3?3:s.length;l>0;l--){var u=s[s.length-l];if(l==1&&u>>5==6){this.charLength=2;break}if(l<=2&&u>>4==14){this.charLength=3;break}if(l<=3&&u>>3==30){this.charLength=4;break}}this.charReceived=l},C.prototype.end=function(s){var l="";if(s&&s.length&&(l=this.write(s)),this.charReceived){var u=this.charReceived,o=this.charBuffer,g=this.encoding;l+=o.slice(0,u).toString(g)}return l};function x(s){return s.toString(this.encoding)}function m(s){this.charReceived=s.length%2,this.charLength=this.charReceived?2:0}function h(s){this.charReceived=s.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(a,G,d){(function(f,i){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var O=a("base64-js"),C=a("ieee754"),x=a("isarray");d.Buffer=i,d.SlowBuffer=T,d.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=f.TYPED_ARRAY_SUPPORT!==void 0?f.TYPED_ARRAY_SUPPORT:m(),d.kMaxLength=h();function m(){try{var Q=new Uint8Array(1);return Q.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Q.foo()===42&&typeof Q.subarray=="function"&&Q.subarray(1,1).byteLength===0}catch(B){return!1}}function h(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(Q,B){if(h()<B)throw new RangeError("Invalid typed array length");return i.TYPED_ARRAY_SUPPORT?(Q=new Uint8Array(B),Q.__proto__=i.prototype):(Q===null&&(Q=new i(B)),Q.length=B),Q}function i(Q,B,E){if(!i.TYPED_ARRAY_SUPPORT&&!(this instanceof i))return new i(Q,B,E);if(typeof Q=="number"){if(typeof B=="string")throw new Error("If encoding is specified then the first argument must be a string");return g(this,Q)}return l(this,Q,B,E)}i.poolSize=8192,i._augment=function(Q){return Q.__proto__=i.prototype,Q};function l(Q,B,E,U){if(typeof B=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&B instanceof ArrayBuffer?_(Q,B,E,U):typeof B=="string"?p(Q,B,E):S(Q,B)}i.from=function(Q,B,E){return l(null,Q,B,E)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0}));function u(Q){if(typeof Q!="number")throw new TypeError('"size" argument must be a number');if(Q<0)throw new RangeError('"size" argument must not be negative')}function o(Q,B,E,U){return u(B),B<=0?s(Q,B):E!==void 0?typeof U=="string"?s(Q,B).fill(E,U):s(Q,B).fill(E):s(Q,B)}i.alloc=function(Q,B,E){return o(null,Q,B,E)};function g(Q,B){if(u(B),Q=s(Q,B<0?0:k(B)|0),!i.TYPED_ARRAY_SUPPORT)for(var E=0;E<B;++E)Q[E]=0;return Q}i.allocUnsafe=function(Q){return g(null,Q)},i.allocUnsafeSlow=function(Q){return g(null,Q)};function p(Q,B,E){if((typeof E!="string"||E==="")&&(E="utf8"),!i.isEncoding(E))throw new TypeError('"encoding" must be a valid string encoding');var U=M(B,E)|0;Q=s(Q,U);var xe=Q.write(B,E);return xe!==U&&(Q=Q.slice(0,xe)),Q}function v(Q,B){var E=B.length<0?0:k(B.length)|0;Q=s(Q,E);for(var U=0;U<E;U+=1)Q[U]=B[U]&255;return Q}function _(Q,B,E,U){if(B.byteLength,E<0||B.byteLength<E)throw new RangeError("'offset' is out of bounds");if(B.byteLength<E+(U||0))throw new RangeError("'length' is out of bounds");return E===void 0&&U===void 0?B=new Uint8Array(B):U===void 0?B=new Uint8Array(B,E):B=new Uint8Array(B,E,U),i.TYPED_ARRAY_SUPPORT?(Q=B,Q.__proto__=i.prototype):Q=v(Q,B),Q}function S(Q,B){if(i.isBuffer(B)){var E=k(B.length)|0;return Q=s(Q,E),Q.length===0||B.copy(Q,0,0,E),Q}if(B){if(typeof ArrayBuffer!="undefined"&&B.buffer instanceof ArrayBuffer||"length"in B)return typeof B.length!="number"||Ce(B.length)?s(Q,0):v(Q,B);if(B.type==="Buffer"&&x(B.data))return v(Q,B.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function k(Q){if(Q>=h())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h().toString(16)+" bytes");return Q|0}function T(Q){return+Q!=Q&&(Q=0),i.alloc(+Q)}i.isBuffer=function(B){return!!(B!=null&&B._isBuffer)},i.compare=function(B,E){if(!i.isBuffer(B)||!i.isBuffer(E))throw new TypeError("Arguments must be Buffers");if(B===E)return 0;for(var U=B.length,xe=E.length,be=0,Te=Math.min(U,xe);be<Te;++be)if(B[be]!==E[be]){U=B[be],xe=E[be];break}return U<xe?-1:xe<U?1:0},i.isEncoding=function(B){switch(String(B).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(B,E){if(!x(B))throw new TypeError('"list" argument must be an Array of Buffers');if(B.length===0)return i.alloc(0);var U;if(E===void 0)for(E=0,U=0;U<B.length;++U)E+=B[U].length;var xe=i.allocUnsafe(E),be=0;for(U=0;U<B.length;++U){var Te=B[U];if(!i.isBuffer(Te))throw new TypeError('"list" argument must be an Array of Buffers');Te.copy(xe,be),be+=Te.length}return xe};function M(Q,B){if(i.isBuffer(Q))return Q.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Q)||Q instanceof ArrayBuffer))return Q.byteLength;typeof Q!="string"&&(Q=""+Q);var E=Q.length;if(E===0)return 0;for(var U=!1;;)switch(B){case"ascii":case"latin1":case"binary":return E;case"utf8":case"utf-8":case void 0:return ie(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E*2;case"hex":return E>>>1;case"base64":return K(Q).length;default:if(U)return ie(Q).length;B=(""+B).toLowerCase(),U=!0}}i.byteLength=M;function I(Q,B,E){var U=!1;if((B===void 0||B<0)&&(B=0),B>this.length)return"";if((E===void 0||E>this.length)&&(E=this.length),E<=0)return"";if(E>>>=0,B>>>=0,E<=B)return"";for(Q||(Q="utf8");;)switch(Q){case"hex":return z(this,B,E);case"utf8":case"utf-8":return he(this,B,E);case"ascii":return ne(this,B,E);case"latin1":case"binary":return W(this,B,E);case"base64":return ce(this,B,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,B,E);default:if(U)throw new TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),U=!0}}i.prototype._isBuffer=!0;function j(Q,B,E){var U=Q[B];Q[B]=Q[E],Q[E]=U}i.prototype.swap16=function(){var B=this.length;if(B%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var E=0;E<B;E+=2)j(this,E,E+1);return this},i.prototype.swap32=function(){var B=this.length;if(B%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var E=0;E<B;E+=4)j(this,E,E+3),j(this,E+1,E+2);return this},i.prototype.swap64=function(){var B=this.length;if(B%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var E=0;E<B;E+=8)j(this,E,E+7),j(this,E+1,E+6),j(this,E+2,E+5),j(this,E+3,E+4);return this},i.prototype.toString=function(){var B=this.length|0;return B===0?"":arguments.length===0?he(this,0,B):I.apply(this,arguments)},i.prototype.equals=function(B){if(!i.isBuffer(B))throw new TypeError("Argument must be a Buffer");return this===B?!0:i.compare(this,B)===0},i.prototype.inspect=function(){var B="",E=d.INSPECT_MAX_BYTES;return this.length>0&&(B=this.toString("hex",0,E).match(/.{2}/g).join(" "),this.length>E&&(B+=" ... ")),"<Buffer "+B+">"},i.prototype.compare=function(B,E,U,xe,be){if(!i.isBuffer(B))throw new TypeError("Argument must be a Buffer");if(E===void 0&&(E=0),U===void 0&&(U=B?B.length:0),xe===void 0&&(xe=0),be===void 0&&(be=this.length),E<0||U>B.length||xe<0||be>this.length)throw new RangeError("out of range index");if(xe>=be&&E>=U)return 0;if(xe>=be)return-1;if(E>=U)return 1;if(E>>>=0,U>>>=0,xe>>>=0,be>>>=0,this===B)return 0;for(var Te=be-xe,Fe=U-E,Be=Math.min(Te,Fe),Ue=this.slice(xe,be),ze=B.slice(E,U),Ve=0;Ve<Be;++Ve)if(Ue[Ve]!==ze[Ve]){Te=Ue[Ve],Fe=ze[Ve];break}return Te<Fe?-1:Fe<Te?1:0};function D(Q,B,E,U,xe){if(Q.length===0)return-1;if(typeof E=="string"?(U=E,E=0):E>2147483647?E=2147483647:E<-2147483648&&(E=-2147483648),E=+E,isNaN(E)&&(E=xe?0:Q.length-1),E<0&&(E=Q.length+E),E>=Q.length){if(xe)return-1;E=Q.length-1}else if(E<0)if(xe)E=0;else return-1;if(typeof B=="string"&&(B=i.from(B,U)),i.isBuffer(B))return B.length===0?-1:y(Q,B,E,U,xe);if(typeof B=="number")return B=B&255,i.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?xe?Uint8Array.prototype.indexOf.call(Q,B,E):Uint8Array.prototype.lastIndexOf.call(Q,B,E):y(Q,[B],E,U,xe);throw new TypeError("val must be string, number or Buffer")}function y(Q,B,E,U,xe){var be=1,Te=Q.length,Fe=B.length;if(U!==void 0&&(U=String(U).toLowerCase(),U==="ucs2"||U==="ucs-2"||U==="utf16le"||U==="utf-16le")){if(Q.length<2||B.length<2)return-1;be=2,Te/=2,Fe/=2,E/=2}function Be(Je,Ne){return be===1?Je[Ne]:Je.readUInt16BE(Ne*be)}var Ue;if(xe){var ze=-1;for(Ue=E;Ue<Te;Ue++)if(Be(Q,Ue)===Be(B,ze===-1?0:Ue-ze)){if(ze===-1&&(ze=Ue),Ue-ze+1===Fe)return ze*be}else ze!==-1&&(Ue-=Ue-ze),ze=-1}else for(E+Fe>Te&&(E=Te-Fe),Ue=E;Ue>=0;Ue--){for(var Ve=!0,Xe=0;Xe<Fe;Xe++)if(Be(Q,Ue+Xe)!==Be(B,Xe)){Ve=!1;break}if(Ve)return Ue}return-1}i.prototype.includes=function(B,E,U){return this.indexOf(B,E,U)!==-1},i.prototype.indexOf=function(B,E,U){return D(this,B,E,U,!0)},i.prototype.lastIndexOf=function(B,E,U){return D(this,B,E,U,!1)};function J(Q,B,E,U){E=Number(E)||0;var xe=Q.length-E;U?(U=Number(U),U>xe&&(U=xe)):U=xe;var be=B.length;if(be%2!==0)throw new TypeError("Invalid hex string");U>be/2&&(U=be/2);for(var Te=0;Te<U;++Te){var Fe=parseInt(B.substr(Te*2,2),16);if(isNaN(Fe))return Te;Q[E+Te]=Fe}return Te}function X(Q,B,E,U){return Y(ie(B,Q.length-E),Q,E,U)}function N(Q,B,E,U){return Y($(B),Q,E,U)}function F(Q,B,E,U){return N(Q,B,E,U)}function H(Q,B,E,U){return Y(K(B),Q,E,U)}function Z(Q,B,E,U){return Y(se(B,Q.length-E),Q,E,U)}i.prototype.write=function(B,E,U,xe){if(E===void 0)xe="utf8",U=this.length,E=0;else if(U===void 0&&typeof E=="string")xe=E,U=this.length,E=0;else if(isFinite(E))E=E|0,isFinite(U)?(U=U|0,xe===void 0&&(xe="utf8")):(xe=U,U=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var be=this.length-E;if((U===void 0||U>be)&&(U=be),B.length>0&&(U<0||E<0)||E>this.length)throw new RangeError("Attempt to write outside buffer bounds");xe||(xe="utf8");for(var Te=!1;;)switch(xe){case"hex":return J(this,B,E,U);case"utf8":case"utf-8":return X(this,B,E,U);case"ascii":return N(this,B,E,U);case"latin1":case"binary":return F(this,B,E,U);case"base64":return H(this,B,E,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,B,E,U);default:if(Te)throw new TypeError("Unknown encoding: "+xe);xe=(""+xe).toLowerCase(),Te=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ce(Q,B,E){return B===0&&E===Q.length?O.fromByteArray(Q):O.fromByteArray(Q.slice(B,E))}function he(Q,B,E){E=Math.min(Q.length,E);for(var U=[],xe=B;xe<E;){var be=Q[xe],Te=null,Fe=be>239?4:be>223?3:be>191?2:1;if(xe+Fe<=E){var Be,Ue,ze,Ve;switch(Fe){case 1:be<128&&(Te=be);break;case 2:Be=Q[xe+1],(Be&192)===128&&(Ve=(be&31)<<6|Be&63,Ve>127&&(Te=Ve));break;case 3:Be=Q[xe+1],Ue=Q[xe+2],(Be&192)===128&&(Ue&192)===128&&(Ve=(be&15)<<12|(Be&63)<<6|Ue&63,Ve>2047&&(Ve<55296||Ve>57343)&&(Te=Ve));break;case 4:Be=Q[xe+1],Ue=Q[xe+2],ze=Q[xe+3],(Be&192)===128&&(Ue&192)===128&&(ze&192)===128&&(Ve=(be&15)<<18|(Be&63)<<12|(Ue&63)<<6|ze&63,Ve>65535&&Ve<1114112&&(Te=Ve))}}Te===null?(Te=65533,Fe=1):Te>65535&&(Te-=65536,U.push(Te>>>10&1023|55296),Te=56320|Te&1023),U.push(Te),xe+=Fe}return ve(U)}var V=4096;function ve(Q){var B=Q.length;if(B<=V)return String.fromCharCode.apply(String,Q);for(var E="",U=0;U<B;)E+=String.fromCharCode.apply(String,Q.slice(U,U+=V));return E}function ne(Q,B,E){var U="";E=Math.min(Q.length,E);for(var xe=B;xe<E;++xe)U+=String.fromCharCode(Q[xe]&127);return U}function W(Q,B,E){var U="";E=Math.min(Q.length,E);for(var xe=B;xe<E;++xe)U+=String.fromCharCode(Q[xe]);return U}function z(Q,B,E){var U=Q.length;(!B||B<0)&&(B=0),(!E||E<0||E>U)&&(E=U);for(var xe="",be=B;be<E;++be)xe+=q(Q[be]);return xe}function R(Q,B,E){for(var U=Q.slice(B,E),xe="",be=0;be<U.length;be+=2)xe+=String.fromCharCode(U[be]+U[be+1]*256);return xe}i.prototype.slice=function(B,E){var U=this.length;B=~~B,E=E===void 0?U:~~E,B<0?(B+=U,B<0&&(B=0)):B>U&&(B=U),E<0?(E+=U,E<0&&(E=0)):E>U&&(E=U),E<B&&(E=B);var xe;if(i.TYPED_ARRAY_SUPPORT)xe=this.subarray(B,E),xe.__proto__=i.prototype;else{var be=E-B;xe=new i(be,void 0);for(var Te=0;Te<be;++Te)xe[Te]=this[Te+B]}return xe};function w(Q,B,E){if(Q%1!==0||Q<0)throw new RangeError("offset is not uint");if(Q+B>E)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUIntLE=function(B,E,U){B=B|0,E=E|0,U||w(B,E,this.length);for(var xe=this[B],be=1,Te=0;++Te<E&&(be*=256);)xe+=this[B+Te]*be;return xe},i.prototype.readUIntBE=function(B,E,U){B=B|0,E=E|0,U||w(B,E,this.length);for(var xe=this[B+--E],be=1;E>0&&(be*=256);)xe+=this[B+--E]*be;return xe},i.prototype.readUInt8=function(B,E){return E||w(B,1,this.length),this[B]},i.prototype.readUInt16LE=function(B,E){return E||w(B,2,this.length),this[B]|this[B+1]<<8},i.prototype.readUInt16BE=function(B,E){return E||w(B,2,this.length),this[B]<<8|this[B+1]},i.prototype.readUInt32LE=function(B,E){return E||w(B,4,this.length),(this[B]|this[B+1]<<8|this[B+2]<<16)+this[B+3]*16777216},i.prototype.readUInt32BE=function(B,E){return E||w(B,4,this.length),this[B]*16777216+(this[B+1]<<16|this[B+2]<<8|this[B+3])},i.prototype.readIntLE=function(B,E,U){B=B|0,E=E|0,U||w(B,E,this.length);for(var xe=this[B],be=1,Te=0;++Te<E&&(be*=256);)xe+=this[B+Te]*be;return be*=128,xe>=be&&(xe-=Math.pow(2,8*E)),xe},i.prototype.readIntBE=function(B,E,U){B=B|0,E=E|0,U||w(B,E,this.length);for(var xe=E,be=1,Te=this[B+--xe];xe>0&&(be*=256);)Te+=this[B+--xe]*be;return be*=128,Te>=be&&(Te-=Math.pow(2,8*E)),Te},i.prototype.readInt8=function(B,E){return E||w(B,1,this.length),this[B]&128?(255-this[B]+1)*-1:this[B]},i.prototype.readInt16LE=function(B,E){E||w(B,2,this.length);var U=this[B]|this[B+1]<<8;return U&32768?U|4294901760:U},i.prototype.readInt16BE=function(B,E){E||w(B,2,this.length);var U=this[B+1]|this[B]<<8;return U&32768?U|4294901760:U},i.prototype.readInt32LE=function(B,E){return E||w(B,4,this.length),this[B]|this[B+1]<<8|this[B+2]<<16|this[B+3]<<24},i.prototype.readInt32BE=function(B,E){return E||w(B,4,this.length),this[B]<<24|this[B+1]<<16|this[B+2]<<8|this[B+3]},i.prototype.readFloatLE=function(B,E){return E||w(B,4,this.length),C.read(this,B,!0,23,4)},i.prototype.readFloatBE=function(B,E){return E||w(B,4,this.length),C.read(this,B,!1,23,4)},i.prototype.readDoubleLE=function(B,E){return E||w(B,8,this.length),C.read(this,B,!0,52,8)},i.prototype.readDoubleBE=function(B,E){return E||w(B,8,this.length),C.read(this,B,!1,52,8)};function P(Q,B,E,U,xe,be){if(!i.isBuffer(Q))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>xe||B<be)throw new RangeError('"value" argument is out of bounds');if(E+U>Q.length)throw new RangeError("Index out of range")}i.prototype.writeUIntLE=function(B,E,U,xe){if(B=+B,E=E|0,U=U|0,!xe){var be=Math.pow(2,8*U)-1;P(this,B,E,U,be,0)}var Te=1,Fe=0;for(this[E]=B&255;++Fe<U&&(Te*=256);)this[E+Fe]=B/Te&255;return E+U},i.prototype.writeUIntBE=function(B,E,U,xe){if(B=+B,E=E|0,U=U|0,!xe){var be=Math.pow(2,8*U)-1;P(this,B,E,U,be,0)}var Te=U-1,Fe=1;for(this[E+Te]=B&255;--Te>=0&&(Fe*=256);)this[E+Te]=B/Fe&255;return E+U},i.prototype.writeUInt8=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,1,255,0),i.TYPED_ARRAY_SUPPORT||(B=Math.floor(B)),this[E]=B&255,E+1};function le(Q,B,E,U){B<0&&(B=65535+B+1);for(var xe=0,be=Math.min(Q.length-E,2);xe<be;++xe)Q[E+xe]=(B&255<<8*(U?xe:1-xe))>>>(U?xe:1-xe)*8}i.prototype.writeUInt16LE=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[E]=B&255,this[E+1]=B>>>8):le(this,B,E,!0),E+2},i.prototype.writeUInt16BE=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[E]=B>>>8,this[E+1]=B&255):le(this,B,E,!1),E+2};function pe(Q,B,E,U){B<0&&(B=4294967295+B+1);for(var xe=0,be=Math.min(Q.length-E,4);xe<be;++xe)Q[E+xe]=B>>>(U?xe:3-xe)*8&255}i.prototype.writeUInt32LE=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[E+3]=B>>>24,this[E+2]=B>>>16,this[E+1]=B>>>8,this[E]=B&255):pe(this,B,E,!0),E+4},i.prototype.writeUInt32BE=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[E]=B>>>24,this[E+1]=B>>>16,this[E+2]=B>>>8,this[E+3]=B&255):pe(this,B,E,!1),E+4},i.prototype.writeIntLE=function(B,E,U,xe){if(B=+B,E=E|0,!xe){var be=Math.pow(2,8*U-1);P(this,B,E,U,be-1,-be)}var Te=0,Fe=1,Be=0;for(this[E]=B&255;++Te<U&&(Fe*=256);)B<0&&Be===0&&this[E+Te-1]!==0&&(Be=1),this[E+Te]=(B/Fe>>0)-Be&255;return E+U},i.prototype.writeIntBE=function(B,E,U,xe){if(B=+B,E=E|0,!xe){var be=Math.pow(2,8*U-1);P(this,B,E,U,be-1,-be)}var Te=U-1,Fe=1,Be=0;for(this[E+Te]=B&255;--Te>=0&&(Fe*=256);)B<0&&Be===0&&this[E+Te+1]!==0&&(Be=1),this[E+Te]=(B/Fe>>0)-Be&255;return E+U},i.prototype.writeInt8=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,1,127,-128),i.TYPED_ARRAY_SUPPORT||(B=Math.floor(B)),B<0&&(B=255+B+1),this[E]=B&255,E+1},i.prototype.writeInt16LE=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[E]=B&255,this[E+1]=B>>>8):le(this,B,E,!0),E+2},i.prototype.writeInt16BE=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[E]=B>>>8,this[E+1]=B&255):le(this,B,E,!1),E+2},i.prototype.writeInt32LE=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[E]=B&255,this[E+1]=B>>>8,this[E+2]=B>>>16,this[E+3]=B>>>24):pe(this,B,E,!0),E+4},i.prototype.writeInt32BE=function(B,E,U){return B=+B,E=E|0,U||P(this,B,E,4,2147483647,-2147483648),B<0&&(B=4294967295+B+1),i.TYPED_ARRAY_SUPPORT?(this[E]=B>>>24,this[E+1]=B>>>16,this[E+2]=B>>>8,this[E+3]=B&255):pe(this,B,E,!1),E+4};function ye(Q,B,E,U,xe,be){if(E+U>Q.length)throw new RangeError("Index out of range");if(E<0)throw new RangeError("Index out of range")}function Ee(Q,B,E,U,xe){return xe||ye(Q,B,E,4,34028234663852886e22,-34028234663852886e22),C.write(Q,B,E,U,23,4),E+4}i.prototype.writeFloatLE=function(B,E,U){return Ee(this,B,E,!0,U)},i.prototype.writeFloatBE=function(B,E,U){return Ee(this,B,E,!1,U)};function Oe(Q,B,E,U,xe){return xe||ye(Q,B,E,8,17976931348623157e292,-17976931348623157e292),C.write(Q,B,E,U,52,8),E+8}i.prototype.writeDoubleLE=function(B,E,U){return Oe(this,B,E,!0,U)},i.prototype.writeDoubleBE=function(B,E,U){return Oe(this,B,E,!1,U)},i.prototype.copy=function(B,E,U,xe){if(U||(U=0),!xe&&xe!==0&&(xe=this.length),E>=B.length&&(E=B.length),E||(E=0),xe>0&&xe<U&&(xe=U),xe===U)return 0;if(B.length===0||this.length===0)return 0;if(E<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("sourceStart out of bounds");if(xe<0)throw new RangeError("sourceEnd out of bounds");xe>this.length&&(xe=this.length),B.length-E<xe-U&&(xe=B.length-E+U);var be=xe-U,Te;if(this===B&&U<E&&E<xe)for(Te=be-1;Te>=0;--Te)B[Te+E]=this[Te+U];else if(be<1e3||!i.TYPED_ARRAY_SUPPORT)for(Te=0;Te<be;++Te)B[Te+E]=this[Te+U];else Uint8Array.prototype.set.call(B,this.subarray(U,U+be),E);return be},i.prototype.fill=function(B,E,U,xe){if(typeof B=="string"){if(typeof E=="string"?(xe=E,E=0,U=this.length):typeof U=="string"&&(xe=U,U=this.length),B.length===1){var be=B.charCodeAt(0);be<256&&(B=be)}if(xe!==void 0&&typeof xe!="string")throw new TypeError("encoding must be a string");if(typeof xe=="string"&&!i.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe)}else typeof B=="number"&&(B=B&255);if(E<0||this.length<E||this.length<U)throw new RangeError("Out of range index");if(U<=E)return this;E=E>>>0,U=U===void 0?this.length:U>>>0,B||(B=0);var Te;if(typeof B=="number")for(Te=E;Te<U;++Te)this[Te]=B;else{var Fe=i.isBuffer(B)?B:ie(new i(B,xe).toString()),Be=Fe.length;for(Te=0;Te<U-E;++Te)this[Te+E]=Fe[Te%Be]}return this};var ae=/[^+\/0-9A-Za-z-_]/g;function fe(Q){if(Q=ge(Q).replace(ae,""),Q.length<2)return"";for(;Q.length%4!==0;)Q=Q+"=";return Q}function ge(Q){return Q.trim?Q.trim():Q.replace(/^\s+|\s+$/g,"")}function q(Q){return Q<16?"0"+Q.toString(16):Q.toString(16)}function ie(Q,B){B=B||Infinity;for(var E,U=Q.length,xe=null,be=[],Te=0;Te<U;++Te){if(E=Q.charCodeAt(Te),E>55295&&E<57344){if(!xe){if(E>56319){(B-=3)>-1&&be.push(239,191,189);continue}else if(Te+1===U){(B-=3)>-1&&be.push(239,191,189);continue}xe=E;continue}if(E<56320){(B-=3)>-1&&be.push(239,191,189),xe=E;continue}E=(xe-55296<<10|E-56320)+65536}else xe&&((B-=3)>-1&&be.push(239,191,189));if(xe=null,E<128){if((B-=1)<0)break;be.push(E)}else if(E<2048){if((B-=2)<0)break;be.push(E>>6|192,E&63|128)}else if(E<65536){if((B-=3)<0)break;be.push(E>>12|224,E>>6&63|128,E&63|128)}else if(E<1114112){if((B-=4)<0)break;be.push(E>>18|240,E>>12&63|128,E>>6&63|128,E&63|128)}else throw new Error("Invalid code point")}return be}function $(Q){for(var B=[],E=0;E<Q.length;++E)B.push(Q.charCodeAt(E)&255);return B}function se(Q,B){for(var E,U,xe,be=[],Te=0;Te<Q.length&&!((B-=2)<0);++Te)E=Q.charCodeAt(Te),U=E>>8,xe=E%256,be.push(xe),be.push(U);return be}function K(Q){return O.toByteArray(fe(Q))}function Y(Q,B,E,U){for(var xe=0;xe<U&&!(xe+E>=B.length||xe>=Q.length);++xe)B[xe+E]=Q[xe];return xe}function Ce(Q){return Q!==Q}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},a("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(a,G,d){G.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(a,G,d){G.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(a,G,d){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var f=Array.prototype.slice;G.exports=i;function i(C,x){if(!(this instanceof i))return new i(C,x);this.src=C,this._withAccess=x}i.prototype.withAccess=function(C){return this._withAccess=C!==!1,this},i.prototype.pick=function(C){return Array.isArray(C)||(C=f.call(arguments)),C.length&&(this.keys=C),this},i.prototype.to=function(C){if(C=C||{},!this.src)return C;var x=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;m<x.length;m++){if(h=x[m],C[h]!==void 0)continue;C[h]=this.src[h]}return C}for(var m=0;m<x.length;m++){var h=x[m];if(!O(C,h))continue;var s=this.src.__lookupGetter__(h),l=this.src.__lookupSetter__(h);s&&C.__defineGetter__(h,s),l&&C.__defineSetter__(h,l),!s&&!l&&(C[h]=this.src[h])}return C},i.prototype.toCover=function(C){for(var x=this.keys||Object.keys(this.src),m=0;m<x.length;m++){var h=x[m];delete C[h];var s=this.src.__lookupGetter__(h),l=this.src.__lookupSetter__(h);s&&C.__defineGetter__(h,s),l&&C.__defineSetter__(h,l),!s&&!l&&(C[h]=this.src[h])}},i.prototype.override=i.prototype.toCover,i.prototype.and=function(C){var x={};return this.to(x),this.src=C,this.to(x),this.src=x,this};function O(C,x){return C[x]===void 0&&C.__lookupGetter__(x)===void 0&&C.__lookupSetter__(x)===void 0}},{}],77:[function(a,G,d){a("../../modules/es6.string.iterator"),a("../../modules/es6.array.from"),G.exports=a("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(a,G,d){var f=a("../../modules/_core"),i=f.JSON||(f.JSON={stringify:JSON.stringify});G.exports=function(C){return i.stringify.apply(i,arguments)}},{"../../modules/_core":99}],79:[function(a,G,d){a("../../modules/es6.object.assign"),G.exports=a("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(a,G,d){a("../../modules/es6.object.create");var f=a("../../modules/_core").Object;G.exports=function(O,C){return f.create(O,C)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(a,G,d){a("../../modules/es6.object.define-property");var f=a("../../modules/_core").Object;G.exports=function(O,C,x){return f.defineProperty(O,C,x)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(a,G,d){a("../../modules/es7.object.entries"),G.exports=a("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(a,G,d){a("../../modules/es6.object.get-own-property-names");var f=a("../../modules/_core").Object;G.exports=function(O){return f.getOwnPropertyNames(O)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(a,G,d){a("../../modules/es6.object.get-prototype-of"),G.exports=a("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(a,G,d){a("../../modules/es6.object.keys"),G.exports=a("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(a,G,d){a("../modules/es6.object.to-string"),a("../modules/es6.string.iterator"),a("../modules/web.dom.iterable"),a("../modules/es6.promise"),a("../modules/es7.promise.finally"),a("../modules/es7.promise.try"),G.exports=a("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(a,G,d){a("../modules/web.immediate"),G.exports=a("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(a,G,d){a("../../modules/es6.string.from-code-point"),G.exports=a("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(a,G,d){a("../../modules/es6.function.has-instance"),G.exports=a("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(a,G,d){a("../../modules/es6.symbol"),a("../../modules/es6.object.to-string"),a("../../modules/es7.symbol.async-iterator"),a("../../modules/es7.symbol.observable"),G.exports=a("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(a,G,d){a("../../modules/es6.string.iterator"),a("../../modules/web.dom.iterable"),G.exports=a("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(a,G,d){G.exports=function(f){if(typeof f!="function")throw TypeError(f+" is not a function!");return f}},{}],93:[function(a,G,d){G.exports=function(){}},{}],94:[function(a,G,d){G.exports=function(f,i,O,C){if(!(f instanceof i)||C!==void 0&&C in f)throw TypeError(O+": incorrect invocation!");return f}},{}],95:[function(a,G,d){var f=a("./_is-object");G.exports=function(i){if(!f(i))throw TypeError(i+" is not an object!");return i}},{"./_is-object":119}],96:[function(a,G,d){var f=a("./_to-iobject"),i=a("./_to-length"),O=a("./_to-absolute-index");G.exports=function(C){return function(x,m,h){var s=f(x),l=i(s.length),u=O(h,l),o;if(C&&m!=m){for(;l>u;)if(o=s[u++],o!=o)return!0}else for(;l>u;u++)if((C||u in s)&&s[u]===m)return C||u||0;return!C&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(a,G,d){var f=a("./_cof"),i=a("./_wks")("toStringTag"),O=f(function(){return arguments}())=="Arguments",C=function(x,m){try{return x[m]}catch(h){}};G.exports=function(x){var m,h,s;return x===void 0?"Undefined":x===null?"Null":typeof(h=C(m=Object(x),i))=="string"?h:O?f(m):(s=f(m))=="Object"&&typeof m.callee=="function"?"Arguments":s}},{"./_cof":98,"./_wks":166}],98:[function(a,G,d){var f={}.toString;G.exports=function(i){return f.call(i).slice(8,-1)}},{}],99:[function(a,G,d){var f=G.exports={version:"2.6.11"};typeof __e=="number"&&(__e=f)},{}],100:[function(a,G,d){"use strict";var f=a("./_object-dp"),i=a("./_property-desc");G.exports=function(O,C,x){C in O?f.f(O,C,i(0,x)):O[C]=x}},{"./_object-dp":132,"./_property-desc":146}],101:[function(a,G,d){var f=a("./_a-function");G.exports=function(i,O,C){if(f(i),O===void 0)return i;switch(C){case 1:return function(x){return i.call(O,x)};case 2:return function(x,m){return i.call(O,x,m)};case 3:return function(x,m,h){return i.call(O,x,m,h)}}return function(){return i.apply(O,arguments)}}},{"./_a-function":92}],102:[function(a,G,d){G.exports=function(f){if(f==null)throw TypeError("Can't call method on "+f);return f}},{}],103:[function(a,G,d){G.exports=!a("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(a,G,d){var f=a("./_is-object"),i=a("./_global").document,O=f(i)&&f(i.createElement);G.exports=function(C){return O?i.createElement(C):{}}},{"./_global":110,"./_is-object":119}],105:[function(a,G,d){G.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(a,G,d){var f=a("./_object-keys"),i=a("./_object-gops"),O=a("./_object-pie");G.exports=function(C){var x=f(C),m=i.f;if(m)for(var h=m(C),s=O.f,l=0,u;h.length>l;)s.call(C,u=h[l++])&&x.push(u);return x}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(a,G,d){var f=a("./_global"),i=a("./_core"),O=a("./_ctx"),C=a("./_hide"),x=a("./_has"),m="prototype",h=function(s,l,u){var o=s&h.F,g=s&h.G,p=s&h.S,v=s&h.P,_=s&h.B,S=s&h.W,k=g?i:i[l]||(i[l]={}),T=k[m],M=g?f:p?f[l]:(f[l]||{})[m],I,j,D;g&&(u=l);for(I in u){if(j=!o&&M&&M[I]!==void 0,j&&x(k,I))continue;D=j?M[I]:u[I],k[I]=g&&typeof M[I]!="function"?u[I]:_&&j?O(D,f):S&&M[I]==D?function(y){var J=function(X,N,F){if(this instanceof y){switch(arguments.length){case 0:return new y;case 1:return new y(X);case 2:return new y(X,N)}return new y(X,N,F)}return y.apply(this,arguments)};return J[m]=y[m],J}(D):v&&typeof D=="function"?O(Function.call,D):D,v&&((k.virtual||(k.virtual={}))[I]=D,s&h.R&&T&&!T[I]&&C(T,I,D))}};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,G.exports=h},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(a,G,d){G.exports=function(f){try{return!!f()}catch(i){return!0}}},{}],109:[function(a,G,d){var f=a("./_ctx"),i=a("./_iter-call"),O=a("./_is-array-iter"),C=a("./_an-object"),x=a("./_to-length"),m=a("./core.get-iterator-method"),h={},s={},d=G.exports=function(l,u,o,g,p){var v=p?function(){return l}:m(l),_=f(o,g,u?2:1),S=0,k,T,M,I;if(typeof v!="function")throw TypeError(l+" is not iterable!");if(O(v)){for(k=x(l.length);k>S;S++)if(I=u?_(C(T=l[S])[0],T[1]):_(l[S]),I===h||I===s)return I}else for(M=v.call(l);!(T=M.next()).done;)if(I=i(M,_,T.value,u),I===h||I===s)return I};d.BREAK=h,d.RETURN=s},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(a,G,d){var f=G.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=f)},{}],111:[function(a,G,d){var f={}.hasOwnProperty;G.exports=function(i,O){return f.call(i,O)}},{}],112:[function(a,G,d){var f=a("./_object-dp"),i=a("./_property-desc");G.exports=a("./_descriptors")?function(O,C,x){return f.f(O,C,i(1,x))}:function(O,C,x){return O[C]=x,O}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(a,G,d){var f=a("./_global").document;G.exports=f&&f.documentElement},{"./_global":110}],114:[function(a,G,d){G.exports=!a("./_descriptors")&&!a("./_fails")(function(){return Object.defineProperty(a("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(a,G,d){G.exports=function(f,i,O){var C=O===void 0;switch(i.length){case 0:return C?f():f.call(O);case 1:return C?f(i[0]):f.call(O,i[0]);case 2:return C?f(i[0],i[1]):f.call(O,i[0],i[1]);case 3:return C?f(i[0],i[1],i[2]):f.call(O,i[0],i[1],i[2]);case 4:return C?f(i[0],i[1],i[2],i[3]):f.call(O,i[0],i[1],i[2],i[3])}return f.apply(O,i)}},{}],116:[function(a,G,d){var f=a("./_cof");G.exports=Object("z").propertyIsEnumerable(0)?Object:function(i){return f(i)=="String"?i.split(""):Object(i)}},{"./_cof":98}],117:[function(a,G,d){var f=a("./_iterators"),i=a("./_wks")("iterator"),O=Array.prototype;G.exports=function(C){return C!==void 0&&(f.Array===C||O[i]===C)}},{"./_iterators":125,"./_wks":166}],118:[function(a,G,d){var f=a("./_cof");G.exports=Array.isArray||function(O){return f(O)=="Array"}},{"./_cof":98}],119:[function(a,G,d){G.exports=function(f){return typeof f=="object"?f!==null:typeof f=="function"}},{}],120:[function(a,G,d){var f=a("./_an-object");G.exports=function(i,O,C,x){try{return x?O(f(C)[0],C[1]):O(C)}catch(h){var m=i.return;throw m!==void 0&&f(m.call(i)),h}}},{"./_an-object":95}],121:[function(a,G,d){"use strict";var f=a("./_object-create"),i=a("./_property-desc"),O=a("./_set-to-string-tag"),C={};a("./_hide")(C,a("./_wks")("iterator"),function(){return this}),G.exports=function(x,m,h){x.prototype=f(C,{next:i(1,h)}),O(x,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(a,G,d){"use strict";var f=a("./_library"),i=a("./_export"),O=a("./_redefine"),C=a("./_hide"),x=a("./_iterators"),m=a("./_iter-create"),h=a("./_set-to-string-tag"),s=a("./_object-gpo"),l=a("./_wks")("iterator"),u=!([].keys&&"next"in[].keys()),o="@@iterator",g="keys",p="values",v=function(){return this};G.exports=function(_,S,k,T,M,I,j){m(k,S,T);var D=function(ne){if(!u&&ne in N)return N[ne];switch(ne){case g:return function(){return new k(this,ne)};case p:return function(){return new k(this,ne)}}return function(){return new k(this,ne)}},y=S+" Iterator",J=M==p,X=!1,N=_.prototype,F=N[l]||N[o]||M&&N[M],H=F||D(M),Z=M?J?D("entries"):H:void 0,ce=S=="Array"&&N.entries||F,he,V,ve;if(ce&&(ve=s(ce.call(new _)),ve!==Object.prototype&&ve.next&&(h(ve,y,!0),!f&&typeof ve[l]!="function"&&C(ve,l,v))),J&&F&&F.name!==p&&(X=!0,H=function(){return F.call(this)}),(!f||j)&&(u||X||!N[l])&&C(N,l,H),x[S]=H,x[y]=v,M)if(he={values:J?H:D(p),keys:I?H:D(g),entries:Z},j)for(V in he)V in N||O(N,V,he[V]);else i(i.P+i.F*(u||X),S,he);return he}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(a,G,d){var f=a("./_wks")("iterator"),i=!1;try{var O=[7][f]();O.return=function(){i=!0},Array.from(O,function(){throw 2})}catch(C){}G.exports=function(C,x){if(!x&&!i)return!1;var m=!1;try{var h=[7],s=h[f]();s.next=function(){return{done:m=!0}},h[f]=function(){return s},C(h)}catch(l){}return m}},{"./_wks":166}],124:[function(a,G,d){G.exports=function(f,i){return{value:i,done:!!f}}},{}],125:[function(a,G,d){G.exports={}},{}],126:[function(a,G,d){G.exports=!0},{}],127:[function(a,G,d){var f=a("./_uid")("meta"),i=a("./_is-object"),O=a("./_has"),C=a("./_object-dp").f,x=0,m=Object.isExtensible||function(){return!0},h=!a("./_fails")(function(){return m(Object.preventExtensions({}))}),s=function(p){C(p,f,{value:{i:"O"+ ++x,w:{}}})},l=function(p,v){if(!i(p))return typeof p=="symbol"?p:(typeof p=="string"?"S":"P")+p;if(!O(p,f)){if(!m(p))return"F";if(!v)return"E";s(p)}return p[f].i},u=function(p,v){if(!O(p,f)){if(!m(p))return!0;if(!v)return!1;s(p)}return p[f].w},o=function(p){return h&&g.NEED&&m(p)&&!O(p,f)&&s(p),p},g=G.exports={KEY:f,NEED:!1,fastKey:l,getWeak:u,onFreeze:o}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(a,G,d){var f=a("./_global"),i=a("./_task").set,O=f.MutationObserver||f.WebKitMutationObserver,C=f.process,x=f.Promise,m=a("./_cof")(C)=="process";G.exports=function(){var h,s,l,u=function(){var v,_;for(m&&(v=C.domain)&&v.exit();h;){_=h.fn,h=h.next;try{_()}catch(S){throw h?l():s=void 0,S}}s=void 0,v&&v.enter()};if(m)l=function(){C.nextTick(u)};else if(O&&!(f.navigator&&f.navigator.standalone)){var o=!0,g=document.createTextNode("");new O(u).observe(g,{characterData:!0}),l=function(){g.data=o=!o}}else if(x&&x.resolve){var p=x.resolve(void 0);l=function(){p.then(u)}}else l=function(){i.call(f,u)};return function(v){var _={fn:v,next:void 0};s&&(s.next=_),h||(h=_,l()),s=_}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(a,G,d){"use strict";var f=a("./_a-function");function i(O){var C,x;this.promise=new O(function(m,h){if(C!==void 0||x!==void 0)throw TypeError("Bad Promise constructor");C=m,x=h}),this.resolve=f(C),this.reject=f(x)}G.exports.f=function(O){return new i(O)}},{"./_a-function":92}],130:[function(a,G,d){"use strict";var f=a("./_descriptors"),i=a("./_object-keys"),O=a("./_object-gops"),C=a("./_object-pie"),x=a("./_to-object"),m=a("./_iobject"),h=Object.assign;G.exports=!h||a("./_fails")(function(){var s={},l={},u=Symbol(),o="abcdefghijklmnopqrst";return s[u]=7,o.split("").forEach(function(g){l[g]=g}),h({},s)[u]!=7||Object.keys(h({},l)).join("")!=o})?function(l,u){for(var o=x(l),g=arguments.length,p=1,v=O.f,_=C.f;g>p;)for(var S=m(arguments[p++]),k=v?i(S).concat(v(S)):i(S),T=k.length,M=0,I;T>M;)I=k[M++],(!f||_.call(S,I))&&(o[I]=S[I]);return o}:h},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(a,G,d){var f=a("./_an-object"),i=a("./_object-dps"),O=a("./_enum-bug-keys"),C=a("./_shared-key")("IE_PROTO"),x=function(){},m="prototype",h=function(){var s=a("./_dom-create")("iframe"),l=O.length,u="<",o=">",g;for(s.style.display="none",a("./_html").appendChild(s),s.src="javascript:",g=s.contentWindow.document,g.open(),g.write(u+"script"+o+"document.F=Object"+u+"/script"+o),g.close(),h=g.F;l--;)delete h[m][O[l]];return h()};G.exports=Object.create||function(l,u){var o;return l!==null?(x[m]=f(l),o=new x,x[m]=null,o[C]=l):o=h(),u===void 0?o:i(o,u)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(a,G,d){var f=a("./_an-object"),i=a("./_ie8-dom-define"),O=a("./_to-primitive"),C=Object.defineProperty;d.f=a("./_descriptors")?Object.defineProperty:function(m,h,s){if(f(m),h=O(h,!0),f(s),i)try{return C(m,h,s)}catch(l){}if("get"in s||"set"in s)throw TypeError("Accessors not supported!");return"value"in s&&(m[h]=s.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(a,G,d){var f=a("./_object-dp"),i=a("./_an-object"),O=a("./_object-keys");G.exports=a("./_descriptors")?Object.defineProperties:function(x,m){i(x);for(var h=O(m),s=h.length,l=0,u;s>l;)f.f(x,u=h[l++],m[u]);return x}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(a,G,d){var f=a("./_object-pie"),i=a("./_property-desc"),O=a("./_to-iobject"),C=a("./_to-primitive"),x=a("./_has"),m=a("./_ie8-dom-define"),h=Object.getOwnPropertyDescriptor;d.f=a("./_descriptors")?h:function(l,u){if(l=O(l),u=C(u,!0),m)try{return h(l,u)}catch(o){}if(x(l,u))return i(!f.f.call(l,u),l[u])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(a,G,d){var f=a("./_to-iobject"),i=a("./_object-gopn").f,O={}.toString,C=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],x=function(m){try{return i(m)}catch(h){return C.slice()}};G.exports.f=function(h){return C&&O.call(h)=="[object Window]"?x(h):i(f(h))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(a,G,d){var f=a("./_object-keys-internal"),i=a("./_enum-bug-keys").concat("length","prototype");d.f=Object.getOwnPropertyNames||function(C){return f(C,i)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(a,G,d){d.f=Object.getOwnPropertySymbols},{}],138:[function(a,G,d){var f=a("./_has"),i=a("./_to-object"),O=a("./_shared-key")("IE_PROTO"),C=Object.prototype;G.exports=Object.getPrototypeOf||function(x){return x=i(x),f(x,O)?x[O]:typeof x.constructor=="function"&&x instanceof x.constructor?x.constructor.prototype:x instanceof Object?C:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(a,G,d){var f=a("./_has"),i=a("./_to-iobject"),O=a("./_array-includes")(!1),C=a("./_shared-key")("IE_PROTO");G.exports=function(x,m){var h=i(x),s=0,l=[],u;for(u in h)u!=C&&(f(h,u)&&l.push(u));for(;m.length>s;)f(h,u=m[s++])&&(~O(l,u)||l.push(u));return l}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(a,G,d){var f=a("./_object-keys-internal"),i=a("./_enum-bug-keys");G.exports=Object.keys||function(C){return f(C,i)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(a,G,d){d.f={}.propertyIsEnumerable},{}],142:[function(a,G,d){var f=a("./_export"),i=a("./_core"),O=a("./_fails");G.exports=function(C,x){var m=(i.Object||{})[C]||Object[C],h={};h[C]=x(m),f(f.S+f.F*O(function(){m(1)}),"Object",h)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(a,G,d){var f=a("./_descriptors"),i=a("./_object-keys"),O=a("./_to-iobject"),C=a("./_object-pie").f;G.exports=function(x){return function(m){for(var h=O(m),s=i(h),l=s.length,u=0,o=[],g;l>u;)g=s[u++],(!f||C.call(h,g))&&o.push(x?[g,h[g]]:h[g]);return o}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(a,G,d){G.exports=function(f){try{return{e:!1,v:f()}}catch(i){return{e:!0,v:i}}}},{}],145:[function(a,G,d){var f=a("./_an-object"),i=a("./_is-object"),O=a("./_new-promise-capability");G.exports=function(C,x){if(f(C),i(x)&&x.constructor===C)return x;var m=O.f(C),h=m.resolve;return h(x),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(a,G,d){G.exports=function(f,i){return{enumerable:!(f&1),configurable:!(f&2),writable:!(f&4),value:i}}},{}],147:[function(a,G,d){var f=a("./_hide");G.exports=function(i,O,C){for(var x in O)C&&i[x]?i[x]=O[x]:f(i,x,O[x]);return i}},{"./_hide":112}],148:[function(a,G,d){G.exports=a("./_hide")},{"./_hide":112}],149:[function(a,G,d){"use strict";var f=a("./_global"),i=a("./_core"),O=a("./_object-dp"),C=a("./_descriptors"),x=a("./_wks")("species");G.exports=function(m){var h=typeof i[m]=="function"?i[m]:f[m];C&&h&&!h[x]&&O.f(h,x,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(a,G,d){var f=a("./_object-dp").f,i=a("./_has"),O=a("./_wks")("toStringTag");G.exports=function(C,x,m){C&&!i(C=m?C:C.prototype,O)&&f(C,O,{configurable:!0,value:x})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(a,G,d){var f=a("./_shared")("keys"),i=a("./_uid");G.exports=function(O){return f[O]||(f[O]=i(O))}},{"./_shared":152,"./_uid":162}],152:[function(a,G,d){var f=a("./_core"),i=a("./_global"),O="__core-js_shared__",C=i[O]||(i[O]={});(G.exports=function(x,m){return C[x]||(C[x]=m!==void 0?m:{})})("versions",[]).push({version:f.version,mode:a("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(a,G,d){var f=a("./_an-object"),i=a("./_a-function"),O=a("./_wks")("species");G.exports=function(C,x){var m=f(C).constructor,h;return m===void 0||(h=f(m)[O])==null?x:i(h)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(a,G,d){var f=a("./_to-integer"),i=a("./_defined");G.exports=function(O){return function(C,x){var m=String(i(C)),h=f(x),s=m.length,l,u;return h<0||h>=s?O?"":void 0:(l=m.charCodeAt(h),l<55296||l>56319||h+1===s||(u=m.charCodeAt(h+1))<56320||u>57343?O?m.charAt(h):l:O?m.slice(h,h+2):(l-55296<<10)+(u-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(a,G,d){var f=a("./_ctx"),i=a("./_invoke"),O=a("./_html"),C=a("./_dom-create"),x=a("./_global"),m=x.process,h=x.setImmediate,s=x.clearImmediate,l=x.MessageChannel,u=x.Dispatch,o=0,g={},p="onreadystatechange",v,_,S,k=function(){var M=+this;if(g.hasOwnProperty(M)){var I=g[M];delete g[M],I()}},T=function(M){k.call(M.data)};(!h||!s)&&(h=function(I){for(var j=[],D=1;arguments.length>D;)j.push(arguments[D++]);return g[++o]=function(){i(typeof I=="function"?I:Function(I),j)},v(o),o},s=function(I){delete g[I]},a("./_cof")(m)=="process"?v=function(M){m.nextTick(f(k,M,1))}:u&&u.now?v=function(M){u.now(f(k,M,1))}:l?(_=new l,S=_.port2,_.port1.onmessage=T,v=f(S.postMessage,S,1)):x.addEventListener&&typeof postMessage=="function"&&!x.importScripts?(v=function(M){x.postMessage(M+"","*")},x.addEventListener("message",T,!1)):p in C("script")?v=function(M){O.appendChild(C("script"))[p]=function(){O.removeChild(this),k.call(M)}}:v=function(M){setTimeout(f(k,M,1),0)}),G.exports={set:h,clear:s}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(a,G,d){var f=a("./_to-integer"),i=Math.max,O=Math.min;G.exports=function(C,x){return C=f(C),C<0?i(C+x,0):O(C,x)}},{"./_to-integer":157}],157:[function(a,G,d){var f=Math.ceil,i=Math.floor;G.exports=function(O){return isNaN(O=+O)?0:(O>0?i:f)(O)}},{}],158:[function(a,G,d){var f=a("./_iobject"),i=a("./_defined");G.exports=function(O){return f(i(O))}},{"./_defined":102,"./_iobject":116}],159:[function(a,G,d){var f=a("./_to-integer"),i=Math.min;G.exports=function(O){return O>0?i(f(O),9007199254740991):0}},{"./_to-integer":157}],160:[function(a,G,d){var f=a("./_defined");G.exports=function(i){return Object(f(i))}},{"./_defined":102}],161:[function(a,G,d){var f=a("./_is-object");G.exports=function(i,O){if(!f(i))return i;var C,x;if(O&&typeof(C=i.toString)=="function"&&!f(x=C.call(i)))return x;if(typeof(C=i.valueOf)=="function"&&!f(x=C.call(i)))return x;if(!O&&typeof(C=i.toString)=="function"&&!f(x=C.call(i)))return x;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(a,G,d){var f=0,i=Math.random();G.exports=function(O){return"Symbol(".concat(O===void 0?"":O,")_",(++f+i).toString(36))}},{}],163:[function(a,G,d){var f=a("./_global"),i=f.navigator;G.exports=i&&i.userAgent||""},{"./_global":110}],164:[function(a,G,d){var f=a("./_global"),i=a("./_core"),O=a("./_library"),C=a("./_wks-ext"),x=a("./_object-dp").f;G.exports=function(m){var h=i.Symbol||(i.Symbol=O?{}:f.Symbol||{});m.charAt(0)!="_"&&!(m in h)&&x(h,m,{value:C.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(a,G,d){d.f=a("./_wks")},{"./_wks":166}],166:[function(a,G,d){var f=a("./_shared")("wks"),i=a("./_uid"),O=a("./_global").Symbol,C=typeof O=="function",x=G.exports=function(m){return f[m]||(f[m]=C&&O[m]||(C?O:i)("Symbol."+m))};x.store=f},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(a,G,d){var f=a("./_classof"),i=a("./_wks")("iterator"),O=a("./_iterators");G.exports=a("./_core").getIteratorMethod=function(C){if(C!=null)return C[i]||C["@@iterator"]||O[f(C)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(a,G,d){"use strict";var f=a("./_ctx"),i=a("./_export"),O=a("./_to-object"),C=a("./_iter-call"),x=a("./_is-array-iter"),m=a("./_to-length"),h=a("./_create-property"),s=a("./core.get-iterator-method");i(i.S+i.F*!a("./_iter-detect")(function(l){Array.from(l)}),"Array",{from:function(u){var o=O(u),g=typeof this=="function"?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,_=v!==void 0,S=0,k=s(o),T,M,I,j;if(_&&(v=f(v,p>2?arguments[2]:void 0,2)),k!=null&&!(g==Array&&x(k)))for(j=k.call(o),M=new g;!(I=j.next()).done;S++)h(M,S,_?C(j,v,[I.value,S],!0):I.value);else for(T=m(o.length),M=new g(T);T>S;S++)h(M,S,_?v(o[S],S):o[S]);return M.length=S,M}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(a,G,d){"use strict";var f=a("./_add-to-unscopables"),i=a("./_iter-step"),O=a("./_iterators"),C=a("./_to-iobject");G.exports=a("./_iter-define")(Array,"Array",function(x,m){this._t=C(x),this._i=0,this._k=m},function(){var x=this._t,m=this._k,h=this._i++;return!x||h>=x.length?(this._t=void 0,i(1)):m=="keys"?i(0,h):m=="values"?i(0,x[h]):i(0,[h,x[h]])},"values"),O.Arguments=O.Array,f("keys"),f("values"),f("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(a,G,d){"use strict";var f=a("./_is-object"),i=a("./_object-gpo"),O=a("./_wks")("hasInstance"),C=Function.prototype;O in C||a("./_object-dp").f(C,O,{value:function(x){if(typeof this!="function"||!f(x))return!1;if(!f(this.prototype))return x instanceof this;for(;x=i(x);)if(this.prototype===x)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(a,G,d){var f=a("./_export");f(f.S+f.F,"Object",{assign:a("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(a,G,d){var f=a("./_export");f(f.S,"Object",{create:a("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(a,G,d){var f=a("./_export");f(f.S+f.F*!a("./_descriptors"),"Object",{defineProperty:a("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(a,G,d){a("./_object-sap")("getOwnPropertyNames",function(){return a("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(a,G,d){var f=a("./_to-object"),i=a("./_object-gpo");a("./_object-sap")("getPrototypeOf",function(){return function(C){return i(f(C))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(a,G,d){var f=a("./_to-object"),i=a("./_object-keys");a("./_object-sap")("keys",function(){return function(C){return i(f(C))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(a,G,d){arguments[4][71][0].apply(d,arguments)},{dup:71}],178:[function(a,G,d){"use strict";var f=a("./_library"),i=a("./_global"),O=a("./_ctx"),C=a("./_classof"),x=a("./_export"),m=a("./_is-object"),h=a("./_a-function"),s=a("./_an-instance"),l=a("./_for-of"),u=a("./_species-constructor"),o=a("./_task").set,g=a("./_microtask")(),p=a("./_new-promise-capability"),v=a("./_perform"),_=a("./_user-agent"),S=a("./_promise-resolve"),k="Promise",T=i.TypeError,M=i.process,I=M&&M.versions,j=I&&I.v8||"",D=i[k],y=C(M)=="process",J=function(){},X,N,F,H,Z=N=p.f,ce=!!function(){try{var w=D.resolve(1),P=(w.constructor={})[a("./_wks")("species")]=function(le){le(J,J)};return(y||typeof PromiseRejectionEvent=="function")&&w.then(J)instanceof P&&j.indexOf("6.6")!==0&&_.indexOf("Chrome/66")===-1}catch(le){}}(),he=function(w){var P;return m(w)&&typeof(P=w.then)=="function"?P:!1},V=function(w,P){if(w._n)return;w._n=!0;var le=w._c;g(function(){for(var pe=w._v,ye=w._s==1,Ee=0,Oe=function(ae){var fe=ye?ae.ok:ae.fail,ge=ae.resolve,q=ae.reject,ie=ae.domain,$,se,K;try{fe?(ye||(w._h==2&&W(w),w._h=1),fe===!0?$=pe:(ie&&ie.enter(),$=fe(pe),ie&&(ie.exit(),K=!0)),$===ae.promise?q(T("Promise-chain cycle")):(se=he($))?se.call($,ge,q):ge($)):q(pe)}catch(Y){ie&&!K&&ie.exit(),q(Y)}};le.length>Ee;)Oe(le[Ee++]);w._c=[],w._n=!1,P&&!w._h&&ve(w)})},ve=function(w){o.call(i,function(){var P=w._v,le=ne(w),pe,ye,Ee;if(le&&(pe=v(function(){y?M.emit("unhandledRejection",P,w):(ye=i.onunhandledrejection)?ye({promise:w,reason:P}):(Ee=i.console)&&Ee.error&&Ee.error("Unhandled promise rejection",P)}),w._h=y||ne(w)?2:1),w._a=void 0,le&&pe.e)throw pe.v})},ne=function(w){return w._h!==1&&(w._a||w._c).length===0},W=function(w){o.call(i,function(){var P;y?M.emit("rejectionHandled",w):(P=i.onrejectionhandled)&&P({promise:w,reason:w._v})})},z=function(w){var P=this;if(P._d)return;P._d=!0,P=P._w||P,P._v=w,P._s=2,P._a||(P._a=P._c.slice()),V(P,!0)},R=function(w){var P=this,le;if(P._d)return;P._d=!0,P=P._w||P;try{if(P===w)throw T("Promise can't be resolved itself");(le=he(w))?g(function(){var pe={_w:P,_d:!1};try{le.call(w,O(R,pe,1),O(z,pe,1))}catch(ye){z.call(pe,ye)}}):(P._v=w,P._s=1,V(P,!1))}catch(pe){z.call({_w:P,_d:!1},pe)}};ce||(D=function(P){s(this,D,k,"_h"),h(P),X.call(this);try{P(O(R,this,1),O(z,this,1))}catch(le){z.call(this,le)}},X=function(P){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},X.prototype=a("./_redefine-all")(D.prototype,{then:function(P,le){var pe=Z(u(this,D));return pe.ok=typeof P=="function"?P:!0,pe.fail=typeof le=="function"&&le,pe.domain=y?M.domain:void 0,this._c.push(pe),this._a&&this._a.push(pe),this._s&&V(this,!1),pe.promise},catch:function(w){return this.then(void 0,w)}}),F=function(){var w=new X;this.promise=w,this.resolve=O(R,w,1),this.reject=O(z,w,1)},p.f=Z=function(w){return w===D||w===H?new F(w):N(w)}),x(x.G+x.W+x.F*!ce,{Promise:D}),a("./_set-to-string-tag")(D,k),a("./_set-species")(k),H=a("./_core")[k],x(x.S+x.F*!ce,k,{reject:function(P){var le=Z(this),pe=le.reject;return pe(P),le.promise}}),x(x.S+x.F*(f||!ce),k,{resolve:function(P){return S(f&&this===H?D:this,P)}}),x(x.S+x.F*!(ce&&a("./_iter-detect")(function(w){D.all(w).catch(J)})),k,{all:function(P){var le=this,pe=Z(le),ye=pe.resolve,Ee=pe.reject,Oe=v(function(){var ae=[],fe=0,ge=1;l(P,!1,function(q){var ie=fe++,$=!1;ae.push(void 0),ge++,le.resolve(q).then(function(se){if($)return;$=!0,ae[ie]=se,--ge||ye(ae)},Ee)}),--ge||ye(ae)});return Oe.e&&Ee(Oe.v),pe.promise},race:function(P){var le=this,pe=Z(le),ye=pe.reject,Ee=v(function(){l(P,!1,function(Oe){le.resolve(Oe).then(pe.resolve,ye)})});return Ee.e&&ye(Ee.v),pe.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(a,G,d){var f=a("./_export"),i=a("./_to-absolute-index"),O=String.fromCharCode,C=String.fromCodePoint;f(f.S+f.F*(!!C&&C.length!=1),"String",{fromCodePoint:function(m){for(var h=[],s=arguments.length,l=0,u;s>l;){if(u=+arguments[l++],i(u,1114111)!==u)throw RangeError(u+" is not a valid code point");h.push(u<65536?O(u):O(((u-=65536)>>10)+55296,u%1024+56320))}return h.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(a,G,d){"use strict";var f=a("./_string-at")(!0);a("./_iter-define")(String,"String",function(i){this._t=String(i),this._i=0},function(){var i=this._t,O=this._i,C;return O>=i.length?{value:void 0,done:!0}:(C=f(i,O),this._i+=C.length,{value:C,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(a,G,d){"use strict";var f=a("./_global"),i=a("./_has"),O=a("./_descriptors"),C=a("./_export"),x=a("./_redefine"),m=a("./_meta").KEY,h=a("./_fails"),s=a("./_shared"),l=a("./_set-to-string-tag"),u=a("./_uid"),o=a("./_wks"),g=a("./_wks-ext"),p=a("./_wks-define"),v=a("./_enum-keys"),_=a("./_is-array"),S=a("./_an-object"),k=a("./_is-object"),T=a("./_to-object"),M=a("./_to-iobject"),I=a("./_to-primitive"),j=a("./_property-desc"),D=a("./_object-create"),y=a("./_object-gopn-ext"),J=a("./_object-gopd"),X=a("./_object-gops"),N=a("./_object-dp"),F=a("./_object-keys"),H=J.f,Z=N.f,ce=y.f,he=f.Symbol,V=f.JSON,ve=V&&V.stringify,ne="prototype",W=o("_hidden"),z=o("toPrimitive"),R={}.propertyIsEnumerable,w=s("symbol-registry"),P=s("symbols"),le=s("op-symbols"),pe=Object[ne],ye=typeof he=="function"&&!!X.f,Ee=f.QObject,Oe=!Ee||!Ee[ne]||!Ee[ne].findChild,ae=O&&h(function(){return D(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a!=7})?function(be,Te,Fe){var Be=H(pe,Te);Be&&delete pe[Te],Z(be,Te,Fe),Be&&be!==pe&&Z(pe,Te,Be)}:Z,fe=function(be){var Te=P[be]=D(he[ne]);return Te._k=be,Te},ge=ye&&typeof he.iterator=="symbol"?function(be){return typeof be=="symbol"}:function(be){return be instanceof he},q=function(Te,Fe,Be){return Te===pe&&q(le,Fe,Be),S(Te),Fe=I(Fe,!0),S(Be),i(P,Fe)?(Be.enumerable?(i(Te,W)&&Te[W][Fe]&&(Te[W][Fe]=!1),Be=D(Be,{enumerable:j(0,!1)})):(i(Te,W)||Z(Te,W,j(1,{})),Te[W][Fe]=!0),ae(Te,Fe,Be)):Z(Te,Fe,Be)},ie=function(Te,Fe){S(Te);for(var Be=v(Fe=M(Fe)),Ue=0,ze=Be.length,Ve;ze>Ue;)q(Te,Ve=Be[Ue++],Fe[Ve]);return Te},$=function(Te,Fe){return Fe===void 0?D(Te):ie(D(Te),Fe)},se=function(Te){var Fe=R.call(this,Te=I(Te,!0));return this===pe&&i(P,Te)&&!i(le,Te)?!1:Fe||!i(this,Te)||!i(P,Te)||i(this,W)&&this[W][Te]?Fe:!0},K=function(Te,Fe){if(Te=M(Te),Fe=I(Fe,!0),Te===pe&&i(P,Fe)&&!i(le,Fe))return;var Be=H(Te,Fe);return Be&&i(P,Fe)&&!(i(Te,W)&&Te[W][Fe])&&(Be.enumerable=!0),Be},Y=function(Te){for(var Fe=ce(M(Te)),Be=[],Ue=0,ze;Fe.length>Ue;)!i(P,ze=Fe[Ue++])&&ze!=W&&ze!=m&&Be.push(ze);return Be},Ce=function(Te){for(var Fe=Te===pe,Be=ce(Fe?le:M(Te)),Ue=[],ze=0,Ve;Be.length>ze;)i(P,Ve=Be[ze++])&&(Fe?i(pe,Ve):!0)&&Ue.push(P[Ve]);return Ue};ye||(he=function(){if(this instanceof he)throw TypeError("Symbol is not a constructor!");var Te=u(arguments.length>0?arguments[0]:void 0),Fe=function(Be){this===pe&&Fe.call(le,Be),i(this,W)&&i(this[W],Te)&&(this[W][Te]=!1),ae(this,Te,j(1,Be))};return O&&Oe&&ae(pe,Te,{configurable:!0,set:Fe}),fe(Te)},x(he[ne],"toString",function(){return this._k}),J.f=K,N.f=q,a("./_object-gopn").f=y.f=Y,a("./_object-pie").f=se,X.f=Ce,O&&!a("./_library")&&x(pe,"propertyIsEnumerable",se,!0),g.f=function(be){return fe(o(be))}),C(C.G+C.W+C.F*!ye,{Symbol:he});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),B=0;Q.length>B;)o(Q[B++]);for(var E=F(o.store),U=0;E.length>U;)p(E[U++]);C(C.S+C.F*!ye,"Symbol",{for:function(be){return i(w,be+="")?w[be]:w[be]=he(be)},keyFor:function(Te){if(!ge(Te))throw TypeError(Te+" is not a symbol!");for(var Fe in w)if(w[Fe]===Te)return Fe},useSetter:function(){Oe=!0},useSimple:function(){Oe=!1}}),C(C.S+C.F*!ye,"Object",{create:$,defineProperty:q,defineProperties:ie,getOwnPropertyDescriptor:K,getOwnPropertyNames:Y,getOwnPropertySymbols:Ce});var xe=h(function(){X.f(1)});C(C.S+C.F*xe,"Object",{getOwnPropertySymbols:function(Te){return X.f(T(Te))}}),V&&C(C.S+C.F*(!ye||h(function(){var be=he();return ve([be])!="[null]"||ve({a:be})!="{}"||ve(Object(be))!="{}"})),"JSON",{stringify:function(Te){for(var Fe=[Te],Be=1,Ue,ze;arguments.length>Be;)Fe.push(arguments[Be++]);return ze=Ue=Fe[1],!k(Ue)&&Te===void 0||ge(Te)?void 0:(_(Ue)||(Ue=function(Ve,Xe){if(typeof ze=="function"&&(Xe=ze.call(this,Ve,Xe)),!ge(Xe))return Xe}),Fe[1]=Ue,ve.apply(V,Fe))}}),he[ne][z]||a("./_hide")(he[ne],z,he[ne].valueOf),l(he,"Symbol"),l(Math,"Math",!0),l(f.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(a,G,d){var f=a("./_export"),i=a("./_object-to-array")(!0);f(f.S,"Object",{entries:function(C){return i(C)}})},{"./_export":107,"./_object-to-array":143}],183:[function(a,G,d){"use strict";var f=a("./_export"),i=a("./_core"),O=a("./_global"),C=a("./_species-constructor"),x=a("./_promise-resolve");f(f.P+f.R,"Promise",{finally:function(m){var h=C(this,i.Promise||O.Promise),s=typeof m=="function";return this.then(s?function(l){return x(h,m()).then(function(){return l})}:m,s?function(l){return x(h,m()).then(function(){throw l})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(a,G,d){"use strict";var f=a("./_export"),i=a("./_new-promise-capability"),O=a("./_perform");f(f.S,"Promise",{try:function(C){var x=i.f(this),m=O(C);return(m.e?x.reject:x.resolve)(m.v),x.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(a,G,d){a("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(a,G,d){a("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(a,G,d){a("./es6.array.iterator");for(var f=a("./_global"),i=a("./_hide"),O=a("./_iterators"),C=a("./_wks")("toStringTag"),x="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),m=0;m<x.length;m++){var h=x[m],s=f[h],l=s&&s.prototype;l&&!l[C]&&i(l,C,h),O[h]=O.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(a,G,d){var f=a("./_export"),i=a("./_task");f(f.G+f.B,{setImmediate:i.set,clearImmediate:i.clear})},{"./_export":107,"./_task":155}],189:[function(a,G,d){(function(f){"use strict";var i=a("babel-runtime/helpers/typeof"),O=C(i);function C(I){return I&&I.__esModule?I:{default:I}}function x(I){return Array.isArray?Array.isArray(I):M(I)==="[object Array]"}d.isArray=x;function m(I){return typeof I=="boolean"}d.isBoolean=m;function h(I){return I===null}d.isNull=h;function s(I){return I==null}d.isNullOrUndefined=s;function l(I){return typeof I=="number"}d.isNumber=l;function u(I){return typeof I=="string"}d.isString=u;function o(I){return(typeof I=="undefined"?"undefined":(0,O.default)(I))==="symbol"}d.isSymbol=o;function g(I){return I===void 0}d.isUndefined=g;function p(I){return M(I)==="[object RegExp]"}d.isRegExp=p;function v(I){return(typeof I=="undefined"?"undefined":(0,O.default)(I))==="object"&&I!==null}d.isObject=v;function _(I){return M(I)==="[object Date]"}d.isDate=_;function S(I){return M(I)==="[object Error]"||I instanceof Error}d.isError=S;function k(I){return typeof I=="function"}d.isFunction=k;function T(I){return I===null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||(typeof I=="undefined"?"undefined":(0,O.default)(I))==="symbol"||typeof I=="undefined"}d.isPrimitive=T,d.isBuffer=f.isBuffer;function M(I){return Object.prototype.toString.call(I)}}).call(this,{isBuffer:a("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(a,G,d){"use strict";var f=a("babel-runtime/helpers/typeof"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(C){"use strict";var x=function(){var u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,o=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,g=/[^-+\dA-Z]/g;return function(p,v,_,S){if(arguments.length===1&&l(p)==="string"&&!/\d/.test(p)&&(v=p,p=void 0),p=p||new Date,p instanceof Date||(p=new Date(p)),isNaN(p))throw TypeError("Invalid date");v=String(x.masks[v]||v||x.masks.default);var k=v.slice(0,4);(k==="UTC:"||k==="GMT:")&&(v=v.slice(4),_=!0,k==="GMT:"&&(S=!0));var T=_?"getUTC":"get",M=p[T+"Date"](),I=p[T+"Day"](),j=p[T+"Month"](),D=p[T+"FullYear"](),y=p[T+"Hours"](),J=p[T+"Minutes"](),X=p[T+"Seconds"](),N=p[T+"Milliseconds"](),F=_?0:p.getTimezoneOffset(),H=h(p),Z=s(p),ce={d:M,dd:m(M),ddd:x.i18n.dayNames[I],dddd:x.i18n.dayNames[I+7],m:j+1,mm:m(j+1),mmm:x.i18n.monthNames[j],mmmm:x.i18n.monthNames[j+12],yy:String(D).slice(2),yyyy:D,h:y%12||12,hh:m(y%12||12),H:y,HH:m(y),M:J,MM:m(J),s:X,ss:m(X),l:m(N,3),L:m(Math.round(N/10)),t:y<12?"a":"p",tt:y<12?"am":"pm",T:y<12?"A":"P",TT:y<12?"AM":"PM",Z:S?"GMT":_?"UTC":(String(p).match(o)||[""]).pop().replace(g,""),o:(F>0?"-":"+")+m(Math.floor(Math.abs(F)/60)*100+Math.abs(F)%60,4),S:["th","st","nd","rd"][M%10>3?0:(M%100-M%10!=10)*M%10],W:H,N:Z};return v.replace(u,function(he){return he in ce?ce[he]:he.slice(1,he.length-1)})}}();x.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},x.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function m(u,o){for(u=String(u),o=o||2;u.length<o;)u="0"+u;return u}function h(u){var o=new Date(u.getFullYear(),u.getMonth(),u.getDate());o.setDate(o.getDate()-(o.getDay()+6)%7+3);var g=new Date(o.getFullYear(),0,4);g.setDate(g.getDate()-(g.getDay()+6)%7+3);var p=o.getTimezoneOffset()-g.getTimezoneOffset();o.setHours(o.getHours()-p);var v=(o-g)/(864e5*7);return 1+Math.floor(v)}function s(u){var o=u.getDay();return o===0&&(o=7),o}function l(u){return u===null?"null":u===void 0?"undefined":(typeof u=="undefined"?"undefined":(0,i.default)(u))!=="object"?typeof u=="undefined"?"undefined":(0,i.default)(u):Array.isArray(u)?"array":{}.toString.call(u).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return x}):(typeof d=="undefined"?"undefined":(0,i.default)(d))==="object"?G.exports=x:C.dateFormat=x})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(a,G,d){/*!
|
|
|
* escape-html
|
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var f=/["'&<>]/;G.exports=i;function i(O){var C=""+O,x=f.exec(C);if(!x)return C;var m,h="",s=0,l=0;for(s=x.index;s<C.length;s++){switch(C.charCodeAt(s)){case 34:m=""";break;case 38:m="&";break;case 39:m="'";break;case 60:m="<";break;case 62:m=">";break;default:continue}l!==s&&(h+=C.substring(l,s)),l=s+1,h+=m}return l!==s?h+C.substring(l,s):h}},{}],192:[function(a,G,d){function f(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}G.exports=f,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._maxListeners=void 0,f.defaultMaxListeners=10,f.prototype.setMaxListeners=function(m){if(!O(m)||m<0||isNaN(m))throw TypeError("n must be a positive number");return this._maxListeners=m,this},f.prototype.emit=function(m){var h,s,l,u,o,g;if(this._events||(this._events={}),m==="error"&&(!this._events.error||C(this._events.error)&&!this._events.error.length)){if(h=arguments[1],h instanceof Error)throw h;var p=new Error('Uncaught, unspecified "error" event. ('+h+")");throw p.context=h,p}if(s=this._events[m],x(s))return!1;if(i(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:u=Array.prototype.slice.call(arguments,1),s.apply(this,u)}else if(C(s))for(u=Array.prototype.slice.call(arguments,1),g=s.slice(),l=g.length,o=0;o<l;o++)g[o].apply(this,u);return!0},f.prototype.addListener=function(m,h){var s;if(!i(h))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",m,i(h.listener)?h.listener:h),this._events[m]?C(this._events[m])?this._events[m].push(h):this._events[m]=[this._events[m],h]:this._events[m]=h,C(this._events[m])&&!this._events[m].warned&&(x(this._maxListeners)?s=f.defaultMaxListeners:s=this._maxListeners,s&&s>0&&this._events[m].length>s&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},f.prototype.on=f.prototype.addListener,f.prototype.once=function(m,h){if(!i(h))throw TypeError("listener must be a function");var s=!1;function l(){this.removeListener(m,l),s||(s=!0,h.apply(this,arguments))}return l.listener=h,this.on(m,l),this},f.prototype.removeListener=function(m,h){var s,l,u,o;if(!i(h))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(s=this._events[m],u=s.length,l=-1,s===h||i(s.listener)&&s.listener===h)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,h);else if(C(s)){for(o=u;o-- >0;)if(s[o]===h||s[o].listener&&s[o].listener===h){l=o;break}if(l<0)return this;s.length===1?(s.length=0,delete this._events[m]):s.splice(l,1),this._events.removeListener&&this.emit("removeListener",m,h)}return this},f.prototype.removeAllListeners=function(m){var h,s;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],this;if(arguments.length===0){for(h in this._events){if(h==="removeListener")continue;this.removeAllListeners(h)}return this.removeAllListeners("removeListener"),this._events={},this}if(s=this._events[m],i(s))this.removeListener(m,s);else if(s)for(;s.length;)this.removeListener(m,s[s.length-1]);return delete this._events[m],this},f.prototype.listeners=function(m){var h;return!this._events||!this._events[m]?h=[]:i(this._events[m])?h=[this._events[m]]:h=this._events[m].slice(),h},f.prototype.listenerCount=function(m){if(this._events){var h=this._events[m];if(i(h))return 1;if(h)return h.length}return 0},f.listenerCount=function(m,h){return m.listenerCount(h)};function i(m){return typeof m=="function"}function O(m){return typeof m=="number"}function C(m){return typeof m=="object"&&m!==null}function x(m){return m===void 0}},{}],193:[function(a,G,d){var f=a("http"),i=G.exports;for(var O in f)f.hasOwnProperty(O)&&(i[O]=f[O]);i.request=function(C,x){return C||(C={}),C.scheme="https",C.protocol="https:",f.request.call(this,C,x)}},{http:231}],194:[function(a,G,d){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var f=a("util"),i=a("ms");G.exports=function(O){if(typeof O=="number")return O;var C=i(O);if(C===void 0){var x=new Error(f.format("humanize-ms(%j) result undefined",O));console.warn(x.stack)}return C}},{ms:204,util:243}],195:[function(a,G,d){d.read=function(f,i,O,C,x){var m,h,s=x*8-C-1,l=(1<<s)-1,u=l>>1,o=-7,g=O?x-1:0,p=O?-1:1,v=f[i+g];for(g+=p,m=v&(1<<-o)-1,v>>=-o,o+=s;o>0;m=m*256+f[i+g],g+=p,o-=8);for(h=m&(1<<-o)-1,m>>=-o,o+=C;o>0;h=h*256+f[i+g],g+=p,o-=8);if(m===0)m=1-u;else{if(m===l)return h?NaN:(v?-1:1)*Infinity;h=h+Math.pow(2,C),m=m-u}return(v?-1:1)*h*Math.pow(2,m-C)},d.write=function(f,i,O,C,x,m){var h,s,l,u=m*8-x-1,o=(1<<u)-1,g=o>>1,p=x===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=C?0:m-1,_=C?1:-1,S=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===Infinity?(s=isNaN(i)?1:0,h=o):(h=Math.floor(Math.log(i)/Math.LN2),i*(l=Math.pow(2,-h))<1&&(h--,l*=2),h+g>=1?i+=p/l:i+=p*Math.pow(2,1-g),i*l>=2&&(h++,l/=2),h+g>=o?(s=0,h=o):h+g>=1?(s=(i*l-1)*Math.pow(2,x),h=h+g):(s=i*Math.pow(2,g-1)*Math.pow(2,x),h=0));x>=8;f[O+v]=s&255,v+=_,s/=256,x-=8);for(h=h<<x|s,u+=x;u>0;f[O+v]=h&255,v+=_,h/=256,u-=8);f[O+v-_]|=S*128}},{}],196:[function(a,G,d){typeof Object.create=="function"?G.exports=function(i,O){O&&(i.super_=O,i.prototype=Object.create(O.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:G.exports=function(i,O){if(O){i.super_=O;var C=function(){};C.prototype=O.prototype,i.prototype=new C,i.prototype.constructor=i}}},{}],197:[function(a,G,d){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/G.exports=function(O){return O!=null&&(f(O)||i(O)||!!O._isBuffer)};function f(O){return!!O.constructor&&typeof O.constructor.isBuffer=="function"&&O.constructor.isBuffer(O)}function i(O){return typeof O.readFloatLE=="function"&&typeof O.slice=="function"&&f(O.slice(0,0))}},{}],198:[function(a,G,d){var f={}.toString;G.exports=Array.isArray||function(i){return f.call(i)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(a,G){typeof exports=="object"&&typeof module!="undefined"?module.exports=G(a):typeof define=="function"&&define.amd?define(G):G(a)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(a){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(a){for(var G={},d=0,f=a.length;d<f;d++)G[a.charAt(d)]=d;return G}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(a){if(a.length<2){var G=a.charCodeAt(0);return G<128?a:G<2048?fromCharCode(192|G>>>6)+fromCharCode(128|G&63):fromCharCode(224|G>>>12&15)+fromCharCode(128|G>>>6&63)+fromCharCode(128|G&63)}else{var G=65536+(a.charCodeAt(0)-55296)*1024+(a.charCodeAt(1)-56320);return fromCharCode(240|G>>>18&7)+fromCharCode(128|G>>>12&63)+fromCharCode(128|G>>>6&63)+fromCharCode(128|G&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(a){return a.replace(re_utob,cb_utob)},cb_encode=function(a){var G=[0,2,1][a.length%3],d=a.charCodeAt(0)<<16|(a.length>1?a.charCodeAt(1):0)<<8|(a.length>2?a.charCodeAt(2):0),f=[b64chars.charAt(d>>>18),b64chars.charAt(d>>>12&63),G>=2?"=":b64chars.charAt(d>>>6&63),G>=1?"=":b64chars.charAt(d&63)];return f.join("")},btoa=global.btoa?function(a){return global.btoa(a)}:function(a){return a.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(a){var G=Object.prototype.toString.call(a)==="[object Uint8Array]";return G?a.toString("base64"):btoa(utob(String(a)))},encode=function(a,G){return G?_encode(String(a)).replace(/[+\/]/g,function(d){return d=="+"?"-":"_"}).replace(/=/g,""):_encode(a)},encodeURI=function(a){return encode(a,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(a){switch(a.length){case 4:var G=(7&a.charCodeAt(0))<<18|(63&a.charCodeAt(1))<<12|(63&a.charCodeAt(2))<<6|63&a.charCodeAt(3),d=G-65536;return fromCharCode((d>>>10)+55296)+fromCharCode((d&1023)+56320);case 3:return fromCharCode((15&a.charCodeAt(0))<<12|(63&a.charCodeAt(1))<<6|63&a.charCodeAt(2));default:return fromCharCode((31&a.charCodeAt(0))<<6|63&a.charCodeAt(1))}},btou=function(a){return a.replace(re_btou,cb_btou)},cb_decode=function(a){var G=a.length,d=G%4,f=(G>0?b64tab[a.charAt(0)]<<18:0)|(G>1?b64tab[a.charAt(1)]<<12:0)|(G>2?b64tab[a.charAt(2)]<<6:0)|(G>3?b64tab[a.charAt(3)]:0),i=[fromCharCode(f>>>16),fromCharCode(f>>>8&255),fromCharCode(f&255)];return i.length-=[0,0,2,1][d],i.join("")},_atob=global.atob?function(a){return global.atob(a)}:function(a){return a.replace(/\S{1,4}/g,cb_decode)},atob=function(a){return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(a){return(a.constructor===buffer.constructor?a:buffer.from(a,"base64")).toString()}:function(a){return(a.constructor===buffer.constructor?a:new buffer(a,"base64")).toString()}:function(a){return btou(_atob(a))},decode=function(a){return _decode(String(a).replace(/[-_]/g,function(G){return G=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var a=global.Base64;return global.Base64=_Base64,a};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(a){return{value:a,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(a){return encode(this,a)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(a,G,d){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";G.exports=i;var f=Object.prototype.hasOwnProperty;function i(O,C,x){if(!O)throw new TypeError("argument dest is required");if(!C)throw new TypeError("argument src is required");return x===void 0&&(x=!0),Object.getOwnPropertyNames(C).forEach(function(h){if(!x&&f.call(O,h))return;var s=Object.getOwnPropertyDescriptor(C,h);Object.defineProperty(O,h,s)}),O}},{}],201:[function(a,G,d){"use strict";function f(){this._types=Object.create(null),this._extensions=Object.create(null);for(var i=0;i<arguments.length;i++)this.define(arguments[i]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}f.prototype.define=function(i,O){for(var C in i){var x=i[C].map(function(s){return s.toLowerCase()});C=C.toLowerCase();for(var m=0;m<x.length;m++){var h=x[m];if(h[0]=="*")continue;if(!O&&h in this._types)throw new Error('Attempt to change mapping for "'+h+'" extension from "'+this._types[h]+'" to "'+C+'". Pass `force=true` to allow this, otherwise remove "'+h+'" from the list of extensions for "'+C+'".');this._types[h]=C}if(O||!this._extensions[C]){var h=x[0];this._extensions[C]=h[0]!="*"?h:h.substr(1)}}},f.prototype.getType=function(i){i=String(i);var O=i.replace(/^.*[/\\]/,"").toLowerCase(),C=O.replace(/^.*\./,"").toLowerCase(),x=O.length<i.length,m=C.length<O.length-1;return(m||!x)&&this._types[C]||null},f.prototype.getExtension=function(i){return i=/^\s*([^;\s]*)/.test(i)&&RegExp.$1,i&&this._extensions[i.toLowerCase()]||null},G.exports=f},{}],202:[function(a,G,d){"use strict";var f=a("./Mime");G.exports=new f(a("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(a,G,d){G.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(a,G,d){var f=1e3,i=f*60,O=i*60,C=O*24,x=C*7,m=C*365.25;G.exports=function(o,g){g=g||{};var p=typeof o;if(p==="string"&&o.length>0)return h(o);if(p==="number"&&isFinite(o))return g.long?l(o):s(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function h(o){if(o=String(o),o.length>100)return;var g=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!g)return;var p=parseFloat(g[1]),v=(g[2]||"ms").toLowerCase();switch(v){case"years":case"year":case"yrs":case"yr":case"y":return p*m;case"weeks":case"week":case"w":return p*x;case"days":case"day":case"d":return p*C;case"hours":case"hour":case"hrs":case"hr":case"h":return p*O;case"minutes":case"minute":case"mins":case"min":case"m":return p*i;case"seconds":case"second":case"secs":case"sec":case"s":return p*f;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}function s(o){var g=Math.abs(o);return g>=C?Math.round(o/C)+"d":g>=O?Math.round(o/O)+"h":g>=i?Math.round(o/i)+"m":g>=f?Math.round(o/f)+"s":o+"ms"}function l(o){var g=Math.abs(o);return g>=C?u(o,g,C,"day"):g>=O?u(o,g,O,"hour"):g>=i?u(o,g,i,"minute"):g>=f?u(o,g,f,"second"):o+" ms"}function u(o,g,p,v){var _=g>=p*1.5;return Math.round(o/p)+" "+v+(_?"s":"")}},{}],205:[function(a,G,d){(function(f){function i(m,h){for(var s=0,l=m.length-1;l>=0;l--){var u=m[l];u==="."?m.splice(l,1):u===".."?(m.splice(l,1),s++):s&&(m.splice(l,1),s--)}if(h)for(;s--;s)m.unshift("..");return m}d.resolve=function(){for(var m="",h=!1,s=arguments.length-1;s>=-1&&!h;s--){var l=s>=0?arguments[s]:f.cwd();if(typeof l!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!l)continue;m=l+"/"+m,h=l.charAt(0)==="/"}return m=i(C(m.split("/"),function(u){return!!u}),!h).join("/"),(h?"/":"")+m||"."},d.normalize=function(m){var h=d.isAbsolute(m),s=x(m,-1)==="/";return m=i(C(m.split("/"),function(l){return!!l}),!h).join("/"),!m&&!h&&(m="."),m&&s&&(m+="/"),(h?"/":"")+m},d.isAbsolute=function(m){return m.charAt(0)==="/"},d.join=function(){var m=Array.prototype.slice.call(arguments,0);return d.normalize(C(m,function(h,s){if(typeof h!="string")throw new TypeError("Arguments to path.join must be strings");return h}).join("/"))},d.relative=function(m,h){m=d.resolve(m).substr(1),h=d.resolve(h).substr(1);function s(_){for(var S=0;S<_.length&&!(_[S]!=="");S++);for(var k=_.length-1;k>=0&&!(_[k]!=="");k--);return S>k?[]:_.slice(S,k-S+1)}for(var l=s(m.split("/")),u=s(h.split("/")),o=Math.min(l.length,u.length),g=o,p=0;p<o;p++)if(l[p]!==u[p]){g=p;break}for(var v=[],p=g;p<l.length;p++)v.push("..");return v=v.concat(u.slice(g)),v.join("/")},d.sep="/",d.delimiter=":",d.dirname=function(m){if(typeof m!="string"&&(m=m+""),m.length===0)return".";for(var h=m.charCodeAt(0),s=h===47,l=-1,u=!0,o=m.length-1;o>=1;--o)if(h=m.charCodeAt(o),h===47){if(!u){l=o;break}}else u=!1;return l===-1?s?"/":".":s&&l===1?"/":m.slice(0,l)};function O(m){typeof m!="string"&&(m=m+"");var h=0,s=-1,l=!0,u;for(u=m.length-1;u>=0;--u)if(m.charCodeAt(u)===47){if(!l){h=u+1;break}}else s===-1&&(l=!1,s=u+1);return s===-1?"":m.slice(h,s)}d.basename=function(m,h){var s=O(m);return h&&s.substr(-1*h.length)===h&&(s=s.substr(0,s.length-h.length)),s},d.extname=function(m){typeof m!="string"&&(m=m+"");for(var h=-1,s=0,l=-1,u=!0,o=0,g=m.length-1;g>=0;--g){var p=m.charCodeAt(g);if(p===47){if(!u){s=g+1;break}continue}l===-1&&(u=!1,l=g+1),p===46?h===-1?h=g:o!==1&&(o=1):h!==-1&&(o=-1)}return h===-1||l===-1||o===0||o===1&&h===l-1&&h===s+1?"":m.slice(h,l)};function C(m,h){if(m.filter)return m.filter(h);for(var s=[],l=0;l<m.length;l++)h(m[l],l,m)&&s.push(m[l]);return s}var x="ab".substr(-1)==="b"?function(m,h,s){return m.substr(h,s)}:function(m,h,s){return h<0&&(h=m.length+h),m.substr(h,s)}}).call(this,a("_process"))},{_process:208}],206:[function(a,G,d){(function(f){/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var i={function:!0,object:!0},O=i[typeof window]&&window||this,C=O,x=i[typeof d]&&d,m=i[typeof G]&&G&&!G.nodeType&&G,h=x&&m&&typeof f=="object"&&f;h&&(h.global===h||h.window===h||h.self===h)&&(O=h);var s=Math.pow(2,53)-1,l=/\bOpera/,u=this,o=Object.prototype,g=o.hasOwnProperty,p=o.toString;function v(N){return N=String(N),N.charAt(0).toUpperCase()+N.slice(1)}function _(N,F,H){var Z={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return F&&H&&/^Win/i.test(N)&&!/^Windows Phone /i.test(N)&&(Z=Z[/[\d.]+$/.exec(N)])&&(N="Windows "+Z),N=String(N),F&&H&&(N=N.replace(RegExp(F,"i"),H)),N=k(N.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),N}function S(N,F){var H=-1,Z=N?N.length:0;if(typeof Z=="number"&&Z>-1&&Z<=s)for(;++H<Z;)F(N[H],H,N);else T(N,F)}function k(N){return N=y(N),/^(?:webOS|i(?:OS|P))/.test(N)?N:v(N)}function T(N,F){for(var H in N)g.call(N,H)&&F(N[H],H,N)}function M(N){return N==null?v(N):p.call(N).slice(8,-1)}function I(N,F){var H=N!=null?typeof N[F]:"number";return!/^(?:boolean|number|string|undefined)$/.test(H)&&(H=="object"?!!N[F]:!0)}function j(N){return String(N).replace(/([ -])(?!$)/g,"$1?")}function D(N,F){var H=null;return S(N,function(Z,ce){H=F(H,Z,ce,N)}),H}function y(N){return String(N).replace(/^ +| +$/g,"")}function J(N){var F=O,H=N&&typeof N=="object"&&M(N)!="String";H&&(F=N,N=null);var Z=F.navigator||{},ce=Z.userAgent||"";N||(N=ce);var he=H||u==C,V=H?!!Z.likeChrome:/\bChrome\b/.test(N)&&!/internal|\n/i.test(p.toString()),ve="Object",ne=H?ve:"ScriptBridgingProxyObject",W=H?ve:"Environment",z=H&&F.java?"JavaPackage":M(F.java),R=H?ve:"RuntimeObject",w=/\bJava/.test(z)&&F.java,P=w&&M(F.environment)==W,le=w?"a":"\u03B1",pe=w?"b":"\u03B2",ye=F.document||{},Ee=F.operamini||F.opera,Oe=l.test(Oe=H&&Ee?Ee["[[Class]]"]:M(Ee))?Oe:Ee=null,ae,fe=N,ge=[],q=null,ie=N==ce,$=ie&&Ee&&typeof Ee.version=="function"&&Ee.version(),se,K=E([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Y=xe(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Ce=Te([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),Q=U({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),B=be(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function E(ze){return D(ze,function(Ve,Xe){return Ve||RegExp("\\b"+(Xe.pattern||j(Xe))+"\\b","i").exec(N)&&(Xe.label||Xe)})}function U(ze){return D(ze,function(Ve,Xe,Je){return Ve||(Xe[Ce]||Xe[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ce)]||RegExp("\\b"+j(Je)+"(?:\\b|\\w*\\d)","i").exec(N))&&Je})}function xe(ze){return D(ze,function(Ve,Xe){return Ve||RegExp("\\b"+(Xe.pattern||j(Xe))+"\\b","i").exec(N)&&(Xe.label||Xe)})}function be(ze){return D(ze,function(Ve,Xe){var Je=Xe.pattern||j(Xe);return!Ve&&(Ve=RegExp("\\b"+Je+"(?:/[\\d.]+|[ \\w.]*)","i").exec(N))&&(Ve=_(Ve,Je,Xe.label||Xe)),Ve})}function Te(ze){return D(ze,function(Ve,Xe){var Je=Xe.pattern||j(Xe);return!Ve&&(Ve=RegExp("\\b"+Je+" *\\d+[.\\w_]*","i").exec(N)||RegExp("\\b"+Je+" *\\w+-[\\w]*","i").exec(N)||RegExp("\\b"+Je+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(N))&&((Ve=String(Xe.label&&!RegExp(Je,"i").test(Xe.label)?Xe.label:Ve).split("/"))[1]&&!/[\d.]+/.test(Ve[0])&&(Ve[0]+=" "+Ve[1]),Xe=Xe.label||Xe,Ve=k(Ve[0].replace(RegExp(Je,"i"),Xe).replace(RegExp("; *(?:"+Xe+"[_-])?","i")," ").replace(RegExp("("+Xe+")[-_.]?(\\w)","i"),"$1 $2"))),Ve})}function Fe(ze){return D(ze,function(Ve,Xe){return Ve||(RegExp(Xe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(N)||0)[1]||null})}function Be(){return this.description||""}if(K&&(K=[K]),Q&&!Ce&&(Ce=Te([Q])),(ae=/\bGoogle TV\b/.exec(Ce))&&(Ce=ae[0]),/\bSimulator\b/i.test(N)&&(Ce=(Ce?Ce+" ":"")+"Simulator"),Y=="Opera Mini"&&/\bOPiOS\b/.test(N)&&ge.push("running in Turbo/Uncompressed mode"),Y=="IE"&&/\blike iPhone OS\b/.test(N)?(ae=J(N.replace(/like iPhone OS/,"")),Q=ae.manufacturer,Ce=ae.product):/^iP/.test(Ce)?(Y||(Y="Safari"),B="iOS"+((ae=/ OS ([\d_]+)/i.exec(N))?" "+ae[1].replace(/_/g,"."):"")):Y=="Konqueror"&&!/buntu/i.test(B)?B="Kubuntu":Q&&Q!="Google"&&(/Chrome/.test(Y)&&!/\bMobile Safari\b/i.test(N)||/\bVita\b/.test(Ce))||/\bAndroid\b/.test(B)&&/^Chrome/.test(Y)&&/\bVersion\//i.test(N)?(Y="Android Browser",B=/\bAndroid\b/.test(B)?B:"Android"):Y=="Silk"?(/\bMobi/i.test(N)||(B="Android",ge.unshift("desktop mode")),/Accelerated *= *true/i.test(N)&&ge.unshift("accelerated")):Y=="PaleMoon"&&(ae=/\bFirefox\/([\d.]+)\b/.exec(N))?ge.push("identifying as Firefox "+ae[1]):Y=="Firefox"&&(ae=/\b(Mobile|Tablet|TV)\b/i.exec(N))?(B||(B="Firefox OS"),Ce||(Ce=ae[1])):!Y||(ae=!/\bMinefield\b/i.test(N)&&/\b(?:Firefox|Safari)\b/.exec(Y))?(Y&&!Ce&&/[\/,]|^[^(]+?\)/.test(N.slice(N.indexOf(ae+"/")+8))&&(Y=null),(ae=Ce||Q||B)&&(Ce||Q||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(B))&&(Y=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(B)?B:ae)+" Browser")):Y=="Electron"&&(ae=(/\bChrome\/([\d.]+)\b/.exec(N)||0)[1])&&ge.push("Chromium "+ae),$||($=Fe(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",j(Y),"(?:Firefox|Minefield|NetFront)"])),(ae=K=="iCab"&&parseFloat($)>3&&"WebKit"||/\bOpera\b/.test(Y)&&(/\bOPR\b/.test(N)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(N)&&!/^(?:Trident|EdgeHTML)$/.test(K)&&"WebKit"||!K&&/\bMSIE\b/i.test(N)&&(B=="Mac OS"?"Tasman":"Trident")||K=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Y)&&"NetFront")&&(K=[ae]),Y=="IE"&&(ae=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(N)||0)[1])?(Y+=" Mobile",B="Windows Phone "+(/\+$/.test(ae)?ae:ae+".x"),ge.unshift("desktop mode")):/\bWPDesktop\b/i.test(N)?(Y="IE Mobile",B="Windows Phone 8.x",ge.unshift("desktop mode"),$||($=(/\brv:([\d.]+)/.exec(N)||0)[1])):Y!="IE"&&K=="Trident"&&(ae=/\brv:([\d.]+)/.exec(N))&&(Y&&ge.push("identifying as "+Y+($?" "+$:"")),Y="IE",$=ae[1]),ie){if(I(F,"global"))if(w&&(ae=w.lang.System,fe=ae.getProperty("os.arch"),B=B||ae.getProperty("os.name")+" "+ae.getProperty("os.version")),P){try{$=F.require("ringo/engine").version.join("."),Y="RingoJS"}catch(ze){(ae=F.system)&&ae.global.system==F.system&&(Y="Narwhal",B||(B=ae[0].os||null))}Y||(Y="Rhino")}else typeof F.process=="object"&&!F.process.browser&&(ae=F.process)&&(typeof ae.versions=="object"&&(typeof ae.versions.electron=="string"?(ge.push("Node "+ae.versions.node),Y="Electron",$=ae.versions.electron):typeof ae.versions.nw=="string"&&(ge.push("Chromium "+$,"Node "+ae.versions.node),Y="NW.js",$=ae.versions.nw)),Y||(Y="Node.js",fe=ae.arch,B=ae.platform,$=/[\d.]+/.exec(ae.version),$=$?$[0]:null));else M(ae=F.runtime)==ne?(Y="Adobe AIR",B=ae.flash.system.Capabilities.os):M(ae=F.phantom)==R?(Y="PhantomJS",$=(ae=ae.version||null)&&ae.major+"."+ae.minor+"."+ae.patch):typeof ye.documentMode=="number"&&(ae=/\bTrident\/(\d+)/i.exec(N))?($=[$,ye.documentMode],(ae=+ae[1]+4)!=$[1]&&(ge.push("IE "+$[1]+" mode"),K&&(K[1]=""),$[1]=ae),$=Y=="IE"?String($[1].toFixed(1)):$[0]):typeof ye.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Y)&&(ge.push("masking as "+Y+" "+$),Y="IE",$="11.0",K=["Trident"],B="Windows");B=B&&k(B)}if($&&(ae=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec($)||/(?:alpha|beta)(?: ?\d)?/i.exec(N+";"+(ie&&Z.appMinorVersion))||/\bMinefield\b/i.test(N)&&"a")&&(q=/b/i.test(ae)?"beta":"alpha",$=$.replace(RegExp(ae+"\\+?$"),"")+(q=="beta"?pe:le)+(/\d+\+?/.exec(ae)||"")),Y=="Fennec"||Y=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(B))Y="Firefox Mobile";else if(Y=="Maxthon"&&$)$=$.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ce))Ce=="Xbox 360"&&(B=null),Ce=="Xbox 360"&&/\bIEMobile\b/.test(N)&&ge.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Y)||Y&&!Ce&&!/Browser|Mobi/.test(Y))&&(B=="Windows CE"||/Mobi/i.test(N)))Y+=" Mobile";else if(Y=="IE"&&ie)try{F.external===null&&ge.unshift("platform preview")}catch(ze){ge.unshift("embedded")}else(/\bBlackBerry\b/.test(Ce)||/\bBB10\b/.test(N))&&(ae=(RegExp(Ce.replace(/ +/g," *")+"/([.\\d]+)","i").exec(N)||0)[1]||$)?(ae=[ae,/BB10/.test(N)],B=(ae[1]?(Ce=null,Q="BlackBerry"):"Device Software")+" "+ae[0],$=null):this!=T&&Ce!="Wii"&&(ie&&Ee||/Opera/.test(Y)&&/\b(?:MSIE|Firefox)\b/i.test(N)||Y=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(B)||Y=="IE"&&(B&&!/^Win/.test(B)&&$>5.5||/\bWindows XP\b/.test(B)&&$>8||$==8&&!/\bTrident\b/.test(N)))&&!l.test(ae=J.call(T,N.replace(l,"")+";"))&&ae.name&&(ae="ing as "+ae.name+((ae=ae.version)?" "+ae:""),l.test(Y)?(/\bIE\b/.test(ae)&&B=="Mac OS"&&(B=null),ae="identify"+ae):(ae="mask"+ae,Oe?Y=k(Oe.replace(/([a-z])([A-Z])/g,"$1 $2")):Y="Opera",/\bIE\b/.test(ae)&&(B=null),ie||($=null)),K=["Presto"],ge.push(ae));(ae=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(N)||0)[1])&&(ae=[parseFloat(ae.replace(/\.(\d)$/,".0$1")),ae],Y=="Safari"&&ae[1].slice(-1)=="+"?(Y="WebKit Nightly",q="alpha",$=ae[1].slice(0,-1)):($==ae[1]||$==(ae[2]=(/\bSafari\/([\d.]+\+?)/i.exec(N)||0)[1]))&&($=null),ae[1]=(/\bChrome\/([\d.]+)/i.exec(N)||0)[1],ae[0]==537.36&&ae[2]==537.36&&parseFloat(ae[1])>=28&&K=="WebKit"&&(K=["Blink"]),!ie||!V&&!ae[1]?(K&&(K[1]="like Safari"),ae=(ae=ae[0],ae<400?1:ae<500?2:ae<526?3:ae<533?4:ae<534?"4+":ae<535?5:ae<537?6:ae<538?7:ae<601?8:"8")):(K&&(K[1]="like Chrome"),ae=ae[1]||(ae=ae[0],ae<530?1:ae<532?2:ae<532.05?3:ae<533?4:ae<534.03?5:ae<534.07?6:ae<534.1?7:ae<534.13?8:ae<534.16?9:ae<534.24?10:ae<534.3?11:ae<535.01?12:ae<535.02?"13+":ae<535.07?15:ae<535.11?16:ae<535.19?17:ae<536.05?18:ae<536.1?19:ae<537.01?20:ae<537.11?"21+":ae<537.13?23:ae<537.18?24:ae<537.24?25:ae<537.36?26:K!="Blink"?"27":"28")),K&&(K[1]+=" "+(ae+=typeof ae=="number"?".x":/[.+]/.test(ae)?"":"+")),Y=="Safari"&&(!$||parseInt($)>45)&&($=ae)),Y=="Opera"&&(ae=/\bzbov|zvav$/.exec(B))?(Y+=" ",ge.unshift("desktop mode"),ae=="zvav"?(Y+="Mini",$=null):Y+="Mobile",B=B.replace(RegExp(" *"+ae+"$"),"")):Y=="Safari"&&/\bChrome\b/.exec(K&&K[1])&&(ge.unshift("desktop mode"),Y="Chrome Mobile",$=null,/\bOS X\b/.test(B)?(Q="Apple",B="iOS 4.3+"):B=null),$&&$.indexOf(ae=/[\d.]+$/.exec(B))==0&&N.indexOf("/"+ae+"-")>-1&&(B=y(B.replace(ae,""))),K&&!/\b(?:Avant|Nook)\b/.test(Y)&&(/Browser|Lunascape|Maxthon/.test(Y)||Y!="Safari"&&/^iOS/.test(B)&&/\bSafari\b/.test(K[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Y)&&K[1])&&((ae=K[K.length-1])&&ge.push(ae)),ge.length&&(ge=["("+ge.join("; ")+")"]),Q&&Ce&&Ce.indexOf(Q)<0&&ge.push("on "+Q),Ce&&ge.push((/^on /.test(ge[ge.length-1])?"":"on ")+Ce),B&&(ae=/ ([\d.+]+)$/.exec(B),se=ae&&B.charAt(B.length-ae[0].length-1)=="/",B={architecture:32,family:ae&&!se?B.replace(ae[0],""):B,version:ae?ae[1]:null,toString:function(){var ze=this.version;return this.family+(ze&&!se?" "+ze:"")+(this.architecture==64?" 64-bit":"")}}),(ae=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(fe))&&!/\bi686\b/i.test(fe)?(B&&(B.architecture=64,B.family=B.family.replace(RegExp(" *"+ae),"")),Y&&(/\bWOW64\b/i.test(N)||ie&&/\w(?:86|32)$/.test(Z.cpuClass||Z.platform)&&!/\bWin64; x64\b/i.test(N))&&ge.unshift("32-bit")):B&&/^OS X/.test(B.family)&&Y=="Chrome"&&parseFloat($)>=39&&(B.architecture=64),N||(N=null);var Ue={};return Ue.description=N,Ue.layout=K&&K[0],Ue.manufacturer=Q,Ue.name=Y,Ue.prerelease=q,Ue.product=Ce,Ue.ua=N,Ue.version=Y&&$,Ue.os=B||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ue.parse=J,Ue.toString=Be,Ue.version&&ge.unshift($),Ue.name&&ge.unshift(Y),B&&Y&&!(B==String(B).split(" ")[0]&&(B==Y.split(" ")[0]||Ce))&&ge.push(Ce?"("+B+")":"on "+B),ge.length&&(Ue.description=ge.join(" ")),Ue}var X=J();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(O.platform=X,define(function(){return X})):x&&m?T(X,function(N,F){x[F]=N}):O.platform=X}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(a,G,d){(function(f){"use strict";typeof f=="undefined"||!f.version||f.version.indexOf("v0.")===0||f.version.indexOf("v1.")===0&&f.version.indexOf("v1.8.")!==0?G.exports={nextTick:i}:G.exports=f;function i(O,C,x,m){if(typeof O!="function")throw new TypeError('"callback" argument must be a function');var h=arguments.length,s,l;switch(h){case 0:case 1:return f.nextTick(O);case 2:return f.nextTick(function(){O.call(null,C)});case 3:return f.nextTick(function(){O.call(null,C,x)});case 4:return f.nextTick(function(){O.call(null,C,x,m)});default:for(s=new Array(h-1),l=0;l<s.length;)s[l++]=arguments[l];return f.nextTick(function(){O.apply(null,s)})}}}).call(this,a("_process"))},{_process:208}],208:[function(a,G,d){var f=G.exports={},i,O;function C(){throw new Error("setTimeout has not been defined")}function x(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?i=setTimeout:i=C}catch(S){i=C}try{typeof clearTimeout=="function"?O=clearTimeout:O=x}catch(S){O=x}})();function m(S){if(i===setTimeout)return setTimeout(S,0);if((i===C||!i)&&setTimeout)return i=setTimeout,setTimeout(S,0);try{return i(S,0)}catch(k){try{return i.call(null,S,0)}catch(T){return i.call(this,S,0)}}}function h(S){if(O===clearTimeout)return clearTimeout(S);if((O===x||!O)&&clearTimeout)return O=clearTimeout,clearTimeout(S);try{return O(S)}catch(k){try{return O.call(null,S)}catch(T){return O.call(this,S)}}}var s=[],l=!1,u,o=-1;function g(){if(!l||!u)return;l=!1,u.length?s=u.concat(s):o=-1,s.length&&p()}function p(){if(l)return;var S=m(g);l=!0;for(var k=s.length;k;){for(u=s,s=[];++o<k;)u&&u[o].run();o=-1,k=s.length}u=null,l=!1,h(S)}f.nextTick=function(S){var k=new Array(arguments.length-1);if(arguments.length>1)for(var T=1;T<arguments.length;T++)k[T-1]=arguments[T];s.push(new v(S,k)),s.length===1&&!l&&m(p)};function v(S,k){this.fun=S,this.array=k}v.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={};function _(){}f.on=_,f.addListener=_,f.once=_,f.off=_,f.removeListener=_,f.removeAllListeners=_,f.emit=_,f.prependListener=_,f.prependOnceListener=_,f.listeners=function(S){return[]},f.binding=function(S){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(S){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],209:[function(a,G,d){(function(f){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(i){var O=typeof d=="object"&&d&&!d.nodeType&&d,C=typeof G=="object"&&G&&!G.nodeType&&G,x=typeof f=="object"&&f;(x.global===x||x.window===x||x.self===x)&&(i=x);var m,h=2147483647,s=36,l=1,u=26,o=38,g=700,p=72,v=128,_="-",S=/^xn--/,k=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=s-l,j=Math.floor,D=String.fromCharCode,y;function J(z){throw new RangeError(M[z])}function X(z,R){for(var w=z.length,P=[];w--;)P[w]=R(z[w]);return P}function N(z,R){var w=z.split("@"),P="";w.length>1&&(P=w[0]+"@",z=w[1]),z=z.replace(T,".");var le=z.split("."),pe=X(le,R).join(".");return P+pe}function F(z){for(var R=[],w=0,P=z.length,le,pe;w<P;)le=z.charCodeAt(w++),le>=55296&&le<=56319&&w<P?(pe=z.charCodeAt(w++),(pe&64512)==56320?R.push(((le&1023)<<10)+(pe&1023)+65536):(R.push(le),w--)):R.push(le);return R}function H(z){return X(z,function(R){var w="";return R>65535&&(R-=65536,w+=D(R>>>10&1023|55296),R=56320|R&1023),w+=D(R),w}).join("")}function Z(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:s}function ce(z,R){return z+22+75*(z<26)-((R!=0)<<5)}function he(z,R,w){var P=0;for(z=w?j(z/g):z>>1,z+=j(z/R);z>I*u>>1;P+=s)z=j(z/I);return j(P+(I+1)*z/(z+o))}function V(z){var R=[],w=z.length,P,le=0,pe=v,ye=p,Ee,Oe,ae,fe,ge,q,ie,$,se;for(Ee=z.lastIndexOf(_),Ee<0&&(Ee=0),Oe=0;Oe<Ee;++Oe)z.charCodeAt(Oe)>=128&&J("not-basic"),R.push(z.charCodeAt(Oe));for(ae=Ee>0?Ee+1:0;ae<w;){for(fe=le,ge=1,q=s;!(ae>=w&&J("invalid-input"),ie=Z(z.charCodeAt(ae++)),(ie>=s||ie>j((h-le)/ge))&&J("overflow"),le+=ie*ge,$=q<=ye?l:q>=ye+u?u:q-ye,ie<$);q+=s)se=s-$,ge>j(h/se)&&J("overflow"),ge*=se;P=R.length+1,ye=he(le-fe,P,fe==0),j(le/P)>h-pe&&J("overflow"),pe+=j(le/P),le%=P,R.splice(le++,0,pe)}return H(R)}function ve(z){var R,w,P,le,pe,ye,Ee,Oe,ae,fe,ge,q=[],ie,$,se,K;for(z=F(z),ie=z.length,R=v,w=0,pe=p,ye=0;ye<ie;++ye)ge=z[ye],ge<128&&q.push(D(ge));for(P=le=q.length,le&&q.push(_);P<ie;){for(Ee=h,ye=0;ye<ie;++ye)ge=z[ye],ge>=R&&ge<Ee&&(Ee=ge);for($=P+1,Ee-R>j((h-w)/$)&&J("overflow"),w+=(Ee-R)*$,R=Ee,ye=0;ye<ie;++ye)if(ge=z[ye],ge<R&&++w>h&&J("overflow"),ge==R){for(Oe=w,ae=s;!(fe=ae<=pe?l:ae>=pe+u?u:ae-pe,Oe<fe);ae+=s)K=Oe-fe,se=s-fe,q.push(D(ce(fe+K%se,0))),Oe=j(K/se);q.push(D(ce(Oe,0))),pe=he(w,$,P==le),w=0,++P}++w,++R}return q.join("")}function ne(z){return N(z,function(R){return S.test(R)?V(R.slice(4).toLowerCase()):R})}function W(z){return N(z,function(R){return k.test(R)?"xn--"+ve(R):R})}if(m={version:"1.4.1",ucs2:{decode:F,encode:H},decode:V,encode:ve,toASCII:W,toUnicode:ne},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return m});else if(O&&C)if(G.exports==O)C.exports=m;else for(y in m)m.hasOwnProperty(y)&&(O[y]=m[y]);else i.punycode=m})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(a,G,d){"use strict";function f(O,C){return Object.prototype.hasOwnProperty.call(O,C)}G.exports=function(O,C,x,m){C=C||"&",x=x||"=";var h={};if(typeof O!="string"||O.length===0)return h;var s=/\+/g;O=O.split(C);var l=1e3;m&&typeof m.maxKeys=="number"&&(l=m.maxKeys);var u=O.length;l>0&&u>l&&(u=l);for(var o=0;o<u;++o){var g=O[o].replace(s,"%20"),p=g.indexOf(x),v,_,S,k;p>=0?(v=g.substr(0,p),_=g.substr(p+1)):(v=g,_=""),S=decodeURIComponent(v),k=decodeURIComponent(_),f(h,S)?i(h[S])?h[S].push(k):h[S]=[h[S],k]:h[S]=k}return h};var i=Array.isArray||function(O){return Object.prototype.toString.call(O)==="[object Array]"}},{}],211:[function(a,G,d){"use strict";var f=function(x){switch(typeof x){case"string":return x;case"boolean":return x?"true":"false";case"number":return isFinite(x)?x:"";default:return""}};G.exports=function(x,m,h,s){return m=m||"&",h=h||"=",x===null&&(x=void 0),typeof x=="object"?O(C(x),function(l){var u=encodeURIComponent(f(l))+h;return i(x[l])?O(x[l],function(o){return u+encodeURIComponent(f(o))}).join(m):u+encodeURIComponent(f(x[l]))}).join(m):s?encodeURIComponent(f(s))+h+encodeURIComponent(f(x)):""};var i=Array.isArray||function(x){return Object.prototype.toString.call(x)==="[object Array]"};function O(x,m){if(x.map)return x.map(m);for(var h=[],s=0;s<x.length;s++)h.push(m(x[s],s));return h}var C=Object.keys||function(x){var m=[];for(var h in x)Object.prototype.hasOwnProperty.call(x,h)&&m.push(h);return m}},{}],212:[function(a,G,d){"use strict";d.decode=d.parse=a("./decode"),d.encode=d.stringify=a("./encode")},{"./decode":210,"./encode":211}],213:[function(a,G,d){G.exports=a("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=x(f),O=a("babel-runtime/core-js/object/keys"),C=x(O);function x(k){return k&&k.__esModule?k:{default:k}}var m=a("process-nextick-args"),h=C.default||function(k){var T=[];for(var M in k)T.push(M);return T};G.exports=v;var s=(0,i.default)(a("core-util-is"));s.inherits=a("inherits");var l=a("./_stream_readable"),u=a("./_stream_writable");s.inherits(v,l);for(var o=h(u.prototype),g=0;g<o.length;g++){var p=o[g];v.prototype[p]||(v.prototype[p]=u.prototype[p])}function v(k){if(!(this instanceof v))return new v(k);l.call(this,k),u.call(this,k),k&&k.readable===!1&&(this.readable=!1),k&&k.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,k&&k.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",_)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function _(){if(this.allowHalfOpen||this._writableState.ended)return;m.nextTick(S,this)}function S(k){k.end()}Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(T){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=T,this._writableState.destroyed=T}}),v.prototype._destroy=function(k,T){this.push(null),this.end(),m.nextTick(T,k)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(h){return h&&h.__esModule?h:{default:h}}G.exports=m;var C=a("./_stream_transform"),x=(0,i.default)(a("core-util-is"));x.inherits=a("inherits"),x.inherits(m,C);function m(h){if(!(this instanceof m))return new m(h);C.call(this,h)}m.prototype._transform=function(h,s,l){l(null,h)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(a,G,d){(function(f,i){"use strict";var O=a("babel-runtime/core-js/object/get-prototype-of"),C=h(O),x=a("babel-runtime/core-js/object/create"),m=h(x);function h(K){return K&&K.__esModule?K:{default:K}}var s=a("process-nextick-args");G.exports=F;var l=a("isarray"),u;F.ReadableState=N;var o=a("events").EventEmitter,g=function(Y,Ce){return Y.listeners(Ce).length},p=a("./internal/streams/stream"),v=a("safe-buffer").Buffer,_=i.Uint8Array||function(){};function S(K){return v.from(K)}function k(K){return v.isBuffer(K)||K instanceof _}var T=(0,m.default)(a("core-util-is"));T.inherits=a("inherits");var M=a("util"),I=void 0;M&&M.debuglog?I=M.debuglog("stream"):I=function(){};var j=a("./internal/streams/BufferList"),D=a("./internal/streams/destroy"),y;T.inherits(F,p);var J=["error","close","destroy","pause","resume"];function X(K,Y,Ce){if(typeof K.prependListener=="function")return K.prependListener(Y,Ce);!K._events||!K._events[Y]?K.on(Y,Ce):l(K._events[Y])?K._events[Y].unshift(Ce):K._events[Y]=[Ce,K._events[Y]]}function N(K,Y){u=u||a("./_stream_duplex"),K=K||{};var Ce=Y instanceof u;this.objectMode=!!K.objectMode,Ce&&(this.objectMode=this.objectMode||!!K.readableObjectMode);var Q=K.highWaterMark,B=K.readableHighWaterMark,E=this.objectMode?16:16*1024;Q||Q===0?this.highWaterMark=Q:Ce&&(B||B===0)?this.highWaterMark=B:this.highWaterMark=E,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new j,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=K.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,K.encoding&&(y||(y=a("string_decoder/").StringDecoder),this.decoder=new y(K.encoding),this.encoding=K.encoding)}function F(K){if(u=u||a("./_stream_duplex"),!(this instanceof F))return new F(K);this._readableState=new N(K,this),this.readable=!0,K&&(typeof K.read=="function"&&(this._read=K.read),typeof K.destroy=="function"&&(this._destroy=K.destroy)),p.call(this)}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Y){if(!this._readableState)return;this._readableState.destroyed=Y}}),F.prototype.destroy=D.destroy,F.prototype._undestroy=D.undestroy,F.prototype._destroy=function(K,Y){this.push(null),Y(K)},F.prototype.push=function(K,Y){var Ce=this._readableState,Q;return Ce.objectMode?Q=!0:typeof K=="string"&&(Y=Y||Ce.defaultEncoding,Y!==Ce.encoding&&(K=v.from(K,Y),Y=""),Q=!0),H(this,K,Y,!1,Q)},F.prototype.unshift=function(K){return H(this,K,null,!0,!1)};function H(K,Y,Ce,Q,B){var E=K._readableState;if(Y===null)E.reading=!1,W(K,E);else{var U;B||(U=ce(E,Y)),U?K.emit("error",U):E.objectMode||Y&&Y.length>0?(typeof Y!="string"&&!E.objectMode&&(0,C.default)(Y)!==v.prototype&&(Y=S(Y)),Q?E.endEmitted?K.emit("error",new Error("stream.unshift() after end event")):Z(K,E,Y,!0):E.ended?K.emit("error",new Error("stream.push() after EOF")):(E.reading=!1,E.decoder&&!Ce?(Y=E.decoder.write(Y),E.objectMode||Y.length!==0?Z(K,E,Y,!1):w(K,E)):Z(K,E,Y,!1))):Q||(E.reading=!1)}return he(E)}function Z(K,Y,Ce,Q){Y.flowing&&Y.length===0&&!Y.sync?(K.emit("data",Ce),K.read(0)):(Y.length+=Y.objectMode?1:Ce.length,Q?Y.buffer.unshift(Ce):Y.buffer.push(Ce),Y.needReadable&&z(K)),w(K,Y)}function ce(K,Y){var Ce;return!k(Y)&&typeof Y!="string"&&Y!==void 0&&!K.objectMode&&(Ce=new TypeError("Invalid non-string/buffer chunk")),Ce}function he(K){return!K.ended&&(K.needReadable||K.length<K.highWaterMark||K.length===0)}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(K){return y||(y=a("string_decoder/").StringDecoder),this._readableState.decoder=new y(K),this._readableState.encoding=K,this};var V=8388608;function ve(K){return K>=V?K=V:(K--,K|=K>>>1,K|=K>>>2,K|=K>>>4,K|=K>>>8,K|=K>>>16,K++),K}function ne(K,Y){return K<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:K!==K?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(K>Y.highWaterMark&&(Y.highWaterMark=ve(K)),K<=Y.length?K:Y.ended?Y.length:(Y.needReadable=!0,0))}F.prototype.read=function(K){I("read",K),K=parseInt(K,10);var Y=this._readableState,Ce=K;if(K!==0&&(Y.emittedReadable=!1),K===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended))return I("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?ie(this):z(this),null;if(K=ne(K,Y),K===0&&Y.ended)return Y.length===0&&ie(this),null;var Q=Y.needReadable;I("need readable",Q),(Y.length===0||Y.length-K<Y.highWaterMark)&&(Q=!0,I("length less than watermark",Q)),Y.ended||Y.reading?(Q=!1,I("reading or ended",Q)):Q&&(I("do read"),Y.reading=!0,Y.sync=!0,Y.length===0&&(Y.needReadable=!0),this._read(Y.highWaterMark),Y.sync=!1,Y.reading||(K=ne(Ce,Y)));var B;return K>0?B=ae(K,Y):B=null,B===null?(Y.needReadable=!0,K=0):Y.length-=K,Y.length===0&&(Y.ended||(Y.needReadable=!0),Ce!==K&&Y.ended&&ie(this)),B!==null&&this.emit("data",B),B};function W(K,Y){if(Y.ended)return;if(Y.decoder){var Ce=Y.decoder.end();Ce&&Ce.length&&(Y.buffer.push(Ce),Y.length+=Y.objectMode?1:Ce.length)}Y.ended=!0,z(K)}function z(K){var Y=K._readableState;Y.needReadable=!1,Y.emittedReadable||(I("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync?s.nextTick(R,K):R(K))}function R(K){I("emit readable"),K.emit("readable"),Oe(K)}function w(K,Y){Y.readingMore||(Y.readingMore=!0,s.nextTick(P,K,Y))}function P(K,Y){for(var Ce=Y.length;!Y.reading&&!Y.flowing&&!Y.ended&&Y.length<Y.highWaterMark&&!(I("maybeReadMore read 0"),K.read(0),Ce===Y.length);)Ce=Y.length;Y.readingMore=!1}F.prototype._read=function(K){this.emit("error",new Error("_read() is not implemented"))},F.prototype.pipe=function(K,Y){var Ce=this,Q=this._readableState;switch(Q.pipesCount){case 0:Q.pipes=K;break;case 1:Q.pipes=[Q.pipes,K];break;default:Q.pipes.push(K);break}Q.pipesCount+=1,I("pipe count=%d opts=%j",Q.pipesCount,Y);var B=(!Y||Y.end!==!1)&&K!==f.stdout&&K!==f.stderr,E=B?xe:Je;Q.endEmitted?s.nextTick(E):Ce.once("end",E),K.on("unpipe",U);function U(Ne,tt){I("onunpipe"),Ne===Ce&&(tt&&tt.hasUnpiped===!1&&(tt.hasUnpiped=!0,Fe()))}function xe(){I("onend"),K.end()}var be=le(Ce);K.on("drain",be);var Te=!1;function Fe(){I("cleanup"),K.removeListener("close",Ve),K.removeListener("finish",Xe),K.removeListener("drain",be),K.removeListener("error",ze),K.removeListener("unpipe",U),Ce.removeListener("end",xe),Ce.removeListener("end",Je),Ce.removeListener("data",Ue),Te=!0,Q.awaitDrain&&(!K._writableState||K._writableState.needDrain)&&be()}var Be=!1;Ce.on("data",Ue);function Ue(Ne){I("ondata"),Be=!1;var tt=K.write(Ne);tt===!1&&!Be&&((Q.pipesCount===1&&Q.pipes===K||Q.pipesCount>1&&se(Q.pipes,K)!==-1)&&!Te&&(I("false write response, pause",Ce._readableState.awaitDrain),Ce._readableState.awaitDrain++,Be=!0),Ce.pause())}function ze(Ne){I("onerror",Ne),Je(),K.removeListener("error",ze),g(K,"error")===0&&K.emit("error",Ne)}X(K,"error",ze);function Ve(){K.removeListener("finish",Xe),Je()}K.once("close",Ve);function Xe(){I("onfinish"),K.removeListener("close",Ve),Je()}K.once("finish",Xe);function Je(){I("unpipe"),Ce.unpipe(K)}return K.emit("pipe",Ce),Q.flowing||(I("pipe resume"),Ce.resume()),K};function le(K){return function(){var Y=K._readableState;I("pipeOnDrain",Y.awaitDrain),Y.awaitDrain&&Y.awaitDrain--,Y.awaitDrain===0&&g(K,"data")&&(Y.flowing=!0,Oe(K))}}F.prototype.unpipe=function(K){var Y=this._readableState,Ce={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return K&&K!==Y.pipes?this:(K||(K=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,K&&K.emit("unpipe",this,Ce),this);if(!K){var Q=Y.pipes,B=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var E=0;E<B;E++)Q[E].emit("unpipe",this,Ce);return this}var U=se(Y.pipes,K);return U===-1?this:(Y.pipes.splice(U,1),Y.pipesCount-=1,Y.pipesCount===1&&(Y.pipes=Y.pipes[0]),K.emit("unpipe",this,Ce),this)},F.prototype.on=function(K,Y){var Ce=p.prototype.on.call(this,K,Y);if(K==="data")this._readableState.flowing!==!1&&this.resume();else if(K==="readable"){var Q=this._readableState;!Q.endEmitted&&!Q.readableListening&&(Q.readableListening=Q.needReadable=!0,Q.emittedReadable=!1,Q.reading?Q.length&&z(this):s.nextTick(pe,this))}return Ce},F.prototype.addListener=F.prototype.on;function pe(K){I("readable nexttick read 0"),K.read(0)}F.prototype.resume=function(){var K=this._readableState;return K.flowing||(I("resume"),K.flowing=!0,ye(this,K)),this};function ye(K,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,s.nextTick(Ee,K,Y))}function Ee(K,Y){Y.reading||(I("resume read 0"),K.read(0)),Y.resumeScheduled=!1,Y.awaitDrain=0,K.emit("resume"),Oe(K),Y.flowing&&!Y.reading&&K.read(0)}F.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Oe(K){var Y=K._readableState;for(I("flow",Y.flowing);Y.flowing&&K.read()!==null;);}F.prototype.wrap=function(K){var Y=this,Ce=this._readableState,Q=!1;K.on("end",function(){if(I("wrapped end"),Ce.decoder&&!Ce.ended){var U=Ce.decoder.end();U&&U.length&&Y.push(U)}Y.push(null)}),K.on("data",function(U){if(I("wrapped data"),Ce.decoder&&(U=Ce.decoder.write(U)),Ce.objectMode&&U==null)return;if(!Ce.objectMode&&(!U||!U.length))return;var xe=Y.push(U);xe||(Q=!0,K.pause())});for(var B in K)this[B]===void 0&&typeof K[B]=="function"&&(this[B]=function(U){return function(){return K[U].apply(K,arguments)}}(B));for(var E=0;E<J.length;E++)K.on(J[E],this.emit.bind(this,J[E]));return this._read=function(U){I("wrapped _read",U),Q&&(Q=!1,K.resume())},this},Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),F._fromList=ae;function ae(K,Y){if(Y.length===0)return null;var Ce;return Y.objectMode?Ce=Y.buffer.shift():!K||K>=Y.length?(Y.decoder?Ce=Y.buffer.join(""):Y.buffer.length===1?Ce=Y.buffer.head.data:Ce=Y.buffer.concat(Y.length),Y.buffer.clear()):Ce=fe(K,Y.buffer,Y.decoder),Ce}function fe(K,Y,Ce){var Q;return K<Y.head.data.length?(Q=Y.head.data.slice(0,K),Y.head.data=Y.head.data.slice(K)):K===Y.head.data.length?Q=Y.shift():Q=Ce?ge(K,Y):q(K,Y),Q}function ge(K,Y){var Ce=Y.head,Q=1,B=Ce.data;for(K-=B.length;Ce=Ce.next;){var E=Ce.data,U=K>E.length?E.length:K;if(U===E.length?B+=E:B+=E.slice(0,K),K-=U,K===0){U===E.length?(++Q,Ce.next?Y.head=Ce.next:Y.head=Y.tail=null):(Y.head=Ce,Ce.data=E.slice(U));break}++Q}return Y.length-=Q,B}function q(K,Y){var Ce=v.allocUnsafe(K),Q=Y.head,B=1;for(Q.data.copy(Ce),K-=Q.data.length;Q=Q.next;){var E=Q.data,U=K>E.length?E.length:K;if(E.copy(Ce,Ce.length-K,0,U),K-=U,K===0){U===E.length?(++B,Q.next?Y.head=Q.next:Y.head=Y.tail=null):(Y.head=Q,Q.data=E.slice(U));break}++B}return Y.length-=B,Ce}function ie(K){var Y=K._readableState;if(Y.length>0)throw new Error('"endReadable()" called on non-empty stream');Y.endEmitted||(Y.ended=!0,s.nextTick($,Y,K))}function $(K,Y){!K.endEmitted&&K.length===0&&(K.endEmitted=!0,Y.readable=!1,Y.emit("end"))}function se(K,Y){for(var Ce=0,Q=K.length;Ce<Q;Ce++)if(K[Ce]===Y)return Ce;return-1}}).call(this,a("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(u){return u&&u.__esModule?u:{default:u}}G.exports=h;var C=a("./_stream_duplex"),x=(0,i.default)(a("core-util-is"));x.inherits=a("inherits"),x.inherits(h,C);function m(u,o){var g=this._transformState;g.transforming=!1;var p=g.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));g.writechunk=null,g.writecb=null,o!=null&&this.push(o),p(u);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function h(u){if(!(this instanceof h))return new h(u);C.call(this,u),this._transformState={afterTransform:m.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",s)}function s(){var u=this;typeof this._flush=="function"?this._flush(function(o,g){l(u,o,g)}):l(this,null,null)}h.prototype.push=function(u,o){return this._transformState.needTransform=!1,C.prototype.push.call(this,u,o)},h.prototype._transform=function(u,o,g){throw new Error("_transform() is not implemented")},h.prototype._write=function(u,o,g){var p=this._transformState;if(p.writecb=g,p.writechunk=u,p.writeencoding=o,!p.transforming){var v=this._readableState;(p.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},h.prototype._read=function(u){var o=this._transformState;o.writechunk!==null&&o.writecb&&!o.transforming?(o.transforming=!0,this._transform(o.writechunk,o.writeencoding,o.afterTransform)):o.needTransform=!0},h.prototype._destroy=function(u,o){var g=this;C.prototype._destroy.call(this,u,function(p){o(p),g.emit("close")})};function l(u,o,g){if(o)return u.emit("error",o);if(g!=null&&u.push(g),u._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(u._transformState.transforming)throw new Error("Calling transform done when still transforming");return u.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(a,G,d){(function(f,i){"use strict";var O=a("babel-runtime/core-js/object/define-property"),C=p(O),x=a("babel-runtime/core-js/symbol/has-instance"),m=p(x),h=a("babel-runtime/core-js/symbol"),s=p(h),l=a("babel-runtime/core-js/object/create"),u=p(l),o=a("babel-runtime/core-js/set-immediate"),g=p(o);function p(q){return q&&q.__esModule?q:{default:q}}var v=a("process-nextick-args");G.exports=ce;function _(q,ie,$){this.chunk=q,this.encoding=ie,this.callback=$,this.next=null}function S(q){var ie=this;this.next=null,this.entry=null,this.finish=function(){ge(ie,q)}}var k=!f.browser&&["v0.10","v0.9."].indexOf(f.version.slice(0,5))>-1?g.default:v.nextTick,T;ce.WritableState=H;var M=(0,u.default)(a("core-util-is"));M.inherits=a("inherits");var I={deprecate:a("util-deprecate")},j=a("./internal/streams/stream"),D=a("safe-buffer").Buffer,y=i.Uint8Array||function(){};function J(q){return D.from(q)}function X(q){return D.isBuffer(q)||q instanceof y}var N=a("./internal/streams/destroy");M.inherits(ce,j);function F(){}function H(q,ie){T=T||a("./_stream_duplex"),q=q||{};var $=ie instanceof T;this.objectMode=!!q.objectMode,$&&(this.objectMode=this.objectMode||!!q.writableObjectMode);var se=q.highWaterMark,K=q.writableHighWaterMark,Y=this.objectMode?16:16*1024;se||se===0?this.highWaterMark=se:$&&(K||K===0)?this.highWaterMark=K:this.highWaterMark=Y,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ce=q.decodeStrings===!1;this.decodeStrings=!Ce,this.defaultEncoding=q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){w(ie,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}H.prototype.getBuffer=function(){for(var ie=this.bufferedRequest,$=[];ie;)$.push(ie),ie=ie.next;return $},function(){try{Object.defineProperty(H.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(q){}}();var Z;typeof s.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(Z=Function.prototype[m.default],(0,C.default)(ce,m.default,{value:function(ie){return Z.call(this,ie)?!0:this!==ce?!1:ie&&ie._writableState instanceof H}})):Z=function(ie){return ie instanceof this};function ce(q){if(T=T||a("./_stream_duplex"),!Z.call(ce,this)&&!(this instanceof T))return new ce(q);this._writableState=new H(q,this),this.writable=!0,q&&(typeof q.write=="function"&&(this._write=q.write),typeof q.writev=="function"&&(this._writev=q.writev),typeof q.destroy=="function"&&(this._destroy=q.destroy),typeof q.final=="function"&&(this._final=q.final)),j.call(this)}ce.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function he(q,ie){var $=new Error("write after end");q.emit("error",$),v.nextTick(ie,$)}function V(q,ie,$,se){var K=!0,Y=!1;return $===null?Y=new TypeError("May not write null values to stream"):typeof $!="string"&&$!==void 0&&!ie.objectMode&&(Y=new TypeError("Invalid non-string/buffer chunk")),Y&&(q.emit("error",Y),v.nextTick(se,Y),K=!1),K}ce.prototype.write=function(q,ie,$){var se=this._writableState,K=!1,Y=!se.objectMode&&X(q);return Y&&!D.isBuffer(q)&&(q=J(q)),typeof ie=="function"&&($=ie,ie=null),Y?ie="buffer":ie||(ie=se.defaultEncoding),typeof $!="function"&&($=F),se.ended?he(this,$):(Y||V(this,se,q,$))&&(se.pendingcb++,K=ne(this,se,Y,q,ie,$)),K},ce.prototype.cork=function(){var q=this._writableState;q.corked++},ce.prototype.uncork=function(){var q=this._writableState;q.corked&&(q.corked--,!q.writing&&!q.corked&&!q.finished&&!q.bufferProcessing&&q.bufferedRequest&&pe(this,q))},ce.prototype.setDefaultEncoding=function(ie){if(typeof ie=="string"&&(ie=ie.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ie+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ie);return this._writableState.defaultEncoding=ie,this};function ve(q,ie,$){return!q.objectMode&&q.decodeStrings!==!1&&typeof ie=="string"&&(ie=D.from(ie,$)),ie}Object.defineProperty(ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ne(q,ie,$,se,K,Y){if(!$){var Ce=ve(ie,se,K);se!==Ce&&($=!0,K="buffer",se=Ce)}var Q=ie.objectMode?1:se.length;ie.length+=Q;var B=ie.length<ie.highWaterMark;if(B||(ie.needDrain=!0),ie.writing||ie.corked){var E=ie.lastBufferedRequest;ie.lastBufferedRequest={chunk:se,encoding:K,isBuf:$,callback:Y,next:null},E?E.next=ie.lastBufferedRequest:ie.bufferedRequest=ie.lastBufferedRequest,ie.bufferedRequestCount+=1}else W(q,ie,!1,Q,se,K,Y);return B}function W(q,ie,$,se,K,Y,Ce){ie.writelen=se,ie.writecb=Ce,ie.writing=!0,ie.sync=!0,$?q._writev(K,ie.onwrite):q._write(K,Y,ie.onwrite),ie.sync=!1}function z(q,ie,$,se,K){--ie.pendingcb,$?(v.nextTick(K,se),v.nextTick(ae,q,ie),q._writableState.errorEmitted=!0,q.emit("error",se)):(K(se),q._writableState.errorEmitted=!0,q.emit("error",se),ae(q,ie))}function R(q){q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0}function w(q,ie){var $=q._writableState,se=$.sync,K=$.writecb;if(R($),ie)z(q,$,se,ie,K);else{var Y=ye($);!Y&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest&&pe(q,$),se?k(P,q,$,Y,K):P(q,$,Y,K)}}function P(q,ie,$,se){$||le(q,ie),ie.pendingcb--,se(),ae(q,ie)}function le(q,ie){ie.length===0&&ie.needDrain&&(ie.needDrain=!1,q.emit("drain"))}function pe(q,ie){ie.bufferProcessing=!0;var $=ie.bufferedRequest;if(q._writev&&$&&$.next){var se=ie.bufferedRequestCount,K=new Array(se),Y=ie.corkedRequestsFree;Y.entry=$;for(var Ce=0,Q=!0;$;)K[Ce]=$,$.isBuf||(Q=!1),$=$.next,Ce+=1;K.allBuffers=Q,W(q,ie,!0,ie.length,K,"",Y.finish),ie.pendingcb++,ie.lastBufferedRequest=null,Y.next?(ie.corkedRequestsFree=Y.next,Y.next=null):ie.corkedRequestsFree=new S(ie),ie.bufferedRequestCount=0}else{for(;$;){var B=$.chunk,E=$.encoding,U=$.callback,xe=ie.objectMode?1:B.length;if(W(q,ie,!1,xe,B,E,U),$=$.next,ie.bufferedRequestCount--,ie.writing)break}$===null&&(ie.lastBufferedRequest=null)}ie.bufferedRequest=$,ie.bufferProcessing=!1}ce.prototype._write=function(q,ie,$){$(new Error("_write() is not implemented"))},ce.prototype._writev=null,ce.prototype.end=function(q,ie,$){var se=this._writableState;typeof q=="function"?($=q,q=null,ie=null):typeof ie=="function"&&($=ie,ie=null),q!=null&&this.write(q,ie),se.corked&&(se.corked=1,this.uncork()),!se.ending&&!se.finished&&fe(this,se,$)};function ye(q){return q.ending&&q.length===0&&q.bufferedRequest===null&&!q.finished&&!q.writing}function Ee(q,ie){q._final(function($){ie.pendingcb--,$&&q.emit("error",$),ie.prefinished=!0,q.emit("prefinish"),ae(q,ie)})}function Oe(q,ie){!ie.prefinished&&!ie.finalCalled&&(typeof q._final=="function"?(ie.pendingcb++,ie.finalCalled=!0,v.nextTick(Ee,q,ie)):(ie.prefinished=!0,q.emit("prefinish")))}function ae(q,ie){var $=ye(ie);return $&&(Oe(q,ie),ie.pendingcb===0&&(ie.finished=!0,q.emit("finish"))),$}function fe(q,ie,$){ie.ending=!0,ae(q,ie),$&&(ie.finished?v.nextTick($):q.once("finish",$)),ie.ended=!0,q.writable=!1}function ge(q,ie,$){var se=q.entry;for(q.entry=null;se;){var K=se.callback;ie.pendingcb--,K($),se=se.next}ie.corkedRequestsFree?ie.corkedRequestsFree.next=q:ie.corkedRequestsFree=q}Object.defineProperty(ce.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ie){if(!this._writableState)return;this._writableState.destroyed=ie}}),ce.prototype.destroy=N.destroy,ce.prototype._undestroy=N.undestroy,ce.prototype._destroy=function(q,ie){this.end(),ie(q)}}).call(this,a("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(a,G,d){"use strict";function f(x,m){if(!(x instanceof m))throw new TypeError("Cannot call a class as a function")}var i=a("safe-buffer").Buffer,O=a("util");function C(x,m,h){x.copy(m,h)}G.exports=function(){function x(){f(this,x),this.head=null,this.tail=null,this.length=0}return x.prototype.push=function(h){var s={data:h,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length},x.prototype.unshift=function(h){var s={data:h,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length},x.prototype.shift=function(){if(this.length===0)return;var h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h},x.prototype.clear=function(){this.head=this.tail=null,this.length=0},x.prototype.join=function(h){if(this.length===0)return"";for(var s=this.head,l=""+s.data;s=s.next;)l+=h+s.data;return l},x.prototype.concat=function(h){if(this.length===0)return i.alloc(0);if(this.length===1)return this.head.data;for(var s=i.allocUnsafe(h>>>0),l=this.head,u=0;l;)C(l.data,s,u),u+=l.data.length,l=l.next;return s},x}(),O&&O.inspect&&O.inspect.custom&&(G.exports.prototype[O.inspect.custom]=function(){var x=O.inspect({length:this.length});return this.constructor.name+" "+x})},{"safe-buffer":228,util:71}],220:[function(a,G,d){"use strict";var f=a("process-nextick-args");function i(x,m){var h=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(m?m(x):x&&(!this._writableState||!this._writableState.errorEmitted)&&f.nextTick(C,this,x),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(x||null,function(u){!m&&u?(f.nextTick(C,h,u),h._writableState&&(h._writableState.errorEmitted=!0)):m&&m(u)}),this)}function O(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function C(x,m){x.emit("error",m)}G.exports={destroy:i,undestroy:O}},{"process-nextick-args":207}],221:[function(a,G,d){"use strict";G.exports=a("events").EventEmitter},{events:192}],222:[function(a,G,d){G.exports=a("./readable").PassThrough},{"./readable":223}],223:[function(a,G,d){d=G.exports=a("./lib/_stream_readable.js"),d.Stream=d,d.Readable=d,d.Writable=a("./lib/_stream_writable.js"),d.Duplex=a("./lib/_stream_duplex.js"),d.Transform=a("./lib/_stream_transform.js"),d.PassThrough=a("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(a,G,d){G.exports=a("./readable").Transform},{"./readable":223}],225:[function(a,G,d){G.exports=a("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(a,G,d){var f=function(){return this}()||Function("return this")(),i=f.regeneratorRuntime&&Object.getOwnPropertyNames(f).indexOf("regeneratorRuntime")>=0,O=i&&f.regeneratorRuntime;if(f.regeneratorRuntime=void 0,G.exports=a("./runtime"),i)f.regeneratorRuntime=O;else try{delete f.regeneratorRuntime}catch(C){f.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(a,G,d){!function(f){"use strict";var i=Object.prototype,O=i.hasOwnProperty,C,x=typeof Symbol=="function"?Symbol:{},m=x.iterator||"@@iterator",h=x.asyncIterator||"@@asyncIterator",s=x.toStringTag||"@@toStringTag",l=typeof G=="object",u=f.regeneratorRuntime;if(u){l&&(G.exports=u);return}u=f.regeneratorRuntime=l?G.exports:{};function o(ne,W,z,R){var w=W&&W.prototype instanceof T?W:T,P=Object.create(w.prototype),le=new he(R||[]);return P._invoke=F(ne,z,le),P}u.wrap=o;function g(ne,W,z){try{return{type:"normal",arg:ne.call(W,z)}}catch(R){return{type:"throw",arg:R}}}var p="suspendedStart",v="suspendedYield",_="executing",S="completed",k={};function T(){}function M(){}function I(){}var j={};j[m]=function(){return this};var D=Object.getPrototypeOf,y=D&&D(D(V([])));y&&y!==i&&O.call(y,m)&&(j=y);var J=I.prototype=T.prototype=Object.create(j);M.prototype=J.constructor=I,I.constructor=M,I[s]=M.displayName="GeneratorFunction";function X(ne){["next","throw","return"].forEach(function(W){ne[W]=function(z){return this._invoke(W,z)}})}u.isGeneratorFunction=function(ne){var W=typeof ne=="function"&&ne.constructor;return W?W===M||(W.displayName||W.name)==="GeneratorFunction":!1},u.mark=function(ne){return Object.setPrototypeOf?Object.setPrototypeOf(ne,I):(ne.__proto__=I,s in ne||(ne[s]="GeneratorFunction")),ne.prototype=Object.create(J),ne},u.awrap=function(ne){return{__await:ne}};function N(ne){function W(w,P,le,pe){var ye=g(ne[w],ne,P);if(ye.type==="throw")pe(ye.arg);else{var Ee=ye.arg,Oe=Ee.value;return Oe&&typeof Oe=="object"&&O.call(Oe,"__await")?Promise.resolve(Oe.__await).then(function(ae){W("next",ae,le,pe)},function(ae){W("throw",ae,le,pe)}):Promise.resolve(Oe).then(function(ae){Ee.value=ae,le(Ee)},pe)}}var z;function R(w,P){function le(){return new Promise(function(pe,ye){W(w,P,pe,ye)})}return z=z?z.then(le,le):le()}this._invoke=R}X(N.prototype),N.prototype[h]=function(){return this},u.AsyncIterator=N,u.async=function(ne,W,z,R){var w=new N(o(ne,W,z,R));return u.isGeneratorFunction(W)?w:w.next().then(function(P){return P.done?P.value:w.next()})};function F(ne,W,z){var R=p;return function(P,le){if(R===_)throw new Error("Generator is already running");if(R===S){if(P==="throw")throw le;return ve()}for(z.method=P,z.arg=le;;){var pe=z.delegate;if(pe){var ye=H(pe,z);if(ye){if(ye===k)continue;return ye}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(R===p)throw R=S,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);R=_;var Ee=g(ne,W,z);if(Ee.type==="normal"){if(R=z.done?S:v,Ee.arg===k)continue;return{value:Ee.arg,done:z.done}}else Ee.type==="throw"&&(R=S,z.method="throw",z.arg=Ee.arg)}}}function H(ne,W){var z=ne.iterator[W.method];if(z===C){if(W.delegate=null,W.method==="throw"){if(ne.iterator.return&&(W.method="return",W.arg=C,H(ne,W),W.method==="throw"))return k;W.method="throw",W.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var R=g(z,ne.iterator,W.arg);if(R.type==="throw")return W.method="throw",W.arg=R.arg,W.delegate=null,k;var w=R.arg;if(!w)return W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,k;if(w.done)W[ne.resultName]=w.value,W.next=ne.nextLoc,W.method!=="return"&&(W.method="next",W.arg=C);else return w;return W.delegate=null,k}X(J),J[s]="Generator",J[m]=function(){return this},J.toString=function(){return"[object Generator]"};function Z(ne){var W={tryLoc:ne[0]};1 in ne&&(W.catchLoc=ne[1]),2 in ne&&(W.finallyLoc=ne[2],W.afterLoc=ne[3]),this.tryEntries.push(W)}function ce(ne){var W=ne.completion||{};W.type="normal",delete W.arg,ne.completion=W}function he(ne){this.tryEntries=[{tryLoc:"root"}],ne.forEach(Z,this),this.reset(!0)}u.keys=function(ne){var W=[];for(var z in ne)W.push(z);return W.reverse(),function R(){for(;W.length;){var w=W.pop();if(w in ne)return R.value=w,R.done=!1,R}return R.done=!0,R}};function V(ne){if(ne){var W=ne[m];if(W)return W.call(ne);if(typeof ne.next=="function")return ne;if(!isNaN(ne.length)){var z=-1,R=function w(){for(;++z<ne.length;)if(O.call(ne,z))return w.value=ne[z],w.done=!1,w;return w.value=C,w.done=!0,w};return R.next=R}}return{next:ve}}u.values=V;function ve(){return{value:C,done:!0}}he.prototype={constructor:he,reset:function(ne){if(this.prev=0,this.next=0,this.sent=this._sent=C,this.done=!1,this.delegate=null,this.method="next",this.arg=C,this.tryEntries.forEach(ce),!ne)for(var W in this)W.charAt(0)==="t"&&O.call(this,W)&&!isNaN(+W.slice(1))&&(this[W]=C)},stop:function(){this.done=!0;var ne=this.tryEntries[0],W=ne.completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(ne){if(this.done)throw ne;var W=this;function z(ye,Ee){return P.type="throw",P.arg=ne,W.next=ye,Ee&&(W.method="next",W.arg=C),!!Ee}for(var R=this.tryEntries.length-1;R>=0;--R){var w=this.tryEntries[R],P=w.completion;if(w.tryLoc==="root")return z("end");if(w.tryLoc<=this.prev){var le=O.call(w,"catchLoc"),pe=O.call(w,"finallyLoc");if(le&&pe){if(this.prev<w.catchLoc)return z(w.catchLoc,!0);if(this.prev<w.finallyLoc)return z(w.finallyLoc)}else if(le){if(this.prev<w.catchLoc)return z(w.catchLoc,!0)}else if(pe){if(this.prev<w.finallyLoc)return z(w.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(ne,W){for(var z=this.tryEntries.length-1;z>=0;--z){var R=this.tryEntries[z];if(R.tryLoc<=this.prev&&O.call(R,"finallyLoc")&&this.prev<R.finallyLoc){var w=R;break}}w&&(ne==="break"||ne==="continue")&&w.tryLoc<=W&&W<=w.finallyLoc&&(w=null);var P=w?w.completion:{};return P.type=ne,P.arg=W,w?(this.method="next",this.next=w.finallyLoc,k):this.complete(P)},complete:function(ne,W){if(ne.type==="throw")throw ne.arg;return ne.type==="break"||ne.type==="continue"?this.next=ne.arg:ne.type==="return"?(this.rval=this.arg=ne.arg,this.method="return",this.next="end"):ne.type==="normal"&&W&&(this.next=W),k},finish:function(ne){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.finallyLoc===ne)return this.complete(z.completion,z.afterLoc),ce(z),k}},catch:function(ne){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.tryLoc===ne){var R=z.completion;if(R.type==="throw"){var w=R.arg;ce(z)}return w}}throw new Error("illegal catch attempt")},delegateYield:function(ne,W,z){return this.delegate={iterator:V(ne),resultName:W,nextLoc:z},this.method==="next"&&(this.arg=C),k}}}(function(){return this}()||Function("return this")())},{}],228:[function(a,G,d){var f=a("buffer"),i=f.Buffer;function O(x,m){for(var h in x)m[h]=x[h]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?G.exports=f:(O(f,d),d.Buffer=C);function C(x,m,h){return i(x,m,h)}O(i,C),C.from=function(x,m,h){if(typeof x=="number")throw new TypeError("Argument must not be a number");return i(x,m,h)},C.alloc=function(x,m,h){if(typeof x!="number")throw new TypeError("Argument must be a number");var s=i(x);return m!==void 0?typeof h=="string"?s.fill(m,h):s.fill(m):s.fill(0),s},C.allocUnsafe=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return i(x)},C.allocUnsafeSlow=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return f.SlowBuffer(x)}},{buffer:73}],229:[function(a,G,d){(function(f){"use strict";var i=a("babel-runtime/core-js/string/from-code-point"),O=v(i),C=a("babel-runtime/core-js/json/stringify"),x=v(C),m=a("babel-runtime/helpers/typeof"),h=v(m),s=a("babel-runtime/core-js/object/define-property"),l=v(s),u=a("babel-runtime/core-js/object/keys"),o=v(u),g=a("babel-runtime/core-js/object/create"),p=v(g);function v(_){return _&&_.__esModule?_:{default:_}}(function(_){_.parser=function(E,U){return new k(E,U)},_.SAXParser=k,_.SAXStream=J,_.createStream=y,_.MAX_BUFFER_LENGTH=64*1024;var S=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];_.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function k(E,U){if(!(this instanceof k))return new k(E,U);var xe=this;M(xe),xe.q=xe.c="",xe.bufferCheckPosition=_.MAX_BUFFER_LENGTH,xe.opt=U||{},xe.opt.lowercase=xe.opt.lowercase||xe.opt.lowercasetags,xe.looseCase=xe.opt.lowercase?"toLowerCase":"toUpperCase",xe.tags=[],xe.closed=xe.closedRoot=xe.sawRoot=!1,xe.tag=xe.error=null,xe.strict=!!E,xe.noscript=!!(E||xe.opt.noscript),xe.state=P.BEGIN,xe.strictEntities=xe.opt.strictEntities,xe.ENTITIES=xe.strictEntities?(0,p.default)(_.XML_ENTITIES):(0,p.default)(_.ENTITIES),xe.attribList=[],xe.opt.xmlns&&(xe.ns=(0,p.default)(Z)),xe.trackPosition=xe.opt.position!==!1,xe.trackPosition&&(xe.position=xe.line=xe.column=0),pe(xe,"onready")}p.default||(Object.create=function(E){function U(){}U.prototype=E;var xe=new U;return xe}),o.default||(Object.keys=function(E){var U=[];for(var xe in E)E.hasOwnProperty(xe)&&U.push(xe);return U});function T(E){for(var U=Math.max(_.MAX_BUFFER_LENGTH,10),xe=0,be=0,Te=S.length;be<Te;be++){var Fe=E[S[be]].length;if(Fe>U)switch(S[be]){case"textNode":Ee(E);break;case"cdata":ye(E,"oncdata",E.cdata),E.cdata="";break;case"script":ye(E,"onscript",E.script),E.script="";break;default:ae(E,"Max buffer length exceeded: "+S[be])}xe=Math.max(xe,Fe)}var Be=_.MAX_BUFFER_LENGTH-xe;E.bufferCheckPosition=Be+E.position}function M(E){for(var U=0,xe=S.length;U<xe;U++)E[S[U]]=""}function I(E){Ee(E),E.cdata!==""&&(ye(E,"oncdata",E.cdata),E.cdata=""),E.script!==""&&(ye(E,"onscript",E.script),E.script="")}k.prototype={end:function(){fe(this)},write:B,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){I(this)}};var j;try{j=a("stream").Stream}catch(E){j=function(){}}var D=_.EVENTS.filter(function(E){return E!=="error"&&E!=="end"});function y(E,U){return new J(E,U)}function J(E,U){if(!(this instanceof J))return new J(E,U);j.apply(this),this._parser=new k(E,U),this.writable=!0,this.readable=!0;var xe=this;this._parser.onend=function(){xe.emit("end")},this._parser.onerror=function(be){xe.emit("error",be),xe._parser.error=null},this._decoder=null,D.forEach(function(be){(0,l.default)(xe,"on"+be,{get:function(){return xe._parser["on"+be]},set:function(Fe){if(!Fe)return xe.removeAllListeners(be),xe._parser["on"+be]=Fe,Fe;xe.on(be,Fe)},enumerable:!0,configurable:!1})})}J.prototype=(0,p.default)(j.prototype,{constructor:{value:J}}),J.prototype.write=function(E){if(typeof f=="function"&&typeof f.isBuffer=="function"&&f.isBuffer(E)){if(!this._decoder){var U=a("string_decoder").StringDecoder;this._decoder=new U("utf8")}E=this._decoder.write(E)}return this._parser.write(E.toString()),this.emit("data",E),!0},J.prototype.end=function(E){return E&&E.length&&this.write(E),this._parser.end(),!0},J.prototype.on=function(E,U){var xe=this;return!xe._parser["on"+E]&&D.indexOf(E)!==-1&&(xe._parser["on"+E]=function(){var be=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);be.splice(0,0,E),xe.emit.apply(xe,be)}),j.prototype.on.call(xe,E,U)};var X="[CDATA[",N="DOCTYPE",F="http://www.w3.org/XML/1998/namespace",H="http://www.w3.org/2000/xmlns/",Z={xml:F,xmlns:H},ce=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,he=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,V=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ve=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function ne(E){return E===" "||E===`
|
|
|
`||E==="\r"||E===" "}function W(E){return E==='"'||E==="'"}function z(E){return E===">"||ne(E)}function R(E,U){return E.test(U)}function w(E,U){return!R(E,U)}var P=0;_.STATE={BEGIN:P++,BEGIN_WHITESPACE:P++,TEXT:P++,TEXT_ENTITY:P++,OPEN_WAKA:P++,SGML_DECL:P++,SGML_DECL_QUOTED:P++,DOCTYPE:P++,DOCTYPE_QUOTED:P++,DOCTYPE_DTD:P++,DOCTYPE_DTD_QUOTED:P++,COMMENT_STARTING:P++,COMMENT:P++,COMMENT_ENDING:P++,COMMENT_ENDED:P++,CDATA:P++,CDATA_ENDING:P++,CDATA_ENDING_2:P++,PROC_INST:P++,PROC_INST_BODY:P++,PROC_INST_ENDING:P++,OPEN_TAG:P++,OPEN_TAG_SLASH:P++,ATTRIB:P++,ATTRIB_NAME:P++,ATTRIB_NAME_SAW_WHITE:P++,ATTRIB_VALUE:P++,ATTRIB_VALUE_QUOTED:P++,ATTRIB_VALUE_CLOSED:P++,ATTRIB_VALUE_UNQUOTED:P++,ATTRIB_VALUE_ENTITY_Q:P++,ATTRIB_VALUE_ENTITY_U:P++,CLOSE_TAG:P++,CLOSE_TAG_SAW_WHITE:P++,SCRIPT:P++,SCRIPT_ENDING:P++},_.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},_.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,o.default)(_.ENTITIES).forEach(function(E){var U=_.ENTITIES[E],xe=typeof U=="number"?String.fromCharCode(U):U;_.ENTITIES[E]=xe});for(var le in _.STATE)_.STATE[_.STATE[le]]=le;P=_.STATE;function pe(E,U,xe){E[U]&&E[U](xe)}function ye(E,U,xe){E.textNode&&Ee(E),pe(E,U,xe)}function Ee(E){E.textNode=Oe(E.opt,E.textNode),E.textNode&&pe(E,"ontext",E.textNode),E.textNode=""}function Oe(E,U){return E.trim&&(U=U.trim()),E.normalize&&(U=U.replace(/\s+/g," ")),U}function ae(E,U){return Ee(E),E.trackPosition&&(U+=`
|
|
|
Line: `+E.line+`
|
|
|
Column: `+E.column+`
|
|
|
Char: `+E.c),U=new Error(U),E.error=U,pe(E,"onerror",U),E}function fe(E){return E.sawRoot&&!E.closedRoot&&ge(E,"Unclosed root tag"),E.state!==P.BEGIN&&E.state!==P.BEGIN_WHITESPACE&&E.state!==P.TEXT&&ae(E,"Unexpected end"),Ee(E),E.c="",E.closed=!0,pe(E,"onend"),k.call(E,E.strict,E.opt),E}function ge(E,U){if((typeof E=="undefined"?"undefined":(0,h.default)(E))!=="object"||!(E instanceof k))throw new Error("bad call to strictFail");E.strict&&ae(E,U)}function q(E){E.strict||(E.tagName=E.tagName[E.looseCase]());var U=E.tags[E.tags.length-1]||E,xe=E.tag={name:E.tagName,attributes:{}};E.opt.xmlns&&(xe.ns=U.ns),E.attribList.length=0,ye(E,"onopentagstart",xe)}function ie(E,U){var xe=E.indexOf(":"),be=xe<0?["",E]:E.split(":"),Te=be[0],Fe=be[1];return U&&E==="xmlns"&&(Te="xmlns",Fe=""),{prefix:Te,local:Fe}}function $(E){if(E.strict||(E.attribName=E.attribName[E.looseCase]()),E.attribList.indexOf(E.attribName)!==-1||E.tag.attributes.hasOwnProperty(E.attribName)){E.attribName=E.attribValue="";return}if(E.opt.xmlns){var U=ie(E.attribName,!0),xe=U.prefix,be=U.local;if(xe==="xmlns")if(be==="xml"&&E.attribValue!==F)ge(E,"xml: prefix must be bound to "+F+`
|
|
|
Actual: `+E.attribValue);else if(be==="xmlns"&&E.attribValue!==H)ge(E,"xmlns: prefix must be bound to "+H+`
|
|
|
Actual: `+E.attribValue);else{var Te=E.tag,Fe=E.tags[E.tags.length-1]||E;Te.ns===Fe.ns&&(Te.ns=(0,p.default)(Fe.ns)),Te.ns[be]=E.attribValue}E.attribList.push([E.attribName,E.attribValue])}else E.tag.attributes[E.attribName]=E.attribValue,ye(E,"onattribute",{name:E.attribName,value:E.attribValue});E.attribName=E.attribValue=""}function se(E,U){if(E.opt.xmlns){var xe=E.tag,be=ie(E.tagName);xe.prefix=be.prefix,xe.local=be.local,xe.uri=xe.ns[be.prefix]||"",xe.prefix&&!xe.uri&&(ge(E,"Unbound namespace prefix: "+(0,x.default)(E.tagName)),xe.uri=be.prefix);var Te=E.tags[E.tags.length-1]||E;xe.ns&&Te.ns!==xe.ns&&(0,o.default)(xe.ns).forEach(function(Ke){ye(E,"onopennamespace",{prefix:Ke,uri:xe.ns[Ke]})});for(var Fe=0,Be=E.attribList.length;Fe<Be;Fe++){var Ue=E.attribList[Fe],ze=Ue[0],Ve=Ue[1],Xe=ie(ze,!0),Je=Xe.prefix,Ne=Xe.local,tt=Je===""?"":xe.ns[Je]||"",nt={name:ze,value:Ve,prefix:Je,local:Ne,uri:tt};Je&&Je!=="xmlns"&&!tt&&(ge(E,"Unbound namespace prefix: "+(0,x.default)(Je)),nt.uri=Je),E.tag.attributes[ze]=nt,ye(E,"onattribute",nt)}E.attribList.length=0}E.tag.isSelfClosing=!!U,E.sawRoot=!0,E.tags.push(E.tag),ye(E,"onopentag",E.tag),U||(!E.noscript&&E.tagName.toLowerCase()==="script"?E.state=P.SCRIPT:E.state=P.TEXT,E.tag=null,E.tagName=""),E.attribName=E.attribValue="",E.attribList.length=0}function K(E){if(!E.tagName){ge(E,"Weird empty close tag."),E.textNode+="</>",E.state=P.TEXT;return}if(E.script){if(E.tagName!=="script"){E.script+="</"+E.tagName+">",E.tagName="",E.state=P.SCRIPT;return}ye(E,"onscript",E.script),E.script=""}var U=E.tags.length,xe=E.tagName;E.strict||(xe=xe[E.looseCase]());for(var be=xe;U--;){var Te=E.tags[U];if(Te.name!==be)ge(E,"Unexpected close tag");else break}if(U<0){ge(E,"Unmatched closing tag: "+E.tagName),E.textNode+="</"+E.tagName+">",E.state=P.TEXT;return}E.tagName=xe;for(var Fe=E.tags.length;Fe-- >U;){var Be=E.tag=E.tags.pop();E.tagName=E.tag.name,ye(E,"onclosetag",E.tagName);var Ue={};for(var ze in Be.ns)Ue[ze]=Be.ns[ze];var Ve=E.tags[E.tags.length-1]||E;E.opt.xmlns&&Be.ns!==Ve.ns&&(0,o.default)(Be.ns).forEach(function(Xe){var Je=Be.ns[Xe];ye(E,"onclosenamespace",{prefix:Xe,uri:Je})})}U===0&&(E.closedRoot=!0),E.tagName=E.attribValue=E.attribName="",E.attribList.length=0,E.state=P.TEXT}function Y(E){var U=E.entity,xe=U.toLowerCase(),be,Te="";return E.ENTITIES[U]?E.ENTITIES[U]:E.ENTITIES[xe]?E.ENTITIES[xe]:(U=xe,U.charAt(0)==="#"&&(U.charAt(1)==="x"?(U=U.slice(2),be=parseInt(U,16),Te=be.toString(16)):(U=U.slice(1),be=parseInt(U,10),Te=be.toString(10))),U=U.replace(/^0+/,""),isNaN(be)||Te.toLowerCase()!==U?(ge(E,"Invalid character entity"),"&"+E.entity+";"):(0,O.default)(be))}function Ce(E,U){U==="<"?(E.state=P.OPEN_WAKA,E.startTagPosition=E.position):ne(U)||(ge(E,"Non-whitespace before first tag."),E.textNode=U,E.state=P.TEXT)}function Q(E,U){var xe="";return U<E.length&&(xe=E.charAt(U)),xe}function B(E){var U=this;if(this.error)throw this.error;if(U.closed)return ae(U,"Cannot write after close. Assign an onready handler.");if(E===null)return fe(U);(typeof E=="undefined"?"undefined":(0,h.default)(E))==="object"&&(E=E.toString());for(var xe=0,be="";!(be=Q(E,xe++),U.c=be,!be);){U.trackPosition&&(U.position++,be===`
|
|
|
`?(U.line++,U.column=0):U.column++);switch(U.state){case P.BEGIN:if(U.state=P.BEGIN_WHITESPACE,be==="\uFEFF")continue;Ce(U,be);continue;case P.BEGIN_WHITESPACE:Ce(U,be);continue;case P.TEXT:if(U.sawRoot&&!U.closedRoot){for(var Te=xe-1;be&&be!=="<"&&be!=="&";)be=Q(E,xe++),be&&U.trackPosition&&(U.position++,be===`
|
|
|
`?(U.line++,U.column=0):U.column++);U.textNode+=E.substring(Te,xe-1)}be==="<"&&!(U.sawRoot&&U.closedRoot&&!U.strict)?(U.state=P.OPEN_WAKA,U.startTagPosition=U.position):(!ne(be)&&(!U.sawRoot||U.closedRoot)&&ge(U,"Text data outside of root node."),be==="&"?U.state=P.TEXT_ENTITY:U.textNode+=be);continue;case P.SCRIPT:be==="<"?U.state=P.SCRIPT_ENDING:U.script+=be;continue;case P.SCRIPT_ENDING:be==="/"?U.state=P.CLOSE_TAG:(U.script+="<"+be,U.state=P.SCRIPT);continue;case P.OPEN_WAKA:if(be==="!")U.state=P.SGML_DECL,U.sgmlDecl="";else if(!ne(be))if(R(ce,be))U.state=P.OPEN_TAG,U.tagName=be;else if(be==="/")U.state=P.CLOSE_TAG,U.tagName="";else if(be==="?")U.state=P.PROC_INST,U.procInstName=U.procInstBody="";else{if(ge(U,"Unencoded <"),U.startTagPosition+1<U.position){var Fe=U.position-U.startTagPosition;be=new Array(Fe).join(" ")+be}U.textNode+="<"+be,U.state=P.TEXT}continue;case P.SGML_DECL:(U.sgmlDecl+be).toUpperCase()===X?(ye(U,"onopencdata"),U.state=P.CDATA,U.sgmlDecl="",U.cdata=""):U.sgmlDecl+be==="--"?(U.state=P.COMMENT,U.comment="",U.sgmlDecl=""):(U.sgmlDecl+be).toUpperCase()===N?(U.state=P.DOCTYPE,(U.doctype||U.sawRoot)&&ge(U,"Inappropriately located doctype declaration"),U.doctype="",U.sgmlDecl=""):be===">"?(ye(U,"onsgmldeclaration",U.sgmlDecl),U.sgmlDecl="",U.state=P.TEXT):(W(be)&&(U.state=P.SGML_DECL_QUOTED),U.sgmlDecl+=be);continue;case P.SGML_DECL_QUOTED:be===U.q&&(U.state=P.SGML_DECL,U.q=""),U.sgmlDecl+=be;continue;case P.DOCTYPE:be===">"?(U.state=P.TEXT,ye(U,"ondoctype",U.doctype),U.doctype=!0):(U.doctype+=be,be==="["?U.state=P.DOCTYPE_DTD:W(be)&&(U.state=P.DOCTYPE_QUOTED,U.q=be));continue;case P.DOCTYPE_QUOTED:U.doctype+=be,be===U.q&&(U.q="",U.state=P.DOCTYPE);continue;case P.DOCTYPE_DTD:U.doctype+=be,be==="]"?U.state=P.DOCTYPE:W(be)&&(U.state=P.DOCTYPE_DTD_QUOTED,U.q=be);continue;case P.DOCTYPE_DTD_QUOTED:U.doctype+=be,be===U.q&&(U.state=P.DOCTYPE_DTD,U.q="");continue;case P.COMMENT:be==="-"?U.state=P.COMMENT_ENDING:U.comment+=be;continue;case P.COMMENT_ENDING:be==="-"?(U.state=P.COMMENT_ENDED,U.comment=Oe(U.opt,U.comment),U.comment&&ye(U,"oncomment",U.comment),U.comment=""):(U.comment+="-"+be,U.state=P.COMMENT);continue;case P.COMMENT_ENDED:be!==">"?(ge(U,"Malformed comment"),U.comment+="--"+be,U.state=P.COMMENT):U.state=P.TEXT;continue;case P.CDATA:be==="]"?U.state=P.CDATA_ENDING:U.cdata+=be;continue;case P.CDATA_ENDING:be==="]"?U.state=P.CDATA_ENDING_2:(U.cdata+="]"+be,U.state=P.CDATA);continue;case P.CDATA_ENDING_2:be===">"?(U.cdata&&ye(U,"oncdata",U.cdata),ye(U,"onclosecdata"),U.cdata="",U.state=P.TEXT):be==="]"?U.cdata+="]":(U.cdata+="]]"+be,U.state=P.CDATA);continue;case P.PROC_INST:be==="?"?U.state=P.PROC_INST_ENDING:ne(be)?U.state=P.PROC_INST_BODY:U.procInstName+=be;continue;case P.PROC_INST_BODY:if(!U.procInstBody&&ne(be))continue;be==="?"?U.state=P.PROC_INST_ENDING:U.procInstBody+=be;continue;case P.PROC_INST_ENDING:be===">"?(ye(U,"onprocessinginstruction",{name:U.procInstName,body:U.procInstBody}),U.procInstName=U.procInstBody="",U.state=P.TEXT):(U.procInstBody+="?"+be,U.state=P.PROC_INST_BODY);continue;case P.OPEN_TAG:R(he,be)?U.tagName+=be:(q(U),be===">"?se(U):be==="/"?U.state=P.OPEN_TAG_SLASH:(ne(be)||ge(U,"Invalid character in tag name"),U.state=P.ATTRIB));continue;case P.OPEN_TAG_SLASH:be===">"?(se(U,!0),K(U)):(ge(U,"Forward-slash in opening tag not followed by >"),U.state=P.ATTRIB);continue;case P.ATTRIB:if(ne(be))continue;be===">"?se(U):be==="/"?U.state=P.OPEN_TAG_SLASH:R(ce,be)?(U.attribName=be,U.attribValue="",U.state=P.ATTRIB_NAME):ge(U,"Invalid attribute name");continue;case P.ATTRIB_NAME:be==="="?U.state=P.ATTRIB_VALUE:be===">"?(ge(U,"Attribute without value"),U.attribValue=U.attribName,$(U),se(U)):ne(be)?U.state=P.ATTRIB_NAME_SAW_WHITE:R(he,be)?U.attribName+=be:ge(U,"Invalid attribute name");continue;case P.ATTRIB_NAME_SAW_WHITE:if(be==="=")U.state=P.ATTRIB_VALUE;else{if(ne(be))continue;ge(U,"Attribute without value"),U.tag.attributes[U.attribName]="",U.attribValue="",ye(U,"onattribute",{name:U.attribName,value:""}),U.attribName="",be===">"?se(U):R(ce,be)?(U.attribName=be,U.state=P.ATTRIB_NAME):(ge(U,"Invalid attribute name"),U.state=P.ATTRIB)}continue;case P.ATTRIB_VALUE:if(ne(be))continue;W(be)?(U.q=be,U.state=P.ATTRIB_VALUE_QUOTED):(ge(U,"Unquoted attribute value"),U.state=P.ATTRIB_VALUE_UNQUOTED,U.attribValue=be);continue;case P.ATTRIB_VALUE_QUOTED:if(be!==U.q){be==="&"?U.state=P.ATTRIB_VALUE_ENTITY_Q:U.attribValue+=be;continue}$(U),U.q="",U.state=P.ATTRIB_VALUE_CLOSED;continue;case P.ATTRIB_VALUE_CLOSED:ne(be)?U.state=P.ATTRIB:be===">"?se(U):be==="/"?U.state=P.OPEN_TAG_SLASH:R(ce,be)?(ge(U,"No whitespace between attributes"),U.attribName=be,U.attribValue="",U.state=P.ATTRIB_NAME):ge(U,"Invalid attribute name");continue;case P.ATTRIB_VALUE_UNQUOTED:if(!z(be)){be==="&"?U.state=P.ATTRIB_VALUE_ENTITY_U:U.attribValue+=be;continue}$(U),be===">"?se(U):U.state=P.ATTRIB;continue;case P.CLOSE_TAG:if(U.tagName)be===">"?K(U):R(he,be)?U.tagName+=be:U.script?(U.script+="</"+U.tagName,U.tagName="",U.state=P.SCRIPT):(ne(be)||ge(U,"Invalid tagname in closing tag"),U.state=P.CLOSE_TAG_SAW_WHITE);else{if(ne(be))continue;w(ce,be)?U.script?(U.script+="</"+be,U.state=P.SCRIPT):ge(U,"Invalid tagname in closing tag."):U.tagName=be}continue;case P.CLOSE_TAG_SAW_WHITE:if(ne(be))continue;be===">"?K(U):ge(U,"Invalid characters in closing tag");continue;case P.TEXT_ENTITY:case P.ATTRIB_VALUE_ENTITY_Q:case P.ATTRIB_VALUE_ENTITY_U:var Be,Ue;switch(U.state){case P.TEXT_ENTITY:Be=P.TEXT,Ue="textNode";break;case P.ATTRIB_VALUE_ENTITY_Q:Be=P.ATTRIB_VALUE_QUOTED,Ue="attribValue";break;case P.ATTRIB_VALUE_ENTITY_U:Be=P.ATTRIB_VALUE_UNQUOTED,Ue="attribValue";break}be===";"?(U[Ue]+=Y(U),U.entity="",U.state=Be):R(U.entity.length?ve:V,be)?U.entity+=be:(ge(U,"Invalid character in entity name"),U[Ue]+="&"+U.entity+be,U.entity="",U.state=Be);continue;default:throw new Error(U,"Unknown state: "+U.state)}}return U.position>=U.bufferCheckPosition&&T(U),U}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */O.default||function(){var E=String.fromCharCode,U=Math.floor,xe=function(){var Te=16384,Fe=[],Be,Ue,ze=-1,Ve=arguments.length;if(!Ve)return"";for(var Xe="";++ze<Ve;){var Je=Number(arguments[ze]);if(!isFinite(Je)||Je<0||Je>1114111||U(Je)!==Je)throw RangeError("Invalid code point: "+Je);Je<=65535?Fe.push(Je):(Je-=65536,Be=(Je>>10)+55296,Ue=Je%1024+56320,Fe.push(Be,Ue)),(ze+1===Ve||Fe.length>Te)&&(Xe+=E.apply(null,Fe),Fe.length=0)}return Xe};l.default?Object.defineProperty(String,"fromCodePoint",{value:xe,configurable:!0,writable:!0}):String.fromCodePoint=xe}()})(typeof d=="undefined"?(void 0).sax={}:d)}).call(this,a("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(a,G,d){G.exports=O;var f=a("events").EventEmitter,i=a("inherits");i(O,f),O.Readable=a("readable-stream/readable.js"),O.Writable=a("readable-stream/writable.js"),O.Duplex=a("readable-stream/duplex.js"),O.Transform=a("readable-stream/transform.js"),O.PassThrough=a("readable-stream/passthrough.js"),O.Stream=O;function O(){f.call(this)}O.prototype.pipe=function(C,x){var m=this;function h(v){C.writable&&(C.write(v)===!1&&m.pause&&m.pause())}m.on("data",h);function s(){m.readable&&m.resume&&m.resume()}C.on("drain",s),!C._isStdio&&(!x||x.end!==!1)&&(m.on("end",u),m.on("close",o));var l=!1;function u(){if(l)return;l=!0,C.end()}function o(){if(l)return;l=!0,typeof C.destroy=="function"&&C.destroy()}function g(v){if(p(),f.listenerCount(this,"error")===0)throw v}m.on("error",g),C.on("error",g);function p(){m.removeListener("data",h),C.removeListener("drain",s),m.removeListener("end",u),m.removeListener("close",o),m.removeListener("error",g),C.removeListener("error",g),m.removeListener("end",p),m.removeListener("close",p),C.removeListener("close",p)}return m.on("end",p),m.on("close",p),C.on("close",p),C.emit("pipe",m),C}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(a,G,d){(function(f){var i=a("./lib/request"),O=a("./lib/response"),C=a("xtend"),x=a("builtin-status-codes"),m=a("url"),h=d;h.request=function(s,l){typeof s=="string"?s=m.parse(s):s=C(s);var u=f.location.protocol.search(/^https?:$/)===-1?"http:":"",o=s.protocol||u,g=s.hostname||s.host,p=s.port,v=s.path||"/";g&&g.indexOf(":")!==-1&&(g="["+g+"]"),s.url=(g?o+"//"+g:"")+(p?":"+p:"")+v,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var _=new i(s);return l&&_.on("response",l),_},h.get=function(l,u){var o=h.request(l,u);return o.end(),o},h.ClientRequest=i,h.IncomingMessage=O.IncomingMessage,h.Agent=function(){},h.Agent.defaultMaxSockets=4,h.globalAgent=new h.Agent,h.STATUS_CODES=x,h.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(a,G,d){(function(f){"use strict";d.fetch=h(f.fetch)&&h(f.ReadableStream),d.writableStream=h(f.WritableStream),d.abortController=h(f.AbortController),d.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),d.blobConstructor=!0}catch(s){}var i;function O(){if(i!==void 0)return i;if(f.XMLHttpRequest){i=new f.XMLHttpRequest;try{i.open("GET",f.XDomainRequest?"/":"https://example.com")}catch(s){i=null}}else i=null;return i}function C(s){var l=O();if(!l)return!1;try{return l.responseType=s,l.responseType===s}catch(u){}return!1}var x=typeof f.ArrayBuffer!="undefined",m=x&&h(f.ArrayBuffer.prototype.slice);d.arraybuffer=d.fetch||x&&C("arraybuffer"),d.msstream=!d.fetch&&m&&C("ms-stream"),d.mozchunkedarraybuffer=!d.fetch&&x&&C("moz-chunked-arraybuffer"),d.overrideMimeType=d.fetch||(O()?h(O().overrideMimeType):!1),d.vbArray=h(f.VBArray);function h(s){return typeof s=="function"}i=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(a,G,d){(function(f,i,O){"use strict";var C=a("babel-runtime/core-js/object/keys"),x=m(C);function m(T){return T&&T.__esModule?T:{default:T}}var h=a("./capability"),s=a("inherits"),l=a("./response"),u=a("readable-stream"),o=a("to-arraybuffer"),g=l.IncomingMessage,p=l.readyStates;function v(T,M){return h.fetch&&M?"fetch":h.mozchunkedarraybuffer?"moz-chunked-arraybuffer":h.msstream?"ms-stream":h.arraybuffer&&T?"arraybuffer":h.vbArray&&T?"text:vbarray":"text"}var _=G.exports=function(T){var M=this;u.Writable.call(M),M._opts=T,M._body=[],M._headers={},T.auth&&M.setHeader("Authorization","Basic "+new O(T.auth).toString("base64")),(0,x.default)(T.headers).forEach(function(D){M.setHeader(D,T.headers[D])});var I,j=!0;if(T.mode==="disable-fetch"||"requestTimeout"in T&&!h.abortController)j=!1,I=!0;else if(T.mode==="prefer-streaming")I=!1;else if(T.mode==="allow-wrong-content-type")I=!h.overrideMimeType;else if(!T.mode||T.mode==="default"||T.mode==="prefer-fast")I=!0;else throw new Error("Invalid value for opts.mode");M._mode=v(I,j),M._fetchTimer=null,M.on("finish",function(){M._onFinish()})};s(_,u.Writable),_.prototype.setHeader=function(T,M){var I=this,j=T.toLowerCase();if(k.indexOf(j)!==-1)return;I._headers[j]={name:T,value:M}},_.prototype.getHeader=function(T){var M=this._headers[T.toLowerCase()];return M?M.value:null},_.prototype.removeHeader=function(T){var M=this;delete M._headers[T.toLowerCase()]},_.prototype._onFinish=function(){var T=this;if(T._destroyed)return;var M=T._opts,I=T._headers,j=null;M.method!=="GET"&&M.method!=="HEAD"&&(h.arraybuffer?j=o(O.concat(T._body)):h.blobConstructor?j=new i.Blob(T._body.map(function(F){return o(F)}),{type:(I["content-type"]||{}).value||""}):j=O.concat(T._body).toString());var D=[];if((0,x.default)(I).forEach(function(F){var H=I[F].name,Z=I[F].value;Array.isArray(Z)?Z.forEach(function(ce){D.push([H,ce])}):D.push([H,Z])}),T._mode==="fetch"){var y=null,J=null;if(h.abortController){var X=new AbortController;y=X.signal,T._fetchAbortController=X,"requestTimeout"in M&&M.requestTimeout!==0&&(T._fetchTimer=i.setTimeout(function(){T.emit("requestTimeout"),T._fetchAbortController&&T._fetchAbortController.abort()},M.requestTimeout))}i.fetch(T._opts.url,{method:T._opts.method,headers:D,body:j||void 0,mode:"cors",credentials:M.withCredentials?"include":"same-origin",signal:y}).then(function(F){T._fetchResponse=F,T._connect()},function(F){i.clearTimeout(T._fetchTimer),T._destroyed||T.emit("error",F)})}else{var N=T._xhr=new i.XMLHttpRequest;try{N.open(T._opts.method,T._opts.url,!0)}catch(F){f.nextTick(function(){T.emit("error",F)});return}"responseType"in N&&(N.responseType=T._mode.split(":")[0]),"withCredentials"in N&&(N.withCredentials=!!M.withCredentials),T._mode==="text"&&"overrideMimeType"in N&&N.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in M&&(N.timeout=M.requestTimeout,N.ontimeout=function(){T.emit("requestTimeout")}),D.forEach(function(F){N.setRequestHeader(F[0],F[1])}),T._response=null,N.onreadystatechange=function(){switch(N.readyState){case p.LOADING:case p.DONE:T._onXHRProgress();break}},T._mode==="moz-chunked-arraybuffer"&&(N.onprogress=function(){T._onXHRProgress()}),N.onerror=function(){if(T._destroyed)return;T.emit("error",new Error("XHR error"))};try{N.send(j)}catch(F){f.nextTick(function(){T.emit("error",F)});return}}};function S(T){try{var M=T.status;return M!==null&&M!==0}catch(I){return!1}}_.prototype._onXHRProgress=function(){var T=this;if(!S(T._xhr)||T._destroyed)return;T._response||T._connect(),T._response._onXHRProgress()},_.prototype._connect=function(){var T=this;if(T._destroyed)return;T._response=new g(T._xhr,T._fetchResponse,T._mode,T._fetchTimer),T._response.on("error",function(M){T.emit("error",M)}),T.emit("response",T._response)},_.prototype._write=function(T,M,I){var j=this;j._body.push(T),I()},_.prototype.abort=_.prototype.destroy=function(){var T=this;T._destroyed=!0,i.clearTimeout(T._fetchTimer),T._response&&(T._response._destroyed=!0),T._xhr?T._xhr.abort():T._fetchAbortController&&T._fetchAbortController.abort()},_.prototype.end=function(T,M,I){var j=this;typeof T=="function"&&(I=T,T=void 0),u.Writable.prototype.end.call(j,T,M,I)},_.prototype.flushHeaders=function(){},_.prototype.setTimeout=function(){},_.prototype.setNoDelay=function(){},_.prototype.setSocketKeepAlive=function(){};var k=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,a("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},a("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(a,G,d){(function(f,i,O){"use strict";var C=a("babel-runtime/core-js/promise"),x=m(C);function m(g){return g&&g.__esModule?g:{default:g}}var h=a("./capability"),s=a("inherits"),l=a("readable-stream"),u=d.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},o=d.IncomingMessage=function(g,p,v,_){var S=this;if(l.Readable.call(S),S._mode=v,S.headers={},S.rawHeaders=[],S.trailers={},S.rawTrailers=[],S.on("end",function(){f.nextTick(function(){S.emit("close")})}),v==="fetch"){var k=function y(){M.read().then(function(J){if(S._destroyed)return;if(J.done){i.clearTimeout(_),S.push(null);return}S.push(new O(J.value)),y()}).catch(function(J){i.clearTimeout(_),S._destroyed||S.emit("error",J)})};if(S._fetchResponse=p,S.url=p.url,S.statusCode=p.status,S.statusMessage=p.statusText,p.headers.forEach(function(y,J){S.headers[J.toLowerCase()]=y,S.rawHeaders.push(J,y)}),h.writableStream){var T=new WritableStream({write:function(J){return new x.default(function(X,N){S._destroyed?N():S.push(new O(J))?X():S._resumeFetch=X})},close:function(){i.clearTimeout(_),S._destroyed||S.push(null)},abort:function(J){S._destroyed||S.emit("error",J)}});try{p.body.pipeTo(T).catch(function(y){i.clearTimeout(_),S._destroyed||S.emit("error",y)});return}catch(y){}}var M=p.body.getReader();k()}else{S._xhr=g,S._pos=0,S.url=g.responseURL,S.statusCode=g.status,S.statusMessage=g.statusText;var I=g.getAllResponseHeaders().split(/\r?\n/);if(I.forEach(function(y){var J=y.match(/^([^:]+):\s*(.*)/);if(J){var X=J[1].toLowerCase();X==="set-cookie"?(S.headers[X]===void 0&&(S.headers[X]=[]),S.headers[X].push(J[2])):S.headers[X]!==void 0?S.headers[X]+=", "+J[2]:S.headers[X]=J[2],S.rawHeaders.push(J[1],J[2])}}),S._charset="x-user-defined",!h.overrideMimeType){var j=S.rawHeaders["mime-type"];if(j){var D=j.match(/;\s*charset=([^;])(;|$)/);D&&(S._charset=D[1].toLowerCase())}S._charset||(S._charset="utf-8")}}};s(o,l.Readable),o.prototype._read=function(){var g=this,p=g._resumeFetch;p&&(g._resumeFetch=null,p())},o.prototype._onXHRProgress=function(){var g=this,p=g._xhr,v=null;switch(g._mode){case"text:vbarray":if(p.readyState!==u.DONE)break;try{v=new i.VBArray(p.responseBody).toArray()}catch(M){}if(v!==null){g.push(new O(v));break}case"text":try{v=p.responseText}catch(M){g._mode="text:vbarray";break}if(v.length>g._pos){var _=v.substr(g._pos);if(g._charset==="x-user-defined"){for(var S=new O(_.length),k=0;k<_.length;k++)S[k]=_.charCodeAt(k)&255;g.push(S)}else g.push(_,g._charset);g._pos=v.length}break;case"arraybuffer":if(p.readyState!==u.DONE||!p.response)break;v=p.response,g.push(new O(new Uint8Array(v)));break;case"moz-chunked-arraybuffer":if(v=p.response,p.readyState!==u.LOADING||!v)break;g.push(new O(new Uint8Array(v)));break;case"ms-stream":if(v=p.response,p.readyState!==u.LOADING)break;var T=new i.MSStreamReader;T.onprogress=function(){T.result.byteLength>g._pos&&(g.push(new O(new Uint8Array(T.result.slice(g._pos)))),g._pos=T.result.byteLength)},T.onload=function(){g.push(null)},T.readAsArrayBuffer(v);break}g._xhr.readyState===u.DONE&&g._mode!=="ms-stream"&&g.push(null)}}).call(this,a("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},a("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(a,G,d){"use strict";var f=a("safe-buffer").Buffer,i=f.isEncoding||function(T){T=""+T;switch(T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function O(T){if(!T)return"utf8";for(var M;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(M)return;T=(""+T).toLowerCase(),M=!0}}function C(T){var M=O(T);if(typeof M!="string"&&(f.isEncoding===i||!i(T)))throw new Error("Unknown encoding: "+T);return M||T}d.StringDecoder=x;function x(T){this.encoding=C(T);var M;switch(this.encoding){case"utf16le":this.text=g,this.end=p,M=4;break;case"utf8":this.fillLast=l,M=4;break;case"base64":this.text=v,this.end=_,M=3;break;default:this.write=S,this.end=k;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=f.allocUnsafe(M)}x.prototype.write=function(T){if(T.length===0)return"";var M,I;if(this.lastNeed){if(M=this.fillLast(T),M===void 0)return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I<T.length?M?M+this.text(T,I):this.text(T,I):M||""},x.prototype.end=o,x.prototype.text=u,x.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function m(T){return T<=127?0:T>>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function h(T,M,I){var j=M.length-1;if(j<I)return 0;var D=m(M[j]);return D>=0?(D>0&&(T.lastNeed=D-1),D):--j<I||D===-2?0:(D=m(M[j]),D>=0?(D>0&&(T.lastNeed=D-2),D):--j<I||D===-2?0:(D=m(M[j]),D>=0?(D>0&&(D===2?D=0:T.lastNeed=D-3),D):0))}function s(T,M,I){if((M[0]&192)!==128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&M.length>1){if((M[1]&192)!==128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&M.length>2&&(M[2]&192)!==128)return T.lastNeed=2,"\uFFFD"}}function l(T){var M=this.lastTotal-this.lastNeed,I=s(this,T,M);if(I!==void 0)return I;if(this.lastNeed<=T.length)return T.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,M,0,T.length),this.lastNeed-=T.length}function u(T,M){var I=h(this,T,M);if(!this.lastNeed)return T.toString("utf8",M);this.lastTotal=I;var j=T.length-(I-this.lastNeed);return T.copy(this.lastChar,0,j),T.toString("utf8",M,j)}function o(T){var M=T&&T.length?this.write(T):"";return this.lastNeed?M+"\uFFFD":M}function g(T,M){if((T.length-M)%2===0){var I=T.toString("utf16le",M);if(I){var j=I.charCodeAt(I.length-1);if(j>=55296&&j<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",M,T.length-1)}function p(T){var M=T&&T.length?this.write(T):"";if(this.lastNeed){var I=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,I)}return M}function v(T,M){var I=(T.length-M)%3;return I===0?T.toString("base64",M):(this.lastNeed=3-I,this.lastTotal=3,I===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",M,T.length-I))}function _(T){var M=T&&T.length?this.write(T):"";return this.lastNeed?M+this.lastChar.toString("base64",0,3-this.lastNeed):M}function S(T){return T.toString(this.encoding)}function k(T){return T&&T.length?this.write(T):""}},{"safe-buffer":228}],236:[function(a,G,d){(function(f,i){var O=a("process/browser.js").nextTick,C=Function.prototype.apply,x=Array.prototype.slice,m={},h=0;d.setTimeout=function(){return new s(C.call(setTimeout,window,arguments),clearTimeout)},d.setInterval=function(){return new s(C.call(setInterval,window,arguments),clearInterval)},d.clearTimeout=d.clearInterval=function(l){l.close()};function s(l,u){this._id=l,this._clearFn=u}s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},d.enroll=function(l,u){clearTimeout(l._idleTimeoutId),l._idleTimeout=u},d.unenroll=function(l){clearTimeout(l._idleTimeoutId),l._idleTimeout=-1},d._unrefActive=d.active=function(l){clearTimeout(l._idleTimeoutId);var u=l._idleTimeout;u>=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},u))},d.setImmediate=typeof f=="function"?f:function(l){var u=h++,o=arguments.length<2?!1:x.call(arguments,1);return m[u]=!0,O(function(){m[u]&&(o?l.apply(null,o):l.call(null),d.clearImmediate(u))}),u},d.clearImmediate=typeof i=="function"?i:function(l){delete m[l]}}).call(this,a("timers").setImmediate,a("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(a,G,d){var f=a("buffer").Buffer;G.exports=function(i){if(i instanceof Uint8Array){if(i.byteOffset===0&&i.byteLength===i.buffer.byteLength)return i.buffer;if(typeof i.buffer.slice=="function")return i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)}if(f.isBuffer(i)){for(var O=new Uint8Array(i.length),C=i.length,x=0;x<C;x++)O[x]=i[x];return O.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(a,G,d){"use strict";var f=a("punycode"),i=a("./util");d.parse=M,d.resolve=j,d.resolveObject=D,d.format=I,d.Url=O;function O(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var C=/^([a-z0-9.+-]+:)/i,x=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],s=["{","}","|","\\","^","`"].concat(h),l=["'"].concat(s),u=["%","/","?",";","#"].concat(l),o=["/","?","#"],g=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=a("querystring");function M(y,J,X){if(y&&i.isObject(y)&&y instanceof O)return y;var N=new O;return N.parse(y,J,X),N}O.prototype.parse=function(y,J,X){if(!i.isString(y))throw new TypeError("Parameter 'url' must be a string, not "+typeof y);var N=y.indexOf("?"),F=N!==-1&&N<y.indexOf("#")?"?":"#",H=y.split(F),Z=/\\/g;H[0]=H[0].replace(Z,"/"),y=H.join(F);var ce=y;if(ce=ce.trim(),!X&&y.split("#").length===1){var he=m.exec(ce);if(he)return this.path=ce,this.href=ce,this.pathname=he[1],he[2]?(this.search=he[2],J?this.query=T.parse(this.search.substr(1)):this.query=this.search.substr(1)):J&&(this.search="",this.query={}),this}var V=C.exec(ce);if(V){V=V[0];var ve=V.toLowerCase();this.protocol=ve,ce=ce.substr(V.length)}if(X||V||ce.match(/^\/\/[^@\/]+@[^@\/]+/)){var ne=ce.substr(0,2)==="//";ne&&!(V&&S[V])&&(ce=ce.substr(2),this.slashes=!0)}if(!S[V]&&(ne||V&&!k[V])){for(var W=-1,z=0;z<o.length;z++){var R=ce.indexOf(o[z]);R!==-1&&(W===-1||R<W)&&(W=R)}var w,P;W===-1?P=ce.lastIndexOf("@"):P=ce.lastIndexOf("@",W),P!==-1&&(w=ce.slice(0,P),ce=ce.slice(P+1),this.auth=decodeURIComponent(w)),W=-1;for(var z=0;z<u.length;z++){var R=ce.indexOf(u[z]);R!==-1&&(W===-1||R<W)&&(W=R)}W===-1&&(W=ce.length),this.host=ce.slice(0,W),ce=ce.slice(W),this.parseHost(),this.hostname=this.hostname||"";var le=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!le)for(var pe=this.hostname.split(/\./),z=0,ye=pe.length;z<ye;z++){var Ee=pe[z];if(!Ee)continue;if(!Ee.match(p)){for(var Oe="",ae=0,fe=Ee.length;ae<fe;ae++)Ee.charCodeAt(ae)>127?Oe+="x":Oe+=Ee[ae];if(!Oe.match(p)){var ge=pe.slice(0,z),q=pe.slice(z+1),ie=Ee.match(v);ie&&(ge.push(ie[1]),q.unshift(ie[2])),q.length&&(ce="/"+q.join(".")+ce),this.hostname=ge.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),le||(this.hostname=f.toASCII(this.hostname));var $=this.port?":"+this.port:"",se=this.hostname||"";this.host=se+$,this.href+=this.host,le&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ce[0]!=="/"&&(ce="/"+ce))}if(!_[ve])for(var z=0,ye=l.length;z<ye;z++){var K=l[z];if(ce.indexOf(K)===-1)continue;var Y=encodeURIComponent(K);Y===K&&(Y=escape(K)),ce=ce.split(K).join(Y)}var Ce=ce.indexOf("#");Ce!==-1&&(this.hash=ce.substr(Ce),ce=ce.slice(0,Ce));var Q=ce.indexOf("?");if(Q!==-1?(this.search=ce.substr(Q),this.query=ce.substr(Q+1),J&&(this.query=T.parse(this.query)),ce=ce.slice(0,Q)):J&&(this.search="",this.query={}),ce&&(this.pathname=ce),k[ve]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var $=this.pathname||"",B=this.search||"";this.path=$+B}return this.href=this.format(),this};function I(y){return i.isString(y)&&(y=M(y)),y instanceof O?y.format():O.prototype.format.call(y)}O.prototype.format=function(){var y=this.auth||"";y&&(y=encodeURIComponent(y),y=y.replace(/%3A/i,":"),y+="@");var J=this.protocol||"",X=this.pathname||"",N=this.hash||"",F=!1,H="";this.host?F=y+this.host:this.hostname&&(F=y+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(F+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(H=T.stringify(this.query));var Z=this.search||H&&"?"+H||"";return J&&J.substr(-1)!==":"&&(J+=":"),this.slashes||(!J||k[J])&&F!==!1?(F="//"+(F||""),X&&X.charAt(0)!=="/"&&(X="/"+X)):F||(F=""),N&&N.charAt(0)!=="#"&&(N="#"+N),Z&&Z.charAt(0)!=="?"&&(Z="?"+Z),X=X.replace(/[?#]/g,function(ce){return encodeURIComponent(ce)}),Z=Z.replace("#","%23"),J+F+X+Z+N};function j(y,J){return M(y,!1,!0).resolve(J)}O.prototype.resolve=function(y){return this.resolveObject(M(y,!1,!0)).format()};function D(y,J){return y?M(y,!1,!0).resolveObject(J):J}O.prototype.resolveObject=function(y){if(i.isString(y)){var J=new O;J.parse(y,!1,!0),y=J}for(var X=new O,N=Object.keys(this),F=0;F<N.length;F++){var H=N[F];X[H]=this[H]}if(X.hash=y.hash,y.href==="")return X.href=X.format(),X;if(y.slashes&&!y.protocol){for(var Z=Object.keys(y),ce=0;ce<Z.length;ce++){var he=Z[ce];he!=="protocol"&&(X[he]=y[he])}return k[X.protocol]&&X.hostname&&!X.pathname&&(X.path=X.pathname="/"),X.href=X.format(),X}if(y.protocol&&y.protocol!==X.protocol){if(!k[y.protocol]){for(var V=Object.keys(y),ve=0;ve<V.length;ve++){var ne=V[ve];X[ne]=y[ne]}return X.href=X.format(),X}if(X.protocol=y.protocol,!y.host&&!S[y.protocol]){for(var ye=(y.pathname||"").split("/");ye.length&&!(y.host=ye.shift()););y.host||(y.host=""),y.hostname||(y.hostname=""),ye[0]!==""&&ye.unshift(""),ye.length<2&&ye.unshift(""),X.pathname=ye.join("/")}else X.pathname=y.pathname;if(X.search=y.search,X.query=y.query,X.host=y.host||"",X.auth=y.auth,X.hostname=y.hostname||y.host,X.port=y.port,X.pathname||X.search){var W=X.pathname||"",z=X.search||"";X.path=W+z}return X.slashes=X.slashes||y.slashes,X.href=X.format(),X}var R=X.pathname&&X.pathname.charAt(0)==="/",w=y.host||y.pathname&&y.pathname.charAt(0)==="/",P=w||R||X.host&&y.pathname,le=P,pe=X.pathname&&X.pathname.split("/")||[],ye=y.pathname&&y.pathname.split("/")||[],Ee=X.protocol&&!k[X.protocol];if(Ee&&(X.hostname="",X.port=null,X.host&&(pe[0]===""?pe[0]=X.host:pe.unshift(X.host)),X.host="",y.protocol&&(y.hostname=null,y.port=null,y.host&&(ye[0]===""?ye[0]=y.host:ye.unshift(y.host)),y.host=null),P=P&&(ye[0]===""||pe[0]==="")),w)X.host=y.host||y.host===""?y.host:X.host,X.hostname=y.hostname||y.hostname===""?y.hostname:X.hostname,X.search=y.search,X.query=y.query,pe=ye;else if(ye.length)pe||(pe=[]),pe.pop(),pe=pe.concat(ye),X.search=y.search,X.query=y.query;else if(!i.isNullOrUndefined(y.search)){if(Ee){X.hostname=X.host=pe.shift();var Oe=X.host&&X.host.indexOf("@")>0?X.host.split("@"):!1;Oe&&(X.auth=Oe.shift(),X.host=X.hostname=Oe.shift())}return X.search=y.search,X.query=y.query,(!i.isNull(X.pathname)||!i.isNull(X.search))&&(X.path=(X.pathname?X.pathname:"")+(X.search?X.search:"")),X.href=X.format(),X}if(!pe.length)return X.pathname=null,X.search?X.path="/"+X.search:X.path=null,X.href=X.format(),X;for(var ae=pe.slice(-1)[0],fe=(X.host||y.host||pe.length>1)&&(ae==="."||ae==="..")||ae==="",ge=0,q=pe.length;q>=0;q--)ae=pe[q],ae==="."?pe.splice(q,1):ae===".."?(pe.splice(q,1),ge++):ge&&(pe.splice(q,1),ge--);if(!P&&!le)for(;ge--;ge)pe.unshift("..");P&&pe[0]!==""&&(!pe[0]||pe[0].charAt(0)!=="/")&&pe.unshift(""),fe&&pe.join("/").substr(-1)!=="/"&&pe.push("");var ie=pe[0]===""||pe[0]&&pe[0].charAt(0)==="/";if(Ee){X.hostname=X.host=ie?"":pe.length?pe.shift():"";var Oe=X.host&&X.host.indexOf("@")>0?X.host.split("@"):!1;Oe&&(X.auth=Oe.shift(),X.host=X.hostname=Oe.shift())}return P=P||X.host&&pe.length,P&&!ie&&pe.unshift(""),pe.length?X.pathname=pe.join("/"):(X.pathname=null,X.path=null),(!i.isNull(X.pathname)||!i.isNull(X.search))&&(X.path=(X.pathname?X.pathname:"")+(X.search?X.search:"")),X.auth=y.auth||X.auth,X.slashes=X.slashes||y.slashes,X.href=X.format(),X},O.prototype.parseHost=function(){var y=this.host,J=x.exec(y);J&&(J=J[0],J!==":"&&(this.port=J.substr(1)),y=y.substr(0,y.length-J.length)),y&&(this.hostname=y)}},{"./util":239,punycode:209,querystring:212}],239:[function(a,G,d){"use strict";G.exports={isString:function(f){return typeof f=="string"},isObject:function(f){return typeof f=="object"&&f!==null},isNull:function(f){return f===null},isNullOrUndefined:function(f){return f==null}}},{}],240:[function(a,G,d){(function(f){G.exports=i;function i(C,x){if(O("noDeprecation"))return C;var m=!1;function h(){if(!m){if(O("throwDeprecation"))throw new Error(x);O("traceDeprecation")?console.trace(x):console.warn(x),m=!0}return C.apply(this,arguments)}return h}function O(C){try{if(!f.localStorage)return!1}catch(m){return!1}var x=f.localStorage[C];return x==null?!1:String(x).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(a,G,d){typeof Object.create=="function"?G.exports=function(i,O){i.super_=O,i.prototype=Object.create(O.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}})}:G.exports=function(i,O){i.super_=O;var C=function(){};C.prototype=O.prototype,i.prototype=new C,i.prototype.constructor=i}},{}],242:[function(a,G,d){G.exports=function(i){return i&&typeof i=="object"&&typeof i.copy=="function"&&typeof i.fill=="function"&&typeof i.readUInt8=="function"}},{}],243:[function(a,G,d){(function(f,i){var O=/%[sdj%]/g;d.format=function(W){if(!j(W)){for(var z=[],R=0;R<arguments.length;R++)z.push(m(arguments[R]));return z.join(" ")}for(var R=1,w=arguments,P=w.length,le=String(W).replace(O,function(ye){if(ye==="%%")return"%";if(R>=P)return ye;switch(ye){case"%s":return String(w[R++]);case"%d":return Number(w[R++]);case"%j":try{return JSON.stringify(w[R++])}catch(Ee){return"[Circular]"}default:return ye}}),pe=w[R];R<P;pe=w[++R])T(pe)||!X(pe)?le+=" "+pe:le+=" "+m(pe);return le},d.deprecate=function(W,z){if(y(i.process))return function(){return d.deprecate(W,z).apply(this,arguments)};if(f.noDeprecation===!0)return W;var R=!1;function w(){if(!R){if(f.throwDeprecation)throw new Error(z);f.traceDeprecation?console.trace(z):console.error(z),R=!0}return W.apply(this,arguments)}return w};var C={},x;d.debuglog=function(W){if(y(x)&&(x=f.env.NODE_DEBUG||""),W=W.toUpperCase(),!C[W])if(new RegExp("\\b"+W+"\\b","i").test(x)){var z=f.pid;C[W]=function(){var R=d.format.apply(d,arguments);console.error("%s %d: %s",W,z,R)}}else C[W]=function(){};return C[W]};function m(W,z){var R={seen:[],stylize:s};return arguments.length>=3&&(R.depth=arguments[2]),arguments.length>=4&&(R.colors=arguments[3]),k(z)?R.showHidden=z:z&&d._extend(R,z),y(R.showHidden)&&(R.showHidden=!1),y(R.depth)&&(R.depth=2),y(R.colors)&&(R.colors=!1),y(R.customInspect)&&(R.customInspect=!0),R.colors&&(R.stylize=h),u(R,W,R.depth)}d.inspect=m,m.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(W,z){var R=m.styles[z];return R?"["+m.colors[R][0]+"m"+W+"["+m.colors[R][1]+"m":W}function s(W,z){return W}function l(W){var z={};return W.forEach(function(R,w){z[R]=!0}),z}function u(W,z,R){if(W.customInspect&&z&&H(z.inspect)&&z.inspect!==d.inspect&&!(z.constructor&&z.constructor.prototype===z)){var w=z.inspect(R,W);return j(w)||(w=u(W,w,R)),w}var P=o(W,z);if(P)return P;var le=Object.keys(z),pe=l(le);if(W.showHidden&&(le=Object.getOwnPropertyNames(z)),F(z)&&(le.indexOf("message")>=0||le.indexOf("description")>=0))return g(z);if(le.length===0){if(H(z)){var ye=z.name?": "+z.name:"";return W.stylize("[Function"+ye+"]","special")}if(J(z))return W.stylize(RegExp.prototype.toString.call(z),"regexp");if(N(z))return W.stylize(Date.prototype.toString.call(z),"date");if(F(z))return g(z)}var Ee="",Oe=!1,ae=["{","}"];if(S(z)&&(Oe=!0,ae=["[","]"]),H(z)){var fe=z.name?": "+z.name:"";Ee=" [Function"+fe+"]"}if(J(z)&&(Ee=" "+RegExp.prototype.toString.call(z)),N(z)&&(Ee=" "+Date.prototype.toUTCString.call(z)),F(z)&&(Ee=" "+g(z)),le.length===0&&(!Oe||z.length==0))return ae[0]+Ee+ae[1];if(R<0)return J(z)?W.stylize(RegExp.prototype.toString.call(z),"regexp"):W.stylize("[Object]","special");W.seen.push(z);var ge;return Oe?ge=p(W,z,R,pe,le):ge=le.map(function(q){return v(W,z,R,pe,q,Oe)}),W.seen.pop(),_(ge,Ee,ae)}function o(W,z){if(y(z))return W.stylize("undefined","undefined");if(j(z)){var R="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(R,"string")}if(I(z))return W.stylize(""+z,"number");if(k(z))return W.stylize(""+z,"boolean");if(T(z))return W.stylize("null","null")}function g(W){return"["+Error.prototype.toString.call(W)+"]"}function p(W,z,R,w,P){for(var le=[],pe=0,ye=z.length;pe<ye;++pe)ne(z,String(pe))?le.push(v(W,z,R,w,String(pe),!0)):le.push("");return P.forEach(function(Ee){Ee.match(/^\d+$/)||le.push(v(W,z,R,w,Ee,!0))}),le}function v(W,z,R,w,P,le){var pe,ye,Ee;if(Ee=Object.getOwnPropertyDescriptor(z,P)||{value:z[P]},Ee.get?Ee.set?ye=W.stylize("[Getter/Setter]","special"):ye=W.stylize("[Getter]","special"):Ee.set&&(ye=W.stylize("[Setter]","special")),ne(w,P)||(pe="["+P+"]"),ye||(W.seen.indexOf(Ee.value)<0?(T(R)?ye=u(W,Ee.value,null):ye=u(W,Ee.value,R-1),ye.indexOf(`
|
|
|
`)>-1&&(le?ye=ye.split(`
|
|
|
`).map(function(Oe){return" "+Oe}).join(`
|
|
|
`).substr(2):ye=`
|
|
|
`+ye.split(`
|
|
|
`).map(function(Oe){return" "+Oe}).join(`
|
|
|
`))):ye=W.stylize("[Circular]","special")),y(pe)){if(le&&P.match(/^\d+$/))return ye;pe=JSON.stringify(""+P),pe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(pe=pe.substr(1,pe.length-2),pe=W.stylize(pe,"name")):(pe=pe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),pe=W.stylize(pe,"string"))}return pe+": "+ye}function _(W,z,R){var w=0,P=W.reduce(function(le,pe){return w++,pe.indexOf(`
|
|
|
`)>=0&&w++,le+pe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return P>60?R[0]+(z===""?"":z+`
|
|
|
`)+" "+W.join(`,
|
|
|
`)+" "+R[1]:R[0]+z+" "+W.join(", ")+" "+R[1]}function S(W){return Array.isArray(W)}d.isArray=S;function k(W){return typeof W=="boolean"}d.isBoolean=k;function T(W){return W===null}d.isNull=T;function M(W){return W==null}d.isNullOrUndefined=M;function I(W){return typeof W=="number"}d.isNumber=I;function j(W){return typeof W=="string"}d.isString=j;function D(W){return typeof W=="symbol"}d.isSymbol=D;function y(W){return W===void 0}d.isUndefined=y;function J(W){return X(W)&&ce(W)==="[object RegExp]"}d.isRegExp=J;function X(W){return typeof W=="object"&&W!==null}d.isObject=X;function N(W){return X(W)&&ce(W)==="[object Date]"}d.isDate=N;function F(W){return X(W)&&(ce(W)==="[object Error]"||W instanceof Error)}d.isError=F;function H(W){return typeof W=="function"}d.isFunction=H;function Z(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W=="undefined"}d.isPrimitive=Z,d.isBuffer=a("./support/isBuffer");function ce(W){return Object.prototype.toString.call(W)}function he(W){return W<10?"0"+W.toString(10):W.toString(10)}var V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ve(){var W=new Date,z=[he(W.getHours()),he(W.getMinutes()),he(W.getSeconds())].join(":");return[W.getDate(),V[W.getMonth()],z].join(" ")}d.log=function(){console.log("%s - %s",ve(),d.format.apply(d,arguments))},d.inherits=a("inherits"),d._extend=function(W,z){if(!z||!X(z))return W;for(var R=Object.keys(z),w=R.length;w--;)W[R[w]]=z[R[w]];return W};function ne(W,z){return Object.prototype.hasOwnProperty.call(W,z)}}).call(this,a("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(a,G,d){"use strict";(function(){"use strict";d.stripBOM=function(f){return f[0]==="\uFEFF"?f.substring(1):f}}).call(void 0)},{}],245:[function(a,G,d){"use strict";var f=a("babel-runtime/helpers/typeof"),i=x(f),O=a("babel-runtime/core-js/object/keys"),C=x(O);function x(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,h,s,l,u,o={}.hasOwnProperty;m=a("xmlbuilder"),h=a("./defaults").defaults,l=function(p){return typeof p=="string"&&(p.indexOf("&")>=0||p.indexOf(">")>=0||p.indexOf("<")>=0)},u=function(p){return"<![CDATA["+s(p)+"]]>"},s=function(p){return p.replace("]]>","]]]]><![CDATA[>")},d.Builder=function(){function g(p){var v,_,S;this.options={},_=h["0.2"];for(v in _){if(!o.call(_,v))continue;S=_[v],this.options[v]=S}for(v in p){if(!o.call(p,v))continue;S=p[v],this.options[v]=S}}return g.prototype.buildObject=function(p){var v,_,S,k,T;return v=this.options.attrkey,_=this.options.charkey,(0,C.default)(p).length===1&&this.options.rootName===h["0.2"].rootName?(T=(0,C.default)(p)[0],p=p[T]):T=this.options.rootName,S=function(M){return function(I,j){var D,y,J,X,N,F;if((typeof j=="undefined"?"undefined":(0,i.default)(j))!=="object")M.options.cdata&&l(j)?I.raw(u(j)):I.txt(j);else if(Array.isArray(j))for(X in j){if(!o.call(j,X))continue;y=j[X];for(N in y)J=y[N],I=S(I.ele(N),J).up()}else for(N in j){if(!o.call(j,N))continue;if(y=j[N],N===v){if((typeof y=="undefined"?"undefined":(0,i.default)(y))==="object")for(D in y)F=y[D],I=I.att(D,F)}else if(N===_)M.options.cdata&&l(y)?I=I.raw(u(y)):I=I.txt(y);else if(Array.isArray(y))for(X in y){if(!o.call(y,X))continue;J=y[X],typeof J=="string"?M.options.cdata&&l(J)?I=I.ele(N).raw(u(J)).up():I=I.ele(N,J).up():I=S(I.ele(N),J).up()}else(typeof y=="undefined"?"undefined":(0,i.default)(y))==="object"?I=S(I.ele(N),y).up():typeof y=="string"&&M.options.cdata&&l(y)?I=I.ele(N).raw(u(y)).up():(y==null&&(y=""),I=I.ele(N,y.toString()).up())}return I}}(this),k=m.create(T,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),S(k,p).end(this.options.renderOpts)},g}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(a,G,d){"use strict";(function(){d.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/promise"),i=l(f),O=a("babel-runtime/core-js/object/get-own-property-names"),C=l(O),x=a("babel-runtime/core-js/object/keys"),m=l(x),h=a("babel-runtime/helpers/typeof"),s=l(h);function l(u){return u&&u.__esModule?u:{default:u}}(function(){"use strict";var u,o,g,p,v,_,S,k,T=function(D,y){return function(){return D.apply(y,arguments)}},M=function(D,y){for(var J in y)I.call(y,J)&&(D[J]=y[J]);function X(){this.constructor=D}return X.prototype=y.prototype,D.prototype=new X,D.__super__=y.prototype,D},I={}.hasOwnProperty;S=a("sax"),g=a("events"),u=a("./bom"),_=a("./processors"),k=a("timers").setImmediate,o=a("./defaults").defaults,p=function(D){return(typeof D=="undefined"?"undefined":(0,s.default)(D))==="object"&&D!=null&&(0,m.default)(D).length===0},v=function(D,y,J){var X,N,F;for(X=0,N=D.length;X<N;X++)F=D[X],y=F(y,J);return y},d.Parser=function(j){M(D,j);function D(y){this.parseStringPromise=T(this.parseStringPromise,this),this.parseString=T(this.parseString,this),this.reset=T(this.reset,this),this.assignOrPush=T(this.assignOrPush,this),this.processAsync=T(this.processAsync,this);var J,X,N;if(!(this instanceof d.Parser))return new d.Parser(y);this.options={},X=o["0.2"];for(J in X){if(!I.call(X,J))continue;N=X[J],this.options[J]=N}for(J in y){if(!I.call(y,J))continue;N=y[J],this.options[J]=N}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(_.normalize)),this.reset()}return D.prototype.processAsync=function(){var y,J;try{return this.remaining.length<=this.options.chunkSize?(y=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(y),this.saxParser.close()):(y=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(y),k(this.processAsync))}catch(X){if(J=X,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(J)}},D.prototype.assignOrPush=function(y,J,X){return J in y?(y[J]instanceof Array||(y[J]=[y[J]]),y[J].push(X)):this.options.explicitArray?y[J]=[X]:y[J]=X},D.prototype.reset=function(){var y,J,X,N;return this.removeAllListeners(),this.saxParser=S.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(F){return function(H){if(F.saxParser.resume(),!F.saxParser.errThrown)return F.saxParser.errThrown=!0,F.emit("error",H)}}(this),this.saxParser.onend=function(F){return function(){if(!F.saxParser.ended)return F.saxParser.ended=!0,F.emit("end",F.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,N=[],y=this.options.attrkey,J=this.options.charkey,this.saxParser.onopentag=function(F){return function(H){var Z,ce,he,V,ve;if(he={},he[J]="",!F.options.ignoreAttrs){ve=H.attributes;for(Z in ve){if(!I.call(ve,Z))continue;!(y in he)&&!F.options.mergeAttrs&&(he[y]={}),ce=F.options.attrValueProcessors?v(F.options.attrValueProcessors,H.attributes[Z],Z):H.attributes[Z],V=F.options.attrNameProcessors?v(F.options.attrNameProcessors,Z):Z,F.options.mergeAttrs?F.assignOrPush(he,V,ce):he[y][V]=ce}}return he["#name"]=F.options.tagNameProcessors?v(F.options.tagNameProcessors,H.name):H.name,F.options.xmlns&&(he[F.options.xmlnskey]={uri:H.uri,local:H.local}),N.push(he)}}(this),this.saxParser.onclosetag=function(F){return function(){var H,Z,ce,he,V,ve,ne,W,z,R;if(ve=N.pop(),V=ve["#name"],(!F.options.explicitChildren||!F.options.preserveChildrenOrder)&&delete ve["#name"],ve.cdata===!0&&(H=ve.cdata,delete ve.cdata),z=N[N.length-1],ve[J].match(/^\s*$/)&&!H?(Z=ve[J],delete ve[J]):(F.options.trim&&(ve[J]=ve[J].trim()),F.options.normalize&&(ve[J]=ve[J].replace(/\s{2,}/g," ").trim()),ve[J]=F.options.valueProcessors?v(F.options.valueProcessors,ve[J],V):ve[J],(0,m.default)(ve).length===1&&J in ve&&!F.EXPLICIT_CHARKEY&&(ve=ve[J])),p(ve)&&(ve=F.options.emptyTag!==""?F.options.emptyTag:Z),F.options.validator!=null&&(R="/"+function(){var w,P,le;for(le=[],w=0,P=N.length;w<P;w++)he=N[w],le.push(he["#name"]);return le}().concat(V).join("/"),function(){var w;try{return ve=F.options.validator(R,z&&z[V],ve)}catch(P){return w=P,F.emit("error",w)}}()),F.options.explicitChildren&&!F.options.mergeAttrs&&(typeof ve=="undefined"?"undefined":(0,s.default)(ve))==="object"){if(!F.options.preserveChildrenOrder)he={},F.options.attrkey in ve&&(he[F.options.attrkey]=ve[F.options.attrkey],delete ve[F.options.attrkey]),!F.options.charsAsChildren&&F.options.charkey in ve&&(he[F.options.charkey]=ve[F.options.charkey],delete ve[F.options.charkey]),(0,C.default)(ve).length>0&&(he[F.options.childkey]=ve),ve=he;else if(z){z[F.options.childkey]=z[F.options.childkey]||[],ne={};for(ce in ve){if(!I.call(ve,ce))continue;ne[ce]=ve[ce]}z[F.options.childkey].push(ne),delete ve["#name"],(0,m.default)(ve).length===1&&J in ve&&!F.EXPLICIT_CHARKEY&&(ve=ve[J])}}return N.length>0?F.assignOrPush(z,V,ve):(F.options.explicitRoot&&(W=ve,ve={},ve[V]=W),F.resultObject=ve,F.saxParser.ended=!0,F.emit("end",F.resultObject))}}(this),X=function(F){return function(H){var Z,ce;if(ce=N[N.length-1],ce)return ce[J]+=H,F.options.explicitChildren&&F.options.preserveChildrenOrder&&F.options.charsAsChildren&&(F.options.includeWhiteChars||H.replace(/\\n/g,"").trim()!=="")&&(ce[F.options.childkey]=ce[F.options.childkey]||[],Z={"#name":"__text__"},Z[J]=H,F.options.normalize&&(Z[J]=Z[J].replace(/\s{2,}/g," ").trim()),ce[F.options.childkey].push(Z)),ce}}(this),this.saxParser.ontext=X,this.saxParser.oncdata=function(F){return function(H){var Z;if(Z=X(H),Z)return Z.cdata=!0}}(this)},D.prototype.parseString=function(y,J){var X;J!=null&&typeof J=="function"&&(this.on("end",function(N){return this.reset(),J(null,N)}),this.on("error",function(N){return this.reset(),J(N)}));try{return y=y.toString(),y.trim()===""?(this.emit("end",null),!0):(y=u.stripBOM(y),this.options.async?(this.remaining=y,k(this.processAsync),this.saxParser):this.saxParser.write(y).close())}catch(N){if(X=N,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw X}else return this.emit("error",X),this.saxParser.errThrown=!0}},D.prototype.parseStringPromise=function(y){return new i.default(function(J){return function(X,N){return J.parseString(y,function(F,H){return F?N(F):X(H)})}}(this))},D}(g),d.parseString=function(j,D,y){var J,X,N;return y!=null?(typeof y=="function"&&(J=y),(typeof D=="undefined"?"undefined":(0,s.default)(D))==="object"&&(X=D)):(typeof D=="function"&&(J=D),X={}),N=new d.Parser(X),N.parseString(j,J)},d.parseStringPromise=function(j,D){var y,J;return(typeof D=="undefined"?"undefined":(0,s.default)(D))==="object"&&(y=D),J=new d.Parser(y),J.parseStringPromise(j)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(a,G,d){"use strict";(function(){"use strict";var f;f=new RegExp(/(?!xmlns)^.*:/),d.normalize=function(i){return i.toLowerCase()},d.firstCharLowerCase=function(i){return i.charAt(0).toLowerCase()+i.slice(1)},d.stripPrefix=function(i){return i.replace(f,"")},d.parseNumbers=function(i){return isNaN(i)||(i=i%1===0?parseInt(i,10):parseFloat(i)),i},d.parseBooleans=function(i){return/^(?:true|false)$/i.test(i)&&(i=i.toLowerCase()==="true"),i}}).call(void 0)},{}],249:[function(a,G,d){"use strict";(function(){"use strict";var f,i,O,C,x=function(s,l){for(var u in l)m.call(l,u)&&(s[u]=l[u]);function o(){this.constructor=s}return o.prototype=l.prototype,s.prototype=new o,s.__super__=l.prototype,s},m={}.hasOwnProperty;i=a("./defaults"),f=a("./builder"),O=a("./parser"),C=a("./processors"),d.defaults=i.defaults,d.processors=C,d.ValidationError=function(h){x(s,h);function s(l){this.message=l}return s}(Error),d.Builder=f.Builder,d.Parser=O.Parser,d.parseString=O.parseString,d.parseStringPromise=O.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(a,G,d){"use strict";(function(){G.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(a,G,d){"use strict";(function(){G.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/get-prototype-of"),i=h(f),O=a("babel-runtime/helpers/typeof"),C=h(O),x=a("babel-runtime/core-js/object/assign"),m=h(x);function h(s){return s&&s.__esModule?s:{default:s}}(function(){var s,l,u,o,g,p,v,_=[].slice,S={}.hasOwnProperty;s=function(){var T,M,I,j,D,y;if(y=arguments[0],D=2<=arguments.length?_.call(arguments,1):[],g(m.default))m.default.apply(null,arguments);else for(T=0,I=D.length;T<I;T++)if(j=D[T],j!=null)for(M in j){if(!S.call(j,M))continue;y[M]=j[M]}return y},g=function(T){return!!T&&Object.prototype.toString.call(T)==="[object Function]"},p=function(T){var M;return!!T&&((M=typeof T=="undefined"?"undefined":(0,C.default)(T))==="function"||M==="object")},u=function(T){return g(Array.isArray)?Array.isArray(T):Object.prototype.toString.call(T)==="[object Array]"},o=function(T){var M;if(u(T))return!T.length;for(M in T){if(!S.call(T,M))continue;return!1}return!0},v=function(T){var M,I;return p(T)&&(I=(0,i.default)(T))&&(M=I.constructor)&&typeof M=="function"&&M instanceof M&&Function.prototype.toString.call(M)===Function.prototype.toString.call(Object)},l=function(T){return g(T.valueOf)?T.valueOf():T},G.exports.assign=s,G.exports.isFunction=g,G.exports.isObject=p,G.exports.isArray=u,G.exports.isEmpty=o,G.exports.isPlainObject=v,G.exports.getValue=l}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(a,G,d){"use strict";(function(){G.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m;C=a("./NodeType"),m=a("./XMLNode"),G.exports=x=function(){function h(s,l,u){if(this.parent=s,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),l==null)throw new Error("Missing attribute name. "+this.debugInfo(l));this.name=this.stringify.name(l),this.value=this.stringify.attValue(u),this.type=C.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(h.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(h.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(h.prototype,"textContent",{get:function(){return this.value},set:function(l){return this.value=l||""}}),Object.defineProperty(h.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(h.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(h.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(h.prototype,"specified",{get:function(){return!0}}),h.prototype.clone=function(){return(0,i.default)(this)},h.prototype.toString=function(s){return this.options.writer.attribute(this,this.options.writer.filterOptions(s))},h.prototype.debugInfo=function(s){return s=s||this.name,s==null?"parent: <"+this.parent.name+">":"attribute: {"+s+"}, parent: <"+this.parent.name+">"},h.prototype.isEqualNode=function(s){return s.namespaceURI!==this.namespaceURI||(s.prefix!==this.prefix||s.localName!==this.localName)?!1:!(s.value!==this.value)},h}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m,h=function(u,o){for(var g in o)s.call(o,g)&&(u[g]=o[g]);function p(){this.constructor=u}return p.prototype=o.prototype,u.prototype=new p,u.__super__=o.prototype,u},s={}.hasOwnProperty;C=a("./NodeType"),m=a("./XMLCharacterData"),G.exports=x=function(l){h(u,l);function u(o,g){if(u.__super__.constructor.call(this,o),g==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=C.CData,this.value=this.stringify.cdata(g)}return u.prototype.clone=function(){return(0,i.default)(this)},u.prototype.toString=function(o){return this.options.writer.cdata(this,this.options.writer.filterOptions(o))},u}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m=function(l,u){for(var o in u)h.call(u,o)&&(l[o]=u[o]);function g(){this.constructor=l}return g.prototype=u.prototype,l.prototype=new g,l.__super__=u.prototype,l},h={}.hasOwnProperty;x=a("./XMLNode"),G.exports=C=function(s){m(l,s);function l(u){l.__super__.constructor.call(this,u),this.value=""}return Object.defineProperty(l.prototype,"data",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(l.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(l.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),l.prototype.clone=function(){return(0,i.default)(this)},l.prototype.substringData=function(u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.appendData=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.insertData=function(u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.deleteData=function(u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.replaceData=function(u,o,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isEqualNode=function(u){return l.__super__.isEqualNode.apply(this,arguments).isEqualNode(u)?!(u.data!==this.data):!1},l}(x)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m,h=function(u,o){for(var g in o)s.call(o,g)&&(u[g]=o[g]);function p(){this.constructor=u}return p.prototype=o.prototype,u.prototype=new p,u.__super__=o.prototype,u},s={}.hasOwnProperty;C=a("./NodeType"),x=a("./XMLCharacterData"),G.exports=m=function(l){h(u,l);function u(o,g){if(u.__super__.constructor.call(this,o),g==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=C.Comment,this.value=this.stringify.comment(g)}return u.prototype.clone=function(){return(0,i.default)(this)},u.prototype.toString=function(o){return this.options.writer.comment(this,this.options.writer.filterOptions(o))},u}(x)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/keys"),i=x(f),O=a("babel-runtime/core-js/object/create"),C=x(O);function x(m){return m&&m.__esModule?m:{default:m}}(function(){var m,h,s;h=a("./XMLDOMErrorHandler"),s=a("./XMLDOMStringList"),G.exports=m=function(){function l(){var u;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new h,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=u=(0,C.default)(this.defaultParams)}return Object.defineProperty(l.prototype,"parameterNames",{get:function(){return new s((0,i.default)(this.defaultParams))}}),l.prototype.getParameter=function(u){return this.params.hasOwnProperty(u)?this.params[u]:null},l.prototype.canSetParameter=function(u,o){return!0},l.prototype.setParameter=function(u,o){return o!=null?this.params[u]=o:delete this.params[u]},l}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(a,G,d){"use strict";(function(){var f;G.exports=f=function(){function i(){}return i.prototype.handleError=function(O){throw new Error(O)},i}()}).call(void 0)},{}],260:[function(a,G,d){"use strict";(function(){var f;G.exports=f=function(){function i(){}return i.prototype.hasFeature=function(O,C){return!0},i.prototype.createDocumentType=function(O,C,x){throw new Error("This DOM method is not implemented.")},i.prototype.createDocument=function(O,C,x){throw new Error("This DOM method is not implemented.")},i.prototype.createHTMLDocument=function(O){throw new Error("This DOM method is not implemented.")},i.prototype.getFeature=function(O,C){throw new Error("This DOM method is not implemented.")},i}()}).call(void 0)},{}],261:[function(a,G,d){"use strict";(function(){var f;G.exports=f=function(){function i(O){this.arr=O||[]}return Object.defineProperty(i.prototype,"length",{get:function(){return this.arr.length}}),i.prototype.item=function(O){return this.arr[O]||null},i.prototype.contains=function(O){return this.arr.indexOf(O)!==-1},i}()}).call(void 0)},{}],262:[function(a,G,d){"use strict";(function(){var f,i,O,C=function(h,s){for(var l in s)x.call(s,l)&&(h[l]=s[l]);function u(){this.constructor=h}return u.prototype=s.prototype,h.prototype=new u,h.__super__=s.prototype,h},x={}.hasOwnProperty;O=a("./XMLNode"),f=a("./NodeType"),G.exports=i=function(m){C(h,m);function h(s,l,u,o,g,p){if(h.__super__.constructor.call(this,s),l==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(u==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(l));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(l));if(!g)throw new Error("Missing DTD attribute default. "+this.debugInfo(l));if(g.indexOf("#")!==0&&(g="#"+g),!g.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(l));if(p&&!g.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(l));this.elementName=this.stringify.name(l),this.type=f.AttributeDeclaration,this.attributeName=this.stringify.name(u),this.attributeType=this.stringify.dtdAttType(o),p&&(this.defaultValue=this.stringify.dtdAttDefault(p)),this.defaultValueType=g}return h.prototype.toString=function(s){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(s))},h}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(a,G,d){"use strict";(function(){var f,i,O,C=function(h,s){for(var l in s)x.call(s,l)&&(h[l]=s[l]);function u(){this.constructor=h}return u.prototype=s.prototype,h.prototype=new u,h.__super__=s.prototype,h},x={}.hasOwnProperty;O=a("./XMLNode"),f=a("./NodeType"),G.exports=i=function(m){C(h,m);function h(s,l,u){if(h.__super__.constructor.call(this,s),l==null)throw new Error("Missing DTD element name. "+this.debugInfo());u||(u="(#PCDATA)"),Array.isArray(u)&&(u="("+u.join(",")+")"),this.name=this.stringify.name(l),this.type=f.ElementDeclaration,this.value=this.stringify.dtdElementValue(u)}return h.prototype.toString=function(s){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(s))},h}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(a,G,d){"use strict";(function(){var f,i,O,C,x=function(s,l){for(var u in l)m.call(l,u)&&(s[u]=l[u]);function o(){this.constructor=s}return o.prototype=l.prototype,s.prototype=new o,s.__super__=l.prototype,s},m={}.hasOwnProperty;C=a("./Utility").isObject,O=a("./XMLNode"),f=a("./NodeType"),G.exports=i=function(h){x(s,h);function s(l,u,o,g){if(s.__super__.constructor.call(this,l),o==null)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(g==null)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!u,this.name=this.stringify.name(o),this.type=f.EntityDeclaration,!C(g))this.value=this.stringify.dtdEntityValue(g),this.internal=!0;else{if(!g.pubID&&!g.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(g.pubID&&!g.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,g.pubID!=null&&(this.pubID=this.stringify.dtdPubID(g.pubID)),g.sysID!=null&&(this.sysID=this.stringify.dtdSysID(g.sysID)),g.nData!=null&&(this.nData=this.stringify.dtdNData(g.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}}return Object.defineProperty(s.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(s.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(s.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(s.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(s.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(s.prototype,"xmlVersion",{get:function(){return null}}),s.prototype.toString=function(l){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(l))},s}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(a,G,d){"use strict";(function(){var f,i,O,C=function(h,s){for(var l in s)x.call(s,l)&&(h[l]=s[l]);function u(){this.constructor=h}return u.prototype=s.prototype,h.prototype=new u,h.__super__=s.prototype,h},x={}.hasOwnProperty;O=a("./XMLNode"),f=a("./NodeType"),G.exports=i=function(m){C(h,m);function h(s,l,u){if(h.__super__.constructor.call(this,s),l==null)throw new Error("Missing DTD notation name. "+this.debugInfo(l));if(!u.pubID&&!u.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(l));this.name=this.stringify.name(l),this.type=f.NotationDeclaration,u.pubID!=null&&(this.pubID=this.stringify.dtdPubID(u.pubID)),u.sysID!=null&&(this.sysID=this.stringify.dtdSysID(u.sysID))}return Object.defineProperty(h.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(h.prototype,"systemId",{get:function(){return this.sysID}}),h.prototype.toString=function(s){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(s))},h}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(a,G,d){"use strict";(function(){var f,i,O,C,x=function(s,l){for(var u in l)m.call(l,u)&&(s[u]=l[u]);function o(){this.constructor=s}return o.prototype=l.prototype,s.prototype=new o,s.__super__=l.prototype,s},m={}.hasOwnProperty;C=a("./Utility").isObject,O=a("./XMLNode"),f=a("./NodeType"),G.exports=i=function(h){x(s,h);function s(l,u,o,g){var p;s.__super__.constructor.call(this,l),C(u)&&(p=u,u=p.version,o=p.encoding,g=p.standalone),u||(u="1.0"),this.type=f.Declaration,this.version=this.stringify.xmlVersion(u),o!=null&&(this.encoding=this.stringify.xmlEncoding(o)),g!=null&&(this.standalone=this.stringify.xmlStandalone(g))}return s.prototype.toString=function(l){return this.options.writer.declaration(this,this.options.writer.filterOptions(l))},s}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(a,G,d){"use strict";(function(){var f,i,O,C,x,m,h,s,l,u=function(p,v){for(var _ in v)o.call(v,_)&&(p[_]=v[_]);function S(){this.constructor=p}return S.prototype=v.prototype,p.prototype=new S,p.__super__=v.prototype,p},o={}.hasOwnProperty;l=a("./Utility").isObject,s=a("./XMLNode"),f=a("./NodeType"),i=a("./XMLDTDAttList"),C=a("./XMLDTDEntity"),O=a("./XMLDTDElement"),x=a("./XMLDTDNotation"),h=a("./XMLNamedNodeMap"),G.exports=m=function(g){u(p,g);function p(v,_,S){var k,T,M,I,j,D;if(p.__super__.constructor.call(this,v),this.type=f.DocType,v.children){for(I=v.children,T=0,M=I.length;T<M;T++)if(k=I[T],k.type===f.Element){this.name=k.name;break}}this.documentObject=v,l(_)&&(j=_,_=j.pubID,S=j.sysID),S==null&&(D=[_,S],S=D[0],_=D[1]),_!=null&&(this.pubID=this.stringify.dtdPubID(_)),S!=null&&(this.sysID=this.stringify.dtdSysID(S))}return Object.defineProperty(p.prototype,"entities",{get:function(){var _,S,k,T,M;for(T={},M=this.children,S=0,k=M.length;S<k;S++)_=M[S],_.type===f.EntityDeclaration&&!_.pe&&(T[_.name]=_);return new h(T)}}),Object.defineProperty(p.prototype,"notations",{get:function(){var _,S,k,T,M;for(T={},M=this.children,S=0,k=M.length;S<k;S++)_=M[S],_.type===f.NotationDeclaration&&(T[_.name]=_);return new h(T)}}),Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),p.prototype.element=function(v,_){var S;return S=new O(this,v,_),this.children.push(S),this},p.prototype.attList=function(v,_,S,k,T){var M;return M=new i(this,v,_,S,k,T),this.children.push(M),this},p.prototype.entity=function(v,_){var S;return S=new C(this,!1,v,_),this.children.push(S),this},p.prototype.pEntity=function(v,_){var S;return S=new C(this,!0,v,_),this.children.push(S),this},p.prototype.notation=function(v,_){var S;return S=new x(this,v,_),this.children.push(S),this},p.prototype.toString=function(v){return this.options.writer.docType(this,this.options.writer.filterOptions(v))},p.prototype.ele=function(v,_){return this.element(v,_)},p.prototype.att=function(v,_,S,k,T){return this.attList(v,_,S,k,T)},p.prototype.ent=function(v,_){return this.entity(v,_)},p.prototype.pent=function(v,_){return this.pEntity(v,_)},p.prototype.not=function(v,_){return this.notation(v,_)},p.prototype.up=function(){return this.root()||this.documentObject},p.prototype.isEqualNode=function(v){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(v)?v.name!==this.name||v.publicId!==this.publicId?!1:!(v.systemId!==this.systemId):!1},p}(s)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(a,G,d){"use strict";(function(){var f,i,O,C,x,m,h,s,l=function(g,p){for(var v in p)u.call(p,v)&&(g[v]=p[v]);function _(){this.constructor=g}return _.prototype=p.prototype,g.prototype=new _,g.__super__=p.prototype,g},u={}.hasOwnProperty;s=a("./Utility").isPlainObject,O=a("./XMLDOMImplementation"),i=a("./XMLDOMConfiguration"),x=a("./XMLNode"),f=a("./NodeType"),h=a("./XMLStringifier"),m=a("./XMLStringWriter"),G.exports=C=function(o){l(g,o);function g(p){g.__super__.constructor.call(this,null),this.name="#document",this.type=f.Document,this.documentURI=null,this.domConfig=new i,p||(p={}),p.writer||(p.writer=new m),this.options=p,this.stringify=new h(p)}return Object.defineProperty(g.prototype,"implementation",{value:new O}),Object.defineProperty(g.prototype,"doctype",{get:function(){var v,_,S,k;for(k=this.children,_=0,S=k.length;_<S;_++)if(v=k[_],v.type===f.DocType)return v;return null}}),Object.defineProperty(g.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(g.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(g.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(g.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===f.Declaration?this.children[0].encoding:null}}),Object.defineProperty(g.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===f.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(g.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===f.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(g.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(g.prototype,"origin",{get:function(){return null}}),Object.defineProperty(g.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(g.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(g.prototype,"contentType",{get:function(){return null}}),g.prototype.end=function(p){var v;return v={},p?s(p)&&(v=p,p=this.options.writer):p=this.options.writer,p.document(this,p.filterOptions(v))},g.prototype.toString=function(p){return this.options.writer.document(this,this.options.writer.filterOptions(p))},g.prototype.createElement=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createTextNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createComment=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createCDATASection=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createProcessingInstruction=function(p,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createAttribute=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createEntityReference=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.importNode=function(p,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createElementNS=function(p,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createAttributeNS=function(p,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(p,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementById=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.adoptNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.renameNode=function(p,v,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createEvent=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createNodeIterator=function(p,v,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createTreeWalker=function(p,v,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},g}(x)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(a,G,d){"use strict";(function(){var f,i,O,C,x,m,h,s,l,u,o,g,p,v,_,S,k,T,M,I,j,D,y,J,X={}.hasOwnProperty;J=a("./Utility"),D=J.isObject,j=J.isFunction,y=J.isPlainObject,I=J.getValue,f=a("./NodeType"),g=a("./XMLDocument"),v=a("./XMLElement"),C=a("./XMLCData"),x=a("./XMLComment"),S=a("./XMLRaw"),M=a("./XMLText"),_=a("./XMLProcessingInstruction"),u=a("./XMLDeclaration"),o=a("./XMLDocType"),m=a("./XMLDTDAttList"),s=a("./XMLDTDEntity"),h=a("./XMLDTDElement"),l=a("./XMLDTDNotation"),O=a("./XMLAttribute"),T=a("./XMLStringifier"),k=a("./XMLStringWriter"),i=a("./WriterState"),G.exports=p=function(){function N(F,H,Z){var ce;this.name="?xml",this.type=f.Document,F||(F={}),ce={},F.writer?y(F.writer)&&(ce=F.writer,F.writer=new k):F.writer=new k,this.options=F,this.writer=F.writer,this.writerOptions=this.writer.filterOptions(ce),this.stringify=new T(F),this.onDataCallback=H||function(){},this.onEndCallback=Z||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return N.prototype.createChildNode=function(F){var H,Z,ce,he,V,ve,ne,W;switch(F.type){case f.CData:this.cdata(F.value);break;case f.Comment:this.comment(F.value);break;case f.Element:ce={},ne=F.attribs;for(Z in ne){if(!X.call(ne,Z))continue;H=ne[Z],ce[Z]=H.value}this.node(F.name,ce);break;case f.Dummy:this.dummy();break;case f.Raw:this.raw(F.value);break;case f.Text:this.text(F.value);break;case f.ProcessingInstruction:this.instruction(F.target,F.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+F.constructor.name)}for(W=F.children,V=0,ve=W.length;V<ve;V++)he=W[V],this.createChildNode(he),he.type===f.Element&&this.up();return this},N.prototype.dummy=function(){return this},N.prototype.node=function(F,H,Z){var ce;if(F==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(F));return this.openCurrent(),F=I(F),H==null&&(H={}),H=I(H),D(H)||(ce=[H,Z],Z=ce[0],H=ce[1]),this.currentNode=new v(this,F,H),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Z!=null&&this.text(Z),this},N.prototype.element=function(F,H,Z){var ce,he,V,ve,ne,W;if(this.currentNode&&this.currentNode.type===f.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(F)||D(F)||j(F))for(ve=this.options.noValidation,this.options.noValidation=!0,W=new g(this.options).element("TEMP_ROOT"),W.element(F),this.options.noValidation=ve,ne=W.children,he=0,V=ne.length;he<V;he++)ce=ne[he],this.createChildNode(ce),ce.type===f.Element&&this.up();else this.node(F,H,Z);return this},N.prototype.attribute=function(F,H){var Z,ce;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(F));if(F!=null&&(F=I(F)),D(F))for(Z in F){if(!X.call(F,Z))continue;ce=F[Z],this.attribute(Z,ce)}else j(H)&&(H=H.apply()),this.options.keepNullAttributes&&H==null?this.currentNode.attribs[F]=new O(this,F,""):H!=null&&(this.currentNode.attribs[F]=new O(this,F,H));return this},N.prototype.text=function(F){var H;return this.openCurrent(),H=new M(this,F),this.onData(this.writer.text(H,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.cdata=function(F){var H;return this.openCurrent(),H=new C(this,F),this.onData(this.writer.cdata(H,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.comment=function(F){var H;return this.openCurrent(),H=new x(this,F),this.onData(this.writer.comment(H,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.raw=function(F){var H;return this.openCurrent(),H=new S(this,F),this.onData(this.writer.raw(H,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.instruction=function(F,H){var Z,ce,he,V,ve;if(this.openCurrent(),F!=null&&(F=I(F)),H!=null&&(H=I(H)),Array.isArray(F))for(Z=0,V=F.length;Z<V;Z++)ce=F[Z],this.instruction(ce);else if(D(F))for(ce in F){if(!X.call(F,ce))continue;he=F[ce],this.instruction(ce,he)}else j(H)&&(H=H.apply()),ve=new _(this,F,H),this.onData(this.writer.processingInstruction(ve,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},N.prototype.declaration=function(F,H,Z){var ce;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ce=new u(this,F,H,Z),this.onData(this.writer.declaration(ce,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.doctype=function(F,H,Z){if(this.openCurrent(),F==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new o(this,H,Z),this.currentNode.rootNodeName=F,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},N.prototype.dtdElement=function(F,H){var Z;return this.openCurrent(),Z=new h(this,F,H),this.onData(this.writer.dtdElement(Z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.attList=function(F,H,Z,ce,he){var V;return this.openCurrent(),V=new m(this,F,H,Z,ce,he),this.onData(this.writer.dtdAttList(V,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.entity=function(F,H){var Z;return this.openCurrent(),Z=new s(this,!1,F,H),this.onData(this.writer.dtdEntity(Z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.pEntity=function(F,H){var Z;return this.openCurrent(),Z=new s(this,!0,F,H),this.onData(this.writer.dtdEntity(Z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.notation=function(F,H){var Z;return this.openCurrent(),Z=new l(this,F,H),this.onData(this.writer.dtdNotation(Z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},N.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},N.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},N.prototype.openNode=function(F){var H,Z,ce,he;if(!F.isOpen){if(!this.root&&this.currentLevel===0&&F.type===f.Element&&(this.root=F),Z="",F.type===f.Element){this.writerOptions.state=i.OpenTag,Z=this.writer.indent(F,this.writerOptions,this.currentLevel)+"<"+F.name,he=F.attribs;for(ce in he){if(!X.call(he,ce))continue;H=he[ce],Z+=this.writer.attribute(H,this.writerOptions,this.currentLevel)}Z+=(F.children?">":"/>")+this.writer.endline(F,this.writerOptions,this.currentLevel),this.writerOptions.state=i.InsideTag}else this.writerOptions.state=i.OpenTag,Z=this.writer.indent(F,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+F.rootNodeName,F.pubID&&F.sysID?Z+=' PUBLIC "'+F.pubID+'" "'+F.sysID+'"':F.sysID&&(Z+=' SYSTEM "'+F.sysID+'"'),F.children?(Z+=" [",this.writerOptions.state=i.InsideTag):(this.writerOptions.state=i.CloseTag,Z+=">"),Z+=this.writer.endline(F,this.writerOptions,this.currentLevel);return this.onData(Z,this.currentLevel),F.isOpen=!0}},N.prototype.closeNode=function(F){var H;if(!F.isClosed)return H="",this.writerOptions.state=i.CloseTag,F.type===f.Element?H=this.writer.indent(F,this.writerOptions,this.currentLevel)+"</"+F.name+">"+this.writer.endline(F,this.writerOptions,this.currentLevel):H=this.writer.indent(F,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(F,this.writerOptions,this.currentLevel),this.writerOptions.state=i.None,this.onData(H,this.currentLevel),F.isClosed=!0},N.prototype.onData=function(F,H){return this.documentStarted=!0,this.onDataCallback(F,H+1)},N.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},N.prototype.debugInfo=function(F){return F==null?"":"node: <"+F+">"},N.prototype.ele=function(){return this.element.apply(this,arguments)},N.prototype.nod=function(F,H,Z){return this.node(F,H,Z)},N.prototype.txt=function(F){return this.text(F)},N.prototype.dat=function(F){return this.cdata(F)},N.prototype.com=function(F){return this.comment(F)},N.prototype.ins=function(F,H){return this.instruction(F,H)},N.prototype.dec=function(F,H,Z){return this.declaration(F,H,Z)},N.prototype.dtd=function(F,H,Z){return this.doctype(F,H,Z)},N.prototype.e=function(F,H,Z){return this.element(F,H,Z)},N.prototype.n=function(F,H,Z){return this.node(F,H,Z)},N.prototype.t=function(F){return this.text(F)},N.prototype.d=function(F){return this.cdata(F)},N.prototype.c=function(F){return this.comment(F)},N.prototype.r=function(F){return this.raw(F)},N.prototype.i=function(F,H){return this.instruction(F,H)},N.prototype.att=function(){return this.currentNode&&this.currentNode.type===f.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},N.prototype.a=function(){return this.currentNode&&this.currentNode.type===f.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},N.prototype.ent=function(F,H){return this.entity(F,H)},N.prototype.pent=function(F,H){return this.pEntity(F,H)},N.prototype.not=function(F,H){return this.notation(F,H)},N}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m,h=function(u,o){for(var g in o)s.call(o,g)&&(u[g]=o[g]);function p(){this.constructor=u}return p.prototype=o.prototype,u.prototype=new p,u.__super__=o.prototype,u},s={}.hasOwnProperty;m=a("./XMLNode"),C=a("./NodeType"),G.exports=x=function(l){h(u,l);function u(o){u.__super__.constructor.call(this,o),this.type=C.Dummy}return u.prototype.clone=function(){return(0,i.default)(this)},u.prototype.toString=function(o){return""},u}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m,h,s,l,u,o,g,p=function(S,k){for(var T in k)v.call(k,T)&&(S[T]=k[T]);function M(){this.constructor=S}return M.prototype=k.prototype,S.prototype=new M,S.__super__=k.prototype,S},v={}.hasOwnProperty;g=a("./Utility"),o=g.isObject,u=g.isFunction,l=g.getValue,s=a("./XMLNode"),C=a("./NodeType"),x=a("./XMLAttribute"),h=a("./XMLNamedNodeMap"),G.exports=m=function(_){p(S,_);function S(k,T,M){var I,j,D,y;if(S.__super__.constructor.call(this,k),T==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(T),this.type=C.Element,this.attribs={},this.schemaTypeInfo=null,M!=null&&this.attribute(M),k.type===C.Document&&(this.isRoot=!0,this.documentObject=k,k.rootObject=this,k.children)){for(y=k.children,j=0,D=y.length;j<D;j++)if(I=y[j],I.type===C.DocType){I.name=this.name;break}}}return Object.defineProperty(S.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(S.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(S.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new h(this.attribs)),this.attributeMap}}),S.prototype.clone=function(){var k,T,M,I;M=(0,i.default)(this),M.isRoot&&(M.documentObject=null),M.attribs={},I=this.attribs;for(T in I){if(!v.call(I,T))continue;k=I[T],M.attribs[T]=k.clone()}return M.children=[],this.children.forEach(function(j){var D;return D=j.clone(),D.parent=M,M.children.push(D)}),M},S.prototype.attribute=function(k,T){var M,I;if(k!=null&&(k=l(k)),o(k))for(M in k){if(!v.call(k,M))continue;I=k[M],this.attribute(M,I)}else u(T)&&(T=T.apply()),this.options.keepNullAttributes&&T==null?this.attribs[k]=new x(this,k,""):T!=null&&(this.attribs[k]=new x(this,k,T));return this},S.prototype.removeAttribute=function(k){var T,M,I;if(k==null)throw new Error("Missing attribute name. "+this.debugInfo());if(k=l(k),Array.isArray(k))for(M=0,I=k.length;M<I;M++)T=k[M],delete this.attribs[T];else delete this.attribs[k];return this},S.prototype.toString=function(k){return this.options.writer.element(this,this.options.writer.filterOptions(k))},S.prototype.att=function(k,T){return this.attribute(k,T)},S.prototype.a=function(k,T){return this.attribute(k,T)},S.prototype.getAttribute=function(k){return this.attribs.hasOwnProperty(k)?this.attribs[k].value:null},S.prototype.setAttribute=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNode=function(k){return this.attribs.hasOwnProperty(k)?this.attribs[k]:null},S.prototype.setAttributeNode=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeAttributeNode=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setAttributeNS=function(k,T,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeAttributeNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNodeNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setAttributeNodeNS=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagNameNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasAttribute=function(k){return this.attribs.hasOwnProperty(k)},S.prototype.hasAttributeNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setIdAttribute=function(k,T){return this.attribs.hasOwnProperty(k)?this.attribs[k].isId:T},S.prototype.setIdAttributeNS=function(k,T,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setIdAttributeNode=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagNameNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByClassName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(k){var T,M,I;if(!S.__super__.isEqualNode.apply(this,arguments).isEqualNode(k))return!1;if(k.namespaceURI!==this.namespaceURI)return!1;if(k.prefix!==this.prefix)return!1;if(k.localName!==this.localName)return!1;if(k.attribs.length!==this.attribs.length)return!1;for(T=M=0,I=this.attribs.length-1;0<=I?M<=I:M>=I;T=0<=I?++M:--M)if(!this.attribs[T].isEqualNode(k.attribs[T]))return!1;return!0},S}(s)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/keys"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C;G.exports=C=function(){function x(m){this.nodes=m}return Object.defineProperty(x.prototype,"length",{get:function(){return(0,i.default)(this.nodes).length||0}}),x.prototype.clone=function(){return this.nodes=null},x.prototype.getNamedItem=function(m){return this.nodes[m]},x.prototype.setNamedItem=function(m){var h;return h=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,h||null},x.prototype.removeNamedItem=function(m){var h;return h=this.nodes[m],delete this.nodes[m],h||null},x.prototype.item=function(m){return this.nodes[(0,i.default)(this.nodes)[m]]||null},x.prototype.getNamedItemNS=function(m,h){throw new Error("This DOM method is not implemented.")},x.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},x.prototype.removeNamedItemNS=function(m,h){throw new Error("This DOM method is not implemented.")},x}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(a,G,d){"use strict";(function(){var f,i,O,C,x,m,h,s,l,u,o,g,p,v,_,S,k,T,M,I={}.hasOwnProperty;M=a("./Utility"),T=M.isObject,k=M.isFunction,S=M.isEmpty,_=M.getValue,s=null,O=null,C=null,x=null,m=null,p=null,v=null,g=null,h=null,i=null,o=null,l=null,f=null,G.exports=u=function(){function j(D){this.parent=D,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,s||(s=a("./XMLElement"),O=a("./XMLCData"),C=a("./XMLComment"),x=a("./XMLDeclaration"),m=a("./XMLDocType"),p=a("./XMLRaw"),v=a("./XMLText"),g=a("./XMLProcessingInstruction"),h=a("./XMLDummy"),i=a("./NodeType"),o=a("./XMLNodeList"),l=a("./XMLNamedNodeMap"),f=a("./DocumentPosition"))}return Object.defineProperty(j.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(j.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(j.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(j.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(j.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new o(this.children)),this.childNodeList}}),Object.defineProperty(j.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(j.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(j.prototype,"previousSibling",{get:function(){var y;return y=this.parent.children.indexOf(this),this.parent.children[y-1]||null}}),Object.defineProperty(j.prototype,"nextSibling",{get:function(){var y;return y=this.parent.children.indexOf(this),this.parent.children[y+1]||null}}),Object.defineProperty(j.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(j.prototype,"textContent",{get:function(){var y,J,X,N,F;if(this.nodeType===i.Element||this.nodeType===i.DocumentFragment){for(F="",N=this.children,J=0,X=N.length;J<X;J++)y=N[J],y.textContent&&(F+=y.textContent);return F}else return null},set:function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),j.prototype.setParent=function(D){var y,J,X,N,F;for(this.parent=D,D&&(this.options=D.options,this.stringify=D.stringify),N=this.children,F=[],J=0,X=N.length;J<X;J++)y=N[J],F.push(y.setParent(this));return F},j.prototype.element=function(D,y,J){var X,N,F,H,Z,ce,he,V,ve,ne,W;if(ce=null,y===null&&J==null&&(ve=[{},null],y=ve[0],J=ve[1]),y==null&&(y={}),y=_(y),T(y)||(ne=[y,J],J=ne[0],y=ne[1]),D!=null&&(D=_(D)),Array.isArray(D))for(F=0,he=D.length;F<he;F++)N=D[F],ce=this.element(N);else if(k(D))ce=this.element(D.apply());else if(T(D))for(Z in D){if(!I.call(D,Z))continue;if(W=D[Z],k(W)&&(W=W.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&Z.indexOf(this.stringify.convertAttKey)===0)ce=this.attribute(Z.substr(this.stringify.convertAttKey.length),W);else if(!this.options.separateArrayItems&&Array.isArray(W)&&S(W))ce=this.dummy();else if(T(W)&&S(W))ce=this.element(Z);else if(!this.options.keepNullNodes&&W==null)ce=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(W))for(H=0,V=W.length;H<V;H++)N=W[H],X={},X[Z]=N,ce=this.element(X);else T(W)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Z.indexOf(this.stringify.convertTextKey)===0?ce=this.element(W):(ce=this.element(Z),ce.element(W)):ce=this.element(Z,W)}else!this.options.keepNullNodes&&J===null?ce=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&D.indexOf(this.stringify.convertTextKey)===0?ce=this.text(J):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&D.indexOf(this.stringify.convertCDataKey)===0?ce=this.cdata(J):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&D.indexOf(this.stringify.convertCommentKey)===0?ce=this.comment(J):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&D.indexOf(this.stringify.convertRawKey)===0?ce=this.raw(J):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&D.indexOf(this.stringify.convertPIKey)===0?ce=this.instruction(D.substr(this.stringify.convertPIKey.length),J):ce=this.node(D,y,J);if(ce==null)throw new Error("Could not create any elements with: "+D+". "+this.debugInfo());return ce},j.prototype.insertBefore=function(D,y,J){var X,N,F,H,Z;if(D!=null?D.type:void 0)return F=D,H=y,F.setParent(this),H?(N=children.indexOf(H),Z=children.splice(N),children.push(F),Array.prototype.push.apply(children,Z)):children.push(F),F;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(D));return N=this.parent.children.indexOf(this),Z=this.parent.children.splice(N),X=this.parent.element(D,y,J),Array.prototype.push.apply(this.parent.children,Z),X},j.prototype.insertAfter=function(D,y,J){var X,N,F;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(D));return N=this.parent.children.indexOf(this),F=this.parent.children.splice(N+1),X=this.parent.element(D,y,J),Array.prototype.push.apply(this.parent.children,F),X},j.prototype.remove=function(){var D,y;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return D=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[D,D-D+1].concat(y=[])),this.parent},j.prototype.node=function(D,y,J){var X,N;return D!=null&&(D=_(D)),y||(y={}),y=_(y),T(y)||(N=[y,J],J=N[0],y=N[1]),X=new s(this,D,y),J!=null&&X.text(J),this.children.push(X),X},j.prototype.text=function(D){var y;return T(D)&&this.element(D),y=new v(this,D),this.children.push(y),this},j.prototype.cdata=function(D){var y;return y=new O(this,D),this.children.push(y),this},j.prototype.comment=function(D){var y;return y=new C(this,D),this.children.push(y),this},j.prototype.commentBefore=function(D){var y,J,X;return J=this.parent.children.indexOf(this),X=this.parent.children.splice(J),y=this.parent.comment(D),Array.prototype.push.apply(this.parent.children,X),this},j.prototype.commentAfter=function(D){var y,J,X;return J=this.parent.children.indexOf(this),X=this.parent.children.splice(J+1),y=this.parent.comment(D),Array.prototype.push.apply(this.parent.children,X),this},j.prototype.raw=function(D){var y;return y=new p(this,D),this.children.push(y),this},j.prototype.dummy=function(){var D;return D=new h(this),D},j.prototype.instruction=function(D,y){var J,X,N,F,H;if(D!=null&&(D=_(D)),y!=null&&(y=_(y)),Array.isArray(D))for(F=0,H=D.length;F<H;F++)J=D[F],this.instruction(J);else if(T(D))for(J in D){if(!I.call(D,J))continue;X=D[J],this.instruction(J,X)}else k(y)&&(y=y.apply()),N=new g(this,D,y),this.children.push(N);return this},j.prototype.instructionBefore=function(D,y){var J,X,N;return X=this.parent.children.indexOf(this),N=this.parent.children.splice(X),J=this.parent.instruction(D,y),Array.prototype.push.apply(this.parent.children,N),this},j.prototype.instructionAfter=function(D,y){var J,X,N;return X=this.parent.children.indexOf(this),N=this.parent.children.splice(X+1),J=this.parent.instruction(D,y),Array.prototype.push.apply(this.parent.children,N),this},j.prototype.declaration=function(D,y,J){var X,N;return X=this.document(),N=new x(X,D,y,J),X.children.length===0?X.children.unshift(N):X.children[0].type===i.Declaration?X.children[0]=N:X.children.unshift(N),X.root()||X},j.prototype.dtd=function(D,y){var J,X,N,F,H,Z,ce,he,V,ve;for(X=this.document(),N=new m(X,D,y),V=X.children,F=H=0,ce=V.length;H<ce;F=++H)if(J=V[F],J.type===i.DocType)return X.children[F]=N,N;for(ve=X.children,F=Z=0,he=ve.length;Z<he;F=++Z)if(J=ve[F],J.isRoot)return X.children.splice(F,0,N),N;return X.children.push(N),N},j.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},j.prototype.root=function(){var D;for(D=this;D;){if(D.type===i.Document)return D.rootObject;if(D.isRoot)return D;D=D.parent}},j.prototype.document=function(){var D;for(D=this;D;){if(D.type===i.Document)return D;D=D.parent}},j.prototype.end=function(D){return this.document().end(D)},j.prototype.prev=function(){var D;if(D=this.parent.children.indexOf(this),D<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[D-1]},j.prototype.next=function(){var D;if(D=this.parent.children.indexOf(this),D===-1||D===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[D+1]},j.prototype.importDocument=function(D){var y;return y=D.root().clone(),y.parent=this,y.isRoot=!1,this.children.push(y),this},j.prototype.debugInfo=function(D){var y,J;return D=D||this.name,D==null&&!((y=this.parent)!=null?y.name:void 0)?"":D==null?"parent: <"+this.parent.name+">":((J=this.parent)!=null?J.name:void 0)?"node: <"+D+">, parent: <"+this.parent.name+">":"node: <"+D+">"},j.prototype.ele=function(D,y,J){return this.element(D,y,J)},j.prototype.nod=function(D,y,J){return this.node(D,y,J)},j.prototype.txt=function(D){return this.text(D)},j.prototype.dat=function(D){return this.cdata(D)},j.prototype.com=function(D){return this.comment(D)},j.prototype.ins=function(D,y){return this.instruction(D,y)},j.prototype.doc=function(){return this.document()},j.prototype.dec=function(D,y,J){return this.declaration(D,y,J)},j.prototype.e=function(D,y,J){return this.element(D,y,J)},j.prototype.n=function(D,y,J){return this.node(D,y,J)},j.prototype.t=function(D){return this.text(D)},j.prototype.d=function(D){return this.cdata(D)},j.prototype.c=function(D){return this.comment(D)},j.prototype.r=function(D){return this.raw(D)},j.prototype.i=function(D,y){return this.instruction(D,y)},j.prototype.u=function(){return this.up()},j.prototype.importXMLBuilder=function(D){return this.importDocument(D)},j.prototype.replaceChild=function(D,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.removeChild=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.appendChild=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.hasChildNodes=function(){return this.children.length!==0},j.prototype.cloneNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.isSupported=function(D,y){return!0},j.prototype.hasAttributes=function(){return this.attribs.length!==0},j.prototype.compareDocumentPosition=function(D){var y,J;return y=this,y===D?0:this.document()!==D.document()?(J=f.Disconnected|f.ImplementationSpecific,Math.random()<.5?J|=f.Preceding:J|=f.Following,J):y.isAncestor(D)?f.Contains|f.Preceding:y.isDescendant(D)?f.Contains|f.Following:y.isPreceding(D)?f.Preceding:f.Following},j.prototype.isSameNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.lookupPrefix=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.isDefaultNamespace=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.lookupNamespaceURI=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.isEqualNode=function(D){var y,J,X;if(D.nodeType!==this.nodeType)return!1;if(D.children.length!==this.children.length)return!1;for(y=J=0,X=this.children.length-1;0<=X?J<=X:J>=X;y=0<=X?++J:--J)if(!this.children[y].isEqualNode(D.children[y]))return!1;return!0},j.prototype.getFeature=function(D,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.setUserData=function(D,y,J){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.getUserData=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},j.prototype.contains=function(D){return D?D===this||this.isDescendant(D):!1},j.prototype.isDescendant=function(D){var y,J,X,N,F;for(F=this.children,X=0,N=F.length;X<N;X++){if(y=F[X],D===y)return!0;if(J=y.isDescendant(D),J)return!0}return!1},j.prototype.isAncestor=function(D){return D.isDescendant(this)},j.prototype.isPreceding=function(D){var y,J;return y=this.treePosition(D),J=this.treePosition(this),y===-1||J===-1?!1:y<J},j.prototype.isFollowing=function(D){var y,J;return y=this.treePosition(D),J=this.treePosition(this),y===-1||J===-1?!1:y>J},j.prototype.treePosition=function(D){var y,J;return J=0,y=!1,this.foreachTreeNode(this.document(),function(X){if(J++,!y&&X===D)return y=!0}),y?J:-1},j.prototype.foreachTreeNode=function(D,y){var J,X,N,F,H;for(D||(D=this.document()),F=D.children,X=0,N=F.length;X<N;X++){if(J=F[X],H=y(J))return H;if(H=this.foreachTreeNode(J,y),H)return H}},j}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(a,G,d){"use strict";(function(){var f;G.exports=f=function(){function i(O){this.nodes=O}return Object.defineProperty(i.prototype,"length",{get:function(){return this.nodes.length||0}}),i.prototype.clone=function(){return this.nodes=null},i.prototype.item=function(O){return this.nodes[O]||null},i}()}).call(void 0)},{}],275:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m,h=function(u,o){for(var g in o)s.call(o,g)&&(u[g]=o[g]);function p(){this.constructor=u}return p.prototype=o.prototype,u.prototype=new p,u.__super__=o.prototype,u},s={}.hasOwnProperty;C=a("./NodeType"),x=a("./XMLCharacterData"),G.exports=m=function(l){h(u,l);function u(o,g,p){if(u.__super__.constructor.call(this,o),g==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=C.ProcessingInstruction,this.target=this.stringify.insTarget(g),this.name=this.target,p&&(this.value=this.stringify.insValue(p))}return u.prototype.clone=function(){return(0,i.default)(this)},u.prototype.toString=function(o){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(o))},u.prototype.isEqualNode=function(o){return u.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)?!(o.target!==this.target):!1},u}(x)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m,h=function(u,o){for(var g in o)s.call(o,g)&&(u[g]=o[g]);function p(){this.constructor=u}return p.prototype=o.prototype,u.prototype=new p,u.__super__=o.prototype,u},s={}.hasOwnProperty;C=a("./NodeType"),x=a("./XMLNode"),G.exports=m=function(l){h(u,l);function u(o,g){if(u.__super__.constructor.call(this,o),g==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=C.Raw,this.value=this.stringify.raw(g)}return u.prototype.clone=function(){return(0,i.default)(this)},u.prototype.toString=function(o){return this.options.writer.raw(this,this.options.writer.filterOptions(o))},u}(x)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(a,G,d){"use strict";(function(){var f,i,O,C,x=function(s,l){for(var u in l)m.call(l,u)&&(s[u]=l[u]);function o(){this.constructor=s}return o.prototype=l.prototype,s.prototype=new o,s.__super__=l.prototype,s},m={}.hasOwnProperty;f=a("./NodeType"),C=a("./XMLWriterBase"),i=a("./WriterState"),G.exports=O=function(h){x(s,h);function s(l,u){this.stream=l,s.__super__.constructor.call(this,u)}return s.prototype.endline=function(l,u,o){return l.isLastRootNode&&u.state===i.CloseTag?"":s.__super__.endline.call(this,l,u,o)},s.prototype.document=function(l,u){var o,g,p,v,_,S,k,T,M;for(k=l.children,g=p=0,_=k.length;p<_;g=++p)o=k[g],o.isLastRootNode=g===l.children.length-1;for(u=this.filterOptions(u),T=l.children,M=[],v=0,S=T.length;v<S;v++)o=T[v],M.push(this.writeChildNode(o,u,0));return M},s.prototype.attribute=function(l,u,o){return this.stream.write(s.__super__.attribute.call(this,l,u,o))},s.prototype.cdata=function(l,u,o){return this.stream.write(s.__super__.cdata.call(this,l,u,o))},s.prototype.comment=function(l,u,o){return this.stream.write(s.__super__.comment.call(this,l,u,o))},s.prototype.declaration=function(l,u,o){return this.stream.write(s.__super__.declaration.call(this,l,u,o))},s.prototype.docType=function(l,u,o){var g,p,v,_;if(o||(o=0),this.openNode(l,u,o),u.state=i.OpenTag,this.stream.write(this.indent(l,u,o)),this.stream.write("<!DOCTYPE "+l.root().name),l.pubID&&l.sysID?this.stream.write(' PUBLIC "'+l.pubID+'" "'+l.sysID+'"'):l.sysID&&this.stream.write(' SYSTEM "'+l.sysID+'"'),l.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(l,u,o)),u.state=i.InsideTag,_=l.children,p=0,v=_.length;p<v;p++)g=_[p],this.writeChildNode(g,u,o+1);u.state=i.CloseTag,this.stream.write("]")}return u.state=i.CloseTag,this.stream.write(u.spaceBeforeSlash+">"),this.stream.write(this.endline(l,u,o)),u.state=i.None,this.closeNode(l,u,o)},s.prototype.element=function(l,u,o){var g,p,v,_,S,k,T,M,I,j;o||(o=0),this.openNode(l,u,o),u.state=i.OpenTag,this.stream.write(this.indent(l,u,o)+"<"+l.name),I=l.attribs;for(T in I){if(!m.call(I,T))continue;g=I[T],this.attribute(g,u,o)}if(v=l.children.length,_=v===0?null:l.children[0],v===0||l.children.every(function(D){return(D.type===f.Text||D.type===f.Raw)&&D.value===""}))u.allowEmpty?(this.stream.write(">"),u.state=i.CloseTag,this.stream.write("</"+l.name+">")):(u.state=i.CloseTag,this.stream.write(u.spaceBeforeSlash+"/>"));else if(u.pretty&&v===1&&(_.type===f.Text||_.type===f.Raw)&&_.value!=null)this.stream.write(">"),u.state=i.InsideTag,u.suppressPrettyCount++,M=!0,this.writeChildNode(_,u,o+1),u.suppressPrettyCount--,M=!1,u.state=i.CloseTag,this.stream.write("</"+l.name+">");else{for(this.stream.write(">"+this.endline(l,u,o)),u.state=i.InsideTag,j=l.children,S=0,k=j.length;S<k;S++)p=j[S],this.writeChildNode(p,u,o+1);u.state=i.CloseTag,this.stream.write(this.indent(l,u,o)+"</"+l.name+">")}return this.stream.write(this.endline(l,u,o)),u.state=i.None,this.closeNode(l,u,o)},s.prototype.processingInstruction=function(l,u,o){return this.stream.write(s.__super__.processingInstruction.call(this,l,u,o))},s.prototype.raw=function(l,u,o){return this.stream.write(s.__super__.raw.call(this,l,u,o))},s.prototype.text=function(l,u,o){return this.stream.write(s.__super__.text.call(this,l,u,o))},s.prototype.dtdAttList=function(l,u,o){return this.stream.write(s.__super__.dtdAttList.call(this,l,u,o))},s.prototype.dtdElement=function(l,u,o){return this.stream.write(s.__super__.dtdElement.call(this,l,u,o))},s.prototype.dtdEntity=function(l,u,o){return this.stream.write(s.__super__.dtdEntity.call(this,l,u,o))},s.prototype.dtdNotation=function(l,u,o){return this.stream.write(s.__super__.dtdNotation.call(this,l,u,o))},s}(C)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(a,G,d){"use strict";(function(){var f,i,O=function(m,h){for(var s in h)C.call(h,s)&&(m[s]=h[s]);function l(){this.constructor=m}return l.prototype=h.prototype,m.prototype=new l,m.__super__=h.prototype,m},C={}.hasOwnProperty;i=a("./XMLWriterBase"),G.exports=f=function(x){O(m,x);function m(h){m.__super__.constructor.call(this,h)}return m.prototype.document=function(h,s){var l,u,o,g,p;for(s=this.filterOptions(s),g="",p=h.children,u=0,o=p.length;u<o;u++)l=p[u],g+=this.writeChildNode(l,s,0);return s.pretty&&g.slice(-s.newline.length)===s.newline&&(g=g.slice(0,-s.newline.length)),g},m}(i)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(a,G,d){"use strict";(function(){var f,i=function(x,m){return function(){return x.apply(m,arguments)}},O={}.hasOwnProperty;G.exports=f=function(){function C(x){this.assertLegalName=i(this.assertLegalName,this),this.assertLegalChar=i(this.assertLegalChar,this);var m,h,s;x||(x={}),this.options=x,this.options.version||(this.options.version="1.0"),h=x.stringify||{};for(m in h){if(!O.call(h,m))continue;s=h[m],this[m]=s}}return C.prototype.name=function(x){return this.options.noValidation?x:this.assertLegalName(""+x||"")},C.prototype.text=function(x){return this.options.noValidation?x:this.assertLegalChar(this.textEscape(""+x||""))},C.prototype.cdata=function(x){return this.options.noValidation?x:(x=""+x||"",x=x.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(x))},C.prototype.comment=function(x){if(this.options.noValidation)return x;if(x=""+x||"",x.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+x);return this.assertLegalChar(x)},C.prototype.raw=function(x){return this.options.noValidation?x:""+x||""},C.prototype.attValue=function(x){return this.options.noValidation?x:this.assertLegalChar(this.attEscape(x=""+x||""))},C.prototype.insTarget=function(x){return this.options.noValidation?x:this.assertLegalChar(""+x||"")},C.prototype.insValue=function(x){if(this.options.noValidation)return x;if(x=""+x||"",x.match(/\?>/))throw new Error("Invalid processing instruction value: "+x);return this.assertLegalChar(x)},C.prototype.xmlVersion=function(x){if(this.options.noValidation)return x;if(x=""+x||"",!x.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+x);return x},C.prototype.xmlEncoding=function(x){if(this.options.noValidation)return x;if(x=""+x||"",!x.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+x);return this.assertLegalChar(x)},C.prototype.xmlStandalone=function(x){return this.options.noValidation?x:x?"yes":"no"},C.prototype.dtdPubID=function(x){return this.options.noValidation?x:this.assertLegalChar(""+x||"")},C.prototype.dtdSysID=function(x){return this.options.noValidation?x:this.assertLegalChar(""+x||"")},C.prototype.dtdElementValue=function(x){return this.options.noValidation?x:this.assertLegalChar(""+x||"")},C.prototype.dtdAttType=function(x){return this.options.noValidation?x:this.assertLegalChar(""+x||"")},C.prototype.dtdAttDefault=function(x){return this.options.noValidation?x:this.assertLegalChar(""+x||"")},C.prototype.dtdEntityValue=function(x){return this.options.noValidation?x:this.assertLegalChar(""+x||"")},C.prototype.dtdNData=function(x){return this.options.noValidation?x:this.assertLegalChar(""+x||"")},C.prototype.convertAttKey="@",C.prototype.convertPIKey="?",C.prototype.convertTextKey="#text",C.prototype.convertCDataKey="#cdata",C.prototype.convertCommentKey="#comment",C.prototype.convertRawKey="#raw",C.prototype.assertLegalChar=function(x){var m,h;if(this.options.noValidation)return x;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=x.match(m))throw new Error("Invalid character in string: "+x+" at index "+h.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=x.match(m)))throw new Error("Invalid character in string: "+x+" at index "+h.index);return x},C.prototype.assertLegalName=function(x){var m;if(this.options.noValidation)return x;if(this.assertLegalChar(x),m=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!x.match(m))throw new Error("Invalid character in name");return x},C.prototype.textEscape=function(x){var m;return this.options.noValidation?x:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,x.replace(m,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},C.prototype.attEscape=function(x){var m;return this.options.noValidation?x:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,x.replace(m,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},C}()}).call(void 0)},{}],280:[function(a,G,d){"use strict";var f=a("babel-runtime/core-js/object/create"),i=O(f);function O(C){return C&&C.__esModule?C:{default:C}}(function(){var C,x,m,h=function(u,o){for(var g in o)s.call(o,g)&&(u[g]=o[g]);function p(){this.constructor=u}return p.prototype=o.prototype,u.prototype=new p,u.__super__=o.prototype,u},s={}.hasOwnProperty;C=a("./NodeType"),x=a("./XMLCharacterData"),G.exports=m=function(l){h(u,l);function u(o,g){if(u.__super__.constructor.call(this,o),g==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=C.Text,this.value=this.stringify.text(g)}return Object.defineProperty(u.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"wholeText",{get:function(){var g,p,v;for(v="",p=this.previousSibling;p;)v=p.data+v,p=p.previousSibling;for(v+=this.data,g=this.nextSibling;g;)v=v+g.data,g=g.nextSibling;return v}}),u.prototype.clone=function(){return(0,i.default)(this)},u.prototype.toString=function(o){return this.options.writer.text(this,this.options.writer.filterOptions(o))},u.prototype.splitText=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.replaceWholeText=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},u}(x)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(a,G,d){"use strict";(function(){var f,i,O,C,x,m,h,s,l,u,o,g,p,v,_,S,k,T={}.hasOwnProperty;k=a("./Utility").assign,f=a("./NodeType"),l=a("./XMLDeclaration"),u=a("./XMLDocType"),O=a("./XMLCData"),C=a("./XMLComment"),g=a("./XMLElement"),v=a("./XMLRaw"),_=a("./XMLText"),p=a("./XMLProcessingInstruction"),o=a("./XMLDummy"),x=a("./XMLDTDAttList"),m=a("./XMLDTDElement"),h=a("./XMLDTDEntity"),s=a("./XMLDTDNotation"),i=a("./WriterState"),G.exports=S=function(){function M(I){var j,D,y;I||(I={}),this.options=I,D=I.writer||{};for(j in D){if(!T.call(D,j))continue;y=D[j],this["_"+j]=this[j],this[j]=y}}return M.prototype.filterOptions=function(I){var j,D,y,J,X,N,F,H;return I||(I={}),I=k({},this.options,I),j={writer:this},j.pretty=I.pretty||!1,j.allowEmpty=I.allowEmpty||!1,j.indent=(D=I.indent)!=null?D:" ",j.newline=(y=I.newline)!=null?y:`
|
|
|
`,j.offset=(J=I.offset)!=null?J:0,j.dontPrettyTextNodes=(X=(N=I.dontPrettyTextNodes)!=null?N:I.dontprettytextnodes)!=null?X:0,j.spaceBeforeSlash=(F=(H=I.spaceBeforeSlash)!=null?H:I.spacebeforeslash)!=null?F:"",j.spaceBeforeSlash===!0&&(j.spaceBeforeSlash=" "),j.suppressPrettyCount=0,j.user={},j.state=i.None,j},M.prototype.indent=function(I,j,D){var y;return!j.pretty||j.suppressPrettyCount?"":j.pretty&&(y=(D||0)+j.offset+1,y>0)?new Array(y).join(j.indent):""},M.prototype.endline=function(I,j,D){return!j.pretty||j.suppressPrettyCount?"":j.newline},M.prototype.attribute=function(I,j,D){var y;return this.openAttribute(I,j,D),y=" "+I.name+'="'+I.value+'"',this.closeAttribute(I,j,D),y},M.prototype.cdata=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D)+"<![CDATA[",j.state=i.InsideTag,y+=I.value,j.state=i.CloseTag,y+="]]>"+this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.comment=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D)+"<!-- ",j.state=i.InsideTag,y+=I.value,j.state=i.CloseTag,y+=" -->"+this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.declaration=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D)+"<?xml",j.state=i.InsideTag,y+=' version="'+I.version+'"',I.encoding!=null&&(y+=' encoding="'+I.encoding+'"'),I.standalone!=null&&(y+=' standalone="'+I.standalone+'"'),j.state=i.CloseTag,y+=j.spaceBeforeSlash+"?>",y+=this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.docType=function(I,j,D){var y,J,X,N,F;if(D||(D=0),this.openNode(I,j,D),j.state=i.OpenTag,N=this.indent(I,j,D),N+="<!DOCTYPE "+I.root().name,I.pubID&&I.sysID?N+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.sysID&&(N+=' SYSTEM "'+I.sysID+'"'),I.children.length>0){for(N+=" [",N+=this.endline(I,j,D),j.state=i.InsideTag,F=I.children,J=0,X=F.length;J<X;J++)y=F[J],N+=this.writeChildNode(y,j,D+1);j.state=i.CloseTag,N+="]"}return j.state=i.CloseTag,N+=j.spaceBeforeSlash+">",N+=this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),N},M.prototype.element=function(I,j,D){var y,J,X,N,F,H,Z,ce,he,V,ve,ne,W,z;D||(D=0),V=!1,ve="",this.openNode(I,j,D),j.state=i.OpenTag,ve+=this.indent(I,j,D)+"<"+I.name,ne=I.attribs;for(he in ne){if(!T.call(ne,he))continue;y=ne[he],ve+=this.attribute(y,j,D)}if(X=I.children.length,N=X===0?null:I.children[0],X===0||I.children.every(function(R){return(R.type===f.Text||R.type===f.Raw)&&R.value===""}))j.allowEmpty?(ve+=">",j.state=i.CloseTag,ve+="</"+I.name+">"+this.endline(I,j,D)):(j.state=i.CloseTag,ve+=j.spaceBeforeSlash+"/>"+this.endline(I,j,D));else if(j.pretty&&X===1&&(N.type===f.Text||N.type===f.Raw)&&N.value!=null)ve+=">",j.state=i.InsideTag,j.suppressPrettyCount++,V=!0,ve+=this.writeChildNode(N,j,D+1),j.suppressPrettyCount--,V=!1,j.state=i.CloseTag,ve+="</"+I.name+">"+this.endline(I,j,D);else{if(j.dontPrettyTextNodes){for(W=I.children,F=0,Z=W.length;F<Z;F++)if(J=W[F],(J.type===f.Text||J.type===f.Raw)&&J.value!=null){j.suppressPrettyCount++,V=!0;break}}for(ve+=">"+this.endline(I,j,D),j.state=i.InsideTag,z=I.children,H=0,ce=z.length;H<ce;H++)J=z[H],ve+=this.writeChildNode(J,j,D+1);j.state=i.CloseTag,ve+=this.indent(I,j,D)+"</"+I.name+">",V&&j.suppressPrettyCount--,ve+=this.endline(I,j,D),j.state=i.None}return this.closeNode(I,j,D),ve},M.prototype.writeChildNode=function(I,j,D){switch(I.type){case f.CData:return this.cdata(I,j,D);case f.Comment:return this.comment(I,j,D);case f.Element:return this.element(I,j,D);case f.Raw:return this.raw(I,j,D);case f.Text:return this.text(I,j,D);case f.ProcessingInstruction:return this.processingInstruction(I,j,D);case f.Dummy:return"";case f.Declaration:return this.declaration(I,j,D);case f.DocType:return this.docType(I,j,D);case f.AttributeDeclaration:return this.dtdAttList(I,j,D);case f.ElementDeclaration:return this.dtdElement(I,j,D);case f.EntityDeclaration:return this.dtdEntity(I,j,D);case f.NotationDeclaration:return this.dtdNotation(I,j,D);default:throw new Error("Unknown XML node type: "+I.constructor.name)}},M.prototype.processingInstruction=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D)+"<?",j.state=i.InsideTag,y+=I.target,I.value&&(y+=" "+I.value),j.state=i.CloseTag,y+=j.spaceBeforeSlash+"?>",y+=this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.raw=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D),j.state=i.InsideTag,y+=I.value,j.state=i.CloseTag,y+=this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.text=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D),j.state=i.InsideTag,y+=I.value,j.state=i.CloseTag,y+=this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.dtdAttList=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D)+"<!ATTLIST",j.state=i.InsideTag,y+=" "+I.elementName+" "+I.attributeName+" "+I.attributeType,I.defaultValueType!=="#DEFAULT"&&(y+=" "+I.defaultValueType),I.defaultValue&&(y+=' "'+I.defaultValue+'"'),j.state=i.CloseTag,y+=j.spaceBeforeSlash+">"+this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.dtdElement=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D)+"<!ELEMENT",j.state=i.InsideTag,y+=" "+I.name+" "+I.value,j.state=i.CloseTag,y+=j.spaceBeforeSlash+">"+this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.dtdEntity=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D)+"<!ENTITY",j.state=i.InsideTag,I.pe&&(y+=" %"),y+=" "+I.name,I.value?y+=' "'+I.value+'"':(I.pubID&&I.sysID?y+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.sysID&&(y+=' SYSTEM "'+I.sysID+'"'),I.nData&&(y+=" NDATA "+I.nData)),j.state=i.CloseTag,y+=j.spaceBeforeSlash+">"+this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.dtdNotation=function(I,j,D){var y;return this.openNode(I,j,D),j.state=i.OpenTag,y=this.indent(I,j,D)+"<!NOTATION",j.state=i.InsideTag,y+=" "+I.name,I.pubID&&I.sysID?y+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.pubID?y+=' PUBLIC "'+I.pubID+'"':I.sysID&&(y+=' SYSTEM "'+I.sysID+'"'),j.state=i.CloseTag,y+=j.spaceBeforeSlash+">"+this.endline(I,j,D),j.state=i.None,this.closeNode(I,j,D),y},M.prototype.openNode=function(I,j,D){},M.prototype.closeNode=function(I,j,D){},M.prototype.openAttribute=function(I,j,D){},M.prototype.closeAttribute=function(I,j,D){},M}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(a,G,d){"use strict";(function(){var f,i,O,C,x,m,h,s,l,u;u=a("./Utility"),s=u.assign,l=u.isFunction,O=a("./XMLDOMImplementation"),C=a("./XMLDocument"),x=a("./XMLDocumentCB"),h=a("./XMLStringWriter"),m=a("./XMLStreamWriter"),f=a("./NodeType"),i=a("./WriterState"),G.exports.create=function(o,g,p,v){var _,S;if(o==null)throw new Error("Root element needs a name.");return v=s({},g,p,v),_=new C(v),S=_.element(o),v.headless||(_.declaration(v),(v.pubID!=null||v.sysID!=null)&&_.dtd(v)),S},G.exports.begin=function(o,g,p){var v;return l(o)&&(v=[o,g],g=v[0],p=v[1],o={}),g?new x(o,g,p):new C(o)},G.exports.stringWriter=function(o){return new h(o)},G.exports.streamWriter=function(o,g){return new m(o,g)},G.exports.implementation=new O,G.exports.nodeType=f,G.exports.writerState=i}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(a,G,d){G.exports=i;var f=Object.prototype.hasOwnProperty;function i(){for(var O={},C=0;C<arguments.length;C++){var x=arguments[C];for(var m in x)f.call(x,m)&&(O[m]=x[m])}return O}},{}],284:[function(a,G,d){"use strict";var f=a("buffer").Buffer,i=a("./sha"),O=a("./md5"),C={sha1:i,md5:O},x=64,m=f.alloc(x);m.fill(0);function h(u,o,g){f.isBuffer(o)||(o=f.from(o)),f.isBuffer(g)||(g=f.from(g)),o.length>x?o=u(o):o.length<x&&(o=f.concat([o,m],x));for(var p=f.alloc(x),v=f.alloc(x),_=0;_<x;_++)p[_]=o[_]^54,v[_]=o[_]^92;var S=u(f.concat([p,g]));return u(f.concat([v,S]))}function s(u,o){u=u||"sha1";var g=C[u],p=[],v=0;return g||l("algorithm:",u,"is not yet supported"),{update:function(S){return f.isBuffer(S)||(S=f.from(S)),p.push(S),v+=S.length,this},digest:function(S){var k=f.concat(p),T=o?h(g,o,k):g(k);return p=null,S?T.toString(S):T}}}function l(){var u=[].slice.call(arguments).join(" ");throw new Error([u,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}d.createHash=function(u){return s(u)},d.createHmac=function(u,o){return s(u,o)},d.createCredentials=function(){l("sorry,createCredentials is not implemented yet")},d.createCipher=function(){l("sorry,createCipher is not implemented yet")},d.createCipheriv=function(){l("sorry,createCipheriv is not implemented yet")},d.createDecipher=function(){l("sorry,createDecipher is not implemented yet")},d.createDecipheriv=function(){l("sorry,createDecipheriv is not implemented yet")},d.createSign=function(){l("sorry,createSign is not implemented yet")},d.createVerify=function(){l("sorry,createVerify is not implemented yet")},d.createDiffieHellman=function(){l("sorry,createDiffieHellman is not implemented yet")},d.pbkdf2=function(){l("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(a,G,d){"use strict";var f=a("buffer").Buffer,i=4,O=f.alloc(i);O.fill(0);var C=8;function x(s,l){if(s.length%i!==0){var u=s.length+(i-s.length%i);s=f.concat([s,O],u)}for(var o=[],g=l?s.readInt32BE:s.readInt32LE,p=0;p<s.length;p+=i)o.push(g.call(s,p));return o}function m(s,l,u){for(var o=f.alloc(l),g=u?o.writeInt32BE:o.writeInt32LE,p=0;p<s.length;p++)g.call(o,s[p],p*4,!0);return o}function h(s,l,u,o){f.isBuffer(s)||(s=f.from(s));var g=l(x(s,o),s.length*C);return m(g,u,o)}G.exports={hash:h}},{buffer:73}],286:[function(a,G,d){"use strict";var f=a("./helpers");function i(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function O(o,g){o[g>>5]|=128<<g%32,o[(g+64>>>9<<4)+14]=g;for(var p=1732584193,v=-271733879,_=-1732584194,S=271733878,k=0;k<o.length;k+=16){var T=p,M=v,I=_,j=S;p=x(p,v,_,S,o[k+0],7,-680876936),S=x(S,p,v,_,o[k+1],12,-389564586),_=x(_,S,p,v,o[k+2],17,606105819),v=x(v,_,S,p,o[k+3],22,-1044525330),p=x(p,v,_,S,o[k+4],7,-176418897),S=x(S,p,v,_,o[k+5],12,1200080426),_=x(_,S,p,v,o[k+6],17,-1473231341),v=x(v,_,S,p,o[k+7],22,-45705983),p=x(p,v,_,S,o[k+8],7,1770035416),S=x(S,p,v,_,o[k+9],12,-1958414417),_=x(_,S,p,v,o[k+10],17,-42063),v=x(v,_,S,p,o[k+11],22,-1990404162),p=x(p,v,_,S,o[k+12],7,1804603682),S=x(S,p,v,_,o[k+13],12,-40341101),_=x(_,S,p,v,o[k+14],17,-1502002290),v=x(v,_,S,p,o[k+15],22,1236535329),p=m(p,v,_,S,o[k+1],5,-165796510),S=m(S,p,v,_,o[k+6],9,-1069501632),_=m(_,S,p,v,o[k+11],14,643717713),v=m(v,_,S,p,o[k+0],20,-373897302),p=m(p,v,_,S,o[k+5],5,-701558691),S=m(S,p,v,_,o[k+10],9,38016083),_=m(_,S,p,v,o[k+15],14,-660478335),v=m(v,_,S,p,o[k+4],20,-405537848),p=m(p,v,_,S,o[k+9],5,568446438),S=m(S,p,v,_,o[k+14],9,-1019803690),_=m(_,S,p,v,o[k+3],14,-187363961),v=m(v,_,S,p,o[k+8],20,1163531501),p=m(p,v,_,S,o[k+13],5,-1444681467),S=m(S,p,v,_,o[k+2],9,-51403784),_=m(_,S,p,v,o[k+7],14,1735328473),v=m(v,_,S,p,o[k+12],20,-1926607734),p=h(p,v,_,S,o[k+5],4,-378558),S=h(S,p,v,_,o[k+8],11,-2022574463),_=h(_,S,p,v,o[k+11],16,1839030562),v=h(v,_,S,p,o[k+14],23,-35309556),p=h(p,v,_,S,o[k+1],4,-1530992060),S=h(S,p,v,_,o[k+4],11,1272893353),_=h(_,S,p,v,o[k+7],16,-155497632),v=h(v,_,S,p,o[k+10],23,-1094730640),p=h(p,v,_,S,o[k+13],4,681279174),S=h(S,p,v,_,o[k+0],11,-358537222),_=h(_,S,p,v,o[k+3],16,-722521979),v=h(v,_,S,p,o[k+6],23,76029189),p=h(p,v,_,S,o[k+9],4,-640364487),S=h(S,p,v,_,o[k+12],11,-421815835),_=h(_,S,p,v,o[k+15],16,530742520),v=h(v,_,S,p,o[k+2],23,-995338651),p=s(p,v,_,S,o[k+0],6,-198630844),S=s(S,p,v,_,o[k+7],10,1126891415),_=s(_,S,p,v,o[k+14],15,-1416354905),v=s(v,_,S,p,o[k+5],21,-57434055),p=s(p,v,_,S,o[k+12],6,1700485571),S=s(S,p,v,_,o[k+3],10,-1894986606),_=s(_,S,p,v,o[k+10],15,-1051523),v=s(v,_,S,p,o[k+1],21,-2054922799),p=s(p,v,_,S,o[k+8],6,1873313359),S=s(S,p,v,_,o[k+15],10,-30611744),_=s(_,S,p,v,o[k+6],15,-1560198380),v=s(v,_,S,p,o[k+13],21,1309151649),p=s(p,v,_,S,o[k+4],6,-145523070),S=s(S,p,v,_,o[k+11],10,-1120210379),_=s(_,S,p,v,o[k+2],15,718787259),v=s(v,_,S,p,o[k+9],21,-343485551),p=l(p,T),v=l(v,M),_=l(_,I),S=l(S,j)}return Array(p,v,_,S)}function C(o,g,p,v,_,S){return l(u(l(l(g,o),l(v,S)),_),p)}function x(o,g,p,v,_,S,k){return C(g&p|~g&v,o,g,_,S,k)}function m(o,g,p,v,_,S,k){return C(g&v|p&~v,o,g,_,S,k)}function h(o,g,p,v,_,S,k){return C(g^p^v,o,g,_,S,k)}function s(o,g,p,v,_,S,k){return C(p^(g|~v),o,g,_,S,k)}function l(o,g){var p=(o&65535)+(g&65535),v=(o>>16)+(g>>16)+(p>>16);return v<<16|p&65535}function u(o,g){return o<<g|o>>>32-g}G.exports=function(g){return f.hash(g,O,16)}},{"./helpers":285}],287:[function(a,G,d){"use strict";var f=a("./helpers");function i(h,s){h[s>>5]|=128<<24-s%32,h[(s+64>>9<<4)+15]=s;for(var l=Array(80),u=1732584193,o=-271733879,g=-1732584194,p=271733878,v=-1009589776,_=0;_<h.length;_+=16){for(var S=u,k=o,T=g,M=p,I=v,j=0;j<80;j++){j<16?l[j]=h[_+j]:l[j]=m(l[j-3]^l[j-8]^l[j-14]^l[j-16],1);var D=x(x(m(u,5),O(j,o,g,p)),x(x(v,l[j]),C(j)));v=p,p=g,g=m(o,30),o=u,u=D}u=x(u,S),o=x(o,k),g=x(g,T),p=x(p,M),v=x(v,I)}return Array(u,o,g,p,v)}function O(h,s,l,u){return h<20?s&l|~s&u:h<40?s^l^u:h<60?s&l|s&u|l&u:s^l^u}function C(h){return h<20?1518500249:h<40?1859775393:h<60?-1894007588:-899497514}function x(h,s){var l=(h&65535)+(s&65535),u=(h>>16)+(s>>16)+(l>>16);return u<<16|l&65535}function m(h,s){return h<<s|h>>>32-s}G.exports=function(s){return f.hash(s,i,20,!0)}},{"./helpers":285}],288:[function(a,G,d){"use strict";G.exports=function(){return function(){}}},{}],289:[function(a,G,d){(function(f){"use strict";var i=a("babel-runtime/helpers/typeof"),O=C(i);function C(u){return u&&u.__esModule?u:{default:u}}var x=a("stream"),m=x.Stream,h=a("../lib/common/utils/isArray"),s=h.isArray;G.exports.string=function(o){return typeof o=="string"},G.exports.array=s,G.exports.buffer=f.isBuffer;function l(u){return u instanceof m}G.exports.writableStream=function(o){return l(o)&&typeof o._write=="function"&&(0,O.default)(o._writableState)==="object"}}).call(this,{isBuffer:a("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(a,G,d){"use strict";d.encodeURIComponent=function(f){try{return encodeURIComponent(f)}catch(i){return f}},d.escape=a("escape-html"),d.timestamp=function(i){if(i){var O=i;return typeof O=="string"&&(O=Number(O)),String(i).length===10&&(O*=1e3),new Date(O)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(a,G,d){(function(f,i){"use strict";var O=a("babel-runtime/core-js/json/stringify"),C=h(O),x=a("babel-runtime/helpers/typeof"),m=h(x);function h(j){return j&&j.__esModule?j:{default:j}}var s=a("util"),l=a("url"),u=a("http"),o=a("https"),g=a("debug")("urllib"),p=a("humanize-ms"),v,_=0,S=Math.pow(2,31)-10,k=/^https?:\/\//i;function T(j,D){return j===void 0?D:j}function M(j,D){return function(y,J,X){if(y)return D(y);j({data:J,status:X.statusCode,headers:X.headers,res:X})}}d.TIMEOUTS=[p("300s"),p("300s")];var I=["json","text"];d.request=function(D,y,J){return arguments.length===2&&typeof y=="function"&&(J=y,y=null),typeof J=="function"?d.requestWithCallback(D,y,J):(v||(v=a("any-promise")),new v(function(X,N){d.requestWithCallback(D,y,M(X,N))}))},d.requestWithCallback=function(D,y,J){if(!D||typeof D!="string"&&(typeof D=="undefined"?"undefined":(0,m.default)(D))!=="object"){var X=s.format("expect request url to be a string or a http request options, but got %j",D);throw new Error(X)}arguments.length===2&&typeof y=="function"&&(J=y,y=null),y=y||{},_>=S&&(_=0);var N=++_;y.requestUrls=y.requestUrls||[];var F={requestId:N,url:D,args:y,ctx:y.ctx};y.emitter&&y.emitter.emit("request",F),y.timeout=y.timeout||d.TIMEOUTS,y.maxRedirects=y.maxRedirects||10,y.streaming=y.streaming||y.customResponse;var H=Date.now(),Z;typeof D=="string"?(k.test(D)||(D="http://"+D),Z=l.parse(D)):Z=D;var ce=(y.type||y.method||Z.method||"GET").toUpperCase(),he=Z.port||80,V=u,ve=T(y.agent,d.agent),ne=y.fixJSONCtlChars;Z.protocol==="https:"&&(V=o,ve=T(y.httpsAgent,d.httpsAgent),Z.port||(he=443));var W={host:Z.hostname||Z.host||"localhost",path:Z.path||"/",method:ce,port:he,agent:ve,headers:y.headers||{},lookup:y.lookup};Array.isArray(y.timeout)?W.requestTimeout=y.timeout[y.timeout.length-1]:typeof y.timeout!="undefined"&&(W.requestTimeout=y.timeout);for(var z=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],R=0;R<z.length;R++){var w=z[R];y.hasOwnProperty(w)&&(W[w]=y[w])}W.rejectUnauthorized===!1&&!W.hasOwnProperty("secureOptions")&&(W.secureOptions=a("constants").SSL_OP_NO_TLSv1_2);var P=y.auth||Z.auth;P&&(W.auth=P);var le=y.content||y.data,pe=ce==="GET"||ce==="HEAD"||y.dataAsQueryString;if(!y.content&&(le&&!(typeof le=="string"||i.isBuffer(le))))if(pe)le=y.nestedQuerystring?qs.stringify(le):querystring.stringify(le);else{var ye=W.headers["Content-Type"]||W.headers["content-type"];ye||(y.contentType==="json"?ye="application/json":ye="application/x-www-form-urlencoded",W.headers["Content-Type"]=ye),parseContentType(ye).type==="application/json"?le=(0,C.default)(le):le=y.nestedQuerystring?qs.stringify(le):querystring.stringify(le)}pe&&le&&(W.path+=(Z.query?"&":"?")+le,le=null);var Ee=0;if(le){var Oe=le.length;i.isBuffer(le)||(Oe=i.byteLength(le)),Ee=W.headers["Content-Length"]=Oe}y.dataType==="json"&&(W.headers.Accept="application/json"),typeof y.beforeRequest=="function"&&y.beforeRequest(W);var ae=null,fe=null,ge=null,q=!1,ie=!1,$=0,se=-1,K=!1,Y="",Ce="",Q=null;y.timing&&(Q={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function B(){ae&&(clearTimeout(ae),ae=null)}function E(){fe&&(clearTimeout(fe),fe=null)}function U(Ne,tt,nt){if(E(),!J){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),N,f.pid,W.method,D),Ne&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),N,f.pid,Ne.name,Ne.message,Ne.stack);return}var Ke=J;J=null;var $e={};if(nt&&(se=nt.statusCode,$e=nt.headers),se===401&&$e["www-authenticate"]&&(!y.headers||!y.headers.Authorization)&&y.digestAuth){var je=$e["www-authenticate"];if(je.indexOf("Digest ")>=0)return g("Request#%d %s: got digest auth header WWW-Authenticate: %s",N,D,je),y.headers=y.headers||{},y.headers.Authorization=digestAuthHeader(W.method,W.path,je,y.digestAuth),g("Request#%d %s: auth with digest header: %s",N,D,y.headers.Authorization),nt.headers["set-cookie"]&&(y.headers.Cookie=nt.headers["set-cookie"].join(";")),d.requestWithCallback(D,y,Ke)}var Me=Date.now()-H;Q&&(Q.contentDownload=Me),g("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Me,$,se,W.method,W.host,W.path,ie,Q);var Ie={status:se,statusCode:se,headers:$e,size:$,aborted:K,rt:Me,keepAliveSocket:ie,data:tt,requestUrls:y.requestUrls,timing:Q,remoteAddress:Y,remotePort:Ce};if(Ne){var _e="";ve&&typeof ve.getCurrentStatus=="function"&&(_e=", agent status: "+(0,C.default)(ve.getCurrentStatus())),Ne.message+=", "+W.method+" "+D+" "+se+" (connected: "+q+", keepalive socket: "+ie+_e+`)
|
|
|
headers: `+(0,C.default)($e),Ne.data=tt,Ne.path=W.path,Ne.status=se,Ne.headers=$e,Ne.res=Ie}Ke(Ne,tt,y.streaming?nt:Ie),y.emitter&&(F.url=D,F.socket=Xe&&Xe.connection,F.options=W,F.size=Ee,y.emitter.emit("response",{requestId:N,error:Ne,ctx:y.ctx,req:F,res:Ie}))}function xe(Ne){var tt=null;if(y.followRedirect&&statuses.redirect[Ne.statusCode]){y._followRedirectCount=(y._followRedirectCount||0)+1;var nt=Ne.headers.location;if(!nt)tt=new Error("Got statusCode "+Ne.statusCode+" but cannot resolve next location from headers"),tt.name="FollowRedirectError";else if(y._followRedirectCount>y.maxRedirects)tt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+D),tt.name="MaxRedirectError";else{var Ke=y.formatRedirectUrl?y.formatRedirectUrl(D,nt):l.resolve(D,nt);g("Request#%d %s: `redirected` from %s to %s",N,W.path,D,Ke),E(),y.headers&&y.headers.Host&&k.test(nt)&&(y.headers.Host=null);var $e=J;return J=null,d.requestWithCallback(Ke,y,$e),{redirect:!0,error:null}}}return{redirect:!1,error:tt}}!W.headers["User-Agent"]&&!W.headers["user-agent"]&&(W.headers["User-Agent"]=navigator.userAgent),y.gzip&&(!W.headers["Accept-Encoding"]&&!W.headers["accept-encoding"]&&(W.headers["Accept-Encoding"]="gzip"));function be(Ne,tt,nt){var Ke=Ne.headers["content-encoding"];return nt(null,tt,Ke)}var Te=y.writeStream;g("Request#%d %s %s with headers %j, options.path: %s",N,ce,D,W.headers,W.path),y.requestUrls.push(D);function Fe(Ne){if(Q&&(Q.waiting=Date.now()-H),g("Request#%d %s `req response` event emit: status %d, headers: %j",N,D,Ne.statusCode,Ne.headers),y.streaming){var tt=xe(Ne);if(tt.redirect){Ne.resume();return}return tt.error?(Ne.resume(),U(tt.error,null,Ne)):U(null,null,Ne)}if(Ne.on("close",function(){g("Request#%d %s: `res close` event emit, total size %d",N,D,$)}),Ne.on("error",function(){g("Request#%d %s: `res error` event emit, total size %d",N,D,$)}),Ne.on("aborted",function(){K=!0,g("Request#%d %s: `res aborted` event emit, total size %d",N,D,$)}),Te){var tt=xe(Ne);if(tt.redirect){Ne.resume();return}return tt.error?(Ne.resume(),Te.end(),U(tt.error,null,Ne)):(y.consumeWriteStream===!1?Ne.on("end",U.bind(null,null,null,Ne)):isNode010||isNode012?first([[Te,"close"],[Ne,"aborted"]],function($e,je,Me){g("Request#%d %s: writeStream or res %s event emitted",N,D,Me),U(ge||null,null,Ne)}):Te.on("close",function(){g("Request#%d %s: writeStream close event emitted",N,D),U(ge||null,null,Ne)}),Ne.pipe(Te))}var nt=[];Ne.on("data",function(Ke){g("Request#%d %s: `res data` event emit, size %d",N,D,Ke.length),$+=Ke.length,nt.push(Ke)}),Ne.on("end",function(){var Ke=i.concat(nt,$);if(g("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",N,D,$,Ne._dumped),ge)return U(ge,Ke,Ne);var $e=xe(Ne);if($e.error)return U($e.error,Ke,Ne);if($e.redirect)return;be(Ne,Ke,function(je,Me,Ie){if(je)return U(je,Ke,Ne);if(!Ie&&I.indexOf(y.dataType)>=0){try{Me=decodeBodyByCharset(Me,Ne)}catch(Se){return g("decodeBodyByCharset error: %s",Se),U(null,Me,Ne)}if(y.dataType==="json")if($===0)Me=null;else{var _e=parseJSON(Me,ne);_e.error?je=_e.error:Me=_e.data}}K&&g("Request#%d %s: Remote socket was terminated before `response.end()` was called",N,D),U(je,Me,Ne)})})}var Be,Ue;Array.isArray(y.timeout)?(Be=p(y.timeout[0]),Ue=p(y.timeout[1])):Be=Ue=p(y.timeout),g("ConnectTimeout: %d, ResponseTimeout: %d",Be,Ue);function ze(){g("Connect timer ticking, timeout: %d",Be),ae=setTimeout(function(){ae=null,se===-1&&(se=-2);var Ne="Connect timeout for "+Be+"ms",tt="ConnectionTimeoutError";Xe.socket||(tt="SocketAssignTimeoutError",Ne+=", working sockets is full"),ge=new Error(Ne),ge.name=tt,ge.requestId=N,g("ConnectTimeout: Request#%d %s %s: %s, connected: %s",N,D,ge.name,Ne,q),Je()},Be)}function Ve(){g("Response timer ticking, timeout: %d",Ue),fe=setTimeout(function(){fe=null;var Ne="Response timeout for "+Ue+"ms",tt="ResponseTimeoutError";ge=new Error(Ne),ge.name=tt,ge.requestId=N,g("ResponseTimeout: Request#%d %s %s: %s, connected: %s",N,D,ge.name,Ne,q),Je()},Ue)}var Xe;W.mode=y.mode?y.mode:"";try{Xe=V.request(W,Fe)}catch(Ne){return U(Ne)}typeof window=="undefined"?ze():Xe.on("requestTimeout",function(){se===-1&&(se=-2);var Ne="Connect timeout for "+Be+"ms",tt="ConnectionTimeoutError";ge=new Error(Ne),ge.name=tt,ge.requestId=N,Je()});function Je(){g("Request#%d %s abort, connected: %s",N,D,q),Xe.socket||(ge.noSocket=!0,U(ge)),Xe.abort()}return Q&&Xe.on("finish",function(){Q.requestSent=Date.now()-H}),Xe.once("socket",function(Ne){Q&&(Q.queuing=Date.now()-H),isNode010&&Ne.socket&&(Ne=Ne.socket);var tt=Ne.readyState;if(tt==="opening"){Ne.once("lookup",function(nt,Ke,$e){g("Request#%d %s lookup: %s, %s, %s",N,D,nt,Ke,$e),Q&&(Q.dnslookup=Date.now()-H),Ke&&(Y=Ke)}),Ne.once("connect",function(){Q&&(Q.connected=Date.now()-H),B(),Ve(),g("Request#%d %s new socket connected",N,D),q=!0,Y||(Y=Ne.remoteAddress),Ce=Ne.remotePort});return}g("Request#%d %s reuse socket connected, readyState: %s",N,D,tt),q=!0,ie=!0,Y||(Y=Ne.remoteAddress),Ce=Ne.remotePort,B(),Ve()}),Xe.on("error",function(Ne){(Ne.name==="Error"||Ne.name==="TypeError")&&(Ne.name=q?"ResponseError":"RequestError"),Ne.message+=' (req "error")',g("Request#%d %s `req error` event emit, %s: %s",N,D,Ne.name,Ne.message),U(ge||Ne)}),Te&&Te.once("error",function(Ne){Ne.message+=' (writeStream "error")',ge=Ne,g("Request#%d %s `writeStream error` event emit, %s: %s",N,D,Ne.name,Ne.message),Je()}),y.stream?(y.stream.pipe(Xe),y.stream.once("error",function(Ne){Ne.message+=' (stream "error")',ge=Ne,g("Request#%d %s `readStream error` event emit, %s: %s",N,D,Ne.name,Ne.message),Je()})):Xe.end(le),Xe.requestId=N,Xe}}).call(this,a("_process"),a("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},nj2k:function(a,G,d){a.exports=d.p+"static/nodata.c3b0b86c.svg"},oRuE:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.pad.Iso10126={pad:function(i,O){var C=O*4,x=C-i.sigBytes%C;i.concat(f.lib.WordArray.random(x-1)).concat(f.lib.WordArray.create([x<<24],1))},unpad:function(i){var O=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=O}},f.pad.Iso10126})},osHv:function(a,G,d){(function(f){f(d("VrN/"))})(function(f){"use strict";var i=f.Pos;function O(k,T){return k.line-T.line||k.ch-T.ch}var C="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",x=C+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+C+"]["+x+"]*)","g");function h(k,T,M,I){this.line=T,this.ch=M,this.cm=k,this.text=k.getLine(T),this.min=I?Math.max(I.from,k.firstLine()):k.firstLine(),this.max=I?Math.min(I.to-1,k.lastLine()):k.lastLine()}function s(k,T){var M=k.cm.getTokenTypeAt(i(k.line,T));return M&&/\btag\b/.test(M)}function l(k){return k.line>=k.max?void 0:(k.ch=0,k.text=k.cm.getLine(++k.line),!0)}function u(k){return k.line<=k.min?void 0:(k.text=k.cm.getLine(--k.line),k.ch=k.text.length,!0)}function o(k){for(;;){var T=k.text.indexOf(">",k.ch);if(T==-1){if(l(k))continue;return}if(!s(k,T+1)){k.ch=T+1;continue}var M=k.text.lastIndexOf("/",T),I=M>-1&&!/\S/.test(k.text.slice(M+1,T));return k.ch=T+1,I?"selfClose":"regular"}}function g(k){for(;;){var T=k.ch?k.text.lastIndexOf("<",k.ch-1):-1;if(T==-1){if(u(k))continue;return}if(!s(k,T+1)){k.ch=T;continue}m.lastIndex=T,k.ch=T;var M=m.exec(k.text);if(M&&M.index==T)return M}}function p(k){for(;;){m.lastIndex=k.ch;var T=m.exec(k.text);if(!T){if(l(k))continue;return}if(!s(k,T.index+1)){k.ch=T.index+1;continue}return k.ch=T.index+T[0].length,T}}function v(k){for(;;){var T=k.ch?k.text.lastIndexOf(">",k.ch-1):-1;if(T==-1){if(u(k))continue;return}if(!s(k,T+1)){k.ch=T;continue}var M=k.text.lastIndexOf("/",T),I=M>-1&&!/\S/.test(k.text.slice(M+1,T));return k.ch=T+1,I?"selfClose":"regular"}}function _(k,T){for(var M=[];;){var I=p(k),j,D=k.line,y=k.ch-(I?I[0].length:0);if(!I||!(j=o(k)))return;if(j=="selfClose")continue;if(I[1]){for(var J=M.length-1;J>=0;--J)if(M[J]==I[2]){M.length=J;break}if(J<0&&(!T||T==I[2]))return{tag:I[2],from:i(D,y),to:i(k.line,k.ch)}}else M.push(I[2])}}function S(k,T){for(var M=[];;){var I=v(k);if(!I)return;if(I=="selfClose"){g(k);continue}var j=k.line,D=k.ch,y=g(k);if(!y)return;if(y[1])M.push(y[2]);else{for(var J=M.length-1;J>=0;--J)if(M[J]==y[2]){M.length=J;break}if(J<0&&(!T||T==y[2]))return{tag:y[2],from:i(k.line,k.ch),to:i(j,D)}}}}f.registerHelper("fold","xml",function(k,T){for(var M=new h(k,T.line,0);;){var I=p(M);if(!I||M.line!=T.line)return;var j=o(M);if(!j)return;if(!I[1]&&j!="selfClose"){var D=i(M.line,M.ch),y=_(M,I[2]);return y&&O(y.from,D)>0?{from:D,to:y.from}:null}}}),f.findMatchingTag=function(k,T,M){var I=new h(k,T.line,T.ch,M);if(I.text.indexOf(">")==-1&&I.text.indexOf("<")==-1)return;var j=o(I),D=j&&i(I.line,I.ch),y=j&&g(I);if(!j||!y||O(I,T)>0)return;var J={from:i(I.line,I.ch),to:D,tag:y[2]};return j=="selfClose"?{open:J,close:null,at:"open"}:y[1]?{open:S(I,y[2]),close:J,at:"close"}:(I=new h(k,D.line,D.ch,M),{open:J,close:_(I,y[2]),at:"open"})},f.findEnclosingTag=function(k,T,M,I){for(var j=new h(k,T.line,T.ch,M);;){var D=S(j,I);if(!D)break;var y=new h(k,T.line,T.ch,M),J=_(y,D.tag);if(J)return{open:D,close:J}}},f.scanForClosingTag=function(k,T,M,I){var j=new h(k,T.line,T.ch,I?{from:0,to:I}:null);return _(j,M)}})},p5ED:function(a,G,d){"use strict";var f=d("+L6B"),i=d("2/Rp"),O=d("5Dmo"),C=d("3S7+"),x=d("k1fw"),m=d("9og8"),h=d("tJVT"),s=d("WmNS"),l=d.n(s),u=d("q1tI"),o=d.n(u),g=d("vHTk"),p=d.n(g),v=d("yEEn"),_=d("ZW9T"),S=d("1vsH"),k=d("V0Rq"),T=d("m3rI"),M=function(j){var D=j.name,y=j.data,J=j.theme,X=j.type,N=j.filename,F=j.monacoEditor,H=j.className,Z=j.style,ce=j.close,he=j.onClose,V=j.hasMask,ve=j.otherData,ne=ve===void 0?{}:ve,W=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),z=Object(h.a)(W,2),R=z[0],w=z[1],P=Object(u.useState)(""),le=Object(h.a)(P,2),pe=le[0],ye=le[1],Ee=Object(u.useState)(),Oe=Object(h.a)(Ee,2),ae=Oe[0],fe=Oe[1],ge=window.ENV==="build"?"/react/build/office.html":"/office.html",q,ie=1024*1024,$=10*ie,se=Object(u.useRef)();X==="office"&&(q=Object(S.R)(y).filesize,q>$&&(X="other")),N&&(F.filename=N),Object(u.useEffect)(function(){var Q,B,E=(Q=document.cookie)===null||Q===void 0||((B=Q.replace(/\s/g,""))===null||B===void 0)?void 0:B.split(";");E==null||E.map(function(U){var xe=U.split("=");xe[0]==="_educoder_session"&&ye(xe[1])})},[]),Object(u.useEffect)(function(){X==="office"&&K()},[X]);var K=function(){var Q=Object(m.a)(l.a.mark(function B(){var E,U,xe;return l.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return console.log("data:",y),E=y,y.startsWith("http")||(E=location.origin+E),U=new URL(E).pathname.split("/").pop(),Te.next=6,Object(k.U)({attachment_id:U});case 6:xe=Te.sent,fe(xe);case 8:case"end":return Te.stop()}},B)}));return function(){return Q.apply(this,arguments)}}(),Y=function(){if(y.startsWith("http")||y.startsWith("/api")||y.startsWith("blob:")){Ce();return}Object(S.x)(N||"educoder",y,N||"educoder")},Ce=function(){Object(S.v)(N||"educoder",decodeURIComponent(y))};return o.a.createElement("div",{style:Object(x.a)({},Z||{}),className:"".concat(V&&p.a.bgBlack," ").concat(X?p.a.wrp:"hide")},ce&&o.a.createElement("div",{className:p.a.close,ref:se},o.a.createElement(C.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return se.current}},o.a.createElement("span",{onClick:Ce},o.a.createElement("i",{className:"icon-quxiaozhiding"}))),o.a.createElement(C.a,{title:"\u5173\u95ED",getPopupContainer:function(){return se.current}},o.a.createElement("span",{className:"",onClick:function(){he(),fe(null)}},o.a.createElement("i",{className:"icon-guanbi1"})))),o.a.createElement("div",{className:"".concat(p.a[H]," ").concat(H," ").concat(p.a.monaco," ").concat(X==="txt"?"show":"hide")},X==="txt"&&o.a.createElement(_.b,F)),X==="audio"&&o.a.createElement("audio",{src:"".concat((y==null?void 0:y.indexOf("http://"))>-1||(y==null?void 0:y.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(y),autoPlay:!0}),X==="video"&&o.a.createElement(o.a.Fragment,null,(y==null?void 0:y.indexOf("/api"))>-1?o.a.createElement("video",{controls:!0,src:"".concat(y),autoPlay:!0}):o.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(y),autoPlay:!0})),X==="office"&&ae&&o.a.createElement("iframe",{src:"".concat(ge,"?key=").concat(ae.key,"&url=").concat(T.a.API_SERVER+ae.url,"&callbackUrl=").concat(T.a.API_SERVER+ae.callbackUrl,"&fileType=").concat(ae.fileType,"&title=").concat(ae.title,"&model=view")}),(X==="xlsx"||X==="doc"||X==="pptx"||X==="docx")&&o.a.createElement("iframe",{src:"".concat(ge,"?key=").concat(ne.key,"&url=").concat(T.a.API_SERVER+ne.url,"&callbackUrl=").concat(T.a.API_SERVER+ne.callbackUrl,"&fileType=").concat(ne.fileType,"&title=").concat(ne.title,"&model=").concat(ne.model)}),X==="html"&&o.a.createElement("iframe",{src:y+"&disposition=inline"}),X==="pdf"&&o.a.createElement("embed",{className:p.a.embed,src:y,type:"application/pdf"}),X==="image"&&o.a.createElement("img",{src:"".concat((y==null?void 0:y.indexOf("http://"))>-1||(y==null?void 0:y.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(y)}),X==="other"&&o.a.createElement("div",null,o.a.createElement(i.a,{type:"primary",size:"large",onClick:Y},o.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),X==="download"&&o.a.createElement(i.a,{type:"primary",size:"large",onClick:Y},o.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};G.a=M},"p77/":function(a,G,d){},pA7S:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("ETIr"),d("cv67"),d("K3mO"),d("OLod"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.WordArray,x=O.BlockCipher,m=i.algo,h=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],o=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],g=m.DES=x.extend({_doReset:function(){for(var S=this._key,k=S.words,T=[],M=0;M<56;M++){var I=h[M]-1;T[M]=k[I>>>5]>>>31-I%32&1}for(var j=this._subKeys=[],D=0;D<16;D++){for(var y=j[D]=[],J=l[D],M=0;M<24;M++)y[M/6|0]|=T[(s[M]-1+J)%28]<<31-M%6,y[4+(M/6|0)]|=T[28+(s[M+24]-1+J)%28]<<31-M%6;y[0]=y[0]<<1|y[0]>>>31;for(var M=1;M<7;M++)y[M]=y[M]>>>(M-1)*4+3;y[7]=y[7]<<5|y[7]>>>27}for(var X=this._invSubKeys=[],M=0;M<16;M++)X[M]=j[15-M]},encryptBlock:function(S,k){this._doCryptBlock(S,k,this._subKeys)},decryptBlock:function(S,k){this._doCryptBlock(S,k,this._invSubKeys)},_doCryptBlock:function(S,k,T){this._lBlock=S[k],this._rBlock=S[k+1],p.call(this,4,252645135),p.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),p.call(this,1,1431655765);for(var M=0;M<16;M++){for(var I=T[M],j=this._lBlock,D=this._rBlock,y=0,J=0;J<8;J++)y|=u[J][((D^I[J])&o[J])>>>0];this._lBlock=D,this._rBlock=j^y}var X=this._lBlock;this._lBlock=this._rBlock,this._rBlock=X,p.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),S[k]=this._lBlock,S[k+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(S,k){var T=(this._lBlock>>>S^this._rBlock)&k;this._rBlock^=T,this._lBlock^=T<<S}function v(S,k){var T=(this._rBlock>>>S^this._lBlock)&k;this._lBlock^=T,this._rBlock^=T<<S}i.DES=x._createHelper(g);var _=m.TripleDES=x.extend({_doReset:function(){var S=this._key,k=S.words;if(k.length!==2&&k.length!==4&&k.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var T=k.slice(0,2),M=k.length<4?k.slice(0,2):k.slice(2,4),I=k.length<6?k.slice(0,2):k.slice(4,6);this._des1=g.createEncryptor(C.create(T)),this._des2=g.createEncryptor(C.create(M)),this._des3=g.createEncryptor(C.create(I))},encryptBlock:function(S,k){this._des1.encryptBlock(S,k),this._des2.decryptBlock(S,k),this._des3.encryptBlock(S,k)},decryptBlock:function(S,k){this._des3.decryptBlock(S,k),this._des2.encryptBlock(S,k),this._des1.decryptBlock(S,k)},keySize:192/32,ivSize:64/32,blockSize:64/32});i.TripleDES=x._createHelper(_)}(),f.TripleDES})},qBft:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.pad.AnsiX923={pad:function(i,O){var C=i.sigBytes,x=O*4,m=x-C%x,h=C+m-1;i.clamp(),i.words[h>>>2]|=m<<24-h%4*8,i.sigBytes+=m},unpad:function(i){var O=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=O}},f.pad.Ansix923})},qM6L:function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.WordArray,x=i.enc,m=x.Utf16=x.Utf16BE={stringify:function(s){for(var l=s.words,u=s.sigBytes,o=[],g=0;g<u;g+=2){var p=l[g>>>2]>>>16-g%4*8&65535;o.push(String.fromCharCode(p))}return o.join("")},parse:function(s){for(var l=s.length,u=[],o=0;o<l;o++)u[o>>>1]|=s.charCodeAt(o)<<16-o%2*16;return C.create(u,l*2)}};x.Utf16LE={stringify:function(s){for(var l=s.words,u=s.sigBytes,o=[],g=0;g<u;g+=2){var p=h(l[g>>>2]>>>16-g%4*8&65535);o.push(String.fromCharCode(p))}return o.join("")},parse:function(s){for(var l=s.length,u=[],o=0;o<l;o++)u[o>>>1]|=h(s.charCodeAt(o)<<16-o%2*16);return C.create(u,l*2)}};function h(s){return s<<8&4278255360|s>>>8&16711935}}(),f.enc.Utf16})},qu8F:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return f.mode.CTRGladman=function(){var i=f.lib.BlockCipherMode.extend();function O(m){if((m>>24&255)===255){var h=m>>16&255,s=m>>8&255,l=m&255;h===255?(h=0,s===255?(s=0,l===255?l=0:++l):++s):++h,m=0,m+=h<<16,m+=s<<8,m+=l}else m+=1<<24;return m}function C(m){return(m[0]=O(m[0]))===0&&(m[1]=O(m[1])),m}var x=i.Encryptor=i.extend({processBlock:function(m,h){var s=this._cipher,l=s.blockSize,u=this._iv,o=this._counter;u&&(o=this._counter=u.slice(0),this._iv=void 0),C(o);var g=o.slice(0);s.encryptBlock(g,0);for(var p=0;p<l;p++)m[h+p]^=g[p]}});return i.Decryptor=x,i}(),f.mode.CTRGladman})},"rAM+":function(a,G,d){"use strict";d.d(G,"a",function(){return i});var f=d("Qw5x");function i(O,C){var x;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(x=Object(f.a)(O))||C&&O&&typeof O.length=="number"){x&&(O=x);var m=0,h=function(){};return{s:h,n:function(){return m>=O.length?{done:!0}:{done:!1,value:O[m++]}},e:function(g){throw g},f:h}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,l=!1,u;return{s:function(){x=O[Symbol.iterator]()},n:function(){var g=x.next();return s=g.done,g},e:function(g){l=!0,u=g},f:function(){try{!s&&x.return!=null&&x.return()}finally{if(l)throw u}}}}},rUJ1:function(a,G){const d=/[&<>"']/,f=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,C={"&":"&","<":"<",">":">",'"':""","'":"'"},x=X=>C[X];function m(X,N){if(N){if(d.test(X))return X.replace(f,x)}else if(i.test(X))return X.replace(O,x);return X}const h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(X){return X.replace(h,(N,F)=>(F=F.toLowerCase(),F==="colon"?":":F.charAt(0)==="#"?F.charAt(1)==="x"?String.fromCharCode(parseInt(F.substring(2),16)):String.fromCharCode(+F.substring(1)):""))}const l=/(^|[^\[])\^/g;function u(X,N){X=X.source||X,N=N||"";const F={replace:(H,Z)=>(Z=Z.source||Z,Z=Z.replace(l,"$1"),X=X.replace(H,Z),F),getRegex:()=>new RegExp(X,N)};return F}const o=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(X,N,F){if(X){let H;try{H=decodeURIComponent(s(F)).replace(o,"").toLowerCase()}catch(Z){return null}if(H.indexOf("javascript:")===0||H.indexOf("vbscript:")===0||H.indexOf("data:")===0)return null}N&&!g.test(F)&&(F=T(N,F));try{F=encodeURI(F).replace(/%25/g,"%")}catch(H){return null}return F}const v={},_=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,k=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(X,N){v[" "+X]||(_.test(X)?v[" "+X]=X+"/":v[" "+X]=D(X,"/",!0)),X=v[" "+X];const F=X.indexOf(":")===-1;return N.substring(0,2)==="//"?F?N:X.replace(S,"$1")+N:N.charAt(0)==="/"?F?N:X.replace(k,"$1")+N:X+N}const M={exec:function(){}};function I(X){let N=1,F,H;for(;N<arguments.length;N++){F=arguments[N];for(H in F)Object.prototype.hasOwnProperty.call(F,H)&&(X[H]=F[H])}return X}function j(X,N){const F=X.replace(/\|/g,(ce,he,V)=>{let ve=!1,ne=he;for(;--ne>=0&&V[ne]==="\\";)ve=!ve;return ve?"|":" |"}),H=F.split(/ \|/);let Z=0;if(H.length>N)H.splice(N);else for(;H.length<N;)H.push("");for(;Z<H.length;Z++)H[Z]=H[Z].trim().replace(/\\\|/g,"|");return H}function D(X,N,F){const H=X.length;if(H===0)return"";let Z=0;for(;Z<H;){const ce=X.charAt(H-Z-1);if(ce===N&&!F)Z++;else if(ce!==N&&F)Z++;else break}return X.substr(0,H-Z)}function y(X,N){if(X.indexOf(N[1])===-1)return-1;const F=X.length;let H=0,Z=0;for(;Z<F;Z++)if(X[Z]==="\\")Z++;else if(X[Z]===N[0])H++;else if(X[Z]===N[1]&&(H--,H<0))return Z;return-1}function J(X){X&&X.sanitize&&!X.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}a.exports={escape:m,unescape:s,edit:u,cleanUrl:p,resolveUrl:T,noopTest:M,merge:I,splitCells:j,rtrim:D,findClosingBracket:y,checkSanitizeDeprecation:J}},rdUC:function(a,G,d){var f=d("MFOe"),i=f.Global;a.exports={name:"localStorage",read:C,write:x,each:m,remove:h,clearAll:s};function O(){return i.localStorage}function C(l){return O().getItem(l)}function x(l,u){return O().setItem(l,u)}function m(l){for(var u=O().length-1;u>=0;u--){var o=O().key(u);l(C(o),o)}}function h(l){return O().removeItem(l)}function s(){return O().clear()}},sboe:function(a,G,d){"use strict";d.d(G,"a",function(){return O});var f=d("q1tI"),i=d.n(f),O=f.createContext(null)},spXi:function(a,G,d){a.exports={flex_box_center:"flex_box_center___2B_Y7",flex_space_between:"flex_space_between___2olzC",flex_box_vertical_center:"flex_box_vertical_center___2Z4dV",flex_box_center_end:"flex_box_center_end___3FiwX",flex_box_column:"flex_box_column___8kyK-",customTree:"customTree___1KOYx",name:"name___3pqs4"}},u2Z1:function(a,G,d){"use strict";d.d(G,"a",function(){return D});var f=d("miYZ"),i=d("tsqr"),O=d("9og8"),C=d("5NDa"),x=d("5rEg"),m=d("2qtc"),h=d("kLXV"),s=d("oBTY"),l=d("tJVT"),u=d("OaEy"),o=d("2fM7"),g=d("WmNS"),p=d.n(g),v=d("q1tI"),_=d.n(v),S=d("ErOA"),k=d("i58Z"),T=d.n(k),M=d("T1X5"),I=d.n(M),j=o.a.Option,D=function(J){var X=J.subId,N=J.value,F=J.selectvalues,H=J.disabled,Z=J.knowledgeOptions,ce=Z===void 0?[]:Z,he=J.onChange,V=he===void 0?function(){}:he,ve=J.onAddKnowledgeFinish,ne=ve===void 0?function(){}:ve,W=Object(v.useRef)(),z=Object(v.useState)([]),R=Object(l.a)(z,2),w=R[0],P=R[1];N=N||[];var le=function(Ee,Oe){Ee?(P([Oe.key]),V([Oe.key])):(P([]),V([]))};Object(v.useEffect)(function(){(F==null?void 0:F.length)>0&&(P(Object(s.a)(F)),V(Object(s.a)(F)))},[ce]),Object(v.useEffect)(function(){var ye;((ye=N)===null||ye===void 0?void 0:ye.length)>0&&V(Object(s.a)(N))},[ce]);var pe=function(Ee){Ee.preventDefault(),W.current="",h.a.confirm({centered:!0,width:700,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:_.a.createElement("div",{className:"font14"},_.a.createElement("div",{style:{display:"flex",marginTop:"48px",marginBottom:"36px"}},_.a.createElement("img",{src:I.a,style:{width:"108px",height:"108px",marginRight:"29px"}}),"\u60A8\u586B\u5199\u7684\u77E5\u8BC6\u70B9\u6682\u65F6\u4EC5\u5BF9\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u540E\u5C06\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF1B",_.a.createElement("br",null),"\u5E73\u53F0\u5BA1\u6838\u8FC7\u7A0B\u4E2D\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF08\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u9519\u8BEF\u3001\u975E\u6CD5\u3001\u4E0D\u96C5\u3001\u4E0D\u5339\u914D\u5F53\u524D\u8BFE\u7A0B\u7B49\u60C5\u5F62\uFF09\uFF0C\u5220\u9664\u540E\u53EF\u80FD\u5F71\u54CD\u60A8\u7684\u8BD5\u9898\u7684\u6B63\u5E38\u4F7F\u7528\u3002",_.a.createElement("br",null),"\u8BF7\u8BA4\u771F\u586B\u5199\u4E0E\u6559\u5B66\u5185\u5BB9\u76F8\u5173\u7684\u771F\u5B9E\u77E5\u8BC6\u70B9 ",_.a.createElement("br",null)),_.a.createElement(x.a,{className:"mt5",maxLength:20,style:{marginBottom:"42px"},placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:W.current,onChange:function(ae){W.current=ae.target.value}})),onOk:function(){return new Promise(function(){var ae=Object(O.a)(p.a.mark(function fe(ge,q){var ie,$;return p.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(W.current){K.next=3;break}return i.b.warn("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),K.abrupt("return",q());case 3:if(!(W.current.length>20)){K.next=6;break}return i.b.warn("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),K.abrupt("return",q());case 6:return K.next=8,Object(S.a)("/api/tag_disciplines.json",{method:"post",body:{name:W.current,sub_discipline_id:X}});case 8:return ie=K.sent,(ie==null?void 0:ie.status)===0&&(ne({id:ie.tag_discipline_id,name:W.current,type:"personal"}),$=[],$.push(ie.tag_discipline_id),V([].concat($)),P([ie.tag_discipline_id]),V([].concat($))),K.abrupt("return",ge());case 11:case"end":return K.stop()}},fe)}));return function(fe,ge){return ae.apply(this,arguments)}}())}})};return _.a.createElement("div",{className:T.a.wrap},_.a.createElement(o.a,{disabled:!X||H,className:"mr5",style:{width:"242px"},onChange:le,showSearch:!0,allowClear:!0,value:ce==null?void 0:ce.filter(function(ye){return(w==null?void 0:w.includes(ye==null?void 0:ye.id))||(w==null?void 0:w.includes((ye==null?void 0:ye.id)+""))}).map(function(ye){return ye.name})},ce==null?void 0:ce.map(function(ye){return _.a.createElement(j,{key:ye.id,value:ye.name},_.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},_.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ye.name),_.a.createElement("span",null,ye.type==="personal"?"\uFF08\u81EA\u7528\uFF09":"")))})),_.a.createElement("button",{disabled:!X,className:"".concat(T.a.addKnowledge," ").concat(X?"":T.a.disabled),onClick:pe},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))}},uGsb:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("MlIO"),d("1uat"))})(this,function(f){return function(){var i=f,O=i.x64,C=O.Word,x=O.WordArray,m=i.algo,h=m.SHA512,s=m.SHA384=h.extend({_doReset:function(){this._hash=new x.init([new C.init(3418070365,3238371032),new C.init(1654270250,914150663),new C.init(2438529370,812702999),new C.init(355462360,4144912697),new C.init(1731405415,4290775857),new C.init(2394180231,1750603025),new C.init(3675008525,1694076839),new C.init(1203062813,3204075428)])},_doFinalize:function(){var l=h._doFinalize.call(this);return l.sigBytes-=16,l}});i.SHA384=h._createHelper(s),i.HmacSHA384=h._createHmacHelper(s)}(),f.SHA384})},uGxW:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("OLod"))})(this,function(f){return f.pad.NoPadding={pad:function(){},unpad:function(){}},f.pad.NoPadding})},uK0f:function(a,G,d){(function(f,i){a.exports=i()})(this,function(){"use strict";function f(i,O,C){C=C||{},C.childrenKeyName=C.childrenKeyName||"children";var x=i||[],m=[],h=0;do{var s=x.filter(function(l){return O(l,h)})[0];if(!s)break;m.push(s),x=s[C.childrenKeyName]||[],h+=1}while(x.length>0);return m}return f})},uMZB:function(a,G,d){a.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function(a,G,d){a.exports=f;function f(){return d("gaXo"),{}}},vHTk:function(a,G,d){a.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("ETIr"),d("cv67"),d("K3mO"),d("OLod"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.StreamCipher,x=i.algo,m=x.RC4=C.extend({_doReset:function(){for(var l=this._key,u=l.words,o=l.sigBytes,g=this._S=[],p=0;p<256;p++)g[p]=p;for(var p=0,v=0;p<256;p++){var _=p%o,S=u[_>>>2]>>>24-_%4*8&255;v=(v+g[p]+S)%256;var k=g[p];g[p]=g[v],g[v]=k}this._i=this._j=0},_doProcessBlock:function(l,u){l[u]^=h.call(this)},keySize:256/32,ivSize:0});function h(){for(var l=this._S,u=this._i,o=this._j,g=0,p=0;p<4;p++){u=(u+1)%256,o=(o+l[u])%256;var v=l[u];l[u]=l[o],l[o]=v,g|=l[(l[u]+l[o])%256]<<24-p*8}return this._i=u,this._j=o,g}i.RC4=C._createHelper(m);var s=x.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)h.call(this)}});i.RC4Drop=C._createHelper(s)}(),f.RC4})},wZgz:function(a,G,d){(function(f,i,O){a.exports=G=i(d("Ib8C"),d("ETIr"),d("cv67"),d("K3mO"),d("OLod"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.BlockCipher,x=i.algo,m=[],h=[],s=[],l=[],u=[],o=[],g=[],p=[],v=[],_=[];(function(){for(var T=[],M=0;M<256;M++)M<128?T[M]=M<<1:T[M]=M<<1^283;for(var I=0,j=0,M=0;M<256;M++){var D=j^j<<1^j<<2^j<<3^j<<4;D=D>>>8^D&255^99,m[I]=D,h[D]=I;var y=T[I],J=T[y],X=T[J],N=T[D]*257^D*16843008;s[I]=N<<24|N>>>8,l[I]=N<<16|N>>>16,u[I]=N<<8|N>>>24,o[I]=N;var N=X*16843009^J*65537^y*257^I*16843008;g[D]=N<<24|N>>>8,p[D]=N<<16|N>>>16,v[D]=N<<8|N>>>24,_[D]=N,I?(I=y^T[T[T[X^y]]],j^=T[T[j]]):I=j=1}})();var S=[0,1,2,4,8,16,32,64,128,27,54],k=x.AES=C.extend({_doReset:function(){var T;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var M=this._keyPriorReset=this._key,I=M.words,j=M.sigBytes/4,D=this._nRounds=j+6,y=(D+1)*4,J=this._keySchedule=[],X=0;X<y;X++)X<j?J[X]=I[X]:(T=J[X-1],X%j?j>6&&X%j==4&&(T=m[T>>>24]<<24|m[T>>>16&255]<<16|m[T>>>8&255]<<8|m[T&255]):(T=T<<8|T>>>24,T=m[T>>>24]<<24|m[T>>>16&255]<<16|m[T>>>8&255]<<8|m[T&255],T^=S[X/j|0]<<24),J[X]=J[X-j]^T);for(var N=this._invKeySchedule=[],F=0;F<y;F++){var X=y-F;if(F%4)var T=J[X];else var T=J[X-4];F<4||X<=4?N[F]=T:N[F]=g[m[T>>>24]]^p[m[T>>>16&255]]^v[m[T>>>8&255]]^_[m[T&255]]}},encryptBlock:function(T,M){this._doCryptBlock(T,M,this._keySchedule,s,l,u,o,m)},decryptBlock:function(T,M){var I=T[M+1];T[M+1]=T[M+3],T[M+3]=I,this._doCryptBlock(T,M,this._invKeySchedule,g,p,v,_,h);var I=T[M+1];T[M+1]=T[M+3],T[M+3]=I},_doCryptBlock:function(T,M,I,j,D,y,J,X){for(var N=this._nRounds,F=T[M]^I[0],H=T[M+1]^I[1],Z=T[M+2]^I[2],ce=T[M+3]^I[3],he=4,V=1;V<N;V++){var ve=j[F>>>24]^D[H>>>16&255]^y[Z>>>8&255]^J[ce&255]^I[he++],ne=j[H>>>24]^D[Z>>>16&255]^y[ce>>>8&255]^J[F&255]^I[he++],W=j[Z>>>24]^D[ce>>>16&255]^y[F>>>8&255]^J[H&255]^I[he++],z=j[ce>>>24]^D[F>>>16&255]^y[H>>>8&255]^J[Z&255]^I[he++];F=ve,H=ne,Z=W,ce=z}var ve=(X[F>>>24]<<24|X[H>>>16&255]<<16|X[Z>>>8&255]<<8|X[ce&255])^I[he++],ne=(X[H>>>24]<<24|X[Z>>>16&255]<<16|X[ce>>>8&255]<<8|X[F&255])^I[he++],W=(X[Z>>>24]<<24|X[ce>>>16&255]<<16|X[F>>>8&255]<<8|X[H&255])^I[he++],z=(X[ce>>>24]<<24|X[F>>>16&255]<<16|X[H>>>8&255]<<8|X[Z&255])^I[he++];T[M]=ve,T[M+1]=ne,T[M+2]=W,T[M+3]=z},keySize:256/32});i.AES=C._createHelper(k)}(),f.AES})},wbyO:function(a,G,d){(function(f,i){a.exports=G=i(d("Ib8C"))})(this,function(f){return function(){var i=f,O=i.lib,C=O.WordArray,x=i.enc,m=x.Base64url={stringify:function(s,l=!0){var u=s.words,o=s.sigBytes,g=l?this._safe_map:this._map;s.clamp();for(var p=[],v=0;v<o;v+=3)for(var _=u[v>>>2]>>>24-v%4*8&255,S=u[v+1>>>2]>>>24-(v+1)%4*8&255,k=u[v+2>>>2]>>>24-(v+2)%4*8&255,T=_<<16|S<<8|k,M=0;M<4&&v+M*.75<o;M++)p.push(g.charAt(T>>>6*(3-M)&63));var I=g.charAt(64);if(I)for(;p.length%4;)p.push(I);return p.join("")},parse:function(s,l=!0){var u=s.length,o=l?this._safe_map:this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var p=0;p<o.length;p++)g[o.charCodeAt(p)]=p}var v=o.charAt(64);if(v){var _=s.indexOf(v);_!==-1&&(u=_)}return h(s,u,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function h(s,l,u){for(var o=[],g=0,p=0;p<l;p++)if(p%4){var v=u[s.charCodeAt(p-1)]<<p%4*2,_=u[s.charCodeAt(p)]>>>6-p%4*2,S=v|_;o[g>>>2]|=S<<24-g%4*8,g++}return C.create(o,g)}}(),f.enc.Base64url})},ynwM:function(a,G,d){var f=d("MFOe"),i=f.Global;a.exports={name:"oldFF-globalStorage",read:C,write:x,each:m,remove:h,clearAll:s};var O=i.globalStorage;function C(l){return O[l]}function x(l,u){O[l]=u}function m(l){for(var u=O.length-1;u>=0;u--){var o=O.key(u);l(O[o],o)}}function h(l){return O.removeItem(l)}function s(){m(function(l,u){delete O[l]})}}}]);
|