(window.webpackJsonp=window.webpackJsonp||[]).push([[118,5,6,7,8,10,16],{"+NIl":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(d,T){"use strict";function D(c,m){c.cmdState.push(m)}function u(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function p(c){var m=c.cmdState.pop();m&&m.closeBracket()}function C(c){for(var m=c.cmdState,_=m.length-1;_>=0;_--){var y=m[_];if(y.name=="DEFAULT")continue;return y}return{styleIdentifier:function(){return null}}}function E(c,m,_){return function(){this.name=c,this.bracketNo=0,this.style=m,this.styles=_,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=E("importmodule","tag",["string","builtin"]),l.documentclass=E("documentclass","tag",["","atom"]),l.usepackage=E("usepackage","tag",["atom"]),l.begin=E("begin","tag",["atom"]),l.end=E("end","tag",["atom"]),l.label=E("label","tag",["atom"]),l.ref=E("ref","tag",["atom"]),l.eqref=E("eqref","tag",["atom"]),l.cite=E("cite","tag",["atom"]),l.bibitem=E("bibitem","tag",["atom"]),l.Bibitem=E("Bibitem","tag",["atom"]),l.RBibitem=E("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function s(c,m){c.f=m}function n(c,m){var _;if(c.match(/^\\[a-zA-Z@]+/)){var y=c.current().slice(1);return _=l.hasOwnProperty(y)?l[y]:l.DEFAULT,_=new _,D(m,_),s(m,f),_.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return s(m,function(a,t){return h(a,t,"\\]")}),"keyword";if(c.match("\\("))return s(m,function(a,t){return h(a,t,"\\)")}),"keyword";if(c.match("$$"))return s(m,function(a,t){return h(a,t,"$$")}),"keyword";if(c.match("$"))return s(m,function(a,t){return h(a,t,"$")}),"keyword";var i=c.next();if(i=="%")return c.skipToEnd(),"comment";if(i=="}"||i=="]"){if(_=u(m),_)_.closeBracket(i),s(m,f);else return"error";return"bracket"}else return i=="{"||i=="["?(_=l.DEFAULT,_=new _,D(m,_),"bracket"):/\d/.test(i)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),_=C(m),_.name=="begin"&&(_.argument=c.current()),_.styleIdentifier())}function h(c,m,_){if(c.eatSpace())return null;if(_&&c.match(_))return s(m,n),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var y=c.next();return y=="{"||y=="}"||y=="["||y=="]"||y=="("||y==")"?"bracket":y=="%"?(c.skipToEnd(),"comment"):"error"}function f(c,m){var _=c.peek(),y;return _=="{"||_=="["?(y=u(m),y.openBracket(_),c.eat(_),s(m,n),"bracket"):/[ \t\r]/.test(_)?(c.eat(_),null):(s(m,n),p(m),n(c,m))}return{startState:function(){var c=T.inMathMode?function(m,_){return h(m,_)}:n;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,m){return m.f(c,m)},blankLine:function(c){c.f=n,c.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"19Vz":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){P.defineOption("placeholder","",function(E,l,s){var n=s&&s!=P.Init;if(l&&!n)E.on("blur",u),E.on("change",p),E.on("swapDoc",p),P.on(E.getInputField(),"compositionupdate",E.state.placeholderCompose=function(){D(E)}),p(E);else if(!l&&n){E.off("blur",u),E.off("change",p),E.off("swapDoc",p),P.off(E.getInputField(),"compositionupdate",E.state.placeholderCompose),d(E);var h=E.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}l&&!E.hasFocus()&&u(E)});function d(E){E.state.placeholder&&(E.state.placeholder.parentNode.removeChild(E.state.placeholder),E.state.placeholder=null)}function T(E){d(E);var l=E.state.placeholder=document.createElement("pre");l.style.cssText="height: 0; overflow: visible",l.style.direction=E.getOption("direction"),l.className="CodeMirror-placeholder CodeMirror-line-like";var s=E.getOption("placeholder");typeof s=="string"&&(s=document.createTextNode(s)),l.appendChild(s),E.display.lineSpace.insertBefore(l,E.display.lineSpace.firstChild)}function D(E){setTimeout(function(){var l=!1,s=E.getInputField();s.nodeName=="TEXTAREA"?l=!s.value:E.lineCount()==1&&(l=!/[^\u200b]/.test(s.querySelector(".CodeMirror-line").textContent)),l?T(E):d(E)},20)}function u(E){C(E)&&T(E)}function p(E){var l=E.getWrapperElement(),s=C(E);l.className=l.className.replace(" CodeMirror-empty","")+(s?" CodeMirror-empty":""),s?T(E):d(E)}function C(E){return E.lineCount()===1&&E.getLine(0)===""}})},"1ZF9":function(j,Z,L){j.exports=L.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";var d={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},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(D,u){var p=D.indentUnit,C={},E=u.htmlMode?d:T;for(var l in E)C[l]=E[l];for(var l in u)C[l]=u[l];var s,n;function h(w,M){function N(z){return M.tokenize=z,z(w,M)}var I=w.next();if(I=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?N(m("atom","]]>")):null:w.match("--")?N(m("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),N(_(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),M.tokenize=m("meta","?>"),"meta"):(s=w.eat("/")?"closeTag":"openTag",M.tokenize=f,"tag bracket");if(I=="&"){var G;return w.eat("#")?w.eat("x")?G=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):G=w.eatWhile(/[\d]/)&&w.eat(";"):G=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),G?"atom":"error"}else return w.eatWhile(/[^&<]/),null}h.isInText=!0;function f(w,M){var N=w.next();if(N==">"||N=="/"&&w.eat(">"))return M.tokenize=h,s=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return s="equals",null;if(N=="<"){M.tokenize=h,M.state=t,M.tagName=M.tagStart=null;var I=M.tokenize(w,M);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(N)?(M.tokenize=c(N),M.stringStartCol=w.column(),M.tokenize(w,M)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(w){var M=function(N,I){for(;!N.eol();)if(N.next()==w){I.tokenize=f;break}return"string"};return M.isInAttribute=!0,M}function m(w,M){return function(N,I){for(;!N.eol();){if(N.match(M)){I.tokenize=h;break}N.next()}return w}}function _(w){return function(M,N){for(var I;(I=M.next())!=null;){if(I=="<")return N.tokenize=_(w+1),N.tokenize(M,N);if(I==">")if(w==1){N.tokenize=h;break}else return N.tokenize=_(w-1),N.tokenize(M,N)}return"meta"}}function y(w,M,N){this.prev=w.context,this.tagName=M,this.indent=w.indented,this.startOfLine=N,(C.doNotIndent.hasOwnProperty(M)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function i(w){w.context&&(w.context=w.context.prev)}function a(w,M){for(var N;;){if(!w.context)return;if(N=w.context.tagName,!C.contextGrabbers.hasOwnProperty(N)||!C.contextGrabbers[N].hasOwnProperty(M))return;i(w)}}function t(w,M,N){return w=="openTag"?(N.tagStart=M.column(),S):w=="closeTag"?x:t}function S(w,M,N){return w=="word"?(N.tagName=M.current(),n="tag",O):C.allowMissingTagName&&w=="endTag"?(n="tag bracket",O(w,M,N)):(n="error",S)}function x(w,M,N){if(w=="word"){var I=M.current();return N.context&&N.context.tagName!=I&&C.implicitlyClosed.hasOwnProperty(N.context.tagName)&&i(N),N.context&&N.context.tagName==I||C.matchClosing===!1?(n="tag",o):(n="tag error",k)}else return C.allowMissingTagName&&w=="endTag"?(n="tag bracket",o(w,M,N)):(n="error",k)}function o(w,M,N){return w!="endTag"?(n="error",o):(i(N),t)}function k(w,M,N){return n="error",o(w,M,N)}function O(w,M,N){if(w=="word")return n="attribute",b;if(w=="endTag"||w=="selfcloseTag"){var I=N.tagName,G=N.tagStart;return N.tagName=N.tagStart=null,w=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(I)?a(N,I):(a(N,I),N.context=new y(N,I,G==N.indented)),t}return n="error",O}function b(w,M,N){return w=="equals"?v:(C.allowMissing||(n="error"),O(w,M,N))}function v(w,M,N){return w=="string"?g:w=="word"&&C.allowUnquoted?(n="string",O):(n="error",O(w,M,N))}function g(w,M,N){return w=="string"?g:O(w,M,N)}return{startState:function(w){var M={tokenize:h,state:t,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(M.baseIndent=w),M},token:function(w,M){if(!M.tagName&&w.sol()&&(M.indented=w.indentation()),w.eatSpace())return null;s=null;var N=M.tokenize(w,M);return(N||s)&&N!="comment"&&(n=null,M.state=M.state(s||N,w,M),n&&(N=n=="error"?N+" error":n)),N},indent:function(w,M,N){var I=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+p;if(I&&I.noIndent)return P.Pass;if(w.tokenize!=f&&w.tokenize!=h)return N?N.match(/^(\s*)/)[0].length:0;if(w.tagName)return C.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+p*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(w){w.state==v&&(w.state=O)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var M=[],N=w.context;N;N=N.prev)N.tagName&&M.push(N.tagName);return M.reverse()}}}),P.defineMIME("text/xml","xml"),P.defineMIME("application/xml","xml"),P.mimeModes.hasOwnProperty("text/html")||P.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("MlIO"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.Hasher,u=d.x64,p=u.Word,C=u.WordArray,E=d.algo;function l(){return p.create.apply(p,arguments)}var s=[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)],n=[];(function(){for(var f=0;f<80;f++)n[f]=l()})();var h=E.SHA512=D.extend({_doReset:function(){this._hash=new C.init([new p.init(1779033703,4089235720),new p.init(3144134277,2227873595),new p.init(1013904242,4271175723),new p.init(2773480762,1595750129),new p.init(1359893119,2917565137),new p.init(2600822924,725511199),new p.init(528734635,4215389547),new p.init(1541459225,327033209)])},_doProcessBlock:function(f,c){for(var m=this._hash.words,_=m[0],y=m[1],i=m[2],a=m[3],t=m[4],S=m[5],x=m[6],o=m[7],k=_.high,O=_.low,b=y.high,v=y.low,g=i.high,w=i.low,M=a.high,N=a.low,I=t.high,G=t.low,z=S.high,H=S.low,K=x.high,U=x.low,B=o.high,V=o.low,ae=k,he=O,pe=b,Re=v,ke=g,ve=w,Te=M,be=N,ue=I,le=G,re=z,fe=H,q=K,ee=U,Ce=B,te=V,J=0;J<80;J++){var X,Q,Ee=n[J];if(J<16)Q=Ee.high=f[c+J*2]|0,X=Ee.low=f[c+J*2+1]|0;else{var ge=n[J-15],Oe=ge.high,Qe=ge.low,rt=(Oe>>>1|Qe<<31)^(Oe>>>8|Qe<<24)^Oe>>>7,nt=(Qe>>>1|Oe<<31)^(Qe>>>8|Oe<<24)^(Qe>>>7|Oe<<25),ut=n[J-2],dt=ut.high,mt=ut.low,He=(dt>>>19|mt<<13)^(dt<<3|mt>>>29)^dt>>>6,De=(mt>>>19|dt<<13)^(mt<<3|dt>>>29)^(mt>>>6|dt<<26),at=n[J-7],ht=at.high,Ze=at.low,st=n[J-16],Ue=st.high,Me=st.low;X=nt+Ze,Q=rt+ht+(X>>>0>>0?1:0),X=X+De,Q=Q+He+(X>>>0>>0?1:0),X=X+Me,Q=Q+Ue+(X>>>0>>0?1:0),Ee.high=Q,Ee.low=X}var Ne=ue&re^~ue&q,xe=le&fe^~le&ee,Se=ae&pe^ae&ke^pe&ke,Ae=he&Re^he&ve^Re&ve,Le=(ae>>>28|he<<4)^(ae<<30|he>>>2)^(ae<<25|he>>>7),Je=(he>>>28|ae<<4)^(he<<30|ae>>>2)^(he<<25|ae>>>7),Ve=(ue>>>14|le<<18)^(ue>>>18|le<<14)^(ue<<23|le>>>9),gt=(le>>>14|ue<<18)^(le>>>18|ue<<14)^(le<<23|ue>>>9),yt=s[J],Bt=yt.high,Nt=yt.low,mr=te+gt,hr=Ce+Ve+(mr>>>0>>0?1:0),mr=mr+xe,hr=hr+Ne+(mr>>>0>>0?1:0),mr=mr+Nt,hr=hr+Bt+(mr>>>0>>0?1:0),mr=mr+X,hr=hr+Q+(mr>>>0>>0?1:0),St=Je+Ae,$r=Le+Se+(St>>>0>>0?1:0);Ce=q,te=ee,q=re,ee=fe,re=ue,fe=le,le=be+mr|0,ue=Te+hr+(le>>>0>>0?1:0)|0,Te=ke,be=ve,ke=pe,ve=Re,pe=ae,Re=he,he=mr+St|0,ae=hr+$r+(he>>>0>>0?1:0)|0}O=_.low=O+he,_.high=k+ae+(O>>>0>>0?1:0),v=y.low=v+Re,y.high=b+pe+(v>>>0>>0?1:0),w=i.low=w+ve,i.high=g+ke+(w>>>0>>0?1:0),N=a.low=N+be,a.high=M+Te+(N>>>0>>0?1:0),G=t.low=G+le,t.high=I+ue+(G>>>0>>0?1:0),H=S.low=H+fe,S.high=z+re+(H>>>0>>0?1:0),U=x.low=U+ee,x.high=K+q+(U>>>0>>0?1:0),V=o.low=V+te,o.high=B+Ce+(V>>>0>>0?1:0)},_doFinalize:function(){var f=this._data,c=f.words,m=this._nDataBytes*8,_=f.sigBytes*8;c[_>>>5]|=128<<24-_%32,c[(_+128>>>10<<5)+30]=Math.floor(m/4294967296),c[(_+128>>>10<<5)+31]=m,f.sigBytes=c.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var f=D.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});d.SHA512=D._createHelper(h),d.HmacSHA512=D._createHmacHelper(h)}(),P.SHA512})},"3y9D":function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=T.Hasher,p=d.algo,C=[],E=p.SHA1=u.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,s){for(var n=this._hash.words,h=n[0],f=n[1],c=n[2],m=n[3],_=n[4],y=0;y<80;y++){if(y<16)C[y]=l[s+y]|0;else{var i=C[y-3]^C[y-8]^C[y-14]^C[y-16];C[y]=i<<1|i>>>31}var a=(h<<5|h>>>27)+_+C[y];y<20?a+=(f&c|~f&m)+1518500249:y<40?a+=(f^c^m)+1859775393:y<60?a+=(f&c|f&m|c&m)-1894007588:a+=(f^c^m)-899497514,_=m,m=c,c=f<<30|f>>>2,f=h,h=a}n[0]=n[0]+h|0,n[1]=n[1]+f|0,n[2]=n[2]+c|0,n[3]=n[3]+m|0,n[4]=n[4]+_|0},_doFinalize:function(){var l=this._data,s=l.words,n=this._nDataBytes*8,h=l.sigBytes*8;return s[h>>>5]|=128<<24-h%32,s[(h+64>>>9<<4)+14]=Math.floor(n/4294967296),s[(h+64>>>9<<4)+15]=n,l.sigBytes=s.length*4,this._process(),this._hash},clone:function(){var l=u.clone.call(this);return l._hash=this._hash.clone(),l}});d.SHA1=u._createHelper(E),d.HmacSHA1=u._createHmacHelper(E)}(),P.SHA1})},4:function(j,Z){},"55Ip":function(j,Z,L){"use strict";L.d(Z,"a",function(){return a}),L.d(Z,"b",function(){return O});var P=L("Ty5D"),d=L("dI71"),T=L("q1tI"),D=L.n(T),u=L("YS25"),p=L("17x9"),C=L.n(p),E=L("wx14"),l=L("zLVn"),s=L("9R94"),n=function(v){Object(d.a)(g,v);function g(){for(var M,N=arguments.length,I=new Array(N),G=0;G>>24)&16711935|(t<<24|t>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var x=y[a];x.high^=S,x.low^=t}for(var o=0;o<24;o++){for(var k=0;k<5;k++){for(var O=0,b=0,v=0;v<5;v++){var x=y[k+5*v];O^=x.high,b^=x.low}var g=f[k];g.high=O,g.low=b}for(var k=0;k<5;k++)for(var w=f[(k+4)%5],M=f[(k+1)%5],N=M.high,I=M.low,O=w.high^(N<<1|I>>>31),b=w.low^(I<<1|N>>>31),v=0;v<5;v++){var x=y[k+5*v];x.high^=O,x.low^=b}for(var G=1;G<25;G++){var O,b,x=y[G],z=x.high,H=x.low,K=s[G];K<32?(O=z<>>32-K,b=H<>>32-K):(O=H<>>64-K,b=z<>>64-K);var U=f[n[G]];U.high=O,U.low=b}var B=f[0],V=y[0];B.high=V.high,B.low=V.low;for(var k=0;k<5;k++)for(var v=0;v<5;v++){var G=k+5*v,x=y[G],ae=f[G],he=f[(k+1)%5+5*v],pe=f[(k+2)%5+5*v];x.high=ae.high^~he.high&pe.high,x.low=ae.low^~he.low&pe.low}var x=y[0],Re=h[o];x.high^=Re.high,x.low^=Re.low}},_doFinalize:function(){var m=this._data,_=m.words,y=this._nDataBytes*8,i=m.sigBytes*8,a=this.blockSize*32;_[i>>>5]|=1<<24-i%32,_[(d.ceil((i+1)/a)*a>>>5)-1]|=128,m.sigBytes=_.length*4,this._process();for(var t=this._state,S=this.cfg.outputLength/8,x=S/8,o=[],k=0;k>>24)&16711935|(b<<24|b>>>8)&4278255360,v=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,o.push(v),o.push(b)}return new u.init(o,S)},clone:function(){for(var m=p.clone.call(this),_=m._state=this._state.slice(0),y=0;y<25;y++)_[y]=_[y].clone();return m}});T.SHA3=p._createHelper(c),T.HmacSHA3=p._createHmacHelper(c)}(Math),P.SHA3})},"6+eU":function(j,Z,L){"use strict";L.d(Z,"a",function(){return o});var P=L("wx14"),d=L("rePB"),T=L("VTBJ"),D=L("1OyB"),u=L("vuIU"),p=L("Ji7U"),C=L("LK+K"),E=L("q1tI"),l=L.n(E),s=L("TSYQ"),n=L.n(s),h=function(O){var b,v="".concat(O.rootPrefixCls,"-item"),g=n()(v,"".concat(v,"-").concat(O.page),(b={},Object(d.a)(b,"".concat(v,"-active"),O.active),Object(d.a)(b,O.className,!!O.className),Object(d.a)(b,"".concat(v,"-disabled"),!O.page),b)),w=function(){O.onClick(O.page)},M=function(I){O.onKeyPress(I,O.onClick,O.page)};return l.a.createElement("li",{title:O.showTitle?O.page:null,className:g,onClick:w,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",l.a.createElement("a",{rel:"nofollow"},O.page)))},f=h,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},m=function(k){Object(p.a)(b,k);var O=Object(C.a)(b);function b(){var v;Object(D.a)(this,b);for(var g=arguments.length,w=new Array(g),M=0;M=0||N.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;v.setState({goInputText:""}),z(v.getValidValue())},v.go=function(N){var I=v.state.goInputText;if(I==="")return;(N.keyCode===c.ENTER||N.type==="click")&&(v.setState({goInputText:""}),v.props.quickGo(v.getValidValue()))},v}return Object(u.a)(b,[{key:"getValidValue",value:function(){var g=this.state,w=g.goInputText,M=g.current;return!w||isNaN(w)?M:Number(w)}},{key:"getPageSizeOptions",value:function(){var g=this.props,w=g.pageSize,M=g.pageSizeOptions;return M.some(function(N){return N.toString()===w.toString()})?M:M.concat([w.toString()]).sort(function(N,I){var G=isNaN(Number(N))?0:Number(N),z=isNaN(Number(I))?0:Number(I);return G-z})}},{key:"render",value:function(){var g=this,w=this.props,M=w.pageSize,N=w.locale,I=w.rootPrefixCls,G=w.changeSize,z=w.quickGo,H=w.goButton,K=w.selectComponentClass,U=w.buildOptionText,B=w.selectPrefixCls,V=w.disabled,ae=this.state.goInputText,he="".concat(I,"-options"),pe=K,Re=null,ke=null,ve=null;if(!G&&!z)return null;var Te=this.getPageSizeOptions();if(G&&pe){var be=Te.map(function(ue,le){return l.a.createElement(pe.Option,{key:le,value:ue.toString()},(U||g.buildOptionText)(ue))});Re=l.a.createElement(pe,{disabled:V,prefixCls:B,showSearch:!1,className:"".concat(he,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||Te[0]).toString(),onChange:this.changeSize,getPopupContainer:function(le){return le.parentNode}},be)}return z&&(H&&(ve=typeof H=="boolean"?l.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat(he,"-quick-jumper-button")},N.jump_to_confirm):l.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),ke=l.a.createElement("div",{className:"".concat(he,"-quick-jumper")},N.jump_to,l.a.createElement("input",{disabled:V,type:"text",value:ae,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,ve)),l.a.createElement("li",{className:"".concat(he)},Re,ke)}}]),b}(l.a.Component);m.defaultProps={pageSizeOptions:["10","20","50","100"]};var _=m,y=L("N2Kk");function i(){}function a(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function t(k,O,b){return b}function S(k,O,b){var v=typeof k=="undefined"?O.pageSize:k;return Math.floor((b.total-1)/v)+1}var x=function(k){Object(p.a)(b,k);var O=Object(C.a)(b);function b(v){var g;Object(D.a)(this,b),g=O.call(this,v),g.getJumpPrevPage=function(){return Math.max(1,g.state.current-(g.props.showLessItems?3:5))},g.getJumpNextPage=function(){return Math.min(S(void 0,g.state,g.props),g.state.current+(g.props.showLessItems?3:5))},g.getItemIcon=function(G,z){var H=g.props.prefixCls,K=G||l.a.createElement("button",{type:"button","aria-label":z,className:"".concat(H,"-item-link")});return typeof G=="function"&&(K=l.a.createElement(G,Object(T.a)({},g.props))),K},g.savePaginationNode=function(G){g.paginationNode=G},g.isValid=function(G){return a(G)&&G!==g.state.current},g.shouldDisplayQuickJumper=function(){var G=g.props,z=G.showQuickJumper,H=G.pageSize,K=G.total;return K<=H?!1:z},g.handleKeyDown=function(G){(G.keyCode===c.ARROW_UP||G.keyCode===c.ARROW_DOWN)&&G.preventDefault()},g.handleKeyUp=function(G){var z=g.getValidValue(G),H=g.state.currentInputValue;z!==H&&g.setState({currentInputValue:z}),G.keyCode===c.ENTER?g.handleChange(z):G.keyCode===c.ARROW_UP?g.handleChange(z-1):G.keyCode===c.ARROW_DOWN&&g.handleChange(z+1)},g.changePageSize=function(G){var z=g.state.current,H=S(G,g.state,g.props);z=z>H?H:z,H===0&&(z=g.state.current),typeof G=="number"&&("pageSize"in g.props||g.setState({pageSize:G}),"current"in g.props||g.setState({current:z,currentInputValue:z})),g.props.onShowSizeChange(z,G),"onChange"in g.props&&g.props.onChange&&g.props.onChange(z,G)},g.handleChange=function(G){var z=g.props.disabled,H=G;if(g.isValid(H)&&!z){var K=S(void 0,g.state,g.props);H>K?H=K:H<1&&(H=1),"current"in g.props||g.setState({current:H,currentInputValue:H});var U=g.state.pageSize;return g.props.onChange(H,U),H}return g.state.current},g.prev=function(){g.hasPrev()&&g.handleChange(g.state.current-1)},g.next=function(){g.hasNext()&&g.handleChange(g.state.current+1)},g.jumpPrev=function(){g.handleChange(g.getJumpPrevPage())},g.jumpNext=function(){g.handleChange(g.getJumpNextPage())},g.hasPrev=function(){return g.state.current>1},g.hasNext=function(){return g.state.current2?H-2:0),U=2;U=M?I=M:I=Number(w),I}},{key:"getShowSizeChanger",value:function(){var g=this.props,w=g.showSizeChanger,M=g.total,N=g.totalBoundaryShowSizeChanger;return typeof w!="undefined"?w:M>N}},{key:"renderPrev",value:function(g){var w=this.props,M=w.prevIcon,N=w.itemRender,I=N(g,"prev",this.getItemIcon(M,"prev page")),G=!this.hasPrev();return Object(E.isValidElement)(I)?Object(E.cloneElement)(I,{disabled:G}):I}},{key:"renderNext",value:function(g){var w=this.props,M=w.nextIcon,N=w.itemRender,I=N(g,"next",this.getItemIcon(M,"next page")),G=!this.hasNext();return Object(E.isValidElement)(I)?Object(E.cloneElement)(I,{disabled:G}):I}},{key:"render",value:function(){var g=this,w=this.props,M=w.prefixCls,N=w.className,I=w.style,G=w.disabled,z=w.hideOnSinglePage,H=w.total,K=w.locale,U=w.showQuickJumper,B=w.showLessItems,V=w.showTitle,ae=w.showTotal,he=w.simple,pe=w.itemRender,Re=w.showPrevNextJumpers,ke=w.jumpPrevIcon,ve=w.jumpNextIcon,Te=w.selectComponentClass,be=w.selectPrefixCls,ue=w.pageSizeOptions,le=this.state,re=le.current,fe=le.pageSize,q=le.currentInputValue;if(z===!0&&H<=fe)return null;var ee=S(void 0,this.state,this.props),Ce=[],te=null,J=null,X=null,Q=null,Ee=null,ge=U&&U.goButton,Oe=B?1:2,Qe=re-1>0?re-1:0,rt=re+1=Oe*2&&re!==1+2&&(Ce[0]=Object(E.cloneElement)(Ce[0],{className:"".concat(M,"-item-after-jump-prev")}),Ce.unshift(te)),ee-re>=Oe*2&&re!==ee-2&&(Ce[Ce.length-1]=Object(E.cloneElement)(Ce[Ce.length-1],{className:"".concat(M,"-item-before-jump-next")}),Ce.push(J)),at!==1&&Ce.unshift(X),ht!==ee&&Ce.push(Q)}var Ue=null;ae&&(Ue=l.a.createElement("li",{className:"".concat(M,"-total-text")},ae(H,[H===0?0:(re-1)*fe+1,re*fe>H?H:re*fe])));var Me=!this.hasPrev()||!ee,Ne=!this.hasNext()||!ee;return l.a.createElement("ul",Object(P.a)({className:n()(M,N,Object(d.a)({},"".concat(M,"-disabled"),G)),style:I,unselectable:"unselectable",ref:this.savePaginationNode},nt),Ue,l.a.createElement("li",{title:V?K.prev_page:null,onClick:this.prev,tabIndex:Me?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(d.a)({},"".concat(M,"-disabled"),Me)),"aria-disabled":Me},this.renderPrev(Qe)),Ce,l.a.createElement("li",{title:V?K.next_page:null,onClick:this.next,tabIndex:Ne?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(d.a)({},"".concat(M,"-disabled"),Ne)),"aria-disabled":Ne},this.renderNext(rt)),l.a.createElement(_,{disabled:G,locale:K,rootPrefixCls:M,selectComponentClass:Te,selectPrefixCls:be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:fe,pageSizeOptions:ue,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ge}))}}],[{key:"getDerivedStateFromProps",value:function(g,w){var M={};if("current"in g&&(M.current=g.current,g.current!==w.current&&(M.currentInputValue=M.current)),"pageSize"in g&&g.pageSize!==w.pageSize){var N=w.current,I=S(g.pageSize,w,g);N=N>I?I:N,"current"in g||(M.current=N,M.currentInputValue=N),M.pageSize=g.pageSize}return M}}]),b}(l.a.Component);x.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:i,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:i,locale:y.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var o=x},"6RRn":function(j,Z,L){"use strict";var P=L("wCXF"),d=L("n6Qo");L.d(Z,"b",function(){return d.a});var T=L("IBYe"),D=L("6eGT"),u=L("hW8S");L.d(Z,"a",function(){return u.a}),Z.c=P.b},"6eGT":function(j,Z,L){"use strict";function P(d){return null}Z.a=P},"7Cbv":function(j,Z,L){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),d=new Uint8Array(16);function T(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(d)}var D=/^(?:[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 u(f){return typeof f=="string"&&D.test(f)}for(var p=u,C=[],E=0;E<256;++E)C.push((E+256).toString(16).substr(1));function l(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,m=(C[f[c+0]]+C[f[c+1]]+C[f[c+2]]+C[f[c+3]]+"-"+C[f[c+4]]+C[f[c+5]]+"-"+C[f[c+6]]+C[f[c+7]]+"-"+C[f[c+8]]+C[f[c+9]]+"-"+C[f[c+10]]+C[f[c+11]]+C[f[c+12]]+C[f[c+13]]+C[f[c+14]]+C[f[c+15]]).toLowerCase();if(!p(m))throw TypeError("Stringified UUID is invalid");return m}var s=l;function n(f,c,m){f=f||{};var _=f.random||(f.rng||T)();if(_[6]=_[6]&15|64,_[8]=_[8]&63|128,c){m=m||0;for(var y=0;y<16;++y)c[m+y]=_[y];return c}return s(_)}var h=Z.a=n},"7ahc":function(j,Z,L){"use strict";L.d(Z,"a",function(){return S});var P=L("k1fw"),d=L("0Owb"),T=L("+L6B"),D=L("2/Rp"),u=L("y8nQ"),p=L("Vl3Y"),C=L("tJVT"),E=L("OaEy"),l=L("2fM7"),s=L("q1tI"),n=L.n(s),h=L("VrN/"),f=L.n(h),c=L("p77/"),m=L.n(c),_=L("c5Ni"),y=L.n(_),i=l.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},t={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"]};Z.b=function(x){var o=x.callback,k=x.onCancel,O=Object(s.useState)("python"),b=Object(C.a)(O,2),v=b[0],g=b[1];function w(N){g(t[N][1])}function M(N){o(N)}return n.a.createElement(p.a,Object(d.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),n.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(l.a,{onChange:w},Object.keys(t).map(function(N){return n.a.createElement(i,{key:N,value:N},t[N][0])}))),n.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(S,{mode:v})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(D.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function S(x){var o=x.value,k=x.onChange,O=x.mode,b=x.options,v=b===void 0?{}:b,g=Object(s.useRef)(),w=Object(s.useState)(),M=Object(C.a)(w,2),N=M[0],I=M[1];return Object(s.useEffect)(function(){if(N){function G(z){var H=z.getValue();k&&k(H)}return N.on("change",G),function(){N.off("change",G)}}},[N,k]),Object(s.useEffect)(function(){N&&N.setOption("mode",O)},[N,O]),Object(s.useEffect)(function(){N&&((o!==N.getValue()||o==="")&&setTimeout(function(){N.setValue(o||" ")},300))},[N,o]),Object(s.useEffect)(function(){if(g.current&&!N){var G=f.a.fromTextArea(g.current,Object(P.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},v));I(G)}},[g.current,N]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:g}))}},"815F":function(j,Z,L){"use strict";L.d(Z,"e",function(){return C}),L.d(Z,"c",function(){return l}),L.d(Z,"d",function(){return s}),L.d(Z,"a",function(){return h}),L.d(Z,"f",function(){return f}),L.d(Z,"b",function(){return c});var P=L("KQm4"),d=L("VTBJ"),T=L("Ff2n"),D=L("Zm9Q"),u=L("Kwbf"),p=L("OZM5");function C(m,_){return m!=null?m:_}function E(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=new Map;function y(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(t){var S=t.key,x=t.children;Object(u.a)(S!=null,"Tree node must have a certain key: [".concat(a).concat(S,"]"));var o=String(S);Object(u.a)(!_.has(o)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(o)),_.set(o,!0),y(x,"".concat(a).concat(o," > "))})}y(m)}function l(m){function _(y){var i=Object(D.a)(y);return i.map(function(a){if(!Object(p.i)(a))return Object(u.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var t=a.key,S=a.props,x=S.children,o=Object(T.a)(S,["children"]),k=Object(d.a)({key:t},o),O=_(x);return O.length&&(k.children=O),k}).filter(function(a){return a})}return _(m)}function s(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],y=new Set(_===!0?[]:_),i=[];function a(t){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(x,o){var k=Object(p.h)(S?S.pos:"0",o),O=C(x.key,k),b=Object(d.a)(Object(d.a)({},x),{},{parent:S,pos:k,children:null,data:x,isStart:[].concat(Object(P.a)(S?S.isStart:[]),[o===0]),isEnd:[].concat(Object(P.a)(S?S.isEnd:[]),[o===t.length-1])});return i.push(b),_===!0||y.has(O)?b.children=a(x.children||[],b):b.children=[],b})}return a(m),i}function n(m,_,y){var i;y?typeof y=="string"?i=function(S){return S[y]}:typeof y=="function"&&(i=function(S){return y(S)}):i=function(S,x){return C(S.key,x)};function a(t,S,x){var o=t?t.children:m,k=t?Object(p.h)(x.pos,S):"0";if(t){var O=i(t,k),b={node:t,index:S,pos:k,key:O,parentPos:x.node?x.pos:null,level:x.level+1};_(b)}o&&o.forEach(function(v,g){a(v,g,{node:t,pos:k,level:x?x.level+1:-1})})}a(null)}function h(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=_.initWrapper,i=_.processEntity,a=_.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,S={},x={},o={posEntities:S,keyEntities:x};return y&&(o=y(o)||o),n(m,function(k){var O=k.node,b=k.index,v=k.pos,g=k.key,w=k.parentPos,M=k.level,N={node:O,index:b,key:g,pos:v,level:M},I=C(g,v);S[v]=N,x[I]=N,N.parent=S[w],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),i&&i(N,o)},t),a&&a(o),o}function f(m,_){var y=_.expandedKeys,i=_.selectedKeys,a=_.loadedKeys,t=_.loadingKeys,S=_.checkedKeys,x=_.halfCheckedKeys,o=_.dragOverNodeKey,k=_.dropPosition,O=_.keyEntities,b=O[m],v={eventKey:m,expanded:y.indexOf(m)!==-1,selected:i.indexOf(m)!==-1,loaded:a.indexOf(m)!==-1,loading:t.indexOf(m)!==-1,checked:S.indexOf(m)!==-1,halfChecked:x.indexOf(m)!==-1,pos:String(b?b.pos:""),dragOver:o===m&&k===0,dragOverGapTop:o===m&&k===-1,dragOverGapBottom:o===m&&k===1};return v}function c(m){var _=m.data,y=m.expanded,i=m.selected,a=m.checked,t=m.loaded,S=m.loading,x=m.halfChecked,o=m.dragOver,k=m.dragOverGapTop,O=m.dragOverGapBottom,b=m.pos,v=m.active,g=Object(d.a)(Object(d.a)({},_),{},{expanded:y,selected:i,checked:a,loaded:t,loading:S,halfChecked:x,dragOver:o,dragOverGapTop:k,dragOverGapBottom:O,pos:b,active:v});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(u.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),m}}),g}},"8EBN":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";P.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 d=0;d-1&&D.substring(C+1,D.length);if(E)return P.findModeByExtension(E)},P.findModeByName=function(D){D=D.toLowerCase();for(var u=0;u=ne.length?ce.slice(ne.length):ce}).join(` `)}var y=[],i=["
    "],a=new c.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){y.length=0,i=["
      "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function o(se,W,$,ne){if(W>=se.length||se[W].level<=$)return W;var ce=se[W];ne.push("
    • "+ce.text+""),W++;var oe=[];return W=o(se,W,ce.level,oe),oe.length>0&&(ne.push("
        "),oe.forEach(function(Ke){ne.push(Ke)}),ne.push("
      ")),ne.push("
    • "),W=o(se,W,$,ne),W}function k(){return o(y,0,0,i),i.push("
    "),i.join("")}var O={heading:function(W){var $=t.exec(W);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(W){var $=this.rules.block.fences.exec(W);if($){var ne=$[0],ce=_(ne,$[3]||""),oe=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ke=g(),At=ce;ce=Ke,w[Ke]={type:"block",expression:At}}return{type:"code",raw:ne,lang:oe,text:ce}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,v=0,g=function(){return"__special_katext_id_".concat(v++,"__")},w={};function M(){return w}function N(){v=0,w={}}function I(se){return se=se.replace(b,function(W,$){var ne=g();return w[ne]={type:"inline",expression:$},ne}),se}var G=a.listitem;a.listitem=function(se){return G(I(se))};var z=a.paragraph;a.paragraph=function(se){return z(I(se))};var H=a.tablecell;a.tablecell=function(se,W){return H(I(se),W)},a.code=function(se,W,$){var ne=(W||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"

    ".concat(se,"

    "):'
    ').concat($?se:Object(m.escape)(se,!0),`
    `):'
    '+($?se:Object(m.escape)(se,!0))+"
    "},a.heading=function(se,W,$){var ne=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return y.push({anchor:ne,level:W,text:se}),"'+se+""},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:O,renderer:a});var K=c.a,U=L("SJMd"),B=L("ulZh"),V=L.n(B),ae=L("m3rI"),he=L("Oy/b"),pe=L("p5ED"),Re=L("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 ke=function(se,W){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ne){$.__proto__=ne}||function($,ne){for(var ce in ne)Object.prototype.hasOwnProperty.call(ne,ce)&&($[ce]=ne[ce])})(se,W)};function ve(se,W){function $(){this.constructor=se}ke(se,W),se.prototype=W===null?Object.create(W):($.prototype=W.prototype,new $)}function Te(se,W,$,ne){return new($||($=Promise))(function(ce,oe){function Ke(vr){try{Vt(ne.next(vr))}catch(Pt){oe(Pt)}}function At(vr){try{Vt(ne.throw(vr))}catch(Pt){oe(Pt)}}function Vt(vr){var Pt;vr.done?ce(vr.value):(Pt=vr.value,Pt instanceof $?Pt:new $(function(Br){Br(Pt)})).then(Ke,At)}Vt((ne=ne.apply(se,W||[])).next())})}function be(se,W){var $,ne,ce,oe,Ke={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[1]},trys:[],ops:[]};return oe={next:At(0),throw:At(1),return:At(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function At(Vt){return function(vr){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ne&&(ce=2&Pt[0]?ne.return:Pt[0]?ne.throw||((ce=ne.return)&&ce.call(ne),0):ne.next)&&!(ce=ce.call(ne,Pt[1])).done)return ce;switch(ne=0,ce&&(Pt=[2&Pt[0],ce.value]),Pt[0]){case 0:case 1:ce=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ne=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ce=Ke.trys,(ce=ce.length>0&&ce[ce.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ce||Pt[1]>ce[0]&&Pt[1]',"select"),this.addActionButton(ne,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ne,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ne,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ne,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ne,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ne,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ne,'',"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(oe){var Ke=document.createElement("div");Ke.className=""+$.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",oe.typeName),Ke.innerHTML=oe.icon,Ke.addEventListener("click",function(){$.markerToolbarButtonClicked(Ke,oe)}),$.buttons.push(Ke),$.markerButtons.push(Ke)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ce=document.createElement("div");ce.className=this.toolbarBlockStyleClass.name,ce.style.whiteSpace="nowrap",ce.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ce),this.addActionButton(ce,'',"render"),this.addActionButton(ce,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},se.prototype.addButtonClickListener=function(W){this.buttonClickListeners.push(W)},se.prototype.removeButtonClickListener=function(W){this.buttonClickListeners.indexOf(W)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(W),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var W=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var $=0;$0&&this.buttonClickListeners.forEach(function(ne){return ne("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(W,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ne){return ne("action",$)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.prototype.setActiveButton=function(W){this.resetButtonStyles(),W.className=W.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),W.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},se.prototype.setActiveMarkerButton=function(W){var $=this.markerButtons.find(function(ne){return ne.getAttribute("data-type-name")===W});$&&this.setActiveButton($)},se.prototype.setCurrentMarker=function(W){var $=this;this.currentMarker=W,this.buttons.filter(function(ne){return/delete|notes/.test(ne.getAttribute("data-action"))}).forEach(function(ne){$.currentMarker===void 0?(ne.style.fillOpacity="0.4",ne.style.pointerEvents="none"):(ne.style.fillOpacity="1",ne.style.pointerEvents="all")})},se}(),X=function(){function se(W,$,ne,ce){this.panels=[],this.panelButtons=[],this.markerjsContainer=W,this.displayMode=$,this.uiStyleSettings=ne,this.styles=ce,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var W;this.toolboxStyleClass=this.styles.addClass(new te("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 te("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new te("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new te("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new te("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 te("toolbox-panel-row_colors",` background-color: `+((W=this.uiStyleSettings.toolboxBackgroundColor)!==null&&W!==void 0?W:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new te("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px; padding: `+$+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new te("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new te("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; `))},se.prototype.show=function(W){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(W){var $,ne,ce=this;this.panels=W,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ne!==void 0?ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Ke;oe.uiStyleSettings=ce.uiStyleSettings;var At=document.createElement("div");At.className=ce.toolboxButtonStyleClass.name+" "+((Ke=ce.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:ce.toolboxButtonStyleColorsClass.name),At.innerHTML=oe.icon,At.title=oe.title,At.addEventListener("click",function(){ce.panelButtonClick(oe)}),ce.panelButtons.push(At),ce.buttonRow.appendChild(At)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(W){var $=this,ne=-1;if(W!==this.activePanel){ne=this.panels.indexOf(W),this.panelRow.innerHTML="";var ce=W.getUi();ce.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ce),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=W}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ke){var At,Vt;oe.className=$.toolboxButtonStyleClass.name+" "+(Ke===ne?""+((At=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&At!==void 0?At:$.toolboxActiveButtonStyleColorsClass.name):""+((Vt=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Vt!==void 0?Vt:$.toolboxButtonStyleColorsClass.name))})},se}(),Q=function(se,W){this.title=se,this.icon=W},Ee=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ne,Ke.currentColor=ce,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.whiteSpace="nowrap",this.colors.forEach(function(ce){var oe=$.getColorBox(ce);ne.appendChild(oe),$.colorBoxes.push(oe)}),ne},W.prototype.getColorBox=function($){var ne=this,ce=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-ce,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=oe-2+"px",Ke.style.height=oe-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(oe+2)/2+"px",Ke.style.borderColor=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ne.setCurrentColor($,Ke)});var At=document.createElement("div");return At.style.display="inline-block",At.style.width=oe-2+"px",At.style.height=oe-2+"px",At.style.backgroundColor=$,At.style.borderRadius=oe/2+"px",$==="transparent"&&(At.style.fill=this.uiStyleSettings.toolboxAccentColor,At.innerHTML=` `),Ke.appendChild(At),Ke},W.prototype.setCurrentColor=function($,ne){var ce=this;this.currentColor=$,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},W}(Q),ge=function(){function se(W,$,ne){this._state="new",this._isSelected=!1,this._container=W,this._overlayContainer=$,this.globalSettings=ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(W){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(W,$){},se.prototype.dblClick=function(W,$){},se.prototype.manipulate=function(W){},se.prototype.pointerUp=function(W){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(W){this.container.childNodes.length>0?this.container.insertBefore(W,this.container.childNodes[0]):this.container.appendChild(W)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(W){this._state=W.state,this.notes=W.notes},se.prototype.scale=function(W,$){},se.prototype.colorChanged=function(W){this.onColorChanged&&this.onColorChanged(W),this.stateChanged()},se.prototype.fillColorChanged=function(W){this.onFillColorChanged&&this.onFillColorChanged(W),this.stateChanged()},se.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var W=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),W.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(W)&&this.onStateChanged(this)}},se.typeName="MarkerBase",se}(),Oe=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.prototype.findGripByVisual=function(W){return this.topLeft.ownsTarget(W)?this.topLeft:this.topCenter.ownsTarget(W)?this.topCenter:this.topRight.ownsTarget(W)?this.topRight:this.centerLeft.ownsTarget(W)?this.centerLeft:this.centerRight.ownsTarget(W)?this.centerRight:this.bottomLeft.ownsTarget(W)?this.bottomLeft:this.bottomCenter.ownsTarget(W)?this.bottomCenter:this.bottomRight.ownsTarget(W)?this.bottomRight:void 0},se}(),Qe=function(){function se(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},se}(),rt=function(){function se(){}return se.toITransformMatrix=function(W){return{a:W.a,b:W.b,c:W.c,d:W.d,e:W.e,f:W.f}},se.toSVGMatrix=function(W,$){return W.a=$.a,W.b=$.b,W.c=$.c,W.d=$.d,W.e=$.e,W.f=$.f,W},se}(),nt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(le.createTransform()),oe.setupControlBox(),oe}return ve(W,se),Object.defineProperty(W.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"visual",{get:function(){return this._visual},set:function($){this._visual=$;var ne=le.createTransform();this._visual.transform.baseVal.appendItem(ne)},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ce=this.unrotatePoint($);if(this.manipulationStartX=ce.x,this.manipulationStartY=ce.y,this.offsetX=ce.x-this.left,this.offsetY=ce.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ne)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},W.prototype.pointerUp=function($){var ne=this.state;se.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},W.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},W.prototype.manipulate=function($){var ne=this.unrotatePoint($);this.state==="creating"?this.resize($):this.state==="move"?(this.left=this.manipulationStartLeft+(ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ne):this.state==="rotate"&&this.rotate($)},W.prototype.resize=function($){var ne=this.manipulationStartLeft,ce=this.manipulationStartWidth,oe=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ne=this.manipulationStartLeft+$.x-this.manipulationStartX,ce=this.manipulationStartWidth+this.manipulationStartLeft-ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ce=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+$.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+$.y-this.manipulationStartY}ce>=0?(this.left=ne,this.width=ce):(this.left=ne+ce,this.width=-ce),Ke>=0?(this.top=oe,this.height=Ke):(this.top=oe+Ke,this.height=-Ke),this.setSize()},W.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},W.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var ne=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*ne,this.applyRotation()}},W.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},W.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var ne=this.container.getCTM(),ce=le.createPoint($.x,$.y);return{x:(ce=ce.matrixTransform(ne)).x,y:ce.y}},W.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var ne=this.container.getCTM();ne=ne.inverse();var ce=le.createPoint($.x,$.y);return{x:(ce=ce.matrixTransform(ne)).x,y:ce.y}},W.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var $=le.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=le.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=le.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 Oe,this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,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()},W.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()},W.prototype.createGrip=function(){var $=new Qe;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},W.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,ne=-$/2,ce=ne,oe=(this.width+this.CB_DISTANCE)/2-$/2,Ke=(this.height+this.CB_DISTANCE)/2-$/2,At=this.height+this.CB_DISTANCE-$/2,Vt=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,ne,ce),this.positionGrip(this.controlGrips.topCenter.visual,oe,ce),this.positionGrip(this.controlGrips.topRight.visual,Vt,ce),this.positionGrip(this.controlGrips.centerLeft.visual,ne,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Vt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ne,At),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,At),this.positionGrip(this.controlGrips.bottomRight.visual,Vt,At),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,ce-3*this.CB_DISTANCE)},W.prototype.positionGrip=function($,ne,ce){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ne,ce),$.transform.baseVal.replaceItem(oe,0)},W.prototype.hideControlBox=function(){this.controlBox.style.display="none"},W.prototype.showControlBox=function(){this.controlBox.style.display=""},W.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:rt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:rt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.left=ne.left,this.top=ne.top,this.width=ne.width,this.height=ne.height,this.rotationAngle=ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ne.containerTransformMatrix))},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne);var ce=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:ce.x*$,y:ce.y*ne});this.left=oe.x,this.top=oe.y,this.width=this.width*$,this.height=this.height*ne,this.adjustControlBox()},W}(ge),ut=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},W.prototype.createVisual=function(){this.visual=le.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)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},W.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},W.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},W.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this))},W.prototype.restoreState=function($){var ne=$;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize()},W.title="Rectangle marker",W}(nt),dt=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ne,Ke.currentWidth=ce,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.widths.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ce===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentWidth(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.innerText=ce.toString(),Ke.style.marginRight="5px",oe.appendChild(Ke);var At=document.createElement("div");At.style.minHeight="20px",At.style.flexGrow="2",At.style.display="flex",At.style.alignItems="center";var Vt=document.createElement("hr");Vt.style.minWidth="20px",Vt.style.border="0px",Vt.style.borderTop=ce+"px solid "+$.uiStyleSettings.toolboxColor,Vt.style.flexGrow="2",At.appendChild(Vt),oe.appendChild(At),$.widthBoxes.push(oe)}),ne},W.prototype.setCurrentWidth=function($,ne){var ce=this;this.currentWidth=$,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},W}(Q),mt=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ne,Ke.currentStyle=ce,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.styles.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.styles.length-5+"%",oe.style.borderColor=ce===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentStyle(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var At=` `;Ke.innerHTML=At,oe.appendChild(Ke),$.styleBoxes.push(oe)}),ne},W.prototype.setCurrentStyle=function($,ne){var ce=this;this.currentStyle=$,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},W}(Q),He=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="FrameMarker",W.title="Frame marker",W.icon='',W}(ut),De=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},at=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return ve(W,se),W.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.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(ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},W.prototype.pointerUp=function($){var ne=this.state;se.prototype.pointerUp.call(this,$),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($),this._state="select",ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},W.prototype.adjustVisual=function(){},W.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},W.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.y}this.adjustVisual(),this.adjustControlBox()},W.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){this.positionGrips()},W.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},W.prototype.createGrip=function(){var $=new Qe;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},W.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},W.prototype.positionGrip=function($,ne,ce){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ne,ce),$.transform.baseVal.replaceItem(oe,0)},W.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.x1=ne.x1,this.y1=ne.y1,this.x2=ne.x2,this.y2=ne.y2},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.x1=this.x1*$,this.y1=this.y1*ne,this.x2=this.x2*$,this.y2=this.y2*ne,this.adjustVisual(),this.adjustControlBox()},W}(ge),ht=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.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)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},W.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()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.createVisual(),this.adjustVisual()},W.typeName="LineMarker",W.title="Line marker",W.icon='',W}(at),Ze=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ne,Ke.currentFont=ce,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.flexGrow="2",this.fonts.forEach(function(ce){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.fonts.length-5+"%",oe.style.borderColor=ce===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentFont(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=ce,Ke.style.overflow="hidden";var At=document.createElement("div");At.style.whiteSpace="nowrap",At.style.overflow="hidden",At.style.textOverflow="ellipsis",At.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(At),oe.appendChild(Ke),$.fontBoxes.push(oe)}),ne},W.prototype.setCurrentFont=function($,ne){var ce=this;this.currentFont=$,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},W}(Q),st=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="your text here",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=ce.defaultColor,oe.fontFamily=ce.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new Ee("Color",ce.defaultColorSet,ce.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Ze("Font",ce.defaultFontFamilies,ce.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return ve(W,se),W.prototype.ownsTarget=function($){if(se.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var ne=!1;return this.textElement.childNodes.forEach(function(ce){ce===$&&(ne=!0)}),ne},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},W.prototype.renderText=function(){var $=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(ne){$.textElement.appendChild(le.createTSpan(ne.trim()===""?" ":ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},W.prototype.getTextScale=function(){var $=this.textElement.getBBox(),ne=1;if($.width>0&&$.height>0){var ce=(1*this.width-this.width*this.padding*2/100)/$.width,oe=(1*this.height-this.height*this.padding*2/100)/$.height;ne=Math.min(ce,oe)}return ne},W.prototype.getTextPosition=function($){var ne=this.textElement.getBBox(),ce=0,oe=0;return ne.width>0&&ne.height>0&&(ce=(this.width-ne.width*$)/2,oe=this.height/2-ne.height*$/2),{x:ce,y:oe}},W.prototype.sizeText=function(){var $=this.textElement.getBBox(),ne=this.getTextScale(),ce=this.getTextPosition(ne);ce.y-=$.y*ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ce.x+"px, "+ce.y+"px) scale("+ne+", "+ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ce.x,ce.y),this.textElement.transform.baseVal.getItem(1).setScale(ne,ne))},W.prototype.manipulate=function($){se.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},W.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},W.prototype.pointerUp=function($){var ne=this.state;ne==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,$),this.setSize(),(ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},W.prototype.showTextEditor=function(){var $=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(ne){ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ne=Number.parseFloat($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&ne>.9;)ne-=.1,$.textEditor.style.fontSize=Math.max(ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ne){ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ne){if(ne.clipboardData){var ce=ne.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(ce)),ne.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},W.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var $=this.getTextScale(),ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ce=this.textElement.getBBox(),oe={x:ce.width*$,y:ce.height*$};ne.x-=oe.x/2,ne.y-=oe.y/2,this.textEditor.style.top=ne.y+"px",this.textEditor.style.left=ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ne.x+"px",this.textEditor.style.fontSize=Math.max(16*$,12)+"px",this.textElement.style.display="none"}},W.prototype.textEditDivClicked=function($){this.text=$.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},W.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},W.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},W.prototype.dblClick=function($,ne){se.prototype.dblClick.call(this,$,ne),this.showTextEditor()},W.prototype.setColor=function($){this.textElement&&le.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},W.prototype.setFont=function($){this.textElement&&le.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},W.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},W.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){var ne=$;this.color=ne.color,this.fontFamily=ne.fontFamily,this.padding=ne.padding,this.text=ne.text,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize(),this.sizeText(),this.positionTextEditor()},W.typeName="TextMarker",W.title="Text marker",W.icon='',W}(nt),Ue=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=ce.defaultColor,oe.lineWidth=ce.defaultStrokeWidth,oe.pixelRatio=ce.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new Ee("Color",ce.defaultColorSet,ce.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var $=le.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function($,ne){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($.x,$.y),this.drawing=!0):se.prototype.pointerDown.call(this,$,ne)},W.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){se.prototype.resize.call(this,$),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,$)},W.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)},W.prototype.select=function(){this.state==="creating"&&this.finishCreation(),se.prototype.select.call(this)},W.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},W.prototype.finishCreation=function(){for(var $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ce=ne[0],oe=ne[1],Ke=ne[2],At=ne[3],Vt=!1,vr=0;vr0&&(Vt=!0,vrAt&&(At=vr),Pt>Ke&&(Ke=Pt));if(Vt){this.left=ce/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ke-ce)/this.pixelRatio,this.height=(At-oe)/this.pixelRatio;var Br=document.createElement("canvas");Br.width=Ke-ce,Br.height=At-oe,Br.getContext("2d").putImageData(this.canvasContext.getImageData(ce,oe,Ke-ce,At-oe),0,0),this.drawingImgUrl=Br.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},W.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},W.prototype.setColor=function($){this.color=$,this.colorChanged($)},W.prototype.setLineWidth=function($){this.lineWidth=$},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){this.createVisual(),se.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setDrawingImage()},W.typeName="FreehandMarker",W.title="Freehand marker",W.icon='',W}(nt),Me=function(se){function W($,ne,ce){var oe=se.call(this,$,ce||'')||this;return oe.typeBoxes=[],oe.currentType=ne,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2";for(var ce=function(At){var Vt="both";switch(At){case 0:Vt="both";break;case 1:Vt="start";break;case 2:Vt="end";break;case 3:Vt="none"}var vr=document.createElement("div");if(vr.style.display="flex",vr.style.flexGrow="2",vr.style.alignItems="center",vr.style.justifyContent="space-between",vr.style.padding="5px",vr.style.borderWidth="2px",vr.style.borderStyle="solid",vr.style.borderColor=Vt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",vr.addEventListener("click",function(){$.setCurrentType(Vt,vr)}),ne.appendChild(vr),Vt==="both"||Vt==="start"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.innerHTML=` `,Pt.style.marginLeft="5px",vr.appendChild(Pt)}var Br=document.createElement("div");Br.style.display="flex",Br.style.alignItems="center",Br.style.minHeight="20px",Br.style.flexGrow="2";var jr=document.createElement("hr");if(jr.style.minWidth="20px",jr.style.border="0px",jr.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),jr.style.flexGrow="2",Br.appendChild(jr),vr.appendChild(Br),Vt==="both"||Vt==="end"){var fn=document.createElement("div");fn.style.display="flex",fn.style.alignItems="center",fn.style.minHeight="20px",fn.innerHTML=` `,fn.style.marginRight="5px",vr.appendChild(fn)}oe.typeBoxes.push(vr)},oe=this,Ke=0;Ke<4;Ke++)ce(Ke);return ne},W.prototype.setCurrentType=function($,ne){var ce=this;this.currentType=$,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings!==void 0?ce.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},W}(Q),Ne=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new Me("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},W.prototype.getArrowPoints=function($,ne){var ce=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return $-ce/2+","+(ne+oe/2)+" "+$+","+(ne-oe/2)+" "+($+ce/2)+","+(ne+oe/2)},W.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(se.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",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.arrow1.transform.baseVal.getItem(0);ne.setRotate($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ne,0);var ce=this.arrow2.transform.baseVal.getItem(0);ce.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ce,0)}},W.prototype.setArrowType=function($){this.arrowType=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.arrowType=ne.arrowType,this.createTips(),this.adjustVisual()},W.typeName="ArrowMarker",W.title="Arrow marker",W.icon='',W}(ht),xe=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.fillColor=ce.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new Ee("Color",ce.defaultColorSet,ce.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="CoverMarker",W.title="Cover marker",W.icon='',W}(ut),Se=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ne,Ke.currentOpacity=ce,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",ne.style.justifyContent="space-between",this.opacities.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ce===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentOpacity(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.innerText=100*ce+"%",oe.appendChild(Ke),$.opacityBoxes.push(oe)}),ne},W.prototype.setCurrentOpacity=function($,ne){var ce=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},W}(Q),Ae=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=ce.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=ce.defaultHighlightOpacity,oe.fillPanel=new Ee("Color",ce.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new Se("Opacity",ce.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return ve(W,se),W.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="HighlightMarker",W.title="Highlight marker",W.icon='',W}(xe),Le='',Je=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=ce.defaultStrokeColor,oe.bgColor=ce.defaultFillColor,oe.fontFamily=ce.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new Ee("Text color",ce.defaultColorSet,oe.color,''),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new Ee("Fill color",ce.defaultColorSet,oe.bgColor,Le),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Ze("Font",ce.defaultFontFamilies,ce.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new Qe,oe.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return ve(W,se),W.prototype.ownsTarget=function($){return se.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},W.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},W.prototype.pointerDown=function($,ne){this.state==="new"&&se.prototype.pointerDown.call(this,$,ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,$,ne)},W.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,$);else{var ne=this.state==="creating";se.prototype.pointerUp.call(this,$),this.setTipPoints(ne),this.positionTip()}},W.prototype.manipulate=function($){if(this.tipMoving){var ne=this.unrotatePoint($);this.tipPosition={x:ne.x-this.manipulationStartLeft,y:ne.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,$)},W.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",$]]),le.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},W.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},W.prototype.setTipPoints=function($){$===void 0&&($=!1);var ne=Math.min(this.height/2,15),ce=this.height/5;$&&(this.tipPosition={x:ne+ce/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?oe.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.tip1.transform.baseVal.getItem(0);ne.setRotate($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ne,0);var ce=this.tip2.transform.baseVal.getItem(0);ce.setRotate($+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ce,0)}},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$),this.createTips(),this.adjustVisual()},W.typeName="MeasurementMarker",W.title="Measurement marker",W.icon='',W}(ht),yt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokePanel.colors=ce.defaultColorSet,oe.fillColor="transparent",oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="EllipseFrameMarker",W.title="Ellipse frame marker",W.icon='',W}(Ve),Bt=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.prototype.addUndoStep=function(W){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(W)||(this.undoStack.push(W),JSON.stringify(this.lastRedoStep)!==JSON.stringify(W)&&this.redoStack.splice(0,this.redoStack.length))},se.prototype.replaceLastUndoStep=function(W){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=W)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.prototype.undo=function(){if(this.undoStack.length>1){var W=this.undoStack.pop();return W!==void 0&&this.redoStack.push(W),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),Nt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},W.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.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)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ne)&&(this.activeGrip=this.curveGrip,this._state="resize")},W.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.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)},W.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,se.prototype.addControlGrips.call(this)},W.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/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()))},W.prototype.manipulate=function($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),se.prototype.resize.call(this,$),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},W.prototype.scale=function($,ne){this.curveX=this.curveX*$,this.curveY=this.curveY*ne,se.prototype.scale.call(this,$,ne)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.curveX=ne.curveX,this.curveY=ne.curveY,this.createVisual(),this.adjustVisual()},W.typeName="CurveMarker",W.title="Curve marker",W.icon='',W}(at),mr=function(){function se(W,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=W,this.cancelable=$}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),hr=function(se){function W($,ne,ce){var oe=se.call(this,$,!1)||this;return oe.dataUrl=ne,oe.state=ce,oe}return ve(W,se),W}(mr),St=function(se){function W($,ne,ce){ce===void 0&&(ce=!1);var oe=se.call(this,$,ce)||this;return oe.marker=ne,oe}return ve(W,se),W}(mr),$r=function(){function se(){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 se.prototype.addEventListener=function(W,$){this[W].push($)},se.prototype.removeEventListener=function(W,$){var ne=this[W].indexOf($);ne>-1&&this[W].splice(ne,1)},se}(),Xr=function(){function se(W){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new De,this._isOpen=!1,this.undoRedoManager=new Bt,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 $r,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new ee(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=W,this.targetRoot=document.body,this.width=W.clientWidth,this.height=W.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(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,yt,Ve,Ae,Je,gt,xe,ht,Nt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,Ve,Ae,Je]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,Ae]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(W){var $=this;this._availableMarkerTypes.splice(0),W.forEach(function(ne){if(typeof ne=="string"){var ce=$.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===ne});ce!==void 0&&$._availableMarkerTypes.push(ce)}else $._availableMarkerTypes.push(ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(W){this._zoomLevel=W,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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var W=this;this.styles.styleSheetRoot===void 0&&q.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function($){return $(new mr(W))})},se.prototype.render=function(){return Te(this,void 0,void 0,function(){var W;return be(this,function($){switch($.label){case 0:return this.setCurrentMarker(),(W=new fe).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.markersOnly=this.renderMarkersOnly,W.width=this.renderWidth,W.height=this.renderHeight,[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return $.sent(),[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},se.prototype.close=function(W){var $=this;if(W===void 0&&(W=!1),this.isOpen){var ne=!1;W||this.eventListeners.beforeclose.forEach(function(ce){var oe=new mr($,!0);ce(oe),oe.defaultPrevented&&(ne=!0)}),ne||(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(ce){return ce(new mr($))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var W,$=[],ne=0;nethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*W:this.editorCanvas.clientWidth,ne=$',W.title="Powered by marker.js",W.style.display="grid",W.style.alignItems="center",W.style.justifyItems="center",W.style.padding="3px",W.style.width="20px",W.style.height="20px",this.logoUI.appendChild(W),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},se.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")},se.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"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.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 W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"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 J(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(W),1),W.dispose()},se.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())},se.prototype.toolbarButtonClicked=function(W,$){if(W==="marker"&&$!==void 0)this.createNewMarker($);else if(W==="action")switch($){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()}},se.prototype.deleteSelectedMarker=function(){var W=this;if(this._currentMarker!==void 0){var $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ce){var oe=new St(W,W._currentMarker,!0);ce(oe),oe.defaultPrevented&&($=!0)}),!$){var ne=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(ce){return ce(new St(W,ne))})}}},se.prototype.clear=function(){var W=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var At=new St(W,void 0,!0);Ke(At),At.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var ne=function(Ke){var At=ce.markers[Ke];ce.setCurrentMarker(ce.markers[Ke]),ce._currentMarker.dispose(),ce.markerImage.removeChild(ce._currentMarker.container),ce.markers.splice(ce.markers.indexOf(ce._currentMarker),1),ce.eventListeners.markerdelete.forEach(function(Vt){return Vt(new St(W,At))})},ce=this,oe=this.markers.length-1;oe>=0;oe--)ne(oe);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.prototype.showNotesEditor=function(){var W;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=(W=this._currentMarker.notes)!==null&&W!==void 0?W:"",this.overlayContainer.appendChild(this.notesArea))},se.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)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var W=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var $=this.getState(),ne=this.undoRedoManager.getLastUndoStep();if(!ne||ne.width===$.width&&ne.height===$.height){var ce=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),ce1&&this.panTo({x:W.clientX,y:W.clientY}))},se.prototype.onPointerUp=function(W){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(W.clientX,W.clientY)),this.isDragging=!1,this.addUndoStep()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(W){this._currentMarker===void 0||this.notesArea!==void 0||W.key!=="Delete"&&W.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.markerImage.getBoundingClientRect();return{x:(W-ne.left)/this.zoomLevel,y:($-ne.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"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()},se.prototype.addLicenseKey=function(W){re.addKey(W)},se.prototype.addEventListener=function(W,$){this.eventListeners.addEventListener(W,$)},se.prototype.removeEventListener=function(W,$){this.eventListeners.removeEventListener(W,$)},se.prototype.renderState=function(W){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(W),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.prototype.focus=function(){var W=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function($){return $(new mr(W))}))},se.prototype.blur=function(){var W=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function($){return $(new mr(W))}))},se.instanceCounter=0,se}();/* ********************************** 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 Ur=function(se,W){return(Ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ne){$.__proto__=ne}||function($,ne){for(var ce in ne)Object.prototype.hasOwnProperty.call(ne,ce)&&($[ce]=ne[ce])})(se,W)};function sn(se,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function $(){this.constructor=se}Ur(se,W),se.prototype=W===null?Object.create(W):($.prototype=W.prototype,new $)}function Rr(se,W,$,ne){return new($||($=Promise))(function(ce,oe){function Ke(vr){try{Vt(ne.next(vr))}catch(Pt){oe(Pt)}}function At(vr){try{Vt(ne.throw(vr))}catch(Pt){oe(Pt)}}function Vt(vr){var Pt;vr.done?ce(vr.value):(Pt=vr.value,Pt instanceof $?Pt:new $(function(Br){Br(Pt)})).then(Ke,At)}Vt((ne=ne.apply(se,W||[])).next())})}function mn(se,W){var $,ne,ce,oe,Ke={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[1]},trys:[],ops:[]};return oe={next:At(0),throw:At(1),return:At(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function At(Vt){return function(vr){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ne&&(ce=2&Pt[0]?ne.return:Pt[0]?ne.throw||((ce=ne.return)&&ce.call(ne),0):ne.next)&&!(ce=ce.call(ne,Pt[1])).done)return ce;switch(ne=0,ce&&(Pt=[2&Pt[0],ce.value]),Pt[0]){case 0:case 1:ce=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ne=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ce=Ke.trys,(ce=ce.length>0&&ce[ce.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ce||Pt[1]>ce[0]&&Pt[1]0&&$>0){var ne=new Gn(W,$),ce=ne.ratio>=1?20:ne.getHorizontalLength(20),oe=ne.ratio<1?20:ne.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var At=Gt.createDefs();Ke.appendChild(At);var Vt=Gt.createElement("clipPath",[["id","text-bg-clip"]]);At.appendChild(Vt);var vr=Gt.createPath(Gt.getHollowRectanglePath((24-ce)/2,(24-oe)/2,ce,oe,(24-ce)/2+2,(24-oe)/2+2,ce-4,oe-4));Ke.appendChild(vr);var Pt=Gt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pt.appendChild(Gt.createTSpan(W+":"+$)),Ke.appendChild(Pt);var Br=Pt.getBBox();Gt.setAttributes(Pt,[["x",((24-Br.width)/2).toString()],["y",((24-Br.height)/2-Br.y).toString()]]);var jr=Gt.createPath(Gt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Br.width))/2,(24-Math.ceil(Br.height))/2,Math.ceil(Br.width),Math.ceil(Br.height)));return Vt.appendChild(jr),Gt.setAttributes(vr,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return''},se}(),Vn=function(se){function W($,ne,ce){var oe=se.call(this,$,ne)||this;return oe.isDropdownOpen=!1,oe.onClick=oe.dropdownButtonClicked,oe.dropdownButtons=ce,oe}return sn(W,se),W.prototype.setupDropdown=function(){var $=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ne){ne.className=$.className,ne.colorsClassName=$.colorsClassName,$.dropdownBlock.appendChild(ne.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},W.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},W.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},W.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},W.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},W.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},W}(hn),Yr=function(){function se(W,$){this.GRIP_SIZE=10,this.color=W,this.fillColor=$,this.visual=Gt.createGroup(),this.visual.appendChild(Gt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Gt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},se.prototype.setCenter=function(W,$){this.visual.childNodes.forEach(function(ne){return Gt.setAttributes(ne,[["cx",W.toString()],["cy",$.toString()]])})},se}(),Un=function(){function se(W,$,ne,ce){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=W,this.canvasHeight=$,this.margin=ne,this.container=ce,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(se.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(W){this._aspectRatio=W,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(W){this._isGridVisible=W,this.gridContainer&&Gt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(W){this._zoomFactor=W,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),se.prototype.open=function(){var W=this;this.cropShadeElement=Gt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Gt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var $=0;$this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-$.height/2),Gt.setAttributes(this.cropRectElement,[["x",$.x.toString()],["y",$.y.toString()],["width",$.width.toString()],["height",$.height.toString()]]);var ne=$.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(oe,Ke){var At=$.y+ne*(Ke+1);Gt.setAttributes(oe,[["x1",""+$.x],["y1",""+At],["x2",""+($.x+$.width)],["y2",""+At]])});var ce=$.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(oe,Ke){var At=$.x+ce*(Ke+1);Gt.setAttributes(oe,[["x1",""+At],["y1",""+$.y],["x2",""+At],["y2",""+($.y+$.height)]])}),Gt.setAttributes(this.cropShadeElement,[["d",Gt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,$.x,$.y,$.width,$.height)]]),this.topLeftGrip.setCenter($.x,$.y),this.topRightGrip.setCenter($.x+$.width,$.y),this.bottomLeftGrip.setCenter($.x,$.y+$.height),this.bottomRightGrip.setCenter($.x+$.width,$.y+$.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},se.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)},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.container.getBoundingClientRect();return{x:W-ne.left+this.margin,y:$-ne.top+this.margin}},se.prototype.onPointerDown=function(W){this.container.setPointerCapture(W.pointerId),this.previousPoint=this.clientToLocalCoordinates(W.clientX,W.clientY),this.cropRectElement===W.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(W.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(W.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(W.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(W.target)&&(this.activeGrip=this.bottomRightGrip)},se.prototype.onPointerMove=function(W){if(this.isMoving)this.move(this.clientToLocalCoordinates(W.clientX,W.clientY));else if(this.activeGrip){var $=this.clientToLocalCoordinates(W.clientX,W.clientY);this.resize($)}W.preventDefault()},se.prototype.onPointerUp=function(W){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(W.pointerId)},se.prototype.move=function(W){var $=W.x-this.previousPoint.x,ne=W.y-this.previousPoint.y;this.zoomFactor!==1&&($=-$/this.zoomFactor,ne=-ne/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+$),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ne),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=W},se.prototype.resize=function(W){var $=Object.assign({},this.cropRect),ne=W.x-this.previousPoint.x,ce=W.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:$.x+nethis.canvasWidth*this.zoomFactor&&(ne=this.canvasWidth*this.zoomFactor-$.width),$.width+=ne}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?($.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ne),$.height=this.aspectRatio.getVerticalLength($.width)):($.y+=ce,$.height=this.cropRect.y+this.cropRect.height-$.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?$.height=this.aspectRatio.getVerticalLength($.width):$.height+=ce}$.width<10&&($.x=this.cropRect.x,$.width=10),$.height<10&&($.y=this.cropRect.y,$.height=10),this.previousPoint=W,$.x>=this.margin&&$.y>=this.margin&&$.x-this.margin+$.width<=this.canvasWidth&&$.y-this.margin+$.height<=this.canvasHeight&&(this.cropRect=$,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},se.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var W=this.cropRect.x+this.cropRect.width/2,$=this.cropRect.y+this.cropRect.height/2,ne=this.aspectRatio.getHorizontalLength(this.cropRect.height),ce=this.aspectRatio.getVerticalLength(this.cropRect.width);ne/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=W-this.cropRect.width/2,this.cropRect.y=$-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},se.prototype.getRescaledRect=function(W,$,ne,ce,oe,Ke){var At=ne/W,Vt=ce/$;return{x:(oe.x-Ke)*At+Ke,y:(oe.y-Ke)*Vt+Ke,width:oe.width*At,height:oe.height*Vt}},se.prototype.scaleCanvas=function(W,$){var ne=this.getRescaledRect(this.canvasWidth,this.canvasHeight,W,$,this.cropRect,this.margin);this.canvasWidth=W,this.canvasHeight=$,this.onCropChange&&this.onCropChange(ne),this.setCropRectangle(ne)},se}(),ui=function(){function se(W){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=W,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(se.prototype,"angle",{get:function(){return this._angle},set:function(W){this._angle=W,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),se.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},se.prototype.onPointerDown=function(W){this.controlContainer.setPointerCapture(W.pointerId),this.isDragging=!0,this.previousPoint={x:W.clientX,y:W.clientY}},se.prototype.onPointerMove=function(W){this.isDragging&&(this.onAngleChange&&this.onAngleChange((W.clientX-this.previousPoint.x)/5),this.previousPoint.x=W.clientX)},se.prototype.onPointerUp=function(W){this.isDragging&&this.onAngleChange&&this.onAngleChange((W.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(W.pointerId)},se.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var W=this.angleLabelText.getBBox();Gt.setAttributes(this.angleLabelElement,[["x",((this.width-W.width)/2).toString()],["y",(this.height/2).toString()]])}},se.prototype.positionScaleShape=function(){if(this.scaleShape){var W=this.scaleShape.transform.baseVal.getItem(0);W.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(W,0)}},se.prototype.getVisual=function(){var W=document.createElementNS("http://www.w3.org/2000/svg","svg");W.setAttribute("xmlns","http://www.w3.org/2000/svg"),W.setAttribute("width",this.width+"px"),W.setAttribute("height",this.height+"px"),W.setAttribute("viewBox","0 0 "+this.width+" "+this.height),W.style.flexShrink="0",document.body.appendChild(W);for(var $="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ne=1;ne<=this.width/5+10;ne++){var ce=ne%5==0?this.height/3:this.height/6;$+="h4v"+-ce+"h1v"+ce}$+="v1H0Z",this.scaleShape=Gt.createPath($);var oe=Gt.createTransform();this.scaleShape.transform.baseVal.appendItem(oe),W.appendChild(this.scaleShape),this.angleLabelElement=Gt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Gt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Gt.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),W.appendChild(this.angleLabelElement),document.body.removeChild(W),W},se}(),ci=function(){function se(){this.naturalSize=!1,this.imageType="image/png"}return se.prototype.rasterize=function(W,$,ne,ce,oe,Ke,At){var Vt=this;return new Promise(function(vr){var Pt=document.createElement("canvas");Pt.width=W.width.baseVal.value-2*ce,Pt.height=W.height.baseVal.value-2*ce;var Br=1,jr=1;Vt.naturalSize===!0?(Br=$.naturalWidth/(W.width.baseVal.value-2*ce)/Ke,jr=$.naturalHeight/(W.height.baseVal.value-2*ce)/At,Pt.width=$.naturalWidth/Ke,Pt.height=$.naturalHeight/At):Vt.width!==void 0&&Vt.height!==void 0&&(Br=Vt.width/ne.width,jr=Vt.height/ne.height,Pt.width*=Br,Pt.height*=jr);var fn=Pt.getContext("2d");fn.translate(Pt.width/2,Pt.height/2),fn.rotate(oe*Math.PI/180),fn.scale(Ke,At),fn.translate(-Pt.width/2,-Pt.height/2),fn.drawImage($,0,0,Pt.width,Pt.height);var ti=document.createElement("canvas");ti.width=ne.width*Br,ti.height=ne.height*jr,ti.getContext("2d").putImageData(fn.getImageData((ne.x-ce)*Br,(ne.y-ce)*jr,ne.width*Br,ne.height*jr),0,0),vr(ti.toDataURL(Vt.imageType,Vt.imageQuality))})},se}(),jt=function(){function se(W){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=se.instanceCounter++,this.styles=new Cn(this.instanceNo),this.target=W,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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(W){this._zoomToCropEnabled=W,W?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(W){this._isGridVisible=W,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"gridLines",{get:function(){return this._gridLines},set:function(W){this._gridLines=W,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(W){this._rotationAngle=W,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"aspectRatio",{get:function(){var W;return(W=this._aspectRatio)!==null&&W!==void 0?W:this.aspectRatios[0]},set:function(W){this._aspectRatio=W},enumerable:!1,configurable:!0}),se.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},se.prototype.show=function(){this.showUI(),this.open()},se.prototype.close=function(W){W===void 0&&(W=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),W||this.closeEventListeners.forEach(function($){return $()}),this._isOpen=!1)},se.prototype.addRenderEventListener=function(W){this.renderEventListeners.push(W)},se.prototype.removeRenderEventListener=function(W){this.renderEventListeners.indexOf(W)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(W),1)},se.prototype.addCloseEventListener=function(W){this.closeEventListeners.push(W)},se.prototype.removeCloseEventListener=function(W){this.closeEventListeners.indexOf(W)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(W),1)},se.prototype.setupResizeObserver=function(){var W=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){W.resize(W.target.clientWidth,W.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))},se.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var W=1*this.target.clientWidth/this.target.clientHeight,$=this.contentDiv.clientWidth/W>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*W:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ne=$+2*this.CANVAS_MARGINW+this.CANVAS_MARGIN?this.target.offsetTop-(W+this.CANVAS_MARGIN):0;this.coverDiv.style.top=$+"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},se.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},se.prototype.addTopToolbar=function(){var W=this;this.topToolbar=new xn,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 $=new Ti;$.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock($);var ne=[];this.aspectRatios.forEach(function(jr){var fn=new hn(pi.getIcon(jr.horizontal,jr.vertical),jr.horizontal===0&&jr.vertical===0?"FREE":jr.horizontal+":"+jr.vertical);fn.onClick=function(){return W.ratioButtonClicked(jr)},ne.push(fn)}),this.aspectRatioButton=new Vn(pi.getIcon(0,0),"Aspect ratio",ne),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,$.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ce=new hn('',"Toggle grid");ce.isActive=this.isGridVisible,ce.onClick=function(){W.isGridVisible=!W.isGridVisible,ce.isActive=W.isGridVisible},$.addButton(ce);var oe=new hn('',"Zoom to selection");if(oe.isActive=this.zoomToCropEnabled,oe.onClick=function(){W.zoomToCropEnabled=!W.zoomToCropEnabled,oe.isActive=W.zoomToCropEnabled},$.addButton(oe),!vn.isLicensed){var Ke=new cr;this.topToolbar.addElementBlock(Ke);var At=document.createElement("div");At.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Vt=document.createElement("a");Vt.style.color="currentColor",Vt.href="https://markerjs.com/products/cropro",Vt.target="_blank",Vt.innerHTML='',At.appendChild(Vt),Ke.addElement(At)}var vr=new Ti;vr.minWidth=3*this.toolbarHeight+"px",vr.contentAlign="end",this.topToolbar.addButtonBlock(vr);var Pt=new hn('',"OK");Pt.onClick=this.startRenderAndClose,vr.addButton(Pt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Br=new hn('',"Close");Br.onClick=this.close,vr.addButton(Br),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Br.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},se.prototype.addBottomToolbar=function(){var W=this;this.bottomToolbar=new xn,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 $=new Ti;$.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock($);var ne=new hn('',"Rotate left");ne.onClick=this.rotateLeftButtonClicked,$.addButton(ne);var ce=new hn('',"Rotate right");ce.onClick=this.rotateRightButtonClicked,$.addButton(ce);var oe=new cr;oe.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(oe),this.straightener=new ui("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(vr){W.rotateBy(vr),W.straightener.angle=W.rotationAngle},oe.addElement(this.straightener.getUI());var Ke=new Ti;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var At=new hn('',"Flip horizontal");At.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(At);var Vt=new hn('',"Flip vertical");Vt.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Vt)},se.prototype.ratioButtonClicked=function(W){this.aspectRatio=W,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},se.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=pi.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},se.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Gn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},se.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},se.prototype.restoreState=function(W){if(W){var $=this.cropLayer.getRescaledRect(W.width,W.height,this.imageWidth,this.imageHeight,W.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle($),this.cropRectChanged($),this.flippedHorizontally=W.flippedHorizontally,this.flippedVertically=W.flippedVertically,this.applyFlip(),this.rotationAngle=W.rotationAngle,this.applyRotation()}},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.cropImage.getBoundingClientRect();return{x:W-ne.left,y:$-ne.top}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var W=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=W+"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()},se.prototype.rotateLeftButtonClicked=function(){var W=this.rotationAngle-90;this.rotationAngle%90!=0&&(W+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(W)},se.prototype.rotateRightButtonClicked=function(){var W=this.rotationAngle+90;this.rotationAngle%90!=0&&(W-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(W)},se.prototype.rotateTo=function(W){W=(W=W>180?W-360:W)<=-180?W+360:W,this.rotationAngle=W,this.applyRotation()},se.prototype.rotateBy=function(W){this.rotateTo((this.rotationAngle+W)%360)},se.prototype.applyRotation=function(){var W=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var $=this.editingTargetRotationContainer.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem($,0);var ne=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ne.width,this.imageHeight/ne.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=W},se.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},se.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},se.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},se.prototype.startRenderAndClose=function(){return Rr(this,void 0,void 0,function(){var W,$;return mn(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return W=ne.sent(),$=this.getState(),this.renderEventListeners.forEach(function(ce){return ce(W,$)}),this.close(!0),[2]}})})},se.prototype.render=function(){return Rr(this,void 0,void 0,function(){var W;return mn(this,function($){switch($.label){case 0:return(W=new ci).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.width=this.renderWidth,W.height=this.renderHeight,this.unzoomFromCrop(),Gt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,W.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 $.sent(),[4,W.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,$.sent()]}})})},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new Sn("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var W=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Sn("toolbar_button",` display: inline-block; width: `+(this.toolbarHeight-2*W)+`px; height: `+(this.toolbarHeight-2*W)+`px; padding: `+W+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Sn("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Sn("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new yn("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new yn("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_straightener",` display: flex; overflow: hidden; justify-content: center; height: `+(this.toolbarHeight-2*W)+`px; padding: `+W+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Sn("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},se.instanceCounter=0,se}(),_r=L("8hTe"),ai=L.n(_r),Oi=/]*>/g;function Ai(se){var W=document.createElement("div");return W.innerHTML=se,W.childNodes.length===0?"":W.childNodes[0].nodeValue}var Ri=Z.a=function(se){var W=se.value,$=W===void 0?"":W,ne=se.edit,ce=ne===void 0?!1:ne,oe=se.className,Ke=se.showTextOnly,At=se.showLines,Vt=se.replaces,vr=se.zoomImg,Pt=se.hasMask,Br=se.style,jr=Br===void 0?{}:Br,fn=se.stylesPrev,ti=fn===void 0?{}:fn,mi=String($),Rn=Object(s.useRef)(),Li=Object(s.useRef)(),qi=Object(s.useState)(""),Qn=Object(C.a)(qi,2),_i=Qn[0],vi=Qn[1],Fi=Object(s.useState)("office"),gi=Object(C.a)(Fi,2),Gi=gi[0],Mi=gi[1],oa=function(){var pt=new jt(Li.current);pt.displayMode="popup",pt.addRenderEventListener(function(){var _t=Object(p.a)(l.a.mark(function Mt(Dt){var Ht;return l.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return Rn.current.style.display="none",ct.next=3,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt}});case 3:Ht=ct.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 5:case"end":return ct.stop()}},Mt)}));return function(Mt){return _t.apply(this,arguments)}}()),pt.show()},sa=function(){var pt=new Xr(Li.current);pt.settings.displayMode="popup",pt.addEventListener("render",function(){var _t=Object(p.a)(l.a.mark(function Mt(Dt){var Ht;return l.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(Rn.current.style.display="none",!Li.current){ct.next=6;break}return ct.next=4,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt.dataUrl}});case 4:Ht=ct.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 6:case"end":return ct.stop()}},Mt)}));return function(Mt){return _t.apply(this,arguments)}}()),pt.show(),window.markerArea=pt},Ii=Object(s.useMemo)(function(){try{var tt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,pt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_t=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;mi=mi.replace(tt,"("+ae.a.API_SERVER+"/api/attachments/").replace(pt,'"'+ae.a.API_SERVER+"/api/attachments/").replace(_t,'"'+ae.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,` `),mi=mi.replace(new RegExp("(?[TOC]

    ",k()),S()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,function(Wt,ct){var Ot=Dt[ct],Rt=Ot.type,fr=Ot.expression;return Object(he.renderToString)(Ai(fr)||"",{displayMode:Rt==="block",throwOnError:!1,output:"html"})}),Mt=Mt.replace(/▁/g,"\u2581\u2581\u2581"),N(),Ke){var Ht=document.createElement("div");return Ht.innerHTML=Mt,Ht.innerText}return setTimeout(function(){return ta()},500),Mt},[mi]),Xn=Object(s.useRef)();x.WebkitLineClamp=At,At&&(jr=Object(u.a)(Object(u.a)({},jr),x));function Vi(tt){var pt=tt.target;if(pt.tagName.toUpperCase()==="IMG"){if(vr){var _t=pt.getAttribute("src");vi(_t),Mi("image")}}else if(pt.tagName.toUpperCase()==="A"){var Mt=pt.getAttribute("href");if(Mt.indexOf("office")>-1)tt.preventDefault(),vi(Mt),Mi("office");else if(Mt.indexOf("application/pdf")>-1)tt.preventDefault(),vi(Mt),Mi("pdf");else if(Mt.indexOf("type=text")>-1)tt.preventDefault(),vi(Mt),Mi("html");else if(Mt.startsWith("#")){tt.preventDefault();var Dt=document.getElementById(Mt.replace("#",""));Dt&&Dt.scrollIntoView(!0)}}}var ta=function(){var pt,_t=(pt=Xn.current)===null||pt===void 0?void 0:pt.querySelectorAll("video");_t==null||_t.forEach(function(Mt){if(Mt.oncontextmenu=function(){return!1},Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var Dt=new V.a;Dt.loadSource(Mt.src),Dt.attachMedia(Mt)}}})};Object(s.useEffect)(function(){if(Xn.current&&Ii&&(Ii.match(Oi)&&window.PR.prettyPrint()),Xn.current)return Xn.current.addEventListener("click",Vi),function(){Xn.current.removeEventListener("click",Vi),N(),S()}},[Ii,Xn.current,Vi]);var Ct=function(pt){if(!ce)return;pt.target.nodeName==="IMG"?(Rn.current.style.display="flex",Rn.current.style.width=pt.target.clientWidth+"px",Rn.current.style.height=pt.target.clientHeight+"px",Rn.current.style.top=pt.target.offsetTop+"px",Rn.current.style.left=pt.target.offsetLeft+"px",Li.current.src=pt.target.getAttribute("src")):Rn.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:Xn,style:Object(u.a)({},jr),className:"".concat(oe||""," markdown-body ").concat(ai.a.mdBody),onMouseOver:Ct,dangerouslySetInnerHTML:{__html:Ii}}),n.a.createElement("div",{ref:Rn,className:ai.a.button},n.a.createElement(d.a,null,n.a.createElement(D.a,{onClick:function(){return oa()}},"\u88C1\u526A"),n.a.createElement(D.a,{onClick:function(){return sa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Li,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(pe.a,{close:!0,data:_i,hasMask:Pt,type:_i!=null&&_i.length?Gi:"",style:Object(u.a)({},ti),onClose:function(){return vi("")}}))}},"9OqN":function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.CTR=function(){var d=P.lib.BlockCipherMode.extend(),T=d.Encryptor=d.extend({processBlock:function(D,u){var p=this._cipher,C=p.blockSize,E=this._iv,l=this._counter;E&&(l=this._counter=E.slice(0),this._iv=void 0);var s=l.slice(0);p.encryptBlock(s,0),l[C-1]=l[C-1]+1|0;for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(P.a)())return null;var s=document.createElement("style");if((E=l.csp)===null||E===void 0?void 0:E.nonce){var n;s.nonce=(n=l.csp)===null||n===void 0?void 0:n.nonce}s.innerHTML=C;var h=T(l),f=h.firstChild;return l.prepend&&h.prepend?h.prepend(s):l.prepend&&f?h.insertBefore(s,f):h.appendChild(s),s}var u=new Map;function p(C,E){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=T(l);if(!u.has(s)){var n=D("",l),h=n.parentNode;u.set(s,h),h.removeChild(n)}var f=Array.from(u.get(s).children).find(function(i){return i.tagName==="STYLE"&&i[d]===E});if(f){var c,m;if(((c=l.csp)===null||c===void 0?void 0:c.nonce)&&f.nonce!==((m=l.csp)===null||m===void 0?void 0:m.nonce)){var _;f.nonce=(_=l.csp)===null||_===void 0?void 0:_.nonce}return f.innerHTML!==C&&(f.innerHTML=C),f}var y=D(C,l);return y[d]=E,y}},Bd2K:function(j,Z,L){(function(P){P(L("VrN/"),L("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(l,s,n){if(n!=P.Init&&n&&l.removeKeyMap("autoCloseTags"),!s)return;var h={name:"autoCloseTags"};(typeof s!="object"||s.whenClosing!==!1)&&(h["'/'"]=function(f){return p(f)}),(typeof s!="object"||s.whenOpening!==!1)&&(h["'>'"]=function(f){return D(f)}),l.addKeyMap(h)});var d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["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 D(l){if(l.getOption("disableInput"))return P.Pass;for(var s=l.listSelections(),n=[],h=l.getOption("autoCloseTags"),f=0;fc.ch&&(a=a.slice(0,a.length-m.end+c.ch));var o=a.toLowerCase();if(!a||m.type=="string"&&(m.end!=c.ch||!/[\"\']/.test(m.string.charAt(m.string.length-1))||m.string.length==1)||m.type=="tag"&&i.close||m.string.indexOf("/")==c.ch-m.start-1||S&&C(S,o)>-1||E(l,_.mode.xmlCurrentContext&&_.mode.xmlCurrentContext(y)||[],a,c,!0))return P.Pass;var k=typeof h=="object"&&h.emptyTags;if(k&&C(k,a)>-1){n[f]={text:"/>",newPos:P.Pos(c.line,c.ch+2)};continue}var O=x&&C(x,o)>-1;n[f]={indent:O,text:">"+(O?` `:"")+"",newPos:O?P.Pos(c.line+1,0):P.Pos(c.line,c.ch+1)}}for(var b=typeof h=="object"&&h.dontIndentOnAutoClose,f=s.length-1;f>=0;f--){var v=n[f];l.replaceRange(v.text,s[f].head,s[f].anchor,"+insert");var g=l.listSelections().slice(0);g[f]={head:v.newPos,anchor:v.newPos},l.setSelections(g),!b&&v.indent&&(l.indentLine(v.newPos.line,null,!0),l.indentLine(v.newPos.line+1,null,!0))}}function u(l,s){for(var n=l.listSelections(),h=[],f=s?"/":""&&(S+=">"),h[_]=S}if(l.replaceSelections(h),n=l.listSelections(),!m)for(var _=0;_=0&&s[y]==n;y--)++_;h=m.to;for(var y=1;y<_;y++){var i=P.scanForClosingTag(l,h,null,c);if(!i||i.tag!=n)return!1;h=i.to}return!0}})},BjJ7:function(j,Z,L){"use strict";L.d(Z,"d",function(){return d}),L.d(Z,"c",function(){return T}),L.d(Z,"e",function(){return D}),L.d(Z,"b",function(){return u}),L.d(Z,"a",function(){return C});var P=L("m3rI");function d(E){var l=!0;if(E.length>0){for(var s=0;s1&&arguments[1]!==void 0?arguments[1]:"",s=[],n=0;nUe.length)&&(Me=Ue.length);for(var Ne=0,xe=new Array(Me);Ne=Ue.length?{done:!0}:{done:!1,value:Ue[xe++]}}}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 Ne=Ue[Symbol.iterator](),Ne.next.bind(Ne)}function p(Ue,Me){return Me={exports:{}},Ue(Me,Me.exports),Me.exports}var C=p(function(Ue){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 Ne(xe){Ue.exports.defaults=xe}Ue.exports={defaults:Me(),getDefaults:Me,changeDefaults:Ne}}),E=C.defaults,l=C.getDefaults,s=C.changeDefaults,n=/[&<>"']/,h=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,m={"&":"&","<":"<",">":">",'"':""","'":"'"},_=function(Me){return m[Me]};function y(Ue,Me){if(Me){if(n.test(Ue))return Ue.replace(h,_)}else if(f.test(Ue))return Ue.replace(c,_);return Ue}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Ue){return Ue.replace(i,function(Me,Ne){return Ne=Ne.toLowerCase(),Ne==="colon"?":":Ne.charAt(0)==="#"?Ne.charAt(1)==="x"?String.fromCharCode(parseInt(Ne.substring(2),16)):String.fromCharCode(+Ne.substring(1)):""})}var t=/(^|[^\[])\^/g;function S(Ue,Me){Ue=Ue.source||Ue,Me=Me||"";var Ne={replace:function(Se,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(t,"$1"),Ue=Ue.replace(Se,Ae),Ne},getRegex:function(){return new RegExp(Ue,Me)}};return Ne}var x=/[^\w:]/g,o=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ue,Me,Ne){if(Ue){var xe;try{xe=decodeURIComponent(a(Ne)).replace(x,"").toLowerCase()}catch(Se){return null}if(xe.indexOf("javascript:")===0||xe.indexOf("vbscript:")===0||xe.indexOf("data:")===0)return null}Me&&!o.test(Ne)&&(Ne=w(Me,Ne));try{Ne=encodeURI(Ne).replace(/%25/g,"%")}catch(Se){return null}return Ne}var O={},b=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(Ue,Me){O[" "+Ue]||(b.test(Ue)?O[" "+Ue]=Ue+"/":O[" "+Ue]=G(Ue,"/",!0)),Ue=O[" "+Ue];var Ne=Ue.indexOf(":")===-1;return Me.substring(0,2)==="//"?Ne?Me:Ue.replace(v,"$1")+Me:Me.charAt(0)==="/"?Ne?Me:Ue.replace(g,"$1")+Me:Ue+Me}var M={exec:function(){}};function N(Ue){for(var Me=1,Ne,xe;Me=0&&Je[gt]==="\\";)Ve=!Ve;return Ve?"|":" |"}),xe=Ne.split(/ \|/),Se=0;if(xe.length>Me)xe.splice(Me);else for(;xe.length=xe.length?Se.slice(xe.length):Se}).join(` `)}var ke=function(){function Ue(Ne){this.options=Ne||U}var Me=Ue.prototype;return Me.space=function(xe){var Se=this.rules.block.newline.exec(xe);if(Se)return Se[0].length>1?{type:"space",raw:Se[0]}:{raw:` `}},Me.code=function(xe,Se){var Ae=this.rules.block.code.exec(xe);if(Ae){var Le=Se[Se.length-1];if(Le&&Le.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var Je=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?Je:B(Je,` `)}}},Me.fences=function(xe){var Se=this.rules.block.fences.exec(xe);if(Se){var Ae=Se[0],Le=Re(Ae,Se[3]||"");return{type:"code",raw:Ae,lang:Se[2]?Se[2].trim():Se[2],text:Le}}},Me.heading=function(xe){var Se=this.rules.block.heading.exec(xe);if(Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},Me.nptable=function(xe){var Se=this.rules.block.nptable.exec(xe);if(Se){var Ae={type:"table",header:V(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(` `):[],raw:Se[0]};if(Ae.header.length===Ae.align.length){var Le=Ae.align.length,Je;for(Je=0;Je ?/gm,"");return{type:"blockquote",raw:Se[0],text:Ae}}},Me.list=function(xe){var Se=this.rules.block.list.exec(xe);if(Se){for(var Ae=Se[0],Le=Se[2],Je=Le.length>1,Ve=Le[Le.length-1]===")",gt={type:"list",raw:Ae,ordered:Je,start:Je?+Le.slice(0,-1):"",loose:!1,items:[]},yt=Se[0].match(this.rules.block.item),Bt=!1,Nt,mr,hr,St,$r,Xr,Ur,sn=yt.length,Rr=0;Rr1||this.options.smartLists&&hr!==Le)&&(St=yt.slice(Rr+1).join(` `),gt.raw=gt.raw.substring(0,gt.raw.length-St.length),Rr=sn-1)),$r=Bt||/\n\n(?!\s*$)/.test(Nt),Rr!==sn-1&&(Bt=Nt.charAt(Nt.length-1)===` `,$r||($r=Bt)),$r&&(gt.loose=!0),Xr=/^\[[ xX]\] /.test(Nt),Ur=void 0,Xr&&(Ur=Nt[1]!==" ",Nt=Nt.replace(/^\[[ xX]\] +/,"")),gt.items.push({type:"list_item",raw:Ae,task:Xr,checked:Ur,loose:$r,text:Nt});return gt}},Me.html=function(xe){var Se=this.rules.block.html.exec(xe);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]):ae(Se[0]):Se[0]}},Me.def=function(xe){var Se=this.rules.block.def.exec(xe);if(Se){Se[3]&&(Se[3]=Se[3].substring(1,Se[3].length-1));var Ae=Se[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:Se[0],href:Se[2],title:Se[3]}}},Me.table=function(xe){var Se=this.rules.block.table.exec(xe);if(Se){var Ae={type:"table",header:V(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(` `):[]};if(Ae.header.length===Ae.align.length){Ae.raw=Se[0];var Le=Ae.align.length,Je;for(Je=0;Je/i.test(Le[0])&&(Se=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(Le[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Le[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:Le[0],inLink:Se,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ae(Le[0]):Le[0]}},Me.link=function(xe){var Se=this.rules.inline.link.exec(xe);if(Se){var Ae=he(Se[2],"()");if(Ae>-1){var Le=Se[0].indexOf("!")===0?5:4,Je=Le+Se[1].length+Ae;Se[2]=Se[2].substring(0,Ae),Se[0]=Se[0].substring(0,Je).trim(),Se[3]=""}var Ve=Se[2],gt="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ve);yt?(Ve=yt[1],gt=yt[3]):gt=""}else gt=Se[3]?Se[3].slice(1,-1):"";Ve=Ve.trim().replace(/^<([\s\S]*)>$/,"$1");var Bt=pe(Se,{href:Ve&&Ve.replace(this.rules.inline._escapes,"$1"),title:gt&>.replace(this.rules.inline._escapes,"$1")},Se[0]);return Bt}},Me.reflink=function(xe,Se){var Ae;if((Ae=this.rules.inline.reflink.exec(xe))||(Ae=this.rules.inline.nolink.exec(xe))){var Le=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(Le=Se[Le.toLowerCase()],!Le||!Le.href){var Je=Ae[0].charAt(0);return{type:"text",raw:Je,text:Je}}var Ve=pe(Ae,Le,Ae[0]);return Ve}},Me.strong=function(xe,Se,Ae){Ae===void 0&&(Ae="");var Le=this.rules.inline.strong.start.exec(xe);if(Le&&(!Le[1]||Le[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Se=Se.slice(-1*xe.length);var Je=Le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Je.lastIndex=0;for(var Ve;(Le=Je.exec(Se))!=null;)if(Ve=this.rules.inline.strong.middle.exec(Se.slice(0,Le.index+3)),Ve)return{type:"strong",raw:xe.slice(0,Ve[0].length),text:xe.slice(2,Ve[0].length-2)}}},Me.em=function(xe,Se,Ae){Ae===void 0&&(Ae="");var Le=this.rules.inline.em.start.exec(xe);if(Le&&(!Le[1]||Le[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Se=Se.slice(-1*xe.length);var Je=Le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Je.lastIndex=0;for(var Ve;(Le=Je.exec(Se))!=null;)if(Ve=this.rules.inline.em.middle.exec(Se.slice(0,Le.index+2)),Ve)return{type:"em",raw:xe.slice(0,Ve[0].length),text:xe.slice(1,Ve[0].length-1)}}},Me.codespan=function(xe){var Se=this.rules.inline.code.exec(xe);if(Se){var Ae=Se[2].replace(/\n/g," "),Le=/[^ ]/.test(Ae),Je=Ae.startsWith(" ")&&Ae.endsWith(" ");return Le&&Je&&(Ae=Ae.substring(1,Ae.length-1)),Ae=ae(Ae,!0),{type:"codespan",raw:Se[0],text:Ae}}},Me.br=function(xe){var Se=this.rules.inline.br.exec(xe);if(Se)return{type:"br",raw:Se[0]}},Me.del=function(xe){var Se=this.rules.inline.del.exec(xe);if(Se)return{type:"del",raw:Se[0],text:Se[1]}},Me.autolink=function(xe,Se){var Ae=this.rules.inline.autolink.exec(xe);if(Ae){var Le,Je;return Ae[2]==="@"?(Le=ae(this.options.mangle?Se(Ae[1]):Ae[1]),Je="mailto:"+Le):(Le=ae(Ae[1]),Je=Le),{type:"link",raw:Ae[0],text:Le,href:Je,tokens:[{type:"text",raw:Le,text:Le}]}}},Me.url=function(xe,Se){var Ae;if(Ae=this.rules.inline.url.exec(xe)){var Le,Je;if(Ae[2]==="@")Le=ae(this.options.mangle?Se(Ae[0]):Ae[0]),Je="mailto:"+Le;else{var Ve;do Ve=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(Ve!==Ae[0]);Le=ae(Ae[0]),Ae[1]==="www."?Je="http://"+Le:Je=Le}return{type:"link",raw:Ae[0],text:Le,href:Je,tokens:[{type:"text",raw:Le,text:Le}]}}},Me.inlineText=function(xe,Se,Ae){var Le=this.rules.inline.text.exec(xe);if(Le){var Je;return Se?Je=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ae(Le[0]):Le[0]:Je=ae(this.options.smartypants?Ae(Le[0]):Le[0]),{type:"text",raw:Le[0],text:Je}}},Ue}(),ve=K.noopTest,Te=K.edit,be=K.merge,ue={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ve,table:ve,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ue._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ue.def=Te(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex(),ue.bullet=/(?:[*+-]|\d{1,9}[.)])/,ue.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ue.item=Te(ue.item,"gm").replace(/bull/g,ue.bullet).getRegex(),ue.list=Te(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex(),ue._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",ue._comment=//,ue.html=Te(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue.paragraph=Te(ue._paragraph).replace("hr",ue.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",")|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.blockquote=Te(ue.blockquote).replace("paragraph",ue.paragraph).getRegex(),ue.normal=be({},ue),ue.gfm=be({},ue.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*|$)"}),ue.gfm.nptable=Te(ue.gfm.nptable).replace("hr",ue.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",")|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.gfm.table=Te(ue.gfm.table).replace("hr",ue.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",")|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.pedantic=be({},ue.normal,{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ve,paragraph:Te(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ve,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ve,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",le.punctuation=Te(le.punctuation).replace(/punctuation/g,le._punctuation).getRegex(),le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",le.em.start=Te(le.em.start).replace(/punctuation/g,le._punctuation).getRegex(),le.em.middle=Te(le.em.middle).replace(/punctuation/g,le._punctuation).replace(/overlapSkip/g,le._overlapSkip).getRegex(),le.em.endAst=Te(le.em.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.em.endUnd=Te(le.em.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.start=Te(le.strong.start).replace(/punctuation/g,le._punctuation).getRegex(),le.strong.middle=Te(le.strong.middle).replace(/punctuation/g,le._punctuation).replace(/blockSkip/g,le._blockSkip).getRegex(),le.strong.endAst=Te(le.strong.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.endUnd=Te(le.strong.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.blockSkip=Te(le._blockSkip,"g").getRegex(),le.overlapSkip=Te(le._overlapSkip,"g").getRegex(),le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,le._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])?)+(?![-_])/,le.autolink=Te(le.autolink).replace("scheme",le._scheme).replace("email",le._email).getRegex(),le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,le.tag=Te(le.tag).replace("comment",ue._comment).replace("attribute",le._attribute).getRegex(),le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,le.link=Te(le.link).replace("label",le._label).replace("href",le._href).replace("title",le._title).getRegex(),le.reflink=Te(le.reflink).replace("label",le._label).getRegex(),le.reflinkSearch=Te(le.reflinkSearch,"g").replace("reflink",le.reflink).replace("nolink",le.nolink).getRegex(),le.normal=be({},le),le.pedantic=be({},le.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:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",le._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",le._label).getRegex()}),le.gfm=be({},le.normal,{escape:Te(le.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(xe="x"+xe.toString(16)),Me+="&#"+xe+";";return Me}var J=function(){function Ue(Ne){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ne||fe,this.options.tokenizer=this.options.tokenizer||new ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var xe={block:q.normal,inline:ee.normal};this.options.pedantic?(xe.block=q.pedantic,xe.inline=ee.pedantic):this.options.gfm&&(xe.block=q.gfm,this.options.breaks?xe.inline=ee.breaks:xe.inline=ee.gfm),this.tokenizer.rules=xe}Ue.lex=function(xe,Se){var Ae=new Ue(Se);return Ae.lex(xe)};var Me=Ue.prototype;return Me.lex=function(xe){return xe=xe.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(xe,this.tokens,!0),this.inline(this.tokens),this.tokens},Me.blockTokens=function(xe,Se,Ae){Se===void 0&&(Se=[]),Ae===void 0&&(Ae=!0),xe=xe.replace(/^ +$/gm,"");for(var Le,Je,Ve,gt;xe;){if(Le=this.tokenizer.space(xe)){xe=xe.substring(Le.raw.length),Le.type&&Se.push(Le);continue}if(Le=this.tokenizer.code(xe,Se)){xe=xe.substring(Le.raw.length),Le.type?Se.push(Le):(gt=Se[Se.length-1],gt.raw+=` `+Le.raw,gt.text+=` `+Le.text);continue}if(Le=this.tokenizer.fences(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.heading(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.nptable(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.hr(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.blockquote(xe)){xe=xe.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],Ae),Se.push(Le);continue}if(Le=this.tokenizer.list(xe)){for(xe=xe.substring(Le.raw.length),Ve=Le.items.length,Je=0;Je0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(gt))!=null;)Bt.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(gt=gt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(gt))!=null;)gt=gt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;xe;){if(Ve=this.tokenizer.escape(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.tag(xe,Ae,Le)){xe=xe.substring(Ve.raw.length),Ae=Ve.inLink,Le=Ve.inRawBlock,Se.push(Ve);continue}if(Ve=this.tokenizer.link(xe)){xe=xe.substring(Ve.raw.length),Ve.type==="link"&&(Ve.tokens=this.inlineTokens(Ve.text,[],!0,Le)),Se.push(Ve);continue}if(Ve=this.tokenizer.reflink(xe,this.tokens.links)){xe=xe.substring(Ve.raw.length),Ve.type==="link"&&(Ve.tokens=this.inlineTokens(Ve.text,[],!0,Le)),Se.push(Ve);continue}if(Ve=this.tokenizer.strong(xe,gt,Je)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.em(xe,gt,Je)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.codespan(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.br(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.del(xe)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.autolink(xe,te)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(!Ae&&(Ve=this.tokenizer.url(xe,te))){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.inlineText(xe,Le,Ce)){xe=xe.substring(Ve.raw.length),Je=Ve.raw.slice(-1),Se.push(Ve);continue}if(xe){var Nt="Infinite loop on byte: "+xe.charCodeAt(0);if(this.options.silent){console.error(Nt);break}else throw new Error(Nt)}}return Se},d(Ue,null,[{key:"rules",get:function(){return{block:q,inline:ee}}}]),Ue}(),X=C.defaults,Q=K.cleanUrl,Ee=K.escape,ge=function(){function Ue(Ne){this.options=Ne||X}var Me=Ue.prototype;return Me.code=function(xe,Se,Ae){var Le=(Se||"").match(/\S*/)[0];if(this.options.highlight){var Je=this.options.highlight(xe,Le);Je!=null&&Je!==xe&&(Ae=!0,xe=Je)}return Le?'
    '+(Ae?xe:Ee(xe,!0))+`
    `:"
    "+(Ae?xe:Ee(xe,!0))+`
    `},Me.blockquote=function(xe){return`
    `+xe+`
    `},Me.html=function(xe){return xe},Me.heading=function(xe,Se,Ae,Le){return this.options.headerIds?"'+xe+" `:""+xe+" `},Me.hr=function(){return this.options.xhtml?`
    `:`
    `},Me.list=function(xe,Se,Ae){var Le=Se?"ol":"ul",Je=Se&&Ae!==1?' start="'+Ae+'"':"";return"<"+Le+Je+`> `+xe+" `},Me.listitem=function(xe){return"
  • "+xe+`
  • `},Me.checkbox=function(xe){return" "},Me.paragraph=function(xe){return"

    "+xe+`

    `},Me.table=function(xe,Se){return Se&&(Se=""+Se+""),` `+xe+` `+Se+`
    `},Me.tablerow=function(xe){return` `+xe+` `},Me.tablecell=function(xe,Se){var Ae=Se.header?"th":"td",Le=Se.align?"<"+Ae+' align="'+Se.align+'">':"<"+Ae+">";return Le+xe+" `},Me.strong=function(xe){return""+xe+""},Me.em=function(xe){return""+xe+""},Me.codespan=function(xe){return""+xe+""},Me.br=function(){return this.options.xhtml?"
    ":"
    "},Me.del=function(xe){return""+xe+""},Me.link=function(xe,Se,Ae){if(xe=Q(this.options.sanitize,this.options.baseUrl,xe),xe===null)return Ae;var Le='",Le},Me.image=function(xe,Se,Ae){if(xe=Q(this.options.sanitize,this.options.baseUrl,xe),xe===null)return Ae;var Le=''+Ae+'":">",Le},Me.text=function(xe){return xe},Ue}(),Oe=function(){function Ue(){}var Me=Ue.prototype;return Me.strong=function(xe){return xe},Me.em=function(xe){return xe},Me.codespan=function(xe){return xe},Me.del=function(xe){return xe},Me.html=function(xe){return xe},Me.text=function(xe){return xe},Me.link=function(xe,Se,Ae){return""+Ae},Me.image=function(xe,Se,Ae){return""+Ae},Me.br=function(){return""},Ue}(),Qe=function(){function Ue(){this.seen={}}var Me=Ue.prototype;return Me.slug=function(xe){var Se=xe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Se)){var Ae=Se;do this.seen[Ae]++,Se=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(Se))}return this.seen[Se]=0,Se},Ue}(),rt=C.defaults,nt=K.unescape,ut=function(){function Ue(Ne){this.options=Ne||rt,this.options.renderer=this.options.renderer||new ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Qe}Ue.parse=function(xe,Se){var Ae=new Ue(Se);return Ae.parse(xe)};var Me=Ue.prototype;return Me.parse=function(xe,Se){Se===void 0&&(Se=!0);var Ae="",Le,Je,Ve,gt,yt,Bt,Nt,mr,hr,St,$r,Xr,Ur,sn,Rr,mn,vn,Gt,Cn=xe.length;for(Le=0;Le0&&Rr.tokens[0].type==="text"?(Rr.tokens[0].text=Gt+" "+Rr.tokens[0].text,Rr.tokens[0].tokens&&Rr.tokens[0].tokens.length>0&&Rr.tokens[0].tokens[0].type==="text"&&(Rr.tokens[0].tokens[0].text=Gt+" "+Rr.tokens[0].tokens[0].text)):Rr.tokens.unshift({type:"text",text:Gt}):sn+=Gt),sn+=this.parse(Rr.tokens,Ur),hr+=this.renderer.listitem(sn,vn,mn);Ae+=this.renderer.list(hr,$r,Xr);continue}case"html":{Ae+=this.renderer.html(St.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(St.tokens));continue}case"text":{for(hr=St.tokens?this.parseInline(St.tokens):St.text;Le+1An error occurred:

    "+He(Ve.message+"",!0)+"
    ";throw Ve}}Ze.options=Ze.setOptions=function(Ue){return dt(Ze.defaults,Ue),at(Ze.defaults),Ze},Ze.getDefaults=De,Ze.defaults=ht,Ze.use=function(Ue){var Me=dt({},Ue);if(Ue.renderer&&function(){var xe=Ze.defaults.renderer||new ge,Se=function(Je){var Ve=xe[Je];xe[Je]=function(){for(var gt=arguments.length,yt=new Array(gt),Bt=0;Bt>>24)&16711935|(n[f]<<24|n[f]>>>8)&4278255360;var c=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],m=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var f=0;f<4;f++)s.call(this);for(var f=0;f<8;f++)m[f]^=c[f+4&7];if(h){var _=h.words,y=_[0],i=_[1],a=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,t=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,S=a>>>16|t&4294901760,x=t<<16|a&65535;m[0]^=a,m[1]^=S,m[2]^=t,m[3]^=x,m[4]^=a,m[5]^=S,m[6]^=t,m[7]^=x;for(var f=0;f<4;f++)s.call(this)}},_doProcessBlock:function(n,h){var f=this._X;s.call(this),p[0]=f[0]^f[5]>>>16^f[3]<<16,p[1]=f[2]^f[7]>>>16^f[5]<<16,p[2]=f[4]^f[1]>>>16^f[7]<<16,p[3]=f[6]^f[3]>>>16^f[1]<<16;for(var c=0;c<4;c++)p[c]=(p[c]<<8|p[c]>>>24)&16711935|(p[c]<<24|p[c]>>>8)&4278255360,n[h+c]^=p[c]},blockSize:128/32,ivSize:64/32});function s(){for(var n=this._X,h=this._C,f=0;f<8;f++)C[f]=h[f];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var f=0;f<8;f++){var c=n[f]+h[f],m=c&65535,_=c>>>16,y=((m*m>>>17)+m*_>>>15)+_*_,i=((c&4294901760)*c|0)+((c&65535)*c|0);E[f]=y^i}n[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,n[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,n[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,n[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,n[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,n[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,n[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,n[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}d.Rabbit=D._createHelper(l)}(),P.Rabbit})},ELLl:function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){var d={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=P.Pos;P.defineOption("autoCloseBrackets",!1,function(m,_,y){y&&y!=P.Init&&(m.removeKeyMap(u),m.state.closeBrackets=null),_&&(p(D(_,"pairs")),m.state.closeBrackets=_,m.addKeyMap(u))});function D(m,_){return _=="pairs"&&typeof m=="string"?m:typeof m=="object"&&m[_]!=null?m[_]:d[_]}var u={Backspace:l,Enter:s};function p(m){for(var _=0;_=0;a--){var S=i[a].head;m.replaceRange("",T(S.line,S.ch-1),T(S.line,S.ch+1),"+delete")}}function s(m){var _=E(m),y=_&&D(_,"explode");if(!y||m.getOption("disableInput"))return P.Pass;for(var i=m.listSelections(),a=0;a0;return{anchor:new T(m.anchor.line,m.anchor.ch+(_?-1:1)),head:new T(m.head.line,m.head.ch+(_?1:-1))}}function h(m,_){var y=E(m);if(!y||m.getOption("disableInput"))return P.Pass;var i=D(y,"pairs"),a=i.indexOf(_);if(a==-1)return P.Pass;for(var t=D(y,"closeBefore"),S=D(y,"triples"),x=i.charAt(a+1)==_,o=m.listSelections(),k=a%2==0,O,b=0;b=0&&m.getRange(g,T(g.line,g.ch+3))==_+_+_?w="skipThree":w="skip";else if(x&&g.ch>1&&S.indexOf(_)>=0&&m.getRange(T(g.line,g.ch-2),g)==_+_){if(g.ch>2&&/\bstring/.test(m.getTokenTypeAt(T(g.line,g.ch-2))))return P.Pass;w="addFour"}else if(x){var N=g.ch==0?" ":m.getRange(T(g.line,g.ch-1),g);if(!P.isWordChar(M)&&N!=_&&!P.isWordChar(N))w="both";else return P.Pass}else if(k&&(M.length===0||/\s/.test(M)||t.indexOf(M)>-1))w="both";else return P.Pass;if(!O)O=w;else if(O!=w)return P.Pass}var I=a%2?i.charAt(a-1):_,G=a%2?_:i.charAt(a+1);m.operation(function(){if(O=="skip")m.execCommand("goCharRight");else if(O=="skipThree")for(var z=0;z<3;z++)m.execCommand("goCharRight");else if(O=="surround"){for(var H=m.getSelections(),z=0;z>>24)&16711935|(O<<24|O>>>8)&4278255360}var b=this._hash.words,v=h.words,g=f.words,w=E.words,M=l.words,N=s.words,I=n.words,G,z,H,K,U,B,V,ae,he,pe;B=G=b[0],V=z=b[1],ae=H=b[2],he=K=b[3],pe=U=b[4];for(var Re,o=0;o<80;o+=1)Re=G+S[x+w[o]]|0,o<16?Re+=m(z,H,K)+v[0]:o<32?Re+=_(z,H,K)+v[1]:o<48?Re+=y(z,H,K)+v[2]:o<64?Re+=i(z,H,K)+v[3]:Re+=a(z,H,K)+v[4],Re=Re|0,Re=t(Re,N[o]),Re=Re+U|0,G=U,U=K,K=t(H,10),H=z,z=Re,Re=B+S[x+M[o]]|0,o<16?Re+=a(V,ae,he)+g[0]:o<32?Re+=i(V,ae,he)+g[1]:o<48?Re+=y(V,ae,he)+g[2]:o<64?Re+=_(V,ae,he)+g[3]:Re+=m(V,ae,he)+g[4],Re=Re|0,Re=t(Re,I[o]),Re=Re+pe|0,B=pe,pe=he,he=t(ae,10),ae=V,V=Re;Re=b[1]+H+he|0,b[1]=b[2]+K+pe|0,b[2]=b[3]+U+B|0,b[3]=b[4]+G+V|0,b[4]=b[0]+z+ae|0,b[0]=Re},_doFinalize:function(){var S=this._data,x=S.words,o=this._nDataBytes*8,k=S.sigBytes*8;x[k>>>5]|=128<<24-k%32,x[(k+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,S.sigBytes=(x.length+1)*4,this._process();for(var O=this._hash,b=O.words,v=0;v<5;v++){var g=b[v];b[v]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}return O},clone:function(){var S=p.clone.call(this);return S._hash=this._hash.clone(),S}});function m(S,x,o){return S^x^o}function _(S,x,o){return S&x|~S&o}function y(S,x,o){return(S|~x)^o}function i(S,x,o){return S&o|x&~o}function a(S,x,o){return S^(x|~o)}function t(S,x){return S<>>32-x}T.RIPEMD160=p._createHelper(c),T.HmacRIPEMD160=p._createHmacHelper(c)}(Math),P.RIPEMD160})},ETIr:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.enc,p=u.Base64={stringify:function(E){var l=E.words,s=E.sigBytes,n=this._map;E.clamp();for(var h=[],f=0;f>>2]>>>24-f%4*8&255,m=l[f+1>>>2]>>>24-(f+1)%4*8&255,_=l[f+2>>>2]>>>24-(f+2)%4*8&255,y=c<<16|m<<8|_,i=0;i<4&&f+i*.75>>6*(3-i)&63));var a=n.charAt(64);if(a)for(;h.length%4;)h.push(a);return h.join("")},parse:function(E){var l=E.length,s=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var h=0;h>>6-f%4*2,_=c|m;n[h>>>2]|=_<<24-h%4*8,h++}return D.create(n,h)}}(),P.enc.Base64})},"F+F2":function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var d=P,T=d.lib,D=T.WordArray,u=D.init,p=D.init=function(C){if(C instanceof ArrayBuffer&&(C=new Uint8Array(C)),(C instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&C instanceof Uint8ClampedArray||C instanceof Int16Array||C instanceof Uint16Array||C instanceof Int32Array||C instanceof Uint32Array||C instanceof Float32Array||C instanceof Float64Array)&&(C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength)),C instanceof Uint8Array){for(var E=C.byteLength,l=[],s=0;s>>2]|=C[s]<<24-s%4*8;u.call(this,l,E)}else u.apply(this,arguments)};p.prototype=D}(),P.lib.WordArray})},GRO8:function(j,Z,L){"use strict";L.r(Z);var P=L("k1fw"),d=L("2qtc"),T=L("kLXV"),D=L("lUTK"),u=L("BvKs"),p=L("+L6B"),C=L("2/Rp"),E=L("T2oS"),l=L("W9HT"),s=L("sPJy"),n=L("bE4q"),h=L("miYZ"),f=L("tsqr"),c=L("9og8"),m=L("tJVT"),_=L("PpiC"),y=L("WmNS"),i=L.n(y),a=L("q1tI"),t=L.n(a),S=L("Ty5D"),x=L("55Ip"),o=L("9kvl"),k=L("KeDT"),O=L.n(k),b=L("zrhs"),v=L("DZo9"),g=L("8z0m"),w=L("LtfV"),M=L("KhGG"),N=g.a.Dragger,I=function(tt){var pt=tt.user,_t=tt.dispatch,Mt=tt.classroomList,Dt=tt.shixunsDetail,Ht=tt.getResults,Wt=Object(S.i)(),ct=Object(a.useState)(),Ot=Object(m.a)(ct,2),Rt=Ot[0],fr=Ot[1],qt=Object(a.useState)([]),Qt=Object(m.a)(qt,2),Kt=Qt[0],tr=Qt[1],or=Object(a.useState)(!1),ot=Object(m.a)(or,2),Dr=ot[0],Ir=ot[1],yr={onRemove:function(){tr([])},beforeUpload:function(Et){if(console.log(Et),(Et==null?void 0:Et.size)>1024*1024*500)return f.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var wt=[];return wt.push(Et),tr([].concat(wt)),!1},fileList:Kt};return t.a.createElement(T.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Dt.actionTabs.key==="md-tab",confirmLoading:Dr,onOk:Object(c.a)(i.a.mark(function er(){var Et,wt,xt;return i.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:if(!((Kt==null?void 0:Kt.length)<=0)){ur.next=3;break}return f.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),ur.abrupt("return");case 3:return Ir(!0),ur.next=6,Object(M.c)(Kt[0],{login:(Et=pt.userInfo)===null||Et===void 0?void 0:Et.login,container_type:"Competition",container_id:Dt.actionTabs.params.id,stage_type:Dt.actionTabs.params.value,file_name:(wt=Kt[0])===null||wt===void 0?void 0:wt.name});case 6:xt=ur.sent,(xt==null?void 0:xt.status)===0?(f.b.info("\u63D0\u4EA4\u6210\u529F"),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Ir(!1),tr([]),Ht(Dt.actionTabs.params.value)):(Ir(!1),f.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return ur.stop()}},er)})),onCancel:function(){tr([]),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(N,yr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(w.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},G=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.classroomList,_t=Ct.shixunsDetail;return{user:tt,classroomList:pt,shixunsDetail:_t}})(I),z=L("14J3"),H=L("BMrR"),K=L("5NDa"),U=L("5rEg"),B=L("9Bee"),V=L("m3rI"),ae=L("ErOA"),he=L("NLgs"),pe=L("fV52"),Re=L("3I+P"),ke=L("OaEy"),ve=L("2fM7"),Te=L("5bA4"),be=L("UESt"),ue=ve.a.Option;function le(Ct){var tt=Ct.rewarddata,pt=Ct.getlistdatas,_t=Ct.is_signed,Mt=Ct.dispatch,Dt=Ct.userlist,Ht=Object(a.useRef)(null),Wt=Object(a.useState)(!1),ct=Object(m.a)(Wt,2),Ot=ct[0],Rt=ct[1],fr=Object(a.useState)(void 0),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)(""),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(void 0),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(void 0),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(void 0),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1];function et(gr){return ir.apply(this,arguments)}function ir(){return ir=Object(c.a)(i.a.mark(function gr(pr){var Or;return i.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(!pr.user_received){Jt.next=3;break}return window.open(pr.click_info),Jt.abrupt("return");case 3:if(Object(he.f)(Mt)){Jt.next=5;break}return Jt.abrupt("return");case 5:if(!(_t===!1)){Jt.next=8;break}return f.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Jt.abrupt("return");case 8:if(!(pr.click_event==="Pop")){Jt.next=14;break}return Dr(pr.id),Rt(!0),Jt.abrupt("return");case 14:Kt(void 0);case 15:return Jt.next=17,Mt({type:"competitions/Reward",payload:{competition_module_setting_id:pr.id}});case 17:Or=Jt.sent,Or&&Or.status===0&&(pt(),pr.click_event==="Link"?(f.b.info("\u9886\u53D6\u6210\u529F"),window.open(pr.click_info)):f.b.info(pr.click_info));case 19:case"end":return Jt.stop()}},gr)})),ir.apply(this,arguments)}function Lr(){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(Dt&&!Dt.real_name)){Ft.next=4;break}if(er){Ft.next=4;break}return f.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(Dt&&!Dt.email)){Ft.next=8;break}if($t){Ft.next=8;break}return f.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(Dt&&!Dt.phone)){Ft.next=12;break}if(Tr){Ft.next=12;break}return f.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(Qt){Ft.next=15;break}return f.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Ft.abrupt("return");case 15:return Ft.next=17,Mt({type:"competitions/Reward",payload:{competition_module_setting_id:ot,className:Qt,name:er,mail:$t,phone:Tr}});case 17:pr=Ft.sent,pr&&pr.status===0&&(Rt(!1),pt(),f.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return Ft.stop()}},gr)})),Jr.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(T.a,{visible:Ot,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return Rt(!1)},onOk:function(){Lr()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(U.a,{className:Dt&&Dt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.real_name||er,disabled:Dt&&Dt.real_name||!1,onChange:function(pr){return Et(pr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(U.a,{className:Dt&&Dt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.email||$t,disabled:Dt&&Dt.email||!1,onChange:function(pr){return ur(pr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(U.a,{style:{width:"300px"},className:Dt&&Dt.phone?"":"bkfff",value:Dt&&Dt.phone||Tr,disabled:Dt&&Dt.phone||!1,onChange:function(pr){return Zr(pr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(ve.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(pr){Kt(pr)}},t.a.createElement(ue,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ue,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ue,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ue,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ue,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ue,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ue,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ue,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ue,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ue,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ue,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ue,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ue,{value:"\u535A\u4E94"},"\u535A\u4E94")),t.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),tt&&tt.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){Ht.current.prev()}},t.a.createElement(Te.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(Re.a,{ref:Ht,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},tt&&tt.map(function(gr,pr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/".concat(gr.image_url)}),gr.user_received===!1||gr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return et(gr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:O.a.spannext,onClick:function(){Ht.current.next()}},t.a.createElement(be.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},tt&&tt.map(function(gr,pr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/".concat(gr.image_url)}),gr.user_received===!1||gr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return et(gr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var re=le,fe=function(tt,pt){var _t=tt.StaffDetail,Mt=tt.HeaderDetail,Dt=tt.ItemData,Ht=tt.setIssee,Wt=tt.ModelType,ct=tt.dispatch,Ot=tt.userinfo,Rt=tt.Editable,fr=Object(a.useState)(!1),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)([]),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(""),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(""),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(!1),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(S.i)(),ir=et.identifier,Lr=Object(a.useRef)(null),Jr=Object(a.useRef)(null);Lr.current=_t==null?void 0:_t.enrolled,Object(a.useEffect)(function(){var Ft;return(Ft=Jr.current)===null||Ft===void 0||Ft.addEventListener("click",gr),function(){var Jt;(Jt=Jr.current)===null||Jt===void 0||Jt.removeEventListener("click",gr)}},[]);var gr=function(Jt){var br;if((Jt==null||((br=Jt.target)===null||br===void 0)?void 0:br.id)==="modal-upload"){if(!Object(he.e)(ct))return;if(!Lr.current){T.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}Kt(!0)}};Object(a.useEffect)(function(){if(Mt!=null&&Mt.upload_file){var Ft,Jt,br;Dr([{name:Mt==null||((Ft=Mt.upload_file)===null||Ft===void 0)?void 0:Ft.title,status:"done",uid:"123456789"}]),ur(Mt==null?void 0:Mt.upload_file_url),Et(Mt==null||((Jt=Mt.upload_file)===null||Jt===void 0||((br=Jt.url)===null||br===void 0))?void 0:br.split("/")[3])}},[Mt==null?void 0:Mt.upload_file]);var pr={name:"file",multiple:!1,withCredentials:!0,action:V.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:ot,onChange:function(Jt){var br=Jt.file.status,Zt=[Object(P.a)({},Jt.file)];if(Dr(Zt),Jt.file.status==="uploading"&&Zr(!0),br==="done"){var vt,bt;Et((vt=Zt[0])===null||vt===void 0||((bt=vt.response)===null||bt===void 0)?void 0:bt.id),Zr(!1)}br==="error"&&(Dr([]),Zr(!1))},beforeUpload:function(Jt){var br=Jt.size/1024/1024<1e3;return br?Promise.resolve():(f.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Or=function(){Kt(!0)};return Object(a.useImperativeHandle)(pt,function(){return{handleVisible:Or}}),t.a.createElement("div",{ref:Jr},Wt==="reward"?t.a.createElement(re,{userlist:Ot,dispatch:ct,rewarddata:Dt.reward_setting,is_signed:Dt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((Ot==null?void 0:Ot.admin)||(Ot==null?void 0:Ot.business)||Rt)&&t.a.createElement(C.a,{onClick:function(){return Ht(!1)}},"\u7F16\u8F91")),t.a.createElement(B.a,{value:Dt.md_content}),Dt&&Dt.attachments&&Dt.attachments.map(function(Ft,Jt){return t.a.createElement("div",null,t.a.createElement("a",{href:(V.a===null||V.a===void 0?void 0:V.a.API_SERVER)+Ft.url,target:"_self",download:Ft.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},Ft.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Ft.filesize)))}),t.a.createElement(T.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Qt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Tr,onCancel:function(){return Kt(!1)},onOk:Object(c.a)(i.a.mark(function Ft(){var Jt;return i.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(!(!er&&!$t)){Zt.next=3;break}return Kt(!1),Zt.abrupt("return");case 3:return Zr(!0),Zt.next=6,Object(ae.a)("/api/competitions/".concat(ir,"/upload_file.json"),{method:"post",body:{attachment_id:er,upload_file_url:$t}});case 6:Jt=Zt.sent,Jt.status===0&&(Kt(!1),Zr(!1));case 8:case"end":return Zt.stop()}},Ft)}))},t.a.createElement("div",null,t.a.createElement(H.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(U.a,{style:{width:416},value:$t,onChange:function(Jt){var br;return ur((br=Jt.target)===null||br===void 0?void 0:br.value)}})),t.a.createElement(H.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(g.a,pr,t.a.createElement(C.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},q=Object(a.forwardRef)(fe),ee=L("Ot1p"),Ce=L("hJwl");function te(Ct){var tt=Ct.ItemData,pt=Ct.setIssee,_t=Ct.MenuItem,Mt=Ct.dispatch,Dt=Ct.identifier,Ht=Ct.ModelType,Wt=Ct.userinfo,ct=Ct.getrightdatas,Ot=Object(a.useState)([]),Rt=Object(m.a)(Ot,2),fr=Rt[0],qt=Rt[1],Qt=Object(a.useState)(tt.md_content),Kt=Object(m.a)(Qt,2),tr=Kt[0],or=Kt[1];Object(a.useEffect)(function(){var Et,wt=[];tt==null||((Et=tt.attachments)===null||Et===void 0)||Et.map(function(xt){var $t={uid:xt.id,name:xt.title,response:{id:xt.id}};wt.push($t)}),qt(wt)},[tt==null?void 0:tt.attachments]);function ot(){var Et,wt=[];return tt==null||((Et=tt.attachments)===null||Et===void 0)||Et.map(function(xt){var $t={uid:xt==null?void 0:xt.id,name:xt.title,response:{id:xt.id}};wt.push($t)}),wt}var Dr={name:"file",multiple:!0,withCredentials:!0,action:V.a.API_SERVER+"/api/attachments.json",defaultFileList:ot(),onRemove:function(wt){Object(Ce.t)({id:wt.uid})},onChange:function(wt){var xt=wt.file.status;xt!=="uploading",xt==="removed"&&qt(wt.fileList),xt==="done"?(qt(wt.fileList),f.b.success("".concat(wt.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):xt==="error"&&f.b.error("".concat(wt.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(wt){var xt=wt.size/1024/1024<150;return xt||f.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),xt}};console.log(Dr);function Ir(){return yr.apply(this,arguments)}function yr(){return yr=Object(c.a)(i.a.mark(function Et(){var wt;return i.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,Mt({type:"competitions/updateMdContent",payload:{attachment_ids:er(fr),competition_module_id:tt.id,md_content_id:tt.md_id,content:tr,identifier:Dt}});case 2:wt=$t.sent,wt&&(f.b.info("\u63D0\u4EA4\u6210\u529F"),pt(!0),ct(_t));case 4:case"end":return $t.stop()}},Et)})),yr.apply(this,arguments)}function er(Et){var wt=[];return Et&&Et.map(function(xt){wt.push(xt.response.id)}),wt}return t.a.createElement("div",null,Ht==="reward"?t.a.createElement(re,{userlist:Wt,dispatch:Mt,rewarddata:tt.reward_setting,is_signed:tt.is_signed}):null,t.a.createElement(ee.a,{defaultValue:tr,onChange:function(wt){return or(wt)}}),t.a.createElement(g.a,Dr,t.a.createElement(C.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Ir()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return pt(!0)}},"\u53D6\u6D88")))}var J=te,X=L("g9YV"),Q=L("wCAj"),Ee=L("Znn+"),ge=L("ZTPi");function Oe(){return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),t.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var Qe=Oe,rt=L("5Dmo"),nt=L("3S7+"),ut=L("jCWc"),dt=L("kPKH"),mt=L("IzEo"),He=L("bx4M");function De(Ct){var tt=Ct.oneItem,pt=Ct.towItem,_t=Ct.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(H.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(dt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(pt==null?void 0:pt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(pt==null?void 0:pt.user_image)}),(pt==null?void 0:pt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},pt==null?void 0:pt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},pt==null?void 0:pt.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},pt==null?void 0:pt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},pt==null?void 0:pt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(pt==null?void 0:pt.extra_score)+parseFloat(pt==null?void 0:pt.score),"\u5206"))),t.a.createElement(dt.a,{span:6},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(tt==null?void 0:tt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(tt==null?void 0:tt.user_image)}),(tt==null?void 0:tt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},tt==null?void 0:tt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},tt==null?void 0:tt.record_user_name)))),className:O.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},tt==null?void 0:tt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},tt==null?void 0:tt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(tt==null?void 0:tt.extra_score)+parseFloat(tt==null?void 0:tt.score),"\u5206"))),t.a.createElement(dt.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(_t==null?void 0:_t.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(_t==null?void 0:_t.user_image)}),(_t==null?void 0:_t.competition_prize)&&t.a.createElement("p",{className:O.a.prize},_t==null?void 0:_t.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},_t==null?void 0:_t.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},_t==null?void 0:_t.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},_t==null?void 0:_t.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(_t==null?void 0:_t.extra_score)+parseFloat(_t==null?void 0:_t.score),"\u5206")))))}var at=De;function ht(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct,Ot,Rt,fr,qt,Qt,Kt,tr,or,ot,Dr,Ir,yr,er,Et,wt,xt,$t,ur,sr,lr,Tr,Zr,et=Ct.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(at,{oneItem:et==null?void 0:et.teams[0],towItem:et==null?void 0:et.teams[1],threeItem:et==null?void 0:et.teams[2]}),(et==null||((tt=et.user_ranks)===null||tt===void 0)?void 0:tt.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(et==null||((pt=et.user_ranks)===null||pt===void 0||((_t=pt[0])===null||_t===void 0))?void 0:_t.success)===!1?t.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u664B\u7EA7\uFF1A",t.a.createElement("span",{style:{color:(et==null||((Mt=et.user_ranks)===null||Mt===void 0||((Dt=Mt[0])===null||Dt===void 0))?void 0:Dt.success)===!1?"red":"green"}},(et==null||((Ht=et.user_ranks)===null||Ht===void 0||((Wt=Ht[0])===null||Wt===void 0))?void 0:Wt.success)===!1?"\u5426":et!=null&&(ct=et.user_ranks)!==null&&ct!==void 0&&(Ot=ct[0])!==null&&Ot!==void 0&&Ot.success?"\u662F":"")),(et==null||((Rt=et.user_ranks)===null||Rt===void 0||((fr=Rt[0])===null||fr===void 0))?void 0:fr.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(et==null||((qt=et.user_ranks)===null||qt===void 0||((Qt=qt[0])===null||Qt===void 0))?void 0:Qt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(et==null||((Kt=et.user_ranks)===null||Kt===void 0||((tr=Kt[0])===null||tr===void 0))?void 0:tr.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",et==null||((or=et.user_ranks)===null||or===void 0||((ot=or[0])===null||ot===void 0))?void 0:ot.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},et==null||((Dr=et.user_ranks)===null||Dr===void 0||((Ir=Dr[0])===null||Ir===void 0))?void 0:Ir.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u65F6\u95F4"},et==null||((yr=et.user_ranks)===null||yr===void 0||((er=yr[0])===null||er===void 0))?void 0:er.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},et==null||((Et=et.user_ranks)===null||Et===void 0||((wt=Et[0])===null||wt===void 0))?void 0:wt.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},et==null||((xt=et.user_ranks)===null||xt===void 0||(($t=xt[0])===null||$t===void 0))?void 0:$t.score)),t.a.createElement("span",null,t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(et==null||((ur=et.user_ranks)===null||ur===void 0||((sr=ur[0])===null||sr===void 0))?void 0:sr.extra_score)+parseFloat(et==null||((lr=et.user_ranks)===null||lr===void 0||((Tr=lr[0])===null||Tr===void 0))?void 0:Tr.score)||0))),et==null||((Zr=et.teams)===null||Zr===void 0)?void 0:Zr.map(function(ir,Lr){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Lr+1),t.a.createElement(x.a,{to:"/users/".concat(ir==null?void 0:ir.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(ir==null?void 0:ir.user_image)}),(ir==null?void 0:ir.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},ir==null?void 0:ir.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},ir==null?void 0:ir.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},ir.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},ir.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},ir.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(ir.extra_score)+parseFloat(ir.score))))}))}var Ze=ht,st=ge.a.TabPane;function Ue(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.ChartRules,ct=Ct.ItemData,Ot=Ct.getCharts,Rt=Ct.Selectkey,fr=Ct.getChartRules,qt=Ct.userinfo,Qt=Ct.Editable,Kt=Ct.HeaderDetail,tr=Object(a.useState)(!1),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(""),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(!0),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(a.useState)(),ir=Object(m.a)(et,2),Lr=ir[0],Jr=ir[1],gr=Object(S.i)(),pr=gr.identifier;Object(a.useEffect)(function(){if($t){var br,Zt=Wt==null||((br=Wt.stages)===null||br===void 0)?void 0:br[0];if(Zr(Zt),Zt!=null&&Zt.id){var vt,bt,zt;((Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog")&&Ot(Zt==null?void 0:Zt.id),Et(((vt=Wt.rule_contents)===null||vt===void 0||((bt=vt.filter(function(an){return parseInt(an.competition_stage_id)===parseInt(Zt==null?void 0:Zt.id)}))===null||bt===void 0||((zt=bt[0])===null||zt===void 0))?void 0:zt.content)||"")}else{var Lt,kr,rn;(Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog",Et(((Lt=Wt.rule_contents)===null||Lt===void 0||((kr=Lt.filter(function(an){return parseInt(an.competition_stage_id)===0}))===null||kr===void 0||((rn=kr[0])===null||rn===void 0))?void 0:rn.content)||"")}}},[Wt]);function Or(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(c.a)(i.a.mark(function br(){var Zt,vt,bt,zt,Lt,kr,rn,an,Ar;return i.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(er){Nr.next=3;break}return f.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Nr.abrupt("return");case 3:if(ur(!1),Zt=Tr==null?void 0:Tr.id,!Zt){Nr.next=12;break}return Nr.next=8,Object(ae.a)("/api/competitions/".concat(pr,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:er,md_content_id:(vt=Wt.rule_contents)===null||vt===void 0||((bt=vt.filter(function(un){return parseInt(un.competition_stage_id)===parseInt(Zt)}))===null||bt===void 0||((zt=bt[0])===null||zt===void 0))?void 0:zt.id,stage_id:Tr==null?void 0:Tr.id}});case 8:Lt=Nr.sent,Lt.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),Dr(!1),fr()),Nr.next=16;break;case 12:return Nr.next=14,Object(ae.a)("/api/competitions/".concat(pr,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:er,md_content_id:(kr=Wt.rule_contents)===null||kr===void 0||((rn=kr.filter(function(un){return parseInt(un.competition_stage_id)===0}))===null||rn===void 0||((an=rn[0])===null||an===void 0))?void 0:an.id,stage_id:Tr==null?void 0:Tr.id}});case 14:Ar=Nr.sent,Ar.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),Dr(!1),fr());case 16:case"end":return Nr.stop()}},br)})),Ft.apply(this,arguments)}var Jt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(Zt,vt,bt){return t.a.createElement("span",null,bt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(Zt){return t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(Zt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(Zt){return t.a.createElement("span",{title:Zt},Zt&&(Zt==null?void 0:Zt.length)>=15?(Zt==null?void 0:Zt.substr(0,15))+"...":Zt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(Zt){return t.a.createElement("span",null,Zt||"--")}},{title:(Kt==null?void 0:Kt.task)==="mAP"?"mAP\u6307\u6807":(Kt==null?void 0:Kt.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(Zt){return t.a.createElement("span",null,Zt||"--")}}];return t.a.createElement("div",null,(Wt==null||((tt=Wt.stages)===null||tt===void 0)?void 0:tt.length)>0?null:t.a.createElement(Qe,null),(Wt==null||((pt=Wt.stages)===null||pt===void 0)?void 0:pt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:((qt==null?void 0:qt.admin)||(qt==null?void 0:qt.business)||Qt)&&t.a.createElement(C.a,{onClick:function(){Dr(!0)}},"\u7F16\u8F91"),onChange:function(Zt){var vt,bt,zt,Lt,kr;Dr(!1);var rn=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt.filter(function(Ar){return parseInt(Zt)===parseInt(Ar==null?void 0:Ar.id)})[0];Zr(rn);var an=rn==null||((bt=rn.children)===null||bt===void 0)?void 0:bt[0];Jr(an),Et(((zt=Wt.rule_contents)===null||zt===void 0||((Lt=zt.filter(function(Ar){return parseInt(Ar.competition_stage_id)===parseInt(rn==null?void 0:rn.id)}))===null||Lt===void 0||((kr=Lt[0])===null||kr===void 0))?void 0:kr.content)||""),Ot((an==null?void 0:an.id)||Zt)}},Wt&&Wt.stages.map(function(br,Zt){return t.a.createElement(st,{tab:br.name,key:br.id===null?0:br.id},ot===!1&&Wt&&Wt.rule_contents.map(function(vt,bt){if(br.id===vt.competition_stage_id)return t.a.createElement(B.a,{key:bt,value:vt.content===void 0||vt.content===null?"":vt.content});if(br.id===null&&vt.competition_stage_id===0)return t.a.createElement(B.a,{key:bt,value:vt.content===void 0||vt.content===null?"":vt.content})}))})),(Tr==null||((_t=Tr.children)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{activeKey:(Lr==null?void 0:Lr.id)+"",onChange:function(Zt){var vt,bt=Tr==null||((vt=Tr.children)===null||vt===void 0)?void 0:vt.filter(function(zt){return parseInt(Zt)===parseInt(zt==null?void 0:zt.id)})[0];Jr(bt),Ot(Zt)}},Tr==null||((Mt=Tr.children)===null||Mt===void 0)?void 0:Mt.map(function(br,Zt){return t.a.createElement(st,{tab:br.name,key:br.id===null?0:br.id})})),ot&&t.a.createElement("div",null,t.a.createElement(ee.a,{defaultValue:er,onChange:function(Zt){Et(Zt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Or()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Dr(!1)}},"\u53D6\u6D88"))),(ct==null||((Dt=ct.teams)===null||Dt===void 0)?void 0:Dt.length)>0&&((Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog"||(Kt==null?void 0:Kt.task)==="Jittor-3")?t.a.createElement(Q.a,{dataSource:ct==null?void 0:ct.teams,columns:Jt,pagination:!1}):(ct==null||((Ht=ct.teams)===null||Ht===void 0)?void 0:Ht.length)>0&&t.a.createElement(Ze,{ItemData:ct}))}var Me=Ue,Ne=L("/zsF"),xe=L("PArb");function Se(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct=Ct.Prize,Ot=Object(S.i)(),Rt=Object(a.useState)([{type:1,name:"\u56E2\u4F53\u5956\u8BC1\u4E66"},{type:2,name:"\u4E2A\u4EBA\u5956\u8BC1\u4E66"},{type:3,name:"\u4F18\u79C0\u6307\u5BFC\u6559\u5E08\u8BC1\u4E66"}]),fr=Object(m.a)(Rt,2),qt=fr[0],Qt=fr[1],Kt=function(){var tr=Object(c.a)(i.a.mark(function or(ot){var Dr;return i.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return yr.next=2,Object(Ce.u)({type:ot.type,id:Ot.identifier});case 2:Dr=yr.sent,(Dr==null?void 0:Dr.status)===0&&(location.href="/competitions/exports?id=".concat(Ot.identifier,"&type=").concat(ot.type));case 4:case"end":return yr.stop()}},or)}));return function(ot){return tr.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),t.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ct==null||((tt=ct.personal_certifications)===null||tt===void 0)?void 0:tt.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:V.a.API_SERVER+"".concat(ct==null||((pt=ct.personal_certifications[0])===null||pt===void 0)?void 0:pt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),t.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ct==null||((_t=ct.team_certifications)===null||_t===void 0)?void 0:_t.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:V.a.API_SERVER+"".concat(ct==null||((Mt=ct.team_certifications[0])===null||Mt===void 0)?void 0:Mt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),t.a.createElement(xe.a,null),(ct==null||((Dt=ct.teams)===null||Dt===void 0)?void 0:Dt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(ct==null?void 0:ct.teams)&&(ct==null||((Ht=ct.teams[0])===null||Ht===void 0)?void 0:Ht.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),t.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},t.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),t.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),t.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ct==null?void 0:ct.teams)&&(ct==null||((Wt=ct.teams[0])===null||Wt===void 0)?void 0:Wt.team_members.map(function(tr,or){var ot,Dr,Ir,yr,er,Et;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},tr==null?void 0:tr.role),t.a.createElement("span",{style:{width:"5%"}},tr==null?void 0:tr.name),t.a.createElement("span",{style:{width:"10%"}},(tr==null?void 0:tr.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(tr==null?void 0:tr.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(tr==null?void 0:tr.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(tr==null?void 0:tr.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},tr!=null&&tr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},tr!=null&&tr.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(tr==null?void 0:tr.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ct==null?void 0:ct.teams)&&(ct==null||((ot=ct.teams[0])===null||ot===void 0||((Dr=ot.bank_account)===null||Dr===void 0))?void 0:Dr.bank),(ct==null?void 0:ct.teams)&&(ct==null||((Ir=ct.teams[0])===null||Ir===void 0||((yr=Ir.bank_account)===null||yr===void 0))?void 0:yr.second_bank),(ct==null?void 0:ct.teams)&&(ct==null||((er=ct.teams[0])===null||er===void 0||((Et=er.bank_account)===null||Et===void 0))?void 0:Et.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(H.a,{gutter:[20,20]},qt.map(function(tr,or){return t.a.createElement(dt.a,{key:or},t.a.createElement(C.a,{type:"primary",onClick:function(){return Kt(tr)}},tr.name))})))}var Ae=Se,Le=L("0Owb"),Je=L("7Kak"),Ve=L("9yH6"),gt=L("y8nQ"),yt=L("Vl3Y"),Bt=L("1vsH"),Nt=L("Dgm7"),mr=L.n(Nt),hr=L("NnUe"),St=L.n(hr),$r=g.a.Dragger,Xr=10,Ur=function(tt){var pt=tt.user,_t=tt.account,Mt=tt.globalSetting,Dt=tt.loading,Ht=tt.dispatch,Wt=Object(_.a)(tt,["user","account","globalSetting","loading","dispatch"]),ct=yt.a.useForm(),Ot=Object(m.a)(ct,1),Rt=Ot[0],fr=Object(a.useState)({}),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)(!0),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(a.useState)(),ir=Object(m.a)(et,2),Lr=ir[0],Jr=ir[1];Object(a.useEffect)(function(){if(!_t.basicInfo)return;var Zt=_t.basicInfo,vt={name:Zt.show_realname?Zt.name:Object(Bt.F)(Zt.name),gender:Zt.gender};Et(Zt.name),Dr(Zt.show_realname),Rt.setFieldsValue(vt),Kt(vt)},[_t.basicInfo]);var gr=function(vt){if(vt.file.status==="uploading"){Jr(!0);return}if(vt.file.status==="done"){var bt;console.log(vt.file,vt.file.response),Zr((bt=vt.file.response)===null||bt===void 0?void 0:bt.id),Object(Bt.C)(vt.file.originFileObj,function(zt){ur(zt),Jr(!1)})}},pr=function(vt){Kt(Object(P.a)({},Rt.getFieldsValue())),"name"in vt&&Et(vt.name)},Or=function(){var vt=!ot;Dr(vt);var bt=vt?er:Object(Bt.F)(er);Rt.setFieldsValue({name:bt})},Ft=function(){var Zt=Object(c.a)(i.a.mark(function vt(bt){var zt,Lt,kr,rn,an,Ar,qr,Nr;return i.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(kr=bt||{},rn=kr.name,an=kr.gender,Ar=kr.idNumber,$t){zr.next=4;break}return f.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),zr.abrupt("return");case 4:return zr.next=6,Ht({type:"account/applyRealNameAuth",payload:{id:((zt=_t.basicInfo)===null||zt===void 0?void 0:zt.id)||((Lt=pt.userInfo)===null||Lt===void 0?void 0:Lt.login),name:rn,gender:an,id_number:Ar,show_realname:ot,attachment_ids:[Tr]}});case 6:qr=zr.sent,Jt(),qr&&(f.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Ht({type:"account/getBasicInfo",payload:{login:(Nr=pt.userInfo)===null||Nr===void 0?void 0:Nr.login}}));case 9:case"end":return zr.stop()}},vt)}));return function(bt){return Zt.apply(this,arguments)}}(),Jt=function(){Ht({type:"account/setActionTabs",payload:{}})},br={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(V.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:gr,beforeUpload:function(vt){var bt=vt.type==="image/jpeg"||vt.type==="image/png"||vt.type==="image/jpg"||vt.type==="image/bmp";return bt||f.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),bt}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:_t.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(l.a,{spinning:!!Lr},t.a.createElement(yt.a,{className:St.a.formWrap,form:Rt,layout:"horizontal",onValuesChange:pr,onFinish:Ft},t.a.createElement(yt.a.Item,{label:"\u59D3\u540D",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Xr,"\u4E2A\u5B57\u7B26")},{validator:Bt.I}],extra:t.a.createElement("span",null,ot?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},t.a.createElement(U.a,{disabled:!ot,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Xr,"\u4E2A\u5B57\u7B26"),maxLength:Xr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(ot?"icon-xianshi":"icon-yincang"," font18 ").concat(St.a.color0152d9),onClick:Or})})),t.a.createElement(yt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},t.a.createElement(Ve.a.Group,null,t.a.createElement(Ve.a,{value:0},"\u7537"),t.a.createElement(Ve.a,{value:1},"\u5973"))),t.a.createElement(yt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(yt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:mr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement($r,Object(Le.a)({},br,{accept:".png,.jpg,.bmp,.jpeg"}),$t?t.a.createElement("img",{src:$t,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:Jt},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Dt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),t.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},sn=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.account,_t=Ct.loading,Mt=Ct.globalSetting;return{user:tt,account:pt,globalSetting:Mt,loading:_t.effects}})(Ur),Rr=L("O3gP"),mn=L("lrIw"),vn=L("KXlV"),Gt=L.n(vn),Cn=L("Sjjz"),yn=L.n(Cn),Sn=U.a.TextArea,xn=function(tt){var pt=tt.account,_t=tt.globalSetting,Mt=tt.loading,Dt=tt.dispatch,Ht=tt.schoolName,Wt=tt.departmentName,ct=tt.visible,Ot=tt.onClose,Rt=Ot===void 0?function(){}:Ot,fr=tt.onSuccess,qt=fr===void 0?function(){}:fr,Qt=Object(_.a)(tt,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),Kt=yt.a.useForm(),tr=Object(m.a)(Kt,1),or=tr[0],ot=Object(a.useRef)();Object(a.useEffect)(function(){ot.current=Qt.schoolId},[Qt.schoolId]),Object(a.useEffect)(function(){or.setFieldsValue({department:Wt})},[Wt]);var Dr=function(){var Ir=Object(c.a)(i.a.mark(function yr(er){var Et,wt,xt,$t;return i.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return Et=er||{},wt=Et.department,xt=Et.remarks,sr.next=3,Dt({type:"account/appplyDepartment",payload:{school_id:ot.current,name:wt,remarks:xt}});case 3:$t=sr.sent,Rt(),$t&&(f.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),qt(wt));case 6:case"end":return sr.stop()}},yr)}));return function(er){return Ir.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ct,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(yt.a,{className:yn.a.formWrap,form:or,labelCol:{span:4},wrapperCol:{span:20},onFinish:Dr},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Ht),t.a.createElement(yt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(Sn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:yn.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:function(){Rt()}},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Mt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},xi=Object(o.a)(function(Ct){var tt=Ct.account,pt=Ct.loading,_t=Ct.globalSetting;return{account:tt,globalSetting:_t,loading:pt.effects}})(xn),Ti=L("6UJt"),hn=L("DFOY"),cr=L("jO45"),Gn=L("jN4g"),pi=L("gJ3r"),Vn=L("jwmR"),Yr=L.n(Vn),Un=function(tt,pt){return pt.some(function(_t){return _t.label.toLowerCase().indexOf(tt.toLowerCase())>-1})},ui=U.a.TextArea,ci=function(tt){var pt=tt.account,_t=tt.globalSetting,Mt=tt.loading,Dt=tt.dispatch,Ht=tt.schoolName,Wt=tt.visible,ct=tt.onClose,Ot=ct===void 0?function(){}:ct,Rt=tt.onSuccess,fr=Rt===void 0?function(){}:Rt,qt=Object(_.a)(tt,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Qt=yt.a.useForm(),Kt=Object(m.a)(Qt,1),tr=Kt[0];Object(a.useEffect)(function(){tr.setFieldsValue({name:Ht})},[Ht]);var or=function(){var ot=Object(c.a)(i.a.mark(function Dr(Ir){var yr,er,Et,wt,xt,$t,ur;return i.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return yr=Ir||{},er=yr.name,Et=yr.city,wt=Et===void 0?[]:Et,xt=yr.address,$t=yr.remarks,lr.next=3,Dt({type:"account/appplySchool",payload:{name:er,province:wt[0],city:wt[1],address:xt,remarks:$t}});case 3:ur=lr.sent,Ot(),ur&&(f.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),fr(er));case 6:case"end":return lr.stop()}},Dr)}));return function(Ir){return ot.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Wt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(yt.a,{className:Yr.a.formWrap,form:tr,labelCol:{span:4},wrapperCol:{span:20},onFinish:or},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},t.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(Yr.a.flexRow," ").concat(Yr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:Yr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(cr.a,{style:{color:"rgb(82, 196, 26)"}}),t.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),t.a.createElement("div",null,t.a.createElement(Gn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(yt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(hn.a,{allowClear:!0,size:"large",options:pi.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Un}})),t.a.createElement(yt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(ui,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Yr.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:function(){Ot()}},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Mt["account/appplySchool"]},"\u4FDD\u5B58")))))},jt=Object(o.a)(function(Ct){var tt=Ct.account,pt=Ct.loading,_t=Ct.globalSetting;return{account:tt,globalSetting:_t,loading:pt.effects}})(ci),_r=ve.a.Option,ai=g.a.Dragger,Oi=function(tt){var pt,_t,Mt=tt.user,Dt=tt.account,Ht=tt.globalSetting,Wt=tt.loading,ct=tt.dispatch,Ot=tt.Scoid,Rt=Object(_.a)(tt,["user","account","globalSetting","loading","dispatch","Scoid"]),fr=yt.a.useForm(),qt=Object(m.a)(fr,1),Qt=qt[0],Kt=Object(a.useState)({}),tr=Object(m.a)(Kt,2),or=tr[0],ot=tr[1],Dr=Object(a.useState)([]),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)([]),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)([]),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)([]),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(a.useState)(),Jt=Object(m.a)(Ft,2),br=Jt[0],Zt=Jt[1],vt=Object(a.useState)(),bt=Object(m.a)(vt,2),zt=bt[0],Lt=bt[1],kr=Object(a.useState)(),rn=Object(m.a)(kr,2),an=rn[0],Ar=rn[1],qr=Object(a.useState)(),Nr=Object(m.a)(qr,2),un=Nr[0],zr=Nr[1];Object(a.useEffect)(function(){cn()},[]),Object(a.useEffect)(function(){Object(c.a)(i.a.mark(function Xe(){var We;return i.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(Ot){ft.next=2;break}return ft.abrupt("return");case 2:return ft.next=4,$n(Ot);case 4:We=ft.sent,Tr(We==null?void 0:We.departments);case 6:case"end":return ft.stop()}},Xe)}))()},[Ot]);var cn=function(){var Xe=Object(c.a)(i.a.mark(function We(){var qe;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,ct({type:"account/getSchoolOption"});case 2:qe=kt.sent,er(qe==null?void 0:qe.schools);case 4:case"end":return kt.stop()}},We)}));return function(){return Xe.apply(this,arguments)}}(),$n=function(We){return ct({type:"account/getDepartmentOption",payload:{id:We}})};Object(a.useEffect)(function(){if(!Dt.basicInfo)return;var Xe=Dt.basicInfo,We={identity:Xe.identity,school:Xe.school_name,department:Xe.department_name,studentNo:Xe.student_id,jobTitle:Xe.identity=="teacher"?Xe.technical_title:"\u6559\u6388",manager:Xe.identity=="professional"?Xe.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Qt.setFieldsValue(We),ot(We)},[Dt.basicInfo]);var Ie=function(){Ar(!0)},Ge=function(){if(!yr.find(function(We){return We.name===or.school})){f.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}zr(!0)},Ye=function(We){if(ot(Object(P.a)({},Qt.getFieldsValue())),"school"in We){$t(yr.filter(function(ft){return ft.name.includes(We.school)}));var qe=(yr.find(function(ft){return ft.name===We.school})||{}).id;qe?Fe(We.school):(Qt.setFieldsValue({department:""}),ot(Object(P.a)(Object(P.a)({},or),{school:We.school,department:""})))}},Fe=function(){var Xe=Object(c.a)(i.a.mark(function We(qe,ft){var kt,It,Xt,Pr,Gr,Kr;return i.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:return Pr=(kt=yr.find(function(en){return en.name===qe}))===null||kt===void 0?void 0:kt.id,Wr.next=3,$n(Pr);case 3:if(Wr.t0=Wr.sent,Wr.t0){Wr.next=6;break}Wr.t0={};case 6:Gr=Wr.t0,Tr(Gr==null?void 0:Gr.departments),Kr=ft||(Gr==null||((It=Gr.departments)===null||It===void 0||((Xt=It[0])===null||Xt===void 0))?void 0:Xt.name),Qt.setFieldsValue({department:Kr}),ot(Object(P.a)(Object(P.a)({},or),{school:qe,department:Kr}));case 11:case"end":return Wr.stop()}},We)}));return function(qe,ft){return Xe.apply(this,arguments)}}(),ye=function(){var Xe=Object(c.a)(i.a.mark(function We(qe){return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,cn();case 2:Qt.setFieldsValue({school:qe,department:""}),ot(Object(P.a)(Object(P.a)({},or),{school:qe,department:""}));case 4:case"end":return kt.stop()}},We)}));return function(qe){return Xe.apply(this,arguments)}}(),Pe=function(We){if(We.file.status==="uploading"){Lt(!0);return}if(We.file.status==="done"){var qe;console.log(We.file,We.file.response),Zt((qe=We.file.response)===null||qe===void 0?void 0:qe.id),Object(Bt.C)(We.file.originFileObj,function(ft){Or(ft),Lt(!1)})}},we=function(){var Xe=Object(c.a)(i.a.mark(function We(qe){var ft,kt,It,Xt,Pr,Gr,Kr,Qr,Wr,en,tn,pn,on,kn,ln,Mr;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(Pr=qe||{},Gr=Pr.school,Kr=Pr.department,Qr=Pr.identity,Wr=Pr.studentNo,en=Pr.jobTitle,tn=Pr.manager,pr){nn.next=4;break}return f.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),nn.abrupt("return");case 4:return pn=(ft=yr.find(function(dn){return dn.name===Gr}))===null||ft===void 0?void 0:ft.id,on=(kt=lr.find(function(dn){return dn.name===Kr}))===null||kt===void 0?void 0:kt.id,Qr==="student"?kn=Wr:Qr==="teacher"?kn=en:kn=tn,nn.next=9,ct({type:"account/applyProfessionalAuth",payload:{id:((It=Dt.basicInfo)===null||It===void 0?void 0:It.id)||((Xt=Mt.userInfo)===null||Xt===void 0?void 0:Xt.login),school_id:pn,department_id:on,identity:Qr,extra:kn,attachment_ids:[br]}});case 9:ln=nn.sent,je(),ln&&(f.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ct({type:"account/getBasicInfo",payload:{login:(Mr=Mt.userInfo)===null||Mr===void 0?void 0:Mr.login}}));case 12:case"end":return nn.stop()}},We)}));return function(qe){return Xe.apply(this,arguments)}}(),je=function(){ct({type:"account/setActionTabs",payload:{}})},ze={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(V.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:Pe,beforeUpload:function(We){var qe=We.type==="image/jpeg"||We.type==="image/png"||We.type==="image/jpg"||We.type==="image/bmp";return qe||f.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),qe}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:St.a.modal,visible:Dt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(St.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(l.a,{spinning:!!zt},t.a.createElement(yt.a,{className:St.a.formWrap,form:Qt,layout:"horizontal",onValuesChange:Ye,onFinish:we},t.a.createElement(H.a,{gutter:[10,0]},t.a.createElement(dt.a,{flex:"300px"},t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(_r,{value:"student"},"\u5B66\u751F"),t.a.createElement(_r,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),or.identity==="student"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),or.identity==="teacher"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(_r,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(_r,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(_r,{value:"\u52A9\u6559"},"\u52A9\u6559")))),or.identity==="professional"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(yt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:or.school&&!(yr!=null&&yr.find(function(Xe){return Xe.name===or.school}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",or.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ie},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(mn.a,{showSearch:!0,options:xt==null?void 0:xt.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:or.department&&!(lr!=null&&lr.find(function(Xe){return Xe.name===or.department}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},or.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(or.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ge},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(mn.a,{showSearch:!0,onChange:function(We){return Lr(lr.filter(function(qe){return qe.name.includes(We)}))},options:ir==null?void 0:ir.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:Gt.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(ai,Object(Le.a)({},ze,{accept:".png,.jpg,.bmp,.jpeg"}),pr?t.a.createElement("img",{src:pr,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Wt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),t.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Ht!=null&&(pt=Ht.setting)!==null&&pt!==void 0&&pt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),t.a.createElement(jt,{visible:an,onClose:function(){return Ar(!1)},schoolName:or.school,onSuccess:ye}),t.a.createElement(xi,{visible:un,onClose:function(){return zr(!1)},schoolId:(_t=yr.find(function(Xe){return Xe.name===or.school}))===null||_t===void 0?void 0:_t.id,schoolName:or.school,departmentName:or.department,onSuccess:function(We){return Fe(or.school,We)}}))},Ai=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.account,_t=Ct.loading,Mt=Ct.globalSetting;return{user:tt,account:pt,globalSetting:Mt,loading:_t.effects}})(Oi),Ri=L("aCH8"),se=L.n(Ri);function W(Ct){var tt=Ct.type,pt=Ct.dispatch,_t=Ct.userid,Mt=Ct.isshow,Dt=Ct.setPhoneshow,Ht=Ct.setEmailshow,Wt="79e33abd4b6588941ab7622aed1e67e8",ct=Object(a.useState)(""),Ot=Object(m.a)(ct,2),Rt=Ot[0],fr=Ot[1],qt=Object(a.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Qt=Object(m.a)(qt,2),Kt=Qt[0],tr=Qt[1],or=Object(a.useState)(60),ot=Object(m.a)(or,2),Dr=ot[0],Ir=ot[1],yr=Object(a.useState)(!1),er=Object(m.a)(yr,2),Et=er[0],wt=er[1],xt=Object(a.useState)(""),$t=Object(m.a)(xt,2),ur=$t[0],sr=$t[1];function lr(){return Tr.apply(this,arguments)}function Tr(){return Tr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Rt){Ft.next=3;break}return tt===3?f.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):f.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 3:return Ft.next=5,pt({type:"competitions/getVerification",payload:{type:tt,login:Rt,smscode:se()(Wt+Rt)}});case 5:pr=Ft.sent,pr.status===1&&(f.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),Zr(),wt(!0));case 7:case"end":return Ft.stop()}},gr)})),Tr.apply(this,arguments)}function Zr(){Ir(60);var gr=setInterval(function(){--Dr,Dr>-1?Ir(Dr):(clearInterval(gr),wt(!1))},1e3)}function et(){return ir.apply(this,arguments)}function ir(){return ir=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,pt({type:"competitions/PhoneBind",payload:{userid:_t,code:ur,phone:Rt}});case 2:pr=Ft.sent,pr.status===0&&(f.b.info("\u7ED1\u5B9A\u6210\u529F"),Dt("none"));case 4:case"end":return Ft.stop()}},gr)})),ir.apply(this,arguments)}function Lr(){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,pt({type:"competitions/EmailBind",payload:{userid:_t,code:ur,email:Rt}});case 2:pr=Ft.sent,pr.status===0&&(f.b.info("\u7ED1\u5B9A\u6210\u529F"),Ht("none"));case 4:case"end":return Ft.stop()}},gr)})),Jr.apply(this,arguments)}return t.a.createElement("div",{style:{display:Mt}},t.a.createElement("p",null,t.a.createElement(U.a,{value:Rt,onChange:function(pr){return fr(pr.target.value)},placeholder:tt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(U.a,{value:ur,onChange:function(pr){return sr(pr.target.value)},placeholder:tt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",t.a.createElement(C.a,{disabled:Et,onClick:function(){return lr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Et?"\u91CD\u65B0\u53D1\u9001".concat(Dr,"s"):Kt),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(C.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!ur){f.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}tt===3?et():Lr()}},"\u786E\u8BA4"),t.a.createElement(C.a,{style:{marginLeft:"20px"},onClick:function(){tt===3?Dt("none"):Ht("none")}},"\u53D6\u6D88")))}var $=W;function ne(Ct){var tt=Ct.dispatch,pt=Ct.userid,_t={wrapperCol:{offset:3,span:21}},Mt=yt.a.useForm(),Dt=Object(m.a)(Mt,1),Ht=Dt[0],Wt=Object(S.i)(),ct=Wt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(yt.a,{form:Ht,name:"basic"},t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{type:"primary",htmlType:"submit",onClick:Object(c.a)(i.a.mark(function Ot(){return i.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:Ht.validateFields().then(function(){var qt=Object(c.a)(i.a.mark(function Qt(Kt){var tr;return i.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,tt({type:"competitions/setleader",payload:Object(P.a)({identifier:ct,user_id:pt},Kt)});case 2:tr=ot.sent,tr.status===0&&f.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return ot.stop()}},Qt)}));return function(Qt){return qt.apply(this,arguments)}}());case 1:case"end":return fr.stop()}},Ot)}))},"\u63D0\u4EA4"))))}var ce=ne,oe={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ke(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct,Ot=Ct.Prize,Rt=Ct.Accounts,fr=Ct.dispatch,qt=Ct.userid,Qt=Object(a.useState)("none"),Kt=Object(m.a)(Qt,2),tr=Kt[0],or=Kt[1],ot=Object(a.useState)("none"),Dr=Object(m.a)(ot,2),Ir=Dr[0],yr=Dr[1];function er(wt){return Et.apply(this,arguments)}function Et(){return Et=Object(c.a)(i.a.mark(function wt(xt){var $t;return i.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:if(!(xt==="1")){sr.next=6;break}return sr.next=3,fr({type:"competitions/Authentication"});case 3:$t=sr.sent,sr.next=9;break;case 6:return sr.next=8,fr({type:"competitions/Professional"});case 8:$t=sr.sent;case 9:$t.status===0&&f.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return sr.stop()}},wt)})),Et.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){fr({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u59D3\u540D\uFF1A",t.a.createElement("span",null,Rt==null?void 0:Rt.name),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(C.a,{type:"primary",onClick:function(){return er("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," \u5DF2\u8BA4\u8BC1")),t.a.createElement("p",null,"\u6027\u522B\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.gender)===0?"\u7537":"\u5973"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){fr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u804C\u4E1A\uFF1A",t.a.createElement("span",null,Rt&&Rt.identity&&oe[Rt.identity]),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(C.a,{type:"primary",onClick:function(){return er("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),t.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),t.a.createElement(C.a,{type:"primary",onClick:function(){fr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),t.a.createElement("p",null,"\u5B66\u53F7\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.department_name)||"--"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Rt==null?void 0:Rt.phone)||"--"),tr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){or("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:3,dispatch:fr,userid:Rt==null?void 0:Rt.id,isshow:tr,setPhoneshow:or,setEmailshow:yr}),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Rt==null?void 0:Rt.mail)||"--"),Ir==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){yr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:4,dispatch:fr,userid:Rt==null?void 0:Rt.id,isshow:Ir,setEmailshow:yr,setPhoneshow:or})),Ot!=null&&Ot.leader&&Ot!==null&&Ot!==void 0&&Ot.teams&&Ot!==null&&Ot!==void 0&&(tt=Ot.teams[0])!==null&&tt!==void 0&&(pt=tt.bank_account)!==null&&pt!==void 0&&pt.bank?t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),t.a.createElement(ce,{dispatch:fr,userid:qt})),Ot!=null&&Ot.leader?t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((_t=Ot.teams[0])===null||_t===void 0||((Mt=_t.bank_account)===null||Mt===void 0))?void 0:Mt.bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((Dt=Ot.teams[0])===null||Dt===void 0||((Ht=Dt.bank_account)===null||Ht===void 0))?void 0:Ht.second_bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((Wt=Ot.teams[0])===null||Wt===void 0||((ct=Wt.bank_account)===null||ct===void 0))?void 0:ct.card_no)||"--"))):null,t.a.createElement(Ai,{Scoid:Rt==null?void 0:Rt.school_id}),t.a.createElement(sn,null))}var At=Ke,Vt=ge.a.TabPane;function vr(Ct){var tt=Ct.Prize,pt=Ct.Accounts,_t=Ct.getAccounts,Mt=Ct.dispatch,Dt=Ct.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ge.a,{defaultActiveKey:"1",onChange:function(Wt){Wt==="2"&&_t()}},t.a.createElement(Vt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(Ae,{Prize:tt})),t.a.createElement(Vt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(At,{userid:Dt,dispatch:Mt,Prize:tt,Accounts:pt})))))}var Pt=vr,Br=L("xKgJ"),jr=L("wd/R"),fn=L.n(jr),ti=ge.a.TabPane;function mi(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.ChartRules,ct=Ct.ItemData,Ot=Ct.getCharts,Rt=Ct.Selectkey,fr=Ct.HeaderDetail,qt=Ct.getChartRules,Qt=Ct.userinfo,Kt=Ct.Editable,tr=Ct.dispatch,or=Ct.StaffDetail,ot=Object(a.useState)(!1),Dr=Object(m.a)(ot,2),Ir=Dr[0],yr=Dr[1],er=Object(a.useState)(""),Et=Object(m.a)(er,2),wt=Et[0],xt=Et[1],$t=Object(a.useState)(!0),ur=Object(m.a)($t,2),sr=ur[0],lr=ur[1],Tr=Object(a.useState)(),Zr=Object(m.a)(Tr,2),et=Zr[0],ir=Zr[1],Lr=Object(a.useState)(),Jr=Object(m.a)(Lr,2),gr=Jr[0],pr=Jr[1],Or=Object(S.i)(),Ft=Or.identifier;Object(a.useEffect)(function(){if(sr){var vt,bt,zt,Lt,kr=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt[0];ir(kr);var rn=Wt==null||((bt=Wt.stages)===null||bt===void 0||((zt=bt[0])===null||zt===void 0||((Lt=zt.children)===null||Lt===void 0)))?void 0:Lt[0];if(pr(rn),kr!=null&&kr.id){var an,Ar,qr;Ot(kr==null?void 0:kr.id),xt(((an=Wt.rule_contents)===null||an===void 0||((Ar=an.filter(function(cn){return parseInt(cn.competition_stage_id)===parseInt(kr==null?void 0:kr.id)}))===null||Ar===void 0||((qr=Ar[0])===null||qr===void 0))?void 0:qr.content)||"")}else{var Nr,un,zr;Ot(0),xt(((Nr=Wt.rule_contents)===null||Nr===void 0||((un=Nr.filter(function(cn){return parseInt(cn.competition_stage_id)===0}))===null||un===void 0||((zr=un[0])===null||zr===void 0))?void 0:zr.content)||"")}}},[Wt]);function Jt(){return br.apply(this,arguments)}function br(){return br=Object(c.a)(i.a.mark(function vt(){var bt,zt,Lt,kr,rn,an,Ar,qr,Nr;return i.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(wt){zr.next=3;break}return f.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),zr.abrupt("return");case 3:if(lr(!1),bt=et==null?void 0:et.id,!bt){zr.next=12;break}return zr.next=8,Object(ae.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:wt,md_content_id:(zt=Wt.rule_contents)===null||zt===void 0||((Lt=zt.filter(function(cn){return parseInt(cn.competition_stage_id)===parseInt(bt)}))===null||Lt===void 0||((kr=Lt[0])===null||kr===void 0))?void 0:kr.id,stage_id:et==null?void 0:et.id}});case 8:rn=zr.sent,rn.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),yr(!1),qt()),zr.next=16;break;case 12:return zr.next=14,Object(ae.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:wt,md_content_id:(an=Wt.rule_contents)===null||an===void 0||((Ar=an.filter(function(cn){return parseInt(cn.competition_stage_id)===0}))===null||Ar===void 0||((qr=Ar[0])===null||qr===void 0))?void 0:qr.id,stage_id:et==null?void 0:et.id}});case 14:Nr=zr.sent,Nr.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),yr(!1),qt());case 16:case"end":return zr.stop()}},vt)})),br.apply(this,arguments)}var Zt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(bt,zt,Lt){return t.a.createElement("span",null,bt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(bt){return t.a.createElement(nt.a,{title:bt},t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=10?(bt==null?void 0:bt.substr(0,10))+"...":bt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(bt){return t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=6?(bt==null?void 0:bt.substr(0,6))+"...":bt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(bt){return t.a.createElement("span",null,bt===1?"\u8BA1\u7B97\u4E2D":bt===2?"\u5B8C\u6210":bt===0?"\u5F85\u8BA1\u7B97":bt===3&&"\u9519\u8BEF")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(bt){return t.a.createElement("span",null,bt||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){return(bt==null?void 0:bt.length)>0?bt==null?void 0:bt.map(function(zt,Lt){return t.a.createElement("span",null,zt==null?void 0:zt.name,"\uFF1A",zt==null?void 0:zt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(bt){return t.a.createElement("span",null,bt||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="fid"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="total_score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(bt){return t.a.createElement("span",null,bt||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Coffee"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Easyship"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Scar"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Scarf"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Total"}))===null||zt===void 0)?void 0:zt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(bt){return t.a.createElement("a",{href:bt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(vt){return!!vt});return t.a.createElement("div",null,(Wt==null||((tt=Wt.stages)===null||tt===void 0)?void 0:tt.length)>0?null:t.a.createElement(Qe,null),(Wt==null||((pt=Wt.stages)===null||pt===void 0)?void 0:pt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:Qt!=null&&Qt.admin||Qt!=null&&Qt.business||Kt?t.a.createElement(C.a,{onClick:function(){yr(!0)}},"\u7F16\u8F91"):or.enrolled&&(et==null?void 0:et.start_time)&&(et==null?void 0:et.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",fn()(et==null?void 0:et.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",fn()(et==null?void 0:et.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(C.a,{style:{marginLeft:"20px"},disabled:fn()(et==null?void 0:et.start_time).unix()>fn()(fn()().format("YYYY-MM-DD HH:mm:s")).unix()||fn()(fn()().format("YYYY-MM-DD HH:mm:s")).unix()>fn()(et==null?void 0:et.end_time).unix(),onClick:function(){tr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(gr==null?void 0:gr.id)||(et==null?void 0:et.id),id:fr==null?void 0:fr.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(bt){var zt,Lt,kr,rn,an;yr(!1);var Ar=Wt==null||((zt=Wt.stages)===null||zt===void 0)?void 0:zt.filter(function(Nr){return parseInt(bt)===parseInt(Nr==null?void 0:Nr.id)})[0],qr=Ar==null||((Lt=Ar.children)===null||Lt===void 0)?void 0:Lt[0];pr(qr),ir(Ar),xt(((kr=Wt.rule_contents)===null||kr===void 0||((rn=kr.filter(function(Nr){return parseInt(Nr.competition_stage_id)===parseInt(Ar==null?void 0:Ar.id)}))===null||rn===void 0||((an=rn[0])===null||an===void 0))?void 0:an.content)||""),Ot((qr==null?void 0:qr.id)||bt)}},Wt&&Wt.stages.map(function(vt,bt){return t.a.createElement(ti,{tab:vt.name,key:vt.id===null?0:vt.id},Ir===!1&&Wt&&Wt.rule_contents.map(function(zt,Lt){if(vt.id===zt.competition_stage_id)return t.a.createElement(B.a,{key:Lt,value:zt.content===void 0||zt.content===null?"":zt.content});if(vt.id===null&&zt.competition_stage_id===0)return t.a.createElement(B.a,{key:Lt,value:zt.content===void 0||zt.content===null?"":zt.content})}))})),(et==null||((_t=et.children)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{activeKey:(gr==null?void 0:gr.id)+"",onChange:function(bt){var zt,Lt=et==null||((zt=et.children)===null||zt===void 0)?void 0:zt.filter(function(kr){return parseInt(bt)===parseInt(kr==null?void 0:kr.id)})[0];pr(Lt),Ot(bt)}},et==null||((Mt=et.children)===null||Mt===void 0)?void 0:Mt.map(function(vt,bt){return t.a.createElement(ti,{tab:vt.name,key:vt.id===null?0:vt.id})})),Ir&&t.a.createElement("div",null,t.a.createElement(ee.a,{defaultValue:wt,onChange:function(bt){xt(bt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Jt()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return yr(!1)}},"\u53D6\u6D88"))),((Dt=fr.competition_modules.filter(function(vt){return vt.id===Rt}))===null||Dt===void 0||((Ht=Dt[0])===null||Ht===void 0)?void 0:Ht.show_leaderboard)&&t.a.createElement(Q.a,{dataSource:ct==null?void 0:ct.results,columns:Zt}))}var Rn=mi,Li=L("DjyN"),qi=L("NUBc"),Qn=ge.a.TabPane;function _i(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.loading,ct=Ct.ChartRules,Ot=Ct.ItemData,Rt=Ct.getCharts,fr=Ct.Selectkey,qt=Ct.HeaderDetail,Qt=Ct.getChartRules,Kt=Ct.userinfo,tr=Ct.Editable,or=Ct.dispatch,ot=Ct.StaffDetail,Dr=Object(a.useState)(!1),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)(""),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)(!0),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)(),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(S.i)(),Jt=Ft.identifier,br=Object(a.useState)({page:1,limit:10,sort:"desc"}),Zt=Object(m.a)(br,2),vt=Zt[0],bt=Zt[1];Object(a.useEffect)(function(){var Lt;lr&&ct!==null&&ct!==void 0&&(Lt=ct.stages)!==null&&Lt!==void 0&&Lt[0]&&zt()},[ct==null||((tt=ct.stages)===null||tt===void 0)?void 0:tt[0]]);var zt=function(){var Lt=Object(c.a)(i.a.mark(function kr(){var rn,an,Ar,qr,Nr,un;return i.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return Nr=ct==null||((rn=ct.stages)===null||rn===void 0)?void 0:rn[0],Lr(Nr),un=ct==null||((an=ct.stages)===null||an===void 0||((Ar=an[0])===null||Ar===void 0||((qr=Ar.children)===null||qr===void 0)))?void 0:qr[0],Or(un),vt.id=(un==null?void 0:un.id)||(Nr==null?void 0:Nr.id),bt(Object(P.a)({},vt)),cn.next=7,Rt(Object(P.a)(Object(P.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return cn.stop()}},kr)}));return function(){return Lt.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((pt=ct.stages)===null||pt===void 0)?void 0:pt.length)>0?null:t.a.createElement(Qe,null),(ct==null||((_t=ct.stages)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Lt=Object(c.a)(i.a.mark(function kr(rn){var an,Ar,qr,Nr,un,zr,cn;return i.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return er(!1),zr=ct==null||((an=ct.stages)===null||an===void 0)?void 0:an.filter(function(Ge){return parseInt(rn)===parseInt(Ge==null?void 0:Ge.id)})[0],cn=zr==null||((Ar=zr.children)===null||Ar===void 0)?void 0:Ar[0],Or(cn),Lr(zr),$t(((qr=ct.rule_contents)===null||qr===void 0||((Nr=qr.filter(function(Ge){return parseInt(Ge.competition_stage_id)===parseInt(zr==null?void 0:zr.id)}))===null||Nr===void 0||((un=Nr[0])===null||un===void 0))?void 0:un.content)||""),vt.page=1,vt.limit=10,vt.id=(cn==null?void 0:cn.id)||rn,bt(Object(P.a)({},vt)),Ie.next=9,Rt(Object(P.a)({},vt));case 9:case"end":return Ie.stop()}},kr)}));return function(kr){return Lt.apply(this,arguments)}}()},ct&&ct.stages.map(function(Lt,kr){return t.a.createElement(Qn,{tab:Lt.name,key:Lt.id===null?0:Lt.id})})),(ir==null||((Mt=ir.children)===null||Mt===void 0)?void 0:Mt.length)>0&&t.a.createElement(ge.a,{activeKey:(pr==null?void 0:pr.id)+"",onChange:function(){var Lt=Object(c.a)(i.a.mark(function kr(rn){var an,Ar;return i.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:return Ar=ir==null||((an=ir.children)===null||an===void 0)?void 0:an.filter(function(un){return parseInt(rn)===parseInt(un==null?void 0:un.id)})[0],Or(Ar),vt.page=1,vt.limit=10,vt.id=rn,bt(Object(P.a)({},vt)),Nr.next=5,Rt(Object(P.a)({},vt));case 5:case"end":return Nr.stop()}},kr)}));return function(kr){return Lt.apply(this,arguments)}}()},ir==null||((Dt=ir.children)===null||Dt===void 0)?void 0:Dt.map(function(Lt,kr){return t.a.createElement(Qn,{tab:Lt.name,key:Lt.id===null?0:Lt.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){vt.page=1,vt.sort=vt.sort==="desc"?"asc":"desc",bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",vt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(vt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(U.a.Search,{onSearch:function(kr){vt.page=1,vt.search=kr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(l.a,{spinning:Wt},Ot==null||((Ht=Ot.results)===null||Ht===void 0)?void 0:Ht.map(function(Lt,kr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:kr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/"+(Lt==null?void 0:Lt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),t.a.createElement("div",{style:{marginLeft:10}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},Lt==null?void 0:Lt.user_name),t.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Lt==null?void 0:Lt.team_name)||"- -")),t.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821 ",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Lt==null?void 0:Lt.school_name)||"- -")))),t.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},t.a.createElement("div",null,t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",Lt==null?void 0:Lt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(Lt==null?void 0:Lt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(Lt==null?void 0:Lt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(Lt==null?void 0:Lt.game_identifier),target:"_blank"},t.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),t.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),t.a.createElement(qi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(kr,rn){vt.page=kr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}})))}var vi=_i,Fi=function(tt){var pt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],_t=["","\u5341","\u767E","\u5343","\u4E07"];tt=parseInt(tt);var Mt=function(ct){for(var Ot=ct.toString().split("").reverse(),Rt="",fr=0;fr0&&Ot[fr]==0&&Ot[fr-1]==0?"":pt[Ot[fr]]+(Ot[fr]==0?_t[0]:_t[fr]))+Rt;return Rt},Dt=Math.floor(tt/1e4),Ht=tt%1e4;return Ht.toString().length<4&&(Ht="0"+Ht),Dt?Mt(Dt)+"\u4E07"+Mt(Ht):Mt(tt)};function gi(Ct){var tt,pt=Ct.item,_t=Ct.index,Mt=Ct.StaffDetail,Dt=Object(a.useState)(!0),Ht=Object(m.a)(Dt,2),Wt=Ht[0],ct=Ht[1],Ot=Object(a.useState)(!0),Rt=Object(m.a)(Ot,2),fr=Rt[0],qt=Rt[1],Qt=Object(a.useRef)();return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},t.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/"+(pt==null?void 0:pt.pic),style:{width:220,height:130,borderRadius:"4px"}}),t.a.createElement("div",{style:{marginLeft:20,width:"75%"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Fi(_t+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},pt==null?void 0:pt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},pt==null?void 0:pt.challenges_count)," ")),t.a.createElement("div",{ref:Qt},t.a.createElement(B.a,{style:{maxHeight:Wt&&100},value:pt==null?void 0:pt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ct(!Wt)}},Wt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(Wt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:fr&&58,overflow:"hidden"}},pt==null||((tt=pt.challenges)===null||tt===void 0)?void 0:tt.map(function(Kt,tr){return t.a.createElement("div",{style:{marginTop:tr===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",tr+1,"\u5173",Kt==null?void 0:Kt.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){qt(!fr)}},fr?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(fr?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Mt==null?void 0:Mt.enrolled)&&t.a.createElement(C.a,{onClick:function(){window.open("/shixuns/".concat(pt==null?void 0:pt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var Gi=gi,Mi=ge.a.TabPane;function oa(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.loading,ct=Ct.ChartRules,Ot=Ct.ItemData,Rt=Ct.getCharts,fr=Ct.Selectkey,qt=Ct.HeaderDetail,Qt=Ct.getChartRules,Kt=Ct.userinfo,tr=Ct.Editable,or=Ct.dispatch,ot=Ct.StaffDetail,Dr=Object(a.useState)(!1),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)(""),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)(!0),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)(),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(S.i)(),Jt=Ft.identifier,br=Object(a.useState)({page:1,limit:10}),Zt=Object(m.a)(br,2),vt=Zt[0],bt=Zt[1],zt=Object(a.useState)(),Lt=Object(m.a)(zt,2),kr=Lt[0],rn=Lt[1];Object(a.useEffect)(function(){var Ar;lr&&ct!==null&&ct!==void 0&&(Ar=ct.stages)!==null&&Ar!==void 0&&Ar[0]&&an()},[ct==null||((tt=ct.stages)===null||tt===void 0)?void 0:tt[0]]);var an=function(){var Ar=Object(c.a)(i.a.mark(function qr(){var Nr,un,zr,cn,$n,Ie;return i.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return $n=ct==null||((Nr=ct.stages)===null||Nr===void 0)?void 0:Nr[0],Lr($n),Ie=ct==null||((un=ct.stages)===null||un===void 0||((zr=un[0])===null||zr===void 0||((cn=zr.children)===null||cn===void 0)))?void 0:cn[0],Or(Ie),vt.id=(Ie==null?void 0:Ie.id)||($n==null?void 0:$n.id),bt(Object(P.a)({},vt)),Ye.next=7,Rt(Object(P.a)(Object(P.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return Ye.stop()}},qr)}));return function(){return Ar.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((pt=ct.stages)===null||pt===void 0)?void 0:pt.length)>0?null:t.a.createElement(Qe,null),(ct==null||((_t=ct.stages)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Ar=Object(c.a)(i.a.mark(function qr(Nr){var un,zr,cn,$n,Ie,Ge,Ye;return i.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return er(!1),Ge=ct==null||((un=ct.stages)===null||un===void 0)?void 0:un.filter(function(Pe){return parseInt(Nr)===parseInt(Pe==null?void 0:Pe.id)})[0],Ye=Ge==null||((zr=Ge.children)===null||zr===void 0)?void 0:zr[0],Or(Ye),Lr(Ge),$t(((cn=ct.rule_contents)===null||cn===void 0||(($n=cn.filter(function(Pe){return parseInt(Pe.competition_stage_id)===parseInt(Ge==null?void 0:Ge.id)}))===null||$n===void 0||((Ie=$n[0])===null||Ie===void 0))?void 0:Ie.content)||""),vt.page=1,vt.limit=10,vt.id=(Ye==null?void 0:Ye.id)||Nr,bt(Object(P.a)({},vt)),ye.next=9,Rt(Object(P.a)({},vt));case 9:case"end":return ye.stop()}},qr)}));return function(qr){return Ar.apply(this,arguments)}}()},ct&&ct.stages.map(function(Ar,qr){return t.a.createElement(Mi,{tab:Ar.name,key:Ar.id===null?0:Ar.id})})),(ir==null||((Mt=ir.children)===null||Mt===void 0)?void 0:Mt.length)>0&&t.a.createElement(ge.a,{activeKey:(pr==null?void 0:pr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var Ar=Object(c.a)(i.a.mark(function qr(Nr){var un,zr;return i.a.wrap(function($n){for(;;)switch($n.prev=$n.next){case 0:return zr=ir==null||((un=ir.children)===null||un===void 0)?void 0:un.filter(function(Ie){return parseInt(Nr)===parseInt(Ie==null?void 0:Ie.id)})[0],Or(zr),vt.page=1,vt.limit=10,vt.id=Nr,bt(Object(P.a)({},vt)),$n.next=5,Rt(Object(P.a)({},vt));case 5:case"end":return $n.stop()}},qr)}));return function(qr){return Ar.apply(this,arguments)}}()},ir==null||((Dt=ir.children)===null||Dt===void 0)?void 0:Dt.map(function(Ar,qr){return t.a.createElement(Mi,{tab:Ar.name,key:Ar.id===null?0:Ar.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},Ot==null?void 0:Ot.start_time,"~",Ot==null?void 0:Ot.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(Ot==null?void 0:Ot.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(l.a,{spinning:Wt},Ot==null||((Ht=Ot.results)===null||Ht===void 0)?void 0:Ht.map(function(Ar,qr){return t.a.createElement(Gi,{StaffDetail:ot,item:Ar,index:qr})})),t.a.createElement(qi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(qr,Nr){vt.page=qr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}})))}var sa=oa,Ii=L("UfjD"),Xn=L("qHvr"),Vi=function(tt){var pt,_t,Mt,Dt,Ht,Wt,ct,Ot,Rt=tt.globalSetting,fr=tt.loading,qt=tt.dispatch,Qt=tt.user,Kt=Object(_.a)(tt,["globalSetting","loading","dispatch","user"]),tr=Object(a.useState)({avatar_url:""}),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)([]),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(S.i)(),xt=wt.identifier,$t=Object(a.useState)([]),ur=Object(m.a)($t,2),sr=ur[0],lr=ur[1],Tr=Object(a.useState)(!0),Zr=Object(m.a)(Tr,2),et=Zr[0],ir=Zr[1],Lr=Object(a.useState)([]),Jr=Object(m.a)(Lr,2),gr=Jr[0],pr=Jr[1],Or=Object(a.useState)([]),Ft=Object(m.a)(Or,2),Jt=Ft[0],br=Ft[1],Zt=Object(a.useState)(!1),vt=Object(m.a)(Zt,2),bt=vt[0],zt=vt[1],Lt=Object(a.useState)(!1),kr=Object(m.a)(Lt,2),rn=kr[0],an=kr[1],Ar=Object(a.useState)(!1),qr=Object(m.a)(Ar,2),Nr=qr[0],un=qr[1],zr=Object(a.useState)([]),cn=Object(m.a)(zr,2),$n=cn[0],Ie=cn[1],Ge=Object(a.useState)([]),Ye=Object(m.a)(Ge,2),Fe=Ye[0],ye=Ye[1],Pe=Object(a.useState)([]),we=Object(m.a)(Pe,2),je=we[0],ze=we[1],Xe=Object(a.useState)(!1),We=Object(m.a)(Xe,2),qe=We[0],ft=We[1],kt=Object(a.useState)([]),It=Object(m.a)(kt,2),Xt=It[0],Pr=It[1],Gr=Object(a.useState)(),Kr=Object(m.a)(Gr,2),Qr=Kr[0],Wr=Kr[1],en=Object(a.useState)(!0),tn=Object(m.a)(en,2),pn=tn[0],on=tn[1],kn=Object(a.useState)(!1),ln=Object(m.a)(kn,2),Mr=ln[0],Fr=ln[1],nn=Object(a.useState)(!1),dn=Object(m.a)(nn,2),wr=dn[0],bn=dn[1],Wn=Object(a.useState)(!1),wn=Object(m.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(a.useState)(!1),ri=Object(m.a)(Yn,2),Hn=ri[0],di=ri[1],Xi=Object(a.useState)(!1),wi=Object(m.a)(Xi,2),ni=wi[0],In=wi[1],Nn=Object(a.useState)(!0),zn=Object(m.a)(Nn,2),Bn=zn[0],Zn=zn[1],Di=Object(S.h)(),ra=Object(a.useRef)(null);Object(a.useEffect)(function(){xt&&An(),Object(Bt.V)("\u7ADE\u8D5B")},[xt]);function An(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(c.a)(i.a.mark(function xr(){var Cr;return i.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return En.t0=Et,En.next=3,qt({type:"competitions/getStaff",payload:{identifier:xt}});case 3:return En.t1=En.sent,(0,En.t0)(En.t1),En.next=7,qt({type:"competitions/getHeader",payload:{identifier:xt}});case 7:Cr=En.sent,Dr(Cr),Object(Bt.V)((Cr==null?void 0:Cr.name)||"\u7ADE\u8D5B");case 10:case"end":return En.stop()}},xr)})),Ui.apply(this,arguments)}Object(a.useEffect)(function(){var xr;Wr(parseInt(Di==null||((xr=Di.query)===null||xr===void 0)?void 0:xr.type)===1)},[Di]),Object(a.useEffect)(function(){var xr;if((ot==null||((xr=ot.competition_modules)===null||xr===void 0)?void 0:xr.length)>0){var Cr,ar;if((Di==null||((Cr=Di.query)===null||Cr===void 0)?void 0:Cr.active)==="\u8D5B\u9898\u53D1\u5E03"){var En,dr=ot==null||((En=ot.competition_modules)===null||En===void 0)?void 0:En.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(dr){Bi(dr);return}}Bi(ot==null||((ar=ot.competition_modules)===null||ar===void 0)?void 0:ar[0])}},[ot]);function Bi(xr){return Pn.apply(this,arguments)}function Pn(){return Pn=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(ze(Cr.id),je=Cr.id,pr(Cr),!(Cr.module_type==="entrance")){dr.next=9;break}return dr.next=6,qt({type:"competitions/getItem",payload:{url:Cr.module_url,module_type:"entrance"}});case 6:ar=dr.sent,dr.next=12;break;case 9:return dr.next=11,qt({type:"competitions/getItem",payload:{url:Cr.module_url}});case 11:ar=dr.sent;case 12:zt(!1),un(!1),ft(!1),lr(ar),Fr(!1),bn(!1),br(Cr.module_type),Cr.module_type==="chart"?(zt(!0),ir(!1),Ba()):Cr.module_type==="certificate"?(un(!0),zt(!1),ir(!1),ba()):Cr.module_type==="md_tab"?(ft(!0),ir(!1),localStorage.setItem("issee","2"),zt(!1),un(!1),ca()):Cr.module_type==="md_shixun"?(Fr(!0),ir(!1),ca()):Cr.module_type==="entrance"?(bn(!0),ir(!1),ca()):(ir(!0),localStorage.setItem("issee","1"));case 20:case"end":return dr.stop()}},xr)})),Pn.apply(this,arguments)}function On(xr,Cr,ar){return qn.apply(this,arguments)}function qn(){return qn=Object(c.a)(i.a.mark(function xr(Cr,ar,En){var dr,pa;return i.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(Cr.stopPropagation(),Object(he.e)(qt)){jn.next=3;break}return jn.abrupt("return");case 3:if(!(ot!=null&&ot.is_authentication&&!(Qt!=null&&(dr=Qt.userInfo)!==null&&dr!==void 0&&dr.authentication))){jn.next=6;break}return qt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),jn.abrupt("return");case 6:if(!(ot!=null&&ot.enroll_url)){jn.next=9;break}return Object(Bt.Q)(ot==null?void 0:ot.enroll_url),jn.abrupt("return");case 9:if(!(En==="ismodel")){jn.next=23;break}if(!(ar.member_of_course===!0)){jn.next=14;break}Object(Bt.Q)("/classrooms/".concat(ar.course_id)),jn.next=21;break;case 14:if(ar.invite_code){jn.next=17;break}return f.b.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C"),jn.abrupt("return");case 17:return jn.next=19,qt({type:"competitions/addApplytojoincourse",payload:{invite_code:ar.invite_code,student:1}});case 19:pa=jn.sent,pa.status===0&&Object(Bt.Q)("/classrooms/".concat(ar.course_id));case 21:jn.next=27;break;case 23:if(!(er.enrolled===!0)){jn.next=26;break}return Object(Bt.Q)(En),jn.abrupt("return");case 26:Tn(!0);case 27:case"end":return jn.stop()}},xr)})),qn.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(c.a)(i.a.mark(function xr(){return i.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return ar.t0=an,ar.next=3,qt({type:"competitions/ChartRules",payload:{identifier:xt}});case 3:return ar.t1=ar.sent,ar.next=6,(0,ar.t0)(ar.t1);case 6:case"end":return ar.stop()}},xr)})),wa.apply(this,arguments)}function la(xr){return ua.apply(this,arguments)}function ua(){return ua=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Charts",payload:{identifier:xt,stage_id:Cr}});case 2:ar=dr.sent,lr(ar);case 4:case"end":return dr.stop()}},xr)})),ua.apply(this,arguments)}function Pa(xr){return Ca.apply(this,arguments)}function Ca(){return Ca=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return on(!0),dr.next=3,qt({type:"competitions/Results",payload:Object(P.a)({identifier:xt,stage_id:Cr==null?void 0:Cr.id},Cr)});case 3:ar=dr.sent,lr(ar),on(!1);case 6:case"end":return dr.stop()}},xr)})),Ca.apply(this,arguments)}function La(xr){return Wa.apply(this,arguments)}function Wa(){return Wa=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return on(!0),dr.next=3,qt({type:"competitions/Results",payload:Object(P.a)({identifier:xt,stage_id:Cr==null?void 0:Cr.id,module_type:"entrance"},Cr)});case 3:ar=dr.sent,lr(ar),on(!1);case 6:case"end":return dr.stop()}},xr)})),Wa.apply(this,arguments)}function Xa(xr){return Ma.apply(this,arguments)}function Ma(){return Ma=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Results",payload:{identifier:xt,stage_id:Cr}});case 2:if(ar=dr.sent,!(localStorage.getItem("issee")==="1")){dr.next=5;break}return dr.abrupt("return");case 5:lr(ar);case 6:case"end":return dr.stop()}},xr)})),Ma.apply(this,arguments)}function ca(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(c.a)(i.a.mark(function xr(){return i.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return ar.t0=Pr,ar.next=3,qt({type:"competitions/TabResults",payload:{identifier:xt,competition_module_id:je}});case 3:ar.t1=ar.sent,(0,ar.t0)(ar.t1);case 5:case"end":return ar.stop()}},xr)})),Sa.apply(this,arguments)}function ba(){return da.apply(this,arguments)}function da(){return da=Object(c.a)(i.a.mark(function xr(){var Cr,ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Prize",payload:{identifier:xt,user_id:Qt==null||((Cr=Qt.userInfo)===null||Cr===void 0)?void 0:Cr.user_id}});case 2:ar=dr.sent,Ie(ar);case 4:case"end":return dr.stop()}},xr)})),da.apply(this,arguments)}function co(){return Ea.apply(this,arguments)}function Ea(){return Ea=Object(c.a)(i.a.mark(function xr(){var Cr,ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Accounts",payload:{id:Qt==null||((Cr=Qt.userInfo)===null||Cr===void 0)?void 0:Cr.user_id}});case 2:ar=dr.sent,ye(ar);case 4:case"end":return dr.stop()}},xr)})),Ea.apply(this,arguments)}function Ta(xr){return ha.apply(this,arguments)}function ha(){return ha=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(Bn){dr.next=2;break}return dr.abrupt("return");case 2:if(Zn(!1),!fa()){dr.next=5;break}return dr.abrupt("return");case 5:return dr.next=7,qt({type:"competitions/AddTeam",payload:{identifier:xt,name:Cr}});case 7:ar=dr.sent,ar&&ar.status===0?(f.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),An(),di(!1)):Zn(!0);case 9:case"end":return dr.stop()}},xr)})),ha.apply(this,arguments)}function fa(){var xr,Cr;if(Qt!=null&&(xr=Qt.userInfo)!==null&&xr!==void 0&&xr.is_teacher){var ar;if(er!=null&&(ar=er.teacher_staff)!==null&&ar!==void 0&&ar.mutiple_limited&&(er!=null&&er.enrolled))return f.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Zn(!0),!0}else{var En;if(er!=null&&(En=er.member_staff)!==null&&En!==void 0&&En.mutiple_limited&&(er!=null&&er.enrolled))return f.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Zn(!0),!0}if(er!=null&&er.enroll_ended)return f.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Zn(!0),!0;if(Qt!=null&&(Cr=Qt.userInfo)!==null&&Cr!==void 0&&Cr.is_teacher){if(!er.teacher_staff)return f.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Zn(!0),!0}else if(!(er!=null&&er.member_staff))return f.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Zn(!0),!0}function $i(xr){return na.apply(this,arguments)}function na(){return na=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(Bn){dr.next=2;break}return dr.abrupt("return");case 2:if(!fa()){dr.next=4;break}return dr.abrupt("return");case 4:return Zn(!1),dr.next=7,qt({type:"competitions/JoinTeam",payload:{identifier:xt,invite_code:Cr}});case 7:ar=dr.sent,ar&&ar.status===0?(f.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),In(!1),Zn(!0),An()):Zn(!0);case 9:case"end":return dr.stop()}},xr)})),na.apply(this,arguments)}return t.a.createElement("div",{className:"edu-container minH500"},t.a.createElement(n.a,{className:"mt10",separator:">"},t.a.createElement(n.a.Item,null,t.a.createElement(x.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(n.a.Item,null,ot.name,ot.sub_title?"-"+ot.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(l.a,{spinning:fr.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(ot==null?void 0:ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:V.a.IMG_SERVER+"/"+(ot==null?void 0:ot.avatar_url)}),!(ot!=null&&ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:V.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},t.a.createElement("p",{className:"".concat(O.a.titlesize)},ot.name,ot.sub_title?"-"+ot.sub_title:null),t.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u5956\u91D1"),ot!=null&&ot.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(ot&&ot.bonus).toLocaleString()):t.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u6D4F\u89C8"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(ot&&ot.visits_count).toLocaleString())),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u62A5\u540D"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(ot&&ot.member_count).toLocaleString()))),t.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),ot.start_time,"~",ot.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),ot.enroll_end_time),ot.competition_status==="ended"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,ot.competition_status==="progressing"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,t.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(ot==null?void 0:ot.mode)<=2&&er.enrolled&&t.a.createElement(C.a,{onClick:function(Cr){if((ot==null?void 0:ot.mode)===1){var ar;Bi((ar=ot.competition_modules)===null||ar===void 0?void 0:ar.find(function(En){return En.module_type==="entrance"}))}else On(Cr,ot,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(ot==null?void 0:ot.mode)===2||(ot==null?void 0:ot.mode)===1&&((pt=ot.competition_modules)===null||pt===void 0||((_t=pt.filter(function(xr){return xr.module_type==="entrance"}))===null||_t===void 0)?void 0:_t.length)>0?"":"none"},className:O.a.buttonsize},(ot==null?void 0:ot.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(ot==null?void 0:ot.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),ot.competition_status==="ended"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,ot.competition_status!=="nearly_published"&&ot.enroll_end&&ot.competition_status!=="ended"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,ot.competition_status==="progressing"&&ot.enroll_end!=!0?t.a.createElement(C.a,{type:"primary",disabled:er.enrolled&&!ot.need_attachment,className:O.a.buttonsize,onClick:function(Cr){if(er.enrolled&&ot.need_attachment){var ar;(ar=ra.current)===null||ar===void 0||ar.handleVisible();return}On(Cr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))}},er.enrolled?ot.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":ot!=null&&ot.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Qt.userInfo.real_name!="\u6E38\u5BA2"&&!(ot!=null&&ot.enroll_url)&&t.a.createElement("span",{onClick:function(Cr){return On(Cr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))},className:O.a.myteam},Object(Br.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:O.a.bootmdetail},t.a.createElement("div",{className:O.a.flex1},t.a.createElement(u.a,{selectedKeys:["".concat(je)]},ot&&ot.competition_modules&&ot.competition_modules.map(function(xr,Cr){if(xr.module_type!="enroll")return t.a.createElement(u.a.Item,{className:O.a.menuItem,onClick:function(){if(xr!=null&&xr.is_authentication){if(!Object(he.e)(qt))return;f.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Bi(xr)},key:xr.id},xr.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(Mr||wr)&&0}},Nr?t.a.createElement(Pt,{dispatch:qt,userid:Qt==null||((Mt=Qt.userInfo)===null||Mt===void 0)?void 0:Mt.user_id,Prize:$n,Accounts:Fe,getAccounts:co}):null,bt?t.a.createElement(Me,{HeaderDetail:ot,userinfo:Qt.userInfo,Editable:ot==null||((Dt=ot.permission)===null||Dt===void 0)?void 0:Dt.editable,getCharts:la,getChartRules:Ba,Selectkey:je,ChartRules:rn,ItemData:sr}):null,et?t.a.createElement(q,{ref:ra,StaffDetail:er,HeaderDetail:ot,userinfo:Qt.userInfo,Editable:ot==null||((Ht=ot.permission)===null||Ht===void 0)?void 0:Ht.editable,ItemData:sr,setIssee:ir,ModelType:Jt,dispatch:qt}):null,!et&&!Mr&&!wr&&!bt&&!Nr&&!qe?t.a.createElement(J,{userinfo:Qt.userInfo,ModelType:Jt,getrightdatas:Bi,dispatch:qt,MenuItem:gr,setIssee:ir,identifier:xt,ItemData:sr}):null,qe&&t.a.createElement(Rn,{dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((Wt=ot.permission)===null||Wt===void 0)?void 0:Wt.editable,getCharts:Xa,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}),Mr&&t.a.createElement(vi,{loading:pn,dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((ct=ot.permission)===null||ct===void 0)?void 0:ct.editable,getCharts:Pa,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}),wr&&t.a.createElement(sa,{loading:pn,dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((Ot=ot.permission)===null||Ot===void 0)?void 0:Ot.editable,getCharts:La,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}))),t.a.createElement(b.a,null),t.a.createElement(G,{getResults:Xa}),t.a.createElement(T.a,{visible:Qr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Wr(!1)}},t.a.createElement("div",{className:O.a.modal},t.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),t.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",t.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),t.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),t.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),t.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),t.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),t.a.createElement(C.a,{type:"primary",onClick:function(){return Object(Bt.Q)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(T.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:Mn,onCancel:function(){Tn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(C.a,{type:"primary",style:{height:40},onClick:function(){In(!0),Tn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(C.a,{style:{height:40},onClick:function(){di(!0),Tn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),ni?t.a.createElement(Ii.a,{isjoin:ni,setJoin:In,JoinTeams:$i}):null,Hn?t.a.createElement(Xn.a,{isAddmodle:Hn,setIsAdd:di,createTeam:Ta}):null)},ta=Z.default=Object(o.a)(function(Ct){var tt=Ct.loading,pt=Ct.globalSetting,_t=Ct.user;return{globalSetting:pt,loading:tt,user:_t}})(Vi)},GRuw:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("lPiR"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.algo,p=u.SHA256,C=u.SHA224=p.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var E=p._doFinalize.call(this);return E.sigBytes-=4,E}});d.SHA224=p._createHelper(C),d.HmacSHA224=p._createHmacHelper(C)}(),P.SHA224})},GfqC:function(j,Z,L){"use strict";var P=L("q1tI"),d=L.n(P),T=L("TSYQ"),D=L.n(T);function u(K,U){var B="cannot "+K.method+" "+K.action+" "+U.status+"'",V=new Error(B);return V.status=U.status,V.method=K.method,V.url=K.action,V}function p(K){var U=K.responseText||K.response;if(!U)return U;try{return JSON.parse(U)}catch(B){return U}}function C(K){var U=new XMLHttpRequest;K.onProgress&&U.upload&&(U.upload.onprogress=function(he){he.total>0&&(he.percent=he.loaded/he.total*100),K.onProgress(he)});var B=new FormData;K.data&&Object.keys(K.data).forEach(function(ae){var he=K.data[ae];if(Array.isArray(he)){he.forEach(function(pe){B.append(ae+"[]",pe)});return}B.append(ae,K.data[ae])}),K.file instanceof Blob?B.append(K.filename,K.file,K.file.name):B.append(K.filename,K.file),U.onerror=function(he){K.onError(he)},U.onload=function(){return U.status<200||U.status>=300?K.onError(u(K,U),p(U)):K.onSuccess(p(U),U)},U.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var V=K.headers||{};return V["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(V).forEach(function(ae){V[ae]!==null&&U.setRequestHeader(ae,V[ae])}),U.send(B),{abort:function(){U.abort()}}}var E=+new Date,l=0;function s(){return"rc-upload-"+E+"-"+ ++l}function n(K,U){return K.indexOf(U,K.length-U.length)!==-1}var h=function(K,U){if(K&&U){var B=Array.isArray(U)?U:U.split(","),V=K.name||"",ae=K.type||"",he=ae.replace(/\/.*$/,"");return B.some(function(pe){var Re=pe.trim();return Re.charAt(0)==="."?n(V.toLowerCase(),Re.toLowerCase()):/\/\*$/.test(Re)?he===Re.replace(/\/.*$/,""):ae===Re})}return!0};function f(K,U){var B=K.createReader(),V=[];function ae(){B.readEntries(function(he){var pe=Array.prototype.slice.apply(he);V=V.concat(pe);var Re=!pe.length;Re?U(V):ae()})}ae()}var c=function(U,B,V){var ae=function he(pe,Re){Re=Re||"",pe.isFile?pe.file(function(ke){V(ke)&&(pe.fullPath&&!ke.webkitRelativePath&&(Object.defineProperties(ke,{webkitRelativePath:{writable:!0}}),ke.webkitRelativePath=pe.fullPath.replace(/^\//,""),Object.defineProperties(ke,{webkitRelativePath:{writable:!1}})),B([ke]))}):pe.isDirectory&&f(pe,function(ke){ke.forEach(function(ve){he(ve,""+Re+pe.name+"/")})})};U.forEach(function(he){ae(he.webkitGetAsEntry())})},m=c,_=Object.assign||function(K){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(K,V))continue;B[V]=K[V]}return B}function S(K,U){if(!(K instanceof U))throw new TypeError("Cannot call a class as a function")}function x(K,U){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:K}function o(K,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);K.prototype=Object.create(U&&U.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(K,U):K.__proto__=U)}var k=function(U){return Object.keys(U).reduce(function(B,V){return(V.substr(0,5)==="data-"||V.substr(0,5)==="aria-"||V==="role")&&(B[V]=U[V]),B},{})},O=function(K){o(U,K);function U(){var B,V,ae,he;S(this,U);for(var pe=arguments.length,Re=Array(pe),ke=0;ke>>2]>>>24-k%4*8&255;t[x+k>>>2]|=O<<24-(x+k)%4*8}else for(var b=0;b>>2]=S[b>>>2];return this.sigBytes+=o,this},clamp:function(){var a=this.words,t=this.sigBytes;a[t>>>2]&=4294967295<<32-t%4*8,a.length=T.ceil(t/4)},clone:function(){var a=s.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var t=[],S=0;S>>2]>>>24-o%4*8&255;x.push((k>>>4).toString(16)),x.push((k&15).toString(16))}return x.join("")},parse:function(a){for(var t=a.length,S=[],x=0;x>>3]|=parseInt(a.substr(x,2),16)<<24-x%8*4;return new n.init(S,t/2)}},c=h.Latin1={stringify:function(a){for(var t=a.words,S=a.sigBytes,x=[],o=0;o>>2]>>>24-o%4*8&255;x.push(String.fromCharCode(k))}return x.join("")},parse:function(a){for(var t=a.length,S=[],x=0;x>>2]|=(a.charCodeAt(x)&255)<<24-x%4*8;return new n.init(S,t)}},m=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(c.stringify(a)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(a){return c.parse(unescape(encodeURIComponent(a)))}},_=l.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=m.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var t,S=this._data,x=S.words,o=S.sigBytes,k=this.blockSize,O=k*4,b=o/O;a?b=T.ceil(b):b=T.max((b|0)-this._minBufferSize,0);var v=b*k,g=T.min(v*4,o);if(v){for(var w=0;wTe)){ue.next=7;break}return T.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Te/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return z.push({name:ve.name,file:ve}),H(Object(D.a)(z)),N.onChange(z),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},ke)}));function Re(ke){return pe.apply(this,arguments)}return Re}()},he=function(){var pe=Object(E.a)(h.a.mark(function Re(ke,ve){var Te,be,ue,le,re,fe,q,ee,Ce;return h.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return ve.file_name=ke.name,q=ke.name,J.next=4,Object(m.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ee=J.sent,ee.data=JSON.parse(o(ee.data)),!((ee==null?void 0:ee.status)!==0)){J.next=12;break}return z[z.findIndex(function(X){return X.name===q})].status="error",z[z.findIndex(function(X){return X.name===q})].file.status="error",N.onChange(z),T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),J.abrupt("return");case 12:return B=new S.a({endpoint:ee==null||((Te=ee.data)===null||Te===void 0)?void 0:Te.end_point,region:ee==null||((be=ee.data)===null||be===void 0)?void 0:be.region,accessKeyId:ee==null||((ue=ee.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:ee==null||((le=ee.data)===null||le===void 0)?void 0:le.access_key_secret,bucket:ee==null||((re=ee.data)===null||re===void 0)?void 0:re.bucket,stsToken:ee==null||((fe=ee.data)===null||fe===void 0)?void 0:fe.security_token}),console.log(ke,"file"),V(B),Ce=Object(i.a)(),J.abrupt("return",new Promise(function(X,Q){try{var Ee;B.multipartUpload("".concat(N.identifier,"/").concat(Ce).concat(q.indexOf(".")>-1?"."+q.split(".").pop():""),new Blob([ke.file],{type:ke.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Oe,Qe,rt){try{console.log("\u8FDB\u5EA6",Oe,Qe,rt);var nt=z.findIndex(function(ut){return ut.name===q});z[nt].file.percent=Oe*100,z[nt].tempCheckpoint=Qe,H(Object(D.a)(z))}catch(ut){}},checkpoint:z[z.findIndex(function(ge){return ge.name===q})].tempCheckpoint,callback:{customValue:{id:q+""},url:ee==null||((Ee=ee.data)===null||Ee===void 0)?void 0:Ee.callback_url,host:ee==null?void 0:ee.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(ve)}}).then(function(ge){var Oe,Qe=z.findIndex(function(mt){return mt.name===q}),rt="done";if(((Oe=ge.data)===null||Oe===void 0?void 0:Oe.status)===0){var nt;ke.response=(nt=ge.data)===null||nt===void 0?void 0:nt.data;var ut=z.findIndex(function(mt){return mt.name===q});z[ut].status="done",z[ut].file.status="done"}else{var dt;T.b.warn((dt=ge.data)===null||dt===void 0?void 0:dt.message),rt="error"}z[Qe].status=rt,z[Qe].file.status=rt,N.onChange(z),X(ge==null?void 0:ge.data)}).catch(function(ge){z[z.findIndex(function(Oe){return Oe.name===q})].status="error",z[z.findIndex(function(Oe){return Oe.name===q})].file.status="error",T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H(Object(D.a)(z)),N.onChange(z),Q(ge),console.log("err:",ge)})}catch(ge){}}));case 17:case"end":return J.stop()}},Re)}));return function(ke,ve){return pe.apply(this,arguments)}}();return Object(f.useEffect)(function(){z.every(function(pe){return pe==="done"||pe==="error"})&&N.onComplete(z)},[z]),Object(f.useEffect)(function(){if(M){var pe;(pe=B)===null||pe===void 0||pe.cancel()}},[M]),Object(f.useEffect)(function(){N.uploading&&z.map(function(){var pe=Object(E.a)(h.a.mark(function Re(ke){var ve,Te;return h.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!ke.status||ke.status==="error")&&!M)){ue.next=6;break}return ke.status="uploading",ke.file.status="uploading",ue.next=5,he(ke,{login:w==null||((ve=w.userInfo)===null||ve===void 0)?void 0:ve.login,container_type:N.container_type,container_id:N.container_id,description:N.description});case 5:Te=ue.sent;case 6:case"end":return ue.stop()}},Re)}));return function(Re){return pe.apply(this,arguments)}}())},[N.uploading]),c.a.createElement(x,Object(P.a)({},ae,{height:N.height,className:N.className}),c.a.createElement("p",{className:"ant-upload-hint"},N.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Z.b=Object(a.a)(function(v){var g=v.loading,w=v.globalSetting,M=v.user;return{globalSetting:w,loading:g.models.competitions,user:M}})(b)},KmYQ:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(d,T){var D=T*4;d.clamp(),d.sigBytes+=D-(d.sigBytes%D||D)},unpad:function(d){for(var T=d.words,D=d.sigBytes-1,D=d.sigBytes-1;D>=0;D--)if(T[D>>>2]>>>24-D%4*8&255){d.sigBytes=D+1;break}}},P.pad.ZeroPadding})},LdHM:function(j,Z,L){"use strict";L.d(Z,"b",function(){return t}),L.d(Z,"a",function(){return x});var P=L("1OyB"),d=L("vuIU"),T=L("Ji7U"),D=L("LK+K"),u=L("q1tI"),p=L("rePB"),C=L("Ff2n"),E=L("ODXe"),l=L("4IlW"),s=L("bX4T"),n=L("YrtM"),h=L("TSYQ"),f=L.n(h),c=L("+nKL"),m=L("8OUc"),_=function(V,ae){var he=V.prefixCls,pe=V.id,Re=V.flattenOptions,ke=V.childrenAsData,ve=V.values,Te=V.searchValue,be=V.multiple,ue=V.defaultActiveFirstOption,le=V.height,re=V.itemHeight,fe=V.notFoundContent,q=V.open,ee=V.menuItemSelectedIcon,Ce=V.virtual,te=V.onSelect,J=V.onToggleOpen,X=V.onActiveValue,Q=V.onScroll,Ee=V.onMouseEnter,ge="".concat(he,"-item"),Oe=Object(n.a)(function(){return Re},[q,Re],function(st,Ue){return Ue[0]&&st[1]!==Ue[1]}),Qe=u.useRef(null),rt=function(Ue){Ue.preventDefault()},nt=function(Ue){Qe.current&&Qe.current.scrollTo({index:Ue})},ut=function(Ue){for(var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ne=Oe.length,xe=0;xe1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(B).map(function(ae,he){if(!u.isValidElement(ae)||!ae.type)return null;var pe=ae.type.isSelectOptGroup,Re=ae.key,ke=ae.props,ve=ke.children,Te=Object(C.a)(ke,["children"]);return V||!pe?O(ae):Object(o.a)(Object(o.a)({key:"__RC_SELECT_GRP__".concat(Re===null?he:Re,"__"),label:Re},Te),{},{options:b(ve)})}).filter(function(ae){return ae})}var v=L("2Qr1"),g=L("qNPg"),w=L("U8pU"),M=L("Kwbf"),N=L("WKfj");function I(B){var V=B.mode,ae=B.options,he=B.children,pe=B.backfill,Re=B.allowClear,ke=B.placeholder,ve=B.getInputElement,Te=B.showSearch,be=B.onSearch,ue=B.defaultOpen,le=B.autoFocus,re=B.labelInValue,fe=B.value,q=B.inputValue,ee=B.optionLabelProp,Ce=V==="multiple"||V==="tags",te=Te!==void 0?Te:Ce||V==="combobox",J=ae||b(he);if(Object(M.a)(V!=="tags"||J.every(function(ge){return!ge.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var X=J.some(function(ge){return ge.options?ge.options.some(function(Oe){return typeof("value"in Oe?Oe.value:Oe.key)=="number"}):typeof("value"in ge?ge.value:ge.key)=="number"});Object(M.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(V!=="combobox"||!ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(V==="combobox"||!pe,"`backfill` only works with `combobox` mode."),Object(M.a)(V==="combobox"||!ve,"`getInputElement` only work with `combobox` mode."),Object(M.b)(V!=="combobox"||!ve||!Re||!ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!te&&V!=="combobox"&&V!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!ue||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var Q=Object(N.d)(fe);Object(M.a)(!re||Q.every(function(ge){return Object(w.a)(ge)==="object"&&("key"in ge||"value"in ge)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!Ce||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var Ee=null;Object(k.a)(he).some(function(ge){if(!u.isValidElement(ge)||!ge.type)return!1;var Oe=ge.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var Qe=Object(k.a)(ge.props.children).every(function(rt){return!u.isValidElement(rt)||!ge.type||rt.type.isSelectOption?!0:(Ee=rt.type,!1)});return!Qe}return Ee=Oe,!0}),Ee&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ee.displayName||Ee.name||Ee,"`.")),Object(M.a)(q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=I,z=Object(g.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:b,flattenOptions:v.d,getLabeledValue:v.e,filterOptions:v.b,isValueDisabled:v.g,findValueOption:v.c,warningProps:G,fillOptionsWithMissingValue:v.a}),H=function(B){Object(T.a)(ae,B);var V=Object(D.a)(ae);function ae(){var he;return Object(P.a)(this,ae),he=V.apply(this,arguments),he.selectRef=u.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(d.a)(ae,[{key:"render",value:function(){return u.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),ae}(u.Component);H.Option=t,H.OptGroup=x;var K=H,U=Z.c=K},M8RZ:function(j,Z,L){"use strict";L.d(Z,"a",function(){return l});var P=L("fWQN"),d=L("mtLc"),T=L("yKVA"),D=L("879j"),u=L("q1tI"),p=L.n(u),C=L("i8i4"),E=L.n(C),l=function(s){Object(T.a)(h,s);var n=Object(D.a)(h);function h(f){var c;Object(P.a)(this,h),c=n.call(this,f);var m=window.document;return c.node=m.createElement("div"),m.body.appendChild(c.node),c}return Object(d.a)(h,[{key:"render",value:function(){var c=this.props.children;return Object(C.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(p.a.Component)},MlIO:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.Base,p=D.WordArray,C=T.x64={},E=C.Word=u.extend({init:function(s,n){this.high=s,this.low=n}}),l=C.WordArray=u.extend({init:function(s,n){s=this.words=s||[],n!=d?this.sigBytes=n:this.sigBytes=s.length*8},toX32:function(){for(var s=this.words,n=s.length,h=[],f=0;f1&&arguments[1]!==void 0?arguments[1]:!1;return!!(x(w)&&o(M))},x=function(w){return Object(n.p)()?!0:(w({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},o=function(){var w,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,N=Object(s.c)()._store.getState(),I=N.user;return(w=I.userInfo)!==null&&w!==void 0&&w.profile_completed?!0:(u.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:M?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){s.d.push("/account/profile/edit")}}),!1)},k=function(){var w,M=Object(s.c)()._store.getState(),N=M.user;return(w=N.userInfo)!==null&&w!==void 0&&w.professional_certification?!0:(u.a.confirm({title:"\u63D0\u793A",centered:!0,content:l.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(h.Q)("/account/certification")}}),!1)},O=function(){return Object(n.a)()?!0:(u.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:l.a.createElement("div",{className:"tc",style:{marginLeft:-38}},l.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),l.a.createElement("img",{src:Object(n.t)()?a.a:"".concat(t.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},b=function(w,M){return w?!0:(u.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:l.a.createElement("div",null,l.a.createElement("p",null,M||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),l.a.createElement("div",{style:{marginLeft:"110px"}},l.a.createElement("img",{src:y.a,width:200}),l.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(h.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},v=function(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",N=Object(s.c)()._store.getState(),I=N.shixunsDetail.detail;return(I==null?void 0:I.public)===2||(I==null?void 0:I.public)===1||(I==null?void 0:I.shixun_status)===3?(u.a.info({centered:!0,icon:l.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:l.a.createElement("div",{className:"tc",style:{marginLeft:-38}},l.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},l.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(I==null?void 0:I.public)===2?"\u5DF2\u516C\u5F00":(I==null?void 0:I.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",M,"\u3002"),l.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),l.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:m.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(I==null?void 0:I.shixun_status)===2?(u.a.confirm({centered:!0,icon:l.a.createElement(f.a,null),title:"\u63D0\u793A",content:l.a.createElement("div",null,l.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",M,"\u3002"),l.a.createElement("br",null),l.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){u.a.confirm({width:440,centered:!0,icon:l.a.createElement(f.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var z=Object(T.a)(C.a.mark(function K(){var U;return C.a.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,w({type:"shixunsDetail/cancelRelease",payload:{id:I==null?void 0:I.identifier}});case 2:U=V.sent,U.status!==401&&(d.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),w({type:"shixunsDetail/getShixunsDetail",payload:{id:I==null?void 0:I.identifier}}),w({type:"practiceSetting/getCommonData",payload:{id:I==null?void 0:I.identifier}}));case 4:case"end":return V.stop()}},K)}));function H(){return z.apply(this,arguments)}return H}()})}}),!0):!1}},NnUe:function(j,Z,L){j.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(j,Z,L){"use strict";L.d(Z,"a",function(){return p});var P=L("Kwbf");function d(C,E){var l=new Set;return C.forEach(function(s){E.has(s)||l.add(s)}),l}function T(C){var E=C||{},l=E.disabled,s=E.disableCheckbox,n=E.checkable;return!!(l||s)||n===!1}function D(C,E,l,s){for(var n=new Set(C),h=new Set,f=0;f<=l;f+=1){var c=E.get(f)||new Set;c.forEach(function(i){var a=i.key,t=i.node,S=i.children,x=S===void 0?[]:S;n.has(a)&&!s(t)&&x.filter(function(o){return!s(o.node)}).forEach(function(o){n.add(o.key)})})}for(var m=new Set,_=l;_>=0;_-=1){var y=E.get(_)||new Set;y.forEach(function(i){var a=i.parent,t=i.node;if(s(t)||!i.parent||m.has(i.parent.key))return;if(s(i.parent.node)){m.add(a.key);return}var S=!0,x=!1;(a.children||[]).filter(function(o){return!s(o.node)}).forEach(function(o){var k=o.key,O=n.has(k);S&&!O&&(S=!1),!x&&(O||h.has(k))&&(x=!0)}),S&&n.add(a.key),x&&h.add(a.key),m.add(a.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(d(h,n))}}function u(C,E,l,s,n){for(var h=new Set(C),f=new Set(E),c=0;c<=s;c+=1){var m=l.get(c)||new Set;m.forEach(function(a){var t=a.key,S=a.node,x=a.children,o=x===void 0?[]:x;!h.has(t)&&!f.has(t)&&!n(S)&&o.filter(function(k){return!n(k.node)}).forEach(function(k){h.delete(k.key)})})}f=new Set;for(var _=new Set,y=s;y>=0;y-=1){var i=l.get(y)||new Set;i.forEach(function(a){var t=a.parent,S=a.node;if(n(S)||!a.parent||_.has(a.parent.key))return;if(n(a.parent.node)){_.add(t.key);return}var x=!0,o=!1;(t.children||[]).filter(function(k){return!n(k.node)}).forEach(function(k){var O=k.key,b=h.has(O);x&&!b&&(x=!1),!o&&(b||f.has(O))&&(o=!0)}),x||h.delete(t.key),o&&f.add(t.key),_.add(t.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(d(f,h))}}function p(C,E,l,s){var n=[],h;s?h=s:h=T;var f=new Set(C.filter(function(y){var i=!!l[y];return i||n.push(y),i})),c=new Map,m=0;Object.keys(l).forEach(function(y){var i=l[y],a=i.level,t=c.get(a);t||(t=new Set,c.set(a,t)),t.add(i),m=Math.max(m,a)}),Object(P.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(y){return"'".concat(y,"'")}).join(", ")));var _;return E===!0?_=D(f,c,m,h):_=u(f,E.halfCheckedKeys,c,m,h),_}},OLod:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("K3mO"))})(this,function(P){P.lib.Cipher||function(d){var T=P,D=T.lib,u=D.Base,p=D.WordArray,C=D.BufferedBlockAlgorithm,E=T.enc,l=E.Utf8,s=E.Base64,n=T.algo,h=n.EvpKDF,f=D.Cipher=C.extend({cfg:u.extend(),createEncryptor:function(g,w){return this.create(this._ENC_XFORM_MODE,g,w)},createDecryptor:function(g,w){return this.create(this._DEC_XFORM_MODE,g,w)},init:function(g,w,M){this.cfg=this.cfg.extend(M),this._xformMode=g,this._key=w,this.reset()},reset:function(){C.reset.call(this),this._doReset()},process:function(g){return this._append(g),this._process()},finalize:function(g){g&&this._append(g);var w=this._doFinalize();return w},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function g(w){return typeof w=="string"?v:k}return function(w){return{encrypt:function(M,N,I){return g(N).encrypt(w,M,N,I)},decrypt:function(M,N,I){return g(N).decrypt(w,M,N,I)}}}}()}),c=D.StreamCipher=f.extend({_doFinalize:function(){var g=this._process(!0);return g},blockSize:1}),m=T.mode={},_=D.BlockCipherMode=u.extend({createEncryptor:function(g,w){return this.Encryptor.create(g,w)},createDecryptor:function(g,w){return this.Decryptor.create(g,w)},init:function(g,w){this._cipher=g,this._iv=w}}),y=m.CBC=function(){var g=_.extend();g.Encryptor=g.extend({processBlock:function(M,N){var I=this._cipher,G=I.blockSize;w.call(this,M,N,G),I.encryptBlock(M,N),this._prevBlock=M.slice(N,N+G)}}),g.Decryptor=g.extend({processBlock:function(M,N){var I=this._cipher,G=I.blockSize,z=M.slice(N,N+G);I.decryptBlock(M,N),w.call(this,M,N,G),this._prevBlock=z}});function w(M,N,I){var G,z=this._iv;z?(G=z,this._iv=d):G=this._prevBlock;for(var H=0;H>>2]&255;g.sigBytes-=w}},t=D.BlockCipher=f.extend({cfg:f.cfg.extend({mode:y,padding:a}),reset:function(){var g;f.reset.call(this);var w=this.cfg,M=w.iv,N=w.mode;this._xformMode==this._ENC_XFORM_MODE?g=N.createEncryptor:(g=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==g?this._mode.init(this,M&&M.words):(this._mode=g.call(N,this,M&&M.words),this._mode.__creator=g)},_doProcessBlock:function(g,w){this._mode.processBlock(g,w)},_doFinalize:function(){var g,w=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(w.pad(this._data,this.blockSize),g=this._process(!0)):(g=this._process(!0),w.unpad(g)),g},blockSize:128/32}),S=D.CipherParams=u.extend({init:function(g){this.mixIn(g)},toString:function(g){return(g||this.formatter).stringify(this)}}),x=T.format={},o=x.OpenSSL={stringify:function(g){var w,M=g.ciphertext,N=g.salt;return N?w=p.create([1398893684,1701076831]).concat(N).concat(M):w=M,w.toString(s)},parse:function(g){var w,M=s.parse(g),N=M.words;return N[0]==1398893684&&N[1]==1701076831&&(w=p.create(N.slice(2,4)),N.splice(0,4),M.sigBytes-=16),S.create({ciphertext:M,salt:w})}},k=D.SerializableCipher=u.extend({cfg:u.extend({format:o}),encrypt:function(g,w,M,N){N=this.cfg.extend(N);var I=g.createEncryptor(M,N),G=I.finalize(w),z=I.cfg;return S.create({ciphertext:G,key:M,iv:z.iv,algorithm:g,mode:z.mode,padding:z.padding,blockSize:g.blockSize,formatter:N.format})},decrypt:function(g,w,M,N){N=this.cfg.extend(N),w=this._parse(w,N.format);var I=g.createDecryptor(M,N).finalize(w.ciphertext);return I},_parse:function(g,w){return typeof g=="string"?w.parse(g,this):g}}),O=T.kdf={},b=O.OpenSSL={execute:function(g,w,M,N){N||(N=p.random(64/8));var I=h.create({keySize:w+M}).compute(g,N),G=p.create(I.words.slice(w),M*4);return I.sigBytes=w*4,S.create({key:I,iv:G,salt:N})}},v=D.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:b}),encrypt:function(g,w,M,N){N=this.cfg.extend(N);var I=N.kdf.execute(M,g.keySize,g.ivSize);N.iv=I.iv;var G=k.encrypt.call(this,g,w,I.key,N);return G.mixIn(I),G},decrypt:function(g,w,M,N){N=this.cfg.extend(N),w=this._parse(w,N.format);var I=N.kdf.execute(M,g.keySize,g.ivSize,w.salt);N.iv=I.iv;var G=k.decrypt.call(this,g,w,I.key,N);return G}})}()})},OZM5:function(j,Z,L){"use strict";L.d(Z,"b",function(){return s}),L.d(Z,"a",function(){return n}),L.d(Z,"k",function(){return h}),L.d(Z,"h",function(){return f}),L.d(Z,"i",function(){return c}),L.d(Z,"g",function(){return m}),L.d(Z,"c",function(){return _}),L.d(Z,"d",function(){return y}),L.d(Z,"j",function(){return t}),L.d(Z,"e",function(){return S}),L.d(Z,"f",function(){return x});var P=L("KQm4"),d=L("U8pU"),T=L("Ff2n"),D=L("q1tI"),u=L.n(D),p=L("Kwbf"),C=L("WaYH"),E=.25,l=2;function s(o,k){var O=o.slice(),b=O.indexOf(k);return b>=0&&O.splice(b,1),O}function n(o,k){var O=o.slice();return O.indexOf(k)===-1&&O.push(k),O}function h(o){return o.split("-")}function f(o,k){return"".concat(o,"-").concat(k)}function c(o){return o&&o.type&&o.type.isTreeNode}function m(o,k){var O=[o],b=k[o];function v(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];g.forEach(function(w){var M=w.key,N=w.children;O.push(M),v(N)})}return v(b.children),O}function _(o,k){var O=o.clientY,b=k.selectHandle.getBoundingClientRect(),v=b.top,g=b.bottom,w=b.height,M=Math.max(w*E,l);return O<=v+M?-1:O>=g-M?1:0}function y(o,k){if(!o)return;var O=k.multiple;return O?o.slice():o.length?[o[0]]:o}var i=function(k){return k};function a(o,k){if(!o)return[];var O=k||{},b=O.processProps,v=b===void 0?i:b,g=Array.isArray(o)?o:[o];return g.map(function(w){var M=w.children,N=Object(T.a)(w,["children"]),I=a(M,k);return u.a.createElement(C.a,Object.assign({},v(N)),I)})}function t(o){if(!o)return null;var k;if(Array.isArray(o))k={checkedKeys:o,halfCheckedKeys:void 0};else if(Object(d.a)(o)==="object")k={checkedKeys:o.checked||void 0,halfCheckedKeys:o.halfChecked||void 0};else return Object(p.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function S(o,k){var O=new Set;function b(v){if(O.has(v))return;var g=k[v];if(!g)return;O.add(v);var w=g.parent,M=g.node;if(M.disabled)return;w&&b(w.key)}return(o||[]).forEach(function(v){b(v)}),Object(P.a)(O)}function x(o){var k={};return Object.keys(o).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(k[O]=o[O])}),k}},Ot1p:function(j,Z,L){"use strict";var P=L("2qtc"),d=L("kLXV"),T=L("rAM+"),D=L("miYZ"),u=L("tsqr"),p=L("9og8"),C=L("tJVT"),E=L("jrin"),l=L("WmNS"),s=L.n(l),n=L("q1tI"),h=L.n(n),f=L("VrN/"),c=L.n(f),m=L("bdgK"),_=L("p77/"),y=L("Bd2K"),i=L("ELLl"),a=L("19Vz"),t=L("lZu9"),S=L("+NIl"),x=L("kSUc"),o=L("9Bee"),k=function(Ve){var gt=Ve.value,yt=gt===void 0?"":gt,Bt=Ve.className,Nt=Ve.showTextOnly,mr=Ve.showLines,hr=Ve.style,St=hr===void 0?{}:hr,$r=Object(n.useMemo)(function(){return""},[yt]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:$r}}))},O=L("0Owb"),b=L("dejd"),v=L("C+DQ"),g=L("1vsH"),w=L("m3rI"),M=[{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 N(Ve){var gt=Ve.onActionCallback,yt=Ve.title,Bt=Ve.icon,Nt=Ve.actionName,mr=Ve.className,hr=mr===void 0?"":mr,St=Ve.children;function $r(){gt(Nt)}return h.a.createElement("a",{title:yt,className:hr,onClick:$r},h.a.createElement("i",{className:"md-iconfont ".concat(Bt)}),St)}var I=function(Ve){var gt=Ve.watch,yt=Ve.showNullButton,Bt=Ve.onActionCallback,Nt=Ve.fullScreen,mr=Ve.insertTemp,hr=Ve.hidetoolBar,St=Ve.uuid,$r=Ve.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(g.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(g.E)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(w.a.PROXY_SERVER)));var Xr=[].concat(M,[{title:"".concat(gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(gt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!hr&&Xr.map(function(Ur,sn){return h.a.createElement("li",{key:sn},Ur.actionName?h.a.createElement(N,Object(O.a)({},Ur,{onActionCallback:Bt})):h.a.createElement("span",{className:"v-line"}))}),yt?h.a.createElement("li",null,h.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Bt},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,mr&&h.a.createElement("li",null,h.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(mr),onActionCallback:Bt},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(N,{icon:"".concat(Nt?"icon-shrink":"icon-enlarge"),title:Nt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Bt})))},G=L("M8RZ"),z=L("+L6B"),H=L("2/Rp"),K=L("y8nQ"),U=L("Vl3Y"),B=L("5NDa"),V=L("5rEg"),ae={labelCol:{span:4},wrapperCol:{span:20}},he=function(Ve){var gt=Ve.callback,yt=Ve.onCancel;function Bt(Nt){gt(Nt)}return h.a.createElement(U.a,Object(O.a)({},ae,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Bt}),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(V.a,null)),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(V.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))},pe=L("7ahc"),Re=L("k1fw"),ke=L("HmJG"),ve=L("BjJ7"),Te=U.a.useForm,be={width:280,marginRight:10},ue={labelCol:{span:5},wrapperCol:{span:19}},le=function(Ve){var gt=Ve.callback,yt=Ve.onCancel,Bt=Te(),Nt=Object(C.a)(Bt,1),mr=Nt[0],hr=Object(n.useRef)();function St(Ur){gt(Object(Re.a)(Object(Re.a)({},Ur),{},{name:hr.current}))}function $r(Ur,sn){mr.setFieldsValue({src:"/api/attachments/".concat(Ur.id,"?type=").concat(Ur.content_type),type:sn.type})}function Xr(Ur){var sn=Ur.target.files[0];hr.current=sn.name,fe(sn,$r)}return h.a.createElement(U.a,Object(O.a)({form:mr},ue,{className:"upload-image-panel",onFinish:St}),h.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},h.a.createElement(V.a,{style:be})),h.a.createElement(re,{onFileChange:Xr}))),h.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},h.a.createElement(V.a,{style:{width:264}})),h.a.createElement(U.a.Item,{style:{textAlign:"right"}},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))};function re(Ve){var gt=Ve.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:gt}))}function fe(Ve,gt){if(!Ve)throw new String("\u6CA1\u6709\u6587\u4EF6");var yt=new FormData;yt.append("editormd-image-file",Ve),yt.append("file_param_name","editormd-image-file"),yt.append("byxhr","true");var Bt=new window.XMLHttpRequest;Bt.withCredentials=!0,Bt.addEventListener("load",function(Nt){gt(JSON.parse(Nt.target.responseText),Ve)},!1),Bt.addEventListener("error",function(Nt){console.error(Nt)},!1),Bt.open("POST","".concat(ve.a,"/api/attachments.json")),Bt.send(yt)}var q=L("giR+"),ee=L("fyUT"),Ce=L("7Kak"),te=L("9yH6"),J=te.a.Group,X={margin:"0 8px"},Q=function(Ve){var gt=Ve.callback,yt=Ve.onCancel;function Bt(Nt){gt(Nt)}return h.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Bt},h.a.createElement("div",{className:"flex-container"},h.a.createElement("span",{style:X},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:X},"\u884C\u6570"),h.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(ee.a,null)),h.a.createElement("span",{style:X},"\u5217\u6570"),h.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(ee.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12}},h.a.createElement("span",{style:X},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(U.a.Item,{name:"align"},h.a.createElement(J,null,h.a.createElement(te.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(te.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(te.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(te.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))},Ee=L("ErOA"),ge=L("7Cbv"),Oe="link",Qe="upload-image",rt="code-block",nt="add-table",ut="------------",dt={default:ut,left:":".concat(ut),center:":".concat(ut,":"),right:"".concat(ut,":")},mt=L("9VGf"),He,De;function at(){}var ht=0,Ze=1e4,st="\u2581",Ue=` **\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(Ve){return/^\d+$/.test(Ve)?"".concat(Ve,"px"):Ve}var Ne=navigator.platform.toUpperCase().indexOf("MAC")>=0,xe=Ne?"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"],Ae=(He={},Object(E.a)(He,xe+"-B","bold"),Object(E.a)(He,xe+"-I","italic"),He),Le=(De={},Object(E.a)(De,Oe,"\u6DFB\u52A0\u94FE\u63A5"),Object(E.a)(De,rt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(E.a)(De,Qe,"\u6DFB\u52A0\u6587\u4EF6"),Object(E.a)(De,nt,"\u6DFB\u52A0\u8868\u683C"),De),Je=Z.a=function(Ve){var gt=Ve.defaultValue,yt=gt===void 0?"":gt,Bt=Ve.onChange,Nt=Ve.width,mr=Nt===void 0?"100%":Nt,hr=Ve.height,St=hr===void 0?400:hr,$r=Ve.miniToolbar,Xr=$r===void 0?!1:$r,Ur=Ve.isFocus,sn=Ur===void 0?!1:Ur,Rr=Ve.watch,mn=Ve.insertTemp,vn=Ve.mode,Gt=vn===void 0?"markdown":vn,Cn=Ve.id,yn=Cn===void 0?"markdown-editor-id":Cn,Sn=Ve.showResizeBar,xn=Sn===void 0?!1:Sn,xi=Ve.noStorage,Ti=xi===void 0?!1:xi,hn=Ve.showNullButton,cr=hn===void 0?!1:hn,Gn=Ve.hidetoolBar,pi=Gn===void 0?!1:Gn,Vn=Ve.fullScreen,Yr=Vn===void 0?!1:Vn,Un=Ve.onBlur,ui=Ve.onCMBeforeChange,ci=Ve.onFullScreen,jt=Ve.className,_r=jt===void 0?"":jt,ai=Ve.disablePaste,Oi=ai===void 0?!1:ai,Ai=Ve.placeholder,Ri=Ai===void 0?"":Ai,se=Ve.values,W=se===void 0?"":se,$=Object(n.useState)(null),ne=Object(C.a)($,2),ce=ne[0],oe=ne[1],Ke=Object(n.useState)(yt),At=Object(C.a)(Ke,2),Vt=At[0],vr=At[1],Pt=Object(n.useState)(Rr),Br=Object(C.a)(Pt,2),jr=Br[0],fn=Br[1],ti=Object(n.useState)(Yr),mi=Object(C.a)(ti,2),Rn=mi[0],Li=mi[1],qi=Object(n.useState)(""),Qn=Object(C.a)(qi,2),_i=Qn[0],vi=Qn[1],Fi=Object(n.useState)(0),gi=Object(C.a)(Fi,2),Gi=gi[0],Mi=gi[1],oa=Object(n.useState)(St),sa=Object(C.a)(oa,2),Ii=sa[0],Xn=sa[1],Vi=Object(n.useState)(!1),ta=Object(C.a)(Vi,2),Ct=ta[0],tt=ta[1],pt=Object(n.useRef)(Object(ge.a)()),_t=Object(n.useRef)(!1),Mt=Object(n.useRef)(),Dt=Object(n.useRef)(),Ht=Object(n.useRef)(),Wt=Object(n.useRef)(),ct=Object(n.useRef)(),Ot=function(){var Et=Object(p.a)(s.a.mark(function wt(){var xt,$t;return s.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return sr.next=2,Object(Ee.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:pt.current}});case 2:$t=sr.sent,$t!=null&&(xt=$t.attachments)!==null&&xt!==void 0&&xt.length&&(console.log("cm:",ce,Dt),$t.attachments.map(function(lr){lr.content_type.indexOf("image")>-1?ce.replaceSelection("![,](/api/attachments/".concat(lr.id,"?type=").concat(lr.content_type,")")):lr.content_type.indexOf("video")>-1?ce.replaceSelection('')):lr.content_type.indexOf("pdf")>-1?ce.replaceSelection('
    ').concat(lr.name,"")):ce.replaceSelection("[".concat(lr.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(lr.id,"?type=").concat(lr.content_type,")"))}));case 4:case"end":return sr.stop()}},wt)}));return function(){return Et.apply(this,arguments)}}();Object(n.useEffect)(function(){vr(W),ce==null||ce.setValue(W)},[W]),Object(n.useEffect)(function(){ci==null||ci(Rn)},[Rn]),Object(n.useEffect)(function(){if(Dt.current){var Et=c.a.fromTextArea(Dt.current,{mode:Gt,lineNumbers:!Xr,lineWrapping:!0,value:yt,autoCloseTags:!0,autoCloseBrackets:!0});sn&&Et.focus();function wt(xt,$t){if(Oi){$t.preventDefault();return}var ur=$t.clipboardData;if(ur){var sr=ur.types.toString(),lr=ur.items;if(sr==="Files"||ur.types.indexOf("Files")>-1){if($t.preventDefault(),Gt=="stex")return;try{var Tr,Zr=lr[1];((Tr=lr[0])===null||Tr===void 0?void 0:Tr.kind)==="file"&&(Zr=lr[0]);var et=Zr.getAsFile(),ir=et.name.split(".").pop();fe(et,function(Lr){if(Lr.id){var Jr,gr,pr;(et==null||((Jr=et.type)===null||Jr===void 0)?void 0:Jr.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(Lr.id,"?type=").concat(Lr.content_type,")")):(et==null||((gr=et.type)===null||gr===void 0)?void 0:gr.indexOf("video"))>-1?Et.replaceSelection('')):(et==null||((pr=et.type)===null||pr===void 0)?void 0:pr.indexOf("pdf"))>-1?Et.replaceSelection('').concat(et.name,"")):Se.includes(ir)?Et.replaceSelection('').concat(et.name,"")):Et.replaceSelection("[".concat(et.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(Lr.content_type,")"))}else(Lr==null?void 0:Lr.status)===401&&(document.location.href="/user/login")})}catch(Lr){u.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Et.on("paste",wt),Et.on("dragleave",function(xt,$t){Ht.current.classList.remove("mouse-hover-md")}),Et.on("dragover",function(xt,$t){Ht.current.classList.add("mouse-hover-md")}),Et.on("drop",function(xt,$t){Ht.current.classList.add("mouse-hover-md");var ur;if(ur=$t.dataTransfer.files,ur.length>0){$t.preventDefault(),$t.stopPropagation();for(var sr=function(Zr){var et=ur[Zr],ir=et.name.split(".").pop();fe(et,function(Lr){if(Lr.id){var Jr,gr,pr;(et==null||((Jr=et.type)===null||Jr===void 0)?void 0:Jr.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(Lr.id,"?type=").concat(Lr.content_type,")")):(et==null||((gr=et.type)===null||gr===void 0)?void 0:gr.indexOf("video"))>-1?Et.replaceSelection('')):(et==null||((pr=et.type)===null||pr===void 0)?void 0:pr.indexOf("pdf"))>-1?Et.replaceSelection('').concat(et.name,"")):Se.includes(ir)?Et.replaceSelection('').concat(et.name,"")):Et.replaceSelection("[".concat(et.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(Lr.content_type,")"))}else(Lr==null?void 0:Lr.status)===401&&(document.location.href="/user/login")})},lr=0;lr0||lr.target.offsetWidth>0)&&(Rt(),ce.setSize("100%","100%"),ce.refresh())}}catch(Tr){ur.e(Tr)}finally{ur.f()}});return xt.observe(Dt.current.parentElement),xt}if(ce){var wt=Et();return function(){wt.unobserve(Dt.current.parentElement)}}},[ce,Rt]),Object(n.useEffect)(function(){if(ce){for(var Et=[],wt=function(){var lr=$t[xt];ur=Object(C.a)(lr,2);var Tr=ur[0],Zr=ur[1],et=Object(E.a)({},Tr,function(){fr(Zr)});Et.push(et),ce.addKeyMap(et)},xt=0,$t=Object.entries(Ae);xt<$t.length;xt++){var ur;wt()}return Mt.current=setInterval(function(){_t.current&&Ot()},4e3),function(){clearInterval(Mt.current);var sr=Object(T.a)(Et),lr;try{for(sr.s();!(lr=sr.n()).done;){var Tr=lr.value;ce.removeKeyMap(Tr)}}catch(Zr){sr.e(Zr)}finally{sr.f()}}}},[ce]),Object(n.useEffect)(function(){Yr!==Rn&&Li(Yr)},[Yr]),Object(mt.a)(function(){if(!Ti&&Gi>0){var Et=new Date().getTime(),wt=window.sessionStorage.getItem(yn);Et>=Gi+Ze&&(!wt||wt!==Vt)&&(window.sessionStorage.setItem(yn,Vt),tt(!0))}},Ze),Object(n.useEffect)(function(){fn(Rr)},[ce,Rr]),Object(n.useEffect)(function(){ce&&(sn&&ce.focus())},[ce,sn]),Object(n.useEffect)(function(){if(jr&&ce){var Et=ce.getScrollerElement();function wt(xt){var $t=xt.target;if(ct.current){var ur=$t.scrollTop/$t.scrollHeight;ct.current.scrollTop=ct.current.scrollHeight*ur}}return Et.addEventListener("scroll",wt),function(){Et.removeEventListener("scroll",wt)}}},[ce,jr]),Object(n.useEffect)(function(){if(ce&&ui){function Et(wt,xt){ui(wt,xt)}return ce.on("beforeChange",Et),function(){ce.off("beforeChange",Et)}}},[ce,ui]),Object(n.useEffect)(function(){if(ce&&Un){function Et(){Un(ce.getValue())}return ce.on("blur",Et),function(){ce.off("blur",Et)}}},[ce,Un]),Object(n.useEffect)(function(){if(ce){function Et(wt){var xt=wt.getValue();vr(xt),Mi(new Date().getTime()),wt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Bt&&Bt(xt)}return ce.on("change",Et),function(){ce.off("change",Et)}}},[ce,Bt]),Object(n.useEffect)(function(){ce&&(yt==null?(ce.setValue(""),vr("")):yt!==ce.getValue()&&(ce.setValue(yt),vr(yt),ce.setCursor(ce.lineCount(),0)))},[ce,yt]);var fr=Object(n.useCallback)(function(Et){var wt=ce.getCursor(),xt=ce.getSelection(),$t=xt.split(` `);switch(Et){case"bold":return ce.replaceSelection("**"+xt+"**"),xt===""&&ce.setCursor(wt.line,wt.ch+2),ce.focus();case"italic":return ce.replaceSelection("*"+xt+"*"),xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.focus();case"code":return ce.replaceSelection("`"+xt+"`"),xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.focus();case"inline-latex":return ce.replaceSelection("`$$"+xt+"$$`"),xt===""&&ce.setCursor(wt.line,wt.ch+3),ce.focus();case"latex":return ce.replaceSelection("```latex\n"+xt+"\n```"),ce.setCursor(wt.line+1,xt.length+1),ce.focus();case"line-break":return ce.replaceSelection(`
    `),ce.focus();case"list-ul":return xt===""?ce.replaceSelection("- "+xt):ce.replaceSelection($t.map(function(ur){return ur===""?"":"- ".concat(ur)}).join(` `)),ce.focus();case"list-ol":return xt===""?ce.replaceSelection("1. "+xt):ce.replaceSelection($t.map(function(ur,sr){return ur===""?"":"".concat(sr+1,". ").concat(ur)}).join(` `)),ce.focus();case"add-null-ch":return xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.replaceSelection(st),ce.focus();case"inster-template-1":return xt===""&&ce.setCursor(wt.line,wt.ch),ce.replaceSelection(Ue),ce.focus();case"eraser":return ce.setValue(""),ce.focus();case"trigger-watch":return fn(!jr),ce.focus();case"trigger-full-screen":return Li(!Rn),ce.focus();case Oe:vi(Oe);return;case rt:vi(rt);return;case Qe:vi(Qe);return;case nt:vi(nt);return;default:throw new Error}},[ce,jr,Rn]),qt=Object(n.useCallback)(function(Et){vi("");switch(_i){case Oe:var wt=Et.title,xt=Et.link;return ce.replaceSelection("[".concat(wt,"](").concat(xt,")")),ce.focus();case rt:var $t=Et.language,ur=Et.content;return ce.replaceSelection(["```"+$t,ur,"```"].join(` `)),ce.focus();case Qe:var sr=Et.src,lr=Et.alt,Tr=Et.name;return sr.indexOf("type=image")>-1?ce.replaceSelection("![ ".concat(lr||""," ]( ").concat(sr,' "').concat(lr||"",'" )')):sr.indexOf("type=application/pdf")>-1?ce.replaceSelection('').concat(Tr,"")):ce.replaceSelection('').concat(Tr,"")),ce.focus();case nt:for(var Zr=Et.row,et=Et.col,ir=Et.align,Lr=` `,Jr=0;Jr300&&(Tr=300);var Zr=St+Tr+"px";Xn(Zr)}}return Et.addEventListener("mousedown",$t),document.addEventListener("mousemove",sr),document.addEventListener("mouseup",ur),function(){Et.removeEventListener("mousedown",$t),document.removeEventListener("mousemove",sr),document.removeEventListener("mouseup",ur)}}},[ce,Wt]),Object(n.useEffect)(function(){Xn(St)},[St]);var tr=Me(mr),or=Me(Ii),ot={width:tr,height:or},Dr=Object(n.useMemo)(function(){if(Gi){var Et=new Date(Gi),wt=Et.getHours(),xt=Et.getMinutes(),$t=Et.getSeconds();return wt=wt<10?"0"+wt:wt,xt=xt<10?"0"+xt:xt,$t=$t<10?"0"+$t:$t,"".concat(wt,":").concat(xt,":").concat($t)}return 0},[Gi]);function Ir(){window.sessionStorage.removeItem(yn),tt(!1),Mi(0)}function yr(){tt(!1),Mi(0),ce.setValue(window.sessionStorage.getItem(yn))}function er(Et,wt){var xt=ce.getValue();xt=xt.replace(Et,wt),vr(xt),ce==null||ce.setValue(xt)}return h.a.createElement(n.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ht},h.a.createElement("div",{className:"markdown-editor-container ".concat(_r," ").concat(jr?"on-preview":""," ").concat(Xr?"mini":""," ").concat(Rn?"full-screen":""),style:ot},h.a.createElement(I,{insertTemp:mn,watch:jr,fullScreen:Rn,showNullButton:cr,onActionCallback:fr,hidetoolBar:pi,uuid:pt.current,setOpenPhones:function(){_t.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:Dt,placeholder:Ri})),jr?h.a.createElement("div",{ref:ct,className:"preview-container"},Gt==="stex"&&h.a.createElement(k,{value:Vt}),Gt!=="stex"&&h.a.createElement(o.a,{edit:!0,value:Vt,replaces:er})):null))),xn?h.a.createElement("a",{ref:Wt,className:"editor-resize"}):null,h.a.createElement(G.a,null,Le[_i]?h.a.createElement(d.a,{centered:!0,title:Le[_i],visible:!0,onCancel:Kt,footer:null},Qt):null))}},PVpz:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.StreamCipher,u=d.algo,p=[],C=[],E=[],l=u.RabbitLegacy=D.extend({_doReset:function(){var n=this._key.words,h=this.cfg.iv,f=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],c=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var m=0;m<4;m++)s.call(this);for(var m=0;m<8;m++)c[m]^=f[m+4&7];if(h){var _=h.words,y=_[0],i=_[1],a=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,t=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,S=a>>>16|t&4294901760,x=t<<16|a&65535;c[0]^=a,c[1]^=S,c[2]^=t,c[3]^=x,c[4]^=a,c[5]^=S,c[6]^=t,c[7]^=x;for(var m=0;m<4;m++)s.call(this)}},_doProcessBlock:function(n,h){var f=this._X;s.call(this),p[0]=f[0]^f[5]>>>16^f[3]<<16,p[1]=f[2]^f[7]>>>16^f[5]<<16,p[2]=f[4]^f[1]>>>16^f[7]<<16,p[3]=f[6]^f[3]>>>16^f[1]<<16;for(var c=0;c<4;c++)p[c]=(p[c]<<8|p[c]>>>24)&16711935|(p[c]<<24|p[c]>>>8)&4278255360,n[h+c]^=p[c]},blockSize:128/32,ivSize:64/32});function s(){for(var n=this._X,h=this._C,f=0;f<8;f++)C[f]=h[f];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var f=0;f<8;f++){var c=n[f]+h[f],m=c&65535,_=c>>>16,y=((m*m>>>17)+m*_>>>15)+_*_,i=((c&4294901760)*c|0)+((c&65535)*c|0);E[f]=y^i}n[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,n[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,n[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,n[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,n[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,n[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,n[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,n[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}d.RabbitLegacy=D._createHelper(l)}(),P.RabbitLegacy})},RxwV:function(j,Z,L){"use strict";var P=L("q1tI"),d=L("uciX"),T=L("2W6z"),D=L.n(T),u=L("4IlW"),p=L("uK0f"),C=L.n(p);function E(Te,be){if(Te===be)return!0;if(!Te||!be)return!1;var ue=Te.length;if(be.length!==ue)return!1;for(var le=0;le0;(rt||fe.isLeaf===!1)&&(Oe+=" ".concat(Ce,"-menu-item-expand"),fe.loading||(Qe=P.createElement("span",{className:"".concat(Ce,"-menu-item-expand-icon")},J))),te==="hover"&&(rt||fe.isLeaf===!1)&&(ge={onMouseEnter:this.delayOnSelect.bind(this,Q),onMouseLeave:this.delayOnSelect.bind(this),onClick:Q}),this.isActiveOption(fe,q)&&(Oe+=" ".concat(Ce,"-menu-item-active"),ge.ref=this.saveMenuItem(q)),fe.disabled&&(Oe+=" ".concat(Ce,"-menu-item-disabled"));var nt=null;fe.loading&&(Oe+=" ".concat(Ce,"-menu-item-loading"),nt=X||null);var ut="";return"title"in fe?ut=fe.title:typeof fe[this.getFieldName("label")]=="string"&&(ut=fe[this.getFieldName("label")]),P.createElement("li",Object.assign({key:fe[this.getFieldName("value")],className:Oe,title:ut},ge,{role:"menuitem",onMouseDown:function(mt){return mt.preventDefault()}}),fe[this.getFieldName("label")],Qe,nt)}},{key:"getActiveOptions",value:function(fe){var q=this,ee=this.props.options,Ce=fe||this.props.activeValue;return C()(ee,function(te,J){return te[q.getFieldName("value")]===Ce[J]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var fe=this,q=this.props.options,ee=this.getActiveOptions().map(function(Ce){return Ce[fe.getFieldName("children")]}).filter(function(Ce){return!!Ce});return ee.unshift(q),ee}},{key:"delayOnSelect",value:function(fe){for(var q=this,ee=arguments.length,Ce=new Array(ee>1?ee-1:0),te=1;te=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Te,le))continue;ue[le]=Te[le]}}return ue}function b(Te,be){if(Te==null)return{};var ue={},le=Object.keys(Te),re,fe;for(fe=0;fe=0)continue;ue[re]=Te[re]}return ue}function v(Te){return N(Te)||M(Te)||w(Te)||g()}function g(){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 w(Te,be){if(!Te)return;if(typeof Te=="string")return I(Te,be);var ue=Object.prototype.toString.call(Te).slice(8,-1);if(ue==="Object"&&Te.constructor&&(ue=Te.constructor.name),ue==="Map"||ue==="Set")return Array.from(Te);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return I(Te,be)}function M(Te){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Te))return Array.from(Te)}function N(Te){if(Array.isArray(Te))return I(Te)}function I(Te,be){(be==null||be>Te.length)&&(be=Te.length);for(var ue=0,le=new Array(be);ue=X.length?0:Ee):(Ee-=1,Ee=Ee<0?X.length-1:Ee):Ee=0,te[J]=X[Ee][fe.getFieldName("value")]}else if(ee.keyCode===u.a.LEFT||ee.keyCode===u.a.BACKSPACE)ee.preventDefault(),te.splice(te.length-1,1);else if(ee.keyCode===u.a.RIGHT)ee.preventDefault(),X[Q]&&X[Q][fe.getFieldName("children")]&&te.push(X[Q][fe.getFieldName("children")][0][fe.getFieldName("value")]);else if(ee.keyCode===u.a.ESC||ee.keyCode===u.a.TAB){fe.setPopupVisible(!1);return}(!te||te.length===0)&&fe.setPopupVisible(!1);var ge=fe.getActiveOptions(te),Oe=ge[ge.length-1];fe.handleMenuSelect(Oe,ge.length-1,ee),fe.props.onKeyDown&&fe.props.onKeyDown(ee)},fe.saveTrigger=function(ee){fe.trigger=ee};var q=[];return"value"in re?q=re.value||[]:"defaultValue"in re&&(q=re.defaultValue||[]),D()(!("filedNames"in re),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),fe.state={popupVisible:re.popupVisible,activeValue:q,value:q,prevProps:re},fe.defaultFieldNames={label:"label",value:"value",children:"children"},fe}return H(le,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(fe){var q=this.defaultFieldNames,ee=this.props,Ce=ee.fieldNames,te=ee.filedNames;return"filedNames"in this.props?te[fe]||q[fe]:Ce[fe]||q[fe]}},{key:"getFieldNames",value:function(){var fe=this.props,q=fe.fieldNames,ee=fe.filedNames;return"filedNames"in this.props?ee:q}},{key:"getCurrentLevelOptions",value:function(){var fe=this,q=this.props.options,ee=q===void 0?[]:q,Ce=this.state.activeValue,te=Ce===void 0?[]:Ce,J=C()(ee,function(X,Q){return X[fe.getFieldName("value")]===te[Q]},{childrenKeyName:this.getFieldName("children")});return J[J.length-2]?J[J.length-2][this.getFieldName("children")]:v(ee).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(fe){var q=this;return C()(this.props.options||[],function(ee,Ce){return ee[q.getFieldName("value")]===fe[Ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var fe=this.props,q=fe.prefixCls,ee=fe.transitionName,Ce=fe.popupClassName,te=fe.options,J=te===void 0?[]:te,X=fe.disabled,Q=fe.builtinPlacements,Ee=fe.popupPlacement,ge=fe.children,Oe=fe.dropdownRender,Qe=O(fe,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),rt=P.createElement("div",null),nt="";J&&J.length>0?rt=P.createElement(S,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):nt=" ".concat(q,"-menus-empty");var ut=rt;return Oe&&(ut=Oe(rt)),P.createElement(d.a,Object.assign({ref:this.saveTrigger},Qe,{popupPlacement:Ee,builtinPlacements:Q,popupTransitionName:ee,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(q,"-menus"),popupClassName:Ce+nt,popup:ut}),P.cloneElement(ge,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(fe,q){var ee=q.prevProps,Ce=ee===void 0?{}:ee,te={prevProps:fe};return"value"in fe&&!E(Ce.value,fe.value)&&(te.value=fe.value||[],"loadData"in fe||(te.activeValue=fe.value||[])),"popupVisible"in fe&&(te.popupVisible=fe.popupVisible),te}}]),le}(P.Component);return Te.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:o,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Te}(),ke=Re,ve=Z.a=ke},S6kV:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.OFB=function(){var d=P.lib.BlockCipherMode.extend(),T=d.Encryptor=d.extend({processBlock:function(D,u){var p=this._cipher,C=p.blockSize,E=this._iv,l=this._keystream;E&&(l=this._keystream=E.slice(0),this._iv=void 0),p.encryptBlock(l,0);for(var s=0;s|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(te){for(var J=0,X=!1,Q=!1,Ee=0,ge=te.length;Ee122||(xe<65||Ne>90||at.push([Math.max(65,Ne)|32,Math.min(xe,90)|32]),xe<97||Ne>122||at.push([Math.max(97,Ne)&~32,Math.min(xe,122)&~32]))}}at.sort(function(Je,Ve){return Je[0]-Ve[0]||Ve[1]-Je[1]});for(var Se=[],Ae=[],st=0;stLe[0]&&(Le[1]+1>Le[0]&&Ze.push("-"),Ze.push(nt(Le[1])))}return Ze.push("]"),Ze.join("")}function dt(He){for(var De=He.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),at=De.length,ht=[],Ze=0,st=0;Ze=2&&Ne==="["?De[Ze]=ut(Ue):Ne!=="\\"&&(De[Ze]=Ue.replace(/[a-zA-Z]/g,function(Ae){var Le=Ae.charCodeAt(0);return"["+String.fromCharCode(Le&~32,Le|32)+"]"}))}return De.join("")}for(var mt=[],Ee=0,ge=te.length;Ee=0;)X[mt.charAt(He)]=dt;var De=dt[1],at=""+De;rt.hasOwnProperty(at)||(Qe.push(De),rt[at]=null)}Qe.push(/[\0-\uffff]/),Q=U(Qe)})();var Ee=J.length,ge=function(Oe){for(var Qe=Oe.sourceCode,rt=Oe.basePos,nt=Oe.sourceNode,ut=[rt,w],dt=0,mt=Qe.match(Q)||[],He={},De=0,at=mt.length;De=5&&Ze.substring(0,5)==="lang-",Ue&&!(st&&typeof st[1]=="string")&&(Ue=!1,Ze=I),Ue||(He[ht]=Ze)}var xe=dt;if(dt+=ht.length,!Ue)ut.push(rt+xe,Ze);else{var Se=st[1],Ae=ht.indexOf(Se),Le=Ae+Se.length;st[2]&&(Le=ht.length-st[2].length,Ae=Le-Se.length);var Je=Ze.substring(5);V(nt,rt+xe,ht.substring(0,Ae),ge,ut),V(nt,rt+xe+Ae,Se,le(Je,Se),ut),V(nt,rt+xe+Le,ht.substring(Le),ge,ut)}}Oe.decorations=ut};return ge}function Re(te){var J=[],X=[];te.tripleQuotedStrings?J.push([o,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):te.multiLineStrings?J.push([o,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([o,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),te.verbatimStrings&&X.push([o,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=te.hashComments;Q&&(te.cStyleComments?(Q>1?J.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([o,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([O,/^#[^\r\n]*/,null,"#"])),te.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ee=te.regexLiterals;if(Ee){var ge=Ee>1?"":` \r`,Oe=ge?".":"[\\S\\s]",Qe="/(?=[^/*"+ge+"])(?:[^/\\x5B\\x5C"+ge+"]|\\x5C"+Oe+"|\\x5B(?:[^\\x5C\\x5D"+ge+"]|\\x5C"+Oe+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+K+"("+Qe+")")])}var rt=te.types;rt&&X.push([b,rt]);var nt=(""+te.keywords).replace(/^ | $/g,"");nt.length&&X.push([k,new RegExp("^(?:"+nt.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([w,/^\s+/,null,` \r \xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return te.regexLiterals&&(ut+="(?!s*/)"),X.push([v,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[v,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[g,new RegExp(ut),null]),pe(J,X)}var ke=Re({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ve(te,J,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,Ee=/\r\n?|\n/,ge=te.ownerDocument,Oe=ge.createElement("li");te.firstChild;)Oe.appendChild(te.firstChild);var Qe=[Oe];function rt(De){var at=De.nodeType;if(at==1&&!Q.test(De.className))if(De.nodeName==="br")nt(De),De.parentNode&&De.parentNode.removeChild(De);else for(var ht=De.firstChild;ht;ht=ht.nextSibling)rt(ht);else if((at==3||at==4)&&X){var Ze=De.nodeValue,st=Ze.match(Ee);if(st){var Ue=Ze.substring(0,st.index);De.nodeValue=Ue;var Me=Ze.substring(st.index+st[0].length);if(Me){var Ne=De.parentNode;Ne.insertBefore(ge.createTextNode(Me),De.nextSibling)}nt(De),Ue||De.parentNode.removeChild(De)}}}function nt(De){for(;!De.nextSibling;)if(De=De.parentNode,!De)return;function at(st,Ue){var Me=Ue?st.cloneNode(!1):st,Ne=st.parentNode;if(Ne){var xe=at(Ne,1),Se=st.nextSibling;xe.appendChild(Me);for(var Ae=Se;Ae;Ae=Se)Se=Ae.nextSibling,xe.appendChild(Ae)}return Me}for(var ht=at(De.nextSibling,0),Ze;(Ze=ht.parentNode)&&Ze.nodeType===1;)ht=Ze;Qe.push(ht)}for(var ut=0;ut=Ne&&(rt+=2),ge>=xe&&(dt+=2)}}finally{Ze&&(Ze.style.display=st)}}var be={};function ue(te,J){for(var X=J.length;--X>=0;){var Q=J[X];be.hasOwnProperty(Q)?E.console&&console.warn("cannot override language handler %s",Q):be[Q]=te}}function le(te,J){return te&&be.hasOwnProperty(te)||(te=/^\s*]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ue(pe([[w,/^[\s]+/,null,` \r `],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[g,/^[=<>\/]+/],["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"]),ue(pe([],[[z,/^[\s\S]+/]]),["uq.val"]),ue(Re({keywords:h,hashComments:!0,cStyleComments:!0,types:x}),["c","cc","cpp","cxx","cyc","m"]),ue(Re({keywords:"null,true,false"}),["json"]),ue(Re({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:x}),["cs"]),ue(Re({keywords:f,cStyleComments:!0}),["java"]),ue(Re({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ue(Re({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ue(Re({keywords:y,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ue(Re({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ue(Re({keywords:_,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ue(Re({keywords:m,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ue(pe([],[[o,/^[\s\S]+/]]),["regex"]);function re(te){var J=te.langExtension;try{var X=B(te.sourceNode,te.pre),Q=X.sourceCode;te.sourceCode=Q,te.spans=X.spans,te.basePos=0,le(J,Q)(te),Te(te)}catch(Ee){E.console&&console.log(Ee&&Ee.stack||Ee)}}function fe(te,J,X){var Q=X||!1,Ee=J||null,ge=document.createElement("div");ge.innerHTML="
    "+te+"
    ",ge=ge.firstChild,Q&&ve(ge,Q,!0);var Oe={langExtension:Ee,numberLines:Q,sourceNode:ge,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Oe),ge.innerHTML}function q(te,J){var X=J||document.body,Q=X.ownerDocument||document;function Ee(Me){return X.getElementsByTagName(Me)}for(var ge=[Ee("pre"),Ee("code"),Ee("xmp")],Oe=[],Qe=0;Qe=15&&(h=!1,l=!0);var o=a&&(s||h&&(x==null||x<12.11)),k=T||C&&E>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,r){var R=e.className,A=O(r).exec(R);if(A){var F=R.slice(A.index+A[0].length);e.className=R.slice(0,A.index)+(F?A[1]+F:"")}};function v(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function g(e,r){return v(e).appendChild(r)}function w(e,r,R,A){var F=document.createElement(e);if(R&&(F.className=R),A&&(F.style.cssText=A),typeof r=="string")F.appendChild(document.createTextNode(r));else if(r)for(var Y=0;Y=r)return ie+(r-Y);ie+=de-Y,ie+=R-ie%R,Y=de+1}}var ae=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ae.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ae.prototype.set=function(e,r){this.f=r;var R=+new Date+e;(!this.id||R=r)return A+Math.min(ie,r-F);if(F+=Y-A,F+=R-F%R,A=Y+1,F>=r)return A}}var ue=[""];function le(e){for(;ue.length<=e;)ue.push(re(ue)+" ");return ue[e]}function re(e){return e[e.length-1]}function fe(e,r){for(var R=[],A=0;A"\x80"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function X(e,r){return r?r.source.indexOf("\\w")>-1&&J(e)?!0:r.test(e):J(e)}function Q(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var Ee=/[\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 ge(e){return e.charCodeAt(0)>=768&&Ee.test(e)}function Oe(e,r,R){for(;(R<0?r>0:rR?-1:1;;){if(r==R)return r;var F=(r+R)/2,Y=A<0?Math.ceil(F):Math.floor(F);if(Y==r)return e(Y)?r:R;e(Y)?R=Y:r=Y+A}}function rt(e,r,R,A){if(!e)return A(r,R,"ltr",0);for(var F=!1,Y=0;Yr||r==R&&ie.to==r)&&(A(Math.max(ie.from,r),Math.min(ie.to,R),ie.level==1?"rtl":"ltr",Y),F=!0)}F||A(r,R,"ltr")}var nt=null;function ut(e,r,R){var A;nt=null;for(var F=0;Fr)return F;Y.to==r&&(Y.from!=Y.to&&R=="before"?A=F:nt=F),Y.from==r&&(Y.from!=Y.to&&R!="before"?A=F:nt=F)}return A!=null?A:nt}var dt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(_e){return _e<=247?e.charAt(_e):1424<=_e&&_e<=1524?"R":1536<=_e&&_e<=1785?r.charAt(_e-1536):1774<=_e&&_e<=2220?"r":8192<=_e&&_e<=8203?"w":_e==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,Y=/[LRr]/,ie=/[Lb1n]/,de=/[1n]/;function me(_e,Be,$e){this.level=_e,this.from=Be,this.to=$e}return function(_e,Be){var $e=Be=="ltr"?"L":"R";if(_e.length==0||Be=="ltr"&&!A.test(_e))return!1;for(var lt=_e.length,it=[],Tt=0;Tt-1&&(A[r]=F.slice(0,Y).concat(F.slice(Y+1)))}}}function Ze(e,r){var R=at(e,r);if(!R.length)return;for(var A=Array.prototype.slice.call(arguments,2),F=0;F0}function Ne(e){e.prototype.on=function(r,R){De(this,r,R)},e.prototype.off=function(r,R){ht(this,r,R)}}function xe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Le(e){xe(e),Se(e)}function Je(e){return e.target||e.srcElement}function Ve(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),a&&e.ctrlKey&&r==1&&(r=3),r}var gt=function(){if(C&&E<9)return!1;var e=w("div");return"draggable"in e||"dragDrop"in e}(),yt;function Bt(e){if(yt==null){var r=w("span","\u200B");g(e,w("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(yt=r.offsetWidth<=1&&r.offsetHeight>2&&!(C&&E<8))}var R=yt?w("span","\u200B"):w("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Nt;function mr(e){if(Nt!=null)return Nt;var r=g(e,document.createTextNode("A\u062EA")),R=N(r,0,1).getBoundingClientRect(),A=N(r,1,2).getBoundingClientRect();return v(e),!R||R.left==R.right?!1:Nt=A.right-R.right<3}var hr=` b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],A=e.length;r<=A;){var F=e.indexOf(` `,r);F==-1&&(F=e.length);var Y=e.slice(r,e.charAt(F-1)=="\r"?F-1:F),ie=Y.indexOf("\r");ie!=-1?(R.push(Y.slice(0,ie)),r+=ie+1):(R.push(Y),r=F+1)}return R}:function(e){return e.split(/\r\n?|\n/)},St=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(R){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},$r=function(){var e=w("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Xr=null;function Ur(e){if(Xr!=null)return Xr;var r=g(e,w("span","x")),R=r.getBoundingClientRect(),A=N(r,0,1).getBoundingClientRect();return Xr=Math.abs(R.left-A.left)>1}var sn={},Rr={};function mn(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),sn[e]=r}function vn(e,r){Rr[e]=r}function Gt(e){if(typeof e=="string"&&Rr.hasOwnProperty(e))e=Rr[e];else if(e&&typeof e.name=="string"&&Rr.hasOwnProperty(e.name)){var r=Rr[e.name];typeof r=="string"&&(r={name:r}),e=Ce(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Gt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Gt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Cn(e,r){r=Gt(r);var R=sn[r.name];if(!R)return Cn(e,"text/plain");var A=R(e,r);if(yn.hasOwnProperty(r.name)){var F=yn[r.name];for(var Y in F){if(!F.hasOwnProperty(Y))continue;A.hasOwnProperty(Y)&&(A["_"+Y]=A[Y]),A[Y]=F[Y]}}if(A.name=r.name,r.helperType&&(A.helperType=r.helperType),r.modeProps)for(var ie in r.modeProps)A[ie]=r.modeProps[ie];return A}var yn={};function Sn(e,r){var R=yn.hasOwnProperty(e)?yn[e]:yn[e]={};B(r,R)}function xn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var R={};for(var A in r){var F=r[A];F instanceof Array&&(F=F.concat([])),R[A]=F}return R}function xi(e,r){for(var R;e.innerMode&&!(R=e.innerMode(r),!R||R.mode==e);)r=R.state,e=R.mode;return R||{mode:e,state:r}}function Ti(e,r,R){return e.startState?e.startState(r,R):!0}var hn=function(e,r,R){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};hn.prototype.eol=function(){return this.pos>=this.string.length},hn.prototype.sol=function(){return this.pos==this.lineStart},hn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},hn.prototype.next=function(){if(this.posr},hn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},hn.prototype.skipToEnd=function(){this.pos=this.string.length},hn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},hn.prototype.backUp=function(e){this.pos-=e},hn.prototype.column=function(){return this.lastColumnPos0?null:(Y&&r!==!1&&(this.pos+=Y[0].length),Y)}},hn.prototype.current=function(){return this.string.slice(this.start,this.pos)},hn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},hn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},hn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function cr(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var R=e;!R.lines;)for(var A=0;;++A){var F=R.children[A],Y=F.chunkSize();if(r=e.first&&rR?jt(R,cr(e,R).text.length):$(r,cr(e,r.line).text.length)}function $(e,r){var R=e.ch;return R==null||R>r?jt(e.line,r):R<0?jt(e.line,0):e}function ne(e,r){for(var R=[],A=0;Athis.maxLookAhead&&(this.maxLookAhead=e),r},oe.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},oe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oe.fromSaved=function(e,r,R){return r instanceof ce?new oe(e,xn(e.mode,r.state),R,r.lookAhead):new oe(e,xn(e.mode,r),R)},oe.prototype.save=function(e){var r=e!==!1?xn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(r,this.maxLookAhead):r};function Ke(e,r,R,A){var F=[e.state.modeGen],Y={};mi(e,r.text,e.doc.mode,R,function(_e,Be){return F.push(_e,Be)},Y,A);for(var ie=R.state,de=function(_e){R.baseTokens=F;var Be=e.state.overlays[_e],$e=1,lt=0;R.state=!0,mi(e,r.text,Be.mode,R,function(it,Tt){for(var Ut=$e;ltit&&F.splice($e,1,it,F[$e+1],Yt),$e+=2,lt=Math.min(it,Yt)}if(!Tt)return;if(Be.opaque)F.splice(Ut,$e-Ut,it,"overlay "+Tt),$e=Ut+2;else for(;Ut<$e;Ut+=2){var rr=F[Ut+1];F[Ut+1]=(rr?rr+" ":"")+"overlay "+Tt}},Y),R.state=ie,R.baseTokens=null,R.baseTokenPos=1},me=0;mee.options.maxHighlightLength&&xn(e.doc.mode,A.state),Y=Ke(e,r,A);F&&(A.state=F),r.stateAfter=A.save(!F),r.styles=Y.styles,Y.classes?r.styleClasses=Y.classes:r.styleClasses&&(r.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function Vt(e,r,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new oe(A,!0,r);var Y=Rn(e,r,R),ie=Y>A.first&&cr(A,Y-1).stateAfter,de=ie?oe.fromSaved(A,ie,Y):new oe(A,Ti(A.mode),Y);return A.iter(Y,r,function(me){vr(e,me.text,de);var _e=de.line;me.stateAfter=_e==r-1||_e%5==0||_e>=F.viewFrom&&_er.start)return Y}throw new Error("Mode "+e.name+" failed to advance stream.")}var jr=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function fn(e,r,R,A){var F=e.doc,Y=F.mode,ie;r=W(F,r);var de=cr(F,r.line),me=Vt(e,r.line,R),_e=new hn(de.text,e.options.tabSize,me),Be;for(A&&(Be=[]);(A||_e.pose.options.maxHighlightLength?(de=!1,ie&&vr(e,r,A,Be.pos),Be.pos=r.length,$e=null):$e=ti(Br(R,Be,A.state,lt),Y),lt){var it=lt[0].name;it&&($e="m-"+($e?it+" "+$e:it))}if(!de||_e!=$e){for(;meie;--de){if(de<=Y.first)return Y.first;var me=cr(Y,de-1),_e=me.stateAfter;if(_e&&(!R||de+(_e instanceof ce?_e.lookAhead:0)<=Y.modeFrontier))return de;var Be=V(me.text,null,e.options.tabSize);(F==null||A>Be)&&(F=de-1,A=Be)}return F}function Li(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontierR;A--){var F=cr(e,A).stateAfter;if(F&&(!(F instanceof ce)||A+F.lookAhead=r:Y.to>r);(A||(A=[])).push(new Fi(ie,Y.from,me?null:Y.to))}}return A}function sa(e,r,R){var A;if(e)for(var F=0;F=r:Y.to>r);if(de||Y.from==r&&ie.type=="bookmark"&&(!R||Y.marker.insertLeft)){var me=Y.from==null||(ie.inclusiveLeft?Y.from<=r:Y.from0&&de)for(var Sr=0;Sr0)continue;var Be=[me,1],$e=_r(_e.from,de.from),lt=_r(_e.to,de.to);($e<0||!ie.inclusiveLeft&&!$e)&&Be.push({from:_e.from,to:de.from}),(lt>0||!ie.inclusiveRight&&!lt)&&Be.push({from:de.to,to:_e.to}),F.splice.apply(F,Be),me+=Be.length-3}return F}function ta(e){var r=e.markedSpans;if(!r)return;for(var R=0;Rr)&&(!A||_t(A,Y.marker)<0)&&(A=Y.marker)}return A}function ct(e,r,R,A,F){var Y=cr(e,r),ie=Qn&&Y.markedSpans;if(ie)for(var de=0;de=0&&$e<=0||Be<=0&&$e>=0)continue;if(Be<=0&&(me.marker.inclusiveRight&&F.inclusiveLeft?_r(_e.to,R)>=0:_r(_e.to,R)>0)||Be>=0&&(me.marker.inclusiveRight&&F.inclusiveLeft?_r(_e.from,A)<=0:_r(_e.from,A)<0))return!0}}function Ot(e){for(var r;r=Dt(e);)e=r.find(-1,!0).line;return e}function Rt(e){for(var r;r=Ht(e);)e=r.find(1,!0).line;return e}function fr(e){for(var r,R;r=Ht(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function qt(e,r){var R=cr(e,r),A=Ot(R);return R==A?r:Yr(A)}function Qt(e,r){if(r>e.lastLine())return r;var R=cr(e,r),A;if(!Kt(e,R))return r;for(;A=Ht(R);)R=A.find(1,!0).line;return Yr(R)+1}function Kt(e,r){var R=Qn&&r.markedSpans;if(R)for(var A=void 0,F=0;Fr.maxLineLength&&(r.maxLineLength=F,r.maxLine=A)})}var Ir=function(e,r,R){this.text=e,Ct(this,r),this.height=R?R(this):1};Ir.prototype.lineNo=function(){return Yr(this)},Ne(Ir);function yr(e,r,R,A){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ta(e),Ct(e,R);var F=A?A(e):1;F!=e.height&&Vn(e,F)}function er(e){e.parent=null,ta(e)}var Et={},wt={};function xt(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?wt:Et;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function $t(e,r){var R=M("span",null,null,l?"padding-right: .1px":null),A={pre:M("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var F=0;F<=(r.rest?r.rest.length:0);F++){var Y=F?r.rest[F-1]:r.line,ie=void 0;A.pos=0,A.addToken=sr,mr(e.display.measure)&&(ie=mt(Y,e.doc.direction))&&(A.addToken=Tr(A.addToken,ie)),A.map=[];var de=r!=e.display.externalMeasured&&Yr(Y);et(Y,A,At(e,Y,de)),Y.styleClasses&&(Y.styleClasses.bgClass&&(A.bgClass=H(Y.styleClasses.bgClass,A.bgClass||"")),Y.styleClasses.textClass&&(A.textClass=H(Y.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Bt(e.display.measure))),F==0?(r.measure.map=A.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(A.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(l){var me=A.content.lastChild;(/\bcm-tab\b/.test(me.className)||me.querySelector&&me.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Ze(e,"renderLine",e,r.line,A.pre),A.pre.className&&(A.textClass=H(A.pre.className,A.textClass||"")),A}function ur(e){var r=w("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function sr(e,r,R,A,F,Y,ie){if(!r)return;var de=e.splitSpaces?lr(r,e.trailingSpace):r,me=e.cm.state.specialChars,_e=!1,Be;if(!me.test(r))e.col+=r.length,Be=document.createTextNode(de),e.map.push(e.pos,e.pos+r.length,Be),C&&E<9&&(_e=!0),e.pos+=r.length;else{Be=document.createDocumentFragment();for(var $e=0;;){me.lastIndex=$e;var lt=me.exec(r),it=lt?lt.index-$e:r.length-$e;if(it){var Tt=document.createTextNode(de.slice($e,$e+it));C&&E<9?Be.appendChild(w("span",[Tt])):Be.appendChild(Tt),e.map.push(e.pos,e.pos+it,Tt),e.col+=it,e.pos+=it}if(!lt)break;$e+=it+1;var Ut=void 0;if(lt[0]==" "){var Yt=e.cm.options.tabSize,rr=Yt-e.col%Yt;Ut=Be.appendChild(w("span",le(rr),"cm-tab")),Ut.setAttribute("role","presentation"),Ut.setAttribute("cm-text"," "),e.col+=rr}else lt[0]=="\r"||lt[0]==` `?(Ut=Be.appendChild(w("span",lt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ut.setAttribute("cm-text",lt[0]),e.col+=1):(Ut=e.cm.options.specialCharPlaceholder(lt[0]),Ut.setAttribute("cm-text",lt[0]),C&&E<9?Be.appendChild(w("span",[Ut])):Be.appendChild(Ut),e.col+=1);e.map.push(e.pos,e.pos+1,Ut),e.pos++}}if(e.trailingSpace=de.charCodeAt(r.length-1)==32,R||A||F||_e||Y||ie){var Er=R||"";A&&(Er+=A),F&&(Er+=F);var nr=w("span",[Be],Er,Y);if(ie)for(var Sr in ie)ie.hasOwnProperty(Sr)&&Sr!="style"&&Sr!="class"&&nr.setAttribute(Sr,ie[Sr]);return e.content.appendChild(nr)}e.content.appendChild(Be)}function lr(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,A="",F=0;F_e&&$e.from<=_e);lt++);if($e.to>=Be)return e(R,A,F,Y,ie,de,me);e(R,A.slice(0,$e.to-_e),F,Y,null,de,me),Y=null,A=A.slice($e.to-_e),_e=$e.to}}}function Zr(e,r,R,A){var F=!A&&R.widgetNode;F&&e.map.push(e.pos,e.pos+r,F),!A&&e.cm.display.input.needsContentAttribute&&(F||(F=e.content.appendChild(document.createElement("span"))),F.setAttribute("cm-marker",R.id)),F&&(e.cm.display.input.setUneditable(F),e.content.appendChild(F)),e.pos+=r,e.trailingSpace=!1}function et(e,r,R){var A=e.markedSpans,F=e.text,Y=0;if(!A){for(var ie=1;ieme||gn.collapsed&&Hr.to==me&&Hr.from==me)){if(Hr.to!=null&&Hr.to!=me&&it>Hr.to&&(it=Hr.to,Ut=""),gn.className&&(Tt+=" "+gn.className),gn.css&&(lt=(lt?lt+";":"")+gn.css),gn.startStyle&&Hr.from==me&&(Yt+=" "+gn.startStyle),gn.endStyle&&Hr.to==it&&(Sr||(Sr=[])).push(gn.endStyle,Hr.to),gn.title&&((Er||(Er={})).title=gn.title),gn.attributes)for(var Kn in gn.attributes)(Er||(Er={}))[Kn]=gn.attributes[Kn];gn.collapsed&&(!rr||_t(rr.marker,gn)<0)&&(rr=Hr)}else Hr.from>me&&it>Hr.from&&(it=Hr.from)}if(Sr)for(var Ci=0;Ci=de)break;for(var ea=Math.min(de,it);;){if(Be){var Ji=me+Be.length;if(!rr){var hi=Ji>ea?Be.slice(0,ea-me):Be;r.addToken(r,hi,$e?$e+Tt:Tt,Yt,me+hi.length==it?Ut:"",lt,Er)}if(Ji>=ea){Be=Be.slice(ea-me),me=ea;break}me=Ji,Yt=""}Be=F.slice(Y,Y=R[_e++]),$e=xt(R[_e++],r.cm.options)}}}function ir(e,r,R){this.line=r,this.rest=fr(r),this.size=this.rest?Yr(re(this.rest))-R+1:1,this.node=this.text=null,this.hidden=Kt(e,r)}function Lr(e,r,R){for(var A=[],F,Y=r;Y2&&Y.push((me.bottom+_e.top)/2-R.top)}}Y.push(R.bottom-R.top)}}function we(e,r,R){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;AR)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function je(e,r){r=Ot(r);var R=Yr(r),A=e.display.externalMeasured=new ir(e.doc,r,R);A.lineN=R;var F=A.built=$t(e,A);return A.text=F.pre,g(e.display.lineMeasure,F.pre),A}function ze(e,r,R,A){return qe(e,We(e,r),R,A)}function Xe(e,r){if(r>=e.display.viewFrom&&r=R.lineN&&rr)&&(Y=me-de,F=Y-1,r>=me&&(ie="right")),F!=null){if(A=e[_e+2],de==me&&R==(A.insertLeft?"left":"right")&&(ie=R),R=="left"&&F==0)for(;_e&&e[_e-2]==e[_e-3]&&e[_e-1].insertLeft;)A=e[(_e-=3)+2],ie="left";if(R=="right"&&F==me-de)for(;_e=0&&!((R=e[F]).left!=R.right);F--);return R}function Xt(e,r,R,A){var F=kt(r.map,R,A),Y=F.node,ie=F.start,de=F.end,me=F.collapse,_e;if(Y.nodeType==3){for(var Be=0;Be<4;Be++){for(;ie&&ge(r.line.text.charAt(F.coverStart+ie));)--ie;for(;F.coverStart+de0&&(me=A="right");var $e;e.options.lineWrapping&&($e=Y.getClientRects()).length>1?_e=$e[A=="right"?$e.length-1:0]:_e=Y.getBoundingClientRect()}if(C&&E<9&&!ie&&(!_e||!_e.left&&!_e.right)){var lt=Y.parentNode.getClientRects()[0];lt?_e={left:lt.left,right:lt.left+ri(e.display),top:lt.top,bottom:lt.bottom}:_e=ft}for(var it=_e.top-r.rect.top,Tt=_e.bottom-r.rect.top,Ut=(it+Tt)/2,Yt=r.view.measure.heights,rr=0;rr=A.text.length?(me=A.text.length,_e="before"):me<=0&&(me=0,_e="after"),!de)return ie(_e=="before"?me-1:me,_e=="before");function Be(Tt,Ut,Yt){var rr=de[Ut],Er=rr.level==1;return ie(Yt?Tt-1:Tt,Er!=Yt)}var $e=ut(de,me,_e),lt=nt,it=Be(me,$e,_e=="before");return lt!=null&&(it.other=Be(me,lt,_e!="before")),it}function Mr(e,r){var R=0;r=W(e.doc,r),e.options.lineWrapping||(R=ri(e.display)*r.ch);var A=cr(e.doc,r.line),F=or(A)+$n(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Fr(e,r,R,A,F){var Y=jt(e,r,R);return Y.xRel=F,A&&(Y.outside=A),Y}function nn(e,r,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Fr(A.first,0,null,-1,-1);var F=Un(A,R),Y=A.first+A.size-1;if(F>Y)return Fr(A.first+A.size-1,cr(A,Y).text.length,null,1,1);r<0&&(r=0);for(var ie=cr(A,F);;){var de=Wn(e,ie,F,r,R),me=Wt(ie,de.ch+(de.xRel>0||de.outside>0?1:0));if(!me)return de;var _e=me.find(1);if(_e.line==F)return _e;ie=cr(A,F=_e.line)}}function dn(e,r,R,A){A-=tn(r);var F=r.text.length,Y=Qe(function(ie){return qe(e,R,ie-1).bottom<=A},F,0);return F=Qe(function(ie){return qe(e,R,ie).top>A},Y,F),{begin:Y,end:F}}function wr(e,r,R,A){R||(R=We(e,r));var F=pn(e,r,qe(e,R,A),"line").top;return dn(e,r,R,F)}function bn(e,r,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>r}function Wn(e,r,R,A,F){F-=or(r);var Y=We(e,r),ie=tn(r),de=0,me=r.text.length,_e=!0,Be=mt(r,e.doc.direction);if(Be){var $e=(e.options.lineWrapping?Mn:wn)(e,r,R,Y,Be,A,F);_e=$e.level!=1,de=_e?$e.from:$e.to-1,me=_e?$e.to:$e.from-1}var lt=null,it=null,Tt=Qe(function(Vr){var Hr=qe(e,Y,Vr);return Hr.top+=ie,Hr.bottom+=ie,bn(Hr,A,F,!1)?(Hr.top<=F&&Hr.left<=A&&(lt=Vr,it=Hr),!0):!1},de,me),Ut,Yt,rr=!1;if(it){var Er=A-it.left=Sr.bottom?1:0}return Tt=Oe(r.text,Tt,1),Fr(R,Tt,Yt,rr,A-Ut)}function wn(e,r,R,A,F,Y,ie){var de=Qe(function($e){var lt=F[$e],it=lt.level!=1;return bn(ln(e,jt(R,it?lt.to:lt.from,it?"before":"after"),"line",r,A),Y,ie,!0)},0,F.length-1),me=F[de];if(de>0){var _e=me.level!=1,Be=ln(e,jt(R,_e?me.from:me.to,_e?"after":"before"),"line",r,A);bn(Be,Y,ie,!0)&&Be.top>ie&&(me=F[de-1])}return me}function Mn(e,r,R,A,F,Y,ie){var de=dn(e,r,A,ie),me=de.begin,_e=de.end;/\s/.test(r.text.charAt(_e-1))&&_e--;for(var Be=null,$e=null,lt=0;lt=_e||it.to<=me)continue;var Tt=it.level!=1,Ut=qe(e,A,Tt?Math.min(_e,it.to)-1:Math.max(me,it.from)).right,Yt=UtYt)&&(Be=it,$e=Yt)}return Be||(Be=F[F.length-1]),Be.from_e&&(Be={from:Be.from,to:_e,level:Be.level}),Be}var Tn;function Yn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Tn==null){Tn=w("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Tn.appendChild(document.createTextNode("x")),Tn.appendChild(w("br"));Tn.appendChild(document.createTextNode("x"))}g(e.measure,Tn);var R=Tn.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),v(e.measure),R||1}function ri(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=w("span","xxxxxxxxxx"),R=w("pre",[r],"CodeMirror-line-like");g(e.measure,R);var A=r.getBoundingClientRect(),F=(A.right-A.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function Hn(e){for(var r=e.display,R={},A={},F=r.gutters.clientLeft,Y=r.gutters.firstChild,ie=0;Y;Y=Y.nextSibling,++ie){var de=e.display.gutterSpecs[ie].className;R[de]=Y.offsetLeft+Y.clientLeft+F,A[de]=Y.clientWidth}return{fixedPos:di(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:r.wrapper.clientWidth}}function di(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var r=Yn(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/ri(e.display)-3);return function(F){if(Kt(e.doc,F))return 0;var Y=0;if(F.widgets)for(var ie=0;ie0&&(_e=cr(e.doc,me.line).text).length==me.ch){var Be=V(_e,_e.length,e.options.tabSize)-_e.length;me=jt(me.line,Math.max(0,Math.round((Y-Ge(e.display).left)/ri(e.display))-Be))}return me}function In(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var R=e.display.view,A=0;Ar)&&(F.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=F.viewTo)Qn&&qt(e.doc,r)F.viewFrom?Bn(e):(F.viewFrom+=A,F.viewTo+=A);else if(r<=F.viewFrom&&R>=F.viewTo)Bn(e);else if(r<=F.viewFrom){var Y=Zn(e,R,R+A,1);Y?(F.view=F.view.slice(Y.index),F.viewFrom=Y.lineN,F.viewTo+=A):Bn(e)}else if(R>=F.viewTo){var ie=Zn(e,r,r,-1);ie?(F.view=F.view.slice(0,ie.index),F.viewTo=ie.lineN):Bn(e)}else{var de=Zn(e,r,r,-1),me=Zn(e,R,R+A,1);de&&me?(F.view=F.view.slice(0,de.index).concat(Lr(e,de.lineN,me.lineN)).concat(F.view.slice(me.index)),F.viewTo+=A):Bn(e)}var _e=F.externalMeasured;_e&&(R<_e.lineN?_e.lineN+=A:r<_e.lineN+_e.size&&(F.externalMeasured=null))}function zn(e,r,R){e.curOp.viewChanged=!0;var A=e.display,F=e.display.externalMeasured;if(F&&r>=F.lineN&&r=A.viewTo)return;var Y=A.view[In(e,r)];if(Y.node==null)return;var ie=Y.changes||(Y.changes=[]);he(ie,R)==-1&&ie.push(R)}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zn(e,r,R,A){var F=In(e,r),Y,ie=e.display.view;if(!Qn||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var de=e.display.viewFrom,me=0;me0){if(F==ie.length-1)return null;Y=de+ie[F].size-r,F++}else Y=de-r;r+=Y,R+=Y}for(;qt(e.doc,R)!=R;){if(F==(A<0?0:ie.length-1))return null;R+=A*ie[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function Di(e,r,R){var A=e.display,F=A.view;F.length==0||r>=A.viewTo||R<=A.viewFrom?(A.view=Lr(e,r,R),A.viewFrom=r):(A.viewFrom>r?A.view=Lr(e,r,A.viewFrom).concat(A.view):A.viewFromR&&(A.view=A.view.slice(0,In(e,R)))),A.viewTo=R}function ra(e){for(var r=e.display.view,R=0,A=0;A=e.display.viewTo||de.to().line0?r.blinker=setInterval(function(){e.hasFocus()||ua(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),la(e))}function wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ua(e))},100)}function la(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ze(e,"focus",e,r),e.state.focused=!0,z(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()),qn(e)}function ua(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ze(e,"blur",e,r),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Pa(e){for(var r=e.display,R=r.lineDiv.offsetTop,A=0;A.005||Be<-.005)&&(Vn(F.line,ie),Ca(F.line),F.rest))for(var $e=0;$ee.display.sizerWidth){var lt=Math.ceil(de/ri(e.display));lt>e.display.maxLineLength&&(e.display.maxLineLength=lt,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function Ca(e){if(e.widgets)for(var r=0;r=ie&&(Y=Un(r,or(cr(r,me))-e.wrapper.clientHeight),ie=me)}return{from:Y,to:Math.max(ie,Y+1)}}function Wa(e,r){if(st(e,"scrollCursorIntoView"))return;var R=e.display,A=R.sizer.getBoundingClientRect(),F=null;if(r.top+A.top<0?F=!0:r.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(F=!1),F!=null&&!m){var Y=w("div","\u200B",null,`position: absolute; top: `+(r.top-R.viewOffset-$n(e.display))+`px; height: `+(r.bottom-r.top+Ye(e)+R.barHeight)+`px; left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(Y),Y.scrollIntoView(F),e.display.lineSpace.removeChild(Y)}}function Xa(e,r,R,A){A==null&&(A=0);var F;!e.options.lineWrapping&&r==R&&(r=r.ch?jt(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?jt(r.line,r.ch+1,"before"):r);for(var Y=0;Y<5;Y++){var ie=!1,de=ln(e,r),me=!R||R==r?de:ln(e,R);F={left:Math.min(de.left,me.left),top:Math.min(de.top,me.top)-A,right:Math.max(de.left,me.left),bottom:Math.max(de.bottom,me.bottom)+A};var _e=ca(e,F),Be=e.doc.scrollTop,$e=e.doc.scrollLeft;if(_e.scrollTop!=null&&(ha(e,_e.scrollTop),Math.abs(e.doc.scrollTop-Be)>1&&(ie=!0)),_e.scrollLeft!=null&&($i(e,_e.scrollLeft),Math.abs(e.doc.scrollLeft-$e)>1&&(ie=!0)),!ie)break}return F}function Ma(e,r){var R=ca(e,r);R.scrollTop!=null&&ha(e,R.scrollTop),R.scrollLeft!=null&&$i(e,R.scrollLeft)}function ca(e,r){var R=e.display,A=Yn(e.display);r.top<0&&(r.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,Y=ye(e),ie={};r.bottom-r.top>Y&&(r.bottom=r.top+Y);var de=e.doc.height+Ie(R),me=r.topde-A;if(r.topF+Y){var Be=Math.min(r.top,(_e?de:r.bottom)-Y);Be!=F&&(ie.scrollTop=Be)}var $e=e.options.fixedGutter?0:R.gutters.offsetWidth,lt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-$e,it=Fe(e)-R.gutters.offsetWidth,Tt=r.right-r.left>it;return Tt&&(r.right=r.left+it),r.left<10?ie.scrollLeft=0:r.leftit+lt-3&&(ie.scrollLeft=r.right+(Tt?0:10)-it),ie}function Sa(e,r){if(r==null)return;Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function ba(e){Ea(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function da(e,r,R){(r!=null||R!=null)&&Ea(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function co(e,r){Ea(e),e.curOp.scrollToPos=r}function Ea(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=Mr(e,r.from),A=Mr(e,r.to);Ta(e,R,A,r.margin)}}function Ta(e,r,R,A){var F=ca(e,{left:Math.min(r.left,R.left),top:Math.min(r.top,R.top)-A,right:Math.max(r.right,R.right),bottom:Math.max(r.bottom,R.bottom)+A});da(e,F.scrollLeft,F.scrollTop)}function ha(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;T||za(e,{top:r}),fa(e,r,!0),T&&za(e),Ha(e,100)}function fa(e,r,R){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!R)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function $i(e,r,R,A){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!A)return;e.doc.scrollLeft=r,_n(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function na(e){var r=e.display,R=r.gutters.offsetWidth,A=Math.round(e.doc.height+Ie(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?R:0,docHeight:A,scrollHeight:A+Ye(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var xr=function(e,r,R){this.cm=R;var A=this.vert=w("div",[w("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=w("div",[w("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=F.tabIndex=-1,e(A),e(F),De(A,"scroll",function(){A.clientHeight&&r(A.scrollTop,"vertical")}),De(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&E<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xr.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=r?A+"px":"0";var F=e.viewHeight-(r?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+F)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=R?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var Y=e.viewWidth-e.barLeft-(R?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Y)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?A:0,bottom:r?A:0}},xr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xr.prototype.zeroWidthHack=function(){var e=a&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ae,this.disableVert=new ae},xr.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function A(){var F=e.getBoundingClientRect(),Y=R=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);Y!=e?e.style.pointerEvents="none":r.set(1e3,A)}r.set(1e3,A)},xr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Cr=function(){};Cr.prototype.update=function(){return{bottom:0,right:0}},Cr.prototype.setScrollLeft=function(){},Cr.prototype.setScrollTop=function(){},Cr.prototype.clear=function(){};function ar(e,r){r||(r=na(e));var R=e.display.barWidth,A=e.display.barHeight;En(e,r);for(var F=0;F<4&&R!=e.display.barWidth||A!=e.display.barHeight;F++)R!=e.display.barWidth&&e.options.lineWrapping&&Pa(e),En(e,na(e)),R=e.display.barWidth,A=e.display.barHeight}function En(e,r){var R=e.display,A=R.scrollbars.update(r);R.sizer.style.paddingRight=(R.barWidth=A.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=A.bottom)+"px",R.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=A.bottom+"px",R.scrollbarFiller.style.width=A.right+"px"):R.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=A.bottom+"px",R.gutterFiller.style.width=r.gutterWidth+"px"):R.gutterFiller.style.display=""}var dr={native:xr,null:Cr};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new dr[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),De(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,R){R=="horizontal"?$i(e,r):ha(e,r)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var $a=0;function jn(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:++$a},gr(e.curOp)}function Oa(e){var r=e.curOp;r&&Or(r,function(R){for(var A=0;A=R.viewTo)||R.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new ia(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Aa(e.cm,e.update)}function Zo(e){var r=e.cm,R=r.display;e.updatedDisplay&&Pa(r),e.barMeasure=na(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=ze(r,R.maxLine,R.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+Ye(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Fe(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function ho(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=Vt(e,r.highlightFrontier),F=[];r.iter(A.line,Math.min(r.first+r.size,e.display.viewTo+500),function(Y){if(A.line>=e.display.viewFrom){var ie=Y.styles,de=Y.text.length>e.options.maxHighlightLength?xn(r.mode,A.state):null,me=Ke(e,Y,A,!0);de&&(A.state=de),Y.styles=me.styles;var _e=Y.styleClasses,Be=me.classes;Be?Y.styleClasses=Be:_e&&(Y.styleClasses=null);for(var $e=!ie||ie.length!=Y.styles.length||_e!=Be&&(!_e||!Be||_e.bgClass!=Be.bgClass||_e.textClass!=Be.textClass),lt=0;!$e&<R)return Ha(e,e.options.workDelay),!0}),r.highlightFrontier=A.line,r.modeFrontier=Math.max(r.modeFrontier,A.line),F.length&&Wi(e,function(){for(var Y=0;Y=R.viewFrom&&r.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&ra(e)==0)return!1;yi(e)&&(Bn(e),r.dims=Hn(e));var F=A.first+A.size,Y=Math.max(r.visible.from-e.options.viewportMargin,A.first),ie=Math.min(F,r.visible.to+e.options.viewportMargin);R.viewFromie&&R.viewTo-ie<20&&(ie=Math.min(F,R.viewTo)),Qn&&(Y=qt(e.doc,Y),ie=Qt(e.doc,ie));var de=Y!=R.viewFrom||ie!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;Di(e,Y,ie),R.viewOffset=or(cr(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var me=ra(e);if(!de&&me==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var _e=Po(e);return me>4&&(R.lineDiv.style.display="none"),Mo(e,R.updateLineNumbers,r.dims),me>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Lo(_e),v(R.cursorDiv),v(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,de&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,Ha(e,400)),R.updateLineNumbers=null,!0}function Ya(e,r){for(var R=r.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||r.oldDisplayWidth==Fe(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+Ie(e.display)-ye(e),R.top)}),r.visible=La(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else A&&(r.visible=La(e.display,e.doc,R));if(!Aa(e,r))break;Pa(e);var F=na(e);An(e),ar(e,F),Ln(e,F),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,r){var R=new ia(e,r);if(Aa(e,R)){Pa(e),Ya(e,R);var A=na(e);An(e),ar(e,A),Ln(e,A),R.finish()}}function Mo(e,r,R){var A=e.display,F=e.options.lineNumbers,Y=A.lineDiv,ie=Y.firstChild;function de(Tt){var Ut=Tt.nextSibling;return l&&a&&e.display.currentWheelTarget==Tt?Tt.style.display="none":Tt.parentNode.removeChild(Tt),Ut}for(var me=A.view,_e=A.viewFrom,Be=0;Be-1&&(it=!1),Zt(e,$e,_e,R)),it&&(v($e.lineNumber),$e.lineNumber.appendChild(document.createTextNode(ci(e.options,_e)))),ie=$e.node.nextSibling}_e+=$e.size}for(;ie;)ie=de(ie)}function Ja(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ln(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Ye(e)+"px"}function _n(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var A=di(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,Y=A+"px",ie=0;ieie.clientWidth,me=ie.scrollHeight>ie.clientHeight;if(!(A&&de||F&&me))return;if(F&&a&&l){e:for(var _e=r.target,Be=Y.view;_e!=ie;_e=_e.parentNode)for(var $e=0;$e=0&&_r(e,A.to())<=0)return R}return-1};var Dn=function(e,r){this.anchor=e,this.head=r};Dn.prototype.from=function(){return Ri(this.anchor,this.head)},Dn.prototype.to=function(){return Ai(this.anchor,this.head)},Dn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,r,R){var A=e&&e.options.selectionsMayTouch,F=r[R];r.sort(function(lt,it){return _r(lt.from(),it.from())}),R=he(r,F);for(var Y=1;Y0:me>=0){var _e=Ri(de.from(),ie.from()),Be=Ai(de.to(),ie.to()),$e=de.empty()?ie.from()==ie.head:de.from()==de.head;Y<=R&&--R,r.splice(--Y,2,new Dn($e?Be:_e,$e?_e:Be))}}return new zi(r,R)}function va(e,r){return new zi([new Dn(e,r||e)],0)}function ga(e){return e.text?jt(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,r){if(_r(e,r.from)<0)return e;if(_r(e,r.to)<=0)return ga(r);var R=e.line+r.text.length-(r.to.line-r.from.line)-1,A=e.ch;return e.line==r.to.line&&(A+=ga(r).ch-r.to.ch),jt(R,A)}function Za(e,r){for(var R=[],A=0;A1&&e.remove(de.line+1,Tt-1),e.insert(de.line+1,rr)}Jt(e,"change",e,r)}function Na(e,r,R){function A(F,Y,ie){if(F.linked)for(var de=0;de1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function Es(e,r,R,A){var F=e.history;F.undone.length=0;var Y=+new Date,ie,de;if((F.lastOp==A||F.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&F.lastModTime>Y-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(ie=ml(F,F.lastOp==A)))de=re(ie.changes),_r(r.from,r.to)==0&&_r(r.from,de.to)==0?de.to=ga(r):ie.changes.push(rs(e,r));else{var me=re(F.done);for((!me||!me.ranges)&&Fo(e.sel,F.done),ie={changes:[rs(e,r)],generation:F.generation},F.done.push(ie);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(R),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=Y,F.lastOp=F.lastSelOp=A,F.lastOrigin=F.lastSelOrigin=r.origin,de||Ze(e,"historyAdded")}function vl(e,r,R,A){var F=r.charAt(0);return F=="*"||F=="+"&&R.ranges.length==A.ranges.length&&R.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,R,A){var F=e.history,Y=A&&A.origin;R==F.lastSelOp||Y&&F.lastSelOrigin==Y&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==Y||vl(e,Y,re(F.done),r))?F.done[F.done.length-1]=r:Fo(r,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=Y,F.lastSelOp=R,A&&A.clearRedo!==!1&&bs(F.undone)}function Fo(e,r){var R=re(r);R&&R.ranges&&R.equals(e)||r.push(e)}function xs(e,r,R,A){var F=r["spans_"+e.id],Y=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(ie){ie.markedSpans&&((F||(F=r["spans_"+e.id]={}))[Y]=ie.markedSpans),++Y})}function yl(e){if(!e)return null;for(var r,R=0;R-1&&(re(de)[$e]=_e[$e],delete _e[$e]))}}return A}function ns(e,r,R,A){if(A){var F=e.anchor;if(R){var Y=_r(r,F)<0;Y!=_r(R,F)<0?(F=r,r=R):Y!=_r(r,R)<0&&(r=R)}return new Dn(F,r)}else return new Dn(R||r,r)}function Uo(e,r,R,A,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Ni(e,new zi([ns(e.sel.primary(),r,R,F)],0),A)}function ws(e,r,R){for(var A=[],F=e.cm&&(e.cm.display.shift||e.extend),Y=0;Y=r.ch:de.to>r.ch))){if(F&&(Ze(me,"beforeCursorEnter"),me.explicitlyCleared))if(Y.markedSpans){--ie;continue}else break;if(!me.atomic)continue;if(R){var $e=me.find(A<0?1:-1),lt=void 0;if((A<0?Be:_e)&&($e=Rs(e,$e,-A,$e&&$e.line==r.line?Y:null)),$e&&$e.line==r.line&&(lt=_r($e,R))&&(A<0?lt<0:lt>0))return eo(e,$e,r,A,F)}var it=me.find(A<0?-1:1);return(A<0?_e:Be)&&(it=Rs(e,it,A,it.line==r.line?Y:null)),it?eo(e,it,r,A,F):null}}return r}function Wo(e,r,R,A,F){var Y=A||1,ie=eo(e,r,R,Y,F)||!F&&eo(e,r,R,Y,!0)||eo(e,r,R,-Y,F)||!F&&eo(e,r,R,-Y,!0);return ie||(e.cantEdit=!0,jt(e.first,0))}function Rs(e,r,R,A){return R<0&&r.ch==0?r.line>e.first?W(e,jt(r.line-1)):null:R>0&&r.ch==(A||cr(e,r.line)).text.length?r.line=0;--F)Ps(e,{from:A[F].from,to:A[F].to,text:F?[""]:r.text,origin:r.origin});else Ps(e,r)}function Ps(e,r){if(r.text.length==1&&r.text[0]==""&&_r(r.from,r.to)==0)return;var R=Za(e,r);Es(e,r,R,e.cm?e.cm.curOp.id:NaN),go(e,r,R,Ii(e,r));var A=[];Na(e,function(F,Y){!Y&&he(A,F.history)==-1&&(Ns(F.history,r),A.push(F.history)),go(F,r,null,Ii(F,r))})}function Ho(e,r,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var F=e.history,Y,ie=e.sel,de=r=="undo"?F.done:F.undone,me=r=="undo"?F.undone:F.done,_e=0;_e=0;--it){var Tt=lt(it);if(Tt)return Tt.v}}function Ls(e,r){if(r==0)return;if(e.first+=r,e.sel=new zi(fe(e.sel.ranges,function(F){return new Dn(jt(F.anchor.line+r,F.anchor.ch),jt(F.head.line+r,F.head.ch))}),e.sel.primIndex),e.cm){Nn(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,A=R.viewFrom;Ae.lastLine())return;if(r.from.lineY&&(r={from:r.from,to:jt(Y,cr(e,Y).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Gn(e,r.from,r.to),R||(R=Za(e,r)),e.cm?xl(e.cm,r,A):ts(e,r,A),Bo(e,R,ke),e.cantEdit&&Wo(e,jt(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,r,R){var A=e.doc,F=e.display,Y=r.from,ie=r.to,de=!1,me=Y.line;e.options.lineWrapping||(me=Yr(Ot(cr(A,Y.line))),A.iter(me,ie.line+1,function(it){if(it==F.maxLine)return de=!0,!0})),A.sel.contains(r.from,r.to)>-1&&Ue(e),ts(A,r,R,Xi(e)),e.options.lineWrapping||(A.iter(me,Y.line+r.text.length,function(it){var Tt=ot(it);Tt>F.maxLineLength&&(F.maxLine=it,F.maxLineLength=Tt,F.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),Li(A,Y.line),Ha(e,400);var _e=r.text.length-(ie.line-Y.line)-1;r.full?Nn(e):Y.line==ie.line&&r.text.length==1&&!vs(e.doc,r)?zn(e,Y.line,"text"):Nn(e,Y.line,ie.line+1,_e);var Be=Me(e,"changes"),$e=Me(e,"change");if($e||Be){var lt={from:Y,to:ie,text:r.text,removed:r.removed,origin:r.origin};$e&&Jt(e,"change",e,lt),Be&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(lt)}e.display.selForContextMenu=null}function ro(e,r,R,A,F){var Y;A||(A=R),_r(A,R)<0&&(Y=[A,R],R=Y[0],A=Y[1]),typeof r=="string"&&(r=e.splitLines(r)),to(e,{from:R,to:A,text:r,origin:F})}function Ms(e,r,R,A){R1||!(this.children[0]instanceof bo))){var de=[];this.collapse(de),this.children=[new bo(de)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r50){for(var ie=F.lines.length%25+25,de=ie;de10);e.parent.maybeSpill()},iterN:function(e,r,R){for(var A=0;Ae.display.maxLineLength&&(e.display.maxLine=_e,e.display.maxLineLength=Be,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&Nn(e,A,F+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Jt(e,"markerCleared",e,this,A,F),r&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,A,F=0;F0||ie==0&&Y.clearWhenEmpty!==!1)return Y;if(Y.replacedWith&&(Y.collapsed=!0,Y.widgetNode=M("span",[Y.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||Y.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(Y.widgetNode.insertLeft=!0)),Y.collapsed){if(ct(e,r.line,r,R,Y)||r.line!=R.line&&ct(e,R.line,r,R,Y))throw new Error("Inserting collapsed marker partially overlapping an existing one");vi()}Y.addToHistory&&Es(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var de=r.line,me=e.cm,_e;if(e.iter(de,R.line+1,function($e){me&&Y.collapsed&&!me.options.lineWrapping&&Ot($e)==me.display.maxLine&&(_e=!0),Y.collapsed&&de!=r.line&&Vn($e,0),Mi($e,new Fi(Y,de==r.line?r.ch:null,de==R.line?R.ch:null)),++de}),Y.collapsed&&e.iter(r.line,R.line+1,function($e){Kt(e,$e)&&Vn($e,0)}),Y.clearOnEnter&&De(Y,"beforeCursorEnter",function(){return Y.clear()}),Y.readOnly&&(_i(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Y.collapsed&&(Y.id=++Fs,Y.atomic=!0),me){if(_e&&(me.curOp.updateMaxLine=!0),Y.collapsed)Nn(me,r.line,R.line+1);else if(Y.className||Y.startStyle||Y.endStyle||Y.css||Y.attributes||Y.title)for(var Be=r.line;Be<=R.line;Be++)zn(me,Be,"text");Y.atomic&&Os(me.doc),Jt(me,"markerAdded",me,Y)}return Y}var _o=function(e,r){this.markers=e,this.primary=r;for(var R=0;R=0;me--)to(this,A[me]);de?Ss(this,de):this.cm&&ba(this.cm)}),undo:si(function(){Ho(this,"undo")}),redo:si(function(){Ho(this,"redo")}),undoSelection:si(function(){Ho(this,"undo",!0)}),redoSelection:si(function(){Ho(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,R=0,A=0;A=e.ch)&&r.push(F.marker.parent||F.marker)}return r},findMarks:function(e,r,R){e=W(this,e),r=W(this,r);var A=[],F=e.line;return this.iter(e.line,r.line+1,function(Y){var ie=Y.markedSpans;if(ie)for(var de=0;de=me.to||me.from==null&&F!=e.line||me.from!=null&&F==r.line&&me.from>=r.ch)&&(!R||R(me.marker))&&A.push(me.marker.parent||me.marker)}++F}),A},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var A=0;Ae)return r=e,!0;e-=Y,++R}),W(this,jt(R,r))},indexFromPos:function(e){e=W(this,e);var r=e.ch;if(e.liner&&(r=e.from),e.to!=null&&e.to-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Be=e.dataTransfer.getData("Text");if(Be){var $e;if(r.state.draggingText&&!r.state.draggingText.copy&&($e=r.listSelections()),Bo(r.doc,va(R,R)),$e)for(var lt=0;lt<$e.length;++lt)ro(r.doc,"",$e[lt].anchor,$e[lt].head,"drag");r.replaceSelection(Be,"around","paste"),r.display.input.focus()}}catch(it){}}}function Al(e,r){if(C&&(!e.state.draggingText||+new Date-Bs<100)){Le(r);return}if(st(e,r)||cn(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!f){var R=w("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),h&&R.parentNode.removeChild(R)}}function Rl(e,r){var R=ni(e,r);if(!R)return;var A=document.createDocumentFragment();Bi(e,R,A),e.display.dragCursor||(e.display.dragCursor=w("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),g(e.display.dragCursor,A)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Hs(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),R=[],A=0;A=0;de--)ro(e.doc,"",A[de].from,A[de].to,"+delete");ba(e)})}function as(e,r,R){var A=Oe(e.text,r+R,R);return A<0||A>e.text.length?null:A}function os(e,r,R){var A=as(e,r.ch,R);return A==null?null:new jt(r.line,A,R<0?"after":"before")}function ss(e,r,R,A,F){if(e){r.doc.direction=="rtl"&&(F=-F);var Y=mt(R,r.doc.direction);if(Y){var ie=F<0?re(Y):Y[0],de=F<0==(ie.level==1),me=de?"after":"before",_e;if(ie.level>0||r.doc.direction=="rtl"){var Be=We(r,R);_e=F<0?R.text.length-1:0;var $e=qe(r,Be,_e).top;_e=Qe(function(lt){return qe(r,Be,lt).top==$e},F<0==(ie.level==1)?ie.from:ie.to-1,_e),me=="before"&&(_e=as(R,_e,1))}else _e=F<0?ie.to:ie.from;return new jt(A,_e,me)}}return new jt(A,F<0?R.text.length:0,F<0?"before":"after")}function Il(e,r,R,A){var F=mt(r,e.doc.direction);if(!F)return os(r,R,A);R.ch>=r.text.length?(R.ch=r.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var Y=ut(F,R.ch,R.sticky),ie=F[Y];if(e.doc.direction=="ltr"&&ie.level%2==0&&(A>0?ie.to>R.ch:ie.from=ie.from&<>=Be.begin)){var it=$e?"before":"after";return new jt(R.line,lt,it)}}var Tt=function(rr,Er,nr){for(var Sr=function(Kn,Ci){return Ci?new jt(R.line,de(Kn,1),"before"):new jt(R.line,Kn,"after")};rr>=0&&rr0==(Vr.level!=1),gn=Hr?nr.begin:de(nr.end,-1);if(Vr.from<=gn&&gn0?Be.end:de(Be.begin,-1);return Yt!=null&&!(A>0&&Yt==r.text.length)&&(Ut=Tt(A>0?0:F.length-1,A,_e(Yt)),Ut)?Ut:null}var So={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return ao(e,function(r){if(r.empty()){var R=cr(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line0)F=new jt(F.line,F.ch+1),e.replaceRange(Y.charAt(F.ch-1)+Y.charAt(F.ch-2),jt(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var ie=cr(e.doc,F.line-1).text;ie&&(F=new jt(F.line,1),e.replaceRange(Y.charAt(0)+e.doc.lineSeparator()+ie.charAt(ie.length-1),jt(F.line-1,ie.length-1),F,"+transpose"))}}R.push(new Dn(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Wi(e,function(){for(var r=e.listSelections(),R=r.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),r[R].anchor,r[R].head,"+input");r=e.listSelections();for(var A=0;Ae&&_r(r,this.pos)==0&&R==this.button};var Oo,Ao;function Hl(e,r){var R=+new Date;return Ao&&Ao.compare(R,e,r)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(R,e,r)?(Ao=new us(R,e,r),Oo=null,"double"):(Oo=new us(R,e,r),Ao=null,"single")}function tl(e){var r=this,R=r.display;if(st(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,cn(R,e)){l||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(r,e))return;var A=ni(r,e),F=Ve(e),Y=A?Hl(A,F):"single";if(window.focus(),F==1&&r.state.selectingText&&r.state.selectingText(e),A&&zl(r,F,A,Y,e))return;F==1?A?Gl(r,A,Y,e):Je(e)==R.scroller&&xe(e):F==2?(A&&Uo(r.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(k?r.display.input.onContextMenu(e):wa(r))}function zl(e,r,R,A,F){var Y="Click";return A=="double"?Y="Double"+Y:A=="triple"&&(Y="Triple"+Y),Y=(r==1?"Left":r==2?"Middle":"Right")+Y,To(e,Gs(Y,F),F,function(ie){if(typeof ie=="string"&&(ie=So[ie]),!ie)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=ie(e,R)!=Re}finally{e.state.suppressEdits=!1}return de})}function Kl(e,r,R){var A=e.getOption("configureMouse"),F=A?A(e,r,R):{};if(F.unit==null){var Y=t?R.shiftKey&&R.metaKey:R.altKey;F.unit=Y?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(F.extend==null||e.doc.extend)&&(F.extend=e.doc.extend||R.shiftKey),F.addNew==null&&(F.addNew=a?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(a?R.altKey:R.ctrlKey)),F}function Gl(e,r,R,A){C?setTimeout(U(Ba,e),0):e.curOp.focus=G();var F=Kl(e,R,A),Y=e.doc.sel,ie;e.options.dragDrop&>&&!e.isReadOnly()&&R=="single"&&(ie=Y.contains(r))>-1&&(_r((ie=Y.ranges[ie]).from(),r)<0||r.xRel>0)&&(_r(ie.to(),r)>0||r.xRel<0)?Vl(e,A,r,F):Xl(e,A,r,F)}function Vl(e,r,R,A){var F=e.display,Y=!1,ie=oi(e,function(_e){l&&(F.scroller.draggable=!1),e.state.draggingText=!1,ht(F.wrapper.ownerDocument,"mouseup",ie),ht(F.wrapper.ownerDocument,"mousemove",de),ht(F.scroller,"dragstart",me),ht(F.scroller,"drop",ie),Y||(xe(_e),A.addNew||Uo(e.doc,R,null,null,A.extend),l&&!f||C&&E==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),de=function(_e){Y=Y||Math.abs(r.clientX-_e.clientX)+Math.abs(r.clientY-_e.clientY)>=10},me=function(){return Y=!0};l&&(F.scroller.draggable=!0),e.state.draggingText=ie,ie.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),De(F.wrapper.ownerDocument,"mouseup",ie),De(F.wrapper.ownerDocument,"mousemove",de),De(F.scroller,"dragstart",me),De(F.scroller,"drop",ie),wa(e),setTimeout(function(){return F.input.focus()},20)}function rl(e,r,R){if(R=="char")return new Dn(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new Dn(jt(r.line,0),W(e.doc,jt(r.line+1,0)));var A=R(e,r);return new Dn(A.from,A.to)}function Xl(e,r,R,A){var F=e.display,Y=e.doc;xe(r);var ie,de,me=Y.sel,_e=me.ranges;if(A.addNew&&!A.extend?(de=Y.sel.contains(R),de>-1?ie=_e[de]:ie=new Dn(R,R)):(ie=Y.sel.primary(),de=Y.sel.primIndex),A.unit=="rectangle")A.addNew||(ie=new Dn(R,R)),R=ni(e,r,!0,!0),de=-1;else{var Be=rl(e,R,A.unit);A.extend?ie=ns(ie,Be.anchor,Be.head,A.extend):ie=Be}A.addNew?de==-1?(de=_e.length,Ni(Y,aa(e,_e.concat([ie]),de),{scroll:!1,origin:"*mouse"})):_e.length>1&&_e[de].empty()&&A.unit=="char"&&!A.extend?(Ni(Y,aa(e,_e.slice(0,de).concat(_e.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),me=Y.sel):is(Y,de,ie,ve):(de=0,Ni(Y,new zi([ie],0),ve),me=Y.sel);var $e=R;function lt(nr){if(_r($e,nr)==0)return;if($e=nr,A.unit=="rectangle"){for(var Sr=[],Vr=e.options.tabSize,Hr=V(cr(Y,R.line).text,R.ch,Vr),gn=V(cr(Y,nr.line).text,nr.ch,Vr),Kn=Math.min(Hr,gn),Ci=Math.max(Hr,gn),ei=Math.min(R.line,nr.line),ea=Math.min(e.lastLine(),Math.max(R.line,nr.line));ei<=ea;ei++){var Ji=cr(Y,ei).text,hi=be(Ji,Kn,Vr);Kn==Ci?Sr.push(new Dn(jt(ei,hi),jt(ei,hi))):Ji.length>hi&&Sr.push(new Dn(jt(ei,hi),jt(ei,be(Ji,Ci,Vr))))}Sr.length||Sr.push(new Dn(R,R)),Ni(Y,aa(e,me.ranges.slice(0,de).concat(Sr),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(nr)}else{var Qi=ie,Pi=rl(e,nr,A.unit),Ei=Qi.anchor,fi;_r(Pi.anchor,Ei)>0?(fi=Pi.head,Ei=Ri(Qi.from(),Pi.anchor)):(fi=Pi.anchor,Ei=Ai(Qi.to(),Pi.head));var ii=me.ranges.slice(0);ii[de]=$l(e,new Dn(W(Y,Ei),fi)),Ni(Y,aa(e,ii,de),ve)}}var it=F.wrapper.getBoundingClientRect(),Tt=0;function Ut(nr){var Sr=++Tt,Vr=ni(e,nr,!0,A.unit=="rectangle");if(!Vr)return;if(_r(Vr,$e)!=0){e.curOp.focus=G(),lt(Vr);var Hr=La(F,Y);(Vr.line>=Hr.to||Vr.lineit.bottom?20:0;gn&&setTimeout(oi(e,function(){if(Tt!=Sr)return;F.scroller.scrollTop+=gn,Ut(nr)}),50)}}function Yt(nr){e.state.selectingText=!1,Tt=Infinity,nr&&(xe(nr),F.input.focus()),ht(F.wrapper.ownerDocument,"mousemove",rr),ht(F.wrapper.ownerDocument,"mouseup",Er),Y.history.lastSelOrigin=null}var rr=oi(e,function(nr){nr.buttons===0||!Ve(nr)?Yt(nr):Ut(nr)}),Er=oi(e,Yt);e.state.selectingText=Er,De(F.wrapper.ownerDocument,"mousemove",rr),De(F.wrapper.ownerDocument,"mouseup",Er)}function $l(e,r){var R=r.anchor,A=r.head,F=cr(e.doc,R.line);if(_r(R,A)==0&&R.sticky==A.sticky)return r;var Y=mt(F);if(!Y)return r;var ie=ut(Y,R.ch,R.sticky),de=Y[ie];if(de.from!=R.ch&&de.to!=R.ch)return r;var me=ie+(de.from==R.ch==(de.level!=1)?0:1);if(me==0||me==Y.length)return r;var _e;if(A.line!=R.line)_e=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Be=ut(Y,A.ch,A.sticky),$e=Be-ie||(A.ch-R.ch)*(de.level==1?-1:1);Be==me-1||Be==me?_e=$e<0:_e=$e>0}var lt=Y[me+(_e?-1:0)],it=_e==(lt.level==1),Tt=it?lt.from:lt.to,Ut=it?"after":"before";return R.ch==Tt&&R.sticky==Ut?r:new Dn(new jt(R.line,Tt,Ut),A)}function nl(e,r,R,A){var F,Y;if(r.touches)F=r.touches[0].clientX,Y=r.touches[0].clientY;else try{F=r.clientX,Y=r.clientY}catch(lt){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&xe(r);var ie=e.display,de=ie.lineDiv.getBoundingClientRect();if(Y>de.bottom||!Me(e,R))return Ae(r);Y-=de.top-ie.viewOffset;for(var me=0;me=F){var Be=Un(e.doc,Y),$e=e.display.gutterSpecs[me];return Ze(e,R,e,Be,$e.className,r),Ae(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function il(e,r){if(cn(e.display,r)||Yl(e,r))return;if(st(e,r,"contextmenu"))return;k||e.display.input.onContextMenu(r)}function Yl(e,r){return Me(e,"gutterContextMenu")?nl(e,r,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Qr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var r=e.optionHandlers;function R(A,F,Y,ie){e.defaults[A]=F,Y&&(r[A]=ie?function(de,me,_e){_e!=oo&&Y(de,me,_e)}:Y)}e.defineOption=R,e.Init=oo,R("value","",function(A,F){return A.setValue(F)},!0),R("mode",null,function(A,F){A.doc.modeOption=F,Ra(A)},!0),R("indentUnit",2,Ra,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){vo(A),Qr(A),Nn(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var Y=[],ie=A.doc.first;A.doc.iter(function(me){for(var _e=0;;){var Be=me.text.indexOf(F,_e);if(Be==-1)break;_e=Be+F.length,Y.push(jt(ie,Be))}ie++});for(var de=Y.length-1;de>=0;de--)ro(A.doc,F,Y[de],jt(Y[de].line,Y[de].ch+F.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,F,Y){A.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),Y!=oo&&A.refresh()}),R("specialCharPlaceholder",ur,function(A){return A.refresh()},!0),R("electricChars",!0),R("inputStyle",i?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(A,F){return A.getInputField().spellcheck=F},!0),R("autocorrect",!1,function(A,F){return A.getInputField().autocorrect=F},!0),R("autocapitalize",!1,function(A,F){return A.getInputField().autocapitalize=F},!0),R("rtlMoveVisually",!S),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){al(A),ma(A)},!0),R("keyMap","default",function(A,F,Y){var ie=Ko(F),de=Y!=oo&&Ko(Y);de&&de.detach&&de.detach(A,ie),ie.attach&&ie.attach(A,de||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=Hi(F,A.options.lineNumbers),ma(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?di(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return ar(A)},!0),R("scrollbarStyle","native",function(A){pa(A),ar(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),R("lineNumbers",!1,function(A,F){A.display.gutterSpecs=Hi(A.options.gutters,F),ma(A)},!0),R("firstLineNumber",1,ma,!0),R("lineNumberFormatter",function(A){return A},ma,!0),R("showCursorWhenSelecting",!1,An,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,F){F=="nocursor"&&(ua(A),A.display.input.blur()),A.display.input.readOnlyChanged(F)}),R("screenReaderLabel",null,function(A,F){F=F===""?null:F,A.display.input.screenReaderLabelChanged(F)}),R("disableInput",!1,function(A,F){F||A.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,An,!0),R("singleCursorHeightPerLine",!0,An,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,vo,!0),R("addModeClass",!1,vo,!0),R("pollInterval",100),R("undoDepth",200,function(A,F){return A.doc.history.undoDepth=F}),R("historyEventDelay",1250),R("viewportMargin",10,function(A){return A.refresh()},!0),R("maxHighlightLength",1e4,vo,!0),R("moveInputWithCursor",!0,function(A,F){F||A.display.input.resetPosition()}),R("tabindex",null,function(A,F){return A.display.input.getField().tabIndex=F||""}),R("autofocus",null),R("direction","ltr",function(A,F){return A.doc.setDirection(F)},!0),R("phrases",null)}function Ql(e,r,R){var A=R&&R!=oo;if(!r!=!A){var F=e.display.dragFunctions,Y=r?De:ht;Y(e.display.scroller,"dragstart",F.start),Y(e.display.scroller,"dragenter",F.enter),Y(e.display.scroller,"dragover",F.over),Y(e.display.scroller,"dragleave",F.leave),Y(e.display.scroller,"drop",F.drop)}}function Zl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),Dr(e)),wi(e),Nn(e),Qr(e),setTimeout(function(){return ar(e)},100)}function Jn(e,r){var R=this;if(!(this instanceof Jn))return new Jn(e,r);this.options=r=r?B(r):{},B(ol,r,!1);var A=r.value;typeof A=="string"?A=new Yi(A,r.mode,null,r.lineSeparator,r.direction):r.mode&&(A.modeOption=r.mode),this.doc=A;var F=new Jn.inputStyles[r.inputStyle](this),Y=this.display=new Ka(e,A,F,r);Y.wrapper.CodeMirror=this,al(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),pa(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 ae,keySeq:null,specialChars:null},r.autofocus&&!i&&Y.input.focus(),C&&E<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),jn(this),this.curOp.forceUpdate=!0,gs(this,A),r.autofocus&&!i||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&la(R)},20):ua(this);for(var ie in Vo)Vo.hasOwnProperty(ie)&&Vo[ie](this,r[ie],oo);yi(this),r.finishInit&&r.finishInit(this);for(var de=0;de20*20}De(r.scroller,"touchstart",function(me){if(!st(e,me)&&!Y(me)&&!cs(e,me)){r.input.ensurePolled(),clearTimeout(R);var _e=+new Date;r.activeTouch={start:_e,moved:!1,prev:_e-A.end<=300?A:null},me.touches.length==1&&(r.activeTouch.left=me.touches[0].pageX,r.activeTouch.top=me.touches[0].pageY)}}),De(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),De(r.scroller,"touchend",function(me){var _e=r.activeTouch;if(_e&&!cn(r,me)&&_e.left!=null&&!_e.moved&&new Date-_e.start<300){var Be=e.coordsChar(r.activeTouch,"page"),$e;!_e.prev||ie(_e,_e.prev)?$e=new Dn(Be,Be):!_e.prev.prev||ie(_e,_e.prev.prev)?$e=e.findWordAt(Be):$e=new Dn(jt(Be.line,0),W(e.doc,jt(Be.line+1,0))),e.setSelection($e.anchor,$e.head),e.focus(),xe(me)}F()}),De(r.scroller,"touchcancel",F),De(r.scroller,"scroll",function(){r.scroller.clientHeight&&(ha(e,r.scroller.scrollTop),$i(e,r.scroller.scrollLeft,!0),Ze(e,"scroll",e))}),De(r.scroller,"mousewheel",function(me){return po(e,me)}),De(r.scroller,"DOMMouseScroll",function(me){return po(e,me)}),De(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(me){st(e,me)||Le(me)},over:function(me){st(e,me)||(Rl(e,me),Le(me))},start:function(me){return Al(e,me)},drop:oi(e,Ol),leave:function(me){st(e,me)||Ws(e)}};var de=r.input.getField();De(de,"keyup",function(me){return Zs.call(e,me)}),De(de,"keydown",oi(e,Qs)),De(de,"keypress",oi(e,el)),De(de,"focus",function(me){return la(e,me)}),De(de,"blur",function(me){return ua(e,me)})}var ds=[];Jn.defineInitHook=function(e){return ds.push(e)};function Ro(e,r,R,A){var F=e.doc,Y;R==null&&(R="add"),R=="smart"&&(F.mode.indent?Y=Vt(e,r).state:R="prev");var ie=e.options.tabSize,de=cr(F,r),me=V(de.text,null,ie);de.stateAfter&&(de.stateAfter=null);var _e=de.text.match(/^\s*/)[0],Be;if(!A&&!/\S/.test(de.text))Be=0,R="not";else if(R=="smart"&&(Be=F.mode.indent(Y,de.text.slice(_e.length),de.text),Be==Re||Be>150)){if(!A)return;R="prev"}R=="prev"?r>F.first?Be=V(cr(F,r-1).text,null,ie):Be=0:R=="add"?Be=me+e.options.indentUnit:R=="subtract"?Be=me-e.options.indentUnit:typeof R=="number"&&(Be=me+R),Be=Math.max(0,Be);var $e="",lt=0;if(e.options.indentWithTabs)for(var it=Math.floor(Be/ie);it;--it)lt+=ie,$e+=" ";if(ltie,me=hr(r),_e=null;if(de&&A.ranges.length>1)if(ya&&ya.text.join(` `)==r){if(A.ranges.length%ya.text.length==0){_e=[];for(var Be=0;Be=0;lt--){var it=A.ranges[lt],Tt=it.from(),Ut=it.to();it.empty()&&(R&&R>0?Tt=jt(Tt.line,Tt.ch-R):e.state.overwrite&&!de?Ut=jt(Ut.line,Math.min(cr(Y,Ut.line).text.length,Ut.ch+re(me).length)):de&&ya&&ya.lineWise&&ya.text.join(` `)==me.join(` `)&&(Tt=Ut=jt(Tt.line,0)));var Yt={from:Tt,to:Ut,text:_e?_e[lt%_e.length]:me,origin:F||(de?"paste":e.state.cutIncoming>ie?"cut":"+input")};to(e.doc,Yt),Jt(e,"inputRead",e,Yt)}r&&!de&&ll(e,r),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=$e),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,r){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Wi(r,function(){return hs(r,R,0,null,"paste")}),!0}function ll(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,A=R.ranges.length-1;A>=0;A--){var F=R.ranges[A];if(F.head.ch>100||A&&R.ranges[A-1].head.line==F.head.line)continue;var Y=e.getModeAt(F.head),ie=!1;if(Y.electricChars){for(var de=0;de-1){ie=Ro(e,F.head.line,"smart");break}}else Y.electricInput&&(Y.electricInput.test(cr(e.doc,F.head.line).text.slice(0,F.head.ch))&&(ie=Ro(e,F.head.line,"smart")));ie&&Jt(e,"electricInput",e,F.head.line)}}function ul(e){for(var r=[],R=[],A=0;AY&&(Ro(this,de.head.line,A,!0),Y=de.head.line,ie==this.doc.sel.primIndex&&ba(this));else{var me=de.from(),_e=de.to(),Be=Math.max(Y,me.line);Y=Math.min(this.lastLine(),_e.line-(_e.ch?0:1))+1;for(var $e=Be;$e0&&is(this.doc,ie,new Dn(me,lt[ie].to()),ke)}}}),getTokenAt:function(A,F){return fn(this,A,F)},getLineTokens:function(A,F){return fn(this,jt(A),F,!0)},getTokenTypeAt:function(A){A=W(this.doc,A);var F=At(this,cr(this.doc,A.line)),Y=0,ie=(F.length-1)/2,de=A.ch,me;if(de==0)me=F[2];else for(;;){var _e=Y+ie>>1;if((_e?F[_e*2-1]:0)>=de)ie=_e;else if(F[_e*2+1]me&&(A=me,ie=!0),de=cr(this.doc,A)}else de=A;return pn(this,de,{top:0,left:0},F||"page",Y||ie).top+(ie?this.doc.height-or(de):0)},defaultTextHeight:function(){return Yn(this.display)},defaultCharWidth:function(){return ri(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,Y,ie,de){var me=this.display;A=ln(this,W(this.doc,A));var _e=A.bottom,Be=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),me.sizer.appendChild(F),ie=="over")_e=A.top;else if(ie=="above"||ie=="near"){var $e=Math.max(me.wrapper.clientHeight,this.doc.height),lt=Math.max(me.sizer.clientWidth,me.lineSpace.clientWidth);(ie=="above"||A.bottom+F.offsetHeight>$e)&&A.top>F.offsetHeight?_e=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=$e&&(_e=A.bottom),Be+F.offsetWidth>lt&&(Be=lt-F.offsetWidth)}F.style.top=_e+"px",F.style.left=F.style.right="",de=="right"?(Be=me.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(de=="left"?Be=0:de=="middle"&&(Be=(me.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Be+"px"),Y&&Ma(this,{left:Be,top:_e,right:Be+F.offsetWidth,bottom:_e+F.offsetHeight})},triggerOnKeyDown:ki(Qs),triggerOnKeyPress:ki(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ki(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:ki(function(A){ll(this,A)}),findPosH:function(A,F,Y,ie){var de=1;F<0&&(de=-1,F=-F);for(var me=W(this.doc,A),_e=0;_e0&&Be(Y.charAt(ie-1));)--ie;for(;de.5||this.options.lineWrapping)&&wi(this),Ze(this,"refresh",this)}),swapDoc:ki(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),Qr(this),this.display.input.reset(),da(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Jt(this,"swapDoc",this,F),F}),phrase:function(A){var F=this.options.phrases;return F&&Object.prototype.hasOwnProperty.call(F,A)?F[A]:A},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}},Ne(e),e.registerHelper=function(A,F,Y){R.hasOwnProperty(A)||(R[A]=e[A]={_global:[]}),R[A][F]=Y},e.registerGlobalHelper=function(A,F,Y,ie){e.registerHelper(A,F,ie),R[A]._global.push({pred:Y,val:ie})}}function fs(e,r,R,A,F){var Y=r,ie=R,de=cr(e,r.line),me=F&&e.direction=="rtl"?-R:R;function _e(){var Er=r.line+me;return Er=e.first+e.size?!1:(r=new jt(Er,r.ch,r.sticky),de=cr(e,Er))}function Be(Er){var nr;if(A=="codepoint"){var Sr=de.text.charCodeAt(r.ch+(A>0?0:-1));isNaN(Sr)?nr=null:nr=new jt(r.line,Math.max(0,Math.min(de.text.length,r.ch+R*(Sr>=55296&&Sr<56320?2:1))),-R)}else F?nr=Il(e.cm,de,r,R):nr=os(de,r,R);if(nr==null)if(!Er&&_e())r=ss(F,e.cm,de,r.line,me);else return!1;else r=nr;return!0}if(A=="char"||A=="codepoint")Be();else if(A=="column")Be(!0);else if(A=="word"||A=="group")for(var $e=null,lt=A=="group",it=e.cm&&e.cm.getHelper(r,"wordChars"),Tt=!0;!(R<0&&!Be(!Tt));Tt=!1){var Ut=de.text.charAt(r.ch)||` `,Yt=X(Ut,it)?"w":lt&&Ut==` `?"n":!lt||/\s/.test(Ut)?null:"p";if(lt&&!Tt&&!Yt&&(Yt="s"),$e&&$e!=Yt){R<0&&(R=1,Be(),r.sticky="after");break}if(Yt&&($e=Yt),R>0&&!Be(!Tt))break}var rr=Wo(e,r,Y,ie,!0);return ai(Y,rr)&&(rr.hitSide=!0),rr}function hl(e,r,R,A){var F=e.doc,Y=r.left,ie;if(A=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),me=Math.max(de-.5*Yn(e.display),3);ie=(R>0?r.bottom:r.top)+R*me}else A=="line"&&(ie=R>0?r.bottom+3:r.top-3);for(var _e;!(_e=nn(e,Y,ie),!_e.outside);){if(R<0?ie<=0:ie>=F.height){_e.hitSide=!0;break}ie+=R*5}return _e}var Fn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fn.prototype.init=function(e){var r=this,R=this,A=R.cm,F=R.div=e.lineDiv;cl(F,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function Y(de){for(var me=de.target;me;me=me.parentNode){if(me==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(me.className))break}return!1}De(F,"paste",function(de){if(!Y(de)||st(A,de)||sl(de,A))return;E<=11&&setTimeout(oi(A,function(){return r.updateFromDOM()}),20)}),De(F,"compositionstart",function(de){r.composing={data:de.data,done:!1}}),De(F,"compositionupdate",function(de){r.composing||(r.composing={data:de.data,done:!1})}),De(F,"compositionend",function(de){r.composing&&(de.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),De(F,"touchstart",function(){return R.forceCompositionEnd()}),De(F,"input",function(){r.composing||r.readFromDOMSoon()});function ie(de){if(!Y(de)||st(A,de))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()}),de.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var me=ul(A);Xo({lineWise:!0,text:me.text}),de.type=="cut"&&A.operation(function(){A.setSelections(me.ranges,0,ke),A.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var _e=ya.text.join(` `);if(de.clipboardData.setData("Text",_e),de.clipboardData.getData("Text")==_e){de.preventDefault();return}}var Be=dl(),$e=Be.firstChild;A.display.lineSpace.insertBefore(Be,A.display.lineSpace.firstChild),$e.value=ya.text.join(` `);var lt=document.activeElement;K($e),setTimeout(function(){A.display.lineSpace.removeChild(Be),lt.focus(),lt==F&&R.showPrimarySelection()},50)}De(F,"copy",ie),De(F,"cut",ie)},Fn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Fn.prototype.prepareSelection=function(){var e=Ui(this.cm,!1);return e.focus=document.activeElement==this.div,e},Fn.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Fn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fn.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,R=r.doc.sel.primary(),A=R.from(),F=R.to();if(r.display.viewTo==r.display.viewFrom||A.line>=r.display.viewTo||F.line=r.display.viewFrom&&fl(r,A)||{node:de[0].measure.map[2],offset:0},_e=F.linee.firstLine()&&(A=jt(A.line-1,cr(e.doc,A.line-1).length)),F.ch==cr(e.doc,F.line).text.length&&F.liner.viewTo-1)return!1;var Y,ie,de;A.line==r.viewFrom||(Y=In(e,A.line))==0?(ie=Yr(r.view[0].line),de=r.view[0].node):(ie=Yr(r.view[Y].line),de=r.view[Y-1].node.nextSibling);var me=In(e,F.line),_e,Be;if(me==r.view.length-1?(_e=r.viewTo-1,Be=r.lineDiv.lastChild):(_e=Yr(r.view[me+1].line)-1,Be=r.view[me+1].node.previousSibling),!de)return!1;for(var $e=e.doc.splitLines(ru(e,de,Be,ie,_e)),lt=Gn(e.doc,jt(ie,0),jt(_e,cr(e.doc,_e).text.length));$e.length>1&<.length>1;)if(re($e)==re(lt))$e.pop(),lt.pop(),_e--;else if($e[0]==lt[0])$e.shift(),lt.shift(),ie++;else break;for(var it=0,Tt=0,Ut=$e[0],Yt=lt[0],rr=Math.min(Ut.length,Yt.length);itA.ch&&Er.charCodeAt(Er.length-Tt-1)==nr.charCodeAt(nr.length-Tt-1);)it--,Tt++;$e[$e.length-1]=Er.slice(0,Er.length-Tt).replace(/^\u200b+/,""),$e[0]=$e[0].slice(it).replace(/\u200b+$/,"");var Vr=jt(ie,it),Hr=jt(_e,lt.length?re(lt).length-Tt:0);if($e.length>1||$e[0]||_r(Vr,Hr))return ro(e.doc,$e,Vr,Hr,"+input"),!0},Fn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fn.prototype.reset=function(){this.forceCompositionEnd()},Fn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Fn.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)},Fn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wi(this.cm,function(){return Nn(e.cm)})},Fn.prototype.setUneditable=function(e){e.contentEditable="false"},Fn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||oi(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Fn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Fn.prototype.onContextMenu=function(){},Fn.prototype.resetPosition=function(){},Fn.prototype.needsContentAttribute=!0;function fl(e,r){var R=Xe(e,r.line);if(!R||R.hidden)return null;var A=cr(e.doc,r.line),F=we(R,A,r.line),Y=mt(A,e.doc.direction),ie="left";if(Y){var de=ut(Y,r.ch);ie=de%2?"right":"left"}var me=kt(F.map,r.ch,ie);return me.offset=me.collapse=="right"?me.end:me.start,me}function tu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function so(e,r){return r&&(e.bad=!0),e}function ru(e,r,R,A,F){var Y="",ie=!1,de=e.doc.lineSeparator(),me=!1;function _e(it){return function(Tt){return Tt.id==it}}function Be(){ie&&(Y+=de,me&&(Y+=de),ie=me=!1)}function $e(it){it&&(Be(),Y+=it)}function lt(it){if(it.nodeType==1){var Tt=it.getAttribute("cm-text");if(Tt){$e(Tt);return}var Ut=it.getAttribute("cm-marker"),Yt;if(Ut){var rr=e.findMarks(jt(A,0),jt(F+1,0),_e(+Ut));rr.length&&(Yt=rr[0].find(0))&&$e(Gn(e.doc,Yt.from,Yt.to).join(de));return}if(it.getAttribute("contenteditable")=="false")return;var Er=/^(pre|div|p|li|table|br)$/i.test(it.nodeName);if(!/^br$/i.test(it.nodeName)&&it.textContent.length==0)return;Er&&Be();for(var nr=0;nr=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),De(F,"paste",function(ie){if(st(A,ie)||sl(ie,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function Y(ie){if(st(A,ie))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var de=ul(A);Xo({lineWise:!0,text:de.text}),ie.type=="cut"?A.setSelections(de.ranges,null,ke):(R.prevInput="",F.value=de.text.join(` `),K(F))}else return;ie.type=="cut"&&(A.state.cutIncoming=+new Date)}De(F,"cut",Y),De(F,"copy",Y),De(e.scroller,"paste",function(ie){if(cn(e,ie)||st(A,ie))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var de=new Event("paste");de.clipboardData=ie.clipboardData,F.dispatchEvent(de)}),De(e.lineSpace,"selectstart",function(ie){cn(e,ie)||xe(ie)}),De(F,"compositionstart",function(){var ie=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:ie,range:A.markText(ie,A.getCursor("to"),{className:"CodeMirror-composing"})}}),De(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},li.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},li.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},li.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,A=Ui(e);if(e.options.moveInputWithCursor){var F=ln(e,R.sel.primary().head,"div"),Y=r.wrapper.getBoundingClientRect(),ie=r.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+ie.top-Y.top)),A.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+ie.left-Y.left))}return A},li.prototype.showSelection=function(e){var r=this.cm,R=r.display;g(R.cursorDiv,e.cursors),g(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},li.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var R=r.getSelection();this.textarea.value=R,r.state.focused&&K(this.textarea),C&&E>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",C&&E>=9&&(this.hasSelection=null))},li.prototype.getField=function(){return this.textarea},li.prototype.supportsTouch=function(){return!1},li.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!i||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},li.prototype.blur=function(){this.textarea.blur()},li.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},li.prototype.receivedFocus=function(){this.slowPoll()},li.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()})},li.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function R(){var A=r.poll();!A&&!e?(e=!0,r.polling.set(60,R)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,R)},li.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!r.state.focused||St(R)&&!A&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var F=R.value;if(F==A&&!r.somethingSelected())return!1;if(C&&E>=9&&this.hasSelection===F||a&&/[\uf700-\uf7ff]/.test(F))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var Y=F.charCodeAt(0);if(Y==8203&&!A&&(A="\u200B"),Y==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,de=Math.min(A.length,F.length);ie1e3||F.indexOf(` `)>-1?R.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},li.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},li.prototype.onKeyPress=function(){C&&E>=9&&(this.hasSelection=null),this.fastPoll()},li.prototype.onContextMenu=function(e){var r=this,R=r.cm,A=R.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var Y=ni(R,e),ie=A.scroller.scrollTop;if(!Y||h)return;var de=R.options.resetSelectionOnContextMenu;de&&R.doc.sel.contains(Y)==-1&&oi(R,Ni)(R.doc,va(Y),ke);var me=F.style.cssText,_e=r.wrapper.style.cssText,Be=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-Be.top-5)+"px; left: "+(e.clientX-Be.left-5)+`px; z-index: 1000; background: `+(C?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var $e;l&&($e=window.scrollY),A.input.focus(),l&&window.scrollTo(null,$e),A.input.reset(),R.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=it,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function lt(){if(F.selectionStart!=null){var Ut=R.somethingSelected(),Yt="\u200B"+(Ut?F.value:"");F.value="\u21DA",F.value=Yt,r.prevInput=Ut?"":"\u200B",F.selectionStart=1,F.selectionEnd=Yt.length,A.selForContextMenu=R.doc.sel}}function it(){if(r.contextMenuPending!=it)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=_e,F.style.cssText=me,C&&E<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=ie),F.selectionStart!=null){(!C||C&&E<9)&<();var Ut=0,Yt=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?oi(R,Ds)(R):Ut++<10?A.detectingSelectAll=setTimeout(Yt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Yt,200)}}if(C&&E>=9&<(),k){Le(e);var Tt=function(){ht(window,"mouseup",Tt),setTimeout(it,20)};De(window,"mouseup",Tt)}else setTimeout(it,50)},li.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},li.prototype.setUneditable=function(){},li.prototype.needsContentAttribute=!1;function iu(e,r){if(r=r?B(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var R=G();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=de.getValue()}var F;if(e.form&&(De(e.form,"submit",A),!r.leaveSubmitMethodAlone)){var Y=e.form;F=Y.submit;try{var ie=Y.submit=function(){A(),Y.submit=F,Y.submit(),Y.submit=ie}}catch(me){}}r.finishInit=function(me){me.save=A,me.getTextArea=function(){return e},me.toTextArea=function(){me.toTextArea=isNaN,A(),e.parentNode.removeChild(me.getWrapperElement()),e.style.display="",e.form&&(ht(e.form,"submit",A),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var de=Jn(function(me){return e.parentNode.insertBefore(me,e.nextSibling)},r);return de}function au(e){e.off=ht,e.on=De,e.wheelEventPixels=fo,e.Doc=Yi,e.splitLines=hr,e.countColumn=V,e.findColumn=be,e.isWordChar=J,e.Pass=Re,e.signal=Ze,e.Line=Ir,e.changeEnd=ga,e.scrollbarModel=dr,e.Pos=jt,e.cmpPos=_r,e.modes=sn,e.mimeModes=Rr,e.resolveMode=Gt,e.getMode=Cn,e.modeExtensions=yn,e.extendMode=Sn,e.copyState=xn,e.startState=Ti,e.innerMode=xi,e.commands=So,e.keyMap=Da,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=io,e.normalizeKeyMap=Ml,e.StringStream=hn,e.SharedTextMarker=_o,e.TextMarker=ja,e.LineWidget=xo,e.e_preventDefault=xe,e.e_stopPropagation=Se,e.e_stop=Le,e.addClass=z,e.contains=I,e.rmClass=b,e.keyNames=Fa}Jl(Jn),eu(Jn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Yi.prototype)Yi.prototype.hasOwnProperty(Yo)&&he(ou,Yo)<0&&(Jn.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Yi.prototype[Yo]));return Ne(Yi),Jn.inputStyles={textarea:li,contenteditable:Fn},Jn.defineMode=function(e){!Jn.defaults.mode&&e!="null"&&(Jn.defaults.mode=e),mn.apply(this,arguments)},Jn.defineMIME=vn,Jn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Jn.defineMIME("text/plain","null"),Jn.defineExtension=function(e,r){Jn.prototype[e]=r},Jn.defineDocExtension=function(e,r){Yi.prototype[e]=r},Jn.fromTextArea=iu,au(Jn),Jn.version="5.58.2",Jn})},WYAk:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){(function(){var d=P,T=d.lib,D=T.Base,u=d.enc,p=u.Utf8,C=d.algo,E=C.HMAC=D.extend({init:function(l,s){l=this._hasher=new l.init,typeof s=="string"&&(s=p.parse(s));var n=l.blockSize,h=n*4;s.sigBytes>h&&(s=l.finalize(s)),s.clamp();for(var f=this._oKey=s.clone(),c=this._iKey=s.clone(),m=f.words,_=c.words,y=0;y1&&arguments[1]!==void 0?arguments[1]:!1,Te=ke.getAttribute("id")||ke.getAttribute("data-reactid")||ke.getAttribute("name");if(ve&&G[Te])return G[Te];var be=window.getComputedStyle(ke),ue=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),le=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),re=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),fe=I.map(function(ee){return"".concat(ee,":").concat(be.getPropertyValue(ee))}).join(";"),q={sizingStyle:fe,paddingSize:le,borderSize:re,boxSizing:ue};return ve&&Te&&(G[Te]=q),q}function K(ke){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;z||(z=document.createElement("textarea"),z.setAttribute("tab-index","-1"),z.setAttribute("aria-hidden","true"),document.body.appendChild(z)),ke.getAttribute("wrap")?z.setAttribute("wrap",ke.getAttribute("wrap")):z.removeAttribute("wrap");var ue=H(ke,ve),le=ue.paddingSize,re=ue.borderSize,fe=ue.boxSizing,q=ue.sizingStyle;z.setAttribute("style","".concat(q,";").concat(N)),z.value=ke.value||ke.placeholder||"";var ee=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,te=z.scrollHeight,J;if(fe==="border-box"?te+=re:fe==="content-box"&&(te-=le),Te!==null||be!==null){z.value=" ";var X=z.scrollHeight-le;Te!==null&&(ee=X*Te,fe==="border-box"&&(ee=ee+le+re),te=Math.max(ee,te)),be!==null&&(Ce=X*be,fe==="border-box"&&(Ce=Ce+le+re),J=te>Ce?"":"hidden",te=Math.min(Ce,te))}return{height:te,minHeight:ee,maxHeight:Ce,overflowY:J,resize:"none"}}var U=L("Gytx"),B=L.n(U),V;(function(ke){ke[ke.NONE=0]="NONE",ke[ke.RESIZING=1]="RESIZING",ke[ke.RESIZED=2]="RESIZED"})(V||(V={}));var ae=function(ke){Object(D.a)(Te,ke);var ve=Object(u.a)(Te);function Te(be){var ue;return Object(d.a)(this,Te),ue=ve.call(this,be),ue.nextFrameActionId=void 0,ue.resizeFrameId=void 0,ue.textArea=void 0,ue.saveTextArea=function(le){ue.textArea=le},ue.handleResize=function(le){var re=ue.state.resizeStatus,fe=ue.props,q=fe.autoSize,ee=fe.onResize;if(re!==V.NONE)return;typeof ee=="function"&&ee(le),q&&ue.resizeOnNextFrame()},ue.resizeOnNextFrame=function(){cancelAnimationFrame(ue.nextFrameActionId),ue.nextFrameActionId=requestAnimationFrame(ue.resizeTextarea)},ue.resizeTextarea=function(){var le=ue.props.autoSize;if(!le||!ue.textArea)return;var re=le.minRows,fe=le.maxRows,q=K(ue.textArea,!1,re,fe);ue.setState({textareaStyles:q,resizeStatus:V.RESIZING},function(){cancelAnimationFrame(ue.resizeFrameId),ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:V.RESIZED},function(){ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:V.NONE}),ue.fixFirefoxAutoScroll()})})})})},ue.renderTextArea=function(){var le=ue.props,re=le.prefixCls,fe=re===void 0?"rc-textarea":re,q=le.autoSize,ee=le.onResize,Ce=le.className,te=le.disabled,J=ue.state,X=J.textareaStyles,Q=J.resizeStatus,Ee=Object(g.a)(ue.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ge=M()(fe,Ce,Object(E.a)({},"".concat(fe,"-disabled"),te));"value"in Ee&&(Ee.value=Ee.value||"");var Oe=Object(C.a)(Object(C.a)(Object(C.a)({},ue.props.style),X),Q===V.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return p.createElement(v,{onResize:ue.handleResize,disabled:!(q||ee)},p.createElement("textarea",Object(P.a)({},Ee,{className:ge,style:Oe,ref:ue.saveTextArea})))},ue.state={textareaStyles:{},resizeStatus:V.NONE},ue}return Object(T.a)(Te,[{key:"componentDidUpdate",value:function(ue){(ue.value!==this.props.value||!B()(ue.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 ue=this.textArea.selectionStart,le=this.textArea.selectionEnd;this.textArea.setSelectionRange(ue,le)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Te}(p.Component),he=ae,pe=function(ke){Object(D.a)(Te,ke);var ve=Object(u.a)(Te);function Te(be){var ue;Object(d.a)(this,Te),ue=ve.call(this,be),ue.resizableTextArea=void 0,ue.focus=function(){ue.resizableTextArea.textArea.focus()},ue.saveTextArea=function(re){ue.resizableTextArea=re},ue.handleChange=function(re){var fe=ue.props.onChange;ue.setValue(re.target.value,function(){ue.resizableTextArea.resizeTextarea()}),fe&&fe(re)},ue.handleKeyDown=function(re){var fe=ue.props,q=fe.onPressEnter,ee=fe.onKeyDown;re.keyCode===13&&q&&q(re),ee&&ee(re)};var le=typeof be.value=="undefined"||be.value===null?be.defaultValue:be.value;return ue.state={value:le},ue}return Object(T.a)(Te,[{key:"setValue",value:function(ue,le){"value"in this.props||this.setState({value:ue},le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return p.createElement(he,Object(P.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ue){return"value"in ue?{value:ue.value}:null}}]),Te}(p.Component),Re=Z.default=pe},ZW9T:function(j,Z,L){"use strict";L.d(Z,"a",function(){return S});var P=L("k1fw"),d=L("miYZ"),T=L("tsqr"),D=L("rAM+"),u=L("tJVT"),p=L("PpiC"),C=L("q1tI"),E=L.n(C),l=L("bdgK");function s(x,o,k,O,b){var v=o.getWordUntilPosition(k),g={startLineNumber:k.lineNumber,endLineNumber:k.lineNumber,startColumn:v.startColumn,endColumn:v.endColumn},w=O.map(function(M){return{label:M,kind:x.languages.CompletionItemKind.Keyword,insertText:M,insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:g}});return b.map(function(M){w.push(Object(P.a)(Object(P.a)({},M),{},{range:g}))}),w}var n=function(x){var o={label:"ifelse",kind:x.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet},k=["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"];x.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(g,w){var M=s(x,g,w,k,[o]);return{suggestions:M}}});var O=["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"];x.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(g,w){var M=[{label:"print",kind:x.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(` `),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=s(x,g,w,O,M);return{suggestions:N}}});var b=["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"];x.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(g,w){var M=[o,{label:"main",kind:x.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(` `),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:x.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(` `),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=s(x,g,w,b,M);return{suggestions:N}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",f=L("LvDl");function c(x){return/^\d+$/.test(x)?"".concat(x,"px"):x}function m(){}var _=!1,y={"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 i(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=x;if(Array.isArray(x)){for(var k=0;k0||gt.target.offsetWidth>0)&&Ce.current.instance.layout()}}catch(yt){Je.e(yt)}finally{Je.f()}}),Ae.observe(ee.current)),Ae}function rt(){T.b.warn(decodeURIComponent(h))}var nt=function(){var Le=Ce.current.instance;if(v!=null&&Le&&ge){var Je=Le.getModel();Je&&v!==Je.getValue()&&(_=!0,Je.setValue(v),Le.layout(),_=!1)}};Object(C.useEffect)(function(){te.current&&clearTimeout(te.current),te.current=setTimeout(function(){nt()},500)},[v,ge,Ce.current]);function ut(){var Ae=Ce.current.instance;if(Ae){var Le=Ae.getSelection(),Je=Ce.current.pastePos||{},Ve=new a.Range(Je.startLineNumber||Le.endLineNumber,Je.startColumn||Le.endColumn,Je.endLineNumber||Le.endLineNumber,Je.endColumn||Le.endColumn);setTimeout(function(){Ae.executeEdits("",[{range:Ve,text:""}])},300)}}function dt(Ae){(window.navigator.platform.match("Mac")?Ae.metaKey:Ae.ctrlKey)&&Ae.keyCode==83&&(Ae.preventDefault(),V())}var mt=function(){if(he&&Ce.current.instance){var Le=Ce.current.instance.getContentHeight();xe(Le0||Te.target.offsetWidth>0)&&he.layout()}}catch(be){ke.e(be)}finally{ke.f()}}),pe.observe(I.current)),pe}Object(C.useEffect)(function(){I.current&&L.e(27).then(L.t.bind(null,"M/lh",7)).then(function(he){a=he;var pe=a.editor.createDiffEditor(I.current,Object(P.a)(Object(P.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},N),{},{wordWrap:!0}));K(pe);var Re=U(pe);return function(){pe.dispose();var ke=pe.getModel();ke&&ke.dispose(),Re.unobserve(I.current)}})},[]),Object(C.useEffect)(function(){H&&H.setModel({original:a.editor.createModel(v,w),modified:a.editor.createModel(g,w)})},[v,g,w,H]);var B=c(k),V=c(b),ae={width:B,height:V};return E.a.createElement("div",{className:"my-diff-editor",ref:I,style:ae})}},ZpRC:function(j,Z,L){"use strict";function P(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function d(n,h){return(!h||n!=="hidden")&&n!=="visible"&&n!=="clip"}function T(n,h){if(n.clientHeighth||_>n&&y=h&&i>=f?_-n-c:y>h&&if?y-h+m:0}var u=function(n,h){var f=window,c=h.scrollMode,m=h.block,_=h.inline,y=h.boundary,i=h.skipOverflowHiddenElements,a=typeof y=="function"?y:function(X){return X!==y};if(!P(n))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,S=[],x=n;P(x)&&a(x);){if((x=x.parentElement)===t){S.push(x);break}x!=null&&x===document.body&&T(x)&&!T(document.documentElement)||x!=null&&T(x,i)&&S.push(x)}for(var o=f.visualViewport?f.visualViewport.width:innerWidth,k=f.visualViewport?f.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,v=n.getBoundingClientRect(),g=v.height,w=v.width,M=v.top,N=v.right,I=v.bottom,G=v.left,z=m==="start"||m==="nearest"?M:m==="end"?I:M+g/2,H=_==="center"?G+w/2:_==="end"?N:G,K=[],U=0;U=0&&G>=0&&I<=k&&N<=o&&M>=pe&&I<=ke&&G>=ve&&N<=Re)return K;var Te=getComputedStyle(B),be=parseInt(Te.borderLeftWidth,10),ue=parseInt(Te.borderTopWidth,10),le=parseInt(Te.borderRightWidth,10),re=parseInt(Te.borderBottomWidth,10),fe=0,q=0,ee="offsetWidth"in B?B.offsetWidth-B.clientWidth-be-le:0,Ce="offsetHeight"in B?B.offsetHeight-B.clientHeight-ue-re:0;if(t===B)fe=m==="start"?z:m==="end"?z-k:m==="nearest"?D(b,b+k,k,ue,re,b+z,b+z+g,g):z-k/2,q=_==="start"?H:_==="center"?H-o/2:_==="end"?H-o:D(O,O+o,o,be,le,O+H,O+H+w,w),fe=Math.max(0,fe+b),q=Math.max(0,q+O);else{fe=m==="start"?z-pe-ue:m==="end"?z-ke+re+Ce:m==="nearest"?D(pe,ke,ae,ue,re+Ce,z,z+g,g):z-(pe+ae/2)+Ce/2,q=_==="start"?H-ve-be:_==="center"?H-(ve+he/2)+ee/2:_==="end"?H-Re+le+ee:D(ve,Re,he,be,le+ee,H,H+w,w);var te=B.scrollLeft,J=B.scrollTop;z+=J-(fe=Math.max(0,Math.min(J+fe,B.scrollHeight-ae+Ce))),H+=te-(q=Math.max(0,Math.min(te+q,B.scrollWidth-he+ee)))}K.push({el:B,top:fe,left:q})}return K};function p(n){return n===Object(n)&&Object.keys(n).length!==0}function C(n,h){h===void 0&&(h="auto");var f="scrollBehavior"in document.body.style;n.forEach(function(c){var m=c.el,_=c.top,y=c.left;m.scroll&&f?m.scroll({top:_,left:y,behavior:h}):(m.scrollTop=_,m.scrollLeft=y)})}function E(n){return n===!1?{block:"end",inline:"nearest"}:p(n)?n:{block:"start",inline:"nearest"}}function l(n,h){var f=!n.ownerDocument.documentElement.contains(n);if(p(h)&&typeof h.behavior=="function")return h.behavior(f?[]:u(n,h));if(f)return;var c=E(h);return C(u(n,c),c.behavior)}var s=Z.a=l},Zss7:function(j,Z,L){var P;(function(d){var T=/^\s+/,D=/\s+$/,u=0,p=d.round,C=d.min,E=d.max,l=d.random;function s(re,fe){if(re=re||"",fe=fe||{},re instanceof s)return re;if(!(this instanceof s))return new s(re,fe);var q=n(re);this._originalInput=re,this._r=q.r,this._g=q.g,this._b=q.b,this._a=q.a,this._roundA=p(100*this._a)/100,this._format=fe.format||q.format,this._gradientType=fe.gradientType,this._r<1&&(this._r=p(this._r)),this._g<1&&(this._g=p(this._g)),this._b<1&&(this._b=p(this._b)),this._ok=q.ok,this._tc_id=u++}s.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 re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),fe,q,ee,Ce,te,J;return fe=re.r/255,q=re.g/255,ee=re.b/255,fe<=.03928?Ce=fe/12.92:Ce=d.pow((fe+.055)/1.055,2.4),q<=.03928?te=q/12.92:te=d.pow((q+.055)/1.055,2.4),ee<=.03928?J=ee/12.92:J=d.pow((ee+.055)/1.055,2.4),.2126*Ce+.7152*te+.0722*J},setAlpha:function(re){return this._a=K(re),this._roundA=p(100*this._a)/100,this},toHsv:function(){var re=m(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=m(this._r,this._g,this._b),fe=p(re.h*360),q=p(re.s*100),ee=p(re.v*100);return this._a==1?"hsv("+fe+", "+q+"%, "+ee+"%)":"hsva("+fe+", "+q+"%, "+ee+"%, "+this._roundA+")"},toHsl:function(){var re=f(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=f(this._r,this._g,this._b),fe=p(re.h*360),q=p(re.s*100),ee=p(re.l*100);return this._a==1?"hsl("+fe+", "+q+"%, "+ee+"%)":"hsla("+fe+", "+q+"%, "+ee+"%, "+this._roundA+")"},toHex:function(re){return y(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return i(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:p(this._r),g:p(this._g),b:p(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+p(this._r)+", "+p(this._g)+", "+p(this._b)+")":"rgba("+p(this._r)+", "+p(this._g)+", "+p(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:p(U(this._r,255)*100)+"%",g:p(U(this._g,255)*100)+"%",b:p(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+p(U(this._r,255)*100)+"%, "+p(U(this._g,255)*100)+"%, "+p(U(this._b,255)*100)+"%)":"rgba("+p(U(this._r,255)*100)+"%, "+p(U(this._g,255)*100)+"%, "+p(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[y(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var fe="#"+a(this._r,this._g,this._b,this._a),q=fe,ee=this._gradientType?"GradientType = 1, ":"";if(re){var Ce=s(re);q="#"+a(Ce._r,Ce._g,Ce._b,Ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+ee+"startColorstr="+fe+",endColorstr="+q+")"},toString:function(re){var fe=!!re;re=re||this._format;var q=!1,ee=this._a<1&&this._a>=0,Ce=!fe&&ee&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Ce?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(q=this.toRgbString()),re==="prgb"&&(q=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(q=this.toHexString()),re==="hex3"&&(q=this.toHexString(!0)),re==="hex4"&&(q=this.toHex8String(!0)),re==="hex8"&&(q=this.toHex8String()),re==="name"&&(q=this.toName()),re==="hsl"&&(q=this.toHslString()),re==="hsv"&&(q=this.toHsvString()),q||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(re,fe){var q=re.apply(null,[this].concat([].slice.call(fe)));return this._r=q._r,this._g=q._g,this._b=q._b,this.setAlpha(q._a),this},lighten:function(){return this._applyModification(o,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(re,fe){return re.apply(null,[this].concat([].slice.call(fe)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},s.fromRatio=function(re,fe){if(typeof re=="object"){var q={};for(var ee in re)re.hasOwnProperty(ee)&&(ee==="a"?q[ee]=re[ee]:q[ee]=Re(re[ee]));re=q}return s(re,fe)};function n(re){var fe={r:0,g:0,b:0},q=1,ee=null,Ce=null,te=null,J=!1,X=!1;return typeof re=="string"&&(re=ue(re)),typeof re=="object"&&(be(re.r)&&be(re.g)&&be(re.b)?(fe=h(re.r,re.g,re.b),J=!0,X=String(re.r).substr(-1)==="%"?"prgb":"rgb"):be(re.h)&&be(re.s)&&be(re.v)?(ee=Re(re.s),Ce=Re(re.v),fe=_(re.h,ee,Ce),J=!0,X="hsv"):be(re.h)&&be(re.s)&&be(re.l)&&(ee=Re(re.s),te=Re(re.l),fe=c(re.h,ee,te),J=!0,X="hsl"),re.hasOwnProperty("a")&&(q=re.a)),q=K(q),{ok:J,format:re.format||X,r:C(255,E(fe.r,0)),g:C(255,E(fe.g,0)),b:C(255,E(fe.b,0)),a:q}}function h(re,fe,q){return{r:U(re,255)*255,g:U(fe,255)*255,b:U(q,255)*255}}function f(re,fe,q){re=U(re,255),fe=U(fe,255),q=U(q,255);var ee=E(re,fe,q),Ce=C(re,fe,q),te,J,X=(ee+Ce)/2;if(ee==Ce)te=J=0;else{var Q=ee-Ce;J=X>.5?Q/(2-ee-Ce):Q/(ee+Ce);switch(ee){case re:te=(fe-q)/Q+(fe1&&(Oe-=1),Oe<1/6?Ee+(ge-Ee)*6*Oe:Oe<1/2?ge:Oe<2/3?Ee+(ge-Ee)*(2/3-Oe)*6:Ee}if(fe===0)ee=Ce=te=q;else{var X=q<.5?q*(1+fe):q+fe-q*fe,Q=2*q-X;ee=J(Q,X,re+1/3),Ce=J(Q,X,re),te=J(Q,X,re-1/3)}return{r:ee*255,g:Ce*255,b:te*255}}function m(re,fe,q){re=U(re,255),fe=U(fe,255),q=U(q,255);var ee=E(re,fe,q),Ce=C(re,fe,q),te,J,X=ee,Q=ee-Ce;if(J=ee===0?0:Q/ee,ee==Ce)te=0;else{switch(ee){case re:te=(fe-q)/Q+(fe>1)+720)%360;--fe;)ee.h=(ee.h+Ce)%360,te.push(s(ee));return te}function I(re,fe){fe=fe||6;for(var q=s(re).toHsv(),ee=q.h,Ce=q.s,te=q.v,J=[],X=1/fe;fe--;)J.push(s({h:ee,s:Ce,v:te})),te=(te+X)%1;return J}s.mix=function(re,fe,q){q=q===0?0:q||50;var ee=s(re).toRgb(),Ce=s(fe).toRgb(),te=q/100,J={r:(Ce.r-ee.r)*te+ee.r,g:(Ce.g-ee.g)*te+ee.g,b:(Ce.b-ee.b)*te+ee.b,a:(Ce.a-ee.a)*te+ee.a};return s(J)},s.readability=function(re,fe){var q=s(re),ee=s(fe);return(d.max(q.getLuminance(),ee.getLuminance())+.05)/(d.min(q.getLuminance(),ee.getLuminance())+.05)},s.isReadable=function(re,fe,q){var ee=s.readability(re,fe),Ce,te;te=!1,Ce=le(q);switch(Ce.level+Ce.size){case"AAsmall":case"AAAlarge":te=ee>=4.5;break;case"AAlarge":te=ee>=3;break;case"AAAsmall":te=ee>=7;break}return te},s.mostReadable=function(re,fe,q){var ee=null,Ce=0,te,J,X,Q;q=q||{},J=q.includeFallbackColors,X=q.level,Q=q.size;for(var Ee=0;EeCe&&(Ce=te,ee=s(fe[Ee]));return s.isReadable(re,ee,{level:X,size:Q})||!J?ee:(q.includeFallbackColors=!1,s.mostReadable(re,["#fff","#000"],q))};var G=s.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"},z=s.hexNames=H(G);function H(re){var fe={};for(var q in re)re.hasOwnProperty(q)&&(fe[re[q]]=q);return fe}function K(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function U(re,fe){ae(re)&&(re="100%");var q=he(re);return re=C(fe,E(0,parseFloat(re))),q&&(re=parseInt(re*fe,10)/100),d.abs(re-fe)<1e-6?1:re%fe/parseFloat(fe)}function B(re){return C(1,E(0,re))}function V(re){return parseInt(re,16)}function ae(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function he(re){return typeof re=="string"&&re.indexOf("%")!=-1}function pe(re){return re.length==1?"0"+re:""+re}function Re(re){return re<=1&&(re=re*100+"%"),re}function ke(re){return d.round(parseFloat(re)*255).toString(16)}function ve(re){return V(re)/255}var Te=function(){var re="[-\\+]?\\d+%?",fe="[-\\+]?\\d*\\.\\d+%?",q="(?:"+fe+")|(?:"+re+")",ee="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",Ce="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?";return{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+ee),rgba:new RegExp("rgba"+Ce),hsl:new RegExp("hsl"+ee),hsla:new RegExp("hsla"+Ce),hsv:new RegExp("hsv"+ee),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 be(re){return!!Te.CSS_UNIT.exec(re)}function ue(re){re=re.replace(T,"").replace(D,"").toLowerCase();var fe=!1;if(G[re])re=G[re],fe=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var q;return(q=Te.rgb.exec(re))?{r:q[1],g:q[2],b:q[3]}:(q=Te.rgba.exec(re))?{r:q[1],g:q[2],b:q[3],a:q[4]}:(q=Te.hsl.exec(re))?{h:q[1],s:q[2],l:q[3]}:(q=Te.hsla.exec(re))?{h:q[1],s:q[2],l:q[3],a:q[4]}:(q=Te.hsv.exec(re))?{h:q[1],s:q[2],v:q[3]}:(q=Te.hsva.exec(re))?{h:q[1],s:q[2],v:q[3],a:q[4]}:(q=Te.hex8.exec(re))?{r:V(q[1]),g:V(q[2]),b:V(q[3]),a:ve(q[4]),format:fe?"name":"hex8"}:(q=Te.hex6.exec(re))?{r:V(q[1]),g:V(q[2]),b:V(q[3]),format:fe?"name":"hex"}:(q=Te.hex4.exec(re))?{r:V(q[1]+""+q[1]),g:V(q[2]+""+q[2]),b:V(q[3]+""+q[3]),a:ve(q[4]+""+q[4]),format:fe?"name":"hex8"}:(q=Te.hex3.exec(re))?{r:V(q[1]+""+q[1]),g:V(q[2]+""+q[2]),b:V(q[3]+""+q[3]),format:fe?"name":"hex"}:!1}function le(re){var fe,q;return re=re||{level:"AA",size:"small"},fe=(re.level||"AA").toUpperCase(),q=(re.size||"small").toLowerCase(),fe!=="AA"&&fe!=="AAA"&&(fe="AA"),q!=="small"&&q!=="large"&&(q="small"),{level:fe,size:q}}j.exports?j.exports=s:!(P=function(){return s}.call(Z,L,Z,j),P!==void 0&&(j.exports=P))})(Math)},bQjk:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.CipherParams,p=T.enc,C=p.Hex,E=T.format,l=E.Hex={stringify:function(s){return s.ciphertext.toString(C)},parse:function(s){var n=C.parse(s);return u.create({ciphertext:n})}}}(),P.format.Hex})},bT9E:function(j,Z,L){"use strict";L.d(Z,"a",function(){return d});var P=L("VTBJ");function d(T,D){var u=Object(P.a)({},T);return Array.isArray(D)&&D.forEach(function(p){delete u[p]}),u}},biw7:function(j,Z,L){"use strict";var P=L("q1tI"),d=L.n(P),T=P.createContext(null);Z.a=T},c5Ni:function(j,Z,L){},cv67:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.WordArray,p=D.Hasher,C=T.algo,E=[];(function(){for(var c=0;c<64;c++)E[c]=d.abs(d.sin(c+1))*4294967296|0})();var l=C.MD5=p.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(c,m){for(var _=0;_<16;_++){var y=m+_,i=c[y];c[y]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,t=c[m+0],S=c[m+1],x=c[m+2],o=c[m+3],k=c[m+4],O=c[m+5],b=c[m+6],v=c[m+7],g=c[m+8],w=c[m+9],M=c[m+10],N=c[m+11],I=c[m+12],G=c[m+13],z=c[m+14],H=c[m+15],K=a[0],U=a[1],B=a[2],V=a[3];K=s(K,U,B,V,t,7,E[0]),V=s(V,K,U,B,S,12,E[1]),B=s(B,V,K,U,x,17,E[2]),U=s(U,B,V,K,o,22,E[3]),K=s(K,U,B,V,k,7,E[4]),V=s(V,K,U,B,O,12,E[5]),B=s(B,V,K,U,b,17,E[6]),U=s(U,B,V,K,v,22,E[7]),K=s(K,U,B,V,g,7,E[8]),V=s(V,K,U,B,w,12,E[9]),B=s(B,V,K,U,M,17,E[10]),U=s(U,B,V,K,N,22,E[11]),K=s(K,U,B,V,I,7,E[12]),V=s(V,K,U,B,G,12,E[13]),B=s(B,V,K,U,z,17,E[14]),U=s(U,B,V,K,H,22,E[15]),K=n(K,U,B,V,S,5,E[16]),V=n(V,K,U,B,b,9,E[17]),B=n(B,V,K,U,N,14,E[18]),U=n(U,B,V,K,t,20,E[19]),K=n(K,U,B,V,O,5,E[20]),V=n(V,K,U,B,M,9,E[21]),B=n(B,V,K,U,H,14,E[22]),U=n(U,B,V,K,k,20,E[23]),K=n(K,U,B,V,w,5,E[24]),V=n(V,K,U,B,z,9,E[25]),B=n(B,V,K,U,o,14,E[26]),U=n(U,B,V,K,g,20,E[27]),K=n(K,U,B,V,G,5,E[28]),V=n(V,K,U,B,x,9,E[29]),B=n(B,V,K,U,v,14,E[30]),U=n(U,B,V,K,I,20,E[31]),K=h(K,U,B,V,O,4,E[32]),V=h(V,K,U,B,g,11,E[33]),B=h(B,V,K,U,N,16,E[34]),U=h(U,B,V,K,z,23,E[35]),K=h(K,U,B,V,S,4,E[36]),V=h(V,K,U,B,k,11,E[37]),B=h(B,V,K,U,v,16,E[38]),U=h(U,B,V,K,M,23,E[39]),K=h(K,U,B,V,G,4,E[40]),V=h(V,K,U,B,t,11,E[41]),B=h(B,V,K,U,o,16,E[42]),U=h(U,B,V,K,b,23,E[43]),K=h(K,U,B,V,w,4,E[44]),V=h(V,K,U,B,I,11,E[45]),B=h(B,V,K,U,H,16,E[46]),U=h(U,B,V,K,x,23,E[47]),K=f(K,U,B,V,t,6,E[48]),V=f(V,K,U,B,v,10,E[49]),B=f(B,V,K,U,z,15,E[50]),U=f(U,B,V,K,O,21,E[51]),K=f(K,U,B,V,I,6,E[52]),V=f(V,K,U,B,o,10,E[53]),B=f(B,V,K,U,M,15,E[54]),U=f(U,B,V,K,S,21,E[55]),K=f(K,U,B,V,g,6,E[56]),V=f(V,K,U,B,H,10,E[57]),B=f(B,V,K,U,b,15,E[58]),U=f(U,B,V,K,G,21,E[59]),K=f(K,U,B,V,k,6,E[60]),V=f(V,K,U,B,N,10,E[61]),B=f(B,V,K,U,x,15,E[62]),U=f(U,B,V,K,w,21,E[63]),a[0]=a[0]+K|0,a[1]=a[1]+U|0,a[2]=a[2]+B|0,a[3]=a[3]+V|0},_doFinalize:function(){var c=this._data,m=c.words,_=this._nDataBytes*8,y=c.sigBytes*8;m[y>>>5]|=128<<24-y%32;var i=d.floor(_/4294967296),a=_;m[(y+64>>>9<<4)+15]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,m[(y+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,c.sigBytes=(m.length+1)*4,this._process();for(var t=this._hash,S=t.words,x=0;x<4;x++){var o=S[x];S[x]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360}return t},clone:function(){var c=p.clone.call(this);return c._hash=this._hash.clone(),c}});function s(c,m,_,y,i,a,t){var S=c+(m&_|~m&y)+i+t;return(S<>>32-a)+m}function n(c,m,_,y,i,a,t){var S=c+(m&y|_&~y)+i+t;return(S<>>32-a)+m}function h(c,m,_,y,i,a,t){var S=c+(m^_^y)+i+t;return(S<>>32-a)+m}function f(c,m,_,y,i,a,t){var S=c+(_^(m|~y))+i+t;return(S<>>32-a)+m}T.MD5=p._createHelper(l),T.HmacMD5=p._createHmacHelper(l)}(Math),P.MD5})},dejd:function(j,Z,L){},dmUQ:function(j,Z,L){"use strict";var P=L("Ff2n"),d=L("rePB"),T=L("1OyB"),D=L("vuIU"),u=L("Ji7U"),p=L("md7G"),C=L("foSv"),E=L("q1tI"),l=L.n(E),s=L("TSYQ"),n=L.n(s),h=L("4IlW");function f(g,w){var M=Object.keys(g);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(g);w&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(g,I).enumerable})),M.push.apply(M,N)}return M}function c(g){for(var w=1;w1?he-1:0),Re=1;Re1?U-1:0),V=1;V=0)return parseInt(K.slice(K.indexOf("e-")+2),10);var U=0;return K.indexOf(".")>=0&&(U=K.length-K.indexOf(".")-1),U},I.getInputDisplayValue=function(H){var K=H||I.state,U=K.focused,B=K.inputValue,V=K.value,ae;U?ae=B:ae=I.toPrecisionAsStep(V),ae==null&&(ae="");var he=I.formatWrapper(ae);return o(I.props.decimalSeparator)&&(he=he.toString().replace(".",I.props.decimalSeparator)),he},I.recordCursorPosition=function(){try{I.cursorStart=I.input.selectionStart,I.cursorEnd=I.input.selectionEnd,I.currentValue=I.input.value,I.cursorBefore=I.input.value.substring(0,I.cursorStart),I.cursorAfter=I.input.value.substring(I.cursorEnd)}catch(H){}},I.restoreByAfter=function(H){if(H===void 0)return!1;var K=I.input.value,U=K.lastIndexOf(H);if(U===-1)return!1;var B=I.cursorBefore.length;return I.lastKeyCode===h.a.DELETE&&I.cursorBefore.charAt(B-1)===H[0]?(I.fixCaret(B,B),!0):U+H.length===K.length?(I.fixCaret(U,U),!0):!1},I.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(K,U){var B=H.substring(U);return I.restoreByAfter(B)})},I.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},I.stop=function(){I.autoStepTimer&&clearTimeout(I.autoStepTimer)},I.down=function(H,K,U){I.pressingUpOrDown=!0,I.step("down",H,K,U)},I.up=function(H,K,U){I.pressingUpOrDown=!0,I.step("up",H,K,U)},I.saveInput=function(H){I.input=H};var G=N.value;G===void 0&&(G=N.defaultValue),I.state={focused:N.autoFocus};var z=I.getValidValue(I.toNumber(G));return I.state=c(c({},I.state),{},{inputValue:I.toPrecisionAsStep(z),value:z}),I}return Object(D.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(I){var G=this.props,z=G.value,H=G.onChange,K=G.max,U=G.min,B=this.state.focused;if(I){if(!k(I.value,z)||!k(I.max,K)||!k(I.min,U)){var V=B?z:this.getValidValue(z),ae;this.pressingUpOrDown?ae=V:this.inputting?ae=this.rawInput:ae=this.toPrecisionAsStep(V),this.setState({value:V,inputValue:ae})}var he="value"in this.props?z:this.state.value;"max"in this.props&&I.max!==K&&typeof he=="number"&&he>K&&H&&H(K),"min"in this.props&&I.min!==U&&typeof he=="number"&&he1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(I);return isNaN(H)?I:(Hz&&(H=z),H)}},{key:"setValue",value:function(I,G){var z=this.props.precision,H=this.isNotCompleteNumber(parseFloat(I))?null:parseFloat(I),K=this.state.value,U=K===void 0?null:K,B=this.state.inputValue,V=B===void 0?null:B,ae=typeof H=="number"?H.toFixed(z):"".concat(H),he=H!==U||ae!=="".concat(V);return"value"in this.props?(V=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:V},G)):this.setState({value:H,inputValue:this.toPrecisionAsStep(I)},G),he&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,H=z.precision,K=z.step;if(o(H))return H;var U=this.getPrecision(G),B=this.getPrecision(K),V=this.getPrecision(I);return I?Math.max(V,U+B):U+B}},{key:"getPrecisionFactor",value:function(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(I,G);return Math.pow(10,z)}},{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(I){return this.props.formatter?this.props.formatter(I):I}},{key:"toPrecisionAsStep",value:function(I){if(this.isNotCompleteNumber(I)||I==="")return I;var G=Math.abs(this.getMaxPrecision(I));return isNaN(G)?I.toString():Number(I).toFixed(G)}},{key:"toNumber",value:function(I){var G=this.props.precision,z=this.state.focused,H=I&&I.length>16&&z;return this.isNotCompleteNumber(I)||H?I:o(G)?Math.round(I*Math.pow(10,G))/Math.pow(10,G):Number(I)}},{key:"upStep",value:function(I,G){var z=this.props.step,H=this.getPrecisionFactor(I,G),K=Math.abs(this.getMaxPrecision(I,G)),U=((H*I+H*z*G)/H).toFixed(K);return this.toNumber(U)}},{key:"downStep",value:function(I,G){var z=this.props.step,H=this.getPrecisionFactor(I,G),K=Math.abs(this.getMaxPrecision(I,G)),U=((H*I-H*z*G)/H).toFixed(K);return this.toNumber(U)}},{key:"step",value:function(I,G){var z=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,K=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var U=this.props;if(U.disabled)return;var B=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(B))return;var V=this["".concat(I,"Step")](B,H),ae=V>U.max||VU.max?V=U.max:V=pe),st=(dt||dt===0)&&(isNaN(dt)||Number(dt)<=Re),Ue=Ze||H||K,Me=st||H||K,Ne=n()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(d.a)({},"".concat(z,"-handler-up-disabled"),Ue)),xe=n()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(d.a)({},"".concat(z,"-handler-down-disabled"),Me)),Se=U?{onTouchStart:Ue?y:this.up,onTouchEnd:this.stop}:{onMouseDown:Ue?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ae=U?{onTouchStart:Me?y:this.down,onTouchEnd:this.stop}:{onMouseDown:Me?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return l.a.createElement("div",{className:He,style:ke,title:ve,onMouseEnter:Te,onMouseLeave:be,onMouseOver:ue,onMouseOut:le,onFocus:function(){return null},onBlur:function(){return null}},l.a.createElement("div",{className:"".concat(z,"-handler-wrap")},l.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Increase Value","aria-disabled":Ue,className:Ne}),V||l.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:i})),l.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Decrease Value","aria-disabled":Me,className:xe}),ae||l.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:i}))),l.a.createElement("div",{className:"".concat(z,"-input-wrap")},l.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Re,"aria-valuemax":pe,"aria-valuenow":dt,required:re,type:ee,placeholder:Ce,onPaste:Qe,onClick:fe,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:q,autoComplete:B,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:at?this.onKeyDown:y,onKeyUp:at?this.onKeyUp:y,autoFocus:ge,maxLength:Ee,readOnly:K,disabled:H,max:pe,min:Re,step:Q,name:Oe,title:ve,id:te,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ht),pattern:X,inputMode:J,onInput:rt},De))))}}]),M}(l.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:a,required:!1,autoComplete:"off"};var b=O,v=Z.a=b},e7zE:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("3y9D"),L("WYAk"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.Base,u=T.WordArray,p=d.algo,C=p.SHA1,E=p.HMAC,l=p.PBKDF2=D.extend({cfg:D.extend({keySize:128/32,hasher:C,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,n){for(var h=this.cfg,f=E.create(h.hasher,s),c=u.create(),m=u.create([1]),_=c.words,y=m.words,i=h.keySize,a=h.iterations;_.lengthz.length)&&(H=z.length);for(var K=0,U=new Array(H);K=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;K[U]=z[U]}}return K}function m(z,H){if(z==null)return{};var K={},U=Object.keys(z),B,V;for(V=0;V=0)continue;K[B]=z[B]}return K}var _=function(H){var K=H.className,U=H.percent,B=H.prefixCls,V=H.strokeColor,ae=H.strokeLinecap,he=H.strokeWidth,pe=H.style,Re=H.trailColor,ke=H.trailWidth,ve=H.transition,Te=c(H,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Te.gapPosition;var be=Array.isArray(U)?U:[U],ue=Array.isArray(V)?V:[V],le=p(be),re=E(le,1),fe=re[0],q=he/2,ee=100-he/2,Ce="M ".concat(ae==="round"?q:0,",").concat(q,` L `).concat(ae==="round"?ee:100,",").concat(q),te="0 0 100 ".concat(he),J=0;return d.a.createElement("svg",C({className:D()("".concat(B,"-line"),K),viewBox:te,preserveAspectRatio:"none",style:pe},Te),d.a.createElement("path",{className:"".concat(B,"-line-trail"),d:Ce,strokeLinecap:ae,stroke:Re,strokeWidth:ke||he,fillOpacity:"0"}),be.map(function(X,Q){var Ee={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(J,"px"),transition:ve||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ge=ue[Q]||ue[ue.length-1];return J+=X,d.a.createElement("path",{key:Q,className:"".concat(B,"-line-path"),d:Ce,strokeLinecap:ae,stroke:ge,strokeWidth:he,fillOpacity:"0",ref:fe[Q],style:Ee})}))};_.defaultProps=u;var y=_;function i(){return i=Object.assign||function(z){for(var H=1;Hz.length)&&(H=z.length);for(var K=0,U=new Array(H);K=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;K[U]=z[U]}}return K}function b(z,H){if(z==null)return{};var K={},U=Object.keys(z),B,V;for(V=0;V=0)continue;K[B]=z[B]}return K}var v=0;function g(z){return+z.replace("%","")}function w(z){return Array.isArray(z)?z:[z]}function M(z,H,K,U){var B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,V=arguments.length>5?arguments[5]:void 0,ae=50-U/2,he=0,pe=-ae,Re=0,ke=-2*ae;switch(V){case"left":he=-ae,pe=0,Re=2*ae,ke=0;break;case"right":he=ae,pe=0,Re=-2*ae,ke=0;break;case"bottom":pe=ae,ke=2*ae;break;default:}var ve="M 50,50 m ".concat(he,",").concat(pe,` a `).concat(ae,",").concat(ae," 0 1 1 ").concat(Re,",").concat(-ke,` a `).concat(ae,",").concat(ae," 0 1 1 ").concat(-Re,",").concat(ke),Te=Math.PI*2*ae,be={stroke:K,strokeDasharray:"".concat(H/100*(Te-B),"px ").concat(Te,"px"),strokeDashoffset:"-".concat(B/2+z/100*(Te-B),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ve,pathStyle:be}}var N=function(H){var K=H.prefixCls,U=H.strokeWidth,B=H.trailWidth,V=H.gapDegree,ae=H.gapPosition,he=H.trailColor,pe=H.strokeLinecap,Re=H.style,ke=H.className,ve=H.strokeColor,Te=H.percent,be=O(H,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ue=Object(P.useMemo)(function(){return v+=1,v},[]),le=M(0,100,he,U,V,ae),re=le.pathString,fe=le.pathStyle,q=w(Te),ee=w(ve),Ce=ee.find(function(Ee){return Object.prototype.toString.call(Ee)==="[object Object]"}),te=p(q),J=a(te,1),X=J[0],Q=function(){var ge=0;return q.map(function(Oe,Qe){var rt=ee[Qe]||ee[ee.length-1],nt=Object.prototype.toString.call(rt)==="[object Object]"?"url(#".concat(K,"-gradient-").concat(ue,")"):"",ut=M(ge,Oe,rt,U,V,ae);return ge+=Oe,d.a.createElement("path",{key:Qe,className:"".concat(K,"-circle-path"),d:ut.pathString,stroke:nt,strokeLinecap:pe,strokeWidth:U,opacity:Oe===0?0:1,fillOpacity:"0",style:ut.pathStyle,ref:X[Qe]})})};return d.a.createElement("svg",i({className:D()("".concat(K,"-circle"),ke),viewBox:"0 0 100 100",style:Re},be),Ce&&d.a.createElement("defs",null,d.a.createElement("linearGradient",{id:"".concat(K,"-gradient-").concat(ue),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ce).sort(function(Ee,ge){return g(Ee)-g(ge)}).map(function(Ee,ge){return d.a.createElement("stop",{key:ge,offset:Ee,stopColor:Ce[Ee]})}))),d.a.createElement("path",{className:"".concat(K,"-circle-trail"),d:re,stroke:he,strokeLinecap:pe,strokeWidth:B||U,fillOpacity:"0",style:fe}),Q().reverse())};N.defaultProps=u;var I=N,G={Line:y,Circle:I}},hW8S:function(j,Z,L){"use strict";L.d(Z,"a",function(){return D}),L.d(Z,"c",function(){return u}),L.d(Z,"b",function(){return p});var P=L("VTBJ"),d=L("Ff2n"),T=L("Kwbf"),D="RC_TABLE_INTERNAL_COL_DEFINE";function u(C){var E=C.expandable,l=Object(d.a)(C,["expandable"]);return"expandable"in C?Object(P.a)(Object(P.a)({},l),E):l}function p(C){return Object.keys(C).reduce(function(E,l){return(l.substr(0,5)==="data-"||l.substr(0,5)==="aria-")&&(E[l]=C[l]),E},{})}},jO9C:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(d,T){d.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(d,T)},unpad:function(d){P.pad.ZeroPadding.unpad(d),d.sigBytes--}},P.pad.Iso97971})},jwmR:function(j,Z,L){j.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(j,Z,L){"use strict";L.d(Z,"a",function(){return Ar});var P=L("rePB"),d=L("ODXe"),T=L("Ff2n"),D=L("VTBJ"),u=L("q1tI"),p=L("TSYQ"),C=L.n(p),E=L("Zm9Q"),l=L("6cGi"),s=L("KQm4"),n=L("xEkU"),h=L.n(n),f=L("t23M");function c(Ie){var Ge=Object(u.useRef)(),Ye=Object(u.useRef)(!1);function Fe(){for(var ye=arguments.length,Pe=new Array(ye),we=0;weqe&&(It=qe-kt),Object(u.useMemo)(function(){if(!Pe.length)return[0,0];for(var Xt=Pe.length,Pr=Xt,Gr=0;GrWe+It){Pr=Gr-1;break}}for(var Qr=0,Wr=Xt-1;Wr>=0;Wr-=1){var en=Ie.get(Pe[Wr].key)||S;if(en[Xe]1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Fe){if(Ye){var ye=getComputedStyle(Ge),Pe=ye.marginLeft,we=ye.marginRight;Fe+=+Pe.replace("px","")+ +we.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ge=function(Ge,Ye,Fe){Ge&&Object(z.a)(Ge.style)==="object"&&(Ge.style[Ye]=Fe)},Oe=function(){return q.any},Qe=L("bdgK"),rt=L("i8i4"),nt=L.n(rt),ut=L("wgJM"),dt=L("l4aY"),mt=L("m+aA"),He=L("c+Xe"),De=L("zT1h"),at=L("QC+M");function ht(Ie,Ge,Ye){return Ye?Ie[0]===Ge[0]:Ie[0]===Ge[0]&&Ie[1]===Ge[1]}function Ze(Ie,Ge,Ye){var Fe=Ie[Ge]||{};return Object(D.a)(Object(D.a)({},Fe),Ye)}function st(Ie,Ge,Ye,Fe){for(var ye=Ye.points,Pe=Object.keys(Ie),we=0;we1&&arguments[1]!==void 0?arguments[1]:2;Ge();var Pe=Object(ut.a)(function(){ye<=1?Fe({isCanceled:function(){return Pe!==Ie.current}}):Ye(Fe,ye-1)});Ie.current=Pe}return u.useEffect(function(){return function(){Ge()}},[]),[Ye,Ge]},xi=[Rr,mn,vn,Gt],Ti=!1,hn=!0;function cr(Ie){return Ie===vn||Ie===Gt}var Gn=function(Ie,Ge){var Ye=u.useState(sn),Fe=Object(d.a)(Ye,2),ye=Fe[0],Pe=Fe[1],we=xn(),je=Object(d.a)(we,2),ze=je[0],Xe=je[1];function We(){Pe(Rr)}return Sn(function(){if(ye!==sn&&ye!==Gt){var qe=xi.indexOf(ye),ft=xi[qe+1],kt=Ge(ye);kt===Ti?Pe(ft):ze(function(It){function Xt(){if(It.isCanceled())return;Pe(ft)}kt===!0?Xt():Promise.resolve(kt).then(Xt)})}},[Ie,ye]),u.useEffect(function(){return function(){Xe()}},[]),[We,ye]},pi=function(Ie){var Ge=Object(u.useRef)(),Ye=Object(u.useRef)(Ie);Ye.current=Ie;var Fe=u.useCallback(function(we){Ye.current(we)},[]);function ye(we){we&&(we.removeEventListener(mr,Fe),we.removeEventListener(Nt,Fe))}function Pe(we){Ge.current&&Ge.current!==we&&ye(Ge.current),we&&we!==Ge.current&&(we.addEventListener(mr,Fe),we.addEventListener(Nt,Fe),Ge.current=we)}return u.useEffect(function(){return function(){ye(Ge.current)}},[]),[Pe,ye]};function Vn(Ie,Ge,Ye,Fe){var ye=Fe.motionEnter,Pe=ye===void 0?!0:ye,we=Fe.motionAppear,je=we===void 0?!0:we,ze=Fe.motionLeave,Xe=ze===void 0?!0:ze,We=Fe.motionDeadline,qe=Fe.motionLeaveImmediately,ft=Fe.onAppearPrepare,kt=Fe.onEnterPrepare,It=Fe.onLeavePrepare,Xt=Fe.onAppearStart,Pr=Fe.onEnterStart,Gr=Fe.onLeaveStart,Kr=Fe.onAppearActive,Qr=Fe.onEnterActive,Wr=Fe.onLeaveActive,en=Fe.onAppearEnd,tn=Fe.onEnterEnd,pn=Fe.onLeaveEnd,on=Fe.onVisibleChanged,kn=Cn(),ln=Object(d.a)(kn,2),Mr=ln[0],Fr=ln[1],nn=Cn(St),dn=Object(d.a)(nn,2),wr=dn[0],bn=dn[1],Wn=Cn(null),wn=Object(d.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(u.useRef)(!1),ri=Object(u.useRef)(null),Hn=Object(u.useRef)(!1),di=Object(u.useRef)(null);function Xi(){var Pn=Ye();return Pn||di.current}var wi=Object(u.useRef)(!1);function ni(Pn){var On=Xi();if(Pn&&!Pn.deadline&&Pn.target!==On)return;var qn;wr===$r&&wi.current?qn=en==null?void 0:en(On,Pn):wr===Xr&&wi.current?qn=tn==null?void 0:tn(On,Pn):wr===Ur&&wi.current&&(qn=pn==null?void 0:pn(On,Pn)),qn!==!1&&!Hn.current&&(bn(St),Tn(null))}var In=pi(ni),Nn=Object(d.a)(In,1),zn=Nn[0],Bn=u.useMemo(function(){var Pn,On,qn;switch(wr){case"appear":return Pn={},Object(P.a)(Pn,Rr,ft),Object(P.a)(Pn,mn,Xt),Object(P.a)(Pn,vn,Kr),Pn;case"enter":return On={},Object(P.a)(On,Rr,kt),Object(P.a)(On,mn,Pr),Object(P.a)(On,vn,Qr),On;case"leave":return qn={},Object(P.a)(qn,Rr,It),Object(P.a)(qn,mn,Gr),Object(P.a)(qn,vn,Wr),qn;default:return{}}},[wr]),Zn=Gn(wr,function(Pn){if(Pn===Rr){var On=Bn[Rr];return On?On(Xi()):Ti}if(An in Bn){var qn;Tn(((qn=Bn[An])===null||qn===void 0?void 0:qn.call(Bn,Xi(),null))||null)}return An===vn&&(zn(Xi()),We>0&&(clearTimeout(ri.current),ri.current=setTimeout(function(){ni({deadline:!0})},We))),hn}),Di=Object(d.a)(Zn,2),ra=Di[0],An=Di[1],Ui=cr(An);wi.current=Ui,Sn(function(){Fr(Ge);var Pn=Yn.current;if(Yn.current=!0,!Ie)return;var On;!Pn&&Ge&&je&&(On=$r),Pn&&Ge&&Pe&&(On=Xr),(Pn&&!Ge&&Xe||!Pn&&qe&&!Ge&&Xe)&&(On=Ur),On&&(bn(On),ra())},[Ge]),Object(u.useEffect)(function(){(wr===$r&&!je||wr===Xr&&!Pe||wr===Ur&&!Xe)&&bn(St)},[je,Pe,Xe]),Object(u.useEffect)(function(){return function(){clearTimeout(ri.current),Hn.current=!0}},[]),Object(u.useEffect)(function(){Mr!==void 0&&wr===St&&(on==null||on(Mr))},[Mr,wr]);var Bi=Mn;return Bn[Rr]&&An===mn&&(Bi=Object(D.a)({transition:"none"},Bi)),[wr,An,Bi,Mr!=null?Mr:Ge]}var Yr=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(){return Object(k.a)(this,Ye),Ge.apply(this,arguments)}return Object(O.a)(Ye,[{key:"render",value:function(){return this.props.children}}]),Ye}(u.Component),Un=Yr;function ui(Ie){var Ge=Ie;Object(z.a)(Ie)==="object"&&(Ge=Ie.transitionSupport);function Ye(ye){return!!(ye.motionName&&Ge)}var Fe=u.forwardRef(function(ye,Pe){var we=ye.visible,je=we===void 0?!0:we,ze=ye.removeOnLeave,Xe=ze===void 0?!0:ze,We=ye.forceRender,qe=ye.children,ft=ye.motionName,kt=ye.leavedClassName,It=ye.eventProps,Xt=Ye(ye),Pr=Object(u.useRef)(),Gr=Object(u.useRef)();function Kr(){try{return Object(mt.a)(Pr.current||Gr.current)}catch(bn){return null}}var Qr=Vn(Xt,je,Kr,ye),Wr=Object(d.a)(Qr,4),en=Wr[0],tn=Wr[1],pn=Wr[2],on=Wr[3],kn=u.useRef(on);on&&(kn.current=!0);var ln=Object(u.useRef)(Pe);ln.current=Pe;var Mr=u.useCallback(function(bn){Pr.current=bn,Object(He.b)(ln.current,bn)},[]),Fr,nn=Object(D.a)(Object(D.a)({},It),{},{visible:je});if(!qe)Fr=null;else if(en===St||!Ye(ye))on?Fr=qe(Object(D.a)({},nn),Mr):!Xe&&kn.current?Fr=qe(Object(D.a)(Object(D.a)({},nn),{},{className:kt}),Mr):We?Fr=qe(Object(D.a)(Object(D.a)({},nn),{},{style:{display:"none"}}),Mr):Fr=null;else{var dn,wr;tn===Rr?wr="prepare":cr(tn)?wr="active":tn===mn&&(wr="start"),Fr=qe(Object(D.a)(Object(D.a)({},nn),{},{className:C()(hr(ft,en),(dn={},Object(P.a)(dn,hr(ft,"".concat(en,"-").concat(wr)),wr),Object(P.a)(dn,ft,typeof ft=="string"),dn)),style:pn}),Mr)}return u.createElement(Un,{ref:Gr},Fr)});return Fe.displayName="CSSMotion",Fe}var ci=ui(Bt),jt="add",_r="keep",ai="remove",Oi="removed";function Ai(Ie){var Ge;return Ie&&Object(z.a)(Ie)==="object"&&"key"in Ie?Ge=Ie:Ge={key:Ie},Object(D.a)(Object(D.a)({},Ge),{},{key:String(Ge.key)})}function Ri(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ie.map(Ai)}function se(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ye=[],Fe=0,ye=Ge.length,Pe=Ri(Ie),we=Ri(Ge);Pe.forEach(function(Xe){for(var We=!1,qe=Fe;qe1});return ze.forEach(function(Xe){Ye=Ye.filter(function(We){var qe=We.key,ft=We.status;return qe!==Xe||ft!==ai}),Ye.forEach(function(We){We.key===Xe&&(We.status=_r)})}),Ye}var W=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function $(Ie){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ci,Ye=function(Fe){Object(v.a)(Pe,Fe);var ye=Object(g.a)(Pe);function Pe(){var we;return Object(k.a)(this,Pe),we=ye.apply(this,arguments),we.state={keyEntities:[]},we.removeKey=function(je){we.setState(function(ze){var Xe=ze.keyEntities;return{keyEntities:Xe.map(function(We){return We.key!==je?We:Object(D.a)(Object(D.a)({},We),{},{status:Oi})})}})},we}return Object(O.a)(Pe,[{key:"render",value:function(){var je=this,ze=this.state.keyEntities,Xe=this.props,We=Xe.component,qe=Xe.children,ft=Xe.onVisibleChanged,kt=Object(T.a)(Xe,["component","children","onVisibleChanged"]),It=We||u.Fragment,Xt={};return W.forEach(function(Pr){Xt[Pr]=kt[Pr],delete kt[Pr]}),delete kt.keys,u.createElement(It,kt,ze.map(function(Pr){var Gr=Pr.status,Kr=Object(T.a)(Pr,["status"]),Qr=Gr===jt||Gr===_r;return u.createElement(Ge,Object(o.a)({},Xt,{key:Kr.key,visible:Qr,eventProps:Kr,onVisibleChanged:function(en){ft==null||ft(en,{key:Kr.key}),en||je.removeKey(Kr.key)}}),qe)}))}}],[{key:"getDerivedStateFromProps",value:function(je,ze){var Xe=je.keys,We=ze.keyEntities,qe=Ri(Xe),ft=se(We,qe);return{keyEntities:ft.filter(function(kt){var It=We.find(function(Xt){var Pr=Xt.key;return kt.key===Pr});return!(It&&It.status===Oi&&kt.status===ai)})}}}]),Pe}(u.Component);return Ye.defaultProps={component:"div"},Ye}var ne=$(Bt),ce=ci;function oe(Ie){var Ge=Ie.prefixCls,Ye=Ie.motion,Fe=Ie.animation,ye=Ie.transitionName;return Ye||(Fe?{motionName:"".concat(Ge,"-").concat(Fe)}:ye?{motionName:ye}:null)}function Ke(Ie){var Ge=Ie.prefixCls,Ye=Ie.visible,Fe=Ie.zIndex,ye=Ie.mask,Pe=Ie.maskMotion,we=Ie.maskAnimation,je=Ie.maskTransitionName;if(!ye)return null;var ze={};return(Pe||je||we)&&(ze=Object(D.a)({motionAppear:!0},oe({motion:Pe,prefixCls:Ge,transitionName:je,animation:we}))),u.createElement(ce,Object(o.a)({},ze,{visible:Ye,removeOnLeave:!0}),function(Xe){var We=Xe.className;return u.createElement("div",{style:{zIndex:Fe},className:C()("".concat(Ge,"-mask"),We)})})}var At=L("9mu1"),Vt=L("o0o1"),vr=L.n(Vt),Pt=L("HaE+"),Br=["measure","align",null,"motion"],jr=function(Ie,Ge){var Ye=Object(u.useState)(null),Fe=Object(d.a)(Ye,2),ye=Fe[0],Pe=Fe[1],we=Object(u.useRef)(),je=Object(u.useRef)(!1);function ze(qe){je.current||Pe(qe)}function Xe(){ut.a.cancel(we.current)}function We(qe){Xe(),we.current=Object(ut.a)(function(){ze(function(ft){switch(ye){case"align":return"motion";case"motion":return"stable";default:}return ft}),qe==null||qe()})}return Object(u.useEffect)(function(){ze("measure")},[Ie]),Object(u.useEffect)(function(){switch(ye){case"measure":Ge();break;default:}ye&&(we.current=Object(ut.a)(Object(Pt.a)(vr.a.mark(function qe(){var ft,kt;return vr.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:ft=Br.indexOf(ye),kt=Br[ft+1],kt&&ft!==-1&&ze(kt);case 3:case"end":return Xt.stop()}},qe)}))))},[ye]),Object(u.useEffect)(function(){return function(){je.current=!0,Xe()}},[]),[ye,We]},fn=function(Ie){var Ge=u.useState({width:0,height:0}),Ye=Object(d.a)(Ge,2),Fe=Ye[0],ye=Ye[1];function Pe(je){ye({width:je.offsetWidth,height:je.offsetHeight})}var we=u.useMemo(function(){var je={};if(Ie){var ze=Fe.width,Xe=Fe.height;Ie.indexOf("height")!==-1&&Xe?je.height=Xe:Ie.indexOf("minHeight")!==-1&&Xe&&(je.minHeight=Xe),Ie.indexOf("width")!==-1&&ze?je.width=ze:Ie.indexOf("minWidth")!==-1&&ze&&(je.minWidth=ze)}return je},[Ie,Fe]);return[we,Pe]},ti=u.forwardRef(function(Ie,Ge){var Ye=Ie.visible,Fe=Ie.prefixCls,ye=Ie.className,Pe=Ie.style,we=Ie.children,je=Ie.zIndex,ze=Ie.stretch,Xe=Ie.destroyPopupOnHide,We=Ie.forceRender,qe=Ie.align,ft=Ie.point,kt=Ie.getRootDomNode,It=Ie.getClassNameFromAlign,Xt=Ie.onAlign,Pr=Ie.onMouseEnter,Gr=Ie.onMouseLeave,Kr=Ie.onMouseDown,Qr=Ie.onTouchStart,Wr=Object(u.useRef)(),en=Object(u.useRef)(),tn=Object(u.useState)(),pn=Object(d.a)(tn,2),on=pn[0],kn=pn[1],ln=fn(ze),Mr=Object(d.a)(ln,2),Fr=Mr[0],nn=Mr[1];function dn(){ze&&nn(kt())}var wr=jr(Ye,dn),bn=Object(d.a)(wr,2),Wn=bn[0],wn=bn[1],Mn=Object(u.useRef)();function Tn(){return ft||kt}function Yn(){var In;(In=Wr.current)===null||In===void 0||In.forceAlign()}function ri(In,Nn){var zn=It(Nn);on!==zn&&kn(zn),Wn==="align"&&(on!==zn?Promise.resolve().then(function(){Yn()}):wn(function(){var Bn;(Bn=Mn.current)===null||Bn===void 0||Bn.call(Mn)}),Xt==null||Xt(In,Nn))}var Hn=Object(D.a)({},oe(Ie));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(In){var Nn=Hn[In];Hn[In]=function(zn,Bn){return wn(),Nn==null?void 0:Nn(zn,Bn)}});function di(){return new Promise(function(In){Mn.current=In})}u.useEffect(function(){!Hn.motionName&&Wn==="motion"&&wn()},[Hn.motionName,Wn]),u.useImperativeHandle(Ge,function(){return{forceAlign:Yn,getElement:function(){return en.current}}});var Xi=Object(D.a)(Object(D.a)({},Fr),{},{zIndex:je,opacity:Wn==="motion"||Wn==="stable"||!Ye?void 0:0,pointerEvents:Wn==="stable"?void 0:"none"},Pe),wi=!0;(qe==null?void 0:qe.points)&&(Wn==="align"||Wn==="stable")&&(wi=!1);var ni=we;return u.Children.count(we)>1&&(ni=u.createElement("div",{className:"".concat(Fe,"-content")},we)),u.createElement(ce,Object(o.a)({visible:Ye,ref:en,leavedClassName:"".concat(Fe,"-hidden")},Hn,{onAppearPrepare:di,onEnterPrepare:di,removeOnLeave:Xe,forceRender:We}),function(In,Nn){var zn=In.className,Bn=In.style,Zn=C()(Fe,ye,on,zn);return u.createElement(At.a,{target:Tn(),key:"popup",ref:Wr,monitorWindowResize:!0,disabled:wi,align:qe,onAlign:ri},u.createElement("div",{ref:Nn,className:Zn,onMouseEnter:Pr,onMouseLeave:Gr,onMouseDownCapture:Kr,onTouchStartCapture:Qr,style:Object(D.a)(Object(D.a)({},Bn),Xi)},ni))})});ti.displayName="PopupInner";var mi=ti,Rn=u.forwardRef(function(Ie,Ge){var Ye=Ie.prefixCls,Fe=Ie.visible,ye=Ie.zIndex,Pe=Ie.children,we=Ie.mobile;we=we===void 0?{}:we;var je=we.popupClassName,ze=we.popupStyle,Xe=we.popupMotion,We=Xe===void 0?{}:Xe,qe=we.popupRender,ft=u.useRef();u.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return ft.current}}});var kt=Object(D.a)({zIndex:ye},ze),It=Pe;return u.Children.count(Pe)>1&&(It=u.createElement("div",{className:"".concat(Ye,"-content")},Pe)),qe&&(It=qe(It)),u.createElement(ce,Object(o.a)({visible:Fe,ref:ft,removeOnLeave:!0},We),function(Xt,Pr){var Gr=Xt.className,Kr=Xt.style,Qr=C()(Ye,je,Gr);return u.createElement("div",{ref:Pr,className:Qr,style:Object(D.a)(Object(D.a)({},Kr),kt)},It)})});Rn.displayName="MobilePopupInner";var Li=Rn,qi=["visible","mobile"],Qn=u.forwardRef(function(Ie,Ge){var Ye=Ie.visible,Fe=Ie.mobile,ye=Object(T.a)(Ie,qi),Pe=Object(u.useState)(Ye),we=Object(d.a)(Pe,2),je=we[0],ze=we[1],Xe=Object(u.useState)(!1),We=Object(d.a)(Xe,2),qe=We[0],ft=We[1],kt=Object(D.a)(Object(D.a)({},ye),{},{visible:je});Object(u.useEffect)(function(){ze(Ye),Ye&&Fe&&ft(Ue())},[Ye,Fe]);var It=qe?u.createElement(Li,Object(o.a)({},kt,{mobile:Fe,ref:Ge})):u.createElement(mi,Object(o.a)({},kt,{ref:Ge}));return u.createElement("div",null,u.createElement(Ke,kt),It)});Qn.displayName="Popup";var _i=Qn,vi=u.createContext(null),Fi=vi;function gi(){}function Gi(){return""}function Mi(Ie){return Ie?Ie.ownerDocument:window.document}var oa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function sa(Ie){var Ge=function(Ye){Object(v.a)(ye,Ye);var Fe=Object(g.a)(ye);function ye(Pe){var we;Object(k.a)(this,ye),we=Fe.call(this,Pe),we.popupRef=u.createRef(),we.triggerRef=u.createRef(),we.attachId=void 0,we.clickOutsideHandler=void 0,we.touchOutsideHandler=void 0,we.contextMenuOutsideHandler1=void 0,we.contextMenuOutsideHandler2=void 0,we.mouseDownTimeout=void 0,we.focusTime=void 0,we.preClickTime=void 0,we.preTouchTime=void 0,we.delayTimer=void 0,we.hasPopupMouseDown=void 0,we.onMouseEnter=function(ze){var Xe=we.props.mouseEnterDelay;we.fireEvents("onMouseEnter",ze),we.delaySetPopupVisible(!0,Xe,Xe?null:ze)},we.onMouseMove=function(ze){we.fireEvents("onMouseMove",ze),we.setPoint(ze)},we.onMouseLeave=function(ze){we.fireEvents("onMouseLeave",ze),we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onPopupMouseEnter=function(){we.clearDelayTimer()},we.onPopupMouseLeave=function(ze){var Xe;if(ze.relatedTarget&&!ze.relatedTarget.setTimeout&&Object(dt.a)((Xe=we.popupRef.current)===null||Xe===void 0?void 0:Xe.getElement(),ze.relatedTarget))return;we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onFocus=function(ze){we.fireEvents("onFocus",ze),we.clearDelayTimer(),we.isFocusToShow()&&(we.focusTime=Date.now(),we.delaySetPopupVisible(!0,we.props.focusDelay))},we.onMouseDown=function(ze){we.fireEvents("onMouseDown",ze),we.preClickTime=Date.now()},we.onTouchStart=function(ze){we.fireEvents("onTouchStart",ze),we.preTouchTime=Date.now()},we.onBlur=function(ze){we.fireEvents("onBlur",ze),we.clearDelayTimer(),we.isBlurToHide()&&we.delaySetPopupVisible(!1,we.props.blurDelay)},we.onContextMenu=function(ze){ze.preventDefault(),we.fireEvents("onContextMenu",ze),we.setPopupVisible(!0,ze)},we.onContextMenuClose=function(){we.isContextMenuToShow()&&we.close()},we.onClick=function(ze){if(we.fireEvents("onClick",ze),we.focusTime){var Xe;if(we.preClickTime&&we.preTouchTime?Xe=Math.min(we.preClickTime,we.preTouchTime):we.preClickTime?Xe=we.preClickTime:we.preTouchTime&&(Xe=we.preTouchTime),Math.abs(Xe-we.focusTime)<20)return;we.focusTime=0}we.preClickTime=0,we.preTouchTime=0,we.isClickToShow()&&(we.isClickToHide()||we.isBlurToHide())&&ze&&ze.preventDefault&&ze.preventDefault();var We=!we.state.popupVisible;(we.isClickToHide()&&!We||We&&we.isClickToShow())&&we.setPopupVisible(!we.state.popupVisible,ze)},we.onPopupMouseDown=function(){if(we.hasPopupMouseDown=!0,clearTimeout(we.mouseDownTimeout),we.mouseDownTimeout=window.setTimeout(function(){we.hasPopupMouseDown=!1},0),we.context){var ze;(ze=we.context).onPopupMouseDown.apply(ze,arguments)}},we.onDocumentClick=function(ze){if(we.props.mask&&!we.props.maskClosable)return;var Xe=ze.target,We=we.getRootDomNode(),qe=we.getPopupDomNode();(!Object(dt.a)(We,Xe)||we.isContextMenuOnly())&&!Object(dt.a)(qe,Xe)&&!we.hasPopupMouseDown&&we.close()},we.getRootDomNode=function(){var ze=we.props.getTriggerDOMNode;if(ze)return ze(we.triggerRef.current);try{var Xe=Object(mt.a)(we.triggerRef.current);if(Xe)return Xe}catch(We){}return nt.a.findDOMNode(Object(b.a)(we))},we.getPopupClassNameFromAlign=function(ze){var Xe=[],We=we.props,qe=We.popupPlacement,ft=We.builtinPlacements,kt=We.prefixCls,It=We.alignPoint,Xt=We.getPopupClassNameFromAlign;return qe&&ft&&Xe.push(st(ft,kt,ze,It)),Xt&&Xe.push(Xt(ze)),Xe.join(" ")},we.getComponent=function(){var ze=we.props,Xe=ze.prefixCls,We=ze.destroyPopupOnHide,qe=ze.popupClassName,ft=ze.onPopupAlign,kt=ze.popupMotion,It=ze.popupAnimation,Xt=ze.popupTransitionName,Pr=ze.popupStyle,Gr=ze.mask,Kr=ze.maskAnimation,Qr=ze.maskTransitionName,Wr=ze.maskMotion,en=ze.zIndex,tn=ze.popup,pn=ze.stretch,on=ze.alignPoint,kn=ze.mobile,ln=ze.forceRender,Mr=we.state,Fr=Mr.popupVisible,nn=Mr.point,dn=we.getPopupAlign(),wr={};return we.isMouseEnterToShow()&&(wr.onMouseEnter=we.onPopupMouseEnter),we.isMouseLeaveToHide()&&(wr.onMouseLeave=we.onPopupMouseLeave),wr.onMouseDown=we.onPopupMouseDown,wr.onTouchStart=we.onPopupMouseDown,u.createElement(_i,Object(o.a)({prefixCls:Xe,destroyPopupOnHide:We,visible:Fr,point:on&&nn,className:qe,align:dn,onAlign:ft,animation:It,getClassNameFromAlign:we.getPopupClassNameFromAlign},wr,{stretch:pn,getRootDomNode:we.getRootDomNode,style:Pr,mask:Gr,zIndex:en,transitionName:Xt,maskAnimation:Kr,maskTransitionName:Qr,maskMotion:Wr,ref:we.popupRef,motion:kt,mobile:kn,forceRender:ln}),typeof tn=="function"?tn():tn)},we.attachParent=function(ze){ut.a.cancel(we.attachId);var Xe=we.props,We=Xe.getPopupContainer,qe=Xe.getDocument,ft=we.getRootDomNode(),kt;We?(ft||We.length===0)&&(kt=We(ft)):kt=qe(we.getRootDomNode()).body,kt?kt.appendChild(ze):we.attachId=Object(ut.a)(function(){we.attachParent(ze)})},we.getContainer=function(){var ze=we.props.getDocument,Xe=ze(we.getRootDomNode()).createElement("div");return Xe.style.position="absolute",Xe.style.top="0",Xe.style.left="0",Xe.style.width="100%",we.attachParent(Xe),Xe},we.setPoint=function(ze){var Xe=we.props.alignPoint;if(!Xe||!ze)return;we.setState({point:{pageX:ze.pageX,pageY:ze.pageY}})},we.handlePortalUpdate=function(){we.state.prevPopupVisible!==we.state.popupVisible&&we.props.afterPopupVisibleChange(we.state.popupVisible)},we.triggerContextValue={onPopupMouseDown:we.onPopupMouseDown};var je;return"popupVisible"in Pe?je=!!Pe.popupVisible:je=!!Pe.defaultPopupVisible,we.state={prevPopupVisible:je,popupVisible:je},oa.forEach(function(ze){we["fire".concat(ze)]=function(Xe){we.fireEvents(ze,Xe)}}),we}return Object(O.a)(ye,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var we=this.props,je=this.state;if(je.popupVisible){var ze;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ze=we.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(De.a)(ze,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ze=ze||we.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(De.a)(ze,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ze=ze||we.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(De.a)(ze,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(De.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ut.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var we;return((we=this.popupRef.current)===null||we===void 0?void 0:we.getElement())||null}},{key:"getPopupAlign",value:function(){var we=this.props,je=we.popupPlacement,ze=we.popupAlign,Xe=we.builtinPlacements;return je&&Xe?Ze(Xe,je,ze):ze}},{key:"setPopupVisible",value:function(we,je){var ze=this.props.alignPoint,Xe=this.state.popupVisible;this.clearDelayTimer(),Xe!==we&&("popupVisible"in this.props||this.setState({popupVisible:we,prevPopupVisible:Xe}),this.props.onPopupVisibleChange(we)),ze&&je&&we&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(we,je,ze){var Xe=this,We=je*1e3;if(this.clearDelayTimer(),We){var qe=ze?{pageX:ze.pageX,pageY:ze.pageY}:null;this.delayTimer=window.setTimeout(function(){Xe.setPopupVisible(we,qe),Xe.clearDelayTimer()},We)}else this.setPopupVisible(we,ze)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(we){var je=this.props.children.props,ze=this.props;return je[we]&&ze[we]?this["fire".concat(we)]:je[we]||ze[we]}},{key:"isClickToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var we=this.props.action;return we==="contextMenu"||we.length===1&&we[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("contextMenu")!==-1||ze.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("focus")!==-1||ze.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("focus")!==-1||ze.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var we;(we=this.popupRef.current)===null||we===void 0||we.forceAlign()}}},{key:"fireEvents",value:function(we,je){var ze=this.props.children.props[we];ze&&ze(je);var Xe=this.props[we];Xe&&Xe(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var we=this.state.popupVisible,je=this.props,ze=je.children,Xe=je.forceRender,We=je.alignPoint,qe=je.className,ft=je.autoDestroy,kt=u.Children.only(ze),It={key:"trigger"};this.isContextMenuToShow()?It.onContextMenu=this.onContextMenu:It.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(It.onClick=this.onClick,It.onMouseDown=this.onMouseDown,It.onTouchStart=this.onTouchStart):(It.onClick=this.createTwoChains("onClick"),It.onMouseDown=this.createTwoChains("onMouseDown"),It.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(It.onMouseEnter=this.onMouseEnter,We&&(It.onMouseMove=this.onMouseMove)):It.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?It.onMouseLeave=this.onMouseLeave:It.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(It.onFocus=this.onFocus,It.onBlur=this.onBlur):(It.onFocus=this.createTwoChains("onFocus"),It.onBlur=this.createTwoChains("onBlur"));var Xt=C()(kt&&kt.props&&kt.props.className,qe);Xt&&(It.className=Xt);var Pr=Object(D.a)({},It);Object(He.c)(kt)&&(Pr.ref=Object(He.a)(this.triggerRef,kt.ref));var Gr=u.cloneElement(kt,Pr),Kr;return(we||this.popupRef.current||Xe)&&(Kr=u.createElement(Ie,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!we&&ft&&(Kr=null),u.createElement(Fi.Provider,{value:this.triggerContextValue},Gr,Kr)}}],[{key:"getDerivedStateFromProps",value:function(we,je){var ze=we.popupVisible,Xe={};return ze!==void 0&&je.popupVisible!==ze&&(Xe.popupVisible=ze,Xe.prevPopupVisible=je.popupVisible),Xe}}]),ye}(u.Component);return Ge.contextType=Fi,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Gi,getDocument:Mi,onPopupVisibleChange:gi,afterPopupVisibleChange:gi,onPopupAlign:gi,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ge}var Ii=sa(at.a),Xn={adjustX:1,adjustY:1},Vi={topLeft:{points:["bl","tl"],overflow:Xn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Xn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Xn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Xn,offset:[4,0]}},ta={topLeft:{points:["bl","tl"],overflow:Xn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Xn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Xn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Xn,offset:[4,0]}},Ct=Vi,tt=0,pt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},_t=function(Ge,Ye,Fe){var ye=te(Ye),Pe=Ge.getState();Ge.setState({defaultActiveFirst:Object(D.a)(Object(D.a)({},Pe.defaultActiveFirst),{},Object(P.a)({},ye,Fe))})},Mt=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(Fe){var ye;Object(k.a)(this,Ye),ye=Ge.call(this,Fe),ye.onDestroy=function(We){ye.props.onDestroy(We)},ye.onKeyDown=function(We){var qe=We.keyCode,ft=ye.menuInstance,kt=ye.props.store,It=ye.getVisible();if(qe===_.a.ENTER)return ye.onTitleClick(We),_t(kt,ye.props.eventKey,!0),!0;if(qe===_.a.RIGHT)return It?ft.onKeyDown(We):(ye.triggerOpenChange(!0),_t(kt,ye.props.eventKey,!0)),!0;if(qe===_.a.LEFT){var Xt;if(It)Xt=ft.onKeyDown(We);else return;return Xt||(ye.triggerOpenChange(!1),Xt=!0),Xt}return It&&(qe===_.a.UP||qe===_.a.DOWN)?ft.onKeyDown(We):void 0},ye.onOpenChange=function(We){ye.props.onOpenChange(We)},ye.onPopupVisibleChange=function(We){ye.triggerOpenChange(We,We?"mouseenter":"mouseleave")},ye.onMouseEnter=function(We){var qe=ye.props,ft=qe.eventKey,kt=qe.onMouseEnter,It=qe.store;_t(It,ye.props.eventKey,!1),kt({key:ft,domEvent:We})},ye.onMouseLeave=function(We){var qe=ye.props,ft=qe.parentMenu,kt=qe.eventKey,It=qe.onMouseLeave;ft.subMenuInstance=Object(b.a)(ye),It({key:kt,domEvent:We})},ye.onTitleMouseEnter=function(We){var qe=ye.props,ft=qe.eventKey,kt=qe.onItemHover,It=qe.onTitleMouseEnter;kt({key:ft,hover:!0}),It({key:ft,domEvent:We})},ye.onTitleMouseLeave=function(We){var qe=ye.props,ft=qe.parentMenu,kt=qe.eventKey,It=qe.onItemHover,Xt=qe.onTitleMouseLeave;ft.subMenuInstance=Object(b.a)(ye),It({key:kt,hover:!1}),Xt({key:kt,domEvent:We})},ye.onTitleClick=function(We){var qe=Object(b.a)(ye),ft=qe.props;if(ft.onTitleClick({key:ft.eventKey,domEvent:We}),ft.triggerSubMenuAction==="hover")return;ye.triggerOpenChange(!ye.getVisible(),"click"),_t(ft.store,ye.props.eventKey,!1)},ye.onSubMenuClick=function(We){typeof ye.props.onClick=="function"&&ye.props.onClick(ye.addKeyPath(We))},ye.onSelect=function(We){ye.props.onSelect(We)},ye.onDeselect=function(We){ye.props.onDeselect(We)},ye.getPrefixCls=function(){return"".concat(ye.props.rootPrefixCls,"-submenu")},ye.getActiveClassName=function(){return"".concat(ye.getPrefixCls(),"-active")},ye.getDisabledClassName=function(){return"".concat(ye.getPrefixCls(),"-disabled")},ye.getSelectedClassName=function(){return"".concat(ye.getPrefixCls(),"-selected")},ye.getOpenClassName=function(){return"".concat(ye.props.rootPrefixCls,"-submenu-open")},ye.getVisible=function(){return ye.state.isOpen},ye.getMode=function(){return ye.state.mode},ye.saveMenuInstance=function(We){ye.menuInstance=We},ye.addKeyPath=function(We){return Object(D.a)(Object(D.a)({},We),{},{keyPath:(We.keyPath||[]).concat(ye.props.eventKey)})},ye.triggerOpenChange=function(We,qe){var ft=ye.props.eventKey,kt=function(){ye.onOpenChange({key:ft,item:Object(b.a)(ye),trigger:qe,open:We})};qe==="mouseenter"?ye.mouseenterTimeout=setTimeout(function(){kt()},0):kt()},ye.isChildrenSelected=function(){var We={find:!1};return X(ye.props.children,ye.props.selectedKeys,We),We.find},ye.isInlineMode=function(){return ye.getMode()==="inline"},ye.adjustWidth=function(){if(!ye.subMenuTitle||!ye.menuInstance)return;var We=rt.findDOMNode(ye.menuInstance);if(We.offsetWidth>=ye.subMenuTitle.offsetWidth)return;We.style.minWidth="".concat(ye.subMenuTitle.offsetWidth,"px")},ye.saveSubMenuTitle=function(We){ye.subMenuTitle=We},ye.getBaseProps=function(){var We=Object(b.a)(ye),qe=We.props,ft=ye.getMode();return{mode:ft==="horizontal"?"vertical":ft,visible:ye.getVisible(),level:qe.level+1,inlineIndent:qe.inlineIndent,focusable:!1,onClick:ye.onSubMenuClick,onSelect:ye.onSelect,onDeselect:ye.onDeselect,onDestroy:ye.onDestroy,selectedKeys:qe.selectedKeys,eventKey:"".concat(qe.eventKey,"-menu-"),openKeys:qe.openKeys,motion:qe.motion,onOpenChange:ye.onOpenChange,subMenuOpenDelay:qe.subMenuOpenDelay,parentMenu:Object(b.a)(ye),subMenuCloseDelay:qe.subMenuCloseDelay,forceSubMenuRender:qe.forceSubMenuRender,triggerSubMenuAction:qe.triggerSubMenuAction,builtinPlacements:qe.builtinPlacements,defaultActiveFirst:qe.store.getState().defaultActiveFirst[te(qe.eventKey)],multiple:qe.multiple,prefixCls:qe.rootPrefixCls,id:ye.internalMenuId,manualRef:ye.saveMenuInstance,itemIcon:qe.itemIcon,expandIcon:qe.expandIcon,direction:qe.direction}},ye.getMotion=function(We,qe){var ft=Object(b.a)(ye),kt=ft.haveRendered,It=ye.props,Xt=It.motion,Pr=It.rootPrefixCls,Gr=Object(D.a)(Object(D.a)({},Xt),{},{leavedClassName:"".concat(Pr,"-hidden"),removeOnLeave:!1,motionAppear:kt||!qe||We!=="inline"});return Gr};var Pe=Fe.store,we=Fe.eventKey,je=Pe.getState(),ze=je.defaultActiveFirst;ye.isRootMenu=!1;var Xe=!1;return ze&&(Xe=ze[we]),_t(Pe,we,Xe),ye.state={mode:Fe.mode,isOpen:Fe.isOpen},ye}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ye=this,Pe=this.props,we=Pe.mode,je=Pe.parentMenu,ze=Pe.manualRef,Xe=Pe.isOpen,We=function(){ye.setState({mode:we,isOpen:Xe})},qe=Xe!==this.state.isOpen,ft=we!==this.state.mode;if((ft||qe)&&(ut.a.cancel(this.updateStateRaf),ft?this.updateStateRaf=Object(ut.a)(We):We()),ze&&ze(this),we!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!Xe)return;this.minWidthTimeout=setTimeout(function(){return ye.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ye=this.props,Pe=ye.onDestroy,we=ye.eventKey;Pe&&Pe(we),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ut.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(ye,Pe){var we=this.getBaseProps();return u.createElement(Dr,Object(o.a)({},we,{id:this.internalMenuId,className:ye,style:Pe}),this.props.children)}},{key:"renderChildren",value:function(){var ye=this,Pe=this.getBaseProps(),we=Pe.mode,je=Pe.visible,ze=Pe.forceSubMenuRender,Xe=Pe.direction,We=this.getMotion(we,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||ze,!this.haveOpened)return u.createElement("div",null);var qe=C()("".concat(Pe.prefixCls,"-sub"),Object(P.a)({},"".concat(Pe.prefixCls,"-rtl"),Xe==="rtl"));return this.isInlineMode()?u.createElement(ce,Object(o.a)({visible:Pe.visible,forceRender:ze},We),function(ft){var kt=ft.className,It=ft.style,Xt=C()(qe,kt);return ye.renderPopupMenu(Xt,It)}):this.renderPopupMenu(qe)}},{key:"render",value:function(){var ye,Pe,we,je=Object(D.a)({},this.props),ze=this.getVisible(),Xe=this.getPrefixCls(),We=this.isInlineMode(),qe=this.getMode(),ft=C()(Xe,"".concat(Xe,"-").concat(qe),(ye={},Object(P.a)(ye,je.className,!!je.className),Object(P.a)(ye,this.getOpenClassName(),ze),Object(P.a)(ye,this.getActiveClassName(),je.active||ze&&!We),Object(P.a)(ye,this.getDisabledClassName(),je.disabled),Object(P.a)(ye,this.getSelectedClassName(),this.isChildrenSelected()),ye));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(tt+=1,this.internalMenuId="$__$".concat(tt,"$Menu")));var kt={},It={},Xt={};je.disabled||(kt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},It={onClick:this.onTitleClick},Xt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Pr={},Gr=je.direction,Kr=Gr==="rtl";We&&(Kr?Pr.paddingRight=je.inlineIndent*je.level:Pr.paddingLeft=je.inlineIndent*je.level);var Qr={};this.getVisible()&&(Qr={"aria-owns":this.internalMenuId});var Wr=null;qe!=="horizontal"&&(Wr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Wr=u.createElement(this.props.expandIcon,Object(D.a)({},this.props))));var en=u.createElement("div",Object(o.a)({ref:this.saveSubMenuTitle,style:Pr,className:"".concat(Xe,"-title"),role:"button"},Xt,It,{"aria-expanded":ze},Qr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Wr||u.createElement("i",{className:"".concat(Xe,"-arrow")})),tn=this.renderChildren(),pn=((Pe=je.parentMenu)===null||Pe===void 0?void 0:Pe.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Tn){return Tn.parentNode},on=pt[qe],kn=je.popupOffset?{offset:je.popupOffset}:{},ln=C()((we={},Object(P.a)(we,je.popupClassName,je.popupClassName&&!We),Object(P.a)(we,"".concat(Xe,"-rtl"),Kr),we)),Mr=je.disabled,Fr=je.triggerSubMenuAction,nn=je.subMenuOpenDelay,dn=je.forceSubMenuRender,wr=je.subMenuCloseDelay,bn=je.builtinPlacements;Q.forEach(function(Tn){return delete je[Tn]}),delete je.onClick;var Wn=Kr?Object(D.a)(Object(D.a)({},ta),bn):Object(D.a)(Object(D.a)({},Vi),bn);delete je.direction;var wn=this.getBaseProps(),Mn=We?null:this.getMotion(wn.mode,wn.visible);return u.createElement("li",Object(o.a)({},je,kt,{className:ft,role:"menuitem"}),u.createElement(Ii,{prefixCls:Xe,popupClassName:C()("".concat(Xe,"-popup"),ln),getPopupContainer:pn,builtinPlacements:Wn,popupPlacement:on,popupVisible:We?!1:ze,popupAlign:kn,popup:We?null:tn,action:Mr||We?[]:[Fr],mouseEnterDelay:nn,mouseLeaveDelay:wr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:dn,popupMotion:Mn},en),We?tn:null)}}]),Ye}(u.Component);Mt.defaultProps={onMouseEnter:ee,onMouseLeave:ee,onTitleMouseEnter:ee,onTitleMouseLeave:ee,onTitleClick:ee,manualRef:ee,mode:"vertical",title:""};var Dt=Object(w.b)(function(Ie,Ge){var Ye=Ie.openKeys,Fe=Ie.activeKey,ye=Ie.selectedKeys,Pe=Ge.eventKey,we=Ge.subMenuKey;return{isOpen:Ye.indexOf(Pe)>-1,active:Fe[we]===Pe,selectedKeys:ye}})(Mt);Dt.isSubMenu=!0;var Ht=Dt,Wt="menuitem-overflowed",ct=.5,Ot=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.resizeObserver=null,Fe.mutationObserver=null,Fe.originalTotalWidth=0,Fe.overflowedItems=[],Fe.menuItemSizes=[],Fe.cancelFrameId=null,Fe.state={lastVisibleIndex:void 0},Fe.childRef=u.createRef(),Fe.getMenuItemNodes=function(){var ye=Fe.props.prefixCls,Pe=Fe.childRef.current;return Pe?[].slice.call(Pe.children).filter(function(we){return we.className.split(" ").indexOf("".concat(ye,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(ye,Pe,we){var je=Fe.props,ze=je.overflowedIndicator,Xe=je.level,We=je.mode,qe=je.prefixCls,ft=je.theme;if(Xe!==1||We!=="horizontal")return null;var kt=Fe.props.children[0],It=kt.props,Xt=It.children,Pr=It.title,Gr=It.style,Kr=Object(T.a)(It,["children","title","style"]),Qr=Object(D.a)({},Gr),Wr="".concat(ye,"-overflowed-indicator"),en="".concat(ye,"-overflowed-indicator");Pe.length===0&&we!==!0?Qr=Object(D.a)(Object(D.a)({},Qr),{},{display:"none"}):we&&(Qr=Object(D.a)(Object(D.a)({},Qr),{},{visibility:"hidden",position:"absolute"}),Wr="".concat(Wr,"-placeholder"),en="".concat(en,"-placeholder"));var tn=ft?"".concat(qe,"-").concat(ft):"",pn={};return Q.forEach(function(on){Kr[on]!==void 0&&(pn[on]=Kr[on])}),u.createElement(Ht,Object(o.a)({title:ze,className:"".concat(qe,"-overflowed-submenu"),popupClassName:tn},pn,{key:Wr,eventKey:en,disabled:!1,style:Qr}),Pe)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var ye=Fe.childRef.current;if(!ye)return;var Pe=ye.children;if(!Pe||Pe.length===0)return;var we=ye.children[Pe.length-1];ge(we,"display","inline-block");var je=Fe.getMenuItemNodes(),ze=je.filter(function(Xe){return Xe.className.split(" ").indexOf(Wt)>=0});ze.forEach(function(Xe){ge(Xe,"display","inline-block")}),Fe.menuItemSizes=je.map(function(Xe){return Ee(Xe,!0)}),ze.forEach(function(Xe){ge(Xe,"display","none")}),Fe.overflowedIndicatorWidth=Ee(ye.children[ye.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Xe,We){return Xe+We},0),Fe.handleResize(),ge(we,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var ye=Fe.childRef.current;if(!ye)return;var Pe=Ee(ye);Fe.overflowedItems=[];var we=0,je;Fe.originalTotalWidth>Pe+ct&&(je=-1,Fe.menuItemSizes.forEach(function(ze){we+=ze,we+Fe.overflowedIndicatorWidth<=Pe&&(je+=1)})),Fe.setState({lastVisibleIndex:je})},Fe}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){var ye=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Pe=this.childRef.current;if(!Pe)return;this.resizeObserver=new Qe.default(function(we){we.forEach(function(){var je=ye.cancelFrameId;cancelAnimationFrame(je),ye.cancelFrameId=requestAnimationFrame(ye.setChildrenWidthAndResize)})}),[].slice.call(Pe.children).concat(Pe).forEach(function(we){ye.resizeObserver.observe(we)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ye.resizeObserver.disconnect(),[].slice.call(Pe.children).concat(Pe).forEach(function(we){ye.resizeObserver.observe(we)}),ye.setChildrenWidthAndResize()}),this.mutationObserver.observe(Pe,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(ye){var Pe=this,we=this.state.lastVisibleIndex;return(ye||[]).reduce(function(je,ze,Xe){var We=ze;if(Pe.props.mode==="horizontal"){var qe=Pe.getOverflowedSubMenuItem(ze.props.eventKey,[]);we!==void 0&&Pe.props.className.indexOf("".concat(Pe.props.prefixCls,"-root"))!==-1&&(Xe>we&&(We=u.cloneElement(ze,{style:{display:"none"},eventKey:"".concat(ze.props.eventKey,"-hidden"),className:"".concat(Wt)})),Xe===we+1&&(Pe.overflowedItems=ye.slice(we+1).map(function(kt){return u.cloneElement(kt,{key:kt.props.eventKey,mode:"vertical-left"})}),qe=Pe.getOverflowedSubMenuItem(ze.props.eventKey,Pe.overflowedItems)));var ft=[].concat(Object(s.a)(je),[qe,We]);return Xe===ye.length-1&&ft.push(Pe.getOverflowedSubMenuItem(ze.props.eventKey,[],!0)),ft}return[].concat(Object(s.a)(je),[We])},[])}},{key:"render",value:function(){var ye=this.props,Pe=ye.visible,we=ye.prefixCls,je=ye.overflowedIndicator,ze=ye.mode,Xe=ye.level,We=ye.tag,qe=ye.children,ft=ye.theme,kt=Object(T.a)(ye,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),It=We;return u.createElement(It,Object(o.a)({ref:this.childRef},kt),this.renderChildren(qe))}}]),Ye}(u.Component);Ot.defaultProps={tag:"div",className:""};var Rt=Ot;function fr(Ie){return Ie.length?Ie.every(function(Ge){return!!Ge.props.disabled}):!0}function qt(Ie,Ge,Ye){var Fe=Ie.getState();Ie.setState({activeKey:Object(D.a)(Object(D.a)({},Fe.activeKey),{},Object(P.a)({},Ge,Ye))})}function Qt(Ie){return Ie.eventKey||"0-menu-"}function Kt(Ie,Ge){var Ye=Ge,Fe=Ie.children,ye=Ie.eventKey;if(Ye){var Pe;if(J(Fe,function(we,je){we&&we.props&&!we.props.disabled&&Ye===Ce(we,ye,je)&&(Pe=!0)}),Pe)return Ye}return Ye=null,Ie.defaultActiveFirst&&J(Fe,function(we,je){!Ye&&we&&!we.props.disabled&&(Ye=Ce(we,ye,je))}),Ye}function tr(Ie){if(!Ie)return;var Ge=this.instanceArray.indexOf(Ie);Ge!==-1?this.instanceArray[Ge]=Ie:this.instanceArray.push(Ie)}var or=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(Fe){var ye;return Object(k.a)(this,Ye),ye=Ge.call(this,Fe),ye.onKeyDown=function(Pe,we){var je=Pe.keyCode,ze;if(ye.getFlatInstanceArray().forEach(function(We){We&&We.props.active&&We.onKeyDown&&(ze=We.onKeyDown(Pe))}),ze)return 1;var Xe=null;return(je===_.a.UP||je===_.a.DOWN)&&(Xe=ye.step(je===_.a.UP?-1:1)),Xe?(Pe.preventDefault(),qt(ye.props.store,Qt(ye.props),Xe.props.eventKey),typeof we=="function"&&we(Xe),1):void 0},ye.onItemHover=function(Pe){var we=Pe.key,je=Pe.hover;qt(ye.props.store,Qt(ye.props),je?we:null)},ye.onDeselect=function(Pe){ye.props.onDeselect(Pe)},ye.onSelect=function(Pe){ye.props.onSelect(Pe)},ye.onClick=function(Pe){ye.props.onClick(Pe)},ye.onOpenChange=function(Pe){ye.props.onOpenChange(Pe)},ye.onDestroy=function(Pe){ye.props.onDestroy(Pe)},ye.getFlatInstanceArray=function(){return ye.instanceArray},ye.step=function(Pe){var we=ye.getFlatInstanceArray(),je=ye.props.store.getState().activeKey[Qt(ye.props)],ze=we.length;if(!ze)return null;Pe<0&&(we=we.concat().reverse());var Xe=-1;if(we.every(function(kt,It){return kt&&kt.props.eventKey===je?(Xe=It,!1):!0}),!ye.props.defaultActiveFirst&&Xe!==-1&&fr(we.slice(Xe,ze-1)))return;var We=(Xe+1)%ze,qe=We;do{var ft=we[qe];if(!ft||ft.props.disabled)qe=(qe+1)%ze;else return ft}while(qe!==We);return null},ye.renderCommonMenuItem=function(Pe,we,je){var ze=ye.props.store.getState(),Xe=Object(b.a)(ye),We=Xe.props,qe=Ce(Pe,We.eventKey,we),ft=Pe.props;if(!ft||typeof Pe.type=="string")return Pe;var kt=qe===ze.activeKey,It=Object(D.a)(Object(D.a)({mode:ft.mode||We.mode,level:We.level,inlineIndent:We.inlineIndent,renderMenuItem:ye.renderMenuItem,rootPrefixCls:We.prefixCls,index:we,parentMenu:We.parentMenu,manualRef:ft.disabled?void 0:Object(N.a)(Pe.ref,tr.bind(Object(b.a)(ye))),eventKey:qe,active:!ft.disabled&&kt,multiple:We.multiple,onClick:function(Pr){(ft.onClick||ee)(Pr),ye.onClick(Pr)},onItemHover:ye.onItemHover,motion:We.motion,subMenuOpenDelay:We.subMenuOpenDelay,subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,onOpenChange:ye.onOpenChange,onDeselect:ye.onDeselect,onSelect:ye.onSelect,builtinPlacements:We.builtinPlacements,itemIcon:ft.itemIcon||ye.props.itemIcon,expandIcon:ft.expandIcon||ye.props.expandIcon},je),{},{direction:We.direction});return(We.mode==="inline"||Oe())&&(It.triggerSubMenuAction="click"),u.cloneElement(Pe,Object(D.a)(Object(D.a)({},It),{},{key:qe||we}))},ye.renderMenuItem=function(Pe,we,je){if(!Pe)return null;var ze=ye.props.store.getState(),Xe={openKeys:ze.openKeys,selectedKeys:ze.selectedKeys,triggerSubMenuAction:ye.props.triggerSubMenuAction,subMenuKey:je};return ye.renderCommonMenuItem(Pe,we,Xe)},Fe.store.setState({activeKey:Object(D.a)(Object(D.a)({},Fe.store.getState().activeKey),{},Object(P.a)({},Fe.eventKey,Kt(Fe,Fe.activeKey)))}),ye.instanceArray=[],ye}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ye){return this.props.visible||ye.visible||this.props.className!==ye.className||!G()(this.props.style,ye.style)}},{key:"componentDidUpdate",value:function(ye){var Pe=this.props,we="activeKey"in Pe?Pe.activeKey:Pe.store.getState().activeKey[Qt(Pe)],je=Kt(Pe,we);if(je!==we)qt(Pe.store,Qt(Pe),je);else if("activeKey"in ye){var ze=Kt(ye,ye.activeKey);je!==ze&&qt(Pe.store,Qt(Pe),je)}}},{key:"render",value:function(){var ye=this,Pe=Object(o.a)({},this.props);this.instanceArray=[];var we=C()(Pe.prefixCls,Pe.className,"".concat(Pe.prefixCls,"-").concat(Pe.mode)),je={className:we,role:Pe.role||"menu"};Pe.id&&(je.id=Pe.id),Pe.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var ze=Pe.prefixCls,Xe=Pe.eventKey,We=Pe.visible,qe=Pe.level,ft=Pe.mode,kt=Pe.overflowedIndicator,It=Pe.theme;return Q.forEach(function(Xt){return delete Pe[Xt]}),delete Pe.onClick,u.createElement(Rt,Object(o.a)({},Pe,{prefixCls:ze,mode:ft,tag:"ul",level:qe,theme:It,visible:We,overflowedIndicator:kt},je),Object(E.a)(Pe.children).map(function(Xt,Pr){return ye.renderMenuItem(Xt,Pr,Xe||"0-menu-")}))}}]),Ye}(u.Component);or.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ee};var ot=Object(w.b)()(or),Dr=ot,Ir=L("Kwbf");function yr(Ie,Ge,Ye){var Fe=Ie.prefixCls,ye=Ie.motion,Pe=Ie.defaultMotions,we=Pe===void 0?{}:Pe,je=Ie.openAnimation,ze=Ie.openTransitionName,Xe=Ge.switchingModeFromInline;if(ye)return ye;if(Object(z.a)(je)==="object"&&je)Object(Ir.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Fe,"-open-").concat(je)};if(ze)return{motionName:ze};var We=we[Ye];return We||(Xe?null:we.other)}var er=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(Fe){var ye;Object(k.a)(this,Ye),ye=Ge.call(this,Fe),ye.onSelect=function(je){var ze=Object(b.a)(ye),Xe=ze.props;if(Xe.selectable){var We=ye.store.getState(),qe=We.selectedKeys,ft=je.key;Xe.multiple?qe=qe.concat([ft]):qe=[ft],"selectedKeys"in Xe||ye.store.setState({selectedKeys:qe}),Xe.onSelect(Object(D.a)(Object(D.a)({},je),{},{selectedKeys:qe}))}},ye.onClick=function(je){var ze=ye.getRealMenuMode(),Xe=Object(b.a)(ye),We=Xe.store,qe=Xe.props.onOpenChange;ze!=="inline"&&!("openKeys"in ye.props)&&(We.setState({openKeys:[]}),qe([])),ye.props.onClick(je)},ye.onKeyDown=function(je,ze){ye.innerMenu.getWrappedInstance().onKeyDown(je,ze)},ye.onOpenChange=function(je){var ze=Object(b.a)(ye),Xe=ze.props,We=ye.store.getState().openKeys.concat(),qe=!1,ft=function(It){var Xt=!1;if(It.open)Xt=We.indexOf(It.key)===-1,Xt&&We.push(It.key);else{var Pr=We.indexOf(It.key);Xt=Pr!==-1,Xt&&We.splice(Pr,1)}qe=qe||Xt};Array.isArray(je)?je.forEach(ft):ft(je),qe&&("openKeys"in ye.props||ye.store.setState({openKeys:We}),Xe.onOpenChange(We))},ye.onDeselect=function(je){var ze=Object(b.a)(ye),Xe=ze.props;if(Xe.selectable){var We=ye.store.getState().selectedKeys.concat(),qe=je.key,ft=We.indexOf(qe);ft!==-1&&We.splice(ft,1),"selectedKeys"in Xe||ye.store.setState({selectedKeys:We}),Xe.onDeselect(Object(D.a)(Object(D.a)({},je),{},{selectedKeys:We}))}},ye.onMouseEnter=function(je){ye.restoreModeVerticalFromInline();var ze=ye.props.onMouseEnter;ze&&ze(je)},ye.onTransitionEnd=function(je){var ze=je.propertyName==="width"&&je.target===je.currentTarget,Xe=je.target.className,We=Object.prototype.toString.call(Xe)==="[object SVGAnimatedString]"?Xe.animVal:Xe,qe=je.propertyName==="font-size"&&We.indexOf("anticon")>=0;(ze||qe)&&ye.restoreModeVerticalFromInline()},ye.setInnerMenu=function(je){ye.innerMenu=je},ye.isRootMenu=!0;var Pe=Fe.defaultSelectedKeys,we=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(Pe=Fe.selectedKeys||[]),"openKeys"in Fe&&(we=Fe.openKeys||[]),ye.store=Object(w.c)({selectedKeys:Pe,openKeys:we,activeKey:{"0-menu-":Kt(Fe,Fe.activeKey)}}),ye.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:ye.store},ye}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ye){var Pe=this.props,we=Pe.siderCollapsed,je=Pe.inlineCollapsed,ze=Pe.onOpenChange;(!ye.inlineCollapsed&&je||!ye.siderCollapsed&&we)&&ze([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var ye=this.props.collapsedWidth,Pe=this.store,we=this.prevOpenKeys,je=this.getInlineCollapsed()&&(ye===0||ye==="0"||ye==="0px");je?(this.prevOpenKeys=Pe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):we&&(this.store.setState({openKeys:we}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ye=this.props.mode,Pe=this.state.switchingModeFromInline,we=this.getInlineCollapsed();return Pe&&we?"inline":we?"vertical":ye}},{key:"getInlineCollapsed",value:function(){var ye=this.props,Pe=ye.inlineCollapsed,we=ye.siderCollapsed;return we!==void 0?we:Pe}},{key:"restoreModeVerticalFromInline",value:function(){var ye=this.state.switchingModeFromInline;ye&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var ye=Object(D.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Pe=this.getRealMenuMode();return ye.className+=" ".concat(ye.prefixCls,"-root"),ye.direction==="rtl"&&(ye.className+=" ".concat(ye.prefixCls,"-rtl")),ye=Object(D.a)(Object(D.a)({},ye),{},{mode:Pe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:yr(this.props,this.state,Pe)}),delete ye.openAnimation,delete ye.openTransitionName,u.createElement(w.a,{store:this.store},u.createElement(Dr,Object(o.a)({},ye,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(ye,Pe){var we=Pe.prevProps,je=Pe.store,ze=je.getState(),Xe={},We={prevProps:ye};return we.mode==="inline"&&ye.mode!=="inline"&&(We.switchingModeFromInline=!0),"openKeys"in ye?Xe.openKeys=ye.openKeys||[]:((ye.inlineCollapsed&&!we.inlineCollapsed||ye.siderCollapsed&&!we.siderCollapsed)&&(We.switchingModeFromInline=!0,We.inlineOpenKeys=ze.openKeys,Xe.openKeys=[]),(!ye.inlineCollapsed&&we.inlineCollapsed||!ye.siderCollapsed&&we.siderCollapsed)&&(Xe.openKeys=Pe.inlineOpenKeys,We.inlineOpenKeys=[])),Object.keys(Xe).length&&je.setState(Xe),We}}]),Ye}(u.Component);er.defaultProps={selectable:!0,onClick:ee,onSelect:ee,onOpenChange:ee,onDeselect:ee,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:u.createElement("span",null,"\xB7\xB7\xB7")};var Et=er,wt=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.onKeyDown=function(ye){var Pe=ye.keyCode;return Pe===_.a.ENTER?(Fe.onClick(ye),!0):void 0},Fe.onMouseLeave=function(ye){var Pe=Fe.props,we=Pe.eventKey,je=Pe.onItemHover,ze=Pe.onMouseLeave;je({key:we,hover:!1}),ze({key:we,domEvent:ye})},Fe.onMouseEnter=function(ye){var Pe=Fe.props,we=Pe.eventKey,je=Pe.onItemHover,ze=Pe.onMouseEnter;je({key:we,hover:!0}),ze({key:we,domEvent:ye})},Fe.onClick=function(ye){var Pe=Fe.props,we=Pe.eventKey,je=Pe.multiple,ze=Pe.onClick,Xe=Pe.onSelect,We=Pe.onDeselect,qe=Pe.isSelected,ft={key:we,keyPath:[we],item:Object(b.a)(Fe),domEvent:ye};ze(ft),je?qe?We(ft):Xe(ft):qe||Xe(ft)},Fe.saveNode=function(ye){Fe.node=ye},Fe}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ye=this.props;ye.onDestroy&&ye.onDestroy(ye.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var ye,Pe=Object(D.a)({},this.props),we=C()(this.getPrefixCls(),Pe.className,(ye={},Object(P.a)(ye,this.getActiveClassName(),!Pe.disabled&&Pe.active),Object(P.a)(ye,this.getSelectedClassName(),Pe.isSelected),Object(P.a)(ye,this.getDisabledClassName(),Pe.disabled),ye)),je=Object(D.a)(Object(D.a)({},Pe.attribute),{},{title:typeof Pe.title=="string"?Pe.title:void 0,className:we,role:Pe.role||"menuitem","aria-disabled":Pe.disabled});Pe.role==="option"?je=Object(D.a)(Object(D.a)({},je),{},{role:"option","aria-selected":Pe.isSelected}):(Pe.role===null||Pe.role==="none")&&(je.role="none");var ze={onClick:Pe.disabled?null:this.onClick,onMouseLeave:Pe.disabled?null:this.onMouseLeave,onMouseEnter:Pe.disabled?null:this.onMouseEnter},Xe=Object(D.a)({},Pe.style);Pe.mode==="inline"&&(Pe.direction==="rtl"?Xe.paddingRight=Pe.inlineIndent*Pe.level:Xe.paddingLeft=Pe.inlineIndent*Pe.level),Q.forEach(function(qe){return delete Pe[qe]}),delete Pe.direction;var We=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(We=u.createElement(this.props.itemIcon,this.props)),u.createElement("li",Object(o.a)({},Object(M.a)(Pe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,ze,{style:Xe,ref:this.saveNode}),Pe.children,We)}}]),Ye}(u.Component);wt.isMenuItem=!0,wt.defaultProps={onSelect:ee,onMouseEnter:ee,onMouseLeave:ee,manualRef:ee};var xt=Object(w.b)(function(Ie,Ge){var Ye=Ie.activeKey,Fe=Ie.selectedKeys,ye=Ge.eventKey,Pe=Ge.subMenuKey;return{active:Ye[Pe]===ye,isSelected:Array.isArray(Fe)?Fe.indexOf(ye)!==-1:Fe===ye}})(wt),$t=xt,ur=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.renderInnerMenuItem=function(ye){var Pe=Fe.props,we=Pe.renderMenuItem,je=Pe.index;return we(ye,je,Fe.props.subMenuKey)},Fe}return Object(O.a)(Ye,[{key:"render",value:function(){var ye=Object(o.a)({},this.props),Pe=ye.className,we=Pe===void 0?"":Pe,je=ye.rootPrefixCls,ze="".concat(je,"-item-group-title"),Xe="".concat(je,"-item-group-list"),We=ye.title,qe=ye.children;return Q.forEach(function(ft){return delete ye[ft]}),delete ye.direction,u.createElement("li",Object(o.a)({},ye,{onClick:function(kt){return kt.stopPropagation()},className:"".concat(we," ").concat(je,"-item-group")}),u.createElement("div",{className:ze,title:typeof We=="string"?We:void 0},We),u.createElement("ul",{className:Xe},u.Children.map(qe,this.renderInnerMenuItem)))}}]),Ye}(u.Component);ur.isMenuItemGroup=!0,ur.defaultProps={disabled:!0};var sr=ur,lr=function(Ge){var Ye=Ge.className,Fe=Ge.rootPrefixCls,ye=Ge.style;return u.createElement("li",{className:"".concat(Ye," ").concat(Fe,"-item-divider"),style:ye})};lr.defaultProps={disabled:!0,className:"",style:{}};var Tr=lr,Zr=Et,et=L("eDIo");function ir(Ie,Ge){var Ye=Ie.prefixCls,Fe=Ie.editable,ye=Ie.locale,Pe=Ie.style;return!Fe||Fe.showAdd===!1?null:u.createElement("button",{ref:Ge,type:"button",className:"".concat(Ye,"-nav-add"),style:Pe,"aria-label":(ye==null?void 0:ye.addAriaLabel)||"Add tab",onClick:function(je){Fe.onEdit("add",{event:je})}},Fe.addIcon||"+")}var Lr=u.forwardRef(ir);function Jr(Ie,Ge){var Ye=Ie.prefixCls,Fe=Ie.id,ye=Ie.tabs,Pe=Ie.locale,we=Ie.mobile,je=Ie.moreIcon,ze=je===void 0?"More":je,Xe=Ie.moreTransitionName,We=Ie.style,qe=Ie.className,ft=Ie.editable,kt=Ie.tabBarGutter,It=Ie.rtl,Xt=Ie.onTabClick,Pr=Object(u.useState)(!1),Gr=Object(d.a)(Pr,2),Kr=Gr[0],Qr=Gr[1],Wr=Object(u.useState)(null),en=Object(d.a)(Wr,2),tn=en[0],pn=en[1],on="".concat(Fe,"-more-popup"),kn="".concat(Ye,"-dropdown"),ln=tn!==null?"".concat(on,"-").concat(tn):null,Mr=Pe==null?void 0:Pe.dropdownAriaLabel,Fr=u.createElement(Zr,{onClick:function(Mn){var Tn=Mn.key,Yn=Mn.domEvent;Xt(Tn,Yn),Qr(!1)},id:on,tabIndex:-1,role:"listbox","aria-activedescendant":ln,selectedKeys:[tn],"aria-label":Mr!==void 0?Mr:"expanded dropdown"},ye.map(function(wn){return u.createElement($t,{key:wn.key,id:"".concat(on,"-").concat(wn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(wn.key),disabled:wn.disabled},wn.tab)}));function nn(wn){for(var Mn=ye.filter(function(di){return!di.disabled}),Tn=Mn.findIndex(function(di){return di.key===tn})||0,Yn=Mn.length,ri=0;ribn?(dn=Fr,on.current="x"):(dn=nn,on.current="y");var Wn=Date.now();Wn-tn.current>100&&(pn.current=!1),(Ge(-dn,-dn)||pn.current)&&(Mr.preventDefault(),pn.current=!0),tn.current=Wn}var ln=Object(u.useRef)(null);ln.current={onTouchStart:Qr,onTouchMove:Wr,onTouchEnd:en,onWheel:kn},u.useEffect(function(){function Mr(wr){ln.current.onTouchStart(wr)}function Fr(wr){ln.current.onTouchMove(wr)}function nn(wr){ln.current.onTouchEnd(wr)}function dn(wr){ln.current.onWheel(wr)}return document.addEventListener("touchmove",Fr,{passive:!1}),document.addEventListener("touchend",nn,{passive:!1}),Ie.current.addEventListener("touchstart",Mr,{passive:!1}),Ie.current.addEventListener("wheel",dn),function(){document.removeEventListener("touchmove",Fr),document.removeEventListener("touchend",nn)}},[])}function bt(){var Ie=Object(u.useRef)(new Map);function Ge(Fe){return Ie.current.has(Fe)||Ie.current.set(Fe,u.createRef()),Ie.current.get(Fe)}function Ye(Fe){Ie.current.delete(Fe)}return[Ge,Ye]}function zt(Ie,Ge){var Ye=u.useRef(Ie),Fe=u.useState({}),ye=Object(d.a)(Fe,2),Pe=ye[1];function we(je){var ze=typeof je=="function"?je(Ye.current):je;ze!==Ye.current&&Ge(ze,Ye.current),Ye.current=ze,Pe({})}return[Ye.current,we]}var Lt=function(Ge){var Ye=Ge.position,Fe=Ge.prefixCls,ye=Ge.extra;if(!ye)return null;var Pe,we=ye;return Ye==="right"&&(Pe=we.right||!we.left&&we||null),Ye==="left"&&(Pe=we.left||null),Pe?u.createElement("div",{className:"".concat(Fe,"-extra-content")},Pe):null};function kr(Ie,Ge){var Ye,Fe=u.useContext(pr),ye=Fe.prefixCls,Pe=Fe.tabs,we=Ie.className,je=Ie.style,ze=Ie.id,Xe=Ie.animated,We=Ie.activeKey,qe=Ie.rtl,ft=Ie.extra,kt=Ie.editable,It=Ie.locale,Xt=Ie.tabPosition,Pr=Ie.tabBarGutter,Gr=Ie.children,Kr=Ie.onTabClick,Qr=Ie.onTabScroll,Wr=Object(u.useRef)(),en=Object(u.useRef)(),tn=Object(u.useRef)(),pn=Object(u.useRef)(),on=bt(),kn=Object(d.a)(on,2),ln=kn[0],Mr=kn[1],Fr=Xt==="top"||Xt==="bottom",nn=zt(0,function(Ln,_n){Fr&&Qr&&Qr({direction:Ln>_n?"left":"right"})}),dn=Object(d.a)(nn,2),wr=dn[0],bn=dn[1],Wn=zt(0,function(Ln,_n){!Fr&&Qr&&Qr({direction:Ln>_n?"top":"bottom"})}),wn=Object(d.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(u.useState)(0),ri=Object(d.a)(Yn,2),Hn=ri[0],di=ri[1],Xi=Object(u.useState)(0),wi=Object(d.a)(Xi,2),ni=wi[0],In=wi[1],Nn=Object(u.useState)(0),zn=Object(d.a)(Nn,2),Bn=zn[0],Zn=zn[1],Di=Object(u.useState)(0),ra=Object(d.a)(Di,2),An=ra[0],Ui=ra[1],Bi=Object(u.useState)(null),Pn=Object(d.a)(Bi,2),On=Pn[0],qn=Pn[1],Ba=Object(u.useState)(null),wa=Object(d.a)(Ba,2),la=wa[0],ua=wa[1],Pa=Object(u.useState)(0),Ca=Object(d.a)(Pa,2),La=Ca[0],Wa=Ca[1],Xa=Object(u.useState)(0),Ma=Object(d.a)(Xa,2),ca=Ma[0],Sa=Ma[1],ba=m(new Map),da=Object(d.a)(ba,2),co=da[0],Ea=da[1],Ta=t(Pe,co,Hn),ha="".concat(ye,"-nav-operations-hidden"),fa=0,$i=0;Fr?qe?(fa=0,$i=Math.max(0,Hn-On)):(fa=Math.min(0,On-Hn),$i=0):(fa=Math.min(0,la-ni),$i=0);function na(Ln){return Ln$i?[$i,!1]:[Ln,!0]}var xr=Object(u.useRef)(),Cr=Object(u.useState)(),ar=Object(d.a)(Cr,2),En=ar[0],dr=ar[1];function pa(){dr(Date.now())}function $a(){window.clearTimeout(xr.current)}vt(Wr,function(Ln,_n){var yi=!1;function Hi(Ia,ma){Ia(function(Ka){var xa=na(Ka+ma),bi=Object(d.a)(xa,2),Qa=bi[0],fo=bi[1];return yi=fo,Qa})}if(Fr){if(On>=Hn)return yi;Hi(bn,Ln)}else{if(la>=ni)return yi;Hi(Tn,_n)}return $a(),pa(),yi}),Object(u.useEffect)(function(){return $a(),En&&(xr.current=window.setTimeout(function(){dr(0)},100)),$a},[En]);function jn(){var Ln=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We,_n=Ta.get(Ln);if(!_n)return;if(Fr){var yi=wr;qe?_n.rightwr+On&&(yi=_n.right+_n.width-On):_n.left<-wr?yi=-_n.left:_n.left+_n.width>-wr+On&&(yi=-(_n.left+_n.width-On)),Tn(0),bn(na(yi)[0])}else{var Hi=Mn;_n.top<-Mn?Hi=-_n.top:_n.top+_n.height>-Mn+la&&(Hi=-(_n.top+_n.height-la)),bn(0),Tn(na(Hi)[0])}}var Oa=x(Ta,{width:On,height:la,left:wr,top:Mn},{width:Bn,height:An},{width:La,height:ca},Object(D.a)(Object(D.a)({},Ie),{},{tabs:Pe})),Do=Object(d.a)(Oa,2),Jo=Do[0],Qo=Do[1],Zo=Pe.map(function(Ln){var _n=Ln.key;return u.createElement(i,{id:ze,prefixCls:ye,key:_n,rtl:qe,tab:Ln,closable:Ln.closable,editable:kt,active:_n===We,tabPosition:Xt,tabBarGutter:Pr,renderWrapper:Gr,removeAriaLabel:It==null?void 0:It.removeAriaLabel,ref:ln(_n),onClick:function(Hi){Kr(_n,Hi)},onRemove:function(){Mr(_n)},onFocus:function(){jn(_n),pa(),qe||(Wr.current.scrollLeft=0),Wr.current.scrollTop=0}})}),ho=c(function(){var Ln,_n,yi,Hi,Ia,ma,Ka,xa,bi,Qa=((Ln=Wr.current)===null||Ln===void 0?void 0:Ln.offsetWidth)||0,fo=((_n=Wr.current)===null||_n===void 0?void 0:_n.offsetHeight)||0,po=((yi=pn.current)===null||yi===void 0?void 0:yi.offsetWidth)||0,zi=((Hi=pn.current)===null||Hi===void 0?void 0:Hi.offsetHeight)||0,Dn=((Ia=tn.current)===null||Ia===void 0?void 0:Ia.offsetWidth)||0,aa=((ma=tn.current)===null||ma===void 0?void 0:ma.offsetHeight)||0;qn(Qa),ua(fo),Wa(po),Sa(zi);var va=(((Ka=en.current)===null||Ka===void 0?void 0:Ka.offsetWidth)||0)-po,ga=(((xa=en.current)===null||xa===void 0?void 0:xa.offsetHeight)||0)-zi;di(va),In(ga);var mo=(bi=tn.current)===null||bi===void 0?void 0:bi.className.includes(ha);Zn(va-(mo?0:Dn)),Ui(ga-(mo?0:aa)),Ea(function(){var Za=new Map;return Pe.forEach(function(Io){var No=Io.key,Ra=ln(No).current;Ra&&Za.set(No,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),Za})}),qo=Pe.slice(0,Jo),Wi=Pe.slice(Qo+1),oi=[].concat(Object(s.a)(qo),Object(s.a)(Wi)),ki=Object(u.useState)(),si=Object(d.a)(ki,2),Ha=si[0],es=si[1],ia=Ta.get(We),ko=Object(u.useRef)();function Po(){h.a.cancel(ko.current)}Object(u.useEffect)(function(){var Ln={};return ia&&(Fr?(qe?Ln.right=ia.right:Ln.left=ia.left,Ln.width=ia.width):(Ln.top=ia.top,Ln.height=ia.height)),Po(),ko.current=h()(function(){es(Ln)}),Po},[ia,Fr,qe]),Object(u.useEffect)(function(){jn()},[We,ia,Ta,Fr]),Object(u.useEffect)(function(){ho()},[qe,Pr,We,Pe.map(function(Ln){return Ln.key}).join("_")]);var Lo=!!oi.length,Aa="".concat(ye,"-nav-wrap"),Ya,za,Mo,Ja;return Fr?qe?(za=wr>0,Ya=wr+On>>7)^(k<<14|k>>>18)^k>>>3,b=s[o-2],v=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;s[o]=O+s[o-7]+v+s[o-16]}var g=a&t^~a&S,w=m&_^m&y^_&y,M=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),N=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),I=x+N+g+l[o]+s[o],G=M+w;x=S,S=t,t=a,a=i+I|0,i=y,y=_,_=m,m=I+G|0}c[0]=c[0]+m|0,c[1]=c[1]+_|0,c[2]=c[2]+y|0,c[3]=c[3]+i|0,c[4]=c[4]+a|0,c[5]=c[5]+t|0,c[6]=c[6]+S|0,c[7]=c[7]+x|0},_doFinalize:function(){var h=this._data,f=h.words,c=this._nDataBytes*8,m=h.sigBytes*8;return f[m>>>5]|=128<<24-m%32,f[(m+64>>>9<<4)+14]=d.floor(c/4294967296),f[(m+64>>>9<<4)+15]=c,h.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var h=p.clone.call(this);return h._hash=this._hash.clone(),h}});T.SHA256=p._createHelper(n),T.HmacSHA256=p._createHmacHelper(n)}(Math),P.SHA256})},lZu9:function(j,Z,L){(function(P){P(L("VrN/"),L("1eCo"),L("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(d,T){var D=P.getMode(d,"text/html"),u=D.name=="null";function p(U){if(P.findModeByName){var B=P.findModeByName(U);B&&(U=B.mime||B.mimes[0])}var V=P.getMode(d,U);return V.name=="null"?null:V}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var C={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 E in C)C.hasOwnProperty(E)&&T.tokenTypeOverrides[E]&&(C[E]=T.tokenTypeOverrides[E]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,s=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,h=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,m=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,_=/^\s*\[[^\]]+?\]:.*$/,y=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,i=" ";function a(U,B,V){return B.f=B.inline=V,V(U,B)}function t(U,B,V){return B.f=B.block=V,V(U,B)}function S(U){return!U||!/\S/.test(U.string)}function x(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==k){var B=u;if(!B){var V=P.innerMode(D,U.htmlState);B=V.mode.name=="xml"&&V.state.tagStart===null&&!V.state.context&&V.state.tokenize.isInText}B&&(U.f=g,U.block=o,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function o(U,B){var V=U.column()===B.indentation,ae=S(B.prevLine.stream),he=B.indentedCode,pe=B.prevLine.hr,Re=B.list!==!1,ke=(B.listStack[B.listStack.length-1]||0)+3;B.indentedCode=!1;var ve=B.indentation;if(B.indentationDiff===null&&(B.indentationDiff=B.indentation,Re)){for(B.list=null;ve=4&&(he||B.prevLine.fencedCodeEnd||B.prevLine.header||ae))return U.skipToEnd(),B.indentedCode=!0,C.code;if(U.eatSpace())return null;if(V&&B.indentation<=ke&&(ue=U.match(h))&&ue[1].length<=6)return B.quote=0,B.header=ue[1].length,B.thisLine.header=!0,T.highlightFormatting&&(B.formatting="header"),B.f=B.inline,b(B);if(B.indentation<=ke&&U.eat(">"))return B.quote=V?1:B.quote+1,T.highlightFormatting&&(B.formatting="quote"),U.eatSpace(),b(B);if(!be&&!B.setext&&V&&B.indentation<=ke&&(ue=U.match(s))){var le=ue[1]?"ol":"ul";return B.indentation=ve+U.current().length,B.list=!0,B.quote=0,B.listStack.push(B.indentation),B.em=!1,B.strong=!1,B.code=!1,B.strikethrough=!1,T.taskLists&&U.match(n,!1)&&(B.taskList=!0),B.f=B.inline,T.highlightFormatting&&(B.formatting=["list","list-"+le]),b(B)}else{if(V&&B.indentation<=ke&&(ue=U.match(m,!0)))return B.quote=0,B.fencedEndRE=new RegExp(ue[1]+"+ *$"),B.localMode=T.fencedCodeBlockHighlighting&&p(ue[2]||T.fencedCodeBlockDefaultMode),B.localMode&&(B.localState=P.startState(B.localMode)),B.f=B.block=O,T.highlightFormatting&&(B.formatting="code-block"),B.code=-1,b(B);if(B.setext||(!Te||!Re)&&!B.quote&&B.list===!1&&!B.code&&!be&&!_.test(U.string)&&(ue=U.lookAhead(1))&&(ue=ue.match(f)))return B.setext?(B.header=B.setext,B.setext=0,U.skipToEnd(),T.highlightFormatting&&(B.formatting="header")):(B.header=ue[0].charAt(0)=="="?1:2,B.setext=B.header),B.thisLine.header=!0,B.f=B.inline,b(B);if(be)return U.skipToEnd(),B.hr=!0,B.thisLine.hr=!0,C.hr;if(U.peek()==="[")return a(U,B,G)}return a(U,B,B.inline)}function k(U,B){var V=D.token(U,B.htmlState);if(!u){var ae=P.innerMode(D,B.htmlState);(ae.mode.name=="xml"&&ae.state.tagStart===null&&!ae.state.context&&ae.state.tokenize.isInText||B.md_inside&&U.current().indexOf(">")>-1)&&(B.f=g,B.block=o,B.htmlState=null)}return V}function O(U,B){var V=B.listStack[B.listStack.length-1]||0,ae=B.indentation=U.quote?B.push(C.formatting+"-"+U.formatting[V]+"-"+U.quote):B.push("error"))}if(U.taskOpen)return B.push("meta"),B.length?B.join(" "):null;if(U.taskClosed)return B.push("property"),B.length?B.join(" "):null;if(U.linkHref?B.push(C.linkHref,"url"):(U.strong&&B.push(C.strong),U.em&&B.push(C.em),U.strikethrough&&B.push(C.strikethrough),U.emoji&&B.push(C.emoji),U.linkText&&B.push(C.linkText),U.code&&B.push(C.code),U.image&&B.push(C.image),U.imageAltText&&B.push(C.imageAltText,"link"),U.imageMarker&&B.push(C.imageMarker)),U.header&&B.push(C.header,C.header+"-"+U.header),U.quote&&(B.push(C.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?B.push(C.quote+"-"+U.quote):B.push(C.quote+"-"+T.maxBlockquoteDepth)),U.list!==!1){var ae=(U.listStack.length-1)%3;ae?ae===1?B.push(C.list2):B.push(C.list3):B.push(C.list1)}return U.trailingSpaceNewLine?B.push("trailing-space-new-line"):U.trailingSpace&&B.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),B.length?B.join(" "):null}function v(U,B){return U.match(c,!0)?b(B):void 0}function g(U,B){var V=B.text(U,B);if(typeof V!="undefined")return V;if(B.list)return B.list=null,b(B);if(B.taskList){var ae=U.match(n,!0)[1]===" ";return ae?B.taskOpen=!0:B.taskClosed=!0,T.highlightFormatting&&(B.formatting="task"),B.taskList=!1,b(B)}if(B.taskOpen=!1,B.taskClosed=!1,B.header&&U.match(/^#+$/,!0))return T.highlightFormatting&&(B.formatting="header"),b(B);var he=U.next();if(B.linkTitle){B.linkTitle=!1;var pe=he;he==="("&&(pe=")"),pe=(pe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Re="^\\s*(?:[^"+pe+"\\\\]+|\\\\\\\\|\\\\.)"+pe;if(U.match(new RegExp(Re),!0))return C.linkHref}if(he==="`"){var ke=B.formatting;T.highlightFormatting&&(B.formatting="code"),U.eatWhile("`");var ve=U.current().length;if(B.code==0&&(!B.quote||ve==1))return B.code=ve,b(B);if(ve==B.code){var Te=b(B);return B.code=0,Te}else return B.formatting=ke,b(B)}else if(B.code)return b(B);if(he==="\\"&&(U.next(),T.highlightFormatting)){var be=b(B),ue=C.formatting+"-escape";return be?be+" "+ue:ue}if(he==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return B.imageMarker=!0,B.image=!0,T.highlightFormatting&&(B.formatting="image"),b(B);if(he==="["&&B.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return B.imageMarker=!1,B.imageAltText=!0,T.highlightFormatting&&(B.formatting="image"),b(B);if(he==="]"&&B.imageAltText){T.highlightFormatting&&(B.formatting="image");var be=b(B);return B.imageAltText=!1,B.image=!1,B.inline=B.f=M,be}if(he==="["&&!B.image)return B.linkText&&U.match(/^.*?\]/)||(B.linkText=!0,T.highlightFormatting&&(B.formatting="link")),b(B);if(he==="]"&&B.linkText){T.highlightFormatting&&(B.formatting="link");var be=b(B);return B.linkText=!1,B.inline=B.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:g,be}if(he==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){B.f=B.inline=w,T.highlightFormatting&&(B.formatting="link");var be=b(B);return be?be+=" ":be="",be+C.linkInline}if(he==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){B.f=B.inline=w,T.highlightFormatting&&(B.formatting="link");var be=b(B);return be?be+=" ":be="",be+C.linkEmail}if(T.xml&&he==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var le=U.string.indexOf(">",U.pos);if(le!=-1){var re=U.string.substring(U.start,le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(B.md_inside=!0)}return U.backUp(1),B.htmlState=P.startState(D),t(U,B,k)}if(T.xml&&he==="<"&&U.match(/^\/\w*?>/))return B.md_inside=!1,"tag";if(he==="*"||he==="_"){for(var fe=1,q=U.pos==1?" ":U.string.charAt(U.pos-2);fe<3&&U.eat(he);)fe++;var ee=U.peek()||" ",Ce=!/\s/.test(ee)&&(!y.test(ee)||/\s/.test(q)||y.test(q)),te=!/\s/.test(q)&&(!y.test(q)||/\s/.test(ee)||y.test(ee)),J=null,X=null;if(fe%2&&(!B.em&&Ce&&(he==="*"||!te||y.test(q))?J=!0:B.em==he&&te&&(he==="*"||!Ce||y.test(ee))&&(J=!1)),fe>1&&(!B.strong&&Ce&&(he==="*"||!te||y.test(q))?X=!0:B.strong==he&&te&&(he==="*"||!Ce||y.test(ee))&&(X=!1)),X!=null||J!=null){T.highlightFormatting&&(B.formatting=J==null?"strong":X==null?"em":"strong em"),J===!0&&(B.em=he),X===!0&&(B.strong=he);var Te=b(B);return J===!1&&(B.em=!1),X===!1&&(B.strong=!1),Te}}else if(he===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return b(B);U.backUp(1)}if(T.strikethrough){if(he==="~"&&U.eatWhile(he)){if(B.strikethrough){T.highlightFormatting&&(B.formatting="strikethrough");var Te=b(B);return B.strikethrough=!1,Te}else if(U.match(/^[^\s]/,!1))return B.strikethrough=!0,T.highlightFormatting&&(B.formatting="strikethrough"),b(B)}else if(he===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return b(B);U.backUp(2)}}if(T.emoji&&he===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){B.emoji=!0,T.highlightFormatting&&(B.formatting="emoji");var Q=b(B);return B.emoji=!1,Q}return he===" "&&(U.match(/^ +$/,!1)?B.trailingSpace++:B.trailingSpace&&(B.trailingSpaceNewLine=!0)),b(B)}function w(U,B){var V=U.next();if(V===">"){B.f=B.inline=g,T.highlightFormatting&&(B.formatting="link");var ae=b(B);return ae?ae+=" ":ae="",ae+C.linkInline}return U.match(/^[^>]+/,!0),C.linkInline}function M(U,B){if(U.eatSpace())return null;var V=U.next();return V==="("||V==="["?(B.f=B.inline=I(V==="("?")":"]"),T.highlightFormatting&&(B.formatting="link-string"),B.linkHref=!0,b(B)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function I(U){return function(B,V){var ae=B.next();if(ae===U){V.f=V.inline=g,T.highlightFormatting&&(V.formatting="link-string");var he=b(V);return V.linkHref=!1,he}return B.match(N[U]),V.linkHref=!0,b(V)}}function G(U,B){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(B.f=z,U.next(),T.highlightFormatting&&(B.formatting="link"),B.linkText=!0,b(B)):a(U,B,g)}function z(U,B){if(U.match(/^\]:/,!0)){B.f=B.inline=H,T.highlightFormatting&&(B.formatting="link");var V=b(B);return B.linkText=!1,V}return U.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function H(U,B){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?B.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),B.f=B.inline=g,C.linkHref+" url")}var K={startState:function(){return{f:o,prevLine:{stream:null},thisLine:{stream:null},block:o,htmlState:null,indentation:0,inline:g,text:v,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(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&P.copyState(D,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?P.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,B){if(B.formatting=!1,U!=B.thisLine.stream){if(B.header=0,B.hr=!1,U.match(/^\s*$/,!0))return x(B),null;if(B.prevLine=B.thisLine,B.thisLine={stream:U},B.taskList=!1,B.trailingSpace=0,B.trailingSpaceNewLine=!1,!B.localState&&(B.f=B.block,B.f!=k)){var V=U.match(/^\s*/,!0)[0].replace(/\t/g,i).length;if(B.indentation=V,B.indentationDiff=null,V>0)return null}}return B.f(U,B)},innerMode:function(U){return U.block==k?{state:U.htmlState,mode:D}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:K}},indent:function(U,B,V){return U.block==k&&D.indent?D.indent(U.htmlState,B,V):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,B,V):P.Pass},blankLine:x,getType:b,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return K},"xml"),P.defineMIME("text/markdown","markdown"),P.defineMIME("text/x-markdown","markdown")})},mOS8:function(j,Z,L){j.exports=L.p+"static/403Qrcode.6c17b6f4.png"},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(j){if(!0)module.exports=j();else var Z})(function(){var define,module,exports;return function(){function j(Z,L,P){function d(u,p){if(!L[u]){if(!Z[u]){var C=typeof require=="function"&&require;if(!p&&C)return require(u,!0);if(T)return T(u,!0);var E=new Error("Cannot find module '"+u+"'");throw E.code="MODULE_NOT_FOUND",E}var l=L[u]={exports:{}};Z[u][0].call(l.exports,function(s){var n=Z[u][1][s];return d(n||s)},l,l.exports,j,Z,L,P)}return L[u].exports}for(var T=typeof require=="function"&&require,D=0;D0&&f(M).to(I),G=this._divideParts(v,g),z=G.length,H=!1,K=function(Te,be){var ue=this;return new u.default(function(re,fe){var q,ee,Ce,te;return C.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Te.isCancel()){X.next=18;break}return q=G[be-1],ee={stream:Te._createStream(b,q.start,q.end),size:q.end-q.start},X.next=6,C.default.awrap(Te._uploadPart(N,w,be,ee));case 6:if(Ce=X.sent,!(!Te.isCancel()&&!H)){X.next=15;break}if(o.doneParts.push({number:be,etag:Ce.res.headers.etag}),!k.progress){X.next=12;break}return X.next=12,C.default.awrap(k.progress(M.length/z,o,Ce.res));case 12:re({number:be,etag:Ce.res.headers.etag}),X.next=16;break;case 15:re();case 16:X.next=19;break;case 18:re();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),te=new Error,te.name=X.t0.name,te.message=X.t0.message,te.stack=X.t0.stack,te.partNum=be,f(X.t0).to(te),fe(te);case 30:case"end":return X.stop()}},null,ue,[[0,21]])})},U=(0,T.default)(new Array(z),function(ve,Te){return Te+1}),B=I.map(function(ve){return ve.number}),V=U.filter(function(ve){return B.indexOf(ve)<0}),ae=5,he=k.parallel||ae,ke.next=17,C.default.awrap(this._parallel(V,he,function(ve){return new u.default(function(Te,be){K(O,ve).then(function(ue){ue&&I.push(ue),Te()}).catch(function(ue){be(ue)})})}));case 17:if(pe=ke.sent,H=!0,!this.isCancel()){ke.next=22;break}throw K=null,this._makeCancelEvent();case 22:if(!(pe&&pe.length>0)){ke.next=25;break}throw pe[0].message="Failed to upload some parts with error: "+pe[0].toString()+" part_num: "+pe[0].partNum,pe[0];case 25:return ke.next=27,C.default.awrap(this.completeMultipartUpload(N,w,I,k));case 27:return ke.abrupt("return",ke.sent);case 28:case"end":return ke.stop()}},null,this)},i._getFileSize=function(o){return C.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!l.buffer(o)){O.next=4;break}return O.abrupt("return",o.length);case 4:if(!(m(o)||y(o))){O.next=6;break}return O.abrupt("return",o.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var a=j("stream"),t=a.Readable;function S(x,o){if(!(this instanceof S))return new S(x,o);t.call(this,o),this.file=x,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}s.inherits(S,t),S.prototype.readFileAndPush=function(o){if(this.fileBuffer)for(var k=!0;k&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:b,this.start=b,k=this.push(this.fileBuffer.slice(O,b))}},S.prototype._read=function(o){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 k=16*1024;o=o||k;var O=this;this.reader.onload=function(v){O.fileBuffer=P.from(new Uint8Array(v.target.result)),O.file=null,O.readFileAndPush(o)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(o)},i._createStream=function(o,k,O){if(m(o)||y(o))return new S(o.slice(k,O));throw new Error("_createStream requires File/Blob.")},i._getPartSize=function(o,k){var O=10*1e3,b=1024*1024;return k?Math.max(Math.ceil(o/O),k):b},i._divideParts=function(o,k){for(var O=Math.ceil(o/k),b=[],v=0;v255)throw new Error("ID is composed of 255 bytes at most");if(o.prefix===""||o.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(o.status))throw new Error("Status must be Enabled or Disabled");if(o.transition){if(!["IA","Archive"].includes(o.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(o.transition,"Transition")}if(o.expiration){if(!o.expiration.expiredObjectDeleteMarker)t(o.expiration,"Expiration");else if(o.expiration.days||o.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(o.abortMultipartUpload&&t(o.abortMultipartUpload,"AbortMultipartUpload"),!o.expiration&&!o.abortMultipartUpload&&!o.transition&&!o.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(o.tag){if(o.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");S(o.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(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(l){return l&&l.__esModule?l:{default:l}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("../utils/obj2xml"),C=p.obj2xml,E=L;E.putBucketVersioning=function(s,n){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,c,m;return d.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(u(s),["Enabled","Suspended"].includes(n)){y.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return f=this._bucketRequestParams("PUT",s,"versioning",h),c={VersioningConfiguration:{Status:n}},f.mime="xml",f.content=C(c,{headers:!0}),y.next=9,d.default.awrap(this.request(f));case 9:return m=y.sent,y.abrupt("return",{res:m.res,status:m.status});case 11:case"end":return y.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(n){return n&&n.__esModule?n:{default:n}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("../utils/obj2xml"),C=p.obj2xml,E=j("../utils/isArray"),l=E.isArray,s=L;s.putBucketWebsite=function(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],m,_,y,i,a;return d.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:if(u(h),m=this._bucketRequestParams("PUT",h,"website",c),_={Suffix:f.index||"index.html"},y={IndexDocument:_},i={WebsiteConfiguration:y},f.supportSubDir&&(_.SupportSubDir=f.supportSubDir),f.type&&(_.Type=f.type),f.error&&(y.ErrorDocument={Key:f.error}),!(f.routingRules!==void 0)){S.next=12;break}if(l(f.routingRules)){S.next=11;break}throw new Error("RoutingRules must be Array");case 11:y.RoutingRules={RoutingRule:f.routingRules};case 12:return i=C(i),m.content=i,m.mime="xml",m.successStatuses=[200],S.next=18,d.default.awrap(this.request(m));case 18:return a=S.sent,S.abrupt("return",{res:a.res});case 20:case"end":return S.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/object/keys"),T=p(d),D=j("babel-runtime/core-js/json/stringify"),u=p(D);function p(C){return C&&C.__esModule?C:{default:C}}L.encodeCallback=function(E,l){if(E.headers=E.headers||{},!Object.prototype.hasOwnProperty.call(E.headers,"x-oss-callback")&&l.callback){var s={callbackUrl:encodeURI(l.callback.url),callbackBody:l.callback.body};l.callback.host&&(s.callbackHost=l.callback.host),l.callback.contentType&&(s.callbackBodyType=l.callback.contentType);var n=P.from((0,u.default)(s)).toString("base64");if(E.headers["x-oss-callback"]=n,l.callback.customValue){var h={};(0,T.default)(l.callback.customValue).forEach(function(f){h["x:"+f]=l.callback.customValue[f]}),E.headers["x-oss-callback-var"]=P.from((0,u.default)(h)).toString("base64")}}}}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/assign"),d=T(P);function T(s){return s&&s.__esModule?s:{default:s}}var D=j("humanize-ms"),u=j("url"),p=j("../utils/checkBucketName"),C=p.checkBucketName;function E(s,n){var h=u.parse(s);if(h.protocol||(h=u.parse("http"+(n?"s":"")+"://"+s)),h.protocol!=="http:"&&h.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return h}function l(s,n,h){var f=h?"https://":"http://",c=n?"-internal.aliyuncs.com":".aliyuncs.com",m="vpc100-oss-cn-";return s.substr(0,m.length)===m&&(c=".aliyuncs.com"),u.parse(f+s+c)}Z.exports=function(s){if(!s||!s.accessKeyId||!s.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");s.bucket&&C(s.bucket);var n=(0,d.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},s);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=D(n.timeout)),n.endpoint)n.endpoint=E(n.endpoint,n.secure);else if(n.region)n.endpoint=l(n.region,n.internal,n.secure);else throw new Error("require options.endpoint or options.region");return n.inited=!0,n}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(j,Z,L){"use strict";var P=j("merge-descriptors"),d=L;P(d,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(n){return n&&n.__esModule?n:{default:n}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("querystring"),C=j("js-base64"),E=C.Base64.encode,l=L;l.processObjectSave=function(h,f,c,m){var _,y,i,a;return d.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return s(h,"sourceObject"),s(f,"targetObject"),s(c,"process"),f=this._objectName(f),m&&u(m),_=this._objectRequestParams("POST",h,{subres:"x-oss-process"}),y=m?",b_"+E(m):"",f=E(f),i={"x-oss-process":c+"|sys/saveas,o_"+f+y},_.content=p.stringify(i),S.next=12,d.default.awrap(this.request(_));case 12:return a=S.sent,S.abrupt("return",{res:a.res,status:a.res.status});case 14:case"end":return S.stop()}},null,this)};function s(n,h){if(!n)throw new Error(h+" is required");if(typeof n!="string")throw new Error(h+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(l){return l&&l.__esModule?l:{default:l}}var D=j("copy-to"),u=j("./callback"),p=j("./utils/deepCopy"),C=p.deepCopy,E=L;E.listUploads=function(s,n){var h,f,c,m;return d.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return n=n||{},h={},D(n).to(h),h.subres="uploads",f=this._objectRequestParams("GET","",h),f.query=s,f.xmlResponse=!0,f.successStatuses=[200],y.next=10,d.default.awrap(this.request(f));case 10:return c=y.sent,m=c.data.Upload||[],Array.isArray(m)||(m=[m]),m=m.map(function(i){return{name:i.Key,uploadId:i.UploadId,initiated:i.Initiated}}),y.abrupt("return",{res:c.res,uploads:m,bucket:c.data.Bucket,nextKeyMarker:c.data.NextKeyMarker,nextUploadIdMarker:c.data.NextUploadIdMarker,isTruncated:c.data.IsTruncated==="true"});case 15:case"end":return y.stop()}},null,this)},E.listParts=function(s,n,h,f){var c,m,_;return d.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return f=f||{},c={},D(f).to(c),c.subres={uploadId:n},m=this._objectRequestParams("GET",s,c),m.query=h,m.xmlResponse=!0,m.successStatuses=[200],i.next=10,d.default.awrap(this.request(m));case 10:return _=i.sent,i.abrupt("return",{res:_.res,uploadId:_.data.UploadId,bucket:_.data.Bucket,name:_.data.Key,partNumberMarker:_.data.PartNumberMarker,nextPartNumberMarker:_.data.NextPartNumberMarker,maxParts:_.data.MaxParts,isTruncated:_.data.IsTruncated,parts:_.data.Part||[]});case 12:case"end":return i.stop()}},null,this)},E.abortMultipartUpload=function(s,n,h){var f,c,m;return d.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return this._stop(),h=h||{},f={},D(h).to(f),f.subres={uploadId:n},c=this._objectRequestParams("DELETE",s,f),c.successStatuses=[204],y.next=9,d.default.awrap(this.request(c));case 9:return m=y.sent,y.abrupt("return",{res:m.res});case 11:case"end":return y.stop()}},null,this)},E.initMultipartUpload=function(s,n){var h,f,c;return d.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:return n=n||{},h={},D(n).to(h),h.headers=h.headers||{},this._convertMetaToHeaders(n.meta,h.headers),h.subres="uploads",f=this._objectRequestParams("POST",s,h),f.mime=n.mime,f.xmlResponse=!0,f.successStatuses=[200],_.next=12,d.default.awrap(this.request(f));case 12:return c=_.sent,_.abrupt("return",{res:c.res,bucket:c.data.Bucket,name:c.data.Key,uploadId:c.data.UploadId});case 14:case"end":return _.stop()}},null,this)},E.uploadPart=function(s,n,h,f,c,m,_){var y;return d.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return y={stream:this._createStream(f,c,m),size:m-c},a.next=3,d.default.awrap(this._uploadPart(s,n,h,y,_));case 3:return a.abrupt("return",a.sent);case 4:case"end":return a.stop()}},null,this)},E.completeMultipartUpload=function(s,n,h,f){var c,m,_,y,i,a,t,S;return d.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:for(c=h.concat().sort(function(k,O){return k.number-O.number}).filter(function(k,O,b){return!O||k.number!==b[O-1].number}),m=` `,_=0;_ `,m+=""+y.number+` `,m+=""+y.etag+` `,m+=` `;return m+="",f=f||{},i={},i=C(f),i.headers&&delete i.headers["x-oss-server-side-encryption"],i.subres={uploadId:n},a=this._objectRequestParams("POST",s,i),u.encodeCallback(a,i),a.mime="xml",a.content=m,a.headers&&a.headers["x-oss-callback"]||(a.xmlResponse=!0),a.successStatuses=[200],o.next=17,d.default.awrap(this.request(a));case 17:return t=o.sent,S={res:t.res,bucket:a.bucket,name:s,etag:t.res.headers.etag},a.headers&&a.headers["x-oss-callback"]&&(S.data=JSON.parse(t.data.toString())),o.abrupt("return",S);case 21:case"end":return o.stop()}},null,this)},E._uploadPart=function(s,n,h,f,c){var m,_,y;return d.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return c=c||{},m={},D(c).to(m),m.headers={"Content-Length":f.size},m.subres={partNumber:h,uploadId:n},_=this._objectRequestParams("PUT",s,m),_.mime=m.mime,_.stream=f.stream,_.successStatuses=[200],a.next=11,d.default.awrap(this.request(_));case 11:if(y=a.sent,y.res.headers.etag){a.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 f.stream=null,_.stream=null,a.abrupt("return",{name:s,etag:y.res.headers.etag,res:y.res});case 17:case"end":return a.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=C(P),T=j("babel-runtime/core-js/object/keys"),D=C(T),u=j("babel-runtime/helpers/typeof"),p=C(u);function C(n){return n&&n.__esModule?n:{default:n}}var E=j("../utils/checkBucketName"),l=E.checkBucketName,s=L;s.copy=function(h,f,c,m){var _,y,i;return d.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof c=="undefined"?"undefined":(0,p.default)(c))==="object"&&(m=c),m=m||{},m.headers=m.headers||{},(0,D.default)(m.headers).forEach(function(S){m.headers["x-oss-copy-source-"+S.toLowerCase()]=m.headers[S]}),m.meta&&(m.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(m.meta,m.headers),f=this._getSourceName(f,c),m.versionId&&(f=f+"?versionId="+m.versionId),m.headers["x-oss-copy-source"]=f,_=this._objectRequestParams("PUT",h,m),_.xmlResponse=!0,_.successStatuses=[200,304],t.next=14,d.default.awrap(this.request(_));case 14:return y=t.sent,i=y.data,i&&(i={etag:i.ETag,lastModified:i.LastModified}),t.abrupt("return",{data:i,res:y.res});case 18:case"end":return t.stop()}},null,this)},s._getSourceName=function(h,f){return typeof f=="string"?h=this._objectName(h):h[0]!=="/"?f=this.options.bucket:(f=h.replace(/\/(.+?)(\/.*)/,"$1"),h=h.replace(/(\/.+?\/)(.*)/,"$2")),l(f),h=encodeURI(h),h="/"+f+"/"+h,h}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.delete=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l.subres=(0,D.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),s=this._objectRequestParams("DELETE",E,l),s.successStatuses=[204],f.next=6,d.default.awrap(this.request(s));case 6:return n=f.sent,f.abrupt("return",{res:n.res});case 8:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(s){return s&&s.__esModule?s:{default:s}}var p=j("utility"),C=j("../utils/obj2xml"),E=C.obj2xml,l=L;l.deleteMulti=function(n){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f,c,m,_,y,i,a,t,S,x,o,k;return d.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(f=[],!(!n||!n.length)){b.next=3;break}throw new Error("names is required");case 3:for(c=0;c1&&arguments[1]!==void 0?arguments[1]:{},s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l.subres=(0,D.default)({tagging:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),E=this._objectName(E),s=this._objectRequestParams("DELETE",E,l),s.successStatuses=[204],f.next=7,d.default.awrap(this.request(s));case 7:return n=f.sent,f.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(l){return l&&l.__esModule?l:{default:l}}var p=j("fs"),C=j("is-type-of"),E=L;E.get=function(s,n){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,c,m,_;return d.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return f=null,c=!1,C.writableStream(n)?f=n:C.string(n)?(f=p.createWriteStream(n),c=!0):h=n,h=h||{},h.subres=(0,D.default)({},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.process&&(h.subres["x-oss-process"]=h.process),m=void 0,i.prev=8,_=this._objectRequestParams("GET",s,h),_.writeStream=f,_.successStatuses=[200,206,304],i.next=14,d.default.awrap(this.request(_));case 14:m=i.sent,c&&f.destroy(),i.next=25;break;case 18:if(i.prev=18,i.t0=i.catch(8),!c){i.next=24;break}return f.destroy(),i.next=24,d.default.awrap(this._deleteFileSafe(n));case 24:throw i.t0;case 25:return i.abrupt("return",{res:m.res,content:m.data});case 26:case"end":return i.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.getACL=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l.subres=(0,D.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),E=this._objectName(E),s=this._objectRequestParams("GET",E,l),s.successStatuses=[200],s.xmlResponse=!0,f.next=8,d.default.awrap(this.request(s));case 8:return n=f.sent,f.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.res});case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=C(P),T=j("babel-runtime/regenerator"),D=C(T),u=j("babel-runtime/core-js/object/assign"),p=C(u);function C(_){return _&&_.__esModule?_:{default:_}}var E=L,l=j("../utils/isObject"),s=l.isObject,n=j("../utils/isArray"),h=n.isArray;E.getBucketVersions=f,E.listObjectVersions=f;function f(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,t,S,x,o;return D.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(_.versionIdMarker&&_.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return y.subres=(0,p.default)({versions:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),i=this._objectRequestParams("GET","",y),i.xmlResponse=!0,i.successStatuses=[200],i.query=m(_),O.next=10,D.default.awrap(this.request(i));case 10:return a=O.sent,t=a.data.Version||[],S=a.data.DeleteMarker||[],x=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(b){return{name:b.Key,url:x._objectUrl(b.Key),lastModified:b.LastModified,isLatest:b.IsLatest==="true",versionId:b.VersionId,etag:b.ETag,type:b.Type,size:Number(b.Size),storageClass:b.StorageClass,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),S&&(h(S)||(S=[S]),S=S.map(function(b){return{name:b.Key,lastModified:b.LastModified,versionId:b.VersionId,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),o=a.data.CommonPrefixes||null,o&&(h(o)||(o=[o]),o=o.map(function(b){return b.Prefix})),O.abrupt("return",{res:a.res,objects:t,deleteMarker:S,prefixes:o,nextMarker:a.data.NextMarker||null,NextVersionIdMarker:a.data.NextVersionIdMarker||null,isTruncated:a.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function c(_){return _.replace(/([A-Z])/g,"-$1").toLowerCase()}function m(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y={};return s(_)&&(0,d.default)(_).forEach(function(i){y[c(i)]=_[i]}),y}},{"../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(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.getObjectMeta=function(E,l){var s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l=l||{},E=this._objectName(E),l.subres=(0,D.default)({objectMeta:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),s=this._objectRequestParams("HEAD",E,l),s.successStatuses=[200],f.next=8,d.default.awrap(this.request(s));case 8:return n=f.sent,f.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(l){return l&&l.__esModule?l:{default:l}}var p=L,C=j("../utils/isObject"),E=C.isObject;p.getObjectTagging=function(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,f,c,m,_;return d.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return n.subres=(0,D.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),s=this._objectName(s),h=this._objectRequestParams("GET",s,n),h.successStatuses=[200],i.next=7,d.default.awrap(this.request(h));case 7:return f=i.sent,i.next=10,d.default.awrap(this.parseXML(f.data));case 10:return c=i.sent,m=c.TagSet.Tag,m=m&&E(m)?[m]:m||[],_={},m.forEach(function(a){_[a.Key]=a.Value}),i.abrupt("return",{status:f.status,res:f.res,tag:_});case 16:case"end":return i.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.getSymlink=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,n,h;return d.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l.subres=(0,D.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),E=this._objectName(E),s=this._objectRequestParams("GET",E,l),s.successStatuses=[200],c.next=7,d.default.awrap(this.request(s));case 7:return n=c.sent,h=n.res.headers["x-oss-symlink-target"],c.abrupt("return",{targetName:decodeURIComponent(h),res:n.res});case 10:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=C(P),T=j("babel-runtime/core-js/object/keys"),D=C(T),u=j("babel-runtime/core-js/object/assign"),p=C(u);function C(l){return l&&l.__esModule?l:{default:l}}var E=L;E.head=function(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,f,c;return d.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:return n.subres=(0,p.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),h=this._objectRequestParams("HEAD",s,n),h.successStatuses=[200,304],_.next=6,d.default.awrap(this.request(h));case 6:return f=_.sent,c={meta:null,res:f.res,status:f.status},f.status===200&&(0,D.default)(f.headers).forEach(function(y){y.indexOf("x-oss-meta-")===0&&(c.meta||(c.meta={}),c.meta[y.substring(11)]=f.headers[y])}),_.abrupt("return",c);case 10:case"end":return _.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.putACL=function(E,l,s){var n,h;return d.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return s=s||{},s.subres=(0,D.default)({acl:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),s.headers=s.headers||{},s.headers["x-oss-object-acl"]=l,E=this._objectName(E),n=this._objectRequestParams("PUT",E,s),n.successStatuses=[200],c.next=10,d.default.awrap(this.request(n));case 10:return h=c.sent,c.abrupt("return",{res:h.res});case 12:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=C(P),T=j("babel-runtime/core-js/object/keys"),D=C(T),u=j("babel-runtime/core-js/object/assign"),p=C(u);function C(f){return f&&f.__esModule?f:{default:f}}var E=j("../utils/obj2xml"),l=E.obj2xml,s=j("../utils/checkObjectTag"),n=s.checkObjectTag,h=L;h.putObjectTagging=function(c,m){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},y,i,a;return d.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return n(m),_.subres=(0,p.default)({tagging:""},_.subres),_.versionId&&(_.subres.versionId=_.versionId),c=this._objectName(c),y=this._objectRequestParams("PUT",c,_),y.successStatuses=[200],m=(0,D.default)(m).map(function(x){return{Key:x,Value:m[x]}}),i={Tagging:{TagSet:{Tag:m}}},y.mime="xml",y.content=l(i),S.next=12,d.default.awrap(this.request(y));case 12:return a=S.sent,S.abrupt("return",{res:a.res,status:a.status});case 14:case"end":return S.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(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.putSymlink=function(E,l,s){var n,h;return d.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return s=s||{},s.headers=s.headers||{},l=this._escape(this._objectName(l)),this._convertMetaToHeaders(s.meta,s.headers),s.headers["x-oss-symlink-target"]=l,s.subres=(0,D.default)({symlink:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),s.storageClass&&(s.headers["x-oss-storage-class"]=s.storageClass),E=this._objectName(E),n=this._objectRequestParams("PUT",E,s),n.successStatuses=[200],c.next=13,d.default.awrap(this.request(n));case 13:return h=c.sent,c.abrupt("return",{res:h.res});case 15:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/promise"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p._parallelNode=function(E,l,s,n){var h,f,c,m,_,y,i,a;return d.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:h=this,f=[],c=[],m=E.length/l,_=E.length%l,y=_===0?m:(E.length-_)/l+1,i=1,a=0;case 8:if(!(a0){y=!0,i<=0&&h(f);return}i+=1,S(o.value,c(t))}a=!1}x()})},p.cancel=function(E){this.options.cancelFlag=!0,E&&this.abortMultipartUpload(E.name,E.uploadId,E.options)},p.isCancel=function(){return this.options.cancelFlag},p.resetCancelFlag=function(){this.options.cancelFlag=!1},p._stop=function(){this.options.cancelFlag=!0},p._makeCancelEvent=function(){var E={status:0,name:"cancel"};return E}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/json/stringify"),T=p(d),D=j("babel-runtime/core-js/object/keys"),u=p(D);function p(l){return l&&l.__esModule?l:{default:l}}var C=j("./../../shims/crypto/crypto.js"),E=j("is-type-of");L.buildCanonicalizedResource=function(s,n){var h=""+s,f="?";if(E.string(n)&&n.trim()!=="")h+=f+n;else if(E.array(n))n.sort(),h+=f+n.join("&");else if(n){var c=function(y,i){return y[0]>i[0]?1:y[0]1&&arguments[1]!==void 0?arguments[1]:{},h=arguments[2],f=arguments[3],c={},m=n.subResource,_=m===void 0?{}:m;if(n.process){var y="x-oss-process";_[y]=n.process}if(n.trafficLimit){var i="x-oss-traffic-limit";_[i]=n.trafficLimit}if(n.response&&(0,u.default)(n.response).forEach(function(x){var o="response-"+x.toLowerCase();_[o]=n.response[x]}),(0,u.default)(n).forEach(function(x){var o=x.toLowerCase(),k=n[x];o.indexOf("x-oss-")===0?c[o]=k:(o.indexOf("content-md5")===0||o.indexOf("content-type")===0)&&(c[x]=k)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(_["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var a={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(a.callbackHost=n.callback.host),n.callback.contentType&&(a.callbackBodyType=n.callback.contentType),_.callback=P.from((0,T.default)(a)).toString("base64"),n.callback.customValue){var t={};(0,u.default)(n.callback.customValue).forEach(function(x){t["x:"+x]=n.callback.customValue[x]}),_["callback-var"]=P.from((0,T.default)(t)).toString("base64")}}var S=this.buildCanonicalString(n.method,h,{headers:c,parameters:_},f.toString());return{Signature:this.computeSignature(s,S),subResource:_}}}).call(this,j("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(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.checkBucketName=void 0,L.checkBucketName=function(P,d){var T=d?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!T.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/entries"),d=T(P);function T(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(L,"__esModule",{value:!0}),L.checkObjectTag=void 0;var D=j("./checkValid"),u=D.checkValid,p=j("./isObject"),C=p.isObject,E=[{validator:function(h){if(typeof h!="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(E,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(E,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function s(n){if(!C(n))throw new Error("tag must be Object");var h=(0,d.default)(n);if(h.length>10)throw new Error("maximum of 10 tags for a object");var f=["key","value"];h.forEach(function(c){c.forEach(function(m,_){u(m,l[f[_]])})})}L.checkObjectTag=s},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.checkValid=void 0;function P(d,T){T.forEach(function(D){if(D.validator)D.validator(d);else if(D.pattern&&!D.pattern.test(d))throw new Error(D.msg)})}L.checkValid=P},{}],38:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/object/assign"),T=D(d);function D(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(L,"__esModule",{value:!0}),L.createRequest=void 0;var u=j("./../../../shims/crypto/crypto.js"),p=j("debug")("ali-oss"),C=j("mime"),E=j("dateformat"),l=j("copy-to"),s=j("path");function n(c,m){return c[m]||c[m.toLowerCase()]}function h(c,m){delete c[m],delete c[m.toLowerCase()]}function f(c){var m=new Date;this.options.amendTimeSkewed&&(m=+new Date+this.options.amendTimeSkewed);var _={"x-oss-date":E(m,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(_["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,T.default)(_,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(_["x-oss-security-token"]=this.options.stsToken),l(c.headers).to(_),n(_,"Content-Type")||(c.mime&&c.mime.indexOf("/")>0?_["Content-Type"]=c.mime:_["Content-Type"]=C.getType(c.mime||s.extname(c.object||""))),n(_,"Content-Type")||h(_,"Content-Type"),c.content&&(_["Content-Md5"]=u.createHash("md5").update(P.from(c.content,"utf8")).digest("base64"),_["Content-Length"]||(_["Content-Length"]=c.content.length));var y=this._getResource(c);_.authorization=this.authorization(c.method,y,c.subres,_);var i=this._getReqUrl(c);p("request %s %s, with headers %j, !!stream: %s",c.method,i,_,!!c.stream);var a=c.timeout||this.options.timeout,t={method:c.method,content:c.content,stream:c.stream,headers:_,timeout:a,writeStream:c.writeStream,customResponse:c.customResponse,ctx:c.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:i,params:t}}L.createRequest=f}).call(this,j("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(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=u(P),T=j("babel-runtime/helpers/typeof"),D=u(T);function u(p){return p&&p.__esModule?p:{default:p}}Object.defineProperty(L,"__esModule",{value:!0}),L.deepCopy=void 0,L.deepCopy=function(p){if(p===null||(typeof p=="undefined"?"undefined":(0,D.default)(p))!=="object")return p;var C=Array.isArray(p)?[]:{};return(0,d.default)(p).forEach(function(E){C[E]=L.deepCopy(p[E])}),C}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=u(P),T=j("babel-runtime/helpers/typeof"),D=u(T);function u(E){return E&&E.__esModule?E:{default:E}}Object.defineProperty(L,"__esModule",{value:!0}),L.formatObjKey=void 0;function p(E,l){if(E===null||(typeof E=="undefined"?"undefined":(0,D.default)(E))!=="object")return E;var s=void 0;if(Array.isArray(E)){s=[];for(var n=0;n `),E&&E.firstUpperCase&&(C=D.formatObjKey(C,"firstUpperCase")),u(C)==="object"?(0,d.default)(C).forEach(function(s){u(C[s])==="string"||u(C[s])==="number"?l+="<"+s+">"+C[s]+"":u(C[s])==="object"?l+="<"+s+">"+p(C[s])+"":u(C[s])==="array"?l+=C[s].map(function(n){return"<"+s+">"+p(n)+""}).join(""):l+="<"+s+">"+C[s].toString()+""}):l+=C.toString(),l}L.obj2xml=p},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,Z,L){Z.exports=P,Z.exports.HttpsAgent=P;function P(){}},{}],49:[function(j,Z,L){Z.exports=j("./register")().Promise},{"./register":51}],50:[function(j,Z,L){"use strict";var P="@@any-promise/REGISTRATION",d=null;Z.exports=function(T,D){return function(p,C){p=p||null,C=C||{};var E=C.global!==!1;if(d===null&&E&&(d=T[P]||null),d!==null&&p!==null&&d.implementation!==p)throw new Error('any-promise already defined as "'+d.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return d===null&&(p!==null&&typeof C.Promise!="undefined"?d={Promise:C.Promise,implementation:p}:d=D(p),E&&(T[P]=d)),d}}},{}],51:[function(j,Z,L){"use strict";Z.exports=j("./loader")(window,P);function P(){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(j,Z,L){Z.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,Z,L){"use strict";L.__esModule=!0;var P=j("../core-js/symbol/iterator"),d=p(P),T=j("../core-js/symbol"),D=p(T),u=typeof D.default=="function"&&typeof d.default=="symbol"?function(C){return typeof C}:function(C){return C&&typeof D.default=="function"&&C.constructor===D.default&&C!==D.default.prototype?"symbol":typeof C};function p(C){return C&&C.__esModule?C:{default:C}}L.default=typeof D.default=="function"&&u(d.default)==="symbol"?function(C){return typeof C=="undefined"?"undefined":u(C)}:function(C){return C&&typeof D.default=="function"&&C.constructor===D.default&&C!==D.default.prototype?"symbol":typeof C=="undefined"?"undefined":u(C)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(j,Z,L){Z.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,Z,L){"use strict";L.byteLength=E,L.toByteArray=s,L.fromByteArray=f;for(var P=[],d=[],T=typeof Uint8Array!="undefined"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,p=D.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var _=c.indexOf("=");_===-1&&(_=m);var y=_===m?0:4-_%4;return[_,y]}function E(c){var m=C(c),_=m[0],y=m[1];return(_+y)*3/4-y}function l(c,m,_){return(m+_)*3/4-_}function s(c){var m,_=C(c),y=_[0],i=_[1],a=new T(l(c,y,i)),t=0,S=i>0?y-4:y,x;for(x=0;x>16&255,a[t++]=m>>8&255,a[t++]=m&255;return i===2&&(m=d[c.charCodeAt(x)]<<2|d[c.charCodeAt(x+1)]>>4,a[t++]=m&255),i===1&&(m=d[c.charCodeAt(x)]<<10|d[c.charCodeAt(x+1)]<<4|d[c.charCodeAt(x+2)]>>2,a[t++]=m>>8&255,a[t++]=m&255),a}function n(c){return P[c>>18&63]+P[c>>12&63]+P[c>>6&63]+P[c&63]}function h(c,m,_){for(var y,i=[],a=m;a<_;a+=3)y=(c[a]<<16&16711680)+(c[a+1]<<8&65280)+(c[a+2]&255),i.push(n(y));return i.join("")}function f(c){for(var m,_=c.length,y=_%3,i=[],a=16383,t=0,S=_-y;tS?S:t+a));return y===1?(m=c[_-1],i.push(P[m>>2]+P[m<<4&63]+"==")):y===2&&(m=(c[_-2]<<8)+c[_-1],i.push(P[m>>10]+P[m>>4&63]+P[m<<2&63]+"=")),i.join("")}},{}],70:[function(j,Z,L){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(P,d,T){typeof Z!="undefined"&&Z.exports?Z.exports=T():typeof define=="function"&&define.amd?define(d,T):P[d]=T()}(this,"bowser",function(){var P=!0;function d(l){function s(K){var U=l.match(K);return U&&U.length>1&&U[1]||""}function n(K){var U=l.match(K);return U&&U.length>1&&U[2]||""}var h=s(/(ipod|iphone|ipad)/i).toLowerCase(),f=/like android/i.test(l),c=!f&&/android/i.test(l),m=/nexus\s*[0-6]\s*/i.test(l),_=!m&&/nexus\s*[0-9]+/i.test(l),y=/CrOS/.test(l),i=/silk/i.test(l),a=/sailfish/i.test(l),t=/tizen/i.test(l),S=/(web|hpw)(o|0)s/i.test(l),x=/windows phone/i.test(l),o=/SamsungBrowser/i.test(l),k=!x&&/windows/i.test(l),O=!h&&!i&&/macintosh/i.test(l),b=!c&&!a&&!t&&!S&&/linux/i.test(l),v=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),g=s(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(l)&&!/tablet pc/i.test(l),M=!w&&/[^-]mobi/i.test(l),N=/xbox/i.test(l),I;/opera/i.test(l)?I={name:"Opera",opera:P,version:g||s(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(l)?I={name:"Opera",opera:P,version:s(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||g}:/SamsungBrowser/i.test(l)?I={name:"Samsung Internet for Android",samsungBrowser:P,version:g||s(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(l)?I={name:"NAVER Whale browser",whale:P,version:s(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(l)?I={name:"MZ Browser",mzbrowser:P,version:s(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(l)?I={name:"Opera Coast",coast:P,version:g||s(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(l)?I={name:"Focus",focus:P,version:s(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(l)?I={name:"Yandex Browser",yandexbrowser:P,version:g||s(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(l)?I={name:"UC Browser",ucbrowser:P,version:s(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(l)?I={name:"Maxthon",maxthon:P,version:s(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(l)?I={name:"Epiphany",epiphany:P,version:s(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(l)?I={name:"Puffin",puffin:P,version:s(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(l)?I={name:"Sleipnir",sleipnir:P,version:s(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(l)?I={name:"K-Meleon",kMeleon:P,version:s(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(I={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},v?(I.msedge=P,I.version=v):(I.msie=P,I.version=s(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(l)?I={name:"Internet Explorer",msie:P,version:s(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:y?I={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:s(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(l)?I={name:"Microsoft Edge",msedge:P,version:v}:/vivaldi/i.test(l)?I={name:"Vivaldi",vivaldi:P,version:s(/vivaldi\/(\d+(\.\d+)?)/i)||g}:a?I={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:s(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(l)?I={name:"SeaMonkey",seamonkey:P,version:s(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(l)?(I={name:"Firefox",firefox:P,version:s(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(l)&&(I.firefoxos=P,I.osname="Firefox OS")):i?I={name:"Amazon Silk",silk:P,version:s(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(l)?I={name:"PhantomJS",phantom:P,version:s(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(l)?I={name:"SlimerJS",slimer:P,version:s(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(l)||/rim\stablet/i.test(l)?I={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:g||s(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:S?(I={name:"WebOS",osname:"WebOS",webos:P,version:g||s(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(l)&&(I.touchpad=P)):/bada/i.test(l)?I={name:"Bada",osname:"Bada",bada:P,version:s(/dolfin\/(\d+(\.\d+)?)/i)}:t?I={name:"Tizen",osname:"Tizen",tizen:P,version:s(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||g}:/qupzilla/i.test(l)?I={name:"QupZilla",qupzilla:P,version:s(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||g}:/chromium/i.test(l)?I={name:"Chromium",chromium:P,version:s(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||g}:/chrome|crios|crmo/i.test(l)?I={name:"Chrome",chrome:P,version:s(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:c?I={name:"Android",version:g}:/safari|applewebkit/i.test(l)?(I={name:"Safari",safari:P},g&&(I.version=g)):h?(I={name:h=="iphone"?"iPhone":h=="ipad"?"iPad":"iPod"},g&&(I.version=g)):/googlebot/i.test(l)?I={name:"Googlebot",googlebot:P,version:s(/googlebot\/(\d+(\.\d+))/i)||g}:I={name:s(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!I.msedge&&/(apple)?webkit/i.test(l)?(/(apple)?webkit\/537\.36/i.test(l)?(I.name=I.name||"Blink",I.blink=P):(I.name=I.name||"Webkit",I.webkit=P),!I.version&&g&&(I.version=g)):!I.opera&&/gecko\//i.test(l)&&(I.name=I.name||"Gecko",I.gecko=P,I.version=I.version||s(/gecko\/(\d+(\.\d+)?)/i)),!I.windowsphone&&(c||I.silk)?(I.android=P,I.osname="Android"):!I.windowsphone&&h?(I[h]=P,I.ios=P,I.osname="iOS"):O?(I.mac=P,I.osname="macOS"):N?(I.xbox=P,I.osname="Xbox"):k?(I.windows=P,I.osname="Windows"):b&&(I.linux=P,I.osname="Linux");function G(K){switch(K){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 z="";I.windows?z=G(s(/Windows ((NT|XP)( \d\d?.\d)?)/i)):I.windowsphone?z=s(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):I.mac?(z=s(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):h?(z=s(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):c?z=s(/android[ \/-](\d+(\.\d+)*)/i):I.webos?z=s(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):I.blackberry?z=s(/rim\stablet\sos\s(\d+(\.\d+)*)/i):I.bada?z=s(/bada\/(\d+(\.\d+)*)/i):I.tizen&&(z=s(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(I.osversion=z);var H=!I.windows&&z.split(".")[0];return w||_||h=="ipad"||c&&(H==3||H>=4&&!M)||I.silk?I.tablet=P:(M||h=="iphone"||h=="ipod"||c||m||I.blackberry||I.webos||I.bada)&&(I.mobile=P),I.msedge||I.msie&&I.version>=10||I.yandexbrowser&&I.version>=15||I.vivaldi&&I.version>=1||I.chrome&&I.version>=20||I.samsungBrowser&&I.version>=4||I.whale&&p([I.version,"1.0"])===1||I.mzbrowser&&p([I.version,"6.0"])===1||I.focus&&p([I.version,"1.0"])===1||I.firefox&&I.version>=20||I.safari&&I.version>=6||I.opera&&I.version>=10||I.ios&&I.osversion&&I.osversion.split(".")[0]>=6||I.blackberry&&I.version>=10.1||I.chromium&&I.version>=20?I.a=P:I.msie&&I.version<10||I.chrome&&I.version<20||I.firefox&&I.version<20||I.safari&&I.version<6||I.opera&&I.version<10||I.ios&&I.osversion&&I.osversion.split(".")[0]<6||I.chromium&&I.version<20?I.c=P:I.x=P,I}var T=d(typeof navigator!="undefined"&&navigator.userAgent||"");T.test=function(l){for(var s=0;s=0;){if(n[0][s]>n[1][s])return 1;if(n[0][s]===n[1][s]){if(s===0)return 0}else return-1}}function C(l,s,n){var h=T;typeof s=="string"&&(n=s,s=void 0),s===void 0&&(s=!1),n&&(h=d(n));var f=""+h.version;for(var c in l)if(l.hasOwnProperty(c)&&h[c]){if(typeof l[c]!="string")throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(l));return p([f,l[c]])<0}return s}function E(l,s,n){return!C(l,s,n)}return T.isUnsupportedBrowser=C,T.compareVersions=p,T.check=E,T._detect=d,T.detect=d,T})},{}],71:[function(j,Z,L){},{}],72:[function(j,Z,L){var P=j("buffer").Buffer,d=P.isEncoding||function(E){switch(E&&E.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 T(E){if(E&&!d(E))throw new Error("Unknown encoding: "+E)}var D=L.StringDecoder=function(E){this.encoding=(E||"utf8").toLowerCase().replace(/[-_]/,""),T(E);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=p;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=C;break;default:this.write=u;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};D.prototype.write=function(E){for(var l="";this.charLength;){var s=E.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:E.length;if(E.copy(this.charBuffer,this.charReceived,0,s),this.charReceived+=s,this.charReceived=55296&&h<=56319){this.charLength+=this.surrogateSize,l="";continue}if(this.charReceived=this.charLength=0,E.length===0)return l;break}this.detectIncompleteChar(E);var n=E.length;this.charLength&&(E.copy(this.charBuffer,0,E.length-this.charReceived,n),n-=this.charReceived),l+=E.toString(this.encoding,0,n);var n=l.length-1,h=l.charCodeAt(n);if(h>=55296&&h<=56319){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),E.copy(this.charBuffer,0,0,f),l.substring(0,n)}return l},D.prototype.detectIncompleteChar=function(E){for(var l=E.length>=3?3:E.length;l>0;l--){var s=E[E.length-l];if(l==1&&s>>5==6){this.charLength=2;break}if(l<=2&&s>>4==14){this.charLength=3;break}if(l<=3&&s>>3==30){this.charLength=4;break}}this.charReceived=l},D.prototype.end=function(E){var l="";if(E&&E.length&&(l=this.write(E)),this.charReceived){var s=this.charReceived,n=this.charBuffer,h=this.encoding;l+=n.slice(0,s).toString(h)}return l};function u(E){return E.toString(this.encoding)}function p(E){this.charReceived=E.length%2,this.charLength=this.charReceived?2:0}function C(E){this.charReceived=E.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(j,Z,L){(function(P,d){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var T=j("base64-js"),D=j("ieee754"),u=j("isarray");L.Buffer=d,L.SlowBuffer=i,L.INSPECT_MAX_BYTES=50,d.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:p(),L.kMaxLength=C();function p(){try{var te=new Uint8Array(1);return te.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},te.foo()===42&&typeof te.subarray=="function"&&te.subarray(1,1).byteLength===0}catch(J){return!1}}function C(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function E(te,J){if(C()=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return te|0}function i(te){return+te!=te&&(te=0),d.alloc(+te)}d.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},d.compare=function(J,X){if(!d.isBuffer(J)||!d.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(J===X)return 0;for(var Q=J.length,Ee=X.length,ge=0,Oe=Math.min(Q,Ee);ge>>1;case"base64":return q(te).length;default:if(Q)return le(te).length;J=(""+J).toLowerCase(),Q=!0}}d.byteLength=a;function t(te,J,X){var Q=!1;if((J===void 0||J<0)&&(J=0),J>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,J>>>=0,X<=J)return"";for(te||(te="utf8");;)switch(te){case"hex":return K(this,J,X);case"utf8":case"utf-8":return N(this,J,X);case"ascii":return z(this,J,X);case"latin1":case"binary":return H(this,J,X);case"base64":return M(this,J,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,J,X);default:if(Q)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),Q=!0}}d.prototype._isBuffer=!0;function S(te,J,X){var Q=te[J];te[J]=te[X],te[X]=Q}d.prototype.swap16=function(){var J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X0&&(J=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(J+=" ... ")),""},d.prototype.compare=function(J,X,Q,Ee,ge){if(!d.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=J?J.length:0),Ee===void 0&&(Ee=0),ge===void 0&&(ge=this.length),X<0||Q>J.length||Ee<0||ge>this.length)throw new RangeError("out of range index");if(Ee>=ge&&X>=Q)return 0;if(Ee>=ge)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,Ee>>>=0,ge>>>=0,this===J)return 0;for(var Oe=ge-Ee,Qe=Q-X,rt=Math.min(Oe,Qe),nt=this.slice(Ee,ge),ut=J.slice(X,Q),dt=0;dt2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=Ee?0:te.length-1),X<0&&(X=te.length+X),X>=te.length){if(Ee)return-1;X=te.length-1}else if(X<0)if(Ee)X=0;else return-1;if(typeof J=="string"&&(J=d.from(J,Q)),d.isBuffer(J))return J.length===0?-1:o(te,J,X,Q,Ee);if(typeof J=="number")return J=J&255,d.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(te,J,X):Uint8Array.prototype.lastIndexOf.call(te,J,X):o(te,[J],X,Q,Ee);throw new TypeError("val must be string, number or Buffer")}function o(te,J,X,Q,Ee){var ge=1,Oe=te.length,Qe=J.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(te.length<2||J.length<2)return-1;ge=2,Oe/=2,Qe/=2,X/=2}function rt(He,De){return ge===1?He[De]:He.readUInt16BE(De*ge)}var nt;if(Ee){var ut=-1;for(nt=X;ntOe&&(X=Oe-Qe),nt=X;nt>=0;nt--){for(var dt=!0,mt=0;mtEe&&(Q=Ee)):Q=Ee;var ge=J.length;if(ge%2!==0)throw new TypeError("Invalid hex string");Q>ge/2&&(Q=ge/2);for(var Oe=0;Oege)&&(Q=ge),J.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ee||(Ee="utf8");for(var Oe=!1;;)switch(Ee){case"hex":return k(this,J,X,Q);case"utf8":case"utf-8":return O(this,J,X,Q);case"ascii":return b(this,J,X,Q);case"latin1":case"binary":return v(this,J,X,Q);case"base64":return g(this,J,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,J,X,Q);default:if(Oe)throw new TypeError("Unknown encoding: "+Ee);Ee=(""+Ee).toLowerCase(),Oe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(te,J,X){return J===0&&X===te.length?T.fromByteArray(te):T.fromByteArray(te.slice(J,X))}function N(te,J,X){X=Math.min(te.length,X);for(var Q=[],Ee=J;Ee239?4:ge>223?3:ge>191?2:1;if(Ee+Qe<=X){var rt,nt,ut,dt;switch(Qe){case 1:ge<128&&(Oe=ge);break;case 2:rt=te[Ee+1],(rt&192)===128&&(dt=(ge&31)<<6|rt&63,dt>127&&(Oe=dt));break;case 3:rt=te[Ee+1],nt=te[Ee+2],(rt&192)===128&&(nt&192)===128&&(dt=(ge&15)<<12|(rt&63)<<6|nt&63,dt>2047&&(dt<55296||dt>57343)&&(Oe=dt));break;case 4:rt=te[Ee+1],nt=te[Ee+2],ut=te[Ee+3],(rt&192)===128&&(nt&192)===128&&(ut&192)===128&&(dt=(ge&15)<<18|(rt&63)<<12|(nt&63)<<6|ut&63,dt>65535&&dt<1114112&&(Oe=dt))}}Oe===null?(Oe=65533,Qe=1):Oe>65535&&(Oe-=65536,Q.push(Oe>>>10&1023|55296),Oe=56320|Oe&1023),Q.push(Oe),Ee+=Qe}return G(Q)}var I=4096;function G(te){var J=te.length;if(J<=I)return String.fromCharCode.apply(String,te);for(var X="",Q=0;QQ)&&(X=Q);for(var Ee="",ge=J;geQ&&(J=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),XX)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUIntLE=function(J,X,Q){J=J|0,X=X|0,Q||B(J,X,this.length);for(var Ee=this[J],ge=1,Oe=0;++Oe0&&(ge*=256);)Ee+=this[J+--X]*ge;return Ee},d.prototype.readUInt8=function(J,X){return X||B(J,1,this.length),this[J]},d.prototype.readUInt16LE=function(J,X){return X||B(J,2,this.length),this[J]|this[J+1]<<8},d.prototype.readUInt16BE=function(J,X){return X||B(J,2,this.length),this[J]<<8|this[J+1]},d.prototype.readUInt32LE=function(J,X){return X||B(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},d.prototype.readUInt32BE=function(J,X){return X||B(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},d.prototype.readIntLE=function(J,X,Q){J=J|0,X=X|0,Q||B(J,X,this.length);for(var Ee=this[J],ge=1,Oe=0;++Oe=ge&&(Ee-=Math.pow(2,8*X)),Ee},d.prototype.readIntBE=function(J,X,Q){J=J|0,X=X|0,Q||B(J,X,this.length);for(var Ee=X,ge=1,Oe=this[J+--Ee];Ee>0&&(ge*=256);)Oe+=this[J+--Ee]*ge;return ge*=128,Oe>=ge&&(Oe-=Math.pow(2,8*X)),Oe},d.prototype.readInt8=function(J,X){return X||B(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},d.prototype.readInt16LE=function(J,X){X||B(J,2,this.length);var Q=this[J]|this[J+1]<<8;return Q&32768?Q|4294901760:Q},d.prototype.readInt16BE=function(J,X){X||B(J,2,this.length);var Q=this[J+1]|this[J]<<8;return Q&32768?Q|4294901760:Q},d.prototype.readInt32LE=function(J,X){return X||B(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},d.prototype.readInt32BE=function(J,X){return X||B(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},d.prototype.readFloatLE=function(J,X){return X||B(J,4,this.length),D.read(this,J,!0,23,4)},d.prototype.readFloatBE=function(J,X){return X||B(J,4,this.length),D.read(this,J,!1,23,4)},d.prototype.readDoubleLE=function(J,X){return X||B(J,8,this.length),D.read(this,J,!0,52,8)},d.prototype.readDoubleBE=function(J,X){return X||B(J,8,this.length),D.read(this,J,!1,52,8)};function V(te,J,X,Q,Ee,ge){if(!d.isBuffer(te))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>Ee||Jte.length)throw new RangeError("Index out of range")}d.prototype.writeUIntLE=function(J,X,Q,Ee){if(J=+J,X=X|0,Q=Q|0,!Ee){var ge=Math.pow(2,8*Q)-1;V(this,J,X,Q,ge,0)}var Oe=1,Qe=0;for(this[X]=J&255;++Qe=0&&(Qe*=256);)this[X+Oe]=J/Qe&255;return X+Q},d.prototype.writeUInt8=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,1,255,0),d.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[X]=J&255,X+1};function ae(te,J,X,Q){J<0&&(J=65535+J+1);for(var Ee=0,ge=Math.min(te.length-X,2);Ee>>(Q?Ee:1-Ee)*8}d.prototype.writeUInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):ae(this,J,X,!0),X+2},d.prototype.writeUInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):ae(this,J,X,!1),X+2};function he(te,J,X,Q){J<0&&(J=4294967295+J+1);for(var Ee=0,ge=Math.min(te.length-X,4);Ee>>(Q?Ee:3-Ee)*8&255}d.prototype.writeUInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[X+3]=J>>>24,this[X+2]=J>>>16,this[X+1]=J>>>8,this[X]=J&255):he(this,J,X,!0),X+4},d.prototype.writeUInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):he(this,J,X,!1),X+4},d.prototype.writeIntLE=function(J,X,Q,Ee){if(J=+J,X=X|0,!Ee){var ge=Math.pow(2,8*Q-1);V(this,J,X,Q,ge-1,-ge)}var Oe=0,Qe=1,rt=0;for(this[X]=J&255;++Oe>0)-rt&255;return X+Q},d.prototype.writeIntBE=function(J,X,Q,Ee){if(J=+J,X=X|0,!Ee){var ge=Math.pow(2,8*Q-1);V(this,J,X,Q,ge-1,-ge)}var Oe=Q-1,Qe=1,rt=0;for(this[X+Oe]=J&255;--Oe>=0&&(Qe*=256);)J<0&&rt===0&&this[X+Oe+1]!==0&&(rt=1),this[X+Oe]=(J/Qe>>0)-rt&255;return X+Q},d.prototype.writeInt8=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,1,127,-128),d.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[X]=J&255,X+1},d.prototype.writeInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):ae(this,J,X,!0),X+2},d.prototype.writeInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):ae(this,J,X,!1),X+2},d.prototype.writeInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8,this[X+2]=J>>>16,this[X+3]=J>>>24):he(this,J,X,!0),X+4},d.prototype.writeInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),d.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):he(this,J,X,!1),X+4};function pe(te,J,X,Q,Ee,ge){if(X+Q>te.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function Re(te,J,X,Q,Ee){return Ee||pe(te,J,X,4,34028234663852886e22,-34028234663852886e22),D.write(te,J,X,Q,23,4),X+4}d.prototype.writeFloatLE=function(J,X,Q){return Re(this,J,X,!0,Q)},d.prototype.writeFloatBE=function(J,X,Q){return Re(this,J,X,!1,Q)};function ke(te,J,X,Q,Ee){return Ee||pe(te,J,X,8,17976931348623157e292,-17976931348623157e292),D.write(te,J,X,Q,52,8),X+8}d.prototype.writeDoubleLE=function(J,X,Q){return ke(this,J,X,!0,Q)},d.prototype.writeDoubleBE=function(J,X,Q){return ke(this,J,X,!1,Q)},d.prototype.copy=function(J,X,Q,Ee){if(Q||(Q=0),!Ee&&Ee!==0&&(Ee=this.length),X>=J.length&&(X=J.length),X||(X=0),Ee>0&&Ee=this.length)throw new RangeError("sourceStart out of bounds");if(Ee<0)throw new RangeError("sourceEnd out of bounds");Ee>this.length&&(Ee=this.length),J.length-X=0;--Oe)J[Oe+X]=this[Oe+Q];else if(ge<1e3||!d.TYPED_ARRAY_SUPPORT)for(Oe=0;Oe>>0,Q=Q===void 0?this.length:Q>>>0,J||(J=0);var Oe;if(typeof J=="number")for(Oe=X;Oe55295&&X<57344){if(!Ee){if(X>56319){(J-=3)>-1&&ge.push(239,191,189);continue}else if(Oe+1===Q){(J-=3)>-1&&ge.push(239,191,189);continue}Ee=X;continue}if(X<56320){(J-=3)>-1&&ge.push(239,191,189),Ee=X;continue}X=(Ee-55296<<10|X-56320)+65536}else Ee&&((J-=3)>-1&&ge.push(239,191,189));if(Ee=null,X<128){if((J-=1)<0)break;ge.push(X)}else if(X<2048){if((J-=2)<0)break;ge.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;ge.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;ge.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ge}function re(te){for(var J=[],X=0;X>8,Ee=X%256,ge.push(Ee),ge.push(Q);return ge}function q(te){return T.toByteArray(Te(te))}function ee(te,J,X,Q){for(var Ee=0;Ee=J.length||Ee>=te.length);++Ee)J[Ee+X]=te[Ee];return Ee}function Ce(te){return te!==te}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(j,Z,L){Z.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(j,Z,L){Z.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(j,Z,L){/*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var P=Array.prototype.slice;Z.exports=d;function d(D,u){if(!(this instanceof d))return new d(D,u);this.src=D,this._withAccess=u}d.prototype.withAccess=function(D){return this._withAccess=D!==!1,this},d.prototype.pick=function(D){return Array.isArray(D)||(D=P.call(arguments)),D.length&&(this.keys=D),this},d.prototype.to=function(D){if(D=D||{},!this.src)return D;var u=this.keys||Object.keys(this.src);if(!this._withAccess){for(var p=0;ps;)if(n=E[s++],n!=n)return!0}else for(;l>s;s++)if((D||s in E)&&E[s]===p)return D||s||0;return!D&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,Z,L){var P=j("./_cof"),d=j("./_wks")("toStringTag"),T=P(function(){return arguments}())=="Arguments",D=function(u,p){try{return u[p]}catch(C){}};Z.exports=function(u){var p,C,E;return u===void 0?"Undefined":u===null?"Null":typeof(C=D(p=Object(u),d))=="string"?C:T?P(p):(E=P(p))=="Object"&&typeof p.callee=="function"?"Arguments":E}},{"./_cof":98,"./_wks":166}],98:[function(j,Z,L){var P={}.toString;Z.exports=function(d){return P.call(d).slice(8,-1)}},{}],99:[function(j,Z,L){var P=Z.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(j,Z,L){"use strict";var P=j("./_object-dp"),d=j("./_property-desc");Z.exports=function(T,D,u){D in T?P.f(T,D,d(0,u)):T[D]=u}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,Z,L){var P=j("./_a-function");Z.exports=function(d,T,D){if(P(d),T===void 0)return d;switch(D){case 1:return function(u){return d.call(T,u)};case 2:return function(u,p){return d.call(T,u,p)};case 3:return function(u,p,C){return d.call(T,u,p,C)}}return function(){return d.apply(T,arguments)}}},{"./_a-function":92}],102:[function(j,Z,L){Z.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(j,Z,L){Z.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,Z,L){var P=j("./_is-object"),d=j("./_global").document,T=P(d)&&P(d.createElement);Z.exports=function(D){return T?d.createElement(D):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,Z,L){Z.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,Z,L){var P=j("./_object-keys"),d=j("./_object-gops"),T=j("./_object-pie");Z.exports=function(D){var u=P(D),p=d.f;if(p)for(var C=p(D),E=T.f,l=0,s;C.length>l;)E.call(D,s=C[l++])&&u.push(s);return u}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,Z,L){var P=j("./_global"),d=j("./_core"),T=j("./_ctx"),D=j("./_hide"),u=j("./_has"),p="prototype",C=function(E,l,s){var n=E&C.F,h=E&C.G,f=E&C.S,c=E&C.P,m=E&C.B,_=E&C.W,y=h?d:d[l]||(d[l]={}),i=y[p],a=h?P:f?P[l]:(P[l]||{})[p],t,S,x;h&&(s=l);for(t in s){if(S=!n&&a&&a[t]!==void 0,S&&u(y,t))continue;x=S?a[t]:s[t],y[t]=h&&typeof a[t]!="function"?s[t]:m&&S?T(x,P):_&&a[t]==x?function(o){var k=function(O,b,v){if(this instanceof o){switch(arguments.length){case 0:return new o;case 1:return new o(O);case 2:return new o(O,b)}return new o(O,b,v)}return o.apply(this,arguments)};return k[p]=o[p],k}(x):c&&typeof x=="function"?T(Function.call,x):x,c&&((y.virtual||(y.virtual={}))[t]=x,E&C.R&&i&&!i[t]&&D(i,t,x))}};C.F=1,C.G=2,C.S=4,C.P=8,C.B=16,C.W=32,C.U=64,C.R=128,Z.exports=C},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,Z,L){Z.exports=function(P){try{return!!P()}catch(d){return!0}}},{}],109:[function(j,Z,L){var P=j("./_ctx"),d=j("./_iter-call"),T=j("./_is-array-iter"),D=j("./_an-object"),u=j("./_to-length"),p=j("./core.get-iterator-method"),C={},E={},L=Z.exports=function(l,s,n,h,f){var c=f?function(){return l}:p(l),m=P(n,h,s?2:1),_=0,y,i,a,t;if(typeof c!="function")throw TypeError(l+" is not iterable!");if(T(c)){for(y=u(l.length);y>_;_++)if(t=s?m(D(i=l[_])[0],i[1]):m(l[_]),t===C||t===E)return t}else for(a=c.call(l);!(i=a.next()).done;)if(t=d(a,m,i.value,s),t===C||t===E)return t};L.BREAK=C,L.RETURN=E},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,Z,L){var P=Z.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=P)},{}],111:[function(j,Z,L){var P={}.hasOwnProperty;Z.exports=function(d,T){return P.call(d,T)}},{}],112:[function(j,Z,L){var P=j("./_object-dp"),d=j("./_property-desc");Z.exports=j("./_descriptors")?function(T,D,u){return P.f(T,D,d(1,u))}:function(T,D,u){return T[D]=u,T}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,Z,L){var P=j("./_global").document;Z.exports=P&&P.documentElement},{"./_global":110}],114:[function(j,Z,L){Z.exports=!j("./_descriptors")&&!j("./_fails")(function(){return Object.defineProperty(j("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(j,Z,L){Z.exports=function(P,d,T){var D=T===void 0;switch(d.length){case 0:return D?P():P.call(T);case 1:return D?P(d[0]):P.call(T,d[0]);case 2:return D?P(d[0],d[1]):P.call(T,d[0],d[1]);case 3:return D?P(d[0],d[1],d[2]):P.call(T,d[0],d[1],d[2]);case 4:return D?P(d[0],d[1],d[2],d[3]):P.call(T,d[0],d[1],d[2],d[3])}return P.apply(T,d)}},{}],116:[function(j,Z,L){var P=j("./_cof");Z.exports=Object("z").propertyIsEnumerable(0)?Object:function(d){return P(d)=="String"?d.split(""):Object(d)}},{"./_cof":98}],117:[function(j,Z,L){var P=j("./_iterators"),d=j("./_wks")("iterator"),T=Array.prototype;Z.exports=function(D){return D!==void 0&&(P.Array===D||T[d]===D)}},{"./_iterators":125,"./_wks":166}],118:[function(j,Z,L){var P=j("./_cof");Z.exports=Array.isArray||function(T){return P(T)=="Array"}},{"./_cof":98}],119:[function(j,Z,L){Z.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(j,Z,L){var P=j("./_an-object");Z.exports=function(d,T,D,u){try{return u?T(P(D)[0],D[1]):T(D)}catch(C){var p=d.return;throw p!==void 0&&P(p.call(d)),C}}},{"./_an-object":95}],121:[function(j,Z,L){"use strict";var P=j("./_object-create"),d=j("./_property-desc"),T=j("./_set-to-string-tag"),D={};j("./_hide")(D,j("./_wks")("iterator"),function(){return this}),Z.exports=function(u,p,C){u.prototype=P(D,{next:d(1,C)}),T(u,p+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,Z,L){"use strict";var P=j("./_library"),d=j("./_export"),T=j("./_redefine"),D=j("./_hide"),u=j("./_iterators"),p=j("./_iter-create"),C=j("./_set-to-string-tag"),E=j("./_object-gpo"),l=j("./_wks")("iterator"),s=!([].keys&&"next"in[].keys()),n="@@iterator",h="keys",f="values",c=function(){return this};Z.exports=function(m,_,y,i,a,t,S){p(y,_,i);var x=function(z){if(!s&&z in b)return b[z];switch(z){case h:return function(){return new y(this,z)};case f:return function(){return new y(this,z)}}return function(){return new y(this,z)}},o=_+" Iterator",k=a==f,O=!1,b=m.prototype,v=b[l]||b[n]||a&&b[a],g=v||x(a),w=a?k?x("entries"):g:void 0,M=_=="Array"&&b.entries||v,N,I,G;if(M&&(G=E(M.call(new m)),G!==Object.prototype&&G.next&&(C(G,o,!0),!P&&typeof G[l]!="function"&&D(G,l,c))),k&&v&&v.name!==f&&(O=!0,g=function(){return v.call(this)}),(!P||S)&&(s||O||!b[l])&&D(b,l,g),u[_]=g,u[o]=c,a)if(N={values:k?g:x(f),keys:t?g:x(h),entries:w},S)for(I in N)I in b||T(b,I,N[I]);else d(d.P+d.F*(s||O),_,N);return N}},{"./_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(j,Z,L){var P=j("./_wks")("iterator"),d=!1;try{var T=[7][P]();T.return=function(){d=!0},Array.from(T,function(){throw 2})}catch(D){}Z.exports=function(D,u){if(!u&&!d)return!1;var p=!1;try{var C=[7],E=C[P]();E.next=function(){return{done:p=!0}},C[P]=function(){return E},D(C)}catch(l){}return p}},{"./_wks":166}],124:[function(j,Z,L){Z.exports=function(P,d){return{value:d,done:!!P}}},{}],125:[function(j,Z,L){Z.exports={}},{}],126:[function(j,Z,L){Z.exports=!0},{}],127:[function(j,Z,L){var P=j("./_uid")("meta"),d=j("./_is-object"),T=j("./_has"),D=j("./_object-dp").f,u=0,p=Object.isExtensible||function(){return!0},C=!j("./_fails")(function(){return p(Object.preventExtensions({}))}),E=function(f){D(f,P,{value:{i:"O"+ ++u,w:{}}})},l=function(f,c){if(!d(f))return typeof f=="symbol"?f:(typeof f=="string"?"S":"P")+f;if(!T(f,P)){if(!p(f))return"F";if(!c)return"E";E(f)}return f[P].i},s=function(f,c){if(!T(f,P)){if(!p(f))return!0;if(!c)return!1;E(f)}return f[P].w},n=function(f){return C&&h.NEED&&p(f)&&!T(f,P)&&E(f),f},h=Z.exports={KEY:P,NEED:!1,fastKey:l,getWeak:s,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,Z,L){var P=j("./_global"),d=j("./_task").set,T=P.MutationObserver||P.WebKitMutationObserver,D=P.process,u=P.Promise,p=j("./_cof")(D)=="process";Z.exports=function(){var C,E,l,s=function(){var c,m;for(p&&(c=D.domain)&&c.exit();C;){m=C.fn,C=C.next;try{m()}catch(_){throw C?l():E=void 0,_}}E=void 0,c&&c.enter()};if(p)l=function(){D.nextTick(s)};else if(T&&!(P.navigator&&P.navigator.standalone)){var n=!0,h=document.createTextNode("");new T(s).observe(h,{characterData:!0}),l=function(){h.data=n=!n}}else if(u&&u.resolve){var f=u.resolve(void 0);l=function(){f.then(s)}}else l=function(){d.call(P,s)};return function(c){var m={fn:c,next:void 0};E&&(E.next=m),C||(C=m,l()),E=m}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,Z,L){"use strict";var P=j("./_a-function");function d(T){var D,u;this.promise=new T(function(p,C){if(D!==void 0||u!==void 0)throw TypeError("Bad Promise constructor");D=p,u=C}),this.resolve=P(D),this.reject=P(u)}Z.exports.f=function(T){return new d(T)}},{"./_a-function":92}],130:[function(j,Z,L){"use strict";var P=j("./_descriptors"),d=j("./_object-keys"),T=j("./_object-gops"),D=j("./_object-pie"),u=j("./_to-object"),p=j("./_iobject"),C=Object.assign;Z.exports=!C||j("./_fails")(function(){var E={},l={},s=Symbol(),n="abcdefghijklmnopqrst";return E[s]=7,n.split("").forEach(function(h){l[h]=h}),C({},E)[s]!=7||Object.keys(C({},l)).join("")!=n})?function(l,s){for(var n=u(l),h=arguments.length,f=1,c=T.f,m=D.f;h>f;)for(var _=p(arguments[f++]),y=c?d(_).concat(c(_)):d(_),i=y.length,a=0,t;i>a;)t=y[a++],(!P||m.call(_,t))&&(n[t]=_[t]);return n}:C},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(j,Z,L){var P=j("./_an-object"),d=j("./_object-dps"),T=j("./_enum-bug-keys"),D=j("./_shared-key")("IE_PROTO"),u=function(){},p="prototype",C=function(){var E=j("./_dom-create")("iframe"),l=T.length,s="<",n=">",h;for(E.style.display="none",j("./_html").appendChild(E),E.src="javascript:",h=E.contentWindow.document,h.open(),h.write(s+"script"+n+"document.F=Object"+s+"/script"+n),h.close(),C=h.F;l--;)delete C[p][T[l]];return C()};Z.exports=Object.create||function(l,s){var n;return l!==null?(u[p]=P(l),n=new u,u[p]=null,n[D]=l):n=C(),s===void 0?n:d(n,s)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,Z,L){var P=j("./_an-object"),d=j("./_ie8-dom-define"),T=j("./_to-primitive"),D=Object.defineProperty;L.f=j("./_descriptors")?Object.defineProperty:function(p,C,E){if(P(p),C=T(C,!0),P(E),d)try{return D(p,C,E)}catch(l){}if("get"in E||"set"in E)throw TypeError("Accessors not supported!");return"value"in E&&(p[C]=E.value),p}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,Z,L){var P=j("./_object-dp"),d=j("./_an-object"),T=j("./_object-keys");Z.exports=j("./_descriptors")?Object.defineProperties:function(u,p){d(u);for(var C=T(p),E=C.length,l=0,s;E>l;)P.f(u,s=C[l++],p[s]);return u}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,Z,L){var P=j("./_object-pie"),d=j("./_property-desc"),T=j("./_to-iobject"),D=j("./_to-primitive"),u=j("./_has"),p=j("./_ie8-dom-define"),C=Object.getOwnPropertyDescriptor;L.f=j("./_descriptors")?C:function(l,s){if(l=T(l),s=D(s,!0),p)try{return C(l,s)}catch(n){}if(u(l,s))return d(!P.f.call(l,s),l[s])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,Z,L){var P=j("./_to-iobject"),d=j("./_object-gopn").f,T={}.toString,D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(p){try{return d(p)}catch(C){return D.slice()}};Z.exports.f=function(C){return D&&T.call(C)=="[object Window]"?u(C):d(P(C))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,Z,L){var P=j("./_object-keys-internal"),d=j("./_enum-bug-keys").concat("length","prototype");L.f=Object.getOwnPropertyNames||function(D){return P(D,d)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,Z,L){L.f=Object.getOwnPropertySymbols},{}],138:[function(j,Z,L){var P=j("./_has"),d=j("./_to-object"),T=j("./_shared-key")("IE_PROTO"),D=Object.prototype;Z.exports=Object.getPrototypeOf||function(u){return u=d(u),P(u,T)?u[T]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?D:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(j,Z,L){var P=j("./_has"),d=j("./_to-iobject"),T=j("./_array-includes")(!1),D=j("./_shared-key")("IE_PROTO");Z.exports=function(u,p){var C=d(u),E=0,l=[],s;for(s in C)s!=D&&(P(C,s)&&l.push(s));for(;p.length>E;)P(C,s=p[E++])&&(~T(l,s)||l.push(s));return l}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,Z,L){var P=j("./_object-keys-internal"),d=j("./_enum-bug-keys");Z.exports=Object.keys||function(D){return P(D,d)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,Z,L){L.f={}.propertyIsEnumerable},{}],142:[function(j,Z,L){var P=j("./_export"),d=j("./_core"),T=j("./_fails");Z.exports=function(D,u){var p=(d.Object||{})[D]||Object[D],C={};C[D]=u(p),P(P.S+P.F*T(function(){p(1)}),"Object",C)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,Z,L){var P=j("./_descriptors"),d=j("./_object-keys"),T=j("./_to-iobject"),D=j("./_object-pie").f;Z.exports=function(u){return function(p){for(var C=T(p),E=d(C),l=E.length,s=0,n=[],h;l>s;)h=E[s++],(!P||D.call(C,h))&&n.push(u?[h,C[h]]:C[h]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,Z,L){Z.exports=function(P){try{return{e:!1,v:P()}}catch(d){return{e:!0,v:d}}}},{}],145:[function(j,Z,L){var P=j("./_an-object"),d=j("./_is-object"),T=j("./_new-promise-capability");Z.exports=function(D,u){if(P(D),d(u)&&u.constructor===D)return u;var p=T.f(D),C=p.resolve;return C(u),p.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,Z,L){Z.exports=function(P,d){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:d}}},{}],147:[function(j,Z,L){var P=j("./_hide");Z.exports=function(d,T,D){for(var u in T)D&&d[u]?d[u]=T[u]:P(d,u,T[u]);return d}},{"./_hide":112}],148:[function(j,Z,L){Z.exports=j("./_hide")},{"./_hide":112}],149:[function(j,Z,L){"use strict";var P=j("./_global"),d=j("./_core"),T=j("./_object-dp"),D=j("./_descriptors"),u=j("./_wks")("species");Z.exports=function(p){var C=typeof d[p]=="function"?d[p]:P[p];D&&C&&!C[u]&&T.f(C,u,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(j,Z,L){var P=j("./_object-dp").f,d=j("./_has"),T=j("./_wks")("toStringTag");Z.exports=function(D,u,p){D&&!d(D=p?D:D.prototype,T)&&P(D,T,{configurable:!0,value:u})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,Z,L){var P=j("./_shared")("keys"),d=j("./_uid");Z.exports=function(T){return P[T]||(P[T]=d(T))}},{"./_shared":152,"./_uid":162}],152:[function(j,Z,L){var P=j("./_core"),d=j("./_global"),T="__core-js_shared__",D=d[T]||(d[T]={});(Z.exports=function(u,p){return D[u]||(D[u]=p!==void 0?p:{})})("versions",[]).push({version:P.version,mode:j("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(j,Z,L){var P=j("./_an-object"),d=j("./_a-function"),T=j("./_wks")("species");Z.exports=function(D,u){var p=P(D).constructor,C;return p===void 0||(C=P(p)[T])==null?u:d(C)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,Z,L){var P=j("./_to-integer"),d=j("./_defined");Z.exports=function(T){return function(D,u){var p=String(d(D)),C=P(u),E=p.length,l,s;return C<0||C>=E?T?"":void 0:(l=p.charCodeAt(C),l<55296||l>56319||C+1===E||(s=p.charCodeAt(C+1))<56320||s>57343?T?p.charAt(C):l:T?p.slice(C,C+2):(l-55296<<10)+(s-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,Z,L){var P=j("./_ctx"),d=j("./_invoke"),T=j("./_html"),D=j("./_dom-create"),u=j("./_global"),p=u.process,C=u.setImmediate,E=u.clearImmediate,l=u.MessageChannel,s=u.Dispatch,n=0,h={},f="onreadystatechange",c,m,_,y=function(){var a=+this;if(h.hasOwnProperty(a)){var t=h[a];delete h[a],t()}},i=function(a){y.call(a.data)};(!C||!E)&&(C=function(t){for(var S=[],x=1;arguments.length>x;)S.push(arguments[x++]);return h[++n]=function(){d(typeof t=="function"?t:Function(t),S)},c(n),n},E=function(t){delete h[t]},j("./_cof")(p)=="process"?c=function(a){p.nextTick(P(y,a,1))}:s&&s.now?c=function(a){s.now(P(y,a,1))}:l?(m=new l,_=m.port2,m.port1.onmessage=i,c=P(_.postMessage,_,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts?(c=function(a){u.postMessage(a+"","*")},u.addEventListener("message",i,!1)):f in D("script")?c=function(a){T.appendChild(D("script"))[f]=function(){T.removeChild(this),y.call(a)}}:c=function(a){setTimeout(P(y,a,1),0)}),Z.exports={set:C,clear:E}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,Z,L){var P=j("./_to-integer"),d=Math.max,T=Math.min;Z.exports=function(D,u){return D=P(D),D<0?d(D+u,0):T(D,u)}},{"./_to-integer":157}],157:[function(j,Z,L){var P=Math.ceil,d=Math.floor;Z.exports=function(T){return isNaN(T=+T)?0:(T>0?d:P)(T)}},{}],158:[function(j,Z,L){var P=j("./_iobject"),d=j("./_defined");Z.exports=function(T){return P(d(T))}},{"./_defined":102,"./_iobject":116}],159:[function(j,Z,L){var P=j("./_to-integer"),d=Math.min;Z.exports=function(T){return T>0?d(P(T),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,Z,L){var P=j("./_defined");Z.exports=function(d){return Object(P(d))}},{"./_defined":102}],161:[function(j,Z,L){var P=j("./_is-object");Z.exports=function(d,T){if(!P(d))return d;var D,u;if(T&&typeof(D=d.toString)=="function"&&!P(u=D.call(d)))return u;if(typeof(D=d.valueOf)=="function"&&!P(u=D.call(d)))return u;if(!T&&typeof(D=d.toString)=="function"&&!P(u=D.call(d)))return u;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,Z,L){var P=0,d=Math.random();Z.exports=function(T){return"Symbol(".concat(T===void 0?"":T,")_",(++P+d).toString(36))}},{}],163:[function(j,Z,L){var P=j("./_global"),d=P.navigator;Z.exports=d&&d.userAgent||""},{"./_global":110}],164:[function(j,Z,L){var P=j("./_global"),d=j("./_core"),T=j("./_library"),D=j("./_wks-ext"),u=j("./_object-dp").f;Z.exports=function(p){var C=d.Symbol||(d.Symbol=T?{}:P.Symbol||{});p.charAt(0)!="_"&&!(p in C)&&u(C,p,{value:D.f(p)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,Z,L){L.f=j("./_wks")},{"./_wks":166}],166:[function(j,Z,L){var P=j("./_shared")("wks"),d=j("./_uid"),T=j("./_global").Symbol,D=typeof T=="function",u=Z.exports=function(p){return P[p]||(P[p]=D&&T[p]||(D?T:d)("Symbol."+p))};u.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,Z,L){var P=j("./_classof"),d=j("./_wks")("iterator"),T=j("./_iterators");Z.exports=j("./_core").getIteratorMethod=function(D){if(D!=null)return D[d]||D["@@iterator"]||T[P(D)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,Z,L){"use strict";var P=j("./_ctx"),d=j("./_export"),T=j("./_to-object"),D=j("./_iter-call"),u=j("./_is-array-iter"),p=j("./_to-length"),C=j("./_create-property"),E=j("./core.get-iterator-method");d(d.S+d.F*!j("./_iter-detect")(function(l){Array.from(l)}),"Array",{from:function(s){var n=T(s),h=typeof this=="function"?this:Array,f=arguments.length,c=f>1?arguments[1]:void 0,m=c!==void 0,_=0,y=E(n),i,a,t,S;if(m&&(c=P(c,f>2?arguments[2]:void 0,2)),y!=null&&!(h==Array&&u(y)))for(S=y.call(n),a=new h;!(t=S.next()).done;_++)C(a,_,m?D(S,c,[t.value,_],!0):t.value);else for(i=p(n.length),a=new h(i);i>_;_++)C(a,_,m?c(n[_],_):n[_]);return a.length=_,a}})},{"./_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(j,Z,L){"use strict";var P=j("./_add-to-unscopables"),d=j("./_iter-step"),T=j("./_iterators"),D=j("./_to-iobject");Z.exports=j("./_iter-define")(Array,"Array",function(u,p){this._t=D(u),this._i=0,this._k=p},function(){var u=this._t,p=this._k,C=this._i++;return!u||C>=u.length?(this._t=void 0,d(1)):p=="keys"?d(0,C):p=="values"?d(0,u[C]):d(0,[C,u[C]])},"values"),T.Arguments=T.Array,P("keys"),P("values"),P("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(j,Z,L){"use strict";var P=j("./_is-object"),d=j("./_object-gpo"),T=j("./_wks")("hasInstance"),D=Function.prototype;T in D||j("./_object-dp").f(D,T,{value:function(u){if(typeof this!="function"||!P(u))return!1;if(!P(this.prototype))return u instanceof this;for(;u=d(u);)if(this.prototype===u)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,Z,L){var P=j("./_export");P(P.S+P.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,Z,L){var P=j("./_export");P(P.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,Z,L){var P=j("./_export");P(P.S+P.F*!j("./_descriptors"),"Object",{defineProperty:j("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(j,Z,L){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,Z,L){var P=j("./_to-object"),d=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(D){return d(P(D))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,Z,L){var P=j("./_to-object"),d=j("./_object-keys");j("./_object-sap")("keys",function(){return function(D){return d(P(D))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,Z,L){arguments[4][71][0].apply(L,arguments)},{dup:71}],178:[function(j,Z,L){"use strict";var P=j("./_library"),d=j("./_global"),T=j("./_ctx"),D=j("./_classof"),u=j("./_export"),p=j("./_is-object"),C=j("./_a-function"),E=j("./_an-instance"),l=j("./_for-of"),s=j("./_species-constructor"),n=j("./_task").set,h=j("./_microtask")(),f=j("./_new-promise-capability"),c=j("./_perform"),m=j("./_user-agent"),_=j("./_promise-resolve"),y="Promise",i=d.TypeError,a=d.process,t=a&&a.versions,S=t&&t.v8||"",x=d[y],o=D(a)=="process",k=function(){},O,b,v,g,w=b=f.f,M=!!function(){try{var B=x.resolve(1),V=(B.constructor={})[j("./_wks")("species")]=function(ae){ae(k,k)};return(o||typeof PromiseRejectionEvent=="function")&&B.then(k)instanceof V&&S.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(ae){}}(),N=function(B){var V;return p(B)&&typeof(V=B.then)=="function"?V:!1},I=function(B,V){if(B._n)return;B._n=!0;var ae=B._c;h(function(){for(var he=B._v,pe=B._s==1,Re=0,ke=function(ve){var Te=pe?ve.ok:ve.fail,be=ve.resolve,ue=ve.reject,le=ve.domain,re,fe,q;try{Te?(pe||(B._h==2&&H(B),B._h=1),Te===!0?re=he:(le&&le.enter(),re=Te(he),le&&(le.exit(),q=!0)),re===ve.promise?ue(i("Promise-chain cycle")):(fe=N(re))?fe.call(re,be,ue):be(re)):ue(he)}catch(ee){le&&!q&&le.exit(),ue(ee)}};ae.length>Re;)ke(ae[Re++]);B._c=[],B._n=!1,V&&!B._h&&G(B)})},G=function(B){n.call(d,function(){var V=B._v,ae=z(B),he,pe,Re;if(ae&&(he=c(function(){o?a.emit("unhandledRejection",V,B):(pe=d.onunhandledrejection)?pe({promise:B,reason:V}):(Re=d.console)&&Re.error&&Re.error("Unhandled promise rejection",V)}),B._h=o||z(B)?2:1),B._a=void 0,ae&&he.e)throw he.v})},z=function(B){return B._h!==1&&(B._a||B._c).length===0},H=function(B){n.call(d,function(){var V;o?a.emit("rejectionHandled",B):(V=d.onrejectionhandled)&&V({promise:B,reason:B._v})})},K=function(B){var V=this;if(V._d)return;V._d=!0,V=V._w||V,V._v=B,V._s=2,V._a||(V._a=V._c.slice()),I(V,!0)},U=function(B){var V=this,ae;if(V._d)return;V._d=!0,V=V._w||V;try{if(V===B)throw i("Promise can't be resolved itself");(ae=N(B))?h(function(){var he={_w:V,_d:!1};try{ae.call(B,T(U,he,1),T(K,he,1))}catch(pe){K.call(he,pe)}}):(V._v=B,V._s=1,I(V,!1))}catch(he){K.call({_w:V,_d:!1},he)}};M||(x=function(V){E(this,x,y,"_h"),C(V),O.call(this);try{V(T(U,this,1),T(K,this,1))}catch(ae){K.call(this,ae)}},O=function(V){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=j("./_redefine-all")(x.prototype,{then:function(V,ae){var he=w(s(this,x));return he.ok=typeof V=="function"?V:!0,he.fail=typeof ae=="function"&&ae,he.domain=o?a.domain:void 0,this._c.push(he),this._a&&this._a.push(he),this._s&&I(this,!1),he.promise},catch:function(B){return this.then(void 0,B)}}),v=function(){var B=new O;this.promise=B,this.resolve=T(U,B,1),this.reject=T(K,B,1)},f.f=w=function(B){return B===x||B===g?new v(B):b(B)}),u(u.G+u.W+u.F*!M,{Promise:x}),j("./_set-to-string-tag")(x,y),j("./_set-species")(y),g=j("./_core")[y],u(u.S+u.F*!M,y,{reject:function(V){var ae=w(this),he=ae.reject;return he(V),ae.promise}}),u(u.S+u.F*(P||!M),y,{resolve:function(V){return _(P&&this===g?x:this,V)}}),u(u.S+u.F*!(M&&j("./_iter-detect")(function(B){x.all(B).catch(k)})),y,{all:function(V){var ae=this,he=w(ae),pe=he.resolve,Re=he.reject,ke=c(function(){var ve=[],Te=0,be=1;l(V,!1,function(ue){var le=Te++,re=!1;ve.push(void 0),be++,ae.resolve(ue).then(function(fe){if(re)return;re=!0,ve[le]=fe,--be||pe(ve)},Re)}),--be||pe(ve)});return ke.e&&Re(ke.v),he.promise},race:function(V){var ae=this,he=w(ae),pe=he.reject,Re=c(function(){l(V,!1,function(ke){ae.resolve(ke).then(he.resolve,pe)})});return Re.e&&pe(Re.v),he.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(j,Z,L){var P=j("./_export"),d=j("./_to-absolute-index"),T=String.fromCharCode,D=String.fromCodePoint;P(P.S+P.F*(!!D&&D.length!=1),"String",{fromCodePoint:function(p){for(var C=[],E=arguments.length,l=0,s;E>l;){if(s=+arguments[l++],d(s,1114111)!==s)throw RangeError(s+" is not a valid code point");C.push(s<65536?T(s):T(((s-=65536)>>10)+55296,s%1024+56320))}return C.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(j,Z,L){"use strict";var P=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(d){this._t=String(d),this._i=0},function(){var d=this._t,T=this._i,D;return T>=d.length?{value:void 0,done:!0}:(D=P(d,T),this._i+=D.length,{value:D,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,Z,L){"use strict";var P=j("./_global"),d=j("./_has"),T=j("./_descriptors"),D=j("./_export"),u=j("./_redefine"),p=j("./_meta").KEY,C=j("./_fails"),E=j("./_shared"),l=j("./_set-to-string-tag"),s=j("./_uid"),n=j("./_wks"),h=j("./_wks-ext"),f=j("./_wks-define"),c=j("./_enum-keys"),m=j("./_is-array"),_=j("./_an-object"),y=j("./_is-object"),i=j("./_to-object"),a=j("./_to-iobject"),t=j("./_to-primitive"),S=j("./_property-desc"),x=j("./_object-create"),o=j("./_object-gopn-ext"),k=j("./_object-gopd"),O=j("./_object-gops"),b=j("./_object-dp"),v=j("./_object-keys"),g=k.f,w=b.f,M=o.f,N=P.Symbol,I=P.JSON,G=I&&I.stringify,z="prototype",H=n("_hidden"),K=n("toPrimitive"),U={}.propertyIsEnumerable,B=E("symbol-registry"),V=E("symbols"),ae=E("op-symbols"),he=Object[z],pe=typeof N=="function"&&!!O.f,Re=P.QObject,ke=!Re||!Re[z]||!Re[z].findChild,ve=T&&C(function(){return x(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a!=7})?function(ge,Oe,Qe){var rt=g(he,Oe);rt&&delete he[Oe],w(ge,Oe,Qe),rt&&ge!==he&&w(he,Oe,rt)}:w,Te=function(ge){var Oe=V[ge]=x(N[z]);return Oe._k=ge,Oe},be=pe&&typeof N.iterator=="symbol"?function(ge){return typeof ge=="symbol"}:function(ge){return ge instanceof N},ue=function(Oe,Qe,rt){return Oe===he&&ue(ae,Qe,rt),_(Oe),Qe=t(Qe,!0),_(rt),d(V,Qe)?(rt.enumerable?(d(Oe,H)&&Oe[H][Qe]&&(Oe[H][Qe]=!1),rt=x(rt,{enumerable:S(0,!1)})):(d(Oe,H)||w(Oe,H,S(1,{})),Oe[H][Qe]=!0),ve(Oe,Qe,rt)):w(Oe,Qe,rt)},le=function(Oe,Qe){_(Oe);for(var rt=c(Qe=a(Qe)),nt=0,ut=rt.length,dt;ut>nt;)ue(Oe,dt=rt[nt++],Qe[dt]);return Oe},re=function(Oe,Qe){return Qe===void 0?x(Oe):le(x(Oe),Qe)},fe=function(Oe){var Qe=U.call(this,Oe=t(Oe,!0));return this===he&&d(V,Oe)&&!d(ae,Oe)?!1:Qe||!d(this,Oe)||!d(V,Oe)||d(this,H)&&this[H][Oe]?Qe:!0},q=function(Oe,Qe){if(Oe=a(Oe),Qe=t(Qe,!0),Oe===he&&d(V,Qe)&&!d(ae,Qe))return;var rt=g(Oe,Qe);return rt&&d(V,Qe)&&!(d(Oe,H)&&Oe[H][Qe])&&(rt.enumerable=!0),rt},ee=function(Oe){for(var Qe=M(a(Oe)),rt=[],nt=0,ut;Qe.length>nt;)!d(V,ut=Qe[nt++])&&ut!=H&&ut!=p&&rt.push(ut);return rt},Ce=function(Oe){for(var Qe=Oe===he,rt=M(Qe?ae:a(Oe)),nt=[],ut=0,dt;rt.length>ut;)d(V,dt=rt[ut++])&&(Qe?d(he,dt):!0)&&nt.push(V[dt]);return nt};pe||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var Oe=s(arguments.length>0?arguments[0]:void 0),Qe=function(rt){this===he&&Qe.call(ae,rt),d(this,H)&&d(this[H],Oe)&&(this[H][Oe]=!1),ve(this,Oe,S(1,rt))};return T&&ke&&ve(he,Oe,{configurable:!0,set:Qe}),Te(Oe)},u(N[z],"toString",function(){return this._k}),k.f=q,b.f=ue,j("./_object-gopn").f=o.f=ee,j("./_object-pie").f=fe,O.f=Ce,T&&!j("./_library")&&u(he,"propertyIsEnumerable",fe,!0),h.f=function(ge){return Te(n(ge))}),D(D.G+D.W+D.F*!pe,{Symbol:N});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),J=0;te.length>J;)n(te[J++]);for(var X=v(n.store),Q=0;X.length>Q;)f(X[Q++]);D(D.S+D.F*!pe,"Symbol",{for:function(ge){return d(B,ge+="")?B[ge]:B[ge]=N(ge)},keyFor:function(Oe){if(!be(Oe))throw TypeError(Oe+" is not a symbol!");for(var Qe in B)if(B[Qe]===Oe)return Qe},useSetter:function(){ke=!0},useSimple:function(){ke=!1}}),D(D.S+D.F*!pe,"Object",{create:re,defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:q,getOwnPropertyNames:ee,getOwnPropertySymbols:Ce});var Ee=C(function(){O.f(1)});D(D.S+D.F*Ee,"Object",{getOwnPropertySymbols:function(Oe){return O.f(i(Oe))}}),I&&D(D.S+D.F*(!pe||C(function(){var ge=N();return G([ge])!="[null]"||G({a:ge})!="{}"||G(Object(ge))!="{}"})),"JSON",{stringify:function(Oe){for(var Qe=[Oe],rt=1,nt,ut;arguments.length>rt;)Qe.push(arguments[rt++]);return ut=nt=Qe[1],!y(nt)&&Oe===void 0||be(Oe)?void 0:(m(nt)||(nt=function(dt,mt){if(typeof ut=="function"&&(mt=ut.call(this,dt,mt)),!be(mt))return mt}),Qe[1]=nt,G.apply(I,Qe))}}),N[z][K]||j("./_hide")(N[z],K,N[z].valueOf),l(N,"Symbol"),l(Math,"Math",!0),l(P.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(j,Z,L){var P=j("./_export"),d=j("./_object-to-array")(!0);P(P.S,"Object",{entries:function(D){return d(D)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,Z,L){"use strict";var P=j("./_export"),d=j("./_core"),T=j("./_global"),D=j("./_species-constructor"),u=j("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(p){var C=D(this,d.Promise||T.Promise),E=typeof p=="function";return this.then(E?function(l){return u(C,p()).then(function(){return l})}:p,E?function(l){return u(C,p()).then(function(){throw l})}:p)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,Z,L){"use strict";var P=j("./_export"),d=j("./_new-promise-capability"),T=j("./_perform");P(P.S,"Promise",{try:function(D){var u=d.f(this),p=T(D);return(p.e?u.reject:u.resolve)(p.v),u.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,Z,L){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,Z,L){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,Z,L){j("./es6.array.iterator");for(var P=j("./_global"),d=j("./_hide"),T=j("./_iterators"),D=j("./_wks")("toStringTag"),u="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(","),p=0;p0?"-":"+")+p(Math.floor(Math.abs(v)/60)*100+Math.abs(v)%60,4),S:["th","st","nd","rd"][a%10>3?0:(a%100-a%10!=10)*a%10],W:g,N:w};return c.replace(s,function(N){return N in M?M[N]:N.slice(1,N.length-1)})}}();u.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"},u.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 p(s,n){for(s=String(s),n=n||2;s.length]/;Z.exports=d;function d(T){var D=""+T,u=P.exec(D);if(!u)return D;var p,C="",E=0,l=0;for(E=u.index;E0&&this._events[p].length>E&&(this._events[p].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[p].length),typeof console.trace=="function"&&console.trace())),this},P.prototype.on=P.prototype.addListener,P.prototype.once=function(p,C){if(!d(C))throw TypeError("listener must be a function");var E=!1;function l(){this.removeListener(p,l),E||(E=!0,C.apply(this,arguments))}return l.listener=C,this.on(p,l),this},P.prototype.removeListener=function(p,C){var E,l,s,n;if(!d(C))throw TypeError("listener must be a function");if(!this._events||!this._events[p])return this;if(E=this._events[p],s=E.length,l=-1,E===C||d(E.listener)&&E.listener===C)delete this._events[p],this._events.removeListener&&this.emit("removeListener",p,C);else if(D(E)){for(n=s;n-- >0;)if(E[n]===C||E[n].listener&&E[n].listener===C){l=n;break}if(l<0)return this;E.length===1?(E.length=0,delete this._events[p]):E.splice(l,1),this._events.removeListener&&this.emit("removeListener",p,C)}return this},P.prototype.removeAllListeners=function(p){var C,E;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[p]&&delete this._events[p],this;if(arguments.length===0){for(C in this._events){if(C==="removeListener")continue;this.removeAllListeners(C)}return this.removeAllListeners("removeListener"),this._events={},this}if(E=this._events[p],d(E))this.removeListener(p,E);else if(E)for(;E.length;)this.removeListener(p,E[E.length-1]);return delete this._events[p],this},P.prototype.listeners=function(p){var C;return!this._events||!this._events[p]?C=[]:d(this._events[p])?C=[this._events[p]]:C=this._events[p].slice(),C},P.prototype.listenerCount=function(p){if(this._events){var C=this._events[p];if(d(C))return 1;if(C)return C.length}return 0},P.listenerCount=function(p,C){return p.listenerCount(C)};function d(p){return typeof p=="function"}function T(p){return typeof p=="number"}function D(p){return typeof p=="object"&&p!==null}function u(p){return p===void 0}},{}],193:[function(j,Z,L){var P=j("http"),d=Z.exports;for(var T in P)P.hasOwnProperty(T)&&(d[T]=P[T]);d.request=function(D,u){return D||(D={}),D.scheme="https",D.protocol="https:",P.request.call(this,D,u)}},{http:231}],194:[function(j,Z,L){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var P=j("util"),d=j("ms");Z.exports=function(T){if(typeof T=="number")return T;var D=d(T);if(D===void 0){var u=new Error(P.format("humanize-ms(%j) result undefined",T));console.warn(u.stack)}return D}},{ms:204,util:243}],195:[function(j,Z,L){L.read=function(P,d,T,D,u){var p,C,E=u*8-D-1,l=(1<>1,n=-7,h=T?u-1:0,f=T?-1:1,c=P[d+h];for(h+=f,p=c&(1<<-n)-1,c>>=-n,n+=E;n>0;p=p*256+P[d+h],h+=f,n-=8);for(C=p&(1<<-n)-1,p>>=-n,n+=D;n>0;C=C*256+P[d+h],h+=f,n-=8);if(p===0)p=1-s;else{if(p===l)return C?NaN:(c?-1:1)*Infinity;C=C+Math.pow(2,D),p=p-s}return(c?-1:1)*C*Math.pow(2,p-D)},L.write=function(P,d,T,D,u,p){var C,E,l,s=p*8-u-1,n=(1<>1,f=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=D?0:p-1,m=D?1:-1,_=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===Infinity?(E=isNaN(d)?1:0,C=n):(C=Math.floor(Math.log(d)/Math.LN2),d*(l=Math.pow(2,-C))<1&&(C--,l*=2),C+h>=1?d+=f/l:d+=f*Math.pow(2,1-h),d*l>=2&&(C++,l/=2),C+h>=n?(E=0,C=n):C+h>=1?(E=(d*l-1)*Math.pow(2,u),C=C+h):(E=d*Math.pow(2,h-1)*Math.pow(2,u),C=0));u>=8;P[T+c]=E&255,c+=m,E/=256,u-=8);for(C=C<0;P[T+c]=C&255,c+=m,C/=256,s-=8);P[T+c-m]|=_*128}},{}],196:[function(j,Z,L){typeof Object.create=="function"?Z.exports=function(d,T){T&&(d.super_=T,d.prototype=Object.create(T.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(d,T){if(T){d.super_=T;var D=function(){};D.prototype=T.prototype,d.prototype=new D,d.prototype.constructor=d}}},{}],197:[function(j,Z,L){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */Z.exports=function(T){return T!=null&&(P(T)||d(T)||!!T._isBuffer)};function P(T){return!!T.constructor&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function d(T){return typeof T.readFloatLE=="function"&&typeof T.slice=="function"&&P(T.slice(0,0))}},{}],198:[function(j,Z,L){var P={}.toString;Z.exports=Array.isArray||function(d){return P.call(d)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,Z){typeof exports=="object"&&typeof module!="undefined"?module.exports=Z(j):typeof define=="function"&&define.amd?define(Z):Z(j)})(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(j){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(j){for(var Z={},L=0,P=j.length;L>>6)+fromCharCode(128|Z&63):fromCharCode(224|Z>>>12&15)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}else{var Z=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|Z>>>18&7)+fromCharCode(128|Z>>>12&63)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(j){return j.replace(re_utob,cb_utob)},cb_encode=function(j){var Z=[0,2,1][j.length%3],L=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),P=[b64chars.charAt(L>>>18),b64chars.charAt(L>>>12&63),Z>=2?"=":b64chars.charAt(L>>>6&63),Z>=1?"=":b64chars.charAt(L&63)];return P.join("")},btoa=global.btoa?function(j){return global.btoa(j)}:function(j){return j.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(j){var Z=Object.prototype.toString.call(j)==="[object Uint8Array]";return Z?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,Z){return Z?_encode(String(j)).replace(/[+\/]/g,function(L){return L=="+"?"-":"_"}).replace(/=/g,""):_encode(j)},encodeURI=function(j){return encode(j,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(j){switch(j.length){case 4:var Z=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),L=Z-65536;return fromCharCode((L>>>10)+55296)+fromCharCode((L&1023)+56320);case 3:return fromCharCode((15&j.charCodeAt(0))<<12|(63&j.charCodeAt(1))<<6|63&j.charCodeAt(2));default:return fromCharCode((31&j.charCodeAt(0))<<6|63&j.charCodeAt(1))}},btou=function(j){return j.replace(re_btou,cb_btou)},cb_decode=function(j){var Z=j.length,L=Z%4,P=(Z>0?b64tab[j.charAt(0)]<<18:0)|(Z>1?b64tab[j.charAt(1)]<<12:0)|(Z>2?b64tab[j.charAt(2)]<<6:0)|(Z>3?b64tab[j.charAt(3)]:0),d=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return d.length-=[0,0,2,1][L],d.join("")},_atob=global.atob?function(j){return global.atob(j)}:function(j){return j.replace(/\S{1,4}/g,cb_decode)},atob=function(j){return _atob(String(j).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(j){return(j.constructor===buffer.constructor?j:buffer.from(j,"base64")).toString()}:function(j){return(j.constructor===buffer.constructor?j:new buffer(j,"base64")).toString()}:function(j){return btou(_atob(j))},decode=function(j){return _decode(String(j).replace(/[-_]/g,function(Z){return Z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var j=global.Base64;return global.Base64=_Base64,j};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(j){return{value:j,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(j){return encode(this,j)})),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(j,Z,L){/*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */"use strict";Z.exports=d;var P=Object.prototype.hasOwnProperty;function d(T,D,u){if(!T)throw new TypeError("argument dest is required");if(!D)throw new TypeError("argument src is required");return u===void 0&&(u=!0),Object.getOwnPropertyNames(D).forEach(function(C){if(!u&&P.call(T,C))return;var E=Object.getOwnPropertyDescriptor(D,C);Object.defineProperty(T,C,E)}),T}},{}],201:[function(j,Z,L){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var d=0;d0)return C(n);if(f==="number"&&isFinite(n))return h.long?l(n):E(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function C(n){if(n=String(n),n.length>100)return;var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!h)return;var f=parseFloat(h[1]),c=(h[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return f*p;case"weeks":case"week":case"w":return f*u;case"days":case"day":case"d":return f*D;case"hours":case"hour":case"hrs":case"hr":case"h":return f*T;case"minutes":case"minute":case"mins":case"min":case"m":return f*d;case"seconds":case"second":case"secs":case"sec":case"s":return f*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}function E(n){var h=Math.abs(n);return h>=D?Math.round(n/D)+"d":h>=T?Math.round(n/T)+"h":h>=d?Math.round(n/d)+"m":h>=P?Math.round(n/P)+"s":n+"ms"}function l(n){var h=Math.abs(n);return h>=D?s(n,h,D,"day"):h>=T?s(n,h,T,"hour"):h>=d?s(n,h,d,"minute"):h>=P?s(n,h,P,"second"):n+" ms"}function s(n,h,f,c){var m=h>=f*1.5;return Math.round(n/f)+" "+c+(m?"s":"")}},{}],205:[function(j,Z,L){(function(P){function d(p,C){for(var E=0,l=p.length-1;l>=0;l--){var s=p[l];s==="."?p.splice(l,1):s===".."?(p.splice(l,1),E++):E&&(p.splice(l,1),E--)}if(C)for(;E--;E)p.unshift("..");return p}L.resolve=function(){for(var p="",C=!1,E=arguments.length-1;E>=-1&&!C;E--){var l=E>=0?arguments[E]:P.cwd();if(typeof l!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!l)continue;p=l+"/"+p,C=l.charAt(0)==="/"}return p=d(D(p.split("/"),function(s){return!!s}),!C).join("/"),(C?"/":"")+p||"."},L.normalize=function(p){var C=L.isAbsolute(p),E=u(p,-1)==="/";return p=d(D(p.split("/"),function(l){return!!l}),!C).join("/"),!p&&!C&&(p="."),p&&E&&(p+="/"),(C?"/":"")+p},L.isAbsolute=function(p){return p.charAt(0)==="/"},L.join=function(){var p=Array.prototype.slice.call(arguments,0);return L.normalize(D(p,function(C,E){if(typeof C!="string")throw new TypeError("Arguments to path.join must be strings");return C}).join("/"))},L.relative=function(p,C){p=L.resolve(p).substr(1),C=L.resolve(C).substr(1);function E(m){for(var _=0;_=0&&!(m[y]!=="");y--);return _>y?[]:m.slice(_,y-_+1)}for(var l=E(p.split("/")),s=E(C.split("/")),n=Math.min(l.length,s.length),h=n,f=0;f=1;--n)if(C=p.charCodeAt(n),C===47){if(!s){l=n;break}}else s=!1;return l===-1?E?"/":".":E&&l===1?"/":p.slice(0,l)};function T(p){typeof p!="string"&&(p=p+"");var C=0,E=-1,l=!0,s;for(s=p.length-1;s>=0;--s)if(p.charCodeAt(s)===47){if(!l){C=s+1;break}}else E===-1&&(l=!1,E=s+1);return E===-1?"":p.slice(C,E)}L.basename=function(p,C){var E=T(p);return C&&E.substr(-1*C.length)===C&&(E=E.substr(0,E.length-C.length)),E},L.extname=function(p){typeof p!="string"&&(p=p+"");for(var C=-1,E=0,l=-1,s=!0,n=0,h=p.length-1;h>=0;--h){var f=p.charCodeAt(h);if(f===47){if(!s){E=h+1;break}continue}l===-1&&(s=!1,l=h+1),f===46?C===-1?C=h:n!==1&&(n=1):C!==-1&&(n=-1)}return C===-1||l===-1||n===0||n===1&&C===l-1&&C===E+1?"":p.slice(C,l)};function D(p,C){if(p.filter)return p.filter(C);for(var E=[],l=0;l * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license */(function(){"use strict";var d={function:!0,object:!0},T=d[typeof window]&&window||this,D=T,u=d[typeof L]&&L,p=d[typeof Z]&&Z&&!Z.nodeType&&Z,C=u&&p&&typeof P=="object"&&P;C&&(C.global===C||C.window===C||C.self===C)&&(T=C);var E=Math.pow(2,53)-1,l=/\bOpera/,s=this,n=Object.prototype,h=n.hasOwnProperty,f=n.toString;function c(b){return b=String(b),b.charAt(0).toUpperCase()+b.slice(1)}function m(b,v,g){var w={"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 v&&g&&/^Win/i.test(b)&&!/^Windows Phone /i.test(b)&&(w=w[/[\d.]+$/.exec(b)])&&(b="Windows "+w),b=String(b),v&&g&&(b=b.replace(RegExp(v,"i"),g)),b=y(b.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]),b}function _(b,v){var g=-1,w=b?b.length:0;if(typeof w=="number"&&w>-1&&w<=E)for(;++g3&&"WebKit"||/\bOpera\b/.test(ee)&&(/\bOPR\b/.test(b)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(b)&&!/^(?:Trident|EdgeHTML)$/.test(q)&&"WebKit"||!q&&/\bMSIE\b/i.test(b)&&(J=="Mac OS"?"Tasman":"Trident")||q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ee)&&"NetFront")&&(q=[ve]),ee=="IE"&&(ve=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(b)||0)[1])?(ee+=" Mobile",J="Windows Phone "+(/\+$/.test(ve)?ve:ve+".x"),be.unshift("desktop mode")):/\bWPDesktop\b/i.test(b)?(ee="IE Mobile",J="Windows Phone 8.x",be.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(b)||0)[1])):ee!="IE"&&q=="Trident"&&(ve=/\brv:([\d.]+)/.exec(b))&&(ee&&be.push("identifying as "+ee+(re?" "+re:"")),ee="IE",re=ve[1]),le){if(t(v,"global"))if(B&&(ve=B.lang.System,Te=ve.getProperty("os.arch"),J=J||ve.getProperty("os.name")+" "+ve.getProperty("os.version")),V){try{re=v.require("ringo/engine").version.join("."),ee="RingoJS"}catch(ut){(ve=v.system)&&ve.global.system==v.system&&(ee="Narwhal",J||(J=ve[0].os||null))}ee||(ee="Rhino")}else typeof v.process=="object"&&!v.process.browser&&(ve=v.process)&&(typeof ve.versions=="object"&&(typeof ve.versions.electron=="string"?(be.push("Node "+ve.versions.node),ee="Electron",re=ve.versions.electron):typeof ve.versions.nw=="string"&&(be.push("Chromium "+re,"Node "+ve.versions.node),ee="NW.js",re=ve.versions.nw)),ee||(ee="Node.js",Te=ve.arch,J=ve.platform,re=/[\d.]+/.exec(ve.version),re=re?re[0]:null));else a(ve=v.runtime)==z?(ee="Adobe AIR",J=ve.flash.system.Capabilities.os):a(ve=v.phantom)==U?(ee="PhantomJS",re=(ve=ve.version||null)&&ve.major+"."+ve.minor+"."+ve.patch):typeof pe.documentMode=="number"&&(ve=/\bTrident\/(\d+)/i.exec(b))?(re=[re,pe.documentMode],(ve=+ve[1]+4)!=re[1]&&(be.push("IE "+re[1]+" mode"),q&&(q[1]=""),re[1]=ve),re=ee=="IE"?String(re[1].toFixed(1)):re[0]):typeof pe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ee)&&(be.push("masking as "+ee+" "+re),ee="IE",re="11.0",q=["Trident"],J="Windows");J=J&&y(J)}if(re&&(ve=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(b+";"+(le&&w.appMinorVersion))||/\bMinefield\b/i.test(b)&&"a")&&(ue=/b/i.test(ve)?"beta":"alpha",re=re.replace(RegExp(ve+"\\+?$"),"")+(ue=="beta"?he:ae)+(/\d+\+?/.exec(ve)||"")),ee=="Fennec"||ee=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(J))ee="Firefox Mobile";else if(ee=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ce))Ce=="Xbox 360"&&(J=null),Ce=="Xbox 360"&&/\bIEMobile\b/.test(b)&&be.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ee)||ee&&!Ce&&!/Browser|Mobi/.test(ee))&&(J=="Windows CE"||/Mobi/i.test(b)))ee+=" Mobile";else if(ee=="IE"&&le)try{v.external===null&&be.unshift("platform preview")}catch(ut){be.unshift("embedded")}else(/\bBlackBerry\b/.test(Ce)||/\bBB10\b/.test(b))&&(ve=(RegExp(Ce.replace(/ +/g," *")+"/([.\\d]+)","i").exec(b)||0)[1]||re)?(ve=[ve,/BB10/.test(b)],J=(ve[1]?(Ce=null,te="BlackBerry"):"Device Software")+" "+ve[0],re=null):this!=i&&Ce!="Wii"&&(le&&Re||/Opera/.test(ee)&&/\b(?:MSIE|Firefox)\b/i.test(b)||ee=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(J)||ee=="IE"&&(J&&!/^Win/.test(J)&&re>5.5||/\bWindows XP\b/.test(J)&&re>8||re==8&&!/\bTrident\b/.test(b)))&&!l.test(ve=k.call(i,b.replace(l,"")+";"))&&ve.name&&(ve="ing as "+ve.name+((ve=ve.version)?" "+ve:""),l.test(ee)?(/\bIE\b/.test(ve)&&J=="Mac OS"&&(J=null),ve="identify"+ve):(ve="mask"+ve,ke?ee=y(ke.replace(/([a-z])([A-Z])/g,"$1 $2")):ee="Opera",/\bIE\b/.test(ve)&&(J=null),le||(re=null)),q=["Presto"],be.push(ve));(ve=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(b)||0)[1])&&(ve=[parseFloat(ve.replace(/\.(\d)$/,".0$1")),ve],ee=="Safari"&&ve[1].slice(-1)=="+"?(ee="WebKit Nightly",ue="alpha",re=ve[1].slice(0,-1)):(re==ve[1]||re==(ve[2]=(/\bSafari\/([\d.]+\+?)/i.exec(b)||0)[1]))&&(re=null),ve[1]=(/\bChrome\/([\d.]+)/i.exec(b)||0)[1],ve[0]==537.36&&ve[2]==537.36&&parseFloat(ve[1])>=28&&q=="WebKit"&&(q=["Blink"]),!le||!I&&!ve[1]?(q&&(q[1]="like Safari"),ve=(ve=ve[0],ve<400?1:ve<500?2:ve<526?3:ve<533?4:ve<534?"4+":ve<535?5:ve<537?6:ve<538?7:ve<601?8:"8")):(q&&(q[1]="like Chrome"),ve=ve[1]||(ve=ve[0],ve<530?1:ve<532?2:ve<532.05?3:ve<533?4:ve<534.03?5:ve<534.07?6:ve<534.1?7:ve<534.13?8:ve<534.16?9:ve<534.24?10:ve<534.3?11:ve<535.01?12:ve<535.02?"13+":ve<535.07?15:ve<535.11?16:ve<535.19?17:ve<536.05?18:ve<536.1?19:ve<537.01?20:ve<537.11?"21+":ve<537.13?23:ve<537.18?24:ve<537.24?25:ve<537.36?26:q!="Blink"?"27":"28")),q&&(q[1]+=" "+(ve+=typeof ve=="number"?".x":/[.+]/.test(ve)?"":"+")),ee=="Safari"&&(!re||parseInt(re)>45)&&(re=ve)),ee=="Opera"&&(ve=/\bzbov|zvav$/.exec(J))?(ee+=" ",be.unshift("desktop mode"),ve=="zvav"?(ee+="Mini",re=null):ee+="Mobile",J=J.replace(RegExp(" *"+ve+"$"),"")):ee=="Safari"&&/\bChrome\b/.exec(q&&q[1])&&(be.unshift("desktop mode"),ee="Chrome Mobile",re=null,/\bOS X\b/.test(J)?(te="Apple",J="iOS 4.3+"):J=null),re&&re.indexOf(ve=/[\d.]+$/.exec(J))==0&&b.indexOf("/"+ve+"-")>-1&&(J=o(J.replace(ve,""))),q&&!/\b(?:Avant|Nook)\b/.test(ee)&&(/Browser|Lunascape|Maxthon/.test(ee)||ee!="Safari"&&/^iOS/.test(J)&&/\bSafari\b/.test(q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ee)&&q[1])&&((ve=q[q.length-1])&&be.push(ve)),be.length&&(be=["("+be.join("; ")+")"]),te&&Ce&&Ce.indexOf(te)<0&&be.push("on "+te),Ce&&be.push((/^on /.test(be[be.length-1])?"":"on ")+Ce),J&&(ve=/ ([\d.+]+)$/.exec(J),fe=ve&&J.charAt(J.length-ve[0].length-1)=="/",J={architecture:32,family:ve&&!fe?J.replace(ve[0],""):J,version:ve?ve[1]:null,toString:function(){var ut=this.version;return this.family+(ut&&!fe?" "+ut:"")+(this.architecture==64?" 64-bit":"")}}),(ve=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Te))&&!/\bi686\b/i.test(Te)?(J&&(J.architecture=64,J.family=J.family.replace(RegExp(" *"+ve),"")),ee&&(/\bWOW64\b/i.test(b)||le&&/\w(?:86|32)$/.test(w.cpuClass||w.platform)&&!/\bWin64; x64\b/i.test(b))&&be.unshift("32-bit")):J&&/^OS X/.test(J.family)&&ee=="Chrome"&&parseFloat(re)>=39&&(J.architecture=64),b||(b=null);var nt={};return nt.description=b,nt.layout=q&&q[0],nt.manufacturer=te,nt.name=ee,nt.prerelease=ue,nt.product=Ce,nt.ua=b,nt.version=ee&&re,nt.os=J||{architecture:null,family:null,version:null,toString:function(){return"null"}},nt.parse=k,nt.toString=rt,nt.version&&be.unshift(re),nt.name&&be.unshift(ee),J&&ee&&!(J==String(J).split(" ")[0]&&(J==ee.split(" ")[0]||Ce))&&be.push(Ce?"("+J+")":"on "+J),be.length&&(nt.description=be.join(" ")),nt}var O=k();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=O,define(function(){return O})):u&&p?i(O,function(b,v){u[v]=b}):T.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,Z,L){(function(P){"use strict";typeof P=="undefined"||!P.version||P.version.indexOf("v0.")===0||P.version.indexOf("v1.")===0&&P.version.indexOf("v1.8.")!==0?Z.exports={nextTick:d}:Z.exports=P;function d(T,D,u,p){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var C=arguments.length,E,l;switch(C){case 0:case 1:return P.nextTick(T);case 2:return P.nextTick(function(){T.call(null,D)});case 3:return P.nextTick(function(){T.call(null,D,u)});case 4:return P.nextTick(function(){T.call(null,D,u,p)});default:for(E=new Array(C-1),l=0;l1)for(var i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=E-l,S=Math.floor,x=String.fromCharCode,o;function k(K){throw new RangeError(a[K])}function O(K,U){for(var B=K.length,V=[];B--;)V[B]=U(K[B]);return V}function b(K,U){var B=K.split("@"),V="";B.length>1&&(V=B[0]+"@",K=B[1]),K=K.replace(i,".");var ae=K.split("."),he=O(ae,U).join(".");return V+he}function v(K){for(var U=[],B=0,V=K.length,ae,he;B=55296&&ae<=56319&&B65535&&(U-=65536,B+=x(U>>>10&1023|55296),U=56320|U&1023),B+=x(U),B}).join("")}function w(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:E}function M(K,U){return K+22+75*(K<26)-((U!=0)<<5)}function N(K,U,B){var V=0;for(K=B?S(K/h):K>>1,K+=S(K/U);K>t*s>>1;V+=E)K=S(K/t);return S(V+(t+1)*K/(K+n))}function I(K){var U=[],B=K.length,V,ae=0,he=c,pe=f,Re,ke,ve,Te,be,ue,le,re,fe;for(Re=K.lastIndexOf(m),Re<0&&(Re=0),ke=0;ke=128&&k("not-basic"),U.push(K.charCodeAt(ke));for(ve=Re>0?Re+1:0;ve=B&&k("invalid-input"),le=w(K.charCodeAt(ve++)),(le>=E||le>S((C-ae)/be))&&k("overflow"),ae+=le*be,re=ue<=pe?l:ue>=pe+s?s:ue-pe,leS(C/fe)&&k("overflow"),be*=fe;V=U.length+1,pe=N(ae-Te,V,Te==0),S(ae/V)>C-he&&k("overflow"),he+=S(ae/V),ae%=V,U.splice(ae++,0,he)}return g(U)}function G(K){var U,B,V,ae,he,pe,Re,ke,ve,Te,be,ue=[],le,re,fe,q;for(K=v(K),le=K.length,U=c,B=0,he=f,pe=0;pe=U&&beS((C-B)/re)&&k("overflow"),B+=(Re-U)*re,U=Re,pe=0;peC&&k("overflow"),be==U){for(ke=B,ve=E;!(Te=ve<=he?l:ve>=he+s?s:ve-he,ke0&&s>l&&(s=l);for(var n=0;n=0?(c=h.substr(0,f),m=h.substr(f+1)):(c=h,m=""),_=decodeURIComponent(c),y=decodeURIComponent(m),P(C,_)?d(C[_])?C[_].push(y):C[_]=[C[_],y]:C[_]=y}return C};var d=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(j,Z,L){"use strict";var P=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};Z.exports=function(u,p,C,E){return p=p||"&",C=C||"=",u===null&&(u=void 0),typeof u=="object"?T(D(u),function(l){var s=encodeURIComponent(P(l))+C;return d(u[l])?T(u[l],function(n){return s+encodeURIComponent(P(n))}).join(p):s+encodeURIComponent(P(u[l]))}).join(p):E?encodeURIComponent(P(E))+C+encodeURIComponent(P(u)):""};var d=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function T(u,p){if(u.map)return u.map(p);for(var C=[],E=0;E0?(typeof ee!="string"&&!X.objectMode&&(0,D.default)(ee)!==c.prototype&&(ee=_(ee)),te?X.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):w(q,X,ee,!0):X.ended?q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Ce?(ee=X.decoder.write(ee),X.objectMode||ee.length!==0?w(q,X,ee,!1):B(q,X)):w(q,X,ee,!1))):te||(X.reading=!1)}return N(X)}function w(q,ee,Ce,te){ee.flowing&&ee.length===0&&!ee.sync?(q.emit("data",Ce),q.read(0)):(ee.length+=ee.objectMode?1:Ce.length,te?ee.buffer.unshift(Ce):ee.buffer.push(Ce),ee.needReadable&&K(q)),B(q,ee)}function M(q,ee){var Ce;return!y(ee)&&typeof ee!="string"&&ee!==void 0&&!q.objectMode&&(Ce=new TypeError("Invalid non-string/buffer chunk")),Ce}function N(q){return!q.ended&&(q.needReadable||q.length=I?q=I:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function z(q,ee){return q<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:q!==q?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(q>ee.highWaterMark&&(ee.highWaterMark=G(q)),q<=ee.length?q:ee.ended?ee.length:(ee.needReadable=!0,0))}v.prototype.read=function(q){t("read",q),q=parseInt(q,10);var ee=this._readableState,Ce=q;if(q!==0&&(ee.emittedReadable=!1),q===0&&ee.needReadable&&(ee.length>=ee.highWaterMark||ee.ended))return t("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?le(this):K(this),null;if(q=z(q,ee),q===0&&ee.ended)return ee.length===0&&le(this),null;var te=ee.needReadable;t("need readable",te),(ee.length===0||ee.length-q0?J=ve(q,ee):J=null,J===null?(ee.needReadable=!0,q=0):ee.length-=q,ee.length===0&&(ee.ended||(ee.needReadable=!0),Ce!==q&&ee.ended&&le(this)),J!==null&&this.emit("data",J),J};function H(q,ee){if(ee.ended)return;if(ee.decoder){var Ce=ee.decoder.end();Ce&&Ce.length&&(ee.buffer.push(Ce),ee.length+=ee.objectMode?1:Ce.length)}ee.ended=!0,K(q)}function K(q){var ee=q._readableState;ee.needReadable=!1,ee.emittedReadable||(t("emitReadable",ee.flowing),ee.emittedReadable=!0,ee.sync?E.nextTick(U,q):U(q))}function U(q){t("emit readable"),q.emit("readable"),ke(q)}function B(q,ee){ee.readingMore||(ee.readingMore=!0,E.nextTick(V,q,ee))}function V(q,ee){for(var Ce=ee.length;!ee.reading&&!ee.flowing&&!ee.ended&&ee.length1&&fe(te.pipes,q)!==-1)&&!Oe&&(t("false write response, pause",Ce._readableState.awaitDrain),Ce._readableState.awaitDrain++,rt=!0),Ce.pause())}function ut(De){t("onerror",De),He(),q.removeListener("error",ut),h(q,"error")===0&&q.emit("error",De)}O(q,"error",ut);function dt(){q.removeListener("finish",mt),He()}q.once("close",dt);function mt(){t("onfinish"),q.removeListener("close",dt),He()}q.once("finish",mt);function He(){t("unpipe"),Ce.unpipe(q)}return q.emit("pipe",Ce),te.flowing||(t("pipe resume"),Ce.resume()),q};function ae(q){return function(){var ee=q._readableState;t("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&h(q,"data")&&(ee.flowing=!0,ke(q))}}v.prototype.unpipe=function(q){var ee=this._readableState,Ce={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return q&&q!==ee.pipes?this:(q||(q=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,q&&q.emit("unpipe",this,Ce),this);if(!q){var te=ee.pipes,J=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var X=0;X=ee.length?(ee.decoder?Ce=ee.buffer.join(""):ee.buffer.length===1?Ce=ee.buffer.head.data:Ce=ee.buffer.concat(ee.length),ee.buffer.clear()):Ce=Te(q,ee.buffer,ee.decoder),Ce}function Te(q,ee,Ce){var te;return qX.length?X.length:q;if(Q===X.length?J+=X:J+=X.slice(0,q),q-=Q,q===0){Q===X.length?(++te,Ce.next?ee.head=Ce.next:ee.head=ee.tail=null):(ee.head=Ce,Ce.data=X.slice(Q));break}++te}return ee.length-=te,J}function ue(q,ee){var Ce=c.allocUnsafe(q),te=ee.head,J=1;for(te.data.copy(Ce),q-=te.data.length;te=te.next;){var X=te.data,Q=q>X.length?X.length:q;if(X.copy(Ce,Ce.length-q,0,Q),q-=Q,q===0){Q===X.length?(++J,te.next?ee.head=te.next:ee.head=ee.tail=null):(ee.head=te,te.data=X.slice(Q));break}++J}return ee.length-=J,Ce}function le(q){var ee=q._readableState;if(ee.length>0)throw new Error('"endReadable()" called on non-empty stream');ee.endEmitted||(ee.ended=!0,E.nextTick(re,ee,q))}function re(q,ee){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,ee.readable=!1,ee.emit("end"))}function fe(q,ee){for(var Ce=0,te=q.length;Ce-1?h.default:c.nextTick,i;M.WritableState=g;var a=(0,s.default)(j("core-util-is"));a.inherits=j("inherits");var t={deprecate:j("util-deprecate")},S=j("./internal/streams/stream"),x=j("safe-buffer").Buffer,o=d.Uint8Array||function(){};function k(ue){return x.from(ue)}function O(ue){return x.isBuffer(ue)||ue instanceof o}var b=j("./internal/streams/destroy");a.inherits(M,S);function v(){}function g(ue,le){i=i||j("./_stream_duplex"),ue=ue||{};var re=le instanceof i;this.objectMode=!!ue.objectMode,re&&(this.objectMode=this.objectMode||!!ue.writableObjectMode);var fe=ue.highWaterMark,q=ue.writableHighWaterMark,ee=this.objectMode?16:16*1024;fe||fe===0?this.highWaterMark=fe:re&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=ee,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=ue.decodeStrings===!1;this.decodeStrings=!Ce,this.defaultEncoding=ue.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(te){B(le,te)},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 _(this)}g.prototype.getBuffer=function(){for(var le=this.bufferedRequest,re=[];le;)re.push(le),le=le.next;return re},function(){try{Object.defineProperty(g.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ue){}}();var w;typeof E.default=="function"&&p.default&&typeof Function.prototype[p.default]=="function"?(w=Function.prototype[p.default],(0,D.default)(M,p.default,{value:function(le){return w.call(this,le)?!0:this!==M?!1:le&&le._writableState instanceof g}})):w=function(le){return le instanceof this};function M(ue){if(i=i||j("./_stream_duplex"),!w.call(M,this)&&!(this instanceof i))return new M(ue);this._writableState=new g(ue,this),this.writable=!0,ue&&(typeof ue.write=="function"&&(this._write=ue.write),typeof ue.writev=="function"&&(this._writev=ue.writev),typeof ue.destroy=="function"&&(this._destroy=ue.destroy),typeof ue.final=="function"&&(this._final=ue.final)),S.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(ue,le){var re=new Error("write after end");ue.emit("error",re),c.nextTick(le,re)}function I(ue,le,re,fe){var q=!0,ee=!1;return re===null?ee=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!le.objectMode&&(ee=new TypeError("Invalid non-string/buffer chunk")),ee&&(ue.emit("error",ee),c.nextTick(fe,ee),q=!1),q}M.prototype.write=function(ue,le,re){var fe=this._writableState,q=!1,ee=!fe.objectMode&&O(ue);return ee&&!x.isBuffer(ue)&&(ue=k(ue)),typeof le=="function"&&(re=le,le=null),ee?le="buffer":le||(le=fe.defaultEncoding),typeof re!="function"&&(re=v),fe.ended?N(this,re):(ee||I(this,fe,ue,re))&&(fe.pendingcb++,q=z(this,fe,ee,ue,le,re)),q},M.prototype.cork=function(){var ue=this._writableState;ue.corked++},M.prototype.uncork=function(){var ue=this._writableState;ue.corked&&(ue.corked--,!ue.writing&&!ue.corked&&!ue.finished&&!ue.bufferProcessing&&ue.bufferedRequest&&he(this,ue))},M.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function G(ue,le,re){return!ue.objectMode&&ue.decodeStrings!==!1&&typeof le=="string"&&(le=x.from(le,re)),le}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(ue,le,re,fe,q,ee){if(!re){var Ce=G(le,fe,q);fe!==Ce&&(re=!0,q="buffer",fe=Ce)}var te=le.objectMode?1:fe.length;le.length+=te;var J=le.length0?this.tail.next=E:this.head=E,this.tail=E,++this.length},u.prototype.unshift=function(C){var E={data:C,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length},u.prototype.shift=function(){if(this.length===0)return;var C=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,C},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(C){if(this.length===0)return"";for(var E=this.head,l=""+E.data;E=E.next;)l+=C+E.data;return l},u.prototype.concat=function(C){if(this.length===0)return d.alloc(0);if(this.length===1)return this.head.data;for(var E=d.allocUnsafe(C>>>0),l=this.head,s=0;l;)D(l.data,E,s),s+=l.data.length,l=l.next;return E},u}(),T&&T.inspect&&T.inspect.custom&&(Z.exports.prototype[T.inspect.custom]=function(){var u=T.inspect({length:this.length});return this.constructor.name+" "+u})},{"safe-buffer":228,util:71}],220:[function(j,Z,L){"use strict";var P=j("process-nextick-args");function d(u,p){var C=this,E=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return E||l?(p?p(u):u&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(D,this,u),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(s){!p&&s?(P.nextTick(D,C,s),C._writableState&&(C._writableState.errorEmitted=!0)):p&&p(s)}),this)}function T(){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 D(u,p){u.emit("error",p)}Z.exports={destroy:d,undestroy:T}},{"process-nextick-args":207}],221:[function(j,Z,L){"use strict";Z.exports=j("events").EventEmitter},{events:192}],222:[function(j,Z,L){Z.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,Z,L){L=Z.exports=j("./lib/_stream_readable.js"),L.Stream=L,L.Readable=L,L.Writable=j("./lib/_stream_writable.js"),L.Duplex=j("./lib/_stream_duplex.js"),L.Transform=j("./lib/_stream_transform.js"),L.PassThrough=j("./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(j,Z,L){Z.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,Z,L){Z.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,Z,L){var P=function(){return this}()||Function("return this")(),d=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,T=d&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,Z.exports=j("./runtime"),d)P.regeneratorRuntime=T;else try{delete P.regeneratorRuntime}catch(D){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,Z,L){!function(P){"use strict";var d=Object.prototype,T=d.hasOwnProperty,D,u=typeof Symbol=="function"?Symbol:{},p=u.iterator||"@@iterator",C=u.asyncIterator||"@@asyncIterator",E=u.toStringTag||"@@toStringTag",l=typeof Z=="object",s=P.regeneratorRuntime;if(s){l&&(Z.exports=s);return}s=P.regeneratorRuntime=l?Z.exports:{};function n(z,H,K,U){var B=H&&H.prototype instanceof i?H:i,V=Object.create(B.prototype),ae=new N(U||[]);return V._invoke=v(z,K,ae),V}s.wrap=n;function h(z,H,K){try{return{type:"normal",arg:z.call(H,K)}}catch(U){return{type:"throw",arg:U}}}var f="suspendedStart",c="suspendedYield",m="executing",_="completed",y={};function i(){}function a(){}function t(){}var S={};S[p]=function(){return this};var x=Object.getPrototypeOf,o=x&&x(x(I([])));o&&o!==d&&T.call(o,p)&&(S=o);var k=t.prototype=i.prototype=Object.create(S);a.prototype=k.constructor=t,t.constructor=a,t[E]=a.displayName="GeneratorFunction";function O(z){["next","throw","return"].forEach(function(H){z[H]=function(K){return this._invoke(H,K)}})}s.isGeneratorFunction=function(z){var H=typeof z=="function"&&z.constructor;return H?H===a||(H.displayName||H.name)==="GeneratorFunction":!1},s.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,t):(z.__proto__=t,E in z||(z[E]="GeneratorFunction")),z.prototype=Object.create(k),z},s.awrap=function(z){return{__await:z}};function b(z){function H(B,V,ae,he){var pe=h(z[B],z,V);if(pe.type==="throw")he(pe.arg);else{var Re=pe.arg,ke=Re.value;return ke&&typeof ke=="object"&&T.call(ke,"__await")?Promise.resolve(ke.__await).then(function(ve){H("next",ve,ae,he)},function(ve){H("throw",ve,ae,he)}):Promise.resolve(ke).then(function(ve){Re.value=ve,ae(Re)},he)}}var K;function U(B,V){function ae(){return new Promise(function(he,pe){H(B,V,he,pe)})}return K=K?K.then(ae,ae):ae()}this._invoke=U}O(b.prototype),b.prototype[C]=function(){return this},s.AsyncIterator=b,s.async=function(z,H,K,U){var B=new b(n(z,H,K,U));return s.isGeneratorFunction(H)?B:B.next().then(function(V){return V.done?V.value:B.next()})};function v(z,H,K){var U=f;return function(V,ae){if(U===m)throw new Error("Generator is already running");if(U===_){if(V==="throw")throw ae;return G()}for(K.method=V,K.arg=ae;;){var he=K.delegate;if(he){var pe=g(he,K);if(pe){if(pe===y)continue;return pe}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(U===f)throw U=_,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);U=m;var Re=h(z,H,K);if(Re.type==="normal"){if(U=K.done?_:c,Re.arg===y)continue;return{value:Re.arg,done:K.done}}else Re.type==="throw"&&(U=_,K.method="throw",K.arg=Re.arg)}}}function g(z,H){var K=z.iterator[H.method];if(K===D){if(H.delegate=null,H.method==="throw"){if(z.iterator.return&&(H.method="return",H.arg=D,g(z,H),H.method==="throw"))return y;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var U=h(K,z.iterator,H.arg);if(U.type==="throw")return H.method="throw",H.arg=U.arg,H.delegate=null,y;var B=U.arg;if(!B)return H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,y;if(B.done)H[z.resultName]=B.value,H.next=z.nextLoc,H.method!=="return"&&(H.method="next",H.arg=D);else return B;return H.delegate=null,y}O(k),k[E]="Generator",k[p]=function(){return this},k.toString=function(){return"[object Generator]"};function w(z){var H={tryLoc:z[0]};1 in z&&(H.catchLoc=z[1]),2 in z&&(H.finallyLoc=z[2],H.afterLoc=z[3]),this.tryEntries.push(H)}function M(z){var H=z.completion||{};H.type="normal",delete H.arg,z.completion=H}function N(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(w,this),this.reset(!0)}s.keys=function(z){var H=[];for(var K in z)H.push(K);return H.reverse(),function U(){for(;H.length;){var B=H.pop();if(B in z)return U.value=B,U.done=!1,U}return U.done=!0,U}};function I(z){if(z){var H=z[p];if(H)return H.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var K=-1,U=function B(){for(;++K=0;--U){var B=this.tryEntries[U],V=B.completion;if(B.tryLoc==="root")return K("end");if(B.tryLoc<=this.prev){var ae=T.call(B,"catchLoc"),he=T.call(B,"finallyLoc");if(ae&&he){if(this.prev=0;--K){var U=this.tryEntries[K];if(U.tryLoc<=this.prev&&T.call(U,"finallyLoc")&&this.prev=0;--H){var K=this.tryEntries[H];if(K.finallyLoc===z)return this.complete(K.completion,K.afterLoc),M(K),y}},catch:function(z){for(var H=this.tryEntries.length-1;H>=0;--H){var K=this.tryEntries[H];if(K.tryLoc===z){var U=K.completion;if(U.type==="throw"){var B=U.arg;M(K)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(z,H,K){return this.delegate={iterator:I(z),resultName:H,nextLoc:K},this.method==="next"&&(this.arg=D),y}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,Z,L){var P=j("buffer"),d=P.Buffer;function T(u,p){for(var C in u)p[C]=u[C]}d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?Z.exports=P:(T(P,L),L.Buffer=D);function D(u,p,C){return d(u,p,C)}T(d,D),D.from=function(u,p,C){if(typeof u=="number")throw new TypeError("Argument must not be a number");return d(u,p,C)},D.alloc=function(u,p,C){if(typeof u!="number")throw new TypeError("Argument must be a number");var E=d(u);return p!==void 0?typeof C=="string"?E.fill(p,C):E.fill(p):E.fill(0),E},D.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return d(u)},D.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(u)}},{buffer:73}],229:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/string/from-code-point"),T=c(d),D=j("babel-runtime/core-js/json/stringify"),u=c(D),p=j("babel-runtime/helpers/typeof"),C=c(p),E=j("babel-runtime/core-js/object/define-property"),l=c(E),s=j("babel-runtime/core-js/object/keys"),n=c(s),h=j("babel-runtime/core-js/object/create"),f=c(h);function c(m){return m&&m.__esModule?m:{default:m}}(function(m){m.parser=function(X,Q){return new y(X,Q)},m.SAXParser=y,m.SAXStream=k,m.createStream=o,m.MAX_BUFFER_LENGTH=64*1024;var _=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];m.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function y(X,Q){if(!(this instanceof y))return new y(X,Q);var Ee=this;a(Ee),Ee.q=Ee.c="",Ee.bufferCheckPosition=m.MAX_BUFFER_LENGTH,Ee.opt=Q||{},Ee.opt.lowercase=Ee.opt.lowercase||Ee.opt.lowercasetags,Ee.looseCase=Ee.opt.lowercase?"toLowerCase":"toUpperCase",Ee.tags=[],Ee.closed=Ee.closedRoot=Ee.sawRoot=!1,Ee.tag=Ee.error=null,Ee.strict=!!X,Ee.noscript=!!(X||Ee.opt.noscript),Ee.state=V.BEGIN,Ee.strictEntities=Ee.opt.strictEntities,Ee.ENTITIES=Ee.strictEntities?(0,f.default)(m.XML_ENTITIES):(0,f.default)(m.ENTITIES),Ee.attribList=[],Ee.opt.xmlns&&(Ee.ns=(0,f.default)(w)),Ee.trackPosition=Ee.opt.position!==!1,Ee.trackPosition&&(Ee.position=Ee.line=Ee.column=0),he(Ee,"onready")}f.default||(Object.create=function(X){function Q(){}Q.prototype=X;var Ee=new Q;return Ee}),n.default||(Object.keys=function(X){var Q=[];for(var Ee in X)X.hasOwnProperty(Ee)&&Q.push(Ee);return Q});function i(X){for(var Q=Math.max(m.MAX_BUFFER_LENGTH,10),Ee=0,ge=0,Oe=_.length;geQ)switch(_[ge]){case"textNode":Re(X);break;case"cdata":pe(X,"oncdata",X.cdata),X.cdata="";break;case"script":pe(X,"onscript",X.script),X.script="";break;default:ve(X,"Max buffer length exceeded: "+_[ge])}Ee=Math.max(Ee,Qe)}var rt=m.MAX_BUFFER_LENGTH-Ee;X.bufferCheckPosition=rt+X.position}function a(X){for(var Q=0,Ee=_.length;Q"||z(X)}function U(X,Q){return X.test(Q)}function B(X,Q){return!U(X,Q)}var V=0;m.STATE={BEGIN:V++,BEGIN_WHITESPACE:V++,TEXT:V++,TEXT_ENTITY:V++,OPEN_WAKA:V++,SGML_DECL:V++,SGML_DECL_QUOTED:V++,DOCTYPE:V++,DOCTYPE_QUOTED:V++,DOCTYPE_DTD:V++,DOCTYPE_DTD_QUOTED:V++,COMMENT_STARTING:V++,COMMENT:V++,COMMENT_ENDING:V++,COMMENT_ENDED:V++,CDATA:V++,CDATA_ENDING:V++,CDATA_ENDING_2:V++,PROC_INST:V++,PROC_INST_BODY:V++,PROC_INST_ENDING:V++,OPEN_TAG:V++,OPEN_TAG_SLASH:V++,ATTRIB:V++,ATTRIB_NAME:V++,ATTRIB_NAME_SAW_WHITE:V++,ATTRIB_VALUE:V++,ATTRIB_VALUE_QUOTED:V++,ATTRIB_VALUE_CLOSED:V++,ATTRIB_VALUE_UNQUOTED:V++,ATTRIB_VALUE_ENTITY_Q:V++,ATTRIB_VALUE_ENTITY_U:V++,CLOSE_TAG:V++,CLOSE_TAG_SAW_WHITE:V++,SCRIPT:V++,SCRIPT_ENDING:V++},m.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},m.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,n.default)(m.ENTITIES).forEach(function(X){var Q=m.ENTITIES[X],Ee=typeof Q=="number"?String.fromCharCode(Q):Q;m.ENTITIES[X]=Ee});for(var ae in m.STATE)m.STATE[m.STATE[ae]]=ae;V=m.STATE;function he(X,Q,Ee){X[Q]&&X[Q](Ee)}function pe(X,Q,Ee){X.textNode&&Re(X),he(X,Q,Ee)}function Re(X){X.textNode=ke(X.opt,X.textNode),X.textNode&&he(X,"ontext",X.textNode),X.textNode=""}function ke(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function ve(X,Q){return Re(X),X.trackPosition&&(Q+=` Line: `+X.line+` Column: `+X.column+` Char: `+X.c),Q=new Error(Q),X.error=Q,he(X,"onerror",Q),X}function Te(X){return X.sawRoot&&!X.closedRoot&&be(X,"Unclosed root tag"),X.state!==V.BEGIN&&X.state!==V.BEGIN_WHITESPACE&&X.state!==V.TEXT&&ve(X,"Unexpected end"),Re(X),X.c="",X.closed=!0,he(X,"onend"),y.call(X,X.strict,X.opt),X}function be(X,Q){if((typeof X=="undefined"?"undefined":(0,C.default)(X))!=="object"||!(X instanceof y))throw new Error("bad call to strictFail");X.strict&&ve(X,Q)}function ue(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Q=X.tags[X.tags.length-1]||X,Ee=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(Ee.ns=Q.ns),X.attribList.length=0,pe(X,"onopentagstart",Ee)}function le(X,Q){var Ee=X.indexOf(":"),ge=Ee<0?["",X]:X.split(":"),Oe=ge[0],Qe=ge[1];return Q&&X==="xmlns"&&(Oe="xmlns",Qe=""),{prefix:Oe,local:Qe}}function re(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName)){X.attribName=X.attribValue="";return}if(X.opt.xmlns){var Q=le(X.attribName,!0),Ee=Q.prefix,ge=Q.local;if(Ee==="xmlns")if(ge==="xml"&&X.attribValue!==v)be(X,"xml: prefix must be bound to "+v+` Actual: `+X.attribValue);else if(ge==="xmlns"&&X.attribValue!==g)be(X,"xmlns: prefix must be bound to "+g+` Actual: `+X.attribValue);else{var Oe=X.tag,Qe=X.tags[X.tags.length-1]||X;Oe.ns===Qe.ns&&(Oe.ns=(0,f.default)(Qe.ns)),Oe.ns[ge]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,pe(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function fe(X,Q){if(X.opt.xmlns){var Ee=X.tag,ge=le(X.tagName);Ee.prefix=ge.prefix,Ee.local=ge.local,Ee.uri=Ee.ns[ge.prefix]||"",Ee.prefix&&!Ee.uri&&(be(X,"Unbound namespace prefix: "+(0,u.default)(X.tagName)),Ee.uri=ge.prefix);var Oe=X.tags[X.tags.length-1]||X;Ee.ns&&Oe.ns!==Ee.ns&&(0,n.default)(Ee.ns).forEach(function(Ze){pe(X,"onopennamespace",{prefix:Ze,uri:Ee.ns[Ze]})});for(var Qe=0,rt=X.attribList.length;Qe",X.tagName="",X.state=V.SCRIPT;return}pe(X,"onscript",X.script),X.script=""}var Q=X.tags.length,Ee=X.tagName;X.strict||(Ee=Ee[X.looseCase]());for(var ge=Ee;Q--;){var Oe=X.tags[Q];if(Oe.name!==ge)be(X,"Unexpected close tag");else break}if(Q<0){be(X,"Unmatched closing tag: "+X.tagName),X.textNode+="",X.state=V.TEXT;return}X.tagName=Ee;for(var Qe=X.tags.length;Qe-- >Q;){var rt=X.tag=X.tags.pop();X.tagName=X.tag.name,pe(X,"onclosetag",X.tagName);var nt={};for(var ut in rt.ns)nt[ut]=rt.ns[ut];var dt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&rt.ns!==dt.ns&&(0,n.default)(rt.ns).forEach(function(mt){var He=rt.ns[mt];pe(X,"onclosenamespace",{prefix:mt,uri:He})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=V.TEXT}function ee(X){var Q=X.entity,Ee=Q.toLowerCase(),ge,Oe="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[Ee]?X.ENTITIES[Ee]:(Q=Ee,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),ge=parseInt(Q,16),Oe=ge.toString(16)):(Q=Q.slice(1),ge=parseInt(Q,10),Oe=ge.toString(10))),Q=Q.replace(/^0+/,""),isNaN(ge)||Oe.toLowerCase()!==Q?(be(X,"Invalid character entity"),"&"+X.entity+";"):(0,T.default)(ge))}function Ce(X,Q){Q==="<"?(X.state=V.OPEN_WAKA,X.startTagPosition=X.position):z(Q)||(be(X,"Non-whitespace before first tag."),X.textNode=Q,X.state=V.TEXT)}function te(X,Q){var Ee="";return Q"?(pe(Q,"onsgmldeclaration",Q.sgmlDecl),Q.sgmlDecl="",Q.state=V.TEXT):(H(ge)&&(Q.state=V.SGML_DECL_QUOTED),Q.sgmlDecl+=ge);continue;case V.SGML_DECL_QUOTED:ge===Q.q&&(Q.state=V.SGML_DECL,Q.q=""),Q.sgmlDecl+=ge;continue;case V.DOCTYPE:ge===">"?(Q.state=V.TEXT,pe(Q,"ondoctype",Q.doctype),Q.doctype=!0):(Q.doctype+=ge,ge==="["?Q.state=V.DOCTYPE_DTD:H(ge)&&(Q.state=V.DOCTYPE_QUOTED,Q.q=ge));continue;case V.DOCTYPE_QUOTED:Q.doctype+=ge,ge===Q.q&&(Q.q="",Q.state=V.DOCTYPE);continue;case V.DOCTYPE_DTD:Q.doctype+=ge,ge==="]"?Q.state=V.DOCTYPE:H(ge)&&(Q.state=V.DOCTYPE_DTD_QUOTED,Q.q=ge);continue;case V.DOCTYPE_DTD_QUOTED:Q.doctype+=ge,ge===Q.q&&(Q.state=V.DOCTYPE_DTD,Q.q="");continue;case V.COMMENT:ge==="-"?Q.state=V.COMMENT_ENDING:Q.comment+=ge;continue;case V.COMMENT_ENDING:ge==="-"?(Q.state=V.COMMENT_ENDED,Q.comment=ke(Q.opt,Q.comment),Q.comment&&pe(Q,"oncomment",Q.comment),Q.comment=""):(Q.comment+="-"+ge,Q.state=V.COMMENT);continue;case V.COMMENT_ENDED:ge!==">"?(be(Q,"Malformed comment"),Q.comment+="--"+ge,Q.state=V.COMMENT):Q.state=V.TEXT;continue;case V.CDATA:ge==="]"?Q.state=V.CDATA_ENDING:Q.cdata+=ge;continue;case V.CDATA_ENDING:ge==="]"?Q.state=V.CDATA_ENDING_2:(Q.cdata+="]"+ge,Q.state=V.CDATA);continue;case V.CDATA_ENDING_2:ge===">"?(Q.cdata&&pe(Q,"oncdata",Q.cdata),pe(Q,"onclosecdata"),Q.cdata="",Q.state=V.TEXT):ge==="]"?Q.cdata+="]":(Q.cdata+="]]"+ge,Q.state=V.CDATA);continue;case V.PROC_INST:ge==="?"?Q.state=V.PROC_INST_ENDING:z(ge)?Q.state=V.PROC_INST_BODY:Q.procInstName+=ge;continue;case V.PROC_INST_BODY:if(!Q.procInstBody&&z(ge))continue;ge==="?"?Q.state=V.PROC_INST_ENDING:Q.procInstBody+=ge;continue;case V.PROC_INST_ENDING:ge===">"?(pe(Q,"onprocessinginstruction",{name:Q.procInstName,body:Q.procInstBody}),Q.procInstName=Q.procInstBody="",Q.state=V.TEXT):(Q.procInstBody+="?"+ge,Q.state=V.PROC_INST_BODY);continue;case V.OPEN_TAG:U(N,ge)?Q.tagName+=ge:(ue(Q),ge===">"?fe(Q):ge==="/"?Q.state=V.OPEN_TAG_SLASH:(z(ge)||be(Q,"Invalid character in tag name"),Q.state=V.ATTRIB));continue;case V.OPEN_TAG_SLASH:ge===">"?(fe(Q,!0),q(Q)):(be(Q,"Forward-slash in opening tag not followed by >"),Q.state=V.ATTRIB);continue;case V.ATTRIB:if(z(ge))continue;ge===">"?fe(Q):ge==="/"?Q.state=V.OPEN_TAG_SLASH:U(M,ge)?(Q.attribName=ge,Q.attribValue="",Q.state=V.ATTRIB_NAME):be(Q,"Invalid attribute name");continue;case V.ATTRIB_NAME:ge==="="?Q.state=V.ATTRIB_VALUE:ge===">"?(be(Q,"Attribute without value"),Q.attribValue=Q.attribName,re(Q),fe(Q)):z(ge)?Q.state=V.ATTRIB_NAME_SAW_WHITE:U(N,ge)?Q.attribName+=ge:be(Q,"Invalid attribute name");continue;case V.ATTRIB_NAME_SAW_WHITE:if(ge==="=")Q.state=V.ATTRIB_VALUE;else{if(z(ge))continue;be(Q,"Attribute without value"),Q.tag.attributes[Q.attribName]="",Q.attribValue="",pe(Q,"onattribute",{name:Q.attribName,value:""}),Q.attribName="",ge===">"?fe(Q):U(M,ge)?(Q.attribName=ge,Q.state=V.ATTRIB_NAME):(be(Q,"Invalid attribute name"),Q.state=V.ATTRIB)}continue;case V.ATTRIB_VALUE:if(z(ge))continue;H(ge)?(Q.q=ge,Q.state=V.ATTRIB_VALUE_QUOTED):(be(Q,"Unquoted attribute value"),Q.state=V.ATTRIB_VALUE_UNQUOTED,Q.attribValue=ge);continue;case V.ATTRIB_VALUE_QUOTED:if(ge!==Q.q){ge==="&"?Q.state=V.ATTRIB_VALUE_ENTITY_Q:Q.attribValue+=ge;continue}re(Q),Q.q="",Q.state=V.ATTRIB_VALUE_CLOSED;continue;case V.ATTRIB_VALUE_CLOSED:z(ge)?Q.state=V.ATTRIB:ge===">"?fe(Q):ge==="/"?Q.state=V.OPEN_TAG_SLASH:U(M,ge)?(be(Q,"No whitespace between attributes"),Q.attribName=ge,Q.attribValue="",Q.state=V.ATTRIB_NAME):be(Q,"Invalid attribute name");continue;case V.ATTRIB_VALUE_UNQUOTED:if(!K(ge)){ge==="&"?Q.state=V.ATTRIB_VALUE_ENTITY_U:Q.attribValue+=ge;continue}re(Q),ge===">"?fe(Q):Q.state=V.ATTRIB;continue;case V.CLOSE_TAG:if(Q.tagName)ge===">"?q(Q):U(N,ge)?Q.tagName+=ge:Q.script?(Q.script+=""?q(Q):be(Q,"Invalid characters in closing tag");continue;case V.TEXT_ENTITY:case V.ATTRIB_VALUE_ENTITY_Q:case V.ATTRIB_VALUE_ENTITY_U:var rt,nt;switch(Q.state){case V.TEXT_ENTITY:rt=V.TEXT,nt="textNode";break;case V.ATTRIB_VALUE_ENTITY_Q:rt=V.ATTRIB_VALUE_QUOTED,nt="attribValue";break;case V.ATTRIB_VALUE_ENTITY_U:rt=V.ATTRIB_VALUE_UNQUOTED,nt="attribValue";break}ge===";"?(Q[nt]+=ee(Q),Q.entity="",Q.state=rt):U(Q.entity.length?G:I,ge)?Q.entity+=ge:(be(Q,"Invalid character in entity name"),Q[nt]+="&"+Q.entity+ge,Q.entity="",Q.state=rt);continue;default:throw new Error(Q,"Unknown state: "+Q.state)}}return Q.position>=Q.bufferCheckPosition&&i(Q),Q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var X=String.fromCharCode,Q=Math.floor,Ee=function(){var Oe=16384,Qe=[],rt,nt,ut=-1,dt=arguments.length;if(!dt)return"";for(var mt="";++ut1114111||Q(He)!==He)throw RangeError("Invalid code point: "+He);He<=65535?Qe.push(He):(He-=65536,rt=(He>>10)+55296,nt=He%1024+56320,Qe.push(rt,nt)),(ut+1===dt||Qe.length>Oe)&&(mt+=X.apply(null,Qe),Qe.length=0)}return mt};l.default?Object.defineProperty(String,"fromCodePoint",{value:Ee,configurable:!0,writable:!0}):String.fromCodePoint=Ee}()})(typeof L=="undefined"?(void 0).sax={}:L)}).call(this,j("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(j,Z,L){Z.exports=T;var P=j("events").EventEmitter,d=j("inherits");d(T,P),T.Readable=j("readable-stream/readable.js"),T.Writable=j("readable-stream/writable.js"),T.Duplex=j("readable-stream/duplex.js"),T.Transform=j("readable-stream/transform.js"),T.PassThrough=j("readable-stream/passthrough.js"),T.Stream=T;function T(){P.call(this)}T.prototype.pipe=function(D,u){var p=this;function C(c){D.writable&&(D.write(c)===!1&&p.pause&&p.pause())}p.on("data",C);function E(){p.readable&&p.resume&&p.resume()}D.on("drain",E),!D._isStdio&&(!u||u.end!==!1)&&(p.on("end",s),p.on("close",n));var l=!1;function s(){if(l)return;l=!0,D.end()}function n(){if(l)return;l=!0,typeof D.destroy=="function"&&D.destroy()}function h(c){if(f(),P.listenerCount(this,"error")===0)throw c}p.on("error",h),D.on("error",h);function f(){p.removeListener("data",C),D.removeListener("drain",E),p.removeListener("end",s),p.removeListener("close",n),p.removeListener("error",h),D.removeListener("error",h),p.removeListener("end",f),p.removeListener("close",f),D.removeListener("close",f)}return p.on("end",f),p.on("close",f),D.on("close",f),D.emit("pipe",p),D}},{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(j,Z,L){(function(P){var d=j("./lib/request"),T=j("./lib/response"),D=j("xtend"),u=j("builtin-status-codes"),p=j("url"),C=L;C.request=function(E,l){typeof E=="string"?E=p.parse(E):E=D(E);var s=P.location.protocol.search(/^https?:$/)===-1?"http:":"",n=E.protocol||s,h=E.hostname||E.host,f=E.port,c=E.path||"/";h&&h.indexOf(":")!==-1&&(h="["+h+"]"),E.url=(h?n+"//"+h:"")+(f?":"+f:"")+c,E.method=(E.method||"GET").toUpperCase(),E.headers=E.headers||{};var m=new d(E);return l&&m.on("response",l),m},C.get=function(l,s){var n=C.request(l,s);return n.end(),n},C.ClientRequest=d,C.IncomingMessage=T.IncomingMessage,C.Agent=function(){},C.Agent.defaultMaxSockets=4,C.globalAgent=new C.Agent,C.STATUS_CODES=u,C.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(j,Z,L){(function(P){"use strict";L.fetch=C(P.fetch)&&C(P.ReadableStream),L.writableStream=C(P.WritableStream),L.abortController=C(P.AbortController),L.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),L.blobConstructor=!0}catch(E){}var d;function T(){if(d!==void 0)return d;if(P.XMLHttpRequest){d=new P.XMLHttpRequest;try{d.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(E){d=null}}else d=null;return d}function D(E){var l=T();if(!l)return!1;try{return l.responseType=E,l.responseType===E}catch(s){}return!1}var u=typeof P.ArrayBuffer!="undefined",p=u&&C(P.ArrayBuffer.prototype.slice);L.arraybuffer=L.fetch||u&&D("arraybuffer"),L.msstream=!L.fetch&&p&&D("ms-stream"),L.mozchunkedarraybuffer=!L.fetch&&u&&D("moz-chunked-arraybuffer"),L.overrideMimeType=L.fetch||(T()?C(T().overrideMimeType):!1),L.vbArray=C(P.VBArray);function C(E){return typeof E=="function"}d=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,Z,L){(function(P,d,T){"use strict";var D=j("babel-runtime/core-js/object/keys"),u=p(D);function p(i){return i&&i.__esModule?i:{default:i}}var C=j("./capability"),E=j("inherits"),l=j("./response"),s=j("readable-stream"),n=j("to-arraybuffer"),h=l.IncomingMessage,f=l.readyStates;function c(i,a){return C.fetch&&a?"fetch":C.mozchunkedarraybuffer?"moz-chunked-arraybuffer":C.msstream?"ms-stream":C.arraybuffer&&i?"arraybuffer":C.vbArray&&i?"text:vbarray":"text"}var m=Z.exports=function(i){var a=this;s.Writable.call(a),a._opts=i,a._body=[],a._headers={},i.auth&&a.setHeader("Authorization","Basic "+new T(i.auth).toString("base64")),(0,u.default)(i.headers).forEach(function(x){a.setHeader(x,i.headers[x])});var t,S=!0;if(i.mode==="disable-fetch"||"requestTimeout"in i&&!C.abortController)S=!1,t=!0;else if(i.mode==="prefer-streaming")t=!1;else if(i.mode==="allow-wrong-content-type")t=!C.overrideMimeType;else if(!i.mode||i.mode==="default"||i.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");a._mode=c(t,S),a._fetchTimer=null,a.on("finish",function(){a._onFinish()})};E(m,s.Writable),m.prototype.setHeader=function(i,a){var t=this,S=i.toLowerCase();if(y.indexOf(S)!==-1)return;t._headers[S]={name:i,value:a}},m.prototype.getHeader=function(i){var a=this._headers[i.toLowerCase()];return a?a.value:null},m.prototype.removeHeader=function(i){var a=this;delete a._headers[i.toLowerCase()]},m.prototype._onFinish=function(){var i=this;if(i._destroyed)return;var a=i._opts,t=i._headers,S=null;a.method!=="GET"&&a.method!=="HEAD"&&(C.arraybuffer?S=n(T.concat(i._body)):C.blobConstructor?S=new d.Blob(i._body.map(function(v){return n(v)}),{type:(t["content-type"]||{}).value||""}):S=T.concat(i._body).toString());var x=[];if((0,u.default)(t).forEach(function(v){var g=t[v].name,w=t[v].value;Array.isArray(w)?w.forEach(function(M){x.push([g,M])}):x.push([g,w])}),i._mode==="fetch"){var o=null,k=null;if(C.abortController){var O=new AbortController;o=O.signal,i._fetchAbortController=O,"requestTimeout"in a&&a.requestTimeout!==0&&(i._fetchTimer=d.setTimeout(function(){i.emit("requestTimeout"),i._fetchAbortController&&i._fetchAbortController.abort()},a.requestTimeout))}d.fetch(i._opts.url,{method:i._opts.method,headers:x,body:S||void 0,mode:"cors",credentials:a.withCredentials?"include":"same-origin",signal:o}).then(function(v){i._fetchResponse=v,i._connect()},function(v){d.clearTimeout(i._fetchTimer),i._destroyed||i.emit("error",v)})}else{var b=i._xhr=new d.XMLHttpRequest;try{b.open(i._opts.method,i._opts.url,!0)}catch(v){P.nextTick(function(){i.emit("error",v)});return}"responseType"in b&&(b.responseType=i._mode.split(":")[0]),"withCredentials"in b&&(b.withCredentials=!!a.withCredentials),i._mode==="text"&&"overrideMimeType"in b&&b.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in a&&(b.timeout=a.requestTimeout,b.ontimeout=function(){i.emit("requestTimeout")}),x.forEach(function(v){b.setRequestHeader(v[0],v[1])}),i._response=null,b.onreadystatechange=function(){switch(b.readyState){case f.LOADING:case f.DONE:i._onXHRProgress();break}},i._mode==="moz-chunked-arraybuffer"&&(b.onprogress=function(){i._onXHRProgress()}),b.onerror=function(){if(i._destroyed)return;i.emit("error",new Error("XHR error"))};try{b.send(S)}catch(v){P.nextTick(function(){i.emit("error",v)});return}}};function _(i){try{var a=i.status;return a!==null&&a!==0}catch(t){return!1}}m.prototype._onXHRProgress=function(){var i=this;if(!_(i._xhr)||i._destroyed)return;i._response||i._connect(),i._response._onXHRProgress()},m.prototype._connect=function(){var i=this;if(i._destroyed)return;i._response=new h(i._xhr,i._fetchResponse,i._mode,i._fetchTimer),i._response.on("error",function(a){i.emit("error",a)}),i.emit("response",i._response)},m.prototype._write=function(i,a,t){var S=this;S._body.push(i),t()},m.prototype.abort=m.prototype.destroy=function(){var i=this;i._destroyed=!0,d.clearTimeout(i._fetchTimer),i._response&&(i._response._destroyed=!0),i._xhr?i._xhr.abort():i._fetchAbortController&&i._fetchAbortController.abort()},m.prototype.end=function(i,a,t){var S=this;typeof i=="function"&&(t=i,i=void 0),s.Writable.prototype.end.call(S,i,a,t)},m.prototype.flushHeaders=function(){},m.prototype.setTimeout=function(){},m.prototype.setNoDelay=function(){},m.prototype.setSocketKeepAlive=function(){};var y=["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,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("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(j,Z,L){(function(P,d,T){"use strict";var D=j("babel-runtime/core-js/promise"),u=p(D);function p(h){return h&&h.__esModule?h:{default:h}}var C=j("./capability"),E=j("inherits"),l=j("readable-stream"),s=L.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=L.IncomingMessage=function(h,f,c,m){var _=this;if(l.Readable.call(_),_._mode=c,_.headers={},_.rawHeaders=[],_.trailers={},_.rawTrailers=[],_.on("end",function(){P.nextTick(function(){_.emit("close")})}),c==="fetch"){var y=function o(){a.read().then(function(k){if(_._destroyed)return;if(k.done){d.clearTimeout(m),_.push(null);return}_.push(new T(k.value)),o()}).catch(function(k){d.clearTimeout(m),_._destroyed||_.emit("error",k)})};if(_._fetchResponse=f,_.url=f.url,_.statusCode=f.status,_.statusMessage=f.statusText,f.headers.forEach(function(o,k){_.headers[k.toLowerCase()]=o,_.rawHeaders.push(k,o)}),C.writableStream){var i=new WritableStream({write:function(k){return new u.default(function(O,b){_._destroyed?b():_.push(new T(k))?O():_._resumeFetch=O})},close:function(){d.clearTimeout(m),_._destroyed||_.push(null)},abort:function(k){_._destroyed||_.emit("error",k)}});try{f.body.pipeTo(i).catch(function(o){d.clearTimeout(m),_._destroyed||_.emit("error",o)});return}catch(o){}}var a=f.body.getReader();y()}else{_._xhr=h,_._pos=0,_.url=h.responseURL,_.statusCode=h.status,_.statusMessage=h.statusText;var t=h.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(o){var k=o.match(/^([^:]+):\s*(.*)/);if(k){var O=k[1].toLowerCase();O==="set-cookie"?(_.headers[O]===void 0&&(_.headers[O]=[]),_.headers[O].push(k[2])):_.headers[O]!==void 0?_.headers[O]+=", "+k[2]:_.headers[O]=k[2],_.rawHeaders.push(k[1],k[2])}}),_._charset="x-user-defined",!C.overrideMimeType){var S=_.rawHeaders["mime-type"];if(S){var x=S.match(/;\s*charset=([^;])(;|$)/);x&&(_._charset=x[1].toLowerCase())}_._charset||(_._charset="utf-8")}}};E(n,l.Readable),n.prototype._read=function(){var h=this,f=h._resumeFetch;f&&(h._resumeFetch=null,f())},n.prototype._onXHRProgress=function(){var h=this,f=h._xhr,c=null;switch(h._mode){case"text:vbarray":if(f.readyState!==s.DONE)break;try{c=new d.VBArray(f.responseBody).toArray()}catch(a){}if(c!==null){h.push(new T(c));break}case"text":try{c=f.responseText}catch(a){h._mode="text:vbarray";break}if(c.length>h._pos){var m=c.substr(h._pos);if(h._charset==="x-user-defined"){for(var _=new T(m.length),y=0;yh._pos&&(h.push(new T(new Uint8Array(i.result.slice(h._pos)))),h._pos=i.result.byteLength)},i.onload=function(){h.push(null)},i.readAsArrayBuffer(c);break}h._xhr.readyState===s.DONE&&h._mode!=="ms-stream"&&h.push(null)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(j,Z,L){"use strict";var P=j("safe-buffer").Buffer,d=P.isEncoding||function(i){i=""+i;switch(i&&i.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 T(i){if(!i)return"utf8";for(var a;;)switch(i){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 i;default:if(a)return;i=(""+i).toLowerCase(),a=!0}}function D(i){var a=T(i);if(typeof a!="string"&&(P.isEncoding===d||!d(i)))throw new Error("Unknown encoding: "+i);return a||i}L.StringDecoder=u;function u(i){this.encoding=D(i);var a;switch(this.encoding){case"utf16le":this.text=h,this.end=f,a=4;break;case"utf8":this.fillLast=l,a=4;break;case"base64":this.text=c,this.end=m,a=3;break;default:this.write=_,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(a)}u.prototype.write=function(i){if(i.length===0)return"";var a,t;if(this.lastNeed){if(a=this.fillLast(i),a===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t>5===6?2:i>>4===14?3:i>>3===30?4:i>>6===2?-1:-2}function C(i,a,t){var S=a.length-1;if(S=0?(x>0&&(i.lastNeed=x-1),x):--S=0?(x>0&&(i.lastNeed=x-2),x):--S=0?(x>0&&(x===2?x=0:i.lastNeed=x-3),x):0))}function E(i,a,t){if((a[0]&192)!==128)return i.lastNeed=0,"\uFFFD";if(i.lastNeed>1&&a.length>1){if((a[1]&192)!==128)return i.lastNeed=1,"\uFFFD";if(i.lastNeed>2&&a.length>2&&(a[2]&192)!==128)return i.lastNeed=2,"\uFFFD"}}function l(i){var a=this.lastTotal-this.lastNeed,t=E(this,i,a);if(t!==void 0)return t;if(this.lastNeed<=i.length)return i.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,a,0,i.length),this.lastNeed-=i.length}function s(i,a){var t=C(this,i,a);if(!this.lastNeed)return i.toString("utf8",a);this.lastTotal=t;var S=i.length-(t-this.lastNeed);return i.copy(this.lastChar,0,S),i.toString("utf8",a,S)}function n(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+"\uFFFD":a}function h(i,a){if((i.length-a)%2===0){var t=i.toString("utf16le",a);if(t){var S=t.charCodeAt(t.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=i[i.length-1],i.toString("utf16le",a,i.length-1)}function f(i){var a=i&&i.length?this.write(i):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function c(i,a){var t=(i.length-a)%3;return t===0?i.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=i[i.length-1]:(this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1]),i.toString("base64",a,i.length-t))}function m(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function _(i){return i.toString(this.encoding)}function y(i){return i&&i.length?this.write(i):""}},{"safe-buffer":228}],236:[function(j,Z,L){(function(P,d){var T=j("process/browser.js").nextTick,D=Function.prototype.apply,u=Array.prototype.slice,p={},C=0;L.setTimeout=function(){return new E(D.call(setTimeout,window,arguments),clearTimeout)},L.setInterval=function(){return new E(D.call(setInterval,window,arguments),clearInterval)},L.clearTimeout=L.clearInterval=function(l){l.close()};function E(l,s){this._id=l,this._clearFn=s}E.prototype.unref=E.prototype.ref=function(){},E.prototype.close=function(){this._clearFn.call(window,this._id)},L.enroll=function(l,s){clearTimeout(l._idleTimeoutId),l._idleTimeout=s},L.unenroll=function(l){clearTimeout(l._idleTimeoutId),l._idleTimeout=-1},L._unrefActive=L.active=function(l){clearTimeout(l._idleTimeoutId);var s=l._idleTimeout;s>=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},s))},L.setImmediate=typeof P=="function"?P:function(l){var s=C++,n=arguments.length<2?!1:u.call(arguments,1);return p[s]=!0,T(function(){p[s]&&(n?l.apply(null,n):l.call(null),L.clearImmediate(s))}),s},L.clearImmediate=typeof d=="function"?d:function(l){delete p[l]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,Z,L){var P=j("buffer").Buffer;Z.exports=function(d){if(d instanceof Uint8Array){if(d.byteOffset===0&&d.byteLength===d.buffer.byteLength)return d.buffer;if(typeof d.buffer.slice=="function")return d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength)}if(P.isBuffer(d)){for(var T=new Uint8Array(d.length),D=d.length,u=0;u",'"',"`"," ","\r",` `," "],E=["{","}","|","\\","^","`"].concat(C),l=["'"].concat(E),s=["%","/","?",";","#"].concat(l),n=["/","?","#"],h=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},i=j("querystring");function a(o,k,O){if(o&&d.isObject(o)&&o instanceof T)return o;var b=new T;return b.parse(o,k,O),b}T.prototype.parse=function(o,k,O){if(!d.isString(o))throw new TypeError("Parameter 'url' must be a string, not "+typeof o);var b=o.indexOf("?"),v=b!==-1&&b127?ke+="x":ke+=Re[ve];if(!ke.match(f)){var be=he.slice(0,K),ue=he.slice(K+1),le=Re.match(c);le&&(be.push(le[1]),ue.unshift(le[2])),ue.length&&(M="/"+ue.join(".")+M),this.hostname=be.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),ae||(this.hostname=P.toASCII(this.hostname));var re=this.port?":"+this.port:"",fe=this.hostname||"";this.host=fe+re,this.href+=this.host,ae&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!m[G])for(var K=0,pe=l.length;K0?O.host.split("@"):!1;ke&&(O.auth=ke.shift(),O.host=O.hostname=ke.shift())}return O.search=o.search,O.query=o.query,(!d.isNull(O.pathname)||!d.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!he.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var ve=he.slice(-1)[0],Te=(O.host||o.host||he.length>1)&&(ve==="."||ve==="..")||ve==="",be=0,ue=he.length;ue>=0;ue--)ve=he[ue],ve==="."?he.splice(ue,1):ve===".."?(he.splice(ue,1),be++):be&&(he.splice(ue,1),be--);if(!V&&!ae)for(;be--;be)he.unshift("..");V&&he[0]!==""&&(!he[0]||he[0].charAt(0)!=="/")&&he.unshift(""),Te&&he.join("/").substr(-1)!=="/"&&he.push("");var le=he[0]===""||he[0]&&he[0].charAt(0)==="/";if(Re){O.hostname=O.host=le?"":he.length?he.shift():"";var ke=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;ke&&(O.auth=ke.shift(),O.host=O.hostname=ke.shift())}return V=V||O.host&&he.length,V&&!le&&he.unshift(""),he.length?O.pathname=he.join("/"):(O.pathname=null,O.path=null),(!d.isNull(O.pathname)||!d.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=o.auth||O.auth,O.slashes=O.slashes||o.slashes,O.href=O.format(),O},T.prototype.parseHost=function(){var o=this.host,k=u.exec(o);k&&(k=k[0],k!==":"&&(this.port=k.substr(1)),o=o.substr(0,o.length-k.length)),o&&(this.hostname=o)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,Z,L){"use strict";Z.exports={isString:function(P){return typeof P=="string"},isObject:function(P){return typeof P=="object"&&P!==null},isNull:function(P){return P===null},isNullOrUndefined:function(P){return P==null}}},{}],240:[function(j,Z,L){(function(P){Z.exports=d;function d(D,u){if(T("noDeprecation"))return D;var p=!1;function C(){if(!p){if(T("throwDeprecation"))throw new Error(u);T("traceDeprecation")?console.trace(u):console.warn(u),p=!0}return D.apply(this,arguments)}return C}function T(D){try{if(!P.localStorage)return!1}catch(p){return!1}var u=P.localStorage[D];return u==null?!1:String(u).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,Z,L){typeof Object.create=="function"?Z.exports=function(d,T){d.super_=T,d.prototype=Object.create(T.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:Z.exports=function(d,T){d.super_=T;var D=function(){};D.prototype=T.prototype,d.prototype=new D,d.prototype.constructor=d}},{}],242:[function(j,Z,L){Z.exports=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"}},{}],243:[function(j,Z,L){(function(P,d){var T=/%[sdj%]/g;L.format=function(H){if(!S(H)){for(var K=[],U=0;U=V)return pe;switch(pe){case"%s":return String(B[U++]);case"%d":return Number(B[U++]);case"%j":try{return JSON.stringify(B[U++])}catch(Re){return"[Circular]"}default:return pe}}),he=B[U];U=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),y(K)?U.showHidden=K:K&&L._extend(U,K),o(U.showHidden)&&(U.showHidden=!1),o(U.depth)&&(U.depth=2),o(U.colors)&&(U.colors=!1),o(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=C),s(U,H,U.depth)}L.inspect=p,p.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]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function C(H,K){var U=p.styles[K];return U?"["+p.colors[U][0]+"m"+H+"["+p.colors[U][1]+"m":H}function E(H,K){return H}function l(H){var K={};return H.forEach(function(U,B){K[U]=!0}),K}function s(H,K,U){if(H.customInspect&&K&&g(K.inspect)&&K.inspect!==L.inspect&&!(K.constructor&&K.constructor.prototype===K)){var B=K.inspect(U,H);return S(B)||(B=s(H,B,U)),B}var V=n(H,K);if(V)return V;var ae=Object.keys(K),he=l(ae);if(H.showHidden&&(ae=Object.getOwnPropertyNames(K)),v(K)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return h(K);if(ae.length===0){if(g(K)){var pe=K.name?": "+K.name:"";return H.stylize("[Function"+pe+"]","special")}if(k(K))return H.stylize(RegExp.prototype.toString.call(K),"regexp");if(b(K))return H.stylize(Date.prototype.toString.call(K),"date");if(v(K))return h(K)}var Re="",ke=!1,ve=["{","}"];if(_(K)&&(ke=!0,ve=["[","]"]),g(K)){var Te=K.name?": "+K.name:"";Re=" [Function"+Te+"]"}if(k(K)&&(Re=" "+RegExp.prototype.toString.call(K)),b(K)&&(Re=" "+Date.prototype.toUTCString.call(K)),v(K)&&(Re=" "+h(K)),ae.length===0&&(!ke||K.length==0))return ve[0]+Re+ve[1];if(U<0)return k(K)?H.stylize(RegExp.prototype.toString.call(K),"regexp"):H.stylize("[Object]","special");H.seen.push(K);var be;return ke?be=f(H,K,U,he,ae):be=ae.map(function(ue){return c(H,K,U,he,ue,ke)}),H.seen.pop(),m(be,Re,ve)}function n(H,K){if(o(K))return H.stylize("undefined","undefined");if(S(K)){var U="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(U,"string")}if(t(K))return H.stylize(""+K,"number");if(y(K))return H.stylize(""+K,"boolean");if(i(K))return H.stylize("null","null")}function h(H){return"["+Error.prototype.toString.call(H)+"]"}function f(H,K,U,B,V){for(var ae=[],he=0,pe=K.length;he-1&&(ae?pe=pe.split(` `).map(function(ke){return" "+ke}).join(` `).substr(2):pe=` `+pe.split(` `).map(function(ke){return" "+ke}).join(` `))):pe=H.stylize("[Circular]","special")),o(he)){if(ae&&V.match(/^\d+$/))return pe;he=JSON.stringify(""+V),he.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(he=he.substr(1,he.length-2),he=H.stylize(he,"name")):(he=he.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),he=H.stylize(he,"string"))}return he+": "+pe}function m(H,K,U){var B=0,V=H.reduce(function(ae,he){return B++,he.indexOf(` `)>=0&&B++,ae+he.replace(/\u001b\[\d\d?m/g,"").length+1},0);return V>60?U[0]+(K===""?"":K+` `)+" "+H.join(`, `)+" "+U[1]:U[0]+K+" "+H.join(", ")+" "+U[1]}function _(H){return Array.isArray(H)}L.isArray=_;function y(H){return typeof H=="boolean"}L.isBoolean=y;function i(H){return H===null}L.isNull=i;function a(H){return H==null}L.isNullOrUndefined=a;function t(H){return typeof H=="number"}L.isNumber=t;function S(H){return typeof H=="string"}L.isString=S;function x(H){return typeof H=="symbol"}L.isSymbol=x;function o(H){return H===void 0}L.isUndefined=o;function k(H){return O(H)&&M(H)==="[object RegExp]"}L.isRegExp=k;function O(H){return typeof H=="object"&&H!==null}L.isObject=O;function b(H){return O(H)&&M(H)==="[object Date]"}L.isDate=b;function v(H){return O(H)&&(M(H)==="[object Error]"||H instanceof Error)}L.isError=v;function g(H){return typeof H=="function"}L.isFunction=g;function w(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||typeof H=="undefined"}L.isPrimitive=w,L.isBuffer=j("./support/isBuffer");function M(H){return Object.prototype.toString.call(H)}function N(H){return H<10?"0"+H.toString(10):H.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var H=new Date,K=[N(H.getHours()),N(H.getMinutes()),N(H.getSeconds())].join(":");return[H.getDate(),I[H.getMonth()],K].join(" ")}L.log=function(){console.log("%s - %s",G(),L.format.apply(L,arguments))},L.inherits=j("inherits"),L._extend=function(H,K){if(!K||!O(K))return H;for(var U=Object.keys(K),B=U.length;B--;)H[U[B]]=K[U[B]];return H};function z(H,K){return Object.prototype.hasOwnProperty.call(H,K)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(j,Z,L){"use strict";(function(){"use strict";L.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(j,Z,L){"use strict";var P=j("babel-runtime/helpers/typeof"),d=u(P),T=j("babel-runtime/core-js/object/keys"),D=u(T);function u(p){return p&&p.__esModule?p:{default:p}}(function(){"use strict";var p,C,E,l,s,n={}.hasOwnProperty;p=j("xmlbuilder"),C=j("./defaults").defaults,l=function(f){return typeof f=="string"&&(f.indexOf("&")>=0||f.indexOf(">")>=0||f.indexOf("<")>=0)},s=function(f){return""},E=function(f){return f.replace("]]>","]]]]>")},L.Builder=function(){function h(f){var c,m,_;this.options={},m=C["0.2"];for(c in m){if(!n.call(m,c))continue;_=m[c],this.options[c]=_}for(c in f){if(!n.call(f,c))continue;_=f[c],this.options[c]=_}}return h.prototype.buildObject=function(f){var c,m,_,y,i;return c=this.options.attrkey,m=this.options.charkey,(0,D.default)(f).length===1&&this.options.rootName===C["0.2"].rootName?(i=(0,D.default)(f)[0],f=f[i]):i=this.options.rootName,_=function(a){return function(t,S){var x,o,k,O,b,v;if((typeof S=="undefined"?"undefined":(0,d.default)(S))!=="object")a.options.cdata&&l(S)?t.raw(s(S)):t.txt(S);else if(Array.isArray(S))for(O in S){if(!n.call(S,O))continue;o=S[O];for(b in o)k=o[b],t=_(t.ele(b),k).up()}else for(b in S){if(!n.call(S,b))continue;if(o=S[b],b===c){if((typeof o=="undefined"?"undefined":(0,d.default)(o))==="object")for(x in o)v=o[x],t=t.att(x,v)}else if(b===m)a.options.cdata&&l(o)?t=t.raw(s(o)):t=t.txt(o);else if(Array.isArray(o))for(O in o){if(!n.call(o,O))continue;k=o[O],typeof k=="string"?a.options.cdata&&l(k)?t=t.ele(b).raw(s(k)).up():t=t.ele(b,k).up():t=_(t.ele(b),k).up()}else(typeof o=="undefined"?"undefined":(0,d.default)(o))==="object"?t=_(t.ele(b),o).up():typeof o=="string"&&a.options.cdata&&l(o)?t=t.ele(b).raw(s(o)).up():(o==null&&(o=""),t=t.ele(b,o.toString()).up())}return t}}(this),y=p.create(i,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),_(y,f).end(this.options.renderOpts)},h}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,Z,L){"use strict";(function(){L.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(j,Z,L){"use strict";var P=j("babel-runtime/core-js/promise"),d=l(P),T=j("babel-runtime/core-js/object/get-own-property-names"),D=l(T),u=j("babel-runtime/core-js/object/keys"),p=l(u),C=j("babel-runtime/helpers/typeof"),E=l(C);function l(s){return s&&s.__esModule?s:{default:s}}(function(){"use strict";var s,n,h,f,c,m,_,y,i=function(x,o){return function(){return x.apply(o,arguments)}},a=function(x,o){for(var k in o)t.call(o,k)&&(x[k]=o[k]);function O(){this.constructor=x}return O.prototype=o.prototype,x.prototype=new O,x.__super__=o.prototype,x},t={}.hasOwnProperty;_=j("sax"),h=j("events"),s=j("./bom"),m=j("./processors"),y=j("timers").setImmediate,n=j("./defaults").defaults,f=function(x){return(typeof x=="undefined"?"undefined":(0,E.default)(x))==="object"&&x!=null&&(0,p.default)(x).length===0},c=function(x,o,k){var O,b,v;for(O=0,b=x.length;O0&&(N[v.options.childkey]=G),G=N;else if(K){K[v.options.childkey]=K[v.options.childkey]||[],z={};for(M in G){if(!t.call(G,M))continue;z[M]=G[M]}K[v.options.childkey].push(z),delete G["#name"],(0,p.default)(G).length===1&&k in G&&!v.EXPLICIT_CHARKEY&&(G=G[k])}}return b.length>0?v.assignOrPush(K,I,G):(v.options.explicitRoot&&(H=G,G={},G[I]=H),v.resultObject=G,v.saxParser.ended=!0,v.emit("end",v.resultObject))}}(this),O=function(v){return function(g){var w,M;if(M=b[b.length-1],M)return M[k]+=g,v.options.explicitChildren&&v.options.preserveChildrenOrder&&v.options.charsAsChildren&&(v.options.includeWhiteChars||g.replace(/\\n/g,"").trim()!=="")&&(M[v.options.childkey]=M[v.options.childkey]||[],w={"#name":"__text__"},w[k]=g,v.options.normalize&&(w[k]=w[k].replace(/\s{2,}/g," ").trim()),M[v.options.childkey].push(w)),M}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(v){return function(g){var w;if(w=O(g),w)return w.cdata=!0}}(this)},x.prototype.parseString=function(o,k){var O;k!=null&&typeof k=="function"&&(this.on("end",function(b){return this.reset(),k(null,b)}),this.on("error",function(b){return this.reset(),k(b)}));try{return o=o.toString(),o.trim()===""?(this.emit("end",null),!0):(o=s.stripBOM(o),this.options.async?(this.remaining=o,y(this.processAsync),this.saxParser):this.saxParser.write(o).close())}catch(b){if(O=b,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},x.prototype.parseStringPromise=function(o){return new d.default(function(k){return function(O,b){return k.parseString(o,function(v,g){return v?b(v):O(g)})}}(this))},x}(h),L.parseString=function(S,x,o){var k,O,b;return o!=null?(typeof o=="function"&&(k=o),(typeof x=="undefined"?"undefined":(0,E.default)(x))==="object"&&(O=x)):(typeof x=="function"&&(k=x),O={}),b=new L.Parser(O),b.parseString(S,k)},L.parseStringPromise=function(S,x){var o,k;return(typeof x=="undefined"?"undefined":(0,E.default)(x))==="object"&&(o=x),k=new L.Parser(o),k.parseStringPromise(S)}}).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(j,Z,L){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),L.normalize=function(d){return d.toLowerCase()},L.firstCharLowerCase=function(d){return d.charAt(0).toLowerCase()+d.slice(1)},L.stripPrefix=function(d){return d.replace(P,"")},L.parseNumbers=function(d){return isNaN(d)||(d=d%1===0?parseInt(d,10):parseFloat(d)),d},L.parseBooleans=function(d){return/^(?:true|false)$/i.test(d)&&(d=d.toLowerCase()==="true"),d}}).call(void 0)},{}],249:[function(j,Z,L){"use strict";(function(){"use strict";var P,d,T,D,u=function(E,l){for(var s in l)p.call(l,s)&&(E[s]=l[s]);function n(){this.constructor=E}return n.prototype=l.prototype,E.prototype=new n,E.__super__=l.prototype,E},p={}.hasOwnProperty;d=j("./defaults"),P=j("./builder"),T=j("./parser"),D=j("./processors"),L.defaults=d.defaults,L.processors=D,L.ValidationError=function(C){u(E,C);function E(l){this.message=l}return E}(Error),L.Builder=P.Builder,L.Parser=T.Parser,L.parseString=T.parseString,L.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,Z,L){"use strict";(function(){Z.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,Z,L){"use strict";(function(){Z.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(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/get-prototype-of"),d=C(P),T=j("babel-runtime/helpers/typeof"),D=C(T),u=j("babel-runtime/core-js/object/assign"),p=C(u);function C(E){return E&&E.__esModule?E:{default:E}}(function(){var E,l,s,n,h,f,c,m=[].slice,_={}.hasOwnProperty;E=function(){var i,a,t,S,x,o;if(o=arguments[0],x=2<=arguments.length?m.call(arguments,1):[],h(p.default))p.default.apply(null,arguments);else for(i=0,t=x.length;i":"attribute: {"+E+"}, parent: <"+this.parent.name+">"},C.prototype.isEqualNode=function(E){return E.namespaceURI!==this.namespaceURI||(E.prefix!==this.prefix||E.localName!==this.localName)?!1:!(E.value!==this.value)},C}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;D=j("./NodeType"),p=j("./XMLCharacterData"),Z.exports=u=function(l){C(s,l);function s(n,h){if(s.__super__.constructor.call(this,n),h==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=D.CData,this.value=this.stringify.cdata(h)}return s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},s}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p=function(l,s){for(var n in s)C.call(s,n)&&(l[n]=s[n]);function h(){this.constructor=l}return h.prototype=s.prototype,l.prototype=new h,l.__super__=s.prototype,l},C={}.hasOwnProperty;u=j("./XMLNode"),Z.exports=D=function(E){p(l,E);function l(s){l.__super__.constructor.call(this,s),this.value=""}return Object.defineProperty(l.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(l.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(l.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),l.prototype.clone=function(){return(0,d.default)(this)},l.prototype.substringData=function(s,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.appendData=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.insertData=function(s,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.deleteData=function(s,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.replaceData=function(s,n,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isEqualNode=function(s){return l.__super__.isEqualNode.apply(this,arguments).isEqualNode(s)?!(s.data!==this.data):!1},l}(u)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),Z.exports=p=function(l){C(s,l);function s(n,h){if(s.__super__.constructor.call(this,n),h==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=D.Comment,this.value=this.stringify.comment(h)}return s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},s}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=u(P),T=j("babel-runtime/core-js/object/create"),D=u(T);function u(p){return p&&p.__esModule?p:{default:p}}(function(){var p,C,E;C=j("./XMLDOMErrorHandler"),E=j("./XMLDOMStringList"),Z.exports=p=function(){function l(){var s;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new C,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=s=(0,D.default)(this.defaultParams)}return Object.defineProperty(l.prototype,"parameterNames",{get:function(){return new E((0,d.default)(this.defaultParams))}}),l.prototype.getParameter=function(s){return this.params.hasOwnProperty(s)?this.params[s]:null},l.prototype.canSetParameter=function(s,n){return!0},l.prototype.setParameter=function(s,n){return n!=null?this.params[s]=n:delete this.params[s]},l}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,Z,L){"use strict";(function(){var P;Z.exports=P=function(){function d(){}return d.prototype.handleError=function(T){throw new Error(T)},d}()}).call(void 0)},{}],260:[function(j,Z,L){"use strict";(function(){var P;Z.exports=P=function(){function d(){}return d.prototype.hasFeature=function(T,D){return!0},d.prototype.createDocumentType=function(T,D,u){throw new Error("This DOM method is not implemented.")},d.prototype.createDocument=function(T,D,u){throw new Error("This DOM method is not implemented.")},d.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},d.prototype.getFeature=function(T,D){throw new Error("This DOM method is not implemented.")},d}()}).call(void 0)},{}],261:[function(j,Z,L){"use strict";(function(){var P;Z.exports=P=function(){function d(T){this.arr=T||[]}return Object.defineProperty(d.prototype,"length",{get:function(){return this.arr.length}}),d.prototype.item=function(T){return this.arr[T]||null},d.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},d}()}).call(void 0)},{}],262:[function(j,Z,L){"use strict";(function(){var P,d,T,D=function(C,E){for(var l in E)u.call(E,l)&&(C[l]=E[l]);function s(){this.constructor=C}return s.prototype=E.prototype,C.prototype=new s,C.__super__=E.prototype,C},u={}.hasOwnProperty;T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(p){D(C,p);function C(E,l,s,n,h,f){if(C.__super__.constructor.call(this,E),l==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(s==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(l));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(l));if(!h)throw new Error("Missing DTD attribute default. "+this.debugInfo(l));if(h.indexOf("#")!==0&&(h="#"+h),!h.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(l));if(f&&!h.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=P.AttributeDeclaration,this.attributeName=this.stringify.name(s),this.attributeType=this.stringify.dtdAttType(n),f&&(this.defaultValue=this.stringify.dtdAttDefault(f)),this.defaultValueType=h}return C.prototype.toString=function(E){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(E))},C}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,Z,L){"use strict";(function(){var P,d,T,D=function(C,E){for(var l in E)u.call(E,l)&&(C[l]=E[l]);function s(){this.constructor=C}return s.prototype=E.prototype,C.prototype=new s,C.__super__=E.prototype,C},u={}.hasOwnProperty;T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(p){D(C,p);function C(E,l,s){if(C.__super__.constructor.call(this,E),l==null)throw new Error("Missing DTD element name. "+this.debugInfo());s||(s="(#PCDATA)"),Array.isArray(s)&&(s="("+s.join(",")+")"),this.name=this.stringify.name(l),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(s)}return C.prototype.toString=function(E){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(E))},C}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u=function(E,l){for(var s in l)p.call(l,s)&&(E[s]=l[s]);function n(){this.constructor=E}return n.prototype=l.prototype,E.prototype=new n,E.__super__=l.prototype,E},p={}.hasOwnProperty;D=j("./Utility").isObject,T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(C){u(E,C);function E(l,s,n,h){if(E.__super__.constructor.call(this,l),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(h==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!s,this.name=this.stringify.name(n),this.type=P.EntityDeclaration,!D(h))this.value=this.stringify.dtdEntityValue(h),this.internal=!0;else{if(!h.pubID&&!h.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(h.pubID&&!h.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID)),h.nData!=null&&(this.nData=this.stringify.dtdNData(h.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}return Object.defineProperty(E.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(E.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(E.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(E.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(E.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(E.prototype,"xmlVersion",{get:function(){return null}}),E.prototype.toString=function(l){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(l))},E}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,Z,L){"use strict";(function(){var P,d,T,D=function(C,E){for(var l in E)u.call(E,l)&&(C[l]=E[l]);function s(){this.constructor=C}return s.prototype=E.prototype,C.prototype=new s,C.__super__=E.prototype,C},u={}.hasOwnProperty;T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(p){D(C,p);function C(E,l,s){if(C.__super__.constructor.call(this,E),l==null)throw new Error("Missing DTD notation name. "+this.debugInfo(l));if(!s.pubID&&!s.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=P.NotationDeclaration,s.pubID!=null&&(this.pubID=this.stringify.dtdPubID(s.pubID)),s.sysID!=null&&(this.sysID=this.stringify.dtdSysID(s.sysID))}return Object.defineProperty(C.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(C.prototype,"systemId",{get:function(){return this.sysID}}),C.prototype.toString=function(E){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(E))},C}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u=function(E,l){for(var s in l)p.call(l,s)&&(E[s]=l[s]);function n(){this.constructor=E}return n.prototype=l.prototype,E.prototype=new n,E.__super__=l.prototype,E},p={}.hasOwnProperty;D=j("./Utility").isObject,T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(C){u(E,C);function E(l,s,n,h){var f;E.__super__.constructor.call(this,l),D(s)&&(f=s,s=f.version,n=f.encoding,h=f.standalone),s||(s="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(s),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),h!=null&&(this.standalone=this.stringify.xmlStandalone(h))}return E.prototype.toString=function(l){return this.options.writer.declaration(this,this.options.writer.filterOptions(l))},E}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l,s=function(f,c){for(var m in c)n.call(c,m)&&(f[m]=c[m]);function _(){this.constructor=f}return _.prototype=c.prototype,f.prototype=new _,f.__super__=c.prototype,f},n={}.hasOwnProperty;l=j("./Utility").isObject,E=j("./XMLNode"),P=j("./NodeType"),d=j("./XMLDTDAttList"),D=j("./XMLDTDEntity"),T=j("./XMLDTDElement"),u=j("./XMLDTDNotation"),C=j("./XMLNamedNodeMap"),Z.exports=p=function(h){s(f,h);function f(c,m,_){var y,i,a,t,S,x;if(f.__super__.constructor.call(this,c),this.type=P.DocType,c.children){for(t=c.children,i=0,a=t.length;i=0;)this.up();return this.onEnd()},b.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},b.prototype.openNode=function(v){var g,w,M,N;if(!v.isOpen){if(!this.root&&this.currentLevel===0&&v.type===P.Element&&(this.root=v),w="",v.type===P.Element){this.writerOptions.state=d.OpenTag,w=this.writer.indent(v,this.writerOptions,this.currentLevel)+"<"+v.name,N=v.attribs;for(M in N){if(!O.call(N,M))continue;g=N[M],w+=this.writer.attribute(g,this.writerOptions,this.currentLevel)}w+=(v.children?">":"/>")+this.writer.endline(v,this.writerOptions,this.currentLevel),this.writerOptions.state=d.InsideTag}else this.writerOptions.state=d.OpenTag,w=this.writer.indent(v,this.writerOptions,this.currentLevel)+""),w+=this.writer.endline(v,this.writerOptions,this.currentLevel);return this.onData(w,this.currentLevel),v.isOpen=!0}},b.prototype.closeNode=function(v){var g;if(!v.isClosed)return g="",this.writerOptions.state=d.CloseTag,v.type===P.Element?g=this.writer.indent(v,this.writerOptions,this.currentLevel)+""+this.writer.endline(v,this.writerOptions,this.currentLevel):g=this.writer.indent(v,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(v,this.writerOptions,this.currentLevel),this.writerOptions.state=d.None,this.onData(g,this.currentLevel),v.isClosed=!0},b.prototype.onData=function(v,g){return this.documentStarted=!0,this.onDataCallback(v,g+1)},b.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},b.prototype.debugInfo=function(v){return v==null?"":"node: <"+v+">"},b.prototype.ele=function(){return this.element.apply(this,arguments)},b.prototype.nod=function(v,g,w){return this.node(v,g,w)},b.prototype.txt=function(v){return this.text(v)},b.prototype.dat=function(v){return this.cdata(v)},b.prototype.com=function(v){return this.comment(v)},b.prototype.ins=function(v,g){return this.instruction(v,g)},b.prototype.dec=function(v,g,w){return this.declaration(v,g,w)},b.prototype.dtd=function(v,g,w){return this.doctype(v,g,w)},b.prototype.e=function(v,g,w){return this.element(v,g,w)},b.prototype.n=function(v,g,w){return this.node(v,g,w)},b.prototype.t=function(v){return this.text(v)},b.prototype.d=function(v){return this.cdata(v)},b.prototype.c=function(v){return this.comment(v)},b.prototype.r=function(v){return this.raw(v)},b.prototype.i=function(v,g){return this.instruction(v,g)},b.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.ent=function(v,g){return this.entity(v,g)},b.prototype.pent=function(v,g){return this.pEntity(v,g)},b.prototype.not=function(v,g){return this.notation(v,g)},b}()}).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(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;p=j("./XMLNode"),D=j("./NodeType"),Z.exports=u=function(l){C(s,l);function s(n){s.__super__.constructor.call(this,n),this.type=D.Dummy}return s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return""},s}(p)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C,E,l,s,n,h,f=function(_,y){for(var i in y)c.call(y,i)&&(_[i]=y[i]);function a(){this.constructor=_}return a.prototype=y.prototype,_.prototype=new a,_.__super__=y.prototype,_},c={}.hasOwnProperty;h=j("./Utility"),n=h.isObject,s=h.isFunction,l=h.getValue,E=j("./XMLNode"),D=j("./NodeType"),u=j("./XMLAttribute"),C=j("./XMLNamedNodeMap"),Z.exports=p=function(m){f(_,m);function _(y,i,a){var t,S,x,o;if(_.__super__.constructor.call(this,y),i==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(i),this.type=D.Element,this.attribs={},this.schemaTypeInfo=null,a!=null&&this.attribute(a),y.type===D.Document&&(this.isRoot=!0,this.documentObject=y,y.rootObject=this,y.children)){for(o=y.children,S=0,x=o.length;S=t;i=0<=t?++a:--a)if(!this.attribs[i].isEqualNode(y.attribs[i]))return!1;return!0},_}(E)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D;Z.exports=D=function(){function u(p){this.nodes=p}return Object.defineProperty(u.prototype,"length",{get:function(){return(0,d.default)(this.nodes).length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.getNamedItem=function(p){return this.nodes[p]},u.prototype.setNamedItem=function(p){var C;return C=this.nodes[p.nodeName],this.nodes[p.nodeName]=p,C||null},u.prototype.removeNamedItem=function(p){var C;return C=this.nodes[p],delete this.nodes[p],C||null},u.prototype.item=function(p){return this.nodes[(0,d.default)(this.nodes)[p]]||null},u.prototype.getNamedItemNS=function(p,C){throw new Error("This DOM method is not implemented.")},u.prototype.setNamedItemNS=function(p){throw new Error("This DOM method is not implemented.")},u.prototype.removeNamedItemNS=function(p,C){throw new Error("This DOM method is not implemented.")},u}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l,s,n,h,f,c,m,_,y,i,a,t={}.hasOwnProperty;a=j("./Utility"),i=a.isObject,y=a.isFunction,_=a.isEmpty,m=a.getValue,E=null,T=null,D=null,u=null,p=null,f=null,c=null,h=null,C=null,d=null,n=null,l=null,P=null,Z.exports=s=function(){function S(x){this.parent=x,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,E||(E=j("./XMLElement"),T=j("./XMLCData"),D=j("./XMLComment"),u=j("./XMLDeclaration"),p=j("./XMLDocType"),f=j("./XMLRaw"),c=j("./XMLText"),h=j("./XMLProcessingInstruction"),C=j("./XMLDummy"),d=j("./NodeType"),n=j("./XMLNodeList"),l=j("./XMLNamedNodeMap"),P=j("./DocumentPosition"))}return Object.defineProperty(S.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(S.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(S.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(S.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(S.prototype,"previousSibling",{get:function(){var o;return o=this.parent.children.indexOf(this),this.parent.children[o-1]||null}}),Object.defineProperty(S.prototype,"nextSibling",{get:function(){var o;return o=this.parent.children.indexOf(this),this.parent.children[o+1]||null}}),Object.defineProperty(S.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(S.prototype,"textContent",{get:function(){var o,k,O,b,v;if(this.nodeType===d.Element||this.nodeType===d.DocumentFragment){for(v="",b=this.children,k=0,O=b.length;k":((k=this.parent)!=null?k.name:void 0)?"node: <"+x+">, parent: <"+this.parent.name+">":"node: <"+x+">"},S.prototype.ele=function(x,o,k){return this.element(x,o,k)},S.prototype.nod=function(x,o,k){return this.node(x,o,k)},S.prototype.txt=function(x){return this.text(x)},S.prototype.dat=function(x){return this.cdata(x)},S.prototype.com=function(x){return this.comment(x)},S.prototype.ins=function(x,o){return this.instruction(x,o)},S.prototype.doc=function(){return this.document()},S.prototype.dec=function(x,o,k){return this.declaration(x,o,k)},S.prototype.e=function(x,o,k){return this.element(x,o,k)},S.prototype.n=function(x,o,k){return this.node(x,o,k)},S.prototype.t=function(x){return this.text(x)},S.prototype.d=function(x){return this.cdata(x)},S.prototype.c=function(x){return this.comment(x)},S.prototype.r=function(x){return this.raw(x)},S.prototype.i=function(x,o){return this.instruction(x,o)},S.prototype.u=function(){return this.up()},S.prototype.importXMLBuilder=function(x){return this.importDocument(x)},S.prototype.replaceChild=function(x,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.appendChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasChildNodes=function(){return this.children.length!==0},S.prototype.cloneNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isSupported=function(x,o){return!0},S.prototype.hasAttributes=function(){return this.attribs.length!==0},S.prototype.compareDocumentPosition=function(x){var o,k;return o=this,o===x?0:this.document()!==x.document()?(k=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?k|=P.Preceding:k|=P.Following,k):o.isAncestor(x)?P.Contains|P.Preceding:o.isDescendant(x)?P.Contains|P.Following:o.isPreceding(x)?P.Preceding:P.Following},S.prototype.isSameNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupPrefix=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isDefaultNamespace=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupNamespaceURI=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(x){var o,k,O;if(x.nodeType!==this.nodeType)return!1;if(x.children.length!==this.children.length)return!1;for(o=k=0,O=this.children.length-1;0<=O?k<=O:k>=O;o=0<=O?++k:--k)if(!this.children[o].isEqualNode(x.children[o]))return!1;return!0},S.prototype.getFeature=function(x,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setUserData=function(x,o,k){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getUserData=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.contains=function(x){return x?x===this||this.isDescendant(x):!1},S.prototype.isDescendant=function(x){var o,k,O,b,v;for(v=this.children,O=0,b=v.length;Ok},S.prototype.treePosition=function(x){var o,k;return k=0,o=!1,this.foreachTreeNode(this.document(),function(O){if(k++,!o&&O===x)return o=!0}),o?k:-1},S.prototype.foreachTreeNode=function(x,o){var k,O,b,v,g;for(x||(x=this.document()),v=x.children,O=0,b=v.length;O0){for(this.stream.write(" ["),this.stream.write(this.endline(l,s,n)),s.state=d.InsideTag,m=l.children,f=0,c=m.length;f"),this.stream.write(this.endline(l,s,n)),s.state=d.None,this.closeNode(l,s,n)},E.prototype.element=function(l,s,n){var h,f,c,m,_,y,i,a,t,S;n||(n=0),this.openNode(l,s,n),s.state=d.OpenTag,this.stream.write(this.indent(l,s,n)+"<"+l.name),t=l.attribs;for(i in t){if(!p.call(t,i))continue;h=t[i],this.attribute(h,s,n)}if(c=l.children.length,m=c===0?null:l.children[0],c===0||l.children.every(function(x){return(x.type===P.Text||x.type===P.Raw)&&x.value===""}))s.allowEmpty?(this.stream.write(">"),s.state=d.CloseTag,this.stream.write("")):(s.state=d.CloseTag,this.stream.write(s.spaceBeforeSlash+"/>"));else if(s.pretty&&c===1&&(m.type===P.Text||m.type===P.Raw)&&m.value!=null)this.stream.write(">"),s.state=d.InsideTag,s.suppressPrettyCount++,a=!0,this.writeChildNode(m,s,n+1),s.suppressPrettyCount--,a=!1,s.state=d.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(l,s,n)),s.state=d.InsideTag,S=l.children,_=0,y=S.length;_")}return this.stream.write(this.endline(l,s,n)),s.state=d.None,this.closeNode(l,s,n)},E.prototype.processingInstruction=function(l,s,n){return this.stream.write(E.__super__.processingInstruction.call(this,l,s,n))},E.prototype.raw=function(l,s,n){return this.stream.write(E.__super__.raw.call(this,l,s,n))},E.prototype.text=function(l,s,n){return this.stream.write(E.__super__.text.call(this,l,s,n))},E.prototype.dtdAttList=function(l,s,n){return this.stream.write(E.__super__.dtdAttList.call(this,l,s,n))},E.prototype.dtdElement=function(l,s,n){return this.stream.write(E.__super__.dtdElement.call(this,l,s,n))},E.prototype.dtdEntity=function(l,s,n){return this.stream.write(E.__super__.dtdEntity.call(this,l,s,n))},E.prototype.dtdNotation=function(l,s,n){return this.stream.write(E.__super__.dtdNotation.call(this,l,s,n))},E}(D)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,Z,L){"use strict";(function(){var P,d,T=function(p,C){for(var E in C)D.call(C,E)&&(p[E]=C[E]);function l(){this.constructor=p}return l.prototype=C.prototype,p.prototype=new l,p.__super__=C.prototype,p},D={}.hasOwnProperty;d=j("./XMLWriterBase"),Z.exports=P=function(u){T(p,u);function p(C){p.__super__.constructor.call(this,C)}return p.prototype.document=function(C,E){var l,s,n,h,f;for(E=this.filterOptions(E),h="",f=C.children,s=0,n=f.length;s","]]]]>"),this.assertLegalChar(u))},D.prototype.comment=function(u){if(this.options.noValidation)return u;if(u=""+u||"",u.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+u);return this.assertLegalChar(u)},D.prototype.raw=function(u){return this.options.noValidation?u:""+u||""},D.prototype.attValue=function(u){return this.options.noValidation?u:this.assertLegalChar(this.attEscape(u=""+u||""))},D.prototype.insTarget=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.insValue=function(u){if(this.options.noValidation)return u;if(u=""+u||"",u.match(/\?>/))throw new Error("Invalid processing instruction value: "+u);return this.assertLegalChar(u)},D.prototype.xmlVersion=function(u){if(this.options.noValidation)return u;if(u=""+u||"",!u.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+u);return u},D.prototype.xmlEncoding=function(u){if(this.options.noValidation)return u;if(u=""+u||"",!u.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+u);return this.assertLegalChar(u)},D.prototype.xmlStandalone=function(u){return this.options.noValidation?u:u?"yes":"no"},D.prototype.dtdPubID=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdSysID=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdElementValue=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdAttType=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdAttDefault=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdEntityValue=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdNData=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.convertAttKey="@",D.prototype.convertPIKey="?",D.prototype.convertTextKey="#text",D.prototype.convertCDataKey="#cdata",D.prototype.convertCommentKey="#comment",D.prototype.convertRawKey="#raw",D.prototype.assertLegalChar=function(u){var p,C;if(this.options.noValidation)return u;if(p="",this.options.version==="1.0"){if(p=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=u.match(p))throw new Error("Invalid character in string: "+u+" at index "+C.index)}else if(this.options.version==="1.1"&&(p=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=u.match(p)))throw new Error("Invalid character in string: "+u+" at index "+C.index);return u},D.prototype.assertLegalName=function(u){var p;if(this.options.noValidation)return u;if(this.assertLegalChar(u),p=/^([: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])*$/,!u.match(p))throw new Error("Invalid character in name");return u},D.prototype.textEscape=function(u){var p;return this.options.noValidation?u:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(p,"&").replace(//g,">").replace(/\r/g," "))},D.prototype.attEscape=function(u){var p;return this.options.noValidation?u:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(p,"&").replace(/0)?new Array(o).join(S.indent):""},a.prototype.endline=function(t,S,x){return!S.pretty||S.suppressPrettyCount?"":S.newline},a.prototype.attribute=function(t,S,x){var o;return this.openAttribute(t,S,x),o=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,S,x),o},a.prototype.cdata=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.comment=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.declaration=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"",o+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.docType=function(t,S,x){var o,k,O,b,v;if(x||(x=0),this.openNode(t,S,x),S.state=d.OpenTag,b=this.indent(t,S,x),b+="0){for(b+=" [",b+=this.endline(t,S,x),S.state=d.InsideTag,v=t.children,k=0,O=v.length;k",b+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),b},a.prototype.element=function(t,S,x){var o,k,O,b,v,g,w,M,N,I,G,z,H,K;x||(x=0),I=!1,G="",this.openNode(t,S,x),S.state=d.OpenTag,G+=this.indent(t,S,x)+"<"+t.name,z=t.attribs;for(N in z){if(!i.call(z,N))continue;o=z[N],G+=this.attribute(o,S,x)}if(O=t.children.length,b=O===0?null:t.children[0],O===0||t.children.every(function(U){return(U.type===P.Text||U.type===P.Raw)&&U.value===""}))S.allowEmpty?(G+=">",S.state=d.CloseTag,G+=""+this.endline(t,S,x)):(S.state=d.CloseTag,G+=S.spaceBeforeSlash+"/>"+this.endline(t,S,x));else if(S.pretty&&O===1&&(b.type===P.Text||b.type===P.Raw)&&b.value!=null)G+=">",S.state=d.InsideTag,S.suppressPrettyCount++,I=!0,G+=this.writeChildNode(b,S,x+1),S.suppressPrettyCount--,I=!1,S.state=d.CloseTag,G+=""+this.endline(t,S,x);else{if(S.dontPrettyTextNodes){for(H=t.children,v=0,w=H.length;v"+this.endline(t,S,x),S.state=d.InsideTag,K=t.children,g=0,M=K.length;g",I&&S.suppressPrettyCount--,G+=this.endline(t,S,x),S.state=d.None}return this.closeNode(t,S,x),G},a.prototype.writeChildNode=function(t,S,x){switch(t.type){case P.CData:return this.cdata(t,S,x);case P.Comment:return this.comment(t,S,x);case P.Element:return this.element(t,S,x);case P.Raw:return this.raw(t,S,x);case P.Text:return this.text(t,S,x);case P.ProcessingInstruction:return this.processingInstruction(t,S,x);case P.Dummy:return"";case P.Declaration:return this.declaration(t,S,x);case P.DocType:return this.docType(t,S,x);case P.AttributeDeclaration:return this.dtdAttList(t,S,x);case P.ElementDeclaration:return this.dtdElement(t,S,x);case P.EntityDeclaration:return this.dtdEntity(t,S,x);case P.NotationDeclaration:return this.dtdNotation(t,S,x);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},a.prototype.processingInstruction=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"",o+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.raw=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x),S.state=d.InsideTag,o+=t.value,S.state=d.CloseTag,o+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.text=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x),S.state=d.InsideTag,o+=t.value,S.state=d.CloseTag,o+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.dtdAttList=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.dtdElement=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.dtdEntity=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.dtdNotation=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.openNode=function(t,S,x){},a.prototype.closeNode=function(t,S,x){},a.prototype.openAttribute=function(t,S,x){},a.prototype.closeAttribute=function(t,S,x){},a}()}).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(j,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l,s;s=j("./Utility"),E=s.assign,l=s.isFunction,T=j("./XMLDOMImplementation"),D=j("./XMLDocument"),u=j("./XMLDocumentCB"),C=j("./XMLStringWriter"),p=j("./XMLStreamWriter"),P=j("./NodeType"),d=j("./WriterState"),Z.exports.create=function(n,h,f,c){var m,_;if(n==null)throw new Error("Root element needs a name.");return c=E({},h,f,c),m=new D(c),_=m.element(n),c.headless||(m.declaration(c),(c.pubID!=null||c.sysID!=null)&&m.dtd(c)),_},Z.exports.begin=function(n,h,f){var c;return l(n)&&(c=[n,h],h=c[0],f=c[1],n={}),h?new u(n,h,f):new D(n)},Z.exports.stringWriter=function(n){return new C(n)},Z.exports.streamWriter=function(n,h){return new p(n,h)},Z.exports.implementation=new T,Z.exports.nodeType=P,Z.exports.writerState=d}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,Z,L){Z.exports=d;var P=Object.prototype.hasOwnProperty;function d(){for(var T={},D=0;Du?n=s(n):n.length>5]|=128<>>9<<4)+14]=h;for(var f=1732584193,c=-271733879,m=-1732584194,_=271733878,y=0;y>16)+(h>>16)+(f>>16);return c<<16|f&65535}function s(n,h){return n<>>32-h}Z.exports=function(h){return P.hash(h,T,16)}},{"./helpers":285}],287:[function(j,Z,L){"use strict";var P=j("./helpers");function d(C,E){C[E>>5]|=128<<24-E%32,C[(E+64>>9<<4)+15]=E;for(var l=Array(80),s=1732584193,n=-271733879,h=-1732584194,f=271733878,c=-1009589776,m=0;m>16)+(E>>16)+(l>>16);return s<<16|l&65535}function p(C,E){return C<>>32-E}Z.exports=function(E){return P.hash(E,d,20,!0)}},{"./helpers":285}],288:[function(j,Z,L){"use strict";Z.exports=function(){return function(){}}},{}],289:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/helpers/typeof"),T=D(d);function D(s){return s&&s.__esModule?s:{default:s}}var u=j("stream"),p=u.Stream,C=j("../lib/common/utils/isArray"),E=C.isArray;Z.exports.string=function(n){return typeof n=="string"},Z.exports.array=E,Z.exports.buffer=P.isBuffer;function l(s){return s instanceof p}Z.exports.writableStream=function(n){return l(n)&&typeof n._write=="function"&&(0,T.default)(n._writableState)==="object"}}).call(this,{isBuffer:j("../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(j,Z,L){"use strict";L.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(d){return P}},L.escape=j("escape-html"),L.timestamp=function(d){if(d){var T=d;return typeof T=="string"&&(T=Number(T)),String(d).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,Z,L){(function(P,d){"use strict";var T=j("babel-runtime/core-js/json/stringify"),D=C(T),u=j("babel-runtime/helpers/typeof"),p=C(u);function C(S){return S&&S.__esModule?S:{default:S}}var E=j("util"),l=j("url"),s=j("http"),n=j("https"),h=j("debug")("urllib"),f=j("humanize-ms"),c,m=0,_=Math.pow(2,31)-10,y=/^https?:\/\//i;function i(S,x){return S===void 0?x:S}function a(S,x){return function(o,k,O){if(o)return x(o);S({data:k,status:O.statusCode,headers:O.headers,res:O})}}L.TIMEOUTS=[f("300s"),f("300s")];var t=["json","text"];L.request=function(x,o,k){return arguments.length===2&&typeof o=="function"&&(k=o,o=null),typeof k=="function"?L.requestWithCallback(x,o,k):(c||(c=j("any-promise")),new c(function(O,b){L.requestWithCallback(x,o,a(O,b))}))},L.requestWithCallback=function(x,o,k){if(!x||typeof x!="string"&&(typeof x=="undefined"?"undefined":(0,p.default)(x))!=="object"){var O=E.format("expect request url to be a string or a http request options, but got %j",x);throw new Error(O)}arguments.length===2&&typeof o=="function"&&(k=o,o=null),o=o||{},m>=_&&(m=0);var b=++m;o.requestUrls=o.requestUrls||[];var v={requestId:b,url:x,args:o,ctx:o.ctx};o.emitter&&o.emitter.emit("request",v),o.timeout=o.timeout||L.TIMEOUTS,o.maxRedirects=o.maxRedirects||10,o.streaming=o.streaming||o.customResponse;var g=Date.now(),w;typeof x=="string"?(y.test(x)||(x="http://"+x),w=l.parse(x)):w=x;var M=(o.type||o.method||w.method||"GET").toUpperCase(),N=w.port||80,I=s,G=i(o.agent,L.agent),z=o.fixJSONCtlChars;w.protocol==="https:"&&(I=n,G=i(o.httpsAgent,L.httpsAgent),w.port||(N=443));var H={host:w.hostname||w.host||"localhost",path:w.path||"/",method:M,port:N,agent:G,headers:o.headers||{},lookup:o.lookup};Array.isArray(o.timeout)?H.requestTimeout=o.timeout[o.timeout.length-1]:typeof o.timeout!="undefined"&&(H.requestTimeout=o.timeout);for(var K=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U=0)return h("Request#%d %s: got digest auth header WWW-Authenticate: %s",b,x,Ue),o.headers=o.headers||{},o.headers.Authorization=digestAuthHeader(H.method,H.path,Ue,o.digestAuth),h("Request#%d %s: auth with digest header: %s",b,x,o.headers.Authorization),ht.headers["set-cookie"]&&(o.headers.Cookie=ht.headers["set-cookie"].join(";")),L.requestWithCallback(x,o,Ze)}var Me=Date.now()-g;te&&(te.contentDownload=Me),h("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Me,re,fe,H.method,H.host,H.path,le,te);var Ne={status:fe,statusCode:fe,headers:st,size:re,aborted:q,rt:Me,keepAliveSocket:le,data:at,requestUrls:o.requestUrls,timing:te,remoteAddress:ee,remotePort:Ce};if(De){var xe="";G&&typeof G.getCurrentStatus=="function"&&(xe=", agent status: "+(0,D.default)(G.getCurrentStatus())),De.message+=", "+H.method+" "+x+" "+fe+" (connected: "+ue+", keepalive socket: "+le+xe+`) headers: `+(0,D.default)(st),De.data=at,De.path=H.path,De.status=fe,De.headers=st,De.res=Ne}Ze(De,at,o.streaming?ht:Ne),o.emitter&&(v.url=x,v.socket=mt&&mt.connection,v.options=H,v.size=Re,o.emitter.emit("response",{requestId:b,error:De,ctx:o.ctx,req:v,res:Ne}))}function Ee(De){var at=null;if(o.followRedirect&&statuses.redirect[De.statusCode]){o._followRedirectCount=(o._followRedirectCount||0)+1;var ht=De.headers.location;if(!ht)at=new Error("Got statusCode "+De.statusCode+" but cannot resolve next location from headers"),at.name="FollowRedirectError";else if(o._followRedirectCount>o.maxRedirects)at=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+x),at.name="MaxRedirectError";else{var Ze=o.formatRedirectUrl?o.formatRedirectUrl(x,ht):l.resolve(x,ht);h("Request#%d %s: `redirected` from %s to %s",b,H.path,x,Ze),X(),o.headers&&o.headers.Host&&y.test(ht)&&(o.headers.Host=null);var st=k;return k=null,L.requestWithCallback(Ze,o,st),{redirect:!0,error:null}}}return{redirect:!1,error:at}}!H.headers["User-Agent"]&&!H.headers["user-agent"]&&(H.headers["User-Agent"]=navigator.userAgent),o.gzip&&(!H.headers["Accept-Encoding"]&&!H.headers["accept-encoding"]&&(H.headers["Accept-Encoding"]="gzip"));function ge(De,at,ht){var Ze=De.headers["content-encoding"];return ht(null,at,Ze)}var Oe=o.writeStream;h("Request#%d %s %s with headers %j, options.path: %s",b,M,x,H.headers,H.path),o.requestUrls.push(x);function Qe(De){if(te&&(te.waiting=Date.now()-g),h("Request#%d %s `req response` event emit: status %d, headers: %j",b,x,De.statusCode,De.headers),o.streaming){var at=Ee(De);if(at.redirect){De.resume();return}return at.error?(De.resume(),Q(at.error,null,De)):Q(null,null,De)}if(De.on("close",function(){h("Request#%d %s: `res close` event emit, total size %d",b,x,re)}),De.on("error",function(){h("Request#%d %s: `res error` event emit, total size %d",b,x,re)}),De.on("aborted",function(){q=!0,h("Request#%d %s: `res aborted` event emit, total size %d",b,x,re)}),Oe){var at=Ee(De);if(at.redirect){De.resume();return}return at.error?(De.resume(),Oe.end(),Q(at.error,null,De)):(o.consumeWriteStream===!1?De.on("end",Q.bind(null,null,null,De)):isNode010||isNode012?first([[Oe,"close"],[De,"aborted"]],function(st,Ue,Me){h("Request#%d %s: writeStream or res %s event emitted",b,x,Me),Q(be||null,null,De)}):Oe.on("close",function(){h("Request#%d %s: writeStream close event emitted",b,x),Q(be||null,null,De)}),De.pipe(Oe))}var ht=[];De.on("data",function(Ze){h("Request#%d %s: `res data` event emit, size %d",b,x,Ze.length),re+=Ze.length,ht.push(Ze)}),De.on("end",function(){var Ze=d.concat(ht,re);if(h("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",b,x,re,De._dumped),be)return Q(be,Ze,De);var st=Ee(De);if(st.error)return Q(st.error,Ze,De);if(st.redirect)return;ge(De,Ze,function(Ue,Me,Ne){if(Ue)return Q(Ue,Ze,De);if(!Ne&&t.indexOf(o.dataType)>=0){try{Me=decodeBodyByCharset(Me,De)}catch(Se){return h("decodeBodyByCharset error: %s",Se),Q(null,Me,De)}if(o.dataType==="json")if(re===0)Me=null;else{var xe=parseJSON(Me,z);xe.error?Ue=xe.error:Me=xe.data}}q&&h("Request#%d %s: Remote socket was terminated before `response.end()` was called",b,x),Q(Ue,Me,De)})})}var rt,nt;Array.isArray(o.timeout)?(rt=f(o.timeout[0]),nt=f(o.timeout[1])):rt=nt=f(o.timeout),h("ConnectTimeout: %d, ResponseTimeout: %d",rt,nt);function ut(){h("Connect timer ticking, timeout: %d",rt),ve=setTimeout(function(){ve=null,fe===-1&&(fe=-2);var De="Connect timeout for "+rt+"ms",at="ConnectionTimeoutError";mt.socket||(at="SocketAssignTimeoutError",De+=", working sockets is full"),be=new Error(De),be.name=at,be.requestId=b,h("ConnectTimeout: Request#%d %s %s: %s, connected: %s",b,x,be.name,De,ue),He()},rt)}function dt(){h("Response timer ticking, timeout: %d",nt),Te=setTimeout(function(){Te=null;var De="Response timeout for "+nt+"ms",at="ResponseTimeoutError";be=new Error(De),be.name=at,be.requestId=b,h("ResponseTimeout: Request#%d %s %s: %s, connected: %s",b,x,be.name,De,ue),He()},nt)}var mt;H.mode=o.mode?o.mode:"";try{mt=I.request(H,Qe)}catch(De){return Q(De)}typeof window=="undefined"?ut():mt.on("requestTimeout",function(){fe===-1&&(fe=-2);var De="Connect timeout for "+rt+"ms",at="ConnectionTimeoutError";be=new Error(De),be.name=at,be.requestId=b,He()});function He(){h("Request#%d %s abort, connected: %s",b,x,ue),mt.socket||(be.noSocket=!0,Q(be)),mt.abort()}return te&&mt.on("finish",function(){te.requestSent=Date.now()-g}),mt.once("socket",function(De){te&&(te.queuing=Date.now()-g),isNode010&&De.socket&&(De=De.socket);var at=De.readyState;if(at==="opening"){De.once("lookup",function(ht,Ze,st){h("Request#%d %s lookup: %s, %s, %s",b,x,ht,Ze,st),te&&(te.dnslookup=Date.now()-g),Ze&&(ee=Ze)}),De.once("connect",function(){te&&(te.connected=Date.now()-g),J(),dt(),h("Request#%d %s new socket connected",b,x),ue=!0,ee||(ee=De.remoteAddress),Ce=De.remotePort});return}h("Request#%d %s reuse socket connected, readyState: %s",b,x,at),ue=!0,le=!0,ee||(ee=De.remoteAddress),Ce=De.remotePort,J(),dt()}),mt.on("error",function(De){(De.name==="Error"||De.name==="TypeError")&&(De.name=ue?"ResponseError":"RequestError"),De.message+=' (req "error")',h("Request#%d %s `req error` event emit, %s: %s",b,x,De.name,De.message),Q(be||De)}),Oe&&Oe.once("error",function(De){De.message+=' (writeStream "error")',be=De,h("Request#%d %s `writeStream error` event emit, %s: %s",b,x,De.name,De.message),He()}),o.stream?(o.stream.pipe(mt),o.stream.once("error",function(De){De.message+=' (stream "error")',be=De,h("Request#%d %s `readStream error` event emit, %s: %s",b,x,De.name,De.message),He()})):mt.end(ae),mt.requestId=b,mt}}).call(this,j("_process"),j("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"))},n6Qo:function(j,Z,L){"use strict";L.d(Z,"a",function(){return E});var P=L("q1tI"),d=L("biw7"),T=L("fyJ8");function D(l){var s=l.className,n=l.index,h=l.children,f=l.colSpan,c=l.rowSpan,m=P.useContext(d.a),_=m.prefixCls,y=m.fixedInfoList,i=y[n];return P.createElement(T.a,Object.assign({className:s,index:n,component:"td",prefixCls:_,record:null,dataIndex:null,render:function(){return{children:h,props:{colSpan:f,rowSpan:c}}}},i))}function u(l){return P.createElement("tr",Object.assign({},l))}function p(l){var s=l.children,n=P.useContext(d.a),h=n.prefixCls;return P.createElement("tfoot",{className:"".concat(h,"-summary")},s)}var C=Z.b=p,E={Cell:D,Row:u}},oRuE:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(d,T){var D=T*4,u=D-d.sigBytes%D;d.concat(P.lib.WordArray.random(u-1)).concat(P.lib.WordArray.create([u<<24],1))},unpad:function(d){var T=d.words[d.sigBytes-1>>>2]&255;d.sigBytes-=T}},P.pad.Iso10126})},osHv:function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";var d=P.Pos;function T(y,i){return y.line-i.line||y.ch-i.ch}var D="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",u=D+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",p=new RegExp("<(/?)(["+D+"]["+u+"]*)","g");function C(y,i,a,t){this.line=i,this.ch=a,this.cm=y,this.text=y.getLine(i),this.min=t?Math.max(t.from,y.firstLine()):y.firstLine(),this.max=t?Math.min(t.to-1,y.lastLine()):y.lastLine()}function E(y,i){var a=y.cm.getTokenTypeAt(d(y.line,i));return a&&/\btag\b/.test(a)}function l(y){return y.line>=y.max?void 0:(y.ch=0,y.text=y.cm.getLine(++y.line),!0)}function s(y){return y.line<=y.min?void 0:(y.text=y.cm.getLine(--y.line),y.ch=y.text.length,!0)}function n(y){for(;;){var i=y.text.indexOf(">",y.ch);if(i==-1){if(l(y))continue;return}if(!E(y,i+1)){y.ch=i+1;continue}var a=y.text.lastIndexOf("/",i),t=a>-1&&!/\S/.test(y.text.slice(a+1,i));return y.ch=i+1,t?"selfClose":"regular"}}function h(y){for(;;){var i=y.ch?y.text.lastIndexOf("<",y.ch-1):-1;if(i==-1){if(s(y))continue;return}if(!E(y,i+1)){y.ch=i;continue}p.lastIndex=i,y.ch=i;var a=p.exec(y.text);if(a&&a.index==i)return a}}function f(y){for(;;){p.lastIndex=y.ch;var i=p.exec(y.text);if(!i){if(l(y))continue;return}if(!E(y,i.index+1)){y.ch=i.index+1;continue}return y.ch=i.index+i[0].length,i}}function c(y){for(;;){var i=y.ch?y.text.lastIndexOf(">",y.ch-1):-1;if(i==-1){if(s(y))continue;return}if(!E(y,i+1)){y.ch=i;continue}var a=y.text.lastIndexOf("/",i),t=a>-1&&!/\S/.test(y.text.slice(a+1,i));return y.ch=i+1,t?"selfClose":"regular"}}function m(y,i){for(var a=[];;){var t=f(y),S,x=y.line,o=y.ch-(t?t[0].length:0);if(!t||!(S=n(y)))return;if(S=="selfClose")continue;if(t[1]){for(var k=a.length-1;k>=0;--k)if(a[k]==t[2]){a.length=k;break}if(k<0&&(!i||i==t[2]))return{tag:t[2],from:d(x,o),to:d(y.line,y.ch)}}else a.push(t[2])}}function _(y,i){for(var a=[];;){var t=c(y);if(!t)return;if(t=="selfClose"){h(y);continue}var S=y.line,x=y.ch,o=h(y);if(!o)return;if(o[1])a.push(o[2]);else{for(var k=a.length-1;k>=0;--k)if(a[k]==o[2]){a.length=k;break}if(k<0&&(!i||i==o[2]))return{tag:o[2],from:d(y.line,y.ch),to:d(S,x)}}}}P.registerHelper("fold","xml",function(y,i){for(var a=new C(y,i.line,0);;){var t=f(a);if(!t||a.line!=i.line)return;var S=n(a);if(!S)return;if(!t[1]&&S!="selfClose"){var x=d(a.line,a.ch),o=m(a,t[2]);return o&&T(o.from,x)>0?{from:x,to:o.from}:null}}}),P.findMatchingTag=function(y,i,a){var t=new C(y,i.line,i.ch,a);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var S=n(t),x=S&&d(t.line,t.ch),o=S&&h(t);if(!S||!o||T(t,i)>0)return;var k={from:d(t.line,t.ch),to:x,tag:o[2]};return S=="selfClose"?{open:k,close:null,at:"open"}:o[1]?{open:_(t,o[2]),close:k,at:"close"}:(t=new C(y,x.line,x.ch,a),{open:k,close:m(t,o[2]),at:"open"})},P.findEnclosingTag=function(y,i,a,t){for(var S=new C(y,i.line,i.ch,a);;){var x=_(S,t);if(!x)break;var o=new C(y,i.line,i.ch,a),k=m(o,x.tag);if(k)return{open:x,close:k}}},P.scanForClosingTag=function(y,i,a,t){var S=new C(y,i.line,i.ch,t?{from:0,to:t}:null);return m(S,a)}})},p5ED:function(j,Z,L){"use strict";var P=L("+L6B"),d=L("2/Rp"),T=L("5Dmo"),D=L("3S7+"),u=L("k1fw"),p=L("9og8"),C=L("tJVT"),E=L("WmNS"),l=L.n(E),s=L("q1tI"),n=L.n(s),h=L("vHTk"),f=L.n(h),c=L("yEEn"),m=L("ZW9T"),_=L("1vsH"),y=L("V0Rq"),i=L("m3rI"),a=function(S){var x=S.name,o=S.data,k=S.theme,O=S.type,b=S.filename,v=S.monacoEditor,g=S.className,w=S.style,M=S.close,N=S.onClose,I=S.hasMask,G=S.otherData,z=G===void 0?{}:G,H=Object(s.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),K=Object(C.a)(H,2),U=K[0],B=K[1],V=Object(s.useState)(""),ae=Object(C.a)(V,2),he=ae[0],pe=ae[1],Re=Object(s.useState)(),ke=Object(C.a)(Re,2),ve=ke[0],Te=ke[1],be=window.ENV==="build"?"/react/build/office.html":"/office.html",ue,le=1024*1024,re=10*le,fe=Object(s.useRef)();O==="office"&&(ue=Object(_.R)(o).filesize,ue>re&&(O="other")),b&&(v.filename=b),Object(s.useEffect)(function(){var te,J,X=(te=document.cookie)===null||te===void 0||((J=te.replace(/\s/g,""))===null||J===void 0)?void 0:J.split(";");X==null||X.map(function(Q){var Ee=Q.split("=");Ee[0]==="_educoder_session"&&pe(Ee[1])})},[]),Object(s.useEffect)(function(){O==="office"&&q()},[O]);var q=function(){var te=Object(p.a)(l.a.mark(function J(){var X,Q,Ee;return l.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return console.log("data:",o),X=o,o.startsWith("http")||(X=location.origin+X),Q=new URL(X).pathname.split("/").pop(),Oe.next=6,Object(y.U)({attachment_id:Q});case 6:Ee=Oe.sent,Te(Ee);case 8:case"end":return Oe.stop()}},J)}));return function(){return te.apply(this,arguments)}}(),ee=function(){if(o.startsWith("http")||o.startsWith("/api")||o.startsWith("blob:")){Ce();return}Object(_.x)(b||"educoder",o,b||"educoder")},Ce=function(){Object(_.v)(b||"educoder",decodeURIComponent(o))};return n.a.createElement("div",{style:Object(u.a)({},w||{}),className:"".concat(I&&f.a.bgBlack," ").concat(O?f.a.wrp:"hide")},M&&n.a.createElement("div",{className:f.a.close,ref:fe},n.a.createElement(D.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return fe.current}},n.a.createElement("span",{onClick:Ce},n.a.createElement("i",{className:"icon-quxiaozhiding"}))),n.a.createElement(D.a,{title:"\u5173\u95ED",getPopupContainer:function(){return fe.current}},n.a.createElement("span",{className:"",onClick:function(){N(),Te(null)}},n.a.createElement("i",{className:"icon-guanbi1"})))),n.a.createElement("div",{className:"".concat(f.a[g]," ").concat(g," ").concat(f.a.monaco," ").concat(O==="txt"?"show":"hide")},O==="txt"&&n.a.createElement(m.b,v)),O==="audio"&&n.a.createElement("audio",{src:"".concat((o==null?void 0:o.indexOf("http://"))>-1||(o==null?void 0:o.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(o),autoPlay:!0}),O==="video"&&n.a.createElement(n.a.Fragment,null,(o==null?void 0:o.indexOf("/api"))>-1?n.a.createElement("video",{controls:!0,src:"".concat(o),autoPlay:!0}):n.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(o),autoPlay:!0})),O==="office"&&ve&&n.a.createElement("iframe",{src:"".concat(be,"?key=").concat(ve.key,"&url=").concat(i.a.API_SERVER+ve.url,"&callbackUrl=").concat(i.a.API_SERVER+ve.callbackUrl,"&fileType=").concat(ve.fileType,"&title=").concat(ve.title,"&model=view")}),(O==="xlsx"||O==="doc"||O==="pptx"||O==="docx")&&n.a.createElement("iframe",{src:"".concat(be,"?key=").concat(z.key,"&url=").concat(i.a.API_SERVER+z.url,"&callbackUrl=").concat(i.a.API_SERVER+z.callbackUrl,"&fileType=").concat(z.fileType,"&title=").concat(z.title,"&model=").concat(z.model)}),O==="html"&&n.a.createElement("iframe",{src:o+"&disposition=inline"}),O==="pdf"&&n.a.createElement("embed",{className:f.a.embed,src:o,type:"application/pdf"}),O==="image"&&n.a.createElement("img",{src:"".concat((o==null?void 0:o.indexOf("http://"))>-1||(o==null?void 0:o.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(o)}),O==="other"&&n.a.createElement("div",null,n.a.createElement(d.a,{type:"primary",size:"large",onClick:ee},n.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),O==="download"&&n.a.createElement(d.a,{type:"primary",size:"large",onClick:ee},n.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};Z.a=a},"p77/":function(j,Z,L){},pA7S:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=T.BlockCipher,p=d.algo,C=[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],E=[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],s=[{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}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=p.DES=u.extend({_doReset:function(){for(var _=this._key,y=_.words,i=[],a=0;a<56;a++){var t=C[a]-1;i[a]=y[t>>>5]>>>31-t%32&1}for(var S=this._subKeys=[],x=0;x<16;x++){for(var o=S[x]=[],k=l[x],a=0;a<24;a++)o[a/6|0]|=i[(E[a]-1+k)%28]<<31-a%6,o[4+(a/6|0)]|=i[28+(E[a+24]-1+k)%28]<<31-a%6;o[0]=o[0]<<1|o[0]>>>31;for(var a=1;a<7;a++)o[a]=o[a]>>>(a-1)*4+3;o[7]=o[7]<<5|o[7]>>>27}for(var O=this._invSubKeys=[],a=0;a<16;a++)O[a]=S[15-a]},encryptBlock:function(_,y){this._doCryptBlock(_,y,this._subKeys)},decryptBlock:function(_,y){this._doCryptBlock(_,y,this._invSubKeys)},_doCryptBlock:function(_,y,i){this._lBlock=_[y],this._rBlock=_[y+1],f.call(this,4,252645135),f.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),f.call(this,1,1431655765);for(var a=0;a<16;a++){for(var t=i[a],S=this._lBlock,x=this._rBlock,o=0,k=0;k<8;k++)o|=s[k][((x^t[k])&n[k])>>>0];this._lBlock=x,this._rBlock=S^o}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,f.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),_[y]=this._lBlock,_[y+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(_,y){var i=(this._lBlock>>>_^this._rBlock)&y;this._rBlock^=i,this._lBlock^=i<<_}function c(_,y){var i=(this._rBlock>>>_^this._lBlock)&y;this._lBlock^=i,this._rBlock^=i<<_}d.DES=u._createHelper(h);var m=p.TripleDES=u.extend({_doReset:function(){var _=this._key,y=_.words;if(y.length!==2&&y.length!==4&&y.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var i=y.slice(0,2),a=y.length<4?y.slice(0,2):y.slice(2,4),t=y.length<6?y.slice(0,2):y.slice(4,6);this._des1=h.createEncryptor(D.create(i)),this._des2=h.createEncryptor(D.create(a)),this._des3=h.createEncryptor(D.create(t))},encryptBlock:function(_,y){this._des1.encryptBlock(_,y),this._des2.decryptBlock(_,y),this._des3.encryptBlock(_,y)},decryptBlock:function(_,y){this._des3.decryptBlock(_,y),this._des2.encryptBlock(_,y),this._des1.decryptBlock(_,y)},keySize:192/32,ivSize:64/32,blockSize:64/32});d.TripleDES=u._createHelper(m)}(),P.TripleDES})},pIsd:function(j,Z,L){var P=L("BJfS"),d=function(u){var p=/[height|width]$/;return p.test(u)},T=function(u){var p="",C=Object.keys(u);return C.forEach(function(E,l){var s=u[E];E=P(E),d(E)&&typeof s=="number"&&(s=s+"px"),s===!0?p+=E:s===!1?p+="not "+E:p+="("+E+": "+s+")",l>>2]|=p<<24-C%4*8,d.sigBytes+=p},unpad:function(d){var T=d.words[d.sigBytes-1>>>2]&255;d.sigBytes-=T}},P.pad.Ansix923})},qHvr:function(j,Z,L){"use strict";var P=L("2qtc"),d=L("kLXV"),T=L("5NDa"),D=L("5rEg"),u=L("miYZ"),p=L("tsqr"),C=L("tJVT"),E=L("q1tI"),l=L.n(E),s=L("4i/N");function n(h){var f=h.isAddmodle,c=h.setIsAdd,m=h.createTeam,_=Object(E.useState)(""),y=Object(C.a)(_,2),i=y[0],a=y[1];return l.a.createElement(d.a,{centered:!0,title:l.a.createElement("div",{style:{alignItems:"center",display:"flex"}},l.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),l.a.createElement(s.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:f,closable:!1,destroyOnClose:!0,onOk:function(){if(!i){p.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}m(i)},onCancel:function(){return c(!1)}},l.a.createElement("div",null,l.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",l.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},l.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:i,maxLength:60,addonAfter:String(i&&i.length||0)+"/60",onChange:function(S){return a(S.target.value)}}))))}Z.a=n},qM6L:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.enc,p=u.Utf16=u.Utf16BE={stringify:function(E){for(var l=E.words,s=E.sigBytes,n=[],h=0;h>>2]>>>16-h%4*8&65535;n.push(String.fromCharCode(f))}return n.join("")},parse:function(E){for(var l=E.length,s=[],n=0;n>>1]|=E.charCodeAt(n)<<16-n%2*16;return D.create(s,l*2)}};u.Utf16LE={stringify:function(E){for(var l=E.words,s=E.sigBytes,n=[],h=0;h>>2]>>>16-h%4*8&65535);n.push(String.fromCharCode(f))}return n.join("")},parse:function(E){for(var l=E.length,s=[],n=0;n>>1]|=C(E.charCodeAt(n)<<16-n%2*16);return D.create(s,l*2)}};function C(E){return E<<8&4278255360|E>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */return P.mode.CTRGladman=function(){var d=P.lib.BlockCipherMode.extend();function T(p){if((p>>24&255)===255){var C=p>>16&255,E=p>>8&255,l=p&255;C===255?(C=0,E===255?(E=0,l===255?l=0:++l):++E):++C,p=0,p+=C<<16,p+=E<<8,p+=l}else p+=1<<24;return p}function D(p){return(p[0]=T(p[0]))===0&&(p[1]=T(p[1])),p}var u=d.Encryptor=d.extend({processBlock:function(p,C){var E=this._cipher,l=E.blockSize,s=this._iv,n=this._counter;s&&(n=this._counter=s.slice(0),this._iv=void 0),D(n);var h=n.slice(0);E.encryptBlock(h,0);for(var f=0;f=T.length?{done:!0}:{done:!1,value:T[p++]}},e:function(h){throw h},f:C}}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 E=!0,l=!1,s;return{s:function(){u=T[Symbol.iterator]()},n:function(){var h=u.next();return E=h.done,h},e:function(h){l=!0,s=h},f:function(){try{!E&&u.return!=null&&u.return()}finally{if(l)throw s}}}}},rUJ1:function(j,Z){const L=/[&<>"']/,P=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,D={"&":"&","<":"<",">":">",'"':""","'":"'"},u=O=>D[O];function p(O,b){if(b){if(L.test(O))return O.replace(P,u)}else if(d.test(O))return O.replace(T,u);return O}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function E(O){return O.replace(C,(b,v)=>(v=v.toLowerCase(),v==="colon"?":":v.charAt(0)==="#"?v.charAt(1)==="x"?String.fromCharCode(parseInt(v.substring(2),16)):String.fromCharCode(+v.substring(1)):""))}const l=/(^|[^\[])\^/g;function s(O,b){O=O.source||O,b=b||"";const v={replace:(g,w)=>(w=w.source||w,w=w.replace(l,"$1"),O=O.replace(g,w),v),getRegex:()=>new RegExp(O,b)};return v}const n=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(O,b,v){if(O){let g;try{g=decodeURIComponent(E(v)).replace(n,"").toLowerCase()}catch(w){return null}if(g.indexOf("javascript:")===0||g.indexOf("vbscript:")===0||g.indexOf("data:")===0)return null}b&&!h.test(v)&&(v=i(b,v));try{v=encodeURI(v).replace(/%25/g,"%")}catch(g){return null}return v}const c={},m=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(O,b){c[" "+O]||(m.test(O)?c[" "+O]=O+"/":c[" "+O]=x(O,"/",!0)),O=c[" "+O];const v=O.indexOf(":")===-1;return b.substring(0,2)==="//"?v?b:O.replace(_,"$1")+b:b.charAt(0)==="/"?v?b:O.replace(y,"$1")+b:O+b}const a={exec:function(){}};function t(O){let b=1,v,g;for(;b{let G=!1,z=N;for(;--z>=0&&I[z]==="\\";)G=!G;return G?"|":" |"}),g=v.split(/ \|/);let w=0;if(g.length>b)g.splice(b);else for(;g.length1)Object(s.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(s.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var S=t[0];if(p.isValidElement(S)&&Object(n.c)(S)){var x=S.ref;t[0]=p.cloneElement(S,{ref:Object(n.a)(x,this.setChildNode)})}return t.length===1?t[0]:t.map(function(o,k){return!p.isValidElement(o)||"key"in o&&o.key!==null?o:p.cloneElement(o,{key:"".concat(f,"-").concat(k)})})}}]),y}(p.Component);c.displayName="ResizeObserver",Z.a=c},uGsb:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("MlIO"),L("1uat"))})(this,function(P){return function(){var d=P,T=d.x64,D=T.Word,u=T.WordArray,p=d.algo,C=p.SHA512,E=p.SHA384=C.extend({_doReset:function(){this._hash=new u.init([new D.init(3418070365,3238371032),new D.init(1654270250,914150663),new D.init(2438529370,812702999),new D.init(355462360,4144912697),new D.init(1731405415,4290775857),new D.init(2394180231,1750603025),new D.init(3675008525,1694076839),new D.init(1203062813,3204075428)])},_doFinalize:function(){var l=C._doFinalize.call(this);return l.sigBytes-=16,l}});d.SHA384=C._createHelper(E),d.HmacSHA384=C._createHmacHelper(E)}(),P.SHA384})},uGxW:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uK0f:function(j,Z,L){(function(P,d){j.exports=d()})(this,function(){"use strict";function P(d,T,D){D=D||{},D.childrenKeyName=D.childrenKeyName||"children";var u=d||[],p=[],C=0;do{var E=u.filter(function(l){return T(l,C)})[0];if(!E)break;p.push(E),u=E[D.childrenKeyName]||[],C+=1}while(u.length>0);return p}return P})},ulZh:function(j,Z,L){typeof window!="undefined"&&function(d,T){j.exports=T()}(this,function(){return function(P){var d={};function T(D){if(d[D])return d[D].exports;var u=d[D]={i:D,l:!1,exports:{}};return P[D].call(u.exports,u,u.exports,T),u.l=!0,u.exports}return T.m=P,T.c=d,T.d=function(D,u,p){T.o(D,u)||Object.defineProperty(D,u,{enumerable:!0,get:p})},T.r=function(D){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(D,"__esModule",{value:!0})},T.t=function(D,u){if(u&1&&(D=T(D)),u&8)return D;if(u&4&&typeof D=="object"&&D&&D.__esModule)return D;var p=Object.create(null);if(T.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:D}),u&2&&typeof D!="string")for(var C in D)T.d(p,C,function(E){return D[E]}.bind(null,C));return p},T.n=function(D){var u=D&&D.__esModule?function(){return D.default}:function(){return D};return T.d(u,"a",u),u},T.o=function(D,u){return Object.prototype.hasOwnProperty.call(D,u)},T.p="/dist/",T(T.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,d,T){"use strict";var D=Object.prototype.hasOwnProperty,u="~";function p(){}Object.create&&(p.prototype=Object.create(null),new p().__proto__||(u=!1));function C(n,h,f){this.fn=n,this.context=h,this.once=f||!1}function E(n,h,f,c,m){if(typeof f!="function")throw new TypeError("The listener must be a function");var _=new C(f,c||n,m),y=u?u+h:h;return n._events[y]?n._events[y].fn?n._events[y]=[n._events[y],_]:n._events[y].push(_):(n._events[y]=_,n._eventsCount++),n}function l(n,h){--n._eventsCount===0?n._events=new p:delete n._events[h]}function s(){this._events=new p,this._eventsCount=0}s.prototype.eventNames=function(){var h=[],f,c;if(this._eventsCount===0)return h;for(c in f=this._events)D.call(f,c)&&h.push(u?c.slice(1):c);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(f)):h},s.prototype.listeners=function(h){var f=u?u+h:h,c=this._events[f];if(!c)return[];if(c.fn)return[c.fn];for(var m=0,_=c.length,y=new Array(_);m<_;m++)y[m]=c[m].fn;return y},s.prototype.listenerCount=function(h){var f=u?u+h:h,c=this._events[f];return c?c.fn?1:c.length:0},s.prototype.emit=function(h,f,c,m,_,y){var i=u?u+h:h;if(!this._events[i])return!1;var a=this._events[i],t=arguments.length,S,x;if(a.fn){a.once&&this.removeListener(h,a.fn,void 0,!0);switch(t){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,f),!0;case 3:return a.fn.call(a.context,f,c),!0;case 4:return a.fn.call(a.context,f,c,m),!0;case 5:return a.fn.call(a.context,f,c,m,_),!0;case 6:return a.fn.call(a.context,f,c,m,_,y),!0}for(x=1,S=new Array(t-1);x0},!1)}function n(h,f){for(var c={main:[f]},m={main:[]},_={main:{}};s(c);)for(var y=Object.keys(c),i=0;i=2*k/b||I<=z)return;var H=Number.POSITIVE_INFINITY,K;for(K=y.level-1;K>g;K--){var U=v[K].maxBitrate;if(H=k*U/(8*.8*N),H=I)return;var B=this.bwEstimator.getEstimate();s.logger.warn("Fragment "+y.sn+(i?" part "+i.index:"")+" of level "+y.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+` Current BW estimate: `+(Object(D.isFiniteNumber)(B)?(B/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+I.toFixed(3)+` s Estimated load time for the next fragment: `+H.toFixed(3)+` s Time to underbuffer: `+z.toFixed(3)+" s"),a.nextLoadLevel=K,this.bwEstimator.sample(O,o.loaded),this.clearTimer(),y.loader&&(this.fragCurrent=this.partCurrent=null,y.loader.abort()),a.trigger(p.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:y,part:i,stats:o})},m.onFragLoaded=function(y,i){var a=i.frag,t=i.part;if(a.type===l.PlaylistLevelType.MAIN&&Object(D.isFiniteNumber)(a.sn)){var S=t?t.stats:a.stats,x=t?t.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var o=this.hls.levels[a.level],k=(o.loaded?o.loaded.bytes:0)+S.loaded,O=(o.loaded?o.loaded.duration:0)+x;o.loaded={bytes:k,duration:O},o.realBitrate=Math.round(8*k/O)}if(a.bitrateTest){var b={stats:S,frag:a,part:t,id:a.type};this.onFragBuffered(p.Events.FRAG_BUFFERED,b),a.bitrateTest=!1}}},m.onFragBuffered=function(y,i){var a=i.frag,t=i.part,S=t?t.stats:a.stats;if(S.aborted)return;if(a.type!==l.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var x=S.parsing.end-S.loading.start;this.bwEstimator.sample(x,S.loaded),S.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=x/1e3:this.bitrateTestDelay=0},m.onError=function(y,i){switch(i.details){case E.ErrorDetails.FRAG_LOAD_ERROR:case E.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},m.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},m.getNextABRAutoLevel=function(){var y=this.fragCurrent,i=this.partCurrent,a=this.hls,t=a.maxAutoLevel,S=a.config,x=a.minAutoLevel,o=a.media,k=i?i.duration:y?y.duration:0,O=o?o.currentTime:0,b=o&&o.playbackRate!==0?Math.abs(o.playbackRate):1,v=this.bwEstimator?this.bwEstimator.getEstimate():S.abrEwmaDefaultEstimate,g=(C.BufferHelper.bufferInfo(o,O,S.maxBufferHole).end-O)/b,w=this.findBestLevel(v,x,t,g,S.abrBandWidthFactor,S.abrBandWidthUpFactor);if(w>=0)return w;s.logger.trace((g?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=k?Math.min(k,S.maxStarvationDelay):S.maxStarvationDelay,N=S.abrBandWidthFactor,I=S.abrBandWidthUpFactor;if(!g){var G=this.bitrateTestDelay;if(G){var z=k?Math.min(k,S.maxLoadingDelay):S.maxLoadingDelay;M=z-G,s.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),N=I=1}}return w=this.findBestLevel(v,x,t,g+M,N,I),Math.max(w,0)},m.findBestLevel=function(y,i,a,t,S,x){for(var o,k=this.fragCurrent,O=this.partCurrent,b=this.lastLoadedFragLevel,v=this.hls.levels,g=v[b],w=!!(g!=null&&(o=g.details)!==null&&o!==void 0&&o.live),M=g==null?void 0:g.codecSet,N=O?O.duration:k?k.duration:0,I=a;I>=i;I--){var G=v[I];if(!G||M&&G.codecSet!==M)continue;var z=G.details,H=(O?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||N,K=void 0;I<=b?K=S*y:K=x*y;var U=v[I].maxBitrate,B=U*H/K;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+I+"/"+Math.round(K)+"/"+U+"/"+H+"/"+t+"/"+B),K>U&&(!B||w&&!this.bitrateTestDelay||B0&&g===-1?(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),this.state=u.State.IDLE):(this.loadedmetadata=!1,this.state=u.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=g,this.tick()},b.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_TRACK:{var g,w=this.levels,M=this.trackId,N=w==null||((g=w[M])===null||g===void 0)?void 0:g.details;if(N){if(this.waitForCdnTuneIn(N))break;this.state=u.State.WAITING_INIT_PTS}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var I,G=performance.now(),z=this.retryDate;(!z||G>=z||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=u.State.IDLE);break}case u.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var K=H.frag,U=H.part,B=H.cache,V=H.complete;if(this.initPTS[K.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.FRAG_LOADING;var ae=B.flush(),he={frag:K,part:U,payload:ae,networkDetails:null};this._handleFragmentLoadProgress(he),V&&k.prototype._handleFragmentLoadComplete.call(this,he)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+K.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var pe=this.getLoadPosition(),Re=C.BufferHelper.bufferInfo(this.mediaBuffer,pe,this.config.maxBufferHole),ke=Object(m.fragmentWithinToleranceTest)(Re.end,this.config.maxFragLookUpTolerance,K);ke<0&&(i.logger.log("Waiting fragment cc ("+K.cc+") @ "+K.start+" cancelled because another fragment at "+Re.end+" is needed"),this.clearWaitingFragment())}}else this.state=u.State.IDLE}}this.onTickEnd()},b.clearWaitingFragment=function(){var g=this.waitingData;g&&(this.fragmentTracker.removeFragment(g.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.IDLE)},b.onTickEnd=function(){var g=this.media;if(!g||!g.readyState)return;var w=this.mediaBuffer?this.mediaBuffer:g,M=w.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=g.currentTime},b.doTickIdle=function(){var g,w,M=this.hls,N=this.levels,I=this.media,G=this.trackId,z=M.config;if(!N||!N[G])return;if(!I&&(this.startFragRequested||!z.startFragPrefetch))return;var H=N[G],K=H.details;if(!K||K.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(K)){this.state=u.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,s.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,s.PlaylistLevelType.AUDIO);if(U===null)return;var B=U.len,V=this.getMaxBufferLength(),ae=this.audioSwitch;if(B>=V&&!ae)return;if(!ae&&this._streamEnded(U,K)){M.trigger(p.Events.BUFFER_EOS,{type:"audio"}),this.state=u.State.ENDED;return}var he=K.fragments,pe=he[0].start,Re=U.end;if(ae){var ke=this.getLoadPosition();Re=ke,K.PTSKnown&&kepe||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),I.currentTime=pe+.05))}var ve=this.getNextFragment(Re,K);if(!ve){this.bufferFlushed=!0;return}((g=ve.decryptdata)===null||g===void 0?void 0:g.keyFormat)==="identity"&&!((w=ve.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(ve,K):this.loadFragment(ve,K,Re)},b.getMaxBufferLength=function(){var g=k.prototype.getMaxBufferLength.call(this),w=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,s.PlaylistLevelType.MAIN);return w===null?g:Math.max(g,w.len)},b.onMediaDetaching=function(){this.videoBuffer=null,k.prototype.onMediaDetaching.call(this)},b.onAudioTracksUpdated=function(g,w){var M=w.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(N){return new l.Level(N)})},b.onAudioTrackSwitching=function(g,w){var M=!!w.url;this.trackId=w.id;var N=this.fragCurrent;N!=null&&N.loader&&N.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(x):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=u.State.IDLE):this.state=u.State.STOPPED,this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},b.onLevelLoaded=function(g,w){this.mainDetails=w.details},b.onAudioTrackLoaded=function(g,w){var M,N=this.levels,I=w.details,G=w.id;if(!N){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+I.startSN+","+I.endSN+"],duration:"+I.totalduration);var z=N[G],H=0;if(I.live||(M=z.details)!==null&&M!==void 0&&M.live){var K=this.mainDetails;if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed||!K)return;!z.details&&I.hasProgramDateTime&&K.hasProgramDateTime?(Object(_.alignMediaPlaylistByPDT)(I,K),H=I.fragments[0].start):H=this.alignPlaylists(I,z.details)}z.details=I,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!I.live)&&this.setStartPosition(z.details,H),this.state===u.State.WAITING_TRACK&&!this.waitForCdnTuneIn(I)&&(this.state=u.State.IDLE),this.tick()},b._handleFragmentLoadProgress=function(g){var w,M=g.frag,N=g.part,I=g.payload,G=this.config,z=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+M.sn+" of level "+M.level+" will not be buffered");return}var K=H[z];console.assert(K,"Audio track is defined on fragment load progress");var U=K.details;console.assert(U,"Audio track details are defined on fragment load progress");var B=G.defaultAudioCodec||K.audioCodec||"mp4a.40.2",V=this.transmuxer;V||(V=this.transmuxer=new f.default(this.hls,s.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ae=this.initPTS[M.cc],he=(w=M.initSegment)===null||w===void 0?void 0:w.data;if(ae!==void 0){var pe=!1,Re=N?N.index:-1,ke=Re!==-1,ve=new c.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,I.byteLength,Re,ke);V.push(I,he,B,"",M,N,U.totalduration,pe,ve,ae)}else{i.logger.log("Unknown video PTS for cc "+M.cc+", waiting for video PTS before demuxing audio frag "+M.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+z);var Te=this.waitingData=this.waitingData||{frag:M,part:N,cache:new h.default,complete:!1},be=Te.cache;be.push(new Uint8Array(I)),this.waitingVideoCC=this.videoTrackCC,this.state=u.State.WAITING_INIT_PTS}},b._handleFragmentLoadComplete=function(g){if(this.waitingData){this.waitingData.complete=!0;return}k.prototype._handleFragmentLoadComplete.call(this,g)},b.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},b.onBufferCreated=function(g,w){var M=w.tracks.audio;M&&(this.mediaBuffer=M.buffer),w.tracks.video&&(this.videoBuffer=w.tracks.video.buffer)},b.onFragBuffered=function(g,w){var M=w.frag,N=w.part;if(M.type!==s.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(N?" p: "+N.index:"")+" of level "+M.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}M.sn!=="initSegment"&&(this.fragPrevious=M,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(p.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,N)},b.onError=function(g,w){switch(w.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:case y.ErrorDetails.KEY_LOAD_ERROR:case y.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(s.PlaylistLevelType.AUDIO,w);break;case y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case y.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==u.State.ERROR&&this.state!==u.State.STOPPED&&(this.state=w.fatal?u.State.ERROR:u.State.IDLE,this.warn(w.details+" while loading frag, switching to "+this.state+" state"));break;case y.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="audio"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var M=!0,N=this.getFwdBufferInfo(this.mediaBuffer,s.PlaylistLevelType.AUDIO);N&&N.len>.5&&(M=!this.reduceMaxBufferLength(N.len)),M&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},b.onBufferFlushed=function(g,w){var M=w.type;M===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},b._handleTransmuxComplete=function(g){var w,M="audio",N=this.hls,I=g.remuxResult,G=g.chunkMeta,z=this.getCurrentContext(G);if(!z){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var H=z.frag,K=z.part,U=I.audio,B=I.text,V=I.id3,ae=I.initSegment;if(this.fragContextChanged(H))return;if(this.state=u.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ae!=null&&ae.tracks&&(this._bufferInitSegment(ae.tracks,H,G),N.trigger(p.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:M,tracks:ae.tracks})),U){var he=U.startPTS,pe=U.endPTS,Re=U.startDTS,ke=U.endDTS;K&&(K.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:he,endPTS:pe,startDTS:Re,endDTS:ke}),H.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,he,pe,Re,ke),this.bufferFragmentData(U,H,K,G)}if(V!=null&&(w=V.samples)!==null&&w!==void 0&&w.length){var ve=a({frag:H,id:M},V);N.trigger(p.Events.FRAG_PARSING_METADATA,ve)}if(B){var Te=a({frag:H,id:M},B);N.trigger(p.Events.FRAG_PARSING_USERDATA,Te)}},b._bufferInitSegment=function(g,w,M){if(this.state!==u.State.PARSING)return;g.video&&delete g.video;var N=g.audio;if(!N)return;N.levelCodec=N.codec,N.id="audio",this.log("Init audio buffer, container:"+N.container+", codecs[parsed]=["+N.codec+"]"),this.hls.trigger(p.Events.BUFFER_CODECS,g);var I=N.initSegment;if(I!=null&&I.byteLength){var G={type:"audio",frag:w,part:null,chunkMeta:M,parent:w.type,data:I};this.hls.trigger(p.Events.BUFFER_APPENDING,G)}this.tick()},b.loadFragment=function(g,w,M){var N=this.fragmentTracker.getState(g);this.fragCurrent=g,(this.audioSwitch||N===E.FragmentState.NOT_LOADED||N===E.FragmentState.PARTIAL)&&(g.sn==="initSegment"?this._loadInitSegment(g):w.live&&!Object(D.isFiniteNumber)(this.initPTS[g.cc])?(this.log("Waiting for video PTS in continuity counter "+g.cc+" of live stream before loading audio fragment "+g.sn+" of level "+this.trackId),this.state=u.State.WAITING_INIT_PTS):(this.startFragRequested=!0,k.prototype.loadFragment.call(this,g,w,M)))},b.completeAudioSwitch=function(){var g=this.hls,w=this.media,M=this.trackId;w&&(this.log("Switching audio track : flushing all audio"),k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,g.trigger(p.Events.AUDIO_TRACK_SWITCHED,{id:M})},O}(u.default);d.default=o},"./src/controller/audio-track-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts"),u=T("./src/errors.ts"),p=T("./src/controller/base-playlist-controller.ts"),C=T("./src/types/loader.ts");function E(f,c){for(var m=0;m=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=i[this.trackId];this.log("Now switching to audio-track index "+y);var t=i[y],S=t.id,x=t.groupId,o=x===void 0?"":x,k=t.name,O=t.type,b=t.url;if(this.trackId=y,this.trackName=k,this.selectDefaultTrack=!1,this.hls.trigger(D.Events.AUDIO_TRACK_SWITCHING,{id:S,groupId:o,name:k,type:O,url:b}),t.details&&!t.details.live)return;var v=this.switchParams(t.url,a==null?void 0:a.details);this.loadPlaylist(v)},m.selectInitialTrack=function(){var y=this.tracksInGroup;console.assert(y.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,a=this.findTrackId(i)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},m.findTrackId=function(y){for(var i=this.tracksInGroup,a=0;ac.partTarget&&(t+=1)}if(Object(D.isFiniteNumber)(a))return new u.HlsUrlParameters(a,Object(D.isFiniteNumber)(t)?t:void 0,u.HlsSkip.No)}}},n.loadPlaylist=function(f){},n.shouldLoadTrack=function(f){return this.canLoad&&f&&!!f.url&&(!f.details||f.details.live)},n.playlistLoaded=function(f,c,m){var _=this,y=c.details,i=c.stats,a=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(y.advancedDateTime=Date.now()-a,y.live||m!=null&&m.live){if(y.reloaded(m),m&&this.log("live playlist "+f+" "+(y.advanced?"REFRESHED "+y.lastPartSn+"-"+y.lastPartIndex:"MISSED")),m&&y.fragments.length>0&&Object(p.mergeDetails)(m,y),!this.canLoad||!y.live)return;var t,S=void 0,x=void 0;if(y.canBlockReload&&y.endSN&&y.advanced){var o=this.hls.config.lowLatencyMode,k=y.lastPartSn,O=y.endSN,b=y.lastPartIndex,v=b!==-1,g=k===O,w=o?0:b;v?(S=g?O+1:k,x=g?w:b+1):S=O+1;var M=y.age,N=M+y.ageHeader,I=Math.min(N-y.partTarget,y.targetduration*1.5);if(I>0){if(m&&I>m.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+m.tuneInGoal+" to: "+I+" with playlist age: "+y.age),I=0;else{var G=Math.floor(I/y.targetduration);if(S+=G,x!==void 0){var z=Math.round(I%y.targetduration/y.partTarget);x+=z}this.log("CDN Tune-in age: "+y.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+I+" skip sn "+G+" to part "+x)}y.tuneInGoal=I}if(t=this.getDeliveryDirectives(y,c.deliveryDirectives,S,x),o||!g){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(y,c.deliveryDirectives,S,x);var H=Object(p.computeReloadInterval)(y,i);S!==void 0&&y.canBlockReload&&(H-=y.partTarget||1),this.log("reload live playlist "+f+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return _.loadPlaylist(t)},H)}else this.clearTimer()},n.getDeliveryDirectives=function(f,c,m,_){var y=Object(u.getSkipValue)(f,m);return c!=null&&c.skip&&f.deltaUpdateFailed&&(m=c.msn,_=c.part,y=u.HlsSkip.No),new u.HlsUrlParameters(m,_,y)},n.retryLoadingOrFail=function(f){var c=this,m=this.hls.config,_=this.retryCount-1&&(y=f.context)!==null&&y!==void 0&&y.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+f.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*m.levelLoadingRetryDelay,m.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+f.details+'"')}}else this.warn('cannot recover from error "'+f.details+'"'),this.clearTimer(),f.fatal=!0;return _},s}()},"./src/controller/base-stream-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"State",function(){return O}),T.d(d,"default",function(){return b});var D=T("./src/polyfills/number.ts"),u=T("./src/task-loop.ts"),p=T("./src/controller/fragment-tracker.ts"),C=T("./src/utils/buffer-helper.ts"),E=T("./src/utils/logger.ts"),l=T("./src/events.ts"),s=T("./src/errors.ts"),n=T("./src/types/transmuxer.ts"),h=T("./src/utils/mp4-tools.ts"),f=T("./src/utils/discontinuities.ts"),c=T("./src/controller/fragment-finders.ts"),m=T("./src/controller/level-helper.ts"),_=T("./src/loader/fragment-loader.ts"),y=T("./src/crypt/decrypter.ts"),i=T("./src/utils/time-ranges.ts"),a=T("./src/types/loader.ts");function t(v,g){for(var w=0;wae;(K0&&K&&K.key&&K.iv&&K.method==="AES-128"){var U=self.performance.now();return I.decrypter.webCryptoDecrypt(new Uint8Array(H),K.key.buffer,K.iv.buffer).then(function(B){var V=self.performance.now();return z.trigger(l.Events.FRAG_DECRYPTED,{frag:N,payload:B,stats:{tstart:U,tdecrypt:V}}),G.payload=B,G})}return G}).then(function(G){var z=I.fragCurrent,H=I.hls,K=I.levels;if(!K)throw new Error("init load aborted, missing levels");var U=K[N.level].details;console.assert(U,"Level details are defined when init segment is loaded");var B=N.stats;I.state=O.IDLE,I.fragLoadError=0,N.data=new Uint8Array(G.payload),B.parsing.start=B.buffering.start=self.performance.now(),B.parsing.end=B.buffering.end=self.performance.now(),G.frag===z&&H.trigger(l.Events.FRAG_BUFFERED,{stats:B,frag:z,part:null,id:N.type}),I.tick()}).catch(function(G){I.warn(G),I.resetFragmentLoading(N)})},w.fragContextChanged=function(N){var I=this.fragCurrent;return!N||!I||N.level!==I.level||N.sn!==I.sn||N.urlId!==I.urlId},w.fragBufferedComplete=function(N,I){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+N.type+" sn: "+N.sn+(I?" part: "+I.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level+" "+i.default.toString(C.BufferHelper.getBuffered(G))),this.state=O.IDLE,this.tick()},w._handleFragmentLoadComplete=function(N){var I=this.transmuxer;if(!I)return;var G=N.frag,z=N.part,H=N.partsLoaded,K=!H||H.length===0||H.some(function(B){return!B}),U=new n.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,z?z.index:-1,!K);I.flush(U)},w._handleFragmentLoadProgress=function(N){},w._doFragLoad=function(N,I,G,z){var H=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(N.start,G||0),this.config.lowLatencyMode&&I){var K=I.partList;if(K&&z){G>N.end&&I.fragmentHint&&(N=I.fragmentHint);var U=this.getNextPart(K,N,G);if(U>-1){var B=K[U];return this.log("Loading part sn: "+N.sn+" p: "+B.index+" cc: "+N.cc+" of playlist ["+I.startSN+"-"+I.endSN+"] parts [0-"+U+"-"+(K.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=B.start+B.duration,this.state=O.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:N,part:K[U],targetBufferTime:G}),this.doFragPartsLoad(N,K,U,z).catch(function(V){return H.handleFragLoadError(V)})}else if(!N.url||this.loadedEndOfParts(K,G))return Promise.resolve(null)}}return this.log("Loading fragment "+N.sn+" cc: "+N.cc+" "+(I?"of ["+I.startSN+"-"+I.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(G.toFixed(3))),Object(D.isFiniteNumber)(N.sn)&&!this.bitrateTest&&(this.nextLoadPosition=N.start+N.duration),this.state=O.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:N,targetBufferTime:G}),this.fragmentLoader.load(N,z).catch(function(V){return H.handleFragLoadError(V)})},w.doFragPartsLoad=function(N,I,G,z){var H=this;return new Promise(function(K,U){var B=[],V=function ae(he){var pe=I[he];H.fragmentLoader.loadPart(N,pe,z).then(function(Re){B[pe.index]=Re;var ke=Re.part;H.hls.trigger(l.Events.FRAG_LOADED,Re);var ve=I[he+1];if(ve&&ve.fragment===N)ae(he+1);else return K({frag:N,part:ke,partsLoaded:B})}).catch(U)};V(G)})},w.handleFragLoadError=function(N){var I=N.data;return I&&I.details===s.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(I.frag,I.part):this.hls.trigger(l.Events.ERROR,I),null},w._handleTransmuxerFlush=function(N){var I=this.getCurrentContext(N);if(!I||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var G=I.frag,z=I.part,H=I.level,K=self.performance.now();G.stats.parsing.end=K,z&&(z.stats.parsing.end=K),this.updateLevelTiming(G,z,H,N.partial)},w.getCurrentContext=function(N){var I=this.levels,G=N.level,z=N.sn,H=N.part;if(!I||!I[G])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+G+". The current chunk will not be buffered."),null;var K=I[G],U=H>-1?Object(m.getPartWith)(K,z,H):null,B=U?U.fragment:Object(m.getFragmentWithSN)(K,z,this.fragCurrent);return B?{frag:B,part:U,level:K}:null},w.bufferFragmentData=function(N,I,G,z){if(!N||this.state!==O.PARSING)return;var H=N.data1,K=N.data2,U=H;if(H&&K&&(U=Object(h.appendUint8Array)(H,K)),!U||!U.length)return;var B={type:N.type,frag:I,part:G,chunkMeta:z,parent:I.type,data:U};this.hls.trigger(l.Events.BUFFER_APPENDING,B),N.dropped&&N.independent&&!G&&this.flushBufferGap(I)},w.flushBufferGap=function(N){var I=this.media;if(!I)return;if(!C.BufferHelper.isBuffered(I,I.currentTime)){this.flushMainBuffer(0,N.start);return}var G=I.currentTime,z=C.BufferHelper.bufferInfo(I,G,0),H=N.duration,K=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),U=Math.max(Math.min(N.start-K,z.end-K),G+K);N.start-U>K&&this.flushMainBuffer(U,N.start)},w.getFwdBufferInfo=function(N,I){var G=this.config,z=this.getLoadPosition();if(!Object(D.isFiniteNumber)(z))return null;var H=C.BufferHelper.bufferInfo(N,z,G.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var K=this.fragmentTracker.getBufferedFrag(z,I);if(K&&H.nextStart=G?(I.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+I.maxMaxBufferLength+"s"),!0):!1},w.getNextFragment=function(N,I){var G,z,H=I.fragments,K=H.length;if(!K)return null;var U=this.config,B=H[0].start,V;if(I.live){var ae=U.initialLiveManifestSize;if(K-1&&GG.start&&G.loaded},w.getInitialLiveFragment=function(N,I){var G=this.fragPrevious,z=null;if(G){if(N.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),z=Object(c.findFragmentByPDT)(I,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var H=G.sn+1;if(H>=N.startSN&&H<=N.endSN){var K=I[H-N.startSN];G.cc===K.cc&&(z=K,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(c.findFragWithCC)(I,G.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(z=this.getFragmentAtPosition(U,this.bitrateTest?N.fragmentEnd:N.edge,N))}return z},w.getFragmentAtPosition=function(N,I,G){var z=this.config,H=this.fragPrevious,K=G.fragments,U=G.endSN,B=G.fragmentHint,V=z.maxFragLookUpTolerance,ae=!!(z.lowLatencyMode&&G.partList&&B);ae&&B&&!this.bitrateTest&&(K=K.concat(B),U=B.sn);var he;if(NI-V?0:V;he=Object(c.findFragmentByPTS)(H,K,N,pe)}else he=K[K.length-1];if(he){var Re=he.sn-G.startSN,ke=H&&he.level===H.level,ve=K[Re+1],Te=this.fragmentTracker.getState(he);if(Te===p.FragmentState.BACKTRACKED){he=null;for(var be=Re;K[be]&&this.fragmentTracker.getState(K[be])===p.FragmentState.BACKTRACKED;)H?he=K[be--]:he=K[--be];he||(he=ve)}else H&&he.sn===H.sn&&!ae&&(ke&&(he.sn=K-I.maxFragLookUpTolerance&&H<=U;if(z!==null&&G.duration>z&&(H"+N.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+U),he}return B},w.waitForCdnTuneIn=function(N){var I=3;return N.live&&N.canBlockReload&&N.tuneInGoal>Math.max(N.partHoldBack,N.partTarget*I)},w.setStartPosition=function(N,I){var G=this.startPosition;if(G"+N))}}]),g}(u.default)},"./src/controller/buffer-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return c});var D=T("./src/polyfills/number.ts"),u=T("./src/events.ts"),p=T("./src/utils/logger.ts"),C=T("./src/errors.ts"),E=T("./src/utils/buffer-helper.ts"),l=T("./src/utils/mediasource-helper.ts"),s=T("./src/loader/fragment.ts"),n=T("./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),f=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function m(y){var i=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var a=i.hls,t=i.media,S=i.mediaSource;p.logger.log("[buffer-controller]: Media source opened"),t&&(i.updateMediaElementDuration(),a.trigger(u.Events.MEDIA_ATTACHED,{media:t})),S&&S.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){p.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){p.logger.log("[buffer-controller]: Media source ended")},this.hls=y,this._initSourceBuffer(),this.registerListeners()}var _=m.prototype;return _.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},_.destroy=function(){this.unregisterListeners(),this.details=null},_.registerListeners=function(){var i=this.hls;i.on(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(u.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(u.Events.BUFFER_RESET,this.onBufferReset,this),i.on(u.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(u.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(u.Events.BUFFER_EOS,this.onBufferEos,this),i.on(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(u.Events.FRAG_PARSED,this.onFragParsed,this),i.on(u.Events.FRAG_CHANGED,this.onFragChanged,this)},_.unregisterListeners=function(){var i=this.hls;i.off(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(u.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(u.Events.BUFFER_RESET,this.onBufferReset,this),i.off(u.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(u.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(u.Events.BUFFER_EOS,this.onBufferEos,this),i.off(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(u.Events.FRAG_PARSED,this.onFragParsed,this),i.off(u.Events.FRAG_CHANGED,this.onFragChanged,this)},_._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},_.onManifestParsed=function(i,a){var t=2;(a.audio&&!a.video||!a.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,p.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},_.onMediaAttaching=function(i,a){var t=this.media=a.media;if(t&&h){var S=this.mediaSource=new h;S.addEventListener("sourceopen",this._onMediaSourceOpen),S.addEventListener("sourceended",this._onMediaSourceEnded),S.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(S),this._objectUrl=t.src}},_.onMediaDetaching=function(){var i=this.media,a=this.mediaSource,t=this._objectUrl;if(a){if(p.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(S){p.logger.warn("[buffer-controller]: onMediaDetaching: "+S.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(t&&self.URL.revokeObjectURL(t),i.src===t?(i.removeAttribute("src"),i.load()):p.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(u.Events.MEDIA_DETACHED,void 0)},_.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(a){var t=i.sourceBuffer[a];try{t&&(i.removeBufferListeners(a),i.mediaSource&&i.mediaSource.removeSourceBuffer(t),i.sourceBuffer[a]=void 0)}catch(S){p.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",S)}}),this._initSourceBuffer()},_.onBufferCodecs=function(i,a){var t=this,S=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(x){if(S){var o=t.tracks[x];if(o&&typeof o.buffer.changeType=="function"){var k=a[x],O=k.codec,b=k.levelCodec,v=k.container,g=(o.levelCodec||o.codec).replace(f,"$1"),w=(b||O).replace(f,"$1");if(g!==w){var M=v+";codecs="+(b||O);t.appendChangeType(x,M)}}}else t.pendingTracks[x]=a[x]}),S)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},_.appendChangeType=function(i,a){var t=this,S=this.operationQueue,x={execute:function(){var k=t.sourceBuffer[i];k&&(p.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+a),k.changeType(a)),S.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(k){p.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",k)}};S.append(x,i)},_.onBufferAppending=function(i,a){var t=this,S=this.hls,x=this.operationQueue,o=this.tracks,k=a.data,O=a.type,b=a.frag,v=a.part,g=a.chunkMeta,w=g.buffering[O],M=self.performance.now();w.start=M;var N=b.stats.buffering,I=v?v.stats.buffering:null;N.start===0&&(N.start=M),I&&I.start===0&&(I.start=M);var G=o.audio,z=O==="audio"&&g.id===1&&(G==null?void 0:G.container)==="audio/mpeg",H={execute:function(){if(w.executeStart=self.performance.now(),z){var U=t.sourceBuffer[O];if(U){var B=b.start-U.timestampOffset;Math.abs(B)>=.1&&(p.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+b.start+" (delta: "+B+") sn: "+b.sn+")"),U.timestampOffset=b.start)}}t.appendExecutor(k,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();w.executeEnd=w.end=U,N.first===0&&(N.first=U),I&&I.first===0&&(I.first=U);var B=t.sourceBuffer,V={};for(var ae in B)V[ae]=E.BufferHelper.getBuffered(B[ae]);t.appendError=0,t.hls.trigger(u.Events.BUFFER_APPENDED,{type:O,frag:b,part:v,chunkMeta:g,parent:b.type,timeRanges:V})},onError:function(U){p.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var B={type:C.ErrorTypes.MEDIA_ERROR,parent:b.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?B.details=C.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,B.details=C.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>S.config.appendErrorMaxRetry&&(p.logger.error("[buffer-controller]: Failed "+S.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),B.fatal=!0)),S.trigger(u.Events.ERROR,B)}};x.append(H,O)},_.onBufferFlushing=function(i,a){var t=this,S=this.operationQueue,x=function(k){return{execute:t.removeExecutor.bind(t,k,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(u.Events.BUFFER_FLUSHED,{type:k})},onError:function(b){p.logger.warn("[buffer-controller]: Failed to remove from "+k+" SourceBuffer",b)}}};a.type?S.append(x(a.type),a.type):this.getSourceBufferTypes().forEach(function(o){S.append(x(o),o)})},_.onFragParsed=function(i,a){var t=this,S=a.frag,x=a.part,o=[],k=x?x.elementaryStreams:S.elementaryStreams;k[s.ElementaryStreamTypes.AUDIOVIDEO]?o.push("audiovideo"):(k[s.ElementaryStreamTypes.AUDIO]&&o.push("audio"),k[s.ElementaryStreamTypes.VIDEO]&&o.push("video"));var O=function(){var v=self.performance.now();S.stats.buffering.end=v,x&&(x.stats.buffering.end=v);var g=x?x.stats:S.stats;t.hls.trigger(u.Events.FRAG_BUFFERED,{frag:S,part:x,stats:g,id:S.type})};o.length===0&&p.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+S.type+" level: "+S.level+" sn: "+S.sn),this.blockBuffers(O,o)},_.onFragChanged=function(i,a){this.flushBackBuffer()},_.onBufferEos=function(i,a){var t=this,S=this.getSourceBufferTypes().reduce(function(x,o){var k=t.sourceBuffer[o];return(!a.type||a.type===o)&&(k&&!k.ended&&(k.ended=!0,p.logger.log("[buffer-controller]: "+o+" sourceBuffer now EOS"))),x&&!!(!k||k.ended)},!0);S&&this.blockBuffers(function(){var x=t.mediaSource;if(!x||x.readyState!=="open")return;x.endOfStream()})},_.onLevelUpdated=function(i,a){var t=a.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},_.flushBackBuffer=function(){var i=this.hls,a=this.details,t=this.media,S=this.sourceBuffer;if(!t||a===null)return;var x=this.getSourceBufferTypes();if(!x.length)return;var o=a.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(D.isFiniteNumber)(o)||o<0)return;var k=t.currentTime,O=a.levelTargetDuration,b=Math.max(o,O),v=Math.floor(k/O)*O-b;x.forEach(function(g){var w=S[g];if(w){var M=E.BufferHelper.getBuffered(w);M.length>0&&v>M.start(0)&&(i.trigger(u.Events.BACK_BUFFER_REACHED,{bufferEnd:v}),a.live&&i.trigger(u.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:v}),i.trigger(u.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:v,type:g}))}})},_.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,a=this.hls,t=this.media,S=this.mediaSource,x=i.fragments[0].start+i.totalduration,o=t.duration,k=Object(D.isFiniteNumber)(S.duration)?S.duration:0;i.live&&a.config.liveDurationInfinity?(p.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),S.duration=Infinity,this.updateSeekableRange(i)):(x>k&&x>o||!Object(D.isFiniteNumber)(o))&&(p.logger.log("[buffer-controller]: Updating Media Source duration to "+x.toFixed(3)),S.duration=x)},_.updateSeekableRange=function(i){var a=this.mediaSource,t=i.fragments,S=t.length;if(S&&i.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var x=Math.max(0,t[0].start),o=Math.max(x,x+i.totalduration);a.setLiveSeekableRange(x,o)}},_.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,a=this.operationQueue,t=this.pendingTracks,S=Object.keys(t).length;if(S&&!i||S===2){this.createSourceBuffers(t),this.pendingTracks={};var x=this.getSourceBufferTypes();if(x.length===0){this.hls.trigger(u.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}x.forEach(function(o){a.executeNext(o)})}},_.createSourceBuffers=function(i){var a=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var S=0;for(var x in i)if(!a[x]){var o=i[x];if(!o)throw Error("source buffer exists for track "+x+", however track does not");var k=o.levelCodec||o.codec,O=o.container+";codecs="+k;p.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var b=a[x]=t.addSourceBuffer(O),v=x;this.addBufferListener(v,"updatestart",this._onSBUpdateStart),this.addBufferListener(v,"updateend",this._onSBUpdateEnd),this.addBufferListener(v,"error",this._onSBUpdateError),this.tracks[x]={buffer:b,codec:k,container:o.container,levelCodec:o.levelCodec,id:o.id},S++}catch(g){p.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+g.message),this.hls.trigger(u.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:g,mimeType:O})}}S&&this.hls.trigger(u.Events.BUFFER_CREATED,{tracks:this.tracks})},_._onSBUpdateStart=function(i){var a=this.operationQueue,t=a.current(i);t.onStart()},_._onSBUpdateEnd=function(i){var a=this.operationQueue,t=a.current(i);t.onComplete(),a.shiftAndExecuteNext(i)},_._onSBUpdateError=function(i,a){p.logger.error("[buffer-controller]: "+i+" SourceBuffer error",a),this.hls.trigger(u.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(i);t&&t.onError(a)},_.removeExecutor=function(i,a,t){var S=this.media,x=this.mediaSource,o=this.operationQueue,k=this.sourceBuffer,O=k[i];if(!S||!x||!O){p.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),o.shiftAndExecuteNext(i);return}var b=Object(D.isFiniteNumber)(S.duration)?S.duration:Infinity,v=Object(D.isFiniteNumber)(x.duration)?x.duration:Infinity,g=Math.max(0,a),w=Math.min(t,b,v);w>g?(p.logger.log("[buffer-controller]: Removing ["+g+","+w+"] from the "+i+" SourceBuffer"),console.assert(!O.updating,i+" sourceBuffer must not be updating"),O.remove(g,w)):o.shiftAndExecuteNext(i)},_.appendExecutor=function(i,a){var t=this.operationQueue,S=this.sourceBuffer,x=S[a];if(!x){p.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(a);return}x.ended=!1,console.assert(!x.updating,a+" sourceBuffer must not be updating"),x.appendBuffer(i)},_.blockBuffers=function(i,a){var t=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){p.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var S=this.operationQueue,x=a.map(function(o){return S.appendBlocker(o)});Promise.all(x).then(function(){i(),a.forEach(function(o){var k=t.sourceBuffer[o];(!k||!k.updating)&&S.shiftAndExecuteNext(o)})})},_.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},_.addBufferListener=function(i,a,t){var S=this.sourceBuffer[i];if(!S)return;var x=t.bind(this,i);this.listeners[i].push({event:a,listener:x}),S.addEventListener(a,x)},_.removeBufferListeners=function(i){var a=this.sourceBuffer[i];if(!a)return;this.listeners[i].forEach(function(t){a.removeEventListener(t.event,t.listener)})},m}()},"./src/controller/buffer-operation-queue.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return u});var D=T("./src/utils/logger.ts"),u=function(){function p(E){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=E}var C=p.prototype;return C.append=function(l,s){var n=this.queues[s];n.push(l),n.length===1&&this.buffers[s]&&this.executeNext(s)},C.insertAbort=function(l,s){var n=this.queues[s];n.unshift(l),this.executeNext(s)},C.appendBlocker=function(l){var s,n=new Promise(function(f){s=f}),h={execute:s,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,l),n},C.executeNext=function(l){var s=this.buffers,n=this.queues,h=s[l],f=n[l];if(f.length){var c=f[0];try{c.execute()}catch(m){D.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(m),(!h||!h.updating)&&(f.shift(),this.executeNext(l))}}},C.shiftAndExecuteNext=function(l){this.queues[l].shift(),this.executeNext(l)},C.current=function(l){return this.queues[l][0]},p}()},"./src/controller/cap-level-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts");function u(E,l){for(var s=0;s0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var h=this.hls;h.autoLevelCapping=this.getMaxLevel(n.length-1),h.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=h.autoLevelCapping}}},l.getMaxLevel=function(n){var h=this,f=this.hls.levels;if(!f.length)return-1;var c=f.filter(function(m,_){return E.isLevelAllowed(_,h.restrictedLevels)&&_<=n});return this.clientRect=null,E.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},l.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},l.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},l.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,h={width:0,height:0};if(n){var f=n.getBoundingClientRect();h.width=f.width,h.height=f.height,!h.width&&!h.height&&(h.width=f.right-f.left||n.width||0,h.height=f.bottom-f.top||n.height||0)}return this.clientRect=h,h},E.isLevelAllowed=function(n,h){return h===void 0&&(h=[]),h.indexOf(n)===-1},E.getMaxLevelByMediaSize=function(n,h,f){if(!n||!n.length)return-1;for(var c=function(a,t){return t?a.width!==t.width||a.height!==t.height:!0},m=n.length-1,_=0;_=h||y.height>=f)&&c(y,n[_+1])){m=_;break}}return m},p(E,[{key:"mediaWidth",get:function(){return this.getDimensions().width*E.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*E.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var n=1;try{n=self.devicePixelRatio}catch(h){}return n}}]),E}();d.default=C},"./src/controller/cmcd-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return c});var D=T("./src/events.ts"),u=T("./src/types/cmcd.ts"),p=T("./src/utils/buffer-helper.ts"),C=T("./src/utils/logger.ts");function E(m,_){for(var y=0;y<_.length;y++){var i=_[y];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(m,i.key,i)}}function l(m,_,y){return _&&E(m.prototype,_),y&&E(m,y),m}function s(m,_){var y=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(y)return(y=y.call(m)).next.bind(y);if(Array.isArray(m)||(y=n(m))||_&&m&&typeof m.length=="number"){y&&(m=y);var i=0;return function(){return i>=m.length?{done:!0}:{done:!1,value:m[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(m,_){if(!m)return;if(typeof m=="string")return h(m,_);var y=Object.prototype.toString.call(m).slice(8,-1);if(y==="Object"&&m.constructor&&(y=m.constructor.name),y==="Map"||y==="Set")return Array.from(m);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return h(m,_)}function h(m,_){(_==null||_>m.length)&&(_=m.length);for(var y=0,i=new Array(_);y<_;y++)i[y]=m[y];return i}function f(){return f=Object.assign||function(m){for(var _=1;_a&&(a=o.bitrate)}return a>0?a:NaN},_.getBufferLength=function(i){var a=this.hls.media,t=i===u.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!a)return NaN;var S=p.BufferHelper.bufferInfo(t,a.currentTime,this.config.maxBufferHole);return S.len*1e3},_.createPlaylistLoader=function(){var i=this.config.pLoader,a=this.applyPlaylistData,t=i||this.config.loader;return function(){function S(o){this.loader=void 0,this.loader=new t(o)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(k,O,b){a(k),this.loader.load(k,O,b)},l(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},_.createFragmentLoader=function(){var i=this.config.fLoader,a=this.applyFragmentData,t=i||this.config.loader;return function(){function S(o){this.loader=void 0,this.loader=new t(o)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(k,O,b){a(k),this.loader.load(k,O,b)},l(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},m.uuid=function(){var i=URL.createObjectURL(new Blob),a=i.toString();return URL.revokeObjectURL(i),a.substr(a.lastIndexOf("/")+1)},m.serialize=function(i){for(var a=[],t=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},S=function(z){return Math.round(z)},x=function(z){return S(z/100)*100},o=function(z){return encodeURIComponent(z)},k={br:S,d:S,bl:x,dl:x,mtp:x,nor:o,rtp:x,tb:S},O=Object.keys(i||{}).sort(),b=s(O),v;!(v=b()).done;){var g=v.value,w=i[g];if(!t(w))continue;if(g==="v"&&w===1)continue;if(g=="pr"&&w===1)continue;var M=k[g];M&&(w=M(w));var N=typeof w,I=void 0;g==="ot"||g==="sf"||g==="st"?I=g+"="+w:N==="boolean"?I=g:N==="number"?I=g+"="+w:I=g+"="+JSON.stringify(w),a.push(I)}return a.join(",")},m.toHeaders=function(i){for(var a=Object.keys(i),t={},S=["Object","Request","Session","Status"],x=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},k=0,O=a;ks){this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var o=s-this._requestLicenseFailureCount+1;p.logger.warn("Retrying license request, "+o+" attempts left"),this._requestLicense(a,t)}break}},m._generateLicenseRequestChallenge=function(y,i){switch(y.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+y.mediaKeySystemDomain)},m._requestLicense=function(y,i){p.logger.log("Requesting content license for key-system");var a=this._mediaKeysList[0];if(!a){p.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(a.mediaKeySystemDomain),S=this._createLicenseXhr(t,y,i);p.logger.log("Sending license request to URL: "+t);var x=this._generateLicenseRequestChallenge(a,y);S.send(x)}catch(o){p.logger.error("Failure requesting DRM license: "+o),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},m.onMediaAttached=function(y,i){if(!this._emeEnabled)return;var a=i.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},m.onMediaDetached=function(){var y=this._media,i=this._mediaKeysList;if(!y)return;y.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return y.setMediaKeys(null)}).catch(function(){})},m.onManifestParsed=function(y,i){if(!this._emeEnabled)return;var a=i.levels.map(function(S){return S.audioCodec}).filter(function(S){return!!S}),t=i.levels.map(function(S){return S.videoCodec}).filter(function(S){return!!S});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,a,t)},l(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();d.default=f},"./src/controller/fps-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts"),u=T("./src/utils/logger.ts"),p=function(){function C(l){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=l,this.registerListeners()}var E=C.prototype;return E.setStreamController=function(s){this.streamController=s},E.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},E.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching)},E.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},E.onMediaAttaching=function(s,n){var h=this.hls.config;if(h.capLevelOnFPSDrop){var f=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=f,f&&typeof f.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),h.fpsDroppedMonitoringPeriod)}},E.checkFPS=function(s,n,h){var f=performance.now();if(n){if(this.lastTime){var c=f-this.lastTime,m=h-this.lastDroppedFrames,_=n-this.lastDecodedFrames,y=1e3*m/c,i=this.hls;if(i.trigger(D.Events.FPS_DROP,{currentDropped:m,currentDecoded:_,totalDroppedFrames:h}),y>0&&m>i.config.fpsDroppedMonitoringThreshold*_){var a=i.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=a)&&(a=a-1,i.trigger(D.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:i.currentLevel}),i.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=h,this.lastDecodedFrames=n}},E.checkFPSInterval=function(){var s=this.media;if(s)if(this.isVideoPlaybackQualityAvailable){var n=s.getVideoPlaybackQuality();this.checkFPS(s,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(s,s.webkitDecodedFrameCount,s.webkitDroppedFrameCount)},C}();d.default=p},"./src/controller/fragment-finders.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"findFragmentByPDT",function(){return p}),T.d(d,"findFragmentByPTS",function(){return C}),T.d(d,"fragmentWithinToleranceTest",function(){return E}),T.d(d,"pdtWithinToleranceTest",function(){return l}),T.d(d,"findFragWithCC",function(){return s});var D=T("./src/polyfills/number.ts"),u=T("./src/utils/binary-search.ts");function p(n,h,f){if(h===null||!Array.isArray(n)||!n.length||!Object(D.isFiniteNumber)(h))return null;var c=n[0].programDateTime;if(h<(c||0))return null;var m=n[n.length-1].endProgramDateTime;if(h>=(m||0))return null;f=f||0;for(var _=0;_n&&f.start?-1:0}function l(n,h,f){var c=Math.min(h,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,m=f.endProgramDateTime||0;return m-c>n}function s(n,h){return u.default.search(n,function(f){return f.cch?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"FragmentState",function(){return p}),T.d(d,"FragmentTracker",function(){return C});var D=T("./src/events.ts"),u=T("./src/types/loader.ts"),p;(function(s){s.NOT_LOADED="NOT_LOADED",s.BACKTRACKED="BACKTRACKED",s.APPENDING="APPENDING",s.PARTIAL="PARTIAL",s.OK="OK"})(p||(p={}));var C=function(){function s(h){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=h,this._registerListeners()}var n=s.prototype;return n._registerListeners=function(){var f=this.hls;f.on(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(D.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var f=this.hls;f.off(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(D.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(f,c){if(c===u.PlaylistLevelType.MAIN){var m=this.activeFragment,_=this.activeParts;if(!m)return null;if(_)for(var y=_.length;y--;){var i=_[y],a=i?i.end:m.appendedPTS;if(i.start<=f&&a!==void 0&&f<=a)return y>9&&(this.activeParts=_.slice(y-9)),i}else if(m.start<=f&&m.appendedPTS!==void 0&&f<=m.appendedPTS)return m}return this.getBufferedFrag(f,c)},n.getBufferedFrag=function(f,c){for(var m=this.fragments,_=Object.keys(m),y=_.length;y--;){var i=m[_[y]];if((i==null?void 0:i.body.type)===c&&i.buffered){var a=i.body;if(a.start<=f&&f<=a.end)return a}}return null},n.detectEvictedFragments=function(f,c,m){var _=this;Object.keys(this.fragments).forEach(function(y){var i=_.fragments[y];if(!i)return;if(!i.buffered){i.body.type===m&&_.removeFragment(i.body);return}var a=i.range[f];if(!a)return;a.time.some(function(t){var S=!_.isTimeBuffered(t.startPTS,t.endPTS,c);return S&&_.removeFragment(i.body),S})})},n.detectPartialFragments=function(f){var c=this,m=this.timeRanges,_=f.frag,y=f.part;if(!m||_.sn==="initSegment")return;var i=l(_),a=this.fragments[i];if(!a)return;Object.keys(m).forEach(function(t){var S=_.elementaryStreams[t];if(!S)return;var x=m[t],o=y!==null||S.partial===!0;a.range[t]=c.getBufferedTimes(_,y,o,x)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},n.fragBuffered=function(f){var c=l(f),m=this.fragments[c];m&&(m.backtrack=m.loaded=null,m.buffered=!0)},n.getBufferedTimes=function(f,c,m,_){for(var y={time:[],partial:m},i=c?c.start:f.start,a=c?c.end:f.end,t=f.minEndPTS||a,S=f.maxStartPTS||i,x=0;x<_.length;x++){var o=_.start(x)-this.bufferPadding,k=_.end(x)+this.bufferPadding;if(S>=o&&t<=k){y.time.push({startPTS:Math.max(i,_.start(x)),endPTS:Math.min(a,_.end(x))});break}else if(io)y.partial=!0,y.time.push({startPTS:Math.max(i,_.start(x)),endPTS:Math.min(a,_.end(x))});else if(a<=o)break}return y},n.getPartialFragment=function(f){var c=null,m,_,y,i=0,a=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(S){var x=t[S];if(!x)return;E(x)&&(_=x.body.start-a,y=x.body.end+a,f>=_&&f<=y&&(m=Math.min(f-_,y-f),i<=m&&(c=x.body,i=m)))}),c},n.getState=function(f){var c=l(f),m=this.fragments[c];return m?m.buffered?E(m)?p.PARTIAL:p.OK:m.backtrack?p.BACKTRACKED:p.APPENDING:p.NOT_LOADED},n.backtrack=function(f,c){var m=l(f),_=this.fragments[m];if(!_||_.backtrack)return null;var y=_.backtrack=c||_.loaded;return _.loaded=null,y},n.getBacktrackData=function(f){var c=l(f),m=this.fragments[c];if(m){var _,y=m.backtrack;if(y!=null&&(_=y.payload)!==null&&_!==void 0&&_.byteLength)return y;this.removeFragment(f)}return null},n.isTimeBuffered=function(f,c,m){for(var _,y,i=0;i=_&&c<=y)return!0;if(c<=_)return!1}return!1},n.onFragLoaded=function(f,c){var m=c.frag,_=c.part;if(m.sn==="initSegment"||m.bitrateTest||_)return;var y=l(m);this.fragments[y]={body:m,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(f,c){var m=this,_=c.frag,y=c.part,i=c.timeRanges;if(_.type===u.PlaylistLevelType.MAIN)if(this.activeFragment=_,y){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(y)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(t){var S=i[t];if(m.detectEvictedFragments(t,S),!y)for(var x=0;xf&&_.removeFragment(a)}})},n.removeFragment=function(f){var c=l(f);f.stats.loaded=0,f.clearElementaryStreamInfo(),delete this.fragments[c]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},s}();function E(s){var n,h;return s.buffered&&(((n=s.range.video)===null||n===void 0?void 0:n.partial)||((h=s.range.audio)===null||h===void 0?void 0:h.partial))}function l(s){return s.type+"_"+s.level+"_"+s.urlId+"_"+s.sn}},"./src/controller/gap-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"STALL_MINIMUM_DURATION_MS",function(){return E}),T.d(d,"MAX_START_GAP_JUMP",function(){return l}),T.d(d,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return s}),T.d(d,"SKIP_BUFFER_RANGE_START",function(){return n}),T.d(d,"default",function(){return h});var D=T("./src/utils/buffer-helper.ts"),u=T("./src/errors.ts"),p=T("./src/events.ts"),C=T("./src/utils/logger.ts"),E=250,l=2,s=.1,n=.05,h=function(){function f(m,_,y,i){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=m,this.media=_,this.fragmentTracker=y,this.hls=i}var c=f.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(_){var y=this.config,i=this.media,a=this.stalled,t=i.currentTime,S=i.seeking,x=this.seeking&&!S,o=!this.seeking&&S;if(this.seeking=S,t!==_){if(this.moved=!0,a!==null){if(this.stallReported){var k=self.performance.now()-a;C.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((o||x)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!D.BufferHelper.getBuffered(i).length)return;var O=D.BufferHelper.bufferInfo(i,t,0),b=O.len>0,v=O.nextStart||0;if(!b&&!v)return;if(S){var g=O.len>l,w=!v||v-t>l&&!this.fragmentTracker.getPartialFragment(t);if(g||w)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,N=Math.max(v,O.start||0)-t,I=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=I==null||((M=I.details)===null||M===void 0)?void 0:M.live,z=G?I.details.targetduration*2:l;if(N>0&&N<=z){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(a===null){this.stalled=H;return}var K=H-a;!S&&K>=E&&this._reportStall(O.len);var U=D.BufferHelper.bufferInfo(i,t,y.maxBufferHole);this._tryFixBufferStall(U,K)},c._tryFixBufferStall=function(_,y){var i=this.config,a=this.fragmentTracker,t=this.media,S=t.currentTime,x=a.getPartialFragment(S);if(x){var o=this._trySkipBufferHole(x);if(o)return}_.len>i.maxBufferHole&&y>i.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(_){var y=this.hls,i=this.media,a=this.stallReported;a||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+_+")"),y.trigger(p.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:_}))},c._trySkipBufferHole=function(_){for(var y=this.config,i=this.hls,a=this.media,t=a.currentTime,S=0,x=D.BufferHelper.getBuffered(a),o=0;o=S&&t.05&&this.forwardBufferLength>1){var o=Math.min(2,Math.max(1,i)),k=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;f.playbackRate=Math.min(o,Math.max(1,k))}else f.playbackRate!==1&&f.playbackRate!==0&&(f.playbackRate=1)},n.estimateLiveEdge=function(){var f=this.levelDetails;return f===null?null:f.edge+f.age},n.computeLatency=function(){var f=this.estimateLiveEdge();return f===null?null:f-this.currentTime},E(s,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var f=this.config,c=this.levelDetails;return f.liveMaxLatencyDuration!==void 0?f.liveMaxLatencyDuration:c?f.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var f=this.levelDetails;if(f===null)return null;var c=f.holdBack,m=f.partHoldBack,_=f.targetduration,y=this.config,i=y.liveSyncDuration,a=y.liveSyncDurationCount,t=y.lowLatencyMode,S=this.hls.userConfig,x=t&&m||c;(S.liveSyncDuration||S.liveSyncDurationCount||x===0)&&(x=i!==void 0?i:a*_);var o=_,k=1;return x+Math.min(this.stallCount*k,o)}},{key:"liveSyncPosition",get:function(){var f=this.estimateLiveEdge(),c=this.targetLatency,m=this.levelDetails;if(f===null||c===null||m===null)return null;var _=m.edge,y=f-c-this.edgeStalled,i=_-m.totalduration,a=_-(this.config.lowLatencyMode&&m.partTarget||m.targetduration);return Math.min(Math.max(i,y),a)}},{key:"drift",get:function(){var f=this.levelDetails;return f===null?1:f.drift}},{key:"edgeStalled",get:function(){var f=this.levelDetails;if(f===null)return 0;var c=(this.config.lowLatencyMode&&f.partTarget||f.targetduration)*3;return Math.max(f.age-c,0)}},{key:"forwardBufferLength",get:function(){var f=this.media,c=this.levelDetails;if(!f||!c)return 0;var m=f.buffered.length;return m?f.buffered.end(m-1):c.edge-this.currentTime}}]),s}()},"./src/controller/level-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return y});var D=T("./src/types/level.ts"),u=T("./src/events.ts"),p=T("./src/errors.ts"),C=T("./src/utils/codecs.ts"),E=T("./src/controller/level-helper.ts"),l=T("./src/controller/base-playlist-controller.ts"),s=T("./src/types/loader.ts");function n(){return n=Object.assign||function(i){for(var a=1;a0){v=k[0].bitrate,k.sort(function(K,U){return K.bitrate-U.bitrate}),this._levels=k;for(var G=0;Gthis.hls.config.fragLoadingMaxRetry&&(g=o.frag.level)):g=o.frag.level}break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:k&&(k.deliveryDirectives&&(v=!1),g=k.level),b=!0;break;case p.ErrorDetails.REMUX_ALLOC_ERROR:g=o.level,b=!0;break}g!==void 0&&this.recoverLevel(o,g,b,v)},t.recoverLevel=function(x,o,k,O){var b=x.details,v=this._levels[o];if(v.loadError++,k){var g=this.retryLoadingOrFail(x);if(g)x.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var w=v.url.length;if(w>1&&v.loadError1){var O=(o.urlId+1)%k;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(b){b.urlId=O}),this.level=x}},t.onFragLoaded=function(x,o){var k=o.frag;if(k!==void 0&&k.type===s.PlaylistLevelType.MAIN){var O=this._levels[k.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},t.onLevelLoaded=function(x,o){var k,O=o.level,b=o.details,v=this._levels[O];if(!v){var g;this.warn("Invalid level index "+O),(g=o.deliveryDirectives)!==null&&g!==void 0&&g.skip&&(b.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(v.fragmentError===0&&(v.loadError=0,this.retryCount=0),this.playlistLoaded(O,o,v.details)):(k=o.deliveryDirectives)!==null&&k!==void 0&&k.skip&&(b.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(x,o){var k=this.hls.levels[this.currentLevelIndex];if(!k)return;if(k.audioGroupIds){for(var O=-1,b=this.hls.audioTracks[o.id].groupId,v=0;v0){var O=k.urlId,b=k.url[O];if(x)try{b=x.addDirectives(b)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("Attempt loading level index "+o+(x?" at sn "+x.msn+" part "+x.part:"")+" with URL-id "+O+" "+b),this.clearTimer(),this.hls.trigger(u.Events.LEVEL_LOADING,{url:b,level:o,id:O,deliveryDirectives:x||null})}},t.removeLevel=function(x,o){var k=function(v,g){return g!==o},O=this._levels.filter(function(b,v){return v!==x?!0:b.url.length>1&&o!==void 0?(b.url=b.url.filter(k),b.audioGroupIds&&(b.audioGroupIds=b.audioGroupIds.filter(k)),b.textGroupIds&&(b.textGroupIds=b.textGroupIds.filter(k)),b.urlId=0,!0):!1}).map(function(b,v){var g=b.details;return g!=null&&g.fragments&&g.fragments.forEach(function(w){w.level=v}),b});this._levels=O,this.hls.trigger(u.Events.LEVELS_UPDATED,{levels:O})},f(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(x){var o,k=this._levels;if(k.length===0)return;if(this.currentLevelIndex===x&&(o=k[x])!==null&&o!==void 0&&o.details)return;if(x<0||x>=k.length){var O=x<0;if(this.hls.trigger(u.Events.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.LEVEL_SWITCH_ERROR,level:x,fatal:O,reason:"invalid level idx"}),O)return;x=Math.min(x,k.length-1)}this.clearTimer();var b=this.currentLevelIndex,v=k[b],g=k[x];this.log("switching to level "+x+" from "+b),this.currentLevelIndex=x;var w=n({},g,{level:x,maxBitrate:g.maxBitrate,uri:g.uri,urlId:g.urlId});delete w._urlId,this.hls.trigger(u.Events.LEVEL_SWITCHING,w);var M=g.details;if(!M||M.live){var N=this.switchParams(g.uri,v==null?void 0:v.details);this.loadPlaylist(N)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(x){this.manualLevelIndex=x,this._startLevel===void 0&&(this._startLevel=x),x!==-1&&(this.level=x)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(x){this._firstLevel=x}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var x=this.hls.config.startLevel;return x!==void 0?x:this._firstLevel}else return this._startLevel},set:function(x){this._startLevel=x}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(x){this.level=x,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=x)}}]),a}(l.default)},"./src/controller/level-helper.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"addGroupId",function(){return p}),T.d(d,"assignTrackIdsByGroup",function(){return C}),T.d(d,"updatePTS",function(){return E}),T.d(d,"updateFragPTSDTS",function(){return s}),T.d(d,"mergeDetails",function(){return n}),T.d(d,"mapPartIntersection",function(){return h}),T.d(d,"mapFragmentIntersection",function(){return f}),T.d(d,"adjustSliding",function(){return c}),T.d(d,"addSliding",function(){return m}),T.d(d,"computeReloadInterval",function(){return _}),T.d(d,"getFragmentWithSN",function(){return y}),T.d(d,"getPartWith",function(){return i});var D=T("./src/polyfills/number.ts"),u=T("./src/utils/logger.ts");function p(a,t,S){switch(t){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(S);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(S);break}}function C(a){var t={};a.forEach(function(S){var x=S.groupId||"";S.id=t[x]=t[x]||0,t[x]++})}function E(a,t,S){var x=a[t],o=a[S];l(x,o)}function l(a,t){var S=t.startPTS;if(Object(D.isFiniteNumber)(S)){var x=0,o;t.sn>a.sn?(x=S-a.start,o=a):(x=a.start-S,o=t),o.duration!==x&&(o.duration=x)}else if(t.sn>a.sn){var k=a.cc===t.cc;k&&a.minEndPTS?t.start=a.start+(a.minEndPTS-a.start):t.start=a.start+a.duration}else t.start=Math.max(a.start-t.duration,0)}function s(a,t,S,x,o,k){var O=x-S;O<=0&&(u.logger.warn("Fragment should have a positive duration",t),x=S+t.duration,k=o+t.duration);var b=S,v=x,g=t.startPTS,w=t.endPTS;if(Object(D.isFiniteNumber)(g)){var M=Math.abs(g-S);Object(D.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(M,t.deltaPTS):t.deltaPTS=M,b=Math.max(S,g),S=Math.min(S,g),o=Math.min(o,t.startDTS),v=Math.min(x,w),x=Math.max(x,w),k=Math.max(k,t.endDTS)}t.duration=x-S;var N=S-t.start;t.appendedPTS=x,t.start=t.startPTS=S,t.maxStartPTS=b,t.startDTS=o,t.endPTS=x,t.minEndPTS=v,t.endDTS=k;var I=t.sn;if(!a||Ia.endSN)return 0;var G,z=I-a.startSN,H=a.fragments;for(H[z]=t,G=z;G>0;G--)l(H[G],H[G-1]);for(G=z;G=0;o--){var k=x[o].initSegment;if(k){S=k;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var O=0,b;if(f(a,t,function(G,z){G.relurl&&(O=G.cc-z.cc),Object(D.isFiniteNumber)(G.startPTS)&&Object(D.isFiniteNumber)(G.endPTS)&&(z.start=z.startPTS=G.startPTS,z.startDTS=G.startDTS,z.appendedPTS=G.appendedPTS,z.maxStartPTS=G.maxStartPTS,z.endPTS=G.endPTS,z.endDTS=G.endDTS,z.minEndPTS=G.minEndPTS,z.duration=G.endPTS-G.startPTS,z.duration&&(b=z),t.PTSKnown=t.alignedSliding=!0),z.elementaryStreams=G.elementaryStreams,z.loader=G.loader,z.stats=G.stats,z.urlId=G.urlId,G.initSegment&&(z.initSegment=G.initSegment,S=G.initSegment)}),S){var v=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;v.forEach(function(G){var z;(!G.initSegment||G.initSegment.relurl===((z=S)===null||z===void 0?void 0:z.relurl))&&(G.initSegment=S)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(G){return!G}),t.deltaUpdateFailed)){u.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var g=t.skippedSegments;g--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var w=t.fragments;if(O){u.logger.warn("discontinuity sliding from playlist, take drift into account");for(var M=0;M=x.length)return;m(t,x[S].start)}function m(a,t){if(t){for(var S=a.fragments,x=a.skippedSegments;x0&&o0&&v===-1&&(this.log("Override startPosition with lastCurrentTime @"+g.toFixed(3)),v=g),this.state=u.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=v,this.tick()}else this._forceStartLoad=!0,this.state=u.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,o.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_LEVEL:{var v,g=this.levels,w=this.level,M=g==null||((v=g[w])===null||v===void 0)?void 0:v.details;if(M&&(!M.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(M))break;this.state=u.State.IDLE;break}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var N,I=self.performance.now(),G=this.retryDate;(!G||I>=G||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=u.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){o.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var v,g,w=this.hls,M=this.levelLastLoaded,N=this.levels,I=this.media,G=w.config,z=w.nextLoadLevel;if(M===null||!I&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!N||!N[z])return;var H=N[z];this.level=w.nextLoadLevel=z;var K=H.details;if(!K||this.state===u.State.WAITING_LEVEL||K.live&&this.levelLastLoaded!==z){this.state=u.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:I,s.PlaylistLevelType.MAIN);if(U===null)return;var B=U.len,V=this.getMaxBufferLength(H.maxBitrate);if(B>=V)return;if(this._streamEnded(U,K)){var ae={};this.altAudio&&(ae.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,ae),this.state=u.State.ENDED;return}var he=U.end,pe=this.getNextFragment(he,K);if(this.couldBacktrack&&!this.fragPrevious&&pe&&pe.sn!=="initSegment"){var Re=pe.sn-K.startSN;Re>1&&(pe=K.fragments[Re-1],this.fragmentTracker.removeFragment(pe))}if(pe&&this.fragmentTracker.getState(pe)===l.FragmentState.OK&&this.nextLoadPosition>he){var ke=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(I,ke,s.PlaylistLevelType.MAIN),pe=this.getNextFragment(this.nextLoadPosition,K)}if(!pe)return;pe.initSegment&&!pe.initSegment.data&&!this.bitrateTest&&(pe=pe.initSegment),((v=pe.decryptdata)===null||v===void 0?void 0:v.keyFormat)==="identity"&&!((g=pe.decryptdata)!==null&&g!==void 0&&g.key)?this.loadKey(pe,K):this.loadFragment(pe,K,he)},O.loadFragment=function(v,g,w){var M,N=this.fragmentTracker.getState(v);if(this.fragCurrent=v,N===l.FragmentState.BACKTRACKED){var I=this.fragmentTracker.getBacktrackData(v);if(I){this._handleFragmentLoadProgress(I),this._handleFragmentLoadComplete(I);return}else N=l.FragmentState.NOT_LOADED}N===l.FragmentState.NOT_LOADED||N===l.FragmentState.PARTIAL?v.sn==="initSegment"?this._loadInitSegment(v):this.bitrateTest?(v.bitrateTest=!0,this.log("Fragment "+v.sn+" of level "+v.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(v)):(this.startFragRequested=!0,o.prototype.loadFragment.call(this,v,g,w)):N===l.FragmentState.APPENDING?this.reduceMaxBufferLength(v.duration)&&this.fragmentTracker.removeFragment(v):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(v){var g=this.fragmentTracker.getAppendedFrag(v,s.PlaylistLevelType.MAIN);return g&&"fragment"in g?g.fragment:g},O.getBufferedFrag=function(v){return this.fragmentTracker.getBufferedFrag(v,s.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(v){return v?this.getBufferedFrag(v.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var v=this.levels,g=this.media;if(g!=null&&g.readyState){var w,M=this.getAppendedFrag(g.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!g.paused&&v){var N=this.hls.nextLoadLevel,I=v[N],G=this.fragLastKbps;G&&this.fragCurrent?w=this.fragCurrent.duration*I.maxBitrate/(1e3*G)+1:w=0}else w=0;var z=this.getBufferedFrag(g.currentTime+w);if(z){var H=this.followingBufferedFrag(z);if(H){this.abortCurrentFrag();var K=H.maxStartPTS?H.maxStartPTS:H.start,U=H.duration,B=Math.max(z.end,K+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(B,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var v=this.fragCurrent;this.fragCurrent=null,v!=null&&v.loader&&v.loader.abort(),this.state===u.State.KEY_LOADING&&(this.state=u.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(v,g){o.prototype.flushMainBuffer.call(this,v,g,this.altAudio?"video":null)},O.onMediaAttached=function(v,g){o.prototype.onMediaAttached.call(this,v,g);var w=g.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),w.addEventListener("playing",this.onvplaying),w.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,w,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var v=this.media;v&&(v.removeEventListener("playing",this.onvplaying),v.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),o.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var v=this.media,g=v?v.currentTime:null;Object(D.isFiniteNumber)(g)&&this.log("Media seeked to "+g.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(C.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(v,g){var w=!1,M=!1,N;g.levels.forEach(function(I){N=I.audioCodec,N&&(N.indexOf("mp4a.40.2")!==-1&&(w=!0),N.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=w&&M&&!Object(p.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=g.levels,this.startFragRequested=!1},O.onLevelLoading=function(v,g){var w=this.levels;if(!w||this.state!==u.State.IDLE)return;var M=w[g.level];(!M.details||M.details.live&&this.levelLastLoaded!==g.level||this.waitForCdnTuneIn(M.details))&&(this.state=u.State.WAITING_LEVEL)},O.onLevelLoaded=function(v,g){var w,M=this.levels,N=g.level,I=g.details,G=I.totalduration;if(!M){this.warn("Levels were reset while loading level "+N);return}this.log("Level "+N+" loaded ["+I.startSN+","+I.endSN+"], cc ["+I.startCC+", "+I.endCC+"] duration:"+G);var z=this.fragCurrent;z&&(this.state===u.State.FRAG_LOADING||this.state===u.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==g.level&&z.loader&&(this.state=u.State.IDLE,z.loader.abort()));var H=M[N],K=0;if(I.live||(w=H.details)!==null&&w!==void 0&&w.live){if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed)return;K=this.alignPlaylists(I,H.details)}if(H.details=I,this.levelLastLoaded=N,this.hls.trigger(C.Events.LEVEL_UPDATED,{details:I,level:N}),this.state===u.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(I))return;this.state=u.State.IDLE}this.startFragRequested?I.live&&this.synchronizeToLiveEdge(I):this.setStartPosition(I,K),this.tick()},O._handleFragmentLoadProgress=function(v){var g,w=v.frag,M=v.part,N=v.payload,I=this.levels;if(!I){this.warn("Levels were reset while fragment load was in progress. Fragment "+w.sn+" of level "+w.level+" will not be buffered");return}var G=I[w.level],z=G.details;if(!z){this.warn("Dropping fragment "+w.sn+" of level "+w.level+" after level details were reset");return}var H=G.videoCodec,K=z.PTSKnown||!z.live,U=(g=w.initSegment)===null||g===void 0?void 0:g.data,B=this._getAudioCodec(G),V=this.transmuxer=this.transmuxer||new h.default(this.hls,s.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ae=M?M.index:-1,he=ae!==-1,pe=new f.ChunkMetadata(w.level,w.sn,w.stats.chunkCount,N.byteLength,ae,he),Re=this.initPTS[w.cc];V.push(N,U,B,H,w,M,z.totalduration,K,pe,Re)},O.onAudioTrackSwitching=function(v,g){var w=this.altAudio,M=!!g.url,N=g.id;if(!M){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var I=this.fragCurrent;I!=null&&I.loader&&(this.log("Switching to main audio track, cancel main fragment load"),I.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;w&&G.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:N})}},O.onAudioTrackSwitched=function(v,g){var w=g.id,M=!!this.hls.audioTracks[w].url;if(M){var N=this.videoBuffer;N&&this.mediaBuffer!==N&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=N)}this.altAudio=M,this.tick()},O.onBufferCreated=function(v,g){var w=g.tracks,M,N,I=!1;for(var G in w){var z=w[G];if(z.id==="main"){if(N=G,M=z,G==="video"){var H=w[G];H&&(this.videoBuffer=H.buffer)}}else I=!0}I&&M?(this.log("Alternate track found, use "+N+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(v,g){var w=g.frag,M=g.part;if(w&&w.type!==s.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(w)){this.warn("Fragment "+w.sn+(M?" p: "+M.index:"")+" of level "+w.level+" finished buffering, but was aborted. state: "+this.state),this.state===u.State.PARSED&&(this.state=u.State.IDLE);return}var N=M?M.stats:w.stats;this.fragLastKbps=Math.round(8*N.total/(N.buffering.end-N.loading.first)),w.sn!=="initSegment"&&(this.fragPrevious=w),this.fragBufferedComplete(w,M)},O.onError=function(v,g){switch(g.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(s.PlaylistLevelType.MAIN,g);break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==u.State.ERROR&&(g.fatal?(this.warn(""+g.details),this.state=u.State.ERROR):!g.levelRetry&&this.state===u.State.WAITING_LEVEL&&(this.state=u.State.IDLE));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if(g.parent==="main"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var w=!0,M=this.getFwdBufferInfo(this.media,s.PlaylistLevelType.MAIN);M&&M.len>.5&&(w=!this.reduceMaxBufferLength(M.len)),w&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var v=this.media,g=this.gapController;if(!v||!g||!v.readyState)return;var w=E.BufferHelper.getBuffered(v);!this.loadedmetadata&&w.length?(this.loadedmetadata=!0,this.seekToStartPos()):g.poll(this.lastCurrentTime),this.lastCurrentTime=v.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=u.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(v,g){var w=g.type;if(w!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var M=(w===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(M,w,s.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(v,g){this.levels=g.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var v=this.media,g=v.currentTime,w=this.startPosition;if(w>=0&&g0&&(I1&&v.seeking===!1){var w=v.currentTime;if(E.BufferHelper.isBuffered(v,w)?g=this.getAppendedFrag(w):E.BufferHelper.isBuffered(v,w+.1)&&(g=this.getAppendedFrag(w+.1)),g){var M=this.fragPlaying,N=g.level;(!M||g.sn!==M.sn||M.level!==N||g.urlId!==M.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:g}),(!M||M.level!==N)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:N}),this.fragPlaying=g)}}},i(k,[{key:"nextLevel",get:function(){var v=this.nextBufferedFrag;return v?v.level:-1}},{key:"currentLevel",get:function(){var v=this.media;if(v){var g=this.getAppendedFrag(v.currentTime);if(g)return g.level}return-1}},{key:"nextBufferedFrag",get:function(){var v=this.media;if(v){var g=this.getAppendedFrag(v.currentTime);return this.followingBufferedFrag(g)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),k}(u.default)},"./src/controller/subtitle-stream-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"SubtitleStreamController",function(){return a});var D=T("./src/events.ts"),u=T("./src/utils/logger.ts"),p=T("./src/utils/buffer-helper.ts"),C=T("./src/controller/fragment-finders.ts"),E=T("./src/utils/discontinuities.ts"),l=T("./src/controller/level-helper.ts"),s=T("./src/controller/fragment-tracker.ts"),n=T("./src/controller/base-stream-controller.ts"),h=T("./src/types/loader.ts"),f=T("./src/types/level.ts");function c(t,S){for(var x=0;x=g[N].start&&M<=g[N].end){w=g[N];break}var I=b.start+b.duration;w?w.end=I:(w={start:M,end:I},g.push(w)),this.fragmentTracker.fragBuffered(b)},x.onBufferFlushing=function(k,O){var b=O.startOffset,v=O.endOffset;if(b===0&&v!==Number.POSITIVE_INFINITY){var g=this.currentTrackId,w=this.levels;if(!w.length||!w[g]||!w[g].details)return;var M=w[g].details,N=M.targetduration,I=v-N;if(I<=0)return;O.endOffsetSubtitles=Math.max(0,I),this.tracksBuffered.forEach(function(G){for(var z=0;z=M.length||g!==w||!N)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,v.live||(b=N.details)!==null&&b!==void 0&&b.live){var I=this.mainDetails;if(v.deltaUpdateFailed||!I)return;var G=I.fragments[0];if(!N.details)v.hasProgramDateTime&&I.hasProgramDateTime?Object(E.alignMediaPlaylistByPDT)(v,I):G&&Object(l.addSliding)(v,G.start);else{var z=this.alignPlaylists(v,N.details);z===0&&G&&Object(l.addSliding)(v,G.start)}}if(N.details=v,this.levelLastLoaded=g,this.tick(),v.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var H=Object(C.findFragmentByPTS)(null,v.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),N.details=void 0)}},x._handleFragmentLoadComplete=function(k){var O=k.frag,b=k.payload,v=O.decryptdata,g=this.hls;if(this.fragContextChanged(O))return;if(b&&b.byteLength>0&&v&&v.key&&v.iv&&v.method==="AES-128"){var w=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(b),v.key.buffer,v.iv.buffer).then(function(M){var N=performance.now();g.trigger(D.Events.FRAG_DECRYPTED,{frag:O,payload:M,stats:{tstart:w,tdecrypt:N}})})}},x.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var k,O=this.currentTrackId,b=this.levels;if(!b.length||!b[O]||!b[O].details)return;var v=b[O].details,g=v.targetduration,w=this.config,M=this.media,N=p.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-g,w.maxBufferHole),I=N.end,G=N.len,z=this.getMaxBufferLength()+g;if(G>z)return;console.assert(v,"Subtitle track details are defined on idle subtitle stream controller tick");var H=v.fragments,K=H.length,U=v.edge,B,V=this.fragPrevious;if(I-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},_.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},_.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var i=f(this.media.textTracks);i.forEach(function(a){Object(u.clearCurrentCues)(a)}),this.subtitleTrack=-1,this.media=null},_.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},_.onManifestParsed=function(i,a){this.tracks=a.subtitleTracks},_.onSubtitleTrackLoaded=function(i,a){var t=a.id,S=a.details,x=this.trackId,o=this.tracksInGroup[x];if(!o){this.warn("Invalid subtitle track id "+t);return}var k=o.details;o.details=a.details,this.log("subtitle track "+t+" loaded ["+S.startSN+"-"+S.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,a,k))},_.onLevelLoading=function(i,a){this.switchLevel(a.level)},_.onLevelSwitching=function(i,a){this.switchLevel(a.level)},_.switchLevel=function(i){var a=this.hls.levels[i];if(!(a!=null&&a.textGroupIds))return;var t=a.textGroupIds[a.urlId];if(this.groupId!==t){var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,x=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=x;var o=this.findTrackId(S==null?void 0:S.name)||this.findTrackId();this.groupId=t;var k={subtitleTracks:x};this.log("Updating subtitle tracks, "+x.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(D.Events.SUBTITLE_TRACKS_UPDATED,k),o!==-1&&this.setSubtitleTrack(o,S)}},_.findTrackId=function(i){for(var a=this.tracksInGroup,t=0;t=S.length)return;this.clearTimer();var x=S[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,x){var o=x.id,k=x.groupId,O=k===void 0?"":k,b=x.name,v=x.type,g=x.url;this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:O,name:b,type:v,url:g});var w=this.switchParams(x.url,a==null?void 0:a.details);this.loadPlaylist(w)}else this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:i})},_.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,a=f(this.media.textTracks),t=0;t=0&&(v[0]=Math.min(v[0],S),v[1]=Math.max(v[1],x),O=!0,g/(x-S)>.5))return}if(O||k.push([S,x]),this.config.renderTextTracksNatively){var w=this.captionsTracks[t];this.Cues.newCue(w,S,x,o)}else{var M=this.Cues.newCue(null,S,x,o);this.hls.trigger(u.Events.CUES_PARSED,{type:"captions",cues:M,track:t})}},i.onInitPtsFound=function(t,S){var x=this,o=S.frag,k=S.id,O=S.initPTS,b=S.timescale,v=this.unparsedVttFrags;k==="main"&&(this.initPTS[o.cc]=O,this.timescale[o.cc]=b),v.length&&(this.unparsedVttFrags=[],v.forEach(function(g){x.onFragLoaded(u.Events.FRAG_LOADED,g)}))},i.getExistingTrack=function(t){var S=this.media;if(S)for(var x=0;x>>8^b&255^99,s[o]=b,n[b]=o;var v=x[o],g=x[v],w=x[g],M=x[b]*257^b*16843008;f[o]=M<<24|M>>>8,c[o]=M<<16|M>>>16,m[o]=M<<8|M>>>24,_[o]=M,M=w*16843009^g*65537^v*257^o*16843008,i[b]=M<<24|M>>>8,a[b]=M<<16|M>>>16,t[b]=M<<8|M>>>24,S[b]=M,o?(o=v^x[x[x[w^v]]],k^=x[x[k]]):o=k=1}},E.expandKey=function(s){for(var n=this.uint8ArrayToUint32Array_(s),h=!0,f=0;f>>6)+1;var M=(t[S+2]&60)>>>2;if(M>w.length-1){a.trigger(p.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+M});return}return O=(t[S+2]&1)<<2,O|=(t[S+3]&192)>>>6,D.logger.log("manifest codec:"+x+", ADTS type:"+o+", samplingIndex:"+M),/firefox/i.test(v)?M>=6?(o=5,b=new Array(4),k=M-3):(o=2,b=new Array(2),k=M):v.indexOf("android")!==-1?(o=2,b=new Array(2),k=M):(o=5,b=new Array(4),x&&(x.indexOf("mp4a.40.29")!==-1||x.indexOf("mp4a.40.5")!==-1)||!x&&M>=6?k=M-3:((x&&x.indexOf("mp4a.40.2")!==-1&&(M>=6&&O===1||/vivaldi/i.test(v))||!x&&O===1)&&(o=2,b=new Array(2)),k=M)),b[0]=o<<3,b[0]|=(M&14)>>1,b[1]|=(M&1)<<7,b[1]|=O<<3,o===5&&(b[1]|=(k&14)>>1,b[2]=(k&1)<<7,b[2]|=2<<2,b[3]=0),{config:b,samplerate:w[M],channelCount:O,codec:"mp4a.40."+o,manifestCodec:g}}function E(a,t){return a[t]===255&&(a[t+1]&246)===240}function l(a,t){return a[t+1]&1?7:9}function s(a,t){return(a[t+3]&3)<<11|a[t+4]<<3|(a[t+5]&224)>>>5}function n(a,t){return t+5=a.length)return!1;var x=s(a,t);if(x<=S)return!1;var o=t+x;return o===a.length||h(a,o)}return!1}function m(a,t,S,x,o){if(!a.samplerate){var k=C(t,S,x,o);if(!k)return;a.config=k.config,a.samplerate=k.samplerate,a.channelCount=k.channelCount,a.codec=k.codec,a.manifestCodec=k.manifestCodec,D.logger.log("parsed codec:"+a.codec+", rate:"+k.samplerate+", channels:"+k.channelCount)}}function _(a){return 1024*9e4/a}function y(a,t,S,x,o){var k=l(a,t),O=s(a,t);if(O-=k,O>0){var b=S+x*o;return{headerLength:k,frameLength:O,stamp:b}}}function i(a,t,S,x,o){var k=_(a.samplerate),O=y(t,S,x,o,k);if(O){var b=O.frameLength,v=O.headerLength,g=O.stamp,w=v+b,M=Math.max(0,S+w-t.length),N;M?(N=new Uint8Array(w-v),N.set(t.subarray(S+v,t.length),0)):N=t.subarray(S+v,S+w);var I={unit:N,pts:g};return M||a.samples.push(I),{sample:I,length:w,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"initPTSFn",function(){return s});var D=T("./src/polyfills/number.ts"),u=T("./src/demux/id3.ts"),p=T("./src/demux/dummy-demuxed-track.ts"),C=T("./src/utils/mp4-tools.ts"),E=T("./src/utils/typed-array.ts"),l=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var h=n.prototype;return h.resetInitSegment=function(c,m,_){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},h.resetTimeStamp=function(){},h.resetContiguity=function(){},h.canParse=function(c,m){return!1},h.appendFrame=function(c,m,_){},h.demux=function(c,m){this.cachedData&&(c=Object(C.appendUint8Array)(this.cachedData,c),this.cachedData=null);var _=u.getID3Data(c,0),y=_?_.length:0,i,a,t=this._audioTrack,S=this._id3Track,x=_?u.getTimeStamp(_):void 0,o=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=s(x,m)),_&&_.length>0&&S.samples.push({pts:this.initPTS,dts:this.initPTS,data:_}),a=this.initPTS;yl?(this.word<<=l,this.bitsAvailable-=l):(l-=this.bitsAvailable,s=l>>3,l-=s>>3,this.bytesAvailable-=s,this.loadWord(),this.word<<=l,this.bitsAvailable-=l)},C.readBits=function(l){var s=Math.min(this.bitsAvailable,l),n=this.word>>>32-s;return l>32&&D.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=s,this.bitsAvailable>0?this.word<<=s:this.bytesAvailable>0&&this.loadWord(),s=l-s,s>0&&this.bitsAvailable?n<>>l)!==0)return this.word<<=l,this.bitsAvailable-=l,l;return this.loadWord(),l+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var l=this.skipLZ();return this.readBits(l+1)-1},C.readEG=function(){var l=this.readUEG();return 1&l?1+l>>>1:-1*(l>>>1)},C.readBoolean=function(){return this.readBits(1)===1},C.readUByte=function(){return this.readBits(8)},C.readUShort=function(){return this.readBits(16)},C.readUInt=function(){return this.readBits(32)},C.skipScalingList=function(l){for(var s=8,n=8,h,f=0;f0?o.subarray(O,O+b):void 0},C=function(o,k){var O=0;return O=(o[k]&127)<<21,O|=(o[k+1]&127)<<14,O|=(o[k+2]&127)<<7,O|=o[k+3]&127,O},E=function(o,k){return D(o,k)&&C(o,k+6)+10<=o.length-k},l=function(o){for(var k=h(o),O=0;O>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:I+=String.fromCharCode(w);break;case 12:case 13:M=o[G++],I+=String.fromCharCode((w&31)<<6|M&63);break;case 14:M=o[G++],N=o[G++],I+=String.fromCharCode((w&15)<<12|(M&63)<<6|(N&63)<<0);break;default:}}return I},a={decodeTextFrame:m},t;function S(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/demux/base-audio-demuxer.ts"),u=T("./src/demux/id3.ts"),p=T("./src/utils/logger.ts"),C=T("./src/demux/mpegaudio.ts");function E(n,h){n.prototype=Object.create(h.prototype),n.prototype.constructor=n,l(n,h)}function l(n,h){return l=Object.setPrototypeOf||function(c,m){return c.__proto__=m,c},l(n,h)}var s=function(n){E(h,n);function h(){return n.apply(this,arguments)||this}var f=h.prototype;return f.resetInitSegment=function(m,_,y){n.prototype.resetInitSegment.call(this,m,_,y),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:m,duration:y,inputTimeScale:9e4,dropped:0}},h.probe=function(m){if(!m)return!1;for(var _=u.getID3Data(m,0)||[],y=_.length,i=m.length;y0},E.demux=function(s){var n=s,h=Object(u.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(D.appendUint8Array)(this.remainderData,s));var f=Object(D.segmentValidRange)(n);this.remainderData=f.remainder,h.samples=f.valid||new Uint8Array}else h.samples=n;return{audioTrack:Object(u.dummyTrack)(),avcTrack:h,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},E.flush=function(){var s=Object(u.dummyTrack)();return s.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(u.dummyTrack)(),avcTrack:s,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},E.demuxSampleAes=function(s,n,h){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},E.destroy=function(){},C}();p.minProbeByteLength=1024,d.default=p},"./src/demux/mpegaudio.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"appendFrame",function(){return l}),T.d(d,"parseHeader",function(){return s}),T.d(d,"isHeaderPattern",function(){return n}),T.d(d,"isHeader",function(){return h}),T.d(d,"canParse",function(){return f}),T.d(d,"probe",function(){return c});var D=null,u=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],p=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],E=[0,1,1,4];function l(m,_,y,i,a){if(y+24>_.length)return;var t=s(_,y);if(t&&y+t.frameLength<=_.length){var S=t.samplesPerFrame*9e4/t.sampleRate,x=i+a*S,o={unit:_.subarray(y,y+t.frameLength),pts:x,dts:x};return m.config=[],m.channelCount=t.channelCount,m.samplerate=t.sampleRate,m.samples.push(o),{sample:o,length:t.frameLength,missing:0}}}function s(m,_){var y=m[_+1]>>3&3,i=m[_+1]>>1&3,a=m[_+2]>>4&15,t=m[_+2]>>2&3;if(y!==1&&a!==0&&a!==15&&t!==3){var S=m[_+2]>>1&1,x=m[_+3]>>6,o=y===3?3-i:i===3?3:4,k=u[o*14+a-1]*1e3,O=y===3?0:y===2?1:2,b=p[O*3+t],v=x===3?1:2,g=C[y][i],w=E[i],M=g*8*w,N=Math.floor(g*k/b+S)*w;if(D===null){var I=navigator.userAgent||"",G=I.match(/Chrome\/(\d+)/i);D=G?parseInt(G[1]):0}var z=!!D&&D<=87;return z&&i===2&&k>=224e3&&x===0&&(m[_+3]=m[_+3]|128),{sampleRate:b,channelCount:v,frameLength:N,samplesPerFrame:M}}}function n(m,_){return m[_]===255&&(m[_+1]&224)===224&&(m[_+1]&6)!==0}function h(m,_){return _+1=s.length){h();return}if(s[n].unit.length<32)continue;var f=this.decrypter.isSync();if(this.decryptAacSample(s,n,h,f),!f)return}},E.getAvcEncryptedData=function(s){for(var n=Math.floor((s.length-48)/160)*16+16,h=new Int8Array(n),f=0,c=32;c<=s.length-16;c+=160,f+=16)h.set(s.subarray(c,c+16),f);return h},E.getAvcDecryptedUnit=function(s,n){for(var h=new Uint8Array(n),f=0,c=32;c<=s.length-16;c+=160,f+=16)s.set(h.subarray(f,f+16),c);return s},E.decryptAvcSample=function(s,n,h,f,c,m){var _=Object(u.discardEPB)(c.data),y=this.getAvcEncryptedData(_),i=this;this.decryptBuffer(y.buffer,function(a){c.data=i.getAvcDecryptedUnit(_,a),m||i.decryptAvcSamples(s,n,h+1,f)})},E.decryptAvcSamples=function(s,n,h,f){if(s instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,h=0){if(n>=s.length){f();return}for(var c=s[n].units;!(h>=c.length);h++){var m=c[h];if(m.data.length<=48||m.type!==1&&m.type!==5)continue;var _=this.decrypter.isSync();if(this.decryptAvcSample(s,n,h,f,m,_),!_)return}}},C}();d.default=p},"./src/demux/transmuxer-interface.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return c});var D=T("./node_modules/webworkify-webpack/index.js"),u=T.n(D),p=T("./src/events.ts"),C=T("./src/demux/transmuxer.ts"),E=T("./src/utils/logger.ts"),l=T("./src/errors.ts"),s=T("./src/utils/mediasource-helper.ts"),n=T("./node_modules/eventemitter3/index.js"),h=T.n(n),f=Object(s.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function m(y,i,a,t){var S=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=y,this.id=i,this.onTransmuxComplete=a,this.onFlush=t;var x=y.config,o=function(g,w){w=w||{},w.frag=S.frag,w.id=S.id,y.trigger(g,w)};this.observer=new n.EventEmitter,this.observer.on(p.Events.FRAG_DECRYPTED,o),this.observer.on(p.Events.ERROR,o);var k={mp4:f.isTypeSupported("video/mp4"),mpeg:f.isTypeSupported("audio/mpeg"),mp3:f.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(x.enableWorker&&typeof Worker!="undefined"){E.logger.log("demuxing in webworker");var b;try{b=this.worker=D("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),b.addEventListener("message",this.onwmsg),b.onerror=function(v){y.trigger(p.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(v.message+" ("+v.filename+":"+v.lineno+")")})},b.postMessage({cmd:"init",typeSupported:k,vendor:O,id:i,config:JSON.stringify(x)})}catch(v){E.logger.warn("Error in worker:",v),E.logger.error("Error while initializing DemuxerWorker, fallback to inline"),b&&self.URL.revokeObjectURL(b.objectURL),this.transmuxer=new C.default(this.observer,k,x,O,i),this.worker=null}}else this.transmuxer=new C.default(this.observer,k,x,O,i)}var _=m.prototype;return _.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},_.push=function(i,a,t,S,x,o,k,O,b,v){var g=this;b.transmuxing.start=self.performance.now();var w=this.transmuxer,M=this.worker,N=o?o.start:x.start,I=x.decryptdata,G=this.frag,z=!(G&&x.cc===G.cc),H=!(G&&b.level===G.level),K=G?b.sn-G.sn:-1,U=this.part?b.part-this.part.index:1,B=!H&&(K===1||K===0&&U===1),V=self.performance.now();(H||K||x.stats.parsing.start===0)&&(x.stats.parsing.start=V),o&&(U||!B)&&(o.stats.parsing.start=V);var ae=new C.TransmuxState(z,B,O,H,N);if(!B||z){E.logger.log("[transmuxer-interface, "+x.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+` discontinuity: `+z+` trackSwitch: `+H+` contiguous: `+B+` accurateTimeOffset: `+O+` timeOffset: `+N);var he=new C.TransmuxConfig(t,S,a,k,v);this.configureTransmuxer(he)}if(this.frag=x,this.part=o,M)M.postMessage({cmd:"demux",data:i,decryptdata:I,chunkMeta:b,state:ae},i instanceof ArrayBuffer?[i]:[]);else if(w){var pe=w.push(i,I,b,ae);Object(C.isPromise)(pe)?pe.then(function(Re){g.handleTransmuxComplete(Re)}):this.handleTransmuxComplete(pe)}},_.flush=function(i){var a=this;i.transmuxing.start=self.performance.now();var t=this.transmuxer,S=this.worker;if(S)S.postMessage({cmd:"flush",chunkMeta:i});else if(t){var x=t.flush(i);Object(C.isPromise)(x)?x.then(function(o){a.handleFlushResult(o,i)}):this.handleFlushResult(x,i)}},_.handleFlushResult=function(i,a){var t=this;i.forEach(function(S){t.handleTransmuxComplete(S)}),this.onFlush(a)},_.onWorkerMessage=function(i){var a=i.data,t=this.hls;switch(a.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(a.data);break}case"flush":{this.onFlush(a.data);break}default:{a.data=a.data||{},a.data.frag=this.frag,a.data.id=this.id,t.trigger(a.event,a.data);break}}},_.configureTransmuxer=function(i){var a=this.worker,t=this.transmuxer;a?a.postMessage({cmd:"configure",config:i}):t&&t.configure(i)},_.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},m}()},"./src/demux/transmuxer-worker.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return l});var D=T("./src/demux/transmuxer.ts"),u=T("./src/events.ts"),p=T("./src/utils/logger.ts"),C=T("./node_modules/eventemitter3/index.js"),E=T.n(C);function l(c){var m=new C.EventEmitter,_=function(i,a){c.postMessage({event:i,data:a})};m.on(u.Events.FRAG_DECRYPTED,_),m.on(u.Events.ERROR,_),c.addEventListener("message",function(y){var i=y.data;switch(i.cmd){case"init":{var a=JSON.parse(i.config);c.transmuxer=new D.default(m,i.typeSupported,a,i.vendor,i.id),Object(p.enableLogs)(a.debug),_("init",null);break}case"configure":{c.transmuxer.configure(i.config);break}case"demux":{var t=c.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(D.isPromise)(t)?t.then(function(o){s(c,o)}):s(c,t);break}case"flush":{var S=i.chunkMeta,x=c.transmuxer.flush(S);Object(D.isPromise)(x)?x.then(function(o){h(c,o,S)}):h(c,x,S);break}default:break}})}function s(c,m){if(f(m.remuxResult))return;var _=[],y=m.remuxResult,i=y.audio,a=y.video;i&&n(_,i),a&&n(_,a),c.postMessage({event:"transmuxComplete",data:m},_)}function n(c,m){m.data1&&c.push(m.data1.buffer),m.data2&&c.push(m.data2.buffer)}function h(c,m,_){m.forEach(function(y){s(c,y)}),c.postMessage({event:"flush",data:_})}function f(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return a}),T.d(d,"isPromise",function(){return x}),T.d(d,"TransmuxConfig",function(){return o}),T.d(d,"TransmuxState",function(){return k});var D=T("./src/events.ts"),u=T("./src/errors.ts"),p=T("./src/crypt/decrypter.ts"),C=T("./src/demux/aacdemuxer.ts"),E=T("./src/demux/mp4demuxer.ts"),l=T("./src/demux/tsdemuxer.ts"),s=T("./src/demux/mp3demuxer.ts"),n=T("./src/remux/mp4-remuxer.ts"),h=T("./src/remux/passthrough-remuxer.ts"),f=T("./src/demux/chunk-cache.ts"),c=T("./src/utils/mp4-tools.ts"),m=T("./src/utils/logger.ts"),_;try{_=self.performance.now.bind(self.performance)}catch(O){m.logger.debug("Unable to use Performance API on this environment"),_=self.Date.now}var y=[{demux:l.default,remux:n.default},{demux:E.default,remux:h.default},{demux:C.default,remux:n.default},{demux:s.default,remux:n.default}],i=1024;y.forEach(function(O){var b=O.demux;i=Math.max(i,b.minProbeByteLength)});var a=function(){function O(v,g,w,M,N){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new f.default,this.observer=v,this.typeSupported=g,this.config=w,this.vendor=M,this.id=N}var b=O.prototype;return b.configure=function(g){this.transmuxConfig=g,this.decrypter&&this.decrypter.reset()},b.push=function(g,w,M,N){var I=this,G=M.transmuxing;G.executeStart=_();var z=new Uint8Array(g),H=this.cache,K=this.config,U=this.currentTransmuxState,B=this.transmuxConfig;N&&(this.currentTransmuxState=N);var V=t(z,w);if(V&&V.method==="AES-128"){var ae=this.getDecrypter();if(K.enableSoftwareAES){var he=ae.softwareDecrypt(z,V.key.buffer,V.iv.buffer);if(!he)return G.executeEnd=_(),S(M);z=new Uint8Array(he)}else return this.decryptionPromise=ae.webCryptoDecrypt(z,V.key.buffer,V.iv.buffer).then(function(J){var X=I.push(J,null,M);return I.decryptionPromise=null,X}),this.decryptionPromise}var pe=N||U,Re=pe.contiguous,ke=pe.discontinuity,ve=pe.trackSwitch,Te=pe.accurateTimeOffset,be=pe.timeOffset,ue=B.audioCodec,le=B.videoCodec,re=B.defaultInitPts,fe=B.duration,q=B.initSegmentData;if((ke||ve)&&this.resetInitSegment(q,ue,le,fe),ke&&this.resetInitialTimestamp(re),Re||this.resetContiguity(),this.needsProbing(z,ke,ve)){if(H.dataLength){var ee=H.flush();z=Object(c.appendUint8Array)(ee,z)}this.configureTransmuxer(z,B)}var Ce=this.transmux(z,V,be,Te,M),te=this.currentTransmuxState;return te.contiguous=!0,te.discontinuity=!1,te.trackSwitch=!1,G.executeEnd=_(),Ce},b.flush=function(g){var w=this,M=g.transmuxing;M.executeStart=_();var N=this.decrypter,I=this.cache,G=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return w.flush(g)});var H=[],K=G.timeOffset;if(N){var U=N.flush();U&&H.push(this.push(U,null,g))}var B=I.dataLength;I.reset();var V=this.demuxer,ae=this.remuxer;if(!V||!ae)return B>=i&&this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=_(),[S(g)];var he=V.flush(K);return x(he)?he.then(function(pe){return w.flushRemux(H,pe,g),H}):(this.flushRemux(H,he,g),H)},b.flushRemux=function(g,w,M){var N=w.audioTrack,I=w.avcTrack,G=w.id3Track,z=w.textTrack,H=this.currentTransmuxState,K=H.accurateTimeOffset,U=H.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var B=this.remuxer.remux(N,I,G,z,U,K,!0,this.id);g.push({remuxResult:B,chunkMeta:M}),M.transmuxing.executeEnd=_()},b.resetInitialTimestamp=function(g){var w=this.demuxer,M=this.remuxer;if(!w||!M)return;w.resetTimeStamp(g),M.resetTimeStamp(g)},b.resetContiguity=function(){var g=this.demuxer,w=this.remuxer;if(!g||!w)return;g.resetContiguity(),w.resetNextTimestamp()},b.resetInitSegment=function(g,w,M,N){var I=this.demuxer,G=this.remuxer;if(!I||!G)return;I.resetInitSegment(w,M,N),G.resetInitSegment(g,w,M)},b.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},b.transmux=function(g,w,M,N,I){var G;return w&&w.method==="SAMPLE-AES"?G=this.transmuxSampleAes(g,w,M,N,I):G=this.transmuxUnencrypted(g,M,N,I),G},b.transmuxUnencrypted=function(g,w,M,N){var I=this.demuxer.demux(g,w,!1,!this.config.progressive),G=I.audioTrack,z=I.avcTrack,H=I.id3Track,K=I.textTrack,U=this.remuxer.remux(G,z,H,K,w,M,!1,this.id);return{remuxResult:U,chunkMeta:N}},b.transmuxSampleAes=function(g,w,M,N,I){var G=this;return this.demuxer.demuxSampleAes(g,w,M).then(function(z){var H=G.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,M,N,!1,G.id);return{remuxResult:H,chunkMeta:I}})},b.configureTransmuxer=function(g,w){for(var M=this.config,N=this.observer,I=this.typeSupported,G=this.vendor,z=w.audioCodec,H=w.defaultInitPts,K=w.duration,U=w.initSegmentData,B=w.videoCodec,V,ae=0,he=y.length;ae0&&b!=null&&b.key!=null&&b.iv!==null&&b.method!=null&&(v=b),v}var S=function(b){return{remuxResult:{},chunkMeta:b}};function x(O){return"then"in O&&O.then instanceof Function}var o=function(b,v,g,w,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=b,this.videoCodec=v,this.initSegmentData=g,this.duration=w,this.defaultInitPts=M},k=function(b,v,g,w,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=b,this.contiguous=v,this.accurateTimeOffset=g,this.trackSwitch=w,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"discardEPB",function(){return S});var D=T("./src/demux/adts.ts"),u=T("./src/demux/mpegaudio.ts"),p=T("./src/demux/exp-golomb.ts"),C=T("./src/demux/id3.ts"),E=T("./src/demux/sample-aes.ts"),l=T("./src/events.ts"),s=T("./src/utils/mp4-tools.ts"),n=T("./src/utils/logger.ts"),h=T("./src/errors.ts"),f={video:1,audio:2,id3:3,text:4},c=function(){function x(k,O,b){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=k,this.config=O,this.typeSupported=b}x.probe=function(O){var b=x.syncOffset(O);return b<0?!1:(b&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+b+", junk ahead ?"),!0)},x.syncOffset=function(O){for(var b=Math.min(1e3,O.length-3*188),v=0;v>4,ue=void 0;if(be>1){if(ue=ke+5+O[ke+4],ue===ke+188)continue}else ue=ke+4;switch(Te){case G:ve&&(z&&(w=i(z))&&this.parseAVCPES(w,!1),z={data:[],size:0}),z&&(z.data.push(O.subarray(ue,ke+188)),z.size+=ke+188-ue);break;case H:ve&&(U&&(w=i(U))&&(N.isAAC?this.parseAACPES(w):this.parseMPEGPES(w)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ue,ke+188)),U.size+=ke+188-ue);break;case K:ve&&(B&&(w=i(B))&&this.parseID3PES(w),B={data:[],size:0}),B&&(B.data.push(O.subarray(ue,ke+188)),B.size+=ke+188-ue);break;case 0:ve&&(ue+=O[ue]+1),he=this._pmtId=_(O,ue);break;case he:{ve&&(ue+=O[ue]+1);var le=y(O,ue,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,v);G=le.avc,G>0&&(M.pid=G),H=le.audio,H>0&&(N.pid=H,N.isAAC=le.isAAC),K=le.id3,K>0&&(I.pid=K),V&&!ae&&(n.logger.log("reparse from beginning"),V=!1,ke=Re-188),ae=this.pmtParsed=!0;break}case 17:case 8191:break;default:V=!0;break}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=z,N.pesData=U,I.pesData=B;var re={audioTrack:N,avcTrack:M,id3Track:I,textTrack:this._txtTrack};return g&&this.extractRemainingSamples(re),re},o.flush=function(){var O=this.remainderData;this.remainderData=null;var b;return O?b=this.demux(O,-1,!1,!0):b={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(b),this.sampleAes?this.decrypt(b,this.sampleAes):b},o.extractRemainingSamples=function(O){var b=O.audioTrack,v=O.avcTrack,g=O.id3Track,w=v.pesData,M=b.pesData,N=g.pesData,I;w&&(I=i(w))?(this.parseAVCPES(I,!0),v.pesData=null):v.pesData=w,M&&(I=i(M))?(b.isAAC?this.parseAACPES(I):this.parseMPEGPES(I),b.pesData=null):(M!=null&&M.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),b.pesData=M),N&&(I=i(N))?(this.parseID3PES(I),g.pesData=null):g.pesData=N},o.demuxSampleAes=function(O,b,v){var g=this.demux(O,v,!0,!this.config.progressive),w=this.sampleAes=new E.default(this.observer,this.config,b);return this.decrypt(g,w)},o.decrypt=function(O,b){return new Promise(function(v){var g=O.audioTrack,w=O.avcTrack;g.samples&&g.isAAC?b.decryptAacSamples(g.samples,0,function(){w.samples?b.decryptAvcSamples(w.samples,0,0,function(){v(O)}):v(O)}):w.samples&&b.decryptAvcSamples(w.samples,0,0,function(){v(O)})})},o.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},o.parseAVCPES=function(O,b){var v=this,g=this._avcTrack,w=this.parseAVCNALu(O.data),M=!1,N=this.avcSample,I,G=!1;O.data=null,N&&w.length&&!g.audFound&&(a(N,g),N=this.avcSample=m(!1,O.pts,O.dts,"")),w.forEach(function(z){switch(z.type){case 1:{I=!0,N||(N=v.avcSample=m(!0,O.pts,O.dts,"")),M&&(N.debug+="NDR "),N.frame=!0;var H=z.data;if(G&&H.length>4){var K=new p.default(H).readSliceType();(K===2||K===4||K===7||K===9)&&(N.key=!0)}break}case 5:I=!0,N||(N=v.avcSample=m(!0,O.pts,O.dts,"")),M&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{I=!0,M&&N&&(N.debug+="SEI ");var U=new p.default(S(z.data));U.readUByte();for(var B=0,V=0,ae=!1,he=0;!ae&&U.bytesAvailable>1;){B=0;do he=U.readUByte(),B+=he;while(he===255);V=0;do he=U.readUByte(),V+=he;while(he===255);if(B===4&&U.bytesAvailable!==0){ae=!0;var pe=U.readUByte();if(pe===181){var Re=U.readUShort();if(Re===49){var ke=U.readUInt();if(ke===1195456820){var ve=U.readUByte();if(ve===3){for(var Te=U.readUByte(),be=U.readUByte(),ue=31&Te,le=[Te,be],re=0;re16){for(var fe=[],q=0;q<16;q++)fe.push(U.readUByte().toString(16)),(q===3||q===5||q===7||q===9)&&fe.push("-");for(var ee=V-16,Ce=new Uint8Array(ee),te=0;te=0){var U={data:O.subarray(H,N-g-1),type:K};M.push(U)}else{var B=this.getLastNalUnit();if(B&&(w&&N<=4-w&&(B.state&&(B.data=B.data.subarray(0,B.data.byteLength-w))),G=N-g-1,G>0)){var V=new Uint8Array(B.data.byteLength+G);V.set(B.data,0),V.set(O.subarray(0,G),B.data.byteLength),B.data=V,B.state=0}}N=0&&g>=0){var ae={data:O.subarray(H,b),type:K,state:g};M.push(ae)}if(M.length===0){var he=this.getLastNalUnit();if(he){var pe=new Uint8Array(he.data.byteLength+O.byteLength);pe.set(he.data,0),pe.set(O,he.data.byteLength),he.data=pe}}return v.naluState=g,M},o.parseAACPES=function(O){var b=0,v=this._audioTrack,g=this.aacOverFlow,w=O.data;if(g){this.aacOverFlow=null;var M=g.sample.unit.byteLength,N=Math.min(g.missing,M),I=M-N;g.sample.unit.set(w.subarray(0,N),I),v.samples.push(g.sample),b=g.missing}var G,z;for(G=b,z=w.length;G1;){var M=new Uint8Array(w[0].length+w[1].length);M.set(w[0]),M.set(w[1],w[0].length),w[0]=M,w.splice(1,1)}k=w[0];var N=(k[0]<<16)+(k[1]<<8)+k[2];if(N===1){if(O=(k[4]<<8)+k[5],O&&O>x.size-6)return null;var I=k[7];I&192&&(v=(k[9]&14)*536870912+(k[10]&255)*4194304+(k[11]&254)*16384+(k[12]&255)*128+(k[13]&254)/2,I&64?(g=(k[14]&14)*536870912+(k[15]&255)*4194304+(k[16]&254)*16384+(k[17]&255)*128+(k[18]&254)/2,v-g>60*9e4&&(n.logger.warn(Math.round((v-g)/9e4)+"s delta between PTS and DTS, align them"),v=g)):g=v),b=k[8];var G=b+9;if(x.size<=G)return null;x.size-=G;for(var z=new Uint8Array(x.size),H=0,K=w.length;HU){G-=U;continue}else k=k.subarray(G),U-=G,G=0;z.set(k,o),o+=U}return O&&(O-=b+3),{data:z,pts:v,dts:g,len:O}}return null}function a(x,o){if(x.units.length&&x.frame){if(x.pts===void 0){var k=o.samples,O=k.length;if(O){var b=k[O-1];x.pts=b.pts,x.dts=b.dts}else{o.dropped++;return}}o.samples.push(x)}x.debug.length&&n.logger.log(x.pts+"/"+x.dts+":"+x.debug)}function t(x,o){var k=x.length;if(k>0){if(o.pts>=x[k-1].pts)x.push(o);else for(var O=k-1;O>=0;O--)if(o.ptsv)return w;return 0}},{key:"maxAutoLevel",get:function(){var b=this.levels,v=this.autoLevelCapping,g;return v===-1&&b&&b.length?g=b.length-1:g=v,g}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(b){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,b)}},{key:"audioTracks",get:function(){var b=this.audioTrackController;return b?b.audioTracks:[]}},{key:"audioTrack",get:function(){var b=this.audioTrackController;return b?b.audioTrack:-1},set:function(b){var v=this.audioTrackController;v&&(v.audioTrack=b)}},{key:"subtitleTracks",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTrack:-1},set:function(b){var v=this.subtitleTrackController;v&&(v.subtitleTrack=b)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var b=this.subtitleTrackController;return b?b.subtitleDisplay:!1},set:function(b){var v=this.subtitleTrackController;v&&(v.subtitleDisplay=b)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(b){this.config.lowLatencyMode=b}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return i.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return o.defaultConfig?o.defaultConfig:m.hlsDefaultConfig},set:function(b){o.defaultConfig=b}}]),o}();x.defaultConfig=void 0},"./src/is-supported.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"isSupported",function(){return p}),T.d(d,"changeTypeSupported",function(){return C});var D=T("./src/utils/mediasource-helper.ts");function u(){return self.SourceBuffer||self.WebKitSourceBuffer}function p(){var E=Object(D.getMediaSource)();if(!E)return!1;var l=u(),s=E&&typeof E.isTypeSupported=="function"&&E.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!l||l.prototype&&typeof l.prototype.appendBuffer=="function"&&typeof l.prototype.remove=="function";return!!s&&!!n}function C(){var E,l=u();return typeof(l==null||((E=l.prototype)===null||E===void 0)?void 0:E.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return c}),T.d(d,"LoadError",function(){return _});var D=T("./src/polyfills/number.ts"),u=T("./src/errors.ts");function p(y,i){y.prototype=Object.create(i.prototype),y.prototype.constructor=y,n(y,i)}function C(y){var i=typeof Map=="function"?new Map:void 0;return C=function(t){if(t===null||!s(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(t))return i.get(t);i.set(t,S)}function S(){return E(t,arguments,h(this).constructor)}return S.prototype=Object.create(t.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),n(S,t)},C(y)}function E(y,i,a){return l()?E=Reflect.construct:E=function(S,x,o){var k=[null];k.push.apply(k,x);var O=Function.bind.apply(S,k),b=new O;return o&&n(b,o.prototype),b},E.apply(null,arguments)}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(y){return!1}}function s(y){return Function.toString.call(y).indexOf("[native code]")!==-1}function n(y,i){return n=Object.setPrototypeOf||function(t,S){return t.__proto__=S,t},n(y,i)}function h(y){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},h(y)}var f=Math.pow(2,17),c=function(){function y(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var i=y.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(t,S){var x=this,o=t.url;if(!o)return Promise.reject(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(o?"part list":"url")));this.abort();var k=this.config,O=k.fLoader,b=k.loader;return new Promise(function(v,g){x.loader&&x.loader.destroy();var w=x.loader=t.loader=O?new O(k):new b(k),M=m(t),N={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:f};t.stats=w.stats,w.load(M,N,{onSuccess:function(G,z,H,K){x.resetLoader(t,w),v({frag:t,part:null,payload:G.data,networkDetails:K})},onError:function(G,z,H){x.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:G,networkDetails:H}))},onAbort:function(G,z,H){x.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:H}))},onTimeout:function(G,z,H){x.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:H}))},onProgress:function(G,z,H,K){S&&S({frag:t,part:null,payload:H,networkDetails:K})}})})},i.loadPart=function(t,S,x){var o=this;this.abort();var k=this.config,O=k.fLoader,b=k.loader;return new Promise(function(v,g){o.loader&&o.loader.destroy();var w=o.loader=t.loader=O?new O(k):new b(k),M=m(t,S),N={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:f};S.stats=w.stats,w.load(M,N,{onSuccess:function(G,z,H,K){o.resetLoader(t,w),o.updateStatsFromPart(t,S);var U={frag:t,part:S,payload:G.data,networkDetails:K};x(U),v(U)},onError:function(G,z,H){o.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:S,response:G,networkDetails:H}))},onAbort:function(G,z,H){t.stats.aborted=S.stats.aborted,o.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:S,networkDetails:H}))},onTimeout:function(G,z,H){o.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:S,networkDetails:H}))}})})},i.updateStatsFromPart=function(t,S){var x=t.stats,o=S.stats,k=o.total;if(x.loaded+=o.loaded,k){var O=Math.round(t.duration/S.duration),b=Math.min(Math.round(x.loaded/k),O),v=O-b,g=v*Math.round(x.loaded/b);x.total=x.loaded+g}else x.total=Math.max(x.loaded,x.total);var w=x.loading,M=o.loading;w.start?w.first+=M.first-M.start:(w.start=M.start,w.first=M.first),w.end=M.end},i.resetLoader=function(t,S){t.loader=null,this.loader===S&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),S.destroy()},y}();function m(y,i){i===void 0&&(i=null);var a=i||y,t={frag:y,part:i,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},S=a.byteRangeStartOffset,x=a.byteRangeEndOffset;return Object(D.isFiniteNumber)(S)&&Object(D.isFiniteNumber)(x)&&(t.rangeStart=S,t.rangeEnd=x),t}var _=function(y){p(i,y);function i(a){for(var t,S=arguments.length,x=new Array(S>1?S-1:0),o=1;o>8*(15-k)&255;return o},t.setDecryptDataFromLevelKey=function(x,o){var k=x;return(x==null?void 0:x.method)==="AES-128"&&x.uri&&!x.iv&&(k=E.LevelKey.fromURI(x.uri),k.method=x.method,k.iv=this.createInitializationVector(o),k.keyFormat="identity"),k},t.setElementaryStreamInfo=function(x,o,k,O,b,v){v===void 0&&(v=!1);var g=this.elementaryStreams,w=g[x];if(!w){g[x]={startPTS:o,endPTS:k,startDTS:O,endDTS:b,partial:v};return}w.startPTS=Math.min(w.startPTS,o),w.endPTS=Math.max(w.endPTS,k),w.startDTS=Math.min(w.startDTS,O),w.endDTS=Math.max(w.endDTS,b)},t.clearElementaryStreamInfo=function(){var x=this.elementaryStreams;x[c.AUDIO]=null,x[c.VIDEO]=null,x[c.AUDIOVIDEO]=null},f(a,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var x=this.sn;typeof x!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&C.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),x=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,x)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(D.isFiniteNumber)(this.programDateTime))return null;var x=Object(D.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+x*1e3}},{key:"encrypted",get:function(){var x;return!!((x=this.decryptdata)!==null&&x!==void 0&&x.keyFormat&&this.decryptdata.uri)}}]),a}(m),y=function(i){s(a,i);function a(t,S,x,o,k){var O;O=i.call(this,x)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new l.LoadStats,O.duration=t.decimalFloatingPoint("DURATION"),O.gap=t.bool("GAP"),O.independent=t.bool("INDEPENDENT"),O.relurl=t.enumeratedString("URI"),O.fragment=S,O.index=o;var b=t.enumeratedString("BYTERANGE");return b&&O.setByteRange(b,k),k&&(O.fragOffset=k.fragOffset+k.duration),O}return f(a,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var S=this.elementaryStreams;return!!(S.audio||S.video||S.audiovideo)}}]),a}(m)},"./src/loader/key-loader.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return C});var D=T("./src/events.ts"),u=T("./src/errors.ts"),p=T("./src/utils/logger.ts"),C=function(){function E(s){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=s,this._registerListeners()}var l=E.prototype;return l._registerListeners=function(){this.hls.on(D.Events.KEY_LOADING,this.onKeyLoading,this)},l._unregisterListeners=function(){this.hls.off(D.Events.KEY_LOADING,this.onKeyLoading)},l.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var h=this.loaders[n];h&&h.destroy()}this.loaders={}},l.onKeyLoading=function(n,h){var f=h.frag,c=f.type,m=this.loaders[c];if(!f.decryptdata){p.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var _=f.decryptdata.uri;if(_!==this.decrypturl||this.decryptkey===null){var y=this.hls.config;if(m&&(p.logger.warn("abort previous key loader for type:"+c),m.abort()),!_){p.logger.warn("key uri is falsy");return}var i=y.loader,a=f.loader=this.loaders[c]=new i(y);this.decrypturl=_,this.decryptkey=null;var t={url:_,frag:f,responseType:"arraybuffer"},S={timeout:y.fragLoadingTimeOut,maxRetry:0,retryDelay:y.fragLoadingRetryDelay,maxRetryDelay:y.fragLoadingMaxRetryTimeout,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};a.load(t,S,x)}else this.decryptkey&&(f.decryptdata.key=this.decryptkey,this.hls.trigger(D.Events.KEY_LOADED,{frag:f}))},l.loadsuccess=function(n,h,f){var c=f.frag;if(!c.decryptdata){p.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(n.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(D.Events.KEY_LOADED,{frag:c})},l.loaderror=function(n,h){var f=h.frag,c=f.loader;c&&c.abort(),delete this.loaders[f.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:f,response:n})},l.loadtimeout=function(n,h){var f=h.frag,c=f.loader;c&&c.abort(),delete this.loaders[f.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:f})},E}()},"./src/loader/level-details.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"LevelDetails",function(){return E});var D=T("./src/polyfills/number.ts");function u(l,s){for(var n=0;nh.endSN||f>0||f===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(h.misses*.6):this.misses=h.misses+1,this.availabilityDelay=h.availabilityDelay},p(l,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(D.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var h=this.driftEndTime-this.driftStartTime;if(h>0){var f=this.driftEnd-this.driftStart;return f*1e3/h}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var h;return(h=this.fragments)!==null&&h!==void 0&&h.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),l}()},"./src/loader/level-key.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"LevelKey",function(){return E});var D=T("./node_modules/url-toolkit/src/url-toolkit.js"),u=T.n(D);function p(l,s){for(var n=0;n2){var g=v.shift()+".";return g+=parseInt(v.shift()).toString(16),g+=("000"+parseInt(v.shift()).toString(16)).substr(-4),g}return b},k.resolve=function(b,v){return u.buildAbsoluteURL(v,b,{alwaysNormalize:!0})},k.parseMasterPlaylist=function(b,v){var g=[],w={},M=!1;f.lastIndex=0;for(var N;(N=f.exec(b))!=null;)if(N[1]){var I=new s.AttrList(N[1]),G={attrs:I,bitrate:I.decimalInteger("AVERAGE-BANDWIDTH")||I.decimalInteger("BANDWIDTH"),name:I.NAME,url:k.resolve(N[2],v)},z=I.decimalResolution("RESOLUTION");z&&(G.width=z.width,G.height=z.height),t((I.CODECS||"").split(/[ ,]+/).filter(function(K){return K}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=k.convertAVC1ToAVCOTI(G.videoCodec)),g.push(G)}else if(N[3]){var H=new s.AttrList(N[3]);H["DATA-ID"]&&(M=!0,w[H["DATA-ID"]]=H)}return{levels:g,sessionData:M?w:null}},k.parseMasterPlaylistMedia=function(b,v,g,w){w===void 0&&(w=[]);var M,N=[],I=0;for(c.lastIndex=0;(M=c.exec(b))!==null;){var G=new s.AttrList(M[1]);if(G.TYPE===g){var z={attrs:G,bitrate:0,id:I++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:g,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?k.resolve(G.URI,v):""};if(w.length){var H=k.findGroup(w,z.groupId)||w[0];S(z,H,"audioCodec"),S(z,H,"textCodec")}N.push(z)}}return N},k.parseLevelPlaylist=function(b,v,g,w,M){var N=new E.LevelDetails(v),I=N.fragments,G=null,z=0,H=0,K=0,U=0,B=null,V=new C.Fragment(w,v),ae,he,pe,Re=-1,ke=!1;for(m.lastIndex=0,N.m3u8=b;(ae=m.exec(b))!==null;){ke&&(ke=!1,V=new C.Fragment(w,v),V.start=K,V.sn=z,V.cc=U,V.level=g,G&&(V.initSegment=G,V.rawProgramDateTime=G.rawProgramDateTime));var ve=ae[1];if(ve){V.duration=parseFloat(ve);var Te=(" "+ae[2]).slice(1);V.title=Te||null,V.tagList.push(Te?["INF",ve,Te]:["INF",ve])}else if(ae[3])Object(D.isFiniteNumber)(V.duration)&&(V.start=K,pe&&(V.levelkey=pe),V.sn=z,V.level=g,V.cc=U,V.urlId=M,I.push(V),V.relurl=(" "+ae[3]).slice(1),o(V,B),B=V,K+=V.duration,z++,H=0,ke=!0);else if(ae[4]){var be=(" "+ae[4]).slice(1);B?V.setByteRange(be,B):V.setByteRange(be)}else if(ae[5])V.rawProgramDateTime=(" "+ae[5]).slice(1),V.tagList.push(["PROGRAM-DATE-TIME",V.rawProgramDateTime]),Re===-1&&(Re=I.length);else{if(ae=ae[0].match(_),!ae){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(he=1;he-1){n.logger.warn("Keyformat "+Qe+" is not supported from the manifest");continue}else if(Qe!=="identity")continue;X&&(pe=l.LevelKey.fromURL(v,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(pe.method=X,pe.keyFormat=Qe,Oe&&(pe.keyID=Oe),ge&&(pe.keyFormatVersions=ge),pe.iv=Ee));break}case"START":{var nt=new s.AttrList(le),ut=nt.decimalFloatingPoint("TIME-OFFSET");Object(D.isFiniteNumber)(ut)&&(N.startTimeOffset=ut);break}case"MAP":{var dt=new s.AttrList(le);V.relurl=dt.URI,dt.BYTERANGE&&V.setByteRange(dt.BYTERANGE),V.level=g,V.sn="initSegment",pe&&(V.levelkey=pe),V.initSegment=null,G=V,ke=!0;break}case"SERVER-CONTROL":{var mt=new s.AttrList(le);N.canBlockReload=mt.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=mt.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&mt.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=mt.optionalFloat("PART-HOLD-BACK",0),N.holdBack=mt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new s.AttrList(le);N.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var De=N.partList;De||(De=N.partList=[]);var at=H>0?De[De.length-1]:void 0,ht=H++,Ze=new C.Part(new s.AttrList(le),V,v,ht,at);De.push(Ze),V.duration+=Ze.duration;break}case"PRELOAD-HINT":{var st=new s.AttrList(le);N.preloadHint=st;break}case"RENDITION-REPORT":{var Ue=new s.AttrList(le);N.renditionReports=N.renditionReports||[],N.renditionReports.push(Ue);break}default:n.logger.warn("line parsed but not handled: "+ae);break}}}B&&!B.relurl?(I.pop(),K-=B.duration,N.partList&&(N.fragmentHint=B)):N.partList&&(o(V,B),V.cc=U,N.fragmentHint=V);var Me=I.length,Ne=I[0],xe=I[Me-1];if(K+=N.skippedSegments*N.targetduration,K>0&&Me&&xe){N.averagetargetduration=K/Me;var Se=xe.sn;N.endSN=Se!=="initSegment"?Se:0,Ne&&(N.startCC=Ne.cc,Ne.initSegment||N.fragments.every(function(Ae){return Ae.relurl&&i(Ae.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),V=new C.Fragment(w,v),V.relurl=xe.relurl,V.level=g,V.sn="initSegment",Ne.initSegment=V,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(K+=N.fragmentHint.duration),N.totalduration=K,N.endCC=U,Re>0&&x(I,Re),N},k}();function t(k,O){["video","audio","text"].forEach(function(b){var v=k.filter(function(w){return Object(h.isCodecType)(w,b)});if(v.length){var g=v.filter(function(w){return w.lastIndexOf("avc1",0)===0||w.lastIndexOf("mp4a",0)===0});O[b+"Codec"]=g.length>0?g[0]:v[0],k=k.filter(function(w){return v.indexOf(w)===-1})}}),O.unknownCodecs=k}function S(k,O,b){var v=O[b];v&&(k[b]=v)}function x(k,O){for(var b=k[O],v=O;v--;){var g=k[v];if(!g)return;g.programDateTime=b.programDateTime-g.duration*1e3,b=g}}function o(k,O){k.rawProgramDateTime?k.programDateTime=Date.parse(k.rawProgramDateTime):O!=null&&O.programDateTime&&(k.programDateTime=O.endProgramDateTime),Object(D.isFiniteNumber)(k.programDateTime)||(k.programDateTime=null,k.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/polyfills/number.ts"),u=T("./src/events.ts"),p=T("./src/errors.ts"),C=T("./src/utils/logger.ts"),E=T("./src/utils/mp4-tools.ts"),l=T("./src/loader/m3u8-parser.ts"),s=T("./src/types/loader.ts"),n=T("./src/utils/attr-list.ts");function h(m){var _=m.type;switch(_){case s.PlaylistContextType.AUDIO_TRACK:return s.PlaylistLevelType.AUDIO;case s.PlaylistContextType.SUBTITLE_TRACK:return s.PlaylistLevelType.SUBTITLE;default:return s.PlaylistLevelType.MAIN}}function f(m,_){var y=m.url;return(y===void 0||y.indexOf("data:")===0)&&(y=_.url),y}var c=function(){function m(y){this.hls=void 0,this.loaders=Object.create(null),this.hls=y,this.registerListeners()}var _=m.prototype;return _.registerListeners=function(){var i=this.hls;i.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(u.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(u.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(u.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},_.unregisterListeners=function(){var i=this.hls;i.off(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(u.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(u.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(u.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},_.createInternalLoader=function(i){var a=this.hls.config,t=a.pLoader,S=a.loader,x=t||S,o=new x(a);return i.loader=o,this.loaders[i.type]=o,o},_.getInternalLoader=function(i){return this.loaders[i.type]},_.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},_.destroyInternalLoaders=function(){for(var i in this.loaders){var a=this.loaders[i];a&&a.destroy(),this.resetInternalLoader(i)}},_.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},_.onManifestLoading=function(i,a){var t=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:s.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},_.onLevelLoading=function(i,a){var t=a.id,S=a.level,x=a.url,o=a.deliveryDirectives;this.load({id:t,groupId:null,level:S,responseType:"text",type:s.PlaylistContextType.LEVEL,url:x,deliveryDirectives:o})},_.onAudioTrackLoading=function(i,a){var t=a.id,S=a.groupId,x=a.url,o=a.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:s.PlaylistContextType.AUDIO_TRACK,url:x,deliveryDirectives:o})},_.onSubtitleTrackLoading=function(i,a){var t=a.id,S=a.groupId,x=a.url,o=a.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:s.PlaylistContextType.SUBTITLE_TRACK,url:x,deliveryDirectives:o})},_.load=function(i){var a,t=this.hls.config,S=this.getInternalLoader(i);if(S){var x=S.context;if(x&&x.url===i.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),S.abort()}var o,k,O,b;switch(i.type){case s.PlaylistContextType.MANIFEST:o=t.manifestLoadingMaxRetry,k=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,b=t.manifestLoadingMaxRetryTimeout;break;case s.PlaylistContextType.LEVEL:case s.PlaylistContextType.AUDIO_TRACK:case s.PlaylistContextType.SUBTITLE_TRACK:o=0,k=t.levelLoadingTimeOut;break;default:o=t.levelLoadingMaxRetry,k=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,b=t.levelLoadingMaxRetryTimeout;break}if(S=this.createInternalLoader(i),(a=i.deliveryDirectives)!==null&&a!==void 0&&a.part){var v;if(i.type===s.PlaylistContextType.LEVEL&&i.level!==null?v=this.hls.levels[i.level].details:i.type===s.PlaylistContextType.AUDIO_TRACK&&i.id!==null?v=this.hls.audioTracks[i.id].details:i.type===s.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(v=this.hls.subtitleTracks[i.id].details),v){var g=v.partTarget,w=v.targetduration;g&&w&&(k=Math.min(Math.max(g*3,w*.8)*1e3,k))}}var M={timeout:k,maxRetry:o,retryDelay:O,maxRetryDelay:b,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};S.load(i,M,N)},_.loadsuccess=function(i,a,t,S){if(S===void 0&&(S=null),t.isSidxRequest){this.handleSidxRequest(i,t),this.handlePlaylistLoaded(i,a,t,S);return}this.resetInternalLoader(t.type);var x=i.data;if(x.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,t,"no EXTM3U delimiter",S);return}a.parsing.start=performance.now(),x.indexOf("#EXTINF:")>0||x.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,a,t,S):this.handleMasterPlaylist(i,a,t,S)},_.loaderror=function(i,a,t){t===void 0&&(t=null),this.handleNetworkError(a,t,!1,i)},_.loadtimeout=function(i,a,t){t===void 0&&(t=null),this.handleNetworkError(a,t,!0)},_.handleMasterPlaylist=function(i,a,t,S){var x=this.hls,o=i.data,k=f(i,t),O=l.default.parseMasterPlaylist(o,k),b=O.levels,v=O.sessionData;if(!b.length){this.handleManifestParsingError(i,t,"no level found in manifest",S);return}var g=b.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),w=b.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),M=l.default.parseMasterPlaylistMedia(o,k,"AUDIO",g),N=l.default.parseMasterPlaylistMedia(o,k,"SUBTITLES",w),I=l.default.parseMasterPlaylistMedia(o,k,"CLOSED-CAPTIONS");if(M.length){var G=M.some(function(z){return!z.url});!G&&b[0].audioCodec&&!b[0].attrs.AUDIO&&(C.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}x.trigger(u.Events.MANIFEST_LOADED,{levels:b,audioTracks:M,subtitles:N,captions:I,url:k,stats:a,networkDetails:S,sessionData:v})},_.handleTrackOrLevelPlaylist=function(i,a,t,S){var x=this.hls,o=t.id,k=t.level,O=t.type,b=f(i,t),v=Object(D.isFiniteNumber)(o)?o:0,g=Object(D.isFiniteNumber)(k)?k:v,w=h(t),M=l.default.parseLevelPlaylist(i.data,b,g,w,v);if(!M.fragments.length){x.trigger(u.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:b,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(O===s.PlaylistContextType.MANIFEST){var N={attrs:new n.AttrList({}),bitrate:0,details:M,name:"",url:b};x.trigger(u.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:b,stats:a,networkDetails:S,sessionData:null})}if(a.parsing.end=performance.now(),M.needSidxRanges){var I,G=(I=M.fragments[0].initSegment)===null||I===void 0?void 0:I.url;this.load({url:G,isSidxRequest:!0,type:O,level:k,levelDetails:M,id:o,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=M,this.handlePlaylistLoaded(i,a,t,S)},_.handleSidxRequest=function(i,a){var t=Object(E.parseSegmentIndex)(new Uint8Array(i.data));if(!t)return;var S=t.references,x=a.levelDetails;S.forEach(function(o,k){var O=o.info,b=x.fragments[k];b.byteRange.length===0&&b.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),b.initSegment&&b.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},_.handleManifestParsingError=function(i,a,t,S){this.hls.trigger(u.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===s.PlaylistContextType.MANIFEST,url:i.url,reason:t,response:i,context:a,networkDetails:S})},_.handleNetworkError=function(i,a,t,S){t===void 0&&(t=!1),C.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var x=p.ErrorDetails.UNKNOWN,o=!1,k=this.getInternalLoader(i);switch(i.type){case s.PlaylistContextType.MANIFEST:x=t?p.ErrorDetails.MANIFEST_LOAD_TIMEOUT:p.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case s.PlaylistContextType.LEVEL:x=t?p.ErrorDetails.LEVEL_LOAD_TIMEOUT:p.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case s.PlaylistContextType.AUDIO_TRACK:x=t?p.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:p.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;case s.PlaylistContextType.SUBTITLE_TRACK:x=t?p.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:p.ErrorDetails.SUBTITLE_LOAD_ERROR,o=!1;break}k&&this.resetInternalLoader(i.type);var O={type:p.ErrorTypes.NETWORK_ERROR,details:x,fatal:o,url:i.url,loader:k,context:i,networkDetails:a};S&&(O.response=S),this.hls.trigger(u.Events.ERROR,O)},_.handlePlaylistLoaded=function(i,a,t,S){var x=t.type,o=t.level,k=t.id,O=t.groupId,b=t.loader,v=t.levelDetails,g=t.deliveryDirectives;if(!(v!=null&&v.targetduration)){this.handleManifestParsingError(i,t,"invalid target duration",S);return}if(!b)return;v.live&&(b.getCacheAge&&(v.ageHeader=b.getCacheAge()||0),(!b.getCacheAge||isNaN(v.ageHeader))&&(v.ageHeader=0));switch(x){case s.PlaylistContextType.MANIFEST:case s.PlaylistContextType.LEVEL:this.hls.trigger(u.Events.LEVEL_LOADED,{details:v,level:o||0,id:k||0,stats:a,networkDetails:S,deliveryDirectives:g});break;case s.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(u.Events.AUDIO_TRACK_LOADED,{details:v,id:k||0,groupId:O||"",stats:a,networkDetails:S,deliveryDirectives:g});break;case s.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(u.Events.SUBTITLE_TRACK_LOADED,{details:v,id:k||0,groupId:O||"",stats:a,networkDetails:S,deliveryDirectives:g});break}},m}();d.default=c},"./src/polyfills/number.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"isFiniteNumber",function(){return D}),T.d(d,"MAX_SAFE_INTEGER",function(){return u});var D=Number.isFinite||function(p){return typeof p=="number"&&isFinite(p)},u=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,d,T){"use strict";T.r(d);var D=function(){function u(){}return u.getSilentFrame=function(C,E){switch(C){case"mp4a.40.2":if(E===1)return new Uint8Array([0,200,0,128,35,128]);if(E===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(E===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(E===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(E===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(E===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(E===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(E===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(E===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},u}();d.default=D},"./src/remux/mp4-generator.ts":function(P,d,T){"use strict";T.r(d);var D=Math.pow(2,32)-1,u=function(){function p(){}return p.init=function(){p.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var E;for(E in p.types)p.types.hasOwnProperty(E)&&(p.types[E]=[E.charCodeAt(0),E.charCodeAt(1),E.charCodeAt(2),E.charCodeAt(3)]);var l=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);p.HDLR_TYPES={video:l,audio:s};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h=new Uint8Array([0,0,0,0,0,0,0,0]);p.STTS=p.STSC=p.STCO=h,p.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),p.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),p.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),p.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var f=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),m=new Uint8Array([0,0,0,1]);p.FTYP=p.box(p.types.ftyp,f,m,f,c),p.DINF=p.box(p.types.dinf,p.box(p.types.dref,n))},p.box=function(E){for(var l=8,s=arguments.length,n=new Array(s>1?s-1:0),h=1;h>24&255,m[1]=l>>16&255,m[2]=l>>8&255,m[3]=l&255,m.set(E,4),f=0,l=8;f>24&255,E>>16&255,E>>8&255,E&255,s>>24,s>>16&255,s>>8&255,s&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},p.mdia=function(E){return p.box(p.types.mdia,p.mdhd(E.timescale,E.duration),p.hdlr(E.type),p.minf(E))},p.mfhd=function(E){return p.box(p.types.mfhd,new Uint8Array([0,0,0,0,E>>24,E>>16&255,E>>8&255,E&255]))},p.minf=function(E){return E.type==="audio"?p.box(p.types.minf,p.box(p.types.smhd,p.SMHD),p.DINF,p.stbl(E)):p.box(p.types.minf,p.box(p.types.vmhd,p.VMHD),p.DINF,p.stbl(E))},p.moof=function(E,l,s){return p.box(p.types.moof,p.mfhd(E),p.traf(s,l))},p.moov=function(E){for(var l=E.length,s=[];l--;)s[l]=p.trak(E[l]);return p.box.apply(null,[p.types.moov,p.mvhd(E[0].timescale,E[0].duration)].concat(s).concat(p.mvex(E)))},p.mvex=function(E){for(var l=E.length,s=[];l--;)s[l]=p.trex(E[l]);return p.box.apply(null,[p.types.mvex].concat(s))},p.mvhd=function(E,l){l*=E;var s=Math.floor(l/(D+1)),n=Math.floor(l%(D+1)),h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,E>>24&255,E>>16&255,E>>8&255,E&255,s>>24,s>>16&255,s>>8&255,s&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return p.box(p.types.mvhd,h)},p.sdtp=function(E){var l=E.samples||[],s=new Uint8Array(4+l.length),n,h;for(n=0;n>>8&255),l.push(f&255),l=l.concat(Array.prototype.slice.call(h));for(n=0;n>>8&255),s.push(f&255),s=s.concat(Array.prototype.slice.call(h));var c=p.box(p.types.avcC,new Uint8Array([1,l[3],l[4],l[5],252|3,224|E.sps.length].concat(l).concat([E.pps.length]).concat(s))),m=E.width,_=E.height,y=E.pixelRatio[0],i=E.pixelRatio[1];return p.box(p.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,m>>8&255,m&255,_>>8&255,_&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,p.box(p.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),p.box(p.types.pasp,new Uint8Array([y>>24,y>>16&255,y>>8&255,y&255,i>>24,i>>16&255,i>>8&255,i&255])))},p.esds=function(E){var l=E.config.length;return new Uint8Array([0,0,0,0,3,23+l,0,1,0,4,15+l,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([l]).concat(E.config).concat([6,1,2]))},p.mp4a=function(E){var l=E.samplerate;return p.box(p.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,E.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]),p.box(p.types.esds,p.esds(E)))},p.mp3=function(E){var l=E.samplerate;return p.box(p.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,E.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]))},p.stsd=function(E){return E.type==="audio"?!E.isAAC&&E.codec==="mp3"?p.box(p.types.stsd,p.STSD,p.mp3(E)):p.box(p.types.stsd,p.STSD,p.mp4a(E)):p.box(p.types.stsd,p.STSD,p.avc1(E))},p.tkhd=function(E){var l=E.id,s=E.duration*E.timescale,n=E.width,h=E.height,f=Math.floor(s/(D+1)),c=Math.floor(s%(D+1));return p.box(p.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,h>>8&255,h&255,0,0]))},p.traf=function(E,l){var s=p.sdtp(E),n=E.id,h=Math.floor(l/(D+1)),f=Math.floor(l%(D+1));return p.box(p.types.traf,p.box(p.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),p.box(p.types.tfdt,new Uint8Array([1,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,f>>24,f>>16&255,f>>8&255,f&255])),p.trun(E,s.length+16+20+8+16+8+8),s)},p.trak=function(E){return E.duration=E.duration||4294967295,p.box(p.types.trak,p.tkhd(E),p.mdia(E))},p.trex=function(E){var l=E.id;return p.box(p.types.trex,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},p.trun=function(E,l){var s=E.samples||[],n=s.length,h=12+16*n,f=new Uint8Array(h),c,m,_,y,i,a;for(l+=8+h,f.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255],0),c=0;c>>24&255,_>>>16&255,_>>>8&255,_&255,y>>>24&255,y>>>16&255,y>>>8&255,y&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*c);return p.box(p.types.trun,f)},p.initSegment=function(E){p.types||p.init();var l=p.moov(E),s=new Uint8Array(p.FTYP.byteLength+l.byteLength);return s.set(p.FTYP),s.set(l,p.FTYP.byteLength),s},p}();u.types=void 0,u.HDLR_TYPES=void 0,u.STTS=void 0,u.STSC=void 0,u.STCO=void 0,u.STSZ=void 0,u.VMHD=void 0,u.SMHD=void 0,u.STSD=void 0,u.FTYP=void 0,u.DINF=void 0,d.default=u},"./src/remux/mp4-remuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return a}),T.d(d,"normalizePts",function(){return t});var D=T("./src/polyfills/number.ts"),u=T("./src/remux/aac-helper.ts"),p=T("./src/remux/mp4-generator.ts"),C=T("./src/events.ts"),E=T("./src/errors.ts"),l=T("./src/utils/logger.ts"),s=T("./src/types/loader.ts"),n=T("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign||function(k){for(var O=1;O0?M:N.pts},v[0].pts);return g&&l.logger.debug("PTS rollover detected"),w},O.remux=function(v,g,w,M,N,I,G,z){var H,K,U,B,V,ae,he=N,pe=N,Re=v.pid>-1,ke=g.pid>-1,ve=g.samples.length,Te=v.samples.length>0,be=ve>1,ue=(!Re||Te)&&(!ke||be)||this.ISGenerated||G;if(ue){this.ISGenerated||(U=this.generateIS(v,g,N));var le=this.isVideoContiguous,re=-1;if(be&&(re=S(g.samples),!le&&this.config.forceKeyFrameOnDiscontinuity))if(ae=!0,re>0){l.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+ve+" video samples due to a missing keyframe");var fe=this.getVideoStartPts(g.samples);g.samples=g.samples.slice(re),g.dropped+=re,pe+=(g.samples[0].pts-fe)/(g.timescale||9e4)}else re===-1&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+ve+" video samples"),ae=!1);if(this.ISGenerated){if(Te&&be){var q=this.getVideoStartPts(g.samples),ee=t(v.samples[0].pts,q)-q,Ce=ee/g.inputTimeScale;he+=Math.max(0,Ce),pe+=Math.max(0,-Ce)}if(Te){if(v.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(v,g,N)),K=this.remuxAudio(v,he,this.isAudioContiguous,I,ke||be||z===s.PlaylistLevelType.AUDIO?pe:void 0),be){var te=K?K.endPTS-K.startPTS:0;g.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(v,g,N)),H=this.remuxVideo(g,pe,le,te)}}else be&&(H=this.remuxVideo(g,pe,le,0));H&&(H.firstKeyFrame=re,H.independent=re!==-1)}}return this.ISGenerated&&(w.samples.length&&(V=this.remuxID3(w,N)),M.samples.length&&(B=this.remuxText(M,N))),{audio:K,video:H,initSegment:U,independent:ae,text:B,id3:V}},O.generateIS=function(v,g,w){var M=v.samples,N=g.samples,I=this.typeSupported,G={},z=!Object(D.isFiniteNumber)(this._initPTS),H="audio/mp4",K,U,B;if(z&&(K=U=Infinity),v.config&&M.length&&(v.timescale=v.samplerate,v.isAAC||(I.mpeg?(H="audio/mpeg",v.codec=""):I.mp3&&(v.codec="mp3")),G.audio={id:"audio",container:H,codec:v.codec,initSegment:!v.isAAC&&I.mpeg?new Uint8Array(0):p.default.initSegment([v]),metadata:{channelCount:v.channelCount}},z&&(B=v.inputTimeScale,K=U=M[0].pts-Math.round(B*w))),g.sps&&g.pps&&N.length&&(g.timescale=g.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:g.codec,initSegment:p.default.initSegment([g]),metadata:{width:g.width,height:g.height}},z)){B=g.inputTimeScale;var V=this.getVideoStartPts(N),ae=Math.round(B*w);U=Math.min(U,t(N[0].dts,V)-ae),K=Math.min(K,V-ae)}if(Object.keys(G).length)return this.ISGenerated=!0,z&&(this._initPTS=K,this._initDTS=U),{tracks:G,initPTS:K,timescale:B}},O.remuxVideo=function(v,g,w,M){var N=v.inputTimeScale,I=v.samples,G=[],z=I.length,H=this._initPTS,K=this.nextAvcDts,U=8,B,V,ae,he=Number.POSITIVE_INFINITY,pe=Number.NEGATIVE_INFINITY,Re=0,ke=!1;if(!w||K===null){var ve=g*N,Te=I[0].pts-t(I[0].dts,I[0].pts);K=ve-Te}for(var be=0;beue.pts){var le=9e4*.2;Re=Math.max(Math.min(Re,ue.pts-ue.dts),-1*le)}ue.dts0?be-1:be].dts&&(ke=!0)}ke&&I.sort(function(mr,hr){var St=mr.dts-hr.dts,$r=mr.pts-hr.pts;return St||$r}),V=I[0].dts,ae=I[I.length-1].dts;var re=Math.round((ae-V)/(z-1));if(Re<0){if(Rere,J=Ce<-1;if(te||J){te?l.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Ce,!0)+" ms ("+Ce+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Ce,!0)+" ms ("+Ce+"dts) overlapping between fragments detected"),V=K;var X=I[0].pts-Ce;I[0].dts=V,I[0].pts=X,l.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(X,!0)+"/"+Object(n.toMsFromMpegTsClock)(V,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Ce,!0)+" ms")}}i&&(V=Math.max(0,V));for(var Q=0,Ee=0,ge=0;ge0?De-1:De].dts;if(Se.stretchShortVideoTrack&&this.nextAudioPts!==null){var Le=Math.floor(Se.maxBufferHole*N),Je=(M?he+M*N:this.nextAudioPts)-at.pts;Je>Le?(B=Je-Ae,B<0&&(B=Ae),l.logger.log("[mp4-remuxer]: It is approximately "+Je/90+" ms to the next segment; using duration "+B/90+" ms for the last video frame.")):B=Ae}else B=Ae}var Ve=Math.round(at.pts-at.dts);G.push(new x(at.key,B,Ze,Ve))}if(G.length&&_&&_<70){var gt=G[0].flags;gt.dependsOn=2,gt.isNonSync=0}console.assert(B!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=K=ae+B,this.isVideoContiguous=!0;var yt=p.default.moof(v.sequenceNumber++,V,h({},v,{samples:G})),Bt="video",Nt={data1:yt,data2:mt,startPTS:he/N,endPTS:(pe+B)/N,startDTS:V/N,endDTS:K/N,type:Bt,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:v.dropped};return v.samples=[],v.dropped=0,console.assert(mt.length,"MDAT length must not be zero"),Nt},O.remuxAudio=function(v,g,w,M,N){var I=v.inputTimeScale,G=v.samplerate?v.samplerate:I,z=I/G,H=v.isAAC?c:m,K=H*z,U=this._initPTS,B=!v.isAAC&&this.typeSupported.mpeg,V=[],ae=v.samples,he=B?0:8,pe=this.nextAudioPts||-1,Re=g*I;if(this.isAudioContiguous=w=w||ae.length&&pe>0&&(M&&Math.abs(Re-pe)<9e3||Math.abs(t(ae[0].pts-U,Re)-pe)<20*K),ae.forEach(function(Ne){Ne.pts=t(Ne.pts-U,Re)}),!w||pe<0){if(ae=ae.filter(function(Ne){return Ne.pts>=0}),!ae.length)return;N===0?pe=0:M?pe=Math.max(0,Re):pe=ae[0].pts}if(v.isAAC)for(var ke=N!==void 0,ve=this.config.maxAudioFramesDrift,Te=0,be=pe;Te=ve*K&&fe0){Ee+=he;try{Q=new Uint8Array(Ee)}catch(Ne){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:E.ErrorTypes.MUX_ERROR,details:E.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ee,reason:"fail allocating audio mdat "+Ee});return}if(!B){var mt=new DataView(Q.buffer);mt.setUint32(0,Ee),Q.set(p.default.types.mdat,4)}}else return;Q.set(nt,he);var He=nt.byteLength;he+=He,V.push(new x(!0,H,He,0)),X=ut}var De=V.length;if(!De)return;var at=V[V.length-1];this.nextAudioPts=pe=X+z*at.duration;var ht=B?new Uint8Array(0):p.default.moof(v.sequenceNumber++,J/z,h({},v,{samples:V}));v.samples=[];var Ze=J/I,st=pe/I,Ue="audio",Me={data1:ht,data2:Q,startPTS:Ze,endPTS:st,startDTS:Ze,endDTS:st,type:Ue,hasAudio:!0,hasVideo:!1,nb:De};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),Me},O.remuxEmptyAudio=function(v,g,w,M){var N=v.inputTimeScale,I=v.samplerate?v.samplerate:N,G=N/I,z=this.nextAudioPts,H=(z!==null?z:M.startDTS*N)+this._initDTS,K=M.endDTS*N+this._initDTS,U=G*c,B=Math.ceil((K-H)/U),V=u.default.getSilentFrame(v.manifestCodec||v.codec,v.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),!V){l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ae=[],he=0;he4294967296;)k+=b;return k}function S(k){for(var O=0;O0?this.lastEndDTS=v:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var g=!!k.audio,w=!!k.video,M="";g&&(M+="audio"),w&&(M+="video");var N={data1:x,startPTS:b,startDTS:b,endPTS:v,endDTS:v,type:M,hasAudio:g,hasVideo:w,nb:1,dropped:0};return S.audio=N.type==="audio"?N:void 0,S.video=N.type!=="audio"?N:void 0,S.text=y,S.id3=_,S.initSegment=o,S},n}(),l=function(h,f,c){return Object(u.getStartDTS)(h,f)-c};function s(n,h){var f=n==null?void 0:n.codec;return f&&f.length>4?f:f==="hvc1"?"hvc1.1.c.L120.90":f==="av01"?"av01.0.04M.08":f==="avc1"||h===p.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}d.default=E},"./src/task-loop.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return D});var D=function(){function u(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var p=u.prototype;return p.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},p.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},p.onHandlerDestroyed=function(){},p.hasInterval=function(){return!!this._tickInterval},p.hasNextTick=function(){return!!this._tickTimer},p.setInterval=function(E){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,E),!0)},p.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},p.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},p.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},p.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},p.doTick=function(){},u}()},"./src/types/cmcd.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"CMCDVersion",function(){return D}),T.d(d,"CMCDObjectType",function(){return u}),T.d(d,"CMCDStreamingFormat",function(){return p}),T.d(d,"CMCDStreamType",function(){return C});var D=1,u;(function(E){E.MANIFEST="m",E.AUDIO="a",E.VIDEO="v",E.MUXED="av",E.INIT="i",E.CAPTION="c",E.TIMED_TEXT="tt",E.KEY="k",E.OTHER="o"})(u||(u={}));var p;(function(E){E.DASH="d",E.HLS="h",E.SMOOTH="s",E.OTHER="o"})(p||(p={}));var C;(function(E){E.VOD="v",E.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"HlsSkip",function(){return p}),T.d(d,"getSkipValue",function(){return C}),T.d(d,"HlsUrlParameters",function(){return E}),T.d(d,"Level",function(){return l});function D(s,n){for(var h=0;hNumber.MAX_SAFE_INTEGER?Infinity:n},E.hexadecimalInteger=function(s){if(this[s]){var n=(this[s]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var h=new Uint8Array(n.length/2),f=0;fNumber.MAX_SAFE_INTEGER?Infinity:n},E.decimalFloatingPoint=function(s){return parseFloat(this[s])},E.optionalFloat=function(s,n){var h=this[s];return h?parseFloat(h):n},E.enumeratedString=function(s){return this[s]},E.bool=function(s){return this[s]==="YES"},E.decimalResolution=function(s){var n=D.exec(this[s]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},C.parseAttrList=function(s){var n,h={},f='"';for(u.lastIndex=0;(n=u.exec(s))!==null;){var c=n[2];c.indexOf(f)===0&&c.lastIndexOf(f)===c.length-1&&(c=c.slice(1,-1)),h[n[1]]=c}return h},C}()},"./src/utils/binary-search.ts":function(P,d,T){"use strict";T.r(d);var D={search:function(p,C){for(var E=0,l=p.length-1,s=null,n=null;E<=l;){s=(E+l)/2|0,n=p[s];var h=C(n);if(h>0)E=s+1;else if(h<0)l=s-1;else return n}return null}};d.default=D},"./src/utils/buffer-helper.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"BufferHelper",function(){return p});var D=T("./src/utils/logger.ts"),u={length:0,start:function(){return 0},end:function(){return 0}},p=function(){function C(){}return C.isBuffered=function(l,s){try{if(l){for(var n=C.getBuffered(l),h=0;h=n.start(h)&&s<=n.end(h))return!0}}catch(f){}return!1},C.bufferInfo=function(l,s,n){try{if(l){var h=C.getBuffered(l),f=[],c;for(c=0;cm&&(h[c-1].end=l[f].end):h.push(l[f])}else h.push(l[f])}else h=l;for(var _=0,y,i=s,a=s,t=0;t=S&&s=w&&D.logger.log(this.time+" ["+w+"] "+M)},b}(),_=function(v){for(var g=[],w=0;wE&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=E)},v.moveCursor=function(w){var M=this.pos+w;if(w>1)for(var N=this.pos+1;N=144&&this.backSpace();var M=p(w);if(this.pos>=E){this.logger.log(c.ERROR,"Cannot insert "+w.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},v.clearFromPos=function(w){var M;for(M=w;M0&&(w?N="["+M.join(" | ")+"]":N=M.join(` `)),N},v.getTextAndFormat=function(){return this.rows},b}(),S=function(){function b(g,w,M){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=g,this.outputFilter=w,this.mode=null,this.verbose=0,this.displayedMemory=new t(M),this.nonDisplayedMemory=new t(M),this.lastOutputScreen=new t(M),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}var v=b.prototype;return v.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},v.getHandler=function(){return this.outputFilter},v.setHandler=function(w){this.outputFilter=w},v.setPAC=function(w){this.writeScreen.setPAC(w)},v.setBkgData=function(w){this.writeScreen.setBkgData(w)},v.setMode=function(w){if(w===this.mode)return;this.mode=w,this.logger.log(c.INFO,"MODE="+w),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=w},v.insertChars=function(w){for(var M=0;M=46,M.italics)M.foreground="white";else{var N=Math.floor(w/2)-16,I=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=I[N]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},v.outputDataUpdate=function(w){w===void 0&&(w=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),w&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},v.cueSplitAtTime=function(w){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,w,this.displayedMemory),this.cueStartTime=w))},b}(),x=function(){function b(g,w,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var N=new m;this.channels=[null,new S(g,w,N),new S(g+1,M,N)],this.cmdHistory=O(),this.logger=N}var v=b.prototype;return v.getHandler=function(w){return this.channels[w].getHandler()},v.setHandler=function(w,M){this.channels[w].setHandler(M)},v.addData=function(w,M){var N,I,G,z=!1;this.logger.time=w;for(var H=0;H ("+_([I,G])+")"),N=this.parseCmd(I,G),N||(N=this.parseMidrow(I,G)),N||(N=this.parsePAC(I,G)),N||(N=this.parseBackgroundAttributes(I,G)),!N&&(z=this.parseChars(I,G),z)){var K=this.currentChannel;if(K&&K>0){var U=this.channels[K];U.insertChars(z)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!N&&!z&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+_([I,G])+" orig: "+_([M[H],M[H+1]]))}},v.parseCmd=function(w,M){var N=this.cmdHistory,I=(w===20||w===28||w===21||w===29)&&M>=32&&M<=47,G=(w===23||w===31)&&M>=33&&M<=35;if(!(I||G))return!1;if(k(w,M,N))return o(null,null,N),this.logger.log(c.DEBUG,"Repeated command ("+_([w,M])+") is dropped"),!0;var z=w===20||w===21||w===23?1:2,H=this.channels[z];return w===20||w===21||w===28||w===29?M===32?H.ccRCL():M===33?H.ccBS():M===34?H.ccAOF():M===35?H.ccAON():M===36?H.ccDER():M===37?H.ccRU(2):M===38?H.ccRU(3):M===39?H.ccRU(4):M===40?H.ccFON():M===41?H.ccRDC():M===42?H.ccTR():M===43?H.ccRTD():M===44?H.ccEDM():M===45?H.ccCR():M===46?H.ccENM():M===47&&H.ccEOC():H.ccTO(M-32),o(w,M,N),this.currentChannel=z,!0},v.parseMidrow=function(w,M){var N=0;if((w===17||w===25)&&M>=32&&M<=47){if(w===17?N=1:N=2,N!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var I=this.channels[N];return I?(I.ccMIDROW(M),this.logger.log(c.DEBUG,"MIDROW ("+_([w,M])+")"),!0):!1}return!1},v.parsePAC=function(w,M){var N,I=this.cmdHistory,G=(w>=17&&w<=23||w>=25&&w<=31)&&M>=64&&M<=127,z=(w===16||w===24)&&M>=64&&M<=95;if(!(G||z))return!1;if(k(w,M,I))return o(null,null,I),!0;var H=w<=23?1:2;M>=64&&M<=95?N=H===1?l[w]:n[w]:N=H===1?s[w]:h[w];var K=this.channels[H];return K?(K.setPAC(this.interpretPAC(N,M)),o(w,M,I),this.currentChannel=H,!0):!1},v.interpretPAC=function(w,M){var N,I={color:null,italics:!1,indent:null,underline:!1,row:w};return M>95?N=M-96:N=M-64,I.underline=(N&1)===1,N<=13?I.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(N/2)]:N<=15?(I.italics=!0,I.color="white"):I.indent=Math.floor((N-16)/2)*4,I},v.parseChars=function(w,M){var N,I=null,G=null;if(w>=25?(N=2,G=w-8):(N=1,G=w),G>=17&&G<=19){var z;G===17?z=M+80:G===18?z=M+112:z=M+144,this.logger.log(c.INFO,"Special char '"+p(z)+"' in channel "+N),I=[z]}else w>=32&&w<=127&&(I=M===0?[w]:[w,M]);if(I){var H=_(I);this.logger.log(c.DEBUG,"Char codes = "+H.join(",")),o(w,M,this.cmdHistory)}return I},v.parseBackgroundAttributes=function(w,M){var N=(w===16||w===24)&&M>=32&&M<=47,I=(w===23||w===31)&&M>=45&&M<=47;if(!(N||I))return!1;var G,z={};w===16||w===24?(G=Math.floor((M-32)/2),z.background=f[G],M%2===1&&(z.background=z.background+"_semi")):M===45?z.background="transparent":(z.foreground="black",M===47&&(z.underline=!0));var H=w<=23?1:2,K=this.channels[H];return K.setBkgData(z),o(w,M,this.cmdHistory),!0},v.reset=function(){for(var w=0;w=16?i--:i++;var o=Object(D.fixLineBreaks)(a.trim()),k=Object(u.generateCueId)(n,h,o);(!s||!s.cues||!s.cues.getCueById(k))&&(_=new t(n,h,o),_.id=k,_.line=S+1,_.align="left",_.position=10+Math.min(80,Math.floor(i*8/32)*10),c.push(_))}return s&&c.length&&(c.sort(function(O,b){return O.line==="auto"||b.line==="auto"?0:O.line>8&&b.line>8?b.line-O.line:O.line-b.line}),c.forEach(function(O){return Object(p.addCueToTrack)(s,O)})),c}};d.default=E},"./src/utils/discontinuities.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"findFirstFragWithCC",function(){return C}),T.d(d,"shouldAlignOnDiscontinuities",function(){return E}),T.d(d,"findDiscontinuousReferenceFrag",function(){return l}),T.d(d,"adjustSlidingStart",function(){return n}),T.d(d,"alignStream",function(){return h}),T.d(d,"alignPDT",function(){return c}),T.d(d,"alignFragmentByPDTDelta",function(){return m}),T.d(d,"alignMediaPlaylistByPDT",function(){return _});var D=T("./src/polyfills/number.ts"),u=T("./src/utils/logger.ts"),p=T("./src/controller/level-helper.ts");function C(y,i){for(var a=null,t=0,S=y.length;ta.startCC||y&&y.cc=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},p}();d.default=u},"./src/utils/ewma.ts":function(P,d,T){"use strict";T.r(d);var D=function(){function u(C,E,l){E===void 0&&(E=0),l===void 0&&(l=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=C,this.alpha_=C?Math.exp(Math.log(.5)/C):0,this.estimate_=E,this.totalWeight_=l}var p=u.prototype;return p.sample=function(E,l){var s=Math.pow(this.alpha_,E);this.estimate_=l*(1-s)+s*this.estimate_,this.totalWeight_+=E},p.getTotalWeight=function(){return this.totalWeight_},p.getEstimate=function(){if(this.alpha_){var E=1-Math.pow(this.alpha_,this.totalWeight_);if(E)return this.estimate_/E}return this.estimate_},u}();d.default=D},"./src/utils/fetch-loader.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"fetchSupported",function(){return m});var D=T("./src/polyfills/number.ts"),u=T("./src/loader/load-stats.ts"),p=T("./src/demux/chunk-cache.ts");function C(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,h(t,S)}function E(t){var S=typeof Map=="function"?new Map:void 0;return E=function(o){if(o===null||!n(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(o))return S.get(o);S.set(o,k)}function k(){return l(o,arguments,f(this).constructor)}return k.prototype=Object.create(o.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),h(k,o)},E(t)}function l(t,S,x){return s()?l=Reflect.construct:l=function(k,O,b){var v=[null];v.push.apply(v,O);var g=Function.bind.apply(k,v),w=new g;return b&&h(w,b.prototype),w},l.apply(null,arguments)}function s(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function n(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function h(t,S){return h=Object.setPrototypeOf||function(o,k){return o.__proto__=k,o},h(t,S)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},f(t)}function c(){return c=Object.assign||function(t){for(var S=1;S=b&&v(k,O,g.flush(),o)):v(k,O,G,o),N()}).catch(function(){return Promise.reject()})};return M()},t}();function y(t,S){var x={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(c({},t.headers))};return t.rangeEnd&&x.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),x}function i(t,S){return new self.Request(t.url,S)}var a=function(t){C(S,t);function S(x,o,k){var O;return O=t.call(this,x)||this,O.code=void 0,O.details=void 0,O.code=o,O.details=k,O}return S}(E(Error));d.default=_},"./src/utils/imsc1-ttml-parser.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"IMSC1_CODEC",function(){return n}),T.d(d,"parseIMSC1",function(){return m});var D=T("./src/utils/mp4-tools.ts"),u=T("./src/utils/vttparser.ts"),p=T("./src/utils/vttcue.ts"),C=T("./src/demux/id3.ts"),E=T("./src/utils/timescale-conversion.ts"),l=T("./src/utils/webvtt-parser.ts");function s(){return s=Object.assign||function(b){for(var v=1;v"):D}function E(n){for(var h=arguments.length,f=new Array(h>1?h-1:0),c=1;c>24,S[x+1]=o>>16&255,S[x+2]=o>>8&255,S[x+3]=o&255}function h(S,x){var o=[];if(!x.length)return o;var k,O,b;"data"in S?(k=S.data,O=S.start,b=S.end):(k=S,O=0,b=k.byteLength);for(var v=O;v1?v+g:b;if(w===x[0])if(x.length===1)o.push({data:k,start:v+8,end:M});else{var N=h({data:k,start:v+8,end:M},x.slice(1));N.length&&C.apply(o,N)}v=M}return o}function f(S){var x=h(S,["moov"]),o=x[0],k=o?o.end:null,O=h(S,["sidx"]);if(!O||!O[0])return null;var b=[],v=O[0],g=v.data[0],w=g===0?8:16,M=s(v,w);w+=4;var N=0,I=0;g===0?w+=8:w+=16,w+=2;var G=v.end+I,z=l(v,w);w+=2;for(var H=0;H>>31;if(V===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ae=s(v,K);K+=4,b.push({referenceSize:B,subsegmentDuration:ae,info:{duration:ae/M,start:G,end:G+B-1}}),G+=B,K+=4,w=K}return{earliestPresentationTime:N,timescale:M,version:g,referencesCount:z,references:b,moovEndOffset:k}}function c(S){for(var x=[],o=h(S,["moov","trak"]),k=0;kE)&&(this.startTime=E),this.endTime=l,this.screen=s,this.timelineController.createCaptionsTrack(this.trackName)},p.reset=function(){this.cueRanges=[]},u}()},"./src/utils/texttrack-utils.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"sendAddTrackEvent",function(){return u}),T.d(d,"addCueToTrack",function(){return p}),T.d(d,"clearCurrentCues",function(){return C}),T.d(d,"removeCuesInRange",function(){return E}),T.d(d,"getCuesInRange",function(){return s});var D=T("./src/utils/logger.ts");function u(n,h){var f;try{f=new Event("addtrack")}catch(c){f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=n,h.dispatchEvent(f)}function p(n,h){var f=n.mode;if(f==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(h.id))try{if(n.addCue(h),!n.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(m){D.logger.debug("[texttrack-utils]: "+m);var c=new self.TextTrackCue(h.startTime,h.endTime,h.text);c.id=h.id,n.addCue(c)}f==="disabled"&&(n.mode=f)}function C(n){var h=n.mode;if(h==="disabled"&&(n.mode="hidden"),n.cues)for(var f=n.cues.length;f--;)n.removeCue(n.cues[f]);h==="disabled"&&(n.mode=h)}function E(n,h,f){var c=n.mode;if(c==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var m=s(n.cues,h,f),_=0;_n[f].endTime)return-1;for(var c=0,m=f;c<=m;){var _=Math.floor((m+c)/2);if(hn[_].startTime&&c-1)for(var _=m,y=n.length;_=h&&i.endTime<=f)c.push(i);else if(i.startTime>f)return c}return c}},"./src/utils/time-ranges.ts":function(P,d,T){"use strict";T.r(d);var D={toString:function(p){for(var C="",E=p.length,l=0;l1?h-1:0),c=1;c100)throw new Error("Position must be between 0 and 100.");b=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",l({},m,{get:function(){return v},set:function(N){var I=E(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");v=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",l({},m,{get:function(){return g},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");g=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",l({},m,{get:function(){return w},set:function(N){var I=E(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");w=I,this.hasBeenReset=!0}})),c.displayState=void 0}return s.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},s}()},"./src/utils/vttparser.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"parseTimeStamp",function(){return p}),T.d(d,"fixLineBreaks",function(){return h}),T.d(d,"VTTParser",function(){return f});var D=T("./src/utils/vttcue.ts"),u=function(){function c(){}var m=c.prototype;return m.decode=function(y,i){if(!y)return"";if(typeof y!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(y))},c}();function p(c){function m(y,i,a,t){return(y|0)*3600+(i|0)*60+(a|0)+parseFloat(t||0)}var _=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return _?parseFloat(_[2])>59?m(_[2],_[3],0,_[4]):m(_[1],_[2],_[3],_[4]):null}var C=function(){function c(){this.values=Object.create(null)}var m=c.prototype;return m.set=function(y,i){!this.get(y)&&i!==""&&(this.values[y]=i)},m.get=function(y,i,a){return a?this.has(y)?this.values[y]:i[a]:this.has(y)?this.values[y]:i},m.has=function(y){return y in this.values},m.alt=function(y,i,a){for(var t=0;t=0&&a<=100)return this.set(y,a),!0}return!1},c}();function E(c,m,_,y){var i=y?c.split(y):[c];for(var a in i){if(typeof i[a]!="string")continue;var t=i[a].split(_);if(t.length!==2)continue;var S=t[0],x=t[1];m(S,x)}}var l=new D.default(0,0,""),s=l.align==="middle"?"middle":"center";function n(c,m,_){var y=c;function i(){var S=p(c);if(S===null)throw new Error("Malformed timestamp: "+y);return c=c.replace(/^[^\sa-zA-Z-]+/,""),S}function a(S,x){var o=new C;E(S,function(b,v){var g;switch(b){case"region":for(var w=_.length-1;w>=0;w--)if(_[w].id===v){o.set(b,_[w].region);break}break;case"vertical":o.alt(b,v,["rl","lr"]);break;case"line":g=v.split(","),o.integer(b,g[0]),o.percent(b,g[0])&&o.set("snapToLines",!1),o.alt(b,g[0],["auto"]),g.length===2&&o.alt("lineAlign",g[1],["start",s,"end"]);break;case"position":g=v.split(","),o.percent(b,g[0]),g.length===2&&o.alt("positionAlign",g[1],["start",s,"end","line-left","line-right","auto"]);break;case"size":o.percent(b,v);break;case"align":o.alt(b,v,["start",s,"end","left","right"]);break}},/:/,/\s/),x.region=o.get("region",null),x.vertical=o.get("vertical","");var k=o.get("line","auto");k==="auto"&&l.line===-1&&(k=-1),x.line=k,x.lineAlign=o.get("lineAlign","start"),x.snapToLines=o.get("snapToLines",!0),x.size=o.get("size",100),x.align=o.get("align",s);var O=o.get("position","auto");O==="auto"&&l.position===50&&(O=x.align==="start"||x.align==="left"?0:x.align==="end"||x.align==="right"?100:50),x.position=O}function t(){c=c.replace(/^\s+/,"")}if(t(),m.startTime=i(),t(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+y);c=c.substr(3),t(),m.endTime=i(),t(),a(c,m)}function h(c){return c.replace(//gi,` `)}var f=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new u,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var m=c.prototype;return m.parse=function(y){var i=this;y&&(i.buffer+=i.decoder.decode(y,{stream:!0}));function a(){var O=i.buffer,b=0;for(O=h(O);b")===-1){i.cue.id=S;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{n(S,i.cue,i.regionList)}catch(O){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var k=S.indexOf("-->")!==-1;if(!S||k&&(o=!0)){i.oncue&&i.cue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}if(i.cue===null)continue;i.cue.text&&(i.cue.text+=` `),i.cue.text+=S}continue;case"BADCUE":S||(i.state="ID")}}}catch(O){i.state==="CUETEXT"&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state=i.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},m.flush=function(){var y=this;try{if((y.cue||y.state==="HEADER")&&(y.buffer+=` `,y.parse()),y.state==="INITIAL"||y.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(i){y.onparsingerror&&y.onparsingerror(i)}return y.onflush&&y.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"generateCueId",function(){return f}),T.d(d,"parseWebVTT",function(){return m});var D=T("./src/polyfills/number.ts"),u=T("./src/utils/vttparser.ts"),p=T("./src/demux/id3.ts"),C=T("./src/utils/timescale-conversion.ts"),E=T("./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,s=function(y,i,a){return a===void 0&&(a=0),y.substr(a,i.length)===i},n=function(y){var i=parseInt(y.substr(-3)),a=parseInt(y.substr(-6,2)),t=parseInt(y.substr(-9,2)),S=y.length>9?parseInt(y.substr(0,y.indexOf(":"))):0;if(!Object(D.isFiniteNumber)(i)||!Object(D.isFiniteNumber)(a)||!Object(D.isFiniteNumber)(t)||!Object(D.isFiniteNumber)(S))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+y);return i+=1e3*a,i+=60*1e3*t,i+=60*60*1e3*S,i},h=function(y){for(var i=5381,a=y.length;a;)i=i*33^y.charCodeAt(--a);return(i>>>0).toString()};function f(_,y,i){return h(_.toString())+h(y.toString())+h(i)}var c=function(y,i,a){var t=y[i],S=y[t.prevCC];if(!S||!S.new&&t.new){y.ccOffset=y.presentationOffset=t.start,t.new=!1;return}for(;(x=S)!==null&&x!==void 0&&x.new;){var x;y.ccOffset+=t.start-S.start,t.new=!1,t=S,S=y[t.prevCC]}y.presentationOffset=a};function m(_,y,i,a,t,S,x,o){var k=new u.VTTParser,O=Object(p.utf8ArrayToStr)(new Uint8Array(_)).trim().replace(l,` `).split(` `),b=[],v=Object(C.toMpegTsClockFromTimescale)(y,i),g="00:00.000",w=0,M=0,N,I=!0,G=!1;k.oncue=function(z){var H=a[t],K=a.ccOffset,U=(w-v)/9e4;if(H!=null&&H.new&&(M!==void 0?K=a.ccOffset=H.start:c(a,t,U)),U&&(K=U-a.presentationOffset),G){var B=z.endTime-z.startTime,V=Object(E.normalizePts)((z.startTime+K-M)*9e4,S*9e4)/9e4;z.startTime=V,z.endTime=V+B}var ae=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(ae)),z.id||(z.id=f(z.startTime,z.endTime,ae)),z.endTime>0&&b.push(z)},k.onparsingerror=function(z){N=z},k.onflush=function(){if(N){o(N);return}x(b)},O.forEach(function(z){if(I)if(s(z,"X-TIMESTAMP-MAP=")){I=!1,G=!0,z.substr(16).split(",").forEach(function(H){s(H,"LOCAL:")?g=H.substr(6):s(H,"MPEGTS:")&&(w=parseInt(H.substr(7)))});try{M=n(g)/1e3}catch(H){G=!1,N=H}return}else z===""&&(I=!1);k.parse(z+` `)}),k.flush()}},"./src/utils/xhr-loader.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/utils/logger.ts"),u=T("./src/loader/load-stats.ts"),p=/^age:\s*[\d.]+\s*$/m,C=function(){function E(s){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=s?s.xhrSetup:null,this.stats=new u.LoadStats,this.retryDelay=0}var l=E.prototype;return l.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},l.abortInternal=function(){var n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},l.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},l.load=function(n,h,f){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=h,this.callbacks=f,this.retryDelay=h.retryDelay,this.loadInternal()},l.loadInternal=function(){var n=this.config,h=this.context;if(!n)return;var f=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var m=this.xhrSetup;try{if(m)try{m(f,h.url)}catch(i){f.open("GET",h.url,!0),m(f,h.url)}f.readyState||f.open("GET",h.url,!0);var _=this.context.headers;if(_)for(var y in _)f.setRequestHeader(y,_[y])}catch(i){this.callbacks.onError({code:f.status,text:i.message},h,f);return}h.rangeEnd&&f.setRequestHeader("Range","bytes="+h.rangeStart+"-"+(h.rangeEnd-1)),f.onreadystatechange=this.readystatechange.bind(this),f.onprogress=this.loadprogress.bind(this),f.responseType=h.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),f.send()},l.readystatechange=function(){var n=this.context,h=this.loader,f=this.stats;if(!n||!h)return;var c=h.readyState,m=this.config;if(f.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),f.loading.first===0&&(f.loading.first=Math.max(self.performance.now(),f.loading.start)),c===4){h.onreadystatechange=null,h.onprogress=null;var _=h.status;if(_>=200&&_<300){f.loading.end=Math.max(self.performance.now(),f.loading.first);var y,i;if(n.responseType==="arraybuffer"?(y=h.response,i=y.byteLength):(y=h.responseText,i=y.length),f.loaded=f.total=i,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(f,n,y,h),!this.callbacks)return;var t={url:h.responseURL,data:y};this.callbacks.onSuccess(t,f,n,h)}else f.retry>=m.maxRetry||_>=400&&_<499?(D.logger.error(_+" while loading "+n.url),this.callbacks.onError({code:_,text:h.statusText},n,h)):(D.logger.warn(_+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,m.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),m.timeout)},l.loadtimeout=function(){D.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},l.loadprogress=function(n){var h=this.stats;h.loaded=n.loaded,n.lengthComputable&&(h.total=n.total)},l.getCacheAge=function(){var n=null;if(this.loader&&p.test(this.loader.getAllResponseHeaders())){var h=this.loader.getResponseHeader("age");n=h?parseFloat(h):null}return n},E}();d.default=C}}).default})},vHTk:function(j,Z,L){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.StreamCipher,u=d.algo,p=u.RC4=D.extend({_doReset:function(){for(var l=this._key,s=l.words,n=l.sigBytes,h=this._S=[],f=0;f<256;f++)h[f]=f;for(var f=0,c=0;f<256;f++){var m=f%n,_=s[m>>>2]>>>24-m%4*8&255;c=(c+h[f]+_)%256;var y=h[f];h[f]=h[c],h[c]=y}this._i=this._j=0},_doProcessBlock:function(l,s){l[s]^=C.call(this)},keySize:256/32,ivSize:0});function C(){for(var l=this._S,s=this._i,n=this._j,h=0,f=0;f<4;f++){s=(s+1)%256,n=(n+l[s])%256;var c=l[s];l[s]=l[n],l[n]=c,h|=l[(l[s]+l[n])%256]<<24-f*8}return this._i=s,this._j=n,h}d.RC4=D._createHelper(p);var E=u.RC4Drop=p.extend({cfg:p.cfg.extend({drop:192}),_doReset:function(){p._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)C.call(this)}});d.RC4Drop=D._createHelper(E)}(),P.RC4})},wCXF:function(j,Z,L){"use strict";L.d(Z,"a",function(){return nt});var P=L("rePB"),d=L("VTBJ"),T=L("KQm4"),D=L("U8pU"),u=L("ODXe"),p=L("q1tI"),C=L("TSYQ"),E=L.n(C),l=L("Gytx"),s=L.n(l),n=L("Kwbf"),h=L("t23M"),f=L("qx4F"),c=L("6eGT"),m=L("IBYe"),_=L("Ff2n"),y=L("c+Xe"),i=L("fyJ8"),a=L("biw7");function t(He,De,at,ht,Ze){var st=at[He]||{},Ue=at[De]||{},Me,Ne;st.fixed==="left"?Me=ht.left[He]:Ue.fixed==="right"&&(Ne=ht.right[De]);var xe=!1,Se=!1,Ae=!1,Le=!1,Je=at[De+1],Ve=at[He-1];if(Ze==="rtl"){if(Me!==void 0){var gt=Ve&&Ve.fixed==="left";Le=!gt}else if(Ne!==void 0){var yt=Je&&Je.fixed==="right";Ae=!yt}}else if(Me!==void 0){var Bt=Je&&Je.fixed==="left";xe=!Bt}else if(Ne!==void 0){var Nt=Ve&&Ve.fixed==="right";Se=!Nt}return{fixLeft:Me,fixRight:Ne,lastFixLeft:xe,firstFixRight:Se,lastFixRight:Ae,firstFixLeft:Le,isSticky:ht.isSticky}}var S=L("sR1s");function x(He){var De=He.cells,at=He.stickyOffsets,ht=He.flattenColumns,Ze=He.rowComponent,st=He.cellComponent,Ue=He.onHeaderRow,Me=He.index,Ne=p.useContext(a.a),xe=Ne.prefixCls,Se=Ne.direction,Ae;Ue&&(Ae=Ue(De.map(function(Je){return Je.column}),Me));var Le=Object(S.a)(De.map(function(Je){return Je.column}));return p.createElement(Ze,Object.assign({},Ae),De.map(function(Je,Ve){var gt=Je.column,yt=t(Je.colStart,Je.colEnd,ht,at,Se),Bt;return gt&>.onHeaderCell&&(Bt=Je.column.onHeaderCell(gt)),p.createElement(i.a,Object.assign({},Je,{ellipsis:gt.ellipsis,align:gt.align,component:st,prefixCls:xe,key:Le[Ve]},yt,{additionalProps:Bt,rowType:"header"}))}))}x.displayName="HeaderRow";var o=x;function k(He){var De=[];function at(Ue,Me){var Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;De[Ne]=De[Ne]||[];var xe=Me,Se=Ue.filter(Boolean).map(function(Ae){var Le={key:Ae.key,className:Ae.className||"",children:Ae.title,column:Ae,colStart:xe},Je=1,Ve=Ae.children;return Ve&&Ve.length>0&&(Je=at(Ve,xe,Ne+1).reduce(function(gt,yt){return gt+yt},0),Le.hasSubColumns=!0),"colSpan"in Ae&&(Je=Ae.colSpan),"rowSpan"in Ae&&(Le.rowSpan=Ae.rowSpan),Le.colSpan=Je,Le.colEnd=Le.colStart+Je-1,De[Ne].push(Le),xe+=Je,Je});return Se}at(He,0);for(var ht=De.length,Ze=function(Me){De[Me].forEach(function(Ne){!("rowSpan"in Ne)&&!Ne.hasSubColumns&&(Ne.rowSpan=ht-Me)})},st=0;st=0;Me-=1){var Ne=De[Me],xe=at&&at[Me],Se=xe&&xe[v.a];(Ne||Se||Ue)&&(Ze.unshift(p.createElement("col",Object.assign({key:Me,style:{width:Ne,minWidth:Ne}},Se))),Ue=!0)}return p.createElement("colgroup",null,Ze)}var w=g;function M(He,De){return Object(p.useMemo)(function(){for(var at=[],ht=0;ht1?ne-1:0),oe=1;oe=Ae&&(xn=Ae-Le),Ue({scrollLeft:xn/Ae*(Se+2)}),Nt.current.x=Gt.pageX},Rr=function(){var Gt=Object(Q.b)(st.current).top,Cn=Gt+st.current.offsetHeight,yn=document.documentElement.scrollTop+window.innerHeight;Cn-Object(f.a)()<=yn||Gt>=yn-Me?Bt(function(Sn){return Object(d.a)(Object(d.a)({},Sn),{},{isHiddenScrollBar:!0})}):Bt(function(Sn){return Object(d.a)(Object(d.a)({},Sn),{},{isHiddenScrollBar:!1})})},mn=function(Gt){Bt(function(Cn){return Object(d.a)(Object(d.a)({},Cn),{},{scrollLeft:Gt/Se*Ae||0})})};return p.useImperativeHandle(at,function(){return{setScrollLeft:mn}}),p.useEffect(function(){var vn=Object(X.a)(document.body,"mouseup",Xr,!1),Gt=Object(X.a)(document.body,"mousemove",sn,!1);return Rr(),function(){vn.remove(),Gt.remove()}},[Le,St]),p.useEffect(function(){var vn=Object(X.a)(window,"scroll",Rr,!1),Gt=Object(X.a)(window,"resize",Rr,!1);return function(){vn.remove(),Gt.remove()}},[]),p.useEffect(function(){yt.isHiddenScrollBar||Bt(function(vn){var Gt,Cn;return Object(d.a)(Object(d.a)({},vn),{},{scrollLeft:st.current.scrollLeft/((Gt=st.current)===null||Gt===void 0?void 0:Gt.scrollWidth)*((Cn=st.current)===null||Cn===void 0?void 0:Cn.clientWidth)})})},[yt.isHiddenScrollBar]),Se<=Ae||!Le||yt.isHiddenScrollBar?null:p.createElement("div",{style:{height:Object(f.a)(),width:Ae,bottom:Me},className:"".concat(xe,"-sticky-scroll")},p.createElement("div",{onMouseDown:Ur,ref:Je,className:E()("".concat(xe,"-sticky-scroll-bar"),Object(P.a)({},"".concat(xe,"-sticky-scroll-bar-active"),St)),style:{width:"".concat(Le,"px"),transform:"translate3d(".concat(yt.scrollLeft,"px, 0, 0)")}}))},ge=p.forwardRef(Ee);function Oe(He,De){return p.useMemo(function(){var at=!!He;return{isSticky:at,stickyClassName:at?"".concat(De,"-sticky-header"):"",offsetHeader:Object(D.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(D.a)(He)==="object"&&He.offsetScroll||0}},[He,De])}var Qe=[],rt={},nt="rc-table-internal-hook",ut=p.memo(function(He){var De=He.children;return De},function(He,De){return s()(He.props,De.props)?He.pingLeft!==De.pingLeft||He.pingRight!==De.pingRight:!1});function dt(He){var De,at=He.prefixCls,ht=He.className,Ze=He.rowClassName,st=He.style,Ue=He.data,Me=He.rowKey,Ne=He.scroll,xe=He.tableLayout,Se=He.direction,Ae=He.title,Le=He.footer,Je=He.summary,Ve=He.id,gt=He.showHeader,yt=He.components,Bt=He.emptyText,Nt=He.onRow,mr=He.onHeaderRow,hr=He.internalHooks,St=He.transformColumns,$r=He.internalRefs,Xr=He.sticky,Ur=Ue||Qe,sn=!!Ur.length,Rr=p.useState(0),mn=Object(u.a)(Rr,2),vn=mn[0],Gt=mn[1];p.useEffect(function(){Gt(Object(f.a)())});var Cn=p.useMemo(function(){return Object(S.c)(yt,{})},[yt]),yn=p.useCallback(function(Or,Ft){return Object(S.b)(Cn,Or)||Ft},[Cn]),Sn=p.useMemo(function(){return typeof Me=="function"?Me:function(Or){var Ft=Or&&Or[Me];return Ft}},[Me]),xn=Object(v.c)(He),xi=xn.expandIcon,Ti=xn.expandedRowKeys,hn=xn.defaultExpandedRowKeys,cr=xn.defaultExpandAllRows,Gn=xn.expandedRowRender,pi=xn.onExpand,Vn=xn.onExpandedRowsChange,Yr=xn.expandRowByClick,Un=xn.rowExpandable,ui=xn.expandIconColumnIndex,ci=xn.expandedRowClassName,jt=xn.childrenColumnName,_r=xn.indentSize,ai=xi||te,Oi=jt||"children",Ai=p.useMemo(function(){return Gn?"row":He.expandable&&hr===nt&&He.expandable.__PARENT_RENDER_ICON__||Ur.some(function(Or){return Or&&Object(D.a)(Or)==="object"&&Or[Oi]})?"nest":!1},[!!Gn,Ur]),Ri=p.useState(function(){return hn||(cr?J(Ur,Sn,Oi):[])}),se=Object(u.a)(Ri,2),W=se[0],$=se[1],ne=p.useMemo(function(){return new Set(Ti||W||[])},[Ti,W]),ce=p.useCallback(function(Or){var Ft=Sn(Or,Ur.indexOf(Or)),Jt,br=ne.has(Ft);br?(ne.delete(Ft),Jt=Object(T.a)(ne)):Jt=[].concat(Object(T.a)(ne),[Ft]),$(Jt),pi&&pi(!br,Or),Vn&&Vn(Jt)},[Sn,ne,Ur,pi,Vn]),oe=p.useState(0),Ke=Object(u.a)(oe,2),At=Ke[0],Vt=Ke[1],vr=Object(ve.b)(Object(d.a)(Object(d.a)(Object(d.a)({},He),xn),{},{expandable:!!Gn,expandedKeys:ne,getRowKey:Sn,onTriggerExpand:ce,expandIcon:ai,expandIconColumnIndex:ui,direction:Se}),hr===nt?St:null),Pt=Object(u.a)(vr,2),Br=Pt[0],jr=Pt[1],fn=p.useMemo(function(){return{columns:Br,flattenColumns:jr}},[Br,jr]),ti=p.useRef(),mi=p.useRef(),Rn=p.useRef(),Li=p.useState(!1),qi=Object(u.a)(Li,2),Qn=qi[0],_i=qi[1],vi=p.useState(!1),Fi=Object(u.a)(vi,2),gi=Fi[0],Gi=Fi[1],Mi=ue(new Map),oa=Object(u.a)(Mi,2),sa=oa[0],Ii=oa[1],Xn=Object(S.a)(jr),Vi=Xn.map(function(Or){return sa.get(Or)}),ta=p.useMemo(function(){return Vi},[Vi.join("_")]),Ct=fe(ta,jr.length,Se),tt=Ne&&Object(S.d)(Ne.y),pt=Ne&&Object(S.d)(Ne.x),_t=pt&&jr.some(function(Or){var Ft=Or.fixed;return Ft}),Mt=p.useRef(),Dt=Oe(Xr,at),Ht=Dt.isSticky,Wt=Dt.offsetHeader,ct=Dt.offsetScroll,Ot=Dt.stickyClassName,Rt,fr,qt;tt&&(fr={overflowY:"scroll",maxHeight:Ne.y}),pt&&(Rt={overflowX:"auto"},tt||(fr={overflowY:"hidden"}),qt={width:Ne.x===!0?"auto":Ne.x,minWidth:"100%"});var Qt=p.useCallback(function(Or,Ft){Ii(function(Jt){var br=new Map(Jt);return br.set(Or,Ft),br})},[]),Kt=le(null),tr=Object(u.a)(Kt,2),or=tr[0],ot=tr[1];function Dr(Or,Ft){if(!Ft)return;typeof Ft=="function"?Ft(Or):Ft.scrollLeft!==Or&&(Ft.scrollLeft=Or)}var Ir=function(Ft){var Jt=Ft.currentTarget,br=Ft.scrollLeft,Zt=typeof br=="number"?br:Jt.scrollLeft,vt=Jt||rt;if(!ot()||ot()===vt){var bt;or(vt),Dr(Zt,mi.current),Dr(Zt,Rn.current),Dr(Zt,(bt=Mt.current)===null||bt===void 0?void 0:bt.setScrollLeft)}if(Jt){var zt=Jt.scrollWidth,Lt=Jt.clientWidth;_i(Zt>0),Gi(Zt0?[].concat(Object(d.a)(_),Object(d.a)(n(t).map(function(S){return Object(T.a)({fixed:a},S)}))):[].concat(Object(d.a)(_),[Object(T.a)(Object(T.a)({},y),{},{fixed:a})])},[])}function h(m){for(var _=!0,y=0;y=0;t-=1){var S=m[t];if(a&&S.fixed!=="right")a=!1;else if(!a&&S.fixed==="right"){Object(C.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function f(m){return m.map(function(_){var y=_.fixed,i=Object(D.a)(_,["fixed"]),a=y;return y==="left"?a="right":y==="right"&&(a="left"),Object(T.a)({fixed:a},i)})}function c(m,_){var y=m.prefixCls,i=m.columns,a=m.children,t=m.expandable,S=m.expandedKeys,x=m.getRowKey,o=m.onTriggerExpand,k=m.expandIcon,O=m.rowExpandable,b=m.expandIconColumnIndex,v=m.direction,g=m.expandRowByClick,w=u.useMemo(function(){return i||s(a)},[i,a]),M=u.useMemo(function(){if(t){var G,z=b||0,H=w[z],K=(G={},Object(P.a)(G,l.a,{className:"".concat(y,"-expand-icon-col")}),Object(P.a)(G,"title",""),Object(P.a)(G,"fixed",H?H.fixed:null),Object(P.a)(G,"className","".concat(y,"-row-expand-icon-cell")),Object(P.a)(G,"render",function(V,ae,he){var pe=x(ae,he),Re=S.has(pe),ke=O?O(ae):!0,ve=k({prefixCls:y,expanded:Re,expandable:ke,record:ae,onExpand:o});return g?u.createElement("span",{onClick:function(be){return be.stopPropagation()}},ve):ve}),G),U=w.slice();return z>=0&&U.splice(z,0,K),U}return w},[t,w,x,S,k,v]),N=u.useMemo(function(){var G=M;return _&&(G=_(G)),G.length||(G=[{render:function(){return null}}]),G},[_,M,v]),I=u.useMemo(function(){return v==="rtl"?f(n(N)):n(N)},[N,v]);return[N,I]}Z.b=c},wZgz:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.BlockCipher,u=d.algo,p=[],C=[],E=[],l=[],s=[],n=[],h=[],f=[],c=[],m=[];(function(){for(var i=[],a=0;a<256;a++)a<128?i[a]=a<<1:i[a]=a<<1^283;for(var t=0,S=0,a=0;a<256;a++){var x=S^S<<1^S<<2^S<<3^S<<4;x=x>>>8^x&255^99,p[t]=x,C[x]=t;var o=i[t],k=i[o],O=i[k],b=i[x]*257^x*16843008;E[t]=b<<24|b>>>8,l[t]=b<<16|b>>>16,s[t]=b<<8|b>>>24,n[t]=b;var b=O*16843009^k*65537^o*257^t*16843008;h[x]=b<<24|b>>>8,f[x]=b<<16|b>>>16,c[x]=b<<8|b>>>24,m[x]=b,t?(t=o^i[i[i[O^o]]],S^=i[i[S]]):t=S=1}})();var _=[0,1,2,4,8,16,32,64,128,27,54],y=u.AES=D.extend({_doReset:function(){var i;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var a=this._keyPriorReset=this._key,t=a.words,S=a.sigBytes/4,x=this._nRounds=S+6,o=(x+1)*4,k=this._keySchedule=[],O=0;O6&&O%S==4&&(i=p[i>>>24]<<24|p[i>>>16&255]<<16|p[i>>>8&255]<<8|p[i&255]):(i=i<<8|i>>>24,i=p[i>>>24]<<24|p[i>>>16&255]<<16|p[i>>>8&255]<<8|p[i&255],i^=_[O/S|0]<<24),k[O]=k[O-S]^i);for(var b=this._invKeySchedule=[],v=0;v>>24]]^f[p[i>>>16&255]]^c[p[i>>>8&255]]^m[p[i&255]]}},encryptBlock:function(i,a){this._doCryptBlock(i,a,this._keySchedule,E,l,s,n,p)},decryptBlock:function(i,a){var t=i[a+1];i[a+1]=i[a+3],i[a+3]=t,this._doCryptBlock(i,a,this._invKeySchedule,h,f,c,m,C);var t=i[a+1];i[a+1]=i[a+3],i[a+3]=t},_doCryptBlock:function(i,a,t,S,x,o,k,O){for(var b=this._nRounds,v=i[a]^t[0],g=i[a+1]^t[1],w=i[a+2]^t[2],M=i[a+3]^t[3],N=4,I=1;I>>24]^x[g>>>16&255]^o[w>>>8&255]^k[M&255]^t[N++],z=S[g>>>24]^x[w>>>16&255]^o[M>>>8&255]^k[v&255]^t[N++],H=S[w>>>24]^x[M>>>16&255]^o[v>>>8&255]^k[g&255]^t[N++],K=S[M>>>24]^x[v>>>16&255]^o[g>>>8&255]^k[w&255]^t[N++];v=G,g=z,w=H,M=K}var G=(O[v>>>24]<<24|O[g>>>16&255]<<16|O[w>>>8&255]<<8|O[M&255])^t[N++],z=(O[g>>>24]<<24|O[w>>>16&255]<<16|O[M>>>8&255]<<8|O[v&255])^t[N++],H=(O[w>>>24]<<24|O[M>>>16&255]<<16|O[v>>>8&255]<<8|O[g&255])^t[N++],K=(O[M>>>24]<<24|O[v>>>16&255]<<16|O[g>>>8&255]<<8|O[w&255])^t[N++];i[a]=G,i[a+1]=z,i[a+2]=H,i[a+3]=K},keySize:256/32});d.AES=D._createHelper(y)}(),P.AES})},wbyO:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.enc,p=u.Base64url={stringify:function(E,l=!0){var s=E.words,n=E.sigBytes,h=l?this._safe_map:this._map;E.clamp();for(var f=[],c=0;c>>2]>>>24-c%4*8&255,_=s[c+1>>>2]>>>24-(c+1)%4*8&255,y=s[c+2>>>2]>>>24-(c+2)%4*8&255,i=m<<16|_<<8|y,a=0;a<4&&c+a*.75>>6*(3-a)&63));var t=h.charAt(64);if(t)for(;f.length%4;)f.push(t);return f.join("")},parse:function(E,l=!0){var s=E.length,n=l?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var f=0;f>>6-f%4*2,_=c|m;n[h>>>2]|=_<<24-h%4*8,h++}return D.create(n,h)}}(),P.enc.Base64url})},"y0+3":function(j,Z,L){"use strict";L.d(Z,"a",function(){return n}),L.d(Z,"b",function(){return f});var P=/margin|padding|width|height|max|min|offset/,d={left:!0,top:!0},T={cssFloat:1,styleFloat:1,float:1};function D(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function u(c,m,_){if(m=m.toLowerCase(),_==="auto"){if(m==="height")return c.offsetHeight;if(m==="width")return c.offsetWidth}return m in d||(d[m]=P.test(m)),d[m]?parseFloat(_)||0:_}function p(c,m){var _=arguments.length,y=D(c);return m=T[m]?"cssFloat"in c.style?"cssFloat":"styleFloat":m,_===1?y:u(c,m,y[m]||c.style[m])}function C(c,m,_){var y=arguments.length;if(m=T[m]?"cssFloat"in c.style?"cssFloat":"styleFloat":m,y===3)return typeof _=="number"&&P.test(m)&&(_="".concat(_,"px")),c.style[m]=_,_;for(var i in m)m.hasOwnProperty(i)&&C(c,i,m[i]);return D(c)}function E(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function l(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function s(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),m=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:m}}function n(){var c=document.documentElement.clientWidth,m=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:m}}function h(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function f(c){var m=c.getBoundingClientRect(),_=document.documentElement;return{left:m.left+(window.pageXOffset||_.scrollLeft)-(_.clientLeft||document.body.clientLeft||0),top:m.top+(window.pageYOffset||_.scrollTop)-(_.clientTop||document.body.clientTop||0)}}},zrhs:function(j,Z,L){"use strict";var P=L("2qtc"),d=L("kLXV"),T=L("PpiC"),D=L("q1tI"),u=L.n(D),p=L("9kvl"),C=function(l){var s=l.shixunsDetail,n=l.globalSetting,h=l.loading,f=l.dispatch,c=Object(T.a)(l,["shixunsDetail","globalSetting","loading","dispatch"]);return u.a.createElement(d.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:s.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){f({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){f({type:"shixunsDetail/setActionTabs",payload:{}})}},u.a.createElement("p",{className:"tc font16"},"\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B",u.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};Z.a=Object(p.a)(function(E){var l=E.shixunsDetail,s=E.loading,n=E.globalSetting;return{shixunsDetail:l,globalSetting:n,loading:s.models.index}})(C)}}]);